diff --git a/src/battle-scene.ts b/src/battle-scene.ts index 7cfda5cd8cc..6f28f27f260 100644 --- a/src/battle-scene.ts +++ b/src/battle-scene.ts @@ -317,9 +317,6 @@ export default class BattleScene extends Phaser.Scene { } create() { - this.seed = this.game.config.seed[0]; - console.log('Seed:', this.seed); - initGameSpeed.apply(this); this.setupControls(); @@ -535,6 +532,9 @@ export default class BattleScene extends Phaser.Scene { } reset(): void { + this.seed = Utils.randomString(16); + console.log('Seed:', this.seed); + this.pokeballCounts = Object.fromEntries(Utils.getEnumValues(PokeballType).filter(p => p <= PokeballType.MASTER_BALL).map(t => [ t, 0 ])); this.pokeballCounts[PokeballType.POKEBALL] += 5; diff --git a/src/main.ts b/src/main.ts index 77a15487781..f43b9e0622d 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,11 +1,9 @@ import Phaser from 'phaser'; import BattleScene from './battle-scene'; -import * as Utils from './utils'; const config: Phaser.Types.Core.GameConfig = { type: Phaser.WEBGL, parent: 'app', - seed: [ Utils.randomString(16) ], scale: { width: 1920, height: 1080,