From 08a73e760d014d040c0048a1b170f8d825b0905f Mon Sep 17 00:00:00 2001 From: citrusbolt Date: Mon, 22 Mar 2021 13:39:55 -0600 Subject: [PATCH 1/5] Fix Southern Island Lati@s --- data/maps/SouthernIsland_Interior/scripts.inc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/data/maps/SouthernIsland_Interior/scripts.inc b/data/maps/SouthernIsland_Interior/scripts.inc index c2451654a9..4ac12d305e 100644 --- a/data/maps/SouthernIsland_Interior/scripts.inc +++ b/data/maps/SouthernIsland_Interior/scripts.inc @@ -17,8 +17,8 @@ SouthernIsland_Interior_EventScript_TryRemoveLati:: @ 8242A5A return SouthernIsland_Interior_OnTransition: @ 8242A6E - call_if_unset FLAG_ROAMER_QUEST, SouthernIsland_Interior_EventScript_SetUpLatios - call_if_set FLAG_ROAMER_QUEST, SouthernIsland_Interior_EventScript_SetUpLatias + call_if_unset FLAG_ROAMER_QUEST, SouthernIsland_Interior_EventScript_SetUpLatias + call_if_set FLAG_ROAMER_QUEST, SouthernIsland_Interior_EventScript_SetUpLatios call SouthernIsland_Interior_EventScript_SetUpPlayerGfx end @@ -77,8 +77,8 @@ SouthernIsland_Interior_EventScript_Lati:: @ 8242AD0 delay 50 special RemoveCameraObject setvar VAR_LAST_TALKED, LOCALID_LATI - call_if_unset FLAG_ROAMER_QUEST SouthernIsland_Interior_EventScript_SetLatiosBattleVars - call_if_set FLAG_ROAMER_QUEST SouthernIsland_Interior_EventScript_SetLatiasBattleVars + call_if_unset FLAG_ROAMER_QUEST SouthernIsland_Interior_EventScript_SetLatiasBattleVars + call_if_set FLAG_ROAMER_QUEST SouthernIsland_Interior_EventScript_SetLatiosBattleVars setflag FLAG_SYS_CTRL_OBJ_DELETE special BattleSetup_StartLatiBattle waitstate From 1ac02d0042eb501e2f35ec10696579c73962880c Mon Sep 17 00:00:00 2001 From: citrusbolt Date: Mon, 22 Mar 2021 13:41:33 -0600 Subject: [PATCH 2/5] Add Shroomish back to the post-National Dex spawn tables --- src/data/wild_encounters.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/data/wild_encounters.json b/src/data/wild_encounters.json index 90be967395..043438e887 100755 --- a/src/data/wild_encounters.json +++ b/src/data/wild_encounters.json @@ -3414,7 +3414,7 @@ { "min_level": 6, "max_level": 6, - "species": "SPECIES_TAILLOW" + "species": "SPECIES_SHROOMISH" }, { "min_level": 6, From f16a953134fdb3c56f5cbaff39696ca25cdd4222 Mon Sep 17 00:00:00 2001 From: citrusbolt Date: Mon, 22 Mar 2021 15:12:17 -0600 Subject: [PATCH 3/5] Fix item registration tip sign --- data/maps/Route113/scripts.inc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/data/maps/Route113/scripts.inc b/data/maps/Route113/scripts.inc index 24c57c29c1..f05a481bae 100644 --- a/data/maps/Route113/scripts.inc +++ b/data/maps/Route113/scripts.inc @@ -159,9 +159,9 @@ Route113_Text_RouteSignFallarbor: @ 81F2456 Route113_Text_TrainerTipsRegisterKeyItems: @ 81F2471 .string "TRAINER TIPS\p" - .string "You may register one of the KEY ITEMS\n" - .string "in your BAG as SELECT.\p" - .string "Simply press SELECT to use\n" + .string "You may register three of the KEY ITEMS\n" + .string "in your BAG as SELECT, L, or R.\p" + .string "Simply press SELECT, L, or R to use\n" .string "the registered item conveniently.$" Route113_Text_GlassWorkshopSign: @ 81F24F8 From 0f6ada87a8b254c37e160d2af28e5335ce28444b Mon Sep 17 00:00:00 2001 From: citrusbolt Date: Tue, 23 Mar 2021 11:24:17 -0600 Subject: [PATCH 4/5] Allow field moves to be used if species is capable of learning Excludes Fly --- src/field_player_avatar.c | 2 ++ src/scrcmd.c | 25 +++++++++++++++++++++++++ 2 files changed, 27 insertions(+) diff --git a/src/field_player_avatar.c b/src/field_player_avatar.c index 190b65f67e..14c0b1785d 100644 --- a/src/field_player_avatar.c +++ b/src/field_player_avatar.c @@ -1292,6 +1292,8 @@ bool8 PartyHasMonWithSurf(void) break; if (MonKnowsMove(&gPlayerParty[i], MOVE_SURF)) return TRUE; + if (CanMonLearnTMHM(&gPlayerParty[i], 53)) + return TRUE; } } return FALSE; diff --git a/src/scrcmd.c b/src/scrcmd.c index 076bddc775..bad6c79e58 100644 --- a/src/scrcmd.c +++ b/src/scrcmd.c @@ -84,6 +84,17 @@ static const u8 sScriptConditionTable[6][3] = 1, 0, 1, // != }; +static const u16 sTMHMMoves[] = +{ + [42] = MOVE_SECRET_POWER, + [50] = MOVE_CUT, + [52] = MOVE_SURF, + [53] = MOVE_STRENGTH, + [55] = MOVE_ROCK_SMASH, + [56] = MOVE_WATERFALL, + [57] = MOVE_DIVE, +}; + static u8 * const sScriptStringVars[] = { gStringVar1, @@ -1727,6 +1738,7 @@ bool8 ScrCmd_setmonmove(struct ScriptContext *ctx) bool8 ScrCmd_checkpartymove(struct ScriptContext *ctx) { u8 i; + u8 j; u16 moveId = ScriptReadHalfword(ctx); gSpecialVar_Result = PARTY_SIZE; @@ -1741,6 +1753,19 @@ bool8 ScrCmd_checkpartymove(struct ScriptContext *ctx) gSpecialVar_0x8004 = species; break; } + for (j = 0; j < 58; j++) + { + if (sTMHMMoves[j] == moveId) + { + if (CanMonLearnTMHM(&gPlayerParty[i], j)) + { + gSpecialVar_Result = i; + gSpecialVar_0x8004 = species; + break; + } + } + } + } return FALSE; } From 31958e1961caa8b06166488ccedcc7f082173d95 Mon Sep 17 00:00:00 2001 From: citrusbolt Date: Tue, 23 Mar 2021 11:25:33 -0600 Subject: [PATCH 5/5] Fix met location logic --- src/pokemon_summary_screen.c | 2 +- src/region_map.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pokemon_summary_screen.c b/src/pokemon_summary_screen.c index 6f994a03bc..77776fedf0 100644 --- a/src/pokemon_summary_screen.c +++ b/src/pokemon_summary_screen.c @@ -3111,7 +3111,7 @@ static void BufferMonTrainerMemo(void) { GetMapNameGeneric(metLocationString, MAPSEC_MIRAGE_ISLAND); } - else if (DidMonComeFromJohto && sum->metLocation < KANTO_MAPSEC_START) //Johto maps in CrystalDust as well as gameID 8 in case anyone uses it + else if (DidMonComeFromJohto() && sum->metLocation < KANTO_MAPSEC_START) //Johto maps in CrystalDust as well as gameID 8 in case anyone uses it { GetMapNameGeneric(metLocationString, (sum->metLocation + JOHTO_MAPSEC_START)); } diff --git a/src/region_map.c b/src/region_map.c index f05577fd9f..48a882fd3c 100644 --- a/src/region_map.c +++ b/src/region_map.c @@ -1608,7 +1608,7 @@ u8 *GetMapNameExtended(u8 *dest, u16 regionMapId, u16 padLength) { str = GetSecretBaseMapName(dest); } - else if (regionMapId < MAPSEC_END) + else if (regionMapId < MAPSEC_END && gRegionMapEntries[regionMapId].name != 0) { str = StringCopy(dest, gRegionMapEntries[regionMapId].name); }