- 9
- Posts
- 2
- Years
- Los Angeles, California
- Seen May 30, 2023
Hey! I've been trying to program in an ability that automatically activates the effects of taunt when the Pokemon switches in.
As you can see, I simply tried copying the effects of the move taunt into the ability on switch in. This isn't working. If anyone could help me with this, that would be awesome.
Code:
BattleHandlers::AbilityOnSwitchIn.add(:ANNOYING,
proc { |ability,battler,battle|
battle.pbShowAbilitySplash(battler)
battle.pbDisplay(_INTL("{1} is annoying!",battler.pbThis))
battle.pbHideAbilitySplash(battler)
def pbEffectAgainstTarget(user,target)
target.effects[PBEffects::Taunt] = 4
@battle.pbDisplay(_INTL("{1} fell for the taunt!",target.pbThis))
target.pbItemStatusCureCheck
end
}
)
As you can see, I simply tried copying the effects of the move taunt into the ability on switch in. This isn't working. If anyone could help me with this, that would be awesome.