Made def wants_status_problem?(new_status) consider a few more abilities (#203)

This commit is contained in:
Conmh
2023-03-30 17:19:40 -04:00
committed by GitHub
parent ad29a79e1c
commit 5d9cc71a99

View File

@@ -341,6 +341,12 @@ class Battle::AI::AIBattler
return true if stat_raise_worthwhile?(self, :SPEED, true) return true if stat_raise_worthwhile?(self, :SPEED, true)
when :FLAREBOOST when :FLAREBOOST
return true if new_status == :BURN && stat_raise_worthwhile?(self, :SPECIAL_ATTACK, true) return true if new_status == :BURN && stat_raise_worthwhile?(self, :SPECIAL_ATTACK, true)
when :TOXICBOOST
return true if new_status == :POISON && stat_raise_worthwhile?(self, :ATTACK, true)
when :POISONHEAL
return true if new_status == :POISON
when :MAGICGUARD # Want a harmless status problem to prevent getting a harmful one
return true if new_status == :POISON || (new_status == :BURN && !stat_raise_worthwhile?(self, :ATTACK, true))
end end
end end
return true if new_status == :SLEEP && check_for_move { |m| m.usableWhenAsleep? } return true if new_status == :SLEEP && check_for_move { |m| m.usableWhenAsleep? }