From b37a2681695501ecc5e5e2d131fdb7d210dcea10 Mon Sep 17 00:00:00 2001 From: Steve Date: Sun, 13 Mar 2016 10:51:48 +0000 Subject: [PATCH] Added capital ships to challenge killLimit check. --- src/challenges/challenges.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/challenges/challenges.c b/src/challenges/challenges.c index 27082ad..fcedc30 100644 --- a/src/challenges/challenges.c +++ b/src/challenges/challenges.c @@ -109,7 +109,7 @@ static int challengeFinished(void) } /* disabled enemies count as killed during challenges - not player exclusive, but no need to worry about AI contributions here */ - if (game.currentMission->challengeData.killLimit > 0 && (battle.stats[STAT_ENEMIES_KILLED_PLAYER] + battle.stats[STAT_ENEMIES_DISABLED]) >= game.currentMission->challengeData.killLimit) + if (game.currentMission->challengeData.killLimit > 0 && (battle.stats[STAT_ENEMIES_KILLED_PLAYER] + battle.stats[STAT_CAPITAL_SHIPS_DESTROYED] + battle.stats[STAT_ENEMIES_DISABLED]) >= game.currentMission->challengeData.killLimit) { return 1; }