Errors in the AI no longer cause it to do nothing

This commit is contained in:
Maruno17
2022-10-16 14:52:27 +01:00
parent 58a624060a
commit 43290c39a2
3 changed files with 12 additions and 5 deletions

View File

@@ -3,7 +3,9 @@ class Battle::AI
# Decide whether the opponent should switch Pokémon
#=============================================================================
def pbEnemyShouldWithdraw?
return pbEnemyShouldWithdrawEx?(false)
ret = false
PBDebug.logonerr { ret = pbEnemyShouldWithdrawEx?(false) }
return ret
end
def pbEnemyShouldWithdrawEx?(forceSwitch)