Allow player to be disabled in Challenge mode.
This commit is contained in:
parent
a8e447b870
commit
23e38a6313
|
@ -458,6 +458,10 @@ static void drawObjectives(void)
|
|||
{
|
||||
drawText(SCREEN_WIDTH / 2, 35, 14, TA_CENTER, colors.white, "%d / %d", battle.stats[STAT_CIVILIANS_RESCUED], game.currentMission->challengeData.rescueLimit);
|
||||
}
|
||||
else if (player->flags & EF_MUST_DISABLE)
|
||||
{
|
||||
drawText(SCREEN_WIDTH / 2, 35, 14, TA_CENTER, colors.white, _("System Power : %d%%"), player->systemPower);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -143,6 +143,16 @@ void doPlayer(void)
|
|||
}
|
||||
}
|
||||
|
||||
/* really only used in challenge mode */
|
||||
if (player->systemPower <= 0 && battle.status == MS_IN_PROGRESS)
|
||||
{
|
||||
if (game.currentMission->challengeData.isChallenge)
|
||||
{
|
||||
addHudMessage(colors.red, _("Challenge Failed!"));
|
||||
failMission();
|
||||
}
|
||||
}
|
||||
|
||||
if (battle.status == MS_IN_PROGRESS)
|
||||
{
|
||||
selectMissionTarget();
|
||||
|
|
Loading…
Reference in New Issue