From 77fa8e086b080ff8c55fcf44a069902ef40e0e69 Mon Sep 17 00:00:00 2001 From: FosterProgramming Date: Mon, 16 Mar 2026 13:17:35 +0100 Subject: [PATCH] Version specific tweaks of post whiteout script (#9521) Co-authored-by: Bassoonian --- data/event_scripts.s | 7 ++++--- data/maps/PalletTown_PlayersHouse_1F_Frlg/map.json | 2 +- .../PalletTown_PlayersHouse_1F_Frlg/scripts.inc | 2 +- data/scripts/pkmn_center_nurse_frlg.inc | 13 +++++++++++++ include/event_scripts.h | 2 ++ src/data/heal_locations.json | 2 +- src/field_screen_effect.c | 12 ++++++++++++ src/heal_location.c | 1 + 8 files changed, 35 insertions(+), 6 deletions(-) diff --git a/data/event_scripts.s b/data/event_scripts.s index ae21d4b67c..d3988f44d9 100644 --- a/data/event_scripts.s +++ b/data/event_scripts.s @@ -1062,7 +1062,7 @@ EventScript_AfterWhiteOutHeal:: lockall msgbox gText_FirstShouldRestoreMonsHealth call EventScript_PkmnCenterNurse_TakeAndHealPkmn - call_if_unset FLAG_DEFEATED_RUSTBORO_GYM, EventScript_AfterWhiteOutHealMsgPreRoxanne + call_if_unset FLAG_DEFEATED_RUSTBORO_GYM, EventScript_AfterWhiteOutHealMsgPreFirstBoss call_if_set FLAG_DEFEATED_RUSTBORO_GYM, EventScript_AfterWhiteOutHealMsg applymovement VAR_LAST_TALKED, Movement_PkmnCenterNurse_Bow waitmovement 0 @@ -1070,7 +1070,7 @@ EventScript_AfterWhiteOutHeal:: releaseall end -EventScript_AfterWhiteOutHealMsgPreRoxanne:: +EventScript_AfterWhiteOutHealMsgPreFirstBoss:: msgbox gText_MonsHealedShouldBuyPotions return @@ -1080,6 +1080,7 @@ EventScript_AfterWhiteOutHealMsg:: EventScript_AfterWhiteOutMomHeal:: lockall + textcolor NPC_TEXT_COLOR_FEMALE applymovement LOCALID_PLAYERS_HOUSE_1F_MOM, Common_Movement_WalkInPlaceFasterDown waitmovement 0 msgbox gText_HadQuiteAnExperienceTakeRest @@ -1432,7 +1433,7 @@ gText_HadQuiteAnExperienceTakeRest:: gText_MomExplainHPGetPotions:: .string "MOM: Oh, good! You and your\n" .string "POKéMON are looking great.\p" - .string "I just heard from PROF. BIRCH.\p" + .string "I just heard from {STR_VAR_1}.\p" .string "He said that POKéMON's energy is\n" .string "measured in HP.\p" .string "If your POKéMON lose their HP,\n" diff --git a/data/maps/PalletTown_PlayersHouse_1F_Frlg/map.json b/data/maps/PalletTown_PlayersHouse_1F_Frlg/map.json index a7310bfc8a..e6c2a181c0 100644 --- a/data/maps/PalletTown_PlayersHouse_1F_Frlg/map.json +++ b/data/maps/PalletTown_PlayersHouse_1F_Frlg/map.json @@ -17,7 +17,7 @@ "connections": null, "object_events": [ { - "local_id": "LOCALID_MOM", + "local_id": "LOCALID_PLAYERS_HOUSE_1F_MOM", "type": "object", "graphics_id": "OBJ_EVENT_GFX_MOM_FRLG", "x": 8, diff --git a/data/maps/PalletTown_PlayersHouse_1F_Frlg/scripts.inc b/data/maps/PalletTown_PlayersHouse_1F_Frlg/scripts.inc index bead054c26..d2e0959fb7 100644 --- a/data/maps/PalletTown_PlayersHouse_1F_Frlg/scripts.inc +++ b/data/maps/PalletTown_PlayersHouse_1F_Frlg/scripts.inc @@ -9,7 +9,7 @@ PalletTown_PlayersHouse_1F_EventScript_Mom:: call_if_eq VAR_RESULT, MALE, PalletTown_PlayersHouse_1F_EventScript_MomOakLookingForYouMale call_if_eq VAR_RESULT, FEMALE, PalletTown_PlayersHouse_1F_EventScript_MomOakLookingForYouFemale closemessage - applymovement LOCALID_MOM, Common_Movement_FaceOriginalDirection + applymovement LOCALID_PLAYERS_HOUSE_1F_MOM, Common_Movement_FaceOriginalDirection waitmovement 0 release end diff --git a/data/scripts/pkmn_center_nurse_frlg.inc b/data/scripts/pkmn_center_nurse_frlg.inc index 18570d3016..b04c3bd6d7 100644 --- a/data/scripts/pkmn_center_nurse_frlg.inc +++ b/data/scripts/pkmn_center_nurse_frlg.inc @@ -1,3 +1,16 @@ +EventScript_AfterWhiteOutHeal_Frlg:: + lockall + textcolor NPC_TEXT_COLOR_FEMALE + msgbox gText_FirstShouldRestoreMonsHealth + call EventScript_PkmnCenterNurse_TakeAndHealPkmn_Frlg + call_if_unset FLAG_DEFEATED_BROCK, EventScript_AfterWhiteOutHealMsgPreFirstBoss + call_if_set FLAG_DEFEATED_BROCK, EventScript_AfterWhiteOutHealMsg + applymovement VAR_LAST_TALKED, Movement_Bow + waitmovement 0 + fadedefaultbgm + releaseall + end + EventScript_PkmnCenterNurse_Frlg:: message Text_WelcomeWantToHealPkmn_Frlg waitmessage diff --git a/include/event_scripts.h b/include/event_scripts.h index 2b6a030ef3..ffdb73eb18 100644 --- a/include/event_scripts.h +++ b/include/event_scripts.h @@ -630,6 +630,8 @@ extern const u8 EventScript_SelectWithoutRegisteredItem[]; extern const u8 EventScript_WhiteOut[]; extern const u8 EventScript_AfterWhiteOutMomHeal[]; extern const u8 EventScript_AfterWhiteOutHeal[]; +extern const u8 EventScript_AfterWhiteOutHeal_Frlg[]; +extern const u8 EventScript_AfterWhiteOutHealMsgPreFirstBoss[]; extern const u8 EventScript_ResetMrBriney[]; extern const u8 EventScript_DoLinkRoomExit[]; extern const u8 CableClub_EventScript_TooBusyToNotice[]; diff --git a/src/data/heal_locations.json b/src/data/heal_locations.json index 868f996513..ad1e5f1d20 100644 --- a/src/data/heal_locations.json +++ b/src/data/heal_locations.json @@ -196,7 +196,7 @@ "respawn_x": 8, "respawn_y": 5, "respawn_map": "MAP_PALLET_TOWN_PLAYERS_HOUSE_1F", - "respawn_npc": "LOCALID_MOM" + "respawn_npc": "LOCALID_PLAYERS_HOUSE_1F_MOM" }, { "id": "HEAL_LOCATION_VIRIDIAN_CITY", diff --git a/src/field_screen_effect.c b/src/field_screen_effect.c index 19de7da4de..792df979a0 100644 --- a/src/field_screen_effect.c +++ b/src/field_screen_effect.c @@ -1454,9 +1454,21 @@ static void Task_RushInjuredPokemonToCenter(u8 taskId) { DestroyTask(taskId); if (gTasks[taskId].tIsPlayerHouse) + { + if (IS_FRLG) + StringCopy(gStringVar1, COMPOUND_STRING("PROF. OAK")); + else + StringCopy(gStringVar1, COMPOUND_STRING("PROF. BIRCH")); ScriptContext_SetupScript(EventScript_AfterWhiteOutMomHeal); + } + else if (IS_FRLG) + { + ScriptContext_SetupScript(EventScript_AfterWhiteOutHeal_Frlg); + } else + { ScriptContext_SetupScript(EventScript_AfterWhiteOutHeal); + } } break; } diff --git a/src/heal_location.c b/src/heal_location.c index 0cec17233c..73f2e036d0 100644 --- a/src/heal_location.c +++ b/src/heal_location.c @@ -102,4 +102,5 @@ void SetWhiteoutRespawnWarpAndHealerNPC(struct WarpData *warp) warp->x = sWhiteoutRespawnHealCenterMapIdxs[healLocationId - 1][2]; warp->y = sWhiteoutRespawnHealCenterMapIdxs[healLocationId - 1][3]; gSpecialVar_LastTalked = healNpcLocalId; + gSpecialVar_0x800B = healNpcLocalId; }