Boss buffs ignore abilities

pull/88/head
Flashfyre 2024-04-11 12:11:55 -04:00
parent 1d0f04d629
commit 377dabdb27
2 changed files with 7 additions and 3 deletions

View File

@ -2706,7 +2706,7 @@ export class EnemyPokemon extends Pokemon {
break; 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--; this.bossSegmentIndex--;
} }

View File

@ -2525,14 +2525,16 @@ export class StatChangePhase extends PokemonPhase {
private selfTarget: boolean; private selfTarget: boolean;
private levels: integer; private levels: integer;
private showMessage: boolean; 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); super(scene, battlerIndex);
this.selfTarget = selfTarget; this.selfTarget = selfTarget;
this.stats = stats; this.stats = stats;
this.levels = levels; this.levels = levels;
this.showMessage = showMessage; this.showMessage = showMessage;
this.ignoreAbilities = ignoreAbilities;
} }
start() { start() {
@ -2555,7 +2557,9 @@ export class StatChangePhase extends PokemonPhase {
}); });
const levels = new Utils.IntegerHolder(this.levels); 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 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]); const relLevels = filteredStats.map(stat => (levels.value >= 1 ? Math.min(battleStats[stat] + levels.value, 6) : Math.max(battleStats[stat] + levels.value, -6)) - battleStats[stat]);