Add back old random seed gaussian function to fix level balancing
This commit is contained in:
1 parent
678753aaaf
commit
39b31e7d6f
1 file changed
+8
-1
+8
-1
@@ -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 {
|
||||||
|
|||||||
Reference in new issue
Block a user