Instawhip nerfs galore

This commit is contained in:
AJ Martinez 2023-06-06 19:28:08 -07:00
parent e0e09073a7
commit 50eab03fc0
3 changed files with 26 additions and 11 deletions

View file

@ -855,8 +855,8 @@ boolean K_InstaWhipCollide(mobj_t *shield, mobj_t *victim)
attacker->renderflags &= ~RF_DONTDRAW;
attackerPlayer->spindashboost = 0;
attackerPlayer->sneakertimer = 0;
attackerPlayer->instaShieldCooldown = TICRATE*2;
attackerPlayer->guardCooldown = TICRATE*2;
attackerPlayer->instaShieldCooldown = GUARDBREAK_COOLDOWN;
attackerPlayer->guardCooldown = GUARDBREAK_COOLDOWN;
attackerPlayer->flashing = 0;
// Localized broly for a local event.

View file

@ -1394,6 +1394,10 @@ static void K_UpdateDraft(player_t *player)
leniency *= 4;
}
// Opportunity cost for berserk attacking. Get your slingshot speed first!
if (player->instaShieldCooldown)
return;
// Not enough speed to draft.
if (player->speed >= 20 * player->mo->scale)
{
@ -3655,8 +3659,8 @@ void K_DoGuardBreak(mobj_t *t1, mobj_t *t2) {
return;
// short-circuit instashield for vfx visibility
t1->player->instaShieldCooldown = 2*TICRATE;
t1->player->guardCooldown = 2*TICRATE;
t1->player->instaShieldCooldown = GUARDBREAK_COOLDOWN;
t1->player->guardCooldown = GUARDBREAK_COOLDOWN;
S_StartSound(t1, sfx_gbrk);
K_AddHitLag(t1, 24, true);
@ -7932,11 +7936,18 @@ void K_KartPlayerThink(player_t *player, ticcmd_t *cmd)
if (player->gateBoost)
player->gateBoost--;
if (player->instaShieldCooldown)
if (player->rings > 0)
{
player->instaShieldCooldown--;
if (!P_IsObjectOnGround(player->mo))
player->instaShieldCooldown = max(player->instaShieldCooldown, 1);
player->instaShieldCooldown = INSTAWHIP_COOLDOWN;
}
else
{
if (player->instaShieldCooldown)
{
player->instaShieldCooldown--;
if (!P_IsObjectOnGround(player->mo))
player->instaShieldCooldown = max(player->instaShieldCooldown, 1);
}
}
if (player->guardCooldown)
@ -8184,7 +8195,7 @@ void K_KartPlayerThink(player_t *player, ticcmd_t *cmd)
}
if (K_PlayerGuard(player))
player->instaShieldCooldown = max(player->instaShieldCooldown, 12);
player->instaShieldCooldown = max(player->instaShieldCooldown, INSTAWHIP_DROPGUARD);
// Roulette Code
K_KartItemRoulette(player, cmd);
@ -10673,8 +10684,8 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
}
else
{
player->instaShieldCooldown = 50;
player->guardCooldown = 50;
player->instaShieldCooldown = INSTAWHIP_COOLDOWN;
player->guardCooldown = INSTAWHIP_COOLDOWN;
S_StartSound(player->mo, sfx_iwhp);
mobj_t *whip = P_SpawnMobj(player->mo->x, player->mo->y, player->mo->z, MT_INSTAWHIP);
P_SetTarget(&player->whip, whip);

View file

@ -32,6 +32,10 @@ Make sure this matches the actual number of states
#define GROW_PHYSICS_SCALE (3*FRACUNIT/2)
#define SHRINK_PHYSICS_SCALE (3*FRACUNIT/4)
#define INSTAWHIP_COOLDOWN (TICRATE*2)
#define INSTAWHIP_DROPGUARD (12)
#define GUARDBREAK_COOLDOWN (TICRATE*4)
#define RR_PROJECTILE_FUSE (8*TICRATE)
#define STUMBLE_STEEP_VAL ANG60