Pokeminer20
PDM20, Coder of Chaos!
- 409
- Posts
- 11
- Years
- On Earth
- Seen May 6, 2025
I'm trying to make an ability that has the same effect as Haze. my trigger is when the foe raises any of their stats. I've tried this but it doesn't trigger.
Code:
if self.hasWorkingAbility(:TORRENT)
def pbEffect(opponent,hitnum=0,alltargets=nil)
for i in 0...3
if @battle.battlers[i].stages[PBStats::ATTACK] >= 1 ||
@battle.battlers[i].stages[PBStats::DEFENSE] >= 1 ||
@battle.battlers[i].stages[PBStats::SPEED] >= 1 ||
@battle.battlers[i].stages[PBStats::SPATK] >= 1 ||
@battle.battlers[i].stages[PBStats::SPDEF] >= 1 ||
@battle.battlers[i].stages[PBStats::ACCURACY] >= 1 ||
@battle.battlers[i].stages[PBStats::EVASION] >= 1
@battle.pbDisplay(_INTL("Stat Change Detected"))
@battle.battlers[i].stages[PBStats::ATTACK] = 0
@battle.battlers[i].stages[PBStats::DEFENSE] = 0
@battle.battlers[i].stages[PBStats::SPEED] = 0
@battle.battlers[i].stages[PBStats::SPATK] = 0
@battle.battlers[i].stages[PBStats::SPDEF] = 0
@battle.battlers[i].stages[PBStats::ACCURACY] = 0
@battle.battlers[i].stages[PBStats::EVASION] = 0
end
end
@battle.pbDisplay(_INTL("The Foe's Stats have been Reset"))
return 0
end
end
Last edited: