Fix daily level cap changing mid biome

pull/18/head
Flashfyre 2024-03-26 21:40:10 -04:00
parent c0b1724b1e
commit 4f9eebda13
1 changed files with 3 additions and 2 deletions

View File

@ -1193,8 +1193,9 @@ export default class BattleScene extends Phaser.Scene {
getMaxExpLevel(ignoreLevelCap?: boolean): integer {
if (ignoreLevelCap)
return Number.MAX_SAFE_INTEGER;
const lastWaveIndex = Math.ceil((this.gameMode.getWaveForDifficulty(this.currentBattle?.waveIndex || 1)) / 10) * 10;
const baseLevel = (1 + lastWaveIndex / 2 + Math.pow(lastWaveIndex / 25, 2)) * 1.2;
const waveIndex = Math.ceil((this.currentBattle?.waveIndex || 1) / 10) * 10;
const difficultyWaveIndex = this.gameMode.getWaveForDifficulty(waveIndex);
const baseLevel = (1 + difficultyWaveIndex / 2 + Math.pow(difficultyWaveIndex / 25, 2)) * 1.2;
return Math.ceil(baseLevel / 2) * 2 + 2;
}