- 10
- Posts
- 11
- Years
- Seen Apr 23, 2022
I'm trying to program an ability that will treat all incoming increased priority moves as 0 priority, as long as the move is targeting the Pokemon with this ability.
So say if Kadabra has this ability, is faster and wants to use Signal Beam while Sneasel wants to use Sucker Punch or Quick Attack, Kadabra will use Signal Beam before Sucker Punch or Quick Attack.
I've tried this but it does not work as expected.
My Script:
Should I implement new ability handlers not part of Essentials code? Or can it be done upon existing codebase?
So say if Kadabra has this ability, is faster and wants to use Signal Beam while Sneasel wants to use Sucker Punch or Quick Attack, Kadabra will use Signal Beam before Sucker Punch or Quick Attack.
I've tried this but it does not work as expected.
My Script:
Code:
BattleHandlers::PriorityChangeAbility.add(:SUDDENREFLEX,
proc { |ability,battler,move,pri|
if move.damagingMove?
pri = 0 if pri > 0
end
}
)
Should I implement new ability handlers not part of Essentials code? Or can it be done upon existing codebase?