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