From baaa00656eb8cca455f1cab55a50a798db94b0cd Mon Sep 17 00:00:00 2001 From: Flashfyre Date: Fri, 29 Mar 2024 13:52:21 -0400 Subject: [PATCH] Revert "Fix strong trainer party members often not evolving due to dividing by 0" This reverts commit c59c5ca4137d365547a11b55d13fc8fd7c7e9f6a. --- src/battle-scene.ts | 3 +-- src/data/pokemon-species.ts | 4 ++-- src/system/game-data.ts | 2 -- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/battle-scene.ts b/src/battle-scene.ts index 16bd9a792..4e8b06c4a 100644 --- a/src/battle-scene.ts +++ b/src/battle-scene.ts @@ -58,7 +58,6 @@ import { initTouchControls } from './touch-controls'; export const bypassLogin = false; -export const SEED_OVERRIDE = ''; export const STARTING_LEVEL_OVERRIDE = 0; export const STARTING_WAVE_OVERRIDE = 0; export const STARTING_BIOME_OVERRIDE = Biome.TOWN; @@ -780,7 +779,7 @@ export default class BattleScene extends Phaser.Scene { reset(clearScene?: boolean): void { this.gameMode = gameModes[GameModes.CLASSIC]; - this.setSeed(SEED_OVERRIDE || Utils.randomString(24)); + this.setSeed(Utils.randomString(24)); console.log('Seed:', this.seed); this.score = 0; diff --git a/src/data/pokemon-species.ts b/src/data/pokemon-species.ts index 02483bc46..3b822c763 100644 --- a/src/data/pokemon-species.ts +++ b/src/data/pokemon-species.ts @@ -498,8 +498,8 @@ export default class PokemonSpecies extends PokemonSpeciesForm { evolutionChance = Math.min(minChance + easeInFunc(Math.min(level - ev.level, maxLevelDiff) / maxLevelDiff) * (1 - minChance), 1); } } else { - let preferredMinLevel = Math.max((ev.level - 1) + ev.wildDelay * this.getStrengthLevelDiff(strength + 1), 1); - let evolutionLevel = Math.max(ev.level > 1 ? ev.level : Math.floor(preferredMinLevel / 2), 1); + let preferredMinLevel = (ev.level - 1) + ev.wildDelay * this.getStrengthLevelDiff(strength + 1); + let evolutionLevel = ev.level > 1 ? ev.level : Math.floor(preferredMinLevel / 2); if (ev.level <= 1 && pokemonPrevolutions.hasOwnProperty(this.speciesId)) { const prevolutionLevel = pokemonEvolutions[pokemonPrevolutions[this.speciesId]].find(ev => ev.speciesId === this.speciesId).level; diff --git a/src/system/game-data.ts b/src/system/game-data.ts index 764d4376d..642c314bf 100644 --- a/src/system/game-data.ts +++ b/src/system/game-data.ts @@ -548,8 +548,6 @@ export class GameData { scene.setSeed(sessionData.seed || scene.game.config.seed[0]); scene.resetSeed(); - console.log('Seed:', scene.seed); - scene.sessionPlayTime = sessionData.playTime || 0; const loadPokemonAssets: Promise[] = [];