Battle: replace Karma Bomb with death

- Lose 2 points when you die.
- Respawn with 3 bumpers.
This commit is contained in:
James R 2023-02-22 00:06:24 -08:00
parent 87a6743c0f
commit deac3a373f
3 changed files with 11 additions and 14 deletions

View file

@ -4170,22 +4170,14 @@ void K_HandleBumperChanges(player_t *player, UINT8 prevBumpers)
} }
else if (player->bumpers == 0 && prevBumpers > 0) else if (player->bumpers == 0 && prevBumpers > 0)
{ {
mobj_t *karmahitbox = P_SpawnMobj(player->mo->x, player->mo->y, player->mo->z, MT_KARMAHITBOX);
P_SetTarget(&karmahitbox->target, player->mo);
karmahitbox->destscale = player->mo->destscale;
P_SetScale(karmahitbox, player->mo->scale);
player->karmadelay = comebacktime;
if (battlecapsules || bossinfo.valid) if (battlecapsules || bossinfo.valid)
{ {
player->pflags |= (PF_NOCONTEST|PF_ELIMINATED); player->pflags |= (PF_NOCONTEST|PF_ELIMINATED);
P_DamageMobj(player->mo, NULL, NULL, 1, DMG_TIMEOVER); P_DamageMobj(player->mo, NULL, NULL, 1, DMG_TIMEOVER);
} }
else if (netgame) else
{ {
CONS_Printf(M_GetText("%s lost all of their bumpers!\n"), player_names[player-players]); P_KillMobj(player->mo, NULL, NULL, DMG_NORMAL);
} }
} }

View file

@ -1170,8 +1170,15 @@ void P_KillMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, UINT8 damaget
} }
if (gametyperules & GTR_BUMPERS) if (gametyperules & GTR_BUMPERS)
{
K_CheckBumpers(); K_CheckBumpers();
if (target->player->roundscore > 1)
target->player->roundscore -= 2;
else
target->player->roundscore = 0;
}
target->player->trickpanel = 0; target->player->trickpanel = 0;
} }

View file

@ -11819,10 +11819,8 @@ void P_SpawnPlayer(INT32 playernum)
} }
else if (p->bumpers <= 0) else if (p->bumpers <= 0)
{ {
mobj_t *karmahitbox = P_SpawnMobj(mobj->x, mobj->y, mobj->z, MT_KARMAHITBOX); // Player hitbox is too small!! p->bumpers = K_StartingBumperCount();
P_SetTarget(&karmahitbox->target, mobj); K_SpawnPlayerBattleBumpers(p);
karmahitbox->destscale = mobj->scale;
P_SetScale(karmahitbox, mobj->scale);
} }
} }
} }