abilities: make it not infinitely loop like a dummy

pull/460/head
Madi Simpson 2024-05-04 13:20:18 -07:00
parent c4679b74b0
commit 5dda2258dd
2 changed files with 2 additions and 2 deletions

View File

@ -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<boolean> {
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;
}
}

View File

@ -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);