mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-07 13:15:01 +00:00
Fixed AI never using items
This commit is contained in:
@@ -20,7 +20,7 @@ class PokeBattle_AI
|
|||||||
# NOTE: The AI will only consider using an item on the Pokémon it's currently
|
# NOTE: The AI will only consider using an item on the Pokémon it's currently
|
||||||
# choosing an action for.
|
# choosing an action for.
|
||||||
def pbEnemyItemToUse(idxBattler)
|
def pbEnemyItemToUse(idxBattler)
|
||||||
return 0 if !@internalBattle
|
return 0 if !@battle.internalBattle
|
||||||
items = @battle.pbGetOwnerItems(idxBattler)
|
items = @battle.pbGetOwnerItems(idxBattler)
|
||||||
return 0 if !items || items.length==0
|
return 0 if !items || items.length==0
|
||||||
# Determine target of item (always the Pokémon choosing the action)
|
# Determine target of item (always the Pokémon choosing the action)
|
||||||
|
|||||||
Reference in New Issue
Block a user