Players win if classic and past floor 200 (#1348)

* Players win if classic and past floor 200

* isClassic

* no need to handle game over twice
This commit is contained in:
Tempoanon 2024-05-25 05:36:30 -04:00 committed by GitHub
parent 34474fb10e
commit d71451fc23
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 10 additions and 0 deletions

View File

@ -729,6 +729,11 @@ export class EncounterPhase extends BattlePhase {
this.scene.initSession();
// Failsafe if players somehow skip floor 200 in classic mode
if (this.scene.gameMode.isClassic && this.scene.currentBattle.waveIndex > 200) {
this.scene.unshiftPhase(new GameOverPhase(this.scene));
}
const loadEnemyAssets = [];
const battle = this.scene.currentBattle;
@ -3862,6 +3867,11 @@ export class GameOverPhase extends BattlePhase {
start() {
super.start();
// Failsafe if players somehow skip floor 200 in classic mode
if (this.scene.gameMode.isClassic && this.scene.currentBattle.waveIndex > 200) {
this.victory = true;
}
if (this.victory || !this.scene.enableRetries) {
this.handleGameOver();
} else {