BattleHandlers::UserAbilityEndOfMove.add(:AERIALBOOST,
proc { |ability,user,targets,move,battle|
next if battle.pbAllFainted?(user.idxOpposingSide)
next if !isConst?(move.type,PBTypes,:FLYING)
user.pbRaiseStatStageByAbility(PBStats::SPEED,1,user)
}
)
If you're using V18 this should suffice. :)
Code:BattleHandlers::UserAbilityEndOfMove.add(:AERIALBOOST, proc { |ability,user,targets,move,battle| next if battle.pbAllFainted?(user.idxOpposingSide) next if !isConst?(move.type,PBTypes,:FLYING) user.pbRaiseStatStageByAbility(PBStats::SPEED,1,user) } )
sorry I am working on 17.2 I keep forgetting to specify
if user.hasWorkingAbility(:AERIALBOOST) && movetype == PBTypes::FLYING
if user.pbIncreaseStatWithCause(PBStats::SPEED,1,user,PBAbilities.getName(user.ability))
PBDebug.log("[Ability triggered] #{target.pbThis}'s Aerial Boost")
end
end
if damage>0 && move.isContactMove?
if !target.damagestate.substitute
if damage>0
if !target.damagestate.substitute
user.pbAbilityCureCheck
target.pbAbilityCureCheck