- 26
- Posts
- 7
- Years
- Seen Dec 19, 2018
Hey guys. So I've been trying to turn Magician into an auto Embargo ability instead, where when the Pokemon with Magician enters the battle, the opponent can't use items for 5 turns, and if they reenter during those 5 turns, it will display that the opponent is still currently under the effect of Embargo. I can't seem to get this to work JUST for the opponent. It prevents me from using items, but not them. I've tried a few variations of this such as "opponent.effects[PBEffects::Embargo]=5" which is what is used in the Embargo move script, but PokeBattle_Battler doesn't seem to recognize the "opponent" variable. Could anyone help me out? Here is the script I've been working with:
Code:
# Magician
if self.hasWorkingAbility(:MAGICIAN) && onactive
if @effects[PBEffects::Embargo]>0
@battle.pbDisplay(_INTL("The foe can already not use items!"))
@effects[PBEffects::Embargo]=5
@battle.pbDisplay(_INTL("The foe can no longer use items!!"))
end
end
Last edited: