diff --git a/data-de/event_scripts.s b/data-de/event_scripts.s index 04f986ddc..449fd3b65 100644 --- a/data-de/event_scripts.s +++ b/data-de/event_scripts.s @@ -717,29 +717,29 @@ UnknownString_819C21F: @ 819C21F .include "data/scripts/new_game.inc" .include "data/scripts/hall_of_fame.inc" -S_WhiteOut:: @ 819FC74 +EventScript_WhiteOut:: @ 819FC74 call EverGrandeCity_HallOfFame_EventScript_ResetEliteFour - call EventScript_19FC84 - goto gUnknown_0819FC9F + call EventScript_TryReadyRivalForGoGoggles + goto EventScript_ResetMrBriney end -EventScript_19FC84: - goto_if_set FLAG_RECEIVED_GO_GOGGLES, Route101_EventScript_1A14DC - goto_if_unset FLAG_DEFEATED_LAVARIDGE_GYM, Route101_EventScript_1A14DC +EventScript_TryReadyRivalForGoGoggles: + goto_if_set FLAG_RECEIVED_GO_GOGGLES, Common_EventScript_Return + goto_if_unset FLAG_DEFEATED_LAVARIDGE_GYM, Common_EventScript_Return clearflag FLAG_HIDE_RIVAL_LAVARIDGE_1 setvar VAR_LAVARIDGE_RIVAL_STATE, 2 return -gUnknown_0819FC9F:: @ 819FC9F +EventScript_ResetMrBriney:: @ 819FC9F compare VAR_BRINEY_LOCATION, 1 - goto_if_eq EventScript_19FCC1 + goto_if_eq EventScript_MoveMrBrineyToHouse compare VAR_BRINEY_LOCATION, 2 - goto_if_eq EventScript_19FCD7 + goto_if_eq EventScript_MoveMrBrineyToDewford compare VAR_BRINEY_LOCATION, 3 - goto_if_eq EventScript_19FCF0 + goto_if_eq EventScript_MoveMrBrineyToRoute109 end -EventScript_19FCC1: +EventScript_MoveMrBrineyToHouse: setflag FLAG_HIDE_MR_BRINEY_DEWFORD_TOWN setflag FLAG_HIDE_MR_BRINEY_BOAT_DEWFORD setflag FLAG_HIDE_MR_BRINEY_ROUTE109 @@ -749,7 +749,7 @@ EventScript_19FCC1: clearflag FLAG_HIDE_PEEKO_BRINEY_HOUSE end -EventScript_19FCD7: +EventScript_MoveMrBrineyToDewford: setflag FLAG_HIDE_MR_BRINEY_ROUTE109 setflag FLAG_HIDE_MR_BRINEY_BOAT_ROUTE109 setflag FLAG_HIDE_MR_BRINEY_ROUTE104 @@ -760,7 +760,7 @@ EventScript_19FCD7: clearflag FLAG_HIDE_MR_BRINEY_BOAT_DEWFORD end -EventScript_19FCF0: +EventScript_MoveMrBrineyToRoute109: setflag FLAG_HIDE_MR_BRINEY_ROUTE104 setflag FLAG_HIDE_MR_BRINEY_BOAT_ROUTE104 setflag FLAG_HIDE_MR_BRINEY_ROUTE104_HOUSE @@ -779,104 +779,27 @@ EverGrandeCity_HallOfFame_EventScript_ResetEliteFour:: @ 819FD09 setvar VAR_ELITE_4_STATE, 0 return -DewfordTown_PokemonCenter_1F_EventScript_19FD1B:: @ 819FD1B -FallarborTown_PokemonCenter_1F_EventScript_19FD1B:: @ 819FD1B -LavaridgeTown_PokemonCenter_1F_EventScript_19FD1B:: @ 819FD1B -MauvilleCity_PokemonCenter_1F_EventScript_19FD1B:: @ 819FD1B -OldaleTown_PokemonCenter_1F_EventScript_19FD1B:: @ 819FD1B -PetalburgCity_PokemonCenter_1F_EventScript_19FD1B:: @ 819FD1B -RustboroCity_PokemonCenter_1F_EventScript_19FD1B:: @ 819FD1B -SlateportCity_PokemonCenter_1F_EventScript_19FD1B:: @ 819FD1B -VerdanturfTown_PokemonCenter_1F_EventScript_19FD1B:: @ 819FD1B - goto_if_unset FLAG_RECEIVED_POKENAV, OldaleTown_PokemonCenter_1F_EventScript_1A14DC - goto_if_set FLAG_DEFEATED_PETALBURG_GYM, OldaleTown_PokemonCenter_1F_EventScript_1A14DC - goto_if_unset FLAG_HIDE_MR_BRINEY_BOAT_ROUTE104, OldaleTown_PokemonCenter_1F_EventScript_19FD49 - goto_if_unset FLAG_HIDE_MR_BRINEY_DEWFORD_TOWN, OldaleTown_PokemonCenter_1F_EventScript_19FD4F - goto_if_unset FLAG_HIDE_MR_BRINEY_ROUTE109, OldaleTown_PokemonCenter_1F_EventScript_19FD55 +Common_EventScript_UpdateBrineyLocation:: @ 819FD1B + goto_if_unset FLAG_RECEIVED_POKENAV, Common_EventScript_Return + goto_if_set FLAG_DEFEATED_PETALBURG_GYM, Common_EventScript_Return + goto_if_unset FLAG_HIDE_MR_BRINEY_BOAT_ROUTE104, EventScript_SetBrineyLocation_House + goto_if_unset FLAG_HIDE_MR_BRINEY_DEWFORD_TOWN, EventScript_SetBrineyLocation_Dewford + goto_if_unset FLAG_HIDE_MR_BRINEY_ROUTE109, EventScript_SetBrineyLocation_Route109 return -OldaleTown_PokemonCenter_1F_EventScript_19FD49:: @ 819FD49 +EventScript_SetBrineyLocation_House:: @ 819FD49 setvar VAR_BRINEY_LOCATION, 1 return -OldaleTown_PokemonCenter_1F_EventScript_19FD4F:: @ 819FD4F +EventScript_SetBrineyLocation_Dewford:: @ 819FD4F setvar VAR_BRINEY_LOCATION, 2 return -OldaleTown_PokemonCenter_1F_EventScript_19FD55:: @ 819FD55 +EventScript_SetBrineyLocation_Route109:: @ 819FD55 setvar VAR_BRINEY_LOCATION, 3 return -DewfordTown_PokemonCenter_1F_EventScript_19FD5B:: @ 819FD5B -EverGrandeCity_PokemonLeague_EventScript_19FD5B:: @ 819FD5B -FallarborTown_PokemonCenter_1F_EventScript_19FD5B:: @ 819FD5B -FortreeCity_PokemonCenter_1F_EventScript_19FD5B:: @ 819FD5B -LavaridgeTown_PokemonCenter_1F_EventScript_19FD5B:: @ 819FD5B -LilycoveCity_PokemonCenter_1F_EventScript_19FD5B:: @ 819FD5B -MauvilleCity_PokemonCenter_1F_EventScript_19FD5B:: @ 819FD5B -MossdeepCity_PokemonCenter_1F_EventScript_19FD5B:: @ 819FD5B -OldaleTown_PokemonCenter_1F_EventScript_19FD5B:: @ 819FD5B -PetalburgCity_PokemonCenter_1F_EventScript_19FD5B:: @ 819FD5B -RustboroCity_PokemonCenter_1F_EventScript_19FD5B:: @ 819FD5B -SlateportCity_PokemonCenter_1F_EventScript_19FD5B:: @ 819FD5B -SootopolisCity_PokemonCenter_1F_EventScript_19FD5B:: @ 819FD5B -VerdanturfTown_PokemonCenter_1F_EventScript_19FD5B:: @ 819FD5B - lock - faceplayer - msgbox gText_NurseJoy_Welcome, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq OldaleTown_PokemonCenter_1F_EventScript_19FD7C - compare VAR_RESULT, NO - goto_if_eq OldaleTown_PokemonCenter_1F_EventScript_19FDC7 - end - -OldaleTown_PokemonCenter_1F_EventScript_19FD7C:: @ 819FD7C - incrementgamestat GAME_STAT_USED_POKECENTER - message gText_NurseJoy_OkayIllTakeYourPokemon - waitmessage - applymovement VAR_0x800B, OldaleTown_PokemonCenter_1F_Movement_1A083F - waitmovement 0 - dofieldeffect FLDEFF_POKECENTER_HEAL - waitfieldeffect FLDEFF_POKECENTER_HEAL - applymovement VAR_0x800B, OldaleTown_PokemonCenter_1F_Movement_1A0845 - waitmovement 0 - special ScrSpecial_HealPlayerParty - goto_if_unset FLAG_POKERUS_EXPLAINED, OldaleTown_PokemonCenter_1F_EventScript_19FDCE - goto OldaleTown_PokemonCenter_1F_EventScript_19FDB0 - end - -OldaleTown_PokemonCenter_1F_EventScript_19FDB0:: @ 819FDB0 - message gText_NurseJoy_ThankYouForWaiting - waitmessage - applymovement VAR_0x800B, OldaleTown_PokemonCenter_1F_Movement_19FDF4 - waitmovement 0 - message gText_NurseJoy_WeHopeToSeeYouAgain - waitmessage - return - -OldaleTown_PokemonCenter_1F_EventScript_19FDC7:: @ 819FDC7 - message gText_NurseJoy_WeHopeToSeeYouAgain - waitmessage - return - -OldaleTown_PokemonCenter_1F_EventScript_19FDCE:: @ 819FDCE - specialvar VAR_RESULT, IsPokerusInParty - compare VAR_RESULT, 1 - goto_if_eq OldaleTown_PokemonCenter_1F_EventScript_19FDEA - compare VAR_RESULT, 0 - goto_if_eq OldaleTown_PokemonCenter_1F_EventScript_19FDB0 - end - -OldaleTown_PokemonCenter_1F_EventScript_19FDEA:: @ 819FDEA - message gText_NurseJoy_Pokerus - waitmessage - setflag FLAG_POKERUS_EXPLAINED - return - -OldaleTown_PokemonCenter_1F_Movement_19FDF4:: @ 819FDF4 - nurse_joy_bow - delay_4 - step_end + .include "data/scripts/pkmn_center_nurse.inc" Std_ObtainItem: @ 819FDF7 additem VAR_0x8000, VAR_0x8001 @@ -1524,7 +1447,7 @@ LittlerootTown_ProfessorBirchsLab_EventScript_1A02F4:: @ 81A02F4 Route101_EventScript_1A02F4:: @ 81A02F4 Route103_EventScript_1A02F4:: @ 81A02F4 compare VAR_PETALBURG_GYM_STATE, 0 - goto_if_eq Route101_EventScript_1A14DC + goto_if_eq Common_EventScript_Return compare VAR_BIRCH_STATE, 0 call_if_eq Route101_EventScript_1A0358 compare VAR_BIRCH_STATE, 1 @@ -1600,7 +1523,7 @@ Route101_EventScript_1A03B0:: @ 81A03B0 msgbox Route101_Text_1C44DC, MSGBOX_DEFAULT call Route101_EventScript_1A03A5 compare VAR_0x800A, 0 - goto_if_eq Route101_EventScript_1A14DC + goto_if_eq Common_EventScript_Return setvar VAR_0x8004, 1 specialvar VAR_RESULT, ScriptGetPokedexInfo copyvar VAR_0x8008, VAR_0x8005 @@ -2660,9 +2583,7 @@ EventScript_1A14CA:: waitstate end -OldaleTown_PokemonCenter_1F_EventScript_1A14DC:: @ 81A14DC -PacifidlogTown_House2_EventScript_1A14DC:: @ 81A14DC -Route101_EventScript_1A14DC:: @ 81A14DC +Common_EventScript_Return:: @ 81A14DC return .include "data/scripts/debug.inc" diff --git a/data/event_scripts.s b/data/event_scripts.s index dd95e39e3..a216dcce7 100644 --- a/data/event_scripts.s +++ b/data/event_scripts.s @@ -716,29 +716,29 @@ UnknownString_819C21F: @ 819C21F .include "data/scripts/new_game.inc" .include "data/scripts/hall_of_fame.inc" -S_WhiteOut:: @ 819FC74 +EventScript_WhiteOut:: @ 819FC74 call EverGrandeCity_HallOfFame_EventScript_ResetEliteFour - call EventScript_19FC84 - goto gUnknown_0819FC9F + call EventScript_TryReadyRivalForGoGoggles + goto EventScript_ResetMrBriney end -EventScript_19FC84: - goto_if_set FLAG_RECEIVED_GO_GOGGLES, Route101_EventScript_1A14DC - goto_if_unset FLAG_DEFEATED_LAVARIDGE_GYM, Route101_EventScript_1A14DC +EventScript_TryReadyRivalForGoGoggles: + goto_if_set FLAG_RECEIVED_GO_GOGGLES, Common_EventScript_Return + goto_if_unset FLAG_DEFEATED_LAVARIDGE_GYM, Common_EventScript_Return clearflag FLAG_HIDE_RIVAL_LAVARIDGE_1 setvar VAR_LAVARIDGE_RIVAL_STATE, 2 return -gUnknown_0819FC9F:: @ 819FC9F +EventScript_ResetMrBriney:: @ 819FC9F compare VAR_BRINEY_LOCATION, 1 - goto_if_eq EventScript_19FCC1 + goto_if_eq EventScript_MoveMrBrineyToHouse compare VAR_BRINEY_LOCATION, 2 - goto_if_eq EventScript_19FCD7 + goto_if_eq EventScript_MoveMrBrineyToDewford compare VAR_BRINEY_LOCATION, 3 - goto_if_eq EventScript_19FCF0 + goto_if_eq EventScript_MoveMrBrineyToRoute109 end -EventScript_19FCC1: +EventScript_MoveMrBrineyToHouse: setflag FLAG_HIDE_MR_BRINEY_DEWFORD_TOWN setflag FLAG_HIDE_MR_BRINEY_BOAT_DEWFORD setflag FLAG_HIDE_MR_BRINEY_ROUTE109 @@ -748,7 +748,7 @@ EventScript_19FCC1: clearflag FLAG_HIDE_PEEKO_BRINEY_HOUSE end -EventScript_19FCD7: +EventScript_MoveMrBrineyToDewford: setflag FLAG_HIDE_MR_BRINEY_ROUTE109 setflag FLAG_HIDE_MR_BRINEY_BOAT_ROUTE109 setflag FLAG_HIDE_MR_BRINEY_ROUTE104 @@ -759,7 +759,7 @@ EventScript_19FCD7: clearflag FLAG_HIDE_MR_BRINEY_BOAT_DEWFORD end -EventScript_19FCF0: +EventScript_MoveMrBrineyToRoute109: setflag FLAG_HIDE_MR_BRINEY_ROUTE104 setflag FLAG_HIDE_MR_BRINEY_BOAT_ROUTE104 setflag FLAG_HIDE_MR_BRINEY_ROUTE104_HOUSE @@ -778,104 +778,27 @@ EverGrandeCity_HallOfFame_EventScript_ResetEliteFour:: @ 819FD09 setvar VAR_ELITE_4_STATE, 0 return -DewfordTown_PokemonCenter_1F_EventScript_19FD1B:: @ 819FD1B -FallarborTown_PokemonCenter_1F_EventScript_19FD1B:: @ 819FD1B -LavaridgeTown_PokemonCenter_1F_EventScript_19FD1B:: @ 819FD1B -MauvilleCity_PokemonCenter_1F_EventScript_19FD1B:: @ 819FD1B -OldaleTown_PokemonCenter_1F_EventScript_19FD1B:: @ 819FD1B -PetalburgCity_PokemonCenter_1F_EventScript_19FD1B:: @ 819FD1B -RustboroCity_PokemonCenter_1F_EventScript_19FD1B:: @ 819FD1B -SlateportCity_PokemonCenter_1F_EventScript_19FD1B:: @ 819FD1B -VerdanturfTown_PokemonCenter_1F_EventScript_19FD1B:: @ 819FD1B - goto_if_unset FLAG_RECEIVED_POKENAV, OldaleTown_PokemonCenter_1F_EventScript_1A14DC - goto_if_set FLAG_DEFEATED_PETALBURG_GYM, OldaleTown_PokemonCenter_1F_EventScript_1A14DC - goto_if_unset FLAG_HIDE_MR_BRINEY_BOAT_ROUTE104, OldaleTown_PokemonCenter_1F_EventScript_19FD49 - goto_if_unset FLAG_HIDE_MR_BRINEY_DEWFORD_TOWN, OldaleTown_PokemonCenter_1F_EventScript_19FD4F - goto_if_unset FLAG_HIDE_MR_BRINEY_ROUTE109, OldaleTown_PokemonCenter_1F_EventScript_19FD55 +Common_EventScript_UpdateBrineyLocation:: @ 819FD1B + goto_if_unset FLAG_RECEIVED_POKENAV, Common_EventScript_Return + goto_if_set FLAG_DEFEATED_PETALBURG_GYM, Common_EventScript_Return + goto_if_unset FLAG_HIDE_MR_BRINEY_BOAT_ROUTE104, EventScript_SetBrineyLocation_House + goto_if_unset FLAG_HIDE_MR_BRINEY_DEWFORD_TOWN, EventScript_SetBrineyLocation_Dewford + goto_if_unset FLAG_HIDE_MR_BRINEY_ROUTE109, EventScript_SetBrineyLocation_Route109 return -OldaleTown_PokemonCenter_1F_EventScript_19FD49:: @ 819FD49 +EventScript_SetBrineyLocation_House:: @ 819FD49 setvar VAR_BRINEY_LOCATION, 1 return -OldaleTown_PokemonCenter_1F_EventScript_19FD4F:: @ 819FD4F +EventScript_SetBrineyLocation_Dewford:: @ 819FD4F setvar VAR_BRINEY_LOCATION, 2 return -OldaleTown_PokemonCenter_1F_EventScript_19FD55:: @ 819FD55 +EventScript_SetBrineyLocation_Route109:: @ 819FD55 setvar VAR_BRINEY_LOCATION, 3 return -DewfordTown_PokemonCenter_1F_EventScript_19FD5B:: @ 819FD5B -EverGrandeCity_PokemonLeague_EventScript_19FD5B:: @ 819FD5B -FallarborTown_PokemonCenter_1F_EventScript_19FD5B:: @ 819FD5B -FortreeCity_PokemonCenter_1F_EventScript_19FD5B:: @ 819FD5B -LavaridgeTown_PokemonCenter_1F_EventScript_19FD5B:: @ 819FD5B -LilycoveCity_PokemonCenter_1F_EventScript_19FD5B:: @ 819FD5B -MauvilleCity_PokemonCenter_1F_EventScript_19FD5B:: @ 819FD5B -MossdeepCity_PokemonCenter_1F_EventScript_19FD5B:: @ 819FD5B -OldaleTown_PokemonCenter_1F_EventScript_19FD5B:: @ 819FD5B -PetalburgCity_PokemonCenter_1F_EventScript_19FD5B:: @ 819FD5B -RustboroCity_PokemonCenter_1F_EventScript_19FD5B:: @ 819FD5B -SlateportCity_PokemonCenter_1F_EventScript_19FD5B:: @ 819FD5B -SootopolisCity_PokemonCenter_1F_EventScript_19FD5B:: @ 819FD5B -VerdanturfTown_PokemonCenter_1F_EventScript_19FD5B:: @ 819FD5B - lock - faceplayer - msgbox gText_NurseJoy_Welcome, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq do_heal_party - compare VAR_RESULT, NO - goto_if_eq dont_heal_party - end - -do_heal_party:: @ 819FD7C - incrementgamestat GAME_STAT_USED_POKECENTER - message gText_NurseJoy_OkayIllTakeYourPokemon - waitmessage - applymovement VAR_0x800B, OldaleTown_PokemonCenter_1F_Movement_1A083F - waitmovement 0 - dofieldeffect FLDEFF_POKECENTER_HEAL - waitfieldeffect FLDEFF_POKECENTER_HEAL - applymovement VAR_0x800B, OldaleTown_PokemonCenter_1F_Movement_1A0845 - waitmovement 0 - special ScrSpecial_HealPlayerParty - goto_if_unset FLAG_POKERUS_EXPLAINED, OldaleTown_PokemonCenter_1F_EventScript_19FDCE - goto OldaleTown_PokemonCenter_1F_EventScript_19FDB0 - end - -OldaleTown_PokemonCenter_1F_EventScript_19FDB0:: @ 819FDB0 - message gText_NurseJoy_ThankYouForWaiting - waitmessage - applymovement VAR_0x800B, OldaleTown_PokemonCenter_1F_Movement_19FDF4 - waitmovement 0 - message gText_NurseJoy_WeHopeToSeeYouAgain - waitmessage - return - -dont_heal_party:: @ 819FDC7 - message gText_NurseJoy_WeHopeToSeeYouAgain - waitmessage - return - -OldaleTown_PokemonCenter_1F_EventScript_19FDCE:: @ 819FDCE - specialvar VAR_RESULT, IsPokerusInParty - compare VAR_RESULT, 1 - goto_if_eq OldaleTown_PokemonCenter_1F_EventScript_19FDEA - compare VAR_RESULT, 0 - goto_if_eq OldaleTown_PokemonCenter_1F_EventScript_19FDB0 - end - -OldaleTown_PokemonCenter_1F_EventScript_19FDEA:: @ 819FDEA - message gText_NurseJoy_Pokerus - waitmessage - setflag FLAG_POKERUS_EXPLAINED - return - -OldaleTown_PokemonCenter_1F_Movement_19FDF4:: @ 819FDF4 - nurse_joy_bow - delay_4 - step_end + .include "data/scripts/pkmn_center_nurse.inc" Std_ObtainItem: @ 819FDF7 additem VAR_0x8000, VAR_0x8001 @@ -1523,7 +1446,7 @@ LittlerootTown_ProfessorBirchsLab_EventScript_1A02F4:: @ 81A02F4 Route101_EventScript_1A02F4:: @ 81A02F4 Route103_EventScript_1A02F4:: @ 81A02F4 compare VAR_PETALBURG_GYM_STATE, 0 - goto_if_eq Route101_EventScript_1A14DC + goto_if_eq Common_EventScript_Return compare VAR_BIRCH_STATE, 0 call_if_eq Route101_EventScript_1A0358 compare VAR_BIRCH_STATE, 1 @@ -1599,7 +1522,7 @@ Route101_EventScript_1A03B0:: @ 81A03B0 msgbox Route101_Text_1C44DC, MSGBOX_DEFAULT call Route101_EventScript_1A03A5 compare VAR_0x800A, 0 - goto_if_eq Route101_EventScript_1A14DC + goto_if_eq Common_EventScript_Return setvar VAR_0x8004, 1 specialvar VAR_RESULT, ScriptGetPokedexInfo copyvar VAR_0x8008, VAR_0x8005 @@ -2655,9 +2578,7 @@ EventScript_1A14CA:: waitstate end -OldaleTown_PokemonCenter_1F_EventScript_1A14DC:: @ 81A14DC -PacifidlogTown_House2_EventScript_1A14DC:: @ 81A14DC -Route101_EventScript_1A14DC:: @ 81A14DC +Common_EventScript_Return:: @ 81A14DC return .include "data/scripts/debug.inc" diff --git a/data/maps/DewfordTown_PokemonCenter_1F/scripts.inc b/data/maps/DewfordTown_PokemonCenter_1F/scripts.inc index e92919990..b02761b8b 100644 --- a/data/maps/DewfordTown_PokemonCenter_1F/scripts.inc +++ b/data/maps/DewfordTown_PokemonCenter_1F/scripts.inc @@ -4,12 +4,12 @@ DewfordTown_PokemonCenter_1F_MapScripts:: @ 8153014 DewfordTown_PokemonCenter_1F_MapScript1_15301A:: @ 815301A setrespawn HEAL_LOCATION_DEWFORD_TOWN - call DewfordTown_PokemonCenter_1F_EventScript_19FD1B + call Common_EventScript_UpdateBrineyLocation end DewfordTown_PokemonCenter_1F_EventScript_153023:: @ 8153023 setvar VAR_0x800B, 1 - call DewfordTown_PokemonCenter_1F_EventScript_19FD5B + call Common_EventScript_PkmnCenterNurse waitmessage waitbuttonpress release diff --git a/data/maps/EverGrandeCity_PokemonCenter_1F/scripts.inc b/data/maps/EverGrandeCity_PokemonCenter_1F/scripts.inc index 0987adf18..5d229e908 100644 --- a/data/maps/EverGrandeCity_PokemonCenter_1F/scripts.inc +++ b/data/maps/EverGrandeCity_PokemonCenter_1F/scripts.inc @@ -9,7 +9,7 @@ EverGrandeCity_PokemonCenter_1F_MapScript1_15BC6C:: @ 815BC6C EverGrandeCity_PokemonCenter_1F_EventScript_15BC70:: @ 815BC70 SootopolisCity_PokemonCenter_1F_EventScript_15BC70:: @ 815BC70 setvar VAR_0x800B, 1 - call SootopolisCity_PokemonCenter_1F_EventScript_19FD5B + call Common_EventScript_PkmnCenterNurse waitmessage waitbuttonpress release diff --git a/data/maps/EverGrandeCity_PokemonLeague/scripts.inc b/data/maps/EverGrandeCity_PokemonLeague/scripts.inc index 8bd948377..97e7d1f46 100644 --- a/data/maps/EverGrandeCity_PokemonLeague/scripts.inc +++ b/data/maps/EverGrandeCity_PokemonLeague/scripts.inc @@ -15,7 +15,7 @@ EverGrandeCity_PokemonLeague_EventScript_15BA8B:: @ 815BA8B EverGrandeCity_PokemonLeague_EventScript_15BA9A:: @ 815BA9A setvar VAR_0x800B, 1 - call EverGrandeCity_PokemonLeague_EventScript_19FD5B + call Common_EventScript_PkmnCenterNurse waitmessage waitbuttonpress release diff --git a/data/maps/FallarborTown_PokemonCenter_1F/scripts.inc b/data/maps/FallarborTown_PokemonCenter_1F/scripts.inc index 528118482..133b4626a 100644 --- a/data/maps/FallarborTown_PokemonCenter_1F/scripts.inc +++ b/data/maps/FallarborTown_PokemonCenter_1F/scripts.inc @@ -4,12 +4,12 @@ FallarborTown_PokemonCenter_1F_MapScripts:: @ 8153AF3 FallarborTown_PokemonCenter_1F_MapScript1_153AF9:: @ 8153AF9 setrespawn HEAL_LOCATION_FALLARBOR_TOWN - call FallarborTown_PokemonCenter_1F_EventScript_19FD1B + call Common_EventScript_UpdateBrineyLocation end FallarborTown_PokemonCenter_1F_EventScript_153B02:: @ 8153B02 setvar VAR_0x800B, 1 - call FallarborTown_PokemonCenter_1F_EventScript_19FD5B + call Common_EventScript_PkmnCenterNurse waitmessage waitbuttonpress release diff --git a/data/maps/FortreeCity_PokemonCenter_1F/scripts.inc b/data/maps/FortreeCity_PokemonCenter_1F/scripts.inc index c080805ea..90b74adc0 100644 --- a/data/maps/FortreeCity_PokemonCenter_1F/scripts.inc +++ b/data/maps/FortreeCity_PokemonCenter_1F/scripts.inc @@ -8,7 +8,7 @@ FortreeCity_PokemonCenter_1F_MapScript1_158017:: @ 8158017 FortreeCity_PokemonCenter_1F_EventScript_15801B:: @ 815801B setvar VAR_0x800B, 1 - call FortreeCity_PokemonCenter_1F_EventScript_19FD5B + call Common_EventScript_PkmnCenterNurse waitmessage waitbuttonpress release diff --git a/data/maps/LavaridgeTown_PokemonCenter_1F/scripts.inc b/data/maps/LavaridgeTown_PokemonCenter_1F/scripts.inc index e3434a291..637a1eefa 100644 --- a/data/maps/LavaridgeTown_PokemonCenter_1F/scripts.inc +++ b/data/maps/LavaridgeTown_PokemonCenter_1F/scripts.inc @@ -4,12 +4,12 @@ LavaridgeTown_PokemonCenter_1F_MapScripts:: @ 815390C LavaridgeTown_PokemonCenter_1F_MapScript1_153912:: @ 8153912 setrespawn HEAL_LOCATION_LAVARIDGE_TOWN - call LavaridgeTown_PokemonCenter_1F_EventScript_19FD1B + call Common_EventScript_UpdateBrineyLocation end LavaridgeTown_PokemonCenter_1F_EventScript_15391B:: @ 815391B setvar VAR_0x800B, 1 - call LavaridgeTown_PokemonCenter_1F_EventScript_19FD5B + call Common_EventScript_PkmnCenterNurse waitmessage waitbuttonpress release diff --git a/data/maps/LilycoveCity_PokemonCenter_1F/scripts.inc b/data/maps/LilycoveCity_PokemonCenter_1F/scripts.inc index e03a03702..47466c925 100644 --- a/data/maps/LilycoveCity_PokemonCenter_1F/scripts.inc +++ b/data/maps/LilycoveCity_PokemonCenter_1F/scripts.inc @@ -8,7 +8,7 @@ LilycoveCity_PokemonCenter_1F_MapScript1_15932D:: @ 815932D LilycoveCity_PokemonCenter_1F_EventScript_159331:: @ 8159331 setvar VAR_0x800B, 1 - call LilycoveCity_PokemonCenter_1F_EventScript_19FD5B + call Common_EventScript_PkmnCenterNurse waitmessage waitbuttonpress release diff --git a/data/maps/MauvilleCity_PokemonCenter_1F/scripts.inc b/data/maps/MauvilleCity_PokemonCenter_1F/scripts.inc index 03c22a982..e5cfd2fb2 100644 --- a/data/maps/MauvilleCity_PokemonCenter_1F/scripts.inc +++ b/data/maps/MauvilleCity_PokemonCenter_1F/scripts.inc @@ -4,7 +4,7 @@ MauvilleCity_PokemonCenter_1F_MapScripts:: @ 8157351 MauvilleCity_PokemonCenter_1F_MapScript1_157357:: @ 8157357 setrespawn HEAL_LOCATION_MAUVILLE_CITY - call MauvilleCity_PokemonCenter_1F_EventScript_19FD1B + call Common_EventScript_UpdateBrineyLocation goto MauvilleCity_PokemonCenter_1F_EventScript_157365 end @@ -14,7 +14,7 @@ MauvilleCity_PokemonCenter_1F_EventScript_157365:: @ 8157365 MauvilleCity_PokemonCenter_1F_EventScript_157369:: @ 8157369 setvar VAR_0x800B, 1 - call MauvilleCity_PokemonCenter_1F_EventScript_19FD5B + call Common_EventScript_PkmnCenterNurse waitmessage waitbuttonpress release diff --git a/data/maps/MossdeepCity_PokemonCenter_1F/scripts.inc b/data/maps/MossdeepCity_PokemonCenter_1F/scripts.inc index 520678ec6..c0655f948 100644 --- a/data/maps/MossdeepCity_PokemonCenter_1F/scripts.inc +++ b/data/maps/MossdeepCity_PokemonCenter_1F/scripts.inc @@ -8,7 +8,7 @@ MossdeepCity_PokemonCenter_1F_MapScript1_15A8D6:: @ 815A8D6 MossdeepCity_PokemonCenter_1F_EventScript_15A8DA:: @ 815A8DA setvar VAR_0x800B, 1 - call MossdeepCity_PokemonCenter_1F_EventScript_19FD5B + call Common_EventScript_PkmnCenterNurse waitmessage waitbuttonpress release diff --git a/data/maps/OldaleTown_PokemonCenter_1F/scripts.inc b/data/maps/OldaleTown_PokemonCenter_1F/scripts.inc index 5865a5f18..c91239d86 100644 --- a/data/maps/OldaleTown_PokemonCenter_1F/scripts.inc +++ b/data/maps/OldaleTown_PokemonCenter_1F/scripts.inc @@ -4,12 +4,12 @@ OldaleTown_PokemonCenter_1F_MapScripts:: @ 8152F08 OldaleTown_PokemonCenter_1F_MapScript1_152F0E:: @ 8152F0E setrespawn HEAL_LOCATION_OLDALE_TOWN - call OldaleTown_PokemonCenter_1F_EventScript_19FD1B + call Common_EventScript_UpdateBrineyLocation end OldaleTown_PokemonCenter_1F_EventScript_152F17:: @ 8152F17 setvar VAR_0x800B, 1 - call OldaleTown_PokemonCenter_1F_EventScript_19FD5B + call Common_EventScript_PkmnCenterNurse waitmessage waitbuttonpress release diff --git a/data/maps/PacifidlogTown_House2/scripts.inc b/data/maps/PacifidlogTown_House2/scripts.inc index 2f74f4cc1..f9b2a8460 100644 --- a/data/maps/PacifidlogTown_House2/scripts.inc +++ b/data/maps/PacifidlogTown_House2/scripts.inc @@ -20,7 +20,7 @@ PacifidlogTown_House2_EventScript_154168:: @ 8154168 end PacifidlogTown_House2_EventScript_1541B4:: @ 81541B4 - goto_if_unset FLAG_RECEIVED_FANCLUB_TM_THIS_WEEK, PacifidlogTown_House2_EventScript_1A14DC + goto_if_unset FLAG_RECEIVED_FANCLUB_TM_THIS_WEEK, Common_EventScript_Return specialvar VAR_RESULT, GetDaysUntilPacifidlogTMAvailable compare VAR_RESULT, 0 call_if_eq PacifidlogTown_House2_EventScript_1541E8 diff --git a/data/maps/PacifidlogTown_PokemonCenter_1F/scripts.inc b/data/maps/PacifidlogTown_PokemonCenter_1F/scripts.inc index 37e0c7ade..287349c78 100644 --- a/data/maps/PacifidlogTown_PokemonCenter_1F/scripts.inc +++ b/data/maps/PacifidlogTown_PokemonCenter_1F/scripts.inc @@ -8,7 +8,7 @@ PacifidlogTown_PokemonCenter_1F_MapScript1_154105:: @ 8154105 @ 8154109 setvar VAR_0x800B, 1 - call VerdanturfTown_PokemonCenter_1F_EventScript_19FD5B + call Common_EventScript_PkmnCenterNurse waitmessage waitbuttonpress release diff --git a/data/maps/PetalburgCity_PokemonCenter_1F/scripts.inc b/data/maps/PetalburgCity_PokemonCenter_1F/scripts.inc index a84358ca0..4edcb9555 100644 --- a/data/maps/PetalburgCity_PokemonCenter_1F/scripts.inc +++ b/data/maps/PetalburgCity_PokemonCenter_1F/scripts.inc @@ -4,12 +4,12 @@ PetalburgCity_PokemonCenter_1F_MapScripts:: @ 8155204 PetalburgCity_PokemonCenter_1F_MapScript1_15520A:: @ 815520A setrespawn HEAL_LOCATION_PETALBURG_CITY - call PetalburgCity_PokemonCenter_1F_EventScript_19FD1B + call Common_EventScript_UpdateBrineyLocation end PetalburgCity_PokemonCenter_1F_EventScript_155213:: @ 8155213 setvar VAR_0x800B, 1 - call PetalburgCity_PokemonCenter_1F_EventScript_19FD5B + call Common_EventScript_PkmnCenterNurse waitmessage waitbuttonpress release diff --git a/data/maps/RustboroCity_PokemonCenter_1F/scripts.inc b/data/maps/RustboroCity_PokemonCenter_1F/scripts.inc index 7837a70c3..83766d86e 100644 --- a/data/maps/RustboroCity_PokemonCenter_1F/scripts.inc +++ b/data/maps/RustboroCity_PokemonCenter_1F/scripts.inc @@ -4,12 +4,12 @@ RustboroCity_PokemonCenter_1F_MapScripts:: @ 8157B79 RustboroCity_PokemonCenter_1F_MapScript1_157B7F:: @ 8157B7F setrespawn HEAL_LOCATION_RUSTBORO_CITY - call RustboroCity_PokemonCenter_1F_EventScript_19FD1B + call Common_EventScript_UpdateBrineyLocation end RustboroCity_PokemonCenter_1F_EventScript_157B88:: @ 8157B88 setvar VAR_0x800B, 1 - call RustboroCity_PokemonCenter_1F_EventScript_19FD5B + call Common_EventScript_PkmnCenterNurse waitmessage waitbuttonpress release diff --git a/data/maps/SlateportCity_PokemonCenter_1F/scripts.inc b/data/maps/SlateportCity_PokemonCenter_1F/scripts.inc index 46c4a595f..a0d401b29 100644 --- a/data/maps/SlateportCity_PokemonCenter_1F/scripts.inc +++ b/data/maps/SlateportCity_PokemonCenter_1F/scripts.inc @@ -4,12 +4,12 @@ SlateportCity_PokemonCenter_1F_MapScripts:: @ 81563BF SlateportCity_PokemonCenter_1F_MapScript1_1563C5:: @ 81563C5 setrespawn HEAL_LOCATION_SLATEPORT_CITY - call SlateportCity_PokemonCenter_1F_EventScript_19FD1B + call Common_EventScript_UpdateBrineyLocation end SlateportCity_PokemonCenter_1F_EventScript_1563CE:: @ 81563CE setvar VAR_0x800B, 1 - call SlateportCity_PokemonCenter_1F_EventScript_19FD5B + call Common_EventScript_PkmnCenterNurse waitmessage waitbuttonpress release diff --git a/data/maps/SootopolisCity_PokemonCenter_1F/scripts.inc b/data/maps/SootopolisCity_PokemonCenter_1F/scripts.inc index 0f37f1014..c82d98fef 100644 --- a/data/maps/SootopolisCity_PokemonCenter_1F/scripts.inc +++ b/data/maps/SootopolisCity_PokemonCenter_1F/scripts.inc @@ -8,7 +8,7 @@ SootopolisCity_PokemonCenter_1F_MapScript1_15B196:: @ 815B196 @ 815B19A setvar VAR_0x800B, 1 - call VerdanturfTown_PokemonCenter_1F_EventScript_19FD5B + call Common_EventScript_PkmnCenterNurse waitmessage waitbuttonpress release diff --git a/data/maps/VerdanturfTown_PokemonCenter_1F/scripts.inc b/data/maps/VerdanturfTown_PokemonCenter_1F/scripts.inc index 8b18a2f22..1c60fc1bb 100644 --- a/data/maps/VerdanturfTown_PokemonCenter_1F/scripts.inc +++ b/data/maps/VerdanturfTown_PokemonCenter_1F/scripts.inc @@ -4,13 +4,13 @@ VerdanturfTown_PokemonCenter_1F_MapScripts:: @ 8153F09 VerdanturfTown_PokemonCenter_1F_MapScript1_153F0F:: @ 8153F0F setrespawn HEAL_LOCATION_VERDANTURF_TOWN - call VerdanturfTown_PokemonCenter_1F_EventScript_19FD1B + call Common_EventScript_UpdateBrineyLocation end PacifidlogTown_PokemonCenter_1F_EventScript_153F18:: @ 8153F18 VerdanturfTown_PokemonCenter_1F_EventScript_153F18:: @ 8153F18 setvar VAR_0x800B, 1 - call VerdanturfTown_PokemonCenter_1F_EventScript_19FD5B + call Common_EventScript_PkmnCenterNurse waitmessage waitbuttonpress release diff --git a/data/scripts/pkmn_center_nurse.inc b/data/scripts/pkmn_center_nurse.inc new file mode 100644 index 000000000..27a3a0aba --- /dev/null +++ b/data/scripts/pkmn_center_nurse.inc @@ -0,0 +1,57 @@ +Common_EventScript_PkmnCenterNurse:: @ 819FD5B + lock + faceplayer + msgbox gText_NurseJoy_Welcome, MSGBOX_YESNO + compare VAR_RESULT, YES + goto_if_eq EventScript_PkmnCenterNurse_HealPkmn + compare VAR_RESULT, NO + goto_if_eq EventScript_PkmnCenterNurse_Goodbye + end + +EventScript_PkmnCenterNurse_HealPkmn:: @ 819FD7C + incrementgamestat GAME_STAT_USED_POKECENTER + message gText_NurseJoy_OkayIllTakeYourPokemon + waitmessage + applymovement VAR_0x800B, OldaleTown_PokemonCenter_1F_Movement_1A083F + waitmovement 0 + dofieldeffect FLDEFF_POKECENTER_HEAL + waitfieldeffect FLDEFF_POKECENTER_HEAL + applymovement VAR_0x800B, OldaleTown_PokemonCenter_1F_Movement_1A0845 + waitmovement 0 + special ScrSpecial_HealPlayerParty + goto_if_unset FLAG_POKERUS_EXPLAINED, EventScript_PkmnCenterNurse_CheckPokerus + goto EventScript_PkmnCenterNurse_ReturnPkmn + end + +EventScript_PkmnCenterNurse_ReturnPkmn:: @ 819FDB0 + message gText_NurseJoy_ThankYouForWaiting + waitmessage + applymovement VAR_0x800B, Movement_PkmnCenterNurse_Bow + waitmovement 0 + message gText_NurseJoy_WeHopeToSeeYouAgain + waitmessage + return + +EventScript_PkmnCenterNurse_Goodbye:: @ 819FDC7 + message gText_NurseJoy_WeHopeToSeeYouAgain + waitmessage + return + +EventScript_PkmnCenterNurse_CheckPokerus:: @ 819FDCE + specialvar VAR_RESULT, IsPokerusInParty + compare VAR_RESULT, TRUE + goto_if_eq EventScript_PkmnCenterNurse_ExplainPokerus + compare VAR_RESULT, FALSE + goto_if_eq EventScript_PkmnCenterNurse_ReturnPkmn + end + +EventScript_PkmnCenterNurse_ExplainPokerus:: @ 819FDEA + message gText_NurseJoy_Pokerus + waitmessage + setflag FLAG_POKERUS_EXPLAINED + return + +Movement_PkmnCenterNurse_Bow:: @ 819FDF4 + nurse_joy_bow + delay_4 + step_end diff --git a/src/overworld.c b/src/overworld.c index 072d6d1b3..40525db5e 100644 --- a/src/overworld.c +++ b/src/overworld.c @@ -60,8 +60,8 @@ extern u8 gUnknown_020297ED; extern u16 gTotalCameraPixelOffsetY; extern u16 gTotalCameraPixelOffsetX; -extern u8 S_WhiteOut[]; -extern u8 gUnknown_0819FC9F[]; +extern u8 EventScript_WhiteOut[]; +extern u8 EventScript_ResetMrBriney[]; extern u8 SingleBattleColosseum_EventScript_1A436F[]; extern u8 SingleBattleColosseum_EventScript_1A4379[]; extern u8 DoubleBattleColosseum_EventScript_1A4383[]; @@ -208,7 +208,7 @@ static void (*const gUnknown_082166D8[])(struct LinkPlayerObjectEvent *, struct static void DoWhiteOut(void) { - ScriptContext2_RunNewScript(S_WhiteOut); + ScriptContext2_RunNewScript(EventScript_WhiteOut); gSaveBlock1.money /= 2; ScrSpecial_HealPlayerParty(); Overworld_ResetStateAfterWhiteOut(); @@ -234,7 +234,7 @@ void Overworld_ResetStateAfterTeleport(void) FlagClear(FLAG_SYS_SAFARI_MODE); FlagClear(FLAG_SYS_USE_STRENGTH); FlagClear(FLAG_SYS_USE_FLASH); - ScriptContext2_RunNewScript(gUnknown_0819FC9F); + ScriptContext2_RunNewScript(EventScript_ResetMrBriney); } void Overworld_ResetStateAfterDigEscRope(void)