Fix logic to prevent the first battle being a double

pull/2/head
Flashfyre 2023-07-04 20:07:05 -04:00
parent 10b49b5dcb
commit 46b32976ff
1 changed files with 3 additions and 3 deletions

View File

@ -514,13 +514,13 @@ export default class BattleScene extends Phaser.Scene {
let newWaveIndex = waveIndex || ((this.currentBattle?.waveIndex || (startingWave - 1)) + 1);
let newDouble: boolean;
if (double === undefined) {
const doubleChance = newWaveIndex > 1 && new Utils.IntegerHolder(newWaveIndex % 10 === 0 ? 32 : 8);
if (double === undefined && newWaveIndex > 1) {
const doubleChance = new Utils.IntegerHolder(newWaveIndex % 10 === 0 ? 32 : 8);
this.applyModifiers(DoubleBattleChanceBoosterModifier, true, doubleChance);
this.getPlayerField().forEach(p => applyAbAttrs(DoubleBattleChanceAbAttr, p, null, doubleChance));
newDouble = !Utils.randInt(doubleChance.value);
} else
newDouble = double;
newDouble = !!double;
const lastBattle = this.currentBattle;