From 2fd085728ad44a90c4086981e664dbfb3890fdb7 Mon Sep 17 00:00:00 2001 From: Maruno17 Date: Sat, 19 Sep 2020 12:14:57 +0100 Subject: [PATCH] Fixed AI never using items --- Data/Scripts/012_Battle/004_AI/002_AI_Item.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Data/Scripts/012_Battle/004_AI/002_AI_Item.rb b/Data/Scripts/012_Battle/004_AI/002_AI_Item.rb index c999f2083..ba83512d1 100644 --- a/Data/Scripts/012_Battle/004_AI/002_AI_Item.rb +++ b/Data/Scripts/012_Battle/004_AI/002_AI_Item.rb @@ -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)