From 377dabdb27b64d26d9cc09f85723da88d0950f67 Mon Sep 17 00:00:00 2001 From: Flashfyre Date: Thu, 11 Apr 2024 12:11:55 -0400 Subject: [PATCH] Boss buffs ignore abilities --- src/field/pokemon.ts | 2 +- src/phases.ts | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/field/pokemon.ts b/src/field/pokemon.ts index 1cc4378ea..2eb39cae0 100644 --- a/src/field/pokemon.ts +++ b/src/field/pokemon.ts @@ -2706,7 +2706,7 @@ export class EnemyPokemon extends Pokemon { break; } - this.scene.unshiftPhase(new StatChangePhase(this.scene, this.getBattlerIndex(), true, [ boostedStat ], statLevels)); + this.scene.unshiftPhase(new StatChangePhase(this.scene, this.getBattlerIndex(), true, [ boostedStat ], statLevels, true, true)); this.bossSegmentIndex--; } diff --git a/src/phases.ts b/src/phases.ts index 58c6d5278..64cb21e24 100644 --- a/src/phases.ts +++ b/src/phases.ts @@ -2525,14 +2525,16 @@ export class StatChangePhase extends PokemonPhase { private selfTarget: boolean; private levels: integer; private showMessage: boolean; + private ignoreAbilities: boolean; - constructor(scene: BattleScene, battlerIndex: BattlerIndex, selfTarget: boolean, stats: BattleStat[], levels: integer, showMessage: boolean = true) { + constructor(scene: BattleScene, battlerIndex: BattlerIndex, selfTarget: boolean, stats: BattleStat[], levels: integer, showMessage: boolean = true, ignoreAbilities: boolean = false) { super(scene, battlerIndex); this.selfTarget = selfTarget; this.stats = stats; this.levels = levels; this.showMessage = showMessage; + this.ignoreAbilities = ignoreAbilities; } start() { @@ -2555,7 +2557,9 @@ export class StatChangePhase extends PokemonPhase { }); const levels = new Utils.IntegerHolder(this.levels); - applyAbAttrs(StatChangeMultiplierAbAttr, pokemon, null, levels); + + if (!this.ignoreAbilities) + applyAbAttrs(StatChangeMultiplierAbAttr, pokemon, null, levels); const battleStats = this.getPokemon().summonData.battleStats; const relLevels = filteredStats.map(stat => (levels.value >= 1 ? Math.min(battleStats[stat] + levels.value, 6) : Math.max(battleStats[stat] + levels.value, -6)) - battleStats[stat]);