Add back old random seed gaussian function to fix level balancing

This commit is contained in:
Flashfyre 2024-01-05 00:44:28 -05:00
parent 678753aaaf
commit 39b31e7d6f
1 changed files with 8 additions and 1 deletions

View File

@ -80,7 +80,14 @@ export default class Battle {
const deviation = 10 / this.waveIndex; const deviation = 10 / this.waveIndex;
return Math.max(Math.round(baseLevel + Math.abs(Utils.randSeedGauss(deviation))), 1); return Math.max(Math.round(baseLevel + Math.abs(this.randSeedGaussForLevel(deviation))), 1);
}
randSeedGaussForLevel(value: number): number {
let rand = 0;
for (var i = value; i > 0; i--)
rand += Phaser.Math.RND.realInRange(0, 1);
return rand / value;
} }
getBattlerCount(): integer { getBattlerCount(): integer {