mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-08 13:44:59 +00:00
AI function code rewrites for protection moves
This commit is contained in:
@@ -287,11 +287,10 @@ class Battle::AI::AIBattler
|
||||
#=============================================================================
|
||||
|
||||
def can_attack?
|
||||
return false if self.effects[PBEffects::SkyDrop] >= 0
|
||||
return false if self.effects[PBEffects::HyperBeam] > 0
|
||||
return false if status == :SLEEP && statusCount > 1
|
||||
return false if status == :FROZEN # Only 20% chance of unthawing; assune it won't
|
||||
return false if self.effects[PBEffects::Truant]
|
||||
return false if self.effects[PBEffects::Truant] && has_active_ability?(:TRUANT)
|
||||
return false if self.effects[PBEffects::Flinch]
|
||||
# NOTE: Confusion/infatuation/paralysis have higher chances of allowing the
|
||||
# attack, so the battler is treated as able to attack in those cases.
|
||||
|
||||
Reference in New Issue
Block a user