UCRP_FINISHPERFECT

Complete a perfect round (1st every lap) to get this
This commit is contained in:
toaster 2023-10-14 23:21:51 +01:00
parent e4a3b85adf
commit b2aac22856
3 changed files with 12 additions and 0 deletions

View file

@ -2894,6 +2894,7 @@ static void readcondition(UINT16 set, UINT32 id, char *word2)
ty = UCRP_PODIUMEMERALD + offset;
}
else if ((offset=0) || fastcmp(params[0], "FINISHCOOL")
|| (++offset && fastcmp(params[0], "FINISHPERFECT"))
|| (++offset && fastcmp(params[0], "FINISHALLPRISONS"))
|| (++offset && fastcmp(params[0], "NOCONTEST")))
{

View file

@ -1489,6 +1489,14 @@ boolean M_CheckCondition(condition_t *cn, player_t *player)
&& !(player->pflags & PF_NOCONTEST)
&& M_NotFreePlay()
&& !K_IsPlayerLosing(player));
case UCRP_FINISHPERFECT:
return (player->exiting
&& !(player->pflags & PF_NOCONTEST)
&& M_NotFreePlay()
&& (gamespeed != KARTSPEED_EASY)
&& (player->tally.active == true)
&& (player->tally.totalLaps > 0) // Only true if not Time Attack
&& (player->tally.laps >= player->tally.totalLaps));
case UCRP_FINISHALLPRISONS:
return (battleprisons
&& !(player->pflags & PF_NOCONTEST)
@ -2216,6 +2224,8 @@ static const char *M_GetConditionString(condition_t *cn)
case UCRP_FINISHCOOL:
return "finish in good standing";
case UCRP_FINISHPERFECT:
return "finish a perfect round";
case UCRP_FINISHALLPRISONS:
return "break every prison";
case UCRP_NOCONTEST:

View file

@ -94,6 +94,7 @@ typedef enum
UCRP_PODIUMPRIZE, // Get to podium sequence with that cup's bonus (alternate string version of UCRP_PODIUMEMERALD
UCRP_FINISHCOOL, // Finish in good standing
UCRP_FINISHPERFECT, // Finish a perfect race
UCRP_FINISHALLPRISONS, // Break all prisons
UCRP_NOCONTEST, // No Contest