From 5dda2258ddb12c353e708361b82671c462a7ed5a Mon Sep 17 00:00:00 2001 From: Madi Simpson Date: Sat, 4 May 2024 13:20:18 -0700 Subject: [PATCH] abilities: make it not infinitely loop like a dummy --- src/data/ability.ts | 2 +- src/phases.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/data/ability.ts b/src/data/ability.ts index 2921f04b5..f135cfcf6 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))); + pokemon.scene.unshiftPhase(new StatChangePhase(pokemon.scene, pokemon.getBattlerIndex(), true, (args[0] as BattleStat[]), (args[1] as integer), true, true)); return true; } } diff --git a/src/phases.ts b/src/phases.ts index 74280e232..351255786 100644 --- a/src/phases.ts +++ b/src/phases.ts @@ -2717,7 +2717,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) + if (levels.value > 0 && !this.ignoreAbilities) for (let opponent of pokemon.getOpponents()) applyAbAttrs(StatChangeThiefAbAttr, opponent, null, this.stats, levels.value);