mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2024-11-29 02:06:07 +00:00
[P2] Fix duplicate mon ID / RNG not properly resetting after game over (#4505)
This commit is contained in:
parent
bcec819fa9
commit
6d89ad9569
@ -1040,10 +1040,6 @@ export default class BattleScene extends SceneBase {
|
|||||||
|
|
||||||
this.gameMode = getGameMode(GameModes.CLASSIC);
|
this.gameMode = getGameMode(GameModes.CLASSIC);
|
||||||
|
|
||||||
this.setSeed(Overrides.SEED_OVERRIDE || Utils.randomString(24));
|
|
||||||
console.log("Seed:", this.seed);
|
|
||||||
this.resetSeed(); // Properly resets RNG after saving and quitting a session
|
|
||||||
|
|
||||||
this.disableMenu = false;
|
this.disableMenu = false;
|
||||||
|
|
||||||
this.score = 0;
|
this.score = 0;
|
||||||
@ -1078,6 +1074,12 @@ export default class BattleScene extends SceneBase {
|
|||||||
//@ts-ignore - allowing `null` for currentBattle causes a lot of trouble
|
//@ts-ignore - allowing `null` for currentBattle causes a lot of trouble
|
||||||
this.currentBattle = null; // TODO: resolve ts-ignore
|
this.currentBattle = null; // TODO: resolve ts-ignore
|
||||||
|
|
||||||
|
// Reset RNG after end of game or save & quit.
|
||||||
|
// This needs to happen after clearing this.currentBattle or the seed will be affected by the last wave played
|
||||||
|
this.setSeed(Overrides.SEED_OVERRIDE || Utils.randomString(24));
|
||||||
|
console.log("Seed:", this.seed);
|
||||||
|
this.resetSeed();
|
||||||
|
|
||||||
this.biomeWaveText.setText(startingWave.toString());
|
this.biomeWaveText.setText(startingWave.toString());
|
||||||
this.biomeWaveText.setVisible(false);
|
this.biomeWaveText.setVisible(false);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user