Retreat allies and enemies at end of challenge, so they don't keep fighting.

This commit is contained in:
Steve 2016-05-13 09:05:42 +01:00
parent 2920b00e96
commit 1306268847
2 changed files with 10 additions and 0 deletions

View File

@ -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();
}
}

View File

@ -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;