Fixed AI never using items

This commit is contained in:
Maruno17
2020-09-19 12:14:57 +01:00
parent 3f99fd39e3
commit 2fd085728a

View File

@@ -20,7 +20,7 @@ class PokeBattle_AI
# NOTE: The AI will only consider using an item on the Pokémon it's currently
# choosing an action for.
def pbEnemyItemToUse(idxBattler)
return 0 if !@internalBattle
return 0 if !@battle.internalBattle
items = @battle.pbGetOwnerItems(idxBattler)
return 0 if !items || items.length==0
# Determine target of item (always the Pokémon choosing the action)