From f21d6a830143177c3f9ee5101e2d1c30fd9cda31 Mon Sep 17 00:00:00 2001 From: Neka Date: Fri, 10 Jan 2025 23:25:16 +0100 Subject: [PATCH] R/S : Fix level grind & party rotate (#610) * Fix pokecenter loop * Fix CB2 Party menu for R/S --- modules/data/symbols/pokeruby.sym | 1 - modules/data/symbols/pokeruby_de.sym | 1 - modules/data/symbols/pokeruby_rev1.sym | 1 - modules/data/symbols/pokesapphire.sym | 1 - modules/data/symbols/pokesapphire_de.sym | 1 - modules/data/symbols/pokesapphire_rev1.sym | 1 - modules/modes/util/map.py | 2 +- 7 files changed, 1 insertion(+), 7 deletions(-) diff --git a/modules/data/symbols/pokeruby.sym b/modules/data/symbols/pokeruby.sym index a3c54a3a..5ede9753 100644 --- a/modules/data/symbols/pokeruby.sym +++ b/modules/data/symbols/pokeruby.sym @@ -4709,7 +4709,6 @@ 0806abf4 g 000000d8 Task_ShowResetRtcPrompt 0806accc g 00000210 Task_ResetRtcScreen 0806aedc g 00000058 CB2_PartyMenuMain -0806aedc l 00000000 .gcc2_compiled. 0806af34 g 00000016 VBlankCB_PartyMenu 0806af4c g 00000040 SetPartyMenuSettings 0806af8c g 00000020 DoOpenPartyMenu diff --git a/modules/data/symbols/pokeruby_de.sym b/modules/data/symbols/pokeruby_de.sym index 70085927..33a90056 100644 --- a/modules/data/symbols/pokeruby_de.sym +++ b/modules/data/symbols/pokeruby_de.sym @@ -4736,7 +4736,6 @@ 0806af34 g 000000d8 Task_ShowResetRtcPrompt 0806b00c g 00000210 Task_ResetRtcScreen 0806b21c g 00000058 CB2_PartyMenuMain -0806b21c l 00000000 .gcc2_compiled. 0806b274 g 00000016 VBlankCB_PartyMenu 0806b28c g 00000040 SetPartyMenuSettings 0806b2cc g 00000020 DoOpenPartyMenu diff --git a/modules/data/symbols/pokeruby_rev1.sym b/modules/data/symbols/pokeruby_rev1.sym index 4b5401ab..2e4615d4 100644 --- a/modules/data/symbols/pokeruby_rev1.sym +++ b/modules/data/symbols/pokeruby_rev1.sym @@ -4709,7 +4709,6 @@ 0806ac14 g 000000d8 Task_ShowResetRtcPrompt 0806acec g 00000210 Task_ResetRtcScreen 0806aefc g 00000058 CB2_PartyMenuMain -0806aefc l 00000000 .gcc2_compiled. 0806af54 g 00000016 VBlankCB_PartyMenu 0806af6c g 00000040 SetPartyMenuSettings 0806afac g 00000020 DoOpenPartyMenu diff --git a/modules/data/symbols/pokesapphire.sym b/modules/data/symbols/pokesapphire.sym index 79b0f917..0de78dc8 100644 --- a/modules/data/symbols/pokesapphire.sym +++ b/modules/data/symbols/pokesapphire.sym @@ -4709,7 +4709,6 @@ 0806abf8 g 000000d8 Task_ShowResetRtcPrompt 0806acd0 g 00000210 Task_ResetRtcScreen 0806aee0 g 00000058 CB2_PartyMenuMain -0806aee0 l 00000000 .gcc2_compiled. 0806af38 g 00000016 VBlankCB_PartyMenu 0806af50 g 00000040 SetPartyMenuSettings 0806af90 g 00000020 DoOpenPartyMenu diff --git a/modules/data/symbols/pokesapphire_de.sym b/modules/data/symbols/pokesapphire_de.sym index ab46abdf..abdedac2 100644 --- a/modules/data/symbols/pokesapphire_de.sym +++ b/modules/data/symbols/pokesapphire_de.sym @@ -4736,7 +4736,6 @@ 0806af38 g 000000d8 Task_ShowResetRtcPrompt 0806b010 g 00000210 Task_ResetRtcScreen 0806b220 g 00000058 CB2_PartyMenuMain -0806b220 l 00000000 .gcc2_compiled. 0806b278 g 00000016 VBlankCB_PartyMenu 0806b290 g 00000040 SetPartyMenuSettings 0806b2d0 g 00000020 DoOpenPartyMenu diff --git a/modules/data/symbols/pokesapphire_rev1.sym b/modules/data/symbols/pokesapphire_rev1.sym index 2dd05b85..37258614 100644 --- a/modules/data/symbols/pokesapphire_rev1.sym +++ b/modules/data/symbols/pokesapphire_rev1.sym @@ -4709,7 +4709,6 @@ 0806ac18 g 000000d8 Task_ShowResetRtcPrompt 0806acf0 g 00000210 Task_ResetRtcScreen 0806af00 g 00000058 CB2_PartyMenuMain -0806af00 l 00000000 .gcc2_compiled. 0806af58 g 00000016 VBlankCB_PartyMenu 0806af70 g 00000040 SetPartyMenuSettings 0806afb0 g 00000020 DoOpenPartyMenu diff --git a/modules/modes/util/map.py b/modules/modes/util/map.py index f4068ff8..ef952618 100644 --- a/modules/modes/util/map.py +++ b/modules/modes/util/map.py @@ -100,7 +100,7 @@ def find_closest_pokemon_center( try: path_to = calculate_path(location, pokemon_center_candidate.value) path_from = calculate_path(pokemon_center_candidate.value, location) - path_length = path_to + path_from + path_length = len(path_to) + len(path_from) if path_length_to_pokemon_center is None or path_length < path_length_to_pokemon_center: pokemon_center = pokemon_center_candidate path_length_to_pokemon_center = path_length