Added class GameData::EncounterType

This commit is contained in:
Maruno17
2021-03-06 22:01:16 +00:00
parent ff0c2f00c8
commit 3a1b9b6dc6
18 changed files with 402 additions and 337 deletions

View File

@@ -254,20 +254,11 @@ def pbEncounterSpecies(phonenum)
encounter_data = GameData::Encounter.get(phonenum[6], $PokemonGlobal.encounter_version)
return "" if !encounter_data
enc_tables = encounter_data.types
species = pbRandomEncounterSpecies(enc_tables[EncounterTypes::Land])
species = pbRandomEncounterSpecies(enc_tables[:Land])
if !species
species = pbRandomEncounterSpecies(enc_tables[EncounterTypes::Cave])
species = pbRandomEncounterSpecies(enc_tables[:Cave])
if !species
species = pbRandomEncounterSpecies(enc_tables[EncounterTypes::LandDay])
if !species
species = pbRandomEncounterSpecies(enc_tables[EncounterTypes::LandMorning])
if !species
species = pbRandomEncounterSpecies(enc_tables[EncounterTypes::LandNight])
if !species
species = pbRandomEncounterSpecies(enc_tables[EncounterTypes::Water])
end
end
end
species = pbRandomEncounterSpecies(enc_tables[:Water])
end
end
return "" if !species