abilities: make it not infinitely loop like a dummy
parent
c4679b74b0
commit
5dda2258dd
|
|
@ -2106,7 +2106,7 @@ export class StatChangeMultiplierAbAttr extends AbAttr {
|
||||||
|
|
||||||
export class StatChangeThiefAbAttr extends AbAttr {
|
export class StatChangeThiefAbAttr extends AbAttr {
|
||||||
apply(pokemon: Pokemon, passive: boolean, cancelled: Utils.BooleanHolder, args: any[]): boolean | Promise<boolean> {
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2717,7 +2717,7 @@ export class StatChangePhase extends PokemonPhase {
|
||||||
for (let stat of filteredStats)
|
for (let stat of filteredStats)
|
||||||
pokemon.summonData.battleStats[stat] = Math.max(Math.min(pokemon.summonData.battleStats[stat] + levels.value, 6), -6);
|
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())
|
for (let opponent of pokemon.getOpponents())
|
||||||
applyAbAttrs(StatChangeThiefAbAttr, opponent, null, this.stats, levels.value);
|
applyAbAttrs(StatChangeThiefAbAttr, opponent, null, this.stats, levels.value);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue