Fixed X items not being used properly (again)

This commit is contained in:
Maruno17
2021-02-16 20:50:53 +00:00
parent 9fe513ca16
commit d3bf81e764
2 changed files with 14 additions and 10 deletions

View File

@@ -8,7 +8,7 @@ class PokeBattle_AI
return false if item==0
# Determine target of item (always the Pokémon choosing the action)
useType = pbGetItemData(item,ITEM_BATTLE_USE)
if useType && (useType==1 || useType==6) # Use on Pokémon
if useType && [1, 2, 3, 6, 7, 8].include?(useType) # Use on Pokémon
idxTarget = @battle.battlers[idxTarget].pokemonIndex # Party Pokémon
end
# Register use of item