diff --git a/Utilities/DetermineOriginGame.py b/Utilities/DetermineOriginGame.py index eae7721..4f8a16e 100644 --- a/Utilities/DetermineOriginGame.py +++ b/Utilities/DetermineOriginGame.py @@ -782,15 +782,72 @@ def handle_deoxys(pokemon, encounter_data): if pokemon.form: pokemon.encounter_information = normal_form_deoxys.encounter_information +list_of_shifting_form_pokemon = [ + "Deoxys", + "Burmy", + "Wormadam", + "Rotom", + "Shaymin", + "Keldeo", + "Furfrou", + "Hoopa", + "Pumpkaboo", + "Gourgeist", + "Zygarde", + "Magearna", + "Vivillon", + "Minior" +] + +def handle_form_shift(pokemon, encounter_data): + if not pokemon.name in list_of_shifting_form_pokemon: + return + + if pokemon.form is None: + return + + normal_form_pokemon = find_pokemon(pokemon.name, None) + if not normal_form_pokemon: + return + + pokemon.encounter_information = normal_form_pokemon.encounter_information + +phony_authentic = ["Sinistea", "Polteageist"] +countefieit_atrisan = ["Sinistcha", "Poltchageist"] +bad_tea_pokemon = phony_authentic + countefieit_atrisan + +def get_bad_tea_form(pokemon): + if not pokemon.name in bad_tea_pokemon: + return + + if pokemon.name in phony_authentic: + if pokemon.form == None: + return "Phony Form" + if pokemon.form == "Authentic Form": + return None + + if pokemon.name in countefieit_atrisan: + if pokemon.form == None: + return "Counterfeit Form" + if pokemon.form == "Artisan Form": + return None + def determine_earliest_games(pokemon_list, cache): for pokemon in big_pokemon_list: print(f"Processing {pokemon}") - encounter_data = get_locations_from_bulbapedia(pokemon.name, pokemon.form, cache) + form_to_find = pokemon.form + if pokemon.name == "Minior" and pokemon.form == "Orange Core": + form_to_find = None + if pokemon.name == "Alcremie": + form_to_find = None + if pokemon.name in bad_tea_pokemon: + form_to_find = get_bad_tea_form(pokemon) + encounter_data = get_locations_from_bulbapedia(pokemon.name, form_to_find, cache) for encounter in encounter_data: encounter_information = EncounterInformation(encounter, encounter_data[encounter]) pokemon.encounter_information.append(encounter_information) handle_unown(pokemon, encounter_data) - handle_deoxys(pokemon, encounter_data) + handle_form_shift(pokemon, encounter_data) pokemon.determine_earliest_game() print(f"Processed {pokemon}: {pokemon.earliest_game.game} ({pokemon.earliest_game.method})")