diff --git a/src/battle-scene.ts b/src/battle-scene.ts index d8aac67c7..f5a38d137 100644 --- a/src/battle-scene.ts +++ b/src/battle-scene.ts @@ -1126,7 +1126,9 @@ export default class BattleScene extends Phaser.Scene { this.ui?.achvBar.setY((this.game.canvas.height / 6 + this.moneyText.y + 15)); } - getMaxExpLevel(): integer { + getMaxExpLevel(ignoreLevelCap?: boolean): integer { + if (ignoreLevelCap) + return Number.MAX_SAFE_INTEGER; const lastWaveIndex = Math.ceil((this.currentBattle?.waveIndex || 1) / 10) * 10; const baseLevel = (1 + lastWaveIndex / 2 + Math.pow(lastWaveIndex / 25, 2)) * 1.2; return Math.ceil(baseLevel / 2) * 2 + 2; diff --git a/src/modifier/modifier.ts b/src/modifier/modifier.ts index dad2b58b6..ae62e989a 100644 --- a/src/modifier/modifier.ts +++ b/src/modifier/modifier.ts @@ -1080,7 +1080,7 @@ export class PokemonLevelIncrementModifier extends ConsumablePokemonModifier { pokemon.scene.applyModifiers(LevelIncrementBoosterModifier, true, levelCount); pokemon.level += levelCount.value; - if (pokemon.level <= pokemon.scene.getMaxExpLevel()) { + if (pokemon.level <= pokemon.scene.getMaxExpLevel(true)) { pokemon.exp = getLevelTotalExp(pokemon.level, pokemon.species.growthRate); pokemon.levelExp = 0; } diff --git a/src/ui/battle-info.ts b/src/ui/battle-info.ts index 672a62e6c..2d46edad6 100644 --- a/src/ui/battle-info.ts +++ b/src/ui/battle-info.ts @@ -378,7 +378,7 @@ export default class BattleInfo extends Phaser.GameObjects.Container { const relLevelExp = getLevelRelExp(this.lastLevel + 1, pokemon.species.growthRate); const levelExp = levelUp ? relLevelExp : pokemon.levelExp; let ratio = relLevelExp ? levelExp / relLevelExp : 0; - if (this.lastLevel >= (this.scene as BattleScene).getMaxExpLevel()) { + if (this.lastLevel >= (this.scene as BattleScene).getMaxExpLevel(true)) { if (levelUp) ratio = 1; else