diff --git a/src/challenges/challenges.c b/src/challenges/challenges.c index 4823bfb..114dbf9 100644 --- a/src/challenges/challenges.c +++ b/src/challenges/challenges.c @@ -494,6 +494,10 @@ static void completeChallenge(void) player->flags |= EF_IMMORTAL; + retreatAllies(); + + retreatEnemies(); + awardStatsTrophies(); } } @@ -513,6 +517,10 @@ static void failChallenge(void) battle.status = MS_TIME_UP; } + retreatAllies(); + + retreatEnemies(); + awardStatsTrophies(); } } diff --git a/src/challenges/challenges.h b/src/challenges/challenges.h index 6a5d6b0..169073c 100644 --- a/src/challenges/challenges.h +++ b/src/challenges/challenges.h @@ -31,6 +31,8 @@ extern void updateAccuracyStats(unsigned int *stats); extern int getJSONValue(cJSON *node, char *name, int defValue); extern long lookup(char *name); extern void awardStatsTrophies(void); +extern void retreatAllies(void); +extern void retreatEnemies(void); extern Dev dev; extern Battle battle;