Rewrites of disabling move AI function codes, fixed various AI errors

This commit is contained in:
Maruno17
2023-01-19 22:30:55 +00:00
parent 0c9df4627e
commit f7578002ea
16 changed files with 359 additions and 217 deletions

View File

@@ -107,7 +107,7 @@ class Battle::AI
if spikes > 0
spikesDmg = [8, 6, 4][spikes - 1]
next if pkmn.hp <= pkmn.totalhp / spikesDmg &&
!pkmn.hasType?(:FLYING) && !pkmn.hasActiveAbility?(:LEVITATE)
!pkmn.hasType?(:FLYING) && !pkmn.hasAbility?(:LEVITATE)
end
end
# moveType is the type of the target's last used move