Great Value Flame Dash (+ some bubble softening)

This commit is contained in:
AJ Martinez 2024-05-04 17:29:35 -07:00
parent 03037a2f13
commit ae36a6d72d
4 changed files with 26 additions and 5 deletions

View file

@ -779,6 +779,8 @@ struct player_t
UINT16 flamemeter; // Flame Shield dash meter left
UINT8 flamelength; // Flame Shield dash meter, number of segments
UINT16 counterdash; // Flame Shield boost without the flame, largely. Used in places where awarding thrust would affect player control.
UINT16 ballhogcharge; // Ballhog charge up -- the higher this value, the more projectiles
boolean ballhogtap; // Ballhog released during charge: used to allow semirapid tapfire

View file

@ -3483,6 +3483,16 @@ static void K_GetKartBoostPower(player_t *player)
);
}
if (player->counterdash) // "Fake Flame" (bubble, voltage)
{
fixed_t dash = K_FlameShieldDashVar(player->counterdash);
ADDBOOST(
dash, // + infinite top speed
3*FRACUNIT, // + 300% acceleration
FixedMul(FixedDiv(dash, FRACUNIT/2), SLIPTIDEHANDLING/2) // + infinite handling
);
}
if (player->wavedashboost)
{
// NB: This is intentionally under the 25% handleboost threshold required to initiate a sliptide
@ -8920,6 +8930,9 @@ void K_KartPlayerThink(player_t *player, ticcmd_t *cmd)
S_StartSoundAtVolume(player->mo, sfx_fshld3, 255/3);
}
if (player->counterdash)
player->counterdash--;
if (player->sneakertimer && player->wipeoutslow > 0 && player->wipeoutslow < wipeoutslowtime+1)
player->wipeoutslow = wipeoutslowtime+1;
@ -10867,7 +10880,7 @@ static void K_KartDrift(player_t *player, boolean onground)
if (player->trickcharge && dokicker)
{
// 2.2 - Egg-friendly trick stuff
if (G_CompatLevel(0x000A))
if (G_CompatLevel(0x000B))
{
player->driftboost += 20;
player->wavedashboost += 10;
@ -10877,7 +10890,7 @@ static void K_KartDrift(player_t *player, boolean onground)
else
{
player->driftboost += TICRATE;
player->flamedash += TICRATE/2;
player->counterdash += TICRATE/2;
P_Thrust(player->mo, pushdir, player->speed / 6);
}
@ -13202,10 +13215,10 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
K_ThrowKartItem(player, (player->throwdir > 0), MT_BUBBLESHIELDTRAP, -1, 0, 0);
if (player->throwdir == -1)
{
P_InstaThrust(player->mo, player->mo->angle, player->speed + (80 * mapobjectscale));
player->counterdash += TICRATE/2;
player->wavedashboost += TICRATE;
player->wavedashpower = FRACUNIT;
player->fakeBoost = TICRATE/2;
player->fakeBoost += TICRATE/2;
}
K_PlayAttackTaunt(player->mo);
player->bubbleblowup = 0;

View file

@ -428,6 +428,8 @@ static int player_get(lua_State *L)
lua_pushinteger(L, plr->bubbleblowup);
else if (fastcmp(field,"flamedash"))
lua_pushinteger(L, plr->flamedash);
else if (fastcmp(field,"counterdash"))
lua_pushinteger(L, plr->counterdash);
else if (fastcmp(field,"flamemeter"))
lua_pushinteger(L, plr->flamemeter);
else if (fastcmp(field,"flamelength"))
@ -984,6 +986,8 @@ static int player_set(lua_State *L)
plr->bubbleblowup = luaL_checkinteger(L, 3);
else if (fastcmp(field,"flamedash"))
plr->flamedash = luaL_checkinteger(L, 3);
else if (fastcmp(field,"counterdash"))
plr->counterdash = luaL_checkinteger(L, 3);
else if (fastcmp(field,"flamemeter"))
plr->flamemeter = luaL_checkinteger(L, 3);
else if (fastcmp(field,"flamelength"))

View file

@ -508,6 +508,7 @@ static void P_NetArchivePlayers(savebuffer_t *save)
WRITEUINT8(save->p, players[i].bubblecool);
WRITEUINT8(save->p, players[i].bubbleblowup);
WRITEUINT16(save->p, players[i].flamedash);
WRITEUINT16(save->p, players[i].counterdash);
WRITEUINT16(save->p, players[i].flamemeter);
WRITEUINT8(save->p, players[i].flamelength);
@ -1109,6 +1110,7 @@ static void P_NetUnArchivePlayers(savebuffer_t *save)
players[i].bubblecool = READUINT8(save->p);
players[i].bubbleblowup = READUINT8(save->p);
players[i].flamedash = READUINT16(save->p);
players[i].counterdash = READUINT16(save->p);
players[i].flamemeter = READUINT16(save->p);
players[i].flamelength = READUINT8(save->p);