From 3faf847d45b19b06134da0a3139df90295f852cc Mon Sep 17 00:00:00 2001 From: NightKev <34855794+DayKev@users.noreply.github.com> Date: Sat, 7 Sep 2024 02:47:08 -0700 Subject: [PATCH] Use `hasAbilityWithAttr()` instead of `.get[Passive]Ability()` Co-authored-by: innerthunder <168692175+innerthunder@users.noreply.github.com> --- src/battle-scene.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/battle-scene.ts b/src/battle-scene.ts index 25723999510..3088cc3e1d4 100644 --- a/src/battle-scene.ts +++ b/src/battle-scene.ts @@ -2467,7 +2467,7 @@ export default class BattleScene extends SceneBase { const difficultyWaveIndex = this.gameMode.getWaveForDifficulty(this.currentBattle.waveIndex); const isFinalBoss = this.gameMode.isWaveFinal(this.currentBattle.waveIndex); let chances = Math.ceil(difficultyWaveIndex / 10); - if (this.getPlayerPokemon()?.getAbility().hasAttr(BonusItemChanceAbAttr) || this.getPlayerPokemon()?.getPassiveAbility().hasAttr(BonusItemChanceAbAttr)) { + if (this.getPlayerPokemon()?.hasAbilityWithAttr(BonusItemChanceAbAttr)) { chances += Math.floor(chances * 1.2); } if (isFinalBoss) {