Fixed being unable to extract plugin messages to translate them, fixed AI bug with Natural Gift and no item, fixed bad code when checking a trainer's party for a mon with a given type

This commit is contained in:
Maruno17
2021-06-15 19:23:50 +01:00
parent 128a002324
commit c23f50e5a6
3 changed files with 22 additions and 6 deletions

View File

@@ -489,10 +489,12 @@ class PokeBattle_Move_096 < PokeBattle_Move
def pbBaseType(user)
item = user.item
ret = :NORMAL
@typeArray.each do |type, items|
next if !items.include?(item.id)
ret = type if GameData::Type.exists?(type)
break
if item
@typeArray.each do |type, items|
next if !items.include?(item.id)
ret = type if GameData::Type.exists?(type)
break
end
end
return ret
end