mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2026-01-28 01:06:00 +00:00
Errors in the AI no longer cause it to do nothing
This commit is contained in:
@@ -3,7 +3,9 @@ class Battle::AI
|
||||
# Decide whether the opponent should use an item on the Pokémon
|
||||
#=============================================================================
|
||||
def pbEnemyShouldUseItem?
|
||||
item, idxTarget = pbEnemyItemToUse
|
||||
item = nil
|
||||
idxTarget = nil
|
||||
PBDebug.logonerr { item, idxTarget = pbEnemyItemToUse }
|
||||
return false if !item
|
||||
# Determine target of item (always the Pokémon choosing the action)
|
||||
useType = GameData::Item.get(item).battle_use
|
||||
|
||||
Reference in New Issue
Block a user