Battle: have 6 emeralds and touch the 7th to win instantly

Win instantly instead of waiting for the emerald to finish
swirling into your body.
This commit is contained in:
James R 2024-01-20 21:31:08 -08:00
parent e06e0dcb3a
commit 8a882c55e5
2 changed files with 12 additions and 0 deletions

View file

@ -207,6 +207,11 @@ void K_CheckEmeralds(player_t *player)
return;
}
if (player->exiting)
{
return;
}
player->roundscore = 100; // lmao
P_DoAllPlayersExit(0, false);

View file

@ -560,6 +560,13 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
Obj_SetEmeraldAwardee(special, toucher);
}
// You have 6 emeralds and you touch the 7th: win instantly!
if (ALLCHAOSEMERALDS((player->emeralds | special->extravalue1)))
{
player->emeralds |= special->extravalue1;
K_CheckEmeralds(player);
}
return;
case MT_SPECIAL_UFO:
if (Obj_UFOEmeraldCollect(special, toucher) == false)