Cap costs at max safe integer
parent
2f10f6789c
commit
4ad0dbeaa8
|
@ -1513,7 +1513,7 @@ export class ModifierTypeOption {
|
|||
constructor(type: ModifierType, upgradeCount: integer, cost: number = 0) {
|
||||
this.type = type;
|
||||
this.upgradeCount = upgradeCount;
|
||||
this.cost = Math.round(cost);
|
||||
this.cost = Math.min(Math.round(cost), Number.MAX_SAFE_INTEGER);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -4379,7 +4379,7 @@ export class SelectModifierPhase extends BattlePhase {
|
|||
baseValue += tierValues[opt.type.tier];
|
||||
} else
|
||||
baseValue = 250;
|
||||
return Math.ceil(this.scene.currentBattle.waveIndex / 10) * baseValue * Math.pow(2, this.rerollCount);
|
||||
return Math.min(Math.ceil(this.scene.currentBattle.waveIndex / 10) * baseValue * Math.pow(2, this.rerollCount), Number.MAX_SAFE_INTEGER);
|
||||
}
|
||||
|
||||
getPoolType(): ModifierPoolType {
|
||||
|
|
Loading…
Reference in New Issue