mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-01-18 15:00:55 +00:00
Fix logic to prevent the first battle being a double
This commit is contained in:
parent
10b49b5dcb
commit
46b32976ff
@ -514,13 +514,13 @@ export default class BattleScene extends Phaser.Scene {
|
|||||||
let newWaveIndex = waveIndex || ((this.currentBattle?.waveIndex || (startingWave - 1)) + 1);
|
let newWaveIndex = waveIndex || ((this.currentBattle?.waveIndex || (startingWave - 1)) + 1);
|
||||||
let newDouble: boolean;
|
let newDouble: boolean;
|
||||||
|
|
||||||
if (double === undefined) {
|
if (double === undefined && newWaveIndex > 1) {
|
||||||
const doubleChance = newWaveIndex > 1 && new Utils.IntegerHolder(newWaveIndex % 10 === 0 ? 32 : 8);
|
const doubleChance = new Utils.IntegerHolder(newWaveIndex % 10 === 0 ? 32 : 8);
|
||||||
this.applyModifiers(DoubleBattleChanceBoosterModifier, true, doubleChance);
|
this.applyModifiers(DoubleBattleChanceBoosterModifier, true, doubleChance);
|
||||||
this.getPlayerField().forEach(p => applyAbAttrs(DoubleBattleChanceAbAttr, p, null, doubleChance));
|
this.getPlayerField().forEach(p => applyAbAttrs(DoubleBattleChanceAbAttr, p, null, doubleChance));
|
||||||
newDouble = !Utils.randInt(doubleChance.value);
|
newDouble = !Utils.randInt(doubleChance.value);
|
||||||
} else
|
} else
|
||||||
newDouble = double;
|
newDouble = !!double;
|
||||||
|
|
||||||
const lastBattle = this.currentBattle;
|
const lastBattle = this.currentBattle;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user