mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Super Flicky: nerf while owner is in pain state
- Not nerfed while orbiting the owner
This commit is contained in:
parent
d16386f9b5
commit
a217178951
1 changed files with 23 additions and 0 deletions
|
|
@ -273,6 +273,8 @@ struct Flicky : mobj_t
|
||||||
|
|
||||||
bool stunned() const { return mode() == Mode::kStunned || mode() == Mode::kWeak; }
|
bool stunned() const { return mode() == Mode::kStunned || mode() == Mode::kWeak; }
|
||||||
|
|
||||||
|
bool owner_in_pain() const { return source()->player && P_PlayerInPain(source()->player); }
|
||||||
|
|
||||||
void light_up(bool n)
|
void light_up(bool n)
|
||||||
{
|
{
|
||||||
if (n)
|
if (n)
|
||||||
|
|
@ -613,6 +615,25 @@ struct Flicky : mobj_t
|
||||||
S_StartSound(this, sfx_s3k9f);
|
S_StartSound(this, sfx_s3k9f);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void try_nerf()
|
||||||
|
{
|
||||||
|
if (owner_in_pain())
|
||||||
|
{
|
||||||
|
mode(Mode::kWeak);
|
||||||
|
delay(2);
|
||||||
|
nerf();
|
||||||
|
flags |= MF_NOGRAVITY;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void preserve_nerf()
|
||||||
|
{
|
||||||
|
if (owner_in_pain())
|
||||||
|
{
|
||||||
|
delay(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void whip()
|
void whip()
|
||||||
{
|
{
|
||||||
reflect();
|
reflect();
|
||||||
|
|
@ -772,6 +793,7 @@ void Obj_SuperFlickyThink(mobj_t* mobj)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Flicky::Mode::kHunting:
|
case Flicky::Mode::kHunting:
|
||||||
|
x->try_nerf();
|
||||||
x->chase();
|
x->chase();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
@ -779,6 +801,7 @@ void Obj_SuperFlickyThink(mobj_t* mobj)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Flicky::Mode::kWeak:
|
case Flicky::Mode::kWeak:
|
||||||
|
x->preserve_nerf();
|
||||||
x->chase();
|
x->chase();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue