mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-14 20:32:17 +02:00
Use hasAbilityWithAttr()
instead of .get[Passive]Ability()
Co-authored-by: innerthunder <168692175+innerthunder@users.noreply.github.com>
This commit is contained in:
parent
06f6386099
commit
3faf847d45
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user