diff --git a/src/data/ability.ts b/src/data/ability.ts index f135cfcf6..7097c4e2f 100644 --- a/src/data/ability.ts +++ b/src/data/ability.ts @@ -2106,7 +2106,7 @@ export class StatChangeMultiplierAbAttr extends AbAttr { export class StatChangeThiefAbAttr extends AbAttr { apply(pokemon: Pokemon, passive: boolean, cancelled: Utils.BooleanHolder, args: any[]): boolean | Promise { - pokemon.scene.unshiftPhase(new StatChangePhase(pokemon.scene, pokemon.getBattlerIndex(), true, (args[0] as BattleStat[]), (args[1] as integer), true, true)); + pokemon.scene.unshiftPhase(new StatChangePhase(pokemon.scene, pokemon.getBattlerIndex(), true, (args[0] as BattleStat[]), (args[1] as integer), true, false, true)); return true; } } diff --git a/src/phases.ts b/src/phases.ts index 351255786..ba0430d52 100644 --- a/src/phases.ts +++ b/src/phases.ts @@ -2661,8 +2661,9 @@ export class StatChangePhase extends PokemonPhase { private levels: integer; private showMessage: boolean; private ignoreAbilities: boolean; + private ignoreOpportunist: boolean; - constructor(scene: BattleScene, battlerIndex: BattlerIndex, selfTarget: boolean, stats: BattleStat[], levels: integer, showMessage: boolean = true, ignoreAbilities: boolean = false) { + constructor(scene: BattleScene, battlerIndex: BattlerIndex, selfTarget: boolean, stats: BattleStat[], levels: integer, showMessage: boolean = true, ignoreAbilities: boolean = false, ignoreOpportunist: boolean = false) { super(scene, battlerIndex); this.selfTarget = selfTarget; @@ -2670,6 +2671,7 @@ export class StatChangePhase extends PokemonPhase { this.levels = levels; this.showMessage = showMessage; this.ignoreAbilities = ignoreAbilities; + this.ignoreOpportunist = ignoreOpportunist; } start() { @@ -2717,7 +2719,7 @@ export class StatChangePhase extends PokemonPhase { for (let stat of filteredStats) pokemon.summonData.battleStats[stat] = Math.max(Math.min(pokemon.summonData.battleStats[stat] + levels.value, 6), -6); - if (levels.value > 0 && !this.ignoreAbilities) + if (levels.value > 0 && !this.ignoreOpportunist) for (let opponent of pokemon.getOpponents()) applyAbAttrs(StatChangeThiefAbAttr, opponent, null, this.stats, levels.value);