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

@@ -152,7 +152,7 @@ class Trainer
def has_pokemon_of_type?(type)
return false if !GameData::Type.exists?(type)
type = GameData::Type.get(type).id
return pokemon_party.any? { |p| p && p.hasType(type) }
return pokemon_party.any? { |p| p && p.hasType?(type) }
end
# Checks whether any Pokémon in the party knows the given move, and returns