mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
UCRP_GACHABOMMISER
Break a target (Prison Egg/UFO) using exactly one Gachabom again and again Becomes invalid if an Insta-Whip collides with a target, or you throw two at the same time
This commit is contained in:
parent
01b97cb829
commit
3e494a342c
7 changed files with 27 additions and 0 deletions
|
|
@ -417,7 +417,9 @@ struct roundconditions_t
|
||||||
|
|
||||||
UINT8 hittrackhazard[((MAX_LAPS+1)/8) + 1];
|
UINT8 hittrackhazard[((MAX_LAPS+1)/8) + 1];
|
||||||
|
|
||||||
|
// Attack-based conditions
|
||||||
targetdamaging_t targetdamaging;
|
targetdamaging_t targetdamaging;
|
||||||
|
UINT8 gachabom_miser;
|
||||||
|
|
||||||
mobjeflag_t wet_player;
|
mobjeflag_t wet_player;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3034,6 +3034,11 @@ static void readcondition(UINT16 set, UINT32 id, char *word2)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (fastcmp(params[0], "GACHABOMMISER"))
|
||||||
|
{
|
||||||
|
//PARAMCHECK(1);
|
||||||
|
ty = UCRP_GACHABOMMISER;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
deh_warning("Invalid condition name %s for condition ID %d", params[0], id+1);
|
deh_warning("Invalid condition name %s for condition ID %d", params[0], id+1);
|
||||||
|
|
|
||||||
|
|
@ -11722,6 +11722,10 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
|
||||||
K_ThrowKartItem(player, true, MT_GACHABOM, 0, 0, 0);
|
K_ThrowKartItem(player, true, MT_GACHABOM, 0, 0, 0);
|
||||||
K_PlayAttackTaunt(player->mo);
|
K_PlayAttackTaunt(player->mo);
|
||||||
player->itemamount--;
|
player->itemamount--;
|
||||||
|
player->roundconditions.gachabom_miser = (
|
||||||
|
(player->roundconditions.gachabom_miser == 0)
|
||||||
|
? 1 : 0xFF
|
||||||
|
);
|
||||||
K_UpdateHnextList(player, false);
|
K_UpdateHnextList(player, false);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
|
|
@ -1695,6 +1695,12 @@ boolean M_CheckCondition(condition_t *cn, player_t *player)
|
||||||
case UCRP_TARGETATTACKMETHOD:
|
case UCRP_TARGETATTACKMETHOD:
|
||||||
return (player->roundconditions.targetdamaging == (targetdamaging_t)cn->requirement);
|
return (player->roundconditions.targetdamaging == (targetdamaging_t)cn->requirement);
|
||||||
|
|
||||||
|
case UCRP_GACHABOMMISER:
|
||||||
|
return (
|
||||||
|
player->roundconditions.targetdamaging == UFOD_GACHABOM
|
||||||
|
&& player->roundconditions.gachabom_miser != 0xFF
|
||||||
|
);
|
||||||
|
|
||||||
case UCRP_WETPLAYER:
|
case UCRP_WETPLAYER:
|
||||||
return (((player->roundconditions.wet_player & cn->requirement) == 0)
|
return (((player->roundconditions.wet_player & cn->requirement) == 0)
|
||||||
&& !player->roundconditions.fell_off); // Levels with water tend to texture their pits as water too
|
&& !player->roundconditions.fell_off); // Levels with water tend to texture their pits as water too
|
||||||
|
|
@ -2435,6 +2441,9 @@ static const char *M_GetConditionString(condition_t *cn)
|
||||||
return va("using only %s", work);
|
return va("using only %s", work);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case UCRP_GACHABOMMISER:
|
||||||
|
return "using exactly one Gachabom repeatedly";
|
||||||
|
|
||||||
case UCRP_WETPLAYER:
|
case UCRP_WETPLAYER:
|
||||||
return va("without %s %s",
|
return va("without %s %s",
|
||||||
(cn->requirement & MFE_TOUCHWATER) ? "touching any" : "going into",
|
(cn->requirement & MFE_TOUCHWATER) ? "touching any" : "going into",
|
||||||
|
|
|
||||||
|
|
@ -126,6 +126,7 @@ typedef enum
|
||||||
UCRP_TRACKHAZARD, // (Don't) get hit by a track hazard (maybe specific lap)
|
UCRP_TRACKHAZARD, // (Don't) get hit by a track hazard (maybe specific lap)
|
||||||
|
|
||||||
UCRP_TARGETATTACKMETHOD, // Break targets/UFO using only one method
|
UCRP_TARGETATTACKMETHOD, // Break targets/UFO using only one method
|
||||||
|
UCRP_GACHABOMMISER, // Break targets/UFO using exactly one Gachabom repeatedly
|
||||||
|
|
||||||
UCRP_WETPLAYER, // Don't touch [strictness] [fluid]
|
UCRP_WETPLAYER, // Don't touch [strictness] [fluid]
|
||||||
} conditiontype_t;
|
} conditiontype_t;
|
||||||
|
|
|
||||||
|
|
@ -73,6 +73,8 @@ bool award_target(mobj_t* mobj)
|
||||||
{
|
{
|
||||||
player->itemtype = KITEM_GACHABOM;
|
player->itemtype = KITEM_GACHABOM;
|
||||||
player->itemamount++;
|
player->itemamount++;
|
||||||
|
if (player->roundconditions.gachabom_miser == 1)
|
||||||
|
player->roundconditions.gachabom_miser = 0;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -987,6 +987,10 @@ void P_TrackRoundConditionTargetDamage(targetdamaging_t targetdamaging)
|
||||||
if (players[g_localplayers[i]].spectator)
|
if (players[g_localplayers[i]].spectator)
|
||||||
continue;
|
continue;
|
||||||
players[i].roundconditions.targetdamaging |= targetdamaging;
|
players[i].roundconditions.targetdamaging |= targetdamaging;
|
||||||
|
/* -- the following isn't needed because we can just check for targetdamaging == UFOD_GACHABOM
|
||||||
|
if (targetdamaging != UFOD_GACHABOM)
|
||||||
|
players[i].roundconditions.gachabom_miser = 0xFF;
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue