v1.4.0: fixed game incorrectly awarding badges for winning with chals

This commit is contained in:
Evan Debenham
2022-09-26 16:12:17 -04:00
parent 580c24240f
commit ee3f92c5c6
@@ -253,10 +253,12 @@ public class WelcomeScene extends PixelScene {
for (Rankings.Record rec : Rankings.INSTANCE.records.toArray(new Rankings.Record[0])){ for (Rankings.Record rec : Rankings.INSTANCE.records.toArray(new Rankings.Record[0])){
try { try {
Rankings.INSTANCE.loadGameData(rec); Rankings.INSTANCE.loadGameData(rec);
if (Statistics.gameWon) Badges.unlock(Badges.Badge.VICTORY); if (Statistics.gameWon) {
if (Challenges.activeChallenges() >= 1) Badges.unlock(Badges.Badge.CHAMPION_1); Badges.unlock(Badges.Badge.VICTORY);
if (Challenges.activeChallenges() >= 3) Badges.unlock(Badges.Badge.CHAMPION_2); if (Challenges.activeChallenges() >= 1) Badges.unlock(Badges.Badge.CHAMPION_1);
if (Challenges.activeChallenges() >= 6) Badges.unlock(Badges.Badge.CHAMPION_3); if (Challenges.activeChallenges() >= 3) Badges.unlock(Badges.Badge.CHAMPION_2);
if (Challenges.activeChallenges() >= 6) Badges.unlock(Badges.Badge.CHAMPION_3);
}
Rankings.INSTANCE.saveGameData(rec); Rankings.INSTANCE.saveGameData(rec);
} catch (Exception e) { } catch (Exception e) {
//if we encounter a fatal per-record error, then clear that record //if we encounter a fatal per-record error, then clear that record