- 53
- Posts
- 8
- Years
- Himalayas
- Seen Nov 25, 2016
I'd like to make a damaging version of Spite.
I tried using this:
I tried using this:
But I just get an error message upon using the move.class PokeBattle_Move_188 < PokeBattle_Move
def pbAdditionalEffect(attacker,opponent)
for i in opponent.moves
if i.id==opponent.lastMoveUsed && i.id>0 && i.pp>0
pbShowAnimation(@id,attacker,opponent,hitnum,alltargets,showanimation)
reduction=[4,i.pp].min
i.pp-=reduction
@battle.pbDisplay(_INTL("It reduced the PP of {1}'s {2} by {3}!",opponent.pbThis(true),i.name,reduction))
return 0
end
end
@battle.pbDisplay(_INTL("But it failed!"))
return -1
end
end