UCRP_GIANTRACERSHRUNKENORBI

"hit a giant racer with a shrunken Orbinaut"
Does what it says on the tin
This commit is contained in:
toaster 2023-10-19 18:43:40 +01:00
parent d2d7830afc
commit 6211c0b222
5 changed files with 18 additions and 0 deletions

View file

@ -419,6 +419,7 @@ struct roundconditions_t
boolean landmine_dunk;
boolean hit_midair;
boolean hit_drafter_lookback;
boolean giant_foe_shrunken_orbi;
boolean returntosender_mark;
UINT8 hittrackhazard[((MAX_LAPS+1)/8) + 1];

View file

@ -3047,6 +3047,7 @@ static void readcondition(UINT16 set, UINT32 id, char *word2)
|| (++offset && fastcmp(params[0], "LANDMINEDUNK"))
|| (++offset && fastcmp(params[0], "HITMIDAIR"))
|| (++offset && fastcmp(params[0], "HITDRAFTERLOOKBACK"))
|| (++offset && fastcmp(params[0], "GIANTRACERSHRUNKENORBI"))
|| (++offset && fastcmp(params[0], "RETURNMARKTOSENDER")))
{
//PARAMCHECK(1);

View file

@ -1676,6 +1676,8 @@ boolean M_CheckCondition(condition_t *cn, player_t *player)
return (player->roundconditions.hit_midair);
case UCRP_HITDRAFTERLOOKBACK:
return (player->roundconditions.hit_drafter_lookback);
case UCRP_GIANTRACERSHRUNKENORBI:
return (player->roundconditions.giant_foe_shrunken_orbi);
case UCRP_RETURNMARKTOSENDER:
return (player->roundconditions.returntosender_mark);
@ -2482,6 +2484,8 @@ static const char *M_GetConditionString(condition_t *cn)
return "hit another racer with a projectile while you're both in the air";
case UCRP_HITDRAFTERLOOKBACK:
return "hit a racer drafting off you while looking back at them";
case UCRP_GIANTRACERSHRUNKENORBI:
return "hit a giant racer with a shrunken Orbinaut";
case UCRP_RETURNMARKTOSENDER:
return "when cursed with Eggmark, blow up the racer responsible";

View file

@ -133,6 +133,7 @@ typedef enum
UCRP_LANDMINEDUNK, // huh? you died? that's weird. all i did was try to hug you...
UCRP_HITMIDAIR, // Hit another player mid-air with a kartfielditem
UCRP_HITDRAFTERLOOKBACK, // Hit a player that's behind you, while looking back at them, and they're drafting off you
UCRP_GIANTRACERSHRUNKENORBI, // Hit a giant racer with a shrunken Orbinaut
UCRP_RETURNMARKTOSENDER, // Hit the player responsible for Eggman Marking you with that explosion
UCRP_TRACKHAZARD, // (Don't) get hit by a track hazard (maybe specific lap)

View file

@ -2713,6 +2713,17 @@ boolean P_DamageMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, INT32 da
source->player->roundconditions.checkthisframe = true;
}
if (source->player->roundconditions.giant_foe_shrunken_orbi == false
&& source != target
&& player->growshrinktimer > 0
&& !P_MobjWasRemoved(inflictor)
&& inflictor->type == MT_ORBINAUT
&& inflictor->scale < FixedMul((FRACUNIT + SHRINK_SCALE), mapobjectscale * 2)) // halfway between base scale and shrink scale, a little bit of leeway
{
source->player->roundconditions.giant_foe_shrunken_orbi = true;
source->player->roundconditions.checkthisframe = true;
}
if (source == target
&& !P_MobjWasRemoved(inflictor)
&& inflictor->type == MT_SPBEXPLOSION