Fixed the check (I realized that getModifiers actually returns [] if the item isn't obtained, not null)

pull/544/head
Sophie Kujo 2024-05-06 05:43:47 -04:00
parent 4225e0fa47
commit 1d41aa7173
1 changed files with 1 additions and 1 deletions

View File

@ -870,7 +870,7 @@ export default class BattleScene extends SceneBase {
}
newBattle(waveIndex?: integer, battleType?: BattleType, trainerData?: TrainerData, double?: boolean): Battle {
if (this.getModifiers(DoubleBattleChancePreventerModifier) != null) {
if (this.getModifiers(DoubleBattleChancePreventerModifier).length != 0) {
double = false;
}
let newWaveIndex = waveIndex || ((this.currentBattle?.waveIndex || (startingWave - 1)) + 1);