Deprecated three move flags as they should depend on move effects instead

This commit is contained in:
Maruno17
2021-07-01 21:06:24 +01:00
parent bc7f469308
commit 93b67c9047
10 changed files with 171 additions and 33 deletions

View File

@@ -262,15 +262,14 @@ class PokeBattle_AI
end
# Prefer flinching external effects (note that move effects which cause
# flinching are dealt with in the function code part of score calculation)
if skill>=PBTrainerAI.mediumSkill
if skill>=PBTrainerAI.mediumSkill && !move.flinchingMove?
if !target.hasActiveAbility?(:INNERFOCUS) &&
!target.hasActiveAbility?(:SHIELDDUST) &&
target.effects[PBEffects::Substitute]==0
!target.hasActiveAbility?(:SHIELDDUST) &&
target.effects[PBEffects::Substitute]==0
canFlinch = false
if move.canKingsRock? && user.hasActiveItem?([:KINGSROCK,:RAZORFANG])
if user.hasActiveItem?([:KINGSROCK, :RAZORFANG])
canFlinch = true
end
if user.hasActiveAbility?(:STENCH) && !move.flinchingMove?
elsif user.hasActiveAbility?(:STENCH)
canFlinch = true
end
realDamage *= 1.3 if canFlinch

View File

@@ -115,7 +115,7 @@ class PokeBattle_AI
target.hasActiveAbility?(:WONDERGUARD)
return true if move.damagingMove? && user.index!=target.index && !target.opposes?(user) &&
target.hasActiveAbility?(:TELEPATHY)
return true if move.canMagicCoat? && target.hasActiveAbility?(:MAGICBOUNCE) &&
return true if move.statusMove? && move.canMagicCoat? && target.hasActiveAbility?(:MAGICBOUNCE) &&
target.opposes?(user)
return true if move.soundMove? && target.hasActiveAbility?(:SOUNDPROOF)
return true if move.bombMove? && target.hasActiveAbility?(:BULLETPROOF)