Challenge 10 fixes.
This commit is contained in:
parent
0cc1c65628
commit
e14cba3761
|
@ -15,6 +15,7 @@
|
|||
"challenge" : {
|
||||
"rescueLimit" : 8,
|
||||
"timeLimit" : 300,
|
||||
"allowPlayerDeath" : 1,
|
||||
"challenges" : [
|
||||
{
|
||||
"type" : "CHALLENGE_RESCUE",
|
||||
|
|
|
@ -30,6 +30,7 @@ static void updateDisabledChallenge(Challenge *c);
|
|||
static void updateItemsChallenge(Challenge *c);
|
||||
static void updateSurrenderChallenge(Challenge *c);
|
||||
static void updateWaypointChallenge(Challenge *c);
|
||||
static void updateRescueChallenge(Challenge *c);
|
||||
static void completeChallenge(void);
|
||||
static void failChallenge(void);
|
||||
static int updateChallenges(void);
|
||||
|
@ -294,6 +295,10 @@ static int updateChallenges(void)
|
|||
case CHALLENGE_WAYPOINTS:
|
||||
updateWaypointChallenge(c);
|
||||
break;
|
||||
|
||||
case CHALLENGE_RESCUE:
|
||||
updateRescueChallenge(c);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -446,6 +451,14 @@ static void updateWaypointChallenge(Challenge *c)
|
|||
}
|
||||
}
|
||||
|
||||
static void updateRescueChallenge(Challenge *c)
|
||||
{
|
||||
if (!c->passed)
|
||||
{
|
||||
c->passed = battle.stats[STAT_CIVILIANS_RESCUED] >= c->value;
|
||||
}
|
||||
}
|
||||
|
||||
char *getChallengeDescription(Challenge *c)
|
||||
{
|
||||
if (c->type == CHALLENGE_TIME)
|
||||
|
|
Loading…
Reference in New Issue