From cefc31dd1e52e618de4ba0c318756abd73f35e8a Mon Sep 17 00:00:00 2001 From: Marcus Huderle Date: Sat, 19 Oct 2019 12:11:51 -0500 Subject: [PATCH 01/46] Document Petalburg City scripts --- data/maps/PetalburgCity/map.json | 30 +-- data/maps/PetalburgCity/scripts.inc | 296 ++++++++++++++-------------- data/maps/Route102/scripts.inc | 6 +- 3 files changed, 166 insertions(+), 166 deletions(-) diff --git a/data/maps/PetalburgCity/map.json b/data/maps/PetalburgCity/map.json index 44402aff5c..721234bd57 100644 --- a/data/maps/PetalburgCity/map.json +++ b/data/maps/PetalburgCity/map.json @@ -35,7 +35,7 @@ "movement_range_y": 1, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "PetalburgCity_EventScript_1DC3FD", + "script": "PetalburgCity_EventScript_WallyAunt", "flag": "FLAG_HIDE_PETALBURG_CITY_WALLYS_AUNT" }, { @@ -61,7 +61,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "PetalburgCity_EventScript_1DC3E6", + "script": "PetalburgCity_EventScript_Boy1", "flag": "0" }, { @@ -74,7 +74,7 @@ "movement_range_y": 1, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "PetalburgCity_EventScript_1DC488", + "script": "PetalburgCity_EventScript_Gentleman", "flag": "0" }, { @@ -126,7 +126,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "PetalburgCity_EventScript_1DC82E", + "script": "PetalburgCity_EventScript_Boy2", "flag": "0" }, { @@ -195,7 +195,7 @@ "elevation": 3, "var": "VAR_PETALBURG_CITY_STATE", "var_value": "0", - "script": "PetalburgCity_EventScript_1DC49A" + "script": "PetalburgCity_EventScript_ShowGymToPlayer0" }, { "type": "trigger", @@ -204,7 +204,7 @@ "elevation": 3, "var": "VAR_PETALBURG_CITY_STATE", "var_value": "0", - "script": "PetalburgCity_EventScript_1DC4A6" + "script": "PetalburgCity_EventScript_ShowGymToPlayer1" }, { "type": "trigger", @@ -213,7 +213,7 @@ "elevation": 3, "var": "VAR_PETALBURG_CITY_STATE", "var_value": "0", - "script": "PetalburgCity_EventScript_1DC4B2" + "script": "PetalburgCity_EventScript_ShowGymToPlayer2" }, { "type": "trigger", @@ -222,7 +222,7 @@ "elevation": 3, "var": "VAR_PETALBURG_CITY_STATE", "var_value": "0", - "script": "PetalburgCity_EventScript_1DC4BE" + "script": "PetalburgCity_EventScript_ShowGymToPlayer3" }, { "type": "trigger", @@ -231,7 +231,7 @@ "elevation": 3, "var": "VAR_SCOTT_PETALBURG_ENCOUNTER", "var_value": "0", - "script": "PetalburgCity_EventScript_1DC691" + "script": "PetalburgCity_EventScript_Scott0" }, { "type": "trigger", @@ -240,7 +240,7 @@ "elevation": 3, "var": "VAR_SCOTT_PETALBURG_ENCOUNTER", "var_value": "0", - "script": "PetalburgCity_EventScript_1DC6A7" + "script": "PetalburgCity_EventScript_Scott1" }, { "type": "trigger", @@ -249,7 +249,7 @@ "elevation": 3, "var": "VAR_SCOTT_PETALBURG_ENCOUNTER", "var_value": "0", - "script": "PetalburgCity_EventScript_1DC6BD" + "script": "PetalburgCity_EventScript_Scott2" }, { "type": "trigger", @@ -258,7 +258,7 @@ "elevation": 3, "var": "VAR_SCOTT_PETALBURG_ENCOUNTER", "var_value": "0", - "script": "PetalburgCity_EventScript_1DC6D3" + "script": "PetalburgCity_EventScript_Scott3" } ], "bg_events": [ @@ -268,7 +268,7 @@ "y": 10, "elevation": 0, "player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY", - "script": "PetalburgCity_EventScript_1DC476" + "script": "PetalburgCity_EventScript_GymSign" }, { "type": "sign", @@ -292,7 +292,7 @@ "y": 16, "elevation": 0, "player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY", - "script": "PetalburgCity_EventScript_1DC47F" + "script": "PetalburgCity_EventScript_CitySign" }, { "type": "sign", @@ -316,7 +316,7 @@ "y": 9, "elevation": 0, "player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY", - "script": "PetalburgCity_EventScript_1DC491" + "script": "PetalburgCity_EventScript_WallyHouseSign" }, { "type": "hidden_item", diff --git a/data/maps/PetalburgCity/scripts.inc b/data/maps/PetalburgCity/scripts.inc index d164300691..5d3bbf1efa 100644 --- a/data/maps/PetalburgCity/scripts.inc +++ b/data/maps/PetalburgCity/scripts.inc @@ -1,52 +1,52 @@ PetalburgCity_MapScripts:: map_script MAP_SCRIPT_ON_TRANSITION, PetalburgCity_OnTransition - map_script MAP_SCRIPT_ON_FRAME_TABLE, PetalburgCity_MapScript2_1DC31C + map_script MAP_SCRIPT_ON_FRAME_TABLE, PetalburgCity_OnFrame .byte 0 PetalburgCity_OnTransition: @ 81DC2D7 setflag FLAG_VISITED_PETALBURG_CITY compare VAR_PETALBURG_CITY_STATE, 0 - call_if_eq PetalburgCity_EventScript_1DC307 + call_if_eq PetalburgCity_EventScript_MoveBoyToWestEntrance compare VAR_PETALBURG_CITY_STATE, 2 - call_if_eq PetalburgCity_EventScript_1DC30F + call_if_eq PetalburgCity_EventScript_DisableMapNameAndMusic compare VAR_PETALBURG_CITY_STATE, 4 - call_if_eq PetalburgCity_EventScript_1DC30F + call_if_eq PetalburgCity_EventScript_DisableMapNameAndMusic compare VAR_PETALBURG_GYM_STATE, 8 - call_if_eq PetalburgCity_EventScript_1DC316 + call_if_eq PetalburgCity_EventScript_SetGymDoorsUnlocked end -PetalburgCity_EventScript_1DC307:: @ 81DC307 +PetalburgCity_EventScript_MoveBoyToWestEntrance:: @ 81DC307 setobjectxyperm 8, 5, 11 return -PetalburgCity_EventScript_1DC30F:: @ 81DC30F +PetalburgCity_EventScript_DisableMapNameAndMusic:: @ 81DC30F setflag FLAG_HIDE_MAP_NAME_POPUP savebgm MUS_TSURETEK return -PetalburgCity_EventScript_1DC316:: @ 81DC316 +PetalburgCity_EventScript_SetGymDoorsUnlocked:: @ 81DC316 setvar VAR_PETALBURG_GYM_STATE, 7 return -PetalburgCity_MapScript2_1DC31C: @ 81DC31C - map_script_2 VAR_PETALBURG_CITY_STATE, 2, PetalburgCity_EventScript_1DC32E - map_script_2 VAR_PETALBURG_CITY_STATE, 4, PetalburgCity_EventScript_1DC390 +PetalburgCity_OnFrame: @ 81DC31C + map_script_2 VAR_PETALBURG_CITY_STATE, 2, PetalburgCity_EventScript_WallyTutorial + map_script_2 VAR_PETALBURG_CITY_STATE, 4, PetalburgCity_EventScript_WalkToWallyHouse .2byte 0 -PetalburgCity_EventScript_1DC32E:: @ 81DC32E +PetalburgCity_EventScript_WallyTutorial:: @ 81DC32E lockall special SavePlayerParty special PutZigzagoonInPlayerParty - applymovement 2, PetalburgCity_Movement_1DC451 - applymovement EVENT_OBJ_ID_PLAYER, PetalburgCity_Movement_1DC430 + applymovement 2, PetalburgCity_Movement_WallyTutorialWally + applymovement EVENT_OBJ_ID_PLAYER, PetalburgCity_Movement_WallyTutorialPlayer waitmovement 0 - msgbox PetalburgCity_Text_1EC1F8, MSGBOX_DEFAULT + msgbox Route102_Text_WatchMeCatchPokemon, MSGBOX_DEFAULT special StartWallyTutorialBattle waitstate - msgbox PetalburgCity_Text_1EC271, MSGBOX_DEFAULT + msgbox Route102_Text_WallyIDidIt, MSGBOX_DEFAULT applymovement 2, Common_Movement_WalkInPlaceFastestLeft, MAP_PETALBURG_CITY waitmovement 2, MAP_PETALBURG_CITY - msgbox PetalburgCity_Text_1EC297, MSGBOX_DEFAULT + msgbox Route102_Text_LetsGoBack, MSGBOX_DEFAULT closemessage clearflag FLAG_HIDE_MAP_NAME_POPUP setvar VAR_PETALBURG_CITY_STATE, 3 @@ -59,18 +59,18 @@ PetalburgCity_EventScript_1DC32E:: @ 81DC32E releaseall end -PetalburgCity_EventScript_1DC390:: @ 81DC390 +PetalburgCity_EventScript_WalkToWallyHouse:: @ 81DC390 lockall setflag FLAG_HIDE_MAP_NAME_POPUP - applymovement 5, PetalburgCity_Movement_1DC41B - applymovement EVENT_OBJ_ID_PLAYER, PetalburgCity_Movement_1DC406 + applymovement 5, PetalburgCity_Movement_WalkToWallyHouseUncle + applymovement EVENT_OBJ_ID_PLAYER, PetalburgCity_Movement_WalkToWallyHousePlayer waitmovement 0 setvar VAR_0x8004, 7 setvar VAR_0x8005, 5 opendoor VAR_0x8004, VAR_0x8005 waitdooranim - applymovement 5, PetalburgCity_Movement_1DC42D - applymovement EVENT_OBJ_ID_PLAYER, PetalburgCity_Movement_1DC418 + applymovement 5, PetalburgCity_Movement_WalkInsideHouseUncle + applymovement EVENT_OBJ_ID_PLAYER, PetalburgCity_Movement_WalkInsideHousePlayer waitmovement 0 setflag FLAG_HIDE_PETALBURG_CITY_WALLYS_UNCLE hideobjectat EVENT_OBJ_ID_PLAYER, MAP_PETALBURG_CITY @@ -84,21 +84,21 @@ PetalburgCity_EventScript_1DC390:: @ 81DC390 releaseall end -PetalburgCity_EventScript_1DC3E6:: @ 81DC3E6 +PetalburgCity_EventScript_Boy1:: @ 81DC3E6 lock faceplayer - msgbox PetalburgCity_Text_1DC985, MSGBOX_DEFAULT + msgbox PetalburgCity_Text_WaterReflection, MSGBOX_DEFAULT closemessage applymovement 3, Common_Movement_FaceOriginalDirection waitmovement 0 release end -PetalburgCity_EventScript_1DC3FD:: @ 81DC3FD - msgbox PetalburgCity_Text_1DC837, MSGBOX_NPC +PetalburgCity_EventScript_WallyAunt:: @ 81DC3FD + msgbox PetalburgCity_Text_WhereIsWally, MSGBOX_NPC end -PetalburgCity_Movement_1DC406: @ 81DC406 +PetalburgCity_Movement_WalkToWallyHousePlayer: @ 81DC406 delay_8 walk_down walk_down @@ -118,12 +118,12 @@ PetalburgCity_Movement_1DC406: @ 81DC406 walk_up step_end -PetalburgCity_Movement_1DC418: @ 81DC418 +PetalburgCity_Movement_WalkInsideHousePlayer: @ 81DC418 walk_up walk_up step_end -PetalburgCity_Movement_1DC41B: @ 81DC41B +PetalburgCity_Movement_WalkToWallyHouseUncle: @ 81DC41B delay_8 walk_down walk_down @@ -143,12 +143,12 @@ PetalburgCity_Movement_1DC41B: @ 81DC41B walk_up step_end -PetalburgCity_Movement_1DC42D: @ 81DC42D +PetalburgCity_Movement_WalkInsideHouseUncle: @ 81DC42D walk_up set_invisible step_end -PetalburgCity_Movement_1DC430: @ 81DC430 +PetalburgCity_Movement_WallyTutorialPlayer: @ 81DC430 delay_8 walk_down walk_down @@ -183,7 +183,7 @@ PetalburgCity_Movement_1DC430: @ 81DC430 walk_in_place_fastest_right step_end -PetalburgCity_Movement_1DC451: @ 81DC451 +PetalburgCity_Movement_WallyTutorialWally: @ 81DC451 delay_8 walk_down walk_down @@ -222,47 +222,47 @@ PetalburgCity_Movement_1DC451: @ 81DC451 walk_in_place_fastest_right step_end -PetalburgCity_EventScript_1DC476:: @ 81DC476 - msgbox PetalburgCity_Text_1DCAAA, MSGBOX_SIGN +PetalburgCity_EventScript_GymSign:: @ 81DC476 + msgbox PetalburgCity_Text_GymSign, MSGBOX_SIGN end -PetalburgCity_EventScript_1DC47F:: @ 81DC47F - msgbox PetalburgCity_Text_1DCAF1, MSGBOX_SIGN +PetalburgCity_EventScript_CitySign:: @ 81DC47F + msgbox PetalburgCity_Text_CitySign, MSGBOX_SIGN end -PetalburgCity_EventScript_1DC488:: @ 81DC488 - msgbox PetalburgCity_Text_1DCA30, MSGBOX_NPC +PetalburgCity_EventScript_Gentleman:: @ 81DC488 + msgbox PetalburgCity_Text_FullPartyExplanation, MSGBOX_NPC end -PetalburgCity_EventScript_1DC491:: @ 81DC491 - msgbox PetalburgCity_Text_1DCB23, MSGBOX_SIGN +PetalburgCity_EventScript_WallyHouseSign:: @ 81DC491 + msgbox PetalburgCity_Text_WallyHouseSign, MSGBOX_SIGN end -PetalburgCity_EventScript_1DC49A:: @ 81DC49A +PetalburgCity_EventScript_ShowGymToPlayer0:: @ 81DC49A lockall setvar VAR_0x8008, 0 - goto PetalburgCity_EventScript_1DC4CA + goto PetalburgCity_EventScript_ShowGymToPlayer end -PetalburgCity_EventScript_1DC4A6:: @ 81DC4A6 +PetalburgCity_EventScript_ShowGymToPlayer1:: @ 81DC4A6 lockall setvar VAR_0x8008, 1 - goto PetalburgCity_EventScript_1DC4CA + goto PetalburgCity_EventScript_ShowGymToPlayer end -PetalburgCity_EventScript_1DC4B2:: @ 81DC4B2 +PetalburgCity_EventScript_ShowGymToPlayer2:: @ 81DC4B2 lockall setvar VAR_0x8008, 2 - goto PetalburgCity_EventScript_1DC4CA + goto PetalburgCity_EventScript_ShowGymToPlayer end -PetalburgCity_EventScript_1DC4BE:: @ 81DC4BE +PetalburgCity_EventScript_ShowGymToPlayer3:: @ 81DC4BE lockall setvar VAR_0x8008, 3 - goto PetalburgCity_EventScript_1DC4CA + goto PetalburgCity_EventScript_ShowGymToPlayer end -PetalburgCity_EventScript_1DC4CA:: @ 81DC4CA +PetalburgCity_EventScript_ShowGymToPlayer:: @ 81DC4CA applymovement 8, Common_Movement_FacePlayer waitmovement 0 playbgm MUS_TSURETEK, 0 @@ -272,82 +272,82 @@ PetalburgCity_EventScript_1DC4CA:: @ 81DC4CA applymovement 8, Common_Movement_Delay48 waitmovement 0 compare VAR_0x8008, 0 - call_if_eq PetalburgCity_EventScript_1DC57F + call_if_eq PetalburgCity_EventScript_BoyApproachPlayer0 compare VAR_0x8008, 1 - call_if_eq PetalburgCity_EventScript_1DC594 + call_if_eq PetalburgCity_EventScript_BoyApproachPlayer1 compare VAR_0x8008, 2 - call_if_eq PetalburgCity_EventScript_1DC59F + call_if_eq PetalburgCity_EventScript_BoyApproachPlayer2 compare VAR_0x8008, 3 - call_if_eq PetalburgCity_EventScript_1DC5B4 - msgbox PetalburgCity_Text_1DC881, MSGBOX_DEFAULT + call_if_eq PetalburgCity_EventScript_BoyApproachPlayer3 + msgbox PetalburgCity_Text_AreYouRookieTrainer, MSGBOX_DEFAULT closemessage compare VAR_0x8008, 0 - call_if_eq PetalburgCity_EventScript_1DC5C9 + call_if_eq PetalburgCity_EventScript_LeadPlayerToGym0 compare VAR_0x8008, 1 - call_if_eq PetalburgCity_EventScript_1DC5DB + call_if_eq PetalburgCity_EventScript_LeadPlayerToGym1 compare VAR_0x8008, 2 - call_if_eq PetalburgCity_EventScript_1DC5ED + call_if_eq PetalburgCity_EventScript_LeadPlayerToGym2 compare VAR_0x8008, 3 - call_if_eq PetalburgCity_EventScript_1DC5FF - msgbox PetalburgCity_Text_1DC91B, MSGBOX_DEFAULT + call_if_eq PetalburgCity_EventScript_LeadPlayerToGym3 + msgbox PetalburgCity_Text_ThisIsPetalburgGym, MSGBOX_DEFAULT applymovement 8, Common_Movement_WalkInPlaceFastestRight applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceFastestRight waitmovement 0 - msgbox PetalburgCity_Text_1DC93E, MSGBOX_DEFAULT + msgbox PetalburgCity_Text_ThisIsGymSign, MSGBOX_DEFAULT closemessage - applymovement 8, PetalburgCity_Movement_1DC658 + applymovement 8, PetalburgCity_Movement_BoyWalkAway waitmovement 0 fadedefaultbgm releaseall end -PetalburgCity_EventScript_1DC57F:: @ 81DC57F - applymovement 8, PetalburgCity_Movement_1DC615 +PetalburgCity_EventScript_BoyApproachPlayer0:: @ 81DC57F + applymovement 8, PetalburgCity_Movement_BoyApproachPlayer0 waitmovement 0 applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceFastestDown waitmovement 0 return -PetalburgCity_EventScript_1DC594:: @ 81DC594 - applymovement 8, PetalburgCity_Movement_1DC61A +PetalburgCity_EventScript_BoyApproachPlayer1:: @ 81DC594 + applymovement 8, PetalburgCity_Movement_BoyApproachPlayer1 waitmovement 0 return -PetalburgCity_EventScript_1DC59F:: @ 81DC59F - applymovement 8, PetalburgCity_Movement_1DC61D +PetalburgCity_EventScript_BoyApproachPlayer2:: @ 81DC59F + applymovement 8, PetalburgCity_Movement_BoyApproachPlayer2 waitmovement 0 applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceFastestUp waitmovement 0 return -PetalburgCity_EventScript_1DC5B4:: @ 81DC5B4 - applymovement 8, PetalburgCity_Movement_1DC622 +PetalburgCity_EventScript_BoyApproachPlayer3:: @ 81DC5B4 + applymovement 8, PetalburgCity_Movement_BoyApproachPlayer3 waitmovement 0 applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceFastestUp waitmovement 0 return -PetalburgCity_EventScript_1DC5C9:: @ 81DC5C9 - applymovement 8, PetalburgCity_Movement_1DC628 - applymovement EVENT_OBJ_ID_PLAYER, PetalburgCity_Movement_1DC665 +PetalburgCity_EventScript_LeadPlayerToGym0:: @ 81DC5C9 + applymovement 8, PetalburgCity_Movement_BoyWalkToGym0 + applymovement EVENT_OBJ_ID_PLAYER, PetalburgCity_Movement_PlayerWalkToGym0 waitmovement 0 return -PetalburgCity_EventScript_1DC5DB:: @ 81DC5DB - applymovement 8, PetalburgCity_Movement_1DC633 - applymovement EVENT_OBJ_ID_PLAYER, PetalburgCity_Movement_1DC66F +PetalburgCity_EventScript_LeadPlayerToGym1:: @ 81DC5DB + applymovement 8, PetalburgCity_Movement_BoyWalkToGym1 + applymovement EVENT_OBJ_ID_PLAYER, PetalburgCity_Movement_PlayerWalkToGym1 waitmovement 0 return -PetalburgCity_EventScript_1DC5ED:: @ 81DC5ED - applymovement 8, PetalburgCity_Movement_1DC641 - applymovement EVENT_OBJ_ID_PLAYER, PetalburgCity_Movement_1DC67C +PetalburgCity_EventScript_LeadPlayerToGym2:: @ 81DC5ED + applymovement 8, PetalburgCity_Movement_BoyWalkToGym2 + applymovement EVENT_OBJ_ID_PLAYER, PetalburgCity_Movement_PlayerWalkToGym2 waitmovement 0 return -PetalburgCity_EventScript_1DC5FF:: @ 81DC5FF - applymovement 8, PetalburgCity_Movement_1DC64C - applymovement EVENT_OBJ_ID_PLAYER, PetalburgCity_Movement_1DC686 +PetalburgCity_EventScript_LeadPlayerToGym3:: @ 81DC5FF + applymovement 8, PetalburgCity_Movement_BoyWalkToGym3 + applymovement EVENT_OBJ_ID_PLAYER, PetalburgCity_Movement_PlayerWalkToGym3 waitmovement 0 return @@ -357,26 +357,26 @@ PetalburgCity_Movement_1DC611:: @ 81DC611 delay_16 step_end -PetalburgCity_Movement_1DC615: @ 81DC615 +PetalburgCity_Movement_BoyApproachPlayer0: @ 81DC615 walk_right walk_right walk_right walk_in_place_fastest_up step_end -PetalburgCity_Movement_1DC61A: @ 81DC61A +PetalburgCity_Movement_BoyApproachPlayer1: @ 81DC61A walk_right walk_right step_end -PetalburgCity_Movement_1DC61D: @ 81DC61D +PetalburgCity_Movement_BoyApproachPlayer2: @ 81DC61D walk_right walk_right walk_right walk_in_place_fastest_down step_end -PetalburgCity_Movement_1DC622: @ 81DC622 +PetalburgCity_Movement_BoyApproachPlayer3: @ 81DC622 walk_down walk_right walk_right @@ -384,7 +384,7 @@ PetalburgCity_Movement_1DC622: @ 81DC622 walk_in_place_fastest_down step_end -PetalburgCity_Movement_1DC628: @ 81DC628 +PetalburgCity_Movement_BoyWalkToGym0: @ 81DC628 walk_right walk_right walk_right @@ -397,7 +397,7 @@ PetalburgCity_Movement_1DC628: @ 81DC628 walk_in_place_fastest_up step_end -PetalburgCity_Movement_1DC633: @ 81DC633 +PetalburgCity_Movement_BoyWalkToGym1: @ 81DC633 walk_down walk_right walk_right @@ -413,7 +413,7 @@ PetalburgCity_Movement_1DC633: @ 81DC633 walk_in_place_fastest_up step_end -PetalburgCity_Movement_1DC641: @ 81DC641 +PetalburgCity_Movement_BoyWalkToGym2: @ 81DC641 walk_right walk_right walk_right @@ -426,7 +426,7 @@ PetalburgCity_Movement_1DC641: @ 81DC641 walk_in_place_fastest_up step_end -PetalburgCity_Movement_1DC64C: @ 81DC64C +PetalburgCity_Movement_BoyWalkToGym3: @ 81DC64C walk_right walk_right walk_right @@ -440,7 +440,7 @@ PetalburgCity_Movement_1DC64C: @ 81DC64C walk_in_place_fastest_up step_end -PetalburgCity_Movement_1DC658: @ 81DC658 +PetalburgCity_Movement_BoyWalkAway: @ 81DC658 walk_down walk_left walk_left @@ -455,7 +455,7 @@ PetalburgCity_Movement_1DC658: @ 81DC658 walk_left step_end -PetalburgCity_Movement_1DC665: @ 81DC665 +PetalburgCity_Movement_PlayerWalkToGym0: @ 81DC665 walk_down walk_right walk_right @@ -467,7 +467,7 @@ PetalburgCity_Movement_1DC665: @ 81DC665 walk_up step_end -PetalburgCity_Movement_1DC66F: @ 81DC66F +PetalburgCity_Movement_PlayerWalkToGym1: @ 81DC66F delay_16 delay_16 walk_down @@ -482,7 +482,7 @@ PetalburgCity_Movement_1DC66F: @ 81DC66F walk_up step_end -PetalburgCity_Movement_1DC67C: @ 81DC67C +PetalburgCity_Movement_PlayerWalkToGym2: @ 81DC67C walk_up walk_right walk_right @@ -494,7 +494,7 @@ PetalburgCity_Movement_1DC67C: @ 81DC67C walk_up step_end -PetalburgCity_Movement_1DC686: @ 81DC686 +PetalburgCity_Movement_PlayerWalkToGym3: @ 81DC686 walk_up walk_right walk_right @@ -507,115 +507,115 @@ PetalburgCity_Movement_1DC686: @ 81DC686 walk_up step_end -PetalburgCity_EventScript_1DC691:: @ 81DC691 +PetalburgCity_EventScript_Scott0:: @ 81DC691 lockall addobject 9 setvar VAR_0x8008, 0 setobjectxy 9, 13, 10 - goto PetalburgCity_EventScript_1DC6E9 + goto PetalburgCity_EventScript_Scott end -PetalburgCity_EventScript_1DC6A7:: @ 81DC6A7 +PetalburgCity_EventScript_Scott1:: @ 81DC6A7 lockall addobject 9 setvar VAR_0x8008, 1 setobjectxy 9, 13, 11 - goto PetalburgCity_EventScript_1DC6E9 + goto PetalburgCity_EventScript_Scott end -PetalburgCity_EventScript_1DC6BD:: @ 81DC6BD +PetalburgCity_EventScript_Scott2:: @ 81DC6BD lockall addobject 9 setvar VAR_0x8008, 2 setobjectxy 9, 13, 12 - goto PetalburgCity_EventScript_1DC6E9 + goto PetalburgCity_EventScript_Scott end -PetalburgCity_EventScript_1DC6D3:: @ 81DC6D3 +PetalburgCity_EventScript_Scott3:: @ 81DC6D3 lockall addobject 9 setvar VAR_0x8008, 3 setobjectxy 9, 13, 13 - goto PetalburgCity_EventScript_1DC6E9 + goto PetalburgCity_EventScript_Scott end -PetalburgCity_EventScript_1DC6E9:: @ 81DC6E9 - applymovement 9, PetalburgCity_Movement_1DC7D6 +PetalburgCity_EventScript_Scott:: @ 81DC6E9 + applymovement 9, PetalburgCity_Movement_ScottStartWalkLeft waitmovement 0 playse SE_PIN applymovement 9, Common_Movement_ExclamationMark waitmovement 0 applymovement 9, Common_Movement_Delay48 waitmovement 0 - applymovement 9, PetalburgCity_Movement_1DC7DB + applymovement 9, PetalburgCity_Movement_ScottApproachPlayer waitmovement 0 applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceFastestRight waitmovement 0 setvar VAR_SCOTT_STATE, 1 - msgbox PetalburgCity_Text_1DCB31, MSGBOX_DEFAULT + msgbox PetalburgCity_Text_AreYouATrainer, MSGBOX_DEFAULT closemessage applymovement 9, Common_Movement_WalkInPlaceFastestRight waitmovement 0 delay 30 - msgbox PetalburgCity_Text_1DCB82, MSGBOX_DEFAULT + msgbox PetalburgCity_Text_WellMaybeNot, MSGBOX_DEFAULT closemessage applymovement 9, Common_Movement_WalkInPlaceFastestLeft waitmovement 0 delay 30 - msgbox PetalburgCity_Text_1DCC09, MSGBOX_DEFAULT + msgbox PetalburgCity_Text_ImLookingForTalentedTrainers, MSGBOX_DEFAULT closemessage compare VAR_0x8008, 0 - call_if_eq PetalburgCity_EventScript_1DC78E + call_if_eq PetalburgCity_EventScript_ScottExit0 compare VAR_0x8008, 1 - call_if_eq PetalburgCity_EventScript_1DC7A0 + call_if_eq PetalburgCity_EventScript_ScottExit1 compare VAR_0x8008, 2 - call_if_eq PetalburgCity_EventScript_1DC7B2 + call_if_eq PetalburgCity_EventScript_ScottExit2 compare VAR_0x8008, 3 - call_if_eq PetalburgCity_EventScript_1DC7C4 + call_if_eq PetalburgCity_EventScript_ScottExit3 setvar VAR_SCOTT_PETALBURG_ENCOUNTER, 1 removeobject 9 releaseall end -PetalburgCity_EventScript_1DC78E:: @ 81DC78E - applymovement EVENT_OBJ_ID_PLAYER, PetalburgCity_Movement_1DC7EE - applymovement 9, PetalburgCity_Movement_1DC7E0 +PetalburgCity_EventScript_ScottExit0:: @ 81DC78E + applymovement EVENT_OBJ_ID_PLAYER, PetalburgCity_Movement_PlayerWatchScottExit0 + applymovement 9, PetalburgCity_Movement_ScottExit0 waitmovement 0 return -PetalburgCity_EventScript_1DC7A0:: @ 81DC7A0 - applymovement EVENT_OBJ_ID_PLAYER, PetalburgCity_Movement_1DC802 - applymovement 9, PetalburgCity_Movement_1DC7F5 +PetalburgCity_EventScript_ScottExit1:: @ 81DC7A0 + applymovement EVENT_OBJ_ID_PLAYER, PetalburgCity_Movement_PlayerWatchScottExit1 + applymovement 9, PetalburgCity_Movement_ScottExit1 waitmovement 0 return -PetalburgCity_EventScript_1DC7B2:: @ 81DC7B2 - applymovement EVENT_OBJ_ID_PLAYER, PetalburgCity_Movement_1DC815 - applymovement 9, PetalburgCity_Movement_1DC808 +PetalburgCity_EventScript_ScottExit2:: @ 81DC7B2 + applymovement EVENT_OBJ_ID_PLAYER, PetalburgCity_Movement_PlayerWatchScottExit2 + applymovement 9, PetalburgCity_Movement_ScottExit2 waitmovement 0 return -PetalburgCity_EventScript_1DC7C4:: @ 81DC7C4 - applymovement EVENT_OBJ_ID_PLAYER, PetalburgCity_Movement_1DC828 - applymovement 9, PetalburgCity_Movement_1DC81B +PetalburgCity_EventScript_ScottExit3:: @ 81DC7C4 + applymovement EVENT_OBJ_ID_PLAYER, PetalburgCity_Movement_PlayerWatchScottExit3 + applymovement 9, PetalburgCity_Movement_ScottExit3 waitmovement 0 return -PetalburgCity_Movement_1DC7D6: @ 81DC7D6 +PetalburgCity_Movement_ScottStartWalkLeft: @ 81DC7D6 walk_left walk_left walk_left walk_left step_end -PetalburgCity_Movement_1DC7DB: @ 81DC7DB +PetalburgCity_Movement_ScottApproachPlayer: @ 81DC7DB walk_left walk_left walk_left walk_left step_end -PetalburgCity_Movement_1DC7E0: @ 81DC7E0 +PetalburgCity_Movement_ScottExit0: @ 81DC7E0 walk_down walk_down walk_left @@ -631,7 +631,7 @@ PetalburgCity_Movement_1DC7E0: @ 81DC7E0 walk_left step_end -PetalburgCity_Movement_1DC7EE: @ 81DC7EE +PetalburgCity_Movement_PlayerWatchScottExit0: @ 81DC7EE delay_16 walk_in_place_fastest_down delay_16 @@ -640,7 +640,7 @@ PetalburgCity_Movement_1DC7EE: @ 81DC7EE walk_in_place_fastest_left step_end -PetalburgCity_Movement_1DC7F5: @ 81DC7F5 +PetalburgCity_Movement_ScottExit1: @ 81DC7F5 walk_down walk_left walk_left @@ -655,7 +655,7 @@ PetalburgCity_Movement_1DC7F5: @ 81DC7F5 walk_left step_end -PetalburgCity_Movement_1DC802: @ 81DC802 +PetalburgCity_Movement_PlayerWatchScottExit1: @ 81DC802 delay_16 walk_in_place_fastest_down delay_16 @@ -663,7 +663,7 @@ PetalburgCity_Movement_1DC802: @ 81DC802 walk_in_place_fastest_left step_end -PetalburgCity_Movement_1DC808: @ 81DC808 +PetalburgCity_Movement_ScottExit2: @ 81DC808 walk_down walk_left walk_left @@ -678,7 +678,7 @@ PetalburgCity_Movement_1DC808: @ 81DC808 walk_left step_end -PetalburgCity_Movement_1DC815: @ 81DC815 +PetalburgCity_Movement_PlayerWatchScottExit2: @ 81DC815 delay_16 walk_in_place_fastest_down delay_16 @@ -686,7 +686,7 @@ PetalburgCity_Movement_1DC815: @ 81DC815 walk_in_place_fastest_left step_end -PetalburgCity_Movement_1DC81B: @ 81DC81B +PetalburgCity_Movement_ScottExit3: @ 81DC81B walk_up walk_left walk_left @@ -701,7 +701,7 @@ PetalburgCity_Movement_1DC81B: @ 81DC81B walk_left step_end -PetalburgCity_Movement_1DC828: @ 81DC828 +PetalburgCity_Movement_PlayerWatchScottExit3: @ 81DC828 delay_16 walk_in_place_fastest_up delay_16 @@ -709,16 +709,16 @@ PetalburgCity_Movement_1DC828: @ 81DC828 walk_in_place_fastest_left step_end -PetalburgCity_EventScript_1DC82E:: @ 81DC82E - msgbox PetalburgCity_Text_1DC881, MSGBOX_NPC +PetalburgCity_EventScript_Boy2:: @ 81DC82E + msgbox PetalburgCity_Text_AreYouRookieTrainer, MSGBOX_NPC end -PetalburgCity_Text_1DC837: @ 81DC837 +PetalburgCity_Text_WhereIsWally: @ 81DC837 .string "Where has our WALLY gone?\p" .string "We have to leave for VERDANTURF TOWN\n" .string "very soon…$" -PetalburgCity_Text_1DC881: @ 81DC881 +PetalburgCity_Text_AreYouRookieTrainer: @ 81DC881 .string "Hiya! Are you maybe…\n" .string "A rookie TRAINER?\p" .string "Do you know what POKéMON TRAINERS\n" @@ -726,51 +726,51 @@ PetalburgCity_Text_1DC881: @ 81DC881 .string "They first check what kind of GYM\n" .string "is in the town.$" -PetalburgCity_Text_1DC91B: @ 81DC91B +PetalburgCity_Text_ThisIsPetalburgGym: @ 81DC91B .string "See? This is PETALBURG CITY's GYM.$" -PetalburgCity_Text_1DC93E: @ 81DC93E +PetalburgCity_Text_ThisIsGymSign: @ 81DC93E .string "This is the GYM's sign. Look for it\n" .string "whenever you're looking for a GYM.$" -PetalburgCity_Text_1DC985: @ 81DC985 +PetalburgCity_Text_WaterReflection: @ 81DC985 .string "My face is reflected in the water.\p" .string "It's a shining grin full of hope…\p" .string "Or it could be a look of somber silence\n" .string "struggling with fear…\p" .string "What do you see reflected in your face?$" -PetalburgCity_Text_1DCA30: @ 81DCA30 +PetalburgCity_Text_FullPartyExplanation: @ 81DCA30 .string "Let's say you have six POKéMON.\n" .string "If you catch another one…\p" .string "It is automatically sent to a STORAGE\n" .string "BOX over a PC connection.$" -PetalburgCity_Text_1DCAAA: @ 81DCAAA +PetalburgCity_Text_GymSign: @ 81DCAAA .string "PETALBURG CITY POKéMON GYM\n" .string "LEADER: NORMAN\l" .string "“A man in pursuit of power!”$" -PetalburgCity_Text_1DCAF1: @ 81DCAF1 +PetalburgCity_Text_CitySign: @ 81DCAF1 .string "PETALBURG CITY\n" .string "“Where people mingle with nature.”$" -PetalburgCity_Text_1DCB23: @ 81DCB23 +PetalburgCity_Text_WallyHouseSign: @ 81DCB23 .string "WALLY'S HOUSE$" -PetalburgCity_Text_1DCB31: @ 81DCB31 +PetalburgCity_Text_AreYouATrainer: @ 81DCB31 .string "Excuse me!\p" .string "Let me guess, from the way you're\n" .string "dressed, are you a POKéMON TRAINER?$" -PetalburgCity_Text_1DCB82: @ 81DCB82 +PetalburgCity_Text_WellMaybeNot: @ 81DCB82 .string "… … … … … …\p" .string "Well, maybe not.\n" .string "Your clothes aren't all that dirty.\p" .string "You're either a rookie TRAINER,\n" .string "or maybe you're just an ordinary kid.$" -PetalburgCity_Text_1DCC09: @ 81DCC09 +PetalburgCity_Text_ImLookingForTalentedTrainers: @ 81DCC09 .string "I'm roaming the land in search of\n" .string "talented TRAINERS.\p" .string "I'm sorry to have taken your time.$" diff --git a/data/maps/Route102/scripts.inc b/data/maps/Route102/scripts.inc index 58adf4456b..5e7f48c934 100644 --- a/data/maps/Route102/scripts.inc +++ b/data/maps/Route102/scripts.inc @@ -75,7 +75,7 @@ Route102_EventScript_1EC1E1:: @ 81EC1E1 msgbox Route102_Text_2947DB, MSGBOX_AUTOCLOSE end -PetalburgCity_Text_1EC1F8: @ 81EC1F8 +Route102_Text_WatchMeCatchPokemon: @ 81EC1F8 .string "WALLY: {PLAYER}…\n" .string "POKéMON hide in tall grass like this,\l" .string "don't they?\p" @@ -83,11 +83,11 @@ PetalburgCity_Text_1EC1F8: @ 81EC1F8 .string "catch one properly.\p" .string "…Whoa!$" -PetalburgCity_Text_1EC271: @ 81EC271 +Route102_Text_WallyIDidIt: @ 81EC271 .string "WALLY: I did it… It's my…\n" .string "My POKéMON!$" -PetalburgCity_Text_1EC297: @ 81EC297 +Route102_Text_LetsGoBack: @ 81EC297 .string "{PLAYER}, thank you!\n" .string "Let's go back to the GYM!$" From 0db188b487d7cc6c3e4164dd6d8e94a320deceff Mon Sep 17 00:00:00 2001 From: GriffinR Date: Sun, 20 Oct 2019 02:31:51 -0400 Subject: [PATCH 02/46] Clean up berry_tree.inc and misc adjacent documentation --- data/maps/BattleFrontier_OutsideEast/map.json | 2 +- .../BattleFrontier_OutsideEast/scripts.inc | 22 ++++----- data/scripts/berry_tree.inc | 30 ++++++------ data/specials.inc | 4 +- include/item_use.h | 2 +- include/tv.h | 14 +++--- src/battle_setup.c | 48 +++++++++---------- src/berry_blender.c | 2 +- src/frontier_util.c | 4 +- src/item_menu.c | 2 +- src/item_use.c | 40 ++++++++-------- src/roulette.c | 2 +- src/slot_machine.c | 2 +- src/tv.c | 14 +++--- 14 files changed, 95 insertions(+), 93 deletions(-) diff --git a/data/maps/BattleFrontier_OutsideEast/map.json b/data/maps/BattleFrontier_OutsideEast/map.json index 341b203218..e45e4f13bc 100644 --- a/data/maps/BattleFrontier_OutsideEast/map.json +++ b/data/maps/BattleFrontier_OutsideEast/map.json @@ -199,7 +199,7 @@ "movement_range_y": 1, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "BattleFrontier_OutsideEast_EventScript_242CEA", + "script": "BattleFrontier_OutsideEast_EventScript_Sudowoodo", "flag": "FLAG_HIDE_BATTLE_FRONTIER_SUDOWOODO" }, { diff --git a/data/maps/BattleFrontier_OutsideEast/scripts.inc b/data/maps/BattleFrontier_OutsideEast/scripts.inc index 5170716d7f..ab968b6dd6 100644 --- a/data/maps/BattleFrontier_OutsideEast/scripts.inc +++ b/data/maps/BattleFrontier_OutsideEast/scripts.inc @@ -102,24 +102,24 @@ BattleFrontier_OutsideEast_EventScript_242CE1:: @ 8242CE1 msgbox BattleFrontier_OutsideEast_Text_243230, MSGBOX_NPC end -BattleFrontier_OutsideEast_EventScript_242CEA:: @ 8242CEA +BattleFrontier_OutsideEast_EventScript_Sudowoodo:: @ 8242CEA lock faceplayer waitse playse 269 - applymovement 14, BattleFrontier_OutsideEast_Movement_242D69 + applymovement 14, BattleFrontier_OutsideEast_Movement_SudowoodoShake waitmovement 0 release end -BattleFrontier_OutsideEast_EventScript_242CFC:: @ 8242CFC +BattleFrontier_OutsideEast_EventScript_WaterSudowoodo:: @ 8242CFC lock faceplayer special DoWateringBerryTreeAnim waitstate waitse - playse 269 - applymovement 14, BattleFrontier_OutsideEast_Movement_242D69 + playse SE_USSOKI + applymovement 14, BattleFrontier_OutsideEast_Movement_SudowoodoShake waitmovement 0 msgbox gText_Sudowoodo_Attacked, MSGBOX_DEFAULT closemessage @@ -127,28 +127,28 @@ BattleFrontier_OutsideEast_EventScript_242CFC:: @ 8242CFC playmoncry SPECIES_SUDOWOODO, 2 delay 40 waitmoncry - setvar VAR_LAST_TALKED, 14 + setvar VAR_LAST_TALKED, 14 @ Sudowoodo object event id setwildbattle SPECIES_SUDOWOODO, 40, ITEM_NONE setflag FLAG_SYS_CTRL_OBJ_DELETE dowildbattle clearflag FLAG_SYS_CTRL_OBJ_DELETE specialvar VAR_RESULT, GetBattleOutcome compare VAR_RESULT, B_OUTCOME_WON - goto_if_eq BattleFrontier_OutsideEast_EventScript_242D60 + goto_if_eq BattleFrontier_OutsideEast_EventScript_RemoveSudowoodo compare VAR_RESULT, B_OUTCOME_RAN - goto_if_eq BattleFrontier_OutsideEast_EventScript_242D60 + goto_if_eq BattleFrontier_OutsideEast_EventScript_RemoveSudowoodo compare VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED - goto_if_eq BattleFrontier_OutsideEast_EventScript_242D60 + goto_if_eq BattleFrontier_OutsideEast_EventScript_RemoveSudowoodo setflag FLAG_DEFEATED_SUDOWOODO release end -BattleFrontier_OutsideEast_EventScript_242D60:: @ 8242D60 +BattleFrontier_OutsideEast_EventScript_RemoveSudowoodo:: @ 8242D60 setflag FLAG_DEFEATED_SUDOWOODO goto Common_EventScript_RemoveStaticPokemon end -BattleFrontier_OutsideEast_Movement_242D69: @ 8242D69 +BattleFrontier_OutsideEast_Movement_SudowoodoShake: @ 8242D69 face_right delay_8 face_down diff --git a/data/scripts/berry_tree.inc b/data/scripts/berry_tree.inc index 63d1f0bcc9..6de5ccf479 100644 --- a/data/scripts/berry_tree.inc +++ b/data/scripts/berry_tree.inc @@ -1,16 +1,16 @@ BerryTreeScript:: @ 82742F9 special EventObjectInteractionGetBerryTreeData switch VAR_0x8004 - case 255, BerryTree_EventScript_27434F - case 0, BerryTree_EventScript_CheckSoil - case 1, BerryTree_EventScript_CheckBerryStage1 - case 2, BerryTree_EventScript_CheckBerryStage2 - case 3, BerryTree_EventScript_CheckBerryStage3 - case 4, BerryTree_EventScript_CheckBerryStage4 - case 5, BerryTree_EventScript_CheckBerryFullyGrown + case BERRY_STAGE_SPARKLING, BerryTree_EventScript_Sparkling + case BERRY_STAGE_NO_BERRY, BerryTree_EventScript_CheckSoil + case BERRY_STAGE_PLANTED, BerryTree_EventScript_CheckBerryStage1 + case BERRY_STAGE_SPROUTED, BerryTree_EventScript_CheckBerryStage2 + case BERRY_STAGE_TALLER, BerryTree_EventScript_CheckBerryStage3 + case BERRY_STAGE_FLOWERING, BerryTree_EventScript_CheckBerryStage4 + case BERRY_STAGE_BERRIES, BerryTree_EventScript_CheckBerryFullyGrown end -BerryTree_EventScript_27434F:: @ 827434F +BerryTree_EventScript_Sparkling:: @ 827434F lockall message BerryTree_Text_ExclamationPoint waitmessage @@ -22,7 +22,7 @@ BerryTree_EventScript_CheckSoil:: @ 8274359 lock faceplayer specialvar VAR_RESULT, PlayerHasBerries - compare VAR_RESULT, 1 + compare VAR_RESULT, TRUE goto_if_eq BerryTree_EventScript_WantToPlant message BerryTree_Text_ItsSoftLoamySoil waitmessage @@ -85,6 +85,8 @@ BerryTree_EventScript_CheckBerryStage4:: @ 82743E1 waitbuttonpress goto BerryTree_EventScript_WantToWater +@ VAR_0x8005 here is the number of times watered +@ Buffered by EventObjectInteractionGetBerryTreeData BerryTree_EventScript_GetCareAdverb:: @ 82743F6 compare VAR_0x8005, 0 goto_if_eq BerryTree_EventScript_SetAdverbPoor @@ -101,6 +103,7 @@ BerryTree_EventScript_SetAdverbPoor:: @ 827441A bufferstring 1, BerryTree_Text_CareAdverbPoor return +@ VAR_0x8006 here is the number of berries BerryTree_EventScript_CheckBerryFullyGrown:: @ 8274421 buffernumberstring 1, VAR_0x8006 lock @@ -116,7 +119,7 @@ BerryTree_EventScript_PickBerry:: @ 8274448 special EventObjectInteractionPickBerryTree compare VAR_0x8004, 0 goto_if_eq BerryTree_EventScript_BerryPocketFull - special sub_80EED34 + special IncrementDailyPickedBerries special EventObjectInteractionRemoveBerryTree message BerryTree_Text_PickedTheBerry playfanfare MUS_ME_KINOMI @@ -143,7 +146,7 @@ BerryTree_EventScript_CancelPickingBerry:: @ 8274479 release end -BerryTree_EventScript_274482:: @ 8274482 +BerryTree_EventScript_ItemUsePlantBerry:: @ 8274482 lockall special EventObjectInteractionGetBerryTreeData call BerryTree_EventScript_PlantBerry @@ -165,10 +168,9 @@ BerryTree_EventScript_DontWater:: @ 82744BE releaseall end -BerryTree_EventScript_2744C0:: @ 82744C0 +BerryTree_EventScript_ItemUseWailmerPail:: @ 82744C0 special EventObjectInteractionGetBerryTreeData lockall - BerryTree_EventScript_WaterBerry:: @ 82744C4 special EventObjectInteractionGetBerryName message BerryTree_Text_WateredTheBerry @@ -185,7 +187,7 @@ BerryTree_EventScript_WaterBerry:: @ 82744C4 BerryTree_EventScript_PlantBerry:: @ 82744DD special EventObjectInteractionPlantBerryTree incrementgamestat GAME_STAT_PLANTED_BERRIES - special sub_80EED10 + special IncrementDailyPlantedBerries special EventObjectInteractionGetBerryCountString message BerryTree_Text_PlantedOneBerry waitmessage diff --git a/data/specials.inc b/data/specials.inc index fe5d4bf0bc..5ab98e24d7 100644 --- a/data/specials.inc +++ b/data/specials.inc @@ -358,8 +358,8 @@ gSpecials:: @ 81DBA64 def_special sub_80EE7C0 def_special ShowGlassWorkshopMenu def_special PutFanClubSpecialOnTheAir - def_special sub_80EED10 - def_special sub_80EED34 + def_special IncrementDailyPlantedBerries + def_special IncrementDailyPickedBerries def_special InitSecretBaseVars def_special SetSecretBaseSecretsTvFlags_SandOrnament def_special sub_80EB300 diff --git a/include/item_use.h b/include/item_use.h index 37343f6e7a..5ce47a9bc3 100644 --- a/include/item_use.h +++ b/include/item_use.h @@ -50,6 +50,6 @@ void ItemUseOutOfBattle_EnigmaBerry(u8); void ItemUseInBattle_EnigmaBerry(u8); void ItemUseOutOfBattle_CannotUse(u8); u8 CheckIfItemIsTMHMOrEvolutionStone(u16 itemId); -void sub_80FDD10(u8); +void ItemUseOutOfBattle_Berry(u8); #endif // GUARD_ITEM_USE_H diff --git a/include/tv.h b/include/tv.h index ec7ac1e890..42640fb957 100644 --- a/include/tv.h +++ b/include/tv.h @@ -15,9 +15,9 @@ void DoTVShowInSearchOfTrainers(void); void sub_80EDCE8(void); void sub_80EE2CC(void); void sub_80EE72C(void); -void sub_80EED10(void); -void sub_80EED34(void); -void sub_80EED60(u16 delta); +void IncrementDailyPlantedBerries(void); +void IncrementDailyPickedBerries(void); +void IncrementDailyBattlePoints(u16 delta); void sub_80F01B8(void); void ReceiveTvShowsData(void *src, u32 size, u8 masterIdx); void sub_80EE4DC(struct Pokemon *pokemon, u8 ribbonMonDataIdx); @@ -36,10 +36,10 @@ void sub_80EDA80(void); void ReceivePokeNewsData(void *src, u32 size, u8 masterIdx); void sub_80F0BB8(void); void sub_80ED950(bool8 flag); -void sub_80EEC80(void); -void sub_80EECA4(void); -void sub_80EECC8(void); -void sub_80EECEC(void); +void IncrementDailySlotsUses(void); +void IncrementDailyRouletteUses(void); +void IncrementDailyWildBattles(void); +void IncrementDailyBerryBlender(void); void sub_80F1208(TVShow *shows); void sub_80EE44C(u8 nMonsCaught, u8 nPkblkUsed); void sub_80F14F8(TVShow *shows); diff --git a/src/battle_setup.c b/src/battle_setup.c index 3c9de6b790..f166c7375c 100644 --- a/src/battle_setup.c +++ b/src/battle_setup.c @@ -72,8 +72,8 @@ static void CB2_EndWildBattle(void); static void CB2_EndScriptedWildBattle(void); static u8 GetWildBattleTransition(void); static u8 GetTrainerBattleTransition(void); -static void sub_80B1218(void); -static void sub_80B1234(void); +static void TryUpdateGymLeaderRematchFromWild(void); +static void TryUpdateGymLeaderRematchFromTrainer(void); static void CB2_GiveStarter(void); static void CB2_StartFirstBattle(void); static void CB2_EndFirstBattle(void); @@ -395,8 +395,8 @@ static void DoStandardWildBattle(void) CreateBattleStartTask(GetWildBattleTransition(), 0); IncrementGameStat(GAME_STAT_TOTAL_BATTLES); IncrementGameStat(GAME_STAT_WILD_BATTLES); - sub_80EECC8(); - sub_80B1218(); + IncrementDailyWildBattles(); + TryUpdateGymLeaderRematchFromWild(); } void BattleSetup_StartRoamerBattle(void) @@ -409,8 +409,8 @@ void BattleSetup_StartRoamerBattle(void) CreateBattleStartTask(GetWildBattleTransition(), 0); IncrementGameStat(GAME_STAT_TOTAL_BATTLES); IncrementGameStat(GAME_STAT_WILD_BATTLES); - sub_80EECC8(); - sub_80B1218(); + IncrementDailyWildBattles(); + TryUpdateGymLeaderRematchFromWild(); } static void DoSafariBattle(void) @@ -433,8 +433,8 @@ static void DoBattlePikeWildBattle(void) CreateBattleStartTask(GetWildBattleTransition(), 0); IncrementGameStat(GAME_STAT_TOTAL_BATTLES); IncrementGameStat(GAME_STAT_WILD_BATTLES); - sub_80EECC8(); - sub_80B1218(); + IncrementDailyWildBattles(); + TryUpdateGymLeaderRematchFromWild(); } static void DoTrainerBattle(void) @@ -442,7 +442,7 @@ static void DoTrainerBattle(void) CreateBattleStartTask(GetTrainerBattleTransition(), 0); IncrementGameStat(GAME_STAT_TOTAL_BATTLES); IncrementGameStat(GAME_STAT_TRAINER_BATTLES); - sub_80B1234(); + TryUpdateGymLeaderRematchFromTrainer(); } static void sub_80B0828(void) @@ -454,7 +454,7 @@ static void sub_80B0828(void) IncrementGameStat(GAME_STAT_TOTAL_BATTLES); IncrementGameStat(GAME_STAT_TRAINER_BATTLES); - sub_80B1234(); + TryUpdateGymLeaderRematchFromTrainer(); } // Initiates battle where Wally catches Ralts @@ -475,8 +475,8 @@ void BattleSetup_StartScriptedWildBattle(void) CreateBattleStartTask(GetWildBattleTransition(), 0); IncrementGameStat(GAME_STAT_TOTAL_BATTLES); IncrementGameStat(GAME_STAT_WILD_BATTLES); - sub_80EECC8(); - sub_80B1218(); + IncrementDailyWildBattles(); + TryUpdateGymLeaderRematchFromWild(); } void BattleSetup_StartLatiBattle(void) @@ -487,8 +487,8 @@ void BattleSetup_StartLatiBattle(void) CreateBattleStartTask(GetWildBattleTransition(), 0); IncrementGameStat(GAME_STAT_TOTAL_BATTLES); IncrementGameStat(GAME_STAT_WILD_BATTLES); - sub_80EECC8(); - sub_80B1218(); + IncrementDailyWildBattles(); + TryUpdateGymLeaderRematchFromWild(); } void BattleSetup_StartLegendaryBattle(void) @@ -526,8 +526,8 @@ void BattleSetup_StartLegendaryBattle(void) IncrementGameStat(GAME_STAT_TOTAL_BATTLES); IncrementGameStat(GAME_STAT_WILD_BATTLES); - sub_80EECC8(); - sub_80B1218(); + IncrementDailyWildBattles(); + TryUpdateGymLeaderRematchFromWild(); } void StartGroudonKyogreBattle(void) @@ -543,8 +543,8 @@ void StartGroudonKyogreBattle(void) IncrementGameStat(GAME_STAT_TOTAL_BATTLES); IncrementGameStat(GAME_STAT_WILD_BATTLES); - sub_80EECC8(); - sub_80B1218(); + IncrementDailyWildBattles(); + TryUpdateGymLeaderRematchFromWild(); } void StartRegiBattle(void) @@ -576,8 +576,8 @@ void StartRegiBattle(void) IncrementGameStat(GAME_STAT_TOTAL_BATTLES); IncrementGameStat(GAME_STAT_WILD_BATTLES); - sub_80EECC8(); - sub_80B1218(); + IncrementDailyWildBattles(); + TryUpdateGymLeaderRematchFromWild(); } static void CB2_EndWildBattle(void) @@ -919,8 +919,8 @@ static void CB2_StartFirstBattle(void) ClearPoisonStepCounter(); IncrementGameStat(GAME_STAT_TOTAL_BATTLES); IncrementGameStat(GAME_STAT_WILD_BATTLES); - sub_80EECC8(); - sub_80B1218(); + IncrementDailyWildBattles(); + TryUpdateGymLeaderRematchFromWild(); } } @@ -930,13 +930,13 @@ static void CB2_EndFirstBattle(void) SetMainCallback2(CB2_ReturnToFieldContinueScriptPlayMapMusic); } -static void sub_80B1218(void) +static void TryUpdateGymLeaderRematchFromWild(void) { if (GetGameStat(GAME_STAT_WILD_BATTLES) % 60 == 0) UpdateGymLeaderRematch(); } -static void sub_80B1234(void) +static void TryUpdateGymLeaderRematchFromTrainer(void) { if (GetGameStat(GAME_STAT_TRAINER_BATTLES) % 20 == 0) UpdateGymLeaderRematch(); diff --git a/src/berry_blender.c b/src/berry_blender.c index 435e508f66..b4874c3b10 100644 --- a/src/berry_blender.c +++ b/src/berry_blender.c @@ -3339,7 +3339,7 @@ static bool8 Blender_PrintBlendingResults(void) TryAddContestLinkTvShow(&pokeblock, &sBerryBlenderData->tvBlender); CreateTask(sub_8083F3C, 6); - sub_80EECEC(); + IncrementDailyBerryBlender(); RemoveBagItem(gSpecialVar_ItemId, 1); AddPokeblock(&pokeblock); diff --git a/src/frontier_util.c b/src/frontier_util.c index 83934c9f66..d7d76066fb 100644 --- a/src/frontier_util.c +++ b/src/frontier_util.c @@ -1889,11 +1889,11 @@ static void sub_81A3B64(void) points = gSaveBlock2Ptr->frontier.field_EBA; points += gUnknown_086118B4[challengeNum][facility][battleMode]; - sub_80EED60(gUnknown_086118B4[challengeNum][facility][battleMode]); + IncrementDailyBattlePoints(gUnknown_086118B4[challengeNum][facility][battleMode]); if (gTrainerBattleOpponent_A == TRAINER_FRONTIER_BRAIN) { points += 10; - sub_80EED60(10); + IncrementDailyBattlePoints(10); } if (points > 0xFFFF) points = 0xFFFF; diff --git a/src/item_menu.c b/src/item_menu.c index c19113c60b..16008b4bbe 100755 --- a/src/item_menu.c +++ b/src/item_menu.c @@ -1651,7 +1651,7 @@ void ItemMenu_UseOutOfBattle(u8 taskId) if (gBagPositionStruct.pocket != BERRIES_POCKET) ItemId_GetFieldFunc(gSpecialVar_ItemId)(taskId); else - sub_80FDD10(taskId); + ItemUseOutOfBattle_Berry(taskId); } } } diff --git a/src/item_use.c b/src/item_use.c index 46f8cdf4a3..456a393390 100755 --- a/src/item_use.c +++ b/src/item_use.c @@ -43,9 +43,9 @@ #include "constants/vars.h" #include "event_obj_lock.h" -extern u8 BerryTree_EventScript_274482[]; -extern u8 BerryTree_EventScript_2744C0[]; -extern u8 BattleFrontier_OutsideEast_EventScript_242CFC[]; +extern u8 BerryTree_EventScript_ItemUsePlantBerry[]; +extern u8 BerryTree_EventScript_ItemUseWailmerPail[]; +extern u8 BattleFrontier_OutsideEast_EventScript_WaterSudowoodo[]; void SetUpItemUseCallback(u8 taskId); void MapPostLoadHook_UseItem(void); @@ -61,9 +61,9 @@ void sub_80FDA94(u8 taskId); void sub_80FDADC(u8 taskId); void sub_80FD7C8(u8 taskId); void sub_80FDC00(u8 taskId); -void sub_80FDD74(u8 taskId); -void sub_80FDE08(u8 taskId); -void sub_80FDE7C(u8 taskId); +void ItemUseOnFieldCB_Berry(u8 taskId); +void ItemUseOnFieldCB_WailmerPailBerry(u8 taskId); +void ItemUseOnFieldCB_WailmerPailSudowoodo(u8 taskId); void sub_80FDF90(u8 taskId); void task08_0809AD8C(u8 taskId); void sub_80FE024(u8 taskId); @@ -81,7 +81,7 @@ u8 sub_80FD9B0(s16 a, s16 b); void sub_80FDA24(u8 a); void sub_80FD8E0(u8 taskId, s16 x, s16 y); void sub_80FDBEC(void); -bool8 sub_80FDE2C(void); +bool8 TryToWaterSudowoodo(void); void ItemUseOutOfBattle_CannotUse(u8 taskId); // EWRAM variables @@ -651,11 +651,11 @@ void ItemUseOutOfBattle_PowderJar(u8 taskId) } } -void sub_80FDD10(u8 taskId) +void ItemUseOutOfBattle_Berry(u8 taskId) { if (IsPlayerFacingEmptyBerryTreePatch() == TRUE) { - gUnknown_0203A0F4 = sub_80FDD74; + gUnknown_0203A0F4 = ItemUseOnFieldCB_Berry; gFieldCallback = MapPostLoadHook_UseItem; gBagMenu->mainCallback2 = CB2_ReturnToField; unknown_ItemMenu_Confirm(taskId); @@ -666,24 +666,24 @@ void sub_80FDD10(u8 taskId) } } -void sub_80FDD74(u8 taskId) +void ItemUseOnFieldCB_Berry(u8 taskId) { RemoveBagItem(gSpecialVar_ItemId, 1); ScriptContext2_Enable(); - ScriptContext1_SetupScript(BerryTree_EventScript_274482); + ScriptContext1_SetupScript(BerryTree_EventScript_ItemUsePlantBerry); DestroyTask(taskId); } void ItemUseOutOfBattle_WailmerPail(u8 taskId) { - if (sub_80FDE2C() == TRUE) + if (TryToWaterSudowoodo() == TRUE) { - gUnknown_0203A0F4 = sub_80FDE7C; + gUnknown_0203A0F4 = ItemUseOnFieldCB_WailmerPailSudowoodo; SetUpItemUseOnFieldCallback(taskId); } else if (TryToWaterBerryTree() == TRUE) { - gUnknown_0203A0F4 = sub_80FDE08; + gUnknown_0203A0F4 = ItemUseOnFieldCB_WailmerPailBerry; SetUpItemUseOnFieldCallback(taskId); } else @@ -692,14 +692,14 @@ void ItemUseOutOfBattle_WailmerPail(u8 taskId) } } -void sub_80FDE08(u8 taskId) +void ItemUseOnFieldCB_WailmerPailBerry(u8 taskId) { ScriptContext2_Enable(); - ScriptContext1_SetupScript(BerryTree_EventScript_2744C0); + ScriptContext1_SetupScript(BerryTree_EventScript_ItemUseWailmerPail); DestroyTask(taskId); } -bool8 sub_80FDE2C(void) +bool8 TryToWaterSudowoodo(void) { u16 x, y; u8 z; @@ -707,16 +707,16 @@ bool8 sub_80FDE2C(void) GetXYCoordsOneStepInFrontOfPlayer(&x, &y); z = PlayerGetZCoord(); objId = GetEventObjectIdByXYZ(x, y, z); - if (objId == 16 || gEventObjects[objId].graphicsId != 0xE4) + if (objId == EVENT_OBJECTS_COUNT || gEventObjects[objId].graphicsId != EVENT_OBJ_GFX_SUDOWOODO) return FALSE; else return TRUE; } -void sub_80FDE7C(u8 taskId) +void ItemUseOnFieldCB_WailmerPailSudowoodo(u8 taskId) { ScriptContext2_Enable(); - ScriptContext1_SetupScript(BattleFrontier_OutsideEast_EventScript_242CFC); + ScriptContext1_SetupScript(BattleFrontier_OutsideEast_EventScript_WaterSudowoodo); DestroyTask(taskId); } diff --git a/src/roulette.c b/src/roulette.c index cddd7366a3..26002e7731 100644 --- a/src/roulette.c +++ b/src/roulette.c @@ -1213,7 +1213,7 @@ static void sub_8140D6C(u8 r0) static void sub_8140F6C(u8 r0) { - sub_80EECA4(); + IncrementDailyRouletteUses(); gUnknown_0203AB88->var28 = 0xFF; if (gUnknown_0203AB88->var19 == 1) gUnknown_0203AB88->var23 = 1; diff --git a/src/slot_machine.c b/src/slot_machine.c index 37071926e8..742ec6120d 100644 --- a/src/slot_machine.c +++ b/src/slot_machine.c @@ -1060,7 +1060,7 @@ static bool8 SlotAction9(struct Task *task) ReelTasks_SetUnkTaskData(1); ReelTasks_SetUnkTaskData(2); - sub_80EEC80(); // something with daily slot variable + IncrementDailySlotsUses(); task->data[0] = 0; if (sSlotMachine->luckyFlags & LUCKY_BIAS_REELTIME) diff --git a/src/tv.c b/src/tv.c index 0537807d09..a228daac0d 100644 --- a/src/tv.c +++ b/src/tv.c @@ -2626,37 +2626,37 @@ static void sub_80EEBF4(u8 actionIdx) } } -void sub_80EEC80(void) +void IncrementDailySlotsUses(void) { VarSet(VAR_DAILY_SLOTS, VarGet(VAR_DAILY_SLOTS) + 1); } -void sub_80EECA4(void) +void IncrementDailyRouletteUses(void) { VarSet(VAR_DAILY_ROULETTE, VarGet(VAR_DAILY_ROULETTE) + 1); } -void sub_80EECC8(void) +void IncrementDailyWildBattles(void) { VarSet(VAR_DAILY_WILDS, VarGet(VAR_DAILY_WILDS) + 1); } -void sub_80EECEC(void) +void IncrementDailyBerryBlender(void) { VarSet(VAR_DAILY_BLENDER, VarGet(VAR_DAILY_BLENDER) + 1); } -void sub_80EED10(void) +void IncrementDailyPlantedBerries(void) { VarSet(VAR_DAILY_PLANTED_BERRIES, VarGet(VAR_DAILY_PLANTED_BERRIES) + 1); } -void sub_80EED34(void) +void IncrementDailyPickedBerries(void) { VarSet(VAR_DAILY_PICKED_BERRIES, VarGet(VAR_DAILY_PICKED_BERRIES) + gSpecialVar_0x8006); } -void sub_80EED60(u16 delta) +void IncrementDailyBattlePoints(u16 delta) { VarSet(VAR_DAILY_BP, VarGet(VAR_DAILY_BP) + delta); } From ac399ade4ad2f2602274943ef1efaee0d2b62074 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Sun, 20 Oct 2019 03:46:05 -0400 Subject: [PATCH 03/46] Document safari zone scripts --- .../maps/Route121_SafariZoneEntrance/map.json | 8 +- .../Route121_SafariZoneEntrance/scripts.inc | 94 ++++++------ data/maps/SafariZone_North/map.json | 4 +- data/maps/SafariZone_North/scripts.inc | 8 +- data/maps/SafariZone_Northeast/map.json | 6 +- data/maps/SafariZone_Northeast/scripts.inc | 1 + data/maps/SafariZone_Northwest/map.json | 2 +- data/maps/SafariZone_Northwest/scripts.inc | 4 +- data/maps/SafariZone_RestHouse/map.json | 6 +- data/maps/SafariZone_RestHouse/scripts.inc | 12 +- data/maps/SafariZone_South/map.json | 12 +- data/maps/SafariZone_South/scripts.inc | 116 +++++++-------- data/maps/SafariZone_Southeast/map.json | 8 +- data/maps/SafariZone_Southeast/scripts.inc | 1 + data/maps/SafariZone_Southwest/map.json | 4 +- data/maps/SafariZone_Southwest/scripts.inc | 8 +- data/scripts/safari_zone.inc | 136 +++++++++--------- include/constants/vars.h | 2 +- src/safari_zone.c | 16 +-- 19 files changed, 225 insertions(+), 223 deletions(-) diff --git a/data/maps/Route121_SafariZoneEntrance/map.json b/data/maps/Route121_SafariZoneEntrance/map.json index 90eedd7735..6cf7b57915 100644 --- a/data/maps/Route121_SafariZoneEntrance/map.json +++ b/data/maps/Route121_SafariZoneEntrance/map.json @@ -24,7 +24,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "Route121_SafariZoneEntrance_EventScript_22BBE6", + "script": "Route121_SafariZoneEntrance_EventScript_WelcomeAttendant", "flag": "0" }, { @@ -37,7 +37,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "Route121_SafariZoneEntrance_EventScript_22BBEF", + "script": "Route121_SafariZoneEntrance_EventScript_InfoAttendant", "flag": "0" }, { @@ -92,7 +92,7 @@ "elevation": 3, "var": "VAR_TEMP_1", "var_value": "0", - "script": "Route121_SafariZoneEntrance_EventScript_22BC18" + "script": "Route121_SafariZoneEntrance_EventScript_EntranceCounterTrigger" } ], "bg_events": [ @@ -102,7 +102,7 @@ "y": 1, "elevation": 0, "player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY", - "script": "Route121_SafariZoneEntrance_EventScript_22BD21" + "script": "Route121_SafariZoneEntrance_EventScript_TrainerTipSign" } ] } \ No newline at end of file diff --git a/data/maps/Route121_SafariZoneEntrance/scripts.inc b/data/maps/Route121_SafariZoneEntrance/scripts.inc index 88c4ac03d0..054f6cee80 100644 --- a/data/maps/Route121_SafariZoneEntrance/scripts.inc +++ b/data/maps/Route121_SafariZoneEntrance/scripts.inc @@ -1,20 +1,20 @@ Route121_SafariZoneEntrance_MapScripts:: @ 822BBBB - map_script MAP_SCRIPT_ON_FRAME_TABLE, Route121_SafariZoneEntrance_MapScript2_22BBC1 + map_script MAP_SCRIPT_ON_FRAME_TABLE, Route121_SafariZoneEntrance_OnFrame .byte 0 -Route121_SafariZoneEntrance_MapScript2_22BBC1: @ 822BBC1 - map_script_2 VAR_SAFARI_ZONE_STATE, 1, Route121_SafariZoneEntrance_EventScript_22BBCB +Route121_SafariZoneEntrance_OnFrame: @ 822BBC1 + map_script_2 VAR_SAFARI_ZONE_STATE, 1, Route121_SafariZoneEntrance_EventScript_ExitSafariZone .2byte 0 -Route121_SafariZoneEntrance_EventScript_22BBCB:: @ 822BBCB +Route121_SafariZoneEntrance_EventScript_ExitSafariZone:: @ 822BBCB lockall - applymovement EVENT_OBJ_ID_PLAYER, Route121_SafariZoneEntrance_Movement_22BBDD + applymovement EVENT_OBJ_ID_PLAYER, Route121_SafariZoneEntrance_Movement_ExitSafariZone waitmovement 0 setvar VAR_SAFARI_ZONE_STATE, 0 releaseall end -Route121_SafariZoneEntrance_Movement_22BBDD: @ 822BBDD +Route121_SafariZoneEntrance_Movement_ExitSafariZone: @ 822BBDD walk_up walk_right walk_right @@ -25,59 +25,59 @@ Route121_SafariZoneEntrance_Movement_22BBDD: @ 822BBDD walk_right step_end -Route121_SafariZoneEntrance_EventScript_22BBE6:: @ 822BBE6 - msgbox Route121_SafariZoneEntrance_Text_2A4D12, MSGBOX_NPC +Route121_SafariZoneEntrance_EventScript_WelcomeAttendant:: @ 822BBE6 + msgbox Route121_SafariZoneEntrance_Text_WelcomeToSafariZone, MSGBOX_NPC end -Route121_SafariZoneEntrance_EventScript_22BBEF:: @ 822BBEF +Route121_SafariZoneEntrance_EventScript_InfoAttendant:: @ 822BBEF lock faceplayer - msgbox Route121_SafariZoneEntrance_Text_2A4E46, MSGBOX_YESNO + msgbox Route121_SafariZoneEntrance_Text_WelcomeFirstTime, MSGBOX_YESNO compare VAR_RESULT, 1 - goto_if_eq Route121_SafariZoneEntrance_EventScript_22BC0E - msgbox Route121_SafariZoneEntrance_Text_2A4E7E, MSGBOX_DEFAULT + goto_if_eq Route121_SafariZoneEntrance_EventScript_FirstTimeInfo + msgbox Route121_SafariZoneEntrance_Text_ComeInAndEnjoy, MSGBOX_DEFAULT release end -Route121_SafariZoneEntrance_EventScript_22BC0E:: @ 822BC0E - msgbox Route121_SafariZoneEntrance_Text_2A4EA1, MSGBOX_DEFAULT +Route121_SafariZoneEntrance_EventScript_FirstTimeInfo:: @ 822BC0E + msgbox Route121_SafariZoneEntrance_Text_FirstTimeInfo, MSGBOX_DEFAULT release end -Route121_SafariZoneEntrance_EventScript_22BC18:: @ 822BC18 +Route121_SafariZoneEntrance_EventScript_EntranceCounterTrigger:: @ 822BC18 lockall applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceFastestUp waitmovement 0 showmoneybox 0, 0, 0 - msgbox Route121_SafariZoneEntrance_Text_2A4F74, MSGBOX_YESNO + msgbox Route121_SafariZoneEntrance_Text_WouldYouLikeToPlay, MSGBOX_YESNO compare VAR_RESULT, 1 - goto_if_eq Route121_SafariZoneEntrance_EventScript_22BC48 - msgbox Route121_SafariZoneEntrance_Text_2A4FD7, MSGBOX_DEFAULT - goto Route121_SafariZoneEntrance_EventScript_22BD06 + goto_if_eq Route121_SafariZoneEntrance_EventScript_TryEnterSafariZone + msgbox Route121_SafariZoneEntrance_Text_PlayAnotherTime, MSGBOX_DEFAULT + goto Route121_SafariZoneEntrance_EventScript_MovePlayerBackFromCounter end -Route121_SafariZoneEntrance_EventScript_22BC48:: @ 822BC48 +Route121_SafariZoneEntrance_EventScript_TryEnterSafariZone:: @ 822BC48 checkitem ITEM_POKEBLOCK_CASE, 1 compare VAR_RESULT, 0 - goto_if_eq Route121_SafariZoneEntrance_EventScript_22BCEA - call Route121_SafariZoneEntrance_EventScript_22BCBF + goto_if_eq Route121_SafariZoneEntrance_EventScript_NoPokeblockCase + call Route121_SafariZoneEntrance_EventScript_CheckHasRoomForPokemon checkmoney 500, 0 compare VAR_RESULT, 0 - goto_if_eq Route121_SafariZoneEntrance_EventScript_22BCF8 + goto_if_eq Route121_SafariZoneEntrance_EventScript_NotEnoughMoney playse SE_REGI - msgbox Route121_SafariZoneEntrance_Text_2A501B, MSGBOX_DEFAULT + msgbox Route121_SafariZoneEntrance_Text_ThatWillBe500Please, MSGBOX_DEFAULT takemoney 500, 0 updatemoneybox 0, 0 - msgbox Route121_SafariZoneEntrance_Text_2A5036, MSGBOX_DEFAULT + msgbox Route121_SafariZoneEntrance_Text_HereAreYourSafariBalls, MSGBOX_DEFAULT playfanfare MUS_FANFA4 - message Route121_SafariZoneEntrance_Text_2A5052 + message Route121_SafariZoneEntrance_Text_Received30SafariBalls waitfanfare - msgbox Route121_SafariZoneEntrance_Text_2A506F, MSGBOX_DEFAULT + msgbox Route121_SafariZoneEntrance_Text_PleaseEnjoyYourself, MSGBOX_DEFAULT closemessage hidemoneybox nop nop - applymovement EVENT_OBJ_ID_PLAYER, Route121_SafariZoneEntrance_Movement_22BD18 + applymovement EVENT_OBJ_ID_PLAYER, Route121_SafariZoneEntrance_Movement_EnterSafariZone waitmovement 0 special EnterSafariMode setvar VAR_SAFARI_ZONE_STATE, 2 @@ -86,45 +86,45 @@ Route121_SafariZoneEntrance_EventScript_22BC48:: @ 822BC48 waitstate end -Route121_SafariZoneEntrance_EventScript_22BCBF:: @ 822BCBF +Route121_SafariZoneEntrance_EventScript_CheckHasRoomForPokemon:: @ 822BCBF getpartysize - compare VAR_RESULT, 6 - goto_if_ne Route121_SafariZoneEntrance_EventScript_22BCE9 + compare VAR_RESULT, PARTY_SIZE + goto_if_ne Route121_SafariZoneEntrance_EventScript_HasRoomForPokemon specialvar VAR_RESULT, ScriptCheckFreePokemonStorageSpace compare VAR_RESULT, 1 - goto_if_eq Route121_SafariZoneEntrance_EventScript_22BCE9 - msgbox Route121_SafariZoneEntrance_Text_2A50E5, MSGBOX_DEFAULT - goto Route121_SafariZoneEntrance_EventScript_22BD06 + goto_if_eq Route121_SafariZoneEntrance_EventScript_HasRoomForPokemon + msgbox Route121_SafariZoneEntrance_Text_PCIsFull, MSGBOX_DEFAULT + goto Route121_SafariZoneEntrance_EventScript_MovePlayerBackFromCounter end -Route121_SafariZoneEntrance_EventScript_22BCE9:: @ 822BCE9 +Route121_SafariZoneEntrance_EventScript_HasRoomForPokemon:: @ 822BCE9 return -Route121_SafariZoneEntrance_EventScript_22BCEA:: @ 822BCEA - msgbox Route121_SafariZoneEntrance_Text_2A5105, MSGBOX_DEFAULT - goto Route121_SafariZoneEntrance_EventScript_22BD06 +Route121_SafariZoneEntrance_EventScript_NoPokeblockCase:: @ 822BCEA + msgbox Route121_SafariZoneEntrance_Text_YouNeedPokeblockCase, MSGBOX_DEFAULT + goto Route121_SafariZoneEntrance_EventScript_MovePlayerBackFromCounter end -Route121_SafariZoneEntrance_EventScript_22BCF8:: @ 822BCF8 - msgbox Route121_SafariZoneEntrance_Text_2A4FF7, MSGBOX_DEFAULT - goto Route121_SafariZoneEntrance_EventScript_22BD06 +Route121_SafariZoneEntrance_EventScript_NotEnoughMoney:: @ 822BCF8 + msgbox Route121_SafariZoneEntrance_Text_NotEnoughMoney, MSGBOX_DEFAULT + goto Route121_SafariZoneEntrance_EventScript_MovePlayerBackFromCounter end -Route121_SafariZoneEntrance_EventScript_22BD06:: @ 822BD06 +Route121_SafariZoneEntrance_EventScript_MovePlayerBackFromCounter:: @ 822BD06 closemessage hidemoneybox nop nop - applymovement EVENT_OBJ_ID_PLAYER, Route121_SafariZoneEntrance_Movement_22BD16 + applymovement EVENT_OBJ_ID_PLAYER, Route121_SafariZoneEntrance_Movement_BackAwayFromCounter waitmovement 0 releaseall end -Route121_SafariZoneEntrance_Movement_22BD16: @ 822BD16 +Route121_SafariZoneEntrance_Movement_BackAwayFromCounter: @ 822BD16 walk_right step_end -Route121_SafariZoneEntrance_Movement_22BD18: @ 822BD18 +Route121_SafariZoneEntrance_Movement_EnterSafariZone: @ 822BD18 walk_left walk_left walk_left @@ -135,7 +135,7 @@ Route121_SafariZoneEntrance_Movement_22BD18: @ 822BD18 delay_16 step_end -Route121_SafariZoneEntrance_EventScript_22BD21:: @ 822BD21 - msgbox Route121_SafariZoneEntrance_Text_2A55BB, MSGBOX_SIGN +Route121_SafariZoneEntrance_EventScript_TrainerTipSign:: @ 822BD21 + msgbox Route121_SafariZoneEntrance_Text_TrainerTip, MSGBOX_SIGN end diff --git a/data/maps/SafariZone_North/map.json b/data/maps/SafariZone_North/map.json index 0dafeb1801..90ecec8c2d 100644 --- a/data/maps/SafariZone_North/map.json +++ b/data/maps/SafariZone_North/map.json @@ -40,7 +40,7 @@ "movement_range_y": 1, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "SafariZone_North_EventScript_23D254", + "script": "SafariZone_North_EventScript_Fisherman", "flag": "0" }, { @@ -53,7 +53,7 @@ "movement_range_y": 1, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "SafariZone_North_EventScript_23D25D", + "script": "SafariZone_North_EventScript_Man", "flag": "0" }, { diff --git a/data/maps/SafariZone_North/scripts.inc b/data/maps/SafariZone_North/scripts.inc index d98fdca883..365266b4b2 100644 --- a/data/maps/SafariZone_North/scripts.inc +++ b/data/maps/SafariZone_North/scripts.inc @@ -1,11 +1,11 @@ SafariZone_North_MapScripts:: @ 823D253 .byte 0 -SafariZone_North_EventScript_23D254:: @ 823D254 - msgbox SafariZone_North_Text_2A5489, MSGBOX_NPC +SafariZone_North_EventScript_Fisherman:: @ 823D254 + msgbox SafariZone_North_Text_Fisherman, MSGBOX_NPC end -SafariZone_North_EventScript_23D25D:: @ 823D25D - msgbox SafariZone_North_Text_2A54F0, MSGBOX_NPC +SafariZone_North_EventScript_Man:: @ 823D25D + msgbox SafariZone_North_Text_Man, MSGBOX_NPC end diff --git a/data/maps/SafariZone_Northeast/map.json b/data/maps/SafariZone_Northeast/map.json index 798563263a..d362f8de32 100644 --- a/data/maps/SafariZone_Northeast/map.json +++ b/data/maps/SafariZone_Northeast/map.json @@ -35,7 +35,7 @@ "movement_range_y": 1, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "SafariZone_Northeast_EventScript_23D3C6", + "script": "SafariZone_Northeast_EventScript_Boy", "flag": "0" }, { @@ -48,7 +48,7 @@ "movement_range_y": 1, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "SafariZone_Northeast_EventScript_23D3D8", + "script": "SafariZone_Northeast_EventScript_Girl", "flag": "0" }, { @@ -74,7 +74,7 @@ "movement_range_y": 1, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "SafariZone_Northeast_EventScript_23D3CF", + "script": "SafariZone_Northeast_EventScript_Woman", "flag": "0" }, { diff --git a/data/maps/SafariZone_Northeast/scripts.inc b/data/maps/SafariZone_Northeast/scripts.inc index 207e2a584b..a34d6ab951 100644 --- a/data/maps/SafariZone_Northeast/scripts.inc +++ b/data/maps/SafariZone_Northeast/scripts.inc @@ -1,3 +1,4 @@ SafariZone_Northeast_MapScripts:: @ 8242C02 .byte 0 +@ Event scripts for SafariZone_Northeast are in SafariZone_South/scripts.inc diff --git a/data/maps/SafariZone_Northwest/map.json b/data/maps/SafariZone_Northwest/map.json index 6ead6d714c..7805c872e6 100644 --- a/data/maps/SafariZone_Northwest/map.json +++ b/data/maps/SafariZone_Northwest/map.json @@ -35,7 +35,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "SafariZone_Northwest_EventScript_23D24A", + "script": "SafariZone_Northwest_EventScript_Man", "flag": "0" }, { diff --git a/data/maps/SafariZone_Northwest/scripts.inc b/data/maps/SafariZone_Northwest/scripts.inc index a64c142fe6..5e6261a2e3 100644 --- a/data/maps/SafariZone_Northwest/scripts.inc +++ b/data/maps/SafariZone_Northwest/scripts.inc @@ -1,7 +1,7 @@ SafariZone_Northwest_MapScripts:: @ 823D249 .byte 0 -SafariZone_Northwest_EventScript_23D24A:: @ 823D24A - msgbox SafariZone_Northwest_Text_2A542C, MSGBOX_NPC +SafariZone_Northwest_EventScript_Man:: @ 823D24A + msgbox SafariZone_Northwest_Text_Man, MSGBOX_NPC end diff --git a/data/maps/SafariZone_RestHouse/map.json b/data/maps/SafariZone_RestHouse/map.json index db0ba8048a..fd9ae9dcb7 100644 --- a/data/maps/SafariZone_RestHouse/map.json +++ b/data/maps/SafariZone_RestHouse/map.json @@ -24,7 +24,7 @@ "movement_range_y": 1, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "SafariZone_RestHouse_EventScript_242BE7", + "script": "SafariZone_RestHouse_EventScript_Youngster", "flag": "0" }, { @@ -37,7 +37,7 @@ "movement_range_y": 1, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "SafariZone_RestHouse_EventScript_242BF0", + "script": "SafariZone_RestHouse_EventScript_PsychicM", "flag": "0" }, { @@ -50,7 +50,7 @@ "movement_range_y": 1, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "SafariZone_RestHouse_EventScript_242BF9", + "script": "SafariZone_RestHouse_EventScript_FatMan", "flag": "0" } ], diff --git a/data/maps/SafariZone_RestHouse/scripts.inc b/data/maps/SafariZone_RestHouse/scripts.inc index e08cfe3da4..bc5688f0fe 100644 --- a/data/maps/SafariZone_RestHouse/scripts.inc +++ b/data/maps/SafariZone_RestHouse/scripts.inc @@ -1,15 +1,15 @@ SafariZone_RestHouse_MapScripts:: @ 8242BE6 .byte 0 -SafariZone_RestHouse_EventScript_242BE7:: @ 8242BE7 - msgbox SafariZone_RestHouse_Text_2A5639, MSGBOX_NPC +SafariZone_RestHouse_EventScript_Youngster:: @ 8242BE7 + msgbox SafariZone_RestHouse_Text_Youngster, MSGBOX_NPC end -SafariZone_RestHouse_EventScript_242BF0:: @ 8242BF0 - msgbox SafariZone_RestHouse_Text_2A56E1, MSGBOX_NPC +SafariZone_RestHouse_EventScript_PsychicM:: @ 8242BF0 + msgbox SafariZone_RestHouse_Text_PsychicM, MSGBOX_NPC end -SafariZone_RestHouse_EventScript_242BF9:: @ 8242BF9 - msgbox SafariZone_RestHouse_Text_2A5764, MSGBOX_NPC +SafariZone_RestHouse_EventScript_FatMan:: @ 8242BF9 + msgbox SafariZone_RestHouse_Text_FatMan, MSGBOX_NPC end diff --git a/data/maps/SafariZone_South/map.json b/data/maps/SafariZone_South/map.json index 371be21194..b23420ba42 100644 --- a/data/maps/SafariZone_South/map.json +++ b/data/maps/SafariZone_South/map.json @@ -40,7 +40,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "SafariZone_South_EventScript_23D2E5", + "script": "SafariZone_South_EventScript_ExitAttendant", "flag": "0" }, { @@ -53,7 +53,7 @@ "movement_range_y": 1, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "SafariZone_South_EventScript_23D2CA", + "script": "SafariZone_South_EventScript_Boy", "flag": "0" }, { @@ -66,7 +66,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "SafariZone_South_EventScript_23D2D3", + "script": "SafariZone_South_EventScript_Man", "flag": "0" }, { @@ -79,7 +79,7 @@ "movement_range_y": 1, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "SafariZone_South_EventScript_23D2DC", + "script": "SafariZone_South_EventScript_Youngster", "flag": "0" }, { @@ -92,7 +92,7 @@ "movement_range_y": 1, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "SafariZone_South_EventScript_23D390", + "script": "SafariZone_South_EventScript_ConstructionWorker1", "flag": "FLAG_HIDE_SAFARI_ZONE_SOUTH_CONSTRUCTION_WORKERS" }, { @@ -105,7 +105,7 @@ "movement_range_y": 1, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "SafariZone_South_EventScript_23D3A2", + "script": "SafariZone_South_EventScript_ConstructionWorker2", "flag": "FLAG_HIDE_SAFARI_ZONE_SOUTH_CONSTRUCTION_WORKERS" } ], diff --git a/data/maps/SafariZone_South/scripts.inc b/data/maps/SafariZone_South/scripts.inc index a6c3629bc1..96a9a61ea1 100644 --- a/data/maps/SafariZone_South/scripts.inc +++ b/data/maps/SafariZone_South/scripts.inc @@ -1,17 +1,17 @@ SafariZone_South_MapScripts:: @ 823D279 map_script MAP_SCRIPT_ON_TRANSITION, SafariZone_South_OnTransition - map_script MAP_SCRIPT_ON_FRAME_TABLE, SafariZone_South_MapScript2_23D284 + map_script MAP_SCRIPT_ON_FRAME_TABLE, SafariZone_South_OnFrame .byte 0 -SafariZone_South_MapScript2_23D284: @ 823D284 - map_script_2 VAR_SAFARI_ZONE_STATE, 2, SafariZone_South_EventScript_23D28E +SafariZone_South_OnFrame: @ 823D284 + map_script_2 VAR_SAFARI_ZONE_STATE, 2, SafariZone_South_EventScript_EnterSafariZone .2byte 0 -SafariZone_South_EventScript_23D28E:: @ 823D28E +SafariZone_South_EventScript_EnterSafariZone:: @ 823D28E lockall - applymovement EVENT_OBJ_ID_PLAYER, SafariZone_South_Movement_23D2C5 + applymovement EVENT_OBJ_ID_PLAYER, SafariZone_South_Movement_PlayerEnter waitmovement 0 - applymovement 1, SafariZone_South_Movement_23D2C7 + applymovement 1, SafariZone_South_Movement_ExitAttendantBlockDoor waitmovement 0 setobjectxyperm 1, 32, 34 setvar VAR_SAFARI_ZONE_STATE, 0 @@ -20,133 +20,133 @@ SafariZone_South_EventScript_23D28E:: @ 823D28E SafariZone_South_OnTransition: @ 823D2B1 compare VAR_SAFARI_ZONE_STATE, 2 - call_if_eq SafariZone_South_EventScript_23D2BD + call_if_eq SafariZone_South_EventScript_SetExitAttendantAside end -SafariZone_South_EventScript_23D2BD:: @ 823D2BD +SafariZone_South_EventScript_SetExitAttendantAside:: @ 823D2BD setobjectxyperm 1, 31, 34 return -SafariZone_South_Movement_23D2C5: @ 823D2C5 +SafariZone_South_Movement_PlayerEnter: @ 823D2C5 walk_down step_end -SafariZone_South_Movement_23D2C7: @ 823D2C7 +SafariZone_South_Movement_ExitAttendantBlockDoor: @ 823D2C7 walk_right walk_in_place_fastest_down step_end -SafariZone_South_EventScript_23D2CA:: @ 823D2CA - msgbox SafariZone_South_Text_2A52EF, MSGBOX_NPC +SafariZone_South_EventScript_Boy:: @ 823D2CA + msgbox SafariZone_South_Text_Boy, MSGBOX_NPC end -SafariZone_South_EventScript_23D2D3:: @ 823D2D3 - msgbox SafariZone_South_Text_2A533B, MSGBOX_NPC +SafariZone_South_EventScript_Man:: @ 823D2D3 + msgbox SafariZone_South_Text_Man, MSGBOX_NPC end -SafariZone_South_EventScript_23D2DC:: @ 823D2DC - msgbox SafariZone_South_Text_2A553E, MSGBOX_NPC +SafariZone_South_EventScript_Youngster:: @ 823D2DC + msgbox SafariZone_South_Text_Youngster, MSGBOX_NPC end -SafariZone_South_EventScript_23D2E5:: @ 823D2E5 +SafariZone_South_EventScript_ExitAttendant:: @ 823D2E5 lock faceplayer - goto_if_unset FLAG_GOOD_LUCK_SAFARI_ZONE, SafariZone_South_EventScript_23D30D - msgbox SafariZone_South_Text_2A51D4, MSGBOX_YESNO + goto_if_unset FLAG_GOOD_LUCK_SAFARI_ZONE, SafariZone_South_EventScript_GoodLuck + msgbox SafariZone_South_Text_StillHaveTimeExit, MSGBOX_YESNO compare VAR_RESULT, 1 - goto_if_eq SafariZone_South_EventScript_23D31A - msgbox SafariZone_South_Text_2A521A, MSGBOX_DEFAULT + goto_if_eq SafariZone_South_EventScript_ExitEarly + msgbox SafariZone_South_Text_EnjoyTheRestOfYourAdventure, MSGBOX_DEFAULT release end -SafariZone_South_EventScript_23D30D:: @ 823D30D +SafariZone_South_EventScript_GoodLuck:: @ 823D30D setflag FLAG_GOOD_LUCK_SAFARI_ZONE - msgbox SafariZone_South_Text_2A52AB, MSGBOX_DEFAULT + msgbox SafariZone_South_Text_GoodLuck, MSGBOX_DEFAULT release end -SafariZone_South_EventScript_23D31A:: @ 823D31A - msgbox SafariZone_South_Text_2A5248, MSGBOX_DEFAULT +SafariZone_South_EventScript_ExitEarly:: @ 823D31A + msgbox SafariZone_South_Text_ExitEarlyThankYouForPlaying, MSGBOX_DEFAULT closemessage switch VAR_FACING - case DIR_NORTH, SafariZone_South_EventScript_23D33F - case DIR_EAST, SafariZone_South_EventScript_23D359 + case DIR_NORTH, SafariZone_South_EventScript_ExitEarlyNorth + case DIR_EAST, SafariZone_South_EventScript_ExitEarlyEast end -SafariZone_South_EventScript_23D33F:: @ 823D33F - applymovement 1, SafariZone_South_Movement_23D38A +SafariZone_South_EventScript_ExitEarlyNorth:: @ 823D33F + applymovement 1, SafariZone_South_Movement_MoveExitAttendantNorth waitmovement 0 - applymovement EVENT_OBJ_ID_PLAYER, SafariZone_South_Movement_23D385 + applymovement EVENT_OBJ_ID_PLAYER, SafariZone_South_Movement_PlayerExitNorth waitmovement 0 - goto SafariZone_South_EventScript_23D373 + goto SafariZone_South_EventScript_Exit end -SafariZone_South_EventScript_23D359:: @ 823D359 - applymovement 1, SafariZone_South_Movement_23D38D +SafariZone_South_EventScript_ExitEarlyEast:: @ 823D359 + applymovement 1, SafariZone_South_Movement_MoveExitAttendantEast waitmovement 0 - applymovement EVENT_OBJ_ID_PLAYER, SafariZone_South_Movement_23D387 + applymovement EVENT_OBJ_ID_PLAYER, SafariZone_South_Movement_PlayerExitEast waitmovement 0 - goto SafariZone_South_EventScript_23D373 + goto SafariZone_South_EventScript_Exit end -SafariZone_South_EventScript_23D373:: @ 823D373 +SafariZone_South_EventScript_Exit:: @ 823D373 setvar VAR_SAFARI_ZONE_STATE, 1 special ExitSafariMode warpdoor MAP_ROUTE121_SAFARI_ZONE_ENTRANCE, 255, 2, 5 waitstate end -SafariZone_South_Movement_23D385: @ 823D385 +SafariZone_South_Movement_PlayerExitNorth: @ 823D385 walk_up step_end -SafariZone_South_Movement_23D387: @ 823D387 +SafariZone_South_Movement_PlayerExitEast: @ 823D387 walk_right walk_in_place_fastest_up step_end -SafariZone_South_Movement_23D38A: @ 823D38A +SafariZone_South_Movement_MoveExitAttendantNorth: @ 823D38A walk_left walk_in_place_fastest_right step_end -SafariZone_South_Movement_23D38D: @ 823D38D +SafariZone_South_Movement_MoveExitAttendantEast: @ 823D38D walk_down walk_in_place_fastest_up step_end -SafariZone_South_EventScript_23D390:: @ 823D390 - msgbox SafariZone_South_Text_2A57EE, MSGBOX_NPC +SafariZone_South_EventScript_ConstructionWorker1:: @ 823D390 + msgbox SafariZone_South_Text_AreaOffLimits1, MSGBOX_NPC end -SafariZone_Southeast_EventScript_23D399:: @ 823D399 - msgbox SafariZone_Southeast_Text_2A582D, MSGBOX_NPC +SafariZone_Southeast_EventScript_ExpansionZoneAttendant:: @ 823D399 + msgbox SafariZone_Southeast_Text_ExpansionIsFinished, MSGBOX_NPC end -SafariZone_South_EventScript_23D3A2:: @ 823D3A2 - msgbox SafariZone_South_Text_2A5887, MSGBOX_NPC +SafariZone_South_EventScript_ConstructionWorker2:: @ 823D3A2 + msgbox SafariZone_South_Text_AreaOffLimits2, MSGBOX_NPC end -SafariZone_Southeast_EventScript_23D3AB:: @ 823D3AB - msgbox SafariZone_Southeast_Text_2A58C6, MSGBOX_NPC +SafariZone_Southeast_EventScript_LittleGirl:: @ 823D3AB + msgbox SafariZone_Southeast_Text_LittleGirl, MSGBOX_NPC end -SafariZone_Southeast_EventScript_23D3B4:: @ 823D3B4 - msgbox SafariZone_Southeast_Text_2A58FD, MSGBOX_NPC +SafariZone_Southeast_EventScript_FatMan:: @ 823D3B4 + msgbox SafariZone_Southeast_Text_FatMan, MSGBOX_NPC end -SafariZone_Southeast_EventScript_23D3BD:: @ 823D3BD - msgbox SafariZone_Southeast_Text_2A5960, MSGBOX_NPC +SafariZone_Southeast_EventScript_RichBoy:: @ 823D3BD + msgbox SafariZone_Southeast_Text_RichBoy, MSGBOX_NPC end -SafariZone_Northeast_EventScript_23D3C6:: @ 823D3C6 - msgbox SafariZone_Northeast_Text_2A59A4, MSGBOX_NPC +SafariZone_Northeast_EventScript_Boy:: @ 823D3C6 + msgbox SafariZone_Northeast_Text_Boy, MSGBOX_NPC end -SafariZone_Northeast_EventScript_23D3CF:: @ 823D3CF - msgbox SafariZone_Northeast_Text_2A5A09, MSGBOX_NPC +SafariZone_Northeast_EventScript_Woman:: @ 823D3CF + msgbox SafariZone_Northeast_Text_Woman, MSGBOX_NPC end -SafariZone_Northeast_EventScript_23D3D8:: @ 823D3D8 - msgbox SafariZone_Northeast_Text_2A5A44, MSGBOX_NPC +SafariZone_Northeast_EventScript_Girl:: @ 823D3D8 + msgbox SafariZone_Northeast_Text_Girl, MSGBOX_NPC end diff --git a/data/maps/SafariZone_Southeast/map.json b/data/maps/SafariZone_Southeast/map.json index cb293b149f..f17a9acd3a 100644 --- a/data/maps/SafariZone_Southeast/map.json +++ b/data/maps/SafariZone_Southeast/map.json @@ -35,7 +35,7 @@ "movement_range_y": 1, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "SafariZone_Southeast_EventScript_23D3BD", + "script": "SafariZone_Southeast_EventScript_RichBoy", "flag": "0" }, { @@ -48,7 +48,7 @@ "movement_range_y": 1, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "SafariZone_Southeast_EventScript_23D3B4", + "script": "SafariZone_Southeast_EventScript_FatMan", "flag": "0" }, { @@ -61,7 +61,7 @@ "movement_range_y": 1, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "SafariZone_Southeast_EventScript_23D3AB", + "script": "SafariZone_Southeast_EventScript_LittleGirl", "flag": "0" }, { @@ -87,7 +87,7 @@ "movement_range_y": 1, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "SafariZone_Southeast_EventScript_23D399", + "script": "SafariZone_Southeast_EventScript_ExpansionZoneAttendant", "flag": "FLAG_HIDE_SAFARI_ZONE_SOUTH_EAST_EXPANSION" } ], diff --git a/data/maps/SafariZone_Southeast/scripts.inc b/data/maps/SafariZone_Southeast/scripts.inc index f88cd22fb5..658d88e569 100644 --- a/data/maps/SafariZone_Southeast/scripts.inc +++ b/data/maps/SafariZone_Southeast/scripts.inc @@ -1,3 +1,4 @@ SafariZone_Southeast_MapScripts:: @ 8242C03 .byte 0 +@ Event scripts for SafariZone_Southeast are in SafariZone_South/scripts.inc diff --git a/data/maps/SafariZone_Southwest/map.json b/data/maps/SafariZone_Southwest/map.json index 3784db8011..261f7f49d3 100644 --- a/data/maps/SafariZone_Southwest/map.json +++ b/data/maps/SafariZone_Southwest/map.json @@ -35,7 +35,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "SafariZone_Southwest_EventScript_23D267", + "script": "SafariZone_Southwest_EventScript_Woman", "flag": "0" }, { @@ -69,7 +69,7 @@ "y": 7, "elevation": 3, "player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY", - "script": "SafariZone_Southwest_EventScript_23D270" + "script": "SafariZone_Southwest_EventScript_RestHouseSign" } ] } \ No newline at end of file diff --git a/data/maps/SafariZone_Southwest/scripts.inc b/data/maps/SafariZone_Southwest/scripts.inc index 069f22b49e..c862f79067 100644 --- a/data/maps/SafariZone_Southwest/scripts.inc +++ b/data/maps/SafariZone_Southwest/scripts.inc @@ -1,11 +1,11 @@ SafariZone_Southwest_MapScripts:: @ 823D266 .byte 0 -SafariZone_Southwest_EventScript_23D267:: @ 823D267 - msgbox SafariZone_Southwest_Text_2A53B7, MSGBOX_NPC +SafariZone_Southwest_EventScript_Woman:: @ 823D267 + msgbox SafariZone_Southwest_Text_Woman, MSGBOX_NPC end -SafariZone_Southwest_EventScript_23D270:: @ 823D270 - msgbox SafariZone_Southwest_Text_2A5613, MSGBOX_SIGN +SafariZone_Southwest_EventScript_RestHouseSign:: @ 823D270 + msgbox SafariZone_Southwest_Text_RestHouseSign, MSGBOX_SIGN end diff --git a/data/scripts/safari_zone.inc b/data/scripts/safari_zone.inc index 3539e09706..83cf5d16dd 100644 --- a/data/scripts/safari_zone.inc +++ b/data/scripts/safari_zone.inc @@ -1,103 +1,103 @@ -EventScript_2A4B4C:: @ 82A4B4C +SafariZone_EventScript_OutOfBallsMidBattle:: @ 82A4B4C setvar VAR_SAFARI_ZONE_STATE, 1 special ExitSafariMode setwarp MAP_ROUTE121_SAFARI_ZONE_ENTRANCE, 255, 2, 5 end -EventScript_2A4B5D:: @ 82A4B5D +SafariZone_EventScript_Exit:: @ 82A4B5D setvar VAR_SAFARI_ZONE_STATE, 1 special ExitSafariMode warp MAP_ROUTE121_SAFARI_ZONE_ENTRANCE, 255, 2, 5 waitstate end -EventScript_2A4B6F:: @ 82A4B6F +SafariZone_EventScript_RetirePrompt:: @ 82A4B6F lockall - msgbox Text_2A4BF4, MSGBOX_YESNO + msgbox SafariZone_Text_WouldYouLikeToExit, MSGBOX_YESNO compare VAR_RESULT, 1 - goto_if_eq EventScript_2A4B85 + goto_if_eq SafariZone_EventScript_Retire releaseall end -EventScript_2A4B85:: @ 82A4B85 - goto EventScript_2A4B5D +SafariZone_EventScript_Retire:: @ 82A4B85 + goto SafariZone_EventScript_Exit -EventScript_2A4B8A:: @ 82A4B8A +SafariZone_EventScript_TimesUp:: @ 82A4B8A lockall playse SE_PINPON - message Text_2A4C26 + message SafariZone_Text_TimesUp waitmessage waitbuttonpress releaseall - goto EventScript_2A4B5D + goto SafariZone_EventScript_Exit -EventScript_2A4B9B:: @ 82A4B9B +SafariZone_EventScript_OutOfBalls:: @ 82A4B9B lockall playse SE_PINPON - message Text_2A4C56 + message SafariZone_Text_OutOfBalls waitmessage waitbuttonpress releaseall - goto EventScript_2A4B5D + goto SafariZone_EventScript_Exit EventScript_PokeBlockFeeder:: @ 82A4BAC lockall special GetPokeblockFeederInFront - compare VAR_RESULT, 65535 - goto_if_ne EventScript_2A4BEB - msgbox Text_2A4C90, MSGBOX_YESNO + compare VAR_RESULT, 0xFFFF + goto_if_ne SafariZone_EventScript_PokeblockPresent + msgbox SafariZone_Text_PlacePokeblockOnFeeder, MSGBOX_YESNO compare VAR_RESULT, 1 - goto_if_eq EventScript_2A4BD0 + goto_if_eq SafariZone_EventScript_ChoosePokeblock releaseall end -EventScript_2A4BD0:: @ 82A4BD0 +SafariZone_EventScript_ChoosePokeblock:: @ 82A4BD0 fadescreen 1 special OpenPokeblockCaseOnFeeder waitstate - compare VAR_RESULT, 65535 - goto_if_ne EventScript_2A4BE2 + compare VAR_RESULT, 0xFFFF + goto_if_ne SafariZone_EventScript_PokeblockPlaced end -EventScript_2A4BE2:: @ 82A4BE2 - message Text_2A4CEB +SafariZone_EventScript_PokeblockPlaced:: @ 82A4BE2 + message SafariZone_Text_PokeblockWasPlaced waitmessage waitbuttonpress releaseall end -EventScript_2A4BEB:: @ 82A4BEB - message Text_2A4CC5 +SafariZone_EventScript_PokeblockPresent:: @ 82A4BEB + message SafariZone_Text_PokeblockStillHere waitmessage waitbuttonpress releaseall end -Text_2A4BF4: @ 82A4BF4 +SafariZone_Text_WouldYouLikeToExit: @ 82A4BF4 .string "Would you like to exit the SAFARI\n" .string "ZONE right now?$" -Text_2A4C26: @ 82A4C26 +SafariZone_Text_TimesUp: @ 82A4C26 .string "Ding-dong! Time's up!\n" .string "Your SAFARI Game is over.$" -Text_2A4C56: @ 82A4C56 +SafariZone_Text_OutOfBalls: @ 82A4C56 .string "You've run out of SAFARI BALLS.\n" .string "Your SAFARI Game is over.$" -Text_2A4C90: @ 82A4C90 +SafariZone_Text_PlacePokeblockOnFeeder: @ 82A4C90 .string "Would you like to place a {POKEBLOCK}\n" .string "on the {POKEBLOCK} FEEDER?$" -Text_2A4CC5: @ 82A4CC5 +SafariZone_Text_PokeblockStillHere: @ 82A4CC5 .string "The {STR_VAR_1} you left\n" .string "before is still here.$" -Text_2A4CEB: @ 82A4CEB +SafariZone_Text_PokeblockWasPlaced: @ 82A4CEB .string "The {STR_VAR_1} was placed\n" .string "on the {POKEBLOCK} FEEDER.$" -Route121_SafariZoneEntrance_Text_2A4D12: @ 82A4D12 +Route121_SafariZoneEntrance_Text_WelcomeToSafariZone: @ 82A4D12 .string "Welcome to the SAFARI ZONE!\p" .string "Here, you may witness many kinds of\n" .string "POKéMON rarely seen in HOENN.\p" @@ -109,14 +109,14 @@ Route121_SafariZoneEntrance_Text_2A4D12: @ 82A4D12 .string "for keeps!\p" .string "Come in and enjoy the SAFARI ZONE!$" -Route121_SafariZoneEntrance_Text_2A4E46: @ 82A4E46 +Route121_SafariZoneEntrance_Text_WelcomeFirstTime: @ 82A4E46 .string "Welcome to the SAFARI ZONE!\n" .string "Is it your first time here?$" -Route121_SafariZoneEntrance_Text_2A4E7E: @ 82A4E7E +Route121_SafariZoneEntrance_Text_ComeInAndEnjoy: @ 82A4E7E .string "Come in and enjoy the SAFARI ZONE!$" -Route121_SafariZoneEntrance_Text_2A4EA1: @ 82A4EA1 +Route121_SafariZoneEntrance_Text_FirstTimeInfo: @ 82A4EA1 .string "When you enter the SAFARI ZONE, you\n" .string "start with 30 SAFARI BALLS for\l" .string "catching POKéMON.\p" @@ -125,39 +125,39 @@ Route121_SafariZoneEntrance_Text_2A4EA1: @ 82A4EA1 .string "walked 500 steps.\p" .string "Come in and enjoy the SAFARI ZONE!$" -Route121_SafariZoneEntrance_Text_2A4F74: @ 82A4F74 +Route121_SafariZoneEntrance_Text_WouldYouLikeToPlay: @ 82A4F74 .string "Welcome to the SAFARI ZONE!\p" .string "All you can catch for just ¥500!\n" .string "Would you like to play a SAFARI Game?$" -Route121_SafariZoneEntrance_Text_2A4FD7: @ 82A4FD7 +Route121_SafariZoneEntrance_Text_PlayAnotherTime: @ 82A4FD7 .string "Okay.\n" .string "Please play another time!$" -Route121_SafariZoneEntrance_Text_2A4FF7: @ 82A4FF7 +Route121_SafariZoneEntrance_Text_NotEnoughMoney: @ 82A4FF7 .string "You don't have enough money.\n" .string "Sorry.$" -Route121_SafariZoneEntrance_Text_2A501B: @ 82A501B +Route121_SafariZoneEntrance_Text_ThatWillBe500Please: @ 82A501B .string "That will be ¥500, please.$" -Route121_SafariZoneEntrance_Text_2A5036: @ 82A5036 +Route121_SafariZoneEntrance_Text_HereAreYourSafariBalls: @ 82A5036 .string "Here are your SAFARI BALLS.$" -Route121_SafariZoneEntrance_Text_2A5052: @ 82A5052 +Route121_SafariZoneEntrance_Text_Received30SafariBalls: @ 82A5052 .string "{PLAYER} received 30 SAFARI BALLS.$" -Route121_SafariZoneEntrance_Text_2A506F: @ 82A506F +Route121_SafariZoneEntrance_Text_PleaseEnjoyYourself: @ 82A506F .string "We'll let you know when your game\n" .string "is over.\p" .string "So, until then, enjoy yourself, please!\n" .string "Off you go on your wild excursion!$" -Route121_SafariZoneEntrance_Text_2A50E5: @ 82A50E5 +Route121_SafariZoneEntrance_Text_PCIsFull: @ 82A50E5 .string "Excuse me!\n" .string "Your PC BOX is full.$" -Route121_SafariZoneEntrance_Text_2A5105: @ 82A5105 +Route121_SafariZoneEntrance_Text_YouNeedPokeblockCase: @ 82A5105 .string "Excuse me!\n" .string "You seem to be without a {POKEBLOCK} CASE.\p" .string "Your SAFARI Game will be much more\n" @@ -166,129 +166,129 @@ Route121_SafariZoneEntrance_Text_2A5105: @ 82A5105 .string "You may obtain a {POKEBLOCK} CASE from\n" .string "the LILYCOVE CONTEST HALL.$" -SafariZone_South_Text_2A51D4: @ 82A51D4 +SafariZone_South_Text_StillHaveTimeExit: @ 82A51D4 .string "You still have time left. Would you like\n" .string "to exit the SAFARI ZONE now?$" -SafariZone_South_Text_2A521A: @ 82A521A +SafariZone_South_Text_EnjoyTheRestOfYourAdventure: @ 82A521A .string "Please enjoy the rest of your wild\n" .string "adventure!$" -SafariZone_South_Text_2A5248: @ 82A5248 +SafariZone_South_Text_ExitEarlyThankYouForPlaying: @ 82A5248 .string "Okay.\p" .string "I'll take back your remaining SAFARI\n" .string "BALLS.\p" .string "Thank you for playing.\n" .string "We hope to see you again.$" -SafariZone_South_Text_2A52AB: @ 82A52AB +SafariZone_South_Text_GoodLuck: @ 82A52AB .string "Good luck!\p" .string "If you need anything, don't hesitate\n" .string "to tell me, please!$" -SafariZone_South_Text_2A52EF: @ 82A52EF +SafariZone_South_Text_Boy: @ 82A52EF .string "Did you know?\p" .string "If you put a {POKEBLOCK} in that square box,\n" .string "POKéMON gather around.$" -SafariZone_South_Text_2A533B: @ 82A533B +SafariZone_South_Text_Man: @ 82A533B .string "I want to keep going deeper, but I\n" .string "forgot to bring a BIKE.\p" .string "Something tells me that rare POKéMON\n" .string "live in the outlying areas.$" -SafariZone_Southwest_Text_2A53B7: @ 82A53B7 +SafariZone_Southwest_Text_Woman: @ 82A53B7 .string "Sometimes, when I toss a {POKEBLOCK} at \n" .string "POKéMON, it gets ignored.\p" .string "Do POKéMON have likes and dislikes\n" .string "about what they eat?$" -SafariZone_Northwest_Text_2A542C: @ 82A542C +SafariZone_Northwest_Text_Man: @ 82A542C .string "Gasp… Gasp…\n" .string "I…made it out here…but…\p" .string "I'm exhausted… I don't have the\n" .string "energy to catch POKéMON…$" -SafariZone_North_Text_2A5489: @ 82A5489 +SafariZone_North_Text_Fisherman: @ 82A5489 .string "I'm on a mission to find WATER POKéMON\n" .string "you don't see in HOENN.\p" .string "Do you have any idea where the lake is?$" -SafariZone_North_Text_2A54F0: @ 82A54F0 +SafariZone_North_Text_Man: @ 82A54F0 .string "I'm going to catch a lot of rare POKéMON\n" .string "here and trade them with my friends!$" -SafariZone_South_Text_2A553E: @ 82A553E +SafariZone_South_Text_Youngster: @ 82A553E .string "I put a {POKEBLOCK} on the {POKEBLOCK} FEEDER.\n" .string "But it seems to have disappeared.\p" .string "I guess POKéMON must have eaten it\n" .string "without me noticing.$" -Route121_SafariZoneEntrance_Text_2A55BB: @ 82A55BB +Route121_SafariZoneEntrance_Text_TrainerTip: @ 82A55BB .string "SAFARI ZONE TRAINER TIP!\p" .string "Throw {POKEBLOCK}S at wild POKéMON to make\n" .string "them less likely to flee.$" -SafariZone_Southwest_Text_2A5613: @ 82A5613 +SafariZone_Southwest_Text_RestHouseSign: @ 82A5613 .string "“Relieve your tired feet.”\n" .string "REST HOUSE$" -SafariZone_RestHouse_Text_2A5639: @ 82A5639 +SafariZone_RestHouse_Text_Youngster: @ 82A5639 .string "I don't have any {POKEBLOCK}S, but I caught\n" .string "a good number of POKéMON.\p" .string "You can improve your chances of making\n" .string "a catch by getting closer to them\l" .string "before throwing a SAFARI BALL.$" -SafariZone_RestHouse_Text_2A56E1: @ 82A56E1 +SafariZone_RestHouse_Text_PsychicM: @ 82A56E1 .string "If you use {POKEBLOCK}S, wild POKéMON won't\n" .string "be so quick to run away.\p" .string "It's not much use to give {POKEBLOCK}S to\n" .string "POKéMON that don't flee easily.$" -SafariZone_RestHouse_Text_2A5764: @ 82A5764 +SafariZone_RestHouse_Text_FatMan: @ 82A5764 .string "If you put a {POKEBLOCK} on the FEEDER,\n" .string "POKéMON are attracted to it.\p" .string "I think POKéMON with the same sort of\n" .string "nature are drawn by a certain {POKEBLOCK}.$" -SafariZone_South_Text_2A57EE: @ 82A57EE +SafariZone_South_Text_AreaOffLimits1: @ 82A57EE .string "This area is still under construction.\n" .string "It's off-limits, sorry!$" -SafariZone_Southeast_Text_2A582D: @ 82A582D +SafariZone_Southeast_Text_ExpansionIsFinished: @ 82A582D .string "The SAFARI ZONE's expansion project\n" .string "is finished now.\p" .string "We hope you will enjoy the new area.$" -SafariZone_South_Text_2A5887: @ 82A5887 +SafariZone_South_Text_AreaOffLimits2: @ 82A5887 .string "This area is still under construction.\n" .string "It's off-limits, sorry!$" -SafariZone_Southeast_Text_2A58C6: @ 82A58C6 +SafariZone_Southeast_Text_LittleGirl: @ 82A58C6 .string "Wow! Whee! I haven't seen any of\n" .string "these POKéMON before!$" -SafariZone_Southeast_Text_2A58FD: @ 82A58FD +SafariZone_Southeast_Text_FatMan: @ 82A58FD .string "The POKéMON in this area are all\n" .string "new to me.\p" .string "And I'm allowed to catch these rare\n" .string "POKéMON! Too cool!$" -SafariZone_Southeast_Text_2A5960: @ 82A5960 +SafariZone_Southeast_Text_RichBoy: @ 82A5960 .string "The POKéMON around here seem to be\n" .string "from somewhere other than HOENN.$" -SafariZone_Northeast_Text_2A59A4: @ 82A59A4 +SafariZone_Northeast_Text_Boy: @ 82A59A4 .string "I only have a couple SAFARI BALLS left.\p" .string "I'm having a hard time trying to\n" .string "decide what I should catch.$" -SafariZone_Northeast_Text_2A5A09: @ 82A5A09 +SafariZone_Northeast_Text_Woman: @ 82A5A09 .string "I heard that you can see PIKACHU here.\n" .string "Where might one be?$" -SafariZone_Northeast_Text_2A5A44: @ 82A5A44 +SafariZone_Northeast_Text_Girl: @ 82A5A44 .string "Oh, boo!\n" .string "I can't seem to catch anything!\p" .string "I'll end up wasting the admission\n" diff --git a/include/constants/vars.h b/include/constants/vars.h index f9bfb2ad58..cfafccd9b8 100644 --- a/include/constants/vars.h +++ b/include/constants/vars.h @@ -178,7 +178,7 @@ #define VAR_UNUSED_0x40A1 0x40A1 // Unused var #define VAR_SEAFLOOR_CAVERN_STATE 0x40A2 #define VAR_CABLE_CAR_STATION_STATE 0x40A3 -#define VAR_SAFARI_ZONE_STATE 0x40A4 +#define VAR_SAFARI_ZONE_STATE 0x40A4 // 0: In or out of SZ, 1: Player exiting SZ, 2: Player entering SZ #define VAR_TRICK_HOUSE_ENTRANCE_STATE_1 0x40A5 #define VAR_TRICK_HOUSE_ENTRANCE_STATE_2 0x40A6 #define VAR_TRICK_HOUSE_ENTRANCE_STATE_3 0x40A7 diff --git a/src/safari_zone.c b/src/safari_zone.c index 703c3d0cde..e8827e1246 100644 --- a/src/safari_zone.c +++ b/src/safari_zone.c @@ -23,10 +23,10 @@ struct PokeblockFeeder #define NUM_POKEBLOCK_FEEDERS 10 -extern const u8 EventScript_2A4B8A[]; -extern const u8 EventScript_2A4B6F[]; -extern const u8 EventScript_2A4B4C[]; -extern const u8 EventScript_2A4B9B[]; +extern const u8 SafariZone_EventScript_TimesUp[]; +extern const u8 SafariZone_EventScript_RetirePrompt[]; +extern const u8 SafariZone_EventScript_OutOfBallsMidBattle[]; +extern const u8 SafariZone_EventScript_OutOfBalls[]; EWRAM_DATA u8 gNumSafariBalls = 0; EWRAM_DATA static u16 sSafariZoneStepCounter = 0; @@ -83,7 +83,7 @@ bool8 SafariZoneTakeStep(void) sSafariZoneStepCounter--; if (sSafariZoneStepCounter == 0) { - ScriptContext1_SetupScript(EventScript_2A4B8A); + ScriptContext1_SetupScript(SafariZone_EventScript_TimesUp); return TRUE; } return FALSE; @@ -91,7 +91,7 @@ bool8 SafariZoneTakeStep(void) void SafariZoneRetirePrompt(void) { - ScriptContext1_SetupScript(EventScript_2A4B6F); + ScriptContext1_SetupScript(SafariZone_EventScript_RetirePrompt); } void CB2_EndSafariBattle(void) @@ -105,14 +105,14 @@ void CB2_EndSafariBattle(void) } else if (gBattleOutcome == B_OUTCOME_NO_SAFARI_BALLS) { - ScriptContext2_RunNewScript(EventScript_2A4B4C); + ScriptContext2_RunNewScript(SafariZone_EventScript_OutOfBallsMidBattle); WarpIntoMap(); gFieldCallback = sub_80AF6F0; SetMainCallback2(CB2_LoadMap); } else if (gBattleOutcome == B_OUTCOME_CAUGHT) { - ScriptContext1_SetupScript(EventScript_2A4B9B); + ScriptContext1_SetupScript(SafariZone_EventScript_OutOfBalls); ScriptContext1_Stop(); SetMainCallback2(CB2_ReturnToFieldContinueScriptPlayMapMusic); } From 49ad6da8fb5b0f579463fac4de95c391c9dc73e2 Mon Sep 17 00:00:00 2001 From: Sewef Date: Sun, 20 Oct 2019 10:47:56 +0200 Subject: [PATCH 04/46] starting battle_anim_effects_2 --- data/battle_anim_scripts.s | 36 ++++----- include/battle_anim.h | 4 +- src/battle_anim_effects_2.c | 142 +++++++++++++++++++----------------- src/battle_anim_effects_3.c | 2 +- src/battle_anim_mons.c | 8 +- src/water.c | 14 ++-- 6 files changed, 106 insertions(+), 100 deletions(-) diff --git a/data/battle_anim_scripts.s b/data/battle_anim_scripts.s index cab5e182b1..e066836b6f 100644 --- a/data/battle_anim_scripts.s +++ b/data/battle_anim_scripts.s @@ -1885,11 +1885,11 @@ Move_PAY_DAY: monbgprio_28 ANIM_TARGET setalpha 12, 8 playsewithpan SE_W013B, SOUND_PAN_ATTACKER - createsprite gUnknown_085934D8, ANIM_ATTACKER, 2, 20, 0, 0, 0, 1152 + createsprite gCoinThrowSpriteTemplate, ANIM_ATTACKER, 2, 20, 0, 0, 0, 1152 waitforvisualfinish playsewithpan SE_W006, SOUND_PAN_TARGET createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 1, 0, 0, 1, 2 - createsprite gUnknown_085934F0, ANIM_ATTACKER, 2 + createsprite gFallingCoinSpriteTemplate, ANIM_ATTACKER, 2 createvisualtask AnimTask_ShakeMon2, 2, ANIM_TARGET, 1, 0, 6, 1 waitforvisualfinish clearmonbg ANIM_TARGET @@ -4196,7 +4196,7 @@ Move_AIR_CUTTER: monbg ANIM_DEF_PARTNER setalpha 12, 8 delay 0 - createvisualtask sub_8103CF0, 2, 32, -24, 1536, 2, 128 + createvisualtask AnimTask_AirCutterProjectile, 2, 32, -24, 1536, 2, 128 waitforvisualfinish playsewithpan SE_W015, SOUND_PAN_TARGET createsprite gAirCutterSliceSpriteTemplate, ANIM_ATTACKER, 2, 40, -32, 0, 2 @@ -7320,7 +7320,7 @@ Move_EGG_BOMB: loadspritegfx ANIM_TAG_EXPLOSION loadspritegfx ANIM_TAG_LARGE_FRESH_EGG playsewithpan SE_W039, SOUND_PAN_ATTACKER - createsprite gUnknown_08593488, ANIM_TARGET, 2, 10, 0, 0, 0, 25, -32 + createsprite gEggThrowSpriteTemplate, ANIM_TARGET, 2, 10, 0, 0, 0, 25, -32 waitforvisualfinish createvisualtask AnimTask_ShakeMon2, 2, ANIM_TARGET, 4, 0, 16, 1 createsprite gBattleAnimSpriteTemplate_859371C, ANIM_TARGET, 4, 6, 5, 1, 0 @@ -8593,26 +8593,26 @@ Move_MUDDY_WATER: Move_BULLET_SEED: loadspritegfx ANIM_TAG_SEED - createsprite gUnknown_0859351C, ANIM_TARGET, 2, 20, 0 + createsprite gBulletSeedSpriteTemplate, ANIM_TARGET, 2, 20, 0 delay 5 - createsprite gUnknown_0859351C, ANIM_TARGET, 2, 20, 0 + createsprite gBulletSeedSpriteTemplate, ANIM_TARGET, 2, 20, 0 delay 5 - createsprite gUnknown_0859351C, ANIM_TARGET, 2, 20, 0 + createsprite gBulletSeedSpriteTemplate, ANIM_TARGET, 2, 20, 0 delay 5 createvisualtask AnimTask_ShakeMon2, 2, ANIM_TARGET, 2, 0, 30, 1 - createsprite gUnknown_0859351C, ANIM_TARGET, 2, 20, 0 + createsprite gBulletSeedSpriteTemplate, ANIM_TARGET, 2, 20, 0 delay 5 - createsprite gUnknown_0859351C, ANIM_TARGET, 2, 20, 0 + createsprite gBulletSeedSpriteTemplate, ANIM_TARGET, 2, 20, 0 delay 5 - createsprite gUnknown_0859351C, ANIM_TARGET, 2, 20, 0 + createsprite gBulletSeedSpriteTemplate, ANIM_TARGET, 2, 20, 0 delay 5 - createsprite gUnknown_0859351C, ANIM_TARGET, 2, 20, 0 + createsprite gBulletSeedSpriteTemplate, ANIM_TARGET, 2, 20, 0 delay 5 - createsprite gUnknown_0859351C, ANIM_TARGET, 2, 20, 0 + createsprite gBulletSeedSpriteTemplate, ANIM_TARGET, 2, 20, 0 delay 5 - createsprite gUnknown_0859351C, ANIM_TARGET, 2, 20, 0 + createsprite gBulletSeedSpriteTemplate, ANIM_TARGET, 2, 20, 0 delay 5 - createsprite gUnknown_0859351C, ANIM_TARGET, 2, 20, 0 + createsprite gBulletSeedSpriteTemplate, ANIM_TARGET, 2, 20, 0 waitforvisualfinish end @@ -8858,7 +8858,7 @@ Move_METAL_SOUND: end MetalSound1: panse_1B SE_W103, SOUND_PAN_ATTACKER, SOUND_PAN_TARGET, +2, 0 - createsprite gUnknown_08593458, ANIM_TARGET, 2, 16, 0, 0, 0, 30, 0 + createsprite gMetalSoundSpriteTemplate, ANIM_TARGET, 2, 16, 0, 0, 0, 30, 0 delay 2 return @@ -9503,13 +9503,13 @@ Move_WATER_PULSE: playsewithpan SE_W145C, SOUND_PAN_TARGET waitforvisualfinish playsewithpan SE_W202, SOUND_PAN_ATTACKER - createsprite gUnknown_08593470, ANIM_TARGET, 2, 0, 0, 40, 15 + createsprite gWaterPulseRingSpriteTemplate, ANIM_TARGET, 2, 0, 0, 40, 15 delay 5 playsewithpan SE_W202, SOUND_PAN_ATTACKER - createsprite gUnknown_08593470, ANIM_TARGET, 2, 0, 0, 40, 15 + createsprite gWaterPulseRingSpriteTemplate, ANIM_TARGET, 2, 0, 0, 40, 15 delay 5 playsewithpan SE_W202, SOUND_PAN_ATTACKER - createsprite gUnknown_08593470, ANIM_TARGET, 2, 0, 0, 40, 15 + createsprite gWaterPulseRingSpriteTemplate, ANIM_TARGET, 2, 0, 0, 40, 15 delay 13 createvisualtask AnimTask_ShakeMon, 2, ANIM_TARGET, 0, 8, 18, 1 waitforvisualfinish diff --git a/include/battle_anim.h b/include/battle_anim.h index c62acd92d5..23f90f4317 100644 --- a/include/battle_anim.h +++ b/include/battle_anim.h @@ -147,7 +147,7 @@ void TranslateSpriteInCircleOverDuration(struct Sprite *sprite); void SetGreyscaleOrOriginalPalette(u16 a1, bool8 a2); void PrepareAffineAnimInTaskData(struct Task *task, u8 spriteId, const union AffineAnimCmd *affineAnimCmds); bool8 RunAffineAnimFromTaskData(struct Task *task); -void sub_80A78AC(struct Sprite *sprite); +void AnimThrowProjectile(struct Sprite *sprite); void sub_80A6BFC(struct BattleAnimBgData *unk, u8 unused); u8 sub_80A8394(u16 species, bool8 isBackpic, u8 a3, s16 x, s16 y, u8 subpriority, u32 personality, u32 trainerId, u32 battlerId, u32 a10); void sub_80A749C(struct Sprite *sprite); @@ -225,7 +225,7 @@ void SetSpriteNextToMonHead(u8 battler, struct Sprite* sprite); void AnimMoveTwisterParticle(struct Sprite* sprite); // water.c -void sub_8108C94(struct Sprite *sprite); +void AnimWaterPulseRing(struct Sprite *sprite); // flying.c void sub_810E2C8(struct Sprite *sprite); diff --git a/src/battle_anim_effects_2.c b/src/battle_anim_effects_2.c index d0f161f5b3..322ddc430b 100755 --- a/src/battle_anim_effects_2.c +++ b/src/battle_anim_effects_2.c @@ -25,9 +25,9 @@ void Anim_SwordsDanceBlade(struct Sprite *); void AnimSonicBoomProjectile(struct Sprite *); void sub_8103AA4(struct Sprite *); void sub_8103FE8(struct Sprite *); -void sub_8104088(struct Sprite *); -void sub_810413C(struct Sprite *); -void sub_81041C4(struct Sprite *); +void AnimCoinThrow(struct Sprite *); +void AnimFallingCoin(struct Sprite *); +void AnimBulletSeed(struct Sprite *); void Anim_RazorWindTornado(struct Sprite *); void Anim_ViceGripPincer(struct Sprite *); void Anim_GuillotinePincer(struct Sprite *); @@ -63,9 +63,9 @@ static void sub_8103680(struct Sprite *); static void AnimTask_WithdrawStep(u8); static void Anim_SwordsDanceBladeStep(struct Sprite *); static void sub_8104018(struct Sprite *); -static void sub_8104154(struct Sprite *); -static void sub_810421C(struct Sprite *); -static void sub_81042A0(struct Sprite *); +static void AnimFallingCoin_Step(struct Sprite *); +static void AnimBulletSeed_Step1(struct Sprite *); +static void AnimBulletSeed_Step2(struct Sprite *); static void Anim_ViceGripPincerStep(struct Sprite *); static void Anim_GuillotinePincerStep1(struct Sprite *); static void Anim_GuillotinePincerStep2(struct Sprite *); @@ -105,6 +105,7 @@ static void sub_8106EC8(struct Sprite *); static void sub_8107018(struct Sprite *); static void sub_810703C(struct Sprite *); +// Unused const struct SpriteTemplate gUnknown_08593264 = { .tileTag = ANIM_TAG_FINGER, @@ -127,6 +128,7 @@ const union AnimCmd *const gUnknown_08593284[] = gUnknown_0859327C, }; +// Unused const struct SpriteTemplate gUnknown_08593288 = { .tileTag = ANIM_TAG_MUSIC_NOTES, @@ -138,6 +140,7 @@ const struct SpriteTemplate gUnknown_08593288 = .callback = sub_8103498, }; +// Unused const struct SpriteTemplate gUnknown_085932A0 = { .tileTag = 0, @@ -150,6 +153,7 @@ const struct SpriteTemplate gUnknown_085932A0 = }; extern const union AffineAnimCmd *const gUnknown_08597060[]; +// Unused const struct SpriteTemplate gUnknown_085932B8 = { .tileTag = ANIM_TAG_CLAMP, @@ -187,6 +191,7 @@ const union AffineAnimCmd *const gUnknown_08593300[] = gUnknown_085932E8, }; +// Unused const struct SpriteTemplate gUnknown_08593304 = { .tileTag = ANIM_TAG_EXPLOSION_6, @@ -198,7 +203,7 @@ const struct SpriteTemplate gUnknown_08593304 = .callback = AnimSparklingParticle, }; -const union AnimCmd gUnknown_0859331C[] = +const union AnimCmd gKinesisZapEnergyAnimCmds[] = { ANIMCMD_FRAME(0, 3, .hFlip = TRUE), ANIMCMD_FRAME(8, 3, .hFlip = TRUE), @@ -211,9 +216,9 @@ const union AnimCmd gUnknown_0859331C[] = ANIMCMD_END, }; -const union AnimCmd *const gUnknown_08593340[] = +const union AnimCmd *const gKinesisZapEnergyAnimTable[] = { - gUnknown_0859331C, + gKinesisZapEnergyAnimCmds, }; const struct SpriteTemplate gKinesisZapEnergySpriteTemplate = @@ -221,13 +226,13 @@ const struct SpriteTemplate gKinesisZapEnergySpriteTemplate = .tileTag = ANIM_TAG_ALERT, .paletteTag = ANIM_TAG_ALERT, .oam = &gOamData_AffineOff_ObjNormal_32x16, - .anims = gUnknown_08593340, + .anims = gKinesisZapEnergyAnimTable, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, .callback = Anim_KinesisZapEnergy, }; -const union AffineAnimCmd gUnknown_0859335C[] = +const union AffineAnimCmd gSwordsDanceBladeAffineAnimCmds[] = { AFFINEANIMCMD_FRAME(0x10, 0x100, 0, 0), AFFINEANIMCMD_FRAME(0x14, 0x0, 0, 12), @@ -235,9 +240,9 @@ const union AffineAnimCmd gUnknown_0859335C[] = AFFINEANIMCMD_END, }; -const union AffineAnimCmd *const gUnknown_0859337C[] = +const union AffineAnimCmd *const gSwordsDanceBladeAffineAnimTable[] = { - gUnknown_0859335C, + gSwordsDanceBladeAffineAnimCmds, }; const struct SpriteTemplate gSwordsDanceBladeSpriteTemplate = @@ -247,7 +252,7 @@ const struct SpriteTemplate gSwordsDanceBladeSpriteTemplate = .oam = &gOamData_AffineNormal_ObjBlend_32x64, .anims = gDummySpriteAnimTable, .images = NULL, - .affineAnims = gUnknown_0859337C, + .affineAnims = gSwordsDanceBladeAffineAnimTable, .callback = Anim_SwordsDanceBlade, }; @@ -262,7 +267,7 @@ const struct SpriteTemplate gSonicBoomSpriteTemplate = .callback = AnimSonicBoomProjectile, }; -const struct SpriteTemplate gUnknown_085933B0 = +const struct SpriteTemplate gAirWaveProjectileSpriteTemplate = { .tileTag = ANIM_TAG_AIR_WAVE, .paletteTag = ANIM_TAG_AIR_WAVE, @@ -273,14 +278,14 @@ const struct SpriteTemplate gUnknown_085933B0 = .callback = sub_8103AA4, }; -const union AffineAnimCmd gUnknown_085933C8[] = +const union AffineAnimCmd gGrowingRingAffineAnimCmds[] = { AFFINEANIMCMD_FRAME(0x20, 0x20, 0, 0), AFFINEANIMCMD_FRAME(0x7, 0x7, 0, -56), AFFINEANIMCMD_END, }; -const union AffineAnimCmd gUnknown_085933E0[] = +const union AffineAnimCmd gWaterPulseRingAffineAnimCmds[] = { AFFINEANIMCMD_FRAME(0x5, 0x5, 0, 10), AFFINEANIMCMD_FRAME(0xFFF6, 0xFFF6, 0, 10), @@ -292,14 +297,14 @@ const union AffineAnimCmd gUnknown_085933E0[] = AFFINEANIMCMD_END, }; -const union AffineAnimCmd *const gUnknown_08593420[] = +const union AffineAnimCmd *const gGrowingRingAffineAnimTable[] = { - gUnknown_085933C8, + gGrowingRingAffineAnimCmds, }; -const union AffineAnimCmd *const gUnknown_08593424[] = +const union AffineAnimCmd *const gWaterPulseRingAffineAnimTable[] = { - gUnknown_085933E0, + gWaterPulseRingAffineAnimCmds, }; const struct SpriteTemplate gSupersonicWaveSpriteTemplate = @@ -309,7 +314,7 @@ const struct SpriteTemplate gSupersonicWaveSpriteTemplate = .oam = &gOamData_AffineDouble_ObjNormal_16x32, .anims = gDummySpriteAnimTable, .images = NULL, - .affineAnims = gUnknown_08593420, + .affineAnims = gGrowingRingAffineAnimTable, .callback = TranslateAnimSpriteToTargetMonLocation, }; @@ -320,33 +325,33 @@ const struct SpriteTemplate gScreechWaveSpriteTemplate = .oam = &gOamData_AffineDouble_ObjNormal_16x32, .anims = gDummySpriteAnimTable, .images = NULL, - .affineAnims = gUnknown_08593420, + .affineAnims = gGrowingRingAffineAnimTable, .callback = TranslateAnimSpriteToTargetMonLocation, }; -const struct SpriteTemplate gUnknown_08593458 = +const struct SpriteTemplate gMetalSoundSpriteTemplate = { .tileTag = ANIM_TAG_METAL_SOUND_WAVES, .paletteTag = ANIM_TAG_METAL_SOUND_WAVES, .oam = &gOamData_AffineDouble_ObjNormal_32x64, .anims = gDummySpriteAnimTable, .images = NULL, - .affineAnims = gUnknown_08593420, + .affineAnims = gGrowingRingAffineAnimTable, .callback = TranslateAnimSpriteToTargetMonLocation, }; -const struct SpriteTemplate gUnknown_08593470 = +const struct SpriteTemplate gWaterPulseRingSpriteTemplate = { .tileTag = ANIM_TAG_BLUE_RING_2, .paletteTag = ANIM_TAG_BLUE_RING_2, .oam = &gOamData_AffineDouble_ObjNormal_16x32, .anims = gDummySpriteAnimTable, .images = NULL, - .affineAnims = gUnknown_08593424, - .callback = sub_8108C94, + .affineAnims = gWaterPulseRingAffineAnimTable, + .callback = AnimWaterPulseRing, }; -const struct SpriteTemplate gUnknown_08593488 = +const struct SpriteTemplate gEggThrowSpriteTemplate = { .tileTag = ANIM_TAG_LARGE_FRESH_EGG, .paletteTag = ANIM_TAG_LARGE_FRESH_EGG, @@ -354,9 +359,10 @@ const struct SpriteTemplate gUnknown_08593488 = .anims = gDummySpriteAnimTable, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_80A78AC, + .callback = AnimThrowProjectile, }; +// Unused const struct SpriteTemplate gUnknown_085934A0 = { .tileTag = ANIM_TAG_VOID_LINES, @@ -368,82 +374,82 @@ const struct SpriteTemplate gUnknown_085934A0 = .callback = sub_8103FE8, }; -const union AnimCmd gUnknown_085934B8[] = +const union AnimCmd gCoinAnimCmds[] = { ANIMCMD_FRAME(8, 1), ANIMCMD_END, }; -const union AnimCmd *const gUnknown_085934C0[] = +const union AnimCmd *const gCoinAnimTable[] = { - gUnknown_085934B8, + gCoinAnimCmds, }; -const union AffineAnimCmd gUnknown_085934C4[] = +const union AffineAnimCmd gFallingCoinAffineAnimCmds[] = { AFFINEANIMCMD_FRAME(0x0, 0x0, 10, 1), AFFINEANIMCMD_JUMP(0), }; -const union AffineAnimCmd *const gUnknown_085934D4[] = +const union AffineAnimCmd *const gFallingCoinAffineAnimTable[] = { - gUnknown_085934C4, + gFallingCoinAffineAnimCmds, }; -const struct SpriteTemplate gUnknown_085934D8 = +const struct SpriteTemplate gCoinThrowSpriteTemplate = { .tileTag = ANIM_TAG_COIN, .paletteTag = ANIM_TAG_COIN, .oam = &gOamData_AffineNormal_ObjNormal_16x16, - .anims = gUnknown_085934C0, + .anims = gCoinAnimTable, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_8104088, + .callback = AnimCoinThrow, }; -const struct SpriteTemplate gUnknown_085934F0 = +const struct SpriteTemplate gFallingCoinSpriteTemplate = { .tileTag = ANIM_TAG_COIN, .paletteTag = ANIM_TAG_COIN, .oam = &gOamData_AffineNormal_ObjNormal_16x16, - .anims = gUnknown_085934C0, + .anims = gCoinAnimTable, .images = NULL, - .affineAnims = gUnknown_085934D4, - .callback = sub_810413C, + .affineAnims = gFallingCoinAffineAnimTable, + .callback = AnimFallingCoin, }; -const union AffineAnimCmd gUnknown_08593508[] = +const union AffineAnimCmd gBulletSeedAffineAnimCmds[] = { AFFINEANIMCMD_FRAME(0x0, 0x0, 20, 1), AFFINEANIMCMD_JUMP(0), }; -const union AffineAnimCmd *const gUnknown_08593518[] = +const union AffineAnimCmd *const gBulletSeedAffineAnimTable[] = { - gUnknown_08593508, + gBulletSeedAffineAnimCmds, }; -const struct SpriteTemplate gUnknown_0859351C = +const struct SpriteTemplate gBulletSeedSpriteTemplate = { .tileTag = ANIM_TAG_SEED, .paletteTag = ANIM_TAG_SEED, .oam = &gOamData_AffineNormal_ObjNormal_16x16, .anims = gDummySpriteAnimTable, .images = NULL, - .affineAnims = gUnknown_08593518, - .callback = sub_81041C4, + .affineAnims = gBulletSeedAffineAnimTable, + .callback = AnimBulletSeed, }; -const union AffineAnimCmd gUnknown_08593534[] = +const union AffineAnimCmd gRazorWindTornadoAffineAnimCmds[] = { AFFINEANIMCMD_FRAME(0x10, 0x100, 0, 0), AFFINEANIMCMD_FRAME(0x4, 0x0, 0, 40), AFFINEANIMCMD_END, }; -const union AffineAnimCmd *const gUnknown_0859354C[] = +const union AffineAnimCmd *const gRazorWindTornadoAffineAnimTable[] = { - gUnknown_08593534, + gRazorWindTornadoAffineAnimCmds, }; const struct SpriteTemplate gRazorWindTornadoSpriteTemplate = @@ -453,7 +459,7 @@ const struct SpriteTemplate gRazorWindTornadoSpriteTemplate = .oam = &gOamData_AffineNormal_ObjNormal_32x64, .anims = gDummySpriteAnimTable, .images = NULL, - .affineAnims = gUnknown_0859354C, + .affineAnims = gRazorWindTornadoAffineAnimTable, .callback = Anim_RazorWindTornado, }; @@ -1592,19 +1598,19 @@ void sub_8103AA4(struct Sprite *sprite) } } -static void sub_8103BE4(u8 taskId) +static void AirCutterProjectileStep2(u8 taskId) { if (gTasks[taskId].data[1] == 0) DestroyAnimVisualTask(taskId); } -static void sub_8103C0C(u8 taskId) +static void AirCutterProjectileStep1(u8 taskId) { if (gTasks[taskId].data[0]-- <= 0) { u8 spriteId; struct Sprite *sprite; - spriteId = CreateSprite(&gUnknown_085933B0, gTasks[taskId].data[9], gTasks[taskId].data[10], gTasks[taskId].data[2] - gTasks[taskId].data[1]); + spriteId = CreateSprite(&gAirWaveProjectileSpriteTemplate, gTasks[taskId].data[9], gTasks[taskId].data[10], gTasks[taskId].data[2] - gTasks[taskId].data[1]); sprite = &gSprites[spriteId]; switch (gTasks[taskId].data[4]) { @@ -1623,11 +1629,11 @@ static void sub_8103C0C(u8 taskId) gTasks[taskId].data[1]++; PlaySE12WithPanning(SE_W059B, BattleAnimAdjustPanning(-63)); if (gTasks[taskId].data[1] > 2) - gTasks[taskId].func = sub_8103BE4; + gTasks[taskId].func = AirCutterProjectileStep2; } } -void sub_8103CF0(u8 taskId) +void AnimTask_AirCutterProjectile(u8 taskId) { s16 attackerY = 0; s16 attackerX = 0; @@ -1724,7 +1730,7 @@ void sub_8103CF0(u8 taskId) if (gTasks[taskId].data[2] < 3) gTasks[taskId].data[2] = 3; - gTasks[taskId].func = sub_8103C0C; + gTasks[taskId].func = AirCutterProjectileStep1; } void sub_8103FE8(struct Sprite *sprite) @@ -1754,7 +1760,7 @@ static void sub_8104018(struct Sprite *sprite) } } -void sub_8104088(struct Sprite *sprite) +void AnimCoinThrow(struct Sprite *sprite) { s16 r6; s16 r7; @@ -1777,14 +1783,14 @@ void sub_8104088(struct Sprite *sprite) StoreSpriteCallbackInData6(sprite, DestroyAnimSprite); } -void sub_810413C(struct Sprite *sprite) +void AnimFallingCoin(struct Sprite *sprite) { sprite->data[2] = -16; sprite->pos1.y += 8; - sprite->callback = sub_8104154; + sprite->callback = AnimFallingCoin_Step; } -static void sub_8104154(struct Sprite *sprite) +static void AnimFallingCoin_Step(struct Sprite *sprite) { sprite->data[0] += 0x80; sprite->pos2.x = sprite->data[0] >> 8; @@ -1802,7 +1808,7 @@ static void sub_8104154(struct Sprite *sprite) } } -void sub_81041C4(struct Sprite *sprite) +void AnimBulletSeed(struct Sprite *sprite) { InitSpritePosToAnimAttacker(sprite, TRUE); sprite->data[0] = 20; @@ -1810,10 +1816,10 @@ void sub_81041C4(struct Sprite *sprite) sprite->data[4] = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_Y_PIC_OFFSET); sprite->callback = StartAnimLinearTranslation; sprite->affineAnimPaused = 1; - StoreSpriteCallbackInData6(sprite, sub_810421C); + StoreSpriteCallbackInData6(sprite, AnimBulletSeed_Step1); } -static void sub_810421C(struct Sprite *sprite) +static void AnimBulletSeed_Step1(struct Sprite *sprite) { int i; u16 rand; @@ -1831,11 +1837,11 @@ static void sub_810421C(struct Sprite *sprite) sprite->data[6] = 0xFFF4 - (rand & 7); rand = Random2(); sprite->data[7] = (rand % 0xA0) + 0xA0; - sprite->callback = sub_81042A0; + sprite->callback = AnimBulletSeed_Step2; sprite->affineAnimPaused = 0; } -static void sub_81042A0(struct Sprite *sprite) +static void AnimBulletSeed_Step2(struct Sprite *sprite) { sprite->data[0] += sprite->data[7]; sprite->pos2.x = sprite->data[0] >> 8; diff --git a/src/battle_anim_effects_3.c b/src/battle_anim_effects_3.c index 3da8494122..5b313b53da 100755 --- a/src/battle_anim_effects_3.c +++ b/src/battle_anim_effects_3.c @@ -166,7 +166,7 @@ const struct SpriteTemplate gUnknown_085CE050 = .anims = gDummySpriteAnimTable, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_80A78AC, + .callback = AnimThrowProjectile, }; const union AnimCmd gUnknown_085CE068[] = diff --git a/src/battle_anim_mons.c b/src/battle_anim_mons.c index 6389f817be..4c4563d408 100644 --- a/src/battle_anim_mons.c +++ b/src/battle_anim_mons.c @@ -30,7 +30,7 @@ extern const struct OamData gOamData_AffineNormal_ObjNormal_64x64; static void sub_80A6FB4(struct Sprite *sprite); static void sub_80A7144(struct Sprite *sprite); -static void sub_80A791C(struct Sprite *sprite); +static void AnimThrowProjectile_Step(struct Sprite *sprite); static void sub_80A8DFC(struct Sprite *sprite); static void sub_80A8E88(struct Sprite *sprite); static u16 GetBattlerYDeltaFromSpriteId(u8 spriteId); @@ -1513,7 +1513,7 @@ void TranslateAnimSpriteToTargetMonLocation(struct Sprite *sprite) StoreSpriteCallbackInData6(sprite, DestroyAnimSprite); } -void sub_80A78AC(struct Sprite *sprite) +void AnimThrowProjectile(struct Sprite *sprite) { InitSpritePosToAnimAttacker(sprite, 1); if (GetBattlerSide(gBattleAnimAttacker)) @@ -1523,10 +1523,10 @@ void sub_80A78AC(struct Sprite *sprite) sprite->data[4] = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_Y_PIC_OFFSET) + gBattleAnimArgs[3]; sprite->data[5] = gBattleAnimArgs[5]; InitAnimArcTranslation(sprite); - sprite->callback = sub_80A791C; + sprite->callback = AnimThrowProjectile_Step; } -static void sub_80A791C(struct Sprite *sprite) +static void AnimThrowProjectile_Step(struct Sprite *sprite) { if (TranslateAnimHorizontalArc(sprite)) DestroyAnimSprite(sprite); diff --git a/src/water.c b/src/water.c index 615dc5c98e..a2fe4c56f1 100644 --- a/src/water.c +++ b/src/water.c @@ -39,7 +39,7 @@ void sub_8108B94(struct Sprite *); void sub_8108BE0(struct Sprite *); void sub_8108C08(struct Sprite *); void sub_8108C54(struct Sprite *); -void sub_8108CDC(struct Sprite *); +void AnimWaterPulseRing_Step(struct Sprite *); void sub_810756C(u8); void sub_81076F4(u8); void sub_8107B84(u8); @@ -54,7 +54,7 @@ void sub_810871C(struct Task*, u8); void sub_8108AC0(struct Task*); void sub_8108D54(struct Sprite*, int, int); -extern const union AffineAnimCmd *const gUnknown_08593420[]; +extern const union AffineAnimCmd *const gGrowingRingAffineAnimTable[]; extern const union AffineAnimCmd *const gUnknown_08596208[]; extern const union AnimCmd *const gUnknown_08595AB8[]; @@ -257,7 +257,7 @@ const struct SpriteTemplate gUnknown_08595170 = .oam = &gOamData_AffineDouble_ObjNormal_16x32, .anims = gDummySpriteAnimTable, .images = NULL, - .affineAnims = gUnknown_08593420, + .affineAnims = gGrowingRingAffineAnimTable, .callback = sub_81075EC, }; @@ -337,7 +337,7 @@ const struct SpriteTemplate gUnknown_08595208 = .anims = gUnknown_08595200, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_80A78AC, + .callback = AnimThrowProjectile, }; const struct SpriteTemplate gUnknown_08595220 = @@ -1975,17 +1975,17 @@ void sub_8108C54(struct Sprite *sprite) } } -void sub_8108C94(struct Sprite *sprite) +void AnimWaterPulseRing(struct Sprite *sprite) { InitSpritePosToAnimAttacker(sprite, TRUE); sprite->data[1] = GetBattlerSpriteCoord(gBattleAnimTarget, 2); sprite->data[2] = GetBattlerSpriteCoord(gBattleAnimTarget, 3); sprite->data[3] = gBattleAnimArgs[2]; sprite->data[4] = gBattleAnimArgs[3]; - sprite->callback = sub_8108CDC; + sprite->callback = AnimWaterPulseRing_Step; } -void sub_8108CDC(struct Sprite *sprite) +void AnimWaterPulseRing_Step(struct Sprite *sprite) { int xDiff = sprite->data[1] - sprite->pos1.x; int yDiff = sprite->data[2] - sprite->pos1.y; From 3b0d9e134fe1c392298710c6162e19d24c5660ef Mon Sep 17 00:00:00 2001 From: Sewef Date: Sun, 20 Oct 2019 11:01:12 +0200 Subject: [PATCH 05/46] battle_anims_effects_2 --- data/battle_anim_scripts.s | 70 +++++++++--------- include/battle_anim.h | 2 +- src/battle_anim_effects_2.c | 140 ++++++++++++++++++------------------ src/battle_anim_mons.c | 2 +- src/fight.c | 2 +- src/fire.c | 4 +- 6 files changed, 110 insertions(+), 110 deletions(-) diff --git a/data/battle_anim_scripts.s b/data/battle_anim_scripts.s index e066836b6f..509c80d246 100644 --- a/data/battle_anim_scripts.s +++ b/data/battle_anim_scripts.s @@ -1469,19 +1469,19 @@ Move_SELF_DESTRUCT: end SelfDestruct1: playsewithpan SE_W120, SOUND_PAN_ATTACKER - createsprite gBattleAnimSpriteTemplate_859371C, ANIM_ATTACKER, 3, 0, 0, 0, 1 + createsprite gExplosionSpriteTemplate, ANIM_ATTACKER, 3, 0, 0, 0, 1 delay 6 playsewithpan SE_W120, SOUND_PAN_ATTACKER - createsprite gBattleAnimSpriteTemplate_859371C, ANIM_ATTACKER, 3, 24, -24, 0, 1 + createsprite gExplosionSpriteTemplate, ANIM_ATTACKER, 3, 24, -24, 0, 1 delay 6 playsewithpan SE_W120, SOUND_PAN_ATTACKER - createsprite gBattleAnimSpriteTemplate_859371C, ANIM_ATTACKER, 3, -16, 16, 0, 1 + createsprite gExplosionSpriteTemplate, ANIM_ATTACKER, 3, -16, 16, 0, 1 delay 6 playsewithpan SE_W120, SOUND_PAN_ATTACKER - createsprite gBattleAnimSpriteTemplate_859371C, ANIM_ATTACKER, 3, -24, -12, 0, 1 + createsprite gExplosionSpriteTemplate, ANIM_ATTACKER, 3, -24, -12, 0, 1 delay 6 playsewithpan SE_W120, SOUND_PAN_ATTACKER - createsprite gBattleAnimSpriteTemplate_859371C, ANIM_ATTACKER, 3, 16, 16, 0, 1 + createsprite gExplosionSpriteTemplate, ANIM_ATTACKER, 3, 16, 16, 0, 1 delay 6 return @@ -1637,19 +1637,19 @@ Move_EXPLOSION: end Explosion1: playsewithpan SE_W153, SOUND_PAN_ATTACKER - createsprite gBattleAnimSpriteTemplate_859371C, ANIM_ATTACKER, 3, 0, 0, 0, 1 + createsprite gExplosionSpriteTemplate, ANIM_ATTACKER, 3, 0, 0, 0, 1 delay 6 playsewithpan SE_W153, SOUND_PAN_ATTACKER - createsprite gBattleAnimSpriteTemplate_859371C, ANIM_ATTACKER, 3, 24, -24, 0, 1 + createsprite gExplosionSpriteTemplate, ANIM_ATTACKER, 3, 24, -24, 0, 1 delay 6 playsewithpan SE_W153, SOUND_PAN_ATTACKER - createsprite gBattleAnimSpriteTemplate_859371C, ANIM_ATTACKER, 3, -16, 16, 0, 1 + createsprite gExplosionSpriteTemplate, ANIM_ATTACKER, 3, -16, 16, 0, 1 delay 6 playsewithpan SE_W153, SOUND_PAN_ATTACKER - createsprite gBattleAnimSpriteTemplate_859371C, ANIM_ATTACKER, 3, -24, -12, 0, 1 + createsprite gExplosionSpriteTemplate, ANIM_ATTACKER, 3, -24, -12, 0, 1 delay 6 playsewithpan SE_W153, SOUND_PAN_ATTACKER - createsprite gBattleAnimSpriteTemplate_859371C, ANIM_ATTACKER, 3, 16, 16, 0, 1 + createsprite gExplosionSpriteTemplate, ANIM_ATTACKER, 3, 16, 16, 0, 1 delay 6 return @@ -2531,7 +2531,7 @@ HornDrillInContest: Move_THRASH: loadspritegfx ANIM_TAG_IMPACT loadspritegfx ANIM_TAG_HANDS_AND_FEET - createvisualtask sub_8104C38, 2 + createvisualtask AnimTask_ThrashMoveMon, 2 createvisualtask sub_8104CA4, 2 createsprite gUnknown_08595EB0, ANIM_TARGET, 3, 1, 10, 0 createvisualtask AnimTask_ShakeMonInPlace, 2, ANIM_TARGET, 4, 0, 7, 1 @@ -3063,7 +3063,7 @@ Move_SKETCH: loadspritegfx ANIM_TAG_PENCIL monbg ANIM_TARGET createvisualtask sub_8104E74, 2 - createsprite gUnknown_085936D4, ANIM_TARGET, 2 + createsprite gPencilSpriteTemplate, ANIM_TARGET, 2 waitforvisualfinish clearmonbg ANIM_TARGET createvisualtask AnimTask_Splash, 2, 0, 2 @@ -5010,9 +5010,9 @@ Snore1: createvisualtask AnimTask_ScaleMonAndRestore, 5, -7, -7, 7, ANIM_ATTACKER, 1 createvisualtask AnimTask_ShakeMon2, 2, ANIM_TARGET, 4, 0, 7, 1 createsprite gBattleAnimSpriteTemplate_85972D8, ANIM_ATTACKER, 2, 6, 1, 14, 0, 0 - createsprite gUnknown_085936EC, ANIM_ATTACKER, 2, 0, 0, -42, -38, 24, 0, 0 - createsprite gUnknown_085936EC, ANIM_ATTACKER, 2, 0, 0, 0, -42, 24, 0, 0 - createsprite gUnknown_085936EC, ANIM_ATTACKER, 2, 0, 0, 42, -38, 24, 0, 0 + createsprite gSnoreZSpriteTemplate, ANIM_ATTACKER, 2, 0, 0, -42, -38, 24, 0, 0 + createsprite gSnoreZSpriteTemplate, ANIM_ATTACKER, 2, 0, 0, 0, -42, 24, 0, 0 + createsprite gSnoreZSpriteTemplate, ANIM_ATTACKER, 2, 0, 0, 42, -38, 24, 0, 0 return Move_LIGHT_SCREEN: @@ -6580,19 +6580,19 @@ Move_DYNAMIC_PUNCH: waitsound playsewithpan SE_W120, SOUND_PAN_TARGET createvisualtask AnimTask_ShakeMon2, 5, ANIM_TARGET, 5, 0, 28, 1 - createsprite gBattleAnimSpriteTemplate_859371C, ANIM_ATTACKER, 3, 0, 0, 1, 1 + createsprite gExplosionSpriteTemplate, ANIM_ATTACKER, 3, 0, 0, 1, 1 delay 6 playsewithpan SE_W120, SOUND_PAN_TARGET - createsprite gBattleAnimSpriteTemplate_859371C, ANIM_ATTACKER, 3, 24, -24, 1, 1 + createsprite gExplosionSpriteTemplate, ANIM_ATTACKER, 3, 24, -24, 1, 1 delay 6 playsewithpan SE_W120, SOUND_PAN_TARGET - createsprite gBattleAnimSpriteTemplate_859371C, ANIM_ATTACKER, 3, -16, 16, 1, 1 + createsprite gExplosionSpriteTemplate, ANIM_ATTACKER, 3, -16, 16, 1, 1 delay 6 playsewithpan SE_W120, SOUND_PAN_TARGET - createsprite gBattleAnimSpriteTemplate_859371C, ANIM_ATTACKER, 3, -24, -12, 1, 1 + createsprite gExplosionSpriteTemplate, ANIM_ATTACKER, 3, -24, -12, 1, 1 delay 6 playsewithpan SE_W120, SOUND_PAN_TARGET - createsprite gBattleAnimSpriteTemplate_859371C, ANIM_ATTACKER, 3, 16, 16, 1, 1 + createsprite gExplosionSpriteTemplate, ANIM_ATTACKER, 3, 16, 16, 1, 1 waitforvisualfinish clearmonbg ANIM_DEF_PARTNER blendoff @@ -7323,19 +7323,19 @@ Move_EGG_BOMB: createsprite gEggThrowSpriteTemplate, ANIM_TARGET, 2, 10, 0, 0, 0, 25, -32 waitforvisualfinish createvisualtask AnimTask_ShakeMon2, 2, ANIM_TARGET, 4, 0, 16, 1 - createsprite gBattleAnimSpriteTemplate_859371C, ANIM_TARGET, 4, 6, 5, 1, 0 + createsprite gExplosionSpriteTemplate, ANIM_TARGET, 4, 6, 5, 1, 0 playsewithpan SE_W120, SOUND_PAN_TARGET delay 3 - createsprite gBattleAnimSpriteTemplate_859371C, ANIM_TARGET, 4, -16, -15, 1, 0 + createsprite gExplosionSpriteTemplate, ANIM_TARGET, 4, -16, -15, 1, 0 playsewithpan SE_W120, SOUND_PAN_TARGET delay 3 - createsprite gBattleAnimSpriteTemplate_859371C, ANIM_TARGET, 4, 16, -5, 1, 0 + createsprite gExplosionSpriteTemplate, ANIM_TARGET, 4, 16, -5, 1, 0 playsewithpan SE_W120, SOUND_PAN_TARGET delay 3 - createsprite gBattleAnimSpriteTemplate_859371C, ANIM_TARGET, 4, -12, 18, 1, 0 + createsprite gExplosionSpriteTemplate, ANIM_TARGET, 4, -12, 18, 1, 0 playsewithpan SE_W120, SOUND_PAN_TARGET delay 3 - createsprite gBattleAnimSpriteTemplate_859371C, ANIM_TARGET, 4, 0, 5, 1, 0 + createsprite gExplosionSpriteTemplate, ANIM_TARGET, 4, 0, 5, 1, 0 playsewithpan SE_W120, SOUND_PAN_TARGET delay 3 waitforvisualfinish @@ -7870,19 +7870,19 @@ Move_PRESENT: PresentDamage: loadspritegfx ANIM_TAG_EXPLOSION playsewithpan SE_W120, SOUND_PAN_TARGET - createsprite gBattleAnimSpriteTemplate_859371C, ANIM_TARGET, 3, 0, 0, 1, 1 + createsprite gExplosionSpriteTemplate, ANIM_TARGET, 3, 0, 0, 1, 1 delay 6 playsewithpan SE_W120, SOUND_PAN_TARGET - createsprite gBattleAnimSpriteTemplate_859371C, ANIM_TARGET, 3, 24, -24, 1, 1 + createsprite gExplosionSpriteTemplate, ANIM_TARGET, 3, 24, -24, 1, 1 delay 6 playsewithpan SE_W120, SOUND_PAN_TARGET - createsprite gBattleAnimSpriteTemplate_859371C, ANIM_TARGET, 3, -16, 16, 1, 1 + createsprite gExplosionSpriteTemplate, ANIM_TARGET, 3, -16, 16, 1, 1 delay 6 playsewithpan SE_W120, SOUND_PAN_TARGET - createsprite gBattleAnimSpriteTemplate_859371C, ANIM_TARGET, 3, -24, -12, 1, 1 + createsprite gExplosionSpriteTemplate, ANIM_TARGET, 3, -24, -12, 1, 1 delay 6 playsewithpan SE_W120, SOUND_PAN_TARGET - createsprite gBattleAnimSpriteTemplate_859371C, ANIM_TARGET, 3, 16, 16, 1, 1 + createsprite gExplosionSpriteTemplate, ANIM_TARGET, 3, 16, 16, 1, 1 end PresentHeal: @@ -10599,19 +10599,19 @@ General_DoomDesireHit: delay 25 createvisualtask AnimTask_ShakeMonInPlace, 2, ANIM_TARGET, 10, 0, 20, 1 playsewithpan SE_W120, SOUND_PAN_TARGET - createsprite gBattleAnimSpriteTemplate_859371C, ANIM_ATTACKER, 3, 0, 0, 1, 1 + createsprite gExplosionSpriteTemplate, ANIM_ATTACKER, 3, 0, 0, 1, 1 delay 6 playsewithpan SE_W120, SOUND_PAN_TARGET - createsprite gBattleAnimSpriteTemplate_859371C, ANIM_ATTACKER, 3, 24, -24, 1, 1 + createsprite gExplosionSpriteTemplate, ANIM_ATTACKER, 3, 24, -24, 1, 1 delay 6 playsewithpan SE_W120, SOUND_PAN_TARGET - createsprite gBattleAnimSpriteTemplate_859371C, ANIM_ATTACKER, 3, -16, 16, 1, 1 + createsprite gExplosionSpriteTemplate, ANIM_ATTACKER, 3, -16, 16, 1, 1 delay 6 playsewithpan SE_W120, SOUND_PAN_TARGET - createsprite gBattleAnimSpriteTemplate_859371C, ANIM_ATTACKER, 3, -24, -12, 1, 1 + createsprite gExplosionSpriteTemplate, ANIM_ATTACKER, 3, -24, -12, 1, 1 delay 6 playsewithpan SE_W120, SOUND_PAN_TARGET - createsprite gBattleAnimSpriteTemplate_859371C, ANIM_ATTACKER, 3, 16, 16, 1, 1 + createsprite gExplosionSpriteTemplate, ANIM_ATTACKER, 3, 16, 16, 1, 1 waitforvisualfinish createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 3, 16, 0, RGB_WHITE waitforvisualfinish diff --git a/include/battle_anim.h b/include/battle_anim.h index 23f90f4317..69a1073bae 100644 --- a/include/battle_anim.h +++ b/include/battle_anim.h @@ -101,7 +101,7 @@ void SetAnimSpriteInitialXOffset(struct Sprite *sprite, s16 a2); s16 GetBattlerSpriteCoordAttr(u8 battlerId, u8 a2); u8 GetBattlerYCoordWithElevation(u8 battlerId); void WaitAnimForDuration(struct Sprite *sprite); -void sub_80A7938(struct Sprite *sprite); +void AnimSnoreZ(struct Sprite *sprite); void InitAnimLinearTranslation(struct Sprite *sprite); void sub_80A6F98(struct Sprite *sprite); u8 GetBattlerSpriteBGPriority(u8 battlerId); diff --git a/src/battle_anim_effects_2.c b/src/battle_anim_effects_2.c index 322ddc430b..f80b412dcc 100755 --- a/src/battle_anim_effects_2.c +++ b/src/battle_anim_effects_2.c @@ -28,12 +28,12 @@ void sub_8103FE8(struct Sprite *); void AnimCoinThrow(struct Sprite *); void AnimFallingCoin(struct Sprite *); void AnimBulletSeed(struct Sprite *); -void Anim_RazorWindTornado(struct Sprite *); -void Anim_ViceGripPincer(struct Sprite *); -void Anim_GuillotinePincer(struct Sprite *); -void Anim_BreathPuff(struct Sprite *); -void Anim_AngerMark(struct Sprite *); -void sub_810501C(struct Sprite *); +void AnimRazorWindTornado(struct Sprite *); +void AnimViceGripPincer(struct Sprite *); +void AnimGuillotinePincer(struct Sprite *); +void AnimBreathPuff(struct Sprite *); +void AnimAngerMark(struct Sprite *); +void AnimPencil(struct Sprite *); void sub_81051C4(struct Sprite *); void sub_81052A4(struct Sprite *); void sub_81054E8(struct Sprite *); @@ -66,20 +66,20 @@ static void sub_8104018(struct Sprite *); static void AnimFallingCoin_Step(struct Sprite *); static void AnimBulletSeed_Step1(struct Sprite *); static void AnimBulletSeed_Step2(struct Sprite *); -static void Anim_ViceGripPincerStep(struct Sprite *); -static void Anim_GuillotinePincerStep1(struct Sprite *); -static void Anim_GuillotinePincerStep2(struct Sprite *); -static void Anim_GuillotinePincerStep3(struct Sprite *); +static void AnimViceGripPincerStep(struct Sprite *); +static void AnimGuillotinePincerStep1(struct Sprite *); +static void AnimGuillotinePincerStep2(struct Sprite *); +static void AnimGuillotinePincerStep3(struct Sprite *); static void AnimTask_GrowAndGreyscaleStep(u8); static void AnimTask_MinimizeStep1(u8); static void CreateMinimizeSprite(struct Task *, u8); static void ClonedMinizeSprite_Step(struct Sprite *); static void AnimTask_SplashStep(u8); static void AnimTask_GrowAndShrinkStep(u8); -static void sub_8104C78(u8); +static void ThrashMoveMonStep(u8); static void sub_8104D28(u8); static void sub_8104F54(u8); -static void sub_8105078(struct Sprite *); +static void AnimPencil_Step(struct Sprite *); static void sub_810557C(struct Sprite *); static void sub_81055F4(struct Sprite *); static void sub_810561C(struct Sprite *); @@ -460,10 +460,10 @@ const struct SpriteTemplate gRazorWindTornadoSpriteTemplate = .anims = gDummySpriteAnimTable, .images = NULL, .affineAnims = gRazorWindTornadoAffineAnimTable, - .callback = Anim_RazorWindTornado, + .callback = AnimRazorWindTornado, }; -const union AnimCmd gUnknown_08593568[] = +const union AnimCmd gViceGripAnimCmds1[] = { ANIMCMD_FRAME(0, 3), ANIMCMD_FRAME(16, 3), @@ -471,7 +471,7 @@ const union AnimCmd gUnknown_08593568[] = ANIMCMD_END, }; -const union AnimCmd gUnknown_08593578[] = +const union AnimCmd gViceGripAnimCmds2[] = { ANIMCMD_FRAME(0, 3, .vFlip = TRUE, .hFlip = TRUE), ANIMCMD_FRAME(16, 3, .vFlip = TRUE, .hFlip = TRUE), @@ -479,10 +479,10 @@ const union AnimCmd gUnknown_08593578[] = ANIMCMD_END, }; -const union AnimCmd *const gUnknown_08593588[] = +const union AnimCmd *const gViceGripAnimTable[] = { - gUnknown_08593568, - gUnknown_08593578, + gViceGripAnimCmds1, + gViceGripAnimCmds2, }; const struct SpriteTemplate gViceGripSpriteTemplate = @@ -490,13 +490,13 @@ const struct SpriteTemplate gViceGripSpriteTemplate = .tileTag = ANIM_TAG_CUT, .paletteTag = ANIM_TAG_CUT, .oam = &gOamData_AffineOff_ObjBlend_32x32, - .anims = gUnknown_08593588, + .anims = gViceGripAnimTable, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = Anim_ViceGripPincer, + .callback = AnimViceGripPincer, }; -const union AnimCmd gUnknown_085935A8[] = +const union AnimCmd gGuillotineAnimCmds1[] = { ANIMCMD_FRAME(0, 2), ANIMCMD_FRAME(16, 2), @@ -504,7 +504,7 @@ const union AnimCmd gUnknown_085935A8[] = ANIMCMD_END, }; -const union AnimCmd gUnknown_085935B8[] = +const union AnimCmd gGuillotineAnimCmds2[] = { ANIMCMD_FRAME(0, 2, .vFlip = TRUE, .hFlip = TRUE), ANIMCMD_FRAME(16, 2, .vFlip = TRUE, .hFlip = TRUE), @@ -512,10 +512,10 @@ const union AnimCmd gUnknown_085935B8[] = ANIMCMD_END, }; -const union AnimCmd *const gUnknown_085935C8[] = +const union AnimCmd *const gGuillotineAnimTable[] = { - gUnknown_085935A8, - gUnknown_085935B8, + gGuillotineAnimCmds1, + gGuillotineAnimCmds2, }; const struct SpriteTemplate gGuillotineSpriteTemplate = @@ -523,10 +523,10 @@ const struct SpriteTemplate gGuillotineSpriteTemplate = .tileTag = ANIM_TAG_CUT, .paletteTag = ANIM_TAG_CUT, .oam = &gOamData_AffineOff_ObjBlend_32x32, - .anims = gUnknown_085935C8, + .anims = gGuillotineAnimTable, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = Anim_GuillotinePincer, + .callback = AnimGuillotinePincer, }; const union AffineAnimCmd gSplashEffectAffineAnimCmds[] = @@ -545,7 +545,7 @@ const union AffineAnimCmd gGrowAndShrinkAffineAnimCmds[] = AFFINEANIMCMD_END, }; -const union AnimCmd gUnknown_08593628[] = +const union AnimCmd gBreathPuffAnimCmds1[] = { ANIMCMD_FRAME(0, 4, .hFlip = TRUE), ANIMCMD_FRAME(4, 40, .hFlip = TRUE), @@ -554,7 +554,7 @@ const union AnimCmd gUnknown_08593628[] = ANIMCMD_END, }; -const union AnimCmd gUnknown_0859363C[] = +const union AnimCmd gBreathPuffAnimCmds2[] = { ANIMCMD_FRAME(0, 4), ANIMCMD_FRAME(4, 40), @@ -563,10 +563,10 @@ const union AnimCmd gUnknown_0859363C[] = ANIMCMD_END, }; -const union AnimCmd *const gUnknown_08593650[] = +const union AnimCmd *const gBreathPuffAnimTable[] = { - gUnknown_08593628, - gUnknown_0859363C, + gBreathPuffAnimCmds1, + gBreathPuffAnimCmds2, }; const struct SpriteTemplate gBreathPuffSpriteTemplate = @@ -574,22 +574,22 @@ const struct SpriteTemplate gBreathPuffSpriteTemplate = .tileTag = ANIM_TAG_BREATH, .paletteTag = ANIM_TAG_BREATH, .oam = &gOamData_AffineOff_ObjNormal_16x16, - .anims = gUnknown_08593650, + .anims = gBreathPuffAnimTable, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = Anim_BreathPuff, + .callback = AnimBreathPuff, }; -const union AffineAnimCmd gUnknown_08593670[] = +const union AffineAnimCmd gAngerMarkAffineAnimCmds[] = { AFFINEANIMCMD_FRAME(0xB, 0xB, 0, 8), AFFINEANIMCMD_FRAME(0xFFF5, 0xFFF5, 0, 8), AFFINEANIMCMD_END, }; -const union AffineAnimCmd *const gUnknown_08593688[] = +const union AffineAnimCmd *const gAngerMarkAffineAnimTable[] = { - gUnknown_08593670, + gAngerMarkAffineAnimCmds, }; const struct SpriteTemplate gAngerMarkSpriteTemplate = @@ -599,11 +599,11 @@ const struct SpriteTemplate gAngerMarkSpriteTemplate = .oam = &gOamData_AffineNormal_ObjNormal_16x16, .anims = gDummySpriteAnimTable, .images = NULL, - .affineAnims = gUnknown_08593688, - .callback = Anim_AngerMark, + .affineAnims = gAngerMarkAffineAnimTable, + .callback = AnimAngerMark, }; -const union AffineAnimCmd gUnknown_085936A4[] = +const union AffineAnimCmd gThrashMoveMonAffineAnimCmds[] = { AFFINEANIMCMD_FRAME(-10, 9, 0, 7), AFFINEANIMCMD_FRAME(20, -20, 0, 7), @@ -613,7 +613,7 @@ const union AffineAnimCmd gUnknown_085936A4[] = AFFINEANIMCMD_END, }; -const struct SpriteTemplate gUnknown_085936D4 = +const struct SpriteTemplate gPencilSpriteTemplate = { .tileTag = ANIM_TAG_PENCIL, .paletteTag = ANIM_TAG_PENCIL, @@ -621,10 +621,10 @@ const struct SpriteTemplate gUnknown_085936D4 = .anims = gDummySpriteAnimTable, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_810501C, + .callback = AnimPencil, }; -const struct SpriteTemplate gUnknown_085936EC = +const struct SpriteTemplate gSnoreZSpriteTemplate = { .tileTag = ANIM_TAG_SNORE_Z, .paletteTag = ANIM_TAG_SNORE_Z, @@ -632,10 +632,10 @@ const struct SpriteTemplate gUnknown_085936EC = .anims = gDummySpriteAnimTable, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_80A7938, + .callback = AnimSnoreZ, }; -const union AnimCmd gUnknown_08593704[] = +const union AnimCmd gExplosionAnimCmds[] = { ANIMCMD_FRAME(0, 5), ANIMCMD_FRAME(16, 5), @@ -644,17 +644,17 @@ const union AnimCmd gUnknown_08593704[] = ANIMCMD_END, }; -const union AnimCmd *const gUnknown_08593718[] = +const union AnimCmd *const gExplosionAnimTable[] = { - gUnknown_08593704, + gExplosionAnimCmds, }; -//* -const struct SpriteTemplate gBattleAnimSpriteTemplate_859371C = + +const struct SpriteTemplate gExplosionSpriteTemplate = { .tileTag = ANIM_TAG_EXPLOSION, .paletteTag = ANIM_TAG_EXPLOSION, .oam = &gOamData_AffineOff_ObjNormal_32x32, - .anims = gUnknown_08593718, + .anims = gExplosionAnimTable, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, .callback = AnimSparklingParticle, @@ -1867,7 +1867,7 @@ static void AnimBulletSeed_Step2(struct Sprite *sprite) // arg 4: initial wave offset // arg 5: wave period (higher means faster wave) // arg 6: duration -void Anim_RazorWindTornado(struct Sprite *sprite) +void AnimRazorWindTornado(struct Sprite *sprite) { InitSpritePosToAnimAttacker(sprite, FALSE); if (GetBattlerSide(gBattleAnimAttacker) == B_SIDE_PLAYER) @@ -1885,7 +1885,7 @@ void Anim_RazorWindTornado(struct Sprite *sprite) // Animates a single pincer line that extends towards the center of the target mon. // arg 0: invert -void Anim_ViceGripPincer(struct Sprite *sprite) +void AnimViceGripPincer(struct Sprite *sprite) { s16 startXOffset = 32; s16 startYOffset = -32; @@ -1906,10 +1906,10 @@ void Anim_ViceGripPincer(struct Sprite *sprite) sprite->data[2] = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_X_2) + endXOffset; sprite->data[4] = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_Y_PIC_OFFSET) + endYOffset; sprite->callback = StartAnimLinearTranslation; - StoreSpriteCallbackInData6(sprite, Anim_ViceGripPincerStep); + StoreSpriteCallbackInData6(sprite, AnimViceGripPincerStep); } -static void Anim_ViceGripPincerStep(struct Sprite *sprite) +static void AnimViceGripPincerStep(struct Sprite *sprite) { if (sprite->animEnded) DestroyAnimSprite(sprite); @@ -1917,7 +1917,7 @@ static void Anim_ViceGripPincerStep(struct Sprite *sprite) // Animates a single pincer line that extends towards the center of the target mon, and then back out. // arg 0: animation id -void Anim_GuillotinePincer(struct Sprite *sprite) +void AnimGuillotinePincer(struct Sprite *sprite) { s16 startXOffset = 32; s16 startYOffset = -32; @@ -1942,10 +1942,10 @@ void Anim_GuillotinePincer(struct Sprite *sprite) InitAnimLinearTranslation(sprite); sprite->data[5] = gBattleAnimArgs[0]; sprite->data[6] = sprite->data[0]; - sprite->callback = Anim_GuillotinePincerStep1; + sprite->callback = AnimGuillotinePincerStep1; } -static void Anim_GuillotinePincerStep1(struct Sprite *sprite) +static void AnimGuillotinePincerStep1(struct Sprite *sprite) { if (AnimTranslateLinear(sprite) && sprite->animEnded) { @@ -1960,11 +1960,11 @@ static void Anim_GuillotinePincerStep1(struct Sprite *sprite) sprite->data[2] ^= 1; sprite->data[4] = 0; sprite->data[3] = 0; - sprite->callback = Anim_GuillotinePincerStep2; + sprite->callback = AnimGuillotinePincerStep2; } } -static void Anim_GuillotinePincerStep2(struct Sprite *sprite) +static void AnimGuillotinePincerStep2(struct Sprite *sprite) { if (sprite->data[3]) { @@ -1981,11 +1981,11 @@ static void Anim_GuillotinePincerStep2(struct Sprite *sprite) sprite->data[3] = 0; sprite->animPaused = 0; StartSpriteAnim(sprite, sprite->data[5] ^ 1); - sprite->callback = Anim_GuillotinePincerStep3; + sprite->callback = AnimGuillotinePincerStep3; } } -static void Anim_GuillotinePincerStep3(struct Sprite *sprite) +static void AnimGuillotinePincerStep3(struct Sprite *sprite) { if (AnimTranslateLinear(sprite)) DestroyAnimSprite(sprite); @@ -2235,7 +2235,7 @@ static void AnimTask_GrowAndShrinkStep(u8 taskId) // Animates a little puff of the mon's breath. // Used by MOVE_SWAGGER and MOVE_BULK_UP // No args. -void Anim_BreathPuff(struct Sprite *sprite) +void AnimBreathPuff(struct Sprite *sprite) { if (GetBattlerSide(gBattleAnimAttacker) == B_SIDE_PLAYER) { @@ -2263,7 +2263,7 @@ void Anim_BreathPuff(struct Sprite *sprite) // arg 0: target mon (0 = attacker, 1 = target) // arg 1: x pixel offset // arg 2: y pixel offset -void Anim_AngerMark(struct Sprite *sprite) +void AnimAngerMark(struct Sprite *sprite) { u8 battler; if (!gBattleAnimArgs[0]) @@ -2284,17 +2284,17 @@ void Anim_AngerMark(struct Sprite *sprite) } // left/right movements -void sub_8104C38(u8 taskId) +void AnimTask_ThrashMoveMon(u8 taskId) { struct Task* task = &gTasks[taskId]; u8 spriteId = GetAnimBattlerSpriteId(ANIM_ATTACKER); task->data[0] = spriteId; task->data[1] = 0; - PrepareAffineAnimInTaskData(task, spriteId, gUnknown_085936A4); - task->func = sub_8104C78; + PrepareAffineAnimInTaskData(task, spriteId, gThrashMoveMonAffineAnimCmds); + task->func = ThrashMoveMonStep; } -static void sub_8104C78(u8 taskId) +static void ThrashMoveMonStep(u8 taskId) { struct Task* task = &gTasks[taskId]; if (!RunAffineAnimFromTaskData(task)) @@ -2460,7 +2460,7 @@ static void sub_8104F54(u8 taskId) } } -void sub_810501C(struct Sprite *sprite) +void AnimPencil(struct Sprite *sprite) { sprite->pos1.x = GetBattlerSpriteCoord(gBattleAnimTarget, 0) - 16; sprite->pos1.y = GetBattlerYCoordWithElevation(gBattleAnimTarget) + 16; @@ -2471,10 +2471,10 @@ void sub_810501C(struct Sprite *sprite) sprite->data[4] = 0; sprite->data[5] = GetBattlerSpriteCoordAttr(gBattleAnimTarget, BATTLER_COORD_ATTR_HEIGHT) + 2; sprite->data[6] = BattleAnimAdjustPanning(63); - sprite->callback = sub_8105078; + sprite->callback = AnimPencil_Step; } -static void sub_8105078(struct Sprite *sprite) +static void AnimPencil_Step(struct Sprite *sprite) { switch (sprite->data[0]) { diff --git a/src/battle_anim_mons.c b/src/battle_anim_mons.c index 4c4563d408..64b65ce088 100644 --- a/src/battle_anim_mons.c +++ b/src/battle_anim_mons.c @@ -1532,7 +1532,7 @@ static void AnimThrowProjectile_Step(struct Sprite *sprite) DestroyAnimSprite(sprite); } -void sub_80A7938(struct Sprite *sprite) +void AnimSnoreZ(struct Sprite *sprite) { bool8 r4; u8 battlerId, coordType; diff --git a/src/fight.c b/src/fight.c index 8be5bba9aa..0c4b5a3fae 100644 --- a/src/fight.c +++ b/src/fight.c @@ -433,7 +433,7 @@ void sub_810CE68(struct Sprite *sprite) StartSpriteAnim(sprite, gBattleAnimArgs[6]); gBattleAnimArgs[6] = 0; - sub_80A7938(sprite); + AnimSnoreZ(sprite); } void sub_810CEB4(struct Sprite *sprite) diff --git a/src/fire.c b/src/fire.c index 60d13bf04f..2a12c26cc1 100644 --- a/src/fire.c +++ b/src/fire.c @@ -622,7 +622,7 @@ static void AnimEmberFlare(struct Sprite *sprite) || gBattleAnimAttacker == GetBattlerAtPosition(B_POSITION_OPPONENT_RIGHT))) gBattleAnimArgs[2] = -gBattleAnimArgs[2]; - sprite->callback = sub_80A7938; + sprite->callback = AnimSnoreZ; sprite->callback(sprite); } @@ -631,7 +631,7 @@ static void sub_8109200(struct Sprite *sprite) gBattleAnimArgs[0] = -gBattleAnimArgs[0]; gBattleAnimArgs[2] = -gBattleAnimArgs[2]; - sprite->callback = sub_80A7938; + sprite->callback = AnimSnoreZ; } // Animates the a fire sprite in the first-half of the MOVE_FIRE_BLAST From e90c708383844d02939738a9bf73113676f48cfb Mon Sep 17 00:00:00 2001 From: Sewef Date: Sun, 20 Oct 2019 11:16:45 +0200 Subject: [PATCH 06/46] battle_anims_effects_2 --- data/battle_anim_scripts.s | 36 ++++---- src/battle_anim_effects_2.c | 158 ++++++++++++++++++------------------ 2 files changed, 97 insertions(+), 97 deletions(-) diff --git a/data/battle_anim_scripts.s b/data/battle_anim_scripts.s index 509c80d246..67b7e55c2b 100644 --- a/data/battle_anim_scripts.s +++ b/data/battle_anim_scripts.s @@ -3306,7 +3306,7 @@ Move_MILK_DRINK: delay 20 playsewithpan SE_W152, SOUND_PAN_ATTACKER waitforvisualfinish - createsprite gUnknown_0859381C, ANIM_ATTACKER, 3, 0, 0, 1, 0 + createsprite gThinRingExpandingSpriteTemplate, ANIM_ATTACKER, 3, 0, 0, 1, 0 playsewithpan SE_W208, SOUND_PAN_ATTACKER waitforvisualfinish clearmonbg ANIM_TARGET @@ -3411,7 +3411,7 @@ ExtremeSpeedContinue: playsewithpan SE_W233B, SOUND_PAN_TARGET createsprite gBattleAnimSpriteTemplate_85973B8, ANIM_TARGET, 2, 1, 0, 0, 3 waitforvisualfinish - createvisualtask sub_8105AAC, 2 + createvisualtask AnimTask_SpeedDust, 2 delay 10 createvisualtask sub_810599C, 2 loopsewithpan SE_W104, SOUND_PAN_ATTACKER, 8, 4 @@ -3435,19 +3435,19 @@ Move_UPROAR: loadspritegfx ANIM_TAG_THIN_RING monbg ANIM_DEF_PARTNER createvisualtask sub_8106D90, 2, 0 - createsprite gBattleAnimSpriteTemplate_8593898, ANIM_ATTACKER, 3, 0, 0, 0, 0, 31, 8 + createsprite gUproarRingSpriteTemplate, ANIM_ATTACKER, 3, 0, 0, 0, 0, 31, 8 playsewithpan SE_W253, SOUND_PAN_ATTACKER createsprite gBattleAnimSpriteTemplate_8593BB8, ANIM_ATTACKER, 2, 0, 29, -12, 0 createsprite gBattleAnimSpriteTemplate_8593BB8, ANIM_ATTACKER, 2, 0, -12, -29, 1 delay 16 createvisualtask sub_8106D90, 2, 0 - createsprite gBattleAnimSpriteTemplate_8593898, ANIM_ATTACKER, 3, 0, 0, 0, 0, 31, 8 + createsprite gUproarRingSpriteTemplate, ANIM_ATTACKER, 3, 0, 0, 0, 0, 31, 8 playsewithpan SE_W253, SOUND_PAN_ATTACKER createsprite gBattleAnimSpriteTemplate_8593BB8, ANIM_ATTACKER, 2, 0, 12, -29, 1 createsprite gBattleAnimSpriteTemplate_8593BB8, ANIM_ATTACKER, 2, 0, -29, -12, 0 delay 16 createvisualtask sub_8106D90, 2, 0 - createsprite gBattleAnimSpriteTemplate_8593898, ANIM_ATTACKER, 3, 0, 0, 0, 0, 31, 8 + createsprite gUproarRingSpriteTemplate, ANIM_ATTACKER, 3, 0, 0, 0, 0, 31, 8 playsewithpan SE_W253, SOUND_PAN_ATTACKER createsprite gBattleAnimSpriteTemplate_8593BB8, ANIM_ATTACKER, 2, 0, 24, -24, 1 createsprite gBattleAnimSpriteTemplate_8593BB8, ANIM_ATTACKER, 2, 0, -24, -24, 0 @@ -4161,7 +4161,7 @@ Move_AROMATHERAPY: waitforvisualfinish playsewithpan SE_REAPOKE, SOUND_PAN_ATTACKER createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 0, 43, 3, 10, 0, RGB(13, 31, 12) - createsprite gUnknown_08593868, ANIM_ATTACKER, 16, 0, 0, 0, 1 + createsprite gBlendThinRingExpandingSpriteTemplate, ANIM_ATTACKER, 16, 0, 0, 0, 1 waitforvisualfinish end @@ -4473,13 +4473,13 @@ Move_CALM_MIND: waitforvisualfinish createvisualtask sub_81177E4, 5, 1 waitforvisualfinish - createsprite gUnknown_08593850, ANIM_ATTACKER, 40, 0, 0, 0, 0 + createsprite gThingRingShrinkingSpriteTemplate, ANIM_ATTACKER, 40, 0, 0, 0, 0 playsewithpan SE_W048, SOUND_PAN_ATTACKER delay 14 - createsprite gUnknown_08593850, ANIM_ATTACKER, 40, 0, 0, 0, 0 + createsprite gThingRingShrinkingSpriteTemplate, ANIM_ATTACKER, 40, 0, 0, 0, 0 playsewithpan SE_W048, SOUND_PAN_ATTACKER delay 14 - createsprite gUnknown_08593850, ANIM_ATTACKER, 40, 0, 0, 0, 0 + createsprite gThingRingShrinkingSpriteTemplate, ANIM_ATTACKER, 40, 0, 0, 0, 0 playsewithpan SE_W048, SOUND_PAN_ATTACKER waitforvisualfinish createvisualtask sub_81177E4, 5, 0 @@ -7677,15 +7677,15 @@ Move_SOFT_BOILED: monbg ANIM_ATK_PARTNER playsewithpan SE_W039, SOUND_PAN_ATTACKER createvisualtask AnimTask_ShakeMon, 2, ANIM_ATTACKER, 0, 2, 6, 1 - createsprite gUnknown_085937B0, ANIM_ATTACKER, 4, 0, 16, 0 - createsprite gUnknown_085937B0, ANIM_ATTACKER, 4, 0, 16, 1 + createsprite gSoftBoiledEggSpriteTemplate, ANIM_ATTACKER, 4, 0, 16, 0 + createsprite gSoftBoiledEggSpriteTemplate, ANIM_ATTACKER, 4, 0, 16, 1 delay 120 delay 7 playsewithpan SE_W030, SOUND_PAN_ATTACKER createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 31, 3, 10, 0, RGB(12, 24, 30) - createsprite gUnknown_0859381C, ANIM_ATTACKER, 3, 31, 16, 0, 1 + createsprite gThinRingExpandingSpriteTemplate, ANIM_ATTACKER, 3, 31, 16, 0, 1 delay 8 - createsprite gUnknown_0859381C, ANIM_ATTACKER, 3, 31, 16, 0, 1 + createsprite gThinRingExpandingSpriteTemplate, ANIM_ATTACKER, 3, 31, 16, 0, 1 delay 60 setarg 7, -1 waitforvisualfinish @@ -7736,12 +7736,12 @@ Move_HEAL_BELL: playsewithpan SE_REAPOKE, SOUND_PAN_ATTACKER createvisualtask sub_8116664, 10, 4, 3, 10, 0, RGB(12, 24, 30) createvisualtask sub_8116620, 10, 10, 3, 10, 0, RGB_WHITE - createsprite gUnknown_08593868, ANIM_ATTACKER, 16, 0, 0, 0, 1 + createsprite gBlendThinRingExpandingSpriteTemplate, ANIM_ATTACKER, 16, 0, 0, 0, 1 end HealBell1: createvisualtask sub_8116664, 10, 4, 3, 8, 0, RGB(12, 24, 30) createvisualtask sub_8116620, 10, 10, 3, 2, 10, RGB_WHITE - createsprite gUnknown_0859381C, ANIM_ATTACKER, 40, 0, -24, 0, 1 + createsprite gThinRingExpandingSpriteTemplate, ANIM_ATTACKER, 40, 0, -24, 0, 1 playsewithpan SE_W215, SOUND_PAN_ATTACKER return @@ -8468,7 +8468,7 @@ Move_REFRESH: waitforvisualfinish playsewithpan SE_REAPOKE, SOUND_PAN_ATTACKER createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 31, 3, 10, 0, RGB(12, 24, 30) - createsprite gUnknown_0859381C, ANIM_ATTACKER, 3, 0, 0, 0, 0 + createsprite gThinRingExpandingSpriteTemplate, ANIM_ATTACKER, 3, 0, 0, 0, 0 end Move_BLAZE_KICK: @@ -8505,7 +8505,7 @@ Move_HYPER_VOICE: HyperVoiceEffect: createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 31, 3, 8, 0, RGB_YELLOW createvisualtask AnimTask_ScaleMonAndRestore, 5, -5, -5, 5, ANIM_ATTACKER, 0 - createsprite gUnknown_08593880, ANIM_ATTACKER, 0, 45, 0, 0, 0, 0, 0, 1 + createsprite gHyperVoiceRingSpriteTemplate, ANIM_ATTACKER, 0, 45, 0, 0, 0, 0, 0, 1 createvisualtask AnimTask_ShakeMon2, 2, ANIM_TARGET, 1, 0, 6, 1 createvisualtask AnimTask_ShakeMon2, 2, ANIM_DEF_PARTNER, 1, 0, 6, 1 createvisualtask sub_81162A4, 2, 1, 0, 6, 1 @@ -10440,7 +10440,7 @@ General_ItemEffect: waitforvisualfinish playsewithpan SE_REAPOKE, SOUND_PAN_ATTACKER createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 2, 3, 7, 0, RGB(17, 31, 25) - createsprite gUnknown_0859381C, ANIM_ATTACKER, 3, 0, 0, 0, 0 + createsprite gThinRingExpandingSpriteTemplate, ANIM_ATTACKER, 3, 0, 0, 0, 0 waitforvisualfinish end diff --git a/src/battle_anim_effects_2.c b/src/battle_anim_effects_2.c index f80b412dcc..f7f193b883 100755 --- a/src/battle_anim_effects_2.c +++ b/src/battle_anim_effects_2.c @@ -34,11 +34,11 @@ void AnimGuillotinePincer(struct Sprite *); void AnimBreathPuff(struct Sprite *); void AnimAngerMark(struct Sprite *); void AnimPencil(struct Sprite *); -void sub_81051C4(struct Sprite *); -void sub_81052A4(struct Sprite *); -void sub_81054E8(struct Sprite *); -void sub_8105538(struct Sprite *); -void sub_8105C48(struct Sprite *); +void AnimBlendThinRing(struct Sprite *); +void AnimHyperVoiceRing(struct Sprite *); +void AnimUproarRing(struct Sprite *); +void AnimSoftBoiledEgg(struct Sprite *); +void AnimSpeedDust(struct Sprite *); void sub_8105DE8(struct Sprite *); void sub_8105E60(struct Sprite *); void sub_8106140(struct Sprite *); @@ -80,17 +80,17 @@ static void ThrashMoveMonStep(u8); static void sub_8104D28(u8); static void sub_8104F54(u8); static void AnimPencil_Step(struct Sprite *); -static void sub_810557C(struct Sprite *); -static void sub_81055F4(struct Sprite *); -static void sub_810561C(struct Sprite *); -static void sub_8105694(struct Sprite *); -static void sub_81056D4(struct Sprite *); -static void sub_810571C(struct Sprite *); -static void sub_810575C(struct Sprite *); +static void AnimSoftBoiledEgg_Step1(struct Sprite *); +static void AnimSoftBoiledEgg_Step2(struct Sprite *); +static void AnimSoftBoiledEgg_Step3(struct Sprite *); +static void AnimSoftBoiledEgg_Step3_Callback1(struct Sprite *); +static void AnimSoftBoiledEgg_Step3_Callback2(struct Sprite *); +static void AnimSoftBoiledEgg_Step4(struct Sprite *); +static void AnimSoftBoiledEgg_Step4_Callback(struct Sprite *); static void sub_81057B8(u8); static void sub_8105878(u8); static void sub_81059E0(u8); -static void sub_8105B08(u8); +static void SpeedDust_Step1(u8); static void sub_8105F30(u8); static void sub_8105F84(u8); static void sub_810618C(struct Sprite *); @@ -660,7 +660,7 @@ const struct SpriteTemplate gExplosionSpriteTemplate = .callback = AnimSparklingParticle, }; -const union AffineAnimCmd gUnknown_08593734[] = +const union AffineAnimCmd gSoftBoiledEggAffineAnimCmds1[] = { AFFINEANIMCMD_FRAME(0x0, 0x0, -8, 2), AFFINEANIMCMD_FRAME(0x0, 0x0, 8, 4), @@ -668,13 +668,13 @@ const union AffineAnimCmd gUnknown_08593734[] = AFFINEANIMCMD_JUMP(0), }; -const union AffineAnimCmd gUnknown_08593754[] = +const union AffineAnimCmd gSoftBoiledEggAffineAnimCmds2[] = { AFFINEANIMCMD_FRAME(0x100, 0x100, 0, 0), AFFINEANIMCMD_END, }; -const union AffineAnimCmd gUnknown_08593764[] = +const union AffineAnimCmd gSoftBoiledEggAffineAnimCmds3[] = { AFFINEANIMCMD_FRAME(0xFFF8, 0x4, 0, 8), AFFINEANIMCMD_LOOP(0), @@ -686,121 +686,121 @@ const union AffineAnimCmd gUnknown_08593764[] = AFFINEANIMCMD_END, }; -const union AffineAnimCmd *const gUnknown_085937A4[] = +const union AffineAnimCmd *const gSoftBoiledEggAffineAnimTable[] = { - gUnknown_08593734, - gUnknown_08593754, - gUnknown_08593764, + gSoftBoiledEggAffineAnimCmds1, + gSoftBoiledEggAffineAnimCmds2, + gSoftBoiledEggAffineAnimCmds3, }; -//* -const struct SpriteTemplate gUnknown_085937B0 = + +const struct SpriteTemplate gSoftBoiledEggSpriteTemplate = { .tileTag = ANIM_TAG_BREAKING_EGG, .paletteTag = ANIM_TAG_BREAKING_EGG, .oam = &gOamData_AffineDouble_ObjBlend_32x32, .anims = gDummySpriteAnimTable, .images = NULL, - .affineAnims = gUnknown_085937A4, - .callback = sub_8105538, + .affineAnims = gSoftBoiledEggAffineAnimTable, + .callback = AnimSoftBoiledEgg, }; -const union AffineAnimCmd gUnknown_085937C8[] = +const union AffineAnimCmd gThingRingExpandingAffineAnimCmds1[] = { AFFINEANIMCMD_FRAME(0x10, 0x10, 0, 0), AFFINEANIMCMD_FRAME(0x10, 0x10, 0, 30), AFFINEANIMCMD_END_ALT(1), }; -const union AffineAnimCmd gUnknown_085937E0[] = +const union AffineAnimCmd gThingRingExpandingAffineAnimCmds2[] = { AFFINEANIMCMD_FRAME(0x10, 0x10, 0, 0), AFFINEANIMCMD_FRAME(0x20, 0x20, 0, 15), AFFINEANIMCMD_END_ALT(1), }; -const union AffineAnimCmd gUnknown_085937F8[] = +const union AffineAnimCmd gHyperVoiceRingAffineAnimCmds[] = { AFFINEANIMCMD_FRAME(0x10, 0x10, 0, 0), AFFINEANIMCMD_FRAME(0xB, 0xB, 0, 45), AFFINEANIMCMD_END_ALT(1), }; -const union AffineAnimCmd *const gUnknown_08593810[] = +const union AffineAnimCmd *const gThingRingExpandingAffineAnimTable[] = { - gUnknown_085937C8, - gUnknown_085937E0, + gThingRingExpandingAffineAnimCmds1, + gThingRingExpandingAffineAnimCmds2, }; -const union AffineAnimCmd *const gUnknown_08593818[] = +const union AffineAnimCmd *const gHyperVoiceRingAffineAnimTable[] = { - gUnknown_085937F8, + gHyperVoiceRingAffineAnimCmds, }; -const struct SpriteTemplate gUnknown_0859381C = +const struct SpriteTemplate gThinRingExpandingSpriteTemplate = { .tileTag = ANIM_TAG_THIN_RING, .paletteTag = ANIM_TAG_THIN_RING, .oam = &gOamData_AffineDouble_ObjNormal_64x64, .anims = gDummySpriteAnimTable, .images = NULL, - .affineAnims = gUnknown_08593810, + .affineAnims = gThingRingExpandingAffineAnimTable, .callback = AnimSparklingParticle, }; -//* -const union AffineAnimCmd gUnknown_08593834[] = + +const union AffineAnimCmd gThingRingShrinkingAffineAnimCmds[] = { AFFINEANIMCMD_FRAME(0x200, 0x200, 0, 0), AFFINEANIMCMD_FRAME(0xFFF0, 0xFFF0, 0, 30), AFFINEANIMCMD_END_ALT(1), }; -const union AffineAnimCmd *const gUnknown_0859384C[] = +const union AffineAnimCmd *const gThingRingShrinkingAffineAnimTable[] = { - gUnknown_08593834, + gThingRingShrinkingAffineAnimCmds, }; -const struct SpriteTemplate gUnknown_08593850 = +const struct SpriteTemplate gThingRingShrinkingSpriteTemplate = { .tileTag = ANIM_TAG_THIN_RING, .paletteTag = ANIM_TAG_THIN_RING, .oam = &gOamData_AffineDouble_ObjBlend_64x64, .anims = gDummySpriteAnimTable, .images = NULL, - .affineAnims = gUnknown_0859384C, + .affineAnims = gThingRingShrinkingAffineAnimTable, .callback = AnimSparklingParticle, }; -const struct SpriteTemplate gUnknown_08593868 = +const struct SpriteTemplate gBlendThinRingExpandingSpriteTemplate = { .tileTag = ANIM_TAG_THIN_RING, .paletteTag = ANIM_TAG_THIN_RING, .oam = &gOamData_AffineDouble_ObjBlend_64x64, .anims = gDummySpriteAnimTable, .images = NULL, - .affineAnims = gUnknown_08593810, - .callback = sub_81051C4, + .affineAnims = gThingRingExpandingAffineAnimTable, + .callback = AnimBlendThinRing, }; -const struct SpriteTemplate gUnknown_08593880 = +const struct SpriteTemplate gHyperVoiceRingSpriteTemplate = { .tileTag = ANIM_TAG_THIN_RING, .paletteTag = ANIM_TAG_THIN_RING, .oam = &gOamData_AffineDouble_ObjBlend_64x64, .anims = gDummySpriteAnimTable, .images = NULL, - .affineAnims = gUnknown_08593818, - .callback = sub_81052A4, + .affineAnims = gHyperVoiceRingAffineAnimTable, + .callback = AnimHyperVoiceRing, }; -const struct SpriteTemplate gBattleAnimSpriteTemplate_8593898 = +const struct SpriteTemplate gUproarRingSpriteTemplate = { .tileTag = ANIM_TAG_THIN_RING, .paletteTag = ANIM_TAG_THIN_RING, .oam = &gOamData_AffineDouble_ObjBlend_64x64, .anims = gDummySpriteAnimTable, .images = NULL, - .affineAnims = gUnknown_08593810, - .callback = sub_81054E8, + .affineAnims = gThingRingExpandingAffineAnimTable, + .callback = AnimUproarRing, }; const union AffineAnimCmd gUnknown_085938B0[] = @@ -809,7 +809,7 @@ const union AffineAnimCmd gUnknown_085938B0[] = AFFINEANIMCMD_END, }; -const union AnimCmd gUnknown_085938C0[] = +const union AnimCmd gSpeedDustAnimCmds[] = { ANIMCMD_FRAME(0, 3), ANIMCMD_FRAME(4, 3), @@ -819,20 +819,20 @@ const union AnimCmd gUnknown_085938C0[] = ANIMCMD_END, }; -const union AnimCmd *const gUnknown_085938D8[] = +const union AnimCmd *const gSpeedDustAnimTable[] = { - gUnknown_085938C0, + gSpeedDustAnimCmds, }; -const struct SpriteTemplate gUnknown_085938DC = +const struct SpriteTemplate gSpeedDustSpriteTemplate = { .tileTag = ANIM_TAG_SPEED_DUST, .paletteTag = ANIM_TAG_SPEED_DUST, .oam = &gOamData_AffineOff_ObjNormal_16x16, - .anims = gUnknown_085938D8, + .anims = gSpeedDustAnimTable, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_8105C48, + .callback = AnimSpeedDust, }; const s8 gUnknown_085938F4[][2] = @@ -2533,7 +2533,7 @@ static void AnimPencil_Step(struct Sprite *sprite) } } -void sub_81051C4(struct Sprite *sprite) +void AnimBlendThinRing(struct Sprite *sprite) { u8 battler = 0; u16 sp0 = 0; @@ -2573,7 +2573,7 @@ void sub_8105284(struct Sprite *sprite) } } -void sub_81052A4(struct Sprite *sprite) +void AnimHyperVoiceRing(struct Sprite *sprite) { u16 r9 = 0; u16 r6 = 0; @@ -2658,7 +2658,7 @@ void sub_81052A4(struct Sprite *sprite) sprite->callback(sprite); } -void sub_81054E8(struct Sprite *sprite) +void AnimUproarRing(struct Sprite *sprite) { u8 index = IndexOfSpritePaletteTag(ANIM_TAG_THIN_RING); if (index != 0xFF) @@ -2671,7 +2671,7 @@ void sub_81054E8(struct Sprite *sprite) sprite->callback(sprite); } -void sub_8105538(struct Sprite *sprite) +void AnimSoftBoiledEgg(struct Sprite *sprite) { s16 r1; InitSpritePosToAnimAttacker(sprite, FALSE); @@ -2679,10 +2679,10 @@ void sub_8105538(struct Sprite *sprite) sprite->data[0] = 0x380; sprite->data[1] = r1; sprite->data[7] = gBattleAnimArgs[2]; - sprite->callback = sub_810557C; + sprite->callback = AnimSoftBoiledEgg_Step1; } -static void sub_810557C(struct Sprite *sprite) +static void AnimSoftBoiledEgg_Step1(struct Sprite *sprite) { s16 add; sprite->pos2.y -= (sprite->data[0] >> 8); @@ -2698,20 +2698,20 @@ static void sub_810557C(struct Sprite *sprite) sprite->pos2.x = 0; sprite->data[0] = 0; StartSpriteAffineAnim(sprite, 1); - sprite->callback = sub_81055F4; + sprite->callback = AnimSoftBoiledEgg_Step2; } } -static void sub_81055F4(struct Sprite *sprite) +static void AnimSoftBoiledEgg_Step2(struct Sprite *sprite) { if (sprite->data[0]++ > 19) { StartSpriteAffineAnim(sprite, 2); - sprite->callback = sub_810561C; + sprite->callback = AnimSoftBoiledEgg_Step3; } } -static void sub_810561C(struct Sprite *sprite) +static void AnimSoftBoiledEgg_Step3(struct Sprite *sprite) { if (sprite->affineAnimEnded) { @@ -2720,17 +2720,17 @@ static void sub_810561C(struct Sprite *sprite) if (sprite->data[7] == 0) { sprite->oam.tileNum += 16; - sprite->callback = sub_8105694; + sprite->callback = AnimSoftBoiledEgg_Step3_Callback1; } else { sprite->oam.tileNum += 32; - sprite->callback = sub_810571C; + sprite->callback = AnimSoftBoiledEgg_Step4; } } } -static void sub_8105694(struct Sprite *sprite) +static void AnimSoftBoiledEgg_Step3_Callback1(struct Sprite *sprite) { sprite->pos2.y -= 2; if (++sprite->data[0] == 9) @@ -2739,34 +2739,34 @@ static void sub_8105694(struct Sprite *sprite) sprite->data[1] = 0; SetGpuReg(REG_OFFSET_BLDCNT, BLDCNT_TGT2_ALL | BLDCNT_EFFECT_BLEND); SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND((u16)sprite->data[0], 0)); - sprite->callback = sub_81056D4; + sprite->callback = AnimSoftBoiledEgg_Step3_Callback2; } } -static void sub_81056D4(struct Sprite *sprite) +static void AnimSoftBoiledEgg_Step3_Callback2(struct Sprite *sprite) { if (sprite->data[1]++ % 3 == 0) { sprite->data[0]--; SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(sprite->data[0], 16 - sprite->data[0])); if (sprite->data[0] == 0) - sprite->callback = sub_810571C; + sprite->callback = AnimSoftBoiledEgg_Step4; } } -static void sub_810571C(struct Sprite *sprite) +static void AnimSoftBoiledEgg_Step4(struct Sprite *sprite) { if ((u16)gBattleAnimArgs[7] == 0xFFFF) { sprite->invisible = 1; if (sprite->data[7] == 0) - sprite->callback = sub_810575C; + sprite->callback = AnimSoftBoiledEgg_Step4_Callback; else sprite->callback = DestroyAnimSprite; } } -static void sub_810575C(struct Sprite *sprite) +static void AnimSoftBoiledEgg_Step4_Callback(struct Sprite *sprite) { SetGpuReg(REG_OFFSET_BLDCNT, 0); SetGpuReg(REG_OFFSET_BLDALPHA, 0); @@ -2904,7 +2904,7 @@ static void sub_81059E0(u8 taskId) } } -void sub_8105AAC(u8 taskId) +void AnimTask_SpeedDust(u8 taskId) { struct Task* task = &gTasks[taskId]; task->data[0] = 0; @@ -2919,10 +2919,10 @@ void sub_8105AAC(u8 taskId) task->data[13] = 0; task->data[14] = GetBattlerSpriteCoord(gBattleAnimAttacker, ANIM_ATTACKER); task->data[15] = GetBattlerSpriteCoord(gBattleAnimAttacker, ANIM_TARGET); - task->func = sub_8105B08; + task->func = SpeedDust_Step1; } -static void sub_8105B08(u8 taskId) +static void SpeedDust_Step1(u8 taskId) { struct Task* task = &gTasks[taskId]; switch (task->data[8]) @@ -2964,7 +2964,7 @@ static void sub_8105B08(u8 taskId) { u8 spriteId; task->data[1] = 0; - spriteId = CreateSprite(&gUnknown_085938DC, task->data[14], task->data[15], 0); + spriteId = CreateSprite(&gSpeedDustSpriteTemplate, task->data[14], task->data[15], 0); if (spriteId != MAX_SPRITES) { gSprites[spriteId].data[0] = taskId; @@ -2988,7 +2988,7 @@ static void sub_8105B08(u8 taskId) } } -void sub_8105C48(struct Sprite *sprite) +void AnimSpeedDust(struct Sprite *sprite) { sprite->invisible = gTasks[sprite->data[0]].data[5]; if (sprite->animEnded) From 8531a17e1071b161beff1a76e89409c725e17e10 Mon Sep 17 00:00:00 2001 From: Sewef Date: Sun, 20 Oct 2019 11:55:02 +0200 Subject: [PATCH 07/46] battle_anims_effects_2 --- data/battle_anim_scripts.s | 144 ++++++++++++------------ src/battle_anim_effects_2.c | 218 ++++++++++++++++++------------------ src/battle_anim_effects_3.c | 4 +- 3 files changed, 183 insertions(+), 183 deletions(-) diff --git a/data/battle_anim_scripts.s b/data/battle_anim_scripts.s index 67b7e55c2b..b52e7b739a 100644 --- a/data/battle_anim_scripts.s +++ b/data/battle_anim_scripts.s @@ -1992,26 +1992,26 @@ Move_ATTRACT: loopsewithpan SE_W204, SOUND_PAN_ATTACKER, 12, 3 createvisualtask AnimTask_SwayMon, 5, 0, 12, 4096, 4, ANIM_ATTACKER delay 15 - createsprite gUnknown_085939A0, ANIM_TARGET, 3, 20, -8 + createsprite gRedHeartProjectileSpriteTemplate, ANIM_TARGET, 3, 20, -8 waitforvisualfinish playsewithpan SE_W213, SOUND_PAN_TARGET - createsprite gBattleAnimSpriteTemplate_85939B8, ANIM_TARGET, 3, 160, -32 - createsprite gBattleAnimSpriteTemplate_85939B8, ANIM_TARGET, 3, -256, -40 - createsprite gBattleAnimSpriteTemplate_85939B8, ANIM_TARGET, 3, 128, -16 - createsprite gBattleAnimSpriteTemplate_85939B8, ANIM_TARGET, 3, 416, -38 - createsprite gBattleAnimSpriteTemplate_85939B8, ANIM_TARGET, 3, -128, -22 - createsprite gBattleAnimSpriteTemplate_85939B8, ANIM_TARGET, 3, -384, -31 + createsprite gRedHeartBurstSpriteTemplate, ANIM_TARGET, 3, 160, -32 + createsprite gRedHeartBurstSpriteTemplate, ANIM_TARGET, 3, -256, -40 + createsprite gRedHeartBurstSpriteTemplate, ANIM_TARGET, 3, 128, -16 + createsprite gRedHeartBurstSpriteTemplate, ANIM_TARGET, 3, 416, -38 + createsprite gRedHeartBurstSpriteTemplate, ANIM_TARGET, 3, -128, -22 + createsprite gRedHeartBurstSpriteTemplate, ANIM_TARGET, 3, -384, -31 waitforvisualfinish waitplaysewithpan SE_W213B, 0, 15 createvisualtask AnimTask_HeartsBackground, 5 - createsprite gUnknown_085939D0, ANIM_ATTACKER, 40, 16, 256, 0 - createsprite gUnknown_085939D0, ANIM_ATTACKER, 40, 224, 240, 15 - createsprite gUnknown_085939D0, ANIM_ATTACKER, 40, 126, 272, 30 - createsprite gUnknown_085939D0, ANIM_ATTACKER, 40, 80, 224, 45 - createsprite gUnknown_085939D0, ANIM_ATTACKER, 40, 170, 272, 60 - createsprite gUnknown_085939D0, ANIM_ATTACKER, 40, 40, 256, 75 - createsprite gUnknown_085939D0, ANIM_ATTACKER, 40, 112, 256, 90 - createsprite gUnknown_085939D0, ANIM_ATTACKER, 40, 200, 272, 90 + createsprite gRedHeartRisingSpriteTemplate, ANIM_ATTACKER, 40, 16, 256, 0 + createsprite gRedHeartRisingSpriteTemplate, ANIM_ATTACKER, 40, 224, 240, 15 + createsprite gRedHeartRisingSpriteTemplate, ANIM_ATTACKER, 40, 126, 272, 30 + createsprite gRedHeartRisingSpriteTemplate, ANIM_ATTACKER, 40, 80, 224, 45 + createsprite gRedHeartRisingSpriteTemplate, ANIM_ATTACKER, 40, 170, 272, 60 + createsprite gRedHeartRisingSpriteTemplate, ANIM_ATTACKER, 40, 40, 256, 75 + createsprite gRedHeartRisingSpriteTemplate, ANIM_ATTACKER, 40, 112, 256, 90 + createsprite gRedHeartRisingSpriteTemplate, ANIM_ATTACKER, 40, 200, 272, 90 delay 75 createvisualtask sub_8115A04, 2, 4, 4, 4, 0, 10, RGB(31, 25, 27) end @@ -2893,8 +2893,8 @@ Move_GLARE: waitforvisualfinish createvisualtask sub_8116620, 5, 1, 0, 0, 16, RGB_BLACK waitforvisualfinish - createsprite gUnknown_08593A84, ANIM_ATTACKER, 0, -16, -8 - createsprite gUnknown_08593A84, ANIM_ATTACKER, 0, 16, -8 + createsprite gEyeSparkleSpriteTemplate, ANIM_ATTACKER, 0, -16, -8 + createsprite gEyeSparkleSpriteTemplate, ANIM_ATTACKER, 0, 16, -8 createvisualtask sub_81064F8, 5 playsewithpan SE_W043, SOUND_PAN_ATTACKER delay 2 @@ -3047,8 +3047,8 @@ Move_STRUGGLE: monbg ANIM_TARGET setalpha 12, 8 createvisualtask AnimTask_ShakeMonInPlace, 2, ANIM_ATTACKER, 3, 0, 12, 4 - createsprite gUnknown_08593B80, ANIM_ATTACKER, 2, 0, 0, 2 - createsprite gUnknown_08593B80, ANIM_ATTACKER, 2, 0, 1, 2 + createsprite gMovmentWavesSpriteTemplate, ANIM_ATTACKER, 2, 0, 0, 2 + createsprite gMovmentWavesSpriteTemplate, ANIM_ATTACKER, 2, 0, 1, 2 loopsewithpan SE_W029, SOUND_PAN_ATTACKER, 12, 4 waitforvisualfinish createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 3, 0, 0, 1, 2 @@ -3392,7 +3392,7 @@ ExtremeSpeedContinue: waitbgfadeout createvisualtask sub_8117660, 5, -2304, 0, 1, -1 waitbgfadein - createvisualtask sub_810577C, 2 + createvisualtask AnimTask_StretchAttacker, 2 loopsewithpan SE_W013B, SOUND_PAN_ATTACKER, 8, 3 waitforvisualfinish delay 1 @@ -4266,8 +4266,8 @@ Move_TICKLE: loadspritegfx ANIM_TAG_EYE_SPARKLE createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 2, 0, 0, 16, RGB_BLACK waitforvisualfinish - createsprite gUnknown_08593A84, ANIM_ATTACKER, 0, -16, -8 - createsprite gUnknown_08593A84, ANIM_ATTACKER, 0, 16, -8 + createsprite gEyeSparkleSpriteTemplate, ANIM_ATTACKER, 0, -16, -8 + createsprite gEyeSparkleSpriteTemplate, ANIM_ATTACKER, 0, 16, -8 playsewithpan SE_W197, SOUND_PAN_ATTACKER waitforvisualfinish createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 2, 0, 16, 0, RGB_BLACK @@ -7700,24 +7700,24 @@ Move_HEAL_BELL: createvisualtask sub_8116620, 10, 10, 0, 0, 10, RGB_WHITE waitforvisualfinish createvisualtask sub_8105CB4, 5 - createsprite gUnknown_08593938, ANIM_ATTACKER, 2, 0, -24, 0, 1 + createsprite gBellSpriteTemplate, ANIM_ATTACKER, 2, 0, -24, 0, 1 delay 12 - createsprite gUnknown_08593958, ANIM_ATTACKER, 40, 0, -24, 48, -18, 35, 0, 0 - createsprite gUnknown_08593958, ANIM_ATTACKER, 40, 0, -24, -48, 20, 30, 1, 1 - createsprite gUnknown_08593958, ANIM_ATTACKER, 40, 0, -24, -38, -29, 30, 2, 2 - createsprite gUnknown_08593958, ANIM_ATTACKER, 40, 0, -24, 36, 18, 30, 3, 3 + createsprite gHealBellMusicNoteSpriteTemplate, ANIM_ATTACKER, 40, 0, -24, 48, -18, 35, 0, 0 + createsprite gHealBellMusicNoteSpriteTemplate, ANIM_ATTACKER, 40, 0, -24, -48, 20, 30, 1, 1 + createsprite gHealBellMusicNoteSpriteTemplate, ANIM_ATTACKER, 40, 0, -24, -38, -29, 30, 2, 2 + createsprite gHealBellMusicNoteSpriteTemplate, ANIM_ATTACKER, 40, 0, -24, 36, 18, 30, 3, 3 call HealBell1 delay 0x21 - createsprite gUnknown_08593958, ANIM_ATTACKER, 40, 0, -24, 19, 26, 35, 4, 4 - createsprite gUnknown_08593958, ANIM_ATTACKER, 40, 0, -24, -34, -12, 30, 5, 5 - createsprite gUnknown_08593958, ANIM_ATTACKER, 40, 0, -24, 41, -20, 34, 6, 2 - createsprite gUnknown_08593958, ANIM_ATTACKER, 40, 0, -24, -15, 26, 32, 7, 0 + createsprite gHealBellMusicNoteSpriteTemplate, ANIM_ATTACKER, 40, 0, -24, 19, 26, 35, 4, 4 + createsprite gHealBellMusicNoteSpriteTemplate, ANIM_ATTACKER, 40, 0, -24, -34, -12, 30, 5, 5 + createsprite gHealBellMusicNoteSpriteTemplate, ANIM_ATTACKER, 40, 0, -24, 41, -20, 34, 6, 2 + createsprite gHealBellMusicNoteSpriteTemplate, ANIM_ATTACKER, 40, 0, -24, -15, 26, 32, 7, 0 call HealBell1 delay 0x21 - createsprite gUnknown_08593958, ANIM_ATTACKER, 40, 0, -24, -48, 18, 31, 0, 2 - createsprite gUnknown_08593958, ANIM_ATTACKER, 40, 0, -24, 48, -20, 30, 2, 5 - createsprite gUnknown_08593958, ANIM_ATTACKER, 40, 0, -24, 38, 29, 33, 4, 3 - createsprite gUnknown_08593958, ANIM_ATTACKER, 40, 0, -24, -36, -18, 30, 6, 1 + createsprite gHealBellMusicNoteSpriteTemplate, ANIM_ATTACKER, 40, 0, -24, -48, 18, 31, 0, 2 + createsprite gHealBellMusicNoteSpriteTemplate, ANIM_ATTACKER, 40, 0, -24, 48, -20, 30, 2, 5 + createsprite gHealBellMusicNoteSpriteTemplate, ANIM_ATTACKER, 40, 0, -24, 38, 29, 33, 4, 3 + createsprite gHealBellMusicNoteSpriteTemplate, ANIM_ATTACKER, 40, 0, -24, -36, -18, 30, 6, 1 call HealBell1 waitforvisualfinish createvisualtask sub_8105D60, 5 @@ -7747,7 +7747,7 @@ HealBell1: Move_FAKE_OUT: playsewithpan SE_W260, 0 - createvisualtask sub_8105EB0, 5 + createvisualtask AnimTask_FakeOut, 5 waitforvisualfinish playsewithpan SE_W166, SOUND_PAN_TARGET createvisualtask AnimTask_ShakeMon2, 2, ANIM_TARGET, 4, 0, 5, 1 @@ -7765,8 +7765,8 @@ Move_SCARY_FACE: playsewithpan SE_W043, SOUND_PAN_ATTACKER createvisualtask sub_81064F8, 5 delay 13 - createsprite gUnknown_08593A84, ANIM_ATTACKER, 0, -16, -8 - createsprite gUnknown_08593A84, ANIM_ATTACKER, 0, 16, -8 + createsprite gEyeSparkleSpriteTemplate, ANIM_ATTACKER, 0, -16, -8 + createsprite gEyeSparkleSpriteTemplate, ANIM_ATTACKER, 0, 16, -8 waitforvisualfinish createvisualtask sub_810A094, 3, 20, 1, 0 playsewithpan SE_W081B, SOUND_PAN_TARGET @@ -7777,33 +7777,33 @@ Move_SCARY_FACE: Move_SWEET_KISS: loadspritegfx ANIM_TAG_RED_HEART loadspritegfx ANIM_TAG_ANGEL - createsprite gUnknown_08593AA8, ANIM_TARGET, 2, 16, -48 + createsprite gAngelSpriteTemplate, ANIM_TARGET, 2, 16, -48 playsewithpan SE_W215, SOUND_PAN_TARGET delay 23 playsewithpan SE_W215, SOUND_PAN_TARGET delay 23 playsewithpan SE_W215, SOUND_PAN_TARGET waitforvisualfinish - createsprite gBattleAnimSpriteTemplate_85939B8, ANIM_TARGET, 3, 160, -30 + createsprite gRedHeartBurstSpriteTemplate, ANIM_TARGET, 3, 160, -30 playsewithpan SE_W213, SOUND_PAN_TARGET - createsprite gBattleAnimSpriteTemplate_85939B8, ANIM_TARGET, 3, -256, -42 - createsprite gBattleAnimSpriteTemplate_85939B8, ANIM_TARGET, 3, 128, -14 - createsprite gBattleAnimSpriteTemplate_85939B8, ANIM_TARGET, 3, 416, -38 - createsprite gBattleAnimSpriteTemplate_85939B8, ANIM_TARGET, 3, -128, -22 - createsprite gBattleAnimSpriteTemplate_85939B8, ANIM_TARGET, 3, -384, -31 + createsprite gRedHeartBurstSpriteTemplate, ANIM_TARGET, 3, -256, -42 + createsprite gRedHeartBurstSpriteTemplate, ANIM_TARGET, 3, 128, -14 + createsprite gRedHeartBurstSpriteTemplate, ANIM_TARGET, 3, 416, -38 + createsprite gRedHeartBurstSpriteTemplate, ANIM_TARGET, 3, -128, -22 + createsprite gRedHeartBurstSpriteTemplate, ANIM_TARGET, 3, -384, -31 end Move_LOVELY_KISS: loadspritegfx ANIM_TAG_PINK_HEART loadspritegfx ANIM_TAG_DEVIL - createsprite gUnknown_08593AF0, ANIM_TARGET, 2, 0, -24 + createsprite gDevilSpriteTemplate, ANIM_TARGET, 2, 0, -24 playsewithpan SE_W060B, SOUND_PAN_TARGET waitforvisualfinish playsewithpan SE_W213, SOUND_PAN_TARGET - createsprite gUnknown_08593AC0, ANIM_TARGET, 3, -256, -42 - createsprite gUnknown_08593AC0, ANIM_TARGET, 3, 128, -14 - createsprite gUnknown_08593AC0, ANIM_TARGET, 3, 416, -38 - createsprite gUnknown_08593AC0, ANIM_TARGET, 3, -128, -22 + createsprite gPinkHeartSpriteTemplate, ANIM_TARGET, 3, -256, -42 + createsprite gPinkHeartSpriteTemplate, ANIM_TARGET, 3, 128, -14 + createsprite gPinkHeartSpriteTemplate, ANIM_TARGET, 3, 416, -38 + createsprite gPinkHeartSpriteTemplate, ANIM_TARGET, 3, -128, -22 end Move_FURY_SWIPES: @@ -7811,13 +7811,13 @@ Move_FURY_SWIPES: createsprite gHorizontalLungeSpriteTemplate, ANIM_ATTACKER, 2, 5, 5 delay 4 playsewithpan SE_W010, SOUND_PAN_TARGET - createsprite gUnknown_08593B38, ANIM_TARGET, 2, 16, 0, 1 + createsprite gFurySwipesSpriteTemplate, ANIM_TARGET, 2, 16, 0, 1 createvisualtask AnimTask_ShakeMon2, 2, ANIM_TARGET, 3, 0, 5, 1 delay 10 createsprite gHorizontalLungeSpriteTemplate, ANIM_TARGET, 2, 5, 5 delay 4 playsewithpan SE_W010, SOUND_PAN_TARGET - createsprite gUnknown_08593B38, ANIM_TARGET, 2, -16, 0, 0 + createsprite gFurySwipesSpriteTemplate, ANIM_TARGET, 2, -16, 0, 0 createvisualtask AnimTask_ShakeMon2, 2, ANIM_TARGET, 4, 0, 7, 1 end @@ -8194,14 +8194,14 @@ Move_SPIT_UP: delay 45 playsewithpan SE_W255, SOUND_PAN_ATTACKER delay 3 - createsprite gUnknown_08593A50, ANIM_ATTACKER, 2, 0, 12 - createsprite gUnknown_08593A50, ANIM_ATTACKER, 2, 32, 12 - createsprite gUnknown_08593A50, ANIM_ATTACKER, 2, 64, 12 - createsprite gUnknown_08593A50, ANIM_ATTACKER, 2, 96, 12 - createsprite gUnknown_08593A50, ANIM_ATTACKER, 2, 128, 12 - createsprite gUnknown_08593A50, ANIM_ATTACKER, 2, 160, 12 - createsprite gUnknown_08593A50, ANIM_ATTACKER, 2, 192, 12 - createsprite gUnknown_08593A50, ANIM_ATTACKER, 2, 224, 12 + createsprite gSpitUpOrbSpriteTemplate, ANIM_ATTACKER, 2, 0, 12 + createsprite gSpitUpOrbSpriteTemplate, ANIM_ATTACKER, 2, 32, 12 + createsprite gSpitUpOrbSpriteTemplate, ANIM_ATTACKER, 2, 64, 12 + createsprite gSpitUpOrbSpriteTemplate, ANIM_ATTACKER, 2, 96, 12 + createsprite gSpitUpOrbSpriteTemplate, ANIM_ATTACKER, 2, 128, 12 + createsprite gSpitUpOrbSpriteTemplate, ANIM_ATTACKER, 2, 160, 12 + createsprite gSpitUpOrbSpriteTemplate, ANIM_ATTACKER, 2, 192, 12 + createsprite gSpitUpOrbSpriteTemplate, ANIM_ATTACKER, 2, 224, 12 delay 5 jumpifmoveturn 2, SpitUpStrong jumpifmoveturn 3, SpitUpStrongest @@ -8216,20 +8216,20 @@ SpitUpContinue: waitforvisualfinish end SpitUpStrong: - createsprite gUnknown_08593A50, ANIM_ATTACKER, 2, 16 - createsprite gUnknown_08593A50, ANIM_ATTACKER, 2, 80 - createsprite gUnknown_08593A50, ANIM_ATTACKER, 2, 144 - createsprite gUnknown_08593A50, ANIM_ATTACKER, 2, 208 + createsprite gSpitUpOrbSpriteTemplate, ANIM_ATTACKER, 2, 16 + createsprite gSpitUpOrbSpriteTemplate, ANIM_ATTACKER, 2, 80 + createsprite gSpitUpOrbSpriteTemplate, ANIM_ATTACKER, 2, 144 + createsprite gSpitUpOrbSpriteTemplate, ANIM_ATTACKER, 2, 208 goto SpitUpContinue SpitUpStrongest: - createsprite gUnknown_08593A50, ANIM_ATTACKER, 2, 16 - createsprite gUnknown_08593A50, ANIM_ATTACKER, 2, 48 - createsprite gUnknown_08593A50, ANIM_ATTACKER, 2, 80 - createsprite gUnknown_08593A50, ANIM_ATTACKER, 2, 112 - createsprite gUnknown_08593A50, ANIM_ATTACKER, 2, 144 - createsprite gUnknown_08593A50, ANIM_ATTACKER, 2, 176 - createsprite gUnknown_08593A50, ANIM_ATTACKER, 2, 208 - createsprite gUnknown_08593A50, ANIM_ATTACKER, 2, 240 + createsprite gSpitUpOrbSpriteTemplate, ANIM_ATTACKER, 2, 16 + createsprite gSpitUpOrbSpriteTemplate, ANIM_ATTACKER, 2, 48 + createsprite gSpitUpOrbSpriteTemplate, ANIM_ATTACKER, 2, 80 + createsprite gSpitUpOrbSpriteTemplate, ANIM_ATTACKER, 2, 112 + createsprite gSpitUpOrbSpriteTemplate, ANIM_ATTACKER, 2, 144 + createsprite gSpitUpOrbSpriteTemplate, ANIM_ATTACKER, 2, 176 + createsprite gSpitUpOrbSpriteTemplate, ANIM_ATTACKER, 2, 208 + createsprite gSpitUpOrbSpriteTemplate, ANIM_ATTACKER, 2, 240 goto SpitUpContinue Move_SWALLOW: diff --git a/src/battle_anim_effects_2.c b/src/battle_anim_effects_2.c index f7f193b883..abaa05d1e3 100755 --- a/src/battle_anim_effects_2.c +++ b/src/battle_anim_effects_2.c @@ -39,20 +39,20 @@ void AnimHyperVoiceRing(struct Sprite *); void AnimUproarRing(struct Sprite *); void AnimSoftBoiledEgg(struct Sprite *); void AnimSpeedDust(struct Sprite *); -void sub_8105DE8(struct Sprite *); -void sub_8105E60(struct Sprite *); -void sub_8106140(struct Sprite *); -void sub_81061C4(struct Sprite *); -void sub_810624C(struct Sprite *); +void AnimHealBellMusicNote(struct Sprite *); +void AnimMagentaHeart(struct Sprite *); +void AnimRedHeartProjectile(struct Sprite *); +void AnimParticuleBurst(struct Sprite *); +void AnimRedHeartRising(struct Sprite *); void AnimOrbitFast(struct Sprite *); void AnimOrbitScatter(struct Sprite *); -void sub_8106944(struct Sprite *); -void sub_81069B8(struct Sprite *); -void sub_81069D0(struct Sprite *); -void sub_8106AD0(struct Sprite *); -void sub_8106B54(struct Sprite *); -void sub_8106C80(struct Sprite *); -void sub_8106CD0(struct Sprite *); +void AnimSpitUpOrb(struct Sprite *); +void AnimEyeSparkle(struct Sprite *); +void AnimAngel(struct Sprite *); +void AnimPinkHeart(struct Sprite *); +void AnimDevil(struct Sprite *); +void AnimFurySwipes(struct Sprite *); +void AnimMovmentWaves(struct Sprite *); void sub_8106E00(struct Sprite *); void sub_8106F00(struct Sprite *); void sub_8106F60(struct Sprite *); @@ -91,10 +91,10 @@ static void sub_81057B8(u8); static void sub_8105878(u8); static void sub_81059E0(u8); static void SpeedDust_Step1(u8); -static void sub_8105F30(u8); -static void sub_8105F84(u8); -static void sub_810618C(struct Sprite *); -static void sub_810627C(struct Sprite *); +static void FakeOutStep1(u8); +static void FakeOutStep2(u8); +static void AnimRedHeartProjectile_Step(struct Sprite *); +static void AnimRedHeartRising_Step(struct Sprite *); static void sub_81063A8(u8); static void sub_81065EC(u8); static void AnimOrbitFastStep(struct Sprite *); @@ -803,7 +803,7 @@ const struct SpriteTemplate gUproarRingSpriteTemplate = .callback = AnimUproarRing, }; -const union AffineAnimCmd gUnknown_085938B0[] = +const union AffineAnimCmd gStretchAttackerAffineAnimCmds[] = { AFFINEANIMCMD_FRAME(96, -13, 0, 8), AFFINEANIMCMD_END, @@ -835,7 +835,7 @@ const struct SpriteTemplate gSpeedDustSpriteTemplate = .callback = AnimSpeedDust, }; -const s8 gUnknown_085938F4[][2] = +const s8 gSpeedDustPosTable[][2] = { {30, 28}, {-20, 24}, @@ -843,7 +843,7 @@ const s8 gUnknown_085938F4[][2] = {-10, 28}, }; -const union AnimCmd gUnknown_085938FC[] = +const union AnimCmd gBellAnimCmds[] = { ANIMCMD_FRAME(0, 6), ANIMCMD_FRAME(16, 6), @@ -861,30 +861,30 @@ const union AnimCmd gUnknown_085938FC[] = ANIMCMD_END, }; -const union AnimCmd *const gUnknown_08593934[] = +const union AnimCmd *const gBellAnimTable[] = { - gUnknown_085938FC, + gBellAnimCmds, }; -const struct SpriteTemplate gUnknown_08593938 = +const struct SpriteTemplate gBellSpriteTemplate = { .tileTag = ANIM_TAG_BELL, .paletteTag = ANIM_TAG_BELL, .oam = &gOamData_AffineOff_ObjNormal_32x32, - .anims = gUnknown_08593934, + .anims = gBellAnimTable, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, .callback = AnimSparklingParticle, }; -const u16 gUnknown_08593950[] = +const u16 gMusicNotePaletteTagsTable[] = { ANIM_TAG_MUSIC_NOTES_2, ANIM_SPRITES_START - 1, ANIM_SPRITES_START - 2, }; -const struct SpriteTemplate gUnknown_08593958 = +const struct SpriteTemplate gHealBellMusicNoteSpriteTemplate = { .tileTag = ANIM_TAG_MUSIC_NOTES_2, .paletteTag = ANIM_TAG_MUSIC_NOTES_2, @@ -892,7 +892,7 @@ const struct SpriteTemplate gUnknown_08593958 = .anims = gDummySpriteAnimTable, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_8105DE8, + .callback = AnimHealBellMusicNote, }; const struct SpriteTemplate gMagentaHeartSpriteTemplate = @@ -903,7 +903,7 @@ const struct SpriteTemplate gMagentaHeartSpriteTemplate = .anims = gDummySpriteAnimTable, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_8105E60, + .callback = AnimMagentaHeart, }; const union AffineAnimCmd gUnknown_08593988[] = @@ -913,7 +913,7 @@ const union AffineAnimCmd gUnknown_08593988[] = AFFINEANIMCMD_END, }; -const struct SpriteTemplate gUnknown_085939A0 = +const struct SpriteTemplate gRedHeartProjectileSpriteTemplate = { .tileTag = ANIM_TAG_RED_HEART, .paletteTag = ANIM_TAG_RED_HEART, @@ -921,10 +921,10 @@ const struct SpriteTemplate gUnknown_085939A0 = .anims = gDummySpriteAnimTable, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_8106140, + .callback = AnimRedHeartProjectile, }; -const struct SpriteTemplate gBattleAnimSpriteTemplate_85939B8 = +const struct SpriteTemplate gRedHeartBurstSpriteTemplate = { .tileTag = ANIM_TAG_RED_HEART, .paletteTag = ANIM_TAG_RED_HEART, @@ -932,10 +932,10 @@ const struct SpriteTemplate gBattleAnimSpriteTemplate_85939B8 = .anims = gDummySpriteAnimTable, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_81061C4, + .callback = AnimParticuleBurst, }; -const struct SpriteTemplate gUnknown_085939D0 = +const struct SpriteTemplate gRedHeartRisingSpriteTemplate = { .tileTag = ANIM_TAG_RED_HEART, .paletteTag = ANIM_TAG_RED_HEART, @@ -943,19 +943,19 @@ const struct SpriteTemplate gUnknown_085939D0 = .anims = gDummySpriteAnimTable, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_810624C, + .callback = AnimRedHeartRising, }; -const union AffineAnimCmd gUnknown_085939E8[] = +const union AffineAnimCmd gHiddenPowerOrbAffineAnimCmds[] = { AFFINEANIMCMD_FRAME(0x80, 0x80, 0, 0), AFFINEANIMCMD_FRAME(0x8, 0x8, 0, 1), AFFINEANIMCMD_JUMP(1), }; -const union AffineAnimCmd *const gUnknown_08593A00[] = +const union AffineAnimCmd *const gHiddenPowerOrbAffineAnimTable[] = { - gUnknown_085939E8, + gHiddenPowerOrbAffineAnimCmds, }; const struct SpriteTemplate gHiddenPowerOrbSpriteTemplate = @@ -965,7 +965,7 @@ const struct SpriteTemplate gHiddenPowerOrbSpriteTemplate = .oam = &gOamData_AffineNormal_ObjNormal_16x16, .anims = gDummySpriteAnimTable, .images = NULL, - .affineAnims = gUnknown_08593A00, + .affineAnims = gHiddenPowerOrbAffineAnimTable, .callback = AnimOrbitFast, }; @@ -976,34 +976,34 @@ const struct SpriteTemplate gHiddenPowerOrbScatterSpriteTemplate = .oam = &gOamData_AffineDouble_ObjNormal_16x16, .anims = gDummySpriteAnimTable, .images = NULL, - .affineAnims = gUnknown_08593A00, + .affineAnims = gHiddenPowerOrbAffineAnimTable, .callback = AnimOrbitScatter, }; -const union AffineAnimCmd gUnknown_08593A34[] = +const union AffineAnimCmd gSpitUpOrbAffineAnimCmds[] = { AFFINEANIMCMD_FRAME(0x80, 0x80, 0, 0), AFFINEANIMCMD_FRAME(0x8, 0x8, 0, 1), AFFINEANIMCMD_JUMP(1), }; -const union AffineAnimCmd *const gUnknown_08593A4C[] = +const union AffineAnimCmd *const gSpitUpOrbAffineAnimTable[] = { - gUnknown_08593A34, + gSpitUpOrbAffineAnimCmds, }; -const struct SpriteTemplate gUnknown_08593A50 = +const struct SpriteTemplate gSpitUpOrbSpriteTemplate = { .tileTag = ANIM_TAG_RED_ORB_2, .paletteTag = ANIM_TAG_RED_ORB_2, .oam = &gOamData_AffineDouble_ObjNormal_8x8, .anims = gDummySpriteAnimTable, .images = NULL, - .affineAnims = gUnknown_08593A4C, - .callback = sub_8106944, + .affineAnims = gSpitUpOrbAffineAnimTable, + .callback = AnimSpitUpOrb, }; -const union AnimCmd gUnknown_08593A68[] = +const union AnimCmd gEyeSparkleAnimCmds[] = { ANIMCMD_FRAME(0, 4), ANIMCMD_FRAME(4, 4), @@ -1013,45 +1013,45 @@ const union AnimCmd gUnknown_08593A68[] = ANIMCMD_END, }; -const union AnimCmd *const gUnknown_08593A80[] = +const union AnimCmd *const gEyeSparkleAnimTable[] = { - gUnknown_08593A68, + gEyeSparkleAnimCmds, }; -const struct SpriteTemplate gUnknown_08593A84 = +const struct SpriteTemplate gEyeSparkleSpriteTemplate = { .tileTag = ANIM_TAG_EYE_SPARKLE, .paletteTag = ANIM_TAG_EYE_SPARKLE, .oam = &gOamData_AffineOff_ObjNormal_16x16, - .anims = gUnknown_08593A80, + .anims = gEyeSparkleAnimTable, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_81069B8, + .callback = AnimEyeSparkle, }; -const union AnimCmd gUnknown_08593A9C[] = +const union AnimCmd gAngelSpriteAnimCmds[] = { ANIMCMD_FRAME(0, 24), ANIMCMD_END, }; -const union AnimCmd *const gUnknown_08593AA4[] = +const union AnimCmd *const gAngelSpriteAnimTable[] = { - gUnknown_08593A9C, + gAngelSpriteAnimCmds, }; -const struct SpriteTemplate gUnknown_08593AA8 = +const struct SpriteTemplate gAngelSpriteTemplate = { .tileTag = ANIM_TAG_ANGEL, .paletteTag = ANIM_TAG_ANGEL, .oam = &gOamData_AffineOff_ObjNormal_32x32, - .anims = gUnknown_08593AA4, + .anims = gAngelSpriteAnimTable, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_81069D0, + .callback = AnimAngel, }; -const struct SpriteTemplate gUnknown_08593AC0 = +const struct SpriteTemplate gPinkHeartSpriteTemplate = { .tileTag = ANIM_TAG_PINK_HEART, .paletteTag = ANIM_TAG_PINK_HEART, @@ -1059,36 +1059,36 @@ const struct SpriteTemplate gUnknown_08593AC0 = .anims = gDummySpriteAnimTable, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_8106AD0, + .callback = AnimPinkHeart, }; -const union AnimCmd gUnknown_08593AD8[] = +const union AnimCmd gDevilAnimCmds1[] = { ANIMCMD_FRAME(0, 3), ANIMCMD_JUMP(0), }; -const union AnimCmd gUnknown_08593AE0[] = +const union AnimCmd gDevilAnimCmds2[] = { ANIMCMD_FRAME(16, 3), ANIMCMD_JUMP(0), }; -const union AnimCmd *const gUnknown_08593AE8[] = +const union AnimCmd *const gDevilAnimTable[] = { - gUnknown_08593AD8, - gUnknown_08593AE0, + gDevilAnimCmds1, + gDevilAnimCmds2, }; -const struct SpriteTemplate gUnknown_08593AF0 = +const struct SpriteTemplate gDevilSpriteTemplate = { .tileTag = ANIM_TAG_DEVIL, .paletteTag = ANIM_TAG_DEVIL, .oam = &gOamData_AffineOff_ObjNormal_32x32, - .anims = gUnknown_08593AE8, + .anims = gDevilAnimTable, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_8106B54, + .callback = AnimDevil, }; const union AnimCmd gUnknown_08593B08[] = @@ -1109,24 +1109,24 @@ const union AnimCmd gUnknown_08593B1C[] = ANIMCMD_END, }; -const union AnimCmd *const gUnknown_08593B30[] = +const union AnimCmd *const gFurySwipesAnimTable[] = { gUnknown_08593B08, gUnknown_08593B1C, }; -const struct SpriteTemplate gUnknown_08593B38 = +const struct SpriteTemplate gFurySwipesSpriteTemplate = { .tileTag = ANIM_TAG_SWIPE, .paletteTag = ANIM_TAG_SWIPE, .oam = &gOamData_AffineOff_ObjNormal_32x32, - .anims = gUnknown_08593B30, + .anims = gFurySwipesAnimTable, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_8106C80, + .callback = AnimFurySwipes, }; -const union AnimCmd gUnknown_08593B50[] = +const union AnimCmd gMovementWavesAnimCmds1[] = { ANIMCMD_FRAME(0, 8), ANIMCMD_FRAME(16, 8), @@ -1135,7 +1135,7 @@ const union AnimCmd gUnknown_08593B50[] = ANIMCMD_END, }; -const union AnimCmd gUnknown_08593B64[] = +const union AnimCmd gMovementWavesAnimCmds2[] = { ANIMCMD_FRAME(16, 8, .hFlip = TRUE), ANIMCMD_FRAME(32, 8, .hFlip = TRUE), @@ -1144,21 +1144,21 @@ const union AnimCmd gUnknown_08593B64[] = ANIMCMD_END, }; -const union AnimCmd *const gUnknown_08593B78[] = +const union AnimCmd *const gMovementWavesAnimTable[] = { - gUnknown_08593B50, - gUnknown_08593B64, + gMovementWavesAnimCmds1, + gMovementWavesAnimCmds2, }; -const struct SpriteTemplate gUnknown_08593B80 = +const struct SpriteTemplate gMovmentWavesSpriteTemplate = { .tileTag = ANIM_TAG_MOVEMENT_WAVES, .paletteTag = ANIM_TAG_MOVEMENT_WAVES, .oam = &gOamData_AffineOff_ObjNormal_32x32, - .anims = gUnknown_08593B78, + .anims = gMovementWavesAnimTable, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_8106CD0, + .callback = AnimMovmentWaves, }; const union AffineAnimCmd gUnknown_08593B98[] = @@ -2773,12 +2773,12 @@ static void AnimSoftBoiledEgg_Step4_Callback(struct Sprite *sprite) DestroyAnimSprite(sprite); } -void sub_810577C(u8 taskId) +void AnimTask_StretchAttacker(u8 taskId) { struct Task* task = &gTasks[taskId]; u8 spriteId = GetAnimBattlerSpriteId(ANIM_ATTACKER); task->data[0] = spriteId; - PrepareAffineAnimInTaskData(task, spriteId, gUnknown_085938B0); + PrepareAffineAnimInTaskData(task, spriteId, gStretchAttackerAffineAnimCmds); task->func = sub_81057B8; } @@ -2969,8 +2969,8 @@ static void SpeedDust_Step1(u8 taskId) { gSprites[spriteId].data[0] = taskId; gSprites[spriteId].data[1] = 13; - gSprites[spriteId].pos2.x = gUnknown_085938F4[task->data[2]][0]; - gSprites[spriteId].pos2.y = gUnknown_085938F4[task->data[2]][1]; + gSprites[spriteId].pos2.x = gSpeedDustPosTable[task->data[2]][0]; + gSprites[spriteId].pos2.y = gSpeedDustPosTable[task->data[2]][1]; task->data[13]++; if (++task->data[2] > 3) { @@ -3020,21 +3020,21 @@ void sub_8105D60(u8 taskId) { int i; for (i = 0; i < 3; i++) - FreeSpritePaletteByTag(gUnknown_08593950[i]); + FreeSpritePaletteByTag(gMusicNotePaletteTagsTable[i]); DestroyAnimVisualTask(taskId); } -static void sub_8105D88(struct Sprite *sprite, u8 a, u8 b) +static void SetMusicNotePalette(struct Sprite *sprite, u8 a, u8 b) { u8 tile; tile = (b & 1); tile = ((-tile | tile) >> 31) & 32; sprite->oam.tileNum += tile + (a << 2); - sprite->oam.paletteNum = IndexOfSpritePaletteTag(gUnknown_08593950[b >> 1]); + sprite->oam.paletteNum = IndexOfSpritePaletteTag(gMusicNotePaletteTagsTable[b >> 1]); } -void sub_8105DE8(struct Sprite *sprite) +void AnimHealBellMusicNote(struct Sprite *sprite) { InitSpritePosToAnimAttacker(sprite, FALSE); if (GetBattlerSide(gBattleAnimAttacker) != B_SIDE_PLAYER) @@ -3045,10 +3045,10 @@ void sub_8105DE8(struct Sprite *sprite) sprite->data[4] = GetBattlerSpriteCoord(gBattleAnimAttacker, 1) + gBattleAnimArgs[3]; sprite->callback = StartAnimLinearTranslation; StoreSpriteCallbackInData6(sprite, DestroyAnimSprite); - sub_8105D88(sprite, gBattleAnimArgs[5], gBattleAnimArgs[6]); + SetMusicNotePalette(sprite, gBattleAnimArgs[5], gBattleAnimArgs[6]); } -void sub_8105E60(struct Sprite *sprite) +void AnimMagentaHeart(struct Sprite *sprite) { if (++sprite->data[0] == 1) InitSpritePosToAnimAttacker(sprite, FALSE); @@ -3061,7 +3061,7 @@ void sub_8105E60(struct Sprite *sprite) DestroyAnimSprite(sprite); } -void sub_8105EB0(u8 taskId) +void AnimTask_FakeOut(u8 taskId) { u16 win0h = IsContest() ? 0x98 : 0xF0; u16 win0v = 0; @@ -3076,17 +3076,17 @@ void sub_8105EB0(u8 taskId) SetGpuReg(REG_OFFSET_BLDY, 0x10); gTasks[taskId].data[0] = win0v; gTasks[taskId].data[1] = win0h; - gTasks[taskId].func = sub_8105F30; + gTasks[taskId].func = FakeOutStep1; } -static void sub_8105F30(u8 taskId) +static void FakeOutStep1(u8 taskId) { gTasks[taskId].data[0] += 13; gTasks[taskId].data[1] -= 13; if (gTasks[taskId].data[0] >= gTasks[taskId].data[1]) { gBattle_WIN0H = 0; - gTasks[taskId].func = sub_8105F84; + gTasks[taskId].func = FakeOutStep2; } else { @@ -3094,7 +3094,7 @@ static void sub_8105F30(u8 taskId) } } -static void sub_8105F84(u8 taskId) +static void FakeOutStep2(u8 taskId) { if (++gTasks[taskId].data[10] == 5) { @@ -3154,7 +3154,7 @@ void sub_81060B0(u8 taskId) } } -void sub_8106140(struct Sprite *sprite) +void AnimRedHeartProjectile(struct Sprite *sprite) { InitSpritePosToAnimAttacker(sprite, TRUE); sprite->data[0] = 95; @@ -3163,10 +3163,10 @@ void sub_8106140(struct Sprite *sprite) sprite->data[3] = sprite->pos1.y; sprite->data[4] = GetBattlerSpriteCoord(gBattleAnimTarget, 3); InitAnimLinearTranslation(sprite); - sprite->callback = sub_810618C; + sprite->callback = AnimRedHeartProjectile_Step; } -static void sub_810618C(struct Sprite *sprite) +static void AnimRedHeartProjectile_Step(struct Sprite *sprite) { if (!AnimTranslateLinear(sprite)) { @@ -3179,7 +3179,7 @@ static void sub_810618C(struct Sprite *sprite) } } -void sub_81061C4(struct Sprite *sprite) +void AnimParticuleBurst(struct Sprite *sprite) { if (sprite->data[0] == 0) { @@ -3201,17 +3201,17 @@ void sub_81061C4(struct Sprite *sprite) } } -void sub_810624C(struct Sprite *sprite) +void AnimRedHeartRising(struct Sprite *sprite) { sprite->pos1.x = gBattleAnimArgs[0]; sprite->pos1.y = 160; sprite->data[0] = gBattleAnimArgs[2]; sprite->data[1] = gBattleAnimArgs[1]; sprite->callback = WaitAnimForDuration; - StoreSpriteCallbackInData6(sprite, sub_810627C); + StoreSpriteCallbackInData6(sprite, AnimRedHeartRising_Step); } -static void sub_810627C(struct Sprite *sprite) +static void AnimRedHeartRising_Step(struct Sprite *sprite) { s16 y; sprite->data[2] += sprite->data[1]; @@ -3462,7 +3462,7 @@ static void AnimOrbitScatterStep(struct Sprite *sprite) DestroyAnimSprite(sprite); } -static void sub_8106914(struct Sprite *sprite) +static void AnimSpitUpOrb_Step(struct Sprite *sprite) { sprite->pos2.x += sprite->data[0]; sprite->pos2.y += sprite->data[1]; @@ -3470,14 +3470,14 @@ static void sub_8106914(struct Sprite *sprite) DestroyAnimSprite(sprite); } -void sub_8106944(struct Sprite *sprite) +void AnimSpitUpOrb(struct Sprite *sprite) { sprite->pos1.x = GetBattlerSpriteCoord(gBattleAnimAttacker, 2); sprite->pos1.y = GetBattlerSpriteCoord(gBattleAnimAttacker, 3); sprite->data[0] = Sin(gBattleAnimArgs[0], 10); sprite->data[1] = Cos(gBattleAnimArgs[0], 7); sprite->data[2] = gBattleAnimArgs[1]; - sprite->callback = sub_8106914; + sprite->callback = AnimSpitUpOrb_Step; } static void sub_810699C(struct Sprite *sprite) @@ -3486,13 +3486,13 @@ static void sub_810699C(struct Sprite *sprite) DestroyAnimSprite(sprite); } -void sub_81069B8(struct Sprite *sprite) +void AnimEyeSparkle(struct Sprite *sprite) { InitSpritePosToAnimAttacker(sprite, TRUE); sprite->callback = sub_810699C; } -void sub_81069D0(struct Sprite *sprite) +void AnimAngel(struct Sprite *sprite) { s16 var0; if (!sprite->data[0]) @@ -3530,7 +3530,7 @@ static void sub_8106A64(struct Sprite *sprite) DestroyAnimSprite(sprite); } -void sub_8106AD0(struct Sprite *sprite) +void AnimPinkHeart(struct Sprite *sprite) { if (sprite->data[0] == 0) { @@ -3556,7 +3556,7 @@ void sub_8106AD0(struct Sprite *sprite) } } -void sub_8106B54(struct Sprite *sprite) +void AnimDevil(struct Sprite *sprite) { if (sprite->data[3] == 0) { @@ -3585,7 +3585,7 @@ void sub_8106B54(struct Sprite *sprite) DestroyAnimSprite(sprite); } -void sub_8106C80(struct Sprite *sprite) +void AnimFurySwipes(struct Sprite *sprite) { if (sprite->data[0] == 0) { @@ -3600,7 +3600,7 @@ void sub_8106C80(struct Sprite *sprite) } } -void sub_8106CD0(struct Sprite *sprite) +void AnimMovmentWaves(struct Sprite *sprite) { if (!gBattleAnimArgs[2]) { diff --git a/src/battle_anim_effects_3.c b/src/battle_anim_effects_3.c index 5b313b53da..1c24ecbcee 100755 --- a/src/battle_anim_effects_3.c +++ b/src/battle_anim_effects_3.c @@ -63,7 +63,7 @@ void AnimForesightMagnifyingGlass(struct Sprite *); void AnimMeteorMashStar(struct Sprite *); void AnimBlockX(struct Sprite *); void sub_815FE80(struct Sprite *); -void sub_81061C4(struct Sprite *); +void AnimParticuleBurst(struct Sprite *); void AnimKnockOffStrike(struct Sprite *); void AnimRecycle(struct Sprite *); static void sub_815A114(struct Sprite *); @@ -1079,7 +1079,7 @@ const struct SpriteTemplate gUnknown_085CE8F4 = .anims = gDummySpriteAnimTable, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_81061C4, + .callback = AnimParticuleBurst, }; const struct SpriteTemplate gBlockXSpriteTemplate = From def7a4a18a2543e6e0ac5b541cb18c9699abb76b Mon Sep 17 00:00:00 2001 From: Sewef Date: Sun, 20 Oct 2019 15:54:16 +0200 Subject: [PATCH 08/46] more battle_anims_effects_2 --- data/battle_anim_scripts.s | 64 ++++++++-------- src/battle_anim_effects_2.c | 126 ++++++++++++++++---------------- src/battle_anim_utility_funcs.c | 8 +- 3 files changed, 99 insertions(+), 99 deletions(-) diff --git a/data/battle_anim_scripts.s b/data/battle_anim_scripts.s index b52e7b739a..5998aa5d38 100644 --- a/data/battle_anim_scripts.s +++ b/data/battle_anim_scripts.s @@ -1800,11 +1800,11 @@ Move_SAFEGUARD: monbg ANIM_ATK_PARTNER setalpha 8, 8 playsewithpan SE_W208, SOUND_PAN_ATTACKER - createsprite gUnknown_08593C64, ANIM_ATTACKER, 2 + createsprite gGuardRingSpriteTemplate, ANIM_ATTACKER, 2 delay 4 - createsprite gUnknown_08593C64, ANIM_ATTACKER, 2 + createsprite gGuardRingSpriteTemplate, ANIM_ATTACKER, 2 delay 4 - createsprite gUnknown_08593C64, ANIM_ATTACKER, 2 + createsprite gGuardRingSpriteTemplate, ANIM_ATTACKER, 2 waitforvisualfinish playsewithpan SE_REAPOKE, SOUND_PAN_ATTACKER createvisualtask sub_8115A04, 2, 10, 0, 2, 0, 10, RGB_WHITE @@ -2531,8 +2531,8 @@ HornDrillInContest: Move_THRASH: loadspritegfx ANIM_TAG_IMPACT loadspritegfx ANIM_TAG_HANDS_AND_FEET - createvisualtask AnimTask_ThrashMoveMon, 2 - createvisualtask sub_8104CA4, 2 + createvisualtask AnimTask_ThrashMoveMonHorizontal, 2 + createvisualtask AnimTask_ThrashMoveMonVertical, 2 createsprite gUnknown_08595EB0, ANIM_TARGET, 3, 1, 10, 0 createvisualtask AnimTask_ShakeMonInPlace, 2, ANIM_TARGET, 4, 0, 7, 1 playsewithpan SE_W004, SOUND_PAN_TARGET @@ -3396,11 +3396,11 @@ ExtremeSpeedContinue: loopsewithpan SE_W013B, SOUND_PAN_ATTACKER, 8, 3 waitforvisualfinish delay 1 - createvisualtask sub_8117F60, 2 + createvisualtask AnimTask_ExtremeSpeedMoveTarget, 2 monbg ANIM_TARGET setalpha 12, 8 delay 18 - createvisualtask sub_8105810, 2 + createvisualtask AnimTask_ExtremeSpeedImpact, 2 delay 2 playsewithpan SE_W004, SOUND_PAN_TARGET createsprite gBattleAnimSpriteTemplate_85973B8, ANIM_TARGET, 2, 1, 0, -12, 3 @@ -3413,7 +3413,7 @@ ExtremeSpeedContinue: waitforvisualfinish createvisualtask AnimTask_SpeedDust, 2 delay 10 - createvisualtask sub_810599C, 2 + createvisualtask AnimTask_ExtremeSpeedMonReappear, 2 loopsewithpan SE_W104, SOUND_PAN_ATTACKER, 8, 4 waitforvisualfinish restorebg @@ -3437,20 +3437,20 @@ Move_UPROAR: createvisualtask sub_8106D90, 2, 0 createsprite gUproarRingSpriteTemplate, ANIM_ATTACKER, 3, 0, 0, 0, 0, 31, 8 playsewithpan SE_W253, SOUND_PAN_ATTACKER - createsprite gBattleAnimSpriteTemplate_8593BB8, ANIM_ATTACKER, 2, 0, 29, -12, 0 - createsprite gBattleAnimSpriteTemplate_8593BB8, ANIM_ATTACKER, 2, 0, -12, -29, 1 + createsprite gJaggedMusicNoteSpriteTemplate, ANIM_ATTACKER, 2, 0, 29, -12, 0 + createsprite gJaggedMusicNoteSpriteTemplate, ANIM_ATTACKER, 2, 0, -12, -29, 1 delay 16 createvisualtask sub_8106D90, 2, 0 createsprite gUproarRingSpriteTemplate, ANIM_ATTACKER, 3, 0, 0, 0, 0, 31, 8 playsewithpan SE_W253, SOUND_PAN_ATTACKER - createsprite gBattleAnimSpriteTemplate_8593BB8, ANIM_ATTACKER, 2, 0, 12, -29, 1 - createsprite gBattleAnimSpriteTemplate_8593BB8, ANIM_ATTACKER, 2, 0, -29, -12, 0 + createsprite gJaggedMusicNoteSpriteTemplate, ANIM_ATTACKER, 2, 0, 12, -29, 1 + createsprite gJaggedMusicNoteSpriteTemplate, ANIM_ATTACKER, 2, 0, -29, -12, 0 delay 16 createvisualtask sub_8106D90, 2, 0 createsprite gUproarRingSpriteTemplate, ANIM_ATTACKER, 3, 0, 0, 0, 0, 31, 8 playsewithpan SE_W253, SOUND_PAN_ATTACKER - createsprite gBattleAnimSpriteTemplate_8593BB8, ANIM_ATTACKER, 2, 0, 24, -24, 1 - createsprite gBattleAnimSpriteTemplate_8593BB8, ANIM_ATTACKER, 2, 0, -24, -24, 0 + createsprite gJaggedMusicNoteSpriteTemplate, ANIM_ATTACKER, 2, 0, 24, -24, 1 + createsprite gJaggedMusicNoteSpriteTemplate, ANIM_ATTACKER, 2, 0, -24, -24, 0 waitforvisualfinish clearmonbg ANIM_DEF_PARTNER end @@ -5158,7 +5158,7 @@ Move_FAINT_ATTACK: clearmonbg ANIM_ATTACKER invisible ANIM_ATTACKER delay 1 - createvisualtask sub_8117F60, 2 + createvisualtask AnimTask_ExtremeSpeedMoveTarget, 2 setalpha 12, 8 monbg ANIM_TARGET delay 1 @@ -7920,23 +7920,23 @@ Move_BATON_PASS: Move_PERISH_SONG: loadspritegfx ANIM_TAG_MUSIC_NOTES_2 - createsprite gUnknown_08593C0C, ANIM_ATTACKER, 4, 0, 0, 0 - createsprite gUnknown_08593C0C, ANIM_ATTACKER, 4, 1, 1, 16 - createsprite gUnknown_08593C0C, ANIM_ATTACKER, 4, 2, 1, 32 - createsprite gUnknown_08593C0C, ANIM_ATTACKER, 4, 3, 2, 48 - createsprite gUnknown_08593C0C, ANIM_ATTACKER, 4, 4, 2, 64 - createsprite gUnknown_08593C0C, ANIM_ATTACKER, 4, 5, 0, 80 - createsprite gUnknown_08593C0C, ANIM_ATTACKER, 4, 6, 0, 96 - createsprite gUnknown_08593C0C, ANIM_ATTACKER, 4, 7, 1, 112 - createsprite gUnknown_08593C0C, ANIM_ATTACKER, 4, 8, 2, 128 - createsprite gUnknown_08593C0C, ANIM_ATTACKER, 4, 9, 0, 144 - createsprite gUnknown_08593C0C, ANIM_ATTACKER, 4, 10, 2, 160 - createsprite gUnknown_08593C0C, ANIM_ATTACKER, 4, 11, 0, 176 - createsprite gUnknown_08593C0C, ANIM_ATTACKER, 4, 12, 1, 192 - createsprite gUnknown_08593C0C, ANIM_ATTACKER, 4, 13, 3, 208 - createsprite gUnknown_08593C0C, ANIM_ATTACKER, 4, 14, 3, 224 - createsprite gUnknown_08593C0C, ANIM_ATTACKER, 4, 15, 0, 240 - createsprite gUnknown_08593C24, ANIM_ATTACKER, 4, 15, 0, 0 + createsprite gPerishSongMusicNoteSpriteTemplate, ANIM_ATTACKER, 4, 0, 0, 0 + createsprite gPerishSongMusicNoteSpriteTemplate, ANIM_ATTACKER, 4, 1, 1, 16 + createsprite gPerishSongMusicNoteSpriteTemplate, ANIM_ATTACKER, 4, 2, 1, 32 + createsprite gPerishSongMusicNoteSpriteTemplate, ANIM_ATTACKER, 4, 3, 2, 48 + createsprite gPerishSongMusicNoteSpriteTemplate, ANIM_ATTACKER, 4, 4, 2, 64 + createsprite gPerishSongMusicNoteSpriteTemplate, ANIM_ATTACKER, 4, 5, 0, 80 + createsprite gPerishSongMusicNoteSpriteTemplate, ANIM_ATTACKER, 4, 6, 0, 96 + createsprite gPerishSongMusicNoteSpriteTemplate, ANIM_ATTACKER, 4, 7, 1, 112 + createsprite gPerishSongMusicNoteSpriteTemplate, ANIM_ATTACKER, 4, 8, 2, 128 + createsprite gPerishSongMusicNoteSpriteTemplate, ANIM_ATTACKER, 4, 9, 0, 144 + createsprite gPerishSongMusicNoteSpriteTemplate, ANIM_ATTACKER, 4, 10, 2, 160 + createsprite gPerishSongMusicNoteSpriteTemplate, ANIM_ATTACKER, 4, 11, 0, 176 + createsprite gPerishSongMusicNoteSpriteTemplate, ANIM_ATTACKER, 4, 12, 1, 192 + createsprite gPerishSongMusicNoteSpriteTemplate, ANIM_ATTACKER, 4, 13, 3, 208 + createsprite gPerishSongMusicNoteSpriteTemplate, ANIM_ATTACKER, 4, 14, 3, 224 + createsprite gPerishSongMusicNoteSpriteTemplate, ANIM_ATTACKER, 4, 15, 0, 240 + createsprite gPerishSongMusicNote2SpriteTemplate, ANIM_ATTACKER, 4, 15, 0, 0 delay 20 panse_1B SE_W195, SOUND_PAN_ATTACKER, SOUND_PAN_TARGET, +2, 0 delay 80 diff --git a/src/battle_anim_effects_2.c b/src/battle_anim_effects_2.c index abaa05d1e3..29acbbcfd3 100755 --- a/src/battle_anim_effects_2.c +++ b/src/battle_anim_effects_2.c @@ -23,7 +23,7 @@ void sub_8103620(struct Sprite *); void Anim_KinesisZapEnergy(struct Sprite *); void Anim_SwordsDanceBlade(struct Sprite *); void AnimSonicBoomProjectile(struct Sprite *); -void sub_8103AA4(struct Sprite *); +void AnimAirWaveProjectile(struct Sprite *); void sub_8103FE8(struct Sprite *); void AnimCoinThrow(struct Sprite *); void AnimFallingCoin(struct Sprite *); @@ -53,15 +53,15 @@ void AnimPinkHeart(struct Sprite *); void AnimDevil(struct Sprite *); void AnimFurySwipes(struct Sprite *); void AnimMovmentWaves(struct Sprite *); -void sub_8106E00(struct Sprite *); -void sub_8106F00(struct Sprite *); -void sub_8106F60(struct Sprite *); -void sub_81070AC(struct Sprite *); +void AnimJaggedMusicNote(struct Sprite *); +void AnimPerishSongMusicNote2(struct Sprite *); +void AnimPerishSongMusicNote(struct Sprite *); +void AnimGuardRing(struct Sprite *); static void sub_81034D8(struct Sprite *); static void sub_8103658(struct Sprite *); static void sub_8103680(struct Sprite *); static void AnimTask_WithdrawStep(u8); -static void Anim_SwordsDanceBladeStep(struct Sprite *); +static void AnimSwordsDanceBladeStep(struct Sprite *); static void sub_8104018(struct Sprite *); static void AnimFallingCoin_Step(struct Sprite *); static void AnimBulletSeed_Step1(struct Sprite *); @@ -77,8 +77,8 @@ static void ClonedMinizeSprite_Step(struct Sprite *); static void AnimTask_SplashStep(u8); static void AnimTask_GrowAndShrinkStep(u8); static void ThrashMoveMonStep(u8); -static void sub_8104D28(u8); -static void sub_8104F54(u8); +static void ThrashMoveMon(u8); +static void AnimTask_SketchDrawMon(u8); static void AnimPencil_Step(struct Sprite *); static void AnimSoftBoiledEgg_Step1(struct Sprite *); static void AnimSoftBoiledEgg_Step2(struct Sprite *); @@ -87,15 +87,15 @@ static void AnimSoftBoiledEgg_Step3_Callback1(struct Sprite *); static void AnimSoftBoiledEgg_Step3_Callback2(struct Sprite *); static void AnimSoftBoiledEgg_Step4(struct Sprite *); static void AnimSoftBoiledEgg_Step4_Callback(struct Sprite *); -static void sub_81057B8(u8); -static void sub_8105878(u8); -static void sub_81059E0(u8); +static void StretchAttacker_Step(u8); +static void ExtremeSpeedImpact_Step(u8); +static void ExtremeSpeedMonReappear_Step(u8); static void SpeedDust_Step1(u8); static void FakeOutStep1(u8); static void FakeOutStep2(u8); static void AnimRedHeartProjectile_Step(struct Sprite *); static void AnimRedHeartRising_Step(struct Sprite *); -static void sub_81063A8(u8); +static void HeartsBackground_Step(u8); static void sub_81065EC(u8); static void AnimOrbitFastStep(struct Sprite *); static void AnimOrbitScatterStep(struct Sprite *); @@ -275,7 +275,7 @@ const struct SpriteTemplate gAirWaveProjectileSpriteTemplate = .anims = gDummySpriteAnimTable, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_8103AA4, + .callback = AnimAirWaveProjectile, }; const union AffineAnimCmd gGrowingRingAffineAnimCmds[] = @@ -1169,7 +1169,7 @@ const union AffineAnimCmd gUnknown_08593B98[] = AFFINEANIMCMD_END, }; -const struct SpriteTemplate gBattleAnimSpriteTemplate_8593BB8 = +const struct SpriteTemplate gJaggedMusicNoteSpriteTemplate = { .tileTag = ANIM_TAG_JAGGED_MUSIC_NOTE, .paletteTag = ANIM_TAG_JAGGED_MUSIC_NOTE, @@ -1177,84 +1177,84 @@ const struct SpriteTemplate gBattleAnimSpriteTemplate_8593BB8 = .anims = gDummySpriteAnimTable, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_8106E00, + .callback = AnimJaggedMusicNote, }; -const union AffineAnimCmd gUnknown_08593BD0[] = +const union AffineAnimCmd gPerishSongMusicNoteAffineAnimCmds1[] = { AFFINEANIMCMD_FRAME(0x0, 0x0, 0, 5), AFFINEANIMCMD_END, }; -const union AffineAnimCmd gUnknown_08593BE0[] = +const union AffineAnimCmd gPerishSongMusicNoteAffineAnimCmds2[] = { AFFINEANIMCMD_FRAME(0x0, 0x0, -8, 16), AFFINEANIMCMD_END_ALT(1), }; -const union AffineAnimCmd gUnknown_08593BF0[] = +const union AffineAnimCmd gPerishSongMusicNoteAffineAnimCmds3[] = { AFFINEANIMCMD_FRAME(0x0, 0x0, 8, 16), AFFINEANIMCMD_END_ALT(1), }; -const union AffineAnimCmd *const gUnknown_08593C00[] = +const union AffineAnimCmd *const gPerishSongMusicNoteAffineAnimTable[] = { - gUnknown_08593BD0, - gUnknown_08593BE0, - gUnknown_08593BF0, + gPerishSongMusicNoteAffineAnimCmds1, + gPerishSongMusicNoteAffineAnimCmds2, + gPerishSongMusicNoteAffineAnimCmds3, }; extern const union AnimCmd *const gMusicNotesAnimTable[]; -const struct SpriteTemplate gUnknown_08593C0C = +const struct SpriteTemplate gPerishSongMusicNoteSpriteTemplate = { .tileTag = ANIM_TAG_MUSIC_NOTES_2, .paletteTag = ANIM_TAG_MUSIC_NOTES_2, .oam = &gOamData_AffineNormal_ObjNormal_16x16, .anims = gMusicNotesAnimTable, .images = NULL, - .affineAnims = gUnknown_08593C00, - .callback = sub_8106F60, + .affineAnims = gPerishSongMusicNoteAffineAnimTable, + .callback = AnimPerishSongMusicNote, }; -const struct SpriteTemplate gUnknown_08593C24 = +const struct SpriteTemplate gPerishSongMusicNote2SpriteTemplate = { .tileTag = ANIM_TAG_MUSIC_NOTES_2, .paletteTag = ANIM_TAG_MUSIC_NOTES_2, .oam = &gOamData_AffineNormal_ObjNormal_16x16, .anims = gMusicNotesAnimTable, .images = NULL, - .affineAnims = gUnknown_08593C00, - .callback = sub_8106F00, + .affineAnims = gPerishSongMusicNoteAffineAnimTable, + .callback = AnimPerishSongMusicNote2, }; -const union AffineAnimCmd gUnknown_08593C3C[] = +const union AffineAnimCmd gGuardRingAffineAnimCmds1[] = { AFFINEANIMCMD_FRAME(0x100, 0x100, 0, 0), AFFINEANIMCMD_END, }; -const union AffineAnimCmd gUnknown_08593C4C[] = +const union AffineAnimCmd gGuardRingAffineAnimCmds2[] = { AFFINEANIMCMD_FRAME(0x200, 0x100, 0, 0), AFFINEANIMCMD_END, }; -const union AffineAnimCmd *const gUnknown_08593C5C[] = +const union AffineAnimCmd *const gGuardRingAffineAnimTable[] = { - gUnknown_08593C3C, - gUnknown_08593C4C, + gGuardRingAffineAnimCmds1, + gGuardRingAffineAnimCmds2, }; -const struct SpriteTemplate gUnknown_08593C64 = +const struct SpriteTemplate gGuardRingSpriteTemplate = { .tileTag = ANIM_TAG_GUARD_RING, .paletteTag = ANIM_TAG_GUARD_RING, .oam = &gOamData_AffineDouble_ObjBlend_64x32, .anims = gDummySpriteAnimTable, .images = NULL, - .affineAnims = gUnknown_08593C5C, - .callback = sub_81070AC, + .affineAnims = gGuardRingAffineAnimTable, + .callback = AnimGuardRing, }; void sub_8103448(struct Sprite *sprite) @@ -1456,10 +1456,10 @@ void Anim_SwordsDanceBlade(struct Sprite *sprite) { InitSpritePosToAnimAttacker(sprite, FALSE); sprite->callback = RunStoredCallbackWhenAffineAnimEnds; - StoreSpriteCallbackInData6(sprite, Anim_SwordsDanceBladeStep); + StoreSpriteCallbackInData6(sprite, AnimSwordsDanceBladeStep); } -static void Anim_SwordsDanceBladeStep(struct Sprite *sprite) +static void AnimSwordsDanceBladeStep(struct Sprite *sprite) { sprite->data[0] = 6; sprite->data[2] = sprite->pos1.x; @@ -1508,7 +1508,7 @@ void AnimSonicBoomProjectile(struct Sprite *sprite) StoreSpriteCallbackInData6(sprite, DestroyAnimSprite); } -static void sub_81039CC(struct Sprite *sprite) +static void AnimAirWaveProjectile_Step2(struct Sprite *sprite) { if (sprite->data[0]-- <= 0) { @@ -1517,7 +1517,7 @@ static void sub_81039CC(struct Sprite *sprite) } } -static void sub_8103A00(struct Sprite *sprite) +static void AnimAirWaveProjectile_Step1(struct Sprite *sprite) { struct Task* task = &gTasks[sprite->data[7]]; if (sprite->data[0] > task->data[5]) @@ -1546,11 +1546,11 @@ static void sub_8103A00(struct Sprite *sprite) if (sprite->data[0]-- <= 0) { sprite->data[0] = 30; - sprite->callback = sub_81039CC; + sprite->callback = AnimAirWaveProjectile_Step2; } } -void sub_8103AA4(struct Sprite *sprite) +void AnimAirWaveProjectile(struct Sprite *sprite) { s16 a; s16 b; @@ -1594,7 +1594,7 @@ void sub_8103AA4(struct Sprite *sprite) sprite->data[5] = 0; sprite->data[3] = sub_8151534(sub_8151534(b, a), sub_8151624(0x1C0)); sprite->data[4] = sub_8151534(sub_8151534(c, a), sub_8151624(0x1C0)); - sprite->callback = sub_8103A00; + sprite->callback = AnimAirWaveProjectile_Step1; } } @@ -2284,7 +2284,7 @@ void AnimAngerMark(struct Sprite *sprite) } // left/right movements -void AnimTask_ThrashMoveMon(u8 taskId) +void AnimTask_ThrashMoveMonHorizontal(u8 taskId) { struct Task* task = &gTasks[taskId]; u8 spriteId = GetAnimBattlerSpriteId(ANIM_ATTACKER); @@ -2302,7 +2302,7 @@ static void ThrashMoveMonStep(u8 taskId) } // up/down movements -void sub_8104CA4(u8 taskId) +void AnimTask_ThrashMoveMonVertical(u8 taskId) { struct Task* task = &gTasks[taskId]; task->data[0] = GetAnimBattlerSpriteId(ANIM_ATTACKER); @@ -2318,10 +2318,10 @@ void sub_8104CA4(u8 taskId) if (GetBattlerSide(gBattleAnimAttacker) == B_SIDE_OPPONENT) task->data[2] *= -1; - task->func = sub_8104D28; + task->func = ThrashMoveMon; } -static void sub_8104D28(u8 taskId) +static void ThrashMoveMon(u8 taskId) { struct Task* task = &gTasks[taskId]; if (++task->data[7] > 2) @@ -2410,10 +2410,10 @@ void sub_8104E74(u8 taskId) params.initState = 1; params.unused9 = 0; ScanlineEffect_SetParams(params); - task->func = sub_8104F54; + task->func = AnimTask_SketchDrawMon; } -static void sub_8104F54(u8 taskId) +static void AnimTask_SketchDrawMon(u8 taskId) { struct Task* task = &gTasks[taskId]; @@ -2779,10 +2779,10 @@ void AnimTask_StretchAttacker(u8 taskId) u8 spriteId = GetAnimBattlerSpriteId(ANIM_ATTACKER); task->data[0] = spriteId; PrepareAffineAnimInTaskData(task, spriteId, gStretchAttackerAffineAnimCmds); - task->func = sub_81057B8; + task->func = StretchAttacker_Step; } -static void sub_81057B8(u8 taskId) +static void StretchAttacker_Step(u8 taskId) { struct Task* task = &gTasks[taskId]; if (!RunAffineAnimFromTaskData(task)) @@ -2793,7 +2793,7 @@ static void sub_81057B8(u8 taskId) } } -void sub_8105810(u8 taskId) +void AnimTask_ExtremeSpeedImpact(u8 taskId) { struct Task* task = &gTasks[taskId]; task->data[0] = 0; @@ -2813,10 +2813,10 @@ void sub_8105810(u8 taskId) } task->data[15] = GetAnimBattlerSpriteId(ANIM_TARGET); - task->func = sub_8105878; + task->func = ExtremeSpeedImpact_Step; } -static void sub_8105878(u8 taskId) +static void ExtremeSpeedImpact_Step(u8 taskId) { struct Task* task = &gTasks[taskId]; @@ -2862,7 +2862,7 @@ static void sub_8105878(u8 taskId) } } -void sub_810599C(u8 taskId) +void AnimTask_ExtremeSpeedMonReappear(u8 taskId) { struct Task* task = &gTasks[taskId]; task->data[0] = 0; @@ -2873,10 +2873,10 @@ void sub_810599C(u8 taskId) task->data[13] = 14; task->data[14] = 2; task->data[15] = GetAnimBattlerSpriteId(ANIM_ATTACKER); - task->func = sub_81059E0; + task->func = ExtremeSpeedMonReappear_Step; } -static void sub_81059E0(u8 taskId) +static void ExtremeSpeedMonReappear_Step(u8 taskId) { struct Task* task = &gTasks[taskId]; if (task->data[0] == 0 && ++task->data[1] > task->data[4]) @@ -3246,10 +3246,10 @@ void AnimTask_HeartsBackground(u8 taskId) AnimLoadCompressedBgGfx(animBg.bgId, &gUnknown_08C232E0, animBg.tilesOffset); sub_80A6D60(&animBg, &gUnknown_08C23D78, 0); LoadCompressedPalette(&gUnknown_08C23D50, animBg.paletteId * 16, 32); - gTasks[taskId].func = sub_81063A8; + gTasks[taskId].func = HeartsBackground_Step; } -static void sub_81063A8(u8 taskId) +static void HeartsBackground_Step(u8 taskId) { struct BattleAnimBgData animBg; @@ -3656,7 +3656,7 @@ static void sub_8106DD4(u8 taskId) DestroyAnimVisualTask(taskId); } -void sub_8106E00(struct Sprite *sprite) +void AnimJaggedMusicNote(struct Sprite *sprite) { int var1; u8 battler = !gBattleAnimArgs[0] ? gBattleAnimAttacker : gBattleAnimTarget; @@ -3694,7 +3694,7 @@ static void sub_8106EC8(struct Sprite *sprite) DestroyAnimSprite(sprite); } -void sub_8106F00(struct Sprite *sprite) +void AnimPerishSongMusicNote2(struct Sprite *sprite) { if (!sprite->data[0]) { @@ -3709,7 +3709,7 @@ void sub_8106F00(struct Sprite *sprite) DestroyAnimSprite(sprite); } -void sub_8106F60(struct Sprite *sprite) +void AnimPerishSongMusicNote(struct Sprite *sprite) { int index; int var2; @@ -3786,7 +3786,7 @@ static void sub_810703C(struct Sprite *sprite) } } -void sub_81070AC(struct Sprite *sprite) +void AnimGuardRing(struct Sprite *sprite) { if ((gBattleTypeFlags & BATTLE_TYPE_DOUBLE) && IsBattlerSpriteVisible(BATTLE_PARTNER(gBattleAnimAttacker))) { diff --git a/src/battle_anim_utility_funcs.c b/src/battle_anim_utility_funcs.c index 1a02002719..eff2bc3c77 100644 --- a/src/battle_anim_utility_funcs.c +++ b/src/battle_anim_utility_funcs.c @@ -36,7 +36,7 @@ static void sub_8117500(u8); static void sub_81175C4(u32, u16); static void sub_81176D8(u8); static void sub_8117A60(u8); -static void sub_8117FD0(u8); +static void ExtremSpeedMoveTarget_Step(u8); const u16 gUnknown_08597418 = RGB(31, 31, 31); @@ -1036,7 +1036,7 @@ void sub_8117F30(u8 taskId) DestroyAnimVisualTask(taskId); } -void sub_8117F60(u8 taskId) +void AnimTask_ExtremeSpeedMoveTarget(u8 taskId) { if (IsContest()) { @@ -1046,12 +1046,12 @@ void sub_8117F60(u8 taskId) { gTasks[taskId].data[0] = gBattleSpritesDataPtr->battlerData[gBattleAnimAttacker].invisible; gBattleSpritesDataPtr->battlerData[gBattleAnimAttacker].invisible = 1; - gTasks[taskId].func = sub_8117FD0; + gTasks[taskId].func = ExtremSpeedMoveTarget_Step; gAnimVisualTaskCount--; } } -static void sub_8117FD0(u8 taskId) +static void ExtremSpeedMoveTarget_Step(u8 taskId) { if (gBattleAnimArgs[7] == 0x1000) { From e9675bdd246deff42524cc202e4519041d49dd69 Mon Sep 17 00:00:00 2001 From: Sewef Date: Sun, 20 Oct 2019 16:22:53 +0200 Subject: [PATCH 09/46] battle_anims_effects_2 --- data/battle_anim_scripts.s | 10 +++---- include/battle_anim.h | 2 +- src/battle_anim_effects_1.c | 4 +-- src/battle_anim_effects_2.c | 54 ++++++++++++++++++------------------- src/battle_anim_effects_3.c | 6 ++--- src/battle_anim_mons.c | 2 +- src/poison.c | 2 +- src/psychic.c | 4 +-- 8 files changed, 42 insertions(+), 42 deletions(-) diff --git a/data/battle_anim_scripts.s b/data/battle_anim_scripts.s index 5998aa5d38..ec57c723f7 100644 --- a/data/battle_anim_scripts.s +++ b/data/battle_anim_scripts.s @@ -2895,7 +2895,7 @@ Move_GLARE: waitforvisualfinish createsprite gEyeSparkleSpriteTemplate, ANIM_ATTACKER, 0, -16, -8 createsprite gEyeSparkleSpriteTemplate, ANIM_ATTACKER, 0, 16, -8 - createvisualtask sub_81064F8, 5 + createvisualtask AnimTask_ScaryFace, 5 playsewithpan SE_W043, SOUND_PAN_ATTACKER delay 2 createvisualtask sub_810A094, 3, 20, 1, 0 @@ -3434,19 +3434,19 @@ Move_UPROAR: loadspritegfx ANIM_TAG_JAGGED_MUSIC_NOTE loadspritegfx ANIM_TAG_THIN_RING monbg ANIM_DEF_PARTNER - createvisualtask sub_8106D90, 2, 0 + createvisualtask AnimTask_UproarDistortion, 2, 0 createsprite gUproarRingSpriteTemplate, ANIM_ATTACKER, 3, 0, 0, 0, 0, 31, 8 playsewithpan SE_W253, SOUND_PAN_ATTACKER createsprite gJaggedMusicNoteSpriteTemplate, ANIM_ATTACKER, 2, 0, 29, -12, 0 createsprite gJaggedMusicNoteSpriteTemplate, ANIM_ATTACKER, 2, 0, -12, -29, 1 delay 16 - createvisualtask sub_8106D90, 2, 0 + createvisualtask AnimTask_UproarDistortion, 2, 0 createsprite gUproarRingSpriteTemplate, ANIM_ATTACKER, 3, 0, 0, 0, 0, 31, 8 playsewithpan SE_W253, SOUND_PAN_ATTACKER createsprite gJaggedMusicNoteSpriteTemplate, ANIM_ATTACKER, 2, 0, 12, -29, 1 createsprite gJaggedMusicNoteSpriteTemplate, ANIM_ATTACKER, 2, 0, -29, -12, 0 delay 16 - createvisualtask sub_8106D90, 2, 0 + createvisualtask AnimTask_UproarDistortion, 2, 0 createsprite gUproarRingSpriteTemplate, ANIM_ATTACKER, 3, 0, 0, 0, 0, 31, 8 playsewithpan SE_W253, SOUND_PAN_ATTACKER createsprite gJaggedMusicNoteSpriteTemplate, ANIM_ATTACKER, 2, 0, 24, -24, 1 @@ -7763,7 +7763,7 @@ Move_SCARY_FACE: waitforvisualfinish delay 10 playsewithpan SE_W043, SOUND_PAN_ATTACKER - createvisualtask sub_81064F8, 5 + createvisualtask AnimTask_ScaryFace, 5 delay 13 createsprite gEyeSparkleSpriteTemplate, ANIM_ATTACKER, 0, -16, -8 createsprite gEyeSparkleSpriteTemplate, ANIM_ATTACKER, 0, 16, -8 diff --git a/include/battle_anim.h b/include/battle_anim.h index 69a1073bae..503e23df26 100644 --- a/include/battle_anim.h +++ b/include/battle_anim.h @@ -141,7 +141,7 @@ bool8 AnimFastTranslateLinear(struct Sprite *sprite); void InitAndRunAnimFastLinearTranslation(struct Sprite *sprite); void TranslateMonSpriteLinear(struct Sprite *sprite); void TranslateSpriteLinear(struct Sprite *sprite); -void AnimSparklingParticle(struct Sprite *sprite); +void AnimSpriteOnMonPos(struct Sprite *sprite); void sub_80A7000(struct Sprite *sprite); void TranslateSpriteInCircleOverDuration(struct Sprite *sprite); void SetGreyscaleOrOriginalPalette(u16 a1, bool8 a2); diff --git a/src/battle_anim_effects_1.c b/src/battle_anim_effects_1.c index 91d4eec003..1efa860d3d 100644 --- a/src/battle_anim_effects_1.c +++ b/src/battle_anim_effects_1.c @@ -1713,7 +1713,7 @@ const struct SpriteTemplate gOctazookaSmokeSpriteTemplate = .anims = gOctazookaAnimTable, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = AnimSparklingParticle, + .callback = AnimSpriteOnMonPos, }; const union AnimCmd gConversionAnimCmds[] = @@ -1839,7 +1839,7 @@ const struct SpriteTemplate gHealingBlueStarSpriteTemplate = .anims = gHealingBlueStarAnimTable, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = AnimSparklingParticle, + .callback = AnimSpriteOnMonPos, }; const struct SpriteTemplate gHornHitSpriteTemplate = diff --git a/src/battle_anim_effects_2.c b/src/battle_anim_effects_2.c index 29acbbcfd3..c08d4ba4f5 100755 --- a/src/battle_anim_effects_2.c +++ b/src/battle_anim_effects_2.c @@ -96,14 +96,14 @@ static void FakeOutStep2(u8); static void AnimRedHeartProjectile_Step(struct Sprite *); static void AnimRedHeartRising_Step(struct Sprite *); static void HeartsBackground_Step(u8); -static void sub_81065EC(u8); +static void ScaryFace_Step(u8); static void AnimOrbitFastStep(struct Sprite *); static void AnimOrbitScatterStep(struct Sprite *); -static void sub_8106D5C(struct Sprite *); -static void sub_8106DD4(u8); -static void sub_8106EC8(struct Sprite *); -static void sub_8107018(struct Sprite *); -static void sub_810703C(struct Sprite *); +static void AnimMovmentWaves_Step(struct Sprite *); +static void UproarDistortion_Step(u8); +static void AnimJaggedMusicNote_Step(struct Sprite *); +static void AnimPerishSongMusicNote_Step1(struct Sprite *); +static void AnimPerishSongMusicNote_Step2(struct Sprite *); // Unused const struct SpriteTemplate gUnknown_08593264 = @@ -200,7 +200,7 @@ const struct SpriteTemplate gUnknown_08593304 = .anims = gUnknown_085932E4, .images = NULL, .affineAnims = gUnknown_08593300, - .callback = AnimSparklingParticle, + .callback = AnimSpriteOnMonPos, }; const union AnimCmd gKinesisZapEnergyAnimCmds[] = @@ -657,7 +657,7 @@ const struct SpriteTemplate gExplosionSpriteTemplate = .anims = gExplosionAnimTable, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = AnimSparklingParticle, + .callback = AnimSpriteOnMonPos, }; const union AffineAnimCmd gSoftBoiledEggAffineAnimCmds1[] = @@ -744,7 +744,7 @@ const struct SpriteTemplate gThinRingExpandingSpriteTemplate = .anims = gDummySpriteAnimTable, .images = NULL, .affineAnims = gThingRingExpandingAffineAnimTable, - .callback = AnimSparklingParticle, + .callback = AnimSpriteOnMonPos, }; const union AffineAnimCmd gThingRingShrinkingAffineAnimCmds[] = @@ -767,7 +767,7 @@ const struct SpriteTemplate gThingRingShrinkingSpriteTemplate = .anims = gDummySpriteAnimTable, .images = NULL, .affineAnims = gThingRingShrinkingAffineAnimTable, - .callback = AnimSparklingParticle, + .callback = AnimSpriteOnMonPos, }; const struct SpriteTemplate gBlendThinRingExpandingSpriteTemplate = @@ -874,7 +874,7 @@ const struct SpriteTemplate gBellSpriteTemplate = .anims = gBellAnimTable, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = AnimSparklingParticle, + .callback = AnimSpriteOnMonPos, }; const u16 gMusicNotePaletteTagsTable[] = @@ -2560,7 +2560,7 @@ void AnimBlendThinRing(struct Sprite *sprite) gBattleAnimArgs[0] = sp0 - r4; } - sprite->callback = AnimSparklingParticle; + sprite->callback = AnimSpriteOnMonPos; sprite->callback(sprite); } @@ -2667,7 +2667,7 @@ void AnimUproarRing(struct Sprite *sprite) } StartSpriteAffineAnim(sprite, 1); - sprite->callback = AnimSparklingParticle; + sprite->callback = AnimSpriteOnMonPos; sprite->callback(sprite); } @@ -3305,7 +3305,7 @@ static void HeartsBackground_Step(u8 taskId) } } -void sub_81064F8(u8 taskId) +void AnimTask_ScaryFace(u8 taskId) { struct BattleAnimBgData animBg; @@ -3330,10 +3330,10 @@ void sub_81064F8(u8 taskId) AnimLoadCompressedBgGfx(animBg.bgId, gUnknown_08C249F8, animBg.tilesOffset); LoadCompressedPalette(gUnknown_08C249D0, animBg.paletteId * 16, 32); - gTasks[taskId].func = sub_81065EC; + gTasks[taskId].func = ScaryFace_Step; } -static void sub_81065EC(u8 taskId) +static void ScaryFace_Step(u8 taskId) { struct BattleAnimBgData animBg; @@ -3627,11 +3627,11 @@ void AnimMovmentWaves(struct Sprite *sprite) sprite->data[0] = gBattleAnimArgs[2]; sprite->data[1] = gBattleAnimArgs[1]; StartSpriteAnim(sprite, sprite->data[1]); - sprite->callback = sub_8106D5C; + sprite->callback = AnimMovmentWaves_Step; } } -static void sub_8106D5C(struct Sprite *sprite) +static void AnimMovmentWaves_Step(struct Sprite *sprite) { if (sprite->animEnded) { @@ -3642,15 +3642,15 @@ static void sub_8106D5C(struct Sprite *sprite) } } -void sub_8106D90(u8 taskId) +void AnimTask_UproarDistortion(u8 taskId) { u8 spriteId = GetAnimBattlerSpriteId(gBattleAnimArgs[0]); PrepareAffineAnimInTaskData(&gTasks[taskId], spriteId, gUnknown_08593B98); - gTasks[taskId].func = sub_8106DD4; + gTasks[taskId].func = UproarDistortion_Step; } -static void sub_8106DD4(u8 taskId) +static void UproarDistortion_Step(u8 taskId) { if (!RunAffineAnimFromTaskData(&gTasks[taskId])) DestroyAnimVisualTask(taskId); @@ -3681,10 +3681,10 @@ void AnimJaggedMusicNote(struct Sprite *sprite) sprite->data[4] = var1 >> 3; sprite->oam.tileNum += gBattleAnimArgs[3] * 16; - sprite->callback = sub_8106EC8; + sprite->callback = AnimJaggedMusicNote_Step; } -static void sub_8106EC8(struct Sprite *sprite) +static void AnimJaggedMusicNote_Step(struct Sprite *sprite) { sprite->data[1] += sprite->data[3]; sprite->data[2] += sprite->data[4]; @@ -3739,7 +3739,7 @@ void AnimPerishSongMusicNote(struct Sprite *sprite) if (sprite->data[0] > sprite->data[5]) { - sprite->callback = sub_8107018; + sprite->callback = AnimPerishSongMusicNote_Step1; sprite->data[0] = 0; SetSpritePrimaryCoordsFromSecondaryCoords(sprite); @@ -3751,16 +3751,16 @@ void AnimPerishSongMusicNote(struct Sprite *sprite) } } -static void sub_8107018(struct Sprite *sprite) +static void AnimPerishSongMusicNote_Step1(struct Sprite *sprite) { if (++sprite->data[0] > 10) { sprite->data[0] = 0; - sprite->callback = sub_810703C; + sprite->callback = AnimPerishSongMusicNote_Step2; } } -static void sub_810703C(struct Sprite *sprite) +static void AnimPerishSongMusicNote_Step2(struct Sprite *sprite) { sprite->data[3] += sprite->data[2]; sprite->pos2.y = sprite->data[3]; diff --git a/src/battle_anim_effects_3.c b/src/battle_anim_effects_3.c index 1c24ecbcee..772ef6182b 100755 --- a/src/battle_anim_effects_3.c +++ b/src/battle_anim_effects_3.c @@ -144,7 +144,7 @@ const struct SpriteTemplate gUnknown_085CE020 = .anims = gUnknown_085CE01C, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = AnimSparklingParticle, + .callback = AnimSpriteOnMonPos, }; const struct SpriteTemplate gUnknown_085CE038 = @@ -190,7 +190,7 @@ const struct SpriteTemplate gUnknown_085CE07C = .anims = gUnknown_085CE078, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = AnimSparklingParticle, + .callback = AnimSpriteOnMonPos, }; const struct SpriteTemplate gUnknown_085CE094 = @@ -502,7 +502,7 @@ const struct SpriteTemplate gUnknown_085CE338 = .anims = gUnknown_085CE334, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = AnimSparklingParticle, + .callback = AnimSpriteOnMonPos, }; const union AffineAnimCmd gUnknown_085CE350[] = diff --git a/src/battle_anim_mons.c b/src/battle_anim_mons.c index 64b65ce088..ea5184c531 100644 --- a/src/battle_anim_mons.c +++ b/src/battle_anim_mons.c @@ -1456,7 +1456,7 @@ static u8 GetBattlerAtPosition_(u8 position) return GetBattlerAtPosition(position); } -void AnimSparklingParticle(struct Sprite *sprite) +void AnimSpriteOnMonPos(struct Sprite *sprite) { bool8 var; diff --git a/src/poison.c b/src/poison.c index 055f4c42af..42e7d6a58c 100644 --- a/src/poison.c +++ b/src/poison.c @@ -37,7 +37,7 @@ const struct SpriteTemplate gUnknown_08596134 = .anims = gUnknown_08596130, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = AnimSparklingParticle, + .callback = AnimSpriteOnMonPos, }; const union AnimCmd gUnknown_0859614C[] = diff --git a/src/psychic.c b/src/psychic.c index 11efc7a372..7ad8e14cb4 100644 --- a/src/psychic.c +++ b/src/psychic.c @@ -49,7 +49,7 @@ const struct SpriteTemplate gUnknown_08596548 = .anims = gDummySpriteAnimTable, .images = NULL, .affineAnims = gUnknown_08596544, - .callback = AnimSparklingParticle, + .callback = AnimSpriteOnMonPos, }; const struct SpriteTemplate gUnknown_08596560 = @@ -378,7 +378,7 @@ const struct SpriteTemplate gUnknown_08596898 = .anims = gDummySpriteAnimTable, .images = NULL, .affineAnims = gUnknown_08596894, - .callback = AnimSparklingParticle, + .callback = AnimSpriteOnMonPos, }; const union AffineAnimCmd gUnknown_085968B0[] = From 41e952a6683971c2107aff3966c078d8974f2c9b Mon Sep 17 00:00:00 2001 From: Sewef Date: Sun, 20 Oct 2019 19:03:34 +0200 Subject: [PATCH 10/46] battle_anims_effects_2 Fixes --- data/battle_anim_scripts.s | 10 +++++----- src/battle_anim_effects_2.c | 28 ++++++++++++++-------------- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/data/battle_anim_scripts.s b/data/battle_anim_scripts.s index ec57c723f7..b3feb4f43d 100644 --- a/data/battle_anim_scripts.s +++ b/data/battle_anim_scripts.s @@ -3047,8 +3047,8 @@ Move_STRUGGLE: monbg ANIM_TARGET setalpha 12, 8 createvisualtask AnimTask_ShakeMonInPlace, 2, ANIM_ATTACKER, 3, 0, 12, 4 - createsprite gMovmentWavesSpriteTemplate, ANIM_ATTACKER, 2, 0, 0, 2 - createsprite gMovmentWavesSpriteTemplate, ANIM_ATTACKER, 2, 0, 1, 2 + createsprite gMovementWavesSpriteTemplate, ANIM_ATTACKER, 2, 0, 0, 2 + createsprite gMovementWavesSpriteTemplate, ANIM_ATTACKER, 2, 0, 1, 2 loopsewithpan SE_W029, SOUND_PAN_ATTACKER, 12, 4 waitforvisualfinish createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 3, 0, 0, 1, 2 @@ -4473,13 +4473,13 @@ Move_CALM_MIND: waitforvisualfinish createvisualtask sub_81177E4, 5, 1 waitforvisualfinish - createsprite gThingRingShrinkingSpriteTemplate, ANIM_ATTACKER, 40, 0, 0, 0, 0 + createsprite gThinRingShrinkingSpriteTemplate, ANIM_ATTACKER, 40, 0, 0, 0, 0 playsewithpan SE_W048, SOUND_PAN_ATTACKER delay 14 - createsprite gThingRingShrinkingSpriteTemplate, ANIM_ATTACKER, 40, 0, 0, 0, 0 + createsprite gThinRingShrinkingSpriteTemplate, ANIM_ATTACKER, 40, 0, 0, 0, 0 playsewithpan SE_W048, SOUND_PAN_ATTACKER delay 14 - createsprite gThingRingShrinkingSpriteTemplate, ANIM_ATTACKER, 40, 0, 0, 0, 0 + createsprite gThinRingShrinkingSpriteTemplate, ANIM_ATTACKER, 40, 0, 0, 0, 0 playsewithpan SE_W048, SOUND_PAN_ATTACKER waitforvisualfinish createvisualtask sub_81177E4, 5, 0 diff --git a/src/battle_anim_effects_2.c b/src/battle_anim_effects_2.c index c08d4ba4f5..273dedc38e 100755 --- a/src/battle_anim_effects_2.c +++ b/src/battle_anim_effects_2.c @@ -704,14 +704,14 @@ const struct SpriteTemplate gSoftBoiledEggSpriteTemplate = .callback = AnimSoftBoiledEgg, }; -const union AffineAnimCmd gThingRingExpandingAffineAnimCmds1[] = +const union AffineAnimCmd gThinRingExpandingAffineAnimCmds1[] = { AFFINEANIMCMD_FRAME(0x10, 0x10, 0, 0), AFFINEANIMCMD_FRAME(0x10, 0x10, 0, 30), AFFINEANIMCMD_END_ALT(1), }; -const union AffineAnimCmd gThingRingExpandingAffineAnimCmds2[] = +const union AffineAnimCmd gThinRingExpandingAffineAnimCmds2[] = { AFFINEANIMCMD_FRAME(0x10, 0x10, 0, 0), AFFINEANIMCMD_FRAME(0x20, 0x20, 0, 15), @@ -725,10 +725,10 @@ const union AffineAnimCmd gHyperVoiceRingAffineAnimCmds[] = AFFINEANIMCMD_END_ALT(1), }; -const union AffineAnimCmd *const gThingRingExpandingAffineAnimTable[] = +const union AffineAnimCmd *const gThinRingExpandingAffineAnimTable[] = { - gThingRingExpandingAffineAnimCmds1, - gThingRingExpandingAffineAnimCmds2, + gThinRingExpandingAffineAnimCmds1, + gThinRingExpandingAffineAnimCmds2, }; const union AffineAnimCmd *const gHyperVoiceRingAffineAnimTable[] = @@ -743,30 +743,30 @@ const struct SpriteTemplate gThinRingExpandingSpriteTemplate = .oam = &gOamData_AffineDouble_ObjNormal_64x64, .anims = gDummySpriteAnimTable, .images = NULL, - .affineAnims = gThingRingExpandingAffineAnimTable, + .affineAnims = gThinRingExpandingAffineAnimTable, .callback = AnimSpriteOnMonPos, }; -const union AffineAnimCmd gThingRingShrinkingAffineAnimCmds[] = +const union AffineAnimCmd gThinRingShrinkingAffineAnimCmds[] = { AFFINEANIMCMD_FRAME(0x200, 0x200, 0, 0), AFFINEANIMCMD_FRAME(0xFFF0, 0xFFF0, 0, 30), AFFINEANIMCMD_END_ALT(1), }; -const union AffineAnimCmd *const gThingRingShrinkingAffineAnimTable[] = +const union AffineAnimCmd *const gThinRingShrinkingAffineAnimTable[] = { - gThingRingShrinkingAffineAnimCmds, + gThinRingShrinkingAffineAnimCmds, }; -const struct SpriteTemplate gThingRingShrinkingSpriteTemplate = +const struct SpriteTemplate gThinRingShrinkingSpriteTemplate = { .tileTag = ANIM_TAG_THIN_RING, .paletteTag = ANIM_TAG_THIN_RING, .oam = &gOamData_AffineDouble_ObjBlend_64x64, .anims = gDummySpriteAnimTable, .images = NULL, - .affineAnims = gThingRingShrinkingAffineAnimTable, + .affineAnims = gThinRingShrinkingAffineAnimTable, .callback = AnimSpriteOnMonPos, }; @@ -777,7 +777,7 @@ const struct SpriteTemplate gBlendThinRingExpandingSpriteTemplate = .oam = &gOamData_AffineDouble_ObjBlend_64x64, .anims = gDummySpriteAnimTable, .images = NULL, - .affineAnims = gThingRingExpandingAffineAnimTable, + .affineAnims = gThinRingExpandingAffineAnimTable, .callback = AnimBlendThinRing, }; @@ -799,7 +799,7 @@ const struct SpriteTemplate gUproarRingSpriteTemplate = .oam = &gOamData_AffineDouble_ObjBlend_64x64, .anims = gDummySpriteAnimTable, .images = NULL, - .affineAnims = gThingRingExpandingAffineAnimTable, + .affineAnims = gThinRingExpandingAffineAnimTable, .callback = AnimUproarRing, }; @@ -1150,7 +1150,7 @@ const union AnimCmd *const gMovementWavesAnimTable[] = gMovementWavesAnimCmds2, }; -const struct SpriteTemplate gMovmentWavesSpriteTemplate = +const struct SpriteTemplate gMovementWavesSpriteTemplate = { .tileTag = ANIM_TAG_MOVEMENT_WAVES, .paletteTag = ANIM_TAG_MOVEMENT_WAVES, From 04ea8eea5ae477037f9848b365ca026e46509666 Mon Sep 17 00:00:00 2001 From: Marcus Huderle Date: Sun, 20 Oct 2019 12:27:23 -0500 Subject: [PATCH 11/46] Document rest of Petalburg scripts --- data/maps/PetalburgCity_House1/map.json | 4 +- data/maps/PetalburgCity_House1/scripts.inc | 12 +- data/maps/PetalburgCity_House2/map.json | 4 +- data/maps/PetalburgCity_House2/scripts.inc | 12 +- data/maps/PetalburgCity_Mart/map.json | 8 +- data/maps/PetalburgCity_Mart/scripts.inc | 32 +-- .../PetalburgCity_PokemonCenter_1F/map.json | 10 +- .../scripts.inc | 48 ++-- data/maps/PetalburgCity_WallysHouse/map.json | 4 +- .../PetalburgCity_WallysHouse/scripts.inc | 68 ++--- data/maps/PetalburgWoods/map.json | 18 +- data/maps/PetalburgWoods/scripts.inc | 258 +++++++++--------- data/scripts/mystery_event_club.inc | 108 ++++---- 13 files changed, 293 insertions(+), 293 deletions(-) diff --git a/data/maps/PetalburgCity_House1/map.json b/data/maps/PetalburgCity_House1/map.json index 68e9a4dce9..ce3dc3b162 100644 --- a/data/maps/PetalburgCity_House1/map.json +++ b/data/maps/PetalburgCity_House1/map.json @@ -24,7 +24,7 @@ "movement_range_y": 2, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "PetalburgCity_House1_EventScript_2077A3", + "script": "PetalburgCity_House1_EventScript_Woman", "flag": "0" }, { @@ -37,7 +37,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "PetalburgCity_House1_EventScript_20779A", + "script": "PetalburgCity_House1_EventScript_Man", "flag": "0" } ], diff --git a/data/maps/PetalburgCity_House1/scripts.inc b/data/maps/PetalburgCity_House1/scripts.inc index cb511bbed0..2fe46437ee 100644 --- a/data/maps/PetalburgCity_House1/scripts.inc +++ b/data/maps/PetalburgCity_House1/scripts.inc @@ -1,20 +1,20 @@ PetalburgCity_House1_MapScripts:: @ 8207799 .byte 0 -PetalburgCity_House1_EventScript_20779A:: @ 820779A - msgbox PetalburgCity_House1_Text_2077AC, MSGBOX_NPC +PetalburgCity_House1_EventScript_Man:: @ 820779A + msgbox PetalburgCity_House1_Text_TravelingIsWonderful, MSGBOX_NPC end -PetalburgCity_House1_EventScript_2077A3:: @ 82077A3 - msgbox PetalburgCity_House1_Text_2077FB, MSGBOX_NPC +PetalburgCity_House1_EventScript_Woman:: @ 82077A3 + msgbox PetalburgCity_House1_Text_GoOnAdventure, MSGBOX_NPC end -PetalburgCity_House1_Text_2077AC: @ 82077AC +PetalburgCity_House1_Text_TravelingIsWonderful: @ 82077AC .string "Traveling is wonderful!\p" .string "When I was young, I roamed the seas\n" .string "and the mountains!$" -PetalburgCity_House1_Text_2077FB: @ 82077FB +PetalburgCity_House1_Text_GoOnAdventure: @ 82077FB .string "Sigh…\p" .string "I wish I could go on an adventure\n" .string "with some POKéMON…\p" diff --git a/data/maps/PetalburgCity_House2/map.json b/data/maps/PetalburgCity_House2/map.json index b6c0107a0c..9354b49269 100644 --- a/data/maps/PetalburgCity_House2/map.json +++ b/data/maps/PetalburgCity_House2/map.json @@ -24,7 +24,7 @@ "movement_range_y": 1, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "PetalburgCity_House2_EventScript_2078F3", + "script": "PetalburgCity_House2_EventScript_Woman", "flag": "0" }, { @@ -37,7 +37,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "PetalburgCity_House2_EventScript_2078FC", + "script": "PetalburgCity_House2_EventScript_SchoolKid", "flag": "0" } ], diff --git a/data/maps/PetalburgCity_House2/scripts.inc b/data/maps/PetalburgCity_House2/scripts.inc index 2650e970c6..3be93cbd04 100644 --- a/data/maps/PetalburgCity_House2/scripts.inc +++ b/data/maps/PetalburgCity_House2/scripts.inc @@ -1,21 +1,21 @@ PetalburgCity_House2_MapScripts:: @ 82078F2 .byte 0 -PetalburgCity_House2_EventScript_2078F3:: @ 82078F3 - msgbox PetalburgCity_House2_Text_207905, MSGBOX_NPC +PetalburgCity_House2_EventScript_Woman:: @ 82078F3 + msgbox PetalburgCity_House2_Text_NormanBecameGymLeader, MSGBOX_NPC end -PetalburgCity_House2_EventScript_2078FC:: @ 82078FC - msgbox PetalburgCity_House2_Text_207969, MSGBOX_NPC +PetalburgCity_House2_EventScript_SchoolKid:: @ 82078FC + msgbox PetalburgCity_House2_Text_BattledNormanOnce, MSGBOX_NPC end -PetalburgCity_House2_Text_207905: @ 8207905 +PetalburgCity_House2_Text_NormanBecameGymLeader: @ 8207905 .string "NORMAN became our town's new\n" .string "GYM LEADER.\p" .string "I think he called his family over from\n" .string "somewhere far away.$" -PetalburgCity_House2_Text_207969: @ 8207969 +PetalburgCity_House2_Text_BattledNormanOnce: @ 8207969 .string "I battled NORMAN once, but, whew,\n" .string "he was way too strong.\p" .string "How would I put it?\p" diff --git a/data/maps/PetalburgCity_Mart/map.json b/data/maps/PetalburgCity_Mart/map.json index b08837e803..82519cb5cb 100644 --- a/data/maps/PetalburgCity_Mart/map.json +++ b/data/maps/PetalburgCity_Mart/map.json @@ -24,7 +24,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "PetalburgCity_Mart_EventScript_207D69", + "script": "PetalburgCity_Mart_EventScript_Clerk", "flag": "0" }, { @@ -37,7 +37,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "PetalburgCity_Mart_EventScript_207DE8", + "script": "PetalburgCity_Mart_EventScript_Man", "flag": "0" }, { @@ -50,7 +50,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "PetalburgCity_Mart_EventScript_207DDF", + "script": "PetalburgCity_Mart_EventScript_Boy", "flag": "0" }, { @@ -63,7 +63,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "PetalburgCity_Mart_EventScript_207DD6", + "script": "PetalburgCity_Mart_EventScript_Woman", "flag": "0" } ], diff --git a/data/maps/PetalburgCity_Mart/scripts.inc b/data/maps/PetalburgCity_Mart/scripts.inc index 0b4d9808f9..f27f0aeb5d 100644 --- a/data/maps/PetalburgCity_Mart/scripts.inc +++ b/data/maps/PetalburgCity_Mart/scripts.inc @@ -1,19 +1,19 @@ PetalburgCity_Mart_MapScripts:: @ 8207D68 .byte 0 -PetalburgCity_Mart_EventScript_207D69:: @ 8207D69 +PetalburgCity_Mart_EventScript_Clerk:: @ 8207D69 lock faceplayer message gText_HowMayIServeYou waitmessage - goto_if_set FLAG_PETALBURG_MART_EXPANDED_ITEMS, PetalburgCity_Mart_EventScript_207DA6 - pokemart PetalburgCity_Mart_Pokemart_207D8C + goto_if_set FLAG_PETALBURG_MART_EXPANDED_ITEMS, PetalburgCity_Mart_EventScript_ExpandedItems + pokemart PetalburgCity_Mart_Pokemart_Basic msgbox gText_PleaseComeAgain, MSGBOX_DEFAULT release end .align 2 -PetalburgCity_Mart_Pokemart_207D8C: @ 8207D8C +PetalburgCity_Mart_Pokemart_Basic: @ 8207D8C .2byte ITEM_POKE_BALL .2byte ITEM_POTION .2byte ITEM_ANTIDOTE @@ -29,14 +29,14 @@ PetalburgCity_Mart_Pokemart_207D8C: @ 8207D8C release end -PetalburgCity_Mart_EventScript_207DA6:: @ 8207DA6 - pokemart PetalburgCity_Mart_Pokemart_207DB8 +PetalburgCity_Mart_EventScript_ExpandedItems:: @ 8207DA6 + pokemart PetalburgCity_Mart_Pokemart_Expanded msgbox gText_PleaseComeAgain, MSGBOX_DEFAULT release end .align 2 -PetalburgCity_Mart_Pokemart_207DB8: @ 8207DB8 +PetalburgCity_Mart_Pokemart_Expanded: @ 8207DB8 .2byte ITEM_POKE_BALL .2byte ITEM_GREAT_BALL .2byte ITEM_POTION @@ -54,30 +54,30 @@ PetalburgCity_Mart_Pokemart_207DB8: @ 8207DB8 release end -PetalburgCity_Mart_EventScript_207DD6:: @ 8207DD6 - msgbox PetalburgCity_Mart_Text_207DF1, MSGBOX_NPC +PetalburgCity_Mart_EventScript_Woman:: @ 8207DD6 + msgbox PetalburgCity_Mart_Text_WeakWillGrowStronger, MSGBOX_NPC end -PetalburgCity_Mart_EventScript_207DDF:: @ 8207DDF - msgbox PetalburgCity_Mart_Text_207E60, MSGBOX_NPC +PetalburgCity_Mart_EventScript_Boy:: @ 8207DDF + msgbox PetalburgCity_Mart_Text_RepelIsUseful, MSGBOX_NPC end -PetalburgCity_Mart_EventScript_207DE8:: @ 8207DE8 - msgbox PetalburgCity_Mart_Text_207EB0, MSGBOX_NPC +PetalburgCity_Mart_EventScript_Man:: @ 8207DE8 + msgbox PetalburgCity_Mart_Text_TakeSomeAntidotesWithYou, MSGBOX_NPC end -PetalburgCity_Mart_Text_207DF1: @ 8207DF1 +PetalburgCity_Mart_Text_WeakWillGrowStronger: @ 8207DF1 .string "Even if a POKéMON is weak now,\n" .string "it will grow stronger.\p" .string "The most important thing is love!\n" .string "Love for your POKéMON!$" -PetalburgCity_Mart_Text_207E60: @ 8207E60 +PetalburgCity_Mart_Text_RepelIsUseful: @ 8207E60 .string "Do you use REPEL?\n" .string "It keeps POKéMON away, so it's\l" .string "useful when you're in a hurry.$" -PetalburgCity_Mart_Text_207EB0: @ 8207EB0 +PetalburgCity_Mart_Text_TakeSomeAntidotesWithYou: @ 8207EB0 .string "Do you have any ANTIDOTES with\n" .string "you?\p" .string "If you walk around with a poisoned\n" diff --git a/data/maps/PetalburgCity_PokemonCenter_1F/map.json b/data/maps/PetalburgCity_PokemonCenter_1F/map.json index eeb22dca42..d673ecf4dc 100644 --- a/data/maps/PetalburgCity_PokemonCenter_1F/map.json +++ b/data/maps/PetalburgCity_PokemonCenter_1F/map.json @@ -24,7 +24,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "PetalburgCity_PokemonCenter_1F_EventScript_2079FC", + "script": "PetalburgCity_PokemonCenter_1F_EventScript_Nurse", "flag": "0" }, { @@ -37,7 +37,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "PetalburgCity_PokemonCenter_1F_EventScript_291539", + "script": "MysteryEventClub_EventScript_Man", "flag": "0" }, { @@ -50,7 +50,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "PetalburgCity_PokemonCenter_1F_EventScript_207A0A", + "script": "PetalburgCity_PokemonCenter_1F_EventScript_FatMan", "flag": "0" }, { @@ -63,7 +63,7 @@ "movement_range_y": 1, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "PetalburgCity_PokemonCenter_1F_EventScript_207A13", + "script": "PetalburgCity_PokemonCenter_1F_EventScript_Youngster", "flag": "0" }, { @@ -76,7 +76,7 @@ "movement_range_y": 1, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "PetalburgCity_PokemonCenter_1F_EventScript_207A1C", + "script": "PetalburgCity_PokemonCenter_1F_EventScript_Woman", "flag": "0" } ], diff --git a/data/maps/PetalburgCity_PokemonCenter_1F/scripts.inc b/data/maps/PetalburgCity_PokemonCenter_1F/scripts.inc index a5b069d947..60b56837cd 100644 --- a/data/maps/PetalburgCity_PokemonCenter_1F/scripts.inc +++ b/data/maps/PetalburgCity_PokemonCenter_1F/scripts.inc @@ -8,7 +8,7 @@ PetalburgCity_PokemonCenter_1F_OnTransition: @ 82079F3 call Common_EventScript_UpdateBrineyLocation end -PetalburgCity_PokemonCenter_1F_EventScript_2079FC:: @ 82079FC +PetalburgCity_PokemonCenter_1F_EventScript_Nurse:: @ 82079FC setvar VAR_0x800B, 1 call Common_EventScript_PkmnCenterNurse waitmessage @@ -16,64 +16,64 @@ PetalburgCity_PokemonCenter_1F_EventScript_2079FC:: @ 82079FC release end -PetalburgCity_PokemonCenter_1F_EventScript_207A0A:: @ 8207A0A - msgbox PetalburgCity_PokemonCenter_1F_Text_207A76, MSGBOX_NPC +PetalburgCity_PokemonCenter_1F_EventScript_FatMan:: @ 8207A0A + msgbox PetalburgCity_PokemonCenter_1F_Text_PCStorageSystem, MSGBOX_NPC end -PetalburgCity_PokemonCenter_1F_EventScript_207A13:: @ 8207A13 - msgbox PetalburgCity_PokemonCenter_1F_Text_207AD6, MSGBOX_NPC +PetalburgCity_PokemonCenter_1F_EventScript_Youngster:: @ 8207A13 + msgbox PetalburgCity_PokemonCenter_1F_Text_OranBerryRegainedHP, MSGBOX_NPC end -PetalburgCity_PokemonCenter_1F_EventScript_207A1C:: @ 8207A1C +PetalburgCity_PokemonCenter_1F_EventScript_Woman:: @ 8207A1C lock faceplayer - msgbox PetalburgCity_PokemonCenter_1F_Text_207B09, MSGBOX_DEFAULT + msgbox PetalburgCity_PokemonCenter_1F_Text_ManyTypesOfPokemon, MSGBOX_DEFAULT specialvar VAR_RESULT, IsStarterInParty compare VAR_RESULT, 1 - goto_if_eq PetalburgCity_PokemonCenter_1F_EventScript_207A38 + goto_if_eq PetalburgCity_PokemonCenter_1F_EventScript_SayStarterTypeInfo release end -PetalburgCity_PokemonCenter_1F_EventScript_207A38:: @ 8207A38 +PetalburgCity_PokemonCenter_1F_EventScript_SayStarterTypeInfo:: @ 8207A38 compare VAR_STARTER_MON, 0 - call_if_eq PetalburgCity_PokemonCenter_1F_EventScript_207A5B + call_if_eq PetalburgCity_PokemonCenter_1F_EventScript_SayTreeckoType compare VAR_STARTER_MON, 1 - call_if_eq PetalburgCity_PokemonCenter_1F_EventScript_207A64 + call_if_eq PetalburgCity_PokemonCenter_1F_EventScript_SayTorchicType compare VAR_STARTER_MON, 2 - call_if_eq PetalburgCity_PokemonCenter_1F_EventScript_207A6D + call_if_eq PetalburgCity_PokemonCenter_1F_EventScript_SayMudkipType release end -PetalburgCity_PokemonCenter_1F_EventScript_207A5B:: @ 8207A5B - msgbox PetalburgCity_PokemonCenter_1F_Text_207BB0, MSGBOX_DEFAULT +PetalburgCity_PokemonCenter_1F_EventScript_SayTreeckoType:: @ 8207A5B + msgbox PetalburgCity_PokemonCenter_1F_Text_TreeckoIsGrassType, MSGBOX_DEFAULT return -PetalburgCity_PokemonCenter_1F_EventScript_207A64:: @ 8207A64 - msgbox PetalburgCity_PokemonCenter_1F_Text_207C35, MSGBOX_DEFAULT +PetalburgCity_PokemonCenter_1F_EventScript_SayTorchicType:: @ 8207A64 + msgbox PetalburgCity_PokemonCenter_1F_Text_TorchicIsFireType, MSGBOX_DEFAULT return -PetalburgCity_PokemonCenter_1F_EventScript_207A6D:: @ 8207A6D - msgbox PetalburgCity_PokemonCenter_1F_Text_207CB7, MSGBOX_DEFAULT +PetalburgCity_PokemonCenter_1F_EventScript_SayMudkipType:: @ 8207A6D + msgbox PetalburgCity_PokemonCenter_1F_Text_MudkipIsWaterType, MSGBOX_DEFAULT return -PetalburgCity_PokemonCenter_1F_Text_207A76: @ 8207A76 +PetalburgCity_PokemonCenter_1F_Text_PCStorageSystem: @ 8207A76 .string "That PC-based POKéMON Storage\n" .string "System…\p" .string "Whoever made it must be some kind\n" .string "of a scientific wizard!$" -PetalburgCity_PokemonCenter_1F_Text_207AD6: @ 8207AD6 +PetalburgCity_PokemonCenter_1F_Text_OranBerryRegainedHP: @ 8207AD6 .string "When my POKéMON ate an\n" .string "ORAN BERRY, it regained HP!$" -PetalburgCity_PokemonCenter_1F_Text_207B09: @ 8207B09 +PetalburgCity_PokemonCenter_1F_Text_ManyTypesOfPokemon: @ 8207B09 .string "There are many types of POKéMON.\p" .string "All types have their strengths and\n" .string "weaknesses against other types.\p" .string "Depending on the types of POKéMON,\n" .string "a battle could be easy or hard.$" -PetalburgCity_PokemonCenter_1F_Text_207BB0: @ 8207BB0 +PetalburgCity_PokemonCenter_1F_Text_TreeckoIsGrassType: @ 8207BB0 .string "For example, your TREECKO\n" .string "is a GRASS type.\p" .string "It's strong against the WATER and\n" @@ -81,7 +81,7 @@ PetalburgCity_PokemonCenter_1F_Text_207BB0: @ 8207BB0 .string "But, it's weak against FIRE-type\n" .string "POKéMON.$" -PetalburgCity_PokemonCenter_1F_Text_207C35: @ 8207C35 +PetalburgCity_PokemonCenter_1F_Text_TorchicIsFireType: @ 8207C35 .string "For example, your TORCHIC\n" .string "is a FIRE type.\p" .string "It's strong against the GRASS and\n" @@ -89,7 +89,7 @@ PetalburgCity_PokemonCenter_1F_Text_207C35: @ 8207C35 .string "But, it's weak against WATER-type\n" .string "POKéMON.$" -PetalburgCity_PokemonCenter_1F_Text_207CB7: @ 8207CB7 +PetalburgCity_PokemonCenter_1F_Text_MudkipIsWaterType: @ 8207CB7 .string "For example, your MUDKIP\n" .string "is a WATER type.\p" .string "It's strong against the FIRE type.\p" diff --git a/data/maps/PetalburgCity_WallysHouse/map.json b/data/maps/PetalburgCity_WallysHouse/map.json index c961d300ca..49af9f43d6 100644 --- a/data/maps/PetalburgCity_WallysHouse/map.json +++ b/data/maps/PetalburgCity_WallysHouse/map.json @@ -24,7 +24,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "PetalburgCity_WallysHouse_EventScript_204278", + "script": "PetalburgCity_WallysHouse_EventScript_WallyUncle", "flag": "0" }, { @@ -37,7 +37,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "PetalburgCity_WallysHouse_EventScript_2042C0", + "script": "PetalburgCity_WallysHouse_EventScript_WallyAunt", "flag": "0" } ], diff --git a/data/maps/PetalburgCity_WallysHouse/scripts.inc b/data/maps/PetalburgCity_WallysHouse/scripts.inc index be2a6280ed..1516e33d26 100644 --- a/data/maps/PetalburgCity_WallysHouse/scripts.inc +++ b/data/maps/PetalburgCity_WallysHouse/scripts.inc @@ -1,71 +1,71 @@ PetalburgCity_WallysHouse_MapScripts:: @ 8204229 - map_script MAP_SCRIPT_ON_FRAME_TABLE, PetalburgCity_WallysHouse_MapScript2_204247 - map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, PetalburgCity_WallysHouse_MapScript2_204234 + map_script MAP_SCRIPT_ON_FRAME_TABLE, PetalburgCity_WallysHouse_MapScript2_OnFrame + map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, PetalburgCity_WallysHouse_MapScript2_OnWarp .byte 0 -PetalburgCity_WallysHouse_MapScript2_204234: @ 8204234 - map_script_2 VAR_PETALBURG_CITY_STATE, 4, PetalburgCity_WallysHouse_EventScript_20423E +PetalburgCity_WallysHouse_MapScript2_OnWarp: @ 8204234 + map_script_2 VAR_PETALBURG_CITY_STATE, 4, PetalburgCity_WallysHouse_EventScript_PlayerUncleFaceEachOther .2byte 0 -PetalburgCity_WallysHouse_EventScript_20423E:: @ 820423E +PetalburgCity_WallysHouse_EventScript_PlayerUncleFaceEachOther:: @ 820423E turnobject EVENT_OBJ_ID_PLAYER, DIR_EAST turnobject 1, DIR_WEST end -PetalburgCity_WallysHouse_MapScript2_204247: @ 8204247 - map_script_2 VAR_PETALBURG_CITY_STATE, 4, PetalburgCity_WallysHouse_EventScript_204251 +PetalburgCity_WallysHouse_MapScript2_OnFrame: @ 8204247 + map_script_2 VAR_PETALBURG_CITY_STATE, 4, PetalburgCity_WallysHouse_EventScript_GiveHM03Surf .2byte 0 -PetalburgCity_WallysHouse_EventScript_204251:: @ 8204251 +PetalburgCity_WallysHouse_EventScript_GiveHM03Surf:: @ 8204251 lockall - msgbox PetalburgCity_WallysHouse_Text_20446E, MSGBOX_DEFAULT + msgbox PetalburgCity_WallysHouse_Text_PleaseExcuseUs, MSGBOX_DEFAULT giveitem_std ITEM_HM03 setflag FLAG_RECEIVED_HM03 - msgbox PetalburgCity_WallysHouse_Text_20461A, MSGBOX_DEFAULT + msgbox PetalburgCity_WallysHouse_Text_SurfGoAllSortsOfPlaces, MSGBOX_DEFAULT setvar VAR_PETALBURG_CITY_STATE, 5 releaseall end -PetalburgCity_WallysHouse_EventScript_204278:: @ 8204278 +PetalburgCity_WallysHouse_EventScript_WallyUncle:: @ 8204278 lock faceplayer - goto_if_set FLAG_DEFEATED_WALLY_VICTORY_ROAD, PetalburgCity_WallysHouse_EventScript_2042AC - goto_if_set FLAG_RECEIVED_HM03, PetalburgCity_WallysHouse_EventScript_2042A2 - goto_if_set FLAG_THANKED_FOR_PLAYING_WITH_WALLY, PetalburgCity_WallysHouse_EventScript_2042B6 - msgbox PetalburgCity_WallysHouse_Text_2042DF, MSGBOX_DEFAULT + goto_if_set FLAG_DEFEATED_WALLY_VICTORY_ROAD, PetalburgCity_WallysHouse_EventScript_DefeatedWallyInVictoryRoad + goto_if_set FLAG_RECEIVED_HM03, PetalburgCity_WallysHouse_EventScript_ReceievedHM03Surf + goto_if_set FLAG_THANKED_FOR_PLAYING_WITH_WALLY, PetalburgCity_WallysHouse_EventScript_PlayedWithWally + msgbox PetalburgCity_WallysHouse_Text_ThanksForPlayingWithWally, MSGBOX_DEFAULT setflag FLAG_THANKED_FOR_PLAYING_WITH_WALLY release end -PetalburgCity_WallysHouse_EventScript_2042A2:: @ 82042A2 - msgbox PetalburgCity_WallysHouse_Text_204661, MSGBOX_DEFAULT +PetalburgCity_WallysHouse_EventScript_ReceievedHM03Surf:: @ 82042A2 + msgbox PetalburgCity_WallysHouse_Text_WallyIsComingHomeSoon, MSGBOX_DEFAULT release end -PetalburgCity_WallysHouse_EventScript_2042AC:: @ 82042AC - msgbox PetalburgCity_WallysHouse_Text_204698, MSGBOX_DEFAULT +PetalburgCity_WallysHouse_EventScript_DefeatedWallyInVictoryRoad:: @ 82042AC + msgbox PetalburgCity_WallysHouse_Text_YouMetWallyInEverGrandeCity, MSGBOX_DEFAULT release end -PetalburgCity_WallysHouse_EventScript_2042B6:: @ 82042B6 - msgbox PetalburgCity_WallysHouse_Text_20444D, MSGBOX_DEFAULT +PetalburgCity_WallysHouse_EventScript_PlayedWithWally:: @ 82042B6 + msgbox PetalburgCity_WallysHouse_Text_WonderHowWallyIsDoing, MSGBOX_DEFAULT release end -PetalburgCity_WallysHouse_EventScript_2042C0:: @ 82042C0 +PetalburgCity_WallysHouse_EventScript_WallyAunt:: @ 82042C0 lock faceplayer - goto_if_set FLAG_RECEIVED_HM03, PetalburgCity_WallysHouse_EventScript_2042D5 - msgbox PetalburgCity_WallysHouse_Text_204732, MSGBOX_DEFAULT + goto_if_set FLAG_RECEIVED_HM03, PetalburgCity_WallysHouse_EventScript_ReceivedHM03Surf + msgbox PetalburgCity_WallysHouse_Text_WallyWasReallyHappy, MSGBOX_DEFAULT release end -PetalburgCity_WallysHouse_EventScript_2042D5:: @ 82042D5 - msgbox PetalburgCity_WallysHouse_Text_2047A7, MSGBOX_DEFAULT +PetalburgCity_WallysHouse_EventScript_ReceivedHM03Surf:: @ 82042D5 + msgbox PetalburgCity_WallysHouse_Text_WallyLeftWithoutTelling, MSGBOX_DEFAULT release end -PetalburgCity_WallysHouse_Text_2042DF: @ 82042DF +PetalburgCity_WallysHouse_Text_ThanksForPlayingWithWally: @ 82042DF .string "You're…\n" .string "Ah, you must be {PLAYER}{KUN}, right?\p" .string "Thank you for playing with WALLY a\n" @@ -81,10 +81,10 @@ PetalburgCity_WallysHouse_Text_2042DF: @ 82042DF .string "I wonder where he could have\n" .string "gotten by now?$" -PetalburgCity_WallysHouse_Text_20444D: @ 820444D +PetalburgCity_WallysHouse_Text_WonderHowWallyIsDoing: @ 820444D .string "I wonder how our WALLY is doing?$" -PetalburgCity_WallysHouse_Text_20446E: @ 820446E +PetalburgCity_WallysHouse_Text_PleaseExcuseUs: @ 820446E .string "{PLAYER}{KUN}! Please excuse us for\n" .string "dragging you here this way.\p" .string "But our WALLY's become very healthy\n" @@ -101,15 +101,15 @@ PetalburgCity_WallysHouse_Text_20446E: @ 820446E .string "This isn't a bribe or anything, but\n" .string "I'd really like you to have this.$" -PetalburgCity_WallysHouse_Text_20461A: @ 820461A +PetalburgCity_WallysHouse_Text_SurfGoAllSortsOfPlaces: @ 820461A .string "If your POKéMON can SURF, you'll be\n" .string "able to go to all sorts of places.$" -PetalburgCity_WallysHouse_Text_204661: @ 8204661 +PetalburgCity_WallysHouse_Text_WallyIsComingHomeSoon: @ 8204661 .string "WALLY's coming home soon.\n" .string "I'm looking forward to that.$" -PetalburgCity_WallysHouse_Text_204698: @ 8204698 +PetalburgCity_WallysHouse_Text_YouMetWallyInEverGrandeCity: @ 8204698 .string "Oh? You met WALLY in\n" .string "EVER GRANDE CITY?\p" .string "Oh, {PLAYER}{KUN}, don't be silly.\p" @@ -117,13 +117,13 @@ PetalburgCity_WallysHouse_Text_204698: @ 8204698 .string "can't go somewhere far away like\l" .string "that all by himself.$" -PetalburgCity_WallysHouse_Text_204732: @ 8204732 +PetalburgCity_WallysHouse_Text_WallyWasReallyHappy: @ 8204732 .string "WALLY was really happy when he told\n" .string "us that he caught a POKéMON.\p" .string "It's been ages since I've seen him\n" .string "smile like that.$" -PetalburgCity_WallysHouse_Text_2047A7: @ 82047A7 +PetalburgCity_WallysHouse_Text_WallyLeftWithoutTelling: @ 82047A7 .string "I want you to keep this a secret\n" .string "from my husband…\p" .string "But our WALLY left VERDANTURF TOWN\n" diff --git a/data/maps/PetalburgWoods/map.json b/data/maps/PetalburgWoods/map.json index 7e7de784ac..d43017f99d 100644 --- a/data/maps/PetalburgWoods/map.json +++ b/data/maps/PetalburgWoods/map.json @@ -115,7 +115,7 @@ "movement_range_y": 2, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "PetalburgWoods_EventScript_22E210", + "script": "PetalburgWoods_EventScript_Boy1", "flag": "0" }, { @@ -128,7 +128,7 @@ "movement_range_y": 0, "trainer_type": "1", "trainer_sight_or_berry_tree_id": "3", - "script": "PetalburgWoods_EventScript_22E26D", + "script": "PetalburgWoods_EventScript_Lyle", "flag": "0" }, { @@ -141,7 +141,7 @@ "movement_range_y": 0, "trainer_type": "1", "trainer_sight_or_berry_tree_id": "3", - "script": "PetalburgWoods_EventScript_22E284", + "script": "PetalburgWoods_EventScript_James", "flag": "0" }, { @@ -154,7 +154,7 @@ "movement_range_y": 1, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "PetalburgWoods_EventScript_22E219", + "script": "PetalburgWoods_EventScript_Boy2", "flag": "0" }, { @@ -180,7 +180,7 @@ "movement_range_y": 1, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "PetalburgWoods_EventScript_22E222", + "script": "PetalburgWoods_EventScript_Girl", "flag": "0" } ], @@ -236,7 +236,7 @@ "elevation": 3, "var": "VAR_PETALBURG_WOODS_STATE", "var_value": "0", - "script": "PetalburgWoods_EventScript_22DFD7" + "script": "PetalburgWoods_EventScript_DevonResearcherLeft" }, { "type": "trigger", @@ -245,7 +245,7 @@ "elevation": 3, "var": "VAR_PETALBURG_WOODS_STATE", "var_value": "0", - "script": "PetalburgWoods_EventScript_22E079" + "script": "PetalburgWoods_EventScript_DevonResearcherRight" } ], "bg_events": [ @@ -255,7 +255,7 @@ "y": 32, "elevation": 3, "player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY", - "script": "PetalburgWoods_EventScript_22E25B" + "script": "PetalburgWoods_EventScript_Sign1" }, { "type": "hidden_item", @@ -295,7 +295,7 @@ "y": 8, "elevation": 3, "player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY", - "script": "PetalburgWoods_EventScript_22E264" + "script": "PetalburgWoods_EventScript_Sign2" } ] } \ No newline at end of file diff --git a/data/maps/PetalburgWoods/scripts.inc b/data/maps/PetalburgWoods/scripts.inc index 5a194c721f..79179ffa65 100644 --- a/data/maps/PetalburgWoods/scripts.inc +++ b/data/maps/PetalburgWoods/scripts.inc @@ -1,119 +1,119 @@ PetalburgWoods_MapScripts:: @ 822DFD6 .byte 0 -PetalburgWoods_EventScript_22DFD7:: @ 822DFD7 +PetalburgWoods_EventScript_DevonResearcherLeft:: @ 822DFD7 lockall - call PetalburgWoods_EventScript_22E124 - applymovement 4, PetalburgWoods_Movement_22E1CB + call PetalburgWoods_EventScript_DevonResearcherIntro + applymovement 4, PetalburgWoods_Movement_DevonResearcherApproachPlayerLeft waitmovement 0 - msgbox PetalburgWoods_Text_22E34F, MSGBOX_DEFAULT + msgbox PetalburgWoods_Text_HaveYouSeenShroomish, MSGBOX_DEFAULT closemessage playbgm MUS_AQA_0, 0 - applymovement 3, PetalburgWoods_Movement_22E209 + applymovement 3, PetalburgWoods_Movement_AquaEntrance waitmovement 0 - msgbox PetalburgWoods_Text_22E3AA, MSGBOX_DEFAULT + msgbox PetalburgWoods_Text_IWasGoingToAmbushYou, MSGBOX_DEFAULT closemessage - applymovement 3, PetalburgWoods_Movement_22E1F6 + applymovement 3, PetalburgWoods_Movement_AquaApproachResearcherLeft waitmovement 0 applymovement 4, Common_Movement_WalkInPlaceFastestUp waitmovement 0 - msgbox PetalburgWoods_Text_22E428, MSGBOX_DEFAULT + msgbox PetalburgWoods_Text_HandOverThosePapers, MSGBOX_DEFAULT closemessage - applymovement 4, PetalburgWoods_Movement_22E1E4 + applymovement 4, PetalburgWoods_Movement_DevonResearcherFleeToPlayerLeft waitmovement 0 - msgbox PetalburgWoods_Text_22E457, MSGBOX_DEFAULT + msgbox PetalburgWoods_Text_YouHaveToHelpMe, MSGBOX_DEFAULT closemessage - applymovement 3, PetalburgWoods_Movement_22E20E + applymovement 3, PetalburgWoods_Movement_AquaApproachPlayer waitmovement 0 - msgbox PetalburgWoods_Text_22E4A5, MSGBOX_DEFAULT - trainerbattle_no_intro TRAINER_GRUNT_8, PetalburgWoods_Text_22E542 - applymovement 3, PetalburgWoods_Movement_22E1F9 + msgbox PetalburgWoods_Text_NoOneCrossesTeamAqua, MSGBOX_DEFAULT + trainerbattle_no_intro TRAINER_GRUNT_8, PetalburgWoods_Text_YoureKiddingMe + applymovement 3, PetalburgWoods_Movement_AquaBackOff waitmovement 0 - call PetalburgWoods_EventScript_22E138 - applymovement EVENT_OBJ_ID_PLAYER, PetalburgWoods_Movement_22E1E0 - applymovement 4, PetalburgWoods_Movement_22E1C2 + call PetalburgWoods_EventScript_DevonResearcherPostBattle + applymovement EVENT_OBJ_ID_PLAYER, PetalburgWoods_Movement_WatchResearcherLeave + applymovement 4, PetalburgWoods_Movement_DevonResearcherExitLeft waitmovement 0 - goto PetalburgWoods_EventScript_22E1A7 + goto PetalburgWoods_EventScript_RemoveDevonResearcher end -PetalburgWoods_EventScript_22E079:: @ 822E079 +PetalburgWoods_EventScript_DevonResearcherRight:: @ 822E079 lockall - call PetalburgWoods_EventScript_22E124 - applymovement 4, PetalburgWoods_Movement_22E1D0 + call PetalburgWoods_EventScript_DevonResearcherIntro + applymovement 4, PetalburgWoods_Movement_DevonResearcherApproachPlayerRight waitmovement 0 applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceFastestLeft waitmovement 0 - msgbox PetalburgWoods_Text_22E34F, MSGBOX_DEFAULT + msgbox PetalburgWoods_Text_HaveYouSeenShroomish, MSGBOX_DEFAULT closemessage playbgm MUS_AQA_0, 0 - applymovement 3, PetalburgWoods_Movement_22E209 + applymovement 3, PetalburgWoods_Movement_AquaEntrance waitmovement 0 - msgbox PetalburgWoods_Text_22E3AA, MSGBOX_DEFAULT + msgbox PetalburgWoods_Text_IWasGoingToAmbushYou, MSGBOX_DEFAULT closemessage - applymovement 3, PetalburgWoods_Movement_22E205 + applymovement 3, PetalburgWoods_Movement_AquaApproachResearcherRight waitmovement 0 applymovement 4, Common_Movement_WalkInPlaceFastestUp waitmovement 0 - msgbox PetalburgWoods_Text_22E428, MSGBOX_DEFAULT + msgbox PetalburgWoods_Text_HandOverThosePapers, MSGBOX_DEFAULT closemessage - applymovement 4, PetalburgWoods_Movement_22E1EA + applymovement 4, PetalburgWoods_Movement_DevonResearcherFleeToPlayerRight waitmovement 0 - msgbox PetalburgWoods_Text_22E457, MSGBOX_DEFAULT + msgbox PetalburgWoods_Text_YouHaveToHelpMe, MSGBOX_DEFAULT applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceFastestUp waitmovement 0 - msgbox PetalburgWoods_Text_22E4A5, MSGBOX_DEFAULT - trainerbattle_no_intro TRAINER_GRUNT_8, PetalburgWoods_Text_22E542 - applymovement 3, PetalburgWoods_Movement_22E1F9 + msgbox PetalburgWoods_Text_NoOneCrossesTeamAqua, MSGBOX_DEFAULT + trainerbattle_no_intro TRAINER_GRUNT_8, PetalburgWoods_Text_YoureKiddingMe + applymovement 3, PetalburgWoods_Movement_AquaBackOff waitmovement 0 - call PetalburgWoods_EventScript_22E138 - applymovement EVENT_OBJ_ID_PLAYER, PetalburgWoods_Movement_22E1E0 - applymovement 4, PetalburgWoods_Movement_22E1D7 + call PetalburgWoods_EventScript_DevonResearcherPostBattle + applymovement EVENT_OBJ_ID_PLAYER, PetalburgWoods_Movement_WatchResearcherLeave + applymovement 4, PetalburgWoods_Movement_DevonResearcherExitRight waitmovement 0 - goto PetalburgWoods_EventScript_22E1A7 + goto PetalburgWoods_EventScript_RemoveDevonResearcher end -PetalburgWoods_EventScript_22E124:: @ 822E124 - applymovement 4, PetalburgWoods_Movement_22E1B1 +PetalburgWoods_EventScript_DevonResearcherIntro:: @ 822E124 + applymovement 4, PetalburgWoods_Movement_DevonResearcherLookAround waitmovement 0 - msgbox PetalburgWoods_Text_22E332, MSGBOX_DEFAULT + msgbox PetalburgWoods_Text_NotAOneToBeFound, MSGBOX_DEFAULT closemessage return -PetalburgWoods_EventScript_22E138:: @ 822E138 - msgbox PetalburgWoods_Text_22E563, MSGBOX_DEFAULT +PetalburgWoods_EventScript_DevonResearcherPostBattle:: @ 822E138 + msgbox PetalburgWoods_Text_YouveGotSomeNerve, MSGBOX_DEFAULT closemessage - applymovement 3, PetalburgWoods_Movement_22E1FD + applymovement 3, PetalburgWoods_Movement_AquaRunAway waitmovement 0 removeobject 3 applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceFastestDown waitmovement 0 - msgbox PetalburgWoods_Text_22E63D, MSGBOX_DEFAULT + msgbox PetalburgWoods_Text_ThatWasAwfullyClose, MSGBOX_DEFAULT giveitem_std ITEM_GREAT_BALL compare VAR_RESULT, 0 - goto_if_eq PetalburgWoods_EventScript_22E17D - goto PetalburgWoods_EventScript_22E18B + goto_if_eq PetalburgWoods_EventScript_BagFull + goto PetalburgWoods_EventScript_DevonResearcherFinish end -PetalburgWoods_EventScript_22E17D:: @ 822E17D - msgbox PetalburgWoods_Text_22E741, MSGBOX_DEFAULT - goto PetalburgWoods_EventScript_22E18B +PetalburgWoods_EventScript_BagFull:: @ 822E17D + msgbox PetalburgWoods_Text_YoureLoadedWithItems, MSGBOX_DEFAULT + goto PetalburgWoods_EventScript_DevonResearcherFinish end -PetalburgWoods_EventScript_22E18B:: @ 822E18B - msgbox PetalburgWoods_Text_22E6C7, MSGBOX_DEFAULT - applymovement 4, PetalburgWoods_Movement_22E1EE +PetalburgWoods_EventScript_DevonResearcherFinish:: @ 822E18B + msgbox PetalburgWoods_Text_TeamAquaAfterSomethingInRustboro, MSGBOX_DEFAULT + applymovement 4, PetalburgWoods_Movement_DevonResearcherStartExit waitmovement 0 - msgbox PetalburgWoods_Text_22E712, MSGBOX_DEFAULT + msgbox PetalburgWoods_Text_ICantBeWastingTime, MSGBOX_DEFAULT closemessage return -PetalburgWoods_EventScript_22E1A7:: @ 822E1A7 +PetalburgWoods_EventScript_RemoveDevonResearcher:: @ 822E1A7 removeobject 4 setvar VAR_PETALBURG_WOODS_STATE, 1 releaseall end -PetalburgWoods_Movement_22E1B1: @ 822E1B1 +PetalburgWoods_Movement_DevonResearcherLookAround: @ 822E1B1 face_up delay_16 delay_4 @@ -132,7 +132,7 @@ PetalburgWoods_Movement_22E1B1: @ 822E1B1 delay_16 step_end -PetalburgWoods_Movement_22E1C2: @ 822E1C2 +PetalburgWoods_Movement_DevonResearcherExitLeft: @ 822E1C2 walk_fast_right walk_fast_up walk_fast_up @@ -143,14 +143,14 @@ PetalburgWoods_Movement_22E1C2: @ 822E1C2 walk_fast_up step_end -PetalburgWoods_Movement_22E1CB: @ 822E1CB +PetalburgWoods_Movement_DevonResearcherApproachPlayerLeft: @ 822E1CB delay_16 face_player walk_down walk_down step_end -PetalburgWoods_Movement_22E1D0: @ 822E1D0 +PetalburgWoods_Movement_DevonResearcherApproachPlayerRight: @ 822E1D0 delay_16 face_player walk_down @@ -159,7 +159,7 @@ PetalburgWoods_Movement_22E1D0: @ 822E1D0 walk_in_place_fastest_right step_end -PetalburgWoods_Movement_22E1D7: @ 822E1D7 +PetalburgWoods_Movement_DevonResearcherExitRight: @ 822E1D7 walk_fast_left walk_fast_up walk_fast_up @@ -170,13 +170,13 @@ PetalburgWoods_Movement_22E1D7: @ 822E1D7 walk_fast_up step_end -PetalburgWoods_Movement_22E1E0: @ 822E1E0 +PetalburgWoods_Movement_WatchResearcherLeave: @ 822E1E0 delay_16 delay_16 walk_in_place_fastest_up step_end -PetalburgWoods_Movement_22E1E4: @ 822E1E4 +PetalburgWoods_Movement_DevonResearcherFleeToPlayerLeft: @ 822E1E4 walk_fast_right walk_fast_down walk_fast_down @@ -184,13 +184,13 @@ PetalburgWoods_Movement_22E1E4: @ 822E1E4 walk_in_place_fastest_up step_end -PetalburgWoods_Movement_22E1EA: @ 822E1EA +PetalburgWoods_Movement_DevonResearcherFleeToPlayerRight: @ 822E1EA walk_fast_down walk_fast_right walk_in_place_fastest_up step_end -PetalburgWoods_Movement_22E1EE: @ 822E1EE +PetalburgWoods_Movement_DevonResearcherStartExit: @ 822E1EE walk_in_place_fastest_down delay_16 delay_16 @@ -200,18 +200,18 @@ PetalburgWoods_Movement_22E1EE: @ 822E1EE face_up step_end -PetalburgWoods_Movement_22E1F6: @ 822E1F6 +PetalburgWoods_Movement_AquaApproachResearcherLeft: @ 822E1F6 walk_fast_down walk_fast_down step_end -PetalburgWoods_Movement_22E1F9: @ 822E1F9 +PetalburgWoods_Movement_AquaBackOff: @ 822E1F9 lock_facing_direction walk_up unlock_facing_direction step_end -PetalburgWoods_Movement_22E1FD: @ 822E1FD +PetalburgWoods_Movement_AquaRunAway: @ 822E1FD walk_fast_up walk_fast_up walk_fast_up @@ -221,36 +221,36 @@ PetalburgWoods_Movement_22E1FD: @ 822E1FD delay_16 step_end -PetalburgWoods_Movement_22E205: @ 822E205 +PetalburgWoods_Movement_AquaApproachResearcherRight: @ 822E205 walk_fast_down walk_fast_down walk_fast_down step_end -PetalburgWoods_Movement_22E209: @ 822E209 +PetalburgWoods_Movement_AquaEntrance: @ 822E209 walk_down walk_down delay_16 delay_16 step_end -PetalburgWoods_Movement_22E20E: @ 822E20E +PetalburgWoods_Movement_AquaApproachPlayer: @ 822E20E walk_down step_end -PetalburgWoods_EventScript_22E210:: @ 822E210 - msgbox PetalburgWoods_Text_22EA0C, MSGBOX_NPC +PetalburgWoods_EventScript_Boy1:: @ 822E210 + msgbox PetalburgWoods_Text_StayOutOfTallGrass, MSGBOX_NPC end -PetalburgWoods_EventScript_22E219:: @ 822E219 - msgbox PetalburgWoods_Text_22EA8B, MSGBOX_NPC +PetalburgWoods_EventScript_Boy2:: @ 822E219 + msgbox PetalburgWoods_Text_HiddenItemsExplanation, MSGBOX_NPC end -PetalburgWoods_EventScript_22E222:: @ 822E222 +PetalburgWoods_EventScript_Girl:: @ 822E222 lock faceplayer - goto_if_set FLAG_RECEIVED_MIRACLE_SEED, PetalburgWoods_EventScript_22E251 - msgbox PetalburgWoods_Text_22EAFE, MSGBOX_DEFAULT + goto_if_set FLAG_RECEIVED_MIRACLE_SEED, PetalburgWoods_EventScript_ExplainMiracleSeed + msgbox PetalburgWoods_Text_TryUsingThisItem, MSGBOX_DEFAULT giveitem_std ITEM_MIRACLE_SEED compare VAR_RESULT, 0 goto_if_eq Common_EventScript_ShowBagIsFull @@ -258,102 +258,102 @@ PetalburgWoods_EventScript_22E222:: @ 822E222 release end -PetalburgWoods_EventScript_22E251:: @ 822E251 - msgbox PetalburgWoods_Text_22EB63, MSGBOX_DEFAULT +PetalburgWoods_EventScript_ExplainMiracleSeed:: @ 822E251 + msgbox PetalburgWoods_Text_MiracleSeedExplanation, MSGBOX_DEFAULT release end -PetalburgWoods_EventScript_22E25B:: @ 822E25B - msgbox PetalburgWoods_Text_22EC10, MSGBOX_SIGN +PetalburgWoods_EventScript_Sign1:: @ 822E25B + msgbox PetalburgWoods_Text_TrainerTipsExperience, MSGBOX_SIGN end -PetalburgWoods_EventScript_22E264:: @ 822E264 - msgbox PetalburgWoods_Text_22ED07, MSGBOX_SIGN +PetalburgWoods_EventScript_Sign2:: @ 822E264 + msgbox PetalburgWoods_Text_TrainerTipsPP, MSGBOX_SIGN end -PetalburgWoods_EventScript_22E26D:: @ 822E26D - trainerbattle_single TRAINER_LYLE, PetalburgWoods_Text_22E77D, PetalburgWoods_Text_22E7C1 - msgbox PetalburgWoods_Text_22E7EF, MSGBOX_AUTOCLOSE +PetalburgWoods_EventScript_Lyle:: @ 822E26D + trainerbattle_single TRAINER_LYLE, PetalburgWoods_Text_GoBugPokemonTeam, PetalburgWoods_Text_ICouldntWin + msgbox PetalburgWoods_Text_ImOutOfPokeBalls, MSGBOX_AUTOCLOSE end -PetalburgWoods_EventScript_22E284:: @ 822E284 - trainerbattle_single TRAINER_JAMES_1, PetalburgWoods_Text_22E827, PetalburgWoods_Text_22E86B, PetalburgWoods_EventScript_22E2C5 +PetalburgWoods_EventScript_James:: @ 822E284 + trainerbattle_single TRAINER_JAMES_1, PetalburgWoods_Text_InstantlyPopularWithBugPokemon, PetalburgWoods_Text_CantBePopularIfILose, PetalburgWoods_EventScript_TryRegisterJames specialvar VAR_RESULT, ShouldTryRematchBattle compare VAR_RESULT, 1 - goto_if_eq PetalburgWoods_EventScript_22E31B + goto_if_eq PetalburgWoods_EventScript_JamesRematch setvar VAR_0x8004, TRAINER_JAMES_1 specialvar VAR_RESULT, IsTrainerRegistered compare VAR_RESULT, 0 - goto_if_eq PetalburgWoods_EventScript_22E2EF - msgbox PetalburgWoods_Text_22E889, MSGBOX_DEFAULT + goto_if_eq PetalburgWoods_EventScript_TryRegisterJames2 + msgbox PetalburgWoods_Text_PeopleRespectYou, MSGBOX_DEFAULT release end -PetalburgWoods_EventScript_22E2C5:: @ 822E2C5 +PetalburgWoods_EventScript_TryRegisterJames:: @ 822E2C5 special sub_80B4808 waitmovement 0 - goto_if_set FLAG_HAS_MATCH_CALL, PetalburgWoods_EventScript_22E2D6 + goto_if_set FLAG_HAS_MATCH_CALL, PetalburgWoods_EventScript_RegisterJames release end -PetalburgWoods_EventScript_22E2D6:: @ 822E2D6 - msgbox PetalburgWoods_Text_22E8C3, MSGBOX_DEFAULT +PetalburgWoods_EventScript_RegisterJames:: @ 822E2D6 + msgbox PetalburgWoods_Text_IWantRematch1, MSGBOX_DEFAULT register_matchcall TRAINER_JAMES_1 release end -PetalburgWoods_EventScript_22E2EF:: @ 822E2EF - goto_if_set FLAG_HAS_MATCH_CALL, PetalburgWoods_EventScript_22E302 - msgbox PetalburgWoods_Text_22E889, MSGBOX_DEFAULT +PetalburgWoods_EventScript_TryRegisterJames2:: @ 822E2EF + goto_if_set FLAG_HAS_MATCH_CALL, PetalburgWoods_EventScript_RegisterJames2 + msgbox PetalburgWoods_Text_PeopleRespectYou, MSGBOX_DEFAULT release end -PetalburgWoods_EventScript_22E302:: @ 822E302 - msgbox PetalburgWoods_Text_22E914, MSGBOX_DEFAULT +PetalburgWoods_EventScript_RegisterJames2:: @ 822E302 + msgbox PetalburgWoods_Text_IWantRematch2, MSGBOX_DEFAULT register_matchcall TRAINER_JAMES_1 release end -PetalburgWoods_EventScript_22E31B:: @ 822E31B - trainerbattle_rematch TRAINER_JAMES_1, PetalburgWoods_Text_22E966, PetalburgWoods_Text_22E998 - msgbox PetalburgWoods_Text_22E9B6, MSGBOX_AUTOCLOSE +PetalburgWoods_EventScript_JamesRematch:: @ 822E31B + trainerbattle_rematch TRAINER_JAMES_1, PetalburgWoods_Text_MyPokemonHaveGrown, PetalburgWoods_Text_CantBePopularIfLose + msgbox PetalburgWoods_Text_IveBeenTrainingHard, MSGBOX_AUTOCLOSE end -PetalburgWoods_Text_22E332: @ 822E332 +PetalburgWoods_Text_NotAOneToBeFound: @ 822E332 .string "Hmmm…\n" .string "Not a one to be found…$" -PetalburgWoods_Text_22E34F: @ 822E34F +PetalburgWoods_Text_HaveYouSeenShroomish: @ 822E34F .string "Hello, have you seen any POKéMON\n" .string "called SHROOMISH around here?\p" .string "I really love that POKéMON.$" -PetalburgWoods_Text_22E3AA: @ 822E3AA +PetalburgWoods_Text_IWasGoingToAmbushYou: @ 822E3AA .string "I was going to ambush you, but you\n" .string "had to dawdle in PETALBURG WOODS\l" .string "forever, didn't you?\p" .string "I got sick of waiting, so here I am!$" -PetalburgWoods_Text_22E428: @ 822E428 +PetalburgWoods_Text_HandOverThosePapers: @ 822E428 .string "You! DEVON RESEARCHER!\p" .string "Hand over those papers!$" -PetalburgWoods_Text_22E457: @ 822E457 +PetalburgWoods_Text_YouHaveToHelpMe: @ 822E457 .string "Aiyeeeh!\p" .string "You're a POKéMON TRAINER, aren't you?\n" .string "You've got to help me, please!$" -PetalburgWoods_Text_22E4A5: @ 822E4A5 +PetalburgWoods_Text_NoOneCrossesTeamAqua: @ 822E4A5 .string "Hunh? What do you think you're doing?\n" .string "What, you're going to protect him?\p" .string "No one who crosses TEAM AQUA\n" .string "gets any mercy, not even a kid!\p" .string "Come on and battle me!$" -PetalburgWoods_Text_22E542: @ 822E542 +PetalburgWoods_Text_YoureKiddingMe: @ 822E542 .string "You're kidding me! You're tough!$" -PetalburgWoods_Text_22E563: @ 822E563 +PetalburgWoods_Text_YouveGotSomeNerve: @ 822E563 .string "Grrr… You've got some nerve\n" .string "meddling with TEAM AQUA!\l" .string "Come on and battle me again!\p" @@ -363,7 +363,7 @@ PetalburgWoods_Text_22E563: @ 822E563 .string "after something in RUSTBORO.\p" .string "I'll let you go today!$" -PetalburgWoods_Text_22E63D: @ 822E63D +PetalburgWoods_Text_ThatWasAwfullyClose: @ 822E63D .string "Whew…\n" .string "That was awfully close!\p" .string "Thanks to you, he didn't rob me of\n" @@ -371,85 +371,85 @@ PetalburgWoods_Text_22E63D: @ 822E63D .string "I know, I'll give you a GREAT BALL as\n" .string "my thanks!$" -PetalburgWoods_Text_22E6C7: @ 822E6C7 +PetalburgWoods_Text_TeamAquaAfterSomethingInRustboro: @ 822E6C7 .string "Didn't that TEAM AQUA thug say\n" .string "they were after something in\l" .string "RUSTBORO, too?$" -PetalburgWoods_Text_22E712: @ 822E712 +PetalburgWoods_Text_ICantBeWastingTime: @ 822E712 .string "Uh-oh! It's a crisis!\n" .string "I can't be wasting time!$" -PetalburgWoods_Text_22E741: @ 822E741 +PetalburgWoods_Text_YoureLoadedWithItems: @ 822E741 .string "You're loaded with items.\n" .string "I can't give you this GREAT BALL.$" -PetalburgWoods_Text_22E77D: @ 822E77D +PetalburgWoods_Text_GoBugPokemonTeam: @ 822E77D .string "I caught a whole bunch of POKéMON!\p" .string "Go, go, go!\n" .string "My BUG POKéMON team!$" -PetalburgWoods_Text_22E7C1: @ 822E7C1 +PetalburgWoods_Text_ICouldntWin: @ 822E7C1 .string "I have all these POKéMON,\n" .string "but I couldn't win…$" -PetalburgWoods_Text_22E7EF: @ 822E7EF +PetalburgWoods_Text_ImOutOfPokeBalls: @ 822E7EF .string "I caught a bunch of POKéMON.\n" .string "Now I'm out of POKé BALLS.$" -PetalburgWoods_Text_22E827: @ 822E827 +PetalburgWoods_Text_InstantlyPopularWithBugPokemon: @ 822E827 .string "If you take BUG POKéMON to school,\n" .string "you get to be instantly popular!$" -PetalburgWoods_Text_22E86B: @ 822E86B +PetalburgWoods_Text_CantBePopularIfILose: @ 822E86B .string "I can't be popular if I lose.$" -PetalburgWoods_Text_22E889: @ 822E889 +PetalburgWoods_Text_PeopleRespectYou: @ 822E889 .string "If you have a big BUG POKéMON,\n" .string "people respect you for it.$" -PetalburgWoods_Text_22E8C3: @ 822E8C3 +PetalburgWoods_Text_IWantRematch1: @ 822E8C3 .string "I want a rematch when my BUG\n" .string "POKéMON grow up!\p" .string "I'm registering you in my POKéNAV!$" -PetalburgWoods_Text_22E914: @ 822E914 +PetalburgWoods_Text_IWantRematch2: @ 822E914 .string "I want a rematch when my BUG \n" .string "POKéMON grow up!\p" .string "I'm registering you in my POKéNAV!$" -PetalburgWoods_Text_22E966: @ 822E966 +PetalburgWoods_Text_MyPokemonHaveGrown: @ 822E966 .string "My BUG POKéMON have grown.\n" .string "I'll be popular again.$" -PetalburgWoods_Text_22E998: @ 822E998 +PetalburgWoods_Text_CantBePopularIfLose: @ 822E998 .string "I can't be popular if I lose.$" -PetalburgWoods_Text_22E9B6: @ 822E9B6 +PetalburgWoods_Text_IveBeenTrainingHard: @ 822E9B6 .string "You get to be popular if you have\n" .string "strong POKéMON, right?\l" .string "So, I've been training hard.$" -PetalburgWoods_Text_22EA0C: @ 822EA0C +PetalburgWoods_Text_StayOutOfTallGrass: @ 822EA0C .string "Yo, there!\n" .string "Your POKéMON doing okay?\p" .string "If your POKéMON are weak and you want\n" .string "to avoid battles, you should stay out\l" .string "of tall grass.$" -PetalburgWoods_Text_22EA8B: @ 822EA8B +PetalburgWoods_Text_HiddenItemsExplanation: @ 822EA8B .string "Sometimes, there are things on the\n" .string "ground even if you can't see them.\p" .string "That's why I always check where I'm\n" .string "walking.$" -PetalburgWoods_Text_22EAFE: @ 822EAFE +PetalburgWoods_Text_TryUsingThisItem: @ 822EAFE .string "Oh, neat!\n" .string "That's the BADGE from RUSTBORO GYM!\p" .string "You must be a TRAINER.\n" .string "You should try using this item.$" -PetalburgWoods_Text_22EB63: @ 822EB63 +PetalburgWoods_Text_MiracleSeedExplanation: @ 822EB63 .string "It's a MIRACLE SEED.\n" .string "If a POKéMON holds that item, its\l" .string "GRASS-type moves become stronger.\p" @@ -457,7 +457,7 @@ PetalburgWoods_Text_22EB63: @ 822EB63 .string "other convenient items for POKéMON\l" .string "to hold.$" -PetalburgWoods_Text_22EC10: @ 822EC10 +PetalburgWoods_Text_TrainerTipsExperience: @ 822EC10 .string "TRAINER TIPS\p" .string "Any POKéMON that appears even once\n" .string "in a battle is awarded EXP Points.\p" @@ -467,7 +467,7 @@ PetalburgWoods_Text_22EC10: @ 822EC10 .string "out. It will earn EXP Points without\l" .string "being exposed to any harm.$" -PetalburgWoods_Text_22ED07: @ 822ED07 +PetalburgWoods_Text_TrainerTipsPP: @ 822ED07 .string "TRAINER TIPS\p" .string "In addition to Hit Points (HP), POKéMON\n" .string "have Power Points (PP) that are used to\l" diff --git a/data/scripts/mystery_event_club.inc b/data/scripts/mystery_event_club.inc index c8cb84107a..1df0ed88cd 100644 --- a/data/scripts/mystery_event_club.inc +++ b/data/scripts/mystery_event_club.inc @@ -1,110 +1,110 @@ -PetalburgCity_PokemonCenter_1F_EventScript_291539:: @ 8291539 +MysteryEventClub_EventScript_Man:: @ 8291539 lock faceplayer - goto_if_set FLAG_SYS_CHAT_USED, PetalburgCity_PokemonCenter_1F_EventScript_2915F5 - msgbox PetalburgCity_PokemonCenter_1F_Text_291687, MSGBOX_DEFAULT - goto PetalburgCity_PokemonCenter_1F_EventScript_291552 + goto_if_set FLAG_SYS_CHAT_USED, MysteryEventClub_EventScript_2915F5 + msgbox MysteryEventClub_Text_CollectTrainerProfiles, MSGBOX_DEFAULT + goto MysteryEventClub_EventScript_291552 end -PetalburgCity_PokemonCenter_1F_EventScript_291552:: @ 8291552 - msgbox PetalburgCity_PokemonCenter_1F_Text_2916FF, MSGBOX_DEFAULT +MysteryEventClub_EventScript_291552:: @ 8291552 + msgbox MysteryEventClub_Text_2916FF, MSGBOX_DEFAULT multichoice 17, 6, MULTI_YESNOINFO_2, 0 switch VAR_RESULT - case 0, PetalburgCity_PokemonCenter_1F_EventScript_29159F - case 1, PetalburgCity_PokemonCenter_1F_EventScript_2915EB - case 2, PetalburgCity_PokemonCenter_1F_EventScript_291591 - case MULTI_B_PRESSED, PetalburgCity_PokemonCenter_1F_EventScript_2915EB + case 0, MysteryEventClub_EventScript_29159F + case 1, MysteryEventClub_EventScript_2915EB + case 2, MysteryEventClub_EventScript_291591 + case MULTI_B_PRESSED, MysteryEventClub_EventScript_2915EB end -PetalburgCity_PokemonCenter_1F_EventScript_291591:: @ 8291591 - msgbox PetalburgCity_PokemonCenter_1F_Text_291729, MSGBOX_DEFAULT - goto PetalburgCity_PokemonCenter_1F_EventScript_291552 +MysteryEventClub_EventScript_291591:: @ 8291591 + msgbox MysteryEventClub_Text_EasyChatExplanation, MSGBOX_DEFAULT + goto MysteryEventClub_EventScript_291552 end -PetalburgCity_PokemonCenter_1F_EventScript_29159F:: @ 829159F - msgbox PetalburgCity_PokemonCenter_1F_Text_291969, MSGBOX_DEFAULT +MysteryEventClub_EventScript_29159F:: @ 829159F + msgbox MysteryEventClub_Text_291969, MSGBOX_DEFAULT closemessage setvar VAR_0x8004, EASY_CHAT_TYPE_PROFILE call Common_ShowEasyChatScreen lock faceplayer compare VAR_RESULT, 0 - goto_if_eq PetalburgCity_PokemonCenter_1F_EventScript_2915CB + goto_if_eq MysteryEventClub_EventScript_2915CB compare VAR_RESULT, 1 - goto_if_eq PetalburgCity_PokemonCenter_1F_EventScript_2915D5 + goto_if_eq MysteryEventClub_EventScript_2915D5 end -PetalburgCity_PokemonCenter_1F_EventScript_2915CB:: @ 82915CB - msgbox PetalburgCity_PokemonCenter_1F_Text_2919DC, MSGBOX_DEFAULT +MysteryEventClub_EventScript_2915CB:: @ 82915CB + msgbox MysteryEventClub_Text_2919DC, MSGBOX_DEFAULT release end -PetalburgCity_PokemonCenter_1F_EventScript_2915D5:: @ 82915D5 +MysteryEventClub_EventScript_2915D5:: @ 82915D5 setvar VAR_0x8004, 0 special sub_811EECC waitmessage delay 80 - msgbox PetalburgCity_PokemonCenter_1F_Text_291B22, MSGBOX_DEFAULT + msgbox MysteryEventClub_Text_291B22, MSGBOX_DEFAULT release end -PetalburgCity_PokemonCenter_1F_EventScript_2915EB:: @ 82915EB - msgbox PetalburgCity_PokemonCenter_1F_Text_291991, MSGBOX_DEFAULT +MysteryEventClub_EventScript_2915EB:: @ 82915EB + msgbox MysteryEventClub_Text_291991, MSGBOX_DEFAULT release end -PetalburgCity_PokemonCenter_1F_EventScript_2915F5:: @ 82915F5 - msgbox PetalburgCity_PokemonCenter_1F_Text_291A1B, MSGBOX_DEFAULT - goto PetalburgCity_PokemonCenter_1F_EventScript_291603 +MysteryEventClub_EventScript_2915F5:: @ 82915F5 + msgbox MysteryEventClub_Text_YouHaveWonderfulSmile, MSGBOX_DEFAULT + goto MysteryEventClub_EventScript_291603 end -PetalburgCity_PokemonCenter_1F_EventScript_291603:: @ 8291603 - msgbox PetalburgCity_PokemonCenter_1F_Text_291A4F, MSGBOX_DEFAULT +MysteryEventClub_EventScript_291603:: @ 8291603 + msgbox MysteryEventClub_Text_MayISeeYourNewProfile, MSGBOX_DEFAULT multichoice 17, 6, MULTI_YESNOINFO_2, 0 switch VAR_RESULT - case 0, PetalburgCity_PokemonCenter_1F_EventScript_291650 - case 1, PetalburgCity_PokemonCenter_1F_EventScript_29167C - case 2, PetalburgCity_PokemonCenter_1F_EventScript_291642 - case MULTI_B_PRESSED, PetalburgCity_PokemonCenter_1F_EventScript_29167C + case 0, MysteryEventClub_EventScript_291650 + case 1, MysteryEventClub_EventScript_29167C + case 2, MysteryEventClub_EventScript_291642 + case MULTI_B_PRESSED, MysteryEventClub_EventScript_29167C end -PetalburgCity_PokemonCenter_1F_EventScript_291642:: @ 8291642 - msgbox PetalburgCity_PokemonCenter_1F_Text_291729, MSGBOX_DEFAULT - goto PetalburgCity_PokemonCenter_1F_EventScript_291603 +MysteryEventClub_EventScript_291642:: @ 8291642 + msgbox MysteryEventClub_Text_EasyChatExplanation, MSGBOX_DEFAULT + goto MysteryEventClub_EventScript_291603 end -PetalburgCity_PokemonCenter_1F_EventScript_291650:: @ 8291650 - msgbox PetalburgCity_PokemonCenter_1F_Text_291A6B, MSGBOX_DEFAULT +MysteryEventClub_EventScript_291650:: @ 8291650 + msgbox MysteryEventClub_Text_291A6B, MSGBOX_DEFAULT closemessage setvar VAR_0x8004, EASY_CHAT_TYPE_PROFILE call Common_ShowEasyChatScreen lock faceplayer compare VAR_RESULT, 0 - goto_if_eq PetalburgCity_PokemonCenter_1F_EventScript_2915CB + goto_if_eq MysteryEventClub_EventScript_2915CB compare VAR_RESULT, 1 - goto_if_eq PetalburgCity_PokemonCenter_1F_EventScript_2915D5 + goto_if_eq MysteryEventClub_EventScript_2915D5 end -PetalburgCity_PokemonCenter_1F_EventScript_29167C:: @ 829167C - msgbox PetalburgCity_PokemonCenter_1F_Text_291ABA, MSGBOX_DEFAULT +MysteryEventClub_EventScript_29167C:: @ 829167C + msgbox MysteryEventClub_Text_291ABA, MSGBOX_DEFAULT release end -PetalburgCity_PokemonCenter_1F_EventScript_291686:: @ 8291686 +MysteryEventClub_EventScript_291686:: @ 8291686 return -PetalburgCity_PokemonCenter_1F_Text_291687: @ 8291687 +MysteryEventClub_Text_CollectTrainerProfiles: @ 8291687 .string "Hello there, TRAINER!\n" .string "You've got a wonderful smile, there.\p" .string "I have a hobby--collecting the profiles\n" .string "of POKéMON TRAINERS.$" -PetalburgCity_PokemonCenter_1F_Text_2916FF: @ 82916FF +MysteryEventClub_Text_2916FF: @ 82916FF .string "So, how about it?\n" .string "May I see your profile?$" -PetalburgCity_PokemonCenter_1F_Text_291729: @ 8291729 +MysteryEventClub_Text_EasyChatExplanation: @ 8291729 .string "You make your own profile by putting\n" .string "together four words or phrases.\p" .string "Here, I'll show you an example of a\n" @@ -123,37 +123,37 @@ PetalburgCity_PokemonCenter_1F_Text_291729: @ 8291729 .string "Repeat for the remaining text choices,\n" .string "and you'll have your very own profile.$" -PetalburgCity_PokemonCenter_1F_Text_291969: @ 8291969 +MysteryEventClub_Text_291969: @ 8291969 .string "Yes! Thank you!\n" .string "So, let's see it, then.$" -PetalburgCity_PokemonCenter_1F_Text_291991: @ 8291991 +MysteryEventClub_Text_291991: @ 8291991 .string "Oh, no, really?\p" .string "I imagine someone like you would have\n" .string "a wonderful profile…$" -PetalburgCity_PokemonCenter_1F_Text_2919DC: @ 82919DC +MysteryEventClub_Text_2919DC: @ 82919DC .string "Oh? You're not into it right now?\p" .string "Well, anytime is good by me!$" -PetalburgCity_PokemonCenter_1F_Text_291A1B: @ 8291A1B +MysteryEventClub_Text_YouHaveWonderfulSmile: @ 8291A1B .string "Hello there, TRAINER!\n" .string "You've got a wonderful smile.$" -PetalburgCity_PokemonCenter_1F_Text_291A4F: @ 8291A4F +MysteryEventClub_Text_MayISeeYourNewProfile: @ 8291A4F .string "May I see your new profile?$" -PetalburgCity_PokemonCenter_1F_Text_291A6B: @ 8291A6B +MysteryEventClub_Text_291A6B: @ 8291A6B .string "Yes! Thank you!\p" .string "I hope it's even better than the profile\n" .string "you showed me before.$" -PetalburgCity_PokemonCenter_1F_Text_291ABA: @ 8291ABA +MysteryEventClub_Text_291ABA: @ 8291ABA .string "Oh, you like your profile the way it is.\p" .string "I don't blame you--it's a wonderful\n" .string "profile the way it is now.$" -PetalburgCity_PokemonCenter_1F_Text_291B22: @ 8291B22 +MysteryEventClub_Text_291B22: @ 8291B22 .string "F-fantastic!\p" .string "Your profile, it's wonderful!\n" .string "It really says what you're about.\p" @@ -161,7 +161,7 @@ PetalburgCity_PokemonCenter_1F_Text_291B22: @ 8291B22 .string "be captivated by you!\p" .string "Thank you!$" -PetalburgCity_PokemonCenter_1F_Text_291BB7: @ 8291BB7 +MysteryEventClub_Text_291BB7: @ 8291BB7 .string "Oh?\n" .string "You know the secret saying!\p" .string "That means you're now a fellow member\n" From 2f36bd62d7a0030064eaacd36676678428cfc41b Mon Sep 17 00:00:00 2001 From: Marcus Huderle Date: Sun, 20 Oct 2019 18:30:25 -0500 Subject: [PATCH 12/46] Document Oldale scripts --- data/maps/OldaleTown/map.json | 16 +- data/maps/OldaleTown/scripts.inc | 203 +++++++++--------- data/maps/OldaleTown_House1/map.json | 2 +- data/maps/OldaleTown_House1/scripts.inc | 6 +- data/maps/OldaleTown_House2/map.json | 4 +- data/maps/OldaleTown_House2/scripts.inc | 12 +- data/maps/OldaleTown_Mart/map.json | 6 +- data/maps/OldaleTown_Mart/scripts.inc | 34 +-- .../maps/OldaleTown_PokemonCenter_1F/map.json | 8 +- .../OldaleTown_PokemonCenter_1F/scripts.inc | 28 +-- 10 files changed, 160 insertions(+), 159 deletions(-) diff --git a/data/maps/OldaleTown/map.json b/data/maps/OldaleTown/map.json index 5f91e81ed2..3e3fb93d35 100644 --- a/data/maps/OldaleTown/map.json +++ b/data/maps/OldaleTown/map.json @@ -40,7 +40,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "OldaleTown_EventScript_1E8EF3", + "script": "OldaleTown_EventScript_Girl", "flag": "0" }, { @@ -53,7 +53,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "OldaleTown_EventScript_1E8EFC", + "script": "OldaleTown_EventScript_MartEmployee", "flag": "0" }, { @@ -79,7 +79,7 @@ "movement_range_y": 1, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "OldaleTown_EventScript_1E9070", + "script": "OldaleTown_EventScript_Rival", "flag": "FLAG_HIDE_OLDALE_TOWN_RIVAL" } ], @@ -121,7 +121,7 @@ "elevation": 3, "var": "VAR_OLDALE_TOWN_STATE", "var_value": "0", - "script": "OldaleTown_EventScript_1E903F" + "script": "OldaleTown_EventScript_BlockedPath" }, { "type": "trigger", @@ -130,7 +130,7 @@ "elevation": 3, "var": "VAR_OLDALE_RIVAL_STATE", "var_value": "1", - "script": "OldaleTown_EventScript_1E9086" + "script": "OldaleTown_EventScript_RivalTrigger1" }, { "type": "trigger", @@ -139,7 +139,7 @@ "elevation": 3, "var": "VAR_OLDALE_RIVAL_STATE", "var_value": "1", - "script": "OldaleTown_EventScript_1E90A6" + "script": "OldaleTown_EventScript_RivalTrigger2" }, { "type": "trigger", @@ -148,7 +148,7 @@ "elevation": 3, "var": "VAR_OLDALE_RIVAL_STATE", "var_value": "1", - "script": "OldaleTown_EventScript_1E90C6" + "script": "OldaleTown_EventScript_RivalTrigger3" } ], "bg_events": [ @@ -158,7 +158,7 @@ "y": 9, "elevation": 0, "player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY", - "script": "OldaleTown_EventScript_1E8EEA" + "script": "OldaleTown_EventScript_CitySign" }, { "type": "sign", diff --git a/data/maps/OldaleTown/scripts.inc b/data/maps/OldaleTown/scripts.inc index 8e3950cae5..5f9c9d6d5b 100644 --- a/data/maps/OldaleTown/scripts.inc +++ b/data/maps/OldaleTown/scripts.inc @@ -5,92 +5,93 @@ OldaleTown_MapScripts:: @ 81E8EA2 OldaleTown_OnTransition: @ 81E8EA8 call Common_EventScript_SetupRivalGfxId setflag FLAG_VISITED_OLDALE_TOWN - call_if_unset FLAG_ADVENTURE_STARTED, OldaleTown_EventScript_1E8ED2 - call_if_unset FLAG_RECEIVED_POTION_OLDALE, OldaleTown_EventScript_1E8EDE - call_if_set FLAG_ADVENTURE_STARTED, OldaleTown_EventScript_1E8ECC + call_if_unset FLAG_ADVENTURE_STARTED, OldaleTown_EventScript_BlockWestEntrance + call_if_unset FLAG_RECEIVED_POTION_OLDALE, OldaleTown_EventScript_MoveMartEmployee + call_if_set FLAG_ADVENTURE_STARTED, OldaleTown_EventScript_SetOldaleState end -OldaleTown_EventScript_1E8ECC:: @ 81E8ECC +@ This script seems pointless because nothing uses VAR_OLDALE_TOWN_STATE +OldaleTown_EventScript_SetOldaleState:: @ 81E8ECC setvar VAR_OLDALE_TOWN_STATE, 1 return -OldaleTown_EventScript_1E8ED2:: @ 81E8ED2 +OldaleTown_EventScript_BlockWestEntrance:: @ 81E8ED2 setobjectxyperm 3, 1, 11 setobjectmovementtype 3, MOVEMENT_TYPE_FACE_LEFT return -OldaleTown_EventScript_1E8EDE:: @ 81E8EDE +OldaleTown_EventScript_MoveMartEmployee:: @ 81E8EDE setobjectxyperm 2, 13, 14 setobjectmovementtype 2, MOVEMENT_TYPE_FACE_DOWN return -OldaleTown_EventScript_1E8EEA:: @ 81E8EEA - msgbox OldaleTown_Text_1E94DA, MSGBOX_SIGN +OldaleTown_EventScript_CitySign:: @ 81E8EEA + msgbox OldaleTown_Text_CitySign, MSGBOX_SIGN end -OldaleTown_EventScript_1E8EF3:: @ 81E8EF3 - msgbox OldaleTown_Text_1E918E, MSGBOX_NPC +OldaleTown_EventScript_Girl:: @ 81E8EF3 + msgbox OldaleTown_Text_SavingMyProgress, MSGBOX_NPC end -OldaleTown_EventScript_1E8EFC:: @ 81E8EFC +OldaleTown_EventScript_MartEmployee:: @ 81E8EFC lock faceplayer - goto_if_set FLAG_RECEIVED_POTION_OLDALE, OldaleTown_EventScript_1E8FB9 - goto_if_set FLAG_TEMP_1, OldaleTown_EventScript_1E8FB9 + goto_if_set FLAG_RECEIVED_POTION_OLDALE, OldaleTown_EventScript_ExplainPotion + goto_if_set FLAG_TEMP_1, OldaleTown_EventScript_ExplainPotion setflag FLAG_TEMP_1 playbgm MUS_TSURETEK, 0 - msgbox OldaleTown_Text_1E91C0, MSGBOX_DEFAULT + msgbox OldaleTown_Text_IWorkAtPokemonMart, MSGBOX_DEFAULT closemessage switch VAR_FACING - case DIR_SOUTH, OldaleTown_EventScript_1E8F47 - case DIR_NORTH, OldaleTown_EventScript_1E8F5E - case DIR_EAST, OldaleTown_EventScript_1E8F75 + case DIR_SOUTH, OldaleTown_EventScript_GoToMartSouth + case DIR_NORTH, OldaleTown_EventScript_GoToMartNorth + case DIR_EAST, OldaleTown_EventScript_GoToMartEast end -OldaleTown_EventScript_1E8F47:: @ 81E8F47 - applymovement 2, OldaleTown_Movement_1E8FD7 - applymovement EVENT_OBJ_ID_PLAYER, OldaleTown_Movement_1E9001 +OldaleTown_EventScript_GoToMartSouth:: @ 81E8F47 + applymovement 2, OldaleTown_Movement_EmployeeSouth + applymovement EVENT_OBJ_ID_PLAYER, OldaleTown_Movement_PlayerSouth waitmovement 0 - goto OldaleTown_EventScript_1E8F8C + goto OldaleTown_EventScript_ExplainPokemonMart end -OldaleTown_EventScript_1E8F5E:: @ 81E8F5E - applymovement 2, OldaleTown_Movement_1E8FE2 - applymovement EVENT_OBJ_ID_PLAYER, OldaleTown_Movement_1E900B +OldaleTown_EventScript_GoToMartNorth:: @ 81E8F5E + applymovement 2, OldaleTown_Movement_EmployeeNorth + applymovement EVENT_OBJ_ID_PLAYER, OldaleTown_Movement_PlayerNorth waitmovement 0 - goto OldaleTown_EventScript_1E8F8C + goto OldaleTown_EventScript_ExplainPokemonMart end -OldaleTown_EventScript_1E8F75:: @ 81E8F75 - applymovement EVENT_OBJ_ID_PLAYER, OldaleTown_Movement_1E8FF9 - applymovement 2, OldaleTown_Movement_1E8FCE +OldaleTown_EventScript_GoToMartEast:: @ 81E8F75 + applymovement EVENT_OBJ_ID_PLAYER, OldaleTown_Movement_PlayerEast + applymovement 2, OldaleTown_Movement_EmployeeEast waitmovement 0 - goto OldaleTown_EventScript_1E8F8C + goto OldaleTown_EventScript_ExplainPokemonMart end -OldaleTown_EventScript_1E8F8C:: @ 81E8F8C - msgbox OldaleTown_Text_1E91FD, MSGBOX_DEFAULT +OldaleTown_EventScript_ExplainPokemonMart:: @ 81E8F8C + msgbox OldaleTown_Text_ThisIsAPokemonMart, MSGBOX_DEFAULT giveitem_std ITEM_POTION compare VAR_RESULT, 0 - goto_if_eq OldaleTown_EventScript_1E8FC3 - msgbox OldaleTown_Text_1E92AF, MSGBOX_DEFAULT + goto_if_eq OldaleTown_EventScript_BagIsFull + msgbox OldaleTown_Text_PotionExplanation, MSGBOX_DEFAULT setflag FLAG_RECEIVED_POTION_OLDALE fadedefaultbgm release end -OldaleTown_EventScript_1E8FB9:: @ 81E8FB9 - msgbox OldaleTown_Text_1E92AF, MSGBOX_DEFAULT +OldaleTown_EventScript_ExplainPotion:: @ 81E8FB9 + msgbox OldaleTown_Text_PotionExplanation, MSGBOX_DEFAULT release end -OldaleTown_EventScript_1E8FC3:: @ 81E8FC3 +OldaleTown_EventScript_BagIsFull:: @ 81E8FC3 msgbox gText_TooBadBagIsFull, MSGBOX_DEFAULT fadedefaultbgm release end -OldaleTown_Movement_1E8FCE: @ 81E8FCE +OldaleTown_Movement_EmployeeEast: @ 81E8FCE walk_up walk_up walk_up @@ -101,7 +102,7 @@ OldaleTown_Movement_1E8FCE: @ 81E8FCE walk_in_place_fastest_down step_end -OldaleTown_Movement_1E8FD7: @ 81E8FD7 +OldaleTown_Movement_EmployeeSouth: @ 81E8FD7 walk_left walk_up walk_up @@ -114,7 +115,7 @@ OldaleTown_Movement_1E8FD7: @ 81E8FD7 walk_in_place_fastest_down step_end -OldaleTown_Movement_1E8FE2: @ 81E8FE2 +OldaleTown_Movement_EmployeeNorth: @ 81E8FE2 walk_up walk_up walk_up @@ -125,7 +126,7 @@ OldaleTown_Movement_1E8FE2: @ 81E8FE2 walk_in_place_fastest_down step_end -OldaleTown_Movement_1E8FEB: @ 81E8FEB +OldaleTown_Movement_Unknown1: @ 81E8FEB walk_up walk_up walk_right @@ -141,7 +142,7 @@ OldaleTown_Movement_1E8FEB: @ 81E8FEB walk_in_place_fastest_down step_end -OldaleTown_Movement_1E8FF9: @ 81E8FF9 +OldaleTown_Movement_PlayerEast: @ 81E8FF9 walk_right walk_up walk_up @@ -151,7 +152,7 @@ OldaleTown_Movement_1E8FF9: @ 81E8FF9 walk_up step_end -OldaleTown_Movement_1E9001: @ 81E9001 +OldaleTown_Movement_PlayerSouth: @ 81E9001 delay_16 delay_16 delay_16 @@ -163,7 +164,7 @@ OldaleTown_Movement_1E9001: @ 81E9001 walk_up step_end -OldaleTown_Movement_1E900B: @ 81E900B +OldaleTown_Movement_PlayerNorth: @ 81E900B walk_up walk_up walk_up @@ -173,7 +174,7 @@ OldaleTown_Movement_1E900B: @ 81E900B walk_up step_end -OldaleTown_Movement_1E9013: @ 81E9013 +OldaleTown_Movement_Unknown2: @ 81E9013 walk_left walk_up walk_up @@ -190,94 +191,94 @@ OldaleTown_Movement_1E9013: @ 81E9013 OldaleTown_EventScript_1E901F:: @ 81E901F lock faceplayer - goto_if_set FLAG_ADVENTURE_STARTED, OldaleTown_EventScript_1E9066 - msgbox OldaleTown_Text_1E939A, MSGBOX_DEFAULT + goto_if_set FLAG_ADVENTURE_STARTED, OldaleTown_EventScript_NotBlockingPath + msgbox OldaleTown_Text_DiscoveredFootprints, MSGBOX_DEFAULT closemessage applymovement 3, Common_Movement_FaceOriginalDirection waitmovement 0 release end -OldaleTown_EventScript_1E903F:: @ 81E903F +OldaleTown_EventScript_BlockedPath:: @ 81E903F lockall - applymovement EVENT_OBJ_ID_PLAYER, OldaleTown_Movement_1E9182 - applymovement 3, OldaleTown_Movement_1E9185 + applymovement EVENT_OBJ_ID_PLAYER, OldaleTown_Movement_PlayerStepBack + applymovement 3, OldaleTown_Movement_BackUp waitmovement 0 - msgbox OldaleTown_Text_1E9313, MSGBOX_DEFAULT + msgbox OldaleTown_Text_WaitDontComeInHere, MSGBOX_DEFAULT closemessage - applymovement 3, OldaleTown_Movement_1E918B + applymovement 3, OldaleTown_Movement_ReturnToOriginalPosition waitmovement 0 releaseall end -OldaleTown_EventScript_1E9066:: @ 81E9066 - msgbox OldaleTown_Text_1E93F8, MSGBOX_DEFAULT +OldaleTown_EventScript_NotBlockingPath:: @ 81E9066 + msgbox OldaleTown_Text_FinishedSketchingFootprints, MSGBOX_DEFAULT release end -OldaleTown_EventScript_1E9070:: @ 81E9070 +OldaleTown_EventScript_Rival:: @ 81E9070 lockall applymovement 4, Common_Movement_FacePlayer waitmovement 0 setvar VAR_0x8009, 0 - goto OldaleTown_EventScript_1E90E6 + goto OldaleTown_EventScript_ShowRivalMessage end -OldaleTown_EventScript_1E9086:: @ 81E9086 +OldaleTown_EventScript_RivalTrigger1:: @ 81E9086 lockall - applymovement 4, OldaleTown_Movement_1E9170 + applymovement 4, OldaleTown_Movement_RivalApproachPlayer1 waitmovement 0 applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceFastestRight waitmovement 0 setvar VAR_0x8009, 1 - goto OldaleTown_EventScript_1E90E6 + goto OldaleTown_EventScript_ShowRivalMessage end -OldaleTown_EventScript_1E90A6:: @ 81E90A6 +OldaleTown_EventScript_RivalTrigger2:: @ 81E90A6 lockall - applymovement 4, OldaleTown_Movement_1E9173 + applymovement 4, OldaleTown_Movement_RivalApproachPlayer2 waitmovement 0 applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceFastestRight waitmovement 0 setvar VAR_0x8009, 1 - goto OldaleTown_EventScript_1E90E6 + goto OldaleTown_EventScript_ShowRivalMessage end -OldaleTown_EventScript_1E90C6:: @ 81E90C6 +OldaleTown_EventScript_RivalTrigger3:: @ 81E90C6 lockall - applymovement 4, OldaleTown_Movement_1E9175 + applymovement 4, OldaleTown_Movement_RivalApproachPlayer3 waitmovement 0 applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceFastestRight waitmovement 0 setvar VAR_0x8009, 1 - goto OldaleTown_EventScript_1E90E6 + goto OldaleTown_EventScript_ShowRivalMessage end -OldaleTown_EventScript_1E90E6:: @ 81E90E6 +OldaleTown_EventScript_ShowRivalMessage:: @ 81E90E6 checkplayergender compare VAR_RESULT, MALE - goto_if_eq OldaleTown_EventScript_1E90FE + goto_if_eq OldaleTown_EventScript_ShowMayMessage compare VAR_RESULT, FEMALE - goto_if_eq OldaleTown_EventScript_1E910C + goto_if_eq OldaleTown_EventScript_ShowBrendanMessage end -OldaleTown_EventScript_1E90FE:: @ 81E90FE - msgbox OldaleTown_Text_1E9462, MSGBOX_DEFAULT - goto OldaleTown_EventScript_1E911A +OldaleTown_EventScript_ShowMayMessage:: @ 81E90FE + msgbox OldaleTown_Text_MayLetsGoBack, MSGBOX_DEFAULT + goto OldaleTown_EventScript_RivalFinish end -OldaleTown_EventScript_1E910C:: @ 81E910C - msgbox OldaleTown_Text_1E948A, MSGBOX_DEFAULT - goto OldaleTown_EventScript_1E911A +OldaleTown_EventScript_ShowBrendanMessage:: @ 81E910C + msgbox OldaleTown_Text_BrendanLetsGoBack, MSGBOX_DEFAULT + goto OldaleTown_EventScript_RivalFinish end -OldaleTown_EventScript_1E911A:: @ 81E911A +OldaleTown_EventScript_RivalFinish:: @ 81E911A closemessage compare VAR_0x8009, 0 - call_if_eq OldaleTown_EventScript_1E9148 + call_if_eq OldaleTown_EventScript_DoExitMovement1 compare VAR_0x8009, 1 - call_if_eq OldaleTown_EventScript_1E915E - applymovement 4, OldaleTown_Movement_1E9177 + call_if_eq OldaleTown_EventScript_DoExitMovement2 + applymovement 4, OldaleTown_Movement_RivalExit waitmovement 0 removeobject 4 setvar VAR_OLDALE_RIVAL_STATE, 2 @@ -285,33 +286,33 @@ OldaleTown_EventScript_1E911A:: @ 81E911A releaseall end -OldaleTown_EventScript_1E9148:: @ 81E9148 +OldaleTown_EventScript_DoExitMovement1:: @ 81E9148 compare VAR_FACING, DIR_SOUTH - goto_if_ne OldaleTown_EventScript_1E915E - applymovement 4, OldaleTown_Movement_1E9177 + goto_if_ne OldaleTown_EventScript_DoExitMovement2 + applymovement 4, OldaleTown_Movement_RivalExit waitmovement 0 return -OldaleTown_EventScript_1E915E:: @ 81E915E - applymovement EVENT_OBJ_ID_PLAYER, OldaleTown_Movement_1E917E - applymovement 4, OldaleTown_Movement_1E9177 +OldaleTown_EventScript_DoExitMovement2:: @ 81E915E + applymovement EVENT_OBJ_ID_PLAYER, OldaleTown_Movement_WatchRivalExit + applymovement 4, OldaleTown_Movement_RivalExit waitmovement 0 return -OldaleTown_Movement_1E9170: @ 81E9170 +OldaleTown_Movement_RivalApproachPlayer1: @ 81E9170 walk_left walk_left step_end -OldaleTown_Movement_1E9173: @ 81E9173 +OldaleTown_Movement_RivalApproachPlayer2: @ 81E9173 walk_left step_end -OldaleTown_Movement_1E9175: @ 81E9175 +OldaleTown_Movement_RivalApproachPlayer3: @ 81E9175 face_left step_end -OldaleTown_Movement_1E9177: @ 81E9177 +OldaleTown_Movement_RivalExit: @ 81E9177 walk_down walk_down walk_down @@ -320,18 +321,18 @@ OldaleTown_Movement_1E9177: @ 81E9177 walk_down step_end -OldaleTown_Movement_1E917E: @ 81E917E +OldaleTown_Movement_WatchRivalExit: @ 81E917E delay_8 delay_4 walk_in_place_fastest_down step_end -OldaleTown_Movement_1E9182: @ 81E9182 +OldaleTown_Movement_PlayerStepBack: @ 81E9182 delay_8 walk_right step_end -OldaleTown_Movement_1E9185: @ 81E9185 +OldaleTown_Movement_BackUp: @ 81E9185 walk_fast_up walk_in_place_fastest_left lock_facing_direction @@ -339,21 +340,21 @@ OldaleTown_Movement_1E9185: @ 81E9185 unlock_facing_direction step_end -OldaleTown_Movement_1E918B: @ 81E918B +OldaleTown_Movement_ReturnToOriginalPosition: @ 81E918B walk_down walk_left step_end -OldaleTown_Text_1E918E: @ 81E918E +OldaleTown_Text_SavingMyProgress: @ 81E918E .string "I want to take a rest, so I'm saving my\n" .string "progress.$" -OldaleTown_Text_1E91C0: @ 81E91C0 +OldaleTown_Text_IWorkAtPokemonMart: @ 81E91C0 .string "Hi!\n" .string "I work at a POKéMON MART.\p" .string "Can I get you to come with me?$" -OldaleTown_Text_1E91FD: @ 81E91FD +OldaleTown_Text_ThisIsAPokemonMart: @ 81E91FD .string "This is a POKéMON MART.\n" .string "Just look for our blue roof.\p" .string "We sell a variety of goods including\n" @@ -361,12 +362,12 @@ OldaleTown_Text_1E91FD: @ 81E91FD .string "Here, I'd like you to have this as\n" .string "a promotional item.$" -OldaleTown_Text_1E92AF: @ 81E92AF +OldaleTown_Text_PotionExplanation: @ 81E92AF .string "A POTION can be used anytime, so it's\n" .string "even more useful than a POKéMON CENTER\l" .string "in certain situations.$" -OldaleTown_Text_1E9313: @ 81E9313 +OldaleTown_Text_WaitDontComeInHere: @ 81E9313 .string "Aaaaah! Wait!\n" .string "Please don't come in here.\p" .string "I just discovered the footprints of\n" @@ -374,29 +375,29 @@ OldaleTown_Text_1E9313: @ 81E9313 .string "Wait until I finish sketching\n" .string "them, okay?$" -OldaleTown_Text_1E939A: @ 81E939A +OldaleTown_Text_DiscoveredFootprints: @ 81E939A .string "I just discovered the footprints of\n" .string "a rare POKéMON!\p" .string "Wait until I finish sketching\n" .string "them, okay?$" -OldaleTown_Text_1E93F8: @ 81E93F8 +OldaleTown_Text_FinishedSketchingFootprints: @ 81E93F8 .string "I finished sketching the footprints of\n" .string "a rare POKéMON.\p" .string "But it turns out they were only my\n" .string "own footprints…$" -OldaleTown_Text_1E9462: @ 81E9462 +OldaleTown_Text_MayLetsGoBack: @ 81E9462 .string "MAY: {PLAYER}{KUN}!\n" .string "Over here!\l" .string "Let's hurry home!$" -OldaleTown_Text_1E948A: @ 81E948A +OldaleTown_Text_BrendanLetsGoBack: @ 81E948A .string "BRENDAN: I'm heading back to my dad's\n" .string "LAB now.\l" .string "{PLAYER}, you should hustle back, too.$" -OldaleTown_Text_1E94DA: @ 81E94DA +OldaleTown_Text_CitySign: @ 81E94DA .string "OLDALE TOWN\n" .string "“Where things start off scarce.”$" diff --git a/data/maps/OldaleTown_House1/map.json b/data/maps/OldaleTown_House1/map.json index aa837378c3..03155a6238 100644 --- a/data/maps/OldaleTown_House1/map.json +++ b/data/maps/OldaleTown_House1/map.json @@ -24,7 +24,7 @@ "movement_range_y": 1, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "OldaleTown_House1_EventScript_1FBE86", + "script": "OldaleTown_House1_EventScript_Woman", "flag": "0" } ], diff --git a/data/maps/OldaleTown_House1/scripts.inc b/data/maps/OldaleTown_House1/scripts.inc index 71010116ee..1cb5622efe 100644 --- a/data/maps/OldaleTown_House1/scripts.inc +++ b/data/maps/OldaleTown_House1/scripts.inc @@ -1,11 +1,11 @@ OldaleTown_House1_MapScripts:: @ 81FBE85 .byte 0 -OldaleTown_House1_EventScript_1FBE86:: @ 81FBE86 - msgbox OldaleTown_House1_Text_1FBE8F, MSGBOX_NPC +OldaleTown_House1_EventScript_Woman:: @ 81FBE86 + msgbox OldaleTown_House1_Text_LeftPokemonGoesOutFirst, MSGBOX_NPC end -OldaleTown_House1_Text_1FBE8F: @ 81FBE8F +OldaleTown_House1_Text_LeftPokemonGoesOutFirst: @ 81FBE8F .string "When a POKéMON battle starts, the one\n" .string "at the left of the list goes out first.\p" .string "So, when you get more POKéMON in your\n" diff --git a/data/maps/OldaleTown_House2/map.json b/data/maps/OldaleTown_House2/map.json index fbcf968e7e..754f98c498 100644 --- a/data/maps/OldaleTown_House2/map.json +++ b/data/maps/OldaleTown_House2/map.json @@ -24,7 +24,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "OldaleTown_House2_EventScript_1FBF5B", + "script": "OldaleTown_House2_EventScript_Woman", "flag": "0" }, { @@ -37,7 +37,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "OldaleTown_House2_EventScript_1FBF64", + "script": "OldaleTown_House2_EventScript_Man", "flag": "0" } ], diff --git a/data/maps/OldaleTown_House2/scripts.inc b/data/maps/OldaleTown_House2/scripts.inc index 74a9a06d31..3259e319c2 100644 --- a/data/maps/OldaleTown_House2/scripts.inc +++ b/data/maps/OldaleTown_House2/scripts.inc @@ -1,19 +1,19 @@ OldaleTown_House2_MapScripts:: @ 81FBF5A .byte 0 -OldaleTown_House2_EventScript_1FBF5B:: @ 81FBF5B - msgbox OldaleTown_House2_Text_1FBF6D, MSGBOX_NPC +OldaleTown_House2_EventScript_Woman:: @ 81FBF5B + msgbox OldaleTown_House2_Text_PokemonLevelUp, MSGBOX_NPC end -OldaleTown_House2_EventScript_1FBF64:: @ 81FBF64 - msgbox OldaleTown_House2_Text_1FBFB0, MSGBOX_NPC +OldaleTown_House2_EventScript_Man:: @ 81FBF64 + msgbox OldaleTown_House2_Text_YoullGoFurtherWithStrongPokemon, MSGBOX_NPC end -OldaleTown_House2_Text_1FBF6D: @ 81FBF6D +OldaleTown_House2_Text_PokemonLevelUp: @ 81FBF6D .string "When POKéMON battle, they eventually\n" .string "level up and become stronger.$" -OldaleTown_House2_Text_1FBFB0: @ 81FBFB0 +OldaleTown_House2_Text_YoullGoFurtherWithStrongPokemon: @ 81FBFB0 .string "If the POKéMON with you become\n" .string "stronger, you'll be able to go farther\l" .string "away from here.$" diff --git a/data/maps/OldaleTown_Mart/map.json b/data/maps/OldaleTown_Mart/map.json index 9f1f894ce3..a27fad4972 100644 --- a/data/maps/OldaleTown_Mart/map.json +++ b/data/maps/OldaleTown_Mart/map.json @@ -24,7 +24,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "OldaleTown_Mart_EventScript_1FC240", + "script": "OldaleTown_Mart_EventScript_Clerk", "flag": "0" }, { @@ -37,7 +37,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "OldaleTown_Mart_EventScript_1FC28A", + "script": "OldaleTown_Mart_EventScript_Woman", "flag": "0" }, { @@ -50,7 +50,7 @@ "movement_range_y": 1, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "OldaleTown_Mart_EventScript_1FC2A9", + "script": "OldaleTown_Mart_EventScript_Boy", "flag": "0" } ], diff --git a/data/maps/OldaleTown_Mart/scripts.inc b/data/maps/OldaleTown_Mart/scripts.inc index 38b978d450..33d26cbfb1 100644 --- a/data/maps/OldaleTown_Mart/scripts.inc +++ b/data/maps/OldaleTown_Mart/scripts.inc @@ -1,18 +1,18 @@ OldaleTown_Mart_MapScripts:: @ 81FC23F .byte 0 -OldaleTown_Mart_EventScript_1FC240:: @ 81FC240 +OldaleTown_Mart_EventScript_Clerk:: @ 81FC240 lock faceplayer message gText_HowMayIServeYou waitmessage - goto_if_set FLAG_ADVENTURE_STARTED, OldaleTown_Mart_EventScript_1FC26C - pokemart OldaleTown_Mart_Pokemart_1FC260 + goto_if_set FLAG_ADVENTURE_STARTED, OldaleTown_Mart_ExpandedItems + pokemart OldaleTown_Mart_Pokemart_Basic msgbox gText_PleaseComeAgain, MSGBOX_DEFAULT release end -OldaleTown_Mart_Pokemart_1FC260: @ 81FC260 +OldaleTown_Mart_Pokemart_Basic: @ 81FC260 .2byte ITEM_POTION .2byte ITEM_ANTIDOTE .2byte ITEM_PARALYZE_HEAL @@ -21,14 +21,14 @@ OldaleTown_Mart_Pokemart_1FC260: @ 81FC260 release end -OldaleTown_Mart_EventScript_1FC26C:: @ 81FC26C - pokemart OldaleTown_Mart_Pokemart_1FC27C +OldaleTown_Mart_ExpandedItems:: @ 81FC26C + pokemart OldaleTown_Mart_Pokemart_Expanded msgbox gText_PleaseComeAgain, MSGBOX_DEFAULT release end .align 2 -OldaleTown_Mart_Pokemart_1FC27C: @ 81FC27C +OldaleTown_Mart_Pokemart_Expanded: @ 81FC27C .2byte ITEM_POKE_BALL .2byte ITEM_POTION .2byte ITEM_ANTIDOTE @@ -38,32 +38,32 @@ OldaleTown_Mart_Pokemart_1FC27C: @ 81FC27C release end -OldaleTown_Mart_EventScript_1FC28A:: @ 81FC28A +OldaleTown_Mart_EventScript_Woman:: @ 81FC28A lock faceplayer - goto_if_set FLAG_ADVENTURE_STARTED, OldaleTown_Mart_EventScript_1FC29F - msgbox OldaleTown_Mart_Text_1FC2B2, MSGBOX_DEFAULT + goto_if_set FLAG_ADVENTURE_STARTED, OldaleTown_Mart_EventScript_PokeBallsInStock + msgbox OldaleTown_Mart_Text_PokeBallsAreSoldOut, MSGBOX_DEFAULT release end -OldaleTown_Mart_EventScript_1FC29F:: @ 81FC29F - msgbox OldaleTown_Mart_Text_1FC2F3, MSGBOX_DEFAULT +OldaleTown_Mart_EventScript_PokeBallsInStock:: @ 81FC29F + msgbox OldaleTown_Mart_Text_ImGoingToBuyPokeBalls, MSGBOX_DEFAULT release end -OldaleTown_Mart_EventScript_1FC2A9:: @ 81FC2A9 - msgbox OldaleTown_Mart_Text_1FC338, MSGBOX_NPC +OldaleTown_Mart_EventScript_Boy:: @ 81FC2A9 + msgbox OldaleTown_Mart_Text_RestoreHPWithPotion, MSGBOX_NPC end -OldaleTown_Mart_Text_1FC2B2: @ 81FC2B2 +OldaleTown_Mart_Text_PokeBallsAreSoldOut: @ 81FC2B2 .string "The clerk says they're all sold out.\n" .string "I can't buy any POKé BALLS.$" -OldaleTown_Mart_Text_1FC2F3: @ 81FC2F3 +OldaleTown_Mart_Text_ImGoingToBuyPokeBalls: @ 81FC2F3 .string "I'm going to buy a bunch of POKé BALLS\n" .string "and catch a bunch of POKéMON!$" -OldaleTown_Mart_Text_1FC338: @ 81FC338 +OldaleTown_Mart_Text_RestoreHPWithPotion: @ 81FC338 .string "If a POKéMON gets hurt and loses its HP\n" .string "and faints, it won't be able to battle.\p" .string "To prevent your POKéMON from fainting,\n" diff --git a/data/maps/OldaleTown_PokemonCenter_1F/map.json b/data/maps/OldaleTown_PokemonCenter_1F/map.json index 7c9ed89a00..2f92a004c5 100644 --- a/data/maps/OldaleTown_PokemonCenter_1F/map.json +++ b/data/maps/OldaleTown_PokemonCenter_1F/map.json @@ -24,7 +24,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "OldaleTown_PokemonCenter_1F_EventScript_1FC01A", + "script": "OldaleTown_PokemonCenter_1F_EventScript_Nurse", "flag": "0" }, { @@ -37,7 +37,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "OldaleTown_PokemonCenter_1F_EventScript_1FC028", + "script": "OldaleTown_PokemonCenter_1F_EventScript_Gentleman", "flag": "0" }, { @@ -50,7 +50,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "OldaleTown_PokemonCenter_1F_EventScript_1FC031", + "script": "OldaleTown_PokemonCenter_1F_EventScript_Boy", "flag": "0" }, { @@ -63,7 +63,7 @@ "movement_range_y": 1, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "OldaleTown_PokemonCenter_1F_EventScript_1FC03A", + "script": "OldaleTown_PokemonCenter_1F_EventScript_Girl", "flag": "0" } ], diff --git a/data/maps/OldaleTown_PokemonCenter_1F/scripts.inc b/data/maps/OldaleTown_PokemonCenter_1F/scripts.inc index 9df202d09b..4e54cc8e4e 100644 --- a/data/maps/OldaleTown_PokemonCenter_1F/scripts.inc +++ b/data/maps/OldaleTown_PokemonCenter_1F/scripts.inc @@ -8,7 +8,7 @@ OldaleTown_PokemonCenter_1F_OnTransition: @ 81FC011 call Common_EventScript_UpdateBrineyLocation end -OldaleTown_PokemonCenter_1F_EventScript_1FC01A:: @ 81FC01A +OldaleTown_PokemonCenter_1F_EventScript_Nurse:: @ 81FC01A setvar VAR_0x800B, 1 call Common_EventScript_PkmnCenterNurse waitmessage @@ -16,46 +16,46 @@ OldaleTown_PokemonCenter_1F_EventScript_1FC01A:: @ 81FC01A release end -OldaleTown_PokemonCenter_1F_EventScript_1FC028:: @ 81FC028 - msgbox OldaleTown_PokemonCenter_1F_Text_1FC059, MSGBOX_NPC +OldaleTown_PokemonCenter_1F_EventScript_Gentleman:: @ 81FC028 + msgbox OldaleTown_PokemonCenter_1F_Text_TrainersCanUsePC, MSGBOX_NPC end -OldaleTown_PokemonCenter_1F_EventScript_1FC031:: @ 81FC031 - msgbox OldaleTown_PokemonCenter_1F_Text_1FC0CD, MSGBOX_NPC +OldaleTown_PokemonCenter_1F_EventScript_Boy:: @ 81FC031 + msgbox OldaleTown_PokemonCenter_1F_Text_PokemonCentersAreGreat, MSGBOX_NPC end -OldaleTown_PokemonCenter_1F_EventScript_1FC03A:: @ 81FC03A +OldaleTown_PokemonCenter_1F_EventScript_Girl:: @ 81FC03A lock faceplayer - goto_if_set FLAG_SYS_POKEDEX_GET, OldaleTown_PokemonCenter_1F_EventScript_1FC04F - msgbox OldaleTown_PokemonCenter_1F_Text_1FC148, MSGBOX_DEFAULT + goto_if_set FLAG_SYS_POKEDEX_GET, OldaleTown_PokemonCenter_1F_EventScript_WirelessClubAvailable + msgbox OldaleTown_PokemonCenter_1F_Text_WirelessClubNotAvailable, MSGBOX_DEFAULT release end -OldaleTown_PokemonCenter_1F_EventScript_1FC04F:: @ 81FC04F - msgbox OldaleTown_PokemonCenter_1F_Text_1FC1B9, MSGBOX_DEFAULT +OldaleTown_PokemonCenter_1F_EventScript_WirelessClubAvailable:: @ 81FC04F + msgbox OldaleTown_PokemonCenter_1F_Text_TradedInWirelessClub, MSGBOX_DEFAULT release end -OldaleTown_PokemonCenter_1F_Text_1FC059: @ 81FC059 +OldaleTown_PokemonCenter_1F_Text_TrainersCanUsePC: @ 81FC059 .string "That PC in the corner there is\n" .string "for any POKéMON TRAINER to use.\p" .string "Naturally, that means you're welcome\n" .string "to use it, too.$" -OldaleTown_PokemonCenter_1F_Text_1FC0CD: @ 81FC0CD +OldaleTown_PokemonCenter_1F_Text_PokemonCentersAreGreat: @ 81FC0CD .string "POKéMON CENTERS are great!\p" .string "You can use their services as much\n" .string "as you like, and it's all for free.\l" .string "You never have to worry!$" -OldaleTown_PokemonCenter_1F_Text_1FC148: @ 81FC148 +OldaleTown_PokemonCenter_1F_Text_WirelessClubNotAvailable: @ 81FC148 .string "The POKéMON WIRELESS CLUB on\n" .string "the second floor was built recently.\p" .string "But they say they're still making\n" .string "adjustments.$" -OldaleTown_PokemonCenter_1F_Text_1FC1B9: @ 81FC1B9 +OldaleTown_PokemonCenter_1F_Text_TradedInWirelessClub: @ 81FC1B9 .string "The POKéMON WIRELESS CLUB on\n" .string "the second floor was built recently.\p" .string "I traded POKéMON right away.$" From 973e6f9667ece0c6ceb3d7718ddc65eac9ef1a65 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Sun, 20 Oct 2019 16:11:07 -0400 Subject: [PATCH 13/46] Document mauville_man.inc --- data/event_scripts.s | 1 + .../MauvilleCity_PokemonCenter_1F/map.json | 2 +- data/scripts/mauville_man.inc | 580 +++++++++--------- data/text/mauville_man.inc | 1 + include/constants/easy_chat.h | 1 + include/constants/global.h | 4 + include/constants/mauville_man.h | 10 - include/constants/mauville_old_man.h | 12 + include/easy_chat.h | 4 +- include/event_scripts.h | 218 +++---- include/global.h | 20 +- include/mauville_old_man.h | 10 - .../event_object_graphics_info_pointers.h | 14 +- src/easy_chat.c | 54 +- src/event_object_movement.c | 1 + src/mauville_old_man.c | 328 +++++++--- src/mystery_event_script.c | 2 +- src/record_mixing.c | 2 +- src/trader.c | 8 +- 19 files changed, 731 insertions(+), 541 deletions(-) delete mode 100644 include/constants/mauville_man.h create mode 100644 include/constants/mauville_old_man.h diff --git a/data/event_scripts.s b/data/event_scripts.s index 62489d1fbd..79dfb5a0dd 100644 --- a/data/event_scripts.s +++ b/data/event_scripts.s @@ -25,6 +25,7 @@ #include "constants/lilycove_lady.h" #include "constants/map_scripts.h" #include "constants/maps.h" +#include "constants/mauville_old_man.h" #include "constants/metatile_labels.h" #include "constants/moves.h" #include "constants/party_menu.h" diff --git a/data/maps/MauvilleCity_PokemonCenter_1F/map.json b/data/maps/MauvilleCity_PokemonCenter_1F/map.json index c024c2cba5..c5fd1b32f1 100644 --- a/data/maps/MauvilleCity_PokemonCenter_1F/map.json +++ b/data/maps/MauvilleCity_PokemonCenter_1F/map.json @@ -37,7 +37,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "MauvilleCity_PokemonCenter_1F_EventScript_28E066", + "script": "MauvilleCity_PokemonCenter_1F_EventScript_MauvilleOldMan", "flag": "0" }, { diff --git a/data/scripts/mauville_man.inc b/data/scripts/mauville_man.inc index 0ab47ea80a..deeec77215 100644 --- a/data/scripts/mauville_man.inc +++ b/data/scripts/mauville_man.inc @@ -1,273 +1,277 @@ -MauvilleCity_PokemonCenter_1F_EventScript_28E066:: @ 828E066 +MauvilleCity_PokemonCenter_1F_EventScript_MauvilleOldMan:: @ 828E066 special ScrSpecial_GetCurrentMauvilleMan switch VAR_RESULT - case 0, MauvilleCity_PokemonCenter_1F_EventScript_28E0A6 - case 1, MauvilleCity_PokemonCenter_1F_EventScript_28E167 - case 2, MauvilleCity_PokemonCenter_1F_EventScript_28E4D4 - case 3, MauvilleCity_PokemonCenter_1F_EventScript_29014A - case 4, MauvilleCity_PokemonCenter_1F_EventScript_2902F6 + case MAUVILLE_MAN_BARD, MauvilleCity_PokemonCenter_1F_EventScript_Bard + case MAUVILLE_MAN_HIPSTER, MauvilleCity_PokemonCenter_1F_EventScript_Hipster + case MAUVILLE_MAN_TRADER, MauvilleCity_PokemonCenter_1F_EventScript_Trader + case MAUVILLE_MAN_STORYTELLER, MauvilleCity_PokemonCenter_1F_EventScript_Storyteller + case MAUVILLE_MAN_GIDDY, MauvilleCity_PokemonCenter_1F_EventScript_Giddy end -MauvilleCity_PokemonCenter_1F_EventScript_28E0A6:: @ 828E0A6 +@ Bard +MauvilleCity_PokemonCenter_1F_EventScript_Bard:: @ 828E0A6 lock faceplayer - msgbox MauvilleCity_PokemonCenter_1F_Text_29038E, MSGBOX_YESNO + msgbox MauvilleCity_PokemonCenter_1F_Text_WouldYouLikeToHearMySong, MSGBOX_YESNO compare VAR_RESULT, 1 - goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_28E0C7 + goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_PlaySong compare VAR_RESULT, 0 - goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_28E0EA + goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_DeclineSong end -MauvilleCity_PokemonCenter_1F_EventScript_28E0C7:: @ 828E0C7 +MauvilleCity_PokemonCenter_1F_EventScript_PlaySong:: @ 828E0C7 setvar VAR_0x8004, 0 special ScrSpecial_PlayBardSong delay 60 special ScrSpecial_HasBardSongBeenChanged - compare VAR_RESULT, 0 - goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_28E0F4 - msgbox MauvilleCity_PokemonCenter_1F_Text_2903E6, MSGBOX_DEFAULT + compare VAR_RESULT, FALSE + goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_AskToWriteLyrics + msgbox MauvilleCity_PokemonCenter_1F_Text_WishICouldPlaySongForOthers, MSGBOX_DEFAULT release end -MauvilleCity_PokemonCenter_1F_EventScript_28E0EA:: @ 828E0EA - msgbox MauvilleCity_PokemonCenter_1F_Text_2903C0, MSGBOX_DEFAULT +MauvilleCity_PokemonCenter_1F_EventScript_DeclineSong:: @ 828E0EA + msgbox MauvilleCity_PokemonCenter_1F_Text_BardFeelingTheBlues1, MSGBOX_DEFAULT release end -MauvilleCity_PokemonCenter_1F_EventScript_28E0F4:: @ 828E0F4 - msgbox MauvilleCity_PokemonCenter_1F_Text_290421, MSGBOX_YESNO +MauvilleCity_PokemonCenter_1F_EventScript_AskToWriteLyrics:: @ 828E0F4 + msgbox MauvilleCity_PokemonCenter_1F_Text_WouldYouLikeToWriteSomeLyrics, MSGBOX_YESNO compare VAR_RESULT, 1 - goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_28E113 + goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_WriteLyrics compare VAR_RESULT, 0 - goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_28E15D + goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_DeclineWritingLyrics end -MauvilleCity_PokemonCenter_1F_EventScript_28E113:: @ 828E113 +MauvilleCity_PokemonCenter_1F_EventScript_WriteLyrics:: @ 828E113 setvar VAR_0x8004, EASY_CHAT_TYPE_BARD_SONG call Common_ShowEasyChatScreen lock faceplayer compare VAR_RESULT, 0 - goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_28E15D - msgbox MauvilleCity_PokemonCenter_1F_Text_2904C1, MSGBOX_DEFAULT + goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_DeclineWritingLyrics + msgbox MauvilleCity_PokemonCenter_1F_Text_LetMeSingItForYou, MSGBOX_DEFAULT setvar VAR_0x8004, 1 special ScrSpecial_PlayBardSong delay 60 - msgbox MauvilleCity_PokemonCenter_1F_Text_2904EB, MSGBOX_YESNO + msgbox MauvilleCity_PokemonCenter_1F_Text_ThatHowYouWantedSongToGo, MSGBOX_YESNO compare VAR_RESULT, 0 - goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_28E113 + goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_WriteLyrics special ScrSpecial_SaveBardSongLyrics - msgbox MauvilleCity_PokemonCenter_1F_Text_290514, MSGBOX_DEFAULT + msgbox MauvilleCity_PokemonCenter_1F_Text_IllSingThisSongForAWhile, MSGBOX_DEFAULT release end -MauvilleCity_PokemonCenter_1F_EventScript_28E15D:: @ 828E15D - msgbox MauvilleCity_PokemonCenter_1F_Text_29049B, MSGBOX_DEFAULT +MauvilleCity_PokemonCenter_1F_EventScript_DeclineWritingLyrics:: @ 828E15D + msgbox MauvilleCity_PokemonCenter_1F_Text_BardFeelingTheBlues2, MSGBOX_DEFAULT release end -MauvilleCity_PokemonCenter_1F_EventScript_28E167:: @ 828E167 +@ Hipster +MauvilleCity_PokemonCenter_1F_EventScript_Hipster:: @ 828E167 lock faceplayer setflag FLAG_SYS_HIPSTER_MEET - msgbox MauvilleCity_PokemonCenter_1F_Text_29054C, MSGBOX_DEFAULT + msgbox MauvilleCity_PokemonCenter_1F_Text_TeachWhatsHipAndHappening, MSGBOX_DEFAULT special ScrSpecial_GetHipsterSpokenFlag - compare VAR_RESULT, 0 - goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_28E18C - msgbox MauvilleCity_PokemonCenter_1F_Text_290598, MSGBOX_DEFAULT + compare VAR_RESULT, FALSE + goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_TryTeachWord + msgbox MauvilleCity_PokemonCenter_1F_Text_IAlreadyTaughtYou, MSGBOX_DEFAULT release end -MauvilleCity_PokemonCenter_1F_EventScript_28E18C:: @ 828E18C +MauvilleCity_PokemonCenter_1F_EventScript_TryTeachWord:: @ 828E18C special ScrSpecial_HipsterTeachWord - compare VAR_RESULT, 1 - goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_28E1A4 - msgbox MauvilleCity_PokemonCenter_1F_Text_290602, MSGBOX_DEFAULT + compare VAR_RESULT, TRUE + goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_TeachWord + msgbox MauvilleCity_PokemonCenter_1F_Text_IveGotNothingNewToTeach, MSGBOX_DEFAULT release end -MauvilleCity_PokemonCenter_1F_EventScript_28E1A4:: @ 828E1A4 - msgbox MauvilleCity_PokemonCenter_1F_Text_290666, MSGBOX_DEFAULT +MauvilleCity_PokemonCenter_1F_EventScript_TeachWord:: @ 828E1A4 + msgbox MauvilleCity_PokemonCenter_1F_Text_HaveYouHeardOfPhrase, MSGBOX_DEFAULT special ScrSpecial_SetHipsterSpokenFlag release end -MauvilleCity_PokemonCenter_1F_Text_28E1B1: @ 828E1B1 +@ Trader +MauvilleCity_PokemonCenter_1F_Text_WantToTradeDecor: @ 828E1B1 .string "Hi, I'm the TRADER.\n" .string "Want to trade decorations with me?$" -MauvilleCity_PokemonCenter_1F_Text_28E1E8: @ 828E1E8 +MauvilleCity_PokemonCenter_1F_Text_TraderFeelingTheBlues: @ 828E1E8 .string "Oh…\n" .string "You've left me feeling the blues…$" -MauvilleCity_PokemonCenter_1F_Text_28E20E: @ 828E20E +MauvilleCity_PokemonCenter_1F_Text_WeveAlreadyTraded: @ 828E20E .string "But we've traded decorations already,\n" .string "you and I.$" -MauvilleCity_PokemonCenter_1F_Text_28E23F: @ 828E23F +MauvilleCity_PokemonCenter_1F_Text_PickADecorItem: @ 828E23F .string "If you see any decorative item that\n" .string "you want of mine, speak up.$" -MauvilleCity_PokemonCenter_1F_Text_28E27F: @ 828E27F +MauvilleCity_PokemonCenter_1F_Text_YouDontWantAnything: @ 828E27F .string "You don't want anything?\n" .string "I feel unwanted…$" -MauvilleCity_PokemonCenter_1F_Text_28E2A9: @ 828E2A9 +MauvilleCity_PokemonCenter_1F_Text_OnceBelongedToPlayerDoYouWantIt: @ 828E2A9 .string "That decorative item once belonged\n" .string "to {STR_VAR_1}.\p" .string "Do you want it?$" -MauvilleCity_PokemonCenter_1F_Text_28E2E3: @ 828E2E3 +MauvilleCity_PokemonCenter_1F_Text_YouDontHaveAnyDecor: @ 828E2E3 .string "Uh… Wait a second. You don't have a\n" .string "single piece of decoration!$" -MauvilleCity_PokemonCenter_1F_Text_28E323: @ 828E323 +MauvilleCity_PokemonCenter_1F_Text_PickTheDecorToTrade: @ 828E323 .string "Okay, pick the decoration that you'll\n" .string "trade to me.$" -MauvilleCity_PokemonCenter_1F_Text_28E356: @ 828E356 +MauvilleCity_PokemonCenter_1F_Text_YouDontWantToTrade: @ 828E356 .string "You won't trade with me?\n" .string "I feel unwanted…$" -MauvilleCity_PokemonCenter_1F_Text_28E380: @ 828E380 +MauvilleCity_PokemonCenter_1F_Text_YouveNoRoomForThis: @ 828E380 .string "You've got all the {STR_VAR_2}S that can\n" .string "be stored. You've no room for this.$" -MauvilleCity_PokemonCenter_1F_Text_28E3C4: @ 828E3C4 +MauvilleCity_PokemonCenter_1F_Text_SoWellTradeTheseDecor: @ 828E3C4 .string "Okay, so we'll trade my {STR_VAR_3}\n" .string "for your {STR_VAR_2}?$" -MauvilleCity_PokemonCenter_1F_Text_28E3EC: @ 828E3EC +MauvilleCity_PokemonCenter_1F_Text_ThatDecorIsInUse: @ 828E3EC .string "That piece of decoration is in use.\n" .string "You can't trade it.$" -MauvilleCity_PokemonCenter_1F_Text_28E424: @ 828E424 +MauvilleCity_PokemonCenter_1F_Text_SendDecorToYourPC: @ 828E424 .string "Then we'll trade!\n" .string "I'll send my decoration to your PC.$" -MauvilleCity_PokemonCenter_1F_Text_28E45A: @ 828E45A +MauvilleCity_PokemonCenter_1F_Text_CantTradeThatOne: @ 828E45A .string "Oops! Sorry! That's a really rare\n" .string "piece of decoration.\l" .string "I can't trade that one away!\p" .string "Can I interest you in something else?$" -MauvilleCity_PokemonCenter_1F_EventScript_28E4D4:: @ 828E4D4 +MauvilleCity_PokemonCenter_1F_EventScript_Trader:: @ 828E4D4 lock faceplayer - msgbox MauvilleCity_PokemonCenter_1F_Text_28E1B1, MSGBOX_YESNO + msgbox MauvilleCity_PokemonCenter_1F_Text_WantToTradeDecor, MSGBOX_YESNO compare VAR_RESULT, 0 - goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_28E503 + goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_DeclineTrade special ScrSpecial_GetTraderTradedFlag - compare VAR_RESULT, 1 - goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_28E50D - message MauvilleCity_PokemonCenter_1F_Text_28E23F + compare VAR_RESULT, TRUE + goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_AlreadyTraded + message MauvilleCity_PokemonCenter_1F_Text_PickADecorItem waitmessage - goto MauvilleCity_PokemonCenter_1F_EventScript_28E517 + goto MauvilleCity_PokemonCenter_1F_EventScript_PickDecorToReceive end -MauvilleCity_PokemonCenter_1F_EventScript_28E503:: @ 828E503 - msgbox MauvilleCity_PokemonCenter_1F_Text_28E1E8, MSGBOX_DEFAULT +MauvilleCity_PokemonCenter_1F_EventScript_DeclineTrade:: @ 828E503 + msgbox MauvilleCity_PokemonCenter_1F_Text_TraderFeelingTheBlues, MSGBOX_DEFAULT release end -MauvilleCity_PokemonCenter_1F_EventScript_28E50D:: @ 828E50D - msgbox MauvilleCity_PokemonCenter_1F_Text_28E20E, MSGBOX_DEFAULT +MauvilleCity_PokemonCenter_1F_EventScript_AlreadyTraded:: @ 828E50D + msgbox MauvilleCity_PokemonCenter_1F_Text_WeveAlreadyTraded, MSGBOX_DEFAULT release end -MauvilleCity_PokemonCenter_1F_EventScript_28E517:: @ 828E517 +MauvilleCity_PokemonCenter_1F_EventScript_PickDecorToReceive:: @ 828E517 special ScrSpecial_TraderMenuGetDecoration waitstate compare VAR_0x8004, 0 - goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_28E558 - compare VAR_0x8004, 65535 - goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_28E562 - msgbox MauvilleCity_PokemonCenter_1F_Text_28E2A9, MSGBOX_YESNO + goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_CancelPickDecor + compare VAR_0x8004, 0xFFFF + goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_InvalidDecor + msgbox MauvilleCity_PokemonCenter_1F_Text_OnceBelongedToPlayerDoYouWantIt, MSGBOX_YESNO compare VAR_RESULT, 0 - goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_28E56E + goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_PickDifferentDecor special ScrSpecial_DoesPlayerHaveNoDecorations - compare VAR_RESULT, 1 - goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_28E57A - goto MauvilleCity_PokemonCenter_1F_EventScript_28E584 + compare VAR_RESULT, TRUE + goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_DontHaveAnyDecor + goto MauvilleCity_PokemonCenter_1F_EventScript_PickDecorToGive end -MauvilleCity_PokemonCenter_1F_EventScript_28E558:: @ 828E558 - msgbox MauvilleCity_PokemonCenter_1F_Text_28E27F, MSGBOX_DEFAULT +MauvilleCity_PokemonCenter_1F_EventScript_CancelPickDecor:: @ 828E558 + msgbox MauvilleCity_PokemonCenter_1F_Text_YouDontWantAnything, MSGBOX_DEFAULT release end -MauvilleCity_PokemonCenter_1F_EventScript_28E562:: @ 828E562 - message MauvilleCity_PokemonCenter_1F_Text_28E45A +MauvilleCity_PokemonCenter_1F_EventScript_InvalidDecor:: @ 828E562 + message MauvilleCity_PokemonCenter_1F_Text_CantTradeThatOne waitmessage - goto MauvilleCity_PokemonCenter_1F_EventScript_28E517 + goto MauvilleCity_PokemonCenter_1F_EventScript_PickDecorToReceive end -MauvilleCity_PokemonCenter_1F_EventScript_28E56E:: @ 828E56E - message MauvilleCity_PokemonCenter_1F_Text_28E23F +MauvilleCity_PokemonCenter_1F_EventScript_PickDifferentDecor:: @ 828E56E + message MauvilleCity_PokemonCenter_1F_Text_PickADecorItem waitmessage - goto MauvilleCity_PokemonCenter_1F_EventScript_28E517 + goto MauvilleCity_PokemonCenter_1F_EventScript_PickDecorToReceive end -MauvilleCity_PokemonCenter_1F_EventScript_28E57A:: @ 828E57A - msgbox MauvilleCity_PokemonCenter_1F_Text_28E2E3, MSGBOX_DEFAULT +MauvilleCity_PokemonCenter_1F_EventScript_DontHaveAnyDecor:: @ 828E57A + msgbox MauvilleCity_PokemonCenter_1F_Text_YouDontHaveAnyDecor, MSGBOX_DEFAULT release end -MauvilleCity_PokemonCenter_1F_EventScript_28E584:: @ 828E584 - msgbox MauvilleCity_PokemonCenter_1F_Text_28E323, MSGBOX_DEFAULT +MauvilleCity_PokemonCenter_1F_EventScript_PickDecorToGive:: @ 828E584 + msgbox MauvilleCity_PokemonCenter_1F_Text_PickTheDecorToTrade, MSGBOX_DEFAULT special ScrSpecial_TraderMenuGiveDecoration waitstate compare VAR_0x8006, 0 - goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_28E5D4 - compare VAR_0x8006, 65535 - goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_28E5DE + goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_CancelGiveDecor + compare VAR_0x8006, 0xFFFF + goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_DecorInUse special ScrSpecial_IsDecorationFull - compare VAR_RESULT, 1 - goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_28E5EC - msgbox MauvilleCity_PokemonCenter_1F_Text_28E3C4, MSGBOX_YESNO + compare VAR_RESULT, TRUE + goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_NoRoomForDecor + msgbox MauvilleCity_PokemonCenter_1F_Text_SoWellTradeTheseDecor, MSGBOX_YESNO compare VAR_RESULT, 0 - goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_28E584 + goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_PickDecorToGive special ScrSpecial_TraderDoDecorationTrade - msgbox MauvilleCity_PokemonCenter_1F_Text_28E424, MSGBOX_DEFAULT + msgbox MauvilleCity_PokemonCenter_1F_Text_SendDecorToYourPC, MSGBOX_DEFAULT release end -MauvilleCity_PokemonCenter_1F_EventScript_28E5D4:: @ 828E5D4 - msgbox MauvilleCity_PokemonCenter_1F_Text_28E356, MSGBOX_DEFAULT +MauvilleCity_PokemonCenter_1F_EventScript_CancelGiveDecor:: @ 828E5D4 + msgbox MauvilleCity_PokemonCenter_1F_Text_YouDontWantToTrade, MSGBOX_DEFAULT release end -MauvilleCity_PokemonCenter_1F_EventScript_28E5DE:: @ 828E5DE - msgbox MauvilleCity_PokemonCenter_1F_Text_28E3EC, MSGBOX_DEFAULT - goto MauvilleCity_PokemonCenter_1F_EventScript_28E584 +MauvilleCity_PokemonCenter_1F_EventScript_DecorInUse:: @ 828E5DE + msgbox MauvilleCity_PokemonCenter_1F_Text_ThatDecorIsInUse, MSGBOX_DEFAULT + goto MauvilleCity_PokemonCenter_1F_EventScript_PickDecorToGive end -MauvilleCity_PokemonCenter_1F_EventScript_28E5EC:: @ 828E5EC - msgbox MauvilleCity_PokemonCenter_1F_Text_28E380, MSGBOX_DEFAULT +MauvilleCity_PokemonCenter_1F_EventScript_NoRoomForDecor:: @ 828E5EC + msgbox MauvilleCity_PokemonCenter_1F_Text_YouveNoRoomForThis, MSGBOX_DEFAULT release end -MauvilleCity_PokemonCenter_1F_Text_28E5F6: @ 828E5F6 +@ Storyteller +MauvilleCity_PokemonCenter_1F_Text_WillYouHearMyTale: @ 828E5F6 .string "I'm the STORYTELLER.\n" .string "I'll tell you tales of legendary\l" .string "TRAINERS.\p" .string "Will you hear my tale?$" -MauvilleCity_PokemonCenter_1F_Text_28E64D: @ 828E64D +MauvilleCity_PokemonCenter_1F_Text_StorytellerFeelingTheBlues: @ 828E64D .string "Oh…\n" .string "You've left me feeling the blues…$" -MauvilleCity_PokemonCenter_1F_Text_28E673: @ 828E673 +MauvilleCity_PokemonCenter_1F_Text_WhichTaleToTell: @ 828E673 .string "I know of these legends.\n" .string "Which tale will you have me tell?$" -MauvilleCity_PokemonCenter_1F_Text_28E6AE: @ 828E6AE +MauvilleCity_PokemonCenter_1F_Text_IKnowNoTales: @ 828E6AE .string "But, I know of no legendary TRAINERS.\n" .string "Hence, I know no tales.\p" .string "Where does one find a TRAINER worthy\n" .string "of a legendary tale?$" -MauvilleCity_PokemonCenter_1F_Text_28E726: @ 828E726 +MauvilleCity_PokemonCenter_1F_Text_YouDidStatXTimes: @ 828E726 .string "What's that?!\n" .string "You… You…\p" .string "{STR_VAR_2}\n" @@ -275,12 +279,12 @@ MauvilleCity_PokemonCenter_1F_Text_28E726: @ 828E726 .string "That is indeed magnificent!\n" .string "It's the birth of a new legend!$" -MauvilleCity_PokemonCenter_1F_Text_28E78A: @ 828E78A +MauvilleCity_PokemonCenter_1F_Text_CouldThereBeOtherLegends: @ 828E78A .string "It gets me thinking, could there be\n" .string "other TRAINERS with more impressive\l" .string "legends awaiting discovery?$" -MauvilleCity_PokemonCenter_1F_Text_28E7EE: @ 828E7EE +MauvilleCity_PokemonCenter_1F_Text_HaveYouAnyLegendaryTales: @ 828E7EE .string "Are you a TRAINER?\p" .string "Then tell me, have you any tales that\n" .string "are even remotely legendary?$" @@ -289,24 +293,24 @@ MauvilleCity_PokemonCenter_1F_Text_28E844: @ 828E844 .string "Incidentally… Would you care to hear\n" .string "another legendary tale?$" -MauvilleCity_PokemonCenter_1F_Text_28E881: @ 828E881 +MauvilleCity_PokemonCenter_1F_Text_NotWorthyOfLegend: @ 828E881 .string "Hmm…\n" .string "I'm not satisfied…\p" .string "I wish you would bring me news worthy\n" .string "of being called a legend.$" -MauvilleCity_PokemonCenter_1F_Text_28E8D9: @ 828E8D9 +MauvilleCity_PokemonCenter_1F_Text_IWishMorePeopleWereInterested: @ 828E8D9 .string "I wish more people would be interested\n" .string "in hearing my epic tales of legendary\l" .string "TRAINERS.$" -MauvilleCity_PokemonCenter_1F_Text_28E930:: @ 828E930 +MauvilleCity_PokemonCenter_1F_Text_SavedGameTitle:: @ 828E930 .string "The Save-Happy TRAINER$" -MauvilleCity_PokemonCenter_1F_Text_28E947:: @ 828E947 +MauvilleCity_PokemonCenter_1F_Text_SavedGameAction:: @ 828E947 .string "Saved the game$" -MauvilleCity_PokemonCenter_1F_Text_28E956:: @ 828E956 +MauvilleCity_PokemonCenter_1F_Text_SavedGameStory:: @ 828E956 .string "This is a tale of a TRAINER\n" .string "named {STR_VAR_3}.\p" .string "This TRAINER saved the game\n" @@ -314,13 +318,13 @@ MauvilleCity_PokemonCenter_1F_Text_28E956:: @ 828E956 .string "A more cautious TRAINER than\n" .string "{STR_VAR_3} one will never find!$" -MauvilleCity_PokemonCenter_1F_Text_28E9D7:: @ 828E9D7 +MauvilleCity_PokemonCenter_1F_Text_TrendsStartedTitle:: @ 828E9D7 .string "The Trendsetter TRAINER$" -MauvilleCity_PokemonCenter_1F_Text_28E9EF:: @ 828E9EF +MauvilleCity_PokemonCenter_1F_Text_TrendsStartedAction:: @ 828E9EF .string "Started trends$" -MauvilleCity_PokemonCenter_1F_Text_28E9FE:: @ 828E9FE +MauvilleCity_PokemonCenter_1F_Text_TrendsStartedStory:: @ 828E9FE .string "This is a tale of a TRAINER\n" .string "named {STR_VAR_3}.\p" .string "This TRAINER started new trends\n" @@ -328,13 +332,13 @@ MauvilleCity_PokemonCenter_1F_Text_28E9FE:: @ 828E9FE .string "{STR_VAR_3} is setting trends for all\n" .string "the HOENN region!$" -MauvilleCity_PokemonCenter_1F_Text_28EA7D:: @ 828EA7D +MauvilleCity_PokemonCenter_1F_Text_BerriesPlantedTitle:: @ 828EA7D .string "The BERRY-Planting TRAINER$" -MauvilleCity_PokemonCenter_1F_Text_28EA98:: @ 828EA98 +MauvilleCity_PokemonCenter_1F_Text_BerriesPlantedAction:: @ 828EA98 .string "Planted BERRIES$" -MauvilleCity_PokemonCenter_1F_Text_28EAA8:: @ 828EAA8 +MauvilleCity_PokemonCenter_1F_Text_BerriesPlantedStory:: @ 828EAA8 .string "This is a tale of a TRAINER\n" .string "named {STR_VAR_3}.\p" .string "This TRAINER planted BERRIES\n" @@ -342,13 +346,13 @@ MauvilleCity_PokemonCenter_1F_Text_28EAA8:: @ 828EAA8 .string "{STR_VAR_3} is a legendary lover of\n" .string "BERRIES!$" -MauvilleCity_PokemonCenter_1F_Text_28EB19:: @ 828EB19 +MauvilleCity_PokemonCenter_1F_Text_BikeTradesTitle:: @ 828EB19 .string "The BIKE-Loving TRAINER$" -MauvilleCity_PokemonCenter_1F_Text_28EB31:: @ 828EB31 +MauvilleCity_PokemonCenter_1F_Text_BikeTradesAction:: @ 828EB31 .string "Traded BIKES$" -MauvilleCity_PokemonCenter_1F_Text_28EB3E:: @ 828EB3E +MauvilleCity_PokemonCenter_1F_Text_BikeTradesStory:: @ 828EB3E .string "This is a tale of a TRAINER\n" .string "named {STR_VAR_3}.\p" .string "This TRAINER swapped BIKES\n" @@ -356,13 +360,13 @@ MauvilleCity_PokemonCenter_1F_Text_28EB3E:: @ 828EB3E .string "{STR_VAR_3} must love BIKES deeply\n" .string "and passionately!$" -MauvilleCity_PokemonCenter_1F_Text_28EBB5:: @ 828EBB5 +MauvilleCity_PokemonCenter_1F_Text_InterviewsTitle:: @ 828EBB5 .string "The Interviewed TRAINER$" -MauvilleCity_PokemonCenter_1F_Text_28EBCD:: @ 828EBCD +MauvilleCity_PokemonCenter_1F_Text_InterviewsAction:: @ 828EBCD .string "Got interviewed$" -MauvilleCity_PokemonCenter_1F_Text_28EBDD:: @ 828EBDD +MauvilleCity_PokemonCenter_1F_Text_InterviewsStory:: @ 828EBDD .string "This is a tale of a TRAINER\n" .string "named {STR_VAR_3}.\p" .string "This TRAINER got interviewed\n" @@ -370,26 +374,26 @@ MauvilleCity_PokemonCenter_1F_Text_28EBDD:: @ 828EBDD .string "{STR_VAR_3} must be a TRAINER who's\n" .string "attracting much attention!$" -MauvilleCity_PokemonCenter_1F_Text_28EC60:: @ 828EC60 +MauvilleCity_PokemonCenter_1F_Text_TrainerBattlesTitle:: @ 828EC60 .string "The Battle-Happy TRAINER$" -MauvilleCity_PokemonCenter_1F_Text_28EC79:: @ 828EC79 +MauvilleCity_PokemonCenter_1F_Text_TrainerBattlesAction:: @ 828EC79 .string "Battled$" -MauvilleCity_PokemonCenter_1F_Text_28EC81:: @ 828EC81 +MauvilleCity_PokemonCenter_1F_Text_TrainerBattlesStory:: @ 828EC81 .string "This is a tale of a TRAINER\n" .string "named {STR_VAR_3}.\p" .string "This TRAINER battled {STR_VAR_1} times!\p" .string "{STR_VAR_3} must be a TRAINER who can\n" .string "never refuse a chance to battle!$" -MauvilleCity_PokemonCenter_1F_Text_28ED04:: @ 828ED04 +MauvilleCity_PokemonCenter_1F_Text_PokemonCaughtTitle:: @ 828ED04 .string "The POKéMON-Catching TRAINER$" -MauvilleCity_PokemonCenter_1F_Text_28ED21:: @ 828ED21 +MauvilleCity_PokemonCenter_1F_Text_PokemonCaughtAction:: @ 828ED21 .string "Caught POKéMON$" -MauvilleCity_PokemonCenter_1F_Text_28ED30:: @ 828ED30 +MauvilleCity_PokemonCenter_1F_Text_PokemonCaughtStory:: @ 828ED30 .string "This is a tale of a TRAINER\n" .string "named {STR_VAR_3}.\p" .string "This TRAINER caught\n" @@ -397,13 +401,13 @@ MauvilleCity_PokemonCenter_1F_Text_28ED30:: @ 828ED30 .string "{STR_VAR_3} is a legendary catcher of\n" .string "wild POKéMON!$" -MauvilleCity_PokemonCenter_1F_Text_28EDA1:: @ 828EDA1 +MauvilleCity_PokemonCenter_1F_Text_FishingPokemonCaughtTitle:: @ 828EDA1 .string "The Fishing TRAINER$" -MauvilleCity_PokemonCenter_1F_Text_28EDB5:: @ 828EDB5 +MauvilleCity_PokemonCenter_1F_Text_FishingPokemonCaughtAction:: @ 828EDB5 .string "Caught POKéMON with a ROD$" -MauvilleCity_PokemonCenter_1F_Text_28EDCF:: @ 828EDCF +MauvilleCity_PokemonCenter_1F_Text_FishingPokemonCaughtStory:: @ 828EDCF .string "This is a tale of a TRAINER\n" .string "named {STR_VAR_3}.\p" .string "This TRAINER caught\n" @@ -411,13 +415,13 @@ MauvilleCity_PokemonCenter_1F_Text_28EDCF:: @ 828EDCF .string "{STR_VAR_3} is a legendary fishing\n" .string "expert!$" -MauvilleCity_PokemonCenter_1F_Text_28EE45:: @ 828EE45 +MauvilleCity_PokemonCenter_1F_Text_EggsHatchedTitle:: @ 828EE45 .string "The EGG-Warming TRAINER$" -MauvilleCity_PokemonCenter_1F_Text_28EE5D:: @ 828EE5D +MauvilleCity_PokemonCenter_1F_Text_EggsHatchedAction:: @ 828EE5D .string "Hatched EGGS$" -MauvilleCity_PokemonCenter_1F_Text_28EE6A:: @ 828EE6A +MauvilleCity_PokemonCenter_1F_Text_EggsHatchedStory:: @ 828EE6A .string "This is a tale of a TRAINER\n" .string "named {STR_VAR_3}.\p" .string "This TRAINER hatched {STR_VAR_1} POKéMON\n" @@ -425,13 +429,13 @@ MauvilleCity_PokemonCenter_1F_Text_28EE6A:: @ 828EE6A .string "{STR_VAR_3} is a legendary warmer\n" .string "of EGGS!$" -MauvilleCity_PokemonCenter_1F_Text_28EEDD:: @ 828EEDD +MauvilleCity_PokemonCenter_1F_Text_PokemonEvolvedTitle:: @ 828EEDD .string "The Evolver TRAINER$" -MauvilleCity_PokemonCenter_1F_Text_28EEF1:: @ 828EEF1 +MauvilleCity_PokemonCenter_1F_Text_PokemonEvolvedAction:: @ 828EEF1 .string "Evolved POKéMON$" -MauvilleCity_PokemonCenter_1F_Text_28EF01:: @ 828EF01 +MauvilleCity_PokemonCenter_1F_Text_PokemonEvolvedStory:: @ 828EF01 .string "This is a tale of a TRAINER\n" .string "named {STR_VAR_3}.\p" .string "This TRAINER made {STR_VAR_1} POKéMON\n" @@ -439,13 +443,13 @@ MauvilleCity_PokemonCenter_1F_Text_28EF01:: @ 828EF01 .string "{STR_VAR_3} is the ultimate evolver\n" .string "of POKéMON!$" -MauvilleCity_PokemonCenter_1F_Text_28EF73:: @ 828EF73 +MauvilleCity_PokemonCenter_1F_Text_UsedPokemonCenterTitle:: @ 828EF73 .string "The POKéMON CENTER-Loving TRAINER$" -MauvilleCity_PokemonCenter_1F_Text_28EF95:: @ 828EF95 +MauvilleCity_PokemonCenter_1F_Text_UsedPokemonCenterAction:: @ 828EF95 .string "Used POKéMON CENTERS$" -MauvilleCity_PokemonCenter_1F_Text_28EFAA:: @ 828EFAA +MauvilleCity_PokemonCenter_1F_Text_UsedPokemonCenterStory:: @ 828EFAA .string "This is a tale of a TRAINER\n" .string "named {STR_VAR_3}.\p" .string "This TRAINER healed POKéMON\n" @@ -453,13 +457,13 @@ MauvilleCity_PokemonCenter_1F_Text_28EFAA:: @ 828EFAA .string "There could be no greater lover of\n" .string "POKéMON CENTERS than {STR_VAR_3}!$" -MauvilleCity_PokemonCenter_1F_Text_28F045:: @ 828F045 +MauvilleCity_PokemonCenter_1F_Text_RestedAtHomeTitle:: @ 828F045 .string "The Homebody TRAINER$" -MauvilleCity_PokemonCenter_1F_Text_28F05A:: @ 828F05A +MauvilleCity_PokemonCenter_1F_Text_RestedAtHomeAction:: @ 828F05A .string "Rested POKéMON at home$" -MauvilleCity_PokemonCenter_1F_Text_28F071:: @ 828F071 +MauvilleCity_PokemonCenter_1F_Text_RestedAtHomeStory:: @ 828F071 .string "This is a tale of a TRAINER\n" .string "named {STR_VAR_3}.\p" .string "This TRAINER healed POKéMON\n" @@ -467,13 +471,13 @@ MauvilleCity_PokemonCenter_1F_Text_28F071:: @ 828F071 .string "There could be no more of a homebody\n" .string "than {STR_VAR_3}!$" -MauvilleCity_PokemonCenter_1F_Text_28F0F3:: @ 828F0F3 +MauvilleCity_PokemonCenter_1F_Text_SafariGamesTitle:: @ 828F0F3 .string "The SAFARI-Loving TRAINER$" -MauvilleCity_PokemonCenter_1F_Text_28F10D:: @ 828F10D +MauvilleCity_PokemonCenter_1F_Text_SafariGamesAction:: @ 828F10D .string "Entered the SAFARI ZONE$" -MauvilleCity_PokemonCenter_1F_Text_28F125:: @ 828F125 +MauvilleCity_PokemonCenter_1F_Text_SafariGamesStory:: @ 828F125 .string "This is a tale of a TRAINER\n" .string "named {STR_VAR_3}.\p" .string "This TRAINER went into the SAFARI ZONE\n" @@ -481,13 +485,13 @@ MauvilleCity_PokemonCenter_1F_Text_28F125:: @ 828F125 .string "{STR_VAR_3} is a TRAINER whose wild side\n" .string "must come out in the SAFARI ZONE!$" -MauvilleCity_PokemonCenter_1F_Text_28F1BE:: @ 828F1BE +MauvilleCity_PokemonCenter_1F_Text_UsedCutTitle:: @ 828F1BE .string "The CUT-Frenzy TRAINER$" -MauvilleCity_PokemonCenter_1F_Text_28F1D5:: @ 828F1D5 +MauvilleCity_PokemonCenter_1F_Text_UsedCutAction:: @ 828F1D5 .string "Used CUT$" -MauvilleCity_PokemonCenter_1F_Text_28F1DE:: @ 828F1DE +MauvilleCity_PokemonCenter_1F_Text_UsedCutStory:: @ 828F1DE .string "This is a tale of a TRAINER\n" .string "named {STR_VAR_3}.\p" .string "This TRAINER used CUT\n" @@ -495,13 +499,13 @@ MauvilleCity_PokemonCenter_1F_Text_28F1DE:: @ 828F1DE .string "{STR_VAR_3} is a TRAINER who just must\n" .string "love to CUT!$" -MauvilleCity_PokemonCenter_1F_Text_28F24F:: @ 828F24F +MauvilleCity_PokemonCenter_1F_Text_UsedRockSmashTitle:: @ 828F24F .string "The ROCK-SMASHING TRAINER$" -MauvilleCity_PokemonCenter_1F_Text_28F269:: @ 828F269 +MauvilleCity_PokemonCenter_1F_Text_UsedRockSmashAction:: @ 828F269 .string "Smashed rocks$" -MauvilleCity_PokemonCenter_1F_Text_28F277:: @ 828F277 +MauvilleCity_PokemonCenter_1F_Text_UsedRockSmashStory:: @ 828F277 .string "This is a tale of a TRAINER\n" .string "named {STR_VAR_3}.\p" .string "This TRAINER used ROCK SMASH\n" @@ -509,13 +513,13 @@ MauvilleCity_PokemonCenter_1F_Text_28F277:: @ 828F277 .string "{STR_VAR_3} must be a TRAINER who\n" .string "can't leave a stone unsmashed!$" -MauvilleCity_PokemonCenter_1F_Text_28F2FC:: @ 828F2FC +MauvilleCity_PokemonCenter_1F_Text_MovedBasesTitle:: @ 828F2FC .string "The Move-Loving TRAINER$" -MauvilleCity_PokemonCenter_1F_Text_28F314:: @ 828F314 +MauvilleCity_PokemonCenter_1F_Text_MovedBasesAction:: @ 828F314 .string "Moved the SECRET BASE$" -MauvilleCity_PokemonCenter_1F_Text_28F32A:: @ 828F32A +MauvilleCity_PokemonCenter_1F_Text_MovedBasesStory:: @ 828F32A .string "This is a tale of a TRAINER\n" .string "named {STR_VAR_3}.\p" .string "This TRAINER moved the SECRET BASE\n" @@ -523,13 +527,13 @@ MauvilleCity_PokemonCenter_1F_Text_28F32A:: @ 828F32A .string "{STR_VAR_3} is a TRAINER who loves\n" .string "to move houses often!$" -MauvilleCity_PokemonCenter_1F_Text_28F3AD:: @ 828F3AD +MauvilleCity_PokemonCenter_1F_Text_UsedSplashTitle:: @ 828F3AD .string "The SPLASH-Happy TRAINER$" -MauvilleCity_PokemonCenter_1F_Text_28F3C6:: @ 828F3C6 +MauvilleCity_PokemonCenter_1F_Text_UsedSplashAction:: @ 828F3C6 .string "Used SPLASH$" -MauvilleCity_PokemonCenter_1F_Text_28F3D2:: @ 828F3D2 +MauvilleCity_PokemonCenter_1F_Text_UsedSplashStory:: @ 828F3D2 .string "This is a tale of a TRAINER\n" .string "named {STR_VAR_3}.\p" .string "This TRAINER used SPLASH\n" @@ -537,13 +541,13 @@ MauvilleCity_PokemonCenter_1F_Text_28F3D2:: @ 828F3D2 .string "{STR_VAR_3} is a TRAINER who must love\n" .string "SPLASHING around!$" -MauvilleCity_PokemonCenter_1F_Text_28F44B:: @ 828F44B +MauvilleCity_PokemonCenter_1F_Text_UsedStruggleTitle:: @ 828F44B .string "The Tenacious TRAINER$" -MauvilleCity_PokemonCenter_1F_Text_28F461:: @ 828F461 +MauvilleCity_PokemonCenter_1F_Text_UsedStruggleAction:: @ 828F461 .string "Resorted to using STRUGGLE$" -MauvilleCity_PokemonCenter_1F_Text_28F47C:: @ 828F47C +MauvilleCity_PokemonCenter_1F_Text_UsedStruggleStory:: @ 828F47C .string "This is a tale of a TRAINER\n" .string "named {STR_VAR_3}.\p" .string "This TRAINER had to rely on STRUGGLE\n" @@ -551,13 +555,13 @@ MauvilleCity_PokemonCenter_1F_Text_28F47C:: @ 828F47C .string "{STR_VAR_3} is a tenacious TRAINER\n" .string "who never gives in to adversity!$" -MauvilleCity_PokemonCenter_1F_Text_28F50C:: @ 828F50C +MauvilleCity_PokemonCenter_1F_Text_SlotJackpotsTitle:: @ 828F50C .string "The SLOT Champ$" -MauvilleCity_PokemonCenter_1F_Text_28F51B:: @ 828F51B +MauvilleCity_PokemonCenter_1F_Text_SlotJackpotsAction:: @ 828F51B .string "Won the jackpot on the SLOTS$" -MauvilleCity_PokemonCenter_1F_Text_28F538:: @ 828F538 +MauvilleCity_PokemonCenter_1F_Text_SlotJackpotsStory:: @ 828F538 .string "This is a tale of a TRAINER\n" .string "named {STR_VAR_3}.\p" .string "This TRAINER won the jackpot on\n" @@ -565,13 +569,13 @@ MauvilleCity_PokemonCenter_1F_Text_28F538:: @ 828F538 .string "{STR_VAR_3} is a TRAINER who was lucky\n" .string "on the SLOTS!$" -MauvilleCity_PokemonCenter_1F_Text_28F5BE:: @ 828F5BE +MauvilleCity_PokemonCenter_1F_Text_RouletteWinsTitle:: @ 828F5BE .string "The ROULETTE Champ$" -MauvilleCity_PokemonCenter_1F_Text_28F5D1:: @ 828F5D1 +MauvilleCity_PokemonCenter_1F_Text_RouletteWinsAction:: @ 828F5D1 .string "Had consecutive ROULETTE wins of$" -MauvilleCity_PokemonCenter_1F_Text_28F5F2:: @ 828F5F2 +MauvilleCity_PokemonCenter_1F_Text_RouletteWinsStory:: @ 828F5F2 .string "This is a tale of a TRAINER\n" .string "named {STR_VAR_3}.\p" .string "This TRAINER won in ROULETTE\n" @@ -579,13 +583,13 @@ MauvilleCity_PokemonCenter_1F_Text_28F5F2:: @ 828F5F2 .string "{STR_VAR_3} was lucky when the ball\n" .string "bounced in ROULETTE!$" -MauvilleCity_PokemonCenter_1F_Text_28F678:: @ 828F678 +MauvilleCity_PokemonCenter_1F_Text_BattleTowerChallengesTitle:: @ 828F678 .string "The BATTLE TOWER Challenger$" -MauvilleCity_PokemonCenter_1F_Text_28F694:: @ 828F694 +MauvilleCity_PokemonCenter_1F_Text_BattleTowerChallengesAction:: @ 828F694 .string "Took the BATTLE TOWER challenge$" -MauvilleCity_PokemonCenter_1F_Text_28F6B4:: @ 828F6B4 +MauvilleCity_PokemonCenter_1F_Text_BattleTowerChallengesStory:: @ 828F6B4 .string "This is a tale of a TRAINER\n" .string "named {STR_VAR_3}.\p" .string "This TRAINER took the BATTLE TOWER\n" @@ -593,13 +597,13 @@ MauvilleCity_PokemonCenter_1F_Text_28F6B4:: @ 828F6B4 .string "{STR_VAR_3} is a TRAINER who aspires\n" .string "for excellence in the BATTLE TOWER!$" -MauvilleCity_PokemonCenter_1F_Text_28F751:: @ 828F751 +MauvilleCity_PokemonCenter_1F_Text_MadePokeblocksTitle:: @ 828F751 .string "The Blend-Loving TRAINER$" -MauvilleCity_PokemonCenter_1F_Text_28F76A:: @ 828F76A +MauvilleCity_PokemonCenter_1F_Text_MadePokeblocksAction:: @ 828F76A .string "Made {POKEBLOCK}S$" -MauvilleCity_PokemonCenter_1F_Text_28F776:: @ 828F776 +MauvilleCity_PokemonCenter_1F_Text_MadePokeblocksStory:: @ 828F776 .string "This is a tale of a TRAINER\n" .string "named {STR_VAR_3}.\p" .string "This TRAINER made {POKEBLOCK}S\n" @@ -607,13 +611,13 @@ MauvilleCity_PokemonCenter_1F_Text_28F776:: @ 828F776 .string "There is none better at using a BERRY\n" .string "BLENDER than {STR_VAR_3}!$" -MauvilleCity_PokemonCenter_1F_Text_28F7F6:: @ 828F7F6 +MauvilleCity_PokemonCenter_1F_Text_EnteredContestsTitle:: @ 828F7F6 .string "The CONTEST-Loving TRAINER$" -MauvilleCity_PokemonCenter_1F_Text_28F811:: @ 828F811 +MauvilleCity_PokemonCenter_1F_Text_EnteredContestsAction:: @ 828F811 .string "Entered CONTESTS$" -MauvilleCity_PokemonCenter_1F_Text_28F822:: @ 828F822 +MauvilleCity_PokemonCenter_1F_Text_EnteredContestsStory:: @ 828F822 .string "This is a tale of a TRAINER\n" .string "named {STR_VAR_3}.\p" .string "This TRAINER entered CONTESTS\n" @@ -621,13 +625,13 @@ MauvilleCity_PokemonCenter_1F_Text_28F822:: @ 828F822 .string "{STR_VAR_3} must love showing off\n" .string "POKéMON to others!$" -MauvilleCity_PokemonCenter_1F_Text_28F89C:: @ 828F89C +MauvilleCity_PokemonCenter_1F_Text_WonContestsTitle:: @ 828F89C .string "The CONTEST Master$" -MauvilleCity_PokemonCenter_1F_Text_28F8AF:: @ 828F8AF +MauvilleCity_PokemonCenter_1F_Text_WonContestsAction:: @ 828F8AF .string "Won CONTESTS$" -MauvilleCity_PokemonCenter_1F_Text_28F8BC:: @ 828F8BC +MauvilleCity_PokemonCenter_1F_Text_WonContestsStory:: @ 828F8BC .string "This is a tale of a TRAINER\n" .string "named {STR_VAR_3}.\p" .string "This TRAINER won CONTESTS\n" @@ -635,13 +639,13 @@ MauvilleCity_PokemonCenter_1F_Text_28F8BC:: @ 828F8BC .string "{STR_VAR_3} must be an incredible\n" .string "CONTEST master!$" -MauvilleCity_PokemonCenter_1F_Text_28F92F:: @ 828F92F +MauvilleCity_PokemonCenter_1F_Text_TimesShoppedTitle:: @ 828F92F .string "The Happy Shopper$" -MauvilleCity_PokemonCenter_1F_Text_28F941:: @ 828F941 +MauvilleCity_PokemonCenter_1F_Text_TimesShoppedAction:: @ 828F941 .string "Shopped$" -MauvilleCity_PokemonCenter_1F_Text_28F949:: @ 828F949 +MauvilleCity_PokemonCenter_1F_Text_TimesShoppedStory:: @ 828F949 .string "This is a tale of a TRAINER\n" .string "named {STR_VAR_3}.\p" .string "This TRAINER bought items in shops\n" @@ -649,13 +653,13 @@ MauvilleCity_PokemonCenter_1F_Text_28F949:: @ 828F949 .string "{STR_VAR_3} must be one of those\n" .string "people who are born to shop.$" -MauvilleCity_PokemonCenter_1F_Text_28F9D1:: @ 828F9D1 +MauvilleCity_PokemonCenter_1F_Text_UsedItemFinderTitle:: @ 828F9D1 .string "The Item-Finding TRAINER$" -MauvilleCity_PokemonCenter_1F_Text_28F9EA:: @ 828F9EA +MauvilleCity_PokemonCenter_1F_Text_UsedItemFinderAction:: @ 828F9EA .string "Used an ITEMFINDER$" -MauvilleCity_PokemonCenter_1F_Text_28F9FD:: @ 828F9FD +MauvilleCity_PokemonCenter_1F_Text_UsedItemFinderStory:: @ 828F9FD .string "This is a tale of a TRAINER\n" .string "named {STR_VAR_3}.\p" .string "This TRAINER used an ITEMFINDER\n" @@ -663,13 +667,13 @@ MauvilleCity_PokemonCenter_1F_Text_28F9FD:: @ 828F9FD .string "{STR_VAR_3} must enjoy scouring the\n" .string "ground for hidden items!$" -MauvilleCity_PokemonCenter_1F_Text_28FA81:: @ 828FA81 +MauvilleCity_PokemonCenter_1F_Text_TimesRainedTitle:: @ 828FA81 .string "The Rain-Soaked TRAINER$" -MauvilleCity_PokemonCenter_1F_Text_28FA99:: @ 828FA99 +MauvilleCity_PokemonCenter_1F_Text_TimesRainedAction:: @ 828FA99 .string "Got rained on$" -MauvilleCity_PokemonCenter_1F_Text_28FAA7:: @ 828FAA7 +MauvilleCity_PokemonCenter_1F_Text_TimesRainedStory:: @ 828FAA7 .string "This is a tale of a TRAINER\n" .string "named {STR_VAR_3}.\p" .string "This TRAINER got soaked by rain\n" @@ -677,13 +681,13 @@ MauvilleCity_PokemonCenter_1F_Text_28FAA7:: @ 828FAA7 .string "{STR_VAR_3}'s charisma must even\n" .string "attract rain!$" -MauvilleCity_PokemonCenter_1F_Text_28FB1D:: @ 828FB1D +MauvilleCity_PokemonCenter_1F_Text_CheckedPokedexTitle:: @ 828FB1D .string "The Avid POKéDEX Reader$" -MauvilleCity_PokemonCenter_1F_Text_28FB35:: @ 828FB35 +MauvilleCity_PokemonCenter_1F_Text_CheckedPokedexAction:: @ 828FB35 .string "Checked a POKéDEX$" -MauvilleCity_PokemonCenter_1F_Text_28FB47:: @ 828FB47 +MauvilleCity_PokemonCenter_1F_Text_CheckedPokedexStory:: @ 828FB47 .string "This is a tale of a TRAINER\n" .string "named {STR_VAR_3}.\p" .string "This TRAINER checked a POKéDEX\n" @@ -691,13 +695,13 @@ MauvilleCity_PokemonCenter_1F_Text_28FB47:: @ 828FB47 .string "{STR_VAR_3} must love inspecting\n" .string "POKéMON in a POKéDEX!$" -MauvilleCity_PokemonCenter_1F_Text_28FBC4:: @ 828FBC4 +MauvilleCity_PokemonCenter_1F_Text_ReceivedRibbonsTitle:: @ 828FBC4 .string "The RIBBON Collector$" -MauvilleCity_PokemonCenter_1F_Text_28FBD9:: @ 828FBD9 +MauvilleCity_PokemonCenter_1F_Text_ReceivedRibbonsAction:: @ 828FBD9 .string "Received RIBBONS$" -MauvilleCity_PokemonCenter_1F_Text_28FBEA:: @ 828FBEA +MauvilleCity_PokemonCenter_1F_Text_ReceivedRibbonsStory:: @ 828FBEA .string "This is a tale of a TRAINER\n" .string "named {STR_VAR_3}.\p" .string "This TRAINER received RIBBONS\n" @@ -705,13 +709,13 @@ MauvilleCity_PokemonCenter_1F_Text_28FBEA:: @ 828FBEA .string "{STR_VAR_3} must be a TRAINER who\n" .string "loves to collect RIBBONS!$" -MauvilleCity_PokemonCenter_1F_Text_28FC6B:: @ 828FC6B +MauvilleCity_PokemonCenter_1F_Text_LedgesJumpedTitle:: @ 828FC6B .string "The Ledge-Jumping TRAINER$" -MauvilleCity_PokemonCenter_1F_Text_28FC85:: @ 828FC85 +MauvilleCity_PokemonCenter_1F_Text_LedgesJumpedAction:: @ 828FC85 .string "Jumped down ledges$" -MauvilleCity_PokemonCenter_1F_Text_28FC98:: @ 828FC98 +MauvilleCity_PokemonCenter_1F_Text_LedgesJumpedStory:: @ 828FC98 .string "This is a tale of a TRAINER\n" .string "named {STR_VAR_3}.\p" .string "This TRAINER jumped down ledges\n" @@ -719,26 +723,26 @@ MauvilleCity_PokemonCenter_1F_Text_28FC98:: @ 828FC98 .string "If there's a ledge to be jumped,\n" .string "{STR_VAR_3} can't ignore it!$" -MauvilleCity_PokemonCenter_1F_Text_28FD1D:: @ 828FD1D +MauvilleCity_PokemonCenter_1F_Text_TVWatchedTitle:: @ 828FD1D .string "The Legendary TV Viewer$" -MauvilleCity_PokemonCenter_1F_Text_28FD35:: @ 828FD35 +MauvilleCity_PokemonCenter_1F_Text_TVWatchedAction:: @ 828FD35 .string "Watched TV$" -MauvilleCity_PokemonCenter_1F_Text_28FD40:: @ 828FD40 +MauvilleCity_PokemonCenter_1F_Text_TVWatchedStory:: @ 828FD40 .string "This is a tale of a TRAINER\n" .string "named {STR_VAR_3}.\p" .string "This TRAINER watched TV\n" .string "{STR_VAR_1} times!\p" .string "{STR_VAR_3} must love watching TV!$" -MauvilleCity_PokemonCenter_1F_Text_28FDA2:: @ 828FDA2 +MauvilleCity_PokemonCenter_1F_Text_CheckedClockTitle:: @ 828FDA2 .string "The Time-Conscious TRAINER$" -MauvilleCity_PokemonCenter_1F_Text_28FDBD:: @ 828FDBD +MauvilleCity_PokemonCenter_1F_Text_CheckedClockAction:: @ 828FDBD .string "Checked the time$" -MauvilleCity_PokemonCenter_1F_Text_28FDCE:: @ 828FDCE +MauvilleCity_PokemonCenter_1F_Text_CheckedClockStory:: @ 828FDCE .string "This is a tale of a TRAINER\n" .string "named {STR_VAR_3}.\p" .string "This TRAINER checked the time\n" @@ -746,13 +750,13 @@ MauvilleCity_PokemonCenter_1F_Text_28FDCE:: @ 828FDCE .string "{STR_VAR_3} must be a punctual TRAINER\n" .string "who's conscious of the time.$" -MauvilleCity_PokemonCenter_1F_Text_28FE57:: @ 828FE57 +MauvilleCity_PokemonCenter_1F_Text_WonLotteryTitle:: @ 828FE57 .string "The POKéMON LOTTERY Wizard$" -MauvilleCity_PokemonCenter_1F_Text_28FE72:: @ 828FE72 +MauvilleCity_PokemonCenter_1F_Text_WonLotteryAction:: @ 828FE72 .string "Won POKéMON LOTTERIES$" -MauvilleCity_PokemonCenter_1F_Text_28FE88:: @ 828FE88 +MauvilleCity_PokemonCenter_1F_Text_WonLotteryStory:: @ 828FE88 .string "This is a tale of a TRAINER\n" .string "named {STR_VAR_3}.\p" .string "This TRAINER won POKéMON LOTTERIES\n" @@ -760,13 +764,13 @@ MauvilleCity_PokemonCenter_1F_Text_28FE88:: @ 828FE88 .string "{STR_VAR_3} must have many friends\n" .string "to trade POKéMON with!$" -MauvilleCity_PokemonCenter_1F_Text_28FF0C:: @ 828FF0C +MauvilleCity_PokemonCenter_1F_Text_UsedDaycareTitle:: @ 828FF0C .string "The DAY CARE-Using Trainer$" -MauvilleCity_PokemonCenter_1F_Text_28FF27:: @ 828FF27 +MauvilleCity_PokemonCenter_1F_Text_UsedDaycareAction:: @ 828FF27 .string "Left POKéMON at the DAY CARE$" -MauvilleCity_PokemonCenter_1F_Text_28FF44:: @ 828FF44 +MauvilleCity_PokemonCenter_1F_Text_UsedDaycareStory:: @ 828FF44 .string "This is a tale of a TRAINER\n" .string "named {STR_VAR_3}.\p" .string "This TRAINER left POKéMON with the\n" @@ -774,13 +778,13 @@ MauvilleCity_PokemonCenter_1F_Text_28FF44:: @ 828FF44 .string "{STR_VAR_3} must be a real go-getter\n" .string "who raises POKéMON aggressively!$" -MauvilleCity_PokemonCenter_1F_Text_28FFDD:: @ 828FFDD +MauvilleCity_PokemonCenter_1F_Text_RodeCableCarTitle:: @ 828FFDD .string "The CABLE CAR-Loving TRAINER$" -MauvilleCity_PokemonCenter_1F_Text_28FFFA:: @ 828FFFA +MauvilleCity_PokemonCenter_1F_Text_RodeCableCarAction:: @ 828FFFA .string "Rode the CABLE CAR$" -MauvilleCity_PokemonCenter_1F_Text_29000D:: @ 829000D +MauvilleCity_PokemonCenter_1F_Text_RodeCableCarStory:: @ 829000D .string "This is a tale of a TRAINER\n" .string "named {STR_VAR_3}.\p" .string "This TRAINER rode the CABLE CAR\n" @@ -788,13 +792,13 @@ MauvilleCity_PokemonCenter_1F_Text_29000D:: @ 829000D .string "{STR_VAR_3} must be a busy TRAINER\n" .string "who's up and down all the time!$" -MauvilleCity_PokemonCenter_1F_Text_290097:: @ 8290097 +MauvilleCity_PokemonCenter_1F_Text_HotSpringsTitle:: @ 8290097 .string "The Hot Spring-Loving TRAINER$" -MauvilleCity_PokemonCenter_1F_Text_2900B5:: @ 82900B5 +MauvilleCity_PokemonCenter_1F_Text_HotSpringsAction:: @ 82900B5 .string "Bathed in hot springs$" -MauvilleCity_PokemonCenter_1F_Text_2900CB:: @ 82900CB +MauvilleCity_PokemonCenter_1F_Text_HotSpringsStory:: @ 82900CB .string "This is a tale of a TRAINER\n" .string "named {STR_VAR_3}.\p" .string "This TRAINER bathed in hot springs\n" @@ -803,160 +807,162 @@ MauvilleCity_PokemonCenter_1F_Text_2900CB:: @ 82900CB .string "baby-smooth skin!$" -MauvilleCity_PokemonCenter_1F_EventScript_29014A:: @ 829014A +MauvilleCity_PokemonCenter_1F_EventScript_Storyteller:: @ 829014A lock faceplayer setvar VAR_0x8008, 0 setvar VAR_0x8009, 0 setvar VAR_0x800A, 0 setvar VAR_0x800B, 0 - msgbox MauvilleCity_PokemonCenter_1F_Text_28E5F6, MSGBOX_YESNO + msgbox MauvilleCity_PokemonCenter_1F_Text_WillYouHearMyTale, MSGBOX_YESNO compare VAR_RESULT, 0 - goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_290219 + goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_DeclineStoryteller specialvar VAR_RESULT, ScrSpecial_StorytellerGetFreeStorySlot compare VAR_RESULT, 0 - goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_2901DA - message MauvilleCity_PokemonCenter_1F_Text_28E673 + goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_KnowNoTales + message MauvilleCity_PokemonCenter_1F_Text_WhichTaleToTell waitmessage special ScrSpecial_StorytellerStoryListMenu waitstate compare VAR_RESULT, 0 - goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_2901B7 + goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_CancelStorySelection setvar VAR_0x8008, 1 special ScrSpecial_StorytellerDisplayStory waitmessage waitbuttonpress specialvar VAR_RESULT, ScrSpecial_StorytellerUpdateStat compare VAR_RESULT, 0 - goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_2901BD - goto MauvilleCity_PokemonCenter_1F_EventScript_29020F + goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_AreThereOtherTales + goto MauvilleCity_PokemonCenter_1F_EventScript_TellPlayersTale -MauvilleCity_PokemonCenter_1F_EventScript_2901B7:: @ 82901B7 - goto MauvilleCity_PokemonCenter_1F_EventScript_290219 +MauvilleCity_PokemonCenter_1F_EventScript_CancelStorySelection:: @ 82901B7 + goto MauvilleCity_PokemonCenter_1F_EventScript_DeclineStoryteller end -MauvilleCity_PokemonCenter_1F_EventScript_2901BD:: @ 82901BD - msgbox MauvilleCity_PokemonCenter_1F_Text_28E78A, MSGBOX_DEFAULT +MauvilleCity_PokemonCenter_1F_EventScript_AreThereOtherTales:: @ 82901BD + msgbox MauvilleCity_PokemonCenter_1F_Text_CouldThereBeOtherLegends, MSGBOX_DEFAULT specialvar VAR_RESULT, ScrSpecial_HasStorytellerAlreadyRecorded - compare VAR_RESULT, 1 - goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_29022D - goto MauvilleCity_PokemonCenter_1F_EventScript_2901E2 + compare VAR_RESULT, TRUE + goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_StorytellerEnd + goto MauvilleCity_PokemonCenter_1F_EventScript_DoYouHaveAnyTales -MauvilleCity_PokemonCenter_1F_EventScript_2901DA:: @ 82901DA - msgbox MauvilleCity_PokemonCenter_1F_Text_28E6AE, MSGBOX_DEFAULT - -MauvilleCity_PokemonCenter_1F_EventScript_2901E2:: @ 82901E2 - msgbox MauvilleCity_PokemonCenter_1F_Text_28E7EE, MSGBOX_YESNO +MauvilleCity_PokemonCenter_1F_EventScript_KnowNoTales:: @ 82901DA + msgbox MauvilleCity_PokemonCenter_1F_Text_IKnowNoTales, MSGBOX_DEFAULT +MauvilleCity_PokemonCenter_1F_EventScript_DoYouHaveAnyTales:: @ 82901E2 + msgbox MauvilleCity_PokemonCenter_1F_Text_HaveYouAnyLegendaryTales, MSGBOX_YESNO compare VAR_RESULT, 0 - goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_290219 + goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_DeclineStoryteller specialvar VAR_RESULT, ScrSpecial_StorytellerInitializeRandomStat compare VAR_RESULT, 1 - goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_29020F - msgbox MauvilleCity_PokemonCenter_1F_Text_28E881, MSGBOX_DEFAULT + goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_TellPlayersTale + msgbox MauvilleCity_PokemonCenter_1F_Text_NotWorthyOfLegend, MSGBOX_DEFAULT release end -MauvilleCity_PokemonCenter_1F_EventScript_29020F:: @ 829020F - msgbox MauvilleCity_PokemonCenter_1F_Text_28E726, MSGBOX_DEFAULT +MauvilleCity_PokemonCenter_1F_EventScript_TellPlayersTale:: @ 829020F + msgbox MauvilleCity_PokemonCenter_1F_Text_YouDidStatXTimes, MSGBOX_DEFAULT release end -MauvilleCity_PokemonCenter_1F_EventScript_290219:: @ 8290219 - msgbox MauvilleCity_PokemonCenter_1F_Text_28E64D, MSGBOX_DEFAULT +MauvilleCity_PokemonCenter_1F_EventScript_DeclineStoryteller:: @ 8290219 + msgbox MauvilleCity_PokemonCenter_1F_Text_StorytellerFeelingTheBlues, MSGBOX_DEFAULT release end -MauvilleCity_PokemonCenter_1F_EventScript_290223:: @ 8290223 - msgbox MauvilleCity_PokemonCenter_1F_Text_28E8D9, MSGBOX_DEFAULT +@ Unused +MauvilleCity_PokemonCenter_1F_EventScript_WaitingForRecordMix:: @ 8290223 + msgbox MauvilleCity_PokemonCenter_1F_Text_IWishMorePeopleWereInterested, MSGBOX_DEFAULT release end -MauvilleCity_PokemonCenter_1F_EventScript_29022D:: @ 829022D +MauvilleCity_PokemonCenter_1F_EventScript_StorytellerEnd:: @ 829022D release end -MauvilleCity_PokemonCenter_1F_Text_29022F: @ 829022F +@ Giddy +MauvilleCity_PokemonCenter_1F_Text_HearMyStory: @ 829022F .string "I'm GIDDY!\n" .string "I have a scintillating story for you!\p" .string "Would you like to hear my story?$" -MauvilleCity_PokemonCenter_1F_Text_290281: @ 8290281 +MauvilleCity_PokemonCenter_1F_Text_GiddyFeelingTheBlues: @ 8290281 .string "Oh…\n" .string "You've left me feeling the blues…$" -MauvilleCity_PokemonCenter_1F_Text_2902A7: @ 82902A7 +MauvilleCity_PokemonCenter_1F_Text_AlsoIWasThinking: @ 82902A7 .string "Also, I was thinking…$" -MauvilleCity_PokemonCenter_1F_Text_2902BD: @ 82902BD +MauvilleCity_PokemonCenter_1F_Text_WeShouldChatAgain: @ 82902BD .string "That's about it, I think…\p" .string "We should chat again!\n" .string "Bye-bye!$" -MauvilleCity_PokemonCenter_1F_EventScript_2902F6:: @ 82902F6 +MauvilleCity_PokemonCenter_1F_EventScript_Giddy:: @ 82902F6 lock faceplayer - msgbox MauvilleCity_PokemonCenter_1F_Text_29022F, MSGBOX_YESNO + msgbox MauvilleCity_PokemonCenter_1F_Text_HearMyStory, MSGBOX_YESNO compare VAR_RESULT, 1 - goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_290317 + goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_TryTellTale compare VAR_RESULT, 0 - goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_29037A + goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_DeclineGiddy end -MauvilleCity_PokemonCenter_1F_EventScript_290317:: @ 8290317 +MauvilleCity_PokemonCenter_1F_EventScript_TryTellTale:: @ 8290317 special ScrSpecial_GiddyShouldTellAnotherTale - compare VAR_RESULT, 1 - goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_290359 - compare VAR_RESULT, 0 - goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_290384 + compare VAR_RESULT, TRUE + goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_GiddyTellTale + compare VAR_RESULT, FALSE + goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_ToldEnoughTales end -MauvilleCity_PokemonCenter_1F_EventScript_290331:: @ 8290331 +MauvilleCity_PokemonCenter_1F_EventScript_TryTellNewTale:: @ 8290331 special ScrSpecial_GiddyShouldTellAnotherTale - compare VAR_RESULT, 1 - goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_29034B - compare VAR_RESULT, 0 - goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_290384 + compare VAR_RESULT, TRUE + goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_GiddyStartNewTale + compare VAR_RESULT, FALSE + goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_ToldEnoughTales end -MauvilleCity_PokemonCenter_1F_EventScript_29034B:: @ 829034B - msgbox MauvilleCity_PokemonCenter_1F_Text_2902A7, MSGBOX_DEFAULT - goto MauvilleCity_PokemonCenter_1F_EventScript_290359 +MauvilleCity_PokemonCenter_1F_EventScript_GiddyStartNewTale:: @ 829034B + msgbox MauvilleCity_PokemonCenter_1F_Text_AlsoIWasThinking, MSGBOX_DEFAULT + goto MauvilleCity_PokemonCenter_1F_EventScript_GiddyTellTale end -MauvilleCity_PokemonCenter_1F_EventScript_290359:: @ 8290359 +@ Regardless of whether yes or no is selected below, Giddy will continue to tell stories until he's told 10 +MauvilleCity_PokemonCenter_1F_EventScript_GiddyTellTale:: @ 8290359 special ScrSpecial_GenerateGiddyLine special ShowFieldMessageStringVar4 waitmessage yesnobox 20, 8 compare VAR_RESULT, 1 - goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_290331 + goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_TryTellNewTale compare VAR_RESULT, 0 - goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_290331 + goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_TryTellNewTale end -MauvilleCity_PokemonCenter_1F_EventScript_29037A:: @ 829037A - msgbox MauvilleCity_PokemonCenter_1F_Text_290281, MSGBOX_DEFAULT +MauvilleCity_PokemonCenter_1F_EventScript_DeclineGiddy:: @ 829037A + msgbox MauvilleCity_PokemonCenter_1F_Text_GiddyFeelingTheBlues, MSGBOX_DEFAULT release end -MauvilleCity_PokemonCenter_1F_EventScript_290384:: @ 8290384 - msgbox MauvilleCity_PokemonCenter_1F_Text_2902BD, MSGBOX_DEFAULT +MauvilleCity_PokemonCenter_1F_EventScript_ToldEnoughTales:: @ 8290384 + msgbox MauvilleCity_PokemonCenter_1F_Text_WeShouldChatAgain, MSGBOX_DEFAULT release end -MauvilleCity_PokemonCenter_1F_Text_29038E: @ 829038E +MauvilleCity_PokemonCenter_1F_Text_WouldYouLikeToHearMySong: @ 829038E .string "Hi, I'm the BARD.\n" .string "Would you like to hear my song?$" -MauvilleCity_PokemonCenter_1F_Text_2903C0: @ 82903C0 +MauvilleCity_PokemonCenter_1F_Text_BardFeelingTheBlues1: @ 82903C0 .string "Oh…\n" .string "You've left me feeling the blues…$" -MauvilleCity_PokemonCenter_1F_Text_2903E6: @ 82903E6 +MauvilleCity_PokemonCenter_1F_Text_WishICouldPlaySongForOthers: @ 82903E6 .string "Oh, what a moving song…\n" .string "I wish I could play it for others…$" -MauvilleCity_PokemonCenter_1F_Text_290421: @ 8290421 +MauvilleCity_PokemonCenter_1F_Text_WouldYouLikeToWriteSomeLyrics: @ 8290421 .string "So?\n" .string "How do you like my song?\p" .string "But I'm none too happy about\n" @@ -964,38 +970,38 @@ MauvilleCity_PokemonCenter_1F_Text_290421: @ 8290421 .string "How would you like to write some\n" .string "new lyrics for me?$" -MauvilleCity_PokemonCenter_1F_Text_29049B: @ 829049B +MauvilleCity_PokemonCenter_1F_Text_BardFeelingTheBlues2: @ 829049B .string "Oh…\n" .string "You've left me feeling the blues…$" -MauvilleCity_PokemonCenter_1F_Text_2904C1: @ 82904C1 +MauvilleCity_PokemonCenter_1F_Text_LetMeSingItForYou: @ 82904C1 .string "Thank you kindly!\n" .string "Let me sing it for you.$" -MauvilleCity_PokemonCenter_1F_Text_2904EB: @ 82904EB +MauvilleCity_PokemonCenter_1F_Text_ThatHowYouWantedSongToGo: @ 82904EB .string "Was that how you wanted your song\n" .string "to go?$" -MauvilleCity_PokemonCenter_1F_Text_290514: @ 8290514 +MauvilleCity_PokemonCenter_1F_Text_IllSingThisSongForAWhile: @ 8290514 .string "Okay! That's it, then.\n" .string "I'll sing this song for a while.$" -MauvilleCity_PokemonCenter_1F_Text_29054C: @ 829054C +MauvilleCity_PokemonCenter_1F_Text_TeachWhatsHipAndHappening: @ 829054C .string "Hey, yo! They call me the HIPSTER.\n" .string "I'll teach you what's hip and happening.$" -MauvilleCity_PokemonCenter_1F_Text_290598: @ 8290598 +MauvilleCity_PokemonCenter_1F_Text_IAlreadyTaughtYou: @ 8290598 .string "But, hey, I taught you what's hip and\n" .string "happening already.\p" .string "I'd like to spread the good word to\n" .string "other folks.$" -MauvilleCity_PokemonCenter_1F_Text_290602: @ 8290602 +MauvilleCity_PokemonCenter_1F_Text_IveGotNothingNewToTeach: @ 8290602 .string "But, hey, you already know a lot about\n" .string "what's hip and happening.\p" .string "I've got nothing new to teach you!$" -MauvilleCity_PokemonCenter_1F_Text_290666: @ 8290666 +MauvilleCity_PokemonCenter_1F_Text_HaveYouHeardOfPhrase: @ 8290666 .string "Hey, have you heard about\n" .string "“{STR_VAR_1}”?\p" .string "What's it mean? Well…\n" diff --git a/data/text/mauville_man.inc b/data/text/mauville_man.inc index 141808444e..6326f5d8cd 100644 --- a/data/text/mauville_man.inc +++ b/data/text/mauville_man.inc @@ -1,3 +1,4 @@ +@ Only contains a portion of the mauville_man text. The rest is in scripts/mauville_man.inc gText_SoPretty:: @ 8294295 .string " so pretty!$" diff --git a/include/constants/easy_chat.h b/include/constants/easy_chat.h index 50f5994f4e..b97c2aaf21 100644 --- a/include/constants/easy_chat.h +++ b/include/constants/easy_chat.h @@ -1095,6 +1095,7 @@ #define EC_WORD_OLD (EC_GROUP_TRENDY_SAYING << 9) | 0x1e #define EC_WORD_YOUNG (EC_GROUP_TRENDY_SAYING << 9) | 0x1f #define EC_WORD_UGLY (EC_GROUP_TRENDY_SAYING << 9) | 0x20 +#define NUM_ADDITIONAL_PHRASES 33 #define EC_POKEMON(mon) ((EC_GROUP_POKEMON << 9) | SPECIES_##mon) #define EC_POKEMON2(mon) ((EC_GROUP_POKEMON_2 << 9) | SPECIES_##mon) diff --git a/include/constants/global.h b/include/constants/global.h index 091f735f43..ca48c1d2ae 100644 --- a/include/constants/global.h +++ b/include/constants/global.h @@ -67,6 +67,10 @@ #define FEMALE 1 #define GENDER_COUNT 2 +#define BARD_SONG_LENGTH 6 +#define NUM_STORYTELLER_TALES 4 +#define NUM_TRADER_ITEMS 4 + #define OPTIONS_BUTTON_MODE_NORMAL 0 #define OPTIONS_BUTTON_MODE_LR 1 #define OPTIONS_BUTTON_MODE_L_EQUALS_A 2 diff --git a/include/constants/mauville_man.h b/include/constants/mauville_man.h deleted file mode 100644 index b00e3a2919..0000000000 --- a/include/constants/mauville_man.h +++ /dev/null @@ -1,10 +0,0 @@ -#ifndef GUARD_CONSTANTS_MAUVILLE_MAN_H -#define GUARD_CONSTANTS_MAUVILLE_MAN_H - -#define MAUVILLE_MAN_BARD 0 -#define MAUVILLE_MAN_HIPSTER 1 -#define MAUVILLE_MAN_TRADER 2 -#define MAUVILLE_MAN_STORYTELLER 3 -#define MAUVILLE_MAN_GIDDY 4 - -#endif // GUARD_CONSTANTS_MAUVILLE_MAN_H diff --git a/include/constants/mauville_old_man.h b/include/constants/mauville_old_man.h new file mode 100644 index 0000000000..c1fb0bf24a --- /dev/null +++ b/include/constants/mauville_old_man.h @@ -0,0 +1,12 @@ +#ifndef GUARD_CONSTANTS_MAUVILLE_OLD_MAN_H +#define GUARD_CONSTANTS_MAUVILLE_OLD_MAN_H + +#define MAUVILLE_MAN_BARD 0 +#define MAUVILLE_MAN_HIPSTER 1 +#define MAUVILLE_MAN_TRADER 2 +#define MAUVILLE_MAN_STORYTELLER 3 +#define MAUVILLE_MAN_GIDDY 4 +#define MAUVILLE_MAN_UNUSED1 5 +#define MAUVILLE_MAN_UNUSED2 6 + +#endif // GUARD_CONSTANTS_MAUVILLE_OLD_MAN_H diff --git a/include/easy_chat.h b/include/easy_chat.h index 84ac154227..221cbd1da4 100644 --- a/include/easy_chat.h +++ b/include/easy_chat.h @@ -129,11 +129,11 @@ void InitializeEasyChatWordArray(u16 *words, u16 length); u8 *ConvertEasyChatWordsToString(u8 *dest, const u16 *src, u16 columns, u16 rows); bool8 ECWord_CheckIfOutsideOfValidRange(u16 word); u16 sub_811EE38(u16 group); -u16 sub_811F01C(void); +u16 GetNewHipsterPhraseToTeach(void); u16 EasyChat_GetNumWordsInGroup(u8); u16 sub_811EE90(u16); void DoEasyChatScreen(u8 type, u16 *words, MainCallback callback, u8 displayedPersonType); void sub_811F8BC(void); -void sub_811EFC0(u8 additionalPhraseId); +void UnlockAdditionalPhrase(u8 additionalPhraseId); #endif // GUARD_EASYCHAT_H diff --git a/include/event_scripts.h b/include/event_scripts.h index a0190ea9e1..52f3cc251a 100644 --- a/include/event_scripts.h +++ b/include/event_scripts.h @@ -407,115 +407,115 @@ extern const u8 gMauvilleManText_WhenYouSeeTheSettingSunDoesIt[]; extern const u8 gMauvilleManText_LyingBackInTheGreenGrass[]; extern const u8 gMauvilleManText_SecretBasesAreSoWonderful[]; - -extern const u8 MauvilleCity_PokemonCenter_1F_Text_28E930[]; -extern const u8 MauvilleCity_PokemonCenter_1F_Text_28E947[]; -extern const u8 MauvilleCity_PokemonCenter_1F_Text_28E956[]; -extern const u8 MauvilleCity_PokemonCenter_1F_Text_28E9D7[]; -extern const u8 MauvilleCity_PokemonCenter_1F_Text_28E9EF[]; -extern const u8 MauvilleCity_PokemonCenter_1F_Text_28E9FE[]; -extern const u8 MauvilleCity_PokemonCenter_1F_Text_28EA7D[]; -extern const u8 MauvilleCity_PokemonCenter_1F_Text_28EA98[]; -extern const u8 MauvilleCity_PokemonCenter_1F_Text_28EAA8[]; -extern const u8 MauvilleCity_PokemonCenter_1F_Text_28EB19[]; -extern const u8 MauvilleCity_PokemonCenter_1F_Text_28EB31[]; -extern const u8 MauvilleCity_PokemonCenter_1F_Text_28EB3E[]; -extern const u8 MauvilleCity_PokemonCenter_1F_Text_28EBB5[]; -extern const u8 MauvilleCity_PokemonCenter_1F_Text_28EBCD[]; -extern const u8 MauvilleCity_PokemonCenter_1F_Text_28EBDD[]; -extern const u8 MauvilleCity_PokemonCenter_1F_Text_28EC60[]; -extern const u8 MauvilleCity_PokemonCenter_1F_Text_28EC79[]; -extern const u8 MauvilleCity_PokemonCenter_1F_Text_28EC81[]; -extern const u8 MauvilleCity_PokemonCenter_1F_Text_28ED04[]; -extern const u8 MauvilleCity_PokemonCenter_1F_Text_28ED21[]; -extern const u8 MauvilleCity_PokemonCenter_1F_Text_28ED30[]; -extern const u8 MauvilleCity_PokemonCenter_1F_Text_28EDA1[]; -extern const u8 MauvilleCity_PokemonCenter_1F_Text_28EDB5[]; -extern const u8 MauvilleCity_PokemonCenter_1F_Text_28EDCF[]; -extern const u8 MauvilleCity_PokemonCenter_1F_Text_28EE45[]; -extern const u8 MauvilleCity_PokemonCenter_1F_Text_28EE5D[]; -extern const u8 MauvilleCity_PokemonCenter_1F_Text_28EE6A[]; -extern const u8 MauvilleCity_PokemonCenter_1F_Text_28EEDD[]; -extern const u8 MauvilleCity_PokemonCenter_1F_Text_28EEF1[]; -extern const u8 MauvilleCity_PokemonCenter_1F_Text_28EF01[]; -extern const u8 MauvilleCity_PokemonCenter_1F_Text_28EF73[]; -extern const u8 MauvilleCity_PokemonCenter_1F_Text_28EF95[]; -extern const u8 MauvilleCity_PokemonCenter_1F_Text_28EFAA[]; -extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F045[]; -extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F05A[]; -extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F071[]; -extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F0F3[]; -extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F10D[]; -extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F125[]; -extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F1BE[]; -extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F1D5[]; -extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F1DE[]; -extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F24F[]; -extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F269[]; -extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F277[]; -extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F2FC[]; -extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F314[]; -extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F32A[]; -extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F3AD[]; -extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F3C6[]; -extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F3D2[]; -extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F44B[]; -extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F461[]; -extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F47C[]; -extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F50C[]; -extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F51B[]; -extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F538[]; -extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F5BE[]; -extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F5D1[]; -extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F5F2[]; -extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F678[]; -extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F694[]; -extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F6B4[]; -extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F751[]; -extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F76A[]; -extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F776[]; -extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F7F6[]; -extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F811[]; -extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F822[]; -extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F89C[]; -extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F8AF[]; -extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F8BC[]; -extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F92F[]; -extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F941[]; -extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F949[]; -extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F9D1[]; -extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F9EA[]; -extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F9FD[]; -extern const u8 MauvilleCity_PokemonCenter_1F_Text_28FA81[]; -extern const u8 MauvilleCity_PokemonCenter_1F_Text_28FA99[]; -extern const u8 MauvilleCity_PokemonCenter_1F_Text_28FAA7[]; -extern const u8 MauvilleCity_PokemonCenter_1F_Text_28FB1D[]; -extern const u8 MauvilleCity_PokemonCenter_1F_Text_28FB35[]; -extern const u8 MauvilleCity_PokemonCenter_1F_Text_28FB47[]; -extern const u8 MauvilleCity_PokemonCenter_1F_Text_28FBC4[]; -extern const u8 MauvilleCity_PokemonCenter_1F_Text_28FBD9[]; -extern const u8 MauvilleCity_PokemonCenter_1F_Text_28FBEA[]; -extern const u8 MauvilleCity_PokemonCenter_1F_Text_28FC6B[]; -extern const u8 MauvilleCity_PokemonCenter_1F_Text_28FC85[]; -extern const u8 MauvilleCity_PokemonCenter_1F_Text_28FC98[]; -extern const u8 MauvilleCity_PokemonCenter_1F_Text_28FD1D[]; -extern const u8 MauvilleCity_PokemonCenter_1F_Text_28FD35[]; -extern const u8 MauvilleCity_PokemonCenter_1F_Text_28FD40[]; -extern const u8 MauvilleCity_PokemonCenter_1F_Text_28FDA2[]; -extern const u8 MauvilleCity_PokemonCenter_1F_Text_28FDBD[]; -extern const u8 MauvilleCity_PokemonCenter_1F_Text_28FDCE[]; -extern const u8 MauvilleCity_PokemonCenter_1F_Text_28FE57[]; -extern const u8 MauvilleCity_PokemonCenter_1F_Text_28FE72[]; -extern const u8 MauvilleCity_PokemonCenter_1F_Text_28FE88[]; -extern const u8 MauvilleCity_PokemonCenter_1F_Text_28FF0C[]; -extern const u8 MauvilleCity_PokemonCenter_1F_Text_28FF27[]; -extern const u8 MauvilleCity_PokemonCenter_1F_Text_28FF44[]; -extern const u8 MauvilleCity_PokemonCenter_1F_Text_28FFDD[]; -extern const u8 MauvilleCity_PokemonCenter_1F_Text_28FFFA[]; -extern const u8 MauvilleCity_PokemonCenter_1F_Text_29000D[]; -extern const u8 MauvilleCity_PokemonCenter_1F_Text_290097[]; -extern const u8 MauvilleCity_PokemonCenter_1F_Text_2900B5[]; -extern const u8 MauvilleCity_PokemonCenter_1F_Text_2900CB[]; +// mauville old man storyteller +extern const u8 MauvilleCity_PokemonCenter_1F_Text_SavedGameTitle[]; +extern const u8 MauvilleCity_PokemonCenter_1F_Text_SavedGameAction[]; +extern const u8 MauvilleCity_PokemonCenter_1F_Text_SavedGameStory[]; +extern const u8 MauvilleCity_PokemonCenter_1F_Text_TrendsStartedTitle[]; +extern const u8 MauvilleCity_PokemonCenter_1F_Text_TrendsStartedAction[]; +extern const u8 MauvilleCity_PokemonCenter_1F_Text_TrendsStartedStory[]; +extern const u8 MauvilleCity_PokemonCenter_1F_Text_BerriesPlantedTitle[]; +extern const u8 MauvilleCity_PokemonCenter_1F_Text_BerriesPlantedAction[]; +extern const u8 MauvilleCity_PokemonCenter_1F_Text_BerriesPlantedStory[]; +extern const u8 MauvilleCity_PokemonCenter_1F_Text_BikeTradesTitle[]; +extern const u8 MauvilleCity_PokemonCenter_1F_Text_BikeTradesAction[]; +extern const u8 MauvilleCity_PokemonCenter_1F_Text_BikeTradesStory[]; +extern const u8 MauvilleCity_PokemonCenter_1F_Text_InterviewsTitle[]; +extern const u8 MauvilleCity_PokemonCenter_1F_Text_InterviewsAction[]; +extern const u8 MauvilleCity_PokemonCenter_1F_Text_InterviewsStory[]; +extern const u8 MauvilleCity_PokemonCenter_1F_Text_TrainerBattlesTitle[]; +extern const u8 MauvilleCity_PokemonCenter_1F_Text_TrainerBattlesAction[]; +extern const u8 MauvilleCity_PokemonCenter_1F_Text_TrainerBattlesStory[]; +extern const u8 MauvilleCity_PokemonCenter_1F_Text_PokemonCaughtTitle[]; +extern const u8 MauvilleCity_PokemonCenter_1F_Text_PokemonCaughtAction[]; +extern const u8 MauvilleCity_PokemonCenter_1F_Text_PokemonCaughtStory[]; +extern const u8 MauvilleCity_PokemonCenter_1F_Text_FishingPokemonCaughtTitle[]; +extern const u8 MauvilleCity_PokemonCenter_1F_Text_FishingPokemonCaughtAction[]; +extern const u8 MauvilleCity_PokemonCenter_1F_Text_FishingPokemonCaughtStory[]; +extern const u8 MauvilleCity_PokemonCenter_1F_Text_EggsHatchedTitle[]; +extern const u8 MauvilleCity_PokemonCenter_1F_Text_EggsHatchedAction[]; +extern const u8 MauvilleCity_PokemonCenter_1F_Text_EggsHatchedStory[]; +extern const u8 MauvilleCity_PokemonCenter_1F_Text_PokemonEvolvedTitle[]; +extern const u8 MauvilleCity_PokemonCenter_1F_Text_PokemonEvolvedAction[]; +extern const u8 MauvilleCity_PokemonCenter_1F_Text_PokemonEvolvedStory[]; +extern const u8 MauvilleCity_PokemonCenter_1F_Text_UsedPokemonCenterTitle[]; +extern const u8 MauvilleCity_PokemonCenter_1F_Text_UsedPokemonCenterAction[]; +extern const u8 MauvilleCity_PokemonCenter_1F_Text_UsedPokemonCenterStory[]; +extern const u8 MauvilleCity_PokemonCenter_1F_Text_RestedAtHomeTitle[]; +extern const u8 MauvilleCity_PokemonCenter_1F_Text_RestedAtHomeAction[]; +extern const u8 MauvilleCity_PokemonCenter_1F_Text_RestedAtHomeStory[]; +extern const u8 MauvilleCity_PokemonCenter_1F_Text_SafariGamesTitle[]; +extern const u8 MauvilleCity_PokemonCenter_1F_Text_SafariGamesAction[]; +extern const u8 MauvilleCity_PokemonCenter_1F_Text_SafariGamesStory[]; +extern const u8 MauvilleCity_PokemonCenter_1F_Text_UsedCutTitle[]; +extern const u8 MauvilleCity_PokemonCenter_1F_Text_UsedCutAction[]; +extern const u8 MauvilleCity_PokemonCenter_1F_Text_UsedCutStory[]; +extern const u8 MauvilleCity_PokemonCenter_1F_Text_UsedRockSmashTitle[]; +extern const u8 MauvilleCity_PokemonCenter_1F_Text_UsedRockSmashAction[]; +extern const u8 MauvilleCity_PokemonCenter_1F_Text_UsedRockSmashStory[]; +extern const u8 MauvilleCity_PokemonCenter_1F_Text_MovedBasesTitle[]; +extern const u8 MauvilleCity_PokemonCenter_1F_Text_MovedBasesAction[]; +extern const u8 MauvilleCity_PokemonCenter_1F_Text_MovedBasesStory[]; +extern const u8 MauvilleCity_PokemonCenter_1F_Text_UsedSplashTitle[]; +extern const u8 MauvilleCity_PokemonCenter_1F_Text_UsedSplashAction[]; +extern const u8 MauvilleCity_PokemonCenter_1F_Text_UsedSplashStory[]; +extern const u8 MauvilleCity_PokemonCenter_1F_Text_UsedStruggleTitle[]; +extern const u8 MauvilleCity_PokemonCenter_1F_Text_UsedStruggleAction[]; +extern const u8 MauvilleCity_PokemonCenter_1F_Text_UsedStruggleStory[]; +extern const u8 MauvilleCity_PokemonCenter_1F_Text_SlotJackpotsTitle[]; +extern const u8 MauvilleCity_PokemonCenter_1F_Text_SlotJackpotsAction[]; +extern const u8 MauvilleCity_PokemonCenter_1F_Text_SlotJackpotsStory[]; +extern const u8 MauvilleCity_PokemonCenter_1F_Text_RouletteWinsTitle[]; +extern const u8 MauvilleCity_PokemonCenter_1F_Text_RouletteWinsAction[]; +extern const u8 MauvilleCity_PokemonCenter_1F_Text_RouletteWinsStory[]; +extern const u8 MauvilleCity_PokemonCenter_1F_Text_BattleTowerChallengesTitle[]; +extern const u8 MauvilleCity_PokemonCenter_1F_Text_BattleTowerChallengesAction[]; +extern const u8 MauvilleCity_PokemonCenter_1F_Text_BattleTowerChallengesStory[]; +extern const u8 MauvilleCity_PokemonCenter_1F_Text_MadePokeblocksTitle[]; +extern const u8 MauvilleCity_PokemonCenter_1F_Text_MadePokeblocksAction[]; +extern const u8 MauvilleCity_PokemonCenter_1F_Text_MadePokeblocksStory[]; +extern const u8 MauvilleCity_PokemonCenter_1F_Text_EnteredContestsTitle[]; +extern const u8 MauvilleCity_PokemonCenter_1F_Text_EnteredContestsAction[]; +extern const u8 MauvilleCity_PokemonCenter_1F_Text_EnteredContestsStory[]; +extern const u8 MauvilleCity_PokemonCenter_1F_Text_WonContestsTitle[]; +extern const u8 MauvilleCity_PokemonCenter_1F_Text_WonContestsAction[]; +extern const u8 MauvilleCity_PokemonCenter_1F_Text_WonContestsStory[]; +extern const u8 MauvilleCity_PokemonCenter_1F_Text_TimesShoppedTitle[]; +extern const u8 MauvilleCity_PokemonCenter_1F_Text_TimesShoppedAction[]; +extern const u8 MauvilleCity_PokemonCenter_1F_Text_TimesShoppedStory[]; +extern const u8 MauvilleCity_PokemonCenter_1F_Text_UsedItemFinderTitle[]; +extern const u8 MauvilleCity_PokemonCenter_1F_Text_UsedItemFinderAction[]; +extern const u8 MauvilleCity_PokemonCenter_1F_Text_UsedItemFinderStory[]; +extern const u8 MauvilleCity_PokemonCenter_1F_Text_TimesRainedTitle[]; +extern const u8 MauvilleCity_PokemonCenter_1F_Text_TimesRainedAction[]; +extern const u8 MauvilleCity_PokemonCenter_1F_Text_TimesRainedStory[]; +extern const u8 MauvilleCity_PokemonCenter_1F_Text_CheckedPokedexTitle[]; +extern const u8 MauvilleCity_PokemonCenter_1F_Text_CheckedPokedexAction[]; +extern const u8 MauvilleCity_PokemonCenter_1F_Text_CheckedPokedexStory[]; +extern const u8 MauvilleCity_PokemonCenter_1F_Text_ReceivedRibbonsTitle[]; +extern const u8 MauvilleCity_PokemonCenter_1F_Text_ReceivedRibbonsAction[]; +extern const u8 MauvilleCity_PokemonCenter_1F_Text_ReceivedRibbonsStory[]; +extern const u8 MauvilleCity_PokemonCenter_1F_Text_LedgesJumpedTitle[]; +extern const u8 MauvilleCity_PokemonCenter_1F_Text_LedgesJumpedAction[]; +extern const u8 MauvilleCity_PokemonCenter_1F_Text_LedgesJumpedStory[]; +extern const u8 MauvilleCity_PokemonCenter_1F_Text_TVWatchedTitle[]; +extern const u8 MauvilleCity_PokemonCenter_1F_Text_TVWatchedAction[]; +extern const u8 MauvilleCity_PokemonCenter_1F_Text_TVWatchedStory[]; +extern const u8 MauvilleCity_PokemonCenter_1F_Text_CheckedClockTitle[]; +extern const u8 MauvilleCity_PokemonCenter_1F_Text_CheckedClockAction[]; +extern const u8 MauvilleCity_PokemonCenter_1F_Text_CheckedClockStory[]; +extern const u8 MauvilleCity_PokemonCenter_1F_Text_WonLotteryTitle[]; +extern const u8 MauvilleCity_PokemonCenter_1F_Text_WonLotteryAction[]; +extern const u8 MauvilleCity_PokemonCenter_1F_Text_WonLotteryStory[]; +extern const u8 MauvilleCity_PokemonCenter_1F_Text_UsedDaycareTitle[]; +extern const u8 MauvilleCity_PokemonCenter_1F_Text_UsedDaycareAction[]; +extern const u8 MauvilleCity_PokemonCenter_1F_Text_UsedDaycareStory[]; +extern const u8 MauvilleCity_PokemonCenter_1F_Text_RodeCableCarTitle[]; +extern const u8 MauvilleCity_PokemonCenter_1F_Text_RodeCableCarAction[]; +extern const u8 MauvilleCity_PokemonCenter_1F_Text_RodeCableCarStory[]; +extern const u8 MauvilleCity_PokemonCenter_1F_Text_HotSpringsTitle[]; +extern const u8 MauvilleCity_PokemonCenter_1F_Text_HotSpringsAction[]; +extern const u8 MauvilleCity_PokemonCenter_1F_Text_HotSpringsStory[]; extern const u8 EventScript_PlayerPCMale[]; extern const u8 EventScript_PlayerPCFemale[]; diff --git a/include/global.h b/include/global.h index 82c53c009d..5fd49f773a 100644 --- a/include/global.h +++ b/include/global.h @@ -594,9 +594,9 @@ struct MauvilleManCommon struct MauvilleManBard { /*0x00*/ u8 id; - /*0x02*/ u16 songLyrics[6]; - /*0x0E*/ u16 temporaryLyrics[6]; - /*0x1A*/ u8 playerName[8]; + /*0x02*/ u16 songLyrics[BARD_SONG_LENGTH]; + /*0x0E*/ u16 temporaryLyrics[BARD_SONG_LENGTH]; + /*0x1A*/ u8 playerName[PLAYER_NAME_LENGTH + 1]; /*0x22*/ u8 filler_2DB6[0x3]; /*0x25*/ u8 playerTrainerId[TRAINER_ID_LENGTH]; /*0x29*/ bool8 hasChangedSong; @@ -608,10 +608,10 @@ struct MauvilleManStoryteller u8 id; bool8 alreadyRecorded; u8 filler2[2]; - u8 gameStatIDs[4]; - u8 trainerNames[4][7]; - u8 statValues[4][4]; - u8 language[4]; + u8 gameStatIDs[NUM_STORYTELLER_TALES]; + u8 trainerNames[NUM_STORYTELLER_TALES][PLAYER_NAME_LENGTH]; + u8 statValues[NUM_STORYTELLER_TALES][4]; + u8 language[NUM_STORYTELLER_TALES]; }; struct MauvilleManGiddy @@ -634,10 +634,10 @@ struct MauvilleManHipster struct MauvilleOldManTrader { u8 id; - u8 decorIds[4]; - u8 playerNames[4][11]; + u8 decorIds[NUM_TRADER_ITEMS]; + u8 playerNames[NUM_TRADER_ITEMS][11]; u8 alreadyTraded; - u8 language[4]; + u8 language[NUM_TRADER_ITEMS]; }; typedef union OldMan diff --git a/include/mauville_old_man.h b/include/mauville_old_man.h index 9d71e81aa5..3845ac2902 100644 --- a/include/mauville_old_man.h +++ b/include/mauville_old_man.h @@ -1,16 +1,6 @@ - #ifndef GUARD_MAUVILLE_OLD_MAN_H #define GUARD_MAUVILLE_OLD_MAN_H -enum MauvilleOldManType -{ - MAUVILLE_MAN_BARD, - MAUVILLE_MAN_HIPSTER, - MAUVILLE_MAN_TRADER, - MAUVILLE_MAN_STORYTELLER, - MAUVILLE_MAN_GIDDY -}; - extern struct BardSong gBardSong; void SetMauvilleOldMan(void); diff --git a/src/data/field_event_obj/event_object_graphics_info_pointers.h b/src/data/field_event_obj/event_object_graphics_info_pointers.h index 0b8aa79b24..661539d579 100755 --- a/src/data/field_event_obj/event_object_graphics_info_pointers.h +++ b/src/data/field_event_obj/event_object_graphics_info_pointers.h @@ -489,11 +489,11 @@ const struct EventObjectGraphicsInfo *const gEventObjectGraphicsInfoPointers[] = }; const struct EventObjectGraphicsInfo *const gMauvilleOldManGraphicsInfoPointers[] = { - &gEventObjectGraphicsInfo_Bard, - &gEventObjectGraphicsInfo_Hipster, - &gEventObjectGraphicsInfo_Trader, - &gEventObjectGraphicsInfo_Storyteller, - &gEventObjectGraphicsInfo_Giddy, - &gEventObjectGraphicsInfo_UnusedMauvilleOldMan1, - &gEventObjectGraphicsInfo_UnusedMauvilleOldMan2, + [MAUVILLE_MAN_BARD] = &gEventObjectGraphicsInfo_Bard, + [MAUVILLE_MAN_HIPSTER] = &gEventObjectGraphicsInfo_Hipster, + [MAUVILLE_MAN_TRADER] = &gEventObjectGraphicsInfo_Trader, + [MAUVILLE_MAN_STORYTELLER] = &gEventObjectGraphicsInfo_Storyteller, + [MAUVILLE_MAN_GIDDY] = &gEventObjectGraphicsInfo_Giddy, + [MAUVILLE_MAN_UNUSED1] = &gEventObjectGraphicsInfo_UnusedMauvilleOldMan1, + [MAUVILLE_MAN_UNUSED2] = &gEventObjectGraphicsInfo_UnusedMauvilleOldMan2, }; diff --git a/src/easy_chat.c b/src/easy_chat.c index 827b470855..05f51ed4e5 100644 --- a/src/easy_chat.c +++ b/src/easy_chat.c @@ -31,6 +31,7 @@ #include "constants/event_objects.h" #include "constants/flags.h" #include "constants/lilycove_lady.h" +#include "constants/mauville_old_man.h" #include "constants/songs.h" #include "constants/species.h" #include "constants/rgb.h" @@ -220,7 +221,7 @@ static void sub_811E0EC(s8, s8); static void sub_811E1A4(s8, s8); static void sub_811E2DC(struct Sprite *); static void sub_811E34C(u8, u8); -static bool8 sub_811F0F8(void); +static bool8 EasyChatIsNationalPokedexEnabled(void); static u16 sub_811F108(void); static void sub_811F2D4(void); static void sub_811F46C(void); @@ -1263,7 +1264,7 @@ void ShowEasyChatScreen(void) break; case EASY_CHAT_TYPE_BARD_SONG: bard = &gSaveBlock1Ptr->oldMan.bard; - for (i = 0; i < 6; i ++) + for (i = 0; i < BARD_SONG_LENGTH; i ++) bard->temporaryLyrics[i] = bard->songLyrics[i]; words = bard->temporaryLyrics; @@ -4809,7 +4810,7 @@ static void sub_811E948(void) PutWindowTilemap(windowId); } -static bool8 sub_811EA28(u8 groupId) +static bool8 IsEasyChatGroupUnlocked(u8 groupId) { switch (groupId) { @@ -4820,7 +4821,7 @@ static bool8 sub_811EA28(u8 groupId) case EC_GROUP_MOVE_2: return FlagGet(FLAG_SYS_GAME_CLEAR); case EC_GROUP_POKEMON_2: - return sub_811F0F8(); + return EasyChatIsNationalPokedexEnabled(); default: return TRUE; } @@ -4831,7 +4832,7 @@ u16 EasyChat_GetNumWordsInGroup(u8 groupId) if (groupId == EC_GROUP_POKEMON) return GetNationalPokedexCount(FLAG_GET_SEEN); - if (sub_811EA28(groupId)) + if (IsEasyChatGroupUnlocked(groupId)) return gEasyChatGroups[groupId].numEnabledWords; return 0; @@ -5071,7 +5072,7 @@ u16 sub_811EE38(u16 groupId) u16 sub_811EE90(u16 groupId) { - if (!sub_811EA28(groupId)) + if (!IsEasyChatGroupUnlocked(groupId)) return 0xFFFF; if (groupId == EC_GROUP_POKEMON) @@ -5129,16 +5130,16 @@ void sub_811EF6C(void) CopyEasyChatWord(gStringVar2, easyChatWord); } -static bool8 sub_811EF98(u8 additionalPhraseId) +static bool8 IsAdditionalPhraseUnlocked(u8 additionalPhraseId) { int byteOffset = additionalPhraseId / 8; int shift = additionalPhraseId % 8; return (gSaveBlock1Ptr->additionalPhrases[byteOffset] >> shift) & 1; } -void sub_811EFC0(u8 additionalPhraseId) +void UnlockAdditionalPhrase(u8 additionalPhraseId) { - if (additionalPhraseId < 33) + if (additionalPhraseId < NUM_ADDITIONAL_PHRASES) { int byteOffset = additionalPhraseId / 8; int shift = additionalPhraseId % 8; @@ -5146,32 +5147,32 @@ void sub_811EFC0(u8 additionalPhraseId) } } -u8 sub_811EFF0(void) +static u8 GetNumAdditionalPhrasesUnlocked(void) { u8 i; u8 numAdditionalPhrasesUnlocked; - for (i = 0, numAdditionalPhrasesUnlocked = 0; i < 33; i++) + for (i = 0, numAdditionalPhrasesUnlocked = 0; i < NUM_ADDITIONAL_PHRASES; i++) { - if (sub_811EF98(i)) + if (IsAdditionalPhraseUnlocked(i)) numAdditionalPhrasesUnlocked++; } return numAdditionalPhrasesUnlocked; } -u16 sub_811F01C(void) +u16 GetNewHipsterPhraseToTeach(void) { u16 i; u16 additionalPhraseId; - u8 numAdditionalPhrasesUnlocked = sub_811EFF0(); - if (numAdditionalPhrasesUnlocked == 33) + u8 numAdditionalPhrasesUnlocked = GetNumAdditionalPhrasesUnlocked(); + if (numAdditionalPhrasesUnlocked == NUM_ADDITIONAL_PHRASES) return 0xFFFF; - additionalPhraseId = Random() % (33 - numAdditionalPhrasesUnlocked); - for (i = 0; i < 33; i++) + additionalPhraseId = Random() % (NUM_ADDITIONAL_PHRASES - numAdditionalPhrasesUnlocked); + for (i = 0; i < NUM_ADDITIONAL_PHRASES; i++) { - if (!sub_811EF98(i)) + if (!IsAdditionalPhraseUnlocked(i)) { if (additionalPhraseId) { @@ -5179,7 +5180,7 @@ u16 sub_811F01C(void) } else { - sub_811EFC0(i); + UnlockAdditionalPhrase(i); return EC_WORD(EC_GROUP_TRENDY_SAYING, i); } } @@ -5188,17 +5189,18 @@ u16 sub_811F01C(void) return 0xFFFF; } -u16 sub_811F090(void) +// Unused +u16 GetRandomTaughtHipsterPhrase(void) { u16 i; - u16 additionalPhraseId = sub_811EFF0(); + u16 additionalPhraseId = GetNumAdditionalPhrasesUnlocked(); if (additionalPhraseId == 0) return 0xFFFF; additionalPhraseId = Random() % additionalPhraseId; - for (i = 0; i < 33; i++) + for (i = 0; i < NUM_ADDITIONAL_PHRASES; i++) { - if (sub_811EF98(i)) + if (IsAdditionalPhraseUnlocked(i)) { if (additionalPhraseId) additionalPhraseId--; @@ -5210,7 +5212,7 @@ u16 sub_811F090(void) return 0xFFFF; } -static bool8 sub_811F0F8(void) +static bool8 EasyChatIsNationalPokedexEnabled(void) { return IsNationalPokedexEnabled(); } @@ -5497,7 +5499,7 @@ static bool8 sub_811F764(u16 wordIndex, u8 groupId) case EC_GROUP_MOVE_2: return TRUE; case EC_GROUP_TRENDY_SAYING: - return sub_811EF98(wordIndex); + return IsAdditionalPhraseUnlocked(wordIndex); default: return gEasyChatGroups[groupId].wordData.words[wordIndex].enabled; } @@ -5545,7 +5547,7 @@ bool32 sub_811F8D8(int easyChatWord) int groupId = EC_GROUP(easyChatWord); int mask = 0x7F; int index = EC_INDEX(easyChatWord); - if (!sub_811EA28(groupId & mask)) + if (!IsEasyChatGroupUnlocked(groupId & mask)) return FALSE; else return sub_811F764(index, groupId & mask); diff --git a/src/event_object_movement.c b/src/event_object_movement.c index b3daaad675..c746f08b1c 100644 --- a/src/event_object_movement.c +++ b/src/event_object_movement.c @@ -26,6 +26,7 @@ #include "constants/event_objects.h" #include "constants/field_effects.h" #include "constants/items.h" +#include "constants/mauville_old_man.h" // this file was known as evobjmv.c in Game Freak's original source diff --git a/src/mauville_old_man.c b/src/mauville_old_man.c index f55dd2b8b1..4c3066e04e 100644 --- a/src/mauville_old_man.c +++ b/src/mauville_old_man.c @@ -22,6 +22,7 @@ #include "field_message_box.h" #include "script_menu.h" #include "trader.h" +#include "constants/mauville_old_man.h" #define CHAR_SONG_WORD_SEPARATOR 0x37 @@ -41,7 +42,7 @@ static EWRAM_DATA u16 sUnknownBardRelated = 0; static EWRAM_DATA struct MauvilleManStoryteller * sStorytellerPtr = NULL; static EWRAM_DATA u8 sStorytellerWindowId = 0; -static const u16 sDefaultBardSongLyrics[6] = { +static const u16 sDefaultBardSongLyrics[BARD_SONG_LENGTH] = { EC_WORD_SHAKE, EC_WORD_IT, EC_WORD_DO, @@ -80,7 +81,7 @@ static void SetupBard(void) bard->id = MAUVILLE_MAN_BARD; bard->hasChangedSong = FALSE; bard->language = gGameLanguage; - for (i = 0; i < 6; i++) + for (i = 0; i < BARD_SONG_LENGTH; i++) bard->songLyrics[i] = sDefaultBardSongLyrics[i]; } @@ -166,10 +167,10 @@ void ScrSpecial_SaveBardSongLyrics(void) StringCopy(bard->playerName, gSaveBlock2Ptr->playerName); - for (i = 0; i < 4; i++) + for (i = 0; i < TRAINER_ID_LENGTH; i++) bard->playerTrainerId[i] = gSaveBlock2Ptr->playerTrainerId[i]; - for (i = 0; i < 6; i++) + for (i = 0; i < BARD_SONG_LENGTH; i++) bard->songLyrics[i] = bard->temporaryLyrics[i]; bard->hasChangedSong = TRUE; @@ -248,15 +249,15 @@ void ScrSpecial_SetHipsterSpokenFlag(void) void ScrSpecial_HipsterTeachWord(void) { - u16 var = sub_811F01C(); + u16 phrase = GetNewHipsterPhraseToTeach(); - if (var == 0xFFFF) + if (phrase == 0xFFFF) { gSpecialVar_Result = FALSE; } else { - CopyEasyChatWord(gStringVar1, var); + CopyEasyChatWord(gStringVar1, phrase); gSpecialVar_Result = TRUE; } } @@ -458,7 +459,7 @@ static void BardSing(struct Task *task, struct BardSong *song) lyrics = bard->songLyrics; else lyrics = bard->temporaryLyrics; - for (i = 0; i < 6; i++) + for (i = 0; i < BARD_SONG_LENGTH; i++) song->lyrics[i] = lyrics[i]; song->currWord = 0; } @@ -690,7 +691,7 @@ void sub_8120B70(union OldMan * oldMan) case MAUVILLE_MAN_TRADER: { struct MauvilleOldManTrader * trader = &oldMan->trader; - for (i = 0; i < 4; i++) + for (i = 0; i < NUM_TRADER_ITEMS; i++) { if (trader->language[i] == LANGUAGE_JAPANESE) { @@ -702,17 +703,17 @@ void sub_8120B70(union OldMan * oldMan) case MAUVILLE_MAN_STORYTELLER: { struct MauvilleManStoryteller * storyteller = &oldMan->storyteller; - for (i = 0; i < 4; i++) + for (i = 0; i < NUM_STORYTELLER_TALES; i++) { if (storyteller->gameStatIDs[i] != 0) { - memcpy(sp00, storyteller->trainerNames[i], 7); - sp00[7] = EOS; + memcpy(sp00, storyteller->trainerNames[i], PLAYER_NAME_LENGTH); + sp00[PLAYER_NAME_LENGTH] = EOS; if (IsStringJapanese(sp00)) { - memset(sp00, CHAR_SPACE, 8); + memset(sp00, CHAR_SPACE, PLAYER_NAME_LENGTH + 1); StringCopy(sp00, gText_Friend); - memcpy(storyteller->trainerNames[i], sp00, 7); + memcpy(storyteller->trainerNames[i], sp00, PLAYER_NAME_LENGTH); storyteller->language[i] = GAME_LANGUAGE; } } @@ -732,7 +733,7 @@ void sub_8120C0C(union OldMan * oldMan, u32 r8, u32 r7, u32 r3) { struct MauvilleOldManTrader * trader = &oldMan->trader; - for (i = 0; i < 4; i++) + for (i = 0; i < NUM_TRADER_ITEMS; i++) { if (IsStringJapanese(trader->playerNames[i])) { @@ -749,7 +750,7 @@ void sub_8120C0C(union OldMan * oldMan, u32 r8, u32 r7, u32 r3) { struct MauvilleManStoryteller * storyteller = &oldMan->storyteller; - for (i = 0; i < 4; i++) + for (i = 0; i < NUM_STORYTELLER_TALES; i++) { if (IsStringJapanese(storyteller->trainerNames[i])) { @@ -803,12 +804,12 @@ void SanitizeReceivedEmeraldOldMan(union OldMan * oldMan, u32 version, u32 langu { struct MauvilleManStoryteller * storyteller = &oldMan->storyteller; - for (i = 0; i < 4; i++) + for (i = 0; i < NUM_STORYTELLER_TALES; i++) { if (storyteller->gameStatIDs[i] != 0) { - memcpy(sp00, storyteller->trainerNames[i], 7); - sp00[7] = EOS; + memcpy(sp00, storyteller->trainerNames[i], PLAYER_NAME_LENGTH); + sp00[PLAYER_NAME_LENGTH] = EOS; if (IsStringJapanese(sp00)) storyteller->language[i] = LANGUAGE_JAPANESE; else @@ -831,7 +832,7 @@ void SanitizeReceivedRubyOldMan(union OldMan * oldMan, u32 version, u32 language if (isRuby) { - for (i = 0; i < 4; i++) + for (i = 0; i < NUM_TRADER_ITEMS; i++) { u8 * str = trader->playerNames[i]; if (str[0] == EXT_CTRL_CODE_BEGIN && str[1] == EXT_CTRL_CODE_JPN) @@ -845,7 +846,7 @@ void SanitizeReceivedRubyOldMan(union OldMan * oldMan, u32 version, u32 language } else { - for (i = 0; i < 4; i++) + for (i = 0; i < NUM_TRADER_ITEMS; i++) { if (trader->language[i] == LANGUAGE_JAPANESE) { @@ -863,7 +864,7 @@ void SanitizeReceivedRubyOldMan(union OldMan * oldMan, u32 version, u32 language if (isRuby) { - for (i = 0; i < 4; i++) + for (i = 0; i < NUM_STORYTELLER_TALES; i++) { if (storyteller->gameStatIDs[i] != 0) storyteller->language[i] = language; @@ -914,42 +915,223 @@ struct Story }; static const struct Story sStorytellerStories[] = { - {GAME_STAT_NUM_UNION_ROOM_BATTLES, 1, MauvilleCity_PokemonCenter_1F_Text_28E930, MauvilleCity_PokemonCenter_1F_Text_28E947, MauvilleCity_PokemonCenter_1F_Text_28E956}, - {GAME_STAT_STARTED_TRENDS, 1, MauvilleCity_PokemonCenter_1F_Text_28E9D7, MauvilleCity_PokemonCenter_1F_Text_28E9EF, MauvilleCity_PokemonCenter_1F_Text_28E9FE}, - {GAME_STAT_PLANTED_BERRIES, 1, MauvilleCity_PokemonCenter_1F_Text_28EA7D, MauvilleCity_PokemonCenter_1F_Text_28EA98, MauvilleCity_PokemonCenter_1F_Text_28EAA8}, - {GAME_STAT_TRADED_BIKES, 1, MauvilleCity_PokemonCenter_1F_Text_28EB19, MauvilleCity_PokemonCenter_1F_Text_28EB31, MauvilleCity_PokemonCenter_1F_Text_28EB3E}, - {GAME_STAT_GOT_INTERVIEWED, 1, MauvilleCity_PokemonCenter_1F_Text_28EBB5, MauvilleCity_PokemonCenter_1F_Text_28EBCD, MauvilleCity_PokemonCenter_1F_Text_28EBDD}, - {GAME_STAT_TRAINER_BATTLES, 1, MauvilleCity_PokemonCenter_1F_Text_28EC60, MauvilleCity_PokemonCenter_1F_Text_28EC79, MauvilleCity_PokemonCenter_1F_Text_28EC81}, - {GAME_STAT_POKEMON_CAPTURES, 1, MauvilleCity_PokemonCenter_1F_Text_28ED04, MauvilleCity_PokemonCenter_1F_Text_28ED21, MauvilleCity_PokemonCenter_1F_Text_28ED30}, - {GAME_STAT_FISHING_CAPTURES, 1, MauvilleCity_PokemonCenter_1F_Text_28EDA1, MauvilleCity_PokemonCenter_1F_Text_28EDB5, MauvilleCity_PokemonCenter_1F_Text_28EDCF}, - {GAME_STAT_HATCHED_EGGS, 1, MauvilleCity_PokemonCenter_1F_Text_28EE45, MauvilleCity_PokemonCenter_1F_Text_28EE5D, MauvilleCity_PokemonCenter_1F_Text_28EE6A}, - {GAME_STAT_EVOLVED_POKEMON, 1, MauvilleCity_PokemonCenter_1F_Text_28EEDD, MauvilleCity_PokemonCenter_1F_Text_28EEF1, MauvilleCity_PokemonCenter_1F_Text_28EF01}, - {GAME_STAT_USED_POKECENTER, 1, MauvilleCity_PokemonCenter_1F_Text_28EF73, MauvilleCity_PokemonCenter_1F_Text_28EF95, MauvilleCity_PokemonCenter_1F_Text_28EFAA}, - {GAME_STAT_RESTED_AT_HOME, 1, MauvilleCity_PokemonCenter_1F_Text_28F045, MauvilleCity_PokemonCenter_1F_Text_28F05A, MauvilleCity_PokemonCenter_1F_Text_28F071}, - {GAME_STAT_ENTERED_SAFARI_ZONE, 1, MauvilleCity_PokemonCenter_1F_Text_28F0F3, MauvilleCity_PokemonCenter_1F_Text_28F10D, MauvilleCity_PokemonCenter_1F_Text_28F125}, - {GAME_STAT_USED_CUT, 1, MauvilleCity_PokemonCenter_1F_Text_28F1BE, MauvilleCity_PokemonCenter_1F_Text_28F1D5, MauvilleCity_PokemonCenter_1F_Text_28F1DE}, - {GAME_STAT_USED_ROCK_SMASH, 1, MauvilleCity_PokemonCenter_1F_Text_28F24F, MauvilleCity_PokemonCenter_1F_Text_28F269, MauvilleCity_PokemonCenter_1F_Text_28F277}, - {GAME_STAT_MOVED_SECRET_BASE, 1, MauvilleCity_PokemonCenter_1F_Text_28F2FC, MauvilleCity_PokemonCenter_1F_Text_28F314, MauvilleCity_PokemonCenter_1F_Text_28F32A}, - {GAME_STAT_USED_SPLASH, 1, MauvilleCity_PokemonCenter_1F_Text_28F3AD, MauvilleCity_PokemonCenter_1F_Text_28F3C6, MauvilleCity_PokemonCenter_1F_Text_28F3D2}, - {GAME_STAT_USED_STRUGGLE, 1, MauvilleCity_PokemonCenter_1F_Text_28F44B, MauvilleCity_PokemonCenter_1F_Text_28F461, MauvilleCity_PokemonCenter_1F_Text_28F47C}, - {GAME_STAT_SLOT_JACKPOTS, 1, MauvilleCity_PokemonCenter_1F_Text_28F50C, MauvilleCity_PokemonCenter_1F_Text_28F51B, MauvilleCity_PokemonCenter_1F_Text_28F538}, - {GAME_STAT_CONSECUTIVE_ROULETTE_WINS, 2, MauvilleCity_PokemonCenter_1F_Text_28F5BE, MauvilleCity_PokemonCenter_1F_Text_28F5D1, MauvilleCity_PokemonCenter_1F_Text_28F5F2}, - {GAME_STAT_ENTERED_BATTLE_TOWER, 1, MauvilleCity_PokemonCenter_1F_Text_28F678, MauvilleCity_PokemonCenter_1F_Text_28F694, MauvilleCity_PokemonCenter_1F_Text_28F6B4}, - {GAME_STAT_POKEBLOCKS, 1, MauvilleCity_PokemonCenter_1F_Text_28F751, MauvilleCity_PokemonCenter_1F_Text_28F76A, MauvilleCity_PokemonCenter_1F_Text_28F776}, - {GAME_STAT_ENTERED_CONTEST, 1, MauvilleCity_PokemonCenter_1F_Text_28F7F6, MauvilleCity_PokemonCenter_1F_Text_28F811, MauvilleCity_PokemonCenter_1F_Text_28F822}, - {GAME_STAT_WON_CONTEST, 1, MauvilleCity_PokemonCenter_1F_Text_28F89C, MauvilleCity_PokemonCenter_1F_Text_28F8AF, MauvilleCity_PokemonCenter_1F_Text_28F8BC}, - {GAME_STAT_SHOPPED, 1, MauvilleCity_PokemonCenter_1F_Text_28F92F, MauvilleCity_PokemonCenter_1F_Text_28F941, MauvilleCity_PokemonCenter_1F_Text_28F949}, - {GAME_STAT_USED_ITEMFINDER, 1, MauvilleCity_PokemonCenter_1F_Text_28F9D1, MauvilleCity_PokemonCenter_1F_Text_28F9EA, MauvilleCity_PokemonCenter_1F_Text_28F9FD}, - {GAME_STAT_GOT_RAINED_ON, 1, MauvilleCity_PokemonCenter_1F_Text_28FA81, MauvilleCity_PokemonCenter_1F_Text_28FA99, MauvilleCity_PokemonCenter_1F_Text_28FAA7}, - {GAME_STAT_CHECKED_POKEDEX, 1, MauvilleCity_PokemonCenter_1F_Text_28FB1D, MauvilleCity_PokemonCenter_1F_Text_28FB35, MauvilleCity_PokemonCenter_1F_Text_28FB47}, - {GAME_STAT_RECEIVED_RIBBONS, 1, MauvilleCity_PokemonCenter_1F_Text_28FBC4, MauvilleCity_PokemonCenter_1F_Text_28FBD9, MauvilleCity_PokemonCenter_1F_Text_28FBEA}, - {GAME_STAT_JUMPED_DOWN_LEDGES, 1, MauvilleCity_PokemonCenter_1F_Text_28FC6B, MauvilleCity_PokemonCenter_1F_Text_28FC85, MauvilleCity_PokemonCenter_1F_Text_28FC98}, - {GAME_STAT_WATCHED_TV, 1, MauvilleCity_PokemonCenter_1F_Text_28FD1D, MauvilleCity_PokemonCenter_1F_Text_28FD35, MauvilleCity_PokemonCenter_1F_Text_28FD40}, - {GAME_STAT_CHECKED_CLOCK, 1, MauvilleCity_PokemonCenter_1F_Text_28FDA2, MauvilleCity_PokemonCenter_1F_Text_28FDBD, MauvilleCity_PokemonCenter_1F_Text_28FDCE}, - {GAME_STAT_WON_POKEMON_LOTTERY, 1, MauvilleCity_PokemonCenter_1F_Text_28FE57, MauvilleCity_PokemonCenter_1F_Text_28FE72, MauvilleCity_PokemonCenter_1F_Text_28FE88}, - {GAME_STAT_USED_DAYCARE, 1, MauvilleCity_PokemonCenter_1F_Text_28FF0C, MauvilleCity_PokemonCenter_1F_Text_28FF27, MauvilleCity_PokemonCenter_1F_Text_28FF44}, - {GAME_STAT_RODE_CABLE_CAR, 1, MauvilleCity_PokemonCenter_1F_Text_28FFDD, MauvilleCity_PokemonCenter_1F_Text_28FFFA, MauvilleCity_PokemonCenter_1F_Text_29000D}, - {GAME_STAT_ENTERED_HOT_SPRINGS, 1, MauvilleCity_PokemonCenter_1F_Text_290097, MauvilleCity_PokemonCenter_1F_Text_2900B5, MauvilleCity_PokemonCenter_1F_Text_2900CB} + // The 50 below is replaced with GAME_STAT_SAVED_GAME + { + 50, 1, + MauvilleCity_PokemonCenter_1F_Text_SavedGameTitle, + MauvilleCity_PokemonCenter_1F_Text_SavedGameAction, + MauvilleCity_PokemonCenter_1F_Text_SavedGameStory + }, + { + GAME_STAT_STARTED_TRENDS, 1, + MauvilleCity_PokemonCenter_1F_Text_TrendsStartedTitle, + MauvilleCity_PokemonCenter_1F_Text_TrendsStartedAction, + MauvilleCity_PokemonCenter_1F_Text_TrendsStartedStory + }, + { + GAME_STAT_PLANTED_BERRIES, 1, + MauvilleCity_PokemonCenter_1F_Text_BerriesPlantedTitle, + MauvilleCity_PokemonCenter_1F_Text_BerriesPlantedAction, + MauvilleCity_PokemonCenter_1F_Text_BerriesPlantedStory + }, + { + GAME_STAT_TRADED_BIKES, 1, + MauvilleCity_PokemonCenter_1F_Text_BikeTradesTitle, + MauvilleCity_PokemonCenter_1F_Text_BikeTradesAction, + MauvilleCity_PokemonCenter_1F_Text_BikeTradesStory + }, + { + GAME_STAT_GOT_INTERVIEWED, 1, + MauvilleCity_PokemonCenter_1F_Text_InterviewsTitle, + MauvilleCity_PokemonCenter_1F_Text_InterviewsAction, + MauvilleCity_PokemonCenter_1F_Text_InterviewsStory + }, + { + GAME_STAT_TRAINER_BATTLES, 1, + MauvilleCity_PokemonCenter_1F_Text_TrainerBattlesTitle, + MauvilleCity_PokemonCenter_1F_Text_TrainerBattlesAction, + MauvilleCity_PokemonCenter_1F_Text_TrainerBattlesStory + }, + { + GAME_STAT_POKEMON_CAPTURES, 1, + MauvilleCity_PokemonCenter_1F_Text_PokemonCaughtTitle, + MauvilleCity_PokemonCenter_1F_Text_PokemonCaughtAction, + MauvilleCity_PokemonCenter_1F_Text_PokemonCaughtStory + }, + { + GAME_STAT_FISHING_CAPTURES, 1, + MauvilleCity_PokemonCenter_1F_Text_FishingPokemonCaughtTitle, + MauvilleCity_PokemonCenter_1F_Text_FishingPokemonCaughtAction, + MauvilleCity_PokemonCenter_1F_Text_FishingPokemonCaughtStory + }, + { + GAME_STAT_HATCHED_EGGS, 1, + MauvilleCity_PokemonCenter_1F_Text_EggsHatchedTitle, + MauvilleCity_PokemonCenter_1F_Text_EggsHatchedAction, + MauvilleCity_PokemonCenter_1F_Text_EggsHatchedStory + }, + { + GAME_STAT_EVOLVED_POKEMON, 1, + MauvilleCity_PokemonCenter_1F_Text_PokemonEvolvedTitle, + MauvilleCity_PokemonCenter_1F_Text_PokemonEvolvedAction, + MauvilleCity_PokemonCenter_1F_Text_PokemonEvolvedStory + }, + { + GAME_STAT_USED_POKECENTER, 1, + MauvilleCity_PokemonCenter_1F_Text_UsedPokemonCenterTitle, + MauvilleCity_PokemonCenter_1F_Text_UsedPokemonCenterAction, + MauvilleCity_PokemonCenter_1F_Text_UsedPokemonCenterStory + }, + { + GAME_STAT_RESTED_AT_HOME, 1, + MauvilleCity_PokemonCenter_1F_Text_RestedAtHomeTitle, + MauvilleCity_PokemonCenter_1F_Text_RestedAtHomeAction, + MauvilleCity_PokemonCenter_1F_Text_RestedAtHomeStory + }, + { + GAME_STAT_ENTERED_SAFARI_ZONE, 1, + MauvilleCity_PokemonCenter_1F_Text_SafariGamesTitle, + MauvilleCity_PokemonCenter_1F_Text_SafariGamesAction, + MauvilleCity_PokemonCenter_1F_Text_SafariGamesStory + }, + { + GAME_STAT_USED_CUT, 1, + MauvilleCity_PokemonCenter_1F_Text_UsedCutTitle, + MauvilleCity_PokemonCenter_1F_Text_UsedCutAction, + MauvilleCity_PokemonCenter_1F_Text_UsedCutStory + }, + { + GAME_STAT_USED_ROCK_SMASH, 1, + MauvilleCity_PokemonCenter_1F_Text_UsedRockSmashTitle, + MauvilleCity_PokemonCenter_1F_Text_UsedRockSmashAction, + MauvilleCity_PokemonCenter_1F_Text_UsedRockSmashStory + }, + { + GAME_STAT_MOVED_SECRET_BASE, 1, + MauvilleCity_PokemonCenter_1F_Text_MovedBasesTitle, + MauvilleCity_PokemonCenter_1F_Text_MovedBasesAction, + MauvilleCity_PokemonCenter_1F_Text_MovedBasesStory + }, + { + GAME_STAT_USED_SPLASH, 1, + MauvilleCity_PokemonCenter_1F_Text_UsedSplashTitle, + MauvilleCity_PokemonCenter_1F_Text_UsedSplashAction, + MauvilleCity_PokemonCenter_1F_Text_UsedSplashStory + }, + { + GAME_STAT_USED_STRUGGLE, 1, + MauvilleCity_PokemonCenter_1F_Text_UsedStruggleTitle, + MauvilleCity_PokemonCenter_1F_Text_UsedStruggleAction, + MauvilleCity_PokemonCenter_1F_Text_UsedStruggleStory + }, + { + GAME_STAT_SLOT_JACKPOTS, 1, + MauvilleCity_PokemonCenter_1F_Text_SlotJackpotsTitle, + MauvilleCity_PokemonCenter_1F_Text_SlotJackpotsAction, + MauvilleCity_PokemonCenter_1F_Text_SlotJackpotsStory + }, + { + GAME_STAT_CONSECUTIVE_ROULETTE_WINS, 2, + MauvilleCity_PokemonCenter_1F_Text_RouletteWinsTitle, + MauvilleCity_PokemonCenter_1F_Text_RouletteWinsAction, + MauvilleCity_PokemonCenter_1F_Text_RouletteWinsStory + }, + { + GAME_STAT_ENTERED_BATTLE_TOWER, 1, + MauvilleCity_PokemonCenter_1F_Text_BattleTowerChallengesTitle, + MauvilleCity_PokemonCenter_1F_Text_BattleTowerChallengesAction, + MauvilleCity_PokemonCenter_1F_Text_BattleTowerChallengesStory + }, + { + GAME_STAT_POKEBLOCKS, 1, + MauvilleCity_PokemonCenter_1F_Text_MadePokeblocksTitle, + MauvilleCity_PokemonCenter_1F_Text_MadePokeblocksAction, + MauvilleCity_PokemonCenter_1F_Text_MadePokeblocksStory + }, + { + GAME_STAT_ENTERED_CONTEST, 1, + MauvilleCity_PokemonCenter_1F_Text_EnteredContestsTitle, + MauvilleCity_PokemonCenter_1F_Text_EnteredContestsAction, + MauvilleCity_PokemonCenter_1F_Text_EnteredContestsStory + }, + { + GAME_STAT_WON_CONTEST, 1, + MauvilleCity_PokemonCenter_1F_Text_WonContestsTitle, + MauvilleCity_PokemonCenter_1F_Text_WonContestsAction, + MauvilleCity_PokemonCenter_1F_Text_WonContestsStory + }, + { + GAME_STAT_SHOPPED, 1, + MauvilleCity_PokemonCenter_1F_Text_TimesShoppedTitle, + MauvilleCity_PokemonCenter_1F_Text_TimesShoppedAction, + MauvilleCity_PokemonCenter_1F_Text_TimesShoppedStory + }, + { + GAME_STAT_USED_ITEMFINDER, 1, + MauvilleCity_PokemonCenter_1F_Text_UsedItemFinderTitle, + MauvilleCity_PokemonCenter_1F_Text_UsedItemFinderAction, + MauvilleCity_PokemonCenter_1F_Text_UsedItemFinderStory + }, + { + GAME_STAT_GOT_RAINED_ON, 1, + MauvilleCity_PokemonCenter_1F_Text_TimesRainedTitle, + MauvilleCity_PokemonCenter_1F_Text_TimesRainedAction, + MauvilleCity_PokemonCenter_1F_Text_TimesRainedStory + }, + { + GAME_STAT_CHECKED_POKEDEX, 1, + MauvilleCity_PokemonCenter_1F_Text_CheckedPokedexTitle, + MauvilleCity_PokemonCenter_1F_Text_CheckedPokedexAction, + MauvilleCity_PokemonCenter_1F_Text_CheckedPokedexStory + }, + { + GAME_STAT_RECEIVED_RIBBONS, 1, + MauvilleCity_PokemonCenter_1F_Text_ReceivedRibbonsTitle, + MauvilleCity_PokemonCenter_1F_Text_ReceivedRibbonsAction, + MauvilleCity_PokemonCenter_1F_Text_ReceivedRibbonsStory + }, + { + GAME_STAT_JUMPED_DOWN_LEDGES, 1, + MauvilleCity_PokemonCenter_1F_Text_LedgesJumpedTitle, + MauvilleCity_PokemonCenter_1F_Text_LedgesJumpedAction, + MauvilleCity_PokemonCenter_1F_Text_LedgesJumpedStory + }, + { + GAME_STAT_WATCHED_TV, 1, + MauvilleCity_PokemonCenter_1F_Text_TVWatchedTitle, + MauvilleCity_PokemonCenter_1F_Text_TVWatchedAction, + MauvilleCity_PokemonCenter_1F_Text_TVWatchedStory + }, + { + GAME_STAT_CHECKED_CLOCK, 1, + MauvilleCity_PokemonCenter_1F_Text_CheckedClockTitle, + MauvilleCity_PokemonCenter_1F_Text_CheckedClockAction, + MauvilleCity_PokemonCenter_1F_Text_CheckedClockStory + }, + { + GAME_STAT_WON_POKEMON_LOTTERY, 1, + MauvilleCity_PokemonCenter_1F_Text_WonLotteryTitle, + MauvilleCity_PokemonCenter_1F_Text_WonLotteryAction, + MauvilleCity_PokemonCenter_1F_Text_WonLotteryStory + }, + { + GAME_STAT_USED_DAYCARE, 1, + MauvilleCity_PokemonCenter_1F_Text_UsedDaycareTitle, + MauvilleCity_PokemonCenter_1F_Text_UsedDaycareAction, + MauvilleCity_PokemonCenter_1F_Text_UsedDaycareStory + }, + { + GAME_STAT_RODE_CABLE_CAR, 1, + MauvilleCity_PokemonCenter_1F_Text_RodeCableCarTitle, + MauvilleCity_PokemonCenter_1F_Text_RodeCableCarAction, + MauvilleCity_PokemonCenter_1F_Text_RodeCableCarStory + }, + { + GAME_STAT_ENTERED_HOT_SPRINGS, 1, + MauvilleCity_PokemonCenter_1F_Text_HotSpringsTitle, + MauvilleCity_PokemonCenter_1F_Text_HotSpringsAction, + MauvilleCity_PokemonCenter_1F_Text_HotSpringsStory + } }; static void StorytellerSetup(void) @@ -959,7 +1141,7 @@ static void StorytellerSetup(void) sStorytellerPtr->id = MAUVILLE_MAN_STORYTELLER; sStorytellerPtr->alreadyRecorded = FALSE; - for (i = 0; i < 4; i++) + for (i = 0; i < NUM_STORYTELLER_TALES; i++) { sStorytellerPtr->gameStatIDs[i] = 0; sStorytellerPtr->trainerNames[0][i] = EOS; // Maybe they meant storyteller->trainerNames[i][0] instead? @@ -977,7 +1159,7 @@ static void Storyteller_ResetFlag(void) static u32 StorytellerGetGameStat(u8 stat) { if (stat == 50) - stat = 0; + stat = GAME_STAT_SAVED_GAME; return GetGameStat(stat); } @@ -985,12 +1167,12 @@ static const struct Story *GetStoryByStat(u32 stat) { s32 i; - for (i = 0; i < 36; i++) + for (i = 0; i < (int)ARRAY_COUNT(sStorytellerStories); i++) { if (sStorytellerStories[i].stat == stat) return &sStorytellerStories[i]; } - return &sStorytellerStories[35]; + return &sStorytellerStories[ARRAY_COUNT(sStorytellerStories) - 1]; } static const u8 *GetStoryTitleByStat(u32 stat) @@ -1012,7 +1194,7 @@ static u8 GetFreeStorySlot(void) { u8 i; - for (i = 0; i < 4; i++) + for (i = 0; i < NUM_STORYTELLER_TALES; i++) { if (sStorytellerPtr->gameStatIDs[i] == 0) break; @@ -1049,15 +1231,15 @@ static void GetStoryByStattellerPlayerName(u32 player, void *dst) { u8 *name = sStorytellerPtr->trainerNames[player]; - memset(dst, EOS, 8); - memcpy(dst, name, 7); + memset(dst, EOS, PLAYER_NAME_LENGTH + 1); + memcpy(dst, name, PLAYER_NAME_LENGTH); } static void StorytellerSetPlayerName(u32 player, const u8 * src) { u8 * name = sStorytellerPtr->trainerNames[player]; - memset(name, EOS, 7); - memcpy(name, src, 7); + memset(name, EOS, PLAYER_NAME_LENGTH); + memcpy(name, src, PLAYER_NAME_LENGTH); } @@ -1110,15 +1292,15 @@ static bool8 StorytellerInitializeRandomStat(void) u8 stat = sStorytellerStories[arr[i]].stat; u8 minVal = sStorytellerStories[arr[i]].minVal; - for (j = 0; j < 4; j++) + for (j = 0; j < NUM_STORYTELLER_TALES; j++) { if (sStorytellerPtr->gameStatIDs[j] == stat) break; } - if (j == 4 && StorytellerGetGameStat(stat) >= minVal) + if (j == NUM_STORYTELLER_TALES && StorytellerGetGameStat(stat) >= minVal) { sStorytellerPtr->alreadyRecorded = TRUE; - if (GetFreeStorySlot() == 4) + if (GetFreeStorySlot() == NUM_STORYTELLER_TALES) StorytellerRecordNewStat(sSelectedStory, stat); else StorytellerRecordNewStat(GetFreeStorySlot(), stat); @@ -1144,7 +1326,7 @@ static void PrintStoryList(void) s32 i; s32 width = GetStringWidth(1, gText_Exit, 0); u8 tileWidth; - for (i = 0; i < 4; i++) + for (i = 0; i < NUM_STORYTELLER_TALES; i++) { s32 curWidth; u16 gameStatID = sStorytellerPtr->gameStatIDs[i]; @@ -1157,7 +1339,7 @@ static void PrintStoryList(void) } sStorytellerWindowId = CreateWindowFromRect(0, 0, ConvertPixelWidthToTileWidth(width), GetFreeStorySlot() * 2 + 2); SetStandardWindowBorderStyle(sStorytellerWindowId, 0); - for (i = 0; i < 4; i++) + for (i = 0; i < NUM_STORYTELLER_TALES; i++) { u16 gameStatID = sStorytellerPtr->gameStatIDs[i]; if (gameStatID == 0) @@ -1169,7 +1351,7 @@ static void PrintStoryList(void) CopyWindowToVram(sStorytellerWindowId, 3); } -static void Task_StoryListMenu(u8 taskId) // Task_StoryListMenu +static void Task_StoryListMenu(u8 taskId) { struct Task *task = &gTasks[taskId]; s32 selection; diff --git a/src/mystery_event_script.c b/src/mystery_event_script.c index dba914b512..76f340c605 100644 --- a/src/mystery_event_script.c +++ b/src/mystery_event_script.c @@ -286,7 +286,7 @@ bool8 MEScrCmd_givenationaldex(struct ScriptContext *ctx) bool8 MEScrCmd_addrareword(struct ScriptContext *ctx) { - sub_811EFC0(ScriptReadByte(ctx)); + UnlockAdditionalPhrase(ScriptReadByte(ctx)); StringExpandPlaceholders(gStringVar4, gText_MysteryGiftRareWord); ctx->data[2] = 2; return FALSE; diff --git a/src/record_mixing.c b/src/record_mixing.c index 8df0a8a8b7..8a1e8b1ee7 100644 --- a/src/record_mixing.c +++ b/src/record_mixing.c @@ -631,7 +631,7 @@ static void ReceiveOldManData(OldMan *oldMan, size_t recordSize, u8 which) u8 version; u16 language; OldMan *dest; - u32 mixIndices[4]; + u32 mixIndices[MAX_LINK_PLAYERS]; ShufflePlayerIndices(mixIndices); dest = (void *)oldMan + recordSize * mixIndices[which]; diff --git a/src/trader.c b/src/trader.c index a3794a5399..e0b780d259 100644 --- a/src/trader.c +++ b/src/trader.c @@ -1,6 +1,6 @@ #include "global.h" #include "constants/decorations.h" -#include "constants/mauville_man.h" +#include "constants/mauville_old_man.h" #include "decoration.h" #include "decoration_inventory.h" #include "event_data.h" @@ -86,7 +86,7 @@ void CreateAvailableDecorationsMenu(u8 taskId) schedule_bg_copy_tilemap_to_vram(0); } -void sub_8133BE4(u8 taskId, u8 decorationId) +void Task_BufferDecorSelectionAndCloseWindow(u8 taskId, u8 decorationId) { s16 * data = gTasks[taskId].data; if (decorationId > NUM_DECORATIONS) @@ -118,14 +118,14 @@ void Task_HandleGetDecorationMenuInput(u8 taskId) case MENU_B_PRESSED: case 4: PlaySE(SE_SELECT); - sub_8133BE4(taskId, 0); + Task_BufferDecorSelectionAndCloseWindow(taskId, 0); break; default: PlaySE(SE_SELECT); gSpecialVar_0x8005 = input; StringCopy(gStringVar1, trader->playerNames[input]); ConvertInternationalString(gStringVar1, trader->language[input]); - sub_8133BE4(taskId, trader->decorIds[input]); + Task_BufferDecorSelectionAndCloseWindow(taskId, trader->decorIds[input]); break; } } From 5b845bb0a09973e1d04995900b67f342990358b2 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Mon, 21 Oct 2019 18:09:57 -0400 Subject: [PATCH 14/46] Review changes for #852 --- src/mauville_old_man.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/mauville_old_man.c b/src/mauville_old_man.c index 4c3066e04e..add48efd86 100644 --- a/src/mauville_old_man.c +++ b/src/mauville_old_man.c @@ -684,7 +684,7 @@ void ScrSpecial_SetMauvilleOldManEventObjGfx(void) void sub_8120B70(union OldMan * oldMan) { s32 i; - u8 sp00[8]; + u8 playerName[PLAYER_NAME_LENGTH + 1]; switch (oldMan->common.id) { @@ -707,13 +707,13 @@ void sub_8120B70(union OldMan * oldMan) { if (storyteller->gameStatIDs[i] != 0) { - memcpy(sp00, storyteller->trainerNames[i], PLAYER_NAME_LENGTH); - sp00[PLAYER_NAME_LENGTH] = EOS; - if (IsStringJapanese(sp00)) + memcpy(playerName, storyteller->trainerNames[i], PLAYER_NAME_LENGTH); + playerName[PLAYER_NAME_LENGTH] = EOS; + if (IsStringJapanese(playerName)) { - memset(sp00, CHAR_SPACE, PLAYER_NAME_LENGTH + 1); - StringCopy(sp00, gText_Friend); - memcpy(storyteller->trainerNames[i], sp00, PLAYER_NAME_LENGTH); + memset(playerName, CHAR_SPACE, PLAYER_NAME_LENGTH + 1); + StringCopy(playerName, gText_Friend); + memcpy(storyteller->trainerNames[i], playerName, PLAYER_NAME_LENGTH); storyteller->language[i] = GAME_LANGUAGE; } } @@ -798,7 +798,7 @@ void sub_8120C0C(union OldMan * oldMan, u32 r8, u32 r7, u32 r3) void SanitizeReceivedEmeraldOldMan(union OldMan * oldMan, u32 version, u32 language) { - u8 sp00[8]; + u8 playerName[PLAYER_NAME_LENGTH + 1]; s32 i; if (oldMan->common.id == MAUVILLE_MAN_STORYTELLER && language == LANGUAGE_JAPANESE) { @@ -808,9 +808,9 @@ void SanitizeReceivedEmeraldOldMan(union OldMan * oldMan, u32 version, u32 langu { if (storyteller->gameStatIDs[i] != 0) { - memcpy(sp00, storyteller->trainerNames[i], PLAYER_NAME_LENGTH); - sp00[PLAYER_NAME_LENGTH] = EOS; - if (IsStringJapanese(sp00)) + memcpy(playerName, storyteller->trainerNames[i], PLAYER_NAME_LENGTH); + playerName[PLAYER_NAME_LENGTH] = EOS; + if (IsStringJapanese(playerName)) storyteller->language[i] = LANGUAGE_JAPANESE; else storyteller->language[i] = GAME_LANGUAGE; From c70162086bdbc952716521fdfc05d50b7ee3b4a3 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Mon, 21 Oct 2019 06:46:57 -0400 Subject: [PATCH 15/46] Split some smaller files from event_scripts --- data/event_scripts.s | 605 +----------------------------- data/scripts/flash.inc | 4 + data/scripts/obtain_item.inc | 208 ++++++++++ data/scripts/pc_transfer.inc | 55 +++ data/scripts/record_mix.inc | 22 ++ data/scripts/repel.inc | 6 + data/scripts/rival_graphics.inc | 48 +++ data/scripts/set_gym_trainers.inc | 92 +++++ data/scripts/surf.inc | 18 + data/scripts/test_signpost.inc | 7 + data/scripts/trainer_battle.inc | 4 + data/scripts/trainer_script.inc | 23 ++ data/text/mart_attendant.inc | 10 + data/text/obtain_item.inc | 31 ++ data/text/pc_transfer.inc | 31 ++ data/text/record_mix.inc | 6 + data/text/save.inc | 1 + 17 files changed, 585 insertions(+), 586 deletions(-) create mode 100644 data/scripts/flash.inc create mode 100644 data/scripts/obtain_item.inc create mode 100644 data/scripts/pc_transfer.inc create mode 100644 data/scripts/record_mix.inc create mode 100644 data/scripts/repel.inc create mode 100644 data/scripts/rival_graphics.inc create mode 100644 data/scripts/set_gym_trainers.inc create mode 100644 data/scripts/surf.inc create mode 100644 data/scripts/test_signpost.inc create mode 100644 data/scripts/trainer_script.inc create mode 100644 data/text/mart_attendant.inc create mode 100644 data/text/obtain_item.inc create mode 100644 data/text/pc_transfer.inc create mode 100644 data/text/record_mix.inc diff --git a/data/event_scripts.s b/data/event_scripts.s index 79dfb5a0dd..bf70660512 100644 --- a/data/event_scripts.s +++ b/data/event_scripts.s @@ -585,6 +585,7 @@ gStdScripts_End:: @ 81DC2CC .include "data/maps/Route119_House/scripts.inc" .include "data/maps/Route124_DivingTreasureHuntersHouse/scripts.inc" +@ Below could be split as std_msgbox.inc but autoclose straddles trainer_battle.inc Std_MsgboxNPC: @ 8271315 lock faceplayer @@ -634,10 +635,6 @@ Common_EventScript_SaveGame:: @ 827134F waitstate return -EventScript_271354:: @ 8271354 - cmdD8 - cmdD9 - .include "data/scripts/trainer_battle.inc" Std_MsgboxAutoclose:: @ 8271494 @@ -649,6 +646,7 @@ Std_MsgboxAutoclose:: @ 8271494 .include "data/scripts/new_game.inc" +@ Below seems to be hall_of_fame.inc and briney.inc together? EverGrandeCity_HallOfFame_EventScript_2717C1:: @ 82717C1 special sub_81AFDD0 setflag FLAG_IS_CHAMPION @@ -778,241 +776,11 @@ EventScript_SetBrineyLocation_Route108:: @ 8271918 return .include "data/scripts/pkmn_center_nurse.inc" - -Std_ObtainItem:: @ 8271AD3 - giveitem VAR_0x8000, VAR_0x8001 - copyvar VAR_0x8007, VAR_RESULT - call EventScript_271AE3 - return - -EventScript_271AE3:: @ 8271AE3 - bufferitemnameplural 1, VAR_0x8000, VAR_0x8001 - checkitemtype VAR_0x8000 - call EventScript_BufferStdString - compare VAR_0x8007, 1 - call_if_eq EventScript_271B95 - compare VAR_0x8007, 0 - call_if_eq EventScript_271BA9 - return - -EventScript_BufferStdString:: @ 8271B08 - switch VAR_RESULT - case POCKET_ITEMS, EventScript_StdStringItem - case POCKET_KEY_ITEMS, EventScript_StdStringKeyItems - case POCKET_POKE_BALLS, EventScript_StdStringPokeballs - case POCKET_TM_HM, EventScript_StdStringTMHMS - case POCKET_BERRIES, EventScript_StdStringBerries - end - -EventScript_StdStringItem:: @ 8271B45 - bufferstdstring 2, STDSTRING_ITEMS - compare VAR_0x8007, 1 - call_if_eq EventScript_PlayFanfare4 - return - -EventScript_StdStringKeyItems:: @ 8271B55 - bufferstdstring 2, STDSTRING_KEYITEMS - compare VAR_0x8007, 1 - call_if_eq EventScript_PlayFanfare4 - return - -EventScript_StdStringPokeballs:: @ 8271B65 - bufferstdstring 2, STDSTRING_POKEBALLS - compare VAR_0x8007, 1 - call_if_eq EventScript_PlayFanfare4 - return - -EventScript_StdStringTMHMS:: @ 8271B75 - bufferstdstring 2, STDSTRING_TMHMS - compare VAR_0x8007, 1 - call_if_eq EventScript_271BB3 - return - -EventScript_StdStringBerries:: @ 8271B85 - bufferstdstring 2, STDSTRING_BERRIES - compare VAR_0x8007, 1 - call_if_eq EventScript_PlayFanfare4 - return - -EventScript_271B95:: @ 8271B95 - message gText_ObtainedTheItem - waitfanfare - msgbox gText_PutItemInPocket, MSGBOX_DEFAULT - setvar VAR_RESULT, 1 - return - -EventScript_271BA9:: @ 8271BA9 - setvar VAR_RESULT, 0 - return - -EventScript_PlayFanfare4:: @ 8271BAF - playfanfare MUS_FANFA4 - return - -EventScript_271BB3:: @ 8271BB3 - playfanfare MUS_ME_WAZA - return - -Std_ObtainDecoration:: @ 8271BB7 - givedecoration VAR_0x8000 - copyvar VAR_0x8007, VAR_RESULT - call EventScript_271BC5 - return - -EventScript_271BC5:: @ 8271BC5 - bufferdecorationname 1, VAR_0x8000 - compare VAR_0x8007, 1 - call_if_eq EventScript_271BE0 - compare VAR_0x8007, 0 - call_if_eq EventScript_271BF7 - return - -EventScript_271BE0:: @ 8271BE0 - playfanfare MUS_FANFA4 - message gText_ObtainedTheMon - waitfanfare - msgbox gText_TheMonWasTransferredToThePC, MSGBOX_DEFAULT - setvar VAR_RESULT, 1 - return - -EventScript_271BF7:: @ 8271BF7 - setvar VAR_RESULT, 0 - return - -Std_FindItem:: @ 8271BFD - lock - faceplayer - waitse - copyvar VAR_0x8004, VAR_0x8000 - copyvar VAR_0x8005, VAR_0x8001 - checkitemspace VAR_0x8000, VAR_0x8001 - copyvar VAR_0x8007, VAR_RESULT - bufferitemnameplural 1, VAR_0x8000, VAR_0x8001 - checkitemtype VAR_0x8000 - call EventScript_BufferStdString - compare VAR_0x8007, 1 - call_if_eq EventScript_PickItemUp - compare VAR_0x8007, 0 - call_if_eq EventScript_271CA1 - release - return - -EventScript_PickItemUp:: @ 8271C3A - removeobject VAR_LAST_TALKED - giveitem VAR_0x8004, VAR_0x8005 - specialvar VAR_RESULT, BufferTMHMMoveName - copyvar VAR_0x8008, VAR_RESULT - compare VAR_0x8008, 1 - call_if_eq EventScript_271C8F - compare VAR_0x8008, 0 - call_if_eq EventScript_271C9B - waitfanfare - waitmessage - bufferitemnameplural 1, VAR_0x8004, VAR_0x8005 - setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_IS_IN - special CallBattlePyramidFunction - compare VAR_RESULT, 1 - goto_if_eq EventScript_271C86 - msgbox gText_PutItemInPocket, MSGBOX_DEFAULT - return - -EventScript_271C86:: @ 8271C86 - msgbox gText_PlayerPutItemInBag, MSGBOX_DEFAULT - return - -EventScript_271C8F:: @ 8271C8F - bufferitemnameplural 0, VAR_0x8004, VAR_0x8005 - message gText_PlayerFoundOneItemTwoLines - return - -EventScript_271C9B:: @ 8271C9B - message gText_PlayerFoundOneItem - return - -EventScript_271CA1:: @ 8271CA1 - msgbox gText_ObtainedTheItem, MSGBOX_DEFAULT - msgbox gText_TooBadBagIsFull, MSGBOX_DEFAULT - setvar VAR_RESULT, 0 - return - -EventScript_HiddenItemScript:: @ 8271CB7 - lockall - waitse - giveitem VAR_0x8005, 1 - copyvar VAR_0x8007, VAR_RESULT - bufferitemnameplural 1, VAR_0x8005, 1 - checkitemtype VAR_0x8005 - call EventScript_BufferStdString - compare VAR_0x8007, 1 - goto_if_eq EventScript_271CE8 - compare VAR_0x8007, 0 - goto_if_eq EventScript_271D47 - end - -EventScript_271CE8:: @ 8271CE8 - copyvar VAR_0x8008, VAR_0x8004 - copyvar VAR_0x8004, VAR_0x8005 - specialvar VAR_RESULT, BufferTMHMMoveName - compare VAR_RESULT, 1 - goto_if_eq EventScript_271D0E - compare VAR_RESULT, 0 - goto_if_eq EventScript_271D1F - end - -EventScript_271D0E:: @ 8271D0E - bufferitemnameplural 0, VAR_0x8004, 1 - message gText_PlayerFoundOneItemTwoLines - goto EventScript_271D2A - end - -EventScript_271D1F:: @ 8271D1F - message gText_PlayerFoundOneItem - goto EventScript_271D2A - end - -EventScript_271D2A:: @ 8271D2A - waitmessage - waitfanfare - bufferitemnameplural 1, VAR_0x8004, 1 - copyvar VAR_0x8004, VAR_0x8008 - msgbox gText_PutItemInPocket, MSGBOX_DEFAULT - special sub_80EDCE8 - special SetFlagInVar - releaseall - end - -EventScript_271D47:: @ 8271D47 - msgbox gText_PlayerFoundOneItem, MSGBOX_DEFAULT - msgbox gText_TooBadBagIsFull, MSGBOX_DEFAULT - setvar VAR_RESULT, 0 - releaseall - end - -EventScript_271D5E:: @ 8271D5E - lock - faceplayer - msgbox Text_WouldYouLikeToMixRecords, MSGBOX_YESNO - compare VAR_RESULT, 1 - goto_if_eq EventScript_271D83 - compare VAR_RESULT, 0 - goto_if_eq EventScript_271D89 - goto EventScript_271D89 - -EventScript_271D83:: @ 8271D83 - special RecordMixingPlayerSpotTriggered - waitstate - lock - faceplayer - -EventScript_271D89:: @ 8271D89 - message Text_WouldNotLikeToMixRecords - waitmessage - waitbuttonpress - release - end - + .include "data/scripts/obtain_item.inc" + .include "data/scripts/record_mix.inc" .include "data/scripts/pc.inc" +@ scripts/notices.inc? signs.inc? See comment about text/notices.inc Common_EventScript_ShowPokemartSign:: @ 8271E6A msgbox gText_PokemartSign, MSGBOX_SIGN end @@ -1046,166 +814,9 @@ Route109_EventScript_271E95:: @ 8271E95 setvar VAR_BRINEY_LOCATION, 0 return -EventScript_UseSurf:: @ 8271EA0 - checkpartymove MOVE_SURF - compare VAR_RESULT, 6 - goto_if_eq EventScript_CantSurf - bufferpartymonnick 0, VAR_RESULT - setfieldeffectargument 0, VAR_RESULT - lockall - msgbox gText_WantToUseSurf, MSGBOX_YESNO - compare VAR_RESULT, 0 - goto_if_eq EventScript_CancelSurf - msgbox gText_PlayerUsedSurf, MSGBOX_DEFAULT - dofieldeffect FLDEFF_USE_SURF - -EventScript_CancelSurf:: @ 8271ED5 - releaseall - -EventScript_CantSurf:: @ 8271ED6 - end - -Common_EventScript_SetupRivalGfxId:: @ 8271ED7 - checkplayergender - compare VAR_RESULT, MALE - goto_if_eq EventScript_SetupRivalGfxIdFemale - compare VAR_RESULT, FEMALE - goto_if_eq EventScript_SetupRivalGfxIdMale - end - -EventScript_SetupRivalGfxIdFemale:: @ 8271EEF - setvar VAR_OBJ_GFX_ID_0, EVENT_OBJ_GFX_RIVAL_MAY_NORMAL - return - -EventScript_SetupRivalGfxIdMale:: @ 8271EF5 - setvar VAR_OBJ_GFX_ID_0, EVENT_OBJ_GFX_RIVAL_BRENDAN_NORMAL - return - -Common_EventScript_SetupRivalOnBikeGfxId:: @ 8271EFB - checkplayergender - compare VAR_RESULT, MALE - goto_if_eq EventScript_SetupRivalOnBikeGfxIdFemale - compare VAR_RESULT, FEMALE - goto_if_eq EventScript_SetupRivalOnBikeGfxIdMale - end - -EventScript_SetupRivalOnBikeGfxIdFemale:: @ 8271F13 - setvar VAR_OBJ_GFX_ID_3, EVENT_OBJ_GFX_RIVAL_MAY_MACH_BIKE - return - -EventScript_SetupRivalOnBikeGfxIdMale:: @ 8271F19 - setvar VAR_OBJ_GFX_ID_3, EVENT_OBJ_GFX_RIVAL_BRENDAN_MACH_BIKE - return - -@ Unused -Common_EventScript_SetupRivalGfxIdSameGender:: @ 8271F1F - checkplayergender - compare VAR_RESULT, MALE - goto_if_eq EventScript_SetupRivalGfxIdMale2 - compare VAR_RESULT, FEMALE - goto_if_eq EventScript_SetupRivalGfxIdFemale2 - end - -EventScript_SetupRivalGfxIdMale2:: @ 8271F37 - setvar VAR_OBJ_GFX_ID_0, EVENT_OBJ_GFX_RIVAL_BRENDAN_NORMAL - return - -EventScript_SetupRivalGfxIdFemale2:: @ 8271F3D - setvar VAR_OBJ_GFX_ID_0, EVENT_OBJ_GFX_RIVAL_MAY_NORMAL - return - -Common_EventScript_SetGymTrainers:: @ 8271F43 - switch VAR_0x8008 - case 1, RusboroCity_Gym_SetGymTrainers - case 2, DewfordTown_Gym_SetGymTrainers - case 3, MauvilleCity_Gym_SetGymTrainers - case 4, LavaridgeTown_Gym_SetGymTrainers - case 5, PetalburgCity_Gym_SetGymTrainers - case 6, FortreeCity_Gym_SetGymTrainers - case 7, MossdeepCity_Gym_SetGymTrainers - case 8, SootopolisCity_Gym_SetGymTrainers - end - -RusboroCity_Gym_SetGymTrainers:: @ 8271FA1 - settrainerflag TRAINER_JOSH - settrainerflag TRAINER_TOMMY - settrainerflag TRAINER_MARC - return - -DewfordTown_Gym_SetGymTrainers:: @ 8271FAB - settrainerflag TRAINER_TAKAO - settrainerflag TRAINER_JOCELYN - settrainerflag TRAINER_LAURA - settrainerflag TRAINER_BRENDEN - settrainerflag TRAINER_CRISTIAN - settrainerflag TRAINER_LILITH - return - -MauvilleCity_Gym_SetGymTrainers:: @ 8271FBE - settrainerflag TRAINER_KIRK - settrainerflag TRAINER_SHAWN - settrainerflag TRAINER_BEN - settrainerflag TRAINER_VIVIAN - settrainerflag TRAINER_ANGELO - return - -LavaridgeTown_Gym_SetGymTrainers:: @ 8271FCE - settrainerflag TRAINER_COLE - settrainerflag TRAINER_AXLE - settrainerflag TRAINER_KEEGAN - settrainerflag TRAINER_GERALD - settrainerflag TRAINER_DANIELLE - settrainerflag TRAINER_JACE - settrainerflag TRAINER_JEFF - settrainerflag TRAINER_ELI - return - -PetalburgCity_Gym_SetGymTrainers:: @ 8271FE7 - settrainerflag TRAINER_RANDALL - settrainerflag TRAINER_PARKER - settrainerflag TRAINER_GEORGE - settrainerflag TRAINER_BERKE - settrainerflag TRAINER_MARY - settrainerflag TRAINER_ALEXIA - settrainerflag TRAINER_JODY - return - -FortreeCity_Gym_SetGymTrainers:: @ 8271FFD - settrainerflag TRAINER_JARED - settrainerflag TRAINER_FLINT - settrainerflag TRAINER_ASHLEY - settrainerflag TRAINER_EDWARDO - settrainerflag TRAINER_HUMBERTO - settrainerflag TRAINER_DARIUS - return - -MossdeepCity_Gym_SetGymTrainers:: @ 8272010 - settrainerflag TRAINER_PRESTON - settrainerflag TRAINER_VIRGIL - settrainerflag TRAINER_BLAKE - settrainerflag TRAINER_HANNAH - settrainerflag TRAINER_SAMANTHA - settrainerflag TRAINER_MAURA - settrainerflag TRAINER_SYLVIA - settrainerflag TRAINER_NATE - settrainerflag TRAINER_KATHLEEN - settrainerflag TRAINER_CLIFFORD - settrainerflag TRAINER_MACEY - settrainerflag TRAINER_NICHOLAS - return - -SootopolisCity_Gym_SetGymTrainers:: @ 8272035 - settrainerflag TRAINER_ANDREA - settrainerflag TRAINER_CRISSY - settrainerflag TRAINER_BRIANNA - settrainerflag TRAINER_CONNIE - settrainerflag TRAINER_BRIDGET - settrainerflag TRAINER_OLIVIA - settrainerflag TRAINER_TIFFANY - settrainerflag TRAINER_BETHANY - settrainerflag TRAINER_ANNIKA - settrainerflag TRAINER_DAPHNE - return + .include "data/scripts/surf.inc" + .include "data/scripts/rival_graphics.inc" + .include "data/scripts/set_gym_trainers.inc" Common_EventScript_ShowBagIsFull:: @ 8272054 msgbox gText_TooBadBagIsFull, MSGBOX_DEFAULT @@ -1263,6 +874,7 @@ Common_EventScript_StopBrineysBoatMusic:: @ 82720A8 .include "data/scripts/prof_birch.inc" +@ Below could be split as ferry.inc aside from the Rusturf tunnel script Common_EventScript_FerryDepart:: @ 82721E2 delay 60 applymovement VAR_0x8004, Movement_FerryDepart @@ -1350,60 +962,13 @@ Common_EventScript_PlayerHandedOverTheItem:: @ 82723E4 .include "data/scripts/elite_four.inc" .include "data/scripts/movement.inc" .include "data/scripts/check_furniture.inc" - -Text_WouldYouLikeToMixRecords: @ 827260D - .string "Would you like to mix records with\n" - .string "other TRAINERS?$" - -Text_WouldNotLikeToMixRecords: @ 8272640 - .string "We hope to see you again!$" - + .include "data/text/record_mix.inc" .include "data/text/pc.inc" .include "data/text/pkmn_center_nurse.inc" + .include "data/text/mart_attendant.inc" + .include "data/text/obtain_item.inc" -gText_HowMayIServeYou:: @ 8272A21 - .string "Welcome!\p" - .string "How may I serve you?$" - -gText_PleaseComeAgain:: @ 8272A3F - .string "Please come again!$" - -gText_PlayerWhatCanIDoForYou:: @ 8272A52 - .string "{PLAYER}{STRING 5}, welcome!\p" - .string "What can I do for you?$" - -gText_ObtainedTheItem:: @ 8272A78 - .string "Obtained the {STR_VAR_2}!$" - -gText_TheBagIsFull:: @ 8272A89 - .string "The BAG is full…$" - -gText_PutItemInPocket:: @ 8272A9A - .string "{PLAYER} put away the {STR_VAR_2}\n" - .string "in the {STR_VAR_3} POCKET.$" - -gText_PlayerFoundOneItem:: @ 8272ABF - .string "{PLAYER} found one {STR_VAR_2}!$" - -gText_TooBadBagIsFull:: @ 8272AD0 - .string "Too bad!\n" - .string "The BAG is full…$" - -gText_PlayerPutItemInBag:: @ 8272AEA - .string "{PLAYER} put away the {STR_VAR_2}\n" - .string "in the BAG.$" - -gText_ObtainedTheMon:: @ 8272B09 - .string "Obtained the {STR_VAR_2}!$" - -gText_NoRoomLeftForAnother:: @ 8272B1A - .string "Too bad! There's no room left for\n" - .string "another {STR_VAR_2}…$" - -gText_TheMonWasTransferredToThePC:: @ 8272B48 - .string "The {STR_VAR_2} was transferred\n" - .string "to the PC.$" - +@ The below and surf.inc could be split into some text/notices.inc gText_PokemartSign:: @ 8272B6A .string "“Selected items for your convenience!”\n" .string "POKéMON MART$" @@ -1522,38 +1087,7 @@ gText_Sudowoodo_Attacked:: @ 82731BD gText_LegendaryFlewAway:: @ 8273204 .string "The {STR_VAR_1} flew away!$" -gText_PkmnTransferredSomeonesPC:: @ 8273216 - .string "{STR_VAR_2} was transferred to\n" - .string "SOMEONE'S PC.\p" - .string "It was placed in \n" - .string "BOX “{STR_VAR_1}.”$" - -gText_PkmnTransferredLanettesPC:: @ 8273256 - .string "{STR_VAR_2} was transferred to\nLANETTE'S PC.\p" - .string "It was placed in \n" - .string "BOX “{STR_VAR_1}.”$" - -gText_PkmnBoxSomeonesPCFull:: @ 8273296 - .string "BOX “{STR_VAR_3}” on\n" - .string "SOMEONE'S PC was full.\p" - .string "{STR_VAR_2} was transferred to\n" - .string "BOX “{STR_VAR_1}.”$" - -gText_PkmnBoxLanettesPCFull:: @ 82732D9 - .string "BOX “{STR_VAR_3}” on\n" - .string "LANETTE'S PC was full.\p" - .string "{STR_VAR_2} was transferred to\n" - .string "BOX “{STR_VAR_1}.”$" - -gText_NoMoreRoomForPokemon:: @ 827331C - .string "There's no more room for POKéMON!\p" - .string "The POKéMON BOXES are full and\n" - .string "can't accept any more!$" - -gText_NicknameThisPokemon:: @ 8273374 - .string "Do you want to give a nickname to\n" - .string "this {STR_VAR_1}?$" - + .include "data/text/pc_transfer.inc" .include "data/text/mevent.inc" .include "data/text/unusual_weather.inc" @@ -1603,89 +1137,10 @@ Common_EventScript_LegendaryFlewAway:: @ 8273776 release end -@ VAR_0x8004 here is used by ChangePokemonNickname -Common_EventScript_GetGiftMonPartySlot:: @ 827378B - getpartysize - subvar VAR_RESULT, 1 - copyvar VAR_0x8004, VAR_RESULT - return - -Common_EventScript_NameReceivedBoxMon:: @ 8273797 - fadescreen 1 - special ChangeBoxPokemonNickname - waitstate - lock - faceplayer - return - -LittlerootTown_ProfessorBirchsLab_EventScript_2737A0:: @ 82737A0 -MossdeepCity_StevensHouse_EventScript_2737A0:: @ 82737A0 -Route119_WeatherInstitute_2F_EventScript_2737A0:: @ 82737A0 -RustboroCity_DevonCorp_2F_EventScript_2737A0:: @ 82737A0 - bufferboxname 0, VAR_PC_BOX_TO_SEND_MON - bufferspeciesname 1, VAR_TEMP_1 - call_if_unset FLAG_SYS_PC_LANETTE, LittlerootTown_ProfessorBirchsLab_EventScript_2737BB - call_if_set FLAG_SYS_PC_LANETTE, LittlerootTown_ProfessorBirchsLab_EventScript_2737E6 - return - -LittlerootTown_ProfessorBirchsLab_EventScript_2737BB:: @ 82737BB - specialvar VAR_RESULT, ShouldShowBoxWasFullMessage - compare VAR_RESULT, 1 - goto_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_2737D4 - msgbox gText_PkmnTransferredSomeonesPC, MSGBOX_DEFAULT - return - -LittlerootTown_ProfessorBirchsLab_EventScript_2737D4:: @ 82737D4 - specialvar VAR_RESULT, GetPCBoxToSendMon - bufferboxname 2, VAR_RESULT - msgbox gText_PkmnBoxSomeonesPCFull, MSGBOX_DEFAULT - return - -LittlerootTown_ProfessorBirchsLab_EventScript_2737E6:: @ 82737E6 - specialvar VAR_RESULT, ShouldShowBoxWasFullMessage - compare VAR_RESULT, 1 - goto_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_2737FF - msgbox gText_PkmnTransferredLanettesPC, MSGBOX_DEFAULT - return - -LittlerootTown_ProfessorBirchsLab_EventScript_2737FF:: @ 82737FF - specialvar VAR_RESULT, GetPCBoxToSendMon - bufferboxname 2, VAR_RESULT - msgbox gText_PkmnBoxLanettesPCFull, MSGBOX_DEFAULT - return - -Common_EventScript_NoMoreRoomForPokemon:: @ 8273811 - msgbox gText_NoMoreRoomForPokemon, MSGBOX_DEFAULT - release - end - + .include "data/scripts/pc_transfer.inc" .include "data/scripts/mevent.inc" .include "data/scripts/unusual_weather.inc" - -Std_RegisteredInMatchCall:: @ 82742C9 - buffertrainerclassname 0, VAR_0x8000 - buffertrainername 1, VAR_0x8000 - closemessage - delay 30 - playfanfare MUS_ME_TORE_EYE - msgbox gText_RegisteredTrainerinPokeNav, MSGBOX_DEFAULT - waitfanfare - closemessage - delay 30 - return - -EventScript_TryGetTrainerScript:: @ 82742E6 - special ShouldTryGetTrainerScript - compare VAR_RESULT, 1 - goto_if_eq EventScript_GotoTrainerScript - releaseall - end - -EventScript_GotoTrainerScript:: @ 82742F6 - gotobeatenscript - releaseall - end - + .include "data/scripts/trainer_script.inc" .include "data/scripts/berry_tree.inc" .include "data/scripts/secret_base.inc" .include "data/scripts/cable_club.inc" @@ -1705,24 +1160,12 @@ EventScript_GotoTrainerScript:: @ 82742F6 .include "data/scripts/item_ball_scripts.inc" .include "data/scripts/mystery_event_club.inc" .include "data/scripts/day_care.inc" - -EventScript_2926F8:: @ 82926F8 - animateflash 1 - setflashradius 1 - end - + .include "data/scripts/flash.inc" .include "data/scripts/players_house.inc" .include "data/scripts/pokeblocks.inc" .include "data/text/mauville_man.inc" .include "data/text/trainers.inc" - -EventScript_RepelWoreOff:: @ 82A4B2A - msgbox Text_RepelWoreOff, MSGBOX_SIGN - end - -Text_RepelWoreOff: @ 82A4B33 - .string "REPEL's effect wore off…$" - + .include "data/scripts/repel.inc" .include "data/scripts/safari_zone.inc" .include "data/scripts/roulette.inc" .include "data/text/pokedex_rating.inc" @@ -1744,17 +1187,7 @@ Text_RepelWoreOff: @ 82A4B33 .include "data/text/move_tutors.inc" .include "data/scripts/move_tutors.inc" .include "data/scripts/trainer_hill.inc" - -Text_ThisIsATestSignpostMsg:: @ 82C840A - .string "This is a test message.\n" - .string "This is a signpost.$" - -EventScript_TestSignpostMsg:: @ 82C8436 - msgbox Text_ThisIsATestSignpostMsg, MSGBOX_SIGN - end - + .include "data/scripts/test_signpost.inc" .include "data/text/frontier_brain.inc" - - .align 2 .include "data/text/save.inc" .include "data/text/birch_speech.inc" diff --git a/data/scripts/flash.inc b/data/scripts/flash.inc new file mode 100644 index 0000000000..e0630db568 --- /dev/null +++ b/data/scripts/flash.inc @@ -0,0 +1,4 @@ +EventScript_2926F8:: @ 82926F8 + animateflash 1 + setflashradius 1 + end diff --git a/data/scripts/obtain_item.inc b/data/scripts/obtain_item.inc new file mode 100644 index 0000000000..00bf4523e4 --- /dev/null +++ b/data/scripts/obtain_item.inc @@ -0,0 +1,208 @@ +Std_ObtainItem:: @ 8271AD3 + giveitem VAR_0x8000, VAR_0x8001 + copyvar VAR_0x8007, VAR_RESULT + call EventScript_271AE3 + return + +EventScript_271AE3:: @ 8271AE3 + bufferitemnameplural 1, VAR_0x8000, VAR_0x8001 + checkitemtype VAR_0x8000 + call EventScript_BufferStdString + compare VAR_0x8007, 1 + call_if_eq EventScript_271B95 + compare VAR_0x8007, 0 + call_if_eq EventScript_271BA9 + return + +EventScript_BufferStdString:: @ 8271B08 + switch VAR_RESULT + case POCKET_ITEMS, EventScript_StdStringItem + case POCKET_KEY_ITEMS, EventScript_StdStringKeyItems + case POCKET_POKE_BALLS, EventScript_StdStringPokeballs + case POCKET_TM_HM, EventScript_StdStringTMHMS + case POCKET_BERRIES, EventScript_StdStringBerries + end + +EventScript_StdStringItem:: @ 8271B45 + bufferstdstring 2, STDSTRING_ITEMS + compare VAR_0x8007, 1 + call_if_eq EventScript_PlayFanfareObtainedItem + return + +EventScript_StdStringKeyItems:: @ 8271B55 + bufferstdstring 2, STDSTRING_KEYITEMS + compare VAR_0x8007, 1 + call_if_eq EventScript_PlayFanfareObtainedItem + return + +EventScript_StdStringPokeballs:: @ 8271B65 + bufferstdstring 2, STDSTRING_POKEBALLS + compare VAR_0x8007, 1 + call_if_eq EventScript_PlayFanfareObtainedItem + return + +EventScript_StdStringTMHMS:: @ 8271B75 + bufferstdstring 2, STDSTRING_TMHMS + compare VAR_0x8007, 1 + call_if_eq EventScript_PlayFanfareObtainedTMHM + return + +EventScript_StdStringBerries:: @ 8271B85 + bufferstdstring 2, STDSTRING_BERRIES + compare VAR_0x8007, 1 + call_if_eq EventScript_PlayFanfareObtainedItem + return + +EventScript_271B95:: @ 8271B95 + message gText_ObtainedTheItem + waitfanfare + msgbox gText_PutItemInPocket, MSGBOX_DEFAULT + setvar VAR_RESULT, 1 + return + +EventScript_271BA9:: @ 8271BA9 + setvar VAR_RESULT, 0 + return + +EventScript_PlayFanfareObtainedItem:: @ 8271BAF + playfanfare MUS_FANFA4 + return + +EventScript_PlayFanfareObtainedTMHM:: @ 8271BB3 + playfanfare MUS_ME_WAZA + return + +Std_ObtainDecoration:: @ 8271BB7 + givedecoration VAR_0x8000 + copyvar VAR_0x8007, VAR_RESULT + call EventScript_271BC5 + return + +EventScript_271BC5:: @ 8271BC5 + bufferdecorationname 1, VAR_0x8000 + compare VAR_0x8007, 1 + call_if_eq EventScript_271BE0 + compare VAR_0x8007, 0 + call_if_eq EventScript_271BF7 + return + +EventScript_271BE0:: @ 8271BE0 + playfanfare MUS_FANFA4 + message gText_ObtainedTheDecor + waitfanfare + msgbox gText_TheDecorWasTransferredToThePC, MSGBOX_DEFAULT + setvar VAR_RESULT, 1 + return + +EventScript_271BF7:: @ 8271BF7 + setvar VAR_RESULT, 0 + return + +Std_FindItem:: @ 8271BFD + lock + faceplayer + waitse + copyvar VAR_0x8004, VAR_0x8000 + copyvar VAR_0x8005, VAR_0x8001 + checkitemspace VAR_0x8000, VAR_0x8001 + copyvar VAR_0x8007, VAR_RESULT + bufferitemnameplural 1, VAR_0x8000, VAR_0x8001 + checkitemtype VAR_0x8000 + call EventScript_BufferStdString + compare VAR_0x8007, 1 + call_if_eq EventScript_PickItemUp + compare VAR_0x8007, 0 + call_if_eq EventScript_271CA1 + release + return + +EventScript_PickItemUp:: @ 8271C3A + removeobject VAR_LAST_TALKED + giveitem VAR_0x8004, VAR_0x8005 + specialvar VAR_RESULT, BufferTMHMMoveName + copyvar VAR_0x8008, VAR_RESULT + compare VAR_0x8008, 1 + call_if_eq EventScript_271C8F + compare VAR_0x8008, 0 + call_if_eq EventScript_271C9B + waitfanfare + waitmessage + bufferitemnameplural 1, VAR_0x8004, VAR_0x8005 + setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_IS_IN + special CallBattlePyramidFunction + compare VAR_RESULT, 1 + goto_if_eq EventScript_271C86 + msgbox gText_PutItemInPocket, MSGBOX_DEFAULT + return + +EventScript_271C86:: @ 8271C86 + msgbox gText_PlayerPutItemInBag, MSGBOX_DEFAULT + return + +EventScript_271C8F:: @ 8271C8F + bufferitemnameplural 0, VAR_0x8004, VAR_0x8005 + message gText_PlayerFoundOneItemTwoLines + return + +EventScript_271C9B:: @ 8271C9B + message gText_PlayerFoundOneItem + return + +EventScript_271CA1:: @ 8271CA1 + msgbox gText_ObtainedTheItem, MSGBOX_DEFAULT + msgbox gText_TooBadBagIsFull, MSGBOX_DEFAULT + setvar VAR_RESULT, 0 + return + +EventScript_HiddenItemScript:: @ 8271CB7 + lockall + waitse + giveitem VAR_0x8005, 1 + copyvar VAR_0x8007, VAR_RESULT + bufferitemnameplural 1, VAR_0x8005, 1 + checkitemtype VAR_0x8005 + call EventScript_BufferStdString + compare VAR_0x8007, 1 + goto_if_eq EventScript_271CE8 + compare VAR_0x8007, 0 + goto_if_eq EventScript_271D47 + end + +EventScript_271CE8:: @ 8271CE8 + copyvar VAR_0x8008, VAR_0x8004 + copyvar VAR_0x8004, VAR_0x8005 + specialvar VAR_RESULT, BufferTMHMMoveName + compare VAR_RESULT, 1 + goto_if_eq EventScript_271D0E + compare VAR_RESULT, 0 + goto_if_eq EventScript_271D1F + end + +EventScript_271D0E:: @ 8271D0E + bufferitemnameplural 0, VAR_0x8004, 1 + message gText_PlayerFoundOneItemTwoLines + goto EventScript_271D2A + end + +EventScript_271D1F:: @ 8271D1F + message gText_PlayerFoundOneItem + goto EventScript_271D2A + end + +EventScript_271D2A:: @ 8271D2A + waitmessage + waitfanfare + bufferitemnameplural 1, VAR_0x8004, 1 + copyvar VAR_0x8004, VAR_0x8008 + msgbox gText_PutItemInPocket, MSGBOX_DEFAULT + special sub_80EDCE8 + special SetFlagInVar + releaseall + end + +EventScript_271D47:: @ 8271D47 + msgbox gText_PlayerFoundOneItem, MSGBOX_DEFAULT + msgbox gText_TooBadBagIsFull, MSGBOX_DEFAULT + setvar VAR_RESULT, 0 + releaseall + end diff --git a/data/scripts/pc_transfer.inc b/data/scripts/pc_transfer.inc new file mode 100644 index 0000000000..6a72eae758 --- /dev/null +++ b/data/scripts/pc_transfer.inc @@ -0,0 +1,55 @@ +@ VAR_0x8004 here is used by ChangePokemonNickname +Common_EventScript_GetGiftMonPartySlot:: @ 827378B + getpartysize + subvar VAR_RESULT, 1 + copyvar VAR_0x8004, VAR_RESULT + return + +Common_EventScript_NameReceivedBoxMon:: @ 8273797 + fadescreen 1 + special ChangeBoxPokemonNickname + waitstate + lock + faceplayer + return + +LittlerootTown_ProfessorBirchsLab_EventScript_2737A0:: @ 82737A0 +MossdeepCity_StevensHouse_EventScript_2737A0:: @ 82737A0 +Route119_WeatherInstitute_2F_EventScript_2737A0:: @ 82737A0 +RustboroCity_DevonCorp_2F_EventScript_2737A0:: @ 82737A0 + bufferboxname 0, VAR_PC_BOX_TO_SEND_MON + bufferspeciesname 1, VAR_TEMP_1 + call_if_unset FLAG_SYS_PC_LANETTE, LittlerootTown_ProfessorBirchsLab_EventScript_2737BB + call_if_set FLAG_SYS_PC_LANETTE, LittlerootTown_ProfessorBirchsLab_EventScript_2737E6 + return + +LittlerootTown_ProfessorBirchsLab_EventScript_2737BB:: @ 82737BB + specialvar VAR_RESULT, ShouldShowBoxWasFullMessage + compare VAR_RESULT, 1 + goto_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_2737D4 + msgbox gText_PkmnTransferredSomeonesPC, MSGBOX_DEFAULT + return + +LittlerootTown_ProfessorBirchsLab_EventScript_2737D4:: @ 82737D4 + specialvar VAR_RESULT, GetPCBoxToSendMon + bufferboxname 2, VAR_RESULT + msgbox gText_PkmnBoxSomeonesPCFull, MSGBOX_DEFAULT + return + +LittlerootTown_ProfessorBirchsLab_EventScript_2737E6:: @ 82737E6 + specialvar VAR_RESULT, ShouldShowBoxWasFullMessage + compare VAR_RESULT, 1 + goto_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_2737FF + msgbox gText_PkmnTransferredLanettesPC, MSGBOX_DEFAULT + return + +LittlerootTown_ProfessorBirchsLab_EventScript_2737FF:: @ 82737FF + specialvar VAR_RESULT, GetPCBoxToSendMon + bufferboxname 2, VAR_RESULT + msgbox gText_PkmnBoxLanettesPCFull, MSGBOX_DEFAULT + return + +Common_EventScript_NoMoreRoomForPokemon:: @ 8273811 + msgbox gText_NoMoreRoomForPokemon, MSGBOX_DEFAULT + release + end diff --git a/data/scripts/record_mix.inc b/data/scripts/record_mix.inc new file mode 100644 index 0000000000..7e9a2de7e6 --- /dev/null +++ b/data/scripts/record_mix.inc @@ -0,0 +1,22 @@ +EventScript_271D5E:: @ 8271D5E + lock + faceplayer + msgbox Text_WouldYouLikeToMixRecords, MSGBOX_YESNO + compare VAR_RESULT, 1 + goto_if_eq EventScript_271D83 + compare VAR_RESULT, 0 + goto_if_eq EventScript_271D89 + goto EventScript_271D89 + +EventScript_271D83:: @ 8271D83 + special RecordMixingPlayerSpotTriggered + waitstate + lock + faceplayer + +EventScript_271D89:: @ 8271D89 + message Text_WouldNotLikeToMixRecords + waitmessage + waitbuttonpress + release + end diff --git a/data/scripts/repel.inc b/data/scripts/repel.inc new file mode 100644 index 0000000000..5deda57629 --- /dev/null +++ b/data/scripts/repel.inc @@ -0,0 +1,6 @@ +EventScript_RepelWoreOff:: @ 82A4B2A + msgbox Text_RepelWoreOff, MSGBOX_SIGN + end + +Text_RepelWoreOff: @ 82A4B33 + .string "REPEL's effect wore off…$" diff --git a/data/scripts/rival_graphics.inc b/data/scripts/rival_graphics.inc new file mode 100644 index 0000000000..60bd1a3372 --- /dev/null +++ b/data/scripts/rival_graphics.inc @@ -0,0 +1,48 @@ +Common_EventScript_SetupRivalGfxId:: @ 8271ED7 + checkplayergender + compare VAR_RESULT, MALE + goto_if_eq EventScript_SetupRivalGfxIdFemale + compare VAR_RESULT, FEMALE + goto_if_eq EventScript_SetupRivalGfxIdMale + end + +EventScript_SetupRivalGfxIdFemale:: @ 8271EEF + setvar VAR_OBJ_GFX_ID_0, EVENT_OBJ_GFX_RIVAL_MAY_NORMAL + return + +EventScript_SetupRivalGfxIdMale:: @ 8271EF5 + setvar VAR_OBJ_GFX_ID_0, EVENT_OBJ_GFX_RIVAL_BRENDAN_NORMAL + return + +Common_EventScript_SetupRivalOnBikeGfxId:: @ 8271EFB + checkplayergender + compare VAR_RESULT, MALE + goto_if_eq EventScript_SetupRivalOnBikeGfxIdFemale + compare VAR_RESULT, FEMALE + goto_if_eq EventScript_SetupRivalOnBikeGfxIdMale + end + +EventScript_SetupRivalOnBikeGfxIdFemale:: @ 8271F13 + setvar VAR_OBJ_GFX_ID_3, EVENT_OBJ_GFX_RIVAL_MAY_MACH_BIKE + return + +EventScript_SetupRivalOnBikeGfxIdMale:: @ 8271F19 + setvar VAR_OBJ_GFX_ID_3, EVENT_OBJ_GFX_RIVAL_BRENDAN_MACH_BIKE + return + +@ Unused +Common_EventScript_SetupRivalGfxIdSameGender:: @ 8271F1F + checkplayergender + compare VAR_RESULT, MALE + goto_if_eq EventScript_SetupRivalGfxIdMale2 + compare VAR_RESULT, FEMALE + goto_if_eq EventScript_SetupRivalGfxIdFemale2 + end + +EventScript_SetupRivalGfxIdMale2:: @ 8271F37 + setvar VAR_OBJ_GFX_ID_0, EVENT_OBJ_GFX_RIVAL_BRENDAN_NORMAL + return + +EventScript_SetupRivalGfxIdFemale2:: @ 8271F3D + setvar VAR_OBJ_GFX_ID_0, EVENT_OBJ_GFX_RIVAL_MAY_NORMAL + return diff --git a/data/scripts/set_gym_trainers.inc b/data/scripts/set_gym_trainers.inc new file mode 100644 index 0000000000..1f5535805b --- /dev/null +++ b/data/scripts/set_gym_trainers.inc @@ -0,0 +1,92 @@ +Common_EventScript_SetGymTrainers:: @ 8271F43 + switch VAR_0x8008 + case 1, RusboroCity_Gym_SetGymTrainers + case 2, DewfordTown_Gym_SetGymTrainers + case 3, MauvilleCity_Gym_SetGymTrainers + case 4, LavaridgeTown_Gym_SetGymTrainers + case 5, PetalburgCity_Gym_SetGymTrainers + case 6, FortreeCity_Gym_SetGymTrainers + case 7, MossdeepCity_Gym_SetGymTrainers + case 8, SootopolisCity_Gym_SetGymTrainers + end + +RusboroCity_Gym_SetGymTrainers:: @ 8271FA1 + settrainerflag TRAINER_JOSH + settrainerflag TRAINER_TOMMY + settrainerflag TRAINER_MARC + return + +DewfordTown_Gym_SetGymTrainers:: @ 8271FAB + settrainerflag TRAINER_TAKAO + settrainerflag TRAINER_JOCELYN + settrainerflag TRAINER_LAURA + settrainerflag TRAINER_BRENDEN + settrainerflag TRAINER_CRISTIAN + settrainerflag TRAINER_LILITH + return + +MauvilleCity_Gym_SetGymTrainers:: @ 8271FBE + settrainerflag TRAINER_KIRK + settrainerflag TRAINER_SHAWN + settrainerflag TRAINER_BEN + settrainerflag TRAINER_VIVIAN + settrainerflag TRAINER_ANGELO + return + +LavaridgeTown_Gym_SetGymTrainers:: @ 8271FCE + settrainerflag TRAINER_COLE + settrainerflag TRAINER_AXLE + settrainerflag TRAINER_KEEGAN + settrainerflag TRAINER_GERALD + settrainerflag TRAINER_DANIELLE + settrainerflag TRAINER_JACE + settrainerflag TRAINER_JEFF + settrainerflag TRAINER_ELI + return + +PetalburgCity_Gym_SetGymTrainers:: @ 8271FE7 + settrainerflag TRAINER_RANDALL + settrainerflag TRAINER_PARKER + settrainerflag TRAINER_GEORGE + settrainerflag TRAINER_BERKE + settrainerflag TRAINER_MARY + settrainerflag TRAINER_ALEXIA + settrainerflag TRAINER_JODY + return + +FortreeCity_Gym_SetGymTrainers:: @ 8271FFD + settrainerflag TRAINER_JARED + settrainerflag TRAINER_FLINT + settrainerflag TRAINER_ASHLEY + settrainerflag TRAINER_EDWARDO + settrainerflag TRAINER_HUMBERTO + settrainerflag TRAINER_DARIUS + return + +MossdeepCity_Gym_SetGymTrainers:: @ 8272010 + settrainerflag TRAINER_PRESTON + settrainerflag TRAINER_VIRGIL + settrainerflag TRAINER_BLAKE + settrainerflag TRAINER_HANNAH + settrainerflag TRAINER_SAMANTHA + settrainerflag TRAINER_MAURA + settrainerflag TRAINER_SYLVIA + settrainerflag TRAINER_NATE + settrainerflag TRAINER_KATHLEEN + settrainerflag TRAINER_CLIFFORD + settrainerflag TRAINER_MACEY + settrainerflag TRAINER_NICHOLAS + return + +SootopolisCity_Gym_SetGymTrainers:: @ 8272035 + settrainerflag TRAINER_ANDREA + settrainerflag TRAINER_CRISSY + settrainerflag TRAINER_BRIANNA + settrainerflag TRAINER_CONNIE + settrainerflag TRAINER_BRIDGET + settrainerflag TRAINER_OLIVIA + settrainerflag TRAINER_TIFFANY + settrainerflag TRAINER_BETHANY + settrainerflag TRAINER_ANNIKA + settrainerflag TRAINER_DAPHNE + return diff --git a/data/scripts/surf.inc b/data/scripts/surf.inc new file mode 100644 index 0000000000..d89aa98c11 --- /dev/null +++ b/data/scripts/surf.inc @@ -0,0 +1,18 @@ +EventScript_UseSurf:: @ 8271EA0 + checkpartymove MOVE_SURF + compare VAR_RESULT, 6 + goto_if_eq EventScript_CantSurf + bufferpartymonnick 0, VAR_RESULT + setfieldeffectargument 0, VAR_RESULT + lockall + msgbox gText_WantToUseSurf, MSGBOX_YESNO + compare VAR_RESULT, 0 + goto_if_eq EventScript_CancelSurf + msgbox gText_PlayerUsedSurf, MSGBOX_DEFAULT + dofieldeffect FLDEFF_USE_SURF + +EventScript_CancelSurf:: @ 8271ED5 + releaseall + +EventScript_CantSurf:: @ 8271ED6 + end diff --git a/data/scripts/test_signpost.inc b/data/scripts/test_signpost.inc new file mode 100644 index 0000000000..482fe18f27 --- /dev/null +++ b/data/scripts/test_signpost.inc @@ -0,0 +1,7 @@ +Text_ThisIsATestSignpostMsg:: @ 82C840A + .string "This is a test message.\n" + .string "This is a signpost.$" + +EventScript_TestSignpostMsg:: @ 82C8436 + msgbox Text_ThisIsATestSignpostMsg, MSGBOX_SIGN + end diff --git a/data/scripts/trainer_battle.inc b/data/scripts/trainer_battle.inc index 21ba0d6d35..0ba8bcda6d 100644 --- a/data/scripts/trainer_battle.inc +++ b/data/scripts/trainer_battle.inc @@ -1,3 +1,7 @@ +EventScript_271354:: @ 8271354 + cmdD8 + cmdD9 + EventScript_ShowSecondTrainerIntro:: @ 8271356 special SetUpTrainerEncounterMusic special EndTrainerApproach diff --git a/data/scripts/trainer_script.inc b/data/scripts/trainer_script.inc new file mode 100644 index 0000000000..59577e8a8a --- /dev/null +++ b/data/scripts/trainer_script.inc @@ -0,0 +1,23 @@ +Std_RegisteredInMatchCall:: @ 82742C9 + buffertrainerclassname 0, VAR_0x8000 + buffertrainername 1, VAR_0x8000 + closemessage + delay 30 + playfanfare MUS_ME_TORE_EYE + msgbox gText_RegisteredTrainerinPokeNav, MSGBOX_DEFAULT + waitfanfare + closemessage + delay 30 + return + +EventScript_TryGetTrainerScript:: @ 82742E6 + special ShouldTryGetTrainerScript + compare VAR_RESULT, 1 + goto_if_eq EventScript_GotoTrainerScript + releaseall + end + +EventScript_GotoTrainerScript:: @ 82742F6 + gotobeatenscript + releaseall + end diff --git a/data/text/mart_attendant.inc b/data/text/mart_attendant.inc new file mode 100644 index 0000000000..2357963be8 --- /dev/null +++ b/data/text/mart_attendant.inc @@ -0,0 +1,10 @@ +gText_HowMayIServeYou:: @ 8272A21 + .string "Welcome!\p" + .string "How may I serve you?$" + +gText_PleaseComeAgain:: @ 8272A3F + .string "Please come again!$" + +gText_PlayerWhatCanIDoForYou:: @ 8272A52 + .string "{PLAYER}{STRING 5}, welcome!\p" + .string "What can I do for you?$" diff --git a/data/text/obtain_item.inc b/data/text/obtain_item.inc new file mode 100644 index 0000000000..d263388f5f --- /dev/null +++ b/data/text/obtain_item.inc @@ -0,0 +1,31 @@ +gText_ObtainedTheItem:: @ 8272A78 + .string "Obtained the {STR_VAR_2}!$" + +gText_TheBagIsFull:: @ 8272A89 + .string "The BAG is full…$" + +gText_PutItemInPocket:: @ 8272A9A + .string "{PLAYER} put away the {STR_VAR_2}\n" + .string "in the {STR_VAR_3} POCKET.$" + +gText_PlayerFoundOneItem:: @ 8272ABF + .string "{PLAYER} found one {STR_VAR_2}!$" + +gText_TooBadBagIsFull:: @ 8272AD0 + .string "Too bad!\n" + .string "The BAG is full…$" + +gText_PlayerPutItemInBag:: @ 8272AEA + .string "{PLAYER} put away the {STR_VAR_2}\n" + .string "in the BAG.$" + +gText_ObtainedTheDecor:: @ 8272B09 + .string "Obtained the {STR_VAR_2}!$" + +gText_NoRoomLeftForAnother:: @ 8272B1A + .string "Too bad! There's no room left for\n" + .string "another {STR_VAR_2}…$" + +gText_TheDecorWasTransferredToThePC:: @ 8272B48 + .string "The {STR_VAR_2} was transferred\n" + .string "to the PC.$" diff --git a/data/text/pc_transfer.inc b/data/text/pc_transfer.inc new file mode 100644 index 0000000000..0f0268bb53 --- /dev/null +++ b/data/text/pc_transfer.inc @@ -0,0 +1,31 @@ +gText_PkmnTransferredSomeonesPC:: @ 8273216 + .string "{STR_VAR_2} was transferred to\n" + .string "SOMEONE'S PC.\p" + .string "It was placed in \n" + .string "BOX “{STR_VAR_1}.”$" + +gText_PkmnTransferredLanettesPC:: @ 8273256 + .string "{STR_VAR_2} was transferred to\nLANETTE'S PC.\p" + .string "It was placed in \n" + .string "BOX “{STR_VAR_1}.”$" + +gText_PkmnBoxSomeonesPCFull:: @ 8273296 + .string "BOX “{STR_VAR_3}” on\n" + .string "SOMEONE'S PC was full.\p" + .string "{STR_VAR_2} was transferred to\n" + .string "BOX “{STR_VAR_1}.”$" + +gText_PkmnBoxLanettesPCFull:: @ 82732D9 + .string "BOX “{STR_VAR_3}” on\n" + .string "LANETTE'S PC was full.\p" + .string "{STR_VAR_2} was transferred to\n" + .string "BOX “{STR_VAR_1}.”$" + +gText_NoMoreRoomForPokemon:: @ 827331C + .string "There's no more room for POKéMON!\p" + .string "The POKéMON BOXES are full and\n" + .string "can't accept any more!$" + +gText_NicknameThisPokemon:: @ 8273374 + .string "Do you want to give a nickname to\n" + .string "this {STR_VAR_1}?$" diff --git a/data/text/record_mix.inc b/data/text/record_mix.inc new file mode 100644 index 0000000000..8f995af1d9 --- /dev/null +++ b/data/text/record_mix.inc @@ -0,0 +1,6 @@ +Text_WouldYouLikeToMixRecords: @ 827260D + .string "Would you like to mix records with\n" + .string "other TRAINERS?$" + +Text_WouldNotLikeToMixRecords: @ 8272640 + .string "We hope to see you again!$" diff --git a/data/text/save.inc b/data/text/save.inc index bef7f3d6bf..4719f34d35 100644 --- a/data/text/save.inc +++ b/data/text/save.inc @@ -1,3 +1,4 @@ + .align 2 gText_ConfirmSave:: @ 82C87B4 .string "Would you like to save the game?$" From a7ffa9657855b2d0e96ac9809a64794e001330bd Mon Sep 17 00:00:00 2001 From: GriffinR Date: Mon, 21 Oct 2019 18:15:50 -0400 Subject: [PATCH 16/46] Rename mart_attendant to mart_clerk --- data/event_scripts.s | 2 +- data/text/{mart_attendant.inc => mart_clerk.inc} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename data/text/{mart_attendant.inc => mart_clerk.inc} (100%) diff --git a/data/event_scripts.s b/data/event_scripts.s index bf70660512..de13da7482 100644 --- a/data/event_scripts.s +++ b/data/event_scripts.s @@ -965,7 +965,7 @@ Common_EventScript_PlayerHandedOverTheItem:: @ 82723E4 .include "data/text/record_mix.inc" .include "data/text/pc.inc" .include "data/text/pkmn_center_nurse.inc" - .include "data/text/mart_attendant.inc" + .include "data/text/mart_clerk.inc" .include "data/text/obtain_item.inc" @ The below and surf.inc could be split into some text/notices.inc diff --git a/data/text/mart_attendant.inc b/data/text/mart_clerk.inc similarity index 100% rename from data/text/mart_attendant.inc rename to data/text/mart_clerk.inc From 6923f0e36958ac34feb9345fed88cb611027bea8 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Mon, 21 Oct 2019 17:58:00 -0400 Subject: [PATCH 17/46] Document lilycove_lady.inc --- .../LilycoveCity_PokemonCenter_1F/map.json | 4 +- data/scripts/lilycove_lady.inc | 600 +++++++++--------- 2 files changed, 302 insertions(+), 302 deletions(-) diff --git a/data/maps/LilycoveCity_PokemonCenter_1F/map.json b/data/maps/LilycoveCity_PokemonCenter_1F/map.json index c5c0121f4a..023717a59a 100644 --- a/data/maps/LilycoveCity_PokemonCenter_1F/map.json +++ b/data/maps/LilycoveCity_PokemonCenter_1F/map.json @@ -63,7 +63,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "LilycoveCity_PokemonCenter_1F_EventScript_2A836B", + "script": "LilycoveCity_PokemonCenter_1F_EventScript_LilycoveLady", "flag": "0" }, { @@ -76,7 +76,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "LilycoveCity_PokemonCenter_1F_EventScript_2A89C7", + "script": "LilycoveCity_PokemonCenter_1F_EventScript_ContestLadyMon", "flag": "FLAG_HIDE_LILYCOVE_POKEMON_CENTER_LADY" } ], diff --git a/data/scripts/lilycove_lady.inc b/data/scripts/lilycove_lady.inc index 77b842d3d0..ad63aeba8c 100644 --- a/data/scripts/lilycove_lady.inc +++ b/data/scripts/lilycove_lady.inc @@ -1,455 +1,453 @@ -LilycoveCity_PokemonCenter_1F_EventScript_2A836B:: @ 82A836B +LilycoveCity_PokemonCenter_1F_EventScript_LilycoveLady:: @ 82A836B special Script_GetLilycoveLadyId switch VAR_RESULT - case LILYCOVE_LADY_QUIZ, LilycoveCity_PokemonCenter_1F_EventScript_2A8554 - case LILYCOVE_LADY_FAVOR, LilycoveCity_PokemonCenter_1F_EventScript_2A8395 - case LILYCOVE_LADY_CONTEST, LilycoveCity_PokemonCenter_1F_EventScript_2A882A + case LILYCOVE_LADY_QUIZ, LilycoveCity_PokemonCenter_1F_EventScript_QuizLady + case LILYCOVE_LADY_FAVOR, LilycoveCity_PokemonCenter_1F_EventScript_FavorLady + case LILYCOVE_LADY_CONTEST, LilycoveCity_PokemonCenter_1F_EventScript_ContestLady end -LilycoveCity_PokemonCenter_1F_EventScript_2A8395:: @ 82A8395 +LilycoveCity_PokemonCenter_1F_EventScript_FavorLady:: @ 82A8395 lock faceplayer - msgbox LilycoveCity_PokemonCenter_1F_Text_2A8A69, MSGBOX_DEFAULT + msgbox LilycoveCity_PokemonCenter_1F_Text_ImTheFavorLady, MSGBOX_DEFAULT specialvar VAR_RESULT, GetFavorLadyState compare VAR_RESULT, LILYCOVE_LADY_STATE_READY - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_2A83D0 + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_FavorLadyReady compare VAR_RESULT, LILYCOVE_LADY_STATE_COMPLETED - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_2A83C6 + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_FavorLadyCompleted compare VAR_RESULT, LILYCOVE_LADY_STATE_PRIZE - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_2A8510 + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_FavorLadyPrize end -LilycoveCity_PokemonCenter_1F_EventScript_2A83C6:: @ 82A83C6 - msgbox LilycoveCity_PokemonCenter_1F_Text_2A8AB1, MSGBOX_DEFAULT +LilycoveCity_PokemonCenter_1F_EventScript_FavorLadyCompleted:: @ 82A83C6 + msgbox LilycoveCity_PokemonCenter_1F_Text_ThankYouForLastTime, MSGBOX_DEFAULT release end -LilycoveCity_PokemonCenter_1F_EventScript_2A83D0:: @ 82A83D0 +LilycoveCity_PokemonCenter_1F_EventScript_FavorLadyReady:: @ 82A83D0 special BufferFavorLadyRequest - msgbox LilycoveCity_PokemonCenter_1F_Text_2A8A7D, MSGBOX_DEFAULT + msgbox LilycoveCity_PokemonCenter_1F_Text_ObsessedWithThing, MSGBOX_DEFAULT specialvar VAR_RESULT, HasAnotherPlayerGivenFavorLadyItem - compare VAR_RESULT, 0 - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_2A8435 - compare VAR_RESULT, 1 - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_2A83F7 + compare VAR_RESULT, FALSE + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_RequestItem + compare VAR_RESULT, TRUE + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_TellAboutPlayersItem end -LilycoveCity_PokemonCenter_1F_EventScript_2A83F7:: @ 82A83F7 +LilycoveCity_PokemonCenter_1F_EventScript_TellAboutPlayersItem:: @ 82A83F7 special BufferFavorLadyItemName special BufferFavorLadyPlayerName specialvar VAR_RESULT, DidFavorLadyLikeItem + compare VAR_RESULT, FALSE + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_PlayerGaveBadThing + compare VAR_RESULT, TRUE + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_PlayerGaveGreatThing + end + +LilycoveCity_PokemonCenter_1F_EventScript_PlayerGaveBadThing:: @ 82A8419 + msgbox LilycoveCity_PokemonCenter_1F_Text_PlayerGaveMeBadThing, MSGBOX_DEFAULT + goto LilycoveCity_PokemonCenter_1F_EventScript_RequestItem + end + +LilycoveCity_PokemonCenter_1F_EventScript_PlayerGaveGreatThing:: @ 82A8427 + msgbox LilycoveCity_PokemonCenter_1F_Text_PlayerGaveMeGreatThing, MSGBOX_DEFAULT + goto LilycoveCity_PokemonCenter_1F_EventScript_RequestItem + end + +LilycoveCity_PokemonCenter_1F_EventScript_RequestItem:: @ 82A8435 + msgbox LilycoveCity_PokemonCenter_1F_Text_WillYouShareThing, MSGBOX_YESNO compare VAR_RESULT, 0 - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_2A8419 + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_DeclineFavor compare VAR_RESULT, 1 - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_2A8427 + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_AcceptFavor end -LilycoveCity_PokemonCenter_1F_EventScript_2A8419:: @ 82A8419 - msgbox LilycoveCity_PokemonCenter_1F_Text_2A8ACE, MSGBOX_DEFAULT - goto LilycoveCity_PokemonCenter_1F_EventScript_2A8435 - end - -LilycoveCity_PokemonCenter_1F_EventScript_2A8427:: @ 82A8427 - msgbox LilycoveCity_PokemonCenter_1F_Text_2A8B36, MSGBOX_DEFAULT - goto LilycoveCity_PokemonCenter_1F_EventScript_2A8435 - end - -LilycoveCity_PokemonCenter_1F_EventScript_2A8435:: @ 82A8435 - msgbox LilycoveCity_PokemonCenter_1F_Text_2A8B69, MSGBOX_YESNO - compare VAR_RESULT, 0 - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_2A8454 - compare VAR_RESULT, 1 - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_2A845E - end - -LilycoveCity_PokemonCenter_1F_EventScript_2A8454:: @ 82A8454 - msgbox LilycoveCity_PokemonCenter_1F_Text_2A8BCD, MSGBOX_DEFAULT +LilycoveCity_PokemonCenter_1F_EventScript_DeclineFavor:: @ 82A8454 + msgbox LilycoveCity_PokemonCenter_1F_Text_IsThatSoGoodbye, MSGBOX_DEFAULT release end -LilycoveCity_PokemonCenter_1F_EventScript_2A845E:: @ 82A845E - msgbox LilycoveCity_PokemonCenter_1F_Text_2A8BAD, MSGBOX_DEFAULT - goto LilycoveCity_PokemonCenter_1F_EventScript_2A846C +LilycoveCity_PokemonCenter_1F_EventScript_AcceptFavor:: @ 82A845E + msgbox LilycoveCity_PokemonCenter_1F_Text_WhatWillYouGiveMe, MSGBOX_DEFAULT + goto LilycoveCity_PokemonCenter_1F_EventScript_ChooseFavorItem end -LilycoveCity_PokemonCenter_1F_EventScript_2A846C:: @ 82A846C +LilycoveCity_PokemonCenter_1F_EventScript_ChooseFavorItem:: @ 82A846C fadescreen 1 setvar VAR_RESULT, 0 special Script_FavorLadyOpenBagMenu waitstate compare VAR_RESULT, 0 - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_2A848E + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_CancelChooseFavorItem compare VAR_RESULT, 1 - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_2A84AD + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_GiveFavorItem end -LilycoveCity_PokemonCenter_1F_EventScript_2A848E:: @ 82A848E - msgbox LilycoveCity_PokemonCenter_1F_Text_2A8BEE, MSGBOX_YESNO +LilycoveCity_PokemonCenter_1F_EventScript_CancelChooseFavorItem:: @ 82A848E + msgbox LilycoveCity_PokemonCenter_1F_Text_NotWillingToShare, MSGBOX_YESNO compare VAR_RESULT, 1 - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_2A8454 + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_DeclineFavor compare VAR_RESULT, 0 - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_2A846C + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_ChooseFavorItem end -LilycoveCity_PokemonCenter_1F_EventScript_2A84AD:: @ 82A84AD +LilycoveCity_PokemonCenter_1F_EventScript_GiveFavorItem:: @ 82A84AD specialvar VAR_RESULT, Script_DoesFavorLadyLikeItem - compare VAR_RESULT, 0 - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_2A84C9 - compare VAR_RESULT, 1 - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_2A84D6 + compare VAR_RESULT, FALSE + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_DidntLikeFavorItem + compare VAR_RESULT, TRUE + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_CheckLovedItem end -LilycoveCity_PokemonCenter_1F_EventScript_2A84C9:: @ 82A84C9 +LilycoveCity_PokemonCenter_1F_EventScript_DidntLikeFavorItem:: @ 82A84C9 special BufferFavorLadyRequest - msgbox LilycoveCity_PokemonCenter_1F_Text_2A8C0F, MSGBOX_DEFAULT + msgbox LilycoveCity_PokemonCenter_1F_Text_IllTryToCherishIt, MSGBOX_DEFAULT release end -LilycoveCity_PokemonCenter_1F_EventScript_2A84D6:: @ 82A84D6 +LilycoveCity_PokemonCenter_1F_EventScript_CheckLovedItem:: @ 82A84D6 specialvar VAR_RESULT, IsFavorLadyThresholdMet - compare VAR_RESULT, 0 - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_2A84F2 - compare VAR_RESULT, 1 - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_2A84FF + compare VAR_RESULT, FALSE + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_LikedFavorItem + compare VAR_RESULT, TRUE + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_LovedFavorItem end -LilycoveCity_PokemonCenter_1F_EventScript_2A84F2:: @ 82A84F2 +LilycoveCity_PokemonCenter_1F_EventScript_LikedFavorItem:: @ 82A84F2 special BufferFavorLadyRequest - msgbox LilycoveCity_PokemonCenter_1F_Text_2A8C6F, MSGBOX_DEFAULT + msgbox LilycoveCity_PokemonCenter_1F_Text_IWillCherishThis, MSGBOX_DEFAULT release end -LilycoveCity_PokemonCenter_1F_EventScript_2A84FF:: @ 82A84FF +LilycoveCity_PokemonCenter_1F_EventScript_LovedFavorItem:: @ 82A84FF special BufferFavorLadyRequest - msgbox LilycoveCity_PokemonCenter_1F_Text_2A8CC8, MSGBOX_DEFAULT - goto LilycoveCity_PokemonCenter_1F_EventScript_2A8510 + msgbox LilycoveCity_PokemonCenter_1F_Text_IWillTreasureThis, MSGBOX_DEFAULT + goto LilycoveCity_PokemonCenter_1F_EventScript_FavorLadyPrize end -LilycoveCity_PokemonCenter_1F_EventScript_2A8510:: @ 82A8510 +LilycoveCity_PokemonCenter_1F_EventScript_FavorLadyPrize:: @ 82A8510 setvar VAR_0x8004, 0 specialvar VAR_0x8004, FavorLadyGetPrize - msgbox LilycoveCity_PokemonCenter_1F_Text_2A8D5D, MSGBOX_DEFAULT + msgbox LilycoveCity_PokemonCenter_1F_Text_IllGiveYouThisInReturn, MSGBOX_DEFAULT giveitem_std VAR_0x8004 compare VAR_RESULT, 0 - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_2A8545 + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_NoRoomForFavorPrize compare VAR_RESULT, 1 - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_2A854F + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_ReceivedFavorPrize end -LilycoveCity_PokemonCenter_1F_EventScript_2A8545:: @ 82A8545 - msgbox LilycoveCity_PokemonCenter_1F_Text_2A8DBD, MSGBOX_DEFAULT +LilycoveCity_PokemonCenter_1F_EventScript_NoRoomForFavorPrize:: @ 82A8545 + msgbox LilycoveCity_PokemonCenter_1F_Text_YouDontHaveSpaceForIt, MSGBOX_DEFAULT release end -LilycoveCity_PokemonCenter_1F_EventScript_2A854F:: @ 82A854F +LilycoveCity_PokemonCenter_1F_EventScript_ReceivedFavorPrize:: @ 82A854F special SetFavorLadyState_Complete release end -LilycoveCity_PokemonCenter_1F_EventScript_2A8554:: @ 82A8554 +LilycoveCity_PokemonCenter_1F_EventScript_QuizLady:: @ 82A8554 lock faceplayer - msgbox LilycoveCity_PokemonCenter_1F_Text_2A8E2B, MSGBOX_DEFAULT + msgbox LilycoveCity_PokemonCenter_1F_Text_ImTheQuizLady, MSGBOX_DEFAULT specialvar VAR_RESULT, GetQuizLadyState compare VAR_RESULT, LILYCOVE_LADY_STATE_READY - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_2A8585 + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_HasQuiz compare VAR_RESULT, LILYCOVE_LADY_STATE_COMPLETED - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_2A85AC + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_CheckMadeQuiz compare VAR_RESULT, LILYCOVE_LADY_STATE_PRIZE - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_2A86EC + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_ReadyGivePrize end -LilycoveCity_PokemonCenter_1F_EventScript_2A8585:: @ 82A8585 +LilycoveCity_PokemonCenter_1F_EventScript_HasQuiz:: @ 82A8585 specialvar VAR_RESULT, GetQuizAuthor compare VAR_RESULT, QUIZ_AUTHOR_PLAYER - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_2A85C8 + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_WaitingToTakeYourQuiz compare VAR_RESULT, QUIZ_AUTHOR_OTHER_PLAYER - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_2A85D2 + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_PlayerQuizReady compare VAR_RESULT, QUIZ_AUTHOR_LADY - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_2A85E0 + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_LadyQuizReady end -LilycoveCity_PokemonCenter_1F_EventScript_2A85AC:: @ 82A85AC +LilycoveCity_PokemonCenter_1F_EventScript_CheckMadeQuiz:: @ 82A85AC specialvar VAR_RESULT, IsQuizLadyWaitingForChallenger - compare VAR_RESULT, 0 - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_2A8759 - compare VAR_RESULT, 1 - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_2A85C8 + compare VAR_RESULT, FALSE + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_AskMakeQuiz + compare VAR_RESULT, TRUE + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_WaitingToTakeYourQuiz end -LilycoveCity_PokemonCenter_1F_EventScript_2A85C8:: @ 82A85C8 - msgbox LilycoveCity_PokemonCenter_1F_Text_2A8E4E, MSGBOX_DEFAULT +LilycoveCity_PokemonCenter_1F_EventScript_WaitingToTakeYourQuiz:: @ 82A85C8 + msgbox LilycoveCity_PokemonCenter_1F_Text_WaitingToTakeYourQuiz, MSGBOX_DEFAULT release end -LilycoveCity_PokemonCenter_1F_EventScript_2A85D2:: @ 82A85D2 - msgbox LilycoveCity_PokemonCenter_1F_Text_2A8EAC, MSGBOX_DEFAULT - goto LilycoveCity_PokemonCenter_1F_EventScript_2A85EE +LilycoveCity_PokemonCenter_1F_EventScript_PlayerQuizReady:: @ 82A85D2 + msgbox LilycoveCity_PokemonCenter_1F_Text_WaitingForChallenger, MSGBOX_DEFAULT + goto LilycoveCity_PokemonCenter_1F_EventScript_AskTakeQuiz end -LilycoveCity_PokemonCenter_1F_EventScript_2A85E0:: @ 82A85E0 - msgbox LilycoveCity_PokemonCenter_1F_Text_2A8EAC, MSGBOX_DEFAULT - goto LilycoveCity_PokemonCenter_1F_EventScript_2A85EE +LilycoveCity_PokemonCenter_1F_EventScript_LadyQuizReady:: @ 82A85E0 + msgbox LilycoveCity_PokemonCenter_1F_Text_WaitingForChallenger, MSGBOX_DEFAULT + goto LilycoveCity_PokemonCenter_1F_EventScript_AskTakeQuiz end -LilycoveCity_PokemonCenter_1F_EventScript_2A85EE:: @ 82A85EE +LilycoveCity_PokemonCenter_1F_EventScript_AskTakeQuiz:: @ 82A85EE setvar VAR_0x8004, 0 - msgbox LilycoveCity_PokemonCenter_1F_Text_2A8EEC, MSGBOX_YESNO + msgbox LilycoveCity_PokemonCenter_1F_Text_TakeQuizChallenge, MSGBOX_YESNO compare VAR_RESULT, 1 - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_2A861C + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_TakeQuiz compare VAR_RESULT, 0 - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_2A8612 + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_DeclineQuiz end -LilycoveCity_PokemonCenter_1F_EventScript_2A8612:: @ 82A8612 - msgbox LilycoveCity_PokemonCenter_1F_Text_2A8F65, MSGBOX_DEFAULT +LilycoveCity_PokemonCenter_1F_EventScript_DeclineQuiz:: @ 82A8612 + msgbox LilycoveCity_PokemonCenter_1F_Text_HowBoringBye, MSGBOX_DEFAULT release end -LilycoveCity_PokemonCenter_1F_EventScript_2A861C:: @ 82A861C +LilycoveCity_PokemonCenter_1F_EventScript_TakeQuiz:: @ 82A861C special ClearQuizLadyPlayerAnswer compare VAR_0x8004, 0 goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_2A864C compare VAR_0x8004, EASY_CHAT_TYPE_QUIZ_ANSWER goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_2A8656 -LilycoveCity_PokemonCenter_1F_EventScript_2A8635:: @ 82A8635 +LilycoveCity_PokemonCenter_1F_EventScript_CheckQuizTakingState:: @ 82A8635 compare VAR_RESULT, 0 - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_2A8660 + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_AskQuitQuiz compare VAR_RESULT, 1 - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_2A8689 + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_SubmitQuizResponse end LilycoveCity_PokemonCenter_1F_EventScript_2A864C:: @ 82A864C special QuizLadyShowQuizQuestion waitstate - goto LilycoveCity_PokemonCenter_1F_EventScript_2A8635 + goto LilycoveCity_PokemonCenter_1F_EventScript_CheckQuizTakingState end LilycoveCity_PokemonCenter_1F_EventScript_2A8656:: @ 82A8656 special QuizLadyGetPlayerAnswer waitstate - goto LilycoveCity_PokemonCenter_1F_EventScript_2A8635 + goto LilycoveCity_PokemonCenter_1F_EventScript_CheckQuizTakingState end -LilycoveCity_PokemonCenter_1F_EventScript_2A8660:: @ 82A8660 - msgbox LilycoveCity_PokemonCenter_1F_Text_2A8F7E, MSGBOX_YESNO +LilycoveCity_PokemonCenter_1F_EventScript_AskQuitQuiz:: @ 82A8660 + msgbox LilycoveCity_PokemonCenter_1F_Text_YoureGoingToQuit, MSGBOX_YESNO compare VAR_RESULT, 1 - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_2A867F + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_QuitTakingQuiz compare VAR_RESULT, 0 - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_2A861C + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_TakeQuiz end -LilycoveCity_PokemonCenter_1F_EventScript_2A867F:: @ 82A867F - msgbox LilycoveCity_PokemonCenter_1F_Text_2A8F9A, MSGBOX_DEFAULT +LilycoveCity_PokemonCenter_1F_EventScript_QuitTakingQuiz:: @ 82A867F + msgbox LilycoveCity_PokemonCenter_1F_Text_TakeTheQuizAnotherTime, MSGBOX_DEFAULT release end -LilycoveCity_PokemonCenter_1F_EventScript_2A8689:: @ 82A8689 +LilycoveCity_PokemonCenter_1F_EventScript_SubmitQuizResponse:: @ 82A8689 special SetQuizLadyState_Complete - msgbox LilycoveCity_PokemonCenter_1F_Text_2A8F4D, MSGBOX_DEFAULT + msgbox LilycoveCity_PokemonCenter_1F_Text_WaitForAnswer, MSGBOX_DEFAULT specialvar VAR_RESULT, IsQuizAnswerCorrect - compare VAR_RESULT, 0 - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_2A86C7 - compare VAR_RESULT, 1 - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_2A86B0 + compare VAR_RESULT, FALSE + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_IncorrectResponse + compare VAR_RESULT, TRUE + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_CorrectResponse end -LilycoveCity_PokemonCenter_1F_EventScript_2A86B0:: @ 82A86B0 +LilycoveCity_PokemonCenter_1F_EventScript_CorrectResponse:: @ 82A86B0 playse SE_SEIKAI delay 10 playse SE_SEIKAI - msgbox LilycoveCity_PokemonCenter_1F_Text_2A8FC7, MSGBOX_DEFAULT - goto LilycoveCity_PokemonCenter_1F_EventScript_2A86EC + msgbox LilycoveCity_PokemonCenter_1F_Text_YouGotItRight, MSGBOX_DEFAULT + goto LilycoveCity_PokemonCenter_1F_EventScript_ReadyGivePrize end -LilycoveCity_PokemonCenter_1F_EventScript_2A86C7:: @ 82A86C7 +LilycoveCity_PokemonCenter_1F_EventScript_IncorrectResponse:: @ 82A86C7 special BufferQuizCorrectAnswer special BufferQuizPrizeName playse SE_HAZURE delay 10 playse SE_HAZURE - msgbox LilycoveCity_PokemonCenter_1F_Text_2A90A5, MSGBOX_DEFAULT - msgbox LilycoveCity_PokemonCenter_1F_Text_2A90CD, MSGBOX_DEFAULT - goto LilycoveCity_PokemonCenter_1F_EventScript_2A8759 + msgbox LilycoveCity_PokemonCenter_1F_Text_WrongTheCorrectAnswerIs, MSGBOX_DEFAULT + msgbox LilycoveCity_PokemonCenter_1F_Text_IGetToKeepPrize, MSGBOX_DEFAULT + goto LilycoveCity_PokemonCenter_1F_EventScript_AskMakeQuiz end @ VAR_RESULT is essentially ignored, both jumps are identical -LilycoveCity_PokemonCenter_1F_EventScript_2A86EC:: @ 82A86EC +LilycoveCity_PokemonCenter_1F_EventScript_ReadyGivePrize:: @ 82A86EC specialvar VAR_RESULT, BufferQuizAuthorNameAndCheckIfLady compare VAR_RESULT, 1 - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_2A8708 + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_GivePrize1 compare VAR_RESULT, 0 - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_2A8716 + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_GivePrize0 end -LilycoveCity_PokemonCenter_1F_EventScript_2A8708:: @ 82A8708 - msgbox LilycoveCity_PokemonCenter_1F_Text_2A9007, MSGBOX_DEFAULT - goto LilycoveCity_PokemonCenter_1F_EventScript_2A8724 +LilycoveCity_PokemonCenter_1F_EventScript_GivePrize1:: @ 82A8708 + msgbox LilycoveCity_PokemonCenter_1F_Text_YouGotItRightYouveWonPersonsPrize, MSGBOX_DEFAULT + goto LilycoveCity_PokemonCenter_1F_EventScript_GivePrize end -LilycoveCity_PokemonCenter_1F_EventScript_2A8716:: @ 82A8716 - msgbox LilycoveCity_PokemonCenter_1F_Text_2A9007, MSGBOX_DEFAULT - goto LilycoveCity_PokemonCenter_1F_EventScript_2A8724 +LilycoveCity_PokemonCenter_1F_EventScript_GivePrize0:: @ 82A8716 + msgbox LilycoveCity_PokemonCenter_1F_Text_YouGotItRightYouveWonPersonsPrize, MSGBOX_DEFAULT + goto LilycoveCity_PokemonCenter_1F_EventScript_GivePrize end -LilycoveCity_PokemonCenter_1F_EventScript_2A8724:: @ 82A8724 +LilycoveCity_PokemonCenter_1F_EventScript_GivePrize:: @ 82A8724 setvar VAR_0x8005, 0 special BufferQuizPrizeItem special SetQuizLadyState_Complete giveitem_std VAR_0x8005 compare VAR_RESULT, 0 - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_2A874C - goto LilycoveCity_PokemonCenter_1F_EventScript_2A8759 + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_NoSpaceForQuizPrize + goto LilycoveCity_PokemonCenter_1F_EventScript_AskMakeQuiz end -LilycoveCity_PokemonCenter_1F_EventScript_2A874C:: @ 82A874C - msgbox LilycoveCity_PokemonCenter_1F_Text_2A906A, MSGBOX_DEFAULT +LilycoveCity_PokemonCenter_1F_EventScript_NoSpaceForQuizPrize:: @ 82A874C + msgbox LilycoveCity_PokemonCenter_1F_Text_YourBagIsFilledUp, MSGBOX_DEFAULT special SetQuizLadyState_GivePrize release end -LilycoveCity_PokemonCenter_1F_EventScript_2A8759:: @ 82A8759 - msgbox LilycoveCity_PokemonCenter_1F_Text_2A90FB, MSGBOX_YESNO +LilycoveCity_PokemonCenter_1F_EventScript_AskMakeQuiz:: @ 82A8759 + msgbox LilycoveCity_PokemonCenter_1F_Text_MakeYourOwnQuiz, MSGBOX_YESNO compare VAR_RESULT, 1 - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_2A8785 + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_MakeQuiz compare VAR_RESULT, 0 - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_2A8778 + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_DeclineMakeQuiz end -LilycoveCity_PokemonCenter_1F_EventScript_2A8778:: @ 82A8778 +LilycoveCity_PokemonCenter_1F_EventScript_DeclineMakeQuiz:: @ 82A8778 special QuizLadyPickNewQuestion - msgbox LilycoveCity_PokemonCenter_1F_Text_2A9131, MSGBOX_DEFAULT + msgbox LilycoveCity_PokemonCenter_1F_Text_MaybeNextTime, MSGBOX_DEFAULT release end -LilycoveCity_PokemonCenter_1F_EventScript_2A8785:: @ 82A8785 - msgbox LilycoveCity_PokemonCenter_1F_Text_2A9153, MSGBOX_DEFAULT - -LilycoveCity_PokemonCenter_1F_EventScript_2A878D:: @ 82A878D +LilycoveCity_PokemonCenter_1F_EventScript_MakeQuiz:: @ 82A8785 + msgbox LilycoveCity_PokemonCenter_1F_Text_PickYourPrize, MSGBOX_DEFAULT +LilycoveCity_PokemonCenter_1F_EventScript_PickPrize:: @ 82A878D fadescreen 1 setvar VAR_RESULT, 0 special Script_QuizLadyOpenBagMenu waitstate compare VAR_RESULT, 0 - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_2A87AF + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_AskQuitChoosingPrize compare VAR_RESULT, 1 - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_2A87CE + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_WriteQuiz end -LilycoveCity_PokemonCenter_1F_EventScript_2A87AF:: @ 82A87AF - msgbox LilycoveCity_PokemonCenter_1F_Text_2A9212, MSGBOX_YESNO +LilycoveCity_PokemonCenter_1F_EventScript_AskQuitChoosingPrize:: @ 82A87AF + msgbox LilycoveCity_PokemonCenter_1F_Text_QuitChoosingPrize, MSGBOX_YESNO compare VAR_RESULT, 1 - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_2A8778 + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_DeclineMakeQuiz compare VAR_RESULT, 0 - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_2A878D + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_PickPrize end -LilycoveCity_PokemonCenter_1F_EventScript_2A87CE:: @ 82A87CE - msgbox LilycoveCity_PokemonCenter_1F_Text_2A9270, MSGBOX_DEFAULT +LilycoveCity_PokemonCenter_1F_EventScript_WriteQuiz:: @ 82A87CE + msgbox LilycoveCity_PokemonCenter_1F_Text_WriteYourQuiz, MSGBOX_DEFAULT special ClearQuizLadyQuestionAndAnswer special ClearQuizLadyPlayerAnswer setvar VAR_0x8004, EASY_CHAT_TYPE_QUIZ_QUESTION - -LilycoveCity_PokemonCenter_1F_EventScript_2A87E1:: @ 82A87E1 +LilycoveCity_PokemonCenter_1F_EventScript_WriteQuizQuestion:: @ 82A87E1 fadescreen 1 special QuizLadySetCustomQuestion waitstate compare VAR_RESULT, 0 - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_2A87F8 - goto LilycoveCity_PokemonCenter_1F_EventScript_2A8817 + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_AskQuitWritingQuizQuestion + goto LilycoveCity_PokemonCenter_1F_EventScript_FinishMakingQuiz end -LilycoveCity_PokemonCenter_1F_EventScript_2A87F8:: @ 82A87F8 - msgbox LilycoveCity_PokemonCenter_1F_Text_2A92D3, MSGBOX_YESNO +LilycoveCity_PokemonCenter_1F_EventScript_AskQuitWritingQuizQuestion:: @ 82A87F8 + msgbox LilycoveCity_PokemonCenter_1F_Text_QuitWritingQuizQuestion, MSGBOX_YESNO compare VAR_RESULT, 1 - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_2A8778 + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_DeclineMakeQuiz compare VAR_RESULT, 0 - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_2A87E1 + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_WriteQuizQuestion end -LilycoveCity_PokemonCenter_1F_EventScript_2A8817:: @ 82A8817 +LilycoveCity_PokemonCenter_1F_EventScript_FinishMakingQuiz:: @ 82A8817 special QuizLadyTakePrizeForCustomQuiz special QuizLadyRecordCustomQuizData special QuizLadySetWaitingForChallenger - msgbox LilycoveCity_PokemonCenter_1F_Text_2A9336, MSGBOX_DEFAULT + msgbox LilycoveCity_PokemonCenter_1F_Text_IllLookForAChallenger, MSGBOX_DEFAULT release end -LilycoveCity_PokemonCenter_1F_EventScript_2A882A:: @ 82A882A +LilycoveCity_PokemonCenter_1F_EventScript_ContestLady:: @ 82A882A lock faceplayer - msgbox LilycoveCity_PokemonCenter_1F_Text_2A93A7, MSGBOX_DEFAULT + msgbox LilycoveCity_PokemonCenter_1F_Text_ImTheContestLady, MSGBOX_DEFAULT specialvar VAR_RESULT, HasPlayerGivenContestLadyPokeblock - compare VAR_RESULT, 0 - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_2A8850 - compare VAR_RESULT, 1 - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_2A886C + compare VAR_RESULT, FALSE + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_NotGivenPokeblock + compare VAR_RESULT, TRUE + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_GivenPokeblock end -@ Redundant with above script, VAR_RESULT will always be 0 here -LilycoveCity_PokemonCenter_1F_EventScript_2A8850:: @ 82A8850 +@ Redundant with above script, VAR_RESULT will always be FALSE here +LilycoveCity_PokemonCenter_1F_EventScript_NotGivenPokeblock:: @ 82A8850 specialvar VAR_RESULT, ShouldContestLadyShowGoOnAir - compare VAR_RESULT, 0 - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_2A8876 - compare VAR_RESULT, 1 - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_2A886C + compare VAR_RESULT, FALSE + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_AskForPokeblock + compare VAR_RESULT, TRUE + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_GivenPokeblock end -LilycoveCity_PokemonCenter_1F_EventScript_2A886C:: @ 82A886C - msgbox LilycoveCity_PokemonCenter_1F_Text_2A93D6, MSGBOX_DEFAULT +LilycoveCity_PokemonCenter_1F_EventScript_GivenPokeblock:: @ 82A886C + msgbox LilycoveCity_PokemonCenter_1F_Text_ThankForPokeblock, MSGBOX_DEFAULT release end -LilycoveCity_PokemonCenter_1F_EventScript_2A8876:: @ 82A8876 +LilycoveCity_PokemonCenter_1F_EventScript_AskForPokeblock:: @ 82A8876 special Script_BufferContestLadyCategoryAndMonName - msgbox LilycoveCity_PokemonCenter_1F_Text_2A93F4, MSGBOX_DEFAULT + msgbox LilycoveCity_PokemonCenter_1F_Text_MyFriendDisplaysQuality, MSGBOX_DEFAULT checkitem ITEM_POKEBLOCK_CASE, 1 + compare VAR_RESULT, FALSE + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_NoPokeblockCase + msgbox LilycoveCity_PokemonCenter_1F_Text_AskingForOnePokeblock, MSGBOX_YESNO compare VAR_RESULT, 0 - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_2A89AE - msgbox LilycoveCity_PokemonCenter_1F_Text_2A94E8, MSGBOX_YESNO - compare VAR_RESULT, 0 - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_2A88B0 + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_DeclineGivePokeblock compare VAR_RESULT, 1 - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_2A88BA + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_ChoosePokeblock end -LilycoveCity_PokemonCenter_1F_EventScript_2A88B0:: @ 82A88B0 - msgbox LilycoveCity_PokemonCenter_1F_Text_2A9556, MSGBOX_DEFAULT +LilycoveCity_PokemonCenter_1F_EventScript_DeclineGivePokeblock:: @ 82A88B0 + msgbox LilycoveCity_PokemonCenter_1F_Text_WhatACheapskate, MSGBOX_DEFAULT release end -LilycoveCity_PokemonCenter_1F_EventScript_2A88BA:: @ 82A88BA +LilycoveCity_PokemonCenter_1F_EventScript_ChoosePokeblock:: @ 82A88BA fadescreen 1 special OpenPokeblockCaseForContestLady waitstate compare VAR_RESULT, 0xFFFF - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_2A88D7 + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_AskQuitGivingPokeblock compare VAR_RESULT, 0xFFFF - goto_if_ne LilycoveCity_PokemonCenter_1F_EventScript_2A88F6 + goto_if_ne LilycoveCity_PokemonCenter_1F_EventScript_GivePokeblock end -LilycoveCity_PokemonCenter_1F_EventScript_2A88D7:: @ 82A88D7 - msgbox LilycoveCity_PokemonCenter_1F_Text_2A9537, MSGBOX_YESNO +LilycoveCity_PokemonCenter_1F_EventScript_AskQuitGivingPokeblock:: @ 82A88D7 + msgbox LilycoveCity_PokemonCenter_1F_Text_ICantHaveOnePokeblock, MSGBOX_YESNO compare VAR_RESULT, 1 - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_2A88B0 + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_DeclineGivePokeblock compare VAR_RESULT, 0 - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_2A88BA + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_ChoosePokeblock end -LilycoveCity_PokemonCenter_1F_EventScript_2A88F6:: @ 82A88F6 - msgbox LilycoveCity_PokemonCenter_1F_Text_2A9571, MSGBOX_DEFAULT +LilycoveCity_PokemonCenter_1F_EventScript_GivePokeblock:: @ 82A88F6 + msgbox LilycoveCity_PokemonCenter_1F_Text_IllUseYourPokeblock, MSGBOX_DEFAULT special SetContestLadyGivenPokeblock special GetContestLadyMonSpecies - goto LilycoveCity_PokemonCenter_1F_EventScript_2A890A + goto LilycoveCity_PokemonCenter_1F_EventScript_FeedPokeblock end @ VAR_0x8004 here is the return value from GivePokeblockToContestLady -LilycoveCity_PokemonCenter_1F_EventScript_2A890A:: @ 82A890A - applymovement 4, LilycoveCity_PokemonCenter_1F_Movement_2A89B8 +LilycoveCity_PokemonCenter_1F_EventScript_FeedPokeblock:: @ 82A890A + applymovement 4, LilycoveCity_PokemonCenter_1F_Movement_LadyFaceMon waitmovement 0 delay 60 - applymovement 5, LilycoveCity_PokemonCenter_1F_Movement_2A89BB + applymovement 5, LilycoveCity_PokemonCenter_1F_Movement_MonFaceLady waitmovement 0 delay 60 waitse @@ -457,194 +455,194 @@ LilycoveCity_PokemonCenter_1F_EventScript_2A890A:: @ 82A890A delay 120 waitmoncry compare VAR_0x8004, 1 - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_2A893F - goto LilycoveCity_PokemonCenter_1F_EventScript_2A894C + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_MonEnjoyPokeblock + goto LilycoveCity_PokemonCenter_1F_EventScript_FinishFeedPokeblock end -LilycoveCity_PokemonCenter_1F_EventScript_2A893F:: @ 82A893F - applymovement 5, LilycoveCity_PokemonCenter_1F_Movement_2A89C2 +@ VAR_0x8004 here is the return value from GivePokeblockToContestLady +LilycoveCity_PokemonCenter_1F_EventScript_MonEnjoyPokeblock:: @ 82A893F + applymovement 5, LilycoveCity_PokemonCenter_1F_Movement_MonJump waitmovement 0 delay 60 - -@ VAR_0x8004 here is the return value from GivePokeblockToContestLady -LilycoveCity_PokemonCenter_1F_EventScript_2A894C:: @ 82A894C - applymovement 4, LilycoveCity_PokemonCenter_1F_Movement_2A89C0 +LilycoveCity_PokemonCenter_1F_EventScript_FinishFeedPokeblock:: @ 82A894C + applymovement 4, LilycoveCity_PokemonCenter_1F_Movement_LadyFacePlayer waitmovement 0 delay 60 compare VAR_0x8004, 0 - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_2A8970 + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_MonDislikedPokeblock compare VAR_0x8004, 1 - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_2A897E + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_MonLikedPokeblock end -LilycoveCity_PokemonCenter_1F_EventScript_2A8970:: @ 82A8970 - msgbox LilycoveCity_PokemonCenter_1F_Text_2A95AD, MSGBOX_DEFAULT - goto LilycoveCity_PokemonCenter_1F_EventScript_2A898F +LilycoveCity_PokemonCenter_1F_EventScript_MonDislikedPokeblock:: @ 82A8970 + msgbox LilycoveCity_PokemonCenter_1F_Text_NoChangeThanks, MSGBOX_DEFAULT + goto LilycoveCity_PokemonCenter_1F_EventScript_CheckAirContestLadyShow end -LilycoveCity_PokemonCenter_1F_EventScript_2A897E:: @ 82A897E +LilycoveCity_PokemonCenter_1F_EventScript_MonLikedPokeblock:: @ 82A897E special Script_BufferContestLadyCategoryAndMonName - msgbox LilycoveCity_PokemonCenter_1F_Text_2A9605, MSGBOX_DEFAULT - goto LilycoveCity_PokemonCenter_1F_EventScript_2A898F + msgbox LilycoveCity_PokemonCenter_1F_Text_ReallyImprovedThanks, MSGBOX_DEFAULT + goto LilycoveCity_PokemonCenter_1F_EventScript_CheckAirContestLadyShow end -LilycoveCity_PokemonCenter_1F_EventScript_2A898F:: @ 82A898F +LilycoveCity_PokemonCenter_1F_EventScript_CheckAirContestLadyShow:: @ 82A898F specialvar VAR_RESULT, ShouldContestLadyShowGoOnAir compare VAR_RESULT, 1 - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_2A89A1 + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_AirContestLadyShow release end -LilycoveCity_PokemonCenter_1F_EventScript_2A89A1:: @ 82A89A1 - msgbox LilycoveCity_PokemonCenter_1F_Text_2A9669, MSGBOX_DEFAULT +LilycoveCity_PokemonCenter_1F_EventScript_AirContestLadyShow:: @ 82A89A1 + msgbox LilycoveCity_PokemonCenter_1F_Text_ReadyToEnterContests, MSGBOX_DEFAULT special PutLilycoveContestLadyShowOnTheAir release end -LilycoveCity_PokemonCenter_1F_EventScript_2A89AE:: @ 82A89AE - msgbox LilycoveCity_PokemonCenter_1F_Text_2A9451, MSGBOX_DEFAULT +LilycoveCity_PokemonCenter_1F_EventScript_NoPokeblockCase:: @ 82A89AE + msgbox LilycoveCity_PokemonCenter_1F_Text_DontHaveAPokeblockCase, MSGBOX_DEFAULT release end -LilycoveCity_PokemonCenter_1F_Movement_2A89B8: @ 82A89B8 +LilycoveCity_PokemonCenter_1F_Movement_LadyFaceMon: @ 82A89B8 face_right delay_8 step_end -LilycoveCity_PokemonCenter_1F_Movement_2A89BB: @ 82A89BB +LilycoveCity_PokemonCenter_1F_Movement_MonFaceLady: @ 82A89BB face_left delay_8 step_end -LilycoveCity_PokemonCenter_1F_Movement_2A89BE: @ 82A89BE +@ Unused +LilycoveCity_PokemonCenter_1F_Movement_MonFaceDown: @ 82A89BE face_down step_end -LilycoveCity_PokemonCenter_1F_Movement_2A89C0: @ 82A89C0 +LilycoveCity_PokemonCenter_1F_Movement_LadyFacePlayer: @ 82A89C0 face_player step_end -LilycoveCity_PokemonCenter_1F_Movement_2A89C2: @ 82A89C2 +LilycoveCity_PokemonCenter_1F_Movement_MonJump: @ 82A89C2 disable_jump_landing_ground_effect jump_in_place_left disable_jump_landing_ground_effect jump_in_place_left step_end -LilycoveCity_PokemonCenter_1F_EventScript_2A89C7:: @ 82A89C7 +LilycoveCity_PokemonCenter_1F_EventScript_ContestLadyMon:: @ 82A89C7 specialvar VAR_RESULT, GetContestLadyCategory special Script_BufferContestLadyCategoryAndMonName special GetContestLadyMonSpecies compare VAR_RESULT, CONTEST_CATEGORY_COOL - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_2A8A0A + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_Zigzagoon compare VAR_RESULT, CONTEST_CATEGORY_BEAUTY - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_2A8A1D + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_Skitty compare VAR_RESULT, CONTEST_CATEGORY_CUTE - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_2A8A30 + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_Poochyena compare VAR_RESULT, CONTEST_CATEGORY_SMART - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_2A8A43 + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_Kecleon compare VAR_RESULT, CONTEST_CATEGORY_TOUGH - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_2A8A56 + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_Pikachu end -LilycoveCity_PokemonCenter_1F_EventScript_2A8A0A:: @ 82A8A0A +LilycoveCity_PokemonCenter_1F_EventScript_Zigzagoon:: @ 82A8A0A lock faceplayer waitse playmoncry VAR_0x8005, 0 - msgbox LilycoveCity_PokemonCenter_1F_Text_2A96DA, MSGBOX_DEFAULT + msgbox LilycoveCity_PokemonCenter_1F_Text_Zigzagoon, MSGBOX_DEFAULT waitmoncry release end -LilycoveCity_PokemonCenter_1F_EventScript_2A8A1D:: @ 82A8A1D +LilycoveCity_PokemonCenter_1F_EventScript_Skitty:: @ 82A8A1D lock faceplayer waitse playmoncry VAR_0x8005, 0 - msgbox LilycoveCity_PokemonCenter_1F_Text_2A970E, MSGBOX_DEFAULT + msgbox LilycoveCity_PokemonCenter_1F_Text_Skitty, MSGBOX_DEFAULT waitmoncry release end -LilycoveCity_PokemonCenter_1F_EventScript_2A8A30:: @ 82A8A30 +LilycoveCity_PokemonCenter_1F_EventScript_Poochyena:: @ 82A8A30 lock faceplayer waitse playmoncry VAR_0x8005, 0 - msgbox LilycoveCity_PokemonCenter_1F_Text_2A96F6, MSGBOX_DEFAULT + msgbox LilycoveCity_PokemonCenter_1F_Text_Poochyena, MSGBOX_DEFAULT waitmoncry release end -LilycoveCity_PokemonCenter_1F_EventScript_2A8A43:: @ 82A8A43 +LilycoveCity_PokemonCenter_1F_EventScript_Kecleon:: @ 82A8A43 lock faceplayer waitse playmoncry VAR_0x8005, 0 - msgbox LilycoveCity_PokemonCenter_1F_Text_2A96E6, MSGBOX_DEFAULT + msgbox LilycoveCity_PokemonCenter_1F_Text_Kecleon, MSGBOX_DEFAULT waitmoncry release end -LilycoveCity_PokemonCenter_1F_EventScript_2A8A56:: @ 82A8A56 +LilycoveCity_PokemonCenter_1F_EventScript_Pikachu:: @ 82A8A56 lock faceplayer waitse playmoncry VAR_0x8005, 0 - msgbox LilycoveCity_PokemonCenter_1F_Text_2A9703, MSGBOX_DEFAULT + msgbox LilycoveCity_PokemonCenter_1F_Text_Pikachu, MSGBOX_DEFAULT waitmoncry release end -LilycoveCity_PokemonCenter_1F_Text_2A8A69: @ 82A8A69 +LilycoveCity_PokemonCenter_1F_Text_ImTheFavorLady: @ 82A8A69 .string "I'm the FAVOR LADY…$" -LilycoveCity_PokemonCenter_1F_Text_2A8A7D: @ 82A8A7D +LilycoveCity_PokemonCenter_1F_Text_ObsessedWithThing: @ 82A8A7D .string "I've recently developed an obsession\n" .string "for {STR_VAR_1} things…$" -LilycoveCity_PokemonCenter_1F_Text_2A8AB1: @ 82A8AB1 +LilycoveCity_PokemonCenter_1F_Text_ThankYouForLastTime: @ 82A8AB1 .string "Oh…\n" .string "Thank you for last time…$" -LilycoveCity_PokemonCenter_1F_Text_2A8ACE: @ 82A8ACE +LilycoveCity_PokemonCenter_1F_Text_PlayerGaveMeBadThing: @ 82A8ACE .string "Before, I think it was {STR_VAR_3}…\p" .string "{STR_VAR_3} gave me one {STR_VAR_2},\n" .string "saying it was {STR_VAR_1}.\p" .string "But it wasn't {STR_VAR_1}.\n" .string "Not in the least bit.$" -LilycoveCity_PokemonCenter_1F_Text_2A8B36: @ 82A8B36 +LilycoveCity_PokemonCenter_1F_Text_PlayerGaveMeGreatThing: @ 82A8B36 .string "Before, {STR_VAR_3} gave me a very\n" .string "{STR_VAR_1} {STR_VAR_2}.\p" .string "I cherish it now.$" -LilycoveCity_PokemonCenter_1F_Text_2A8B69: @ 82A8B69 +LilycoveCity_PokemonCenter_1F_Text_WillYouShareThing: @ 82A8B69 .string "Listen, if you have anything that\n" .string "is {STR_VAR_1}, will you share it\l" .string "with me?$" -LilycoveCity_PokemonCenter_1F_Text_2A8BAD: @ 82A8BAD +LilycoveCity_PokemonCenter_1F_Text_WhatWillYouGiveMe: @ 82A8BAD .string "…Really?\n" .string "What will you give me?$" -LilycoveCity_PokemonCenter_1F_Text_2A8BCD: @ 82A8BCD +LilycoveCity_PokemonCenter_1F_Text_IsThatSoGoodbye: @ 82A8BCD .string "Is that so?\n" .string "Then, it's good-bye…$" -LilycoveCity_PokemonCenter_1F_Text_2A8BEE: @ 82A8BEE +LilycoveCity_PokemonCenter_1F_Text_NotWillingToShare: @ 82A8BEE .string "Oh…\n" .string "You're not willing to share?$" -LilycoveCity_PokemonCenter_1F_Text_2A8C0F: @ 82A8C0F +LilycoveCity_PokemonCenter_1F_Text_IllTryToCherishIt: @ 82A8C0F .string "Oh?\n" .string "That {STR_VAR_2} is {STR_VAR_1}?\p" .string "…Oh, is that right?\p" .string "Well, I owe you a thanks anyway.\n" .string "I'll try to cherish it…$" -LilycoveCity_PokemonCenter_1F_Text_2A8C6F: @ 82A8C6F +LilycoveCity_PokemonCenter_1F_Text_IWillCherishThis: @ 82A8C6F .string "Oh…\p" .string "That's a quite {STR_VAR_1}\n" .string "{STR_VAR_2}…\p" @@ -653,7 +651,7 @@ LilycoveCity_PokemonCenter_1F_Text_2A8C6F: @ 82A8C6F .string "Thank you…\n" .string "I will cherish this…$" -LilycoveCity_PokemonCenter_1F_Text_2A8CC8: @ 82A8CC8 +LilycoveCity_PokemonCenter_1F_Text_IWillTreasureThis: @ 82A8CC8 .string "…Oh, oh, oh…\p" .string "This is amazing!\n" .string "This really is {STR_VAR_1}!\p" @@ -663,89 +661,90 @@ LilycoveCity_PokemonCenter_1F_Text_2A8CC8: @ 82A8CC8 .string "I will treasure this for the rest\n" .string "of my life!$" -LilycoveCity_PokemonCenter_1F_Text_2A8D5D: @ 82A8D5D +LilycoveCity_PokemonCenter_1F_Text_IllGiveYouThisInReturn: @ 82A8D5D .string "I'll give you this wonderful item in\n" .string "return for your fabulous gift.\p" .string "I hope you will cherish it…$" -LilycoveCity_PokemonCenter_1F_Text_2A8DBD: @ 82A8DBD +LilycoveCity_PokemonCenter_1F_Text_YouDontHaveSpaceForIt: @ 82A8DBD .string "Oh, you can't have it if you don't have\n" .string "the space for it.\p" .string "Please come see me when you get\n" .string "your BAG organized…$" -LilycoveCity_PokemonCenter_1F_Text_2A8E2B: @ 82A8E2B +LilycoveCity_PokemonCenter_1F_Text_ImTheQuizLady: @ 82A8E2B .string "I'm the QUIZ LADY!\n" .string "I love quizzes!$" -LilycoveCity_PokemonCenter_1F_Text_2A8E4E: @ 82A8E4E +LilycoveCity_PokemonCenter_1F_Text_WaitingToTakeYourQuiz: @ 82A8E4E .string "Oh?\p" .string "I'm waiting for a challenger to answer\n" .string "the quiz you made.\p" .string "We can chat another time, okay?$" -LilycoveCity_PokemonCenter_1F_Text_2A8EAC: @ 82A8EAC +LilycoveCity_PokemonCenter_1F_Text_WaitingForChallenger: @ 82A8EAC .string "I'm waiting for someone to challenge\n" .string "a quiz this {STR_VAR_1} thought up!$" -LilycoveCity_PokemonCenter_1F_Text_2A8EEC: @ 82A8EEC +LilycoveCity_PokemonCenter_1F_Text_TakeQuizChallenge: @ 82A8EEC .string "If you answer correctly, you can win\n" .string "fabulous prizes!\p" .string "Would you like to take the quiz\n" .string "challenge?$" -LilycoveCity_PokemonCenter_1F_Text_2A8F4D: @ 82A8F4D +LilycoveCity_PokemonCenter_1F_Text_WaitForAnswer: @ 82A8F4D .string "… … … … … …\n" .string "… … … … … …$" -LilycoveCity_PokemonCenter_1F_Text_2A8F65: @ 82A8F65 +LilycoveCity_PokemonCenter_1F_Text_HowBoringBye: @ 82A8F65 .string "Oh, how boring!\n" .string "Bye-bye!$" -LilycoveCity_PokemonCenter_1F_Text_2A8F7E: @ 82A8F7E +LilycoveCity_PokemonCenter_1F_Text_YoureGoingToQuit: @ 82A8F7E .string "Awww!\n" .string "You're going to quit?$" -LilycoveCity_PokemonCenter_1F_Text_2A8F9A: @ 82A8F9A +LilycoveCity_PokemonCenter_1F_Text_TakeTheQuizAnotherTime: @ 82A8F9A .string "Please take the quiz challenge\n" .string "another time!$" -LilycoveCity_PokemonCenter_1F_Text_2A8FC7: @ 82A8FC7 +LilycoveCity_PokemonCenter_1F_Text_YouGotItRight: @ 82A8FC7 .string "You're amazing! You've got it right!\n" .string "You're one sharp customer!$" -LilycoveCity_PokemonCenter_1F_Text_2A9007: @ 82A9007 +LilycoveCity_PokemonCenter_1F_Text_YouGotItRightYouveWonPersonsPrize: @ 82A9007 .string "Congratulations!\n" .string "You've got the quiz right!\p" .string "You've won a prize provided by\n" .string "{STR_VAR_1}!$" -LilycoveCity_PokemonCenter_1F_Text_2A9056: @ 82A9056 +@ Unused +LilycoveCity_PokemonCenter_1F_Text_XReceivedOneY: @ 82A9056 .string "{STR_VAR_1} received\n" .string "one {STR_VAR_2}!$" -LilycoveCity_PokemonCenter_1F_Text_2A906A: @ 82A906A +LilycoveCity_PokemonCenter_1F_Text_YourBagIsFilledUp: @ 82A906A .string "Oh? Your BAG is filled up!\n" .string "Come see me when you have room.$" -LilycoveCity_PokemonCenter_1F_Text_2A90A5: @ 82A90A5 +LilycoveCity_PokemonCenter_1F_Text_WrongTheCorrectAnswerIs: @ 82A90A5 .string "Hmm… Wrong!\n" .string "The correct answer is “{STR_VAR_3}”!$" -LilycoveCity_PokemonCenter_1F_Text_2A90CD: @ 82A90CD +LilycoveCity_PokemonCenter_1F_Text_IGetToKeepPrize: @ 82A90CD .string "Too bad!\p" .string "I get to keep the quiz prize\n" .string "{STR_VAR_1} now!$" -LilycoveCity_PokemonCenter_1F_Text_2A90FB: @ 82A90FB +LilycoveCity_PokemonCenter_1F_Text_MakeYourOwnQuiz: @ 82A90FB .string "Listen, listen!\n" .string "Would you like to make your own quiz?$" -LilycoveCity_PokemonCenter_1F_Text_2A9131: @ 82A9131 +LilycoveCity_PokemonCenter_1F_Text_MaybeNextTime: @ 82A9131 .string "Oh, I see…\n" .string "Well, maybe next time!$" -LilycoveCity_PokemonCenter_1F_Text_2A9153: @ 82A9153 +LilycoveCity_PokemonCenter_1F_Text_PickYourPrize: @ 82A9153 .string "Okay, the first thing you have to do\n" .string "is pick the prize for the person that\l" .string "answers your quiz correctly.\p" @@ -753,46 +752,47 @@ LilycoveCity_PokemonCenter_1F_Text_2A9153: @ 82A9153 .string "the quiz can't get it right, I get to\l" .string "keep the prize!$" -LilycoveCity_PokemonCenter_1F_Text_2A9212: @ 82A9212 +LilycoveCity_PokemonCenter_1F_Text_QuitChoosingPrize: @ 82A9212 .string "If you don't choose a prize,\n" .string "your quiz can't be made.\p" .string "Are you going to quit making\n" .string "your quiz?$" -LilycoveCity_PokemonCenter_1F_Text_2A9270: @ 82A9270 +LilycoveCity_PokemonCenter_1F_Text_WriteYourQuiz: @ 82A9270 .string "Oh, how nice!\n" .string "That's a wonderful prize!\p" .string "Next, you need to write your quiz\n" .string "question and its answer.$" -LilycoveCity_PokemonCenter_1F_Text_2A92D3: @ 82A92D3 +LilycoveCity_PokemonCenter_1F_Text_QuitWritingQuizQuestion: @ 82A92D3 .string "Are you going to quit writing\n" .string "your quiz question?$" -LilycoveCity_PokemonCenter_1F_Text_2A9305: @ 82A9305 +@ Unused +LilycoveCity_PokemonCenter_1F_Text_QuitWritingQuizAnswer: @ 82A9305 .string "Are you going to quit choosing\n" .string "your quiz answer?$" -LilycoveCity_PokemonCenter_1F_Text_2A9336: @ 82A9336 +LilycoveCity_PokemonCenter_1F_Text_IllLookForAChallenger: @ 82A9336 .string "Thank you!\n" .string "You've put together a nice quiz.\p" .string "I'll go look for someone who'll take\n" .string "your quiz challenge right away.$" -LilycoveCity_PokemonCenter_1F_Text_2A93A7: @ 82A93A7 +LilycoveCity_PokemonCenter_1F_Text_ImTheContestLady: @ 82A93A7 .string "I'm the CONTEST LADY!\n" .string "I sure do love CONTESTS!$" -LilycoveCity_PokemonCenter_1F_Text_2A93D6: @ 82A93D6 +LilycoveCity_PokemonCenter_1F_Text_ThankForPokeblock: @ 82A93D6 .string "Thanks for your {POKEBLOCK} before!$" -LilycoveCity_PokemonCenter_1F_Text_2A93F4: @ 82A93F4 +LilycoveCity_PokemonCenter_1F_Text_MyFriendDisplaysQuality: @ 82A93F4 .string "This is my friend {STR_VAR_1}!\n" .string "It's the epitome of {STR_VAR_2}!\p" .string "But I think that it will display\n" .string "even more {STR_VAR_2}!$" -LilycoveCity_PokemonCenter_1F_Text_2A9451: @ 82A9451 +LilycoveCity_PokemonCenter_1F_Text_DontHaveAPokeblockCase: @ 82A9451 .string "So, I need your help!\p" .string "Please, may I have one {POKEBLOCK}?\n" .string "All I'm asking for is one!\p" @@ -800,57 +800,57 @@ LilycoveCity_PokemonCenter_1F_Text_2A9451: @ 82A9451 .string "Don't you have a {POKEBLOCK} CASE?\l" .string "That's no good. Next time, then!$" -LilycoveCity_PokemonCenter_1F_Text_2A94E8: @ 82A94E8 +LilycoveCity_PokemonCenter_1F_Text_AskingForOnePokeblock: @ 82A94E8 .string "So, I need your help!\p" .string "Please, may I have one {POKEBLOCK}?\n" .string "All I'm asking for is one!$" -LilycoveCity_PokemonCenter_1F_Text_2A9537: @ 82A9537 +LilycoveCity_PokemonCenter_1F_Text_ICantHaveOnePokeblock: @ 82A9537 .string "Awww!\n" .string "I can't have one {POKEBLOCK}?!$" -LilycoveCity_PokemonCenter_1F_Text_2A9556: @ 82A9556 +LilycoveCity_PokemonCenter_1F_Text_WhatACheapskate: @ 82A9556 .string "Sheesh!\n" .string "What a cheapskate!$" -LilycoveCity_PokemonCenter_1F_Text_2A9571: @ 82A9571 +LilycoveCity_PokemonCenter_1F_Text_IllUseYourPokeblock: @ 82A9571 .string "Yay!\n" .string "Thank you!\p" .string "I'll feed my POKéMON your {POKEBLOCK}\n" .string "right away.$" -LilycoveCity_PokemonCenter_1F_Text_2A95AD: @ 82A95AD +LilycoveCity_PokemonCenter_1F_Text_NoChangeThanks: @ 82A95AD .string "…It doesn't seem to have changed\n" .string "in any way at all…\p" .string "Hmm…\p" .string "Oh, well!\n" .string "Thank you very much!$" -LilycoveCity_PokemonCenter_1F_Text_2A9605: @ 82A9605 +LilycoveCity_PokemonCenter_1F_Text_ReallyImprovedThanks: @ 82A9605 .string "Oh, yay!\n" .string "It's really delighted!\p" .string "I think it really improved {STR_VAR_1}'s\n" .string "{STR_VAR_2} quality, too.\p" .string "Thank you so much!$" -LilycoveCity_PokemonCenter_1F_Text_2A9669: @ 82A9669 +LilycoveCity_PokemonCenter_1F_Text_ReadyToEnterContests: @ 82A9669 .string "Hmm…\p" .string "I think we may be ready to enter\n" .string "some CONTESTS.\p" .string "If you see us in one somewhere,\n" .string "I hope you'll cheer for us.$" -LilycoveCity_PokemonCenter_1F_Text_2A96DA: @ 82A96DA +LilycoveCity_PokemonCenter_1F_Text_Zigzagoon: @ 82A96DA .string "{STR_VAR_1}: Guguuh!$" -LilycoveCity_PokemonCenter_1F_Text_2A96E6: @ 82A96E6 +LilycoveCity_PokemonCenter_1F_Text_Kecleon: @ 82A96E6 .string "{STR_VAR_1}: Igigigiiih!$" -LilycoveCity_PokemonCenter_1F_Text_2A96F6: @ 82A96F6 +LilycoveCity_PokemonCenter_1F_Text_Poochyena: @ 82A96F6 .string "{STR_VAR_1}: Baaarun…$" -LilycoveCity_PokemonCenter_1F_Text_2A9703: @ 82A9703 +LilycoveCity_PokemonCenter_1F_Text_Pikachu: @ 82A9703 .string "{STR_VAR_1}: Pikka!$" -LilycoveCity_PokemonCenter_1F_Text_2A970E: @ 82A970E +LilycoveCity_PokemonCenter_1F_Text_Skitty: @ 82A970E .string "{STR_VAR_1}: Umyaaaan!$" From fa4940ee44b08b22486e6278dede88f079861ddd Mon Sep 17 00:00:00 2001 From: GriffinR Date: Mon, 21 Oct 2019 18:06:42 -0400 Subject: [PATCH 18/46] Clean up lilycove_lady.inc doc --- data/scripts/lilycove_lady.inc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/data/scripts/lilycove_lady.inc b/data/scripts/lilycove_lady.inc index ad63aeba8c..5f6621fa3c 100644 --- a/data/scripts/lilycove_lady.inc +++ b/data/scripts/lilycove_lady.inc @@ -78,12 +78,12 @@ LilycoveCity_PokemonCenter_1F_EventScript_ChooseFavorItem:: @ 82A846C special Script_FavorLadyOpenBagMenu waitstate compare VAR_RESULT, 0 - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_CancelChooseFavorItem + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_AskQuitChooseFavorItem compare VAR_RESULT, 1 goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_GiveFavorItem end -LilycoveCity_PokemonCenter_1F_EventScript_CancelChooseFavorItem:: @ 82A848E +LilycoveCity_PokemonCenter_1F_EventScript_AskQuitChooseFavorItem:: @ 82A848E msgbox LilycoveCity_PokemonCenter_1F_Text_NotWillingToShare, MSGBOX_YESNO compare VAR_RESULT, 1 goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_DeclineFavor @@ -209,9 +209,9 @@ LilycoveCity_PokemonCenter_1F_EventScript_DeclineQuiz:: @ 82A8612 LilycoveCity_PokemonCenter_1F_EventScript_TakeQuiz:: @ 82A861C special ClearQuizLadyPlayerAnswer compare VAR_0x8004, 0 - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_2A864C + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_ShowQuestion compare VAR_0x8004, EASY_CHAT_TYPE_QUIZ_ANSWER - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_2A8656 + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_GetAnswer LilycoveCity_PokemonCenter_1F_EventScript_CheckQuizTakingState:: @ 82A8635 compare VAR_RESULT, 0 @@ -220,13 +220,13 @@ LilycoveCity_PokemonCenter_1F_EventScript_CheckQuizTakingState:: @ 82A8635 goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_SubmitQuizResponse end -LilycoveCity_PokemonCenter_1F_EventScript_2A864C:: @ 82A864C +LilycoveCity_PokemonCenter_1F_EventScript_ShowQuestion:: @ 82A864C special QuizLadyShowQuizQuestion waitstate goto LilycoveCity_PokemonCenter_1F_EventScript_CheckQuizTakingState end -LilycoveCity_PokemonCenter_1F_EventScript_2A8656:: @ 82A8656 +LilycoveCity_PokemonCenter_1F_EventScript_GetAnswer:: @ 82A8656 special QuizLadyGetPlayerAnswer waitstate goto LilycoveCity_PokemonCenter_1F_EventScript_CheckQuizTakingState From a4d6ce417d11f7601c037f246cbcdc2f680d87ee Mon Sep 17 00:00:00 2001 From: GriffinR Date: Tue, 22 Oct 2019 16:02:01 -0400 Subject: [PATCH 19/46] Fix resetintimidatetracebits typo --- asm/macros/battle_script.inc | 2 +- data/battle_scripts_1.s | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/asm/macros/battle_script.inc b/asm/macros/battle_script.inc index 997af51cce..c605099e12 100644 --- a/asm/macros/battle_script.inc +++ b/asm/macros/battle_script.inc @@ -1267,7 +1267,7 @@ various \battler, 4 .endm - .macro resetintrimidatetracebits battler:req + .macro resetintimidatetracebits battler:req various \battler, VARIOUS_RESET_INTIMIDATE_TRACE_BITS .endm diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index 244a3ac05c..027db364cd 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -2875,7 +2875,7 @@ BattleScript_FaintedMonTryChooseAnother:: switchhandleorder BS_ATTACKER, 0x2 jumpifbyte CMP_EQUAL, gBattleCommunication, 0x6, BattleScript_FaintedMonChooseAnother atknameinbuff1 - resetintrimidatetracebits BS_ATTACKER + resetintimidatetracebits BS_ATTACKER hpthresholds2 BS_ATTACKER printstring STRINGID_RETURNMON switchoutabilities BS_ATTACKER From 4fd848e6898f342ad7be274d3bf2f5604a59dfee Mon Sep 17 00:00:00 2001 From: Marcus Huderle Date: Tue, 22 Oct 2019 15:53:49 -0500 Subject: [PATCH 20/46] Document early route scripts --- data/maps/OldaleTown/map.json | 2 +- data/maps/OldaleTown/scripts.inc | 2 +- data/maps/Route101/map.json | 26 +-- data/maps/Route101/scripts.inc | 112 ++++++------- data/maps/Route102/map.json | 16 +- data/maps/Route102/scripts.inc | 80 ++++----- data/maps/Route103/map.json | 26 +-- data/maps/Route103/scripts.inc | 268 +++++++++++++++---------------- data/maps/Route104/scripts.inc | 20 +-- data/text/trainers.inc | 118 +++++++------- 10 files changed, 335 insertions(+), 335 deletions(-) diff --git a/data/maps/OldaleTown/map.json b/data/maps/OldaleTown/map.json index 3e3fb93d35..1644c76d6f 100644 --- a/data/maps/OldaleTown/map.json +++ b/data/maps/OldaleTown/map.json @@ -66,7 +66,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "OldaleTown_EventScript_1E901F", + "script": "OldaleTown_EventScript_FootprintsMan", "flag": "0" }, { diff --git a/data/maps/OldaleTown/scripts.inc b/data/maps/OldaleTown/scripts.inc index 5f9c9d6d5b..88f73d39bd 100644 --- a/data/maps/OldaleTown/scripts.inc +++ b/data/maps/OldaleTown/scripts.inc @@ -188,7 +188,7 @@ OldaleTown_Movement_Unknown2: @ 81E9013 walk_up step_end -OldaleTown_EventScript_1E901F:: @ 81E901F +OldaleTown_EventScript_FootprintsMan:: @ 81E901F lock faceplayer goto_if_set FLAG_ADVENTURE_STARTED, OldaleTown_EventScript_NotBlockingPath diff --git a/data/maps/Route101/map.json b/data/maps/Route101/map.json index 7e8cfb9590..71dbf96cc6 100644 --- a/data/maps/Route101/map.json +++ b/data/maps/Route101/map.json @@ -35,7 +35,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "Route101_EventScript_1EBDFB", + "script": "Route101_EventScript_Youngster", "flag": "0" }, { @@ -61,7 +61,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "Route101_EventScript_1EBE16", + "script": "Route101_EventScript_BirchsBag", "flag": "FLAG_HIDE_ROUTE_101_BIRCH_STARTERS_BAG" }, { @@ -100,7 +100,7 @@ "movement_range_y": 1, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "Route101_EventScript_1EBE04", + "script": "Route101_EventScript_Boy", "flag": "FLAG_HIDE_ROUTE_101_BOY" } ], @@ -113,7 +113,7 @@ "elevation": 3, "var": "VAR_ROUTE101_STATE", "var_value": "1", - "script": "Route101_EventScript_1EBCDE" + "script": "Route101_EventScript_StartBirchRescue" }, { "type": "trigger", @@ -122,7 +122,7 @@ "elevation": 3, "var": "VAR_ROUTE101_STATE", "var_value": "1", - "script": "Route101_EventScript_1EBCDE" + "script": "Route101_EventScript_StartBirchRescue" }, { "type": "trigger", @@ -131,7 +131,7 @@ "elevation": 3, "var": "VAR_ROUTE101_STATE", "var_value": "2", - "script": "Route101_EventScript_1EBD4E" + "script": "Route101_EventScript_PreventExitSouth" }, { "type": "trigger", @@ -140,7 +140,7 @@ "elevation": 3, "var": "VAR_ROUTE101_STATE", "var_value": "2", - "script": "Route101_EventScript_1EBD4E" + "script": "Route101_EventScript_PreventExitSouth" }, { "type": "trigger", @@ -149,7 +149,7 @@ "elevation": 3, "var": "VAR_ROUTE101_STATE", "var_value": "2", - "script": "Route101_EventScript_1EBD64" + "script": "Route101_EventScript_PreventExitWest" }, { "type": "trigger", @@ -158,7 +158,7 @@ "elevation": 3, "var": "VAR_ROUTE101_STATE", "var_value": "2", - "script": "Route101_EventScript_1EBD64" + "script": "Route101_EventScript_PreventExitWest" }, { "type": "trigger", @@ -167,7 +167,7 @@ "elevation": 3, "var": "VAR_ROUTE101_STATE", "var_value": "2", - "script": "Route101_EventScript_1EBD64" + "script": "Route101_EventScript_PreventExitWest" }, { "type": "trigger", @@ -176,7 +176,7 @@ "elevation": 3, "var": "VAR_ROUTE101_STATE", "var_value": "2", - "script": "Route101_EventScript_1EBD64" + "script": "Route101_EventScript_PreventExitWest" }, { "type": "trigger", @@ -185,7 +185,7 @@ "elevation": 3, "var": "VAR_ROUTE101_STATE", "var_value": "2", - "script": "Route101_EventScript_1EBD7A" + "script": "Route101_EventScript_PreventExitNorth" } ], "bg_events": [ @@ -195,7 +195,7 @@ "y": 9, "elevation": 0, "player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY", - "script": "Route101_EventScript_1EBE0D" + "script": "Route101_EventScript_RouteSign" } ] } \ No newline at end of file diff --git a/data/maps/Route101/scripts.inc b/data/maps/Route101/scripts.inc index 3b5b22b37d..de28aa251b 100644 --- a/data/maps/Route101/scripts.inc +++ b/data/maps/Route101/scripts.inc @@ -8,79 +8,79 @@ Route101_OnTransition: @ 81EBCC5 end Route101_MapScript2_1EBCCB: @ 81EBCCB - map_script_2 VAR_ROUTE101_STATE, 0, Route101_EventScript_1EBCD5 + map_script_2 VAR_ROUTE101_STATE, 0, Route101_EventScript_HideMapNamePopup .2byte 0 -Route101_EventScript_1EBCD5:: @ 81EBCD5 +Route101_EventScript_HideMapNamePopup:: @ 81EBCD5 setflag FLAG_HIDE_MAP_NAME_POPUP setvar VAR_ROUTE101_STATE, 1 end -Route101_EventScript_1EBCDE:: @ 81EBCDE +Route101_EventScript_StartBirchRescue:: @ 81EBCDE lockall playbgm MUS_EVENT0, 1 - msgbox Route101_Text_1EBE8F, MSGBOX_DEFAULT + msgbox Route101_Text_HelpMe, MSGBOX_DEFAULT closemessage setobjectxy 2, 0, 15 setobjectxy 4, 0, 16 - applymovement EVENT_OBJ_ID_PLAYER, Route101_Movement_1EBDC2 - applymovement 2, Route101_Movement_1EBDE7 - applymovement 4, Route101_Movement_1EBDB5 + applymovement EVENT_OBJ_ID_PLAYER, Route101_Movement_EnterScene + applymovement 2, Route101_Movement_BirchRunAway1 + applymovement 4, Route101_Movement_PoochyenaChase1 waitmovement 0 - applymovement 4, Route101_Movement_1EBD96 - applymovement 2, Route101_Movement_1EBDC8 + applymovement 4, Route101_Movement_PoochyenaChaseInCircles + applymovement 2, Route101_Movement_BirchRunInCircles waitmovement 0 applymovement 2, Common_Movement_WalkInPlaceFastestRight waitmovement 0 - applymovement 4, Route101_Movement_1EBDBD - applymovement 2, Route101_Movement_1EBDEF + applymovement 4, Route101_Movement_PoochyenaFaceBirch + applymovement 2, Route101_Movement_BirchFacePoochyena waitmovement 0 - msgbox Route101_Text_1EBE9A, MSGBOX_DEFAULT + msgbox Route101_Text_PleaseHelp, MSGBOX_DEFAULT closemessage setvar VAR_ROUTE101_STATE, 2 releaseall end -Route101_EventScript_1EBD4E:: @ 81EBD4E +Route101_EventScript_PreventExitSouth:: @ 81EBD4E lockall - msgbox Route101_Text_1EBEDF, MSGBOX_DEFAULT + msgbox Route101_Text_DontLeaveMe, MSGBOX_DEFAULT closemessage - applymovement EVENT_OBJ_ID_PLAYER, Route101_Movement_1EBD90 + applymovement EVENT_OBJ_ID_PLAYER, Route101_Movement_PreventExitSouth waitmovement 0 releaseall end -Route101_EventScript_1EBD64:: @ 81EBD64 +Route101_EventScript_PreventExitWest:: @ 81EBD64 lockall - msgbox Route101_Text_1EBEDF, MSGBOX_DEFAULT + msgbox Route101_Text_DontLeaveMe, MSGBOX_DEFAULT closemessage - applymovement EVENT_OBJ_ID_PLAYER, Route101_Movement_1EBD92 + applymovement EVENT_OBJ_ID_PLAYER, Route101_Movement_PreventExitWest waitmovement 0 releaseall end -Route101_EventScript_1EBD7A:: @ 81EBD7A +Route101_EventScript_PreventExitNorth:: @ 81EBD7A lockall - msgbox Route101_Text_1EBEDF, MSGBOX_DEFAULT + msgbox Route101_Text_DontLeaveMe, MSGBOX_DEFAULT closemessage - applymovement EVENT_OBJ_ID_PLAYER, Route101_Movement_1EBD94 + applymovement EVENT_OBJ_ID_PLAYER, Route101_Movement_PreventExitNorth waitmovement 0 releaseall end -Route101_Movement_1EBD90: @ 81EBD90 +Route101_Movement_PreventExitSouth: @ 81EBD90 walk_up step_end -Route101_Movement_1EBD92: @ 81EBD92 +Route101_Movement_PreventExitWest: @ 81EBD92 walk_right step_end -Route101_Movement_1EBD94: @ 81EBD94 +Route101_Movement_PreventExitNorth: @ 81EBD94 walk_down step_end -Route101_Movement_1EBD96: @ 81EBD96 +Route101_Movement_PoochyenaChaseInCircles: @ 81EBD96 walk_fast_up walk_fast_up walk_fast_up @@ -113,7 +113,7 @@ Route101_Movement_1EBD96: @ 81EBD96 walk_fast_left step_end -Route101_Movement_1EBDB5: @ 81EBDB5 +Route101_Movement_PoochyenaChase1: @ 81EBDB5 walk_fast_up walk_fast_right walk_fast_right @@ -122,17 +122,17 @@ Route101_Movement_1EBDB5: @ 81EBDB5 walk_fast_up step_end -Route101_Movement_1EBDBC: @ 81EBDBC +@ Leftover data? This command is unused. step_end -Route101_Movement_1EBDBD: @ 81EBDBD +Route101_Movement_PoochyenaFaceBirch: @ 81EBDBD walk_in_place_fast_left walk_in_place_fast_left walk_in_place_fast_left walk_in_place_fast_left step_end -Route101_Movement_1EBDC2: @ 81EBDC2 +Route101_Movement_EnterScene: @ 81EBDC2 walk_fast_up walk_fast_up walk_fast_up @@ -140,7 +140,7 @@ Route101_Movement_1EBDC2: @ 81EBDC2 walk_in_place_fastest_left step_end -Route101_Movement_1EBDC8: @ 81EBDC8 +Route101_Movement_BirchRunInCircles: @ 81EBDC8 walk_fast_up walk_fast_up walk_fast_right @@ -173,7 +173,7 @@ Route101_Movement_1EBDC8: @ 81EBDC8 walk_fast_left step_end -Route101_Movement_1EBDE7: @ 81EBDE7 +Route101_Movement_BirchRunAway1: @ 81EBDE7 walk_fast_right walk_fast_right walk_fast_right @@ -182,40 +182,40 @@ Route101_Movement_1EBDE7: @ 81EBDE7 walk_fast_up step_end -Route101_Movement_1EBDEE: @ 81EBDEE +@ Leftover data? This command is unused. step_end -Route101_Movement_1EBDEF: @ 81EBDEF +Route101_Movement_BirchFacePoochyena: @ 81EBDEF walk_in_place_fast_right walk_in_place_fast_right walk_in_place_fast_right walk_in_place_fast_right step_end -Route101_Movement_1EBDF4: @ 81EBDF4 +Route101_Movement_Unused1: @ 81EBDF4 walk_up walk_up step_end -Route101_Movement_1EBDF7: @ 81EBDF7 +Route101_Movement_Unused2: @ 81EBDF7 walk_up walk_left walk_up step_end -Route101_EventScript_1EBDFB:: @ 81EBDFB - msgbox Route101_Text_1EBFDD, MSGBOX_NPC +Route101_EventScript_Youngster:: @ 81EBDFB + msgbox Route101_Text_TakeTiredPokemonToPokeCenter, MSGBOX_NPC end -Route101_EventScript_1EBE04:: @ 81EBE04 - msgbox Route101_Text_1EC04A, MSGBOX_NPC +Route101_EventScript_Boy:: @ 81EBE04 + msgbox Route101_Text_WildPokemonInTallGrass, MSGBOX_NPC end -Route101_EventScript_1EBE0D:: @ 81EBE0D - msgbox Route101_Text_1EC0C8, MSGBOX_SIGN +Route101_EventScript_RouteSign:: @ 81EBE0D + msgbox Route101_Text_RouteSign, MSGBOX_SIGN end -Route101_EventScript_1EBE16:: @ 81EBE16 +Route101_EventScript_BirchsBag:: @ 81EBE16 lock faceplayer setflag FLAG_SYS_POKEMON_GET @@ -227,9 +227,9 @@ Route101_EventScript_1EBE16:: @ 81EBE16 waitmovement 0 special ChooseStarter waitstate - applymovement 2, Route101_Movement_1EBE8D + applymovement 2, Route101_Movement_BirchApproachPlayer waitmovement 0 - msgbox Route101_Text_1EBF12, MSGBOX_DEFAULT + msgbox Route101_Text_YouSavedMe, MSGBOX_DEFAULT special HealPlayerParty setflag FLAG_HIDE_ROUTE_101_BIRCH_ZIGZAGOON_BATTLE clearflag FLAG_HIDE_LITTLEROOT_TOWN_BIRCHS_LAB_BIRCH @@ -239,40 +239,40 @@ Route101_EventScript_1EBE16:: @ 81EBE16 clearflag FLAG_HIDE_MAP_NAME_POPUP checkplayergender compare VAR_RESULT, MALE - call_if_eq Route101_EventScript_1EBE85 + call_if_eq Route101_EventScript_HideMayInBedroom compare VAR_RESULT, FEMALE - call_if_eq Route101_EventScript_1EBE89 + call_if_eq Route101_EventScript_HideBrendanInBedroom warp MAP_LITTLEROOT_TOWN_PROFESSOR_BIRCHS_LAB, 255, 6, 5 waitstate release end -Route101_EventScript_1EBE85:: @ 81EBE85 +Route101_EventScript_HideMayInBedroom:: @ 81EBE85 setflag FLAG_HIDE_LITTLEROOT_TOWN_MAYS_HOUSE_RIVAL_BEDROOM return -Route101_EventScript_1EBE89:: @ 81EBE89 +Route101_EventScript_HideBrendanInBedroom:: @ 81EBE89 setflag FLAG_HIDE_LITTLEROOT_TOWN_BRENDANS_HOUSE_RIVAL_BEDROOM return -Route101_Movement_1EBE8D: @ 81EBE8D +Route101_Movement_BirchApproachPlayer: @ 81EBE8D walk_right step_end -Route101_Text_1EBE8F: @ 81EBE8F +Route101_Text_HelpMe: @ 81EBE8F .string "H-help me!$" -Route101_Text_1EBE9A: @ 81EBE9A +Route101_Text_PleaseHelp: @ 81EBE9A .string "Hello! You over there!\n" .string "Please! Help!\p" .string "In my BAG!\n" .string "There's a POKé BALL!$" -Route101_Text_1EBEDF: @ 81EBEDF +Route101_Text_DontLeaveMe: @ 81EBEDF .string "Wh-Where are you going?!\n" .string "Don't leave me like this!$" -Route101_Text_1EBF12: @ 81EBF12 +Route101_Text_YouSavedMe: @ 81EBF12 .string "PROF. BIRCH: Whew…\p" .string "I was in the tall grass studying wild\n" .string "POKéMON when I was jumped.\p" @@ -283,19 +283,19 @@ Route101_Text_1EBF12: @ 81EBF12 .string "This is not the place to chat, so come\n" .string "by my POKéMON LAB later, okay?$" -Route101_Text_1EBFDD: @ 81EBFDD +Route101_Text_TakeTiredPokemonToPokeCenter: @ 81EBFDD .string "If POKéMON get tired, take them to\n" .string "a POKéMON CENTER.\p" .string "There's a POKéMON CENTER in OLDALE\n" .string "TOWN right close by.$" -Route101_Text_1EC04A: @ 81EC04A +Route101_Text_WildPokemonInTallGrass: @ 81EC04A .string "Wild POKéMON will jump out at you in\n" .string "tall grass.\p" .string "If you want to catch POKéMON, you have\n" .string "to go into the tall grass and search.$" -Route101_Text_1EC0C8: @ 81EC0C8 +Route101_Text_RouteSign: @ 81EC0C8 .string "ROUTE 101\n" .string "{UP_ARROW} OLDALE TOWN$" diff --git a/data/maps/Route102/map.json b/data/maps/Route102/map.json index 323c4142b2..f8930a21df 100644 --- a/data/maps/Route102/map.json +++ b/data/maps/Route102/map.json @@ -35,7 +35,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "Route102_EventScript_1EC0E1", + "script": "Route102_EventScript_LittleBoy", "flag": "0" }, { @@ -48,7 +48,7 @@ "movement_range_y": 0, "trainer_type": "1", "trainer_sight_or_berry_tree_id": "3", - "script": "Route102_EventScript_1EC105", + "script": "Route102_EventScript_Calvin", "flag": "0" }, { @@ -61,7 +61,7 @@ "movement_range_y": 0, "trainer_type": "1", "trainer_sight_or_berry_tree_id": "2", - "script": "Route102_EventScript_1EC1B3", + "script": "Route102_EventScript_Rick", "flag": "0" }, { @@ -74,7 +74,7 @@ "movement_range_y": 0, "trainer_type": "1", "trainer_sight_or_berry_tree_id": "3", - "script": "Route102_EventScript_1EC1CA", + "script": "Route102_EventScript_Tiana", "flag": "0" }, { @@ -87,7 +87,7 @@ "movement_range_y": 1, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "Route102_EventScript_1EC0FC", + "script": "Route102_EventScript_Boy", "flag": "0" }, { @@ -139,7 +139,7 @@ "movement_range_y": 1, "trainer_type": "1", "trainer_sight_or_berry_tree_id": "3", - "script": "Route102_EventScript_1EC1E1", + "script": "Route102_EventScript_Allen", "flag": "0" } ], @@ -152,7 +152,7 @@ "y": 2, "elevation": 0, "player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY", - "script": "Route102_EventScript_1EC0F3" + "script": "Route102_EventScript_RouteSignPetalburg" }, { "type": "sign", @@ -160,7 +160,7 @@ "y": 9, "elevation": 0, "player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY", - "script": "Route102_EventScript_1EC0EA" + "script": "Route102_EventScript_RouteSignOldale" } ] } \ No newline at end of file diff --git a/data/maps/Route102/scripts.inc b/data/maps/Route102/scripts.inc index 5e7f48c934..3c79e8c61c 100644 --- a/data/maps/Route102/scripts.inc +++ b/data/maps/Route102/scripts.inc @@ -1,78 +1,78 @@ Route102_MapScripts:: @ 81EC0E0 .byte 0 -Route102_EventScript_1EC0E1:: @ 81EC0E1 - msgbox Route102_Text_1EC2C0, MSGBOX_NPC +Route102_EventScript_LittleBoy:: @ 81EC0E1 + msgbox Route102_Text_ImNotVeryTall, MSGBOX_NPC end -Route102_EventScript_1EC0EA:: @ 81EC0EA - msgbox Route102_Text_1EC35B, MSGBOX_SIGN +Route102_EventScript_RouteSignOldale:: @ 81EC0EA + msgbox Route102_Text_RouteSignOldale, MSGBOX_SIGN end -Route102_EventScript_1EC0F3:: @ 81EC0F3 - msgbox Route102_Text_1EC373, MSGBOX_SIGN +Route102_EventScript_RouteSignPetalburg:: @ 81EC0F3 + msgbox Route102_Text_RouteSignPetalburg, MSGBOX_SIGN end -Route102_EventScript_1EC0FC:: @ 81EC0FC - msgbox Route102_Text_1EC32E, MSGBOX_NPC +Route102_EventScript_Boy:: @ 81EC0FC + msgbox Route102_Text_CatchWholeBunchOfPokemon, MSGBOX_NPC end -Route102_EventScript_1EC105:: @ 81EC105 - trainerbattle_single TRAINER_CALVIN_1, Route102_Text_294513, Route102_Text_29457C, Route102_EventScript_1EC146 +Route102_EventScript_Calvin:: @ 81EC105 + trainerbattle_single TRAINER_CALVIN_1, Route102_Text_CalvinIntro, Route102_Text_CalvinDefeated, Route102_EventScript_CalvinRegisterMatchCallAfterBattle specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, 1 - goto_if_eq Route102_EventScript_1EC19C + compare VAR_RESULT, TRUE + goto_if_eq Route102_EventScript_CalvinRematch setvar VAR_0x8004, TRAINER_CALVIN_1 specialvar VAR_RESULT, IsTrainerRegistered - compare VAR_RESULT, 0 - goto_if_eq Route102_EventScript_1EC170 - msgbox Route102_Text_2945AC, MSGBOX_DEFAULT + compare VAR_RESULT, FALSE + goto_if_eq Route102_EventScript_CalvinTryRegister + msgbox Route102_Text_CalvinPostBattle, MSGBOX_DEFAULT release end -Route102_EventScript_1EC146:: @ 81EC146 +Route102_EventScript_CalvinRegisterMatchCallAfterBattle:: @ 81EC146 special sub_80B4808 waitmovement 0 - goto_if_set FLAG_HAS_MATCH_CALL, Route102_EventScript_1EC157 + goto_if_set FLAG_HAS_MATCH_CALL, Route102_EventScript_CalvinRegisterMatchCall release end -Route102_EventScript_1EC157:: @ 81EC157 - msgbox Route102_Text_294668, MSGBOX_DEFAULT +Route102_EventScript_CalvinRegisterMatchCall:: @ 81EC157 + msgbox Route102_Text_CalvinRegisterShort, MSGBOX_DEFAULT register_matchcall TRAINER_CALVIN_1 release end -Route102_EventScript_1EC170:: @ 81EC170 - goto_if_set FLAG_HAS_MATCH_CALL, Route102_EventScript_1EC183 - msgbox Route102_Text_2945AC, MSGBOX_DEFAULT +Route102_EventScript_CalvinTryRegister:: @ 81EC170 + goto_if_set FLAG_HAS_MATCH_CALL, Route102_EventScript_CalvinRegister + msgbox Route102_Text_CalvinPostBattle, MSGBOX_DEFAULT release end -Route102_EventScript_1EC183:: @ 81EC183 - msgbox Route102_Text_2945EB, MSGBOX_DEFAULT +Route102_EventScript_CalvinRegister:: @ 81EC183 + msgbox Route102_Text_CalvinRegister, MSGBOX_DEFAULT register_matchcall TRAINER_CALVIN_1 release end -Route102_EventScript_1EC19C:: @ 81EC19C - trainerbattle_rematch TRAINER_CALVIN_1, Route102_Text_2946AE, Route102_Text_29470C - msgbox Route102_Text_29473C, MSGBOX_AUTOCLOSE +Route102_EventScript_CalvinRematch:: @ 81EC19C + trainerbattle_rematch TRAINER_CALVIN_1, Route102_Text_CalvinRematchIntro, Route102_Text_CalvinRematchDefeated + msgbox Route102_Text_CalvinRematchPostBattle, MSGBOX_AUTOCLOSE end -Route102_EventScript_1EC1B3:: @ 81EC1B3 - trainerbattle_single TRAINER_RICK, Route102_Text_29480C, Route102_Text_294847 - msgbox Route102_Text_294859, MSGBOX_AUTOCLOSE +Route102_EventScript_Rick:: @ 81EC1B3 + trainerbattle_single TRAINER_RICK, Route102_Text_RickIntro, Route102_Text_RickDefeated + msgbox Route102_Text_RickPostBattle, MSGBOX_AUTOCLOSE end -Route102_EventScript_1EC1CA:: @ 81EC1CA - trainerbattle_single TRAINER_TIANA, Route102_Text_29489E, Route102_Text_2948F3 - msgbox Route102_Text_294916, MSGBOX_AUTOCLOSE +Route102_EventScript_Tiana:: @ 81EC1CA + trainerbattle_single TRAINER_TIANA, Route102_Text_TianaIntro, Route102_Text_TianaDefeated + msgbox Route102_Text_TianaPostBattle, MSGBOX_AUTOCLOSE end -Route102_EventScript_1EC1E1:: @ 81EC1E1 - trainerbattle_single TRAINER_ALLEN, Route102_Text_294775, Route102_Text_2947AA - msgbox Route102_Text_2947DB, MSGBOX_AUTOCLOSE +Route102_EventScript_Allen:: @ 81EC1E1 + trainerbattle_single TRAINER_ALLEN, Route102_Text_AllenIntro, Route102_Text_AllenDefeated + msgbox Route102_Text_AllenPostBattle, MSGBOX_AUTOCLOSE end Route102_Text_WatchMeCatchPokemon: @ 81EC1F8 @@ -91,21 +91,21 @@ Route102_Text_LetsGoBack: @ 81EC297 .string "{PLAYER}, thank you!\n" .string "Let's go back to the GYM!$" -Route102_Text_1EC2C0: @ 81EC2C0 +Route102_Text_ImNotVeryTall: @ 81EC2C0 .string "I'm…not very tall, so I sink right\n" .string "into tall grass.\p" .string "The grass goes up my nose and…\n" .string "Fwafwafwafwafwa…\p" .string "Fwatchoo!$" -Route102_Text_1EC32E: @ 81EC32E +Route102_Text_CatchWholeBunchOfPokemon: @ 81EC32E .string "I'm going to catch a whole bunch of\n" .string "POKéMON!$" -Route102_Text_1EC35B: @ 81EC35B +Route102_Text_RouteSignOldale: @ 81EC35B .string "ROUTE 102\n" .string "{RIGHT_ARROW} OLDALE TOWN$" -Route102_Text_1EC373: @ 81EC373 +Route102_Text_RouteSignPetalburg: @ 81EC373 .string "ROUTE 102\n" .string "{LEFT_ARROW} PETALBURG CITY$" diff --git a/data/maps/Route103/map.json b/data/maps/Route103/map.json index 8f5b9f2b34..0a870a06e4 100644 --- a/data/maps/Route103/map.json +++ b/data/maps/Route103/map.json @@ -35,7 +35,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "Route103_EventScript_1EC5E2", + "script": "Route103_EventScript_Man", "flag": "0" }, { @@ -48,7 +48,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "Route103_EventScript_1EC3C1", + "script": "Route103_EventScript_Rival", "flag": "FLAG_HIDE_ROUTE_103_RIVAL" }, { @@ -61,7 +61,7 @@ "movement_range_y": 0, "trainer_type": "1", "trainer_sight_or_berry_tree_id": "3", - "script": "Route103_EventScript_1EC5F4", + "script": "Route103_EventScript_Daisy", "flag": "0" }, { @@ -74,7 +74,7 @@ "movement_range_y": 0, "trainer_type": "1", "trainer_sight_or_berry_tree_id": "1", - "script": "Route103_EventScript_1EC66E", + "script": "Route103_EventScript_Liv", "flag": "0" }, { @@ -87,7 +87,7 @@ "movement_range_y": 0, "trainer_type": "1", "trainer_sight_or_berry_tree_id": "1", - "script": "Route103_EventScript_1EC60B", + "script": "Route103_EventScript_Amy", "flag": "0" }, { @@ -100,7 +100,7 @@ "movement_range_y": 1, "trainer_type": "1", "trainer_sight_or_berry_tree_id": "3", - "script": "Route103_EventScript_1EC6D1", + "script": "Route103_EventScript_Andrew", "flag": "0" }, { @@ -152,7 +152,7 @@ "movement_range_y": 2, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "Route103_EventScript_1EC5D9", + "script": "Route103_EventScript_Boy", "flag": "0" }, { @@ -178,7 +178,7 @@ "movement_range_y": 0, "trainer_type": "1", "trainer_sight_or_berry_tree_id": "5", - "script": "Route103_EventScript_1EC6E8", + "script": "Route103_EventScript_Miguel", "flag": "0" }, { @@ -230,7 +230,7 @@ "movement_range_y": 1, "trainer_type": "1", "trainer_sight_or_berry_tree_id": "2", - "script": "Route103_EventScript_1EC761", + "script": "Route103_EventScript_Rhett", "flag": "0" }, { @@ -243,7 +243,7 @@ "movement_range_y": 1, "trainer_type": "1", "trainer_sight_or_berry_tree_id": "2", - "script": "Route103_EventScript_1EC74A", + "script": "Route103_EventScript_Marcos", "flag": "0" }, { @@ -256,7 +256,7 @@ "movement_range_y": 3, "trainer_type": "1", "trainer_sight_or_berry_tree_id": "5", - "script": "Route103_EventScript_1EC78F", + "script": "Route103_EventScript_Isabelle", "flag": "0" }, { @@ -269,7 +269,7 @@ "movement_range_y": 3, "trainer_type": "1", "trainer_sight_or_berry_tree_id": "5", - "script": "Route103_EventScript_1EC778", + "script": "Route103_EventScript_Pete", "flag": "0" }, { @@ -303,7 +303,7 @@ "y": 9, "elevation": 0, "player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY", - "script": "Route103_EventScript_1EC5EB" + "script": "Route103_EventScript_RouteSign" } ] } \ No newline at end of file diff --git a/data/maps/Route103/scripts.inc b/data/maps/Route103/scripts.inc index 9a185aa141..b54ede043b 100644 --- a/data/maps/Route103/scripts.inc +++ b/data/maps/Route103/scripts.inc @@ -1,6 +1,6 @@ Route103_MapScripts:: @ 81EC38E map_script MAP_SCRIPT_ON_TRANSITION, Route103_OnTransition - map_script MAP_SCRIPT_ON_LOAD, Route103_MapScript1_1EC3A4 + map_script MAP_SCRIPT_ON_LOAD, Route103_OnLoad .byte 0 Route103_OnTransition: @ 81EC399 @@ -8,26 +8,26 @@ Route103_OnTransition: @ 81EC399 call ProfBirch_EventScript_UpdateLocation end -Route103_MapScript1_1EC3A4: @ 81EC3A4 - call_if_set FLAG_SYS_GAME_CLEAR, Route103_EventScript_1EC3AE +Route103_OnLoad: @ 81EC3A4 + call_if_set FLAG_SYS_GAME_CLEAR, Route103_EventScript_OpenAlteringCave end -Route103_EventScript_1EC3AE:: @ 81EC3AE +Route103_EventScript_OpenAlteringCave:: @ 81EC3AE setmetatile 45, 5, METATILE_General_CaveEntrance_Top, 1 setmetatile 45, 6, METATILE_General_CaveEntrance_Bottom, 0 return -Route103_EventScript_1EC3C1:: @ 81EC3C1 +Route103_EventScript_Rival:: @ 81EC3C1 lockall checkplayergender compare VAR_RESULT, MALE - goto_if_eq Route103_EventScript_1EC3DA + goto_if_eq Route103_EventScript_RivalMay compare VAR_RESULT, FEMALE - goto_if_eq Route103_EventScript_1EC434 + goto_if_eq Route103_EventScript_RivalBrendan end -Route103_EventScript_1EC3DA:: @ 81EC3DA - msgbox Route103_Text_1EC7A6, MSGBOX_DEFAULT +Route103_EventScript_RivalMay:: @ 81EC3DA + msgbox Route103_Text_MayRoute103Pokemon, MSGBOX_DEFAULT closemessage playbgm MUS_GIRL_SUP, 1 applymovement 2, Common_Movement_FacePlayer @@ -36,15 +36,15 @@ Route103_EventScript_1EC3DA:: @ 81EC3DA waitmovement 0 applymovement 2, Common_Movement_Delay48 waitmovement 0 - msgbox Route103_Text_1EC7DE, MSGBOX_DEFAULT + msgbox Route103_Text_MayLetsBattle, MSGBOX_DEFAULT switch VAR_STARTER_MON - case 0, Route103_EventScript_1EC48E - case 1, Route103_EventScript_1EC49E - case 2, Route103_EventScript_1EC4AE + case 0, Route103_EventScript_StartMayBattleTreecko + case 1, Route103_EventScript_StartMayBattleTorchic + case 2, Route103_EventScript_StartMayBattleMudkip end -Route103_EventScript_1EC434:: @ 81EC434 - msgbox Route103_Text_1EC989, MSGBOX_DEFAULT +Route103_EventScript_RivalBrendan:: @ 81EC434 + msgbox Route103_Text_BrendanRoute103Pokemon, MSGBOX_DEFAULT closemessage playbgm MUS_BOY_SUP, 1 applymovement 2, Common_Movement_FacePlayer @@ -53,92 +53,92 @@ Route103_EventScript_1EC434:: @ 81EC434 waitmovement 0 applymovement 2, Common_Movement_Delay48 waitmovement 0 - msgbox Route103_Text_1EC9CE, MSGBOX_DEFAULT + msgbox Route103_Text_BrendanLetsBattle, MSGBOX_DEFAULT switch VAR_STARTER_MON - case 0, Route103_EventScript_1EC4BE - case 1, Route103_EventScript_1EC4CE - case 2, Route103_EventScript_1EC4DE + case 0, Route103_EventScript_StartBrendanBattleTreecko + case 1, Route103_EventScript_StartBrendanBattleTorchic + case 2, Route103_EventScript_StartBrendanBattleMudkip end -Route103_EventScript_1EC48E:: @ 81EC48E - trainerbattle_no_intro TRAINER_MAY_4, Route103_Text_1EC881 - goto Route103_EventScript_1EC4EE +Route103_EventScript_StartMayBattleTreecko:: @ 81EC48E + trainerbattle_no_intro TRAINER_MAY_4, Route103_Text_MayDefeated + goto Route103_EventScript_AfterMayBattle end -Route103_EventScript_1EC49E:: @ 81EC49E - trainerbattle_no_intro TRAINER_MAY_7, Route103_Text_1EC881 - goto Route103_EventScript_1EC4EE +Route103_EventScript_StartMayBattleTorchic:: @ 81EC49E + trainerbattle_no_intro TRAINER_MAY_7, Route103_Text_MayDefeated + goto Route103_EventScript_AfterMayBattle end -Route103_EventScript_1EC4AE:: @ 81EC4AE - trainerbattle_no_intro TRAINER_MAY_1, Route103_Text_1EC881 - goto Route103_EventScript_1EC4EE +Route103_EventScript_StartMayBattleMudkip:: @ 81EC4AE + trainerbattle_no_intro TRAINER_MAY_1, Route103_Text_MayDefeated + goto Route103_EventScript_AfterMayBattle end -Route103_EventScript_1EC4BE:: @ 81EC4BE - trainerbattle_no_intro TRAINER_BRENDAN_4, Route103_Text_1ECA59 - goto Route103_EventScript_1EC4FC +Route103_EventScript_StartBrendanBattleTreecko:: @ 81EC4BE + trainerbattle_no_intro TRAINER_BRENDAN_4, Route103_Text_BrendanDefeated + goto Route103_EventScript_AfterBrendanBattle end -Route103_EventScript_1EC4CE:: @ 81EC4CE - trainerbattle_no_intro TRAINER_BRENDAN_7, Route103_Text_1ECA59 - goto Route103_EventScript_1EC4FC +Route103_EventScript_StartBrendanBattleTorchic:: @ 81EC4CE + trainerbattle_no_intro TRAINER_BRENDAN_7, Route103_Text_BrendanDefeated + goto Route103_EventScript_AfterBrendanBattle end -Route103_EventScript_1EC4DE:: @ 81EC4DE - trainerbattle_no_intro TRAINER_BRENDAN_1, Route103_Text_1ECA59 - goto Route103_EventScript_1EC4FC +Route103_EventScript_StartBrendanBattleMudkip:: @ 81EC4DE + trainerbattle_no_intro TRAINER_BRENDAN_1, Route103_Text_BrendanDefeated + goto Route103_EventScript_AfterBrendanBattle end -Route103_EventScript_1EC4EE:: @ 81EC4EE - msgbox Route103_Text_1EC8AE, MSGBOX_DEFAULT - goto Route103_EventScript_1EC50A +Route103_EventScript_AfterMayBattle:: @ 81EC4EE + msgbox Route103_Text_MayTimeToHeadBack, MSGBOX_DEFAULT + goto Route103_EventScript_RivalExit end -Route103_EventScript_1EC4FC:: @ 81EC4FC - msgbox Route103_Text_1ECA79, MSGBOX_DEFAULT - goto Route103_EventScript_1EC50A +Route103_EventScript_AfterBrendanBattle:: @ 81EC4FC + msgbox Route103_Text_BrendanTimeToHeadBack, MSGBOX_DEFAULT + goto Route103_EventScript_RivalExit end -Route103_EventScript_1EC50A:: @ 81EC50A +Route103_EventScript_RivalExit:: @ 81EC50A closemessage switch VAR_FACING - case DIR_SOUTH, Route103_EventScript_1EC585 - case DIR_NORTH, Route103_EventScript_1EC53D - case DIR_WEST, Route103_EventScript_1EC561 - case DIR_EAST, Route103_EventScript_1EC561 + case DIR_SOUTH, Route103_EventScript_RivalExitFacingSouth + case DIR_NORTH, Route103_EventScript_RivalExitFacingNorth + case DIR_WEST, Route103_EventScript_RivalExitFacingEastOrWest + case DIR_EAST, Route103_EventScript_RivalExitFacingEastOrWest end -Route103_EventScript_1EC53D:: @ 81EC53D - applymovement EVENT_OBJ_ID_PLAYER, Route103_Movement_1EC5C8 - applymovement 2, Route103_Movement_1EC5BE +Route103_EventScript_RivalExitFacingNorth:: @ 81EC53D + applymovement EVENT_OBJ_ID_PLAYER, Route103_Movement_WatchRivalExitFacingNorth + applymovement 2, Route103_Movement_RivalExitFacingNorth1 waitmovement 0 playse SE_DANSA - applymovement 2, Route103_Movement_1EC5C1 + applymovement 2, Route103_EventScript_RivalExitFacingNorth2 waitmovement 0 - goto Route103_EventScript_1EC5A2 + goto Route103_EventScript_RivalEnd end -Route103_EventScript_1EC561:: @ 81EC561 - applymovement EVENT_OBJ_ID_PLAYER, Route103_Movement_1EC5D6 - applymovement 2, Route103_Movement_1EC5CE +Route103_EventScript_RivalExitFacingEastOrWest:: @ 81EC561 + applymovement EVENT_OBJ_ID_PLAYER, Route103_Movement_WatchRivalExitFacingEastOrWest + applymovement 2, Route103_Movement_RivalExit1 waitmovement 0 playse SE_DANSA - applymovement 2, Route103_Movement_1EC5D0 + applymovement 2, Route103_Movement_RivalExit2 waitmovement 0 - goto Route103_EventScript_1EC5A2 + goto Route103_EventScript_RivalEnd end -Route103_EventScript_1EC585:: @ 81EC585 - applymovement 2, Route103_Movement_1EC5CE +Route103_EventScript_RivalExitFacingSouth:: @ 81EC585 + applymovement 2, Route103_Movement_RivalExit1 waitmovement 0 playse SE_DANSA - applymovement 2, Route103_Movement_1EC5D0 + applymovement 2, Route103_Movement_RivalExit2 waitmovement 0 - goto Route103_EventScript_1EC5A2 + goto Route103_EventScript_RivalEnd end -Route103_EventScript_1EC5A2:: @ 81EC5A2 +Route103_EventScript_RivalEnd:: @ 81EC5A2 removeobject 2 setvar VAR_BIRCH_LAB_STATE, 4 clearflag FLAG_HIDE_LITTLEROOT_TOWN_BIRCHS_LAB_RIVAL @@ -150,12 +150,12 @@ Route103_EventScript_1EC5A2:: @ 81EC5A2 releaseall end -Route103_Movement_1EC5BE: @ 81EC5BE +Route103_Movement_RivalExitFacingNorth1: @ 81EC5BE walk_left walk_down step_end -Route103_Movement_1EC5C1: @ 81EC5C1 +Route103_EventScript_RivalExitFacingNorth2: @ 81EC5C1 jump_2_down delay_16 walk_down @@ -164,7 +164,7 @@ Route103_Movement_1EC5C1: @ 81EC5C1 walk_down step_end -Route103_Movement_1EC5C8: @ 81EC5C8 +Route103_Movement_WatchRivalExitFacingNorth: @ 81EC5C8 delay_16 delay_4 walk_in_place_fastest_left @@ -172,11 +172,11 @@ Route103_Movement_1EC5C8: @ 81EC5C8 walk_in_place_fastest_down step_end -Route103_Movement_1EC5CE: @ 81EC5CE +Route103_Movement_RivalExit1: @ 81EC5CE walk_down step_end -Route103_Movement_1EC5D0: @ 81EC5D0 +Route103_Movement_RivalExit2: @ 81EC5D0 jump_2_down delay_16 walk_down @@ -184,118 +184,118 @@ Route103_Movement_1EC5D0: @ 81EC5D0 walk_down step_end -Route103_Movement_1EC5D6: @ 81EC5D6 +Route103_Movement_WatchRivalExitFacingEastOrWest: @ 81EC5D6 delay_16 walk_in_place_fastest_down step_end -Route103_EventScript_1EC5D9:: @ 81EC5D9 - msgbox Route103_Text_1ECB73, MSGBOX_NPC +Route103_EventScript_Boy:: @ 81EC5D9 + msgbox Route103_Text_ShouldHaveBroughtPotion, MSGBOX_NPC end -Route103_EventScript_1EC5E2:: @ 81EC5E2 - msgbox Route103_Text_1ECBB5, MSGBOX_NPC +Route103_EventScript_Man:: @ 81EC5E2 + msgbox Route103_Text_ShortcutToOldale, MSGBOX_NPC end -Route103_EventScript_1EC5EB:: @ 81EC5EB - msgbox Route103_Text_1ECC1A, MSGBOX_SIGN +Route103_EventScript_RouteSign:: @ 81EC5EB + msgbox Route103_Text_RouteSign, MSGBOX_SIGN end -Route103_EventScript_1EC5F4:: @ 81EC5F4 - trainerbattle_single TRAINER_DAISY, Route103_Text_29495A, Route103_Text_29498F - msgbox Route103_Text_2949B4, MSGBOX_AUTOCLOSE +Route103_EventScript_Daisy:: @ 81EC5F4 + trainerbattle_single TRAINER_DAISY, Route103_Text_DaisyIntro, Route103_Text_DaisyDefeated + msgbox Route103_Text_DaisyPostBattle, MSGBOX_AUTOCLOSE end -Route103_EventScript_1EC60B:: @ 81EC60B - trainerbattle_double TRAINER_AMY_AND_LIV_1, Route103_Text_2949F9, Route103_Text_294A3D, Route103_Text_294AAE, Route103_EventScript_1EC63A +Route103_EventScript_Amy:: @ 81EC60B + trainerbattle_double TRAINER_AMY_AND_LIV_1, Route103_Text_AmyIntro, Route103_Text_AmyDefeated, Route103_Text_AmyNotEnoughPokemon, Route102_EventScript_AmyRegisterMatchCallAfterBattle specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, 1 - goto_if_eq Route103_EventScript_1EC653 - msgbox Route103_Text_294A52, MSGBOX_AUTOCLOSE + compare VAR_RESULT, TRUE + goto_if_eq Route102_EventScript_AmyRematch + msgbox Route103_Text_AmyPostBattle, MSGBOX_AUTOCLOSE end -Route103_EventScript_1EC63A:: @ 81EC63A - msgbox Route103_Text_294B8A, MSGBOX_DEFAULT +Route102_EventScript_AmyRegisterMatchCallAfterBattle:: @ 81EC63A + msgbox Route103_Text_AmyLivRegister, MSGBOX_DEFAULT register_matchcall TRAINER_AMY_AND_LIV_1 release end -Route103_EventScript_1EC653:: @ 81EC653 - trainerbattle_rematch_double TRAINER_AMY_AND_LIV_1, Route103_Text_294C29, Route103_Text_294C6D, Route103_Text_294CEF - msgbox Route103_Text_294C93, MSGBOX_AUTOCLOSE +Route102_EventScript_AmyRematch:: @ 81EC653 + trainerbattle_rematch_double TRAINER_AMY_AND_LIV_1, Route103_Text_AmyRematchIntro, Route103_Text_AmyRematchDefeated, Route103_Text_AmyRematchNotEnoughPokemon + msgbox Route103_Text_AmyRematchPostBattle, MSGBOX_AUTOCLOSE end -Route103_EventScript_1EC66E:: @ 81EC66E - trainerbattle_double TRAINER_AMY_AND_LIV_1, Route103_Text_294AFD, Route103_Text_294B22, Route103_Text_294BD0, Route103_EventScript_1EC69D +Route103_EventScript_Liv:: @ 81EC66E + trainerbattle_double TRAINER_AMY_AND_LIV_1, Route103_Text_LivIntro, Route103_Text_LivDefeated, Route103_Text_LivNotEnoughPokemon, Route102_EventScript_LivRegisterMatchCallAfterBattle specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, 1 - goto_if_eq Route103_EventScript_1EC6B6 - msgbox Route103_Text_294B40, MSGBOX_AUTOCLOSE + compare VAR_RESULT, TRUE + goto_if_eq Route102_EventScript_LivRematch + msgbox Route103_Text_LivPostBattle, MSGBOX_AUTOCLOSE end -Route103_EventScript_1EC69D:: @ 81EC69D - msgbox Route103_Text_294B8A, MSGBOX_DEFAULT +Route102_EventScript_LivRegisterMatchCallAfterBattle:: @ 81EC69D + msgbox Route103_Text_AmyLivRegister, MSGBOX_DEFAULT register_matchcall TRAINER_AMY_AND_LIV_1 release end -Route103_EventScript_1EC6B6:: @ 81EC6B6 - trainerbattle_rematch_double TRAINER_AMY_AND_LIV_1, Route103_Text_294D3E, Route103_Text_294D63, Route103_Text_294DDB - msgbox Route103_Text_294D89, MSGBOX_AUTOCLOSE +Route102_EventScript_LivRematch:: @ 81EC6B6 + trainerbattle_rematch_double TRAINER_AMY_AND_LIV_1, Route103_Text_LivRematchIntro, Route103_Text_LivRematchDefeated, Route103_Text_LivRematchNotEnoughPokemon + msgbox Route103_Text_LivRematchPostBattle, MSGBOX_AUTOCLOSE end -Route103_EventScript_1EC6D1:: @ 81EC6D1 - trainerbattle_single TRAINER_ANDREW, Route103_Text_294E34, Route103_Text_294E92 - msgbox Route103_Text_294EBB, MSGBOX_AUTOCLOSE +Route103_EventScript_Andrew:: @ 81EC6D1 + trainerbattle_single TRAINER_ANDREW, Route103_Text_AndrewIntro, Route103_Text_AndrewDefeated + msgbox Route103_Text_AndrewPostBattle, MSGBOX_AUTOCLOSE end -Route103_EventScript_1EC6E8:: @ 81EC6E8 - trainerbattle_single TRAINER_MIGUEL_1, Route103_Text_294EDF, Route103_Text_294F21, Route103_EventScript_1EC714 +Route103_EventScript_Miguel:: @ 81EC6E8 + trainerbattle_single TRAINER_MIGUEL_1, Route103_Text_MiguelIntro, Route103_Text_MiguelDefeated, Route102_EventScript_MiguelRegisterMatchCallAfterBattle specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, 1 - goto_if_eq Route103_EventScript_1EC733 - msgbox Route103_Text_294F42, MSGBOX_DEFAULT + compare VAR_RESULT, TRUE + goto_if_eq Route103_EventScript_MiguelRematch + msgbox Route103_Text_MiguelPostBattle, MSGBOX_DEFAULT release end -Route103_EventScript_1EC714:: @ 81EC714 +Route102_EventScript_MiguelRegisterMatchCallAfterBattle:: @ 81EC714 special sub_80B4808 waitmovement 0 - msgbox Route103_Text_294F7E, MSGBOX_DEFAULT + msgbox Route103_Text_MiguelRegister, MSGBOX_DEFAULT register_matchcall TRAINER_MIGUEL_1 release end -Route103_EventScript_1EC733:: @ 81EC733 - trainerbattle_rematch TRAINER_MIGUEL_1, Route103_Text_294FC3, Route103_Text_295006 - msgbox Route103_Text_29501E, MSGBOX_AUTOCLOSE +Route103_EventScript_MiguelRematch:: @ 81EC733 + trainerbattle_rematch TRAINER_MIGUEL_1, Route103_Text_MiguelRematchIntro, Route103_Text_MiguelRematchDefeated + msgbox Route103_Text_MiguelRematchPostBattle, MSGBOX_AUTOCLOSE end -Route103_EventScript_1EC74A:: @ 81EC74A - trainerbattle_single TRAINER_MARCOS, Route103_Text_295206, Route103_Text_29522B - msgbox Route103_Text_295246, MSGBOX_AUTOCLOSE +Route103_EventScript_Marcos:: @ 81EC74A + trainerbattle_single TRAINER_MARCOS, Route103_Text_MarcosIntro, Route103_Text_MarcosDefeated + msgbox Route103_Text_MarcosPostBattle, MSGBOX_AUTOCLOSE end -Route103_EventScript_1EC761:: @ 81EC761 - trainerbattle_single TRAINER_RHETT, Route103_Text_295199, Route103_Text_2951C6 - msgbox Route103_Text_2951DE, MSGBOX_AUTOCLOSE +Route103_EventScript_Rhett:: @ 81EC761 + trainerbattle_single TRAINER_RHETT, Route103_Text_RhettIntro, Route103_Text_RhettDefeated + msgbox Route103_Text_RhettPostBattle, MSGBOX_AUTOCLOSE end -Route103_EventScript_1EC778:: @ 81EC778 - trainerbattle_single TRAINER_PETE, Route103_Text_295063, Route103_Text_295093 - msgbox Route103_Text_2950AA, MSGBOX_AUTOCLOSE +Route103_EventScript_Pete:: @ 81EC778 + trainerbattle_single TRAINER_PETE, Route103_Text_PeteIntro, Route103_Text_PeteDefeated + msgbox Route103_Text_PetePostBattle, MSGBOX_AUTOCLOSE end -Route103_EventScript_1EC78F:: @ 81EC78F - trainerbattle_single TRAINER_ISABELLE, Route103_Text_295116, Route103_Text_295146 - msgbox Route103_Text_29514D, MSGBOX_AUTOCLOSE +Route103_EventScript_Isabelle:: @ 81EC78F + trainerbattle_single TRAINER_ISABELLE, Route103_Text_IsabelleIntro, Route103_Text_IsabelleDefeated + msgbox Route103_Text_IsabellePostBattle, MSGBOX_AUTOCLOSE end -Route103_Text_1EC7A6: @ 81EC7A6 +Route103_Text_MayRoute103Pokemon: @ 81EC7A6 .string "MAY: Let's see… The POKéMON found\n" .string "on ROUTE 103 include…$" -Route103_Text_1EC7DE: @ 81EC7DE +Route103_Text_MayLetsBattle: @ 81EC7DE .string "Oh, hi, {PLAYER}{KUN}!\p" .string "…Oh, I see, my dad gave you\n" .string "a POKéMON as a gift.\p" @@ -304,11 +304,11 @@ Route103_Text_1EC7DE: @ 81EC7DE .string "I'll give you a taste of what being\n" .string "a TRAINER is like.$" -Route103_Text_1EC881: @ 81EC881 +Route103_Text_MayDefeated: @ 81EC881 .string "Wow! That's great!\n" .string "{PLAYER}{KUN}, you're pretty good!$" -Route103_Text_1EC8AE: @ 81EC8AE +Route103_Text_MayTimeToHeadBack: @ 81EC8AE .string "MAY: I think I know why my dad has\n" .string "an eye out for you now.\p" .string "I mean, you just got that POKéMON,\n" @@ -318,11 +318,11 @@ Route103_Text_1EC8AE: @ 81EC8AE .string "Well, it's time to head back to\n" .string "the LAB.$" -Route103_Text_1EC989: @ 81EC989 +Route103_Text_BrendanRoute103Pokemon: @ 81EC989 .string "BRENDAN: Okay, so it's this one and\n" .string "that one that live on ROUTE 103…$" -Route103_Text_1EC9CE: @ 81EC9CE +Route103_Text_BrendanLetsBattle: @ 81EC9CE .string "Hey, it's {PLAYER}!\p" .string "…Oh, yeah, Dad gave you a POKéMON.\p" .string "Since we're here, how about a little\n" @@ -330,10 +330,10 @@ Route103_Text_1EC9CE: @ 81EC9CE .string "I'll teach you what being a TRAINER's\n" .string "about!$" -Route103_Text_1ECA59: @ 81ECA59 +Route103_Text_BrendanDefeated: @ 81ECA59 .string "Huh, {PLAYER}, you're not too shabby.$" -Route103_Text_1ECA79: @ 81ECA79 +Route103_Text_BrendanTimeToHeadBack: @ 81ECA79 .string "BRENDAN: I think I get it.\n" .string "I think I know why my dad has his eye\l" .string "out for you now.\p" @@ -343,16 +343,16 @@ Route103_Text_1ECA79: @ 81ECA79 .string "could befriend any POKéMON with ease.\p" .string "We should head back to the LAB.$" -Route103_Text_1ECB73: @ 81ECB73 +Route103_Text_ShouldHaveBroughtPotion: @ 81ECB73 .string "My POKéMON is staggeringly tired…\n" .string "I should have brought a POTION…$" -Route103_Text_1ECBB5: @ 81ECBB5 +Route103_Text_ShortcutToOldale: @ 81ECBB5 .string "If you cross the sea from here,\n" .string "it'll be a shortcut to OLDALE TOWN.\p" .string "Fufufu, that's useful, isn't it?$" -Route103_Text_1ECC1A: @ 81ECC1A +Route103_Text_RouteSign: @ 81ECC1A .string "ROUTE 103\n" .string "{DOWN_ARROW} OLDALE TOWN$" diff --git a/data/maps/Route104/scripts.inc b/data/maps/Route104/scripts.inc index c943066f99..c7a0f97844 100644 --- a/data/maps/Route104/scripts.inc +++ b/data/maps/Route104/scripts.inc @@ -1,15 +1,15 @@ Route104_MapScripts:: @ 81ECC32 - map_script MAP_SCRIPT_ON_FRAME_TABLE, Route104_MapScript2_1ECC3D + map_script MAP_SCRIPT_ON_FRAME_TABLE, Route104_OnFrame map_script MAP_SCRIPT_ON_TRANSITION, Route104_OnTransition .byte 0 -Route104_MapScript2_1ECC3D: @ 81ECC3D - map_script_2 VAR_BOARD_BRINEY_BOAT_STATE, 1, Route104_EventScript_1ECC47 +Route104_OnFrame: @ 81ECC3D + map_script_2 VAR_BOARD_BRINEY_BOAT_STATE, 1, Route104_EventScript_StartSailToDewford .2byte 0 -Route104_EventScript_1ECC47:: @ 81ECC47 +Route104_EventScript_StartSailToDewford:: @ 81ECC47 lockall - goto Route104_EventScript_1ED099 + goto Route104_EventScript_SailToDewford end Route104_OnTransition: @ 81ECC4E @@ -355,13 +355,13 @@ Route104_EventScript_1ED090:: @ 81ED090 msgbox Route104_Text_1ED7A2, MSGBOX_NPC end -Route104_EventScript_1ED099:: @ 81ED099 +Route104_EventScript_SailToDewford:: @ 81ED099 setobjectpriority 8, MAP_ROUTE104, 0 setobjectpriority EVENT_OBJ_ID_PLAYER, MAP_ROUTE104, 0 - applymovement 8, Route104_Movement_1ED359 + applymovement 8, Route104_Movement_BrineyBoardBoat waitmovement 0 removeobject 8 - applymovement EVENT_OBJ_ID_PLAYER, Route104_Movement_1ED34F + applymovement EVENT_OBJ_ID_PLAYER, Route104_Movement_PlayerBoardBoat waitmovement 0 hideobjectat EVENT_OBJ_ID_PLAYER, MAP_ROUTE104 call Common_EventScript_PlayBrineysBoatMusic @@ -829,7 +829,7 @@ Route104_Movement_1ED28C: @ 81ED28C walk_down step_end -Route104_Movement_1ED34F: @ 81ED34F +Route104_Movement_PlayerBoardBoat: @ 81ED34F walk_left walk_down walk_down @@ -845,7 +845,7 @@ Route104_Movement_1ED355: @ 81ED355 walk_in_place_fastest_right step_end -Route104_Movement_1ED359: @ 81ED359 +Route104_Movement_BrineyBoardBoat: @ 81ED359 walk_down walk_down step_end diff --git a/data/text/trainers.inc b/data/text/trainers.inc index a6432006ca..e96c3d1355 100644 --- a/data/text/trainers.inc +++ b/data/text/trainers.inc @@ -1,245 +1,245 @@ -Route102_Text_294513: @ 8294513 +Route102_Text_CalvinIntro: @ 8294513 .string "If you have POKéMON with you, then\n" .string "you're an official POKéMON TRAINER!\l" .string "You can't say no to my challenge!$" -Route102_Text_29457C: @ 829457C +Route102_Text_CalvinDefeated: @ 829457C .string "Arrgh, I lost…\n" .string "I should have trained mine more…$" -Route102_Text_2945AC: @ 82945AC +Route102_Text_CalvinPostBattle: @ 82945AC .string "Listen, you. If you're strong,\n" .string "you should have told me before!$" -Route102_Text_2945EB: @ 82945EB +Route102_Text_CalvinRegister: @ 82945EB .string "I've been working hard at this since\n" .string "I saw you before.\p" .string "I'd like to battle you again, so can\n" .string "you register me in your POKéNAV?$" -Route102_Text_294668: @ 8294668 +Route102_Text_CalvinRegisterShort: @ 8294668 .string "I'd like to battle you again, so can\n" .string "you register me in your POKéNAV?$" -Route102_Text_2946AE: @ 82946AE +Route102_Text_CalvinRematchIntro: @ 82946AE .string "Ever since I lost to you, I desperately\n" .string "trained my POKéMON.\l" .string "You can't say no to my challenge!$" -Route102_Text_29470C: @ 829470C +Route102_Text_CalvinRematchDefeated: @ 829470C .string "Arrgh, I lost…\n" .string "Is my training method not right?$" -Route102_Text_29473C: @ 829473C +Route102_Text_CalvinRematchPostBattle: @ 829473C .string "If you're going to get stronger,\n" .string "I'll get stronger, too.$" -Route102_Text_294775: @ 8294775 +Route102_Text_AllenIntro: @ 8294775 .string "Did you just become a TRAINER?\n" .string "We're both beginners!$" -Route102_Text_2947AA: @ 82947AA +Route102_Text_AllenDefeated: @ 82947AA .string "I called you because I thought\n" .string "I could beat you…$" -Route102_Text_2947DB: @ 82947DB +Route102_Text_AllenPostBattle: @ 82947DB .string "I haven't won once yet…\n" .string "I wish I would win soon…$" -Route102_Text_29480C: @ 829480C +Route102_Text_RickIntro: @ 829480C .string "Hahah! Our eyes met!\n" .string "I'll take you on with my BUG POKéMON!$" -Route102_Text_294847: @ 8294847 +Route102_Text_RickDefeated: @ 8294847 .string "Ow! Down and out!$" -Route102_Text_294859: @ 8294859 +Route102_Text_RickPostBattle: @ 8294859 .string "If you lock eyes with a TRAINER,\n" .string "you have to challenge! It's a rule!$" -Route102_Text_29489E: @ 829489E +Route102_Text_TianaIntro: @ 829489E .string "I'm going to keep winning and aim\n" .string "to be the best TRAINER.\p" .string "Help me further my career!$" -Route102_Text_2948F3: @ 82948F3 +Route102_Text_TianaDefeated: @ 82948F3 .string "I ended up furthering your career…$" -Route102_Text_294916: @ 8294916 +Route102_Text_TianaPostBattle: @ 8294916 .string "To keep winning my way up, I see that\n" .string "I have to catch more POKéMON.$" -Route103_Text_29495A: @ 829495A +Route103_Text_DaisyIntro: @ 829495A .string "Did you feel the tug of our\n" .string "soul-soothing fragrance?$" -Route103_Text_29498F: @ 829498F +Route103_Text_DaisyDefeated: @ 829498F .string "You weren't led astray by our aroma…$" -Route103_Text_2949B4: @ 82949B4 +Route103_Text_DaisyPostBattle: @ 82949B4 .string "Aromatherapy is a form of mental\n" .string "healing that works with fragrances.$" -Route103_Text_2949F9: @ 82949F9 +Route103_Text_AmyIntro: @ 82949F9 .string "AMY: I'm AMY.\n" .string "And this is my little sister LIV.\l" .string "We battle together!$" -Route103_Text_294A3D: @ 8294A3D +Route103_Text_AmyDefeated: @ 8294A3D .string "AMY: Uh-oh, we lost.$" -Route103_Text_294A52: @ 8294A52 +Route103_Text_AmyPostBattle: @ 8294A52 .string "AMY: You have to think about all\n" .string "kinds of things when you're battling\l" .string "against two TRAINERS.$" -Route103_Text_294AAE: @ 8294AAE +Route103_Text_AmyNotEnoughPokemon: @ 8294AAE .string "AMY: Uh-oh, you have only one\n" .string "POKéMON with you.\l" .string "You can't battle us like that.$" -Route103_Text_294AFD: @ 8294AFD +Route103_Text_LivIntro: @ 8294AFD .string "LIV: We battle together as one\n" .string "team.$" -Route103_Text_294B22: @ 8294B22 +Route103_Text_LivDefeated: @ 8294B22 .string "LIV: Oh, we lost, big sister…$" -Route103_Text_294B40: @ 8294B40 +Route103_Text_LivPostBattle: @ 8294B40 .string "LIV: We work perfectly together,\n" .string "me and my big sister…\p" .string "But we still lost…$" -Route103_Text_294B8A: @ 8294B8A +Route103_Text_AmyLivRegister: @ 8294B8A .string "LIV: Really, we're a lot better…\n" .string "It's true! We'll show you next time!$" -Route103_Text_294BD0: @ 8294BD0 +Route103_Text_LivNotEnoughPokemon: @ 8294BD0 .string "LIV: If you want to battle us,\n" .string "you have to have two POKéMON!\l" .string "It's not fair if you don't!$" -Route103_Text_294C29: @ 8294C29 +Route103_Text_AmyRematchIntro: @ 8294C29 .string "AMY: I'm AMY.\n" .string "And this is my little sister LIV.\l" .string "We battle together!$" -Route103_Text_294C6D: @ 8294C6D +Route103_Text_AmyRematchDefeated: @ 8294C6D .string "AMY: Aww, boo!\n" .string "We couldn't win again…$" -Route103_Text_294C93: @ 8294C93 +Route103_Text_AmyRematchPostBattle: @ 8294C93 .string "AMY: You have to think about all\n" .string "kinds of things when you're battling\l" .string "against two TRAINERS.$" -Route103_Text_294CEF: @ 8294CEF +Route103_Text_AmyRematchNotEnoughPokemon: @ 8294CEF .string "AMY: Uh-oh, you have only one\n" .string "POKéMON with you.\l" .string "You can't battle us like that.$" -Route103_Text_294D3E: @ 8294D3E +Route103_Text_LivRematchIntro: @ 8294D3E .string "LIV: We battle together as one\n" .string "team.$" -Route103_Text_294D63: @ 8294D63 +Route103_Text_LivRematchDefeated: @ 8294D63 .string "LIV: Awww, we lost again…\n" .string "Big sister…$" -Route103_Text_294D89: @ 8294D89 +Route103_Text_LivRematchPostBattle: @ 8294D89 .string "LIV: We work perfectly together,\n" .string "me and my big sister…\p" .string "But why did we lose again?$" -Route103_Text_294DDB: @ 8294DDB +Route103_Text_LivRematchNotEnoughPokemon: @ 8294DDB .string "LIV: If you want to battle us, you\n" .string "have to have two POKéMON!\l" .string "It's not fair if you don't!$" -Route103_Text_294E34: @ 8294E34 +Route103_Text_AndrewIntro: @ 8294E34 .string "Gah! My fishing line's all snarled up!\n" .string "I'm getting frustrated and mean!\l" .string "That's it! Battle me!$" -Route103_Text_294E92: @ 8294E92 +Route103_Text_AndrewDefeated: @ 8294E92 .string "Gah! Lost it!\n" .string "I'm even more annoyed now!$" -Route103_Text_294EBB: @ 8294EBB +Route103_Text_AndrewPostBattle: @ 8294EBB .string "Gah, I'm still boiling mad…\n" .string "Grrrrr…$" -Route103_Text_294EDF: @ 8294EDF +Route103_Text_MiguelIntro: @ 8294EDF .string "My POKéMON is delightfully adorable!\n" .string "Don't be shy--I'll show you!$" -Route103_Text_294F21: @ 8294F21 +Route103_Text_MiguelDefeated: @ 8294F21 .string "Oh, my gosh!\n" .string "My darling POKéMON!$" -Route103_Text_294F42: @ 8294F42 +Route103_Text_MiguelPostBattle: @ 8294F42 .string "My delightful POKéMON looks darling\n" .string "even when it's fainted!$" -Route103_Text_294F7E: @ 8294F7E +Route103_Text_MiguelRegister: @ 8294F7E .string "I'll get you to come out and look in\n" .string "on my delightful POKéMON again!$" -Route103_Text_294FC3: @ 8294FC3 +Route103_Text_MiguelRematchIntro: @ 8294FC3 .string "Hi, you! My delightfully adorable\n" .string "POKéMON has become more darling!$" -Route103_Text_295006: @ 8295006 +Route103_Text_MiguelRematchDefeated: @ 8295006 .string "Oh!\n" .string "My darling POKéMON!$" -Route103_Text_29501E: @ 829501E +Route103_Text_MiguelRematchPostBattle: @ 829501E .string "The more I spend time with it,\n" .string "the more adorable my POKéMON becomes.$" -Route103_Text_295063: @ 8295063 +Route103_Text_PeteIntro: @ 8295063 .string "This sort of distance…\n" .string "You should just swim it!$" -Route103_Text_295093: @ 8295093 +Route103_Text_PeteDefeated: @ 8295093 .string "Oh, that's good going!$" -Route103_Text_2950AA: @ 82950AA +Route103_Text_PetePostBattle: @ 82950AA .string "Oh, I understand where you're coming\n" .string "from now.\p" .string "If I had a POKéMON that trusty,\n" .string "I'd want to SURF on it, too!$" -Route103_Text_295116: @ 8295116 +Route103_Text_IsabelleIntro: @ 8295116 .string "Watch where you're going!\n" .string "We're going to crash!$" -Route103_Text_295146: @ 8295146 +Route103_Text_IsabelleDefeated: @ 8295146 .string "Groan…$" -Route103_Text_29514D: @ 829514D +Route103_Text_IsabellePostBattle: @ 829514D .string "I'm a poor swimmer so I was practicing…\n" .string "Sorry for almost crashing into you.$" -Route103_Text_295199: @ 8295199 +Route103_Text_RhettIntro: @ 8295199 .string "Whoa!\n" .string "How'd you get into a space this small?$" -Route103_Text_2951C6: @ 82951C6 +Route103_Text_RhettDefeated: @ 82951C6 .string "Whoa!\n" .string "The kid can rock!$" -Route103_Text_2951DE: @ 82951DE +Route103_Text_RhettPostBattle: @ 82951DE .string "Do you like cramped quarters\n" .string "like this?$" -Route103_Text_295206: @ 8295206 +Route103_Text_MarcosIntro: @ 8295206 .string "Did my guitar's wailing draw you in?$" -Route103_Text_29522B: @ 829522B +Route103_Text_MarcosDefeated: @ 829522B .string "My one-man show is ruined…$" -Route103_Text_295246: @ 8295246 +Route103_Text_MarcosPostBattle: @ 8295246 .string "I was playing my guitar where few\n" .string "people were around, but a lot of fans\l" .string "have gathered.\p" From c0aaa014247f8dfd78d9c7668b8a2096456ec253 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Tue, 22 Oct 2019 17:28:05 -0400 Subject: [PATCH 21/46] Document flash.inc --- data/scripts/flash.inc | 2 +- include/event_scripts.h | 2 +- src/fldeff_flash.c | 16 ++++++++-------- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/data/scripts/flash.inc b/data/scripts/flash.inc index e0630db568..916b507194 100644 --- a/data/scripts/flash.inc +++ b/data/scripts/flash.inc @@ -1,4 +1,4 @@ -EventScript_2926F8:: @ 82926F8 +EventScript_FldEffFlash:: @ 82926F8 animateflash 1 setflashradius 1 end diff --git a/include/event_scripts.h b/include/event_scripts.h index 52f3cc251a..6ebce69f38 100644 --- a/include/event_scripts.h +++ b/include/event_scripts.h @@ -376,7 +376,7 @@ extern const u8 BattleFrontier_BattlePyramidEmptySquare_EventScript_252C88[]; //field effects extern const u8 EventScript_FldEffStrength[]; extern const u8 EventScript_FailSweetScent[]; -extern const u8 EventScript_2926F8[]; +extern const u8 EventScript_FldEffFlash[]; extern const u8 EventScript_FldEffRockSmash[]; //player pc diff --git a/src/fldeff_flash.c b/src/fldeff_flash.c index a2457307b1..fedf38cf59 100644 --- a/src/fldeff_flash.c +++ b/src/fldeff_flash.c @@ -26,8 +26,8 @@ struct FlashStruct }; // static functions -static void hm2_flash(void); -static void sub_81371B4(void); +static void FieldCallback_Flash(void); +static void FldEff_UseFlash(void); static bool8 sub_8137304(void); static void sub_81373F0(void); static void sub_8137404(u8 taskId); @@ -86,26 +86,26 @@ bool8 SetUpFieldMove_Flash(void) else if (gMapHeader.cave == TRUE && !FlagGet(FLAG_SYS_USE_FLASH)) { gFieldCallback2 = FieldCallback_PrepareFadeInFromMenu; - gPostMenuFieldCallback = hm2_flash; + gPostMenuFieldCallback = FieldCallback_Flash; return TRUE; } return FALSE; } -static void hm2_flash(void) +static void FieldCallback_Flash(void) { u8 taskId = oei_task_add(); gFieldEffectArguments[0] = GetCursorSelectionMonId(); - gTasks[taskId].data[8] = (uintptr_t)sub_81371B4 >> 16; - gTasks[taskId].data[9] = (uintptr_t)sub_81371B4; + gTasks[taskId].data[8] = (uintptr_t)FldEff_UseFlash >> 16; + gTasks[taskId].data[9] = (uintptr_t)FldEff_UseFlash; } -static void sub_81371B4(void) +static void FldEff_UseFlash(void) { PlaySE(SE_W115); FlagSet(FLAG_SYS_USE_FLASH); - ScriptContext1_SetupScript(EventScript_2926F8); + ScriptContext1_SetupScript(EventScript_FldEffFlash); } static void sub_81371D4(void) From 9a8676984736dc57a83e8b615b9e33dcb430c59f Mon Sep 17 00:00:00 2001 From: GriffinR Date: Tue, 22 Oct 2019 17:56:47 -0400 Subject: [PATCH 22/46] Document obtain_item.inc --- data/event_scripts.s | 2 +- data/scripts/obtain_item.inc | 102 +++++++++++++++++------------------ data/specials.inc | 4 +- include/tv.h | 2 +- src/field_specials.c | 2 +- src/tv.c | 2 +- 6 files changed, 57 insertions(+), 57 deletions(-) diff --git a/data/event_scripts.s b/data/event_scripts.s index de13da7482..2e059113a0 100644 --- a/data/event_scripts.s +++ b/data/event_scripts.s @@ -1075,7 +1075,7 @@ gText_ThankYouForAccessingMysteryGift:: @ 8273178 .string "Thank you for accessing the\n" .string "MYSTERY GIFT System.$" -gText_PlayerFoundOneItemTwoLines:: @ 82731A9 +gText_PlayerFoundOneTMHM:: @ 82731A9 .string "{PLAYER} found one {STR_VAR_1}\n" .string "{STR_VAR_2}!$" diff --git a/data/scripts/obtain_item.inc b/data/scripts/obtain_item.inc index 00bf4523e4..206277cb77 100644 --- a/data/scripts/obtain_item.inc +++ b/data/scripts/obtain_item.inc @@ -1,66 +1,66 @@ Std_ObtainItem:: @ 8271AD3 giveitem VAR_0x8000, VAR_0x8001 copyvar VAR_0x8007, VAR_RESULT - call EventScript_271AE3 + call EventScript_ObtainItemMessage return -EventScript_271AE3:: @ 8271AE3 +EventScript_ObtainItemMessage:: @ 8271AE3 bufferitemnameplural 1, VAR_0x8000, VAR_0x8001 checkitemtype VAR_0x8000 - call EventScript_BufferStdString + call EventScript_BufferPocketNameAndTryFanfare compare VAR_0x8007, 1 - call_if_eq EventScript_271B95 + call_if_eq EventScript_ObtainedItem compare VAR_0x8007, 0 - call_if_eq EventScript_271BA9 + call_if_eq EventScript_NoRoomForItem return -EventScript_BufferStdString:: @ 8271B08 +EventScript_BufferPocketNameAndTryFanfare:: @ 8271B08 switch VAR_RESULT - case POCKET_ITEMS, EventScript_StdStringItem - case POCKET_KEY_ITEMS, EventScript_StdStringKeyItems - case POCKET_POKE_BALLS, EventScript_StdStringPokeballs - case POCKET_TM_HM, EventScript_StdStringTMHMS - case POCKET_BERRIES, EventScript_StdStringBerries + case POCKET_ITEMS, EventScript_BufferItemsPocket + case POCKET_KEY_ITEMS, EventScript_BufferKeyItemsPocket + case POCKET_POKE_BALLS, EventScript_BufferPokeballsPocket + case POCKET_TM_HM, EventScript_BufferTMHMsPocket + case POCKET_BERRIES, EventScript_BufferBerriesPocket end -EventScript_StdStringItem:: @ 8271B45 +EventScript_BufferItemsPocket:: @ 8271B45 bufferstdstring 2, STDSTRING_ITEMS compare VAR_0x8007, 1 call_if_eq EventScript_PlayFanfareObtainedItem return -EventScript_StdStringKeyItems:: @ 8271B55 +EventScript_BufferKeyItemsPocket:: @ 8271B55 bufferstdstring 2, STDSTRING_KEYITEMS compare VAR_0x8007, 1 call_if_eq EventScript_PlayFanfareObtainedItem return -EventScript_StdStringPokeballs:: @ 8271B65 +EventScript_BufferPokeballsPocket:: @ 8271B65 bufferstdstring 2, STDSTRING_POKEBALLS compare VAR_0x8007, 1 call_if_eq EventScript_PlayFanfareObtainedItem return -EventScript_StdStringTMHMS:: @ 8271B75 +EventScript_BufferTMHMsPocket:: @ 8271B75 bufferstdstring 2, STDSTRING_TMHMS compare VAR_0x8007, 1 call_if_eq EventScript_PlayFanfareObtainedTMHM return -EventScript_StdStringBerries:: @ 8271B85 +EventScript_BufferBerriesPocket:: @ 8271B85 bufferstdstring 2, STDSTRING_BERRIES compare VAR_0x8007, 1 call_if_eq EventScript_PlayFanfareObtainedItem return -EventScript_271B95:: @ 8271B95 +EventScript_ObtainedItem:: @ 8271B95 message gText_ObtainedTheItem waitfanfare msgbox gText_PutItemInPocket, MSGBOX_DEFAULT setvar VAR_RESULT, 1 return -EventScript_271BA9:: @ 8271BA9 +EventScript_NoRoomForItem:: @ 8271BA9 setvar VAR_RESULT, 0 return @@ -75,18 +75,18 @@ EventScript_PlayFanfareObtainedTMHM:: @ 8271BB3 Std_ObtainDecoration:: @ 8271BB7 givedecoration VAR_0x8000 copyvar VAR_0x8007, VAR_RESULT - call EventScript_271BC5 + call EventScript_ObtainDecorationMessage return -EventScript_271BC5:: @ 8271BC5 +EventScript_ObtainDecorationMessage:: @ 8271BC5 bufferdecorationname 1, VAR_0x8000 compare VAR_0x8007, 1 - call_if_eq EventScript_271BE0 + call_if_eq EventScript_ObtainedDecor compare VAR_0x8007, 0 - call_if_eq EventScript_271BF7 + call_if_eq EventScript_NoRoomForDecor return -EventScript_271BE0:: @ 8271BE0 +EventScript_ObtainedDecor:: @ 8271BE0 playfanfare MUS_FANFA4 message gText_ObtainedTheDecor waitfanfare @@ -94,7 +94,7 @@ EventScript_271BE0:: @ 8271BE0 setvar VAR_RESULT, 1 return -EventScript_271BF7:: @ 8271BF7 +EventScript_NoRoomForDecor:: @ 8271BF7 setvar VAR_RESULT, 0 return @@ -108,47 +108,47 @@ Std_FindItem:: @ 8271BFD copyvar VAR_0x8007, VAR_RESULT bufferitemnameplural 1, VAR_0x8000, VAR_0x8001 checkitemtype VAR_0x8000 - call EventScript_BufferStdString + call EventScript_BufferPocketNameAndTryFanfare compare VAR_0x8007, 1 - call_if_eq EventScript_PickItemUp + call_if_eq EventScript_PickUpItem compare VAR_0x8007, 0 - call_if_eq EventScript_271CA1 + call_if_eq EventScript_NoRoomToPickUpItem release return -EventScript_PickItemUp:: @ 8271C3A +EventScript_PickUpItem:: @ 8271C3A removeobject VAR_LAST_TALKED giveitem VAR_0x8004, VAR_0x8005 specialvar VAR_RESULT, BufferTMHMMoveName copyvar VAR_0x8008, VAR_RESULT compare VAR_0x8008, 1 - call_if_eq EventScript_271C8F + call_if_eq EventScript_FoundTMHM compare VAR_0x8008, 0 - call_if_eq EventScript_271C9B + call_if_eq EventScript_FoundItem waitfanfare waitmessage bufferitemnameplural 1, VAR_0x8004, VAR_0x8005 setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_IS_IN special CallBattlePyramidFunction compare VAR_RESULT, 1 - goto_if_eq EventScript_271C86 + goto_if_eq EventScript_PutBattlePyramidItemInBag msgbox gText_PutItemInPocket, MSGBOX_DEFAULT return -EventScript_271C86:: @ 8271C86 +EventScript_PutBattlePyramidItemInBag:: @ 8271C86 msgbox gText_PlayerPutItemInBag, MSGBOX_DEFAULT return -EventScript_271C8F:: @ 8271C8F +EventScript_FoundTMHM:: @ 8271C8F bufferitemnameplural 0, VAR_0x8004, VAR_0x8005 - message gText_PlayerFoundOneItemTwoLines + message gText_PlayerFoundOneTMHM return -EventScript_271C9B:: @ 8271C9B +EventScript_FoundItem:: @ 8271C9B message gText_PlayerFoundOneItem return -EventScript_271CA1:: @ 8271CA1 +EventScript_NoRoomToPickUpItem:: @ 8271CA1 msgbox gText_ObtainedTheItem, MSGBOX_DEFAULT msgbox gText_TooBadBagIsFull, MSGBOX_DEFAULT setvar VAR_RESULT, 0 @@ -161,46 +161,46 @@ EventScript_HiddenItemScript:: @ 8271CB7 copyvar VAR_0x8007, VAR_RESULT bufferitemnameplural 1, VAR_0x8005, 1 checkitemtype VAR_0x8005 - call EventScript_BufferStdString + call EventScript_BufferPocketNameAndTryFanfare compare VAR_0x8007, 1 - goto_if_eq EventScript_271CE8 + goto_if_eq EventScript_PickUpHiddenItem compare VAR_0x8007, 0 - goto_if_eq EventScript_271D47 + goto_if_eq EventScript_NoRoomForHiddenItem end -EventScript_271CE8:: @ 8271CE8 +EventScript_PickUpHiddenItem:: @ 8271CE8 copyvar VAR_0x8008, VAR_0x8004 copyvar VAR_0x8004, VAR_0x8005 specialvar VAR_RESULT, BufferTMHMMoveName compare VAR_RESULT, 1 - goto_if_eq EventScript_271D0E + goto_if_eq EventScript_FoundHiddenTMHM compare VAR_RESULT, 0 - goto_if_eq EventScript_271D1F + goto_if_eq EventScript_FoundHiddenItem end -EventScript_271D0E:: @ 8271D0E +EventScript_FoundHiddenTMHM:: @ 8271D0E bufferitemnameplural 0, VAR_0x8004, 1 - message gText_PlayerFoundOneItemTwoLines - goto EventScript_271D2A + message gText_PlayerFoundOneTMHM + goto EventScript_PutHiddenItemInPocket end -EventScript_271D1F:: @ 8271D1F +EventScript_FoundHiddenItem:: @ 8271D1F message gText_PlayerFoundOneItem - goto EventScript_271D2A + goto EventScript_PutHiddenItemInPocket end -EventScript_271D2A:: @ 8271D2A +EventScript_PutHiddenItemInPocket:: @ 8271D2A waitmessage waitfanfare bufferitemnameplural 1, VAR_0x8004, 1 copyvar VAR_0x8004, VAR_0x8008 msgbox gText_PutItemInPocket, MSGBOX_DEFAULT - special sub_80EDCE8 - special SetFlagInVar + special TryPutTreasureInvestigatorsOnAir + special SetHiddenItemFlag releaseall end -EventScript_271D47:: @ 8271D47 +EventScript_NoRoomForHiddenItem:: @ 8271D47 msgbox gText_PlayerFoundOneItem, MSGBOX_DEFAULT msgbox gText_TooBadBagIsFull, MSGBOX_DEFAULT setvar VAR_RESULT, 0 diff --git a/data/specials.inc b/data/specials.inc index 5ab98e24d7..dbf075493c 100644 --- a/data/specials.inc +++ b/data/specials.inc @@ -161,7 +161,7 @@ gSpecials:: @ 81DBA64 def_special GetPlayerTrainerIdOnesDigit def_special GetPlayerBigGuyGirlString def_special GetRivalSonDaughterString - def_special SetFlagInVar + def_special SetHiddenItemFlag def_special CableCarWarp def_special CableCar def_special Overworld_PlaySpecialMapMusic @@ -352,7 +352,7 @@ gSpecials:: @ 81DBA64 def_special DoesPartyHaveEnigmaBerry def_special ScriptRandom def_special sub_81AFDD0 - def_special sub_80EDCE8 + def_special TryPutTreasureInvestigatorsOnAir def_special sub_80EE2CC def_special sub_80EE72C def_special sub_80EE7C0 diff --git a/include/tv.h b/include/tv.h index 42640fb957..8f697afe99 100644 --- a/include/tv.h +++ b/include/tv.h @@ -12,7 +12,7 @@ void sub_80EE35C(u16 foeSpecies, u16 species, u8 moveIdx, const u16 *movePtr, u1 void sub_80EE8C8(u16 winStreak, u8 facility); void DoTVShow(void); void DoTVShowInSearchOfTrainers(void); -void sub_80EDCE8(void); +void TryPutTreasureInvestigatorsOnAir(void); void sub_80EE2CC(void); void sub_80EE72C(void); void IncrementDailyPlantedBerries(void); diff --git a/src/field_specials.c b/src/field_specials.c index b92e956d4d..aa7ff4e42a 100644 --- a/src/field_specials.c +++ b/src/field_specials.c @@ -973,7 +973,7 @@ void CableCarWarp(void) } } -void SetFlagInVar(void) +void SetHiddenItemFlag(void) { FlagSet(gSpecialVar_0x8004); } diff --git a/src/tv.c b/src/tv.c index a228daac0d..5cc6e6626e 100644 --- a/src/tv.c +++ b/src/tv.c @@ -2003,7 +2003,7 @@ void sub_80EDC60(const u16 *words) } } -void sub_80EDCE8(void) +void TryPutTreasureInvestigatorsOnAir(void) { TVShow *show; From ca2c6fa9b1222c1e871c41c497b8690405845b66 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Tue, 22 Oct 2019 18:07:08 -0400 Subject: [PATCH 23/46] Document pc_transfer.inc --- .../scripts.inc | 6 ++--- .../MossdeepCity_StevensHouse/scripts.inc | 2 +- .../Route119_WeatherInstitute_2F/scripts.inc | 2 +- .../RustboroCity_DevonCorp_2F/scripts.inc | 4 +-- data/scripts/pc_transfer.inc | 25 ++++++++----------- data/text/pc_transfer.inc | 4 +-- include/strings.h | 4 +-- src/battle_message.c | 4 +-- src/naming_screen.c | 12 +++------ 9 files changed, 28 insertions(+), 35 deletions(-) diff --git a/data/maps/LittlerootTown_ProfessorBirchsLab/scripts.inc b/data/maps/LittlerootTown_ProfessorBirchsLab/scripts.inc index 283be0477f..f9c4b46d71 100644 --- a/data/maps/LittlerootTown_ProfessorBirchsLab/scripts.inc +++ b/data/maps/LittlerootTown_ProfessorBirchsLab/scripts.inc @@ -366,7 +366,7 @@ LittlerootTown_ProfessorBirchsLab_EventScript_1FA0CC:: @ 81FA0CC end LittlerootTown_ProfessorBirchsLab_EventScript_1FA0F2:: @ 81FA0F2 - call LittlerootTown_ProfessorBirchsLab_EventScript_2737A0 + call Common_EventScript_TransferredToPC goto LittlerootTown_ProfessorBirchsLab_EventScript_1FA0FD end @@ -411,7 +411,7 @@ LittlerootTown_ProfessorBirchsLab_EventScript_1FA16D:: @ 81FA16D end LittlerootTown_ProfessorBirchsLab_EventScript_1FA193:: @ 81FA193 - call LittlerootTown_ProfessorBirchsLab_EventScript_2737A0 + call Common_EventScript_TransferredToPC goto LittlerootTown_ProfessorBirchsLab_EventScript_1FA19E end @@ -456,7 +456,7 @@ LittlerootTown_ProfessorBirchsLab_EventScript_1FA20E:: @ 81FA20E end LittlerootTown_ProfessorBirchsLab_EventScript_1FA234:: @ 81FA234 - call LittlerootTown_ProfessorBirchsLab_EventScript_2737A0 + call Common_EventScript_TransferredToPC goto LittlerootTown_ProfessorBirchsLab_EventScript_1FA23F end diff --git a/data/maps/MossdeepCity_StevensHouse/scripts.inc b/data/maps/MossdeepCity_StevensHouse/scripts.inc index 33b30e1d0b..cc50ff37a9 100644 --- a/data/maps/MossdeepCity_StevensHouse/scripts.inc +++ b/data/maps/MossdeepCity_StevensHouse/scripts.inc @@ -113,7 +113,7 @@ MossdeepCity_StevensHouse_EventScript_2228BD:: @ 82228BD end MossdeepCity_StevensHouse_EventScript_2228E0:: @ 82228E0 - call MossdeepCity_StevensHouse_EventScript_2737A0 + call Common_EventScript_TransferredToPC goto MossdeepCity_StevensHouse_EventScript_222901 end diff --git a/data/maps/Route119_WeatherInstitute_2F/scripts.inc b/data/maps/Route119_WeatherInstitute_2F/scripts.inc index ac47539c7d..1e415dd415 100644 --- a/data/maps/Route119_WeatherInstitute_2F/scripts.inc +++ b/data/maps/Route119_WeatherInstitute_2F/scripts.inc @@ -112,7 +112,7 @@ Route119_WeatherInstitute_2F_EventScript_2700AD:: @ 82700AD end Route119_WeatherInstitute_2F_EventScript_2700D0:: @ 82700D0 - call Route119_WeatherInstitute_2F_EventScript_2737A0 + call Common_EventScript_TransferredToPC goto Route119_WeatherInstitute_2F_EventScript_2700EA end diff --git a/data/maps/RustboroCity_DevonCorp_2F/scripts.inc b/data/maps/RustboroCity_DevonCorp_2F/scripts.inc index 0784f523c6..acdcb9528e 100644 --- a/data/maps/RustboroCity_DevonCorp_2F/scripts.inc +++ b/data/maps/RustboroCity_DevonCorp_2F/scripts.inc @@ -185,7 +185,7 @@ RustboroCity_DevonCorp_2F_EventScript_211A96:: @ 8211A96 end RustboroCity_DevonCorp_2F_EventScript_211AB9:: @ 8211AB9 - call RustboroCity_DevonCorp_2F_EventScript_2737A0 + call Common_EventScript_TransferredToPC goto RustboroCity_DevonCorp_2F_EventScript_211AD7 end @@ -234,7 +234,7 @@ RustboroCity_DevonCorp_2F_EventScript_211B39:: @ 8211B39 end RustboroCity_DevonCorp_2F_EventScript_211B5C:: @ 8211B5C - call RustboroCity_DevonCorp_2F_EventScript_2737A0 + call Common_EventScript_TransferredToPC goto RustboroCity_DevonCorp_2F_EventScript_211B7A end diff --git a/data/scripts/pc_transfer.inc b/data/scripts/pc_transfer.inc index 6a72eae758..594956a31f 100644 --- a/data/scripts/pc_transfer.inc +++ b/data/scripts/pc_transfer.inc @@ -13,40 +13,37 @@ Common_EventScript_NameReceivedBoxMon:: @ 8273797 faceplayer return -LittlerootTown_ProfessorBirchsLab_EventScript_2737A0:: @ 82737A0 -MossdeepCity_StevensHouse_EventScript_2737A0:: @ 82737A0 -Route119_WeatherInstitute_2F_EventScript_2737A0:: @ 82737A0 -RustboroCity_DevonCorp_2F_EventScript_2737A0:: @ 82737A0 +Common_EventScript_TransferredToPC:: @ 82737A0 bufferboxname 0, VAR_PC_BOX_TO_SEND_MON bufferspeciesname 1, VAR_TEMP_1 - call_if_unset FLAG_SYS_PC_LANETTE, LittlerootTown_ProfessorBirchsLab_EventScript_2737BB - call_if_set FLAG_SYS_PC_LANETTE, LittlerootTown_ProfessorBirchsLab_EventScript_2737E6 + call_if_unset FLAG_SYS_PC_LANETTE, EventScript_TransferredSomeonesPC + call_if_set FLAG_SYS_PC_LANETTE, EventScript_TransferredLanettesPC return -LittlerootTown_ProfessorBirchsLab_EventScript_2737BB:: @ 82737BB +EventScript_TransferredSomeonesPC:: @ 82737BB specialvar VAR_RESULT, ShouldShowBoxWasFullMessage compare VAR_RESULT, 1 - goto_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_2737D4 + goto_if_eq EventScript_SomeonesPCBoxFull msgbox gText_PkmnTransferredSomeonesPC, MSGBOX_DEFAULT return -LittlerootTown_ProfessorBirchsLab_EventScript_2737D4:: @ 82737D4 +EventScript_SomeonesPCBoxFull:: @ 82737D4 specialvar VAR_RESULT, GetPCBoxToSendMon bufferboxname 2, VAR_RESULT - msgbox gText_PkmnBoxSomeonesPCFull, MSGBOX_DEFAULT + msgbox gText_PkmnTransferredSomeonesPCBoxFull, MSGBOX_DEFAULT return -LittlerootTown_ProfessorBirchsLab_EventScript_2737E6:: @ 82737E6 +EventScript_TransferredLanettesPC:: @ 82737E6 specialvar VAR_RESULT, ShouldShowBoxWasFullMessage compare VAR_RESULT, 1 - goto_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_2737FF + goto_if_eq EventScript_LanettesPCBoxFull msgbox gText_PkmnTransferredLanettesPC, MSGBOX_DEFAULT return -LittlerootTown_ProfessorBirchsLab_EventScript_2737FF:: @ 82737FF +EventScript_LanettesPCBoxFull:: @ 82737FF specialvar VAR_RESULT, GetPCBoxToSendMon bufferboxname 2, VAR_RESULT - msgbox gText_PkmnBoxLanettesPCFull, MSGBOX_DEFAULT + msgbox gText_PkmnTransferredLanettesPCBoxFull, MSGBOX_DEFAULT return Common_EventScript_NoMoreRoomForPokemon:: @ 8273811 diff --git a/data/text/pc_transfer.inc b/data/text/pc_transfer.inc index 0f0268bb53..216e0b5701 100644 --- a/data/text/pc_transfer.inc +++ b/data/text/pc_transfer.inc @@ -9,13 +9,13 @@ gText_PkmnTransferredLanettesPC:: @ 8273256 .string "It was placed in \n" .string "BOX “{STR_VAR_1}.”$" -gText_PkmnBoxSomeonesPCFull:: @ 8273296 +gText_PkmnTransferredSomeonesPCBoxFull:: @ 8273296 .string "BOX “{STR_VAR_3}” on\n" .string "SOMEONE'S PC was full.\p" .string "{STR_VAR_2} was transferred to\n" .string "BOX “{STR_VAR_1}.”$" -gText_PkmnBoxLanettesPCFull:: @ 82732D9 +gText_PkmnTransferredLanettesPCBoxFull:: @ 82732D9 .string "BOX “{STR_VAR_3}” on\n" .string "LANETTE'S PC was full.\p" .string "{STR_VAR_2} was transferred to\n" diff --git a/include/strings.h b/include/strings.h index 0b678f2f5d..62bc7d5d29 100644 --- a/include/strings.h +++ b/include/strings.h @@ -2035,8 +2035,8 @@ extern const u8 gText_Confusion[]; extern const u8 gText_Love[]; // battle message -extern const u8 gText_PkmnBoxSomeonesPCFull[]; -extern const u8 gText_PkmnBoxLanettesPCFull[]; +extern const u8 gText_PkmnTransferredSomeonesPCBoxFull[]; +extern const u8 gText_PkmnTransferredLanettesPCBoxFull[]; extern const u8 gText_PkmnTransferredSomeonesPC[]; extern const u8 gText_PkmnTransferredLanettesPC[]; diff --git a/src/battle_message.c b/src/battle_message.c index 22cdee0b81..80c6f583b3 100644 --- a/src/battle_message.c +++ b/src/battle_message.c @@ -874,8 +874,8 @@ const u8 * const gBattleStringsTable[BATTLESTRINGS_COUNT] = [STRINGID_FORFEITEDMATCH - 12] = sText_ForfeitedMatch, [STRINGID_PKMNTRANSFERREDSOMEONESPC - 12] = gText_PkmnTransferredSomeonesPC, [STRINGID_PKMNTRANSFERREDLANETTESPC - 12] = gText_PkmnTransferredLanettesPC, - [STRINGID_PKMNBOXSOMEONESPCFULL - 12] = gText_PkmnBoxSomeonesPCFull, - [STRINGID_PKMNBOXLANETTESPCFULL - 12] = gText_PkmnBoxLanettesPCFull, + [STRINGID_PKMNBOXSOMEONESPCFULL - 12] = gText_PkmnTransferredSomeonesPCBoxFull, + [STRINGID_PKMNBOXLANETTESPCFULL - 12] = gText_PkmnTransferredLanettesPCBoxFull, [STRINGID_TRAINER1WINTEXT - 12] = sText_Trainer1WinText, [STRINGID_TRAINER2WINTEXT - 12] = sText_Trainer2WinText, }; diff --git a/src/naming_screen.c b/src/naming_screen.c index cc73031aa3..73eda32c83 100644 --- a/src/naming_screen.c +++ b/src/naming_screen.c @@ -34,10 +34,6 @@ extern u16 gKeyRepeatStartDelay; // extern text extern const u8 gExpandedPlaceholder_Empty[]; -extern const u8 gText_PkmnTransferredSomeonesPC[]; -extern const u8 gText_PkmnTransferredLanettesPC[]; -extern const u8 gText_PkmnBoxSomeonesPCFull[]; -extern const u8 gText_PkmnBoxLanettesPCFull[]; extern const u8 gText_MoveOkBack[]; extern const u8 gText_YourName[]; extern const u8 gText_BoxName[]; @@ -51,12 +47,12 @@ static const u8 gSpriteImage_858BCB8[] = INCBIN_U8("graphics/naming_screen/pc_ic static const u16 gUnknown_0858BD78[] = INCBIN_U16("graphics/naming_screen/0.gbapal"); static const u16 gUnknown_0858BD98[] = INCBIN_U16("graphics/naming_screen/1.gbapal"); -static const u8 *const gUnknown_0858BDB8[] = +static const u8 *const sTransferredToPCMessages[] = { gText_PkmnTransferredSomeonesPC, gText_PkmnTransferredLanettesPC, - gText_PkmnBoxSomeonesPCFull, - gText_PkmnBoxLanettesPCFull + gText_PkmnTransferredSomeonesPCBoxFull, + gText_PkmnTransferredLanettesPCBoxFull }; static const u8 gUnknown_0858BDC8[] = _("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz!"); @@ -562,7 +558,7 @@ static void DisplaySentToPCMessage(void) if (FlagGet(FLAG_SYS_PC_LANETTE)) stringToDisplay++; - StringExpandPlaceholders(gStringVar4, gUnknown_0858BDB8[stringToDisplay]); + StringExpandPlaceholders(gStringVar4, sTransferredToPCMessages[stringToDisplay]); DrawDialogueFrame(0, 0); gTextFlags.canABSpeedUpPrint = TRUE; AddTextPrinterParameterized2(0, 1, gStringVar4, GetPlayerTextSpeedDelay(), 0, 2, 1, 3); From 7d24f2d62c307a1d72b6bb766258fc91d6e79a85 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Tue, 22 Oct 2019 18:15:13 -0400 Subject: [PATCH 24/46] Document record_mix.inc and clean surf.inc --- data/scripts/record_mix.inc | 15 ++++++++------- data/scripts/surf.inc | 12 +++++------- data/text/record_mix.inc | 2 +- 3 files changed, 14 insertions(+), 15 deletions(-) diff --git a/data/scripts/record_mix.inc b/data/scripts/record_mix.inc index 7e9a2de7e6..f70b7f83e8 100644 --- a/data/scripts/record_mix.inc +++ b/data/scripts/record_mix.inc @@ -1,21 +1,22 @@ -EventScript_271D5E:: @ 8271D5E +@ Seems this was superseded by the Record Center, and the below scripts are now unused +EventScript_MixRecordsPrompt:: @ 8271D5E lock faceplayer msgbox Text_WouldYouLikeToMixRecords, MSGBOX_YESNO compare VAR_RESULT, 1 - goto_if_eq EventScript_271D83 + goto_if_eq EventScript_MixRecords compare VAR_RESULT, 0 - goto_if_eq EventScript_271D89 - goto EventScript_271D89 + goto_if_eq EventScript_DeclineMixRecords + goto EventScript_DeclineMixRecords -EventScript_271D83:: @ 8271D83 +EventScript_MixRecords:: @ 8271D83 special RecordMixingPlayerSpotTriggered waitstate lock faceplayer -EventScript_271D89:: @ 8271D89 - message Text_WouldNotLikeToMixRecords +EventScript_DeclineMixRecords:: @ 8271D89 + message Text_WeHopeToSeeYouAgain waitmessage waitbuttonpress release diff --git a/data/scripts/surf.inc b/data/scripts/surf.inc index d89aa98c11..154cc53c23 100644 --- a/data/scripts/surf.inc +++ b/data/scripts/surf.inc @@ -1,18 +1,16 @@ EventScript_UseSurf:: @ 8271EA0 checkpartymove MOVE_SURF - compare VAR_RESULT, 6 - goto_if_eq EventScript_CantSurf + compare VAR_RESULT, PARTY_SIZE + goto_if_eq EventScript_EndUseSurf bufferpartymonnick 0, VAR_RESULT setfieldeffectargument 0, VAR_RESULT lockall msgbox gText_WantToUseSurf, MSGBOX_YESNO compare VAR_RESULT, 0 - goto_if_eq EventScript_CancelSurf + goto_if_eq EventScript_ReleaseUseSurf msgbox gText_PlayerUsedSurf, MSGBOX_DEFAULT dofieldeffect FLDEFF_USE_SURF - -EventScript_CancelSurf:: @ 8271ED5 +EventScript_ReleaseUseSurf:: @ 8271ED5 releaseall - -EventScript_CantSurf:: @ 8271ED6 +EventScript_EndUseSurf:: @ 8271ED6 end diff --git a/data/text/record_mix.inc b/data/text/record_mix.inc index 8f995af1d9..1270c0c0a7 100644 --- a/data/text/record_mix.inc +++ b/data/text/record_mix.inc @@ -2,5 +2,5 @@ Text_WouldYouLikeToMixRecords: @ 827260D .string "Would you like to mix records with\n" .string "other TRAINERS?$" -Text_WouldNotLikeToMixRecords: @ 8272640 +Text_WeHopeToSeeYouAgain: @ 8272640 .string "We hope to see you again!$" From 83d0a87d0ce0b1b4dc38e91cf73ebc4cbd1964c6 Mon Sep 17 00:00:00 2001 From: Marcus Huderle Date: Thu, 24 Oct 2019 20:04:02 -0500 Subject: [PATCH 25/46] Document several route scripts --- data/maps/Route104/scripts.inc | 4 +- .../Route104_PrettyPetalFlowerShop/map.json | 6 +- .../scripts.inc | 70 +++---- data/maps/Route105/map.json | 14 +- data/maps/Route105/scripts.inc | 72 +++---- data/maps/Route106/map.json | 10 +- data/maps/Route106/scripts.inc | 44 ++--- data/maps/Route107/map.json | 14 +- data/maps/Route107/scripts.inc | 56 +++--- data/maps/Route108/map.json | 12 +- data/maps/Route108/scripts.inc | 50 ++--- data/text/berries.inc | 18 +- data/text/trainers.inc | 180 +++++++++--------- 13 files changed, 275 insertions(+), 275 deletions(-) diff --git a/data/maps/Route104/scripts.inc b/data/maps/Route104/scripts.inc index c7a0f97844..0fcf361de2 100644 --- a/data/maps/Route104/scripts.inc +++ b/data/maps/Route104/scripts.inc @@ -379,11 +379,11 @@ Route104_EventScript_1ED0EF:: @ 81ED0EF applymovement 7, Route104_Movement_1ED1C8 applymovement EVENT_OBJ_ID_PLAYER, Route104_Movement_1ED1C8 waitmovement 0 - pokenavcall Route104_Text_1EE336 + pokenavcall Route104_Text_DadPokenavCall waitmessage delay 30 playfanfare MUS_ME_TORE_EYE - msgbox Route104_Text_1EE463, MSGBOX_DEFAULT + msgbox Route104_Text_RegisteredDadInPokenav, MSGBOX_DEFAULT waitfanfare closemessage delay 30 diff --git a/data/maps/Route104_PrettyPetalFlowerShop/map.json b/data/maps/Route104_PrettyPetalFlowerShop/map.json index 9d3d307948..dcda9afeb8 100644 --- a/data/maps/Route104_PrettyPetalFlowerShop/map.json +++ b/data/maps/Route104_PrettyPetalFlowerShop/map.json @@ -24,7 +24,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "Route104_PrettyPetalFlowerShop_EventScript_22A373", + "script": "Route104_PrettyPetalFlowerShop_EventScript_ShopOwner", "flag": "0" }, { @@ -37,7 +37,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "Route104_PrettyPetalFlowerShop_EventScript_22A40C", + "script": "Route104_PrettyPetalFlowerShop_EventScript_WailmerPailGirl", "flag": "0" }, { @@ -50,7 +50,7 @@ "movement_range_y": 2, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "Route104_PrettyPetalFlowerShop_EventScript_22A442", + "script": "Route104_PrettyPetalFlowerShop_EventScript_RandomBerryGirl", "flag": "0" } ], diff --git a/data/maps/Route104_PrettyPetalFlowerShop/scripts.inc b/data/maps/Route104_PrettyPetalFlowerShop/scripts.inc index 0b8d2217f2..dc5bd2ce9e 100644 --- a/data/maps/Route104_PrettyPetalFlowerShop/scripts.inc +++ b/data/maps/Route104_PrettyPetalFlowerShop/scripts.inc @@ -4,48 +4,48 @@ Route104_PrettyPetalFlowerShop_MapScripts:: @ 822A34C Route104_PrettyPetalFlowerShop_OnTransition: @ 822A352 setflag FLAG_LANDMARK_FLOWER_SHOP - goto_if_unset FLAG_MET_PRETTY_PETAL_SHOP_OWNER, Route104_PrettyPetalFlowerShop_EventScript_22A36B - goto_if_unset FLAG_BADGE03_GET, Route104_PrettyPetalFlowerShop_EventScript_22A36B + goto_if_unset FLAG_MET_PRETTY_PETAL_SHOP_OWNER, Route104_PrettyPetalFlowerShop_EventScript_MoveShopOwner + goto_if_unset FLAG_BADGE03_GET, Route104_PrettyPetalFlowerShop_EventScript_MoveShopOwner setflag FLAG_TEMP_1 end -Route104_PrettyPetalFlowerShop_EventScript_22A36B:: @ 822A36B +Route104_PrettyPetalFlowerShop_EventScript_MoveShopOwner:: @ 822A36B setobjectxyperm 1, 4, 6 end -Route104_PrettyPetalFlowerShop_EventScript_22A373:: @ 822A373 +Route104_PrettyPetalFlowerShop_EventScript_ShopOwner:: @ 822A373 lock faceplayer - goto_if_set FLAG_TEMP_1, Route104_PrettyPetalFlowerShop_EventScript_22A3E4 - msgbox Route104_PrettyPetalFlowerShop_Text_2A7686, MSGBOX_DEFAULT - goto_if_set FLAG_MET_PRETTY_PETAL_SHOP_OWNER, Route104_PrettyPetalFlowerShop_EventScript_22A3B2 + goto_if_set FLAG_TEMP_1, Route104_PrettyPetalFlowerShop_EventScript_SellDecorations + msgbox Route104_PrettyPetalFlowerShop_Text_ThisIsPrettyPetalFlowerShop, MSGBOX_DEFAULT + goto_if_set FLAG_MET_PRETTY_PETAL_SHOP_OWNER, Route104_PrettyPetalFlowerShop_EventScript_AlreadyMet setflag FLAG_MET_PRETTY_PETAL_SHOP_OWNER - msgbox Route104_PrettyPetalFlowerShop_Text_2A7706, MSGBOX_YESNO - compare VAR_RESULT, 1 - call_if_eq Route104_PrettyPetalFlowerShop_EventScript_22A3D2 - compare VAR_RESULT, 0 - call_if_eq Route104_PrettyPetalFlowerShop_EventScript_22A3DB + msgbox Route104_PrettyPetalFlowerShop_Text_IntroLearnAboutBerries, MSGBOX_YESNO + compare VAR_RESULT, TRUE + call_if_eq Route104_PrettyPetalFlowerShop_EventScript_ExplainBerries + compare VAR_RESULT, FALSE + call_if_eq Route104_PrettyPetalFlowerShop_EventScript_DontExplainBerries release end -Route104_PrettyPetalFlowerShop_EventScript_22A3B2:: @ 822A3B2 - msgbox Route104_PrettyPetalFlowerShop_Text_2A76D9, MSGBOX_YESNO - compare VAR_RESULT, 1 - call_if_eq Route104_PrettyPetalFlowerShop_EventScript_22A3D2 - compare VAR_RESULT, 0 - call_if_eq Route104_PrettyPetalFlowerShop_EventScript_22A3DB +Route104_PrettyPetalFlowerShop_EventScript_AlreadyMet:: @ 822A3B2 + msgbox Route104_PrettyPetalFlowerShop_Text_LearnAboutBerries, MSGBOX_YESNO + compare VAR_RESULT, TRUE + call_if_eq Route104_PrettyPetalFlowerShop_EventScript_ExplainBerries + compare VAR_RESULT, FALSE + call_if_eq Route104_PrettyPetalFlowerShop_EventScript_DontExplainBerries release end -Route104_PrettyPetalFlowerShop_EventScript_22A3D2:: @ 822A3D2 - msgbox Route104_PrettyPetalFlowerShop_Text_2A775B, MSGBOX_DEFAULT +Route104_PrettyPetalFlowerShop_EventScript_ExplainBerries:: @ 822A3D2 + msgbox Route104_PrettyPetalFlowerShop_Text_BerriesExplanation, MSGBOX_DEFAULT return -Route104_PrettyPetalFlowerShop_EventScript_22A3DB:: @ 822A3DB - msgbox Route104_PrettyPetalFlowerShop_Text_2A78DF, MSGBOX_DEFAULT +Route104_PrettyPetalFlowerShop_EventScript_DontExplainBerries:: @ 822A3DB + msgbox Route104_PrettyPetalFlowerShop_Text_FlowersBringHappiness, MSGBOX_DEFAULT return -Route104_PrettyPetalFlowerShop_EventScript_22A3E4:: @ 822A3E4 +Route104_PrettyPetalFlowerShop_EventScript_SellDecorations:: @ 822A3E4 message gText_PlayerWhatCanIDoForYou waitmessage pokemartdecoration2 Route104_PrettyPetalFlowerShop_Pokemart_Plants @@ -65,39 +65,39 @@ Route104_PrettyPetalFlowerShop_Pokemart_Plants: @ 822A3FC release end -Route104_PrettyPetalFlowerShop_EventScript_22A40C:: @ 822A40C +Route104_PrettyPetalFlowerShop_EventScript_WailmerPailGirl:: @ 822A40C lock faceplayer - goto_if_unset FLAG_RECEIVED_WAILMER_PAIL, Route104_PrettyPetalFlowerShop_EventScript_22A421 - msgbox Route104_PrettyPetalFlowerShop_Text_2A79A6, MSGBOX_DEFAULT + goto_if_unset FLAG_RECEIVED_WAILMER_PAIL, Route104_PrettyPetalFlowerShop_EventScript_GiveWailmerPail + msgbox Route104_PrettyPetalFlowerShop_Text_WailmerPailExplanation, MSGBOX_DEFAULT release end -Route104_PrettyPetalFlowerShop_EventScript_22A421:: @ 822A421 - msgbox Route104_PrettyPetalFlowerShop_Text_2A7916, MSGBOX_DEFAULT +Route104_PrettyPetalFlowerShop_EventScript_GiveWailmerPail:: @ 822A421 + msgbox Route104_PrettyPetalFlowerShop_Text_YouCanHaveThis, MSGBOX_DEFAULT giveitem_std ITEM_WAILMER_PAIL - msgbox Route104_PrettyPetalFlowerShop_Text_2A79A6, MSGBOX_DEFAULT + msgbox Route104_PrettyPetalFlowerShop_Text_WailmerPailExplanation, MSGBOX_DEFAULT setflag FLAG_RECEIVED_WAILMER_PAIL release end -Route104_PrettyPetalFlowerShop_EventScript_22A442:: @ 822A442 +Route104_PrettyPetalFlowerShop_EventScript_RandomBerryGirl:: @ 822A442 lock faceplayer dotimebasedevents - goto_if_set FLAG_DAILY_FLOWER_SHOP_RECEIVED_BERRY, Route104_PrettyPetalFlowerShop_EventScript_22A482 - msgbox Route104_PrettyPetalFlowerShop_Text_2A7A98, MSGBOX_DEFAULT + goto_if_set FLAG_DAILY_FLOWER_SHOP_RECEIVED_BERRY, Route104_PrettyPetalFlowerShop_EventScript_AlreadyReceivedBerry + msgbox Route104_PrettyPetalFlowerShop_Text_ImGrowingFlowers, MSGBOX_DEFAULT random 8 addvar VAR_RESULT, FIRST_BERRY_INDEX giveitem_std VAR_RESULT compare VAR_RESULT, 0 goto_if_eq Common_EventScript_ShowBagIsFull setflag FLAG_DAILY_FLOWER_SHOP_RECEIVED_BERRY - msgbox Route104_PrettyPetalFlowerShop_Text_2A7AF3, MSGBOX_DEFAULT + msgbox Route104_PrettyPetalFlowerShop_Text_MachineMixesBerries, MSGBOX_DEFAULT release end -Route104_PrettyPetalFlowerShop_EventScript_22A482:: @ 822A482 - msgbox Route104_PrettyPetalFlowerShop_Text_2A7AF3, MSGBOX_DEFAULT +Route104_PrettyPetalFlowerShop_EventScript_AlreadyReceivedBerry:: @ 822A482 + msgbox Route104_PrettyPetalFlowerShop_Text_MachineMixesBerries, MSGBOX_DEFAULT release end diff --git a/data/maps/Route105/map.json b/data/maps/Route105/map.json index 4d447d4f81..bb6aadd549 100644 --- a/data/maps/Route105/map.json +++ b/data/maps/Route105/map.json @@ -40,7 +40,7 @@ "movement_range_y": 0, "trainer_type": "1", "trainer_sight_or_berry_tree_id": "6", - "script": "Route105_EventScript_1EE261", + "script": "Route105_EventScript_Luis", "flag": "0" }, { @@ -53,7 +53,7 @@ "movement_range_y": 0, "trainer_type": "1", "trainer_sight_or_berry_tree_id": "3", - "script": "Route105_EventScript_1EE278", + "script": "Route105_EventScript_Dominik", "flag": "0" }, { @@ -66,7 +66,7 @@ "movement_range_y": 7, "trainer_type": "1", "trainer_sight_or_berry_tree_id": "3", - "script": "Route105_EventScript_1EE28F", + "script": "Route105_EventScript_Beverly", "flag": "0" }, { @@ -79,7 +79,7 @@ "movement_range_y": 5, "trainer_type": "1", "trainer_sight_or_berry_tree_id": "3", - "script": "Route105_EventScript_1EE2A6", + "script": "Route105_EventScript_Imani", "flag": "0" }, { @@ -105,7 +105,7 @@ "movement_range_y": 7, "trainer_type": "1", "trainer_sight_or_berry_tree_id": "3", - "script": "Route105_EventScript_1EE24A", + "script": "Route105_EventScript_Foster", "flag": "0" }, { @@ -118,7 +118,7 @@ "movement_range_y": 2, "trainer_type": "1", "trainer_sight_or_berry_tree_id": "2", - "script": "Route105_EventScript_1EE2BD", + "script": "Route105_EventScript_Josue", "flag": "0" }, { @@ -131,7 +131,7 @@ "movement_range_y": 2, "trainer_type": "1", "trainer_sight_or_berry_tree_id": "4", - "script": "Route105_EventScript_1EE2D4", + "script": "Route105_EventScript_Andres", "flag": "0" } ], diff --git a/data/maps/Route105/scripts.inc b/data/maps/Route105/scripts.inc index ff4b3dbe10..1b892642e0 100644 --- a/data/maps/Route105/scripts.inc +++ b/data/maps/Route105/scripts.inc @@ -1,18 +1,18 @@ Route105_MapScripts:: @ 81EE1DB - map_script MAP_SCRIPT_ON_LOAD, Route105_MapScript1_1EE1EB + map_script MAP_SCRIPT_ON_LOAD, Route105_OnLoad map_script MAP_SCRIPT_ON_TRANSITION, Route105_OnTransition - map_script MAP_SCRIPT_ON_FRAME_TABLE, Route105_MapScript2_1EE240 + map_script MAP_SCRIPT_ON_FRAME_TABLE, Route105_OnFrame .byte 0 -Route105_MapScript1_1EE1EB: @ 81EE1EB - call_if_unset FLAG_REGI_DOORS_OPENED, Route105_EventScript_1EE20B +Route105_OnLoad: @ 81EE1EB + call_if_unset FLAG_REGI_DOORS_OPENED, Route105_CloseRegiEntrance compare VAR_UNUSUAL_WEATHER_LOCATION, UNUSUAL_WEATHER_ROUTE_105_NORTH call_if_eq UnusualWeather_EventScript_PlaceTilesRoute105North compare VAR_UNUSUAL_WEATHER_LOCATION, UNUSUAL_WEATHER_ROUTE_105_SOUTH call_if_eq UnusualWeather_EventScript_PlaceTilesRoute105South end -Route105_EventScript_1EE20B:: @ 81EE20B +Route105_CloseRegiEntrance:: @ 81EE20B setmetatile 9, 19, METATILE_General_RockWall_RockBase, 1 setmetatile 9, 20, METATILE_General_RockWall_SandBase, 1 return @@ -26,63 +26,63 @@ Route105_OnTransition: @ 81EE21E call_if_eq UnusualWeather_StartKyogreWeather end -Route105_MapScript2_1EE240: @ 81EE240 +Route105_OnFrame: @ 81EE240 map_script_2 VAR_SHOULD_END_UNUSUAL_WEATHER, 1, UnusualWeather_EventScript_EndEventAndCleanup_1 .2byte 0 -Route105_EventScript_1EE24A:: @ 81EE24A - trainerbattle_single TRAINER_FOSTER, Route105_Text_295D0F, Route105_Text_295D62 - msgbox Route105_Text_295DAB, MSGBOX_AUTOCLOSE +Route105_EventScript_Foster:: @ 81EE24A + trainerbattle_single TRAINER_FOSTER, Route105_Text_FosterIntro, Route105_Text_FosterDefeated + msgbox Route105_Text_FosterPostBattle, MSGBOX_AUTOCLOSE end -Route105_EventScript_1EE261:: @ 81EE261 - trainerbattle_single TRAINER_LUIS, Route105_Text_295DF5, Route105_Text_295E66 - msgbox Route105_Text_295E72, MSGBOX_AUTOCLOSE +Route105_EventScript_Luis:: @ 81EE261 + trainerbattle_single TRAINER_LUIS, Route105_Text_LuisIntro, Route105_Text_LuisDefeated + msgbox Route105_Text_LuisPostBattle, MSGBOX_AUTOCLOSE end -Route105_EventScript_1EE278:: @ 81EE278 - trainerbattle_single TRAINER_DOMINIK, Route105_Text_295EB7, Route105_Text_295EEA - msgbox Route105_Text_295F08, MSGBOX_AUTOCLOSE +Route105_EventScript_Dominik:: @ 81EE278 + trainerbattle_single TRAINER_DOMINIK, Route105_Text_DominikIntro, Route105_Text_DominikDefeated + msgbox Route105_Text_DominikPostBattle, MSGBOX_AUTOCLOSE end -Route105_EventScript_1EE28F:: @ 81EE28F - trainerbattle_single TRAINER_BEVERLY, Route105_Text_295F5C, Route105_Text_295FA0 - msgbox Route105_Text_295FAE, MSGBOX_AUTOCLOSE +Route105_EventScript_Beverly:: @ 81EE28F + trainerbattle_single TRAINER_BEVERLY, Route105_Text_BeverlyIntro, Route105_Text_BeverlyDefeated + msgbox Route105_Text_PostBattle, MSGBOX_AUTOCLOSE end -Route105_EventScript_1EE2A6:: @ 81EE2A6 - trainerbattle_single TRAINER_IMANI, Route105_Text_296025, Route105_Text_296059 - msgbox Route105_Text_296076, MSGBOX_AUTOCLOSE +Route105_EventScript_Imani:: @ 81EE2A6 + trainerbattle_single TRAINER_IMANI, Route105_Text_ImaniIntro, Route105_Text_ImaniDefeated + msgbox Route105_Text_ImaniPostBattle, MSGBOX_AUTOCLOSE end -Route105_EventScript_1EE2BD:: @ 81EE2BD - trainerbattle_single TRAINER_JOSUE, Route105_Text_29626F, Route105_Text_2962CB - msgbox Route105_Text_2962EC, MSGBOX_AUTOCLOSE +Route105_EventScript_Josue:: @ 81EE2BD + trainerbattle_single TRAINER_JOSUE, Route105_Text_JosueIntro, Route105_Text_JosueDefeated + msgbox Route105_Text_JosuePostBattle, MSGBOX_AUTOCLOSE end -Route105_EventScript_1EE2D4:: @ 81EE2D4 - trainerbattle_single TRAINER_ANDRES_1, Route105_Text_2960A9, Route105_Text_2960DB, Route105_EventScript_1EE300 +Route105_EventScript_Andres:: @ 81EE2D4 + trainerbattle_single TRAINER_ANDRES_1, Route105_Text_AndresIntro, Route105_Text_AndresDefeated, Route105_EventScript_AndresRegisterMatchCallAfterBattle specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, 1 - goto_if_eq Route105_EventScript_1EE31F - msgbox Route105_Text_2960FA, MSGBOX_DEFAULT + compare VAR_RESULT, TRUE + goto_if_eq Route105_EventScript_AndresRematch + msgbox Route105_Text_AndresPostBattle, MSGBOX_DEFAULT release end -Route105_EventScript_1EE300:: @ 81EE300 +Route105_EventScript_AndresRegisterMatchCallAfterBattle:: @ 81EE300 special sub_80B4808 waitmovement 0 - msgbox Route105_Text_296159, MSGBOX_DEFAULT + msgbox Route105_Text_AndresRegister, MSGBOX_DEFAULT register_matchcall TRAINER_ANDRES_1 release end -Route105_EventScript_1EE31F:: @ 81EE31F - trainerbattle_rematch TRAINER_ANDRES_1, Route105_Text_29619E, Route105_Text_2961DD - msgbox Route105_Text_2961FE, MSGBOX_AUTOCLOSE +Route105_EventScript_AndresRematch:: @ 81EE31F + trainerbattle_rematch TRAINER_ANDRES_1, Route105_Text_AndresRematchIntro, Route105_Text_AndresRematchDefeated + msgbox Route105_Text_AndresRematchPostBattle, MSGBOX_AUTOCLOSE end -Route104_Text_1EE336: @ 81EE336 +Route104_Text_DadPokenavCall: @ 81EE336 .string "… … … … … …\n" .string "… … … … … Beep!\p" .string "DAD: Oh, {PLAYER}?\p" @@ -98,6 +98,6 @@ Route104_Text_1EE336: @ 81EE336 .string "… … … … … …\n" .string "… … … … … Click!$" -Route104_Text_1EE463: @ 81EE463 +Route104_Text_RegisteredDadInPokenav: @ 81EE463 .string "Registered DAD NORMAN\n" .string "in the POKéNAV.$" diff --git a/data/maps/Route106/map.json b/data/maps/Route106/map.json index 70558d26e6..273f59aa5b 100644 --- a/data/maps/Route106/map.json +++ b/data/maps/Route106/map.json @@ -35,7 +35,7 @@ "movement_range_y": 0, "trainer_type": "1", "trainer_sight_or_berry_tree_id": "3", - "script": "Route106_EventScript_1EE493", + "script": "Route106_EventScript_Douglas", "flag": "0" }, { @@ -48,7 +48,7 @@ "movement_range_y": 0, "trainer_type": "1", "trainer_sight_or_berry_tree_id": "3", - "script": "Route106_EventScript_1EE4AA", + "script": "Route106_EventScript_Kyla", "flag": "0" }, { @@ -61,7 +61,7 @@ "movement_range_y": 0, "trainer_type": "1", "trainer_sight_or_berry_tree_id": "4", - "script": "Route106_EventScript_1EE4C1", + "script": "Route106_EventScript_Elliot", "flag": "0" }, { @@ -74,7 +74,7 @@ "movement_range_y": 0, "trainer_type": "1", "trainer_sight_or_berry_tree_id": "3", - "script": "Route106_EventScript_1EE523", + "script": "Route106_EventScript_Ned", "flag": "0" }, { @@ -132,7 +132,7 @@ "y": 13, "elevation": 3, "player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY", - "script": "Route106_EventScript_1EE48A" + "script": "Route106_EventScript_TrainerTipsSign" } ] } \ No newline at end of file diff --git a/data/maps/Route106/scripts.inc b/data/maps/Route106/scripts.inc index f27ce9647f..eb545cab82 100644 --- a/data/maps/Route106/scripts.inc +++ b/data/maps/Route106/scripts.inc @@ -1,48 +1,48 @@ Route106_MapScripts:: @ 81EE489 .byte 0 -Route106_EventScript_1EE48A:: @ 81EE48A - msgbox Route106_Text_1EE53A, MSGBOX_SIGN +Route106_EventScript_TrainerTipsSign:: @ 81EE48A + msgbox Route106_Text_TrainerTips, MSGBOX_SIGN end -Route106_EventScript_1EE493:: @ 81EE493 - trainerbattle_single TRAINER_DOUGLAS, Route106_Text_2965BB, Route106_Text_2965FD - msgbox Route106_Text_296608, MSGBOX_AUTOCLOSE +Route106_EventScript_Douglas:: @ 81EE493 + trainerbattle_single TRAINER_DOUGLAS, Route106_Text_DouglasIntro, Route106_Text_DouglasDefeated + msgbox Route106_Text_DouglasPostBattle, MSGBOX_AUTOCLOSE end -Route106_EventScript_1EE4AA:: @ 81EE4AA - trainerbattle_single TRAINER_KYLA, Route106_Text_296628, Route106_Text_296674 - msgbox Route106_Text_29669E, MSGBOX_AUTOCLOSE +Route106_EventScript_Kyla:: @ 81EE4AA + trainerbattle_single TRAINER_KYLA, Route106_Text_KylaIntro, Route106_Text_KylaDefeated + msgbox Route106_Text_KylaPostBattle, MSGBOX_AUTOCLOSE end -Route106_EventScript_1EE4C1:: @ 81EE4C1 - trainerbattle_single TRAINER_ELLIOT_1, Route106_Text_296327, Route106_Text_29635C, Route106_EventScript_1EE4ED +Route106_EventScript_Elliot:: @ 81EE4C1 + trainerbattle_single TRAINER_ELLIOT_1, Route106_Text_ElliotIntro, Route106_Text_ElliotDefeated, Route106_EventScript_ElliotRegisterMatchCallAfterBattle specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, 1 - goto_if_eq Route106_EventScript_1EE50C - msgbox Route106_Text_29638C, MSGBOX_DEFAULT + compare VAR_RESULT, TRUE + goto_if_eq Route106_EventScript_ElliotRematch + msgbox Route106_Text_ElliotPostBattle, MSGBOX_DEFAULT release end -Route106_EventScript_1EE4ED:: @ 81EE4ED +Route106_EventScript_ElliotRegisterMatchCallAfterBattle:: @ 81EE4ED special sub_80B4808 waitmovement 0 - msgbox Route106_Text_2963E3, MSGBOX_DEFAULT + msgbox Route106_Text_ElliotRegister, MSGBOX_DEFAULT register_matchcall TRAINER_ELLIOT_1 release end -Route106_EventScript_1EE50C:: @ 81EE50C - trainerbattle_rematch TRAINER_ELLIOT_1, Route106_Text_29642E, Route106_Text_296477 - msgbox Route106_Text_296493, MSGBOX_AUTOCLOSE +Route106_EventScript_ElliotRematch:: @ 81EE50C + trainerbattle_rematch TRAINER_ELLIOT_1, Route106_Text_ElliotRematchIntro, Route106_Text_ElliotRematchDefeated + msgbox Route106_Text_ElliotRematchPostBattle, MSGBOX_AUTOCLOSE end -Route106_EventScript_1EE523:: @ 81EE523 - trainerbattle_single TRAINER_NED, Route106_Text_2964D4, Route106_Text_296553 - msgbox Route106_Text_296588, MSGBOX_AUTOCLOSE +Route106_EventScript_Ned:: @ 81EE523 + trainerbattle_single TRAINER_NED, Route106_Text_NedIntro, Route106_Text_NedDefeated + msgbox Route106_Text_NedPostBattle, MSGBOX_AUTOCLOSE end -Route106_Text_1EE53A: @ 81EE53A +Route106_Text_TrainerTips: @ 81EE53A .string "TRAINER TIPS\p" .string "Advice on catching POKéMON with a ROD:\n" .string "Press the A Button if you get a bite.$" diff --git a/data/maps/Route107/map.json b/data/maps/Route107/map.json index 3813f4795d..b0bb63a14a 100644 --- a/data/maps/Route107/map.json +++ b/data/maps/Route107/map.json @@ -35,7 +35,7 @@ "movement_range_y": 1, "trainer_type": "1", "trainer_sight_or_berry_tree_id": "3", - "script": "Route107_EventScript_1EE595", + "script": "Route107_EventScript_Darrin", "flag": "0" }, { @@ -48,7 +48,7 @@ "movement_range_y": 2, "trainer_type": "1", "trainer_sight_or_berry_tree_id": "2", - "script": "Route107_EventScript_1EE5AC", + "script": "Route107_EventScript_Tony", "flag": "0" }, { @@ -61,7 +61,7 @@ "movement_range_y": 0, "trainer_type": "1", "trainer_sight_or_berry_tree_id": "5", - "script": "Route107_EventScript_1EE60E", + "script": "Route107_EventScript_Denise", "flag": "0" }, { @@ -74,7 +74,7 @@ "movement_range_y": 1, "trainer_type": "1", "trainer_sight_or_berry_tree_id": "5", - "script": "Route107_EventScript_1EE625", + "script": "Route107_EventScript_Beth", "flag": "0" }, { @@ -87,7 +87,7 @@ "movement_range_y": 1, "trainer_type": "1", "trainer_sight_or_berry_tree_id": "1", - "script": "Route107_EventScript_1EE63C", + "script": "Route107_EventScript_Lisa", "flag": "0" }, { @@ -100,7 +100,7 @@ "movement_range_y": 1, "trainer_type": "1", "trainer_sight_or_berry_tree_id": "1", - "script": "Route107_EventScript_1EE657", + "script": "Route107_EventScript_Ray", "flag": "0" }, { @@ -113,7 +113,7 @@ "movement_range_y": 1, "trainer_type": "1", "trainer_sight_or_berry_tree_id": "5", - "script": "Route107_EventScript_1EE672", + "script": "Route107_EventScript_Camron", "flag": "0" } ], diff --git a/data/maps/Route107/scripts.inc b/data/maps/Route107/scripts.inc index 90f67a639a..936634d8dd 100644 --- a/data/maps/Route107/scripts.inc +++ b/data/maps/Route107/scripts.inc @@ -1,55 +1,55 @@ Route107_MapScripts:: @ 81EE594 .byte 0 -Route107_EventScript_1EE595:: @ 81EE595 - trainerbattle_single TRAINER_DARRIN, Route107_Text_2966E5, Route107_Text_29672F - msgbox Route107_Text_29675B, MSGBOX_AUTOCLOSE +Route107_EventScript_Darrin:: @ 81EE595 + trainerbattle_single TRAINER_DARRIN, Route107_Text_DarrinIntro, Route107_Text_DarrinDefeated + msgbox Route107_Text_DarrinPostBattle, MSGBOX_AUTOCLOSE end -Route107_EventScript_1EE5AC:: @ 81EE5AC - trainerbattle_single TRAINER_TONY_1, Route107_Text_2967AD, Route107_Text_2967D8, Route107_EventScript_1EE5D8 +Route107_EventScript_Tony:: @ 81EE5AC + trainerbattle_single TRAINER_TONY_1, Route107_Text_TonyIntro, Route107_Text_TonyDefeated, Route107_EventScript_TonyRegisterMatchCallAfterBattle specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, 1 - goto_if_eq Route107_EventScript_1EE5F7 - msgbox Route107_Text_2967FF, MSGBOX_DEFAULT + compare VAR_RESULT, TRUE + goto_if_eq Route107_EventScript_TonyRematch + msgbox Route107_Text_TonyPostBattle, MSGBOX_DEFAULT release end -Route107_EventScript_1EE5D8:: @ 81EE5D8 +Route107_EventScript_TonyRegisterMatchCallAfterBattle:: @ 81EE5D8 special sub_80B4808 waitmovement 0 - msgbox Route107_Text_29685A, MSGBOX_DEFAULT + msgbox Route107_Text_TonyRegister, MSGBOX_DEFAULT register_matchcall TRAINER_TONY_1 release end -Route107_EventScript_1EE5F7:: @ 81EE5F7 - trainerbattle_rematch TRAINER_TONY_1, Route107_Text_296897, Route107_Text_2968D5 - msgbox Route107_Text_296923, MSGBOX_AUTOCLOSE +Route107_EventScript_TonyRematch:: @ 81EE5F7 + trainerbattle_rematch TRAINER_TONY_1, Route107_Text_TonyRematchIntro, Route107_Text_TonyRematchDefeated + msgbox Route107_Text_TonyRematchPostBattle, MSGBOX_AUTOCLOSE end -Route107_EventScript_1EE60E:: @ 81EE60E - trainerbattle_single TRAINER_DENISE, Route107_Text_296974, Route107_Text_29699E - msgbox Route107_Text_2969AB, MSGBOX_AUTOCLOSE +Route107_EventScript_Denise:: @ 81EE60E + trainerbattle_single TRAINER_DENISE, Route107_Text_DeniseIntro, Route107_Text_DeniseDefeated + msgbox Route107_Text_DenisePostBattle, MSGBOX_AUTOCLOSE end -Route107_EventScript_1EE625:: @ 81EE625 - trainerbattle_single TRAINER_BETH, Route107_Text_2969E4, Route107_Text_296A17 - msgbox Route107_Text_296A35, MSGBOX_AUTOCLOSE +Route107_EventScript_Beth:: @ 81EE625 + trainerbattle_single TRAINER_BETH, Route107_Text_BethIntro, Route107_Text_BethDefeated + msgbox Route107_Text_BethPostBattle, MSGBOX_AUTOCLOSE end -Route107_EventScript_1EE63C:: @ 81EE63C - trainerbattle_double TRAINER_LISA_AND_RAY, Route107_Text_296A77, Route107_Text_296AA7, Route107_Text_296B1E - msgbox Route107_Text_296ADC, MSGBOX_AUTOCLOSE +Route107_EventScript_Lisa:: @ 81EE63C + trainerbattle_double TRAINER_LISA_AND_RAY, Route107_Text_LisaIntro, Route107_Text_LisaDefeated, Route107_Text_LisaNotEnoughPokemon + msgbox Route107_Text_LisaPostBattle, MSGBOX_AUTOCLOSE end -Route107_EventScript_1EE657:: @ 81EE657 - trainerbattle_double TRAINER_LISA_AND_RAY, Route107_Text_296B57, Route107_Text_296BB3, Route107_Text_296C34 - msgbox Route107_Text_296BE1, MSGBOX_AUTOCLOSE +Route107_EventScript_Ray:: @ 81EE657 + trainerbattle_double TRAINER_LISA_AND_RAY, Route107_Text_RayIntro, Route107_Text_RayDefeated, Route107_Text_RayNotEnoughPokemon + msgbox Route107_Text_RayPostBattle, MSGBOX_AUTOCLOSE end -Route107_EventScript_1EE672:: @ 81EE672 - trainerbattle_single TRAINER_CAMRON, Route107_Text_296C6F, Route107_Text_296CAD - msgbox Route107_Text_296CC0, MSGBOX_AUTOCLOSE +Route107_EventScript_Camron:: @ 81EE672 + trainerbattle_single TRAINER_CAMRON, Route107_Text_CamronIntro, Route107_Text_CamronDefeated + msgbox Route107_Text_CamronPostBattle, MSGBOX_AUTOCLOSE end diff --git a/data/maps/Route108/map.json b/data/maps/Route108/map.json index b8b188637d..ecdb81f6f6 100644 --- a/data/maps/Route108/map.json +++ b/data/maps/Route108/map.json @@ -35,7 +35,7 @@ "movement_range_y": 3, "trainer_type": "1", "trainer_sight_or_berry_tree_id": "3", - "script": "Route108_EventScript_1EE68A", + "script": "Route108_EventScript_Jerome", "flag": "0" }, { @@ -48,7 +48,7 @@ "movement_range_y": 1, "trainer_type": "1", "trainer_sight_or_berry_tree_id": "3", - "script": "Route108_EventScript_1EE6B8", + "script": "Route108_EventScript_Tara", "flag": "0" }, { @@ -61,7 +61,7 @@ "movement_range_y": 0, "trainer_type": "1", "trainer_sight_or_berry_tree_id": "3", - "script": "Route108_EventScript_1EE6A1", + "script": "Route108_EventScript_Matthew", "flag": "0" }, { @@ -74,7 +74,7 @@ "movement_range_y": 0, "trainer_type": "1", "trainer_sight_or_berry_tree_id": "3", - "script": "Route108_EventScript_1EE6CF", + "script": "Route108_EventScript_Missy", "flag": "0" }, { @@ -87,7 +87,7 @@ "movement_range_y": 1, "trainer_type": "1", "trainer_sight_or_berry_tree_id": "1", - "script": "Route108_EventScript_1EE6E6", + "script": "Route108_EventScript_Carolina", "flag": "0" }, { @@ -100,7 +100,7 @@ "movement_range_y": 1, "trainer_type": "1", "trainer_sight_or_berry_tree_id": "1", - "script": "Route108_EventScript_1EE6FD", + "script": "Route108_EventScript_Cory", "flag": "0" }, { diff --git a/data/maps/Route108/scripts.inc b/data/maps/Route108/scripts.inc index 15a657a200..4f049f71d6 100644 --- a/data/maps/Route108/scripts.inc +++ b/data/maps/Route108/scripts.inc @@ -1,50 +1,50 @@ Route108_MapScripts:: @ 81EE689 .byte 0 -Route108_EventScript_1EE68A:: @ 81EE68A - trainerbattle_single TRAINER_JEROME, Route108_Text_296D10, Route108_Text_296D3C - msgbox Route108_Text_296D6E, MSGBOX_AUTOCLOSE +Route108_EventScript_Jerome:: @ 81EE68A + trainerbattle_single TRAINER_JEROME, Route108_Text_JeromeIntro, Route108_Text_JeromeDefeated + msgbox Route108_Text_JeromePostBattle, MSGBOX_AUTOCLOSE end -Route108_EventScript_1EE6A1:: @ 81EE6A1 - trainerbattle_single TRAINER_MATTHEW, Route108_Text_296DAF, Route108_Text_296DEA - msgbox Route108_Text_296E03, MSGBOX_AUTOCLOSE +Route108_EventScript_Matthew:: @ 81EE6A1 + trainerbattle_single TRAINER_MATTHEW, Route108_Text_MatthewIntro, Route108_Text_MatthewDefeated + msgbox Route108_Text_MatthewPostBattle, MSGBOX_AUTOCLOSE end -Route108_EventScript_1EE6B8:: @ 81EE6B8 - trainerbattle_single TRAINER_TARA, Route108_Text_296E33, Route108_Text_296E71 - msgbox Route108_Text_296E7A, MSGBOX_AUTOCLOSE +Route108_EventScript_Tara:: @ 81EE6B8 + trainerbattle_single TRAINER_TARA, Route108_Text_TaraIntro, Route108_Text_TaraDefeated + msgbox Route108_Text_TaraPostBattle, MSGBOX_AUTOCLOSE end -Route108_EventScript_1EE6CF:: @ 81EE6CF - trainerbattle_single TRAINER_MISSY, Route108_Text_296EC7, Route108_Text_296EFC - msgbox Route108_Text_296F2A, MSGBOX_AUTOCLOSE +Route108_EventScript_Missy:: @ 81EE6CF + trainerbattle_single TRAINER_MISSY, Route108_Text_MissyIntro, Route108_Text_MissyDefeated + msgbox Route108_Text_MissyPostBattle, MSGBOX_AUTOCLOSE end -Route108_EventScript_1EE6E6:: @ 81EE6E6 - trainerbattle_single TRAINER_CAROLINA, Route108_Text_297094, Route108_Text_2970D7 - msgbox Route108_Text_2970F0, MSGBOX_AUTOCLOSE +Route108_EventScript_Carolina:: @ 81EE6E6 + trainerbattle_single TRAINER_CAROLINA, Route108_Text_CarolinaIntro, Route108_Text_CarolinaDefeated + msgbox Route108_Text_CarolinaPostBattle, MSGBOX_AUTOCLOSE end -Route108_EventScript_1EE6FD:: @ 81EE6FD - trainerbattle_single TRAINER_CORY_1, Route108_Text_296F5D, Route108_Text_296F93, Route108_EventScript_1EE729 +Route108_EventScript_Cory:: @ 81EE6FD + trainerbattle_single TRAINER_CORY_1, Route108_Text_CoryIntro, Route108_Text_CoryDefeated, Route108_EventScript_CoryRegisterMatchCallAfterBattle specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, 1 - goto_if_eq Route108_EventScript_1EE748 - msgbox Route108_Text_296FB0, MSGBOX_DEFAULT + compare VAR_RESULT, TRUE + goto_if_eq Route108_EventScript_CoryRematch + msgbox Route108_Text_CoryPostBattle, MSGBOX_DEFAULT release end -Route108_EventScript_1EE729:: @ 81EE729 +Route108_EventScript_CoryRegisterMatchCallAfterBattle:: @ 81EE729 special sub_80B4808 waitmovement 0 - msgbox Route108_Text_296FD8, MSGBOX_DEFAULT + msgbox Route108_Text_CoryRegister, MSGBOX_DEFAULT register_matchcall TRAINER_CORY_1 release end -Route108_EventScript_1EE748:: @ 81EE748 - trainerbattle_rematch TRAINER_CORY_1, Route108_Text_297011, Route108_Text_297036 - msgbox Route108_Text_297059, MSGBOX_AUTOCLOSE +Route108_EventScript_CoryRematch:: @ 81EE748 + trainerbattle_rematch TRAINER_CORY_1, Route108_Text_CoryRematchIntro, Route108_Text_CoryRematchDefeated + msgbox Route108_Text_CoryRematchPostBattle, MSGBOX_AUTOCLOSE end diff --git a/data/text/berries.inc b/data/text/berries.inc index ca9481f527..390812e966 100644 --- a/data/text/berries.inc +++ b/data/text/berries.inc @@ -134,23 +134,23 @@ Route123_BerryMastersHouse_Text_2A761B: @ 82A761B Route123_BerryMastersHouse_Text_2A7682: @ 82A7682 .string "Ah…$" -Route104_PrettyPetalFlowerShop_Text_2A7686: @ 82A7686 +Route104_PrettyPetalFlowerShop_Text_ThisIsPrettyPetalFlowerShop: @ 82A7686 .string "Hello!\p" .string "This is the PRETTY PETAL flower shop.\n" .string "Spreading flowers all over the world!$" -Route104_PrettyPetalFlowerShop_Text_2A76D9: @ 82A76D9 +Route104_PrettyPetalFlowerShop_Text_LearnAboutBerries: @ 82A76D9 .string "{PLAYER}{KUN}, would you like to learn about\n" .string "BERRIES?$" -Route104_PrettyPetalFlowerShop_Text_2A7706: @ 82A7706 +Route104_PrettyPetalFlowerShop_Text_IntroLearnAboutBerries: @ 82A7706 .string "Your name is?\p" .string "{PLAYER}{KUN}.\n" .string "That's a nice name.\p" .string "{PLAYER}{KUN}, would you like to learn about\n" .string "BERRIES?$" -Route104_PrettyPetalFlowerShop_Text_2A775B: @ 82A775B +Route104_PrettyPetalFlowerShop_Text_BerriesExplanation: @ 82A775B .string "BERRIES grow on trees that thrive\n" .string "only in soft, loamy soil.\p" .string "If you take some BERRIES, be sure to\n" @@ -164,18 +164,18 @@ Route104_PrettyPetalFlowerShop_Text_2A775B: @ 82A775B .string "Please help me, {PLAYER}{KUN}. Plant BERRIES\n" .string "and bring more flowers into the world.$" -Route104_PrettyPetalFlowerShop_Text_2A78DF: @ 82A78DF +Route104_PrettyPetalFlowerShop_Text_FlowersBringHappiness: @ 82A78DF .string "Flowers bring so much happiness to\n" .string "people, don't they?$" -Route104_PrettyPetalFlowerShop_Text_2A7916: @ 82A7916 +Route104_PrettyPetalFlowerShop_Text_YouCanHaveThis: @ 82A7916 .string "Hello!\p" .string "The more attention you give to flowers,\n" .string "the more beautifully they bloom.\p" .string "You'll like tending flowers. I'm sure\n" .string "of it. You can have this.$" -Route104_PrettyPetalFlowerShop_Text_2A79A6: @ 82A79A6 +Route104_PrettyPetalFlowerShop_Text_WailmerPailExplanation: @ 82A79A6 .string "While BERRY plants are growing,\n" .string "water them with the WAILMER PAIL.\p" .string "Oh, another thing.\p" @@ -185,13 +185,13 @@ Route104_PrettyPetalFlowerShop_Text_2A79A6: @ 82A79A6 .string "Isn't that awesome?\n" .string "It's like they have the will to live.$" -Route104_PrettyPetalFlowerShop_Text_2A7A98: @ 82A7A98 +Route104_PrettyPetalFlowerShop_Text_ImGrowingFlowers: @ 82A7A98 .string "I'm trying to be like my big sisters.\n" .string "I'm growing flowers, too!\p" .string "Here you go!\n" .string "It's for you!$" -Route104_PrettyPetalFlowerShop_Text_2A7AF3: @ 82A7AF3 +Route104_PrettyPetalFlowerShop_Text_MachineMixesBerries: @ 82A7AF3 .string "You can plant a BERRY and grow it big,\n" .string "or you can make a POKéMON hold it.\p" .string "But now they have a machine that mixes\n" diff --git a/data/text/trainers.inc b/data/text/trainers.inc index e96c3d1355..b9cabdfe79 100644 --- a/data/text/trainers.inc +++ b/data/text/trainers.inc @@ -427,375 +427,375 @@ Route104_Text_295CD3: @ 8295CD3 .string "Hey, MAGIKARP, you sure don't live up\n" .string "to your name, do you?$" -Route105_Text_295D0F: @ 8295D0F +Route105_Text_FosterIntro: @ 8295D0F .string "There's supposed to be a mystical\n" .string "rock around here.\l" .string "Do you know anything about it?$" -Route105_Text_295D62: @ 8295D62 +Route105_Text_FosterDefeated: @ 8295D62 .string "I was thinking too much about that\n" .string "rock, while my POKéMON remained weak…$" -Route105_Text_295DAB: @ 8295DAB +Route105_Text_FosterPostBattle: @ 8295DAB .string "I can spend hours and hours staring\n" .string "at a nice rock without growing bored.$" -Route105_Text_295DF5: @ 8295DF5 +Route105_Text_LuisIntro: @ 8295DF5 .string "Whew! I was worried that a kid was\n" .string "drowning when I saw you.\p" .string "You seem to be okay, so what do you\n" .string "say to a battle?$" -Route105_Text_295E66: @ 8295E66 +Route105_Text_LuisDefeated: @ 8295E66 .string "Glub… Glub…$" -Route105_Text_295E72: @ 8295E72 +Route105_Text_LuisPostBattle: @ 8295E72 .string "If you are drowning, the signal is to\n" .string "wave one arm toward the beach.$" -Route105_Text_295EB7: @ 8295EB7 +Route105_Text_DominikIntro: @ 8295EB7 .string "Swimming the deep blue sea…\n" .string "It feels the greatest!$" -Route105_Text_295EEA: @ 8295EEA +Route105_Text_DominikDefeated: @ 8295EEA .string "I lost…\n" .string "Now I'm feeling blue…$" -Route105_Text_295F08: @ 8295F08 +Route105_Text_DominikPostBattle: @ 8295F08 .string "Why is the sea blue?\p" .string "I learned about that at the MUSEUM in\n" .string "SLATEPORT, but I forgot.$" -Route105_Text_295F5C: @ 8295F5C +Route105_Text_BeverlyIntro: @ 8295F5C .string "My body feels lighter in the water.\n" .string "It's as if I've gotten slimmer!$" -Route105_Text_295FA0: @ 8295FA0 +Route105_Text_BeverlyDefeated: @ 8295FA0 .string "I'm floating…$" -Route105_Text_295FAE: @ 8295FAE +Route105_Text_PostBattle: @ 8295FAE .string "Your body weight is reduced to just\n" .string "one tenth in the water.\p" .string "That would make me…\n" .string "Whoops! I'm not telling you my weight!$" -Route105_Text_296025: @ 8296025 +Route105_Text_ImaniIntro: @ 8296025 .string "The blue, blue sky…\n" .string "The vast sea…\l" .string "It's so peaceful…$" -Route105_Text_296059: @ 8296059 +Route105_Text_ImaniDefeated: @ 8296059 .string "I lost while I was lounging!$" -Route105_Text_296076: @ 8296076 +Route105_Text_ImaniPostBattle: @ 8296076 .string "I want to be told I'm relaxing to be\n" .string "with. Giggle.$" -Route105_Text_2960A9: @ 82960A9 +Route105_Text_AndresIntro: @ 82960A9 .string "I'm convinced that the sea keeps\n" .string "secrets from us.$" -Route105_Text_2960DB: @ 82960DB +Route105_Text_AndresDefeated: @ 82960DB .string "Yes…\n" .string "I am no good at battling…$" -Route105_Text_2960FA: @ 82960FA +Route105_Text_AndresPostBattle: @ 82960FA .string "I'm sure there are many secrets to be\n" .string "discovered in the world's seas.\p" .string "I mean to find them all!$" -Route105_Text_296159: @ 8296159 +Route105_Text_AndresRegister: @ 8296159 .string "Huh? I'm so weak, but you're willing\n" .string "to register me in your POKéNAV?$" -Route105_Text_29619E: @ 829619E +Route105_Text_AndresRematchIntro: @ 829619E .string "I've told you that I'm weak…\n" .string "Are you sure you want to do this?$" -Route105_Text_2961DD: @ 82961DD +Route105_Text_AndresRematchDefeated: @ 82961DD .string "Yes…\n" .string "I didn't think I could win.$" -Route105_Text_2961FE: @ 82961FE +Route105_Text_AndresRematchPostBattle: @ 82961FE .string "I may be weak at battling, but my\n" .string "drive to explore can't be bested.\p" .string "I will travel the seas all around\n" .string "the world!$" -Route105_Text_29626F: @ 829626F +Route105_Text_JosueIntro: @ 829626F .string "I'm exhausted from swimming.\n" .string "I'm just not used to it.\p" .string "I need a battle for a change of pace!$" -Route105_Text_2962CB: @ 82962CB +Route105_Text_JosueDefeated: @ 82962CB .string "I lost because I battled at sea.$" -Route105_Text_2962EC: @ 82962EC +Route105_Text_JosuePostBattle: @ 82962EC .string "Yeah, for me, the sky is a much better\n" .string "match than the sea.$" -Route106_Text_296327: @ 8296327 +Route106_Text_ElliotIntro: @ 8296327 .string "Which do you prefer, fishing in the\n" .string "sea or a stream?$" -Route106_Text_29635C: @ 829635C +Route106_Text_ElliotDefeated: @ 829635C .string "Like in deep-sea fishing, I lost\n" .string "spectacularly!$" -Route106_Text_29638C: @ 829638C +Route106_Text_ElliotPostBattle: @ 829638C .string "Fishing is the greatest whether it's\n" .string "in the sea or a stream.\l" .string "You agree with me, right?$" -Route106_Text_2963E3: @ 82963E3 +Route106_Text_ElliotRegister: @ 82963E3 .string "Fishing's great, but so is battling.\n" .string "If you don't mind, can we meet again?$" -Route106_Text_29642E: @ 829642E +Route106_Text_ElliotRematchIntro: @ 829642E .string "I caught a bunch of POKéMON fishing.\n" .string "I'll show you an impressive battle!$" -Route106_Text_296477: @ 8296477 +Route106_Text_ElliotRematchDefeated: @ 8296477 .string "I lost again spectacularly!$" -Route106_Text_296493: @ 8296493 +Route106_Text_ElliotRematchPostBattle: @ 8296493 .string "Win or lose, POKéMON are the greatest!\n" .string "You agree with me, right?$" -Route106_Text_2964D4: @ 82964D4 +Route106_Text_NedIntro: @ 82964D4 .string "What do people do if they need to go\n" .string "to a washroom?\p" .string "What if my ROD hooks a big one while\n" .string "I'm in the washroom? I just can't go…$" -Route106_Text_296553: @ 8296553 +Route106_Text_NedDefeated: @ 8296553 .string "I lost because I'm trying to not go\n" .string "to the washroom…$" -Route106_Text_296588: @ 8296588 +Route106_Text_NedPostBattle: @ 8296588 .string "Oh, no! I've got this feeling I'll hook\n" .string "a big one!$" -Route106_Text_2965BB: @ 82965BB +Route106_Text_DouglasIntro: @ 82965BB .string "Hahahah! I'm a lousy runner, but in\n" .string "the water you can't catch me!$" -Route106_Text_2965FD: @ 82965FD +Route106_Text_DouglasDefeated: @ 82965FD .string "I give up!$" -Route106_Text_296608: @ 8296608 +Route106_Text_DouglasPostBattle: @ 8296608 .string "I wouldn't lose in a swim race…$" -Route106_Text_296628: @ 8296628 +Route106_Text_KylaIntro: @ 8296628 .string "The sea is my backyard. I'm not going\n" .string "to take it easy because you're a kid!$" -Route106_Text_296674: @ 8296674 +Route106_Text_KylaDefeated: @ 8296674 .string "Did you take it easy on me by any\n" .string "chance?$" -Route106_Text_29669E: @ 829669E +Route106_Text_KylaPostBattle: @ 829669E .string "Drifting along with the waves…\n" .string "I love it! Why don't you give it a try?$" -Route107_Text_2966E5: @ 82966E5 +Route107_Text_DarrinIntro: @ 82966E5 .string "Yawn…\p" .string "I must have drifted off to sleep while\n" .string "I was drifting in the waves.$" -Route107_Text_29672F: @ 829672F +Route107_Text_DarrinDefeated: @ 829672F .string "Ahaha, I lost…\n" .string "I'll take a snooze, I think…$" -Route107_Text_29675B: @ 829675B +Route107_Text_DarrinPostBattle: @ 829675B .string "Floating and being rocked by\n" .string "the waves--it's like sleeping in\l" .string "a plush, comfy bed.$" -Route107_Text_2967AD: @ 82967AD +Route107_Text_TonyIntro: @ 82967AD .string "The sea is like my backyard.\n" .string "Let's battle!$" -Route107_Text_2967D8: @ 82967D8 +Route107_Text_TonyDefeated: @ 82967D8 .string "I lost on my home field…\n" .string "I'm in shock!$" -Route107_Text_2967FF: @ 82967FF +Route107_Text_TonyPostBattle: @ 82967FF .string "I swim the seas with a heart full of\n" .string "dreams…\p" .string "It's a song!\n" .string "Anyways, I'm swimming some more.$" -Route107_Text_29685A: @ 829685A +Route107_Text_TonyRegister: @ 829685A .string "You've shocked me to the bone!\n" .string "Well, so you won't forget me…$" -Route107_Text_296897: @ 8296897 +Route107_Text_TonyRematchIntro: @ 8296897 .string "Swimming in the big, wide sea,\n" .string "my POKéMON has grown stronger!$" -Route107_Text_2968D5: @ 82968D5 +Route107_Text_TonyRematchDefeated: @ 82968D5 .string "What a shock!\p" .string "My POKéMON has gotten stronger, but\n" .string "I stayed weak as a TRAINER!$" -Route107_Text_296923: @ 8296923 +Route107_Text_TonyRematchPostBattle: @ 8296923 .string "What you learn in battle makes you\n" .string "a stronger TRAINER.\l" .string "The waves taught me that.$" -Route107_Text_296974: @ 8296974 +Route107_Text_DeniseIntro: @ 8296974 .string "Do you know a little town called\n" .string "DEWFORD?$" -Route107_Text_29699E: @ 829699E +Route107_Text_DeniseDefeated: @ 829699E .string "I hate this!$" -Route107_Text_2969AB: @ 82969AB +Route107_Text_DenisePostBattle: @ 82969AB .string "A weird saying is getting really\n" .string "trendy at DEWFORD HALL.$" -Route107_Text_2969E4: @ 82969E4 +Route107_Text_BethIntro: @ 82969E4 .string "Did you want to battle me?\n" .string "Sure, I'll go with you!$" -Route107_Text_296A17: @ 8296A17 +Route107_Text_BethDefeated: @ 8296A17 .string "I wasn't good enough for you.$" -Route107_Text_296A35: @ 8296A35 +Route107_Text_BethPostBattle: @ 8296A35 .string "I think you're going to keep getting\n" .string "better. I'll go for it, too!$" -Route107_Text_296A77: @ 8296A77 +Route107_Text_LisaIntro: @ 8296A77 .string "LISA: We challenge you as a sister\n" .string "and brother!$" -Route107_Text_296AA7: @ 8296AA7 +Route107_Text_LisaDefeated: @ 8296AA7 .string "LISA: Awesome.\n" .string "You're in a different class of tough.$" -Route107_Text_296ADC: @ 8296ADC +Route107_Text_LisaPostBattle: @ 8296ADC .string "LISA: Do you have any friends who\n" .string "would go to the beach with you?$" -Route107_Text_296B1E: @ 8296B1E +Route107_Text_LisaNotEnoughPokemon: @ 8296B1E .string "LISA: If you want to battle with us,\n" .string "bring more POKéMON.$" -Route107_Text_296B57: @ 8296B57 +Route107_Text_RayIntro: @ 8296B57 .string "RAY: We always battle POKéMON,\n" .string "me and my sister.\p" .string "I always lose, but we can beat you\n" .string "2-on-2!$" -Route107_Text_296BB3: @ 8296BB3 +Route107_Text_RayDefeated: @ 8296BB3 .string "RAY: Wowee, you're at a higher level\n" .string "than us!$" -Route107_Text_296BE1: @ 8296BE1 +Route107_Text_RayPostBattle: @ 8296BE1 .string "RAY: My sister gave me my POKéMON.\n" .string "I raised it, and now it's my important\l" .string "partner!$" -Route107_Text_296C34: @ 8296C34 +Route107_Text_RayNotEnoughPokemon: @ 8296C34 .string "RAY: If you want to battle us,\n" .string "go bring some more POKéMON!$" -Route107_Text_296C6F: @ 8296C6F +Route107_Text_CamronIntro: @ 8296C6F .string "I'm in the middle of a triathlon,\n" .string "but I'm nowhere near tired!$" -Route107_Text_296CAD: @ 8296CAD +Route107_Text_CamronDefeated: @ 8296CAD .string "That exhausted me…$" -Route107_Text_296CC0: @ 8296CC0 +Route107_Text_CamronPostBattle: @ 8296CC0 .string "I still have swimming and running left\n" .string "to do after this.\p" .string "Am I going to be okay?$" -Route108_Text_296D10: @ 8296D10 +Route108_Text_JeromeIntro: @ 8296D10 .string "My dream is to swim the world's seven\n" .string "seas!$" -Route108_Text_296D3C: @ 8296D3C +Route108_Text_JeromeDefeated: @ 8296D3C .string "I won't be able to swim the seven seas\n" .string "like this…$" -Route108_Text_296D6E: @ 8296D6E +Route108_Text_JeromePostBattle: @ 8296D6E .string "Playing with marine POKéMON is one of\n" .string "the pleasures of swimming!$" -Route108_Text_296DAF: @ 8296DAF +Route108_Text_MatthewIntro: @ 8296DAF .string "Ahoy, there! Are you going out to\n" .string "the ABANDONED SHIP, too?$" -Route108_Text_296DEA: @ 8296DEA +Route108_Text_MatthewDefeated: @ 8296DEA .string "I'm sinking!\n" .string "Glub… Glub…$" -Route108_Text_296E03: @ 8296E03 +Route108_Text_MatthewPostBattle: @ 8296E03 .string "Some people even go inside that\n" .string "ABANDONED SHIP.$" -Route108_Text_296E33: @ 8296E33 +Route108_Text_TaraIntro: @ 8296E33 .string "My liar of a boyfriend told me that\n" .string "I look great in a bikini…$" -Route108_Text_296E71: @ 8296E71 +Route108_Text_TaraDefeated: @ 8296E71 .string "Oh, boo!$" -Route108_Text_296E7A: @ 8296E7A +Route108_Text_TaraPostBattle: @ 8296E7A .string "Even if it's a lie, I love being told\n" .string "I look great…\l" .string "We girls are so complex…$" -Route108_Text_296EC7: @ 8296EC7 +Route108_Text_MissyIntro: @ 8296EC7 .string "I love the sea!\n" .string "I forget all my worries when I swim!$" -Route108_Text_296EFC: @ 8296EFC +Route108_Text_MissyDefeated: @ 8296EFC .string "When I lose a battle, I get all\n" .string "stressed out!$" -Route108_Text_296F2A: @ 8296F2A +Route108_Text_MissyPostBattle: @ 8296F2A .string "Work off your stress by swimming!\n" .string "It's so healthy!$" -Route108_Text_296F5D: @ 8296F5D +Route108_Text_CoryIntro: @ 8296F5D .string "I love WATER-type POKéMON.\n" .string "I love other POKéMON, too!$" -Route108_Text_296F93: @ 8296F93 +Route108_Text_CoryDefeated: @ 8296F93 .string "Waaah! I lost!\n" .string "Waaah! Waaah!$" -Route108_Text_296FB0: @ 8296FB0 +Route108_Text_CoryPostBattle: @ 8296FB0 .string "Shouting is good for me!\n" .string "It uplifts me!$" -Route108_Text_296FD8: @ 8296FD8 +Route108_Text_CoryRegister: @ 8296FD8 .string "I love tough TRAINERS, too!\n" .string "Register me in your POKéNAV!$" -Route108_Text_297011: @ 8297011 +Route108_Text_CoryRematchIntro: @ 8297011 .string "Win or lose, I love battling at sea!$" -Route108_Text_297036: @ 8297036 +Route108_Text_CoryRematchDefeated: @ 8297036 .string "Waaah! I lost again!\n" .string "Waaah! Waaah!$" -Route108_Text_297059: @ 8297059 +Route108_Text_CoryRematchPostBattle: @ 8297059 .string "If you're faced with a challenge,\n" .string "try shouting at the sea!$" -Route108_Text_297094: @ 8297094 +Route108_Text_CarolinaIntro: @ 8297094 .string "I take huge pride in my POKéMON.\n" .string "We'll show you one speedy battle!$" -Route108_Text_2970D7: @ 82970D7 +Route108_Text_CarolinaDefeated: @ 82970D7 .string "That wasn't cute at all.$" -Route108_Text_2970F0: @ 82970F0 +Route108_Text_CarolinaPostBattle: @ 82970F0 .string "Since I'm at sea like this, I wouldn't\n" .string "mind putting on a pink, frilly swimsuit…$" From 6db014cc32d28a64499af7d605be3a062560d5e0 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Thu, 17 Oct 2019 19:22:03 -0400 Subject: [PATCH 26/46] Document party_menu first pass --- common_syms/party_menu.txt | 2 +- data/event_scripts.s | 4 +- .../scripts.inc | 16 +- data/maps/BattleFrontier_Lounge1/scripts.inc | 2 +- data/maps/BattleFrontier_Lounge5/scripts.inc | 2 +- data/maps/BattleFrontier_Lounge6/scripts.inc | 2 +- data/maps/BattleFrontier_Lounge7/scripts.inc | 2 +- data/maps/FallarborTown/map.json | 4 +- .../map.json | 10 +- .../FallarborTown_CozmosHouse/scripts.inc | 121 + data/maps/FallarborTown_House1/scripts.inc | 121 - data/maps/FallarborTown_House2/scripts.inc | 102 - .../map.json | 6 +- .../scripts.inc | 102 + data/maps/FortreeCity_House1/scripts.inc | 2 +- .../LilycoveCity_MoveDeletersHouse/map.json | 2 +- .../scripts.inc | 92 +- data/maps/MtChimney/scripts.inc | 2 +- data/maps/PacifidlogTown_House3/scripts.inc | 2 +- data/maps/RustboroCity_House1/scripts.inc | 2 +- data/maps/SlateportCity_House1/scripts.inc | 2 +- .../scripts.inc | 4 +- data/maps/map_groups.json | 4 +- data/scripts/cable_club.inc | 4 +- data/scripts/move_tutors.inc | 2 +- data/scripts/new_game.inc | 2 +- data/specials.inc | 24 +- ...{party_menu_misc.bin => party_menu_bg.bin} | Bin ...{party_menu_misc.pal => party_menu_bg.pal} | 0 ...{party_menu_misc.png => party_menu_bg.png} | Bin graphics_file_rules.mk | 2 +- include/battle_controllers.h | 4 +- include/battle_main.h | 4 +- include/battle_pyramid_bag.h | 6 +- include/constants/battle_frontier.h | 19 +- include/constants/contest.h | 6 + include/constants/flags.h | 4 +- include/constants/map_groups.h | 4 +- include/constants/party_menu.h | 94 +- include/constants/pokemon.h | 4 +- include/constants/trade.h | 6 +- include/contest.h | 2 +- include/field_effect.h | 2 +- include/fldeff.h | 4 +- include/graphics.h | 6 +- include/menu.h | 3 +- include/menu_helpers.h | 7 +- include/party_menu.h | 108 +- include/pokemon.h | 1 - include/pokemon_summary_screen.h | 3 +- include/region_map.h | 2 +- include/script_pokemon_81B9.h | 6 - include/strings.h | 4 +- include/trade.h | 2 +- src/battle_controller_player.c | 23 +- src/battle_controllers.c | 8 +- src/battle_dome.c | 2 +- src/battle_gfx_sfx_util.c | 4 +- src/battle_main.c | 101 +- src/battle_pike.c | 11 +- src/battle_pyramid_bag.c | 27 +- src/battle_script_commands.c | 33 +- src/battle_tower.c | 2 +- src/battle_util2.c | 10 +- src/contest.c | 19 +- src/contest_link_80F57C4.c | 8 +- src/daycare.c | 15 +- src/evolution_scene.c | 18 +- src/field_effect.c | 8 +- src/field_poison.c | 5 +- src/field_specials.c | 1 + src/fldeff_softboiled.c | 90 +- src/frontier_util.c | 2 +- src/graphics.c | 6 +- src/item.c | 8 +- src/item_menu.c | 19 +- src/item_use.c | 69 +- src/mail_data.c | 2 +- src/menu.c | 20 +- src/menu_helpers.c | 12 +- src/move_relearner.c | 4 +- src/party_menu.c | 4365 +++++++++-------- src/player_pc.c | 2 +- src/pokeblock.c | 2 +- src/pokemon.c | 17 +- src/pokemon_summary_screen.c | 27 +- src/region_map.c | 17 +- src/scrcmd.c | 3 +- src/script_pokemon_util_80F87D8.c | 2 +- src/strings.c | 4 +- src/trade.c | 16 +- src/union_room.c | 9 +- 92 files changed, 3119 insertions(+), 2815 deletions(-) rename data/maps/{FallarborTown_House1 => FallarborTown_CozmosHouse}/map.json (83%) create mode 100644 data/maps/FallarborTown_CozmosHouse/scripts.inc delete mode 100644 data/maps/FallarborTown_House1/scripts.inc delete mode 100644 data/maps/FallarborTown_House2/scripts.inc rename data/maps/{FallarborTown_House2 => FallarborTown_MoveRelearnersHouse}/map.json (85%) create mode 100644 data/maps/FallarborTown_MoveRelearnersHouse/scripts.inc rename graphics/interface/{party_menu_misc.bin => party_menu_bg.bin} (100%) rename graphics/interface/{party_menu_misc.pal => party_menu_bg.pal} (100%) rename graphics/interface/{party_menu_misc.png => party_menu_bg.png} (100%) delete mode 100644 include/script_pokemon_81B9.h diff --git a/common_syms/party_menu.txt b/common_syms/party_menu.txt index 53e72fa531..6ed37392c2 100644 --- a/common_syms/party_menu.txt +++ b/common_syms/party_menu.txt @@ -1 +1 @@ -gUnknown_03006328 +gItemUseCB diff --git a/data/event_scripts.s b/data/event_scripts.s index a8ab739686..e6a6397d4b 100644 --- a/data/event_scripts.s +++ b/data/event_scripts.s @@ -173,8 +173,8 @@ gStdScripts_End:: @ 81DC2CC .include "data/maps/FallarborTown_BattleTentBattleRoom/scripts.inc" .include "data/maps/FallarborTown_PokemonCenter_1F/scripts.inc" .include "data/maps/FallarborTown_PokemonCenter_2F/scripts.inc" - .include "data/maps/FallarborTown_House1/scripts.inc" - .include "data/maps/FallarborTown_House2/scripts.inc" + .include "data/maps/FallarborTown_CozmosHouse/scripts.inc" + .include "data/maps/FallarborTown_MoveRelearnersHouse/scripts.inc" .include "data/maps/VerdanturfTown_BattleTentLobby/scripts.inc" .include "data/maps/VerdanturfTown_BattleTentCorridor/scripts.inc" .include "data/maps/VerdanturfTown_BattleTentBattleRoom/scripts.inc" diff --git a/data/maps/BattleFrontier_BattlePyramidLobby/scripts.inc b/data/maps/BattleFrontier_BattlePyramidLobby/scripts.inc index 72abed5efa..2cf5608399 100644 --- a/data/maps/BattleFrontier_BattlePyramidLobby/scripts.inc +++ b/data/maps/BattleFrontier_BattlePyramidLobby/scripts.inc @@ -61,10 +61,10 @@ BattleFrontier_BattlePyramidLobby_EventScript_2507D2:: @ 82507D2 msgbox BattleFrontier_BattlePyramidLobby_Text_2525F4, MSGBOX_DEFAULT BattleFrontier_BattlePyramidLobby_EventScript_2507DA:: @ 82507DA - special sub_81B95E0 - compare VAR_RESULT, 1 + special DoBattlePyramidMonsHaveHeldItem + compare VAR_RESULT, TRUE call_if_eq BattleFrontier_BattlePyramidLobby_EventScript_250DDB - clearflag FLAG_SPECIAL_FLAG_0x4004 + clearflag FLAG_STORING_ITEMS_IN_PYRAMID_BAG setvar VAR_0x8004, 8 special CallFrontierUtilFunc special LoadPlayerParty @@ -494,8 +494,8 @@ BattleFrontier_BattlePyramidLobby_Movement_250DD8: @ 8250DD8 BattleFrontier_BattlePyramidLobby_EventScript_250DDB:: @ 8250DDB msgbox BattleFrontier_BattlePyramidLobby_Text_2517FC, MSGBOX_DEFAULT - setflag FLAG_SPECIAL_FLAG_0x4004 - special sub_81C6A94 + setflag FLAG_STORING_ITEMS_IN_PYRAMID_BAG + special TryStoreHeldItemsInPyramidBag compare VAR_RESULT, 0 goto_if_eq BattleFrontier_BattlePyramidLobby_EventScript_250E00 message BattleFrontier_BattlePyramidLobby_Text_2518C6 @@ -525,7 +525,7 @@ BattleFrontier_BattlePyramidLobby_EventScript_250E40:: @ 8250E40 end BattleFrontier_BattlePyramidLobby_EventScript_250E50:: @ 8250E50 - special sub_81B9620 + special BattlePyramidChooseMonHeldItems waitstate message BattleFrontier_BattlePyramidLobby_Text_25197E waitmessage @@ -533,8 +533,8 @@ BattleFrontier_BattlePyramidLobby_EventScript_250E50:: @ 8250E50 end BattleFrontier_BattlePyramidLobby_EventScript_250E60:: @ 8250E60 - special sub_81B95E0 - compare VAR_RESULT, 1 + special DoBattlePyramidMonsHaveHeldItem + compare VAR_RESULT, TRUE goto_if_eq BattleFrontier_BattlePyramidLobby_EventScript_250E6F return diff --git a/data/maps/BattleFrontier_Lounge1/scripts.inc b/data/maps/BattleFrontier_Lounge1/scripts.inc index dee3fd431d..ed9628e5e2 100644 --- a/data/maps/BattleFrontier_Lounge1/scripts.inc +++ b/data/maps/BattleFrontier_Lounge1/scripts.inc @@ -11,7 +11,7 @@ BattleFrontier_Lounge1_EventScript_25E775:: @ 825E775 end BattleFrontier_Lounge1_EventScript_25E792:: @ 825E792 - special sub_81B94B0 + special ChoosePartyMon waitstate compare VAR_0x8004, 255 goto_if_ne BattleFrontier_Lounge1_EventScript_25E7BF diff --git a/data/maps/BattleFrontier_Lounge5/scripts.inc b/data/maps/BattleFrontier_Lounge5/scripts.inc index 020c8fdfb0..391dc673da 100644 --- a/data/maps/BattleFrontier_Lounge5/scripts.inc +++ b/data/maps/BattleFrontier_Lounge5/scripts.inc @@ -7,7 +7,7 @@ BattleFrontier_Lounge5_EventScript_NatureGirl:: @ 82645C6 msgbox BattleFrontier_Lounge5_Text_NatureGirlGreeting, MSGBOX_YESNO compare VAR_RESULT, 0 goto_if_eq BattleFrontier_Lounge5_EventScript_NatureGirlNoneShown - special sub_81B94B0 + special ChoosePartyMon waitstate lock faceplayer diff --git a/data/maps/BattleFrontier_Lounge6/scripts.inc b/data/maps/BattleFrontier_Lounge6/scripts.inc index 8f695aee30..cef384958b 100644 --- a/data/maps/BattleFrontier_Lounge6/scripts.inc +++ b/data/maps/BattleFrontier_Lounge6/scripts.inc @@ -12,7 +12,7 @@ BattleFrontier_Lounge6_EventScript_264FED:: @ 8264FED msgbox BattleFrontier_Lounge6_Text_26508D, MSGBOX_YESNO compare VAR_RESULT, 0 goto_if_eq BattleFrontier_Lounge6_EventScript_26506B - special sub_81B94B0 + special ChoosePartyMon waitstate copyvar VAR_0x800A, VAR_0x8004 compare VAR_0x8004, 255 diff --git a/data/maps/BattleFrontier_Lounge7/scripts.inc b/data/maps/BattleFrontier_Lounge7/scripts.inc index 854a1d3605..b874c5d4e1 100644 --- a/data/maps/BattleFrontier_Lounge7/scripts.inc +++ b/data/maps/BattleFrontier_Lounge7/scripts.inc @@ -265,7 +265,7 @@ BattleFrontier_Lounge7_EventScript_265696:: @ 8265696 fadescreen 1 special CloseBattlePointsWindow special CloseBattleFrontierTutorWindow - special OpenPartyMenuForMoveTutor + special ChooseMonForMoveTutor waitstate compare VAR_RESULT, 0 goto_if_eq BattleFrontier_Lounge7_EventScript_265645 diff --git a/data/maps/FallarborTown/map.json b/data/maps/FallarborTown/map.json index 8633191843..9f4acc988b 100644 --- a/data/maps/FallarborTown/map.json +++ b/data/maps/FallarborTown/map.json @@ -104,14 +104,14 @@ "x": 6, "y": 17, "elevation": 0, - "dest_map": "MAP_FALLARBOR_TOWN_HOUSE1", + "dest_map": "MAP_FALLARBOR_TOWN_COZMOS_HOUSE", "dest_warp_id": 0 }, { "x": 1, "y": 6, "elevation": 0, - "dest_map": "MAP_FALLARBOR_TOWN_HOUSE2", + "dest_map": "MAP_FALLARBOR_TOWN_MOVE_RELEARNERS_HOUSE", "dest_warp_id": 0 } ], diff --git a/data/maps/FallarborTown_House1/map.json b/data/maps/FallarborTown_CozmosHouse/map.json similarity index 83% rename from data/maps/FallarborTown_House1/map.json rename to data/maps/FallarborTown_CozmosHouse/map.json index e5e75c6315..4895efed4e 100644 --- a/data/maps/FallarborTown_House1/map.json +++ b/data/maps/FallarborTown_CozmosHouse/map.json @@ -1,6 +1,6 @@ { - "id": "MAP_FALLARBOR_TOWN_HOUSE1", - "name": "FallarborTown_House1", + "id": "MAP_FALLARBOR_TOWN_COZMOS_HOUSE", + "name": "FallarborTown_CozmosHouse", "layout": "LAYOUT_HOUSE1", "music": "MUS_TONEKUSA", "region_map_section": "MAPSEC_FALLARBOR_TOWN", @@ -24,8 +24,8 @@ "movement_range_y": 1, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "FallarborTown_House1_EventScript_200F13", - "flag": "FLAG_HIDE_FALLARBOR_HOUSE_1_PROF_COZMO" + "script": "FallarborTown_CozmosHouse_EventScript_200F13", + "flag": "FLAG_HIDE_FALLARBOR_HOUSE_PROF_COZMO" }, { "graphics_id": "EVENT_OBJ_GFX_WOMAN_2", @@ -37,7 +37,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "FallarborTown_House1_EventScript_200FBC", + "script": "FallarborTown_CozmosHouse_EventScript_200FBC", "flag": "0" } ], diff --git a/data/maps/FallarborTown_CozmosHouse/scripts.inc b/data/maps/FallarborTown_CozmosHouse/scripts.inc new file mode 100644 index 0000000000..a2578bf3fa --- /dev/null +++ b/data/maps/FallarborTown_CozmosHouse/scripts.inc @@ -0,0 +1,121 @@ +FallarborTown_CozmosHouse_MapScripts:: @ 8200F12 + .byte 0 + +FallarborTown_CozmosHouse_EventScript_200F13:: @ 8200F13 + lock + faceplayer + goto_if_set FLAG_RECEIVED_TM27, FallarborTown_CozmosHouse_EventScript_200FB2 + checkitem ITEM_METEORITE, 1 + compare VAR_RESULT, 1 + goto_if_eq FallarborTown_CozmosHouse_EventScript_200F38 + msgbox FallarborTown_CozmosHouse_Text_200FEE, MSGBOX_DEFAULT + release + end + +FallarborTown_CozmosHouse_EventScript_200F38:: @ 8200F38 + call_if_unset FLAG_TEMP_2, FallarborTown_CozmosHouse_EventScript_200F8B + call_if_set FLAG_TEMP_2, FallarborTown_CozmosHouse_EventScript_200F9C + compare VAR_RESULT, 0 + goto_if_eq FallarborTown_CozmosHouse_EventScript_200FA5 + msgbox FallarborTown_CozmosHouse_Text_201159, MSGBOX_DEFAULT + giveitem_std ITEM_TM27 + compare VAR_RESULT, 0 + goto_if_eq Common_EventScript_ShowBagIsFull + setvar VAR_0x8004, ITEM_METEORITE + call Common_EventScript_PlayerHandedOverTheItem + setflag FLAG_RECEIVED_TM27 + msgbox FallarborTown_CozmosHouse_Text_2011A5, MSGBOX_DEFAULT + release + end + +FallarborTown_CozmosHouse_EventScript_200F8B:: @ 8200F8B + msgbox FallarborTown_CozmosHouse_Text_200FEE, MSGBOX_DEFAULT + msgbox FallarborTown_CozmosHouse_Text_2010A2, MSGBOX_YESNO + return + +FallarborTown_CozmosHouse_EventScript_200F9C:: @ 8200F9C + msgbox FallarborTown_CozmosHouse_Text_201249, MSGBOX_YESNO + return + +FallarborTown_CozmosHouse_EventScript_200FA5:: @ 8200FA5 + setflag FLAG_TEMP_2 + msgbox FallarborTown_CozmosHouse_Text_201212, MSGBOX_DEFAULT + release + end + +FallarborTown_CozmosHouse_EventScript_200FB2:: @ 8200FB2 + msgbox FallarborTown_CozmosHouse_Text_2011A5, MSGBOX_DEFAULT + release + end + +FallarborTown_CozmosHouse_EventScript_200FBC:: @ 8200FBC + lock + faceplayer + goto_if_set FLAG_RECEIVED_TM27, FallarborTown_CozmosHouse_EventScript_200FE4 + goto_if_set FLAG_DEFEATED_EVIL_TEAM_MT_CHIMNEY, FallarborTown_CozmosHouse_EventScript_200FDA + msgbox FallarborTown_CozmosHouse_Text_2012BC, MSGBOX_DEFAULT + release + end + +FallarborTown_CozmosHouse_EventScript_200FDA:: @ 8200FDA + msgbox FallarborTown_CozmosHouse_Text_201310, MSGBOX_DEFAULT + release + end + +FallarborTown_CozmosHouse_EventScript_200FE4:: @ 8200FE4 + msgbox FallarborTown_CozmosHouse_Text_20134B, MSGBOX_DEFAULT + release + end + +FallarborTown_CozmosHouse_Text_200FEE: @ 8200FEE + .string "PROF. COZMO: Oh…\n" + .string "I never should have let myself be\l" + .string "conned into telling TEAM MAGMA where\l" + .string "you can find METEORITES…\p" + .string "That METEORITE from METEOR FALLS…\n" + .string "It's never going to be mine now…$" + +FallarborTown_CozmosHouse_Text_2010A2: @ 82010A2 + .string "Oh!\n" + .string "Hah?\p" + .string "That item…\p" + .string "Could it be?\p" + .string "Is it the METEORITE that TEAM MAGMA\n" + .string "took from METEOR FALLS?\p" + .string "Please, may I have it?\p" + .string "I'm not asking for it for free.\n" + .string "How about in exchange for this TM?$" + +FallarborTown_CozmosHouse_Text_201159: @ 8201159 + .string "PROF. COZMO: This TM, it represents\n" + .string "my feeling of gratitude.\l" + .string "Please use it!$" + +FallarborTown_CozmosHouse_Text_2011A5: @ 82011A5 + .string "PROF. COZMO: Oh, I can't believe it.\n" + .string "This is really, really great!\p" + .string "This is really going to help my research!$" + +FallarborTown_CozmosHouse_Text_201212: @ 8201212 + .string "PROF. COZMO: Oh, but…\n" + .string "I'm crushed with disappointment…$" + +FallarborTown_CozmosHouse_Text_201249: @ 8201249 + .string "PROF. COZMO: Please, may I have that\n" + .string "METEORITE?\p" + .string "I'm not asking for it for free.\n" + .string "How about in exchange for this TM?$" + +FallarborTown_CozmosHouse_Text_2012BC: @ 82012BC + .string "PROF. COZMO went off to METEOR FALLS\n" + .string "on ROUTE 114 with some people from\l" + .string "TEAM MAGMA.$" + +FallarborTown_CozmosHouse_Text_201310: @ 8201310 + .string "Poor PROF. COZMO…\n" + .string "He's so depressed… I feel sorry for him.$" + +FallarborTown_CozmosHouse_Text_20134B: @ 820134B + .string "Look at PROF. COZMO…\n" + .string "He's so happy! I think it's cute.$" + diff --git a/data/maps/FallarborTown_House1/scripts.inc b/data/maps/FallarborTown_House1/scripts.inc deleted file mode 100644 index e3299e0963..0000000000 --- a/data/maps/FallarborTown_House1/scripts.inc +++ /dev/null @@ -1,121 +0,0 @@ -FallarborTown_House1_MapScripts:: @ 8200F12 - .byte 0 - -FallarborTown_House1_EventScript_200F13:: @ 8200F13 - lock - faceplayer - goto_if_set FLAG_RECEIVED_TM27, FallarborTown_House1_EventScript_200FB2 - checkitem ITEM_METEORITE, 1 - compare VAR_RESULT, 1 - goto_if_eq FallarborTown_House1_EventScript_200F38 - msgbox FallarborTown_House1_Text_200FEE, MSGBOX_DEFAULT - release - end - -FallarborTown_House1_EventScript_200F38:: @ 8200F38 - call_if_unset FLAG_TEMP_2, FallarborTown_House1_EventScript_200F8B - call_if_set FLAG_TEMP_2, FallarborTown_House1_EventScript_200F9C - compare VAR_RESULT, 0 - goto_if_eq FallarborTown_House1_EventScript_200FA5 - msgbox FallarborTown_House1_Text_201159, MSGBOX_DEFAULT - giveitem_std ITEM_TM27 - compare VAR_RESULT, 0 - goto_if_eq Common_EventScript_ShowBagIsFull - setvar VAR_0x8004, ITEM_METEORITE - call Common_EventScript_PlayerHandedOverTheItem - setflag FLAG_RECEIVED_TM27 - msgbox FallarborTown_House1_Text_2011A5, MSGBOX_DEFAULT - release - end - -FallarborTown_House1_EventScript_200F8B:: @ 8200F8B - msgbox FallarborTown_House1_Text_200FEE, MSGBOX_DEFAULT - msgbox FallarborTown_House1_Text_2010A2, MSGBOX_YESNO - return - -FallarborTown_House1_EventScript_200F9C:: @ 8200F9C - msgbox FallarborTown_House1_Text_201249, MSGBOX_YESNO - return - -FallarborTown_House1_EventScript_200FA5:: @ 8200FA5 - setflag FLAG_TEMP_2 - msgbox FallarborTown_House1_Text_201212, MSGBOX_DEFAULT - release - end - -FallarborTown_House1_EventScript_200FB2:: @ 8200FB2 - msgbox FallarborTown_House1_Text_2011A5, MSGBOX_DEFAULT - release - end - -FallarborTown_House1_EventScript_200FBC:: @ 8200FBC - lock - faceplayer - goto_if_set FLAG_RECEIVED_TM27, FallarborTown_House1_EventScript_200FE4 - goto_if_set FLAG_DEFEATED_EVIL_TEAM_MT_CHIMNEY, FallarborTown_House1_EventScript_200FDA - msgbox FallarborTown_House1_Text_2012BC, MSGBOX_DEFAULT - release - end - -FallarborTown_House1_EventScript_200FDA:: @ 8200FDA - msgbox FallarborTown_House1_Text_201310, MSGBOX_DEFAULT - release - end - -FallarborTown_House1_EventScript_200FE4:: @ 8200FE4 - msgbox FallarborTown_House1_Text_20134B, MSGBOX_DEFAULT - release - end - -FallarborTown_House1_Text_200FEE: @ 8200FEE - .string "PROF. COZMO: Oh…\n" - .string "I never should have let myself be\l" - .string "conned into telling TEAM MAGMA where\l" - .string "you can find METEORITES…\p" - .string "That METEORITE from METEOR FALLS…\n" - .string "It's never going to be mine now…$" - -FallarborTown_House1_Text_2010A2: @ 82010A2 - .string "Oh!\n" - .string "Hah?\p" - .string "That item…\p" - .string "Could it be?\p" - .string "Is it the METEORITE that TEAM MAGMA\n" - .string "took from METEOR FALLS?\p" - .string "Please, may I have it?\p" - .string "I'm not asking for it for free.\n" - .string "How about in exchange for this TM?$" - -FallarborTown_House1_Text_201159: @ 8201159 - .string "PROF. COZMO: This TM, it represents\n" - .string "my feeling of gratitude.\l" - .string "Please use it!$" - -FallarborTown_House1_Text_2011A5: @ 82011A5 - .string "PROF. COZMO: Oh, I can't believe it.\n" - .string "This is really, really great!\p" - .string "This is really going to help my research!$" - -FallarborTown_House1_Text_201212: @ 8201212 - .string "PROF. COZMO: Oh, but…\n" - .string "I'm crushed with disappointment…$" - -FallarborTown_House1_Text_201249: @ 8201249 - .string "PROF. COZMO: Please, may I have that\n" - .string "METEORITE?\p" - .string "I'm not asking for it for free.\n" - .string "How about in exchange for this TM?$" - -FallarborTown_House1_Text_2012BC: @ 82012BC - .string "PROF. COZMO went off to METEOR FALLS\n" - .string "on ROUTE 114 with some people from\l" - .string "TEAM MAGMA.$" - -FallarborTown_House1_Text_201310: @ 8201310 - .string "Poor PROF. COZMO…\n" - .string "He's so depressed… I feel sorry for him.$" - -FallarborTown_House1_Text_20134B: @ 820134B - .string "Look at PROF. COZMO…\n" - .string "He's so happy! I think it's cute.$" - diff --git a/data/maps/FallarborTown_House2/scripts.inc b/data/maps/FallarborTown_House2/scripts.inc deleted file mode 100644 index d0305ad4b8..0000000000 --- a/data/maps/FallarborTown_House2/scripts.inc +++ /dev/null @@ -1,102 +0,0 @@ -FallarborTown_House2_MapScripts:: @ 8201382 - .byte 0 - -FallarborTown_House2_EventScript_201383:: @ 8201383 - lockall - applymovement 1, Common_Movement_FacePlayer - waitmovement 0 - goto_if_set FLAG_TEMP_1, FallarborTown_House2_EventScript_2013A8 - msgbox FallarborTown_House2_Text_20145C, MSGBOX_DEFAULT - setflag FLAG_TEMP_1 - goto FallarborTown_House2_EventScript_2013A8 - end - -FallarborTown_House2_EventScript_2013A8:: @ 82013A8 - checkitem ITEM_HEART_SCALE, 1 - compare VAR_RESULT, 0 - goto_if_eq FallarborTown_House2_EventScript_201452 - msgbox FallarborTown_House2_Text_201541, MSGBOX_YESNO - switch VAR_RESULT - case 0, FallarborTown_House2_EventScript_201452 - goto FallarborTown_House2_EventScript_2013D6 - end - -FallarborTown_House2_EventScript_2013D6:: @ 82013D6 - msgbox FallarborTown_House2_Text_2015A5, MSGBOX_DEFAULT - special sub_81B951C - waitstate - compare VAR_0x8004, 255 - goto_if_eq FallarborTown_House2_EventScript_201452 - special sub_81B98DC - compare VAR_RESULT, 1 - goto_if_eq FallarborTown_House2_EventScript_201444 - compare VAR_0x8005, 0 - goto_if_eq FallarborTown_House2_EventScript_201436 - goto FallarborTown_House2_EventScript_20140C - end - -FallarborTown_House2_EventScript_20140C:: @ 820140C - msgbox FallarborTown_House2_Text_2015C3, MSGBOX_DEFAULT - special TeachMoveRelearnerMove - waitstate - compare VAR_0x8004, 0 - goto_if_eq FallarborTown_House2_EventScript_2013D6 - msgbox FallarborTown_House2_Text_201627, MSGBOX_DEFAULT - takeitem ITEM_HEART_SCALE, 1 - goto FallarborTown_House2_EventScript_201452 - end - -FallarborTown_House2_EventScript_201436:: @ 8201436 - msgbox FallarborTown_House2_Text_2015DE, MSGBOX_DEFAULT - goto FallarborTown_House2_EventScript_2013D6 - end - -FallarborTown_House2_EventScript_201444:: @ 8201444 - msgbox FallarborTown_House2_Text_201697, MSGBOX_DEFAULT - goto FallarborTown_House2_EventScript_2013D6 - end - -FallarborTown_House2_EventScript_201452:: @ 8201452 - msgbox FallarborTown_House2_Text_201653, MSGBOX_DEFAULT - releaseall - end - -FallarborTown_House2_Text_20145C: @ 820145C - .string "I'm the MOVE TUTOR.\p" - .string "I know all the moves that POKéMON\n" - .string "learn--every one of them--and I can\l" - .string "teach POKéMON those moves.\p" - .string "I can teach a move to a POKéMON\n" - .string "of yours if you'd like.\p" - .string "I'll do it for a HEART SCALE.\n" - .string "I'm collecting those now.$" - -FallarborTown_House2_Text_201541: @ 8201541 - .string "Oh! That's it! That's an honest to\n" - .string "goodness HEART SCALE!\p" - .string "Let me guess, you want me to teach\n" - .string "a move?$" - -FallarborTown_House2_Text_2015A5: @ 82015A5 - .string "Which POKéMON needs tutoring?$" - -FallarborTown_House2_Text_2015C3: @ 82015C3 - .string "Which move should I teach?$" - -FallarborTown_House2_Text_2015DE: @ 82015DE - .string "Sorry…\p" - .string "It doesn't appear as if I have any move\n" - .string "I can teach that POKéMON.$" - -FallarborTown_House2_Text_201627: @ 8201627 - .string "{PLAYER} handed over one HEART SCALE\n" - .string "in exchange.$" - -FallarborTown_House2_Text_201653: @ 8201653 - .string "If your POKéMON need to learn a move,\n" - .string "come back with a HEART SCALE.$" - -FallarborTown_House2_Text_201697: @ 8201697 - .string "Hunh? There isn't a single move that\n" - .string "I can teach an EGG.$" - diff --git a/data/maps/FallarborTown_House2/map.json b/data/maps/FallarborTown_MoveRelearnersHouse/map.json similarity index 85% rename from data/maps/FallarborTown_House2/map.json rename to data/maps/FallarborTown_MoveRelearnersHouse/map.json index fe0ce67a02..c444c1e382 100644 --- a/data/maps/FallarborTown_House2/map.json +++ b/data/maps/FallarborTown_MoveRelearnersHouse/map.json @@ -1,6 +1,6 @@ { - "id": "MAP_FALLARBOR_TOWN_HOUSE2", - "name": "FallarborTown_House2", + "id": "MAP_FALLARBOR_TOWN_MOVE_RELEARNERS_HOUSE", + "name": "FallarborTown_MoveRelearnersHouse", "layout": "LAYOUT_HOUSE2", "music": "MUS_TONEKUSA", "region_map_section": "MAPSEC_FALLARBOR_TOWN", @@ -24,7 +24,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "FallarborTown_House2_EventScript_201383", + "script": "FallarborTown_MoveRelearnersHouse_EventScript_MoveRelearner", "flag": "0" } ], diff --git a/data/maps/FallarborTown_MoveRelearnersHouse/scripts.inc b/data/maps/FallarborTown_MoveRelearnersHouse/scripts.inc new file mode 100644 index 0000000000..7ef8b65973 --- /dev/null +++ b/data/maps/FallarborTown_MoveRelearnersHouse/scripts.inc @@ -0,0 +1,102 @@ +FallarborTown_MoveRelearnersHouse_MapScripts:: @ 8201382 + .byte 0 + +FallarborTown_MoveRelearnersHouse_EventScript_MoveRelearner:: @ 8201383 + lockall + applymovement 1, Common_Movement_FacePlayer + waitmovement 0 + goto_if_set FLAG_TEMP_1, FallarborTown_MoveRelearnersHouse_EventScript_AskTeachMove + msgbox FallarborTown_MoveRelearnersHouse_Text_ImTheMoveTutor, MSGBOX_DEFAULT + setflag FLAG_TEMP_1 + goto FallarborTown_MoveRelearnersHouse_EventScript_AskTeachMove + end + +FallarborTown_MoveRelearnersHouse_EventScript_AskTeachMove:: @ 82013A8 + checkitem ITEM_HEART_SCALE, 1 + compare VAR_RESULT, 0 + goto_if_eq FallarborTown_MoveRelearnersHouse_EventScript_ComeBackWithHeartScale + msgbox FallarborTown_MoveRelearnersHouse_Text_ThatsAHeartScaleWantMeToTeachMove, MSGBOX_YESNO + switch VAR_RESULT + case 0, FallarborTown_MoveRelearnersHouse_EventScript_ComeBackWithHeartScale + goto FallarborTown_MoveRelearnersHouse_EventScript_ChooseMon + end + +FallarborTown_MoveRelearnersHouse_EventScript_ChooseMon:: @ 82013D6 + msgbox FallarborTown_MoveRelearnersHouse_Text_TutorWhichMon, MSGBOX_DEFAULT + special ChooseMonForMoveRelearner + waitstate + compare VAR_0x8004, 255 + goto_if_eq FallarborTown_MoveRelearnersHouse_EventScript_ComeBackWithHeartScale + special IsSelectedMonEgg + compare VAR_RESULT, TRUE + goto_if_eq FallarborTown_MoveRelearnersHouse_EventScript_CantTeachEgg + compare VAR_0x8005, 0 + goto_if_eq FallarborTown_MoveRelearnersHouse_EventScript_NoMoveToTeachMon + goto FallarborTown_MoveRelearnersHouse_EventScript_ChooseMove + end + +FallarborTown_MoveRelearnersHouse_EventScript_ChooseMove:: @ 820140C + msgbox FallarborTown_MoveRelearnersHouse_Text_TeachWhichMove, MSGBOX_DEFAULT + special TeachMoveRelearnerMove + waitstate + compare VAR_0x8004, 0 + goto_if_eq FallarborTown_MoveRelearnersHouse_EventScript_ChooseMon + msgbox FallarborTown_MoveRelearnersHouse_Text_HandedOverHeartScale, MSGBOX_DEFAULT + takeitem ITEM_HEART_SCALE, 1 + goto FallarborTown_MoveRelearnersHouse_EventScript_ComeBackWithHeartScale + end + +FallarborTown_MoveRelearnersHouse_EventScript_NoMoveToTeachMon:: @ 8201436 + msgbox FallarborTown_MoveRelearnersHouse_Text_DontHaveMoveToTeachPokemon, MSGBOX_DEFAULT + goto FallarborTown_MoveRelearnersHouse_EventScript_ChooseMon + end + +FallarborTown_MoveRelearnersHouse_EventScript_CantTeachEgg:: @ 8201444 + msgbox FallarborTown_MoveRelearnersHouse_Text_CantTeachEgg, MSGBOX_DEFAULT + goto FallarborTown_MoveRelearnersHouse_EventScript_ChooseMon + end + +FallarborTown_MoveRelearnersHouse_EventScript_ComeBackWithHeartScale:: @ 8201452 + msgbox FallarborTown_MoveRelearnersHouse_Text_ComeBackWithHeartScale, MSGBOX_DEFAULT + releaseall + end + +FallarborTown_MoveRelearnersHouse_Text_ImTheMoveTutor: @ 820145C + .string "I'm the MOVE TUTOR.\p" + .string "I know all the moves that POKéMON\n" + .string "learn--every one of them--and I can\l" + .string "teach POKéMON those moves.\p" + .string "I can teach a move to a POKéMON\n" + .string "of yours if you'd like.\p" + .string "I'll do it for a HEART SCALE.\n" + .string "I'm collecting those now.$" + +FallarborTown_MoveRelearnersHouse_Text_ThatsAHeartScaleWantMeToTeachMove: @ 8201541 + .string "Oh! That's it! That's an honest to\n" + .string "goodness HEART SCALE!\p" + .string "Let me guess, you want me to teach\n" + .string "a move?$" + +FallarborTown_MoveRelearnersHouse_Text_TutorWhichMon: @ 82015A5 + .string "Which POKéMON needs tutoring?$" + +FallarborTown_MoveRelearnersHouse_Text_TeachWhichMove: @ 82015C3 + .string "Which move should I teach?$" + +FallarborTown_MoveRelearnersHouse_Text_DontHaveMoveToTeachPokemon: @ 82015DE + .string "Sorry…\p" + .string "It doesn't appear as if I have any move\n" + .string "I can teach that POKéMON.$" + +FallarborTown_MoveRelearnersHouse_Text_HandedOverHeartScale: @ 8201627 + .string "{PLAYER} handed over one HEART SCALE\n" + .string "in exchange.$" + +FallarborTown_MoveRelearnersHouse_Text_ComeBackWithHeartScale: @ 8201653 + .string "If your POKéMON need to learn a move,\n" + .string "come back with a HEART SCALE.$" + +FallarborTown_MoveRelearnersHouse_Text_CantTeachEgg: @ 8201697 + .string "Hunh? There isn't a single move that\n" + .string "I can teach an EGG.$" + diff --git a/data/maps/FortreeCity_House1/scripts.inc b/data/maps/FortreeCity_House1/scripts.inc index e6a6176772..260a75a782 100644 --- a/data/maps/FortreeCity_House1/scripts.inc +++ b/data/maps/FortreeCity_House1/scripts.inc @@ -12,7 +12,7 @@ FortreeCity_House1_EventScript_2162BB:: @ 82162BB msgbox FortreeCity_House1_Text_21637B, MSGBOX_YESNO compare VAR_RESULT, 0 goto_if_eq FortreeCity_House1_EventScript_21633D - special sub_81B94B0 + special ChoosePartyMon waitstate copyvar VAR_0x800A, VAR_0x8004 compare VAR_0x8004, 255 diff --git a/data/maps/LilycoveCity_MoveDeletersHouse/map.json b/data/maps/LilycoveCity_MoveDeletersHouse/map.json index f4adbabe89..30c5a413f9 100644 --- a/data/maps/LilycoveCity_MoveDeletersHouse/map.json +++ b/data/maps/LilycoveCity_MoveDeletersHouse/map.json @@ -24,7 +24,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "LilycoveCity_MoveDeletersHouse_EventScript_21EA0B", + "script": "LilycoveCity_MoveDeletersHouse_EventScript_MoveDeleter", "flag": "0" } ], diff --git a/data/maps/LilycoveCity_MoveDeletersHouse/scripts.inc b/data/maps/LilycoveCity_MoveDeletersHouse/scripts.inc index e94fa43f12..bf34bd0494 100644 --- a/data/maps/LilycoveCity_MoveDeletersHouse/scripts.inc +++ b/data/maps/LilycoveCity_MoveDeletersHouse/scripts.inc @@ -1,110 +1,110 @@ LilycoveCity_MoveDeletersHouse_MapScripts:: @ 821EA0A .byte 0 -LilycoveCity_MoveDeletersHouse_EventScript_21EA0B:: @ 821EA0B +LilycoveCity_MoveDeletersHouse_EventScript_MoveDeleter:: @ 821EA0B lockall applymovement 1, Common_Movement_FacePlayer waitmovement 0 - msgbox LilycoveCity_MoveDeletersHouse_Text_21EAFD, MSGBOX_YESNO + msgbox LilycoveCity_MoveDeletersHouse_Text_ICanMakeMonForgetMove, MSGBOX_YESNO switch VAR_RESULT - case 1, LilycoveCity_MoveDeletersHouse_EventScript_21EA3B - case 0, LilycoveCity_MoveDeletersHouse_EventScript_21EAE6 + case 1, LilycoveCity_MoveDeletersHouse_EventScript_ChooseMonAndMoveToForget + case 0, LilycoveCity_MoveDeletersHouse_EventScript_ComeAgain releaseall end -LilycoveCity_MoveDeletersHouse_EventScript_21EA3B:: @ 821EA3B - msgbox LilycoveCity_MoveDeletersHouse_Text_21EB65, MSGBOX_DEFAULT - special sub_81B94B0 +LilycoveCity_MoveDeletersHouse_EventScript_ChooseMonAndMoveToForget:: @ 821EA3B + msgbox LilycoveCity_MoveDeletersHouse_Text_WhichMonShouldForget, MSGBOX_DEFAULT + special ChoosePartyMon waitstate compare VAR_0x8004, 255 - goto_if_eq LilycoveCity_MoveDeletersHouse_EventScript_21EAE6 - special sub_81B98DC + goto_if_eq LilycoveCity_MoveDeletersHouse_EventScript_ComeAgain + special IsSelectedMonEgg + compare VAR_RESULT, TRUE + goto_if_eq LilycoveCity_MoveDeletersHouse_EventScript_EggCantForgetMoves + special GetNumMovesSelectedMonHas compare VAR_RESULT, 1 - goto_if_eq LilycoveCity_MoveDeletersHouse_EventScript_21EADC - special sub_81B96D0 - compare VAR_RESULT, 1 - goto_if_eq LilycoveCity_MoveDeletersHouse_EventScript_21EACF - msgbox LilycoveCity_MoveDeletersHouse_Text_21EB89, MSGBOX_DEFAULT + goto_if_eq LilycoveCity_MoveDeletersHouse_EventScript_MonOnlyKnowsOneMove + msgbox LilycoveCity_MoveDeletersHouse_Text_WhichMoveShouldBeForgotten, MSGBOX_DEFAULT fadescreen 1 - special sub_81B968C + special MoveDeleterChooseMoveToForget fadescreen 0 - compare VAR_0x8005, 4 - goto_if_eq LilycoveCity_MoveDeletersHouse_EventScript_21EA3B - special sub_81B9718 - msgbox LilycoveCity_MoveDeletersHouse_Text_21EBDA, MSGBOX_YESNO + compare VAR_0x8005, MAX_MON_MOVES + goto_if_eq LilycoveCity_MoveDeletersHouse_EventScript_ChooseMonAndMoveToForget + special BufferMoveDeleterNicknameAndMove + msgbox LilycoveCity_MoveDeletersHouse_Text_MonsMoveShouldBeForgotten, MSGBOX_YESNO switch VAR_RESULT - case 1, LilycoveCity_MoveDeletersHouse_EventScript_21EAB0 - case 0, LilycoveCity_MoveDeletersHouse_EventScript_21EAE6 + case 1, LilycoveCity_MoveDeletersHouse_EventScript_TryForgetMove + case 0, LilycoveCity_MoveDeletersHouse_EventScript_ComeAgain releaseall end -LilycoveCity_MoveDeletersHouse_EventScript_21EAB0:: @ 821EAB0 - special sub_81B9918 - compare VAR_RESULT, 1 - goto_if_eq LilycoveCity_MoveDeletersHouse_EventScript_21EAF0 - special sub_81B9770 +LilycoveCity_MoveDeletersHouse_EventScript_TryForgetMove:: @ 821EAB0 + special IsLastMonThatKnowsSurf + compare VAR_RESULT, TRUE + goto_if_eq LilycoveCity_MoveDeletersHouse_EventScript_LastMonWithSurf + special MoveDeleterForgetMove playfanfare MUS_ME_WASURE waitfanfare - msgbox LilycoveCity_MoveDeletersHouse_Text_21EC06, MSGBOX_DEFAULT + msgbox LilycoveCity_MoveDeletersHouse_Text_MonHasForgottenMove, MSGBOX_DEFAULT releaseall end -LilycoveCity_MoveDeletersHouse_EventScript_21EACF:: @ 821EACF - special sub_81B9718 - msgbox LilycoveCity_MoveDeletersHouse_Text_21EBA9, MSGBOX_DEFAULT +LilycoveCity_MoveDeletersHouse_EventScript_MonOnlyKnowsOneMove:: @ 821EACF + special BufferMoveDeleterNicknameAndMove + msgbox LilycoveCity_MoveDeletersHouse_Text_MonOnlyKnowsOneMove, MSGBOX_DEFAULT releaseall end -LilycoveCity_MoveDeletersHouse_EventScript_21EADC:: @ 821EADC - msgbox LilycoveCity_MoveDeletersHouse_Text_21EC78, MSGBOX_DEFAULT +LilycoveCity_MoveDeletersHouse_EventScript_EggCantForgetMoves:: @ 821EADC + msgbox LilycoveCity_MoveDeletersHouse_Text_EggCantForgetMoves, MSGBOX_DEFAULT releaseall end -LilycoveCity_MoveDeletersHouse_EventScript_21EAE6:: @ 821EAE6 - msgbox LilycoveCity_MoveDeletersHouse_Text_21EC3F, MSGBOX_DEFAULT +LilycoveCity_MoveDeletersHouse_EventScript_ComeAgain:: @ 821EAE6 + msgbox LilycoveCity_MoveDeletersHouse_Text_ComeAgain, MSGBOX_DEFAULT releaseall end -LilycoveCity_MoveDeletersHouse_EventScript_21EAF0:: @ 821EAF0 - special sub_81B9718 - msgbox LilycoveCity_MoveDeletersHouse_Text_21EC9C, MSGBOX_DEFAULT +LilycoveCity_MoveDeletersHouse_EventScript_LastMonWithSurf:: @ 821EAF0 + special BufferMoveDeleterNicknameAndMove + msgbox LilycoveCity_MoveDeletersHouse_Text_CantForgetSurf, MSGBOX_DEFAULT releaseall end -LilycoveCity_MoveDeletersHouse_Text_21EAFD: @ 821EAFD +LilycoveCity_MoveDeletersHouse_Text_ICanMakeMonForgetMove: @ 821EAFD .string "Uh…\n" .string "Oh, yes, I'm the MOVE DELETER.\p" .string "I can make POKéMON forget their moves.\p" .string "Would you like me to do that?$" -LilycoveCity_MoveDeletersHouse_Text_21EB65: @ 821EB65 +LilycoveCity_MoveDeletersHouse_Text_WhichMonShouldForget: @ 821EB65 .string "Which POKéMON should forget a move?$" -LilycoveCity_MoveDeletersHouse_Text_21EB89: @ 821EB89 +LilycoveCity_MoveDeletersHouse_Text_WhichMoveShouldBeForgotten: @ 821EB89 .string "Which move should be forgotten?$" -LilycoveCity_MoveDeletersHouse_Text_21EBA9: @ 821EBA9 +LilycoveCity_MoveDeletersHouse_Text_MonOnlyKnowsOneMove: @ 821EBA9 .string "{STR_VAR_1} knows only one move\n" .string "so it can't be forgotten…$" -LilycoveCity_MoveDeletersHouse_Text_21EBDA: @ 821EBDA +LilycoveCity_MoveDeletersHouse_Text_MonsMoveShouldBeForgotten: @ 821EBDA .string "Hm! {STR_VAR_1}'s {STR_VAR_2}?\n" .string "That move should be forgotten?$" -LilycoveCity_MoveDeletersHouse_Text_21EC06: @ 821EC06 +LilycoveCity_MoveDeletersHouse_Text_MonHasForgottenMove: @ 821EC06 .string "It worked to perfection!\p" .string "{STR_VAR_1} has forgotten\n" .string "{STR_VAR_2} completely.$" -LilycoveCity_MoveDeletersHouse_Text_21EC3F: @ 821EC3F +LilycoveCity_MoveDeletersHouse_Text_ComeAgain: @ 821EC3F .string "Come again if there are moves that\n" .string "need to be forgotten.$" -LilycoveCity_MoveDeletersHouse_Text_21EC78: @ 821EC78 +LilycoveCity_MoveDeletersHouse_Text_EggCantForgetMoves: @ 821EC78 .string "What?\n" .string "No EGG should know any moves.$" -LilycoveCity_MoveDeletersHouse_Text_21EC9C: @ 821EC9C +LilycoveCity_MoveDeletersHouse_Text_CantForgetSurf: @ 821EC9C .string "Hm!\p" .string "Your {STR_VAR_1} doesn't seem willing\n" .string "to forget SURF.$" diff --git a/data/maps/MtChimney/scripts.inc b/data/maps/MtChimney/scripts.inc index c4a013108b..3316b653b2 100644 --- a/data/maps/MtChimney/scripts.inc +++ b/data/maps/MtChimney/scripts.inc @@ -71,7 +71,7 @@ MtChimney_EventScript_22EE0B:: @ 822EE0B removeobject 1 setflag FLAG_HIDE_MT_CHIMNEY_TEAM_AQUA setflag FLAG_DEFEATED_EVIL_TEAM_MT_CHIMNEY - clearflag FLAG_HIDE_FALLARBOR_HOUSE_1_PROF_COZMO + clearflag FLAG_HIDE_FALLARBOR_HOUSE_PROF_COZMO setflag FLAG_HIDE_METEOR_FALLS_1F_1R_COZMO clearflag FLAG_HIDE_MT_CHIMNEY_LAVA_COOKIE_LADY releaseall diff --git a/data/maps/PacifidlogTown_House3/scripts.inc b/data/maps/PacifidlogTown_House3/scripts.inc index 9633ddc8b8..543b9de354 100644 --- a/data/maps/PacifidlogTown_House3/scripts.inc +++ b/data/maps/PacifidlogTown_House3/scripts.inc @@ -12,7 +12,7 @@ PacifidlogTown_House3_EventScript_203C11:: @ 8203C11 msgbox PacifidlogTown_House3_Text_203CBE, MSGBOX_YESNO compare VAR_RESULT, 0 goto_if_eq PacifidlogTown_House3_EventScript_203C93 - special sub_81B94B0 + special ChoosePartyMon waitstate copyvar VAR_0x800A, VAR_0x8004 compare VAR_0x8004, 255 diff --git a/data/maps/RustboroCity_House1/scripts.inc b/data/maps/RustboroCity_House1/scripts.inc index f0a0f48274..4ae0a355c7 100644 --- a/data/maps/RustboroCity_House1/scripts.inc +++ b/data/maps/RustboroCity_House1/scripts.inc @@ -12,7 +12,7 @@ RustboroCity_House1_EventScript_21593F:: @ 821593F msgbox RustboroCity_House1_Text_2159E8, MSGBOX_YESNO compare VAR_RESULT, 0 goto_if_eq RustboroCity_House1_EventScript_2159BD - special sub_81B94B0 + special ChoosePartyMon waitstate copyvar VAR_0x800A, VAR_0x8004 compare VAR_0x8004, 255 diff --git a/data/maps/SlateportCity_House1/scripts.inc b/data/maps/SlateportCity_House1/scripts.inc index 1203c2333c..e6bde2f555 100644 --- a/data/maps/SlateportCity_House1/scripts.inc +++ b/data/maps/SlateportCity_House1/scripts.inc @@ -13,7 +13,7 @@ SlateportCity_House1_EventScript_209AA5:: @ 8209AA5 SlateportCity_House1_EventScript_209AC6:: @ 8209AC6 msgbox SlateportCity_House1_Text_209BFF, MSGBOX_DEFAULT - special sub_81B94B0 + special ChoosePartyMon waitstate compare VAR_0x8004, 255 goto_if_ne SlateportCity_House1_EventScript_209AF3 diff --git a/data/maps/SootopolisCity_LotadAndSeedotHouse/scripts.inc b/data/maps/SootopolisCity_LotadAndSeedotHouse/scripts.inc index 17debe3216..496b16d112 100644 --- a/data/maps/SootopolisCity_LotadAndSeedotHouse/scripts.inc +++ b/data/maps/SootopolisCity_LotadAndSeedotHouse/scripts.inc @@ -6,7 +6,7 @@ SootopolisCity_LotadAndSeedotHouse_EventScript_22722B:: @ 822722B lock faceplayer msgbox SootopolisCity_LotadAndSeedotHouse_Text_227369, MSGBOX_DEFAULT - special sub_81B94B0 + special ChoosePartyMon waitstate copyvar VAR_RESULT, VAR_0x8004 compare VAR_RESULT, 255 @@ -55,7 +55,7 @@ SootopolisCity_LotadAndSeedotHouse_EventScript_2272BC:: @ 82272BC lock faceplayer msgbox SootopolisCity_LotadAndSeedotHouse_Text_227676, MSGBOX_DEFAULT - special sub_81B94B0 + special ChoosePartyMon waitstate copyvar VAR_RESULT, VAR_0x8004 compare VAR_RESULT, 255 diff --git a/data/maps/map_groups.json b/data/maps/map_groups.json index 4088ddbb51..7b78a80dbd 100644 --- a/data/maps/map_groups.json +++ b/data/maps/map_groups.json @@ -132,8 +132,8 @@ "FallarborTown_BattleTentBattleRoom", "FallarborTown_PokemonCenter_1F", "FallarborTown_PokemonCenter_2F", - "FallarborTown_House1", - "FallarborTown_House2" + "FallarborTown_CozmosHouse", + "FallarborTown_MoveRelearnersHouse" ], "gMapGroup6": [ "VerdanturfTown_BattleTentLobby", diff --git a/data/scripts/cable_club.inc b/data/scripts/cable_club.inc index 6962d17f84..ccda6afcef 100644 --- a/data/scripts/cable_club.inc +++ b/data/scripts/cable_club.inc @@ -911,7 +911,7 @@ EventScript_DoLinkRoomExit:: @ 8277513 CableClub_EventScript_UnionRoomAttendant:: @ 827751B lock faceplayer - setvar VAR_FRONTIER_FACILITY, 8 + setvar VAR_FRONTIER_FACILITY, FACILITY_UNION_ROOM goto_if_unset FLAG_SYS_POKEDEX_GET, CableClub_EventScript_WirelessClubAdjustements specialvar VAR_RESULT, IsBadEggInParty compare VAR_RESULT, TRUE @@ -1019,7 +1019,7 @@ CableClub_EventScript_DontAskAboutLinking:: @ 827769A CableClub_EventScript_DirectCornerAttendant:: @ 82776A4 lock faceplayer - setvar VAR_FRONTIER_FACILITY, 9 + setvar VAR_FRONTIER_FACILITY, FACILITY_MULTI_OR_EREADER @ Set preemptively for multi battles, ignored otherwise goto_if_unset FLAG_SYS_POKEDEX_GET, CableClub_EventScript_WirelessClubAdjustements specialvar VAR_RESULT, IsBadEggInParty compare VAR_RESULT, TRUE diff --git a/data/scripts/move_tutors.inc b/data/scripts/move_tutors.inc index b6ba75e0da..0d42440235 100644 --- a/data/scripts/move_tutors.inc +++ b/data/scripts/move_tutors.inc @@ -289,7 +289,7 @@ MoveTutor_EventScript_ExplosionTaught:: @ 82C831C end MoveTutor_EventScript_OpenPartyMenu:: @ 82C8326 - special OpenPartyMenuForMoveTutor + special ChooseMonForMoveTutor waitstate lock faceplayer diff --git a/data/scripts/new_game.inc b/data/scripts/new_game.inc index e8cfc34a00..5bc4bf780b 100644 --- a/data/scripts/new_game.inc +++ b/data/scripts/new_game.inc @@ -204,7 +204,7 @@ EventScript_ResetAllMapFlags:: @ 82715DE setflag FLAG_HIDE_MOSSDEEP_CITY_HOUSE_2_WINGULL setflag FLAG_HIDE_METEOR_FALLS_TEAM_AQUA setflag FLAG_HIDE_DEWFORD_HALL_SLUDGE_BOMB_MAN - setflag FLAG_HIDE_FALLARBOR_HOUSE_1_PROF_COZMO + setflag FLAG_HIDE_FALLARBOR_HOUSE_PROF_COZMO setflag FLAG_HIDE_WEATHER_INSTITUTE_2F_AQUA_GRUNT_M setflag FLAG_HIDE_ROUTE_128_STEVEN setflag FLAG_HIDE_ROUTE_128_ARCHIE diff --git a/data/specials.inc b/data/specials.inc index 69aa91c88a..2d4dfc43ad 100644 --- a/data/specials.inc +++ b/data/specials.inc @@ -170,7 +170,7 @@ gSpecials:: @ 81DBA64 def_special ChooseStarter def_special StartWallyTutorialBattle def_special ChangePokemonNickname - def_special sub_81B94B0 + def_special ChoosePartyMon def_special GetFirstFreePokeblockSlot def_special DoBerryBlending def_special PlayRoulette @@ -230,11 +230,11 @@ gSpecials:: @ 81DBA64 def_special SetDeptStoreFloor def_special DoLotteryCornerComputerEffect def_special EndLotteryCornerComputerEffect - def_special sub_81B951C - def_special sub_81B968C - def_special sub_81B9770 - def_special sub_81B9718 - def_special sub_81B96D0 + def_special ChooseMonForMoveRelearner + def_special MoveDeleterChooseMoveToForget + def_special MoveDeleterForgetMove + def_special BufferMoveDeleterNicknameAndMove + def_special GetNumMovesSelectedMonHas def_special TeachMoveRelearnerMove def_special GetRecordedCyclingRoadResults def_special Special_BeginCyclingRoadChallenge @@ -338,7 +338,7 @@ gSpecials:: @ 81DBA64 def_special SetRoute123Weather def_special ScriptGetMultiplayerId def_special ScriptGetPartyMonSpecies - def_special sub_81B98DC + def_special IsSelectedMonEgg def_special TryInitBattleTowerAwardManEventObject def_special MoveOutOfSecretBaseFromOutside def_special LoadPlayerBag @@ -457,10 +457,10 @@ gSpecials:: @ 81DBA64 def_special ShowScrollableMultichoice def_special sub_813A630 def_special BufferBattleTowerElevatorFloors - def_special sub_81C6A94 + def_special TryStoreHeldItemsInPyramidBag def_special sub_81C4F24 - def_special sub_81B95E0 - def_special sub_81B9620 + def_special DoBattlePyramidMonsHaveHeldItem + def_special BattlePyramidChooseMonHeldItems def_special SetBattleTowerLinkPlayerGfx def_special ShowNatureGirlMessage def_special ShowBattlePointsWindow @@ -485,7 +485,7 @@ gSpecials:: @ 81DBA64 def_special BufferBattleFrontierTutorMoveName def_special CloseBattleFrontierTutorWindow def_special sub_813ADD4 - def_special OpenPartyMenuForMoveTutor + def_special ChooseMonForMoveTutor def_special GetBattleFrontierTutorMoveIndex def_special sub_813AF48 def_special DoDeoxysRockInteraction @@ -529,7 +529,7 @@ gSpecials:: @ 81DBA64 def_special ShowTrainerHillRecords def_special sub_80B4808 def_special ResetHealLocationFromDewford - def_special sub_81B9918 + def_special IsLastMonThatKnowsSurf def_special CountPartyAliveNonEggMons def_special TryPrepareSecondApproachingTrainer def_special RemoveRecordsWindow diff --git a/graphics/interface/party_menu_misc.bin b/graphics/interface/party_menu_bg.bin similarity index 100% rename from graphics/interface/party_menu_misc.bin rename to graphics/interface/party_menu_bg.bin diff --git a/graphics/interface/party_menu_misc.pal b/graphics/interface/party_menu_bg.pal similarity index 100% rename from graphics/interface/party_menu_misc.pal rename to graphics/interface/party_menu_bg.pal diff --git a/graphics/interface/party_menu_misc.png b/graphics/interface/party_menu_bg.png similarity index 100% rename from graphics/interface/party_menu_misc.png rename to graphics/interface/party_menu_bg.png diff --git a/graphics_file_rules.mk b/graphics_file_rules.mk index bc51b1e1fb..fbdb6348cc 100644 --- a/graphics_file_rules.mk +++ b/graphics_file_rules.mk @@ -409,7 +409,7 @@ $(MASKSGFXDIR)/unknown_C2EA50.4bpp: %.4bpp: %.png $(BATTRANSGFXDIR)/vs_frame.4bpp: %.4bpp: %.png $(GFX) $< $@ -num_tiles 16 -$(INTERFACEGFXDIR)/party_menu_misc.4bpp: %.4bpp: %.png +$(INTERFACEGFXDIR)/party_menu_bg.4bpp: %.4bpp: %.png $(GFX) $< $@ -num_tiles 62 $(TYPESGFXDIR)/move_types.4bpp: $(types:%=$(TYPESGFXDIR)/%.4bpp) $(contest_types:%=$(TYPESGFXDIR)/contest_%.4bpp) diff --git a/include/battle_controllers.h b/include/battle_controllers.h index 365229fda8..32918fefba 100644 --- a/include/battle_controllers.h +++ b/include/battle_controllers.h @@ -248,8 +248,8 @@ void nullsub_21(void); void PlayerHandleGetRawMonData(void); void sub_80587B0(void); void sub_805CC00(struct Sprite *sprite); -void SetCB2ToReshowScreenAfterMenu(void); -void SetCB2ToReshowScreenAfterMenu2(void); +void CB2_SetUpReshowBattleScreenAfterMenu(void); +void CB2_SetUpReshowBattleScreenAfterMenu2(void); void c3_0802FDF4(u8 taskId); void ActionSelectionCreateCursorAt(u8 cursorPos, u8 unused); void ActionSelectionDestroyCursorAt(u8 cursorPos); diff --git a/include/battle_main.h b/include/battle_main.h index c134f819fe..5dd1aed444 100644 --- a/include/battle_main.h +++ b/include/battle_main.h @@ -84,13 +84,13 @@ void RunBattleScriptCommands_PopCallbacksStack(void); void RunBattleScriptCommands(void); bool8 TryRunFromBattle(u8 battlerId); -extern struct UnknownPokemonStruct4 gUnknown_02022FF8[3]; +extern struct UnknownPokemonStruct4 gMultiPartnerParty[PARTY_SIZE / 2]; extern const struct SpriteTemplate gUnknown_0831AC88; extern const struct OamData gOamData_831ACA8; extern const struct OamData gOamData_831ACB0; extern const u8 gTypeEffectiveness[336]; -extern const u8 gTypeNames[][TYPE_NAME_LENGTH + 1]; +extern const u8 gTypeNames[NUMBER_OF_MON_TYPES][TYPE_NAME_LENGTH + 1]; extern const struct TrainerMoney gTrainerMoneyTable[]; extern const u8 gAbilityNames[][ABILITY_NAME_LENGTH + 1]; extern const u8 *const gAbilityDescriptionPointers[]; diff --git a/include/battle_pyramid_bag.h b/include/battle_pyramid_bag.h index c3b799a4d0..f0c6e7ee41 100644 --- a/include/battle_pyramid_bag.h +++ b/include/battle_pyramid_bag.h @@ -36,13 +36,13 @@ extern struct PyramidBagCursorData gPyramidBagCursorData; void InitBattlePyramidBagCursorPosition(void); void CB2_PyramidBagMenuFromStartMenu(void); -void sub_81C4F84(void); +void CB2_ReturnToPyramidBagMenu(void); void sub_81C5924(void); void sub_81C59BC(void); void sub_81C4EFC(void); -void sub_81C4F98(u8 a0, void (*callback)(void)); +void GoToBattlePyramidBagMenu(u8 a0, void (*callback)(void)); void sub_81C6714(u8 taskId); -void sub_81C6A94(void); +void TryStoreHeldItemsInPyramidBag(void); void sub_81C4F24(void); void sub_81C5B14(u8 taskId); void DisplayItemMessageInBattlePyramid(u8 taskId, const u8 *str, void (*callback)(u8 taskId)); diff --git a/include/constants/battle_frontier.h b/include/constants/battle_frontier.h index d287dd2dba..b849686f50 100644 --- a/include/constants/battle_frontier.h +++ b/include/constants/battle_frontier.h @@ -4,16 +4,17 @@ #define FRONTIER_CHALLENGE(facility, mode) ((facility << 8) + mode) // Battle Frontier facility ids. -#define FRONTIER_FACILITY_TOWER 0 -#define FRONTIER_FACILITY_DOME 1 -#define FRONTIER_FACILITY_PALACE 2 -#define FRONTIER_FACILITY_ARENA 3 -#define FRONTIER_FACILITY_FACTORY 4 -#define FRONTIER_FACILITY_PIKE 5 -#define FRONTIER_FACILITY_PYRAMID 6 -#define NUM_FRONTIER_FACILITIES 7 +#define FRONTIER_FACILITY_TOWER 0 +#define FRONTIER_FACILITY_DOME 1 +#define FRONTIER_FACILITY_PALACE 2 +#define FRONTIER_FACILITY_ARENA 3 +#define FRONTIER_FACILITY_FACTORY 4 +#define FRONTIER_FACILITY_PIKE 5 +#define FRONTIER_FACILITY_PYRAMID 6 +#define NUM_FRONTIER_FACILITIES 7 // The multiplayer battle colosseum rooms re-use VAR_FRONTIER_FACILITY. -#define FRONTIER_FACILITY_DOUBLE_COLOSSEUM 9 +#define FACILITY_UNION_ROOM 8 +#define FACILITY_MULTI_OR_EREADER 9 // Direct Corner multi battles, multi battle with Steven, and e-Reader battles #define TENT_VERDANTURF 2 #define TENT_FALLARBOR 3 diff --git a/include/constants/contest.h b/include/constants/contest.h index d3296222b1..0c866069ef 100644 --- a/include/constants/contest.h +++ b/include/constants/contest.h @@ -16,4 +16,10 @@ #define CONTEST_CATEGORY_TOUGH 4 #define CONTEST_CATEGORIES_COUNT 5 +#define CANT_ENTER_CONTEST 0 +#define CAN_ENTER_CONTEST_EQUAL_RANK 1 +#define CAN_ENTER_CONTEST_HIGH_RANK 2 +#define CANT_ENTER_CONTEST_EGG 3 +#define CANT_ENTER_CONTEST_FAINTED 4 + #endif // GUARD_CONSTANTS_CONTEST_H diff --git a/include/constants/flags.h b/include/constants/flags.h index 750990697b..56c06b1c70 100644 --- a/include/constants/flags.h +++ b/include/constants/flags.h @@ -883,7 +883,7 @@ #define FLAG_HIDE_LILCOVE_MOTEL_GAME_DESIGNERS 0x39D #define FLAG_HIDE_MT_CHIMNEY_TEAM_AQUA 0x39E #define FLAG_HIDE_MT_CHIMNEY_TEAM_MAGMA 0x39F -#define FLAG_HIDE_FALLARBOR_HOUSE_1_PROF_COZMO 0x3A0 +#define FLAG_HIDE_FALLARBOR_HOUSE_PROF_COZMO 0x3A0 #define FLAG_HIDE_LAVARIDGE_TOWN_RIVAL_1 0x3A1 #define FLAG_HIDE_LAVARIDGE_TOWN_RIVAL_2 0x3A2 #define FLAG_HIDE_RUSTURF_TUNNEL_ROCK_1 0x3A3 @@ -1552,6 +1552,6 @@ #define FLAG_SPECIAL_FLAG_0x4001 0x4001 #define FLAG_SPECIAL_FLAG_0x4002 0x4002 #define FLAG_SPECIAL_FLAG_0x4003 0x4003 -#define FLAG_SPECIAL_FLAG_0x4004 0x4004 +#define FLAG_STORING_ITEMS_IN_PYRAMID_BAG 0x4004 #endif // GUARD_CONSTANTS_FLAGS_H diff --git a/include/constants/map_groups.h b/include/constants/map_groups.h index 6a3276b443..802c381b53 100755 --- a/include/constants/map_groups.h +++ b/include/constants/map_groups.h @@ -98,8 +98,8 @@ #define MAP_FALLARBOR_TOWN_BATTLE_TENT_BATTLE_ROOM (3 | (5 << 8)) #define MAP_FALLARBOR_TOWN_POKEMON_CENTER_1F (4 | (5 << 8)) #define MAP_FALLARBOR_TOWN_POKEMON_CENTER_2F (5 | (5 << 8)) -#define MAP_FALLARBOR_TOWN_HOUSE1 (6 | (5 << 8)) -#define MAP_FALLARBOR_TOWN_HOUSE2 (7 | (5 << 8)) +#define MAP_FALLARBOR_TOWN_COZMOS_HOUSE (6 | (5 << 8)) +#define MAP_FALLARBOR_TOWN_MOVE_RELEARNERS_HOUSE (7 | (5 << 8)) // Map Group 6 #define MAP_VERDANTURF_TOWN_BATTLE_TENT_LOBBY (0 | (6 << 8)) diff --git a/include/constants/party_menu.h b/include/constants/party_menu.h index 213263b47c..a15280afb0 100644 --- a/include/constants/party_menu.h +++ b/include/constants/party_menu.h @@ -10,13 +10,6 @@ #define AILMENT_PKRS 6 #define AILMENT_FNT 7 -#define PARTY_CHOOSE_MON 0 -#define PARTY_MUST_CHOOSE_MON 1 -#define PARTY_CANT_SWITCH 2 -#define PARTY_USE_ITEM_ON 3 -#define PARTY_ABILITY_PREVENTS 4 -#define PARTY_GIVE_ITEM 5 - #define TUTOR_MOVE_MEGA_PUNCH 0 #define TUTOR_MOVE_SWORDS_DANCE 1 #define TUTOR_MOVE_MEGA_KICK 2 @@ -49,4 +42,91 @@ #define TUTOR_MOVE_FURY_CUTTER 29 #define TUTOR_MOVE_COUNT 30 +#define PARTY_LAYOUT_SINGLE 0 +#define PARTY_LAYOUT_DOUBLE 1 +#define PARTY_LAYOUT_MULTI 2 +#define PARTY_LAYOUT_MULTI_SHOWCASE 3 // The layout during the screen that appears just before a multi battle +#define PARTY_LAYOUT_COUNT 4 +#define KEEP_PARTY_LAYOUT 0xFF + +#define PARTY_MENU_TYPE_FIELD 0 +#define PARTY_MENU_TYPE_IN_BATTLE 1 +#define PARTY_MENU_TYPE_CONTEST 2 +#define PARTY_MENU_TYPE_CHOOSE_MON 3 +#define PARTY_MENU_TYPE_CHOOSE_HALF 4 // multi battles, eReader battles, and some battle facilities +#define PARTY_MENU_TYPE_IN_MULTI_BATTLE 5 // TODO: investigate +#define PARTY_MENU_TYPE_DAYCARE 6 +#define PARTY_MENU_TYPE_MOVE_RELEARNER 7 +#define PARTY_MENU_TYPE_UNION_ROOM_REGISTER 8 // trading board +#define PARTY_MENU_TYPE_UNION_ROOM_TRADE 9 // trading board +#define PARTY_MENU_TYPE_SPIN_TRADE 10 // Unused beta for Gen IV's Spin Trade +#define PARTY_MENU_TYPE_MINIGAME 11 +#define PARTY_MENU_TYPE_STORE_PYRAMID_HELD_ITEMS 12 + +#define PARTY_ACTION_CHOOSE_MON 0 +#define PARTY_ACTION_SEND_OUT 1 +#define PARTY_ACTION_CANT_SWITCH 2 +#define PARTY_ACTION_USE_ITEM 3 +#define PARTY_ACTION_ABILITY_PREVENTS 4 +#define PARTY_ACTION_GIVE_ITEM 5 +#define PARTY_ACTION_GIVE_PC_ITEM 6 // Unused. Not possible to give non-mail items directly from PC +#define PARTY_ACTION_GIVE_MAILBOX_MAIL 7 +#define PARTY_ACTION_SWITCH 8 +#define PARTY_ACTION_SWITCHING 9 +#define PARTY_ACTION_SOFTBOILED 10 +#define PARTY_ACTION_CHOOSE_AND_CLOSE 11 +#define PARTY_ACTION_MOVE_TUTOR 12 +#define PARTY_ACTION_MINIGAME 13 +#define PARTY_ACTION_REUSABLE_ITEM 14 // Unused. The only reusable items are handled separately + +// IDs for DisplayPartyMenuStdMessage, to display the message at the bottom of the party menu +#define PARTY_MSG_CHOOSE_MON 0 +#define PARTY_MSG_CHOOSE_MON_OR_CANCEL 1 +#define PARTY_MSG_CHOOSE_MON_AND_CONFIRM 2 +#define PARTY_MSG_MOVE_TO_WHERE 3 +#define PARTY_MSG_TEACH_WHICH_MON 4 +#define PARTY_MSG_USE_ON_WHICH_MON 5 +#define PARTY_MSG_GIVE_TO_WHICH_MON 6 +#define PARTY_MSG_NOTHING_TO_CUT 7 +#define PARTY_MSG_CANT_SURF_HERE 8 +#define PARTY_MSG_ALREADY_SURFING 9 +#define PARTY_MSG_CURRENT_TOO_FAST 10 +#define PARTY_MSG_ENJOY_CYCLING 11 +#define PARTY_MSG_ALREADY_IN_USE 12 +#define PARTY_MSG_CANT_USE_HERE 13 +#define PARTY_MSG_NO_MON_FOR_BATTLE 14 +#define PARTY_MSG_CHOOSE_MON_2 15 +#define PARTY_MSG_NOT_ENOUGH_HP 16 +#define PARTY_MSG_X_MONS_ARE_NEEDED 17 +#define PARTY_MSG_MONS_CANT_BE_SAME 18 +#define PARTY_MSG_NO_SAME_HOLD_ITEMS 19 +#define PARTY_MSG_UNUSED 20 +#define PARTY_MSG_DO_WHAT_WITH_MON 21 +#define PARTY_MSG_RESTORE_WHICH_MOVE 22 +#define PARTY_MSG_BOOST_PP_WHICH_MOVE 23 +#define PARTY_MSG_DO_WHAT_WITH_ITEM 24 +#define PARTY_MSG_DO_WHAT_WITH_MAIL 25 +#define PARTY_MSG_ALREADY_HOLDING_ONE 26 +#define PARTY_MSG_NONE 127 + +// IDs for DisplayPartyPokemonDescriptionText, to display a message in the party pokemon's box +#define PARTYBOX_DESC_NO_USE 0 +#define PARTYBOX_DESC_ABLE_3 1 +#define PARTYBOX_DESC_FIRST 2 +#define PARTYBOX_DESC_SECOND 3 +#define PARTYBOX_DESC_THIRD 4 +#define PARTYBOX_DESC_FOURTH 5 +#define PARTYBOX_DESC_ABLE 6 +#define PARTYBOX_DESC_NOT_ABLE 7 +#define PARTYBOX_DESC_ABLE_2 8 +#define PARTYBOX_DESC_NOT_ABLE_2 9 +#define PARTYBOX_DESC_LEARNED 10 +#define PARTYBOX_DESC_HAVE 11 +#define PARTYBOX_DESC_DONT_HAVE 12 + +#define SELECTWINDOW_ACTIONS 0 +#define SELECTWINDOW_ITEM 1 +#define SELECTWINDOW_MAIL 2 +#define SELECTWINDOW_MOVES 3 + #endif // GUARD_CONSTANTS_PARTY_MENU_H diff --git a/include/constants/pokemon.h b/include/constants/pokemon.h index 5cd98d3f39..b2084f1543 100644 --- a/include/constants/pokemon.h +++ b/include/constants/pokemon.h @@ -184,7 +184,6 @@ #define OT_ID_PRESET 1 #define OT_ID_RANDOM_NO_SHINY 2 - #define MON_GIVEN_TO_PARTY 0 #define MON_GIVEN_TO_PC 1 #define MON_CANT_GIVE 2 @@ -193,6 +192,9 @@ #define PLAYER_HAS_ONE_MON 1 #define PLAYER_HAS_ONE_USABLE_MON 2 +#define MON_ALREADY_KNOWS_MOVE 0xFFFE +#define MON_HAS_MAX_MOVES 0xFFFF + #define MON_MALE 0x00 #define MON_FEMALE 0xFE #define MON_GENDERLESS 0xFF diff --git a/include/constants/trade.h b/include/constants/trade.h index 4fb8966d0c..fa42e6b43f 100644 --- a/include/constants/trade.h +++ b/include/constants/trade.h @@ -20,13 +20,13 @@ #define READY_FINISH_TRADE 1 #define FINISH_TRADE 2 -// Return values for CanTradeSelectedMon and CanTradeSelectedPartyMenuMon +// Return values for CanTradeSelectedMon and CanSpinTradeMon #define CAN_TRADE_MON 0 #define CANT_TRADE_LAST_MON 1 #define CANT_TRADE_NATIONAL 2 -#define CANT_TRADE_EGG 3 +#define CANT_TRADE_EGG_YET 3 #define CANT_TRADE_INVALID_MON 4 -#define CANT_TRADE_EGG2 5 +#define CANT_TRADE_EGG_YET2 5 // Return values for CheckValidityOfTradeMons #define PLAYER_MON_INVALID 0 diff --git a/include/contest.h b/include/contest.h index 2b1b95af5f..aeedc63b13 100644 --- a/include/contest.h +++ b/include/contest.h @@ -466,7 +466,7 @@ void CB2_StartContest(void); void sub_80DA8C8(u8 partyIndex); void sub_80DAB8C(u8 contestType, u8 rank); void sub_80DACBC(u8 contestType, u8 rank, bool32 isPostgame); -u8 sub_80DAE0C(struct Pokemon *pkmn); +u8 GetContestEntryEligibility(struct Pokemon *pkmn); void sub_80DB09C(u8 contestCategory); bool8 IsSpeciesNotUnown(u16 species); bool8 Contest_IsMonsTurnDisabled(u8 a); diff --git a/include/field_effect.h b/include/field_effect.h index 0dbe600d34..0a99938d7f 100644 --- a/include/field_effect.h +++ b/include/field_effect.h @@ -12,7 +12,7 @@ extern bool8 (*gFieldCallback2)(void); u32 FieldEffectStart(u8); bool8 FieldEffectActiveListContains(u8 id); void FieldEffectActiveListClear(void); -void sub_80B69DC(void); +void ReturnToFieldFromFlyMapSelect(void); u8 AddNewGameBirchObject(s16, s16, u8); void FieldEffectStop(struct Sprite *sprite, u8 id); u8 CreateTrainerSprite(u8 trainerSpriteID, s16 x, s16 y, u8 subpriority, u8 *buffer); diff --git a/include/fldeff.h b/include/fldeff.h index ff6c9823fb..5da189c2a8 100644 --- a/include/fldeff.h +++ b/include/fldeff.h @@ -28,8 +28,8 @@ bool8 sub_80E1584(void); // soft-boiled bool8 SetUpFieldMove_SoftBoiled(void); -void sub_81615A8(u8 taskId); -void sub_8161560(u8 taskId); +void Task_TryUseSoftboiledOnPartyMon(u8 taskId); +void ChooseMonForSoftboiled(u8 taskId); // flash bool8 SetUpFieldMove_Flash(void); diff --git a/include/graphics.h b/include/graphics.h index a08d3760ff..37dd77e898 100644 --- a/include/graphics.h +++ b/include/graphics.h @@ -3916,9 +3916,9 @@ extern const u16 gIntro2FlygonPal[]; extern const u32 gIntro2FlygonGfx[]; // party menu graphics -extern const u32 gPartyMenuMisc_Gfx[]; -extern const u32 gPartyMenuMisc_Tilemap[]; -extern const u32 gPartyMenuMisc_Pal[]; +extern const u32 gPartyMenuBg_Gfx[]; +extern const u32 gPartyMenuBg_Tilemap[]; +extern const u32 gPartyMenuBg_Pal[]; // berry pics extern const u32 gBerryPic_Cheri[]; diff --git a/include/menu.h b/include/menu.h index 62e2558dc1..14f4c130d6 100644 --- a/include/menu.h +++ b/include/menu.h @@ -1,4 +1,3 @@ - #ifndef GUARD_MENU_H #define GUARD_MENU_H @@ -95,7 +94,7 @@ void PrintMenuGridTable(u8 windowId, u8 optionWidth, u8 columns, u8 rows, const s8 Menu_ProcessInputGridLayout(void); u8 InitMenuInUpperLeftCorner(u8 windowId, u8 itemCount, u8 initialCursorPos, bool8 APressMuted); s8 Menu_ProcessInputNoWrapAround_other(void); -void sub_8199CBC(u8 bgId, u16 *dest, u8 left, u8 top, u8 width, u8 height); +void CopyToBufferFromBgTilemap(u8 bgId, u16 *dest, u8 left, u8 top, u8 width, u8 height); u8 sub_81980F0(u8 bg, u8 xPos, u8 yPos, u8 palette, u16 baseTile); void sub_8198314(void); void sub_8198180(const u8 *string, u8 a2, bool8 copyToVram); diff --git a/include/menu_helpers.h b/include/menu_helpers.h index 3b6c13172c..442f4a063f 100644 --- a/include/menu_helpers.h +++ b/include/menu_helpers.h @@ -4,6 +4,9 @@ #include "task.h" #include "window.h" +#define MENU_L_PRESSED 1 +#define MENU_R_PRESSED 2 + // Exported type declarations struct YesNoFuncTable @@ -23,8 +26,8 @@ bool16 RunTextPrintersRetIsActive(u8 textPrinterId); void DoYesNoFuncWithChoice(u8 taskId, const struct YesNoFuncTable *data); void CreateYesNoMenuWithCallbacks(u8 taskId, const struct WindowTemplate *template, u8 arg2, u8 arg3, u8 arg4, u16 tileStart, u8 palette, const struct YesNoFuncTable *yesNo); bool8 AdjustQuantityAccordingToDPadInput(s16 *arg0, u16 arg1); -u8 GetLRKeysState(void); -u8 sub_812210C(void); +u8 GetLRKeysPressed(void); +u8 GetLRKeysPressedAndHeld(void); bool8 sub_8122148(u16 itemId); bool8 itemid_80BF6D8_mail_related(u16 itemId); bool8 sub_81221AC(void); diff --git a/include/party_menu.h b/include/party_menu.h index a26cdb4cd3..c9c62febec 100644 --- a/include/party_menu.h +++ b/include/party_menu.h @@ -4,93 +4,89 @@ #include "main.h" #include "task.h" -#include "constants/party_menu.h" - -struct Struct203CEC8 +struct PartyMenu { MainCallback exitCallback; - TaskFunc unk4; - u8 unk8_0:4; - u8 mode:2; - u8 unk8_2:2; + TaskFunc task; + u8 menuType:4; + u8 layout:2; + u8 unused:2; s8 slotId; - s8 unkA; - u8 unkB; - u16 unkC; - s16 unkE; - s16 unk10; + s8 slotId2; + u8 action; + u16 bagItem; + s16 unkE; // used as both a moveId and a move slot/cursor position + s16 learnMoveState; }; -extern struct Struct203CEC8 gUnknown_0203CEC8; -extern u8 gUnknown_0203CEE8; +extern struct PartyMenu gPartyMenu; +extern bool8 gUnknown_0203CEE8; extern u8 gUnknown_0203CEE9; extern MainCallback gPostMenuFieldCallback; extern u8 gSelectedOrderFromParty[4]; -extern u8 gUnknown_0203CF00[3]; +extern u8 gBattlePartyCurrentOrder[3]; -extern void (*gUnknown_03006328)(u8, TaskFunc); +extern void (*gItemUseCB)(u8, TaskFunc); extern const u16 gTutorMoves[]; -void sub_81B0FCC(u8 slot, u8 b); +void AnimatePartySlot(u8 slot, u8 animNum); bool8 IsMultiBattle(void); u8 GetCursorSelectionMonId(void); -u8 sub_81B1360(void); -void sub_81B1370(u8 taskId); +u8 GetPartyMenuType(void); +void Task_HandleChooseMonInput(u8 taskId); u8* GetMonNickname(struct Pokemon *mon, u8 *dest); -u8 DisplayPartyMenuMessage(const u8* str, u8 b); -bool8 sub_81B1BD4(void); -void sub_81B1F18(u8 taskId, u8 slot, s8 c, s16 HPDifference, TaskFunc func); -u8 pokemon_ailments_get_primary(u32 status); +u8 DisplayPartyMenuMessage(const u8* str, bool8 keepOpen); +bool8 IsPartyMenuTextPrinterActive(void); +void PartyMenuModifyHP(u8 taskId, u8 slot, s8 c, s16 HPDifference, TaskFunc func); +u8 GetAilmentFromStatus(u32 status); u8 GetMonAilment(struct Pokemon *mon); void DisplayPartyMenuStdMessage(u32 stringID); -void sub_81B47E0(u8 taskId); bool8 FieldCallback_PrepareFadeInFromMenu(void); -void sub_81B58A8(void); +void CB2_ReturnToPartyMenuFromFlyMap(void); void LoadHeldItemIcons(void); void DrawHeldItemIconsForTrade(u8 *a, u8 *b, u8 c); -void sub_81B617C(void); +void CB2_ShowPartyMenuForItemUse(void); void ItemUseCB_Medicine(u8 taskId, TaskFunc task); -void sub_81B67C8(u8 taskId, TaskFunc task); -void dp05_ether(u8 taskId, TaskFunc task); -void dp05_pp_up(u8 taskId, TaskFunc task); +void ItemUseCB_ReduceEV(u8 taskId, TaskFunc task); +void ItemUseCB_PPRecovery(u8 taskId, TaskFunc task); +void ItemUseCB_PPUp(u8 taskId, TaskFunc task); u16 ItemIdToBattleMoveId(u16 item); bool8 IsMoveHm(u16 move); bool8 MonKnowsMove(struct Pokemon *mon, u16 move); -void sub_81B6DC4(u8 taskId, TaskFunc task); -void dp05_rare_candy(u8 taskId, TaskFunc task); -void sub_81B79E8(u8 taskId, TaskFunc task); -void sub_81B7C74(u8 taskId, TaskFunc task); +void ItemUseCB_TMHM(u8 taskId, TaskFunc task); +void ItemUseCB_RareCandy(u8 taskId, TaskFunc task); +void ItemUseCB_SacredAsh(u8 taskId, TaskFunc task); +void ItemUseCB_EvolutionStone(u8 taskId, TaskFunc task); u8 GetItemEffectType(u16 item); void CB2_PartyMenuFromStartMenu(void); -void sub_81B7F60(void); -void sub_81B8448(void); +void CB2_ChooseMonToGiveItem(void); +void ChooseMonToGiveMailFromMailbox(void); void InitChooseHalfPartyForBattle(u8 unused); -void sub_81B8558(void); -void sub_81B8904(u8 initArg, MainCallback callback); -void OpenPartyMenuForMoveTutor(void); -void ChooseMonForWirelessMinigame(void); +void ClearSelectedPartyOrder(void); +void ChooseMonForTradingBoard(u8 initArg, MainCallback callback); +void ChooseMonForMoveTutor(void); void ChooseMonForWirelessMinigame(void); void OpenPartyMenuInBattle(u8 arg); -void sub_81B89F0(void); +void ChooseMonForInBattleItem(void); void sub_81B8C68(void); void sub_81B8D64(u8 battlerId, u8 multiplayerFlag); void sub_81B8E80(u8 battlerId, u8 unk, u8 arrayIndex); -void sub_81B8FB0(u8 slot, u8 slot2); -u8 pokemon_order_func(u8 slot); -void sub_81B9150(void); -void sub_81B9328(void); -bool8 hm_add_c3_without_phase_2(void); -void sub_81B9404(void); -void sub_81B94B0(void); -void sub_81B951C(void); -void sub_81B9620(void); -void sub_81B95E0(void); -void sub_81B98DC(void); -void sub_81B9918(void); -void sub_81B9770(void); -void sub_81B9718(void); -void sub_81B96D0(void); -void sub_81B968C(void); +void SwitchPartyMonSlots(u8 slot, u8 slot2); +u8 GetBattlerPartyId(u8 slot); +void ShowPartyMenuToShowcaseMultiBattleParty(void); +void ChooseMonForDaycare(void); +bool8 CB2_FadeFromPartyMenu(void); +void ChooseContestMon(void); +void ChoosePartyMon(void); +void ChooseMonForMoveRelearner(void); +void BattlePyramidChooseMonHeldItems(void); +void DoBattlePyramidMonsHaveHeldItem(void); +void IsSelectedMonEgg(void); +void IsLastMonThatKnowsSurf(void); +void MoveDeleterForgetMove(void); +void BufferMoveDeleterNicknameAndMove(void); +void GetNumMovesSelectedMonHas(void); +void MoveDeleterChooseMoveToForget(void); #endif // GUARD_PARTY_MENU_H diff --git a/include/pokemon.h b/include/pokemon.h index 6a34e3cda0..bb71aa8779 100644 --- a/include/pokemon.h +++ b/include/pokemon.h @@ -287,7 +287,6 @@ void BoxMonToMon(const struct BoxPokemon *src, struct Pokemon *dest); u8 GetLevelFromMonExp(struct Pokemon *mon); u8 GetLevelFromBoxMonExp(struct BoxPokemon *boxMon); u16 GiveMoveToMon(struct Pokemon *mon, u16 move); -u16 GiveMoveToBoxMon(struct BoxPokemon *boxMon, u16 move); u16 GiveMoveToBattleMon(struct BattlePokemon *mon, u16 move); void SetMonMoveSlot(struct Pokemon *mon, u16 move, u8 slot); void SetBattleMonMoveSlot(struct BattlePokemon *mon, u16 move, u8 slot); diff --git a/include/pokemon_summary_screen.h b/include/pokemon_summary_screen.h index 20d881702a..07d541cac4 100755 --- a/include/pokemon_summary_screen.h +++ b/include/pokemon_summary_screen.h @@ -9,10 +9,9 @@ extern const u8 *const gMoveDescriptionPointers[]; extern const u8 *const gNatureNamePointers[]; void ShowPokemonSummaryScreen(u8 mode, void *mons, u8 monIndex, u8 maxMonIndex, void (*callback)(void)); -void sub_81C4F98(u8, void(*)(void)); void ShowSelectMovePokemonSummaryScreen(struct Pokemon *, u8, u8, MainCallback, u16); void ShowPokemonSummaryScreenSet40EF(u8 mode, struct BoxPokemon *mons, u8 monIndex, u8 maxMonIndex, void (*callback)(void)); -u8 sub_81C1B94(void); +u8 GetMoveSlotToReplace(void); void SummaryScreen_SetUnknownTaskId(u8 a0); void SummaryScreen_DestroyUnknownTask(void); diff --git a/include/region_map.h b/include/region_map.h index 798e6f56d0..0d219643d1 100644 --- a/include/region_map.h +++ b/include/region_map.h @@ -102,7 +102,7 @@ void CreateRegionMapPlayerIcon(u16 x, u16 y); void CreateRegionMapCursor(u16 tileTag, u16 paletteTag); u8 *GetMapName(u8 *, u16, u16); bool32 sub_8124668(u8 mapSecId); -u8 *sub_81245DC(u8 *dest, u16 mapSecId); +u8 *GetMapNameGeneric(u8 *dest, u16 mapSecId); u8 *sub_8124610(u8 *dest, u16 mapSecId); u16 CorrectSpecialMapSecId(u16 mapSecId); void sub_8122D88(struct RegionMap *regionMap); diff --git a/include/script_pokemon_81B9.h b/include/script_pokemon_81B9.h deleted file mode 100644 index 1b8563ee66..0000000000 --- a/include/script_pokemon_81B9.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef GUARD_SCRIPTPOKE81B9_H -#define GUARD_SCRIPTPOKE81B9_H - -void sub_81B9404(void); - -#endif diff --git a/include/strings.h b/include/strings.h index 0b678f2f5d..2c5a7bb83d 100644 --- a/include/strings.h +++ b/include/strings.h @@ -411,7 +411,7 @@ extern const u8 gText_CantBeUsedOnPkmn[]; extern const u8 gText_CancelParticipation[]; extern const u8 gText_PkmnWasGivenItem[]; extern const u8 gText_ReceivedItemFromPkmn[]; -extern const u8 gText_SwitchPkmnItem[]; +extern const u8 gText_PkmnAlreadyHoldingItemSwitch[]; extern const u8 gText_SwitchedPkmnItem[]; extern const u8 gText_BagFullCouldNotRemoveItem[]; extern const u8 gText_PkmnCantParticipate[]; @@ -427,7 +427,7 @@ extern const u8 gText_NoMoreThanVar1Pkmn[]; extern const u8 gText_PkmnCantBeTradedNow[]; extern const u8 gText_EggCantBeTradedNow[]; extern const u8 gText_OnlyPkmnForBattle[]; -extern const u8 gJPText_PutVar1IntoSpinner[]; +extern const u8 gJPText_AreYouSureYouWantToSpinTradeMon[]; extern const u8 gText_PauseUntilPress[]; extern const u8 gText_CantUseUntilNewBadge[]; extern const u8 gText_ReturnToHealingSpot[]; diff --git a/include/trade.h b/include/trade.h index 42bfc14827..72a04ed217 100644 --- a/include/trade.h +++ b/include/trade.h @@ -18,7 +18,7 @@ void CB2_StartCreateTradeMenu(void); void CB2_LinkTrade(void); int CanRegisterMonForTradingBoard(struct UnkLinkRfuStruct_02022B14Substruct a0, u16, u16, u8); int GetUnionRoomTradeMessageId(struct UnkLinkRfuStruct_02022B14Substruct a0, struct UnkLinkRfuStruct_02022B14Substruct a1, u16 a2, u16 a3, u8 a4, u16 a5, u8 a6); -int CanTradeSelectedPartyMenuMon(struct Pokemon*, u16); +int CanSpinTradeMon(struct Pokemon*, u16); void InitTradeSequenceBgGpuRegs(void); void LinkTradeDrawWindow(void); void InitTradeBg(void); diff --git a/src/battle_controller_player.c b/src/battle_controller_player.c index 1be5def470..840ba6e629 100644 --- a/src/battle_controller_player.c +++ b/src/battle_controller_player.c @@ -31,6 +31,7 @@ #include "constants/battle_anim.h" #include "constants/items.h" #include "constants/moves.h" +#include "constants/party_menu.h" #include "constants/songs.h" #include "constants/trainers.h" #include "constants/rgb.h" @@ -1341,10 +1342,10 @@ static void WaitForMonSelection(void) { if (gMain.callback2 == BattleMainCB2 && !gPaletteFade.active) { - if (gUnknown_0203CEE8 == 1) - BtlController_EmitChosenMonReturnValue(1, gUnknown_0203CEE9, gUnknown_0203CF00); + if (gUnknown_0203CEE8 == TRUE) + BtlController_EmitChosenMonReturnValue(1, gUnknown_0203CEE9, gBattlePartyCurrentOrder); else - BtlController_EmitChosenMonReturnValue(1, 6, NULL); + BtlController_EmitChosenMonReturnValue(1, PARTY_SIZE, NULL); if ((gBattleBufferA[gActiveBattler][1] & 0xF) == 1) PrintLinkStandbyMsg(); @@ -1531,12 +1532,12 @@ void ActionSelectionDestroyCursorAt(u8 cursorPosition) CopyBgTilemapBufferToVram(0); } -void SetCB2ToReshowScreenAfterMenu(void) +void CB2_SetUpReshowBattleScreenAfterMenu(void) { SetMainCallback2(ReshowBattleScreenAfterMenu); } -void SetCB2ToReshowScreenAfterMenu2(void) +void CB2_SetUpReshowBattleScreenAfterMenu2(void) { SetMainCallback2(ReshowBattleScreenAfterMenu); } @@ -2632,20 +2633,20 @@ static void PlayerHandleChooseItem(void) gBattlerControllerFuncs[gActiveBattler] = OpenBagAndChooseItem; gBattlerInMenuId = gActiveBattler; - for (i = 0; i < 3; i++) - gUnknown_0203CF00[i] = gBattleBufferA[gActiveBattler][1 + i]; + for (i = 0; i < (int)ARRAY_COUNT(gBattlePartyCurrentOrder); i++) + gBattlePartyCurrentOrder[i] = gBattleBufferA[gActiveBattler][1 + i]; } static void PlayerHandleChoosePokemon(void) { s32 i; - for (i = 0; i < 3; i++) - gUnknown_0203CF00[i] = gBattleBufferA[gActiveBattler][4 + i]; + for (i = 0; i < (int)ARRAY_COUNT(gBattlePartyCurrentOrder); i++) + gBattlePartyCurrentOrder[i] = gBattleBufferA[gActiveBattler][4 + i]; - if (gBattleTypeFlags & BATTLE_TYPE_ARENA && (gBattleBufferA[gActiveBattler][1] & 0xF) != PARTY_CANT_SWITCH) + if (gBattleTypeFlags & BATTLE_TYPE_ARENA && (gBattleBufferA[gActiveBattler][1] & 0xF) != PARTY_ACTION_CANT_SWITCH) { - BtlController_EmitChosenMonReturnValue(1, gBattlerPartyIndexes[gActiveBattler] + 1, gUnknown_0203CF00); + BtlController_EmitChosenMonReturnValue(1, gBattlerPartyIndexes[gActiveBattler] + 1, gBattlePartyCurrentOrder); PlayerBufferExecCompleted(); } else diff --git a/src/battle_controllers.c b/src/battle_controllers.c index 17db0b8688..236b0bb5e4 100644 --- a/src/battle_controllers.c +++ b/src/battle_controllers.c @@ -1175,13 +1175,13 @@ void BtlController_EmitChooseItem(u8 bufferId, u8 *arg1) PrepareBufferDataTransfer(bufferId, sBattleBuffersTransferData, 4); } -void BtlController_EmitChoosePokemon(u8 bufferId, u8 caseId, u8 arg2, u8 abilityId, u8 *arg4) +void BtlController_EmitChoosePokemon(u8 bufferId, u8 caseId, u8 slotId, u8 abilityId, u8 *arg4) { s32 i; sBattleBuffersTransferData[0] = CONTROLLER_CHOOSEPOKEMON; sBattleBuffersTransferData[1] = caseId; - sBattleBuffersTransferData[2] = arg2; + sBattleBuffersTransferData[2] = slotId; sBattleBuffersTransferData[3] = abilityId; for (i = 0; i < 3; i++) sBattleBuffersTransferData[4 + i] = arg4[i]; @@ -1311,12 +1311,12 @@ void BtlController_EmitTwoReturnValues(u8 bufferId, u8 arg1, u16 arg2) PrepareBufferDataTransfer(bufferId, sBattleBuffersTransferData, 4); } -void BtlController_EmitChosenMonReturnValue(u8 bufferId, u8 b, u8 *c) +void BtlController_EmitChosenMonReturnValue(u8 bufferId, u8 partyId, u8 *c) { s32 i; sBattleBuffersTransferData[0] = CONTROLLER_CHOSENMONRETURNVALUE; - sBattleBuffersTransferData[1] = b; + sBattleBuffersTransferData[1] = partyId; for (i = 0; i < 3; i++) sBattleBuffersTransferData[2 + i] = c[i]; PrepareBufferDataTransfer(bufferId, sBattleBuffersTransferData, 5); diff --git a/src/battle_dome.c b/src/battle_dome.c index 22a1ecaf27..a7d7a92f1f 100644 --- a/src/battle_dome.c +++ b/src/battle_dome.c @@ -2330,7 +2330,7 @@ static void GetDomeData(void) } break; case 8: - sub_81B8558(); + ClearSelectedPartyOrder(); gSelectedOrderFromParty[0] = gSaveBlock2Ptr->frontier.field_CB0; gSelectedOrderFromParty[1] = gSaveBlock2Ptr->frontier.field_CB0 >> 8; break; diff --git a/src/battle_gfx_sfx_util.c b/src/battle_gfx_sfx_util.c index 737e6b61ed..a70a9c34b4 100644 --- a/src/battle_gfx_sfx_util.c +++ b/src/battle_gfx_sfx_util.c @@ -1061,8 +1061,8 @@ void HandleBattleLowHpMusicChange(void) { u8 playerBattler1 = GetBattlerAtPosition(B_POSITION_PLAYER_LEFT); u8 playerBattler2 = GetBattlerAtPosition(B_POSITION_PLAYER_RIGHT); - u8 battler1PartyId = pokemon_order_func(gBattlerPartyIndexes[playerBattler1]); - u8 battler2PartyId = pokemon_order_func(gBattlerPartyIndexes[playerBattler2]); + u8 battler1PartyId = GetBattlerPartyId(gBattlerPartyIndexes[playerBattler1]); + u8 battler2PartyId = GetBattlerPartyId(gBattlerPartyIndexes[playerBattler2]); if (GetMonData(&gPlayerParty[battler1PartyId], MON_DATA_HP) != 0) HandleLowHpMusicChange(&gPlayerParty[battler1PartyId], playerBattler1); diff --git a/src/battle_main.c b/src/battle_main.c index a8f17dc3b2..863fabef82 100644 --- a/src/battle_main.c +++ b/src/battle_main.c @@ -54,6 +54,7 @@ #include "constants/hold_effects.h" #include "constants/items.h" #include "constants/moves.h" +#include "constants/party_menu.h" #include "constants/rgb.h" #include "constants/songs.h" #include "constants/species.h" @@ -166,8 +167,8 @@ EWRAM_DATA static u32 sUnusedUnknownArray[25] = {0}; EWRAM_DATA u32 gBattleTypeFlags = 0; EWRAM_DATA u8 gBattleTerrain = 0; EWRAM_DATA u32 gUnknown_02022FF4 = 0; -EWRAM_DATA struct UnknownPokemonStruct4 gUnknown_02022FF8[3] = {0}; // what is it used for? -EWRAM_DATA struct UnknownPokemonStruct4* gUnknown_02023058 = NULL; // what is it used for? +EWRAM_DATA struct UnknownPokemonStruct4 gMultiPartnerParty[PARTY_SIZE / 2] = {0}; +EWRAM_DATA static struct UnknownPokemonStruct4* sMultiPartnerPartyBuffer = NULL; EWRAM_DATA u8 *gUnknown_0202305C = NULL; EWRAM_DATA u8 *gUnknown_02023060 = NULL; EWRAM_DATA u8 gBattleBufferA[MAX_BATTLERS_COUNT][0x200] = {0}; @@ -453,7 +454,7 @@ const u8 gTypeEffectiveness[336] = TYPE_ENDTABLE, TYPE_ENDTABLE, TYPE_MUL_NO_EFFECT }; -const u8 gTypeNames[][TYPE_NAME_LENGTH + 1] = +const u8 gTypeNames[NUMBER_OF_MON_TYPES][TYPE_NAME_LENGTH + 1] = { _("NORMAL"), _("FIGHT"), @@ -1248,12 +1249,12 @@ static void CB2_HandleStartMultiPartnerBattle(void) if (gLinkPlayers[playerMultiplayerId].id != 0) { memcpy(gPlayerParty, gBlockRecvBuffer[enemyMultiplayerId], sizeof(struct Pokemon) * 2); - memcpy(gPlayerParty + 3, gBlockRecvBuffer[playerMultiplayerId], sizeof(struct Pokemon) * 2); + memcpy(gPlayerParty + PARTY_SIZE / 2, gBlockRecvBuffer[playerMultiplayerId], sizeof(struct Pokemon) * 2); } else { memcpy(gPlayerParty, gBlockRecvBuffer[playerMultiplayerId], sizeof(struct Pokemon) * 2); - memcpy(gPlayerParty + 3, gBlockRecvBuffer[enemyMultiplayerId], sizeof(struct Pokemon) * 2); + memcpy(gPlayerParty + PARTY_SIZE / 2, gBlockRecvBuffer[enemyMultiplayerId], sizeof(struct Pokemon) * 2); } gBattleCommunication[MULTIUSE_STATE]++; } @@ -1396,22 +1397,22 @@ static void sub_80379F8(u8 arrayIdPlus) { s32 i; - for (i = 0; i < 3; i++) + for (i = 0; i < (int)ARRAY_COUNT(gMultiPartnerParty); i++) { - gUnknown_02022FF8[i].species = GetMonData(&gPlayerParty[arrayIdPlus + i], MON_DATA_SPECIES); - gUnknown_02022FF8[i].heldItem = GetMonData(&gPlayerParty[arrayIdPlus + i], MON_DATA_HELD_ITEM); - GetMonData(&gPlayerParty[arrayIdPlus + i], MON_DATA_NICKNAME, gUnknown_02022FF8[i].nickname); - gUnknown_02022FF8[i].level = GetMonData(&gPlayerParty[arrayIdPlus + i], MON_DATA_LEVEL); - gUnknown_02022FF8[i].hp = GetMonData(&gPlayerParty[arrayIdPlus + i], MON_DATA_HP); - gUnknown_02022FF8[i].maxhp = GetMonData(&gPlayerParty[arrayIdPlus + i], MON_DATA_MAX_HP); - gUnknown_02022FF8[i].status = GetMonData(&gPlayerParty[arrayIdPlus + i], MON_DATA_STATUS); - gUnknown_02022FF8[i].personality = GetMonData(&gPlayerParty[arrayIdPlus + i], MON_DATA_PERSONALITY); - gUnknown_02022FF8[i].gender = GetMonGender(&gPlayerParty[arrayIdPlus + i]); - StripExtCtrlCodes(gUnknown_02022FF8[i].nickname); + gMultiPartnerParty[i].species = GetMonData(&gPlayerParty[arrayIdPlus + i], MON_DATA_SPECIES); + gMultiPartnerParty[i].heldItem = GetMonData(&gPlayerParty[arrayIdPlus + i], MON_DATA_HELD_ITEM); + GetMonData(&gPlayerParty[arrayIdPlus + i], MON_DATA_NICKNAME, gMultiPartnerParty[i].nickname); + gMultiPartnerParty[i].level = GetMonData(&gPlayerParty[arrayIdPlus + i], MON_DATA_LEVEL); + gMultiPartnerParty[i].hp = GetMonData(&gPlayerParty[arrayIdPlus + i], MON_DATA_HP); + gMultiPartnerParty[i].maxhp = GetMonData(&gPlayerParty[arrayIdPlus + i], MON_DATA_MAX_HP); + gMultiPartnerParty[i].status = GetMonData(&gPlayerParty[arrayIdPlus + i], MON_DATA_STATUS); + gMultiPartnerParty[i].personality = GetMonData(&gPlayerParty[arrayIdPlus + i], MON_DATA_PERSONALITY); + gMultiPartnerParty[i].gender = GetMonGender(&gPlayerParty[arrayIdPlus + i]); + StripExtCtrlCodes(gMultiPartnerParty[i].nickname); if (GetMonData(&gPlayerParty[arrayIdPlus + i], MON_DATA_LANGUAGE) != LANGUAGE_JAPANESE) - PadNameString(gUnknown_02022FF8[i].nickname, CHAR_SPACE); + PadNameString(gMultiPartnerParty[i].nickname, CHAR_SPACE); } - memcpy(gUnknown_02023058, gUnknown_02022FF8, sizeof(gUnknown_02022FF8)); + memcpy(sMultiPartnerPartyBuffer, gMultiPartnerParty, sizeof(gMultiPartnerParty)); } static void CB2_PreInitMultiBattle(void) @@ -1443,9 +1444,9 @@ static void CB2_PreInitMultiBattle(void) case 0: if (gReceivedRemoteLinkPlayers != 0 && IsLinkTaskFinished()) { - gUnknown_02023058 = Alloc(sizeof(struct UnknownPokemonStruct4) * 3); + sMultiPartnerPartyBuffer = Alloc(sizeof(struct UnknownPokemonStruct4) * ARRAY_COUNT(gMultiPartnerParty)); sub_80379F8(0); - SendBlock(bitmask_all_link_players_but_self(), gUnknown_02023058, sizeof(struct UnknownPokemonStruct4) * 3); + SendBlock(bitmask_all_link_players_but_self(), sMultiPartnerPartyBuffer, sizeof(struct UnknownPokemonStruct4) * ARRAY_COUNT(gMultiPartnerParty)); gBattleCommunication[MULTIUSE_STATE]++; } break; @@ -1458,24 +1459,24 @@ static void CB2_PreInitMultiBattle(void) if (i == playerMultiplierId) continue; - if (numPlayers == 4) + if (numPlayers == MAX_LINK_PLAYERS) { if ((!(gLinkPlayers[i].id & 1) && !(gLinkPlayers[playerMultiplierId].id & 1)) || (gLinkPlayers[i].id & 1 && gLinkPlayers[playerMultiplierId].id & 1)) { - memcpy(gUnknown_02022FF8, gBlockRecvBuffer[i], sizeof(struct UnknownPokemonStruct4) * 3); + memcpy(gMultiPartnerParty, gBlockRecvBuffer[i], sizeof(struct UnknownPokemonStruct4) * ARRAY_COUNT(gMultiPartnerParty)); } } else { - memcpy(gUnknown_02022FF8, gBlockRecvBuffer[i], sizeof(struct UnknownPokemonStruct4) * 3); + memcpy(gMultiPartnerParty, gBlockRecvBuffer[i], sizeof(struct UnknownPokemonStruct4) * ARRAY_COUNT(gMultiPartnerParty)); } } gBattleCommunication[MULTIUSE_STATE]++; *savedCallback = gMain.savedCallback; *savedBattleTypeFlags = gBattleTypeFlags; gMain.savedCallback = CB2_PreInitMultiBattle; - sub_81B9150(); + ShowPartyMenuToShowcaseMultiBattleParty(); } break; case 2: @@ -1496,8 +1497,8 @@ static void CB2_PreInitMultiBattle(void) gBattleTypeFlags = *savedBattleTypeFlags; gMain.savedCallback = *savedCallback; SetMainCallback2(CB2_InitBattleInternal); - Free(gUnknown_02023058); - gUnknown_02023058 = NULL; + Free(sMultiPartnerPartyBuffer); + sMultiPartnerPartyBuffer = NULL; } } else if (gReceivedRemoteLinkPlayers == 0) @@ -1505,8 +1506,8 @@ static void CB2_PreInitMultiBattle(void) gBattleTypeFlags = *savedBattleTypeFlags; gMain.savedCallback = *savedCallback; SetMainCallback2(CB2_InitBattleInternal); - Free(gUnknown_02023058); - gUnknown_02023058 = NULL; + Free(sMultiPartnerPartyBuffer); + sMultiPartnerPartyBuffer = NULL; } break; } @@ -1527,13 +1528,13 @@ static void CB2_PreInitIngamePlayerPartnerBattle(void) switch (gBattleCommunication[MULTIUSE_STATE]) { case 0: - gUnknown_02023058 = Alloc(sizeof(struct UnknownPokemonStruct4) * 3); + sMultiPartnerPartyBuffer = Alloc(sizeof(struct UnknownPokemonStruct4) * ARRAY_COUNT(gMultiPartnerParty)); sub_80379F8(3); gBattleCommunication[MULTIUSE_STATE]++; *savedCallback = gMain.savedCallback; *savedBattleTypeFlags = gBattleTypeFlags; gMain.savedCallback = CB2_PreInitIngamePlayerPartnerBattle; - sub_81B9150(); + ShowPartyMenuToShowcaseMultiBattleParty(); break; case 1: if (!gPaletteFade.active) @@ -1542,8 +1543,8 @@ static void CB2_PreInitIngamePlayerPartnerBattle(void) gBattleTypeFlags = *savedBattleTypeFlags; gMain.savedCallback = *savedCallback; SetMainCallback2(CB2_InitBattleInternal); - Free(gUnknown_02023058); - gUnknown_02023058 = NULL; + Free(sMultiPartnerPartyBuffer); + sMultiPartnerPartyBuffer = NULL; } break; } @@ -1666,7 +1667,7 @@ static void CB2_HandleStartMultiBattle(void) break; case 1: case 2: - memcpy(gPlayerParty + 3, gBlockRecvBuffer[id], sizeof(struct Pokemon) * 2); + memcpy(gPlayerParty + PARTY_SIZE / 2, gBlockRecvBuffer[id], sizeof(struct Pokemon) * 2); break; } } @@ -1683,7 +1684,7 @@ static void CB2_HandleStartMultiBattle(void) break; case 1: case 2: - memcpy(gPlayerParty + 3, gBlockRecvBuffer[id], sizeof(struct Pokemon) * 2); + memcpy(gPlayerParty + PARTY_SIZE / 2, gBlockRecvBuffer[id], sizeof(struct Pokemon) * 2); break; } } @@ -1697,7 +1698,7 @@ static void CB2_HandleStartMultiBattle(void) break; case 1: case 2: - memcpy(gEnemyParty + 3, gBlockRecvBuffer[id], sizeof(struct Pokemon) * 2); + memcpy(gEnemyParty + PARTY_SIZE / 2, gBlockRecvBuffer[id], sizeof(struct Pokemon) * 2); break; } } @@ -4129,26 +4130,26 @@ void sub_803BDA0(u8 battler) // gBattleStruct->field_60[battler][i] - for (i = 0; i < 3; i++) - gUnknown_0203CF00[i] = *(battler * 3 + i + (u8*)(gBattleStruct->field_60)); + for (i = 0; i < (int)ARRAY_COUNT(gBattlePartyCurrentOrder); i++) + gBattlePartyCurrentOrder[i] = *(battler * 3 + i + (u8*)(gBattleStruct->field_60)); - r4 = pokemon_order_func(gBattlerPartyIndexes[battler]); - r1 = pokemon_order_func(*(gBattleStruct->monToSwitchIntoId + battler)); - sub_81B8FB0(r4, r1); + r4 = GetBattlerPartyId(gBattlerPartyIndexes[battler]); + r1 = GetBattlerPartyId(*(gBattleStruct->monToSwitchIntoId + battler)); + SwitchPartyMonSlots(r4, r1); if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE) { - for (i = 0; i < 3; i++) + for (i = 0; i < (int)ARRAY_COUNT(gBattlePartyCurrentOrder); i++) { - *(battler * 3 + i + (u8*)(gBattleStruct->field_60)) = gUnknown_0203CF00[i]; - *(BATTLE_PARTNER(battler) * 3 + i + (u8*)(gBattleStruct->field_60)) = gUnknown_0203CF00[i]; + *(battler * 3 + i + (u8*)(gBattleStruct->field_60)) = gBattlePartyCurrentOrder[i]; + *(BATTLE_PARTNER(battler) * 3 + i + (u8*)(gBattleStruct->field_60)) = gBattlePartyCurrentOrder[i]; } } else { - for (i = 0; i < 3; i++) + for (i = 0; i < (int)ARRAY_COUNT(gBattlePartyCurrentOrder); i++) { - *(battler * 3 + i + (u8*)(gBattleStruct->field_60)) = gUnknown_0203CF00[i]; + *(battler * 3 + i + (u8*)(gBattleStruct->field_60)) = gBattlePartyCurrentOrder[i]; } } } @@ -4283,7 +4284,7 @@ static void HandleTurnActionSelectionState(void) || gBattleTypeFlags & BATTLE_TYPE_ARENA || gStatuses3[gActiveBattler] & STATUS3_ROOTED) { - BtlController_EmitChoosePokemon(0, PARTY_CANT_SWITCH, 6, ABILITY_NONE, gBattleStruct->field_60[gActiveBattler]); + BtlController_EmitChoosePokemon(0, PARTY_ACTION_CANT_SWITCH, PARTY_SIZE, ABILITY_NONE, gBattleStruct->field_60[gActiveBattler]); } else if ((i = ABILITY_ON_OPPOSING_FIELD(gActiveBattler, ABILITY_SHADOW_TAG)) || ((i = ABILITY_ON_OPPOSING_FIELD(gActiveBattler, ABILITY_ARENA_TRAP)) @@ -4292,16 +4293,16 @@ static void HandleTurnActionSelectionState(void) || ((i = AbilityBattleEffects(ABILITYEFFECT_CHECK_FIELD_EXCEPT_BATTLER, gActiveBattler, ABILITY_MAGNET_PULL, 0, 0)) && IS_BATTLER_OF_TYPE(gActiveBattler, TYPE_STEEL))) { - BtlController_EmitChoosePokemon(0, ((i - 1) << 4) | PARTY_ABILITY_PREVENTS, 6, gLastUsedAbility, gBattleStruct->field_60[gActiveBattler]); + BtlController_EmitChoosePokemon(0, ((i - 1) << 4) | PARTY_ACTION_ABILITY_PREVENTS, PARTY_SIZE, gLastUsedAbility, gBattleStruct->field_60[gActiveBattler]); } else { if (gActiveBattler == 2 && gChosenActionByBattler[0] == B_ACTION_SWITCH) - BtlController_EmitChoosePokemon(0, PARTY_CHOOSE_MON, *(gBattleStruct->monToSwitchIntoId + 0), ABILITY_NONE, gBattleStruct->field_60[gActiveBattler]); + BtlController_EmitChoosePokemon(0, PARTY_ACTION_CHOOSE_MON, *(gBattleStruct->monToSwitchIntoId + 0), ABILITY_NONE, gBattleStruct->field_60[gActiveBattler]); else if (gActiveBattler == 3 && gChosenActionByBattler[1] == B_ACTION_SWITCH) - BtlController_EmitChoosePokemon(0, PARTY_CHOOSE_MON, *(gBattleStruct->monToSwitchIntoId + 1), ABILITY_NONE, gBattleStruct->field_60[gActiveBattler]); + BtlController_EmitChoosePokemon(0, PARTY_ACTION_CHOOSE_MON, *(gBattleStruct->monToSwitchIntoId + 1), ABILITY_NONE, gBattleStruct->field_60[gActiveBattler]); else - BtlController_EmitChoosePokemon(0, PARTY_CHOOSE_MON, 6, ABILITY_NONE, gBattleStruct->field_60[gActiveBattler]); + BtlController_EmitChoosePokemon(0, PARTY_ACTION_CHOOSE_MON, PARTY_SIZE, ABILITY_NONE, gBattleStruct->field_60[gActiveBattler]); } MarkBattlerForControllerExec(gActiveBattler); break; diff --git a/src/battle_pike.c b/src/battle_pike.c index a81d881454..36bf8dcbff 100644 --- a/src/battle_pike.c +++ b/src/battle_pike.c @@ -22,6 +22,7 @@ #include "constants/trainers.h" #include "constants/species.h" #include "constants/moves.h" +#include "constants/party_menu.h" #include "constants/battle_pike.h" struct PikeRoomNPC @@ -922,7 +923,7 @@ static bool8 TryInflictRandomStatus(void) for (i = 0; i < 3; i++) { mon = &gPlayerParty[indices[i]]; - if (pokemon_ailments_get_primary(GetMonData(mon, MON_DATA_STATUS)) == 0 + if (GetAilmentFromStatus(GetMonData(mon, MON_DATA_STATUS)) == AILMENT_NONE && GetMonData(mon, MON_DATA_HP) != 0) { j++; @@ -964,7 +965,7 @@ static bool8 TryInflictRandomStatus(void) for (i = 0; i < 3; i++) { mon = &gPlayerParty[indices[i]]; - if (pokemon_ailments_get_primary(GetMonData(mon, MON_DATA_STATUS)) == 0 + if (GetAilmentFromStatus(GetMonData(mon, MON_DATA_STATUS)) == AILMENT_NONE && GetMonData(mon, MON_DATA_HP) != 0) { j++; @@ -996,7 +997,7 @@ static bool8 AtLeastOneHealthyMon(void) for (i = 0; i < 3; i++) { struct Pokemon *mon = &gPlayerParty[i]; - if (pokemon_ailments_get_primary(GetMonData(mon, MON_DATA_STATUS)) == 0 + if (GetAilmentFromStatus(GetMonData(mon, MON_DATA_STATUS)) == AILMENT_NONE && GetMonData(mon, MON_DATA_HP) != 0) { healthyMonsCount++; @@ -1285,7 +1286,7 @@ static void TryHealMons(u8 healCount) { canBeHealed = TRUE; } - else if (pokemon_ailments_get_primary(GetMonData(mon, MON_DATA_STATUS)) != 0) + else if (GetAilmentFromStatus(GetMonData(mon, MON_DATA_STATUS)) != AILMENT_NONE) { canBeHealed = TRUE; } @@ -1556,7 +1557,7 @@ static void CanAnyPartyMonsBeHealed(void) struct Pokemon *mon = &gPlayerParty[i]; u16 curr = GetMonData(mon, MON_DATA_HP); u16 max = GetMonData(mon, MON_DATA_MAX_HP); - if (curr >= max && pokemon_ailments_get_primary(GetMonData(mon, MON_DATA_STATUS)) == 0) + if (curr >= max && GetAilmentFromStatus(GetMonData(mon, MON_DATA_STATUS)) == AILMENT_NONE) { u8 ppBonuses = GetMonData(mon, MON_DATA_PP_BONUSES); for (j = 0; j < MAX_MON_MOVES; j++) diff --git a/src/battle_pyramid_bag.c b/src/battle_pyramid_bag.c index a17a934991..8ad7e57582 100644 --- a/src/battle_pyramid_bag.c +++ b/src/battle_pyramid_bag.c @@ -346,12 +346,12 @@ void InitBattlePyramidBagCursorPosition(void) void CB2_PyramidBagMenuFromStartMenu(void) { - sub_81C4F98(0, CB2_ReturnToFieldWithOpenMenu); + GoToBattlePyramidBagMenu(0, CB2_ReturnToFieldWithOpenMenu); } static void sub_81C4F10(void) { - sub_81C4F98(1, SetCB2ToReshowScreenAfterMenu2); + GoToBattlePyramidBagMenu(1, CB2_SetUpReshowBattleScreenAfterMenu2); } void sub_81C4F24(void) @@ -366,18 +366,18 @@ static void sub_81C4F44(u8 taskId) if (!gPaletteFade.active) { CleanupOverworldWindowsAndTilemaps(); - gFieldCallback2 = hm_add_c3_without_phase_2; - sub_81C4F98(3, CB2_ReturnToField); + gFieldCallback2 = CB2_FadeFromPartyMenu; + GoToBattlePyramidBagMenu(3, CB2_ReturnToField); DestroyTask(taskId); } } -void sub_81C4F84(void) +void CB2_ReturnToPyramidBagMenu(void) { - sub_81C4F98(4, gPyramidBagCursorData.callback); + GoToBattlePyramidBagMenu(4, gPyramidBagCursorData.callback); } -void sub_81C4F98(u8 a0, void (*callback)(void)) +void GoToBattlePyramidBagMenu(u8 a0, void (*callback)(void)) { gPyramidBagResources = AllocZeroed(sizeof(*gPyramidBagResources)); @@ -981,7 +981,7 @@ static void HandleMenuActionInput(u8 taskId) sub_8199134(0, 1); } } - else if (gMain.newKeys & DPAD_LEFT || GetLRKeysState() == 1) + else if (gMain.newKeys & DPAD_LEFT || GetLRKeysPressed() == 1) { if (id & 1 && IsValidMenuAction(id - 1)) { @@ -989,7 +989,7 @@ static void HandleMenuActionInput(u8 taskId) sub_8199134(-1, 0); } } - else if (gMain.newKeys & DPAD_RIGHT || GetLRKeysState() == 2) + else if (gMain.newKeys & DPAD_RIGHT || GetLRKeysPressed() == 2) { if (!(id & 1) && IsValidMenuAction(id + 1)) { @@ -1202,7 +1202,7 @@ static void BagAction_Give(u8 taskId) } else if (!ItemId_GetImportance(gSpecialVar_ItemId)) { - gPyramidBagResources->callback2 = sub_81B7F60; + gPyramidBagResources->callback2 = CB2_ChooseMonToGiveItem; sub_81C5B14(taskId); } else @@ -1350,7 +1350,7 @@ static void sub_81C6A14(u8 taskId) SetTaskToMainPyramidBagInputHandler(taskId); } -void sub_81C6A94(void) +void TryStoreHeldItemsInPyramidBag(void) { u8 i; struct Pokemon *party = gPlayerParty; @@ -1363,8 +1363,9 @@ void sub_81C6A94(void) for (i = 0; i < 3; i++) { heldItem = GetMonData(&party[i], MON_DATA_HELD_ITEM); - if (heldItem != 0 && !AddBagItem(heldItem, 1)) + if (heldItem != ITEM_NONE && !AddBagItem(heldItem, 1)) { + // Cant store party held items in pyramid bag because bag is full memcpy(gSaveBlock2Ptr->frontier.pyramidBag.itemId[gSaveBlock2Ptr->frontier.lvlMode], newItems, PYRAMID_BAG_ITEMS_COUNT * sizeof(u16)); memcpy(gSaveBlock2Ptr->frontier.pyramidBag.quantity[gSaveBlock2Ptr->frontier.lvlMode], newQuantities, PYRAMID_BAG_ITEMS_COUNT * sizeof(u8)); Free(newItems); @@ -1374,7 +1375,7 @@ void sub_81C6A94(void) } } - heldItem = 0; + heldItem = ITEM_NONE; for (i = 0; i < 3; i++) { SetMonData(&party[i], MON_DATA_HELD_ITEM, &heldItem); diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 3c3e2480f3..a9903b3d1d 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -52,6 +52,7 @@ #include "menu_specialized.h" #include "constants/rgb.h" #include "data.h" +#include "constants/party_menu.h" extern struct MusicPlayerInfo gMPlayInfo_BGM; @@ -5107,13 +5108,13 @@ static void atk4F_jumpifcantswitch(void) } } -static void sub_804CF10(u8 arg0) +static void sub_804CF10(u8 slotId) { *(gBattleStruct->field_58 + gActiveBattler) = gBattlerPartyIndexes[gActiveBattler]; - *(gBattleStruct->monToSwitchIntoId + gActiveBattler) = 6; + *(gBattleStruct->monToSwitchIntoId + gActiveBattler) = PARTY_SIZE; gBattleStruct->field_93 &= ~(gBitTable[gActiveBattler]); - BtlController_EmitChoosePokemon(0, PARTY_MUST_CHOOSE_MON, arg0, 0, gBattleStruct->field_60[gActiveBattler]); + BtlController_EmitChoosePokemon(0, PARTY_ACTION_SEND_OUT, slotId, ABILITY_NONE, gBattleStruct->field_60[gActiveBattler]); MarkBattlerForControllerExec(gActiveBattler); } @@ -5145,7 +5146,7 @@ static void atk50_openpartyscreen(void) } else if (!gSpecialStatuses[gActiveBattler].flag40) { - sub_804CF10(6); + sub_804CF10(PARTY_SIZE); gSpecialStatuses[gActiveBattler].flag40 = 1; } } @@ -5352,9 +5353,9 @@ static void atk50_openpartyscreen(void) else { if (gBattlescriptCurrInstr[1] & 0x80) - hitmarkerFaintBits = PARTY_CHOOSE_MON; // Used here as the caseId for the EmitChoose function. + hitmarkerFaintBits = PARTY_ACTION_CHOOSE_MON; // Used here as the caseId for the EmitChoose function. else - hitmarkerFaintBits = PARTY_MUST_CHOOSE_MON; + hitmarkerFaintBits = PARTY_ACTION_SEND_OUT; battlerId = GetBattlerForBattleScript(gBattlescriptCurrInstr[1] & ~(0x80)); if (gSpecialStatuses[battlerId].flag40) @@ -5375,7 +5376,7 @@ static void atk50_openpartyscreen(void) *(gBattleStruct->monToSwitchIntoId + gActiveBattler) = 6; gBattleStruct->field_93 &= ~(gBitTable[gActiveBattler]); - BtlController_EmitChoosePokemon(0, hitmarkerFaintBits, *(gBattleStruct->monToSwitchIntoId + (gActiveBattler ^ 2)), 0, gBattleStruct->field_60[gActiveBattler]); + BtlController_EmitChoosePokemon(0, hitmarkerFaintBits, *(gBattleStruct->monToSwitchIntoId + (gActiveBattler ^ 2)), ABILITY_NONE, gBattleStruct->field_60[gActiveBattler]); MarkBattlerForControllerExec(gActiveBattler); gBattlescriptCurrInstr += 6; @@ -5615,15 +5616,15 @@ static void atk59_handlelearnnewmove(void) const u8 *jumpPtr1 = T1_READ_PTR(gBattlescriptCurrInstr + 1); const u8 *jumpPtr2 = T1_READ_PTR(gBattlescriptCurrInstr + 5); - u16 ret = MonTryLearningNewMove(&gPlayerParty[gBattleStruct->expGetterMonId], gBattlescriptCurrInstr[9]); - while (ret == 0xFFFE) - ret = MonTryLearningNewMove(&gPlayerParty[gBattleStruct->expGetterMonId], 0); + u16 learnMove = MonTryLearningNewMove(&gPlayerParty[gBattleStruct->expGetterMonId], gBattlescriptCurrInstr[9]); + while (learnMove == MON_ALREADY_KNOWS_MOVE) + learnMove = MonTryLearningNewMove(&gPlayerParty[gBattleStruct->expGetterMonId], FALSE); - if (ret == 0) + if (learnMove == 0) { gBattlescriptCurrInstr = jumpPtr2; } - else if (ret == 0xFFFF) + else if (learnMove == MON_HAS_MAX_MOVES) { gBattlescriptCurrInstr += 10; } @@ -5634,7 +5635,7 @@ static void atk59_handlelearnnewmove(void) if (gBattlerPartyIndexes[gActiveBattler] == gBattleStruct->expGetterMonId && !(gBattleMons[gActiveBattler].status2 & STATUS2_TRANSFORMED)) { - GiveMoveToBattleMon(&gBattleMons[gActiveBattler], ret); + GiveMoveToBattleMon(&gBattleMons[gActiveBattler], learnMove); } if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE) { @@ -5642,7 +5643,7 @@ static void atk59_handlelearnnewmove(void) if (gBattlerPartyIndexes[gActiveBattler] == gBattleStruct->expGetterMonId && !(gBattleMons[gActiveBattler].status2 & STATUS2_TRANSFORMED)) { - GiveMoveToBattleMon(&gBattleMons[gActiveBattler], ret); + GiveMoveToBattleMon(&gBattleMons[gActiveBattler], learnMove); } } @@ -5715,8 +5716,8 @@ static void atk5A_yesnoboxlearnmove(void) case 4: if (!gPaletteFade.active && gMain.callback2 == BattleMainCB2) { - u8 movePosition = sub_81C1B94(); - if (movePosition == 4) + u8 movePosition = GetMoveSlotToReplace(); + if (movePosition == MAX_MON_MOVES) { gBattleScripting.learnMoveState = 5; } diff --git a/src/battle_tower.c b/src/battle_tower.c index c551809659..8efee42f75 100644 --- a/src/battle_tower.c +++ b/src/battle_tower.c @@ -3191,7 +3191,7 @@ static void FillPartnerParty(u16 trainerId) sStevenMons[i].fixedIV, TRUE, i, // BUG: personality was stored in the 'j' variable. As a result, Steven's pokemon do not have the intended natures. OT_ID_PRESET, STEVEN_OTID); - for (j = 0; j < 6; j++) + for (j = 0; j < PARTY_SIZE; j++) SetMonData(&gPlayerParty[3 + i], MON_DATA_HP_EV + j, &sStevenMons[i].evs[j]); for (j = 0; j < MAX_MON_MOVES; j++) SetMonMoveSlot(&gPlayerParty[3 + i], sStevenMons[i].moves[j], j); diff --git a/src/battle_util2.c b/src/battle_util2.c index ce2153b2d8..2c8e8c8f2e 100644 --- a/src/battle_util2.c +++ b/src/battle_util2.c @@ -110,13 +110,13 @@ void sub_80571DC(u8 battlerId, u8 arg1) // gBattleStruct->field_60[0][i] - for (i = 0; i < 3; i++) - gUnknown_0203CF00[i] = *(0 * 3 + i + (u8*)(gBattleStruct->field_60)); + for (i = 0; i < (int)ARRAY_COUNT(gBattlePartyCurrentOrder); i++) + gBattlePartyCurrentOrder[i] = *(0 * 3 + i + (u8*)(gBattleStruct->field_60)); - sub_81B8FB0(pokemon_order_func(gBattlerPartyIndexes[battlerId]), pokemon_order_func(arg1)); + SwitchPartyMonSlots(GetBattlerPartyId(gBattlerPartyIndexes[battlerId]), GetBattlerPartyId(arg1)); - for (i = 0; i < 3; i++) - *(0 * 3 + i + (u8*)(gBattleStruct->field_60)) = gUnknown_0203CF00[i]; + for (i = 0; i < (int)ARRAY_COUNT(gBattlePartyCurrentOrder); i++) + *(0 * 3 + i + (u8*)(gBattleStruct->field_60)) = gBattlePartyCurrentOrder[i]; } } diff --git a/src/contest.c b/src/contest.c index a3914cf302..20fa9e1a8d 100644 --- a/src/contest.c +++ b/src/contest.c @@ -2799,16 +2799,15 @@ void sub_80DACBC(u8 contestType, u8 rank, bool32 isPostgame) } } -// GetContestAvailability? -u8 sub_80DAE0C(struct Pokemon *pkmn) +u8 GetContestEntryEligibility(struct Pokemon *pkmn) { u8 ribbon; - u8 retVal; + u8 contestViability; if (GetMonData(pkmn, MON_DATA_IS_EGG)) - return 3; + return CANT_ENTER_CONTEST_EGG; if (GetMonData(pkmn, MON_DATA_HP) == 0) - return 4; + return CANT_ENTER_CONTEST_FAINTED; switch (gSpecialVar_ContestCategory) { case CONTEST_CATEGORY_COOL: @@ -2827,19 +2826,19 @@ u8 sub_80DAE0C(struct Pokemon *pkmn) ribbon = GetMonData(pkmn, MON_DATA_TOUGH_RIBBON); break; default: - return 0; + return CANT_ENTER_CONTEST; } // Couldn't get this to match any other way. // Returns 2, 1, or 0 respectively if ribbon's rank is above, equal, or below // the current contest rank. if (ribbon > gSpecialVar_ContestRank) - retVal = 2; + contestViability = CAN_ENTER_CONTEST_HIGH_RANK; else if (ribbon >= gSpecialVar_ContestRank) - retVal = 1; + contestViability = CAN_ENTER_CONTEST_EQUAL_RANK; else - retVal = 0; - return retVal; + contestViability = CANT_ENTER_CONTEST; + return contestViability; } static void DrawContestantWindowText(void) diff --git a/src/contest_link_80F57C4.c b/src/contest_link_80F57C4.c index 54b2326d01..69332b27f1 100644 --- a/src/contest_link_80F57C4.c +++ b/src/contest_link_80F57C4.c @@ -1935,14 +1935,16 @@ static void sub_80F7ED0(int windowId, u8 *str, int arg2) void sub_80F7F30(void) { - u8 result = sub_80DAE0C(&gPlayerParty[gContestMonPartyIndex]); - if (result) + u8 eligibility = GetContestEntryEligibility(&gPlayerParty[gContestMonPartyIndex]); + + // Nonzero eligibility can still be non-eligibile, if mon is fainted or egg + if (eligibility) { sub_80DAB8C(gSpecialVar_ContestCategory, gSpecialVar_ContestRank); sub_80DB09C(gSpecialVar_ContestCategory); } - gSpecialVar_Result = result; + gSpecialVar_Result = eligibility; } u16 sub_80F7F7C(void) diff --git a/src/daycare.c b/src/daycare.c index e5445ee21d..42c69465b4 100644 --- a/src/daycare.c +++ b/src/daycare.c @@ -231,11 +231,8 @@ static void ApplyDaycareExperience(struct Pokemon *mon) while ((learnedMove = MonTryLearningNewMove(mon, firstMove)) != 0) { firstMove = FALSE; - if (learnedMove == 0xFFFF) - { - // Mon already knows 4 moves. + if (learnedMove == MON_HAS_MAX_MOVES) DeleteFirstMoveAndGiveMoveToMon(mon, gMoveToLearn); - } } } else @@ -666,7 +663,7 @@ static void BuildEggMoveset(struct Pokemon *egg, struct BoxPokemon *father, stru { if (sHatchedEggFatherMoves[i] == sHatchedEggEggMoves[j]) { - if (GiveMoveToMon(egg, sHatchedEggFatherMoves[i]) == 0xFFFF) + if (GiveMoveToMon(egg, sHatchedEggFatherMoves[i]) == MON_HAS_MAX_MOVES) DeleteFirstMoveAndGiveMoveToMon(egg, sHatchedEggFatherMoves[i]); break; } @@ -685,7 +682,7 @@ static void BuildEggMoveset(struct Pokemon *egg, struct BoxPokemon *father, stru { if (sHatchedEggFatherMoves[i] == ItemIdToBattleMoveId(ITEM_TM01_FOCUS_PUNCH + j) && CanMonLearnTMHM(egg, j)) { - if (GiveMoveToMon(egg, sHatchedEggFatherMoves[i]) == 0xFFFF) + if (GiveMoveToMon(egg, sHatchedEggFatherMoves[i]) == MON_HAS_MAX_MOVES) DeleteFirstMoveAndGiveMoveToMon(egg, sHatchedEggFatherMoves[i]); } } @@ -710,7 +707,7 @@ static void BuildEggMoveset(struct Pokemon *egg, struct BoxPokemon *father, stru { if (sHatchedEggLevelUpMoves[j] != MOVE_NONE && sHatchedEggFinalMoves[i] == sHatchedEggLevelUpMoves[j]) { - if (GiveMoveToMon(egg, sHatchedEggFinalMoves[i]) == 0xFFFF) + if (GiveMoveToMon(egg, sHatchedEggFinalMoves[i]) == MON_HAS_MAX_MOVES) DeleteFirstMoveAndGiveMoveToMon(egg, sHatchedEggFinalMoves[i]); break; } @@ -755,7 +752,7 @@ static void GiveVoltTackleIfLightBall(struct Pokemon *mon, struct DayCare *dayca if (motherItem == ITEM_LIGHT_BALL || fatherItem == ITEM_LIGHT_BALL) { - if (GiveMoveToMon(mon, MOVE_VOLT_TACKLE) == 0xFFFF) + if (GiveMoveToMon(mon, MOVE_VOLT_TACKLE) == MON_HAS_MAX_MOVES) DeleteFirstMoveAndGiveMoveToMon(mon, MOVE_VOLT_TACKLE); } } @@ -1295,6 +1292,6 @@ void ShowDaycareLevelMenu(void) void ChooseSendDaycareMon(void) { - sub_81B9328(); + ChooseMonForDaycare(); gMain.savedCallback = CB2_ReturnToField; } diff --git a/src/evolution_scene.c b/src/evolution_scene.c index af560bc40c..929539d30f 100644 --- a/src/evolution_scene.c +++ b/src/evolution_scene.c @@ -743,12 +743,12 @@ static void Task_EvolutionScene(u8 taskID) GetMonData(mon, MON_DATA_NICKNAME, text); StringCopy10(gBattleTextBuff1, text); - if (var == 0xFFFF) // no place to learn it + if (var == MON_HAS_MAX_MOVES) gTasks[taskID].tState = 22; - else if (var == 0xFFFE) // it already knows that move + else if (var == MON_ALREADY_KNOWS_MOVE) break; else - gTasks[taskID].tState = 20; // has less than 4 moves, so it's been learned + gTasks[taskID].tState = 20; // move has been learned } else // no move to learn { @@ -909,8 +909,8 @@ static void Task_EvolutionScene(u8 taskID) case 6: if (!gPaletteFade.active && gMain.callback2 == CB2_EvolutionSceneUpdate) { - var = sub_81C1B94(); // moveID - if (var == 4) + var = GetMoveSlotToReplace(); + if (var == MAX_MON_MOVES) { gTasks[taskID].tLearnMoveState = 10; } @@ -1100,9 +1100,9 @@ static void Task_TradeEvolutionScene(u8 taskID) GetMonData(mon, MON_DATA_NICKNAME, text); StringCopy10(gBattleTextBuff1, text); - if (var == 0xFFFF) + if (var == MON_HAS_MAX_MOVES) gTasks[taskID].tState = 20; - else if (var == 0xFFFE) + else if (var == MON_ALREADY_KNOWS_MOVE) break; else gTasks[taskID].tState = 18; @@ -1243,8 +1243,8 @@ static void Task_TradeEvolutionScene(u8 taskID) case 6: if (!gPaletteFade.active && gMain.callback2 == CB2_TradeEvolutionSceneUpdate) { - var = sub_81C1B94(); // moveID - if (var == 4) + var = GetMoveSlotToReplace(); + if (var == MAX_MON_MOVES) { gTasks[taskID].tLearnMoveState = 9; } diff --git a/src/field_effect.c b/src/field_effect.c index 7569bdc75d..99abcdcb01 100644 --- a/src/field_effect.c +++ b/src/field_effect.c @@ -63,7 +63,7 @@ static void PokeballGlowEffect_7(struct Sprite *); static u8 PokecenterHealEffectHelper(s16, s16); static void HallOfFameRecordEffectHelper(s16, s16, s16, u8); -static void mapldr_080842E8(void); +static void FieldCallback_Fly(void); static void task00_8084310(u8); static void mapldr_08084390(void); static void c3_080843F8(u8); @@ -1364,13 +1364,13 @@ void SpriteCB_HallOfFameMonitor(struct Sprite *sprite) } -void sub_80B69DC(void) +void ReturnToFieldFromFlyMapSelect(void) { SetMainCallback2(CB2_ReturnToField); - gFieldCallback = mapldr_080842E8; + gFieldCallback = FieldCallback_Fly; } -static void mapldr_080842E8(void) +static void FieldCallback_Fly(void) { pal_fill_black(); CreateTask(task00_8084310, 0); diff --git a/src/field_poison.c b/src/field_poison.c index d10a28a769..8385966d41 100644 --- a/src/field_poison.c +++ b/src/field_poison.c @@ -15,6 +15,7 @@ #include "task.h" #include "trainer_hill.h" #include "constants/field_poison.h" +#include "constants/party_menu.h" #include "constants/species.h" static bool32 IsMonValidSpecies(struct Pokemon *pokemon) @@ -56,7 +57,7 @@ static void FaintFromFieldPoison(u8 partyIdx) static bool32 MonFaintedFromPoison(u8 partyIdx) { struct Pokemon *pokemon = gPlayerParty + partyIdx; - if (IsMonValidSpecies(pokemon) && GetMonData(pokemon, MON_DATA_HP) == 0 && pokemon_ailments_get_primary(GetMonData(pokemon, MON_DATA_STATUS)) == AILMENT_PSN) + if (IsMonValidSpecies(pokemon) && GetMonData(pokemon, MON_DATA_HP) == 0 && GetAilmentFromStatus(GetMonData(pokemon, MON_DATA_STATUS)) == AILMENT_PSN) { return TRUE; } @@ -124,7 +125,7 @@ s32 DoPoisonFieldEffect(void) u32 numFainted = 0; for (i = 0; i < PARTY_SIZE; i++) { - if (GetMonData(pokemon, MON_DATA_SANITY_HAS_SPECIES) && pokemon_ailments_get_primary(GetMonData(pokemon, MON_DATA_STATUS)) == AILMENT_PSN) + if (GetMonData(pokemon, MON_DATA_SANITY_HAS_SPECIES) && GetAilmentFromStatus(GetMonData(pokemon, MON_DATA_STATUS)) == AILMENT_PSN) { hp = GetMonData(pokemon, MON_DATA_HP); if (hp == 0 || --hp == 0) diff --git a/src/field_specials.c b/src/field_specials.c index 4057cf2997..b3b0fe893a 100644 --- a/src/field_specials.c +++ b/src/field_specials.c @@ -60,6 +60,7 @@ #include "constants/songs.h" #include "constants/species.h" #include "constants/moves.h" +#include "constants/party_menu.h" #include "constants/vars.h" #include "constants/battle_frontier.h" #include "constants/weather.h" diff --git a/src/fldeff_softboiled.c b/src/fldeff_softboiled.c index 733263bbc3..1a42b297da 100644 --- a/src/fldeff_softboiled.c +++ b/src/fldeff_softboiled.c @@ -7,12 +7,13 @@ #include "string_util.h" #include "strings.h" #include "task.h" +#include "constants/party_menu.h" #include "constants/songs.h" -static void sub_816166C(u8 taskId); -static void sub_81616C0(u8 taskId); -static void sub_8161724(u8 taskId); -static void sub_81617B8(u8 taskId); +static void Task_SoftboiledRestoreHealth(u8 taskId); +static void Task_DisplayHPRestoredMessage(u8 taskId); +static void Task_FinishSoftboiled(u8 taskId); +static void CantUseSoftboiledOnMon(u8 taskId); bool8 SetUpFieldMove_SoftBoiled(void) { @@ -29,81 +30,82 @@ bool8 SetUpFieldMove_SoftBoiled(void) return FALSE; } -void sub_8161560(u8 taskId) +void ChooseMonForSoftboiled(u8 taskId) { - gUnknown_0203CEC8.unkB = 0xA; - gUnknown_0203CEC8.unkA = gUnknown_0203CEC8.slotId; - sub_81B0FCC(GetCursorSelectionMonId(), 0x1); - DisplayPartyMenuStdMessage(5); - gTasks[taskId].func = sub_81B1370; + gPartyMenu.action = PARTY_ACTION_SOFTBOILED; + gPartyMenu.slotId2 = gPartyMenu.slotId; + AnimatePartySlot(GetCursorSelectionMonId(), 1); + DisplayPartyMenuStdMessage(PARTY_MSG_USE_ON_WHICH_MON); + gTasks[taskId].func = Task_HandleChooseMonInput; } -void sub_81615A8(u8 taskId) +void Task_TryUseSoftboiledOnPartyMon(u8 taskId) { u16 hp; - u8 slotId = gUnknown_0203CEC8.slotId; - u8 pokemonIndex = gUnknown_0203CEC8.unkA; - if(pokemonIndex > 6) + u8 userPartyId = gPartyMenu.slotId; + u8 recipientPartyId = gPartyMenu.slotId2; + if(recipientPartyId > PARTY_SIZE) { - gUnknown_0203CEC8.unkB = 0; - DisplayPartyMenuStdMessage(0); - gTasks[taskId].func = sub_81B1370; + gPartyMenu.action = 0; + DisplayPartyMenuStdMessage(PARTY_MSG_CHOOSE_MON); + gTasks[taskId].func = Task_HandleChooseMonInput; return; } - hp = GetMonData(&gPlayerParty[pokemonIndex], MON_DATA_HP); - if(hp == 0 || slotId == pokemonIndex || GetMonData(&gPlayerParty[pokemonIndex], MON_DATA_MAX_HP) == hp) + hp = GetMonData(&gPlayerParty[recipientPartyId], MON_DATA_HP); + if(hp == 0 || userPartyId == recipientPartyId || GetMonData(&gPlayerParty[recipientPartyId], MON_DATA_MAX_HP) == hp) { - sub_81617B8(taskId); + CantUseSoftboiledOnMon(taskId); return; } + // Take away Softboiled user's health first (-1) PlaySE(SE_KAIFUKU); - sub_81B1F18(taskId, slotId, -1, GetMonData(&gPlayerParty[slotId], MON_DATA_MAX_HP)/5, sub_816166C); + PartyMenuModifyHP(taskId, userPartyId, -1, GetMonData(&gPlayerParty[userPartyId], MON_DATA_MAX_HP)/5, Task_SoftboiledRestoreHealth); } -static void sub_816166C(u8 taskId) +static void Task_SoftboiledRestoreHealth(u8 taskId) { PlaySE(SE_KAIFUKU); - sub_81B1F18(taskId, gUnknown_0203CEC8.unkA, 1, GetMonData(&gPlayerParty[gUnknown_0203CEC8.slotId], MON_DATA_MAX_HP)/5, sub_81616C0); + PartyMenuModifyHP(taskId, gPartyMenu.slotId2, 1, GetMonData(&gPlayerParty[gPartyMenu.slotId], MON_DATA_MAX_HP)/5, Task_DisplayHPRestoredMessage); } -static void sub_81616C0(u8 taskId) +static void Task_DisplayHPRestoredMessage(u8 taskId) { - GetMonNickname(&gPlayerParty[gUnknown_0203CEC8.unkA], gStringVar1); + GetMonNickname(&gPlayerParty[gPartyMenu.slotId2], gStringVar1); StringExpandPlaceholders(gStringVar4, gText_PkmnHPRestoredByVar2); - DisplayPartyMenuMessage(gStringVar4, 0); + DisplayPartyMenuMessage(gStringVar4, FALSE); schedule_bg_copy_tilemap_to_vram(2); - gTasks[taskId].func = sub_8161724; + gTasks[taskId].func = Task_FinishSoftboiled; } -static void sub_8161724(u8 taskId) +static void Task_FinishSoftboiled(u8 taskId) { - if(sub_81B1BD4() == 1) + if(IsPartyMenuTextPrinterActive() == TRUE) return; - gUnknown_0203CEC8.unkB = 0x0; - sub_81B0FCC(gUnknown_0203CEC8.slotId, 0); - gUnknown_0203CEC8.slotId = gUnknown_0203CEC8.unkA; - sub_81B0FCC(gUnknown_0203CEC8.unkA, 1); - ClearStdWindowAndFrameToTransparent(0x6, FALSE); - ClearWindowTilemap(0x6); - DisplayPartyMenuStdMessage(0); - gTasks[taskId].func = sub_81B1370; + gPartyMenu.action = 0; + AnimatePartySlot(gPartyMenu.slotId, 0); + gPartyMenu.slotId = gPartyMenu.slotId2; + AnimatePartySlot(gPartyMenu.slotId2, 1); + ClearStdWindowAndFrameToTransparent(6, FALSE); + ClearWindowTilemap(6); + DisplayPartyMenuStdMessage(PARTY_MSG_CHOOSE_MON); + gTasks[taskId].func = Task_HandleChooseMonInput; } -static void sub_8161784(u8 taskId) +static void Task_ChooseNewMonForSoftboiled(u8 taskId) { - if(sub_81B1BD4() == 1) + if(IsPartyMenuTextPrinterActive() == TRUE) return; - DisplayPartyMenuStdMessage(5); - gTasks[taskId].func = sub_81B1370; + DisplayPartyMenuStdMessage(PARTY_MSG_USE_ON_WHICH_MON); + gTasks[taskId].func = Task_HandleChooseMonInput; } -static void sub_81617B8(u8 taskId) +static void CantUseSoftboiledOnMon(u8 taskId) { PlaySE(SE_SELECT); - DisplayPartyMenuMessage(gText_CantBeUsedOnPkmn, 0); + DisplayPartyMenuMessage(gText_CantBeUsedOnPkmn, FALSE); schedule_bg_copy_tilemap_to_vram(2); - gTasks[taskId].func = sub_8161784; + gTasks[taskId].func = Task_ChooseNewMonForSoftboiled; } diff --git a/src/frontier_util.c b/src/frontier_util.c index 83934c9f66..94a6186b92 100644 --- a/src/frontier_util.c +++ b/src/frontier_util.c @@ -884,7 +884,7 @@ static void sub_81A1AD4(void) { s32 i; - sub_81B8558(); + ClearSelectedPartyOrder(); for (i = 0; i < gSpecialVar_0x8005; i++) gSelectedOrderFromParty[i] = gSaveBlock2Ptr->frontier.selectedPartyMons[i]; ReducePlayerPartyToSelectedMons(); diff --git a/src/graphics.c b/src/graphics.c index 5f27cdea4d..06bfeed17d 100644 --- a/src/graphics.c +++ b/src/graphics.c @@ -1138,9 +1138,9 @@ const u32 gBattleAnimSpritePal_Slash2[] = INCBIN_U32("graphics/battle_anims/spri const u32 gBattleAnimSpriteGfx_WhiteShadow[] = INCBIN_U32("graphics/battle_anims/sprites/white_shadow.4bpp.lz"); const u32 gBattleAnimSpritePal_WhiteShadow[] = INCBIN_U32("graphics/battle_anims/sprites/white_shadow.gbapal.lz"); -const u32 gPartyMenuMisc_Gfx[] = INCBIN_U32("graphics/interface/party_menu_misc.4bpp.lz"); -const u32 gPartyMenuMisc_Pal[] = INCBIN_U32("graphics/interface/party_menu_misc.gbapal.lz"); -const u32 gPartyMenuMisc_Tilemap[] = INCBIN_U32("graphics/interface/party_menu_misc.bin.lz"); +const u32 gPartyMenuBg_Gfx[] = INCBIN_U32("graphics/interface/party_menu_bg.4bpp.lz"); +const u32 gPartyMenuBg_Pal[] = INCBIN_U32("graphics/interface/party_menu_bg.gbapal.lz"); +const u32 gPartyMenuBg_Tilemap[] = INCBIN_U32("graphics/interface/party_menu_bg.bin.lz"); const u32 gPartyMenuPokeball_Gfx[] = INCBIN_U32("graphics/interface/party_menu_pokeball.4bpp.lz"); const u32 gPartyMenuPokeballSmall_Gfx[] = INCBIN_U32("graphics/interface/party_menu_pokeball_small.4bpp.lz"); //unused diff --git a/src/item.c b/src/item.c index 6b8f51f126..7b8b37c066 100644 --- a/src/item.c +++ b/src/item.c @@ -142,7 +142,7 @@ bool8 CheckBagHasItem(u16 itemId, u16 count) if (ItemId_GetPocket(itemId) == 0) return FALSE; - if (InBattlePyramid() || FlagGet(FLAG_SPECIAL_FLAG_0x4004) == TRUE) + if (InBattlePyramid() || FlagGet(FLAG_STORING_ITEMS_IN_PYRAMID_BAG) == TRUE) return CheckPyramidBagHasItem(itemId, count); pocket = ItemId_GetPocket(itemId) - 1; // Check for item slots that contain the item @@ -189,7 +189,7 @@ bool8 CheckBagHasSpace(u16 itemId, u16 count) if (ItemId_GetPocket(itemId) == POCKET_NONE) return FALSE; - if (InBattlePyramid() || FlagGet(FLAG_SPECIAL_FLAG_0x4004) == TRUE) + if (InBattlePyramid() || FlagGet(FLAG_STORING_ITEMS_IN_PYRAMID_BAG) == TRUE) { return CheckPyramidBagHasSpace(itemId, count); } @@ -404,7 +404,7 @@ bool8 AddBagItem(u16 itemId, u16 count) return FALSE; // check Battle Pyramid Bag - if (InBattlePyramid() || FlagGet(FLAG_SPECIAL_FLAG_0x4004) == TRUE) + if (InBattlePyramid() || FlagGet(FLAG_STORING_ITEMS_IN_PYRAMID_BAG) == TRUE) { return AddPyramidBagItem(itemId, count); } @@ -517,7 +517,7 @@ bool8 RemoveBagItem(u16 itemId, u16 count) return FALSE; // check Battle Pyramid Bag - if (InBattlePyramid() || FlagGet(FLAG_SPECIAL_FLAG_0x4004) == TRUE) + if (InBattlePyramid() || FlagGet(FLAG_STORING_ITEMS_IN_PYRAMID_BAG) == TRUE) { return RemovePyramidBagItem(itemId, count); } diff --git a/src/item_menu.c b/src/item_menu.c index c19113c60b..46f53c352e 100755 --- a/src/item_menu.c +++ b/src/item_menu.c @@ -4,6 +4,7 @@ #include "battle_controllers.h" #include "battle_pyramid.h" #include "frontier_util.h" +#include "battle_pyramid_bag.h" #include "berry_tag_screen.h" #include "bg.h" #include "constants/items.h" @@ -466,9 +467,9 @@ void CB2_BagMenuFromStartMenu(void) void sub_81AABB0(void) { if (!InBattlePyramid()) - GoToBagMenu(RETURN_LOCATION_BATTLE, POCKETS_COUNT, SetCB2ToReshowScreenAfterMenu2); + GoToBagMenu(RETURN_LOCATION_BATTLE, POCKETS_COUNT, CB2_SetUpReshowBattleScreenAfterMenu2); else - sub_81C4F98(1, SetCB2ToReshowScreenAfterMenu2); + GoToBattlePyramidBagMenu(1, CB2_SetUpReshowBattleScreenAfterMenu2); } void CB2_ChooseBerry(void) @@ -1148,13 +1149,13 @@ u8 GetSwitchBagPocketDirection(void) u8 LRKeys; if (gBagMenu->unk81B != 0) return 0; - LRKeys = GetLRKeysState(); - if ((gMain.newKeys & DPAD_LEFT) || LRKeys == 1) + LRKeys = GetLRKeysPressed(); + if ((gMain.newKeys & DPAD_LEFT) || LRKeys == MENU_L_PRESSED) { PlaySE(SE_SELECT); return 1; } - if ((gMain.newKeys & DPAD_RIGHT) || LRKeys == 2) + if ((gMain.newKeys & DPAD_RIGHT) || LRKeys == MENU_R_PRESSED) { PlaySE(SE_SELECT); return 2; @@ -1581,7 +1582,7 @@ void Task_HandleOutOfBattleItemMenuInput(u8 taskId) sub_8199134(0, 1); } } - else if ((gMain.newKeys & DPAD_LEFT) || GetLRKeysState() == 1) + else if ((gMain.newKeys & DPAD_LEFT) || GetLRKeysPressed() == MENU_L_PRESSED) { if ((cursorPos & 1) && sub_81ACDFC(cursorPos - 1)) { @@ -1589,7 +1590,7 @@ void Task_HandleOutOfBattleItemMenuInput(u8 taskId) sub_8199134(-1, 0); } } - else if ((gMain.newKeys & DPAD_RIGHT) || GetLRKeysState() == 2) + else if ((gMain.newKeys & DPAD_RIGHT) || GetLRKeysPressed() == MENU_R_PRESSED) { if (!(cursorPos & 1) && sub_81ACDFC(cursorPos + 1)) { @@ -1782,7 +1783,7 @@ void ItemMenu_Give(u8 taskId) BagMenu_PrintThereIsNoPokemon(taskId); else { - gBagMenu->mainCallback2 = sub_81B7F60; + gBagMenu->mainCallback2 = CB2_ChooseMonToGiveItem; unknown_ItemMenu_Confirm(taskId); } } @@ -2157,7 +2158,7 @@ void DoWallyTutorialBagMenu(void) PrepareBagForWallyTutorial(); AddBagItem(ITEM_POTION, 1); AddBagItem(ITEM_POKE_BALL, 1); - GoToBagMenu(RETURN_LOCATION_BATTLE_2, ITEMS_POCKET, SetCB2ToReshowScreenAfterMenu2); + GoToBagMenu(RETURN_LOCATION_BATTLE_2, ITEMS_POCKET, CB2_SetUpReshowBattleScreenAfterMenu2); } void Task_WallyTutorialBagMenu(u8 taskId) diff --git a/src/item_use.c b/src/item_use.c index 46f8cdf4a3..d4be505e17 100755 --- a/src/item_use.c +++ b/src/item_use.c @@ -64,10 +64,10 @@ void sub_80FDC00(u8 taskId); void sub_80FDD74(u8 taskId); void sub_80FDE08(u8 taskId); void sub_80FDE7C(u8 taskId); -void sub_80FDF90(u8 taskId); -void task08_0809AD8C(u8 taskId); -void sub_80FE024(u8 taskId); -void sub_80FE03C(u8 taskId); +static void BootUpSoundTMHM(u8 taskId); +static void Task_ShowTMHMContainedMessage(u8 taskId); +static void UseTMHMYesNo(u8 taskId); +static void UseTMHM(u8 taskId); void sub_80FE124(u8 taskId); void sub_80FE164(u8 taskId); @@ -91,16 +91,16 @@ EWRAM_DATA static void(*gUnknown_0203A0F4)(u8 taskId) = NULL; static const MainCallback gUnknown_085920D8[] = { - sub_81B617C, + CB2_ShowPartyMenuForItemUse, CB2_ReturnToField, NULL, }; static const u8 gUnknown_085920E4[] = {DIR_NORTH, DIR_EAST, DIR_SOUTH, DIR_WEST}; -static const struct YesNoFuncTable gUnknown_085920E8 = +static const struct YesNoFuncTable sUseTMHMYesNoFuncTable = { - .yesFunc = sub_80FE03C, + .yesFunc = UseTMHM, .noFunc = BagMenu_InitListsMenu, }; @@ -722,72 +722,72 @@ void sub_80FDE7C(u8 taskId) void ItemUseOutOfBattle_Medicine(u8 taskId) { - gUnknown_03006328 = ItemUseCB_Medicine; + gItemUseCB = ItemUseCB_Medicine; SetUpItemUseCallback(taskId); } void ItemUseOutOfBattle_ReduceEV(u8 taskId) { - gUnknown_03006328 = sub_81B67C8; + gItemUseCB = ItemUseCB_ReduceEV; SetUpItemUseCallback(taskId); } void ItemUseOutOfBattle_SacredAsh(u8 taskId) { - gUnknown_03006328 = sub_81B79E8; + gItemUseCB = ItemUseCB_SacredAsh; SetUpItemUseCallback(taskId); } void ItemUseOutOfBattle_PPRecovery(u8 taskId) { - gUnknown_03006328 = dp05_ether; + gItemUseCB = ItemUseCB_PPRecovery; SetUpItemUseCallback(taskId); } void ItemUseOutOfBattle_PPUp(u8 taskId) { - gUnknown_03006328 = dp05_pp_up; + gItemUseCB = ItemUseCB_PPUp; SetUpItemUseCallback(taskId); } void ItemUseOutOfBattle_RareCandy(u8 taskId) { - gUnknown_03006328 = dp05_rare_candy; + gItemUseCB = ItemUseCB_RareCandy; SetUpItemUseCallback(taskId); } void ItemUseOutOfBattle_TMHM(u8 taskId) { if (gSpecialVar_ItemId >= ITEM_HM01_CUT) - DisplayItemMessage(taskId, 1, gText_BootedUpHM, sub_80FDF90); // HM + DisplayItemMessage(taskId, 1, gText_BootedUpHM, BootUpSoundTMHM); // HM else - DisplayItemMessage(taskId, 1, gText_BootedUpTM, sub_80FDF90); // TM + DisplayItemMessage(taskId, 1, gText_BootedUpTM, BootUpSoundTMHM); // TM } -void sub_80FDF90(u8 taskId) +static void BootUpSoundTMHM(u8 taskId) { PlaySE(SE_PC_LOGIN); - gTasks[taskId].func = task08_0809AD8C; + gTasks[taskId].func = Task_ShowTMHMContainedMessage; } -void task08_0809AD8C(u8 taskId) +static void Task_ShowTMHMContainedMessage(u8 taskId) { if (gMain.newKeys & (A_BUTTON | B_BUTTON)) { StringCopy(gStringVar1, gMoveNames[ItemIdToBattleMoveId(gSpecialVar_ItemId)]); StringExpandPlaceholders(gStringVar4, gText_TMHMContainedVar1); - DisplayItemMessage(taskId, 1, gStringVar4, sub_80FE024); + DisplayItemMessage(taskId, 1, gStringVar4, UseTMHMYesNo); } } -void sub_80FE024(u8 taskId) +static void UseTMHMYesNo(u8 taskId) { - BagMenu_YesNo(taskId, 6, &gUnknown_085920E8); + BagMenu_YesNo(taskId, 6, &sUseTMHMYesNoFuncTable); } -void sub_80FE03C(u8 taskId) +static void UseTMHM(u8 taskId) { - gUnknown_03006328 = sub_81B6DC4; + gItemUseCB = ItemUseCB_TMHM; SetUpItemUseCallback(taskId); } @@ -912,7 +912,7 @@ void ItemUseOutOfBattle_EscapeRope(u8 taskId) void ItemUseOutOfBattle_EvolutionStone(u8 taskId) { - gUnknown_03006328 = sub_81B7C74; + gItemUseCB = ItemUseCB_EvolutionStone; SetUpItemUseCallback(taskId); } @@ -976,36 +976,37 @@ void ItemUseInBattle_StatIncrease(u8 taskId) } } -void sub_80FE54C(u8 taskId) +static void ItemUseInBattle_ShowPartyMenu(u8 taskId) { if (!InBattlePyramid()) { - gBagMenu->mainCallback2 = sub_81B89F0; + gBagMenu->mainCallback2 = ChooseMonForInBattleItem; unknown_ItemMenu_Confirm(taskId); } else { - gPyramidBagResources->callback2 = sub_81B89F0; + gPyramidBagResources->callback2 = ChooseMonForInBattleItem; sub_81C5B14(taskId); } } void ItemUseInBattle_Medicine(u8 taskId) { - gUnknown_03006328 = ItemUseCB_Medicine; - sub_80FE54C(taskId); + gItemUseCB = ItemUseCB_Medicine; + ItemUseInBattle_ShowPartyMenu(taskId); } -void sub_80FE5AC(u8 taskId) +// Unused. Sacred Ash cannot be used in battle +void ItemUseInBattle_SacredAsh(u8 taskId) { - gUnknown_03006328 = sub_81B79E8; - sub_80FE54C(taskId); + gItemUseCB = ItemUseCB_SacredAsh; + ItemUseInBattle_ShowPartyMenu(taskId); } void ItemUseInBattle_PPRecovery(u8 taskId) { - gUnknown_03006328 = dp05_ether; - sub_80FE54C(taskId); + gItemUseCB = ItemUseCB_PPRecovery; + ItemUseInBattle_ShowPartyMenu(taskId); } void ItemUseInBattle_Escape(u8 taskId) diff --git a/src/mail_data.c b/src/mail_data.c index 809dcc2a8f..b0b05e8fe0 100644 --- a/src/mail_data.c +++ b/src/mail_data.c @@ -63,7 +63,7 @@ u8 GiveMailToMon(struct Pokemon *mon, u16 itemId) gSaveBlock1Ptr->mail[id].playerName[i] = EOS; PadNameString(gSaveBlock1Ptr->mail[id].playerName, CHAR_SPACE); - for (i = 0; i < 4; i++) + for (i = 0; i < TRAINER_ID_LENGTH; i++) gSaveBlock1Ptr->mail[id].trainerId[i] = gSaveBlock2Ptr->playerTrainerId[i]; species = GetBoxMonData(&mon->box, MON_DATA_SPECIES); diff --git a/src/menu.c b/src/menu.c index e349ff43ac..0950e6305b 100644 --- a/src/menu.c +++ b/src/menu.c @@ -1433,13 +1433,13 @@ s8 sub_8199284(void) sub_8199134(0, 1); return MENU_NOTHING_CHOSEN; } - else if (gMain.newKeys & DPAD_LEFT || GetLRKeysState() == 1) + else if (gMain.newKeys & DPAD_LEFT || GetLRKeysPressed() == MENU_L_PRESSED) { PlaySE(SE_SELECT); sub_8199134(-1, 0); return MENU_NOTHING_CHOSEN; } - else if (gMain.newKeys & DPAD_RIGHT || GetLRKeysState() == 2) + else if (gMain.newKeys & DPAD_RIGHT || GetLRKeysPressed() == MENU_R_PRESSED) { PlaySE(SE_SELECT); sub_8199134(1, 0); @@ -1474,13 +1474,13 @@ s8 Menu_ProcessInputGridLayout(void) PlaySE(SE_SELECT); return MENU_NOTHING_CHOSEN; } - else if (gMain.newKeys & DPAD_LEFT || GetLRKeysState() == 1) + else if (gMain.newKeys & DPAD_LEFT || GetLRKeysPressed() == MENU_L_PRESSED) { if (oldPos != sub_81991F8(-1, 0)) PlaySE(SE_SELECT); return MENU_NOTHING_CHOSEN; } - else if (gMain.newKeys & DPAD_RIGHT || GetLRKeysState() == 2) + else if (gMain.newKeys & DPAD_RIGHT || GetLRKeysPressed() == MENU_R_PRESSED) { if (oldPos != sub_81991F8(1, 0)) PlaySE(SE_SELECT); @@ -1513,13 +1513,13 @@ s8 sub_81993D8(void) sub_8199134(0, 1); return MENU_NOTHING_CHOSEN; } - else if ((gMain.newAndRepeatedKeys & DPAD_ANY) == DPAD_LEFT || sub_812210C() == 1) + else if ((gMain.newAndRepeatedKeys & DPAD_ANY) == DPAD_LEFT || GetLRKeysPressedAndHeld() == MENU_L_PRESSED) { PlaySE(SE_SELECT); sub_8199134(-1, 0); return MENU_NOTHING_CHOSEN; } - else if ((gMain.newAndRepeatedKeys & DPAD_ANY) == DPAD_RIGHT || sub_812210C() == 2) + else if ((gMain.newAndRepeatedKeys & DPAD_ANY) == DPAD_RIGHT || GetLRKeysPressedAndHeld() == MENU_R_PRESSED) { PlaySE(SE_SELECT); sub_8199134(1, 0); @@ -1554,13 +1554,13 @@ s8 sub_8199484(void) PlaySE(SE_SELECT); return MENU_NOTHING_CHOSEN; } - else if ((gMain.newAndRepeatedKeys & DPAD_ANY) == DPAD_LEFT || sub_812210C() == 1) + else if ((gMain.newAndRepeatedKeys & DPAD_ANY) == DPAD_LEFT || GetLRKeysPressedAndHeld() == MENU_L_PRESSED) { if (oldPos != sub_81991F8(-1, 0)) PlaySE(SE_SELECT); return MENU_NOTHING_CHOSEN; } - else if ((gMain.newAndRepeatedKeys & DPAD_ANY) == DPAD_RIGHT || sub_812210C() == 2) + else if ((gMain.newAndRepeatedKeys & DPAD_ANY) == DPAD_RIGHT || GetLRKeysPressedAndHeld() == MENU_R_PRESSED) { if (oldPos != sub_81991F8(1, 0)) PlaySE(SE_SELECT); @@ -1883,7 +1883,7 @@ void sub_8199C30(u8 bgId, u8 left, u8 top, u8 width, u8 height, u8 palette) } } -void sub_8199CBC(u8 bgId, u16 *dest, u8 left, u8 top, u8 width, u8 height) +void CopyToBufferFromBgTilemap(u8 bgId, u16 *dest, u8 left, u8 top, u8 width, u8 height) { u8 i; u8 j; @@ -2159,7 +2159,7 @@ void sub_819A344(u8 a0, u8 *dest, u8 color) ConvertIntToDecimalStringN(string, gSaveBlock2Ptr->playTimeMinutes, STR_CONV_MODE_LEADING_ZEROS, 2); break; case 3: - sub_81245DC(string, gMapHeader.regionMapSectionId); + GetMapNameGeneric(string, gMapHeader.regionMapSectionId); break; case 4: for (curFlag = FLAG_BADGE01_GET, flagCount = 0, endOfString = string + 1; curFlag <= FLAG_BADGE08_GET; curFlag++) diff --git a/src/menu_helpers.c b/src/menu_helpers.c index cb0d621c6f..2b7a7f4192 100644 --- a/src/menu_helpers.c +++ b/src/menu_helpers.c @@ -251,27 +251,27 @@ bool8 AdjustQuantityAccordingToDPadInput(s16 *arg0, u16 arg1) return FALSE; } -u8 GetLRKeysState(void) +u8 GetLRKeysPressed(void) { if (gSaveBlock2Ptr->optionsButtonMode == OPTIONS_BUTTON_MODE_LR) { if (gMain.newKeys & L_BUTTON) - return 1; + return MENU_L_PRESSED; if (gMain.newKeys & R_BUTTON) - return 2; + return MENU_R_PRESSED; } return 0; } -u8 sub_812210C(void) +u8 GetLRKeysPressedAndHeld(void) { if (gSaveBlock2Ptr->optionsButtonMode == OPTIONS_BUTTON_MODE_LR) { if (gMain.newAndRepeatedKeys & L_BUTTON) - return 1; + return MENU_L_PRESSED; if (gMain.newAndRepeatedKeys & R_BUTTON) - return 2; + return MENU_R_PRESSED; } return 0; diff --git a/src/move_relearner.c b/src/move_relearner.c index 121ac66e8c..b5202e006b 100644 --- a/src/move_relearner.c +++ b/src/move_relearner.c @@ -513,7 +513,7 @@ static void DoMoveRelearnerMain(void) if (selection == 0) { - if (GiveMoveToMon(&gPlayerParty[sMoveRelearnerStruct->partyMon], GetCurrentSelectedMove()) != 0xFFFF) + if (GiveMoveToMon(&gPlayerParty[sMoveRelearnerStruct->partyMon], GetCurrentSelectedMove()) != MON_HAS_MAX_MOVES) { FormatAndPrintText(gText_MoveRelearnerPkmnLearnedMove); gSpecialVar_0x8004 = TRUE; @@ -778,7 +778,7 @@ static void HandleInput(bool8 showContest) switch (itemId) { case LIST_NOTHING_CHOSEN: - if (!(gMain.newKeys & (DPAD_LEFT | DPAD_RIGHT)) && !GetLRKeysState()) + if (!(gMain.newKeys & (DPAD_LEFT | DPAD_RIGHT)) && !GetLRKeysPressed()) { break; } diff --git a/src/party_menu.c b/src/party_menu.c index 46d5a16c1b..7de8ceee2d 100755 --- a/src/party_menu.c +++ b/src/party_menu.c @@ -72,11 +72,21 @@ #include "constants/items.h" #include "constants/maps.h" #include "constants/moves.h" +#include "constants/party_menu.h" #include "constants/rgb.h" #include "constants/songs.h" #include "constants/species.h" #include "constants/vars.h" +#define PARTY_PAL_SELECTED (1 << 0) +#define PARTY_PAL_FAINTED (1 << 1) +#define PARTY_PAL_TO_SWITCH (1 << 2) +#define PARTY_PAL_MULTI_ALT (1 << 3) +#define PARTY_PAL_SWITCHING (1 << 4) +#define PARTY_PAL_TO_SOFTBOIL (1 << 5) +#define PARTY_PAL_NO_MON (1 << 6) +#define PARTY_PAL_UNUSED (1 << 7) + enum { CAN_LEARN_MOVE, @@ -85,28 +95,28 @@ enum CANNOT_LEARN_MOVE_IS_EGG }; -struct Unk_Rodata1 +struct PartyMenuBoxInfoRects { - void (*unk0)(u8, u8, u8, u8, u8, u8); - u8 unk4[24]; - u8 unk1C; - u8 unk1D; - u8 unk1E; - u8 unk1F; + void (*blitFunc)(u8, u8, u8, u8, u8, u8); + u8 dimensions[24]; + u8 descTextLeft; + u8 descTextTop; + u8 descTextWidth; + u8 descTextHeight; }; -struct Struct203CEC4 +struct PartyMenuInternal { TaskFunc task; MainCallback exitCallback; - u32 unk8_0:1; + u32 chooseHalf:1; u32 unk8_1:3; - u32 unk8_2:7; - u32 unk9_0:7; + u32 spriteIdConfirmPokeball:7; + u32 spriteIdCancelPokeball:7; u32 messageId:14; u8 windowId[3]; u8 actions[8]; - u8 listSize; + u8 numActions; // In vanilla Emerald, only the first 0xB0 hwords (0x160 bytes) are actually used. // However, a full 0x100 hwords (0x200 bytes) are allocated. // It is likely that the 0x160 value used below is a constant defined by @@ -115,10 +125,10 @@ struct Struct203CEC4 s16 data[16]; }; -struct Struct203CEDC +struct PartyMenuBox { - const struct Unk_Rodata1 *unk0; - const u8 *unk4; + const struct PartyMenuBoxInfoRects *infoRects; + const u8 *spriteCoords; u8 windowId; u8 monSpriteId; u8 itemSpriteId; @@ -127,249 +137,246 @@ struct Struct203CEDC }; // EWRAM vars -static EWRAM_DATA struct Struct203CEC4 *gUnknown_0203CEC4 = NULL; -EWRAM_DATA struct Struct203CEC8 gUnknown_0203CEC8 = {0}; -static EWRAM_DATA struct Struct203CEDC *gUnknown_0203CEDC = NULL; -static EWRAM_DATA u8 *gUnknown_0203CEE0 = NULL; -static EWRAM_DATA u8 *gUnknown_0203CEE4 = NULL; -EWRAM_DATA u8 gUnknown_0203CEE8 = 0; -EWRAM_DATA u8 gUnknown_0203CEE9 = 0; +static EWRAM_DATA struct PartyMenuInternal *sPartyMenuInternal = NULL; +EWRAM_DATA struct PartyMenu gPartyMenu = {0}; +static EWRAM_DATA struct PartyMenuBox *sPartyMenuBoxes = NULL; +static EWRAM_DATA u8 *sPartyBgGfxTilemap = NULL; +static EWRAM_DATA u8 *sPartyBgTilemapBuffer = NULL; +EWRAM_DATA bool8 gUnknown_0203CEE8 = 0; // executed party action -ish +EWRAM_DATA u8 gUnknown_0203CEE9 = 0; // party id for something EWRAM_DATA MainCallback gPostMenuFieldCallback = NULL; -static EWRAM_DATA u16 *gUnknown_0203CEF0 = 0; -static EWRAM_DATA u16 *gUnknown_0203CEF4 = 0; +static EWRAM_DATA u16 *sSlot1TilemapBuffer = 0; // for switching party slots +static EWRAM_DATA u16 *sSlot2TilemapBuffer = 0; // EWRAM_DATA u8 gSelectedOrderFromParty[4] = {0}; -static EWRAM_DATA u16 gUnknown_0203CEFC = 0; -static EWRAM_DATA u16 gUnknown_0203CEFE = 0; // unused -EWRAM_DATA u8 gUnknown_0203CF00[3] = {0}; +static EWRAM_DATA u16 sPartyMenuItemId = 0; +static EWRAM_DATA u16 sUnused_0203CEFE = 0; +EWRAM_DATA u8 gBattlePartyCurrentOrder[3] = {0}; // bits 0-3 are the current pos of Slot 1, 4-7 are Slot 2, and so on // IWRAM common -void (*gUnknown_03006328)(u8, TaskFunc); +void (*gItemUseCB)(u8, TaskFunc); -static void reset_brm(void); -static void PartyMenuInitCallback(void); -static bool8 PartyMenuSetup(void); -static void sub_81B209C(void); -static void PartyMenuExit(void); +static void ResetPartyMenu(void); +static void CB2_InitPartyMenu(void); +static bool8 ShowPartyMenu(void); +static void SetPartyMonsAllowedInMinigame(void); +static void ExitPartyMenu(void); static bool8 AllocPartyMenuBg(void); -static bool8 AllocPartyMiscGfx(void); -static void sub_81B239C(u8); -static void PartyMenuInitHelperStructs(u8); +static bool8 AllocPartyMenuBgGfx(void); +static void InitPartyMenuWindows(u8); +static void InitPartyMenuBoxes(u8); static void LoadPartyMenuPokeballGfx(void); static void LoadPartyMenuAilmentGfx(void); static bool8 party_menu_add_per_mon_objects(void); static bool8 RenderPartyMenuBoxes(void); -static void sub_81B0F28(void); +static void CreateCancelConfirmPokeballSprites(void); static void sub_81B2428(u8); -static void PartyMenuExitTask(u8); +static void Task_ExitPartyMenu(u8); static void FreePartyPointers(void); static void PartyPaletteBufferCopy(u8); -static void sub_81B0CEC(u8); -static void UpdateSelectedPartyBox(struct Struct203CEDC *, u8); +static void DisplayPartyPokemonDataForMultiBattle(u8); +static void LoadPartyBoxPalette(struct PartyMenuBox *, u8); static void DrawEmptySlot(u8 windowId); -static void DisplayPartyPokemonSelectForRelearner(u8); -static void DisplayPartyPokemonSelectForContest(u8); -static void DisplayPartyPokemonSelectForBattle(u8); -static void sub_81B0B98(u8); -static void DisplayPartyPokemonSelectHeldItemRelated(u8); -static bool8 sub_81B0BFC(u8); +static void DisplayPartyPokemonDataForRelearner(u8); +static void DisplayPartyPokemonDataForContest(u8); +static void DisplayPartyPokemonDataForChooseHalf(u8); +static void DisplayPartyPokemonDataForWirelessMinigame(u8); +static void DisplayPartyPokemonDataForBattlePyramidHeldItem(u8); +static bool8 DisplayPartyPokemonDataForMoveTutorOrEvolutionItem(u8); static void DisplayPartyPokemonData(u8); -static void DisplayPartyPokemonNickname(struct Pokemon *, struct Struct203CEDC *, u8); -static void DisplayPartyPokemonLevelCheck(struct Pokemon *, struct Struct203CEDC *, u8); -static void DisplayPartyPokemonGenderNidoranCheck(struct Pokemon *, struct Struct203CEDC *, u8); -static void DisplayPartyPokemonHPCheck(struct Pokemon *, struct Struct203CEDC *, u8); -static void DisplayPartyPokemonMaxHPCheck(struct Pokemon *, struct Struct203CEDC *, u8); -static void DisplayPartyPokemonHPBarCheck(struct Pokemon *, struct Struct203CEDC *); -static void DisplayPartyPokemonSelectionText(u8, struct Struct203CEDC *, u8); -static u8 sub_81B8830(void); -static bool8 GetBattleEntryEligibility(struct Pokemon *); -static bool8 sub_81B218C(u8); -static void DisplayPartyPokemonSelectToTeachMove(u8, u16, u8); +static void DisplayPartyPokemonNickname(struct Pokemon *, struct PartyMenuBox *, u8); +static void DisplayPartyPokemonLevelCheck(struct Pokemon *, struct PartyMenuBox *, u8); +static void DisplayPartyPokemonGenderNidoranCheck(struct Pokemon *, struct PartyMenuBox *, u8); +static void DisplayPartyPokemonHPCheck(struct Pokemon *, struct PartyMenuBox *, u8); +static void DisplayPartyPokemonMaxHPCheck(struct Pokemon *, struct PartyMenuBox *, u8); +static void DisplayPartyPokemonHPBarCheck(struct Pokemon *, struct PartyMenuBox *); +static void DisplayPartyPokemonDescriptionText(u8, struct PartyMenuBox *, u8); +static bool8 IsMonAllowedInMinigame(u8); +static void DisplayPartyPokemonDataToTeachMove(u8, u16, u8); static u8 CanMonLearnTMTutor(struct Pokemon *, u16, u8); static void DisplayPartyPokemonBarDetail(u8, const u8*, u8, const u8*); -static void DisplayPartyPokemonLevel(u8, struct Struct203CEDC *); -static void DisplayPartyPokemonGender(u8, u16, u8*, struct Struct203CEDC *); -static void DisplayPartyPokemonHP(u16, struct Struct203CEDC *); -static void DisplayPartyPokemonMaxHP(u16, struct Struct203CEDC *); -static void DisplayPartyPokemonHPBar(u16, u16, struct Struct203CEDC *); -static void party_menu_link_mon_icon_anim(u16, u32, struct Struct203CEDC *, u8, u32); -static void party_menu_link_mon_held_item_object(u16, u16, struct Struct203CEDC *); -static void party_menu_link_mon_pokeball_object(u16, struct Struct203CEDC *); -static void party_menu_link_mon_status_condition_object(u16, u8, struct Struct203CEDC *); -static void party_menu_held_item_object(struct Pokemon *, struct Struct203CEDC *); -static void party_menu_pokeball_object(struct Pokemon *, struct Struct203CEDC *); -static void party_menu_icon_anim(struct Pokemon *, struct Struct203CEDC *, u32); -static void party_menu_status_condition_object(struct Pokemon *, struct Struct203CEDC *); -static u8 sub_81B5F74(u8, u8); +static void DisplayPartyPokemonLevel(u8, struct PartyMenuBox *); +static void DisplayPartyPokemonGender(u8, u16, u8*, struct PartyMenuBox *); +static void DisplayPartyPokemonHP(u16, struct PartyMenuBox *); +static void DisplayPartyPokemonMaxHP(u16, struct PartyMenuBox *); +static void DisplayPartyPokemonHPBar(u16, u16, struct PartyMenuBox *); +static void party_menu_link_mon_icon_anim(u16, u32, struct PartyMenuBox *, u8, u32); +static void party_menu_link_mon_held_item_object(u16, u16, struct PartyMenuBox *); +static void party_menu_link_mon_pokeball_object(u16, struct PartyMenuBox *); +static void party_menu_link_mon_status_condition_object(u16, u8, struct PartyMenuBox *); +static void party_menu_held_item_object(struct Pokemon *, struct PartyMenuBox *); +static void party_menu_pokeball_object(struct Pokemon *, struct PartyMenuBox *); +static void party_menu_icon_anim(struct Pokemon *, struct PartyMenuBox *, u32); +static void party_menu_status_condition_object(struct Pokemon *, struct PartyMenuBox *); +static u8 CreateMenuPokeballSprite(u8, u8); static void sub_81B120C(void); -static u8 sub_81B5F34(u8, u8); +static u8 CreateCancelPokeballSprite(u8, u8); static void AnimateSelectedPartyIcon(u8, u8); -static void sub_81B5F98(u8, u8); -static u8 GetPartyBoxPalBitfield(u8, u8); +static void PartyMenuStartSpriteAnim(u8, u8); +static u8 GetPartyBoxPaletteFlags(u8, u8); static bool8 PartyBoxPal_ParnterOrDisqualifiedInArena(u8); -static u8 sub_81B8F38(u8); +static u8 GetPartyIdFromBattleSlot(u8); static void Task_ClosePartyMenuAndSetCB2(u8); -static void sub_81B9080(void); +static void UpdatePartyToFieldOrder(void); static void sub_81B4F88(void); -static void sub_81B15D0(u8, s8*); -static void sub_81B140C(u8, s8*); +static void HandleChooseMonCancel(u8, s8*); +static void HandleChooseMonSelection(u8, s8*); static u16 PartyMenuButtonHandler(s8*); -static s8* sub_81B13EC(void); -static bool8 sub_81B15A4(u8*); +static s8* GetCurrentPartySlotPtr(void); +static bool8 IsSelectedMonNotEgg(u8*); static void PartyMenuRemoveWindow(u8*); -static void sub_81B9140(void); -static void sub_81B6794(u8); -static void sub_81B7E4C(u8); -static void sub_81B8474(u8); -static void sub_81B7FAC(u8); -static void sub_81B3938(u8); -static void sub_81B21AC(u8, u8); -static void sub_81B36FC(u8); -static void sub_81B407C(u8); -static void sub_81B2210(u8); -static bool8 sub_81B1660(u8); -static const u8* sub_81B88BC(void); -static void sub_81B16D4(u8); -static void sub_81B334C(void); -static void sub_81B1708(u8); -static void sub_81B1C1C(u8); +static void CB2_SetUpExitToBattleScreen(void); +static void Task_ClosePartyMenuAfterText(u8); +static void TryTutorSelectedMon(u8); +static void TryGiveMailToSelectedMon(u8); +static void TryGiveItemToSelectedMon(u8); +static void SwitchSelectedMons(u8); +static void TryEnterMonForMinigame(u8, u8); +static void Task_TryCreateSelectionWindow(u8); +static void FinishTwoMonAction(u8); +static void CancelParticipationPrompt(u8); +static bool8 DisplayCancelChooseMonYesNo(u8); +static const u8* GetFacilityCancelString(void); +static void Task_CancelChooseMonYesNo(u8); +static void PartyMenuDisplayYesNoMenu(void); +static void Task_HandleCancelChooseMonYesNoInput(u8); +static void Task_ReturnToChooseMonAfterText(u8); static void UpdateCurrentPartySelection(s8*, s8); -static void SetNewPartySelectTarget1(s8*, s8); -static void SetNewPartySelectTarget2(s8*, s8); +static void UpdatePartySelectionSingleLayout(s8*, s8); +static void UpdatePartySelectionDoubleLayout(s8*, s8); static s8 sub_81B1B00(s8, s8); static void PartyMenuPrintText(const u8*); -static void sub_81B1B8C(u8); -static void DisplayPartyPokemonHPCheck(struct Pokemon*, struct Struct203CEDC*, u8); -static void DisplayPartyPokemonHPBarCheck(struct Pokemon*, struct Struct203CEDC*); +static void Task_PrintAndWaitForText(u8); static bool16 IsMonAllowedInPokemonJump(struct Pokemon*); -static bool16 sub_81B2164(struct Pokemon*); -static void sub_81B2248(u8); -static void sub_81B227C(u8); +static bool16 IsMonAllowedInDodrioBerryPicking(struct Pokemon*); +static void Task_CancelParticipationYesNo(u8); +static void Task_HandleCancelParticipationYesNoInput(u8); static bool8 CanLearnTutorMove(u16, u8); static u16 GetTutorMove(u8); static bool8 sub_81B314C(void); -static void CreateActionList(struct Pokemon*, u8); -static u8 sub_81B8A2C(struct Pokemon*); -static u8 sub_81B856C(s8); -static void sub_81B469C(u8); -static void HandleMenuInput(u8); -static void sub_81B3828(void); -static void pokemon_change_order(void); -static void sub_81B3894(void); -static void sub_81B3CC0(u8); -static void sub_81B3D48(u8); -static void swap_pokemon_and_oams(void); -static void sub_81B3E60(u8); -static void sub_81B41C4(void); -static void c2_8123744(void); -static void sub_81B452C(void); -static void sub_81B4350(u8); -static void sub_81B42D0(u8); -static void sub_81B43A8(u8); -static void sub_81B43DC(u8); -static void sub_81B44FC(u8); -static void sub_81B4578(void); +static void SetPartyMonFieldSelectionActions(struct Pokemon*, u8); +static u8 GetPartyMenuActionsTypeInBattle(struct Pokemon*); +static u8 GetPartySlotEntryStatus(s8); +static void Task_UpdateHeldItemSprite(u8); +static void Task_HandleSelectionMenuInput(u8); +static void CB2_ShowPokemonSummaryScreen(void); +static void UpdatePartyToBattleOrder(void); +static void CB2_ReturnToPartyMenuFromSummaryScreen(void); +static void SlidePartyMenuBoxOneStep(u8); +static void Task_SlideSelectedSlotsOffscreen(u8); +static void SwitchPartyMon(void); +static void Task_SlideSelectedSlotsOnscreen(u8); +static void CB2_SelectBagItemToGive(void); +static void CB2_GiveHoldItem(void); +static void CB2_WriteMailToGiveMon(void); +static void Task_SwitchHoldItemsPrompt(u8); +static void Task_GiveHoldItem(u8); +static void Task_SwitchItemsYesNo(u8); +static void Task_HandleSwitchItemsYesNoInput(u8); +static void Task_WriteMailToGiveMonAfterText(u8); +static void CB2_ReturnToPartyMenuFromWritingMail(void); static void sub_81B4624(u8); -static void sub_81B5C94(struct Pokemon*, struct Struct203CEDC*); -static void sub_81B48A8(u8); -static void sub_81B48DC(u8); -static void sub_81B4988(u8); +static void UpdatePartyMonHeldItemSprite(struct Pokemon*, struct PartyMenuBox*); +static void Task_TossHeldItemYesNo(u8 taskId); +static void Task_HandleTossHeldItemYesNoInput(u8); +static void Task_TossHeldItem(u8); static void sub_81B4A98(void); static void sub_81B4AE0(void); static void sub_81B4B6C(u8); static void sub_81B4BA0(u8); static void sub_81B4C60(u8); static void sub_81B4C94(u8); -static bool8 sub_81B8A7C(void); -static void sub_81B53FC(u8); -static void sub_81B5430(u8); -static void task_brm_cancel_1_on_keypad_a_or_b(u8); -static void sub_81B5674(u8); -static void sub_81B57DC(void); -static void sub_81B5864(void); -static void sub_81B56A4(u8); -static void sub_81B56D8(u8); -static void task_launch_hm_phase_2(u8); -static u16 brm_get_selected_species(void); -static void sub_81B5B38(u8, struct Pokemon*); +static bool8 TrySwitchInPokemon(void); +static void Task_SpinTradeYesNo(u8); +static void Task_HandleSpinTradeYesNoInput(u8); +static void Task_CancelAfterAorBPress(u8); +static void DisplayFieldMoveExitAreaMessage(u8); +static void DisplayCantUseFlashMessage(void); +static void DisplayCantUseSurfMessage(void); +static void Task_FieldMoveExitAreaYesNo(u8); +static void Task_HandleFieldMoveExitAreaYesNoInput(u8); +static void Task_FieldMoveWaitForFade(u8); +static u16 GetFieldMoveMonSpecies(void); +static void UpdatePartyMonHPBar(u8, struct Pokemon*); static void UpdatePartyMonIconFrame(struct Sprite*); static void UpdatePartyMonIconFrameAndBounce(struct Sprite*); -static void sub_81B5CB0(u16, struct Struct203CEDC*); +static void ShowOrHideHeldItemSprite(u16, struct PartyMenuBox*); static void CreateHeldItemSpriteForTrade(u8, bool8); static void SpriteCB_HeldItem(struct Sprite*); -static void party_menu_get_status_condition_and_update_object(struct Pokemon*, struct Struct203CEDC*); -static void party_menu_update_status_condition_object(u8, struct Struct203CEDC*); -static u8 sub_81B8984(void); +static void SetPartyMonAilmentGfx(struct Pokemon*, struct PartyMenuBox*); +static void UpdatePartyMonAilmentGfx(u8, struct PartyMenuBox*); +static u8 GetPartyLayoutFromBattleType(void); static void sub_81B6280(u8); -static void c2_815ABFC(void); -static void sub_81B672C(u8); +static void CB2_ReturnToBagMenu(void); +static void Task_DisplayHPRestoredMessage(u8); static u16 ItemEffectToMonEv(struct Pokemon*, u8); static void ItemEffectToStatString(u8, u8*); -static void sub_81B6BB4(u8); -static void ether_effect_related_2(u8); -static void ether_effect_related(u8); -static void sub_81B6EB4(u8); -static void sub_81B6FF4(u8); -static void sub_81B6F60(u8); -static void sub_81B6F98(u8); -static void sub_81B77AC(u8); -static void sub_81B7028(u8); -static void sub_81B7088(u8); -static void sub_81B7230(u8); -static void sub_81B70B8(void); -static void sub_81B70F0(void); -static void sub_81B711C(u8); -static void sub_81B7154(u8); -static void sub_81B71D4(u8); -static void sub_81B7294(u8); -static void sub_81B72C8(u8); -static void sub_81B73E4(u8); -static void sub_81B79A0(struct Pokemon*, s16*); -static void sub_81B754C(u8, struct Pokemon*); -static void sub_81B75D4(u8); -static void sub_81B767C(u8); -static void sub_81B7634(u8); -static void sub_81B76C8(u8); -static void sub_81B7704(u8); -static void sub_81B7810(u8); -static void sub_81B787C(u8); -static void sub_81B7910(u8, u16); +static void ReturnToUseOnWhichMon(u8); +static void SetSelectedMoveForPPItem(u8); +static void TryUsePPItem(u8); +static void Task_LearnedMove(u8); +static void Task_ReplaceMoveYesNo(u8); +static void Task_DoLearnedMoveFanfareAfterText(u8); +static void Task_LearnNextMoveOrClosePartyMenu(u8); +static void Task_TryLearningNextMove(u8); +static void Task_HandleReplaceMoveYesNoInput(u8); +static void Task_ShowSummaryScreenToForgetMove(u8); +static void StopLearningMovePrompt(u8); +static void CB2_ShowSummaryScreenToForgetMove(void); +static void CB2_ReturnToPartyMenuWhileLearningMove(void); +static void Task_ReturnToPartyMenuWhileLearningMove(u8); +static void DisplayPartyMenuForgotMoveMessage(u8); +static void Task_PartyMenuReplaceMove(u8); +static void Task_StopLearningMoveYesNo(u8); +static void Task_HandleStopLearningMoveYesNoInput(u8); +static void Task_TryLearningNextMoveAfterText(u8); +static void BufferMonStatsToTaskData(struct Pokemon*, s16*); +static void UpdateMonDisplayInfoAfterRareCandy(u8, struct Pokemon*); +static void Task_DisplayLevelUpStatsPg1(u8); +static void DisplayLevelUpStatsPg1(u8); +static void Task_DisplayLevelUpStatsPg2(u8); +static void DisplayLevelUpStatsPg2(u8); +static void Task_TryLearnNewMoves(u8); +static void PartyMenuTryEvolution(u8); +static void DisplayMonNeedsToReplaceMove(u8); +static void DisplayMonLearnedMove(u8, u16); static void sub_81B7A28(u8); static void task_sacred_ash_party_loop(u8); -static void sub_81B7C10(u8); -static void sub_81B8044(u8); +static void Task_SacredAshDisplayHPRestored(u8); +static void GiveItemToSelectedMon(u8); static void sub_81B83B8(u8); static void sub_81B82A0(u8); -static void sub_81B83F0(u16); -static void sub_81B814C(void); +static void RemoveItemToGiveFromBag(u16); +static void CB2_WriteMailToGiveMonFromBag(void); static void sub_81B8088(u8); -static void sub_81B8104(u8); -static void sub_81B81A8(void); +static void Task_UpdateHeldItemSpriteAndClosePartyMenu(u8); +static void CB2_ReturnToPartyOrBagMenuFromWritingMail(void); static bool8 sub_81B841C(u16); static void sub_81B8230(u8); static void sub_81B82D4(u8); -static void sub_81B879C(u8); +static void Task_ValidateChosenHalfParty(u8); static bool8 GetBattleEntryEligibility(struct Pokemon*); -static bool8 sub_81B8770(u8); -static u8 sub_81B8888(void); -static u8 sub_81B885C(void); -static void sub_81B87E8(u8); +static bool8 HasPartySlotAlreadyBeenSelected(u8); +static u8 GetBattleEntryLevelCap(void); +static u8 GetMaxBattleEntries(void); +static u8 GetMinBattleEntries(void); +static void Task_ContinueChoosingHalfParty(u8); static void sub_81B8C88(u8*, bool8); static void sub_81B8D88(u8*, u8, u8); -static void sub_81B917C(u8); -static void sub_81B91B4(u8); -static void sub_81B9294(u8); -static void sub_81B9240(u8); -static void sub_81B9390(void); -static void task_hm_without_phase_2(u8); -static void sub_81B9424(u8); -static void sub_81B9470(void); -static void sub_81B94D0(u8); -static void sub_81B953C(u8); -static void sub_81B9588(void); -static void sub_81B9640(u8); -static void sub_81B97DC(struct Pokemon*, u8, u8); -static void BlitBitmapToPartyWindow_Default1(u8 windowId, u8 x, u8 y, u8 width, u8 height, u8 f); -static void BlitBitmapToPartyWindow_Default2(u8 windowId, u8 x, u8 y, u8 width, u8 height, u8 f); +static void Task_InitMultiPartnerPartySlideIn(u8); +static void Task_MultiPartnerPartySlideIn(u8); +static void SlideMultiPartyMenuBoxSpritesOneStep(u8); +static void Task_WaitAfterMultiPartnerPartySlideIn(u8); +static void BufferMonSelection(void); +static void Task_PartyMenuWaitForFade(u8 taskId); +static void Task_ChooseContestMon(u8 taskId); +static void CB2_ChooseContestMon(void); +static void Task_ChoosePartyMon(u8 taskId); +static void Task_ChooseMonForMoveRelearner(u8 taskId); +static void CB2_ChooseMonForMoveRelearner(void); +static void Task_BattlePyramidChooseMonHeldItems(u8 taskId); +static void ShiftMoveSlot(struct Pokemon*, u8, u8); +static void BlitBitmapToPartyWindow_LeftColumn(u8 windowId, u8 x, u8 y, u8 width, u8 height, u8 f); +static void BlitBitmapToPartyWindow_RightColumn(u8 windowId, u8 x, u8 y, u8 width, u8 height, u8 f); static void CursorCb_Summary(u8 taskId); static void CursorCb_Switch(u8 taskId); static void CursorCb_Cancel1(u8 taskId); @@ -397,7 +404,7 @@ static bool8 SetUpFieldMove_Dive(void); // static const data #include "data/pokemon/tutor_learnsets.h" -static const struct BgTemplate gUnknown_086156B8[] = +static const struct BgTemplate sPartyMenuBgTemplates[] = { { .bg = 0, @@ -428,22 +435,59 @@ static const struct BgTemplate gUnknown_086156B8[] = }, }; -static const struct Unk_Rodata1 gUnknown_086156C4[] = +enum { - {BlitBitmapToPartyWindow_Default1, {0x18, 0xB, 0x28, 0xD, 0x20, 0x14, 0x20, 8, 0x40, 0x14, 8, 8, 0x26, 0x25, 0x18, 8, 0x35, 0x25, 0x18, 8, 0x18, 0x23, 0x30, 3}, 0xC, 0x22, 0x40, 0x10}, - {BlitBitmapToPartyWindow_Default2, {0x16, 3, 0x28, 0xD, 0x1E, 0xC, 0x20, 8, 0x3E, 0xC, 8, 8, 0x66, 0xC, 0x18, 8, 0x75, 0xC, 0x18, 8, 0x58, 0xA, 0x30, 3}, 0x4D, 4, 0x40, 0x10}, + PARTY_BOX_LEFT_COLUMN, + PARTY_BOX_RIGHT_COLUMN }; -static const u8 gUnknown_08615704[][6][8] = +static const struct PartyMenuBoxInfoRects sPartyBoxInfoRects[] = { - { - {16, 40, 20, 50, 50, 52, 16, 34}, - {104, 18, 108, 28, 136, 27, 102, 25}, - {104, 42, 108, 52, 136, 51, 102, 49}, - {104, 66, 108, 76, 136, 75, 102, 73}, - {104, 90, 108, 100, 136, 99, 102, 97}, + [PARTY_BOX_LEFT_COLUMN] = + { + BlitBitmapToPartyWindow_LeftColumn, + { + //The below are the x, y, width, and height for each of the following info + 24, 11, 40, 13, // Nickname + 32, 20, 32, 8, // Level + 64, 20, 8, 8, // Gender + 38, 37, 24, 8, // HP + 53, 37, 24, 8, // Max HP + 24, 35, 48, 3 // HP bar + }, + 12, 34, 64, 16 // Description text (e.g. NO USE) + }, + [PARTY_BOX_RIGHT_COLUMN] = + { + BlitBitmapToPartyWindow_RightColumn, + { + // See above comment + 22, 3, 40, 13, // Nickname + 30, 12, 32, 8, // Level + 62, 12, 8, 8, // Gender + 102, 12, 24, 8, // HP + 117, 12, 24, 8, // Max HP + 88, 10, 48, 3 // HP bar + }, + 77, 4, 64, 16 // Description text + }, +}; + + +// Each layout array has the sprite coords for each of the party mons in the following order +// Pokemon icon (x, y), held item (x, y), status condition (x, y), menu pokeball (x, y) +static const u8 sPartyMenuSpriteCoords[PARTY_LAYOUT_COUNT][PARTY_SIZE][4 * 2] = +{ + [PARTY_LAYOUT_SINGLE] = + { + { 16, 40, 20, 50, 50, 52, 16, 34}, + {104, 18, 108, 28, 136, 27, 102, 25}, + {104, 42, 108, 52, 136, 51, 102, 49}, + {104, 66, 108, 76, 136, 75, 102, 73}, + {104, 90, 108, 100, 136, 99, 102, 97}, {104, 114, 108, 124, 136, 123, 102, 121}, }, + [PARTY_LAYOUT_DOUBLE] = { {16, 24, 20, 34, 50, 36, 16, 18}, {16, 80, 20, 90, 50, 92, 16, 74}, @@ -452,6 +496,7 @@ static const u8 gUnknown_08615704[][6][8] = {104, 82, 108, 92, 136, 91, 102, 89}, {104, 114, 108, 124, 136, 123, 102, 121}, }, + [PARTY_LAYOUT_MULTI] = { {16, 24, 20, 34, 50, 36, 16, 18}, {16, 80, 20, 90, 50, 92, 16, 74}, @@ -460,6 +505,7 @@ static const u8 gUnknown_08615704[][6][8] = {104, 82, 106, 92, 136, 91, 102, 89}, {104, 106, 106, 116, 136, 115, 102, 113}, }, + [PARTY_LAYOUT_MULTI_SHOWCASE] = { {16, 32, 20, 42, 50, 44, 16, 26}, {104, 34, 106, 44, 136, 43, 102, 41}, @@ -470,8 +516,8 @@ static const u8 gUnknown_08615704[][6][8] = }, }; -static const u32 gUnknown_086157C4[] = INCBIN_U32("graphics/interface/unknown_6157C4.bin"); -static const u32 gUnknown_086157E0[] = INCBIN_U32("graphics/interface/unknown_6157E0.bin"); +static const u32 sConfirmButtonPokeball_Tilemap[] = INCBIN_U32("graphics/interface/unknown_6157C4.bin"); +static const u32 sCancelButtonPokeball_Tilemap[] = INCBIN_U32("graphics/interface/unknown_6157E0.bin"); static const u8 sFontColorTable[][3] = { @@ -483,7 +529,7 @@ static const u8 sFontColorTable[][3] = {0, 1, 2}, }; -static const struct WindowTemplate gUnknown_08615810[] = +static const struct WindowTemplate sSinglePartyMenuWindowTemplate[] = { { .bg = 0, @@ -551,7 +597,7 @@ static const struct WindowTemplate gUnknown_08615810[] = DUMMY_WIN_TEMPLATE }; -static const struct WindowTemplate gUnknown_08615850[] = +static const struct WindowTemplate sDoublePartyMenuWindowTemplate[] = { { .bg = 0, @@ -619,7 +665,7 @@ static const struct WindowTemplate gUnknown_08615850[] = DUMMY_WIN_TEMPLATE }; -static const struct WindowTemplate gUnknown_08615890[] = +static const struct WindowTemplate sMultiPartyMenuWindowTemplate[] = { { .bg = 0, @@ -687,7 +733,7 @@ static const struct WindowTemplate gUnknown_08615890[] = DUMMY_WIN_TEMPLATE }; -static const struct WindowTemplate gUnknown_086158D0[] = +static const struct WindowTemplate sShowcaseMultiPartyMenuWindowTemplate[] = { { .bg = 0, @@ -779,7 +825,7 @@ static const struct WindowTemplate gUnknown_08615918 = .baseBlock = 0x1D3, }; -static const struct WindowTemplate gUnknown_08615920 = +static const struct WindowTemplate sDefaultPartyMsgWindowTemplate = { .bg = 2, .tilemapLeft = 1, @@ -790,7 +836,7 @@ static const struct WindowTemplate gUnknown_08615920 = .baseBlock = 0x24F, }; -static const struct WindowTemplate gUnknown_08615928 = +static const struct WindowTemplate sDoWhatWithMonMsgWindowTemplate = { .bg = 2, .tilemapLeft = 1, @@ -801,7 +847,7 @@ static const struct WindowTemplate gUnknown_08615928 = .baseBlock = 0x279, }; -static const struct WindowTemplate gUnknown_08615930 = +static const struct WindowTemplate sDoWhatWithItemMsgWindowTemplate = { .bg = 2, .tilemapLeft = 1, @@ -812,7 +858,7 @@ static const struct WindowTemplate gUnknown_08615930 = .baseBlock = 0x299, }; -static const struct WindowTemplate gUnknown_08615938 = +static const struct WindowTemplate sDoWhatWithMailMsgWindowTemplate = { .bg = 2, .tilemapLeft = 1, @@ -823,7 +869,7 @@ static const struct WindowTemplate gUnknown_08615938 = .baseBlock = 0x299, }; -static const struct WindowTemplate gUnknown_08615940 = +static const struct WindowTemplate sWhichMoveMsgWindowTemplate = { .bg = 2, .tilemapLeft = 1, @@ -834,7 +880,7 @@ static const struct WindowTemplate gUnknown_08615940 = .baseBlock = 0x299, }; -static const struct WindowTemplate gUnknown_08615948 = +static const struct WindowTemplate sAlreadyHoldingOneMsgWindowTemplate = { .bg = 2, .tilemapLeft = 1, @@ -845,7 +891,7 @@ static const struct WindowTemplate gUnknown_08615948 = .baseBlock = 0x299, }; -static const struct WindowTemplate gUnknown_08615950 = +static const struct WindowTemplate sItemGiveTakeWindowTemplate = { .bg = 2, .tilemapLeft = 23, @@ -856,7 +902,7 @@ static const struct WindowTemplate gUnknown_08615950 = .baseBlock = 0x39D, }; -static const struct WindowTemplate gUnknown_08615958 = +static const struct WindowTemplate sMailReadTakeWindowTemplate = { .bg = 2, .tilemapLeft = 21, @@ -867,7 +913,7 @@ static const struct WindowTemplate gUnknown_08615958 = .baseBlock = 0x39D, }; -static const struct WindowTemplate gUnknown_08615960 = +static const struct WindowTemplate sMoveSelectWindowTemplate = { .bg = 2, .tilemapLeft = 19, @@ -878,7 +924,7 @@ static const struct WindowTemplate gUnknown_08615960 = .baseBlock = 0x2E9, }; -static const struct WindowTemplate gUnknown_08615968 = +static const struct WindowTemplate sPartyMenuYesNoWindowTemplate = { .bg = 2, .tilemapLeft = 21, @@ -889,7 +935,7 @@ static const struct WindowTemplate gUnknown_08615968 = .baseBlock = 0x2E9, }; -static const struct WindowTemplate gUnknown_08615970 = +static const struct WindowTemplate sLevelUpStatsWindowTemplate = { .bg = 2, .tilemapLeft = 19, @@ -900,8 +946,7 @@ static const struct WindowTemplate gUnknown_08615970 = .baseBlock = 0x2E9, }; -// Unused. -static const struct WindowTemplate gUnknown_08615978 = +static const struct WindowTemplate sUnusedWindowTemplate_08615978 = { .bg = 2, .tilemapLeft = 2, @@ -912,8 +957,7 @@ static const struct WindowTemplate gUnknown_08615978 = .baseBlock = 0x1DF, }; -// Unused. -static const struct WindowTemplate gUnknown_08615980 = +static const struct WindowTemplate sUnusedWindowTemplate_08615980 = { .bg = 2, .tilemapLeft = 0, @@ -924,6 +968,7 @@ static const struct WindowTemplate gUnknown_08615980 = .baseBlock = 0x39D, }; +// Tile nums static const u8 sMainSlotTileNums[] = {24, 25, 25, 25, 25, 25, 25, 25, 25, 26, 32, 33, 33, 33, 33, 33, 33, 33, 33, 34, 32, 33, 33, 33, 33, 33, 33, 33, 33, 34, @@ -951,30 +996,35 @@ static const u8 sOtherSlotsTileNums_Egg[] = {43, 44, 44, 44, 44, 44, 44, 44, 44, static const u8 sEmptySlotTileNums[] = {21, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 23, 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, 37, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 39}; -static const u8 gUnknown_08615AB6[] = {11, 12}; -static const u8 gUnknown_08615AB8[] = {9, 10}; -static const u8 gUnknown_08615ABA[] = {4, 5, 6}; -static const u8 gUnknown_08615ABD[] = {1, 7, 8}; -static const u8 gUnknown_08615AC0[] = {1, 11, 12}; -static const u8 gUnknown_08615AC3[] = {59, 60}; -static const u8 gUnknown_08615AC5[] = {75, 76}; -static const u8 gUnknown_08615AC7[] = {57, 58}; -static const u8 gUnknown_08615AC9[] = {73, 74}; -static const u8 gUnknown_08615ACB[] = {89, 90}; -static const u8 gUnknown_08615ACD[] = {52, 53, 54}; -static const u8 gUnknown_08615AD0[] = {68, 69, 70}; -static const u8 gUnknown_08615AD3[] = {84, 85, 86}; -static const u8 gUnknown_08615AD6[] = {116, 117, 118}; -static const u8 gUnknown_08615AD9[] = {132, 133, 134}; -static const u8 gUnknown_08615ADC[] = {148, 149, 150}; -static const u8 gUnknown_08615ADF[] = {100, 101, 102}; -static const u8 gUnknown_08615AE2[] = {49, 55, 56}; -static const u8 gUnknown_08615AE5[] = {65, 71, 72}; -static const u8 gUnknown_08615AE8[] = {81, 87, 88}; -static const u8 gUnknown_08615AEB[] = {97, 103, 104}; -static const u8 gUnknown_08615AEE[] = {161, 167, 168}; -static const u8 gUnknown_08615AF1[] = {17, 27, 28}; +// Palette offsets +static const u8 sGenderPalOffsets[] = {11, 12}; +static const u8 sHPBarPalOffsets[] = {9, 10}; +static const u8 sPartyBoxPalOffsets1[] = {4, 5, 6}; +static const u8 sPartyBoxPalOffsets2[] = {1, 7, 8}; +static const u8 sPartyBoxNoMonPalOffsets[] = {1, 11, 12}; + +// Palette ids +static const u8 sGenderMalePalIds[] = {59, 60}; +static const u8 sGenderFemalePalIds[] = {75, 76}; +static const u8 sHPBarGreenPalIds[] = {57, 58}; +static const u8 sHPBarYellowPalIds[] = {73, 74}; +static const u8 sHPBarRedPalIds[] = {89, 90}; +static const u8 sPartyBoxEmptySlotPalIds1[] = {52, 53, 54}; +static const u8 sPartyBoxMultiPalIds1[] = {68, 69, 70}; +static const u8 sPartyBoxFaintedPalIds1[] = {84, 85, 86}; +static const u8 sPartyBoxCurrSelectionPalIds1[] = {116, 117, 118}; +static const u8 sPartyBoxCurrSelectionMultiPalIds[] = {132, 133, 134}; +static const u8 sPartyBoxCurrSelectionFaintedPalIds[] = {148, 149, 150}; +static const u8 sPartyBoxSelectedForActionPalIds1[] = {100, 101, 102}; +static const u8 sPartyBoxEmptySlotPalIds2[] = {49, 55, 56}; +static const u8 sPartyBoxMultiPalIds2[] = {65, 71, 72}; +static const u8 sPartyBoxFaintedPalIds2[] = {81, 87, 88}; +static const u8 sPartyBoxCurrSelectionPalIds2[] = {97, 103, 104}; +static const u8 sPartyBoxSelectedForActionPalIds2[] = {161, 167, 168}; +static const u8 sPartyBoxNoMonPalIds[] = {17, 27, 28}; + +//TOOD: IDs? static const u8 *const sActionStringTable[] = { gText_ChoosePokemon, @@ -1006,25 +1056,24 @@ static const u8 *const sActionStringTable[] = gText_AlreadyHoldingOne, }; -static const u8 *const sSelectionStringTable[] = +static const u8 *const sDescriptionStringTable[] = { - gText_NoUse, - gText_Able, - gText_First_PM, - gText_Second_PM, - gText_Third_PM, - gText_Fourth, - gText_Able2, - gText_NotAble, - gText_Able3, - gText_NotAble2, - gText_Learned, - gText_Have, - gText_DontHave, + [PARTYBOX_DESC_NO_USE] = gText_NoUse, + [PARTYBOX_DESC_ABLE_3] = gText_Able, + [PARTYBOX_DESC_FIRST] = gText_First_PM, + [PARTYBOX_DESC_SECOND] = gText_Second_PM, + [PARTYBOX_DESC_THIRD] = gText_Third_PM, + [PARTYBOX_DESC_FOURTH] = gText_Fourth, + [PARTYBOX_DESC_ABLE] = gText_Able2, + [PARTYBOX_DESC_NOT_ABLE] = gText_NotAble, + [PARTYBOX_DESC_ABLE_2] = gText_Able3, + [PARTYBOX_DESC_NOT_ABLE_2] = gText_NotAble2, + [PARTYBOX_DESC_LEARNED] = gText_Learned, + [PARTYBOX_DESC_HAVE] = gText_Have, + [PARTYBOX_DESC_DONT_HAVE] = gText_DontHave, }; -// Unknown unused data. Feel free to remove. -static const u16 gUnknown_08615B94[] = +static const u16 sUnused_08615B94[] = { 0x0108, 0x0151, 0x0160, 0x015b, 0x002e, 0x005c, 0x0102, 0x0153, 0x014b, 0x00ed, 0x00f1, 0x010d, 0x003a, 0x003b, 0x003f, 0x0071, 0x00b6, 0x00f0, 0x00ca, 0x00db, 0x00da, 0x004c, 0x00e7, 0x0055, 0x0057, 0x0059, 0x00d8, 0x005b, 0x005e, 0x00f7, 0x0118, 0x0068, @@ -1118,54 +1167,73 @@ struct [MENU_FIELD_MOVES + FIELD_MOVE_SWEET_SCENT] = {gMoveNames[MOVE_SWEET_SCENT], CursorCb_FieldMove}, }; -static const u8 gUnknown_08615D10[] = {MENU_SUMMARY, MENU_SWITCH, MENU_CANCEL1}; -static const u8 gUnknown_08615D13[] = {MENU_SHIFT, MENU_SUMMARY, MENU_CANCEL1}; -static const u8 gUnknown_08615D16[] = {MENU_SEND_OUT, MENU_SUMMARY, MENU_CANCEL1}; -static const u8 gUnknown_08615D19[] = {MENU_SUMMARY, MENU_CANCEL1}; -static const u8 gUnknown_08615D1B[] = {MENU_ENTER, MENU_SUMMARY, MENU_CANCEL1}; -static const u8 gUnknown_08615D1E[] = {MENU_NO_ENTRY, MENU_SUMMARY, MENU_CANCEL1}; -static const u8 gUnknown_08615D21[] = {MENU_STORE, MENU_SUMMARY, MENU_CANCEL1}; -static const u8 gUnknown_08615D24[] = {MENU_GIVE, MENU_TAKE_ITEM, MENU_CANCEL2}; -static const u8 gUnknown_08615D27[] = {MENU_READ, MENU_TAKE_MAIL, MENU_CANCEL2}; -static const u8 gUnknown_08615D2A[] = {MENU_REGISTER, MENU_SUMMARY, MENU_CANCEL1}; -static const u8 gUnknown_08615D2D[] = {MENU_TRADE1, MENU_SUMMARY, MENU_CANCEL1}; -static const u8 gUnknown_08615D30[] = {MENU_TRADE2, MENU_SUMMARY, MENU_CANCEL1}; -static const u8 gUnknown_08615D33[] = {MENU_TAKE_ITEM, MENU_TOSS, MENU_CANCEL1}; +static const u8 sPartyMenuAction_SummarySwitchCancel[] = {MENU_SUMMARY, MENU_SWITCH, MENU_CANCEL1}; +static const u8 sPartyMenuAction_ShiftSummaryCancel[] = {MENU_SHIFT, MENU_SUMMARY, MENU_CANCEL1}; +static const u8 sPartyMenuAction_SendOutSummaryCancel[] = {MENU_SEND_OUT, MENU_SUMMARY, MENU_CANCEL1}; +static const u8 sPartyMenuAction_SummaryCancel[] = {MENU_SUMMARY, MENU_CANCEL1}; +static const u8 sPartyMenuAction_EnterSummaryCancel[] = {MENU_ENTER, MENU_SUMMARY, MENU_CANCEL1}; +static const u8 sPartyMenuAction_NoEntrySummaryCancel[] = {MENU_NO_ENTRY, MENU_SUMMARY, MENU_CANCEL1}; +static const u8 sPartyMenuAction_StoreSummaryCancel[] = {MENU_STORE, MENU_SUMMARY, MENU_CANCEL1}; +static const u8 sPartyMenuAction_GiveTakeItemCancel[] = {MENU_GIVE, MENU_TAKE_ITEM, MENU_CANCEL2}; +static const u8 sPartyMenuAction_ReadTakeMailCancel[] = {MENU_READ, MENU_TAKE_MAIL, MENU_CANCEL2}; +static const u8 sPartyMenuAction_RegisterSummaryCancel[] = {MENU_REGISTER, MENU_SUMMARY, MENU_CANCEL1}; +static const u8 sPartyMenuAction_TradeSummaryCancel1[] = {MENU_TRADE1, MENU_SUMMARY, MENU_CANCEL1}; +static const u8 sPartyMenuAction_TradeSummaryCancel2[] = {MENU_TRADE2, MENU_SUMMARY, MENU_CANCEL1}; +static const u8 sPartyMenuAction_TakeItemTossCancel[] = {MENU_TAKE_ITEM, MENU_TOSS, MENU_CANCEL1}; -static const u8 *const sActionTable[] = +// IDs for the action lists that appear when a party mon is selected +enum { - NULL, - gUnknown_08615D10, - gUnknown_08615D13, - gUnknown_08615D16, - gUnknown_08615D1B, - gUnknown_08615D1E, - gUnknown_08615D21, - gUnknown_08615D19, - gUnknown_08615D24, - gUnknown_08615D27, - gUnknown_08615D2A, - gUnknown_08615D2D, - gUnknown_08615D30, - gUnknown_08615D33, + ACTIONS_NONE, + ACTIONS_SWITCH, + ACTIONS_SHIFT, + ACTIONS_SEND_OUT, + ACTIONS_ENTER, + ACTIONS_NO_ENTRY, + ACTIONS_STORE, + ACTIONS_SUMMARY_ONLY, + ACTIONS_ITEM, + ACTIONS_MAIL, + ACTIONS_REGISTER, + ACTIONS_TRADE, + ACTIONS_SPIN_TRADE, + ACTIONS_TAKEITEM_TOSS }; -static const u8 sListSizeTable[] = +static const u8 *const sPartyMenuActions[] = { - 0x00, - ARRAY_COUNT(gUnknown_08615D10), - ARRAY_COUNT(gUnknown_08615D13), - ARRAY_COUNT(gUnknown_08615D16), - ARRAY_COUNT(gUnknown_08615D1B), - ARRAY_COUNT(gUnknown_08615D1E), - ARRAY_COUNT(gUnknown_08615D21), - ARRAY_COUNT(gUnknown_08615D19), - ARRAY_COUNT(gUnknown_08615D24), - ARRAY_COUNT(gUnknown_08615D27), - ARRAY_COUNT(gUnknown_08615D2A), - ARRAY_COUNT(gUnknown_08615D2D), - ARRAY_COUNT(gUnknown_08615D30), - ARRAY_COUNT(gUnknown_08615D33) + [ACTIONS_NONE] = NULL, + [ACTIONS_SWITCH] = sPartyMenuAction_SummarySwitchCancel, + [ACTIONS_SHIFT] = sPartyMenuAction_ShiftSummaryCancel, + [ACTIONS_SEND_OUT] = sPartyMenuAction_SendOutSummaryCancel, + [ACTIONS_ENTER] = sPartyMenuAction_EnterSummaryCancel, + [ACTIONS_NO_ENTRY] = sPartyMenuAction_NoEntrySummaryCancel, + [ACTIONS_STORE] = sPartyMenuAction_StoreSummaryCancel, + [ACTIONS_SUMMARY_ONLY] = sPartyMenuAction_SummaryCancel, + [ACTIONS_ITEM] = sPartyMenuAction_GiveTakeItemCancel, + [ACTIONS_MAIL] = sPartyMenuAction_ReadTakeMailCancel, + [ACTIONS_REGISTER] = sPartyMenuAction_RegisterSummaryCancel, + [ACTIONS_TRADE] = sPartyMenuAction_TradeSummaryCancel1, + [ACTIONS_SPIN_TRADE] = sPartyMenuAction_TradeSummaryCancel2, + [ACTIONS_TAKEITEM_TOSS] = sPartyMenuAction_TakeItemTossCancel, +}; + +static const u8 sPartyMenuActionCounts[] = +{ + [ACTIONS_NONE] = 0, + [ACTIONS_SWITCH] = ARRAY_COUNT(sPartyMenuAction_SummarySwitchCancel), + [ACTIONS_SHIFT] = ARRAY_COUNT(sPartyMenuAction_ShiftSummaryCancel), + [ACTIONS_SEND_OUT] = ARRAY_COUNT(sPartyMenuAction_SendOutSummaryCancel), + [ACTIONS_ENTER] = ARRAY_COUNT(sPartyMenuAction_EnterSummaryCancel), + [ACTIONS_NO_ENTRY] = ARRAY_COUNT(sPartyMenuAction_NoEntrySummaryCancel), + [ACTIONS_STORE] = ARRAY_COUNT(sPartyMenuAction_StoreSummaryCancel), + [ACTIONS_SUMMARY_ONLY] = ARRAY_COUNT(sPartyMenuAction_SummaryCancel), + [ACTIONS_ITEM] = ARRAY_COUNT(sPartyMenuAction_GiveTakeItemCancel), + [ACTIONS_MAIL] = ARRAY_COUNT(sPartyMenuAction_ReadTakeMailCancel), + [ACTIONS_REGISTER] = ARRAY_COUNT(sPartyMenuAction_RegisterSummaryCancel), + [ACTIONS_TRADE] = ARRAY_COUNT(sPartyMenuAction_TradeSummaryCancel1), + [ACTIONS_SPIN_TRADE] = ARRAY_COUNT(sPartyMenuAction_TradeSummaryCancel2), + [ACTIONS_TAKEITEM_TOSS] = ARRAY_COUNT(sPartyMenuAction_TakeItemTossCancel) }; static const u16 sFieldMoves[] = @@ -1180,20 +1248,20 @@ struct u8 msgId; } static const sFieldMoveCursorCallbacks[] = { - [FIELD_MOVE_CUT] = {SetUpFieldMove_Cut, 0x07}, - [FIELD_MOVE_FLASH] = {SetUpFieldMove_Flash, 0x0d}, - [FIELD_MOVE_ROCK_SMASH] = {SetUpFieldMove_RockSmash, 0x0d}, - [FIELD_MOVE_STRENGTH] = {SetUpFieldMove_Strength, 0x0d}, - [FIELD_MOVE_SURF] = {SetUpFieldMove_Surf, 0x08}, - [FIELD_MOVE_FLY] = {SetUpFieldMove_Fly, 0x0d}, - [FIELD_MOVE_DIVE] = {SetUpFieldMove_Dive, 0x0d}, - [FIELD_MOVE_WATERFALL] = {SetUpFieldMove_Waterfall, 0x0d}, - [FIELD_MOVE_TELEPORT] = {SetUpFieldMove_Teleport, 0x0d}, - [FIELD_MOVE_DIG] = {SetUpFieldMove_Dig, 0x0d}, - [FIELD_MOVE_SECRET_POWER] = {SetUpFieldMove_SecretPower, 0x0d}, - [FIELD_MOVE_MILK_DRINK] = {SetUpFieldMove_SoftBoiled, 0x10}, - [FIELD_MOVE_SOFT_BOILED] = {SetUpFieldMove_SoftBoiled, 0x10}, - [FIELD_MOVE_SWEET_SCENT] = {SetUpFieldMove_SweetScent, 0x0d}, + [FIELD_MOVE_CUT] = {SetUpFieldMove_Cut, PARTY_MSG_NOTHING_TO_CUT}, + [FIELD_MOVE_FLASH] = {SetUpFieldMove_Flash, PARTY_MSG_CANT_USE_HERE}, + [FIELD_MOVE_ROCK_SMASH] = {SetUpFieldMove_RockSmash, PARTY_MSG_CANT_USE_HERE}, + [FIELD_MOVE_STRENGTH] = {SetUpFieldMove_Strength, PARTY_MSG_CANT_USE_HERE}, + [FIELD_MOVE_SURF] = {SetUpFieldMove_Surf, PARTY_MSG_CANT_SURF_HERE}, + [FIELD_MOVE_FLY] = {SetUpFieldMove_Fly, PARTY_MSG_CANT_USE_HERE}, + [FIELD_MOVE_DIVE] = {SetUpFieldMove_Dive, PARTY_MSG_CANT_USE_HERE}, + [FIELD_MOVE_WATERFALL] = {SetUpFieldMove_Waterfall, PARTY_MSG_CANT_USE_HERE}, + [FIELD_MOVE_TELEPORT] = {SetUpFieldMove_Teleport, PARTY_MSG_CANT_USE_HERE}, + [FIELD_MOVE_DIG] = {SetUpFieldMove_Dig, PARTY_MSG_CANT_USE_HERE}, + [FIELD_MOVE_SECRET_POWER] = {SetUpFieldMove_SecretPower, PARTY_MSG_CANT_USE_HERE}, + [FIELD_MOVE_MILK_DRINK] = {SetUpFieldMove_SoftBoiled, PARTY_MSG_NOT_ENOUGH_HP}, + [FIELD_MOVE_SOFT_BOILED] = {SetUpFieldMove_SoftBoiled, PARTY_MSG_NOT_ENOUGH_HP}, + [FIELD_MOVE_SWEET_SCENT] = {SetUpFieldMove_SweetScent, PARTY_MSG_CANT_USE_HERE}, }; static const u8 *const sUnionRoomTradeMessages[] = @@ -1313,6 +1381,7 @@ static const struct CompressedSpritePalette sSpritePalette_MenuPokeball = gPartyMenuPokeball_Pal, 0x04b0 }; +// TODO: menu pokeball is vague, these are mon menu pokeballs, but not confirm/cancel pokeballs static const struct SpriteTemplate sSpriteTemplate_MenuPokeball = { .tileTag = 0x04b0, @@ -1501,10 +1570,22 @@ static const struct SpriteTemplate sSpriteTemplate_StatusIcons = .callback = SpriteCallbackDummy, }; -static const u8 gUnknown_08616020[] = {0x00, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00}; +// Mask for the partners party in a multi battle +// TRUE if in the partners party, FALSE otherwise +// The last two slots after the 6 party members are Confirm/Cancel TODO: this doesnt make sense, if confirm/cancel are present the partners party isnt either +static const bool8 sMultiBattlePartnersPartyMask[PARTY_SIZE + 2] = +{ + FALSE, + TRUE, + FALSE, + FALSE, + TRUE, + TRUE, + FALSE, + FALSE +}; -// Unused table of pointers to strings of statistics. -static const u8 *const gUnknown_08616028[] = +static const u8 *const sUnused_StatStrings[] = { gText_HP4, gText_Attack3, @@ -1514,7 +1595,7 @@ static const u8 *const gUnknown_08616028[] = gText_Speed2 }; -static const u16 gTMHMMoves[] = +static const u16 sTMHMMoves[] = { MOVE_FOCUS_PUNCH, MOVE_DRAGON_CLAW, @@ -1577,53 +1658,53 @@ static const u16 gTMHMMoves[] = }; // code -static void InitPartyMenu(u8 a, u8 b, u8 c, u8 d, u8 messageId, TaskFunc task, MainCallback callback) +static void InitPartyMenu(u8 menuType, u8 layout, u8 partyAction, bool8 keepCursorPos, u8 messageId, TaskFunc task, MainCallback callback) { u16 i; - reset_brm(); - gUnknown_0203CEC4 = Alloc(sizeof(struct Struct203CEC4)); - if (gUnknown_0203CEC4 == NULL) + ResetPartyMenu(); + sPartyMenuInternal = Alloc(sizeof(struct PartyMenuInternal)); + if (sPartyMenuInternal == NULL) { SetMainCallback2(callback); } else { - gUnknown_0203CEC8.unk8_0 = a; - gUnknown_0203CEC8.exitCallback = callback; - gUnknown_0203CEC8.unkB = c; - gUnknown_0203CEC4->messageId = messageId; - gUnknown_0203CEC4->task = task; - gUnknown_0203CEC4->exitCallback = NULL; - gUnknown_0203CEC4->unk8_1 = 0; - gUnknown_0203CEC4->unk8_2 = 0x7F; - gUnknown_0203CEC4->unk9_0 = 0x7F; + gPartyMenu.menuType = menuType; + gPartyMenu.exitCallback = callback; + gPartyMenu.action = partyAction; + sPartyMenuInternal->messageId = messageId; + sPartyMenuInternal->task = task; + sPartyMenuInternal->exitCallback = NULL; + sPartyMenuInternal->unk8_1 = 0; + sPartyMenuInternal->spriteIdConfirmPokeball = 0x7F; + sPartyMenuInternal->spriteIdCancelPokeball = 0x7F; - if (a == 4) - gUnknown_0203CEC4->unk8_0 = TRUE; + if (menuType == PARTY_MENU_TYPE_CHOOSE_HALF) + sPartyMenuInternal->chooseHalf = TRUE; else - gUnknown_0203CEC4->unk8_0 = FALSE; + sPartyMenuInternal->chooseHalf = FALSE; - if (b != 0xFF) - gUnknown_0203CEC8.mode = b; + if (layout != KEEP_PARTY_LAYOUT) + gPartyMenu.layout = layout; - for (i = 0; i <= 15; i++) - gUnknown_0203CEC4->data[i] = 0; - for (i = 0; i < ARRAY_COUNT(gUnknown_0203CEC4->windowId); i++) - gUnknown_0203CEC4->windowId[i] = 0xFF; + for (i = 0; i < ARRAY_COUNT(sPartyMenuInternal->data); i++) + sPartyMenuInternal->data[i] = 0; + for (i = 0; i < ARRAY_COUNT(sPartyMenuInternal->windowId); i++) + sPartyMenuInternal->windowId[i] = 0xFF; - if (d == 0) - gUnknown_0203CEC8.slotId = 0; - else if (gUnknown_0203CEC8.slotId > 5 || GetMonData(&gPlayerParty[gUnknown_0203CEC8.slotId], MON_DATA_SPECIES) == SPECIES_NONE) - gUnknown_0203CEC8.slotId = 0; // wut why is this else if? + if (!keepCursorPos) + gPartyMenu.slotId = 0; + else if (gPartyMenu.slotId > PARTY_SIZE - 1 || GetMonData(&gPlayerParty[gPartyMenu.slotId], MON_DATA_SPECIES) == SPECIES_NONE) + gPartyMenu.slotId = 0; gTextFlags.autoScroll = 0; CalculatePlayerPartyCount(); - SetMainCallback2(PartyMenuInitCallback); + SetMainCallback2(CB2_InitPartyMenu); } } -static void PartyMenuCallback(void) +static void CB2_UpdatePartyMenu(void) { RunTasks(); AnimateSprites(); @@ -1632,23 +1713,23 @@ static void PartyMenuCallback(void) UpdatePaletteFade(); } -static void PartyMenuVBlankCallback(void) +static void VBlankCB_PartyMenu(void) { LoadOam(); ProcessSpriteCopyRequests(); TransferPlttBuffer(); } -static void PartyMenuInitCallback(void) +static void CB2_InitPartyMenu(void) { while (TRUE) { - if (sub_81221EC() == TRUE || PartyMenuSetup() == TRUE || sub_81221AC() == TRUE) + if (sub_81221EC() == TRUE || ShowPartyMenu() == TRUE || sub_81221AC() == TRUE) break; } } -static bool8 PartyMenuSetup(void) +static bool8 ShowPartyMenu(void) { switch (gMain.state) { @@ -1681,32 +1762,32 @@ static bool8 PartyMenuSetup(void) gMain.state++; break; case 6: - sub_81B209C(); + SetPartyMonsAllowedInMinigame(); gMain.state++; break; case 7: if (!AllocPartyMenuBg()) { - PartyMenuExit(); + ExitPartyMenu(); return TRUE; } else { - gUnknown_0203CEC4->data[0] = 0; + sPartyMenuInternal->data[0] = 0; gMain.state++; } break; case 8: - if (AllocPartyMiscGfx()) + if (AllocPartyMenuBgGfx()) gMain.state++; break; case 9: - sub_81B239C(gUnknown_0203CEC8.mode); + InitPartyMenuWindows(gPartyMenu.layout); gMain.state++; break; case 10: - PartyMenuInitHelperStructs(gUnknown_0203CEC8.mode); - gUnknown_0203CEC4->data[0] = 0; + InitPartyMenuBoxes(gPartyMenu.layout); + sPartyMenuInternal->data[0] = 0; gMain.state++; break; case 11: @@ -1728,31 +1809,31 @@ static bool8 PartyMenuSetup(void) case 15: if (party_menu_add_per_mon_objects()) { - gUnknown_0203CEC4->data[0] = 0; + sPartyMenuInternal->data[0] = 0; gMain.state++; } break; case 16: if (RenderPartyMenuBoxes()) { - gUnknown_0203CEC4->data[0] = 0; + sPartyMenuInternal->data[0] = 0; gMain.state++; } break; case 17: - sub_81B0F28(); + CreateCancelConfirmPokeballSprites(); gMain.state++; break; case 18: - sub_81B2428(gUnknown_0203CEC4->unk8_0); + sub_81B2428(sPartyMenuInternal->chooseHalf); gMain.state++; break; case 19: gMain.state++; break; case 20: - CreateTask(gUnknown_0203CEC4->task, 0); - DisplayPartyMenuStdMessage(gUnknown_0203CEC4->messageId); + CreateTask(sPartyMenuInternal->task, 0); + DisplayPartyMenuStdMessage(sPartyMenuInternal->messageId); gMain.state++; break; case 21: @@ -1765,49 +1846,49 @@ static bool8 PartyMenuSetup(void) gMain.state++; break; default: - SetVBlankCallback(PartyMenuVBlankCallback); - SetMainCallback2(PartyMenuCallback); + SetVBlankCallback(VBlankCB_PartyMenu); + SetMainCallback2(CB2_UpdatePartyMenu); return TRUE; } return FALSE; } -static void PartyMenuExit(void) +static void ExitPartyMenu(void) { BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, RGB_BLACK); - CreateTask(PartyMenuExitTask, 0); - SetVBlankCallback(PartyMenuVBlankCallback); - SetMainCallback2(PartyMenuCallback); + CreateTask(Task_ExitPartyMenu, 0); + SetVBlankCallback(VBlankCB_PartyMenu); + SetMainCallback2(CB2_UpdatePartyMenu); } -static void PartyMenuExitTask(u8 taskId) +static void Task_ExitPartyMenu(u8 taskId) { if (!gPaletteFade.active) { - SetMainCallback2(gUnknown_0203CEC8.exitCallback); + SetMainCallback2(gPartyMenu.exitCallback); FreePartyPointers(); DestroyTask(taskId); } } -static void reset_brm(void) +static void ResetPartyMenu(void) { - gUnknown_0203CEC4 = NULL; - gUnknown_0203CEE4 = NULL; - gUnknown_0203CEDC = NULL; - gUnknown_0203CEE0 = NULL; + sPartyMenuInternal = NULL; + sPartyBgTilemapBuffer = NULL; + sPartyMenuBoxes = NULL; + sPartyBgGfxTilemap = NULL; } static bool8 AllocPartyMenuBg(void) { - gUnknown_0203CEE4 = Alloc(0x800); - if (gUnknown_0203CEE4 == NULL) + sPartyBgTilemapBuffer = Alloc(0x800); + if (sPartyBgTilemapBuffer == NULL) return FALSE; - memset(gUnknown_0203CEE4, 0, 0x800); + memset(sPartyBgTilemapBuffer, 0, 0x800); ResetBgsAndClearDma3BusyFlags(0); - InitBgsFromTemplates(0, gUnknown_086156B8, ARRAY_COUNT(gUnknown_086156B8)); - SetBgTilemapBuffer(1, gUnknown_0203CEE4); + InitBgsFromTemplates(0, sPartyMenuBgTemplates, ARRAY_COUNT(sPartyMenuBgTemplates)); + SetBgTilemapBuffer(1, sPartyBgTilemapBuffer); ResetAllBgsCoordinates(); schedule_bg_copy_tilemap_to_vram(1); SetGpuReg(REG_OFFSET_DISPCNT, DISPCNT_OBJ_ON | DISPCNT_OBJ_1D_MAP); @@ -1818,48 +1899,48 @@ static bool8 AllocPartyMenuBg(void) return TRUE; } -static bool8 AllocPartyMiscGfx(void) +static bool8 AllocPartyMenuBgGfx(void) { u32 sizeout; - switch (gUnknown_0203CEC4->data[0]) + switch (sPartyMenuInternal->data[0]) { case 0: - gUnknown_0203CEE0 = malloc_and_decompress(gPartyMenuMisc_Gfx, &sizeout); - LoadBgTiles(1, gUnknown_0203CEE0, sizeout, 0); - gUnknown_0203CEC4->data[0]++; + sPartyBgGfxTilemap = malloc_and_decompress(gPartyMenuBg_Gfx, &sizeout); + LoadBgTiles(1, sPartyBgGfxTilemap, sizeout, 0); + sPartyMenuInternal->data[0]++; break; case 1: if (!IsDma3ManagerBusyWithBgCopy()) { - LZDecompressWram(gPartyMenuMisc_Tilemap, gUnknown_0203CEE4); - gUnknown_0203CEC4->data[0]++; + LZDecompressWram(gPartyMenuBg_Tilemap, sPartyBgTilemapBuffer); + sPartyMenuInternal->data[0]++; } break; case 2: - LoadCompressedPalette(gPartyMenuMisc_Pal, 0, 0x160); - CpuCopy16(gPlttBufferUnfaded, gUnknown_0203CEC4->palBuffer, 0x160); - gUnknown_0203CEC4->data[0]++; + LoadCompressedPalette(gPartyMenuBg_Pal, 0, 0x160); + CpuCopy16(gPlttBufferUnfaded, sPartyMenuInternal->palBuffer, 0x160); + sPartyMenuInternal->data[0]++; break; case 3: PartyPaletteBufferCopy(4); - gUnknown_0203CEC4->data[0]++; + sPartyMenuInternal->data[0]++; break; case 4: PartyPaletteBufferCopy(5); - gUnknown_0203CEC4->data[0]++; + sPartyMenuInternal->data[0]++; break; case 5: PartyPaletteBufferCopy(6); - gUnknown_0203CEC4->data[0]++; + sPartyMenuInternal->data[0]++; break; case 6: PartyPaletteBufferCopy(7); - gUnknown_0203CEC4->data[0]++; + sPartyMenuInternal->data[0]++; break; case 7: PartyPaletteBufferCopy(8); - gUnknown_0203CEC4->data[0]++; + sPartyMenuInternal->data[0]++; break; default: return TRUE; @@ -1876,84 +1957,86 @@ static void PartyPaletteBufferCopy(u8 offset) static void FreePartyPointers(void) { - if (gUnknown_0203CEC4) - Free(gUnknown_0203CEC4); - if (gUnknown_0203CEE4) - Free(gUnknown_0203CEE4); - if (gUnknown_0203CEE0) - Free(gUnknown_0203CEE0); - if (gUnknown_0203CEDC) - Free(gUnknown_0203CEDC); + if (sPartyMenuInternal) + Free(sPartyMenuInternal); + if (sPartyBgTilemapBuffer) + Free(sPartyBgTilemapBuffer); + if (sPartyBgGfxTilemap) + Free(sPartyBgGfxTilemap); + if (sPartyMenuBoxes) + Free(sPartyMenuBoxes); FreeAllWindowBuffers(); } -static void PartyMenuInitHelperStructs(u8 a) +static void InitPartyMenuBoxes(u8 layout) { u8 i; - gUnknown_0203CEDC = Alloc(sizeof(struct Struct203CEDC[PARTY_SIZE])); + sPartyMenuBoxes = Alloc(sizeof(struct PartyMenuBox[PARTY_SIZE])); for (i = 0; i < PARTY_SIZE; i++) { - gUnknown_0203CEDC[i].unk0 = &gUnknown_086156C4[1]; - gUnknown_0203CEDC[i].unk4 = gUnknown_08615704[a][i]; - gUnknown_0203CEDC[i].windowId = i; - gUnknown_0203CEDC[i].monSpriteId = 0xFF; - gUnknown_0203CEDC[i].itemSpriteId = 0xFF; - gUnknown_0203CEDC[i].pokeballSpriteId = 0xFF; - gUnknown_0203CEDC[i].statusSpriteId = 0xFF; + sPartyMenuBoxes[i].infoRects = &sPartyBoxInfoRects[PARTY_BOX_RIGHT_COLUMN]; + sPartyMenuBoxes[i].spriteCoords = sPartyMenuSpriteCoords[layout][i]; + sPartyMenuBoxes[i].windowId = i; + sPartyMenuBoxes[i].monSpriteId = 0xFF; + sPartyMenuBoxes[i].itemSpriteId = 0xFF; + sPartyMenuBoxes[i].pokeballSpriteId = 0xFF; + sPartyMenuBoxes[i].statusSpriteId = 0xFF; } - gUnknown_0203CEDC[0].unk0 = &gUnknown_086156C4[0]; - if (a == 3) - gUnknown_0203CEDC[3].unk0 = &gUnknown_086156C4[0]; - else if (a != 0) - gUnknown_0203CEDC[1].unk0 = &gUnknown_086156C4[0]; + // The first party mon goes in the left column + sPartyMenuBoxes[0].infoRects = &sPartyBoxInfoRects[PARTY_BOX_LEFT_COLUMN]; + + if (layout == PARTY_LAYOUT_MULTI_SHOWCASE) + sPartyMenuBoxes[3].infoRects = &sPartyBoxInfoRects[PARTY_BOX_LEFT_COLUMN]; + else if (layout != PARTY_LAYOUT_SINGLE) + sPartyMenuBoxes[1].infoRects = &sPartyBoxInfoRects[PARTY_BOX_LEFT_COLUMN]; } static void RenderPartyMenuBox(u8 slot) { - if (gUnknown_0203CEC8.unk8_0 == 5 && slot > 2) + if (gPartyMenu.menuType == PARTY_MENU_TYPE_IN_MULTI_BATTLE && slot > 2) { - sub_81B0CEC(slot); - if (gUnknown_02022FF8[slot - 3].species == SPECIES_NONE) - UpdateSelectedPartyBox(&gUnknown_0203CEDC[slot], 0x40); + DisplayPartyPokemonDataForMultiBattle(slot); + if (gMultiPartnerParty[slot - 3].species == SPECIES_NONE) + LoadPartyBoxPalette(&sPartyMenuBoxes[slot], PARTY_PAL_NO_MON); else - UpdateSelectedPartyBox(&gUnknown_0203CEDC[slot], 8); - CopyWindowToVram(gUnknown_0203CEDC[slot].windowId, 2); - PutWindowTilemap(gUnknown_0203CEDC[slot].windowId); + LoadPartyBoxPalette(&sPartyMenuBoxes[slot], PARTY_PAL_MULTI_ALT); + CopyWindowToVram(sPartyMenuBoxes[slot].windowId, 2); + PutWindowTilemap(sPartyMenuBoxes[slot].windowId); schedule_bg_copy_tilemap_to_vram(2); } else { if (GetMonData(&gPlayerParty[slot], MON_DATA_SPECIES) == SPECIES_NONE) { - DrawEmptySlot(gUnknown_0203CEDC[slot].windowId); - UpdateSelectedPartyBox(&gUnknown_0203CEDC[slot], 0x40); - CopyWindowToVram(gUnknown_0203CEDC[slot].windowId, 2); + DrawEmptySlot(sPartyMenuBoxes[slot].windowId); + LoadPartyBoxPalette(&sPartyMenuBoxes[slot], PARTY_PAL_NO_MON); + CopyWindowToVram(sPartyMenuBoxes[slot].windowId, 2); } else { - if (gUnknown_0203CEC8.unk8_0 == 7) - DisplayPartyPokemonSelectForRelearner(slot); - else if (gUnknown_0203CEC8.unk8_0 == 2) - DisplayPartyPokemonSelectForContest(slot); - else if (gUnknown_0203CEC8.unk8_0 == 4) - DisplayPartyPokemonSelectForBattle(slot); - else if (gUnknown_0203CEC8.unk8_0 == 11) - sub_81B0B98(slot); - else if (gUnknown_0203CEC8.unk8_0 == 12) - DisplayPartyPokemonSelectHeldItemRelated(slot); - else if (!sub_81B0BFC(slot)) + if (gPartyMenu.menuType == PARTY_MENU_TYPE_MOVE_RELEARNER) + DisplayPartyPokemonDataForRelearner(slot); + else if (gPartyMenu.menuType == PARTY_MENU_TYPE_CONTEST) + DisplayPartyPokemonDataForContest(slot); + else if (gPartyMenu.menuType == PARTY_MENU_TYPE_CHOOSE_HALF) + DisplayPartyPokemonDataForChooseHalf(slot); + else if (gPartyMenu.menuType == PARTY_MENU_TYPE_MINIGAME) + DisplayPartyPokemonDataForWirelessMinigame(slot); + else if (gPartyMenu.menuType == PARTY_MENU_TYPE_STORE_PYRAMID_HELD_ITEMS) + DisplayPartyPokemonDataForBattlePyramidHeldItem(slot); + else if (!DisplayPartyPokemonDataForMoveTutorOrEvolutionItem(slot)) DisplayPartyPokemonData(slot); - if (gUnknown_0203CEC8.unk8_0 == 5) - sub_81B0FCC(slot, 0); - else if (gUnknown_0203CEC8.slotId == slot) - sub_81B0FCC(slot, 1); + if (gPartyMenu.menuType == PARTY_MENU_TYPE_IN_MULTI_BATTLE) + AnimatePartySlot(slot, 0); + else if (gPartyMenu.slotId == slot) + AnimatePartySlot(slot, 1); else - sub_81B0FCC(slot, 0); + AnimatePartySlot(slot, 0); } - PutWindowTilemap(gUnknown_0203CEDC[slot].windowId); + PutWindowTilemap(sPartyMenuBoxes[slot].windowId); schedule_bg_copy_tilemap_to_vram(0); } } @@ -1962,249 +2045,253 @@ static void DisplayPartyPokemonData(u8 slot) { if (GetMonData(&gPlayerParty[slot], MON_DATA_IS_EGG)) { - gUnknown_0203CEDC[slot].unk0->unk0(gUnknown_0203CEDC[slot].windowId, 0, 0, 0, 0, 1); - DisplayPartyPokemonNickname(&gPlayerParty[slot], &gUnknown_0203CEDC[slot], 0); + sPartyMenuBoxes[slot].infoRects->blitFunc(sPartyMenuBoxes[slot].windowId, 0, 0, 0, 0, TRUE); + DisplayPartyPokemonNickname(&gPlayerParty[slot], &sPartyMenuBoxes[slot], 0); } else { - gUnknown_0203CEDC[slot].unk0->unk0(gUnknown_0203CEDC[slot].windowId, 0, 0, 0, 0, 0); - DisplayPartyPokemonNickname(&gPlayerParty[slot], &gUnknown_0203CEDC[slot], 0); - DisplayPartyPokemonLevelCheck(&gPlayerParty[slot], &gUnknown_0203CEDC[slot], 0); - DisplayPartyPokemonGenderNidoranCheck(&gPlayerParty[slot], &gUnknown_0203CEDC[slot], 0); - DisplayPartyPokemonHPCheck(&gPlayerParty[slot], &gUnknown_0203CEDC[slot], 0); - DisplayPartyPokemonMaxHPCheck(&gPlayerParty[slot], &gUnknown_0203CEDC[slot], 0); - DisplayPartyPokemonHPBarCheck(&gPlayerParty[slot], &gUnknown_0203CEDC[slot]); + sPartyMenuBoxes[slot].infoRects->blitFunc(sPartyMenuBoxes[slot].windowId, 0, 0, 0, 0, FALSE); + DisplayPartyPokemonNickname(&gPlayerParty[slot], &sPartyMenuBoxes[slot], 0); + DisplayPartyPokemonLevelCheck(&gPlayerParty[slot], &sPartyMenuBoxes[slot], 0); + DisplayPartyPokemonGenderNidoranCheck(&gPlayerParty[slot], &sPartyMenuBoxes[slot], 0); + DisplayPartyPokemonHPCheck(&gPlayerParty[slot], &sPartyMenuBoxes[slot], 0); + DisplayPartyPokemonMaxHPCheck(&gPlayerParty[slot], &sPartyMenuBoxes[slot], 0); + DisplayPartyPokemonHPBarCheck(&gPlayerParty[slot], &sPartyMenuBoxes[slot]); } } -static void DisplayPartyPokemonSelectData(u8 slot, u8 stringID) +static void DisplayPartyPokemonDescriptionData(u8 slot, u8 stringID) { struct Pokemon *mon = &gPlayerParty[slot]; - gUnknown_0203CEDC[slot].unk0->unk0(gUnknown_0203CEDC[slot].windowId, 0, 0, 0, 0, 1); - DisplayPartyPokemonNickname(mon, &gUnknown_0203CEDC[slot], 0); + sPartyMenuBoxes[slot].infoRects->blitFunc(sPartyMenuBoxes[slot].windowId, 0, 0, 0, 0, TRUE); + DisplayPartyPokemonNickname(mon, &sPartyMenuBoxes[slot], 0); if (!GetMonData(mon, MON_DATA_IS_EGG)) { - DisplayPartyPokemonLevelCheck(mon, &gUnknown_0203CEDC[slot], 0); - DisplayPartyPokemonGenderNidoranCheck(mon, &gUnknown_0203CEDC[slot], 0); + DisplayPartyPokemonLevelCheck(mon, &sPartyMenuBoxes[slot], 0); + DisplayPartyPokemonGenderNidoranCheck(mon, &sPartyMenuBoxes[slot], 0); } - DisplayPartyPokemonSelectionText(stringID, &gUnknown_0203CEDC[slot], 0); + DisplayPartyPokemonDescriptionText(stringID, &sPartyMenuBoxes[slot], 0); } -static void DisplayPartyPokemonSelectForBattle(u8 slot) +static void DisplayPartyPokemonDataForChooseHalf(u8 slot) { u8 i; struct Pokemon *mon = &gPlayerParty[slot]; - u8 *ptr = gSelectedOrderFromParty; + u8 *order = gSelectedOrderFromParty; if (!GetBattleEntryEligibility(mon)) { - DisplayPartyPokemonSelectData(slot, 7); + DisplayPartyPokemonDescriptionData(slot, PARTYBOX_DESC_NOT_ABLE); return; } else { - for (i = 0; i < sub_81B8830(); i++) + for (i = 0; i < GetMaxBattleEntries(); i++) { - if (ptr[i] != 0 && (ptr[i] - 1) == slot) + if (order[i] != 0 && (order[i] - 1) == slot) { - DisplayPartyPokemonSelectData(slot, i + 2); + DisplayPartyPokemonDescriptionData(slot, i + PARTYBOX_DESC_FIRST); return; } } - DisplayPartyPokemonSelectData(slot, 1); + DisplayPartyPokemonDescriptionData(slot, PARTYBOX_DESC_ABLE_3); } } -static void DisplayPartyPokemonSelectForContest(u8 slot) +static void DisplayPartyPokemonDataForContest(u8 slot) { - switch (sub_80DAE0C(&gPlayerParty[slot])) + switch (GetContestEntryEligibility(&gPlayerParty[slot])) { - case 0: - case 3: - case 4: - DisplayPartyPokemonSelectData(slot, 7); + case CANT_ENTER_CONTEST: + case CANT_ENTER_CONTEST_EGG: + case CANT_ENTER_CONTEST_FAINTED: + DisplayPartyPokemonDescriptionData(slot, PARTYBOX_DESC_NOT_ABLE); break; - case 1: - case 2: - DisplayPartyPokemonSelectData(slot, 6); + case CAN_ENTER_CONTEST_EQUAL_RANK: + case CAN_ENTER_CONTEST_HIGH_RANK: + DisplayPartyPokemonDescriptionData(slot, PARTYBOX_DESC_ABLE); break; } } -static void DisplayPartyPokemonSelectForRelearner(u8 slot) +static void DisplayPartyPokemonDataForRelearner(u8 slot) { if (GetNumberOfRelearnableMoves(&gPlayerParty[slot]) == 0) - DisplayPartyPokemonSelectData(slot, 9); + DisplayPartyPokemonDescriptionData(slot, PARTYBOX_DESC_NOT_ABLE_2); else - DisplayPartyPokemonSelectData(slot, 8); + DisplayPartyPokemonDescriptionData(slot, PARTYBOX_DESC_ABLE_2); } -static void sub_81B0B98(u8 slot) +static void DisplayPartyPokemonDataForWirelessMinigame(u8 slot) { - if (sub_81B218C(slot) == TRUE) - DisplayPartyPokemonSelectData(slot, 6); + if (IsMonAllowedInMinigame(slot) == TRUE) + DisplayPartyPokemonDescriptionData(slot, PARTYBOX_DESC_ABLE); else - DisplayPartyPokemonSelectData(slot, 7); + DisplayPartyPokemonDescriptionData(slot, PARTYBOX_DESC_NOT_ABLE); } -static void DisplayPartyPokemonSelectHeldItemRelated(u8 slot) +static void DisplayPartyPokemonDataForBattlePyramidHeldItem(u8 slot) { if (GetMonData(&gPlayerParty[slot], MON_DATA_HELD_ITEM)) - DisplayPartyPokemonSelectData(slot, 11); + DisplayPartyPokemonDescriptionData(slot, PARTYBOX_DESC_HAVE); else - DisplayPartyPokemonSelectData(slot, 12); + DisplayPartyPokemonDescriptionData(slot, PARTYBOX_DESC_DONT_HAVE); } -static bool8 sub_81B0BFC(u8 slot) +// Returns TRUE if teaching move or cant evolve with item (i.e. description data is shown), FALSE otherwise +static bool8 DisplayPartyPokemonDataForMoveTutorOrEvolutionItem(u8 slot) { struct Pokemon *currentPokemon = &gPlayerParty[slot]; u16 item = gSpecialVar_ItemId; - if (gUnknown_0203CEC8.unkB == 12) + if (gPartyMenu.action == PARTY_ACTION_MOVE_TUTOR) { gSpecialVar_Result = FALSE; - DisplayPartyPokemonSelectToTeachMove(slot, 0, gSpecialVar_0x8005); + DisplayPartyPokemonDataToTeachMove(slot, 0, gSpecialVar_0x8005); } else { - if (gUnknown_0203CEC8.unkB != 3) + if (gPartyMenu.action != PARTY_ACTION_USE_ITEM) return FALSE; switch (CheckIfItemIsTMHMOrEvolutionStone(item)) { default: return FALSE; - case 1: - DisplayPartyPokemonSelectToTeachMove(slot, item, 0); + case 1: // TM/HM + DisplayPartyPokemonDataToTeachMove(slot, item, 0); break; - case 2: + case 2: // Evolution stone if (!GetMonData(currentPokemon, MON_DATA_IS_EGG) && GetEvolutionTargetSpecies(currentPokemon, 3, item) != SPECIES_NONE) return FALSE; - DisplayPartyPokemonSelectData(slot, 0); + DisplayPartyPokemonDescriptionData(slot, PARTYBOX_DESC_NO_USE); break; } } return TRUE; } -static void DisplayPartyPokemonSelectToTeachMove(u8 slot, u16 item, u8 tutor) +static void DisplayPartyPokemonDataToTeachMove(u8 slot, u16 item, u8 tutor) { switch (CanMonLearnTMTutor(&gPlayerParty[slot], item, tutor)) { case CANNOT_LEARN_MOVE: case CANNOT_LEARN_MOVE_IS_EGG: - DisplayPartyPokemonSelectData(slot, 9); + DisplayPartyPokemonDescriptionData(slot, PARTYBOX_DESC_NOT_ABLE_2); break; case ALREADY_KNOWS_MOVE: - DisplayPartyPokemonSelectData(slot, 10); + DisplayPartyPokemonDescriptionData(slot, PARTYBOX_DESC_LEARNED); break; default: - DisplayPartyPokemonSelectData(slot, 8); + DisplayPartyPokemonDescriptionData(slot, PARTYBOX_DESC_ABLE_2); break; } } -static void sub_81B0CEC(u8 slot) +// TODO: sort out unknowns +static void DisplayPartyPokemonDataForMultiBattle(u8 slot) { - struct Struct203CEDC *structPtr = &gUnknown_0203CEDC[slot]; - u8 actualSlot = slot - 3; + struct PartyMenuBox *menuBox = &sPartyMenuBoxes[slot]; + u8 actualSlot = slot - (3); - if (gUnknown_02022FF8[actualSlot].species == SPECIES_NONE) + if (gMultiPartnerParty[actualSlot].species == SPECIES_NONE) { - DrawEmptySlot(structPtr->windowId); + DrawEmptySlot(menuBox->windowId); } else { - structPtr->unk0->unk0(structPtr->windowId, 0, 0, 0, 0, 0); - StringCopy(gStringVar1, gUnknown_02022FF8[actualSlot].nickname); + menuBox->infoRects->blitFunc(menuBox->windowId, 0, 0, 0, 0, FALSE); + StringCopy(gStringVar1, gMultiPartnerParty[actualSlot].nickname); StringGetEnd10(gStringVar1); sub_81DB52C(gStringVar1); - DisplayPartyPokemonBarDetail(structPtr->windowId, gStringVar1, 0, structPtr->unk0->unk4); - DisplayPartyPokemonLevel(gUnknown_02022FF8[actualSlot].level, structPtr); - DisplayPartyPokemonGender(gUnknown_02022FF8[actualSlot].gender, gUnknown_02022FF8[actualSlot].species, gUnknown_02022FF8[actualSlot].nickname, structPtr); - DisplayPartyPokemonHP(gUnknown_02022FF8[actualSlot].hp, structPtr); - DisplayPartyPokemonMaxHP(gUnknown_02022FF8[actualSlot].maxhp, structPtr); - DisplayPartyPokemonHPBar(gUnknown_02022FF8[actualSlot].hp, gUnknown_02022FF8[actualSlot].maxhp, structPtr); + DisplayPartyPokemonBarDetail(menuBox->windowId, gStringVar1, 0, menuBox->infoRects->dimensions); + DisplayPartyPokemonLevel(gMultiPartnerParty[actualSlot].level, menuBox); + DisplayPartyPokemonGender(gMultiPartnerParty[actualSlot].gender, gMultiPartnerParty[actualSlot].species, gMultiPartnerParty[actualSlot].nickname, menuBox); + DisplayPartyPokemonHP(gMultiPartnerParty[actualSlot].hp, menuBox); + DisplayPartyPokemonMaxHP(gMultiPartnerParty[actualSlot].maxhp, menuBox); + DisplayPartyPokemonHPBar(gMultiPartnerParty[actualSlot].hp, gMultiPartnerParty[actualSlot].maxhp, menuBox); } } static bool8 RenderPartyMenuBoxes(void) { - RenderPartyMenuBox(gUnknown_0203CEC4->data[0]); - if (++gUnknown_0203CEC4->data[0] == 6) + RenderPartyMenuBox(sPartyMenuInternal->data[0]); + if (++sPartyMenuInternal->data[0] == PARTY_SIZE) return TRUE; else return FALSE; } -static u8* GetPartyMiscGraphicsTile(u16 tileId) +static u8* GetPartyMenuBgTile(u16 tileId) { - return &gUnknown_0203CEE0[tileId << 5]; + return &sPartyBgGfxTilemap[tileId << 5]; } +//TODO: rename and all related functions static void party_menu_add_per_mon_objects_internal(u8 slot) { u8 actualSlot; - if (gUnknown_0203CEC8.unk8_0 == 5 && slot > 2) + if (gPartyMenu.menuType == PARTY_MENU_TYPE_IN_MULTI_BATTLE && slot > 2) { u8 status; actualSlot = slot - 3; - if (gUnknown_02022FF8[actualSlot].species != SPECIES_NONE) + if (gMultiPartnerParty[actualSlot].species != SPECIES_NONE) { - party_menu_link_mon_icon_anim(gUnknown_02022FF8[actualSlot].species, gUnknown_02022FF8[actualSlot].personality, &gUnknown_0203CEDC[slot], 0, 0); - party_menu_link_mon_held_item_object(gUnknown_02022FF8[actualSlot].species, gUnknown_02022FF8[actualSlot].heldItem, &gUnknown_0203CEDC[slot]); - party_menu_link_mon_pokeball_object(gUnknown_02022FF8[actualSlot].species, &gUnknown_0203CEDC[slot]); - if (gUnknown_02022FF8[actualSlot].hp == 0) + party_menu_link_mon_icon_anim(gMultiPartnerParty[actualSlot].species, gMultiPartnerParty[actualSlot].personality, &sPartyMenuBoxes[slot], 0, 0); + party_menu_link_mon_held_item_object(gMultiPartnerParty[actualSlot].species, gMultiPartnerParty[actualSlot].heldItem, &sPartyMenuBoxes[slot]); + party_menu_link_mon_pokeball_object(gMultiPartnerParty[actualSlot].species, &sPartyMenuBoxes[slot]); + if (gMultiPartnerParty[actualSlot].hp == 0) status = AILMENT_FNT; else - status = pokemon_ailments_get_primary(gUnknown_02022FF8[actualSlot].status); - party_menu_link_mon_status_condition_object(gUnknown_02022FF8[actualSlot].species, status, &gUnknown_0203CEDC[slot]); + status = GetAilmentFromStatus(gMultiPartnerParty[actualSlot].status); + party_menu_link_mon_status_condition_object(gMultiPartnerParty[actualSlot].species, status, &sPartyMenuBoxes[slot]); } } else if (GetMonData(&gPlayerParty[slot], MON_DATA_SPECIES) != SPECIES_NONE) { - party_menu_icon_anim(&gPlayerParty[slot], &gUnknown_0203CEDC[slot], slot); - party_menu_held_item_object(&gPlayerParty[slot], &gUnknown_0203CEDC[slot]); - party_menu_pokeball_object(&gPlayerParty[slot], &gUnknown_0203CEDC[slot]); - party_menu_status_condition_object(&gPlayerParty[slot], &gUnknown_0203CEDC[slot]); + party_menu_icon_anim(&gPlayerParty[slot], &sPartyMenuBoxes[slot], slot); + party_menu_held_item_object(&gPlayerParty[slot], &sPartyMenuBoxes[slot]); + party_menu_pokeball_object(&gPlayerParty[slot], &sPartyMenuBoxes[slot]); + party_menu_status_condition_object(&gPlayerParty[slot], &sPartyMenuBoxes[slot]); } } static bool8 party_menu_add_per_mon_objects(void) { - party_menu_add_per_mon_objects_internal(gUnknown_0203CEC4->data[0]); - if (++gUnknown_0203CEC4->data[0] == 6) + party_menu_add_per_mon_objects_internal(sPartyMenuInternal->data[0]); + if (++sPartyMenuInternal->data[0] == PARTY_SIZE) return TRUE; else return FALSE; } -static void sub_81B0F28(void) +// TODO Fix name, first if doesnt do that +static void CreateCancelConfirmPokeballSprites(void) { - if (gUnknown_0203CEC8.unk8_0 == 5) + if (gPartyMenu.menuType == PARTY_MENU_TYPE_IN_MULTI_BATTLE) { FillBgTilemapBufferRect(1, 14, 23, 17, 7, 2, 1); } else { - if (gUnknown_0203CEC4->unk8_0) + if (sPartyMenuInternal->chooseHalf) { - gUnknown_0203CEC4->unk8_2 = sub_81B5F74(0xBF, 0x88); + sPartyMenuInternal->spriteIdConfirmPokeball = CreateMenuPokeballSprite(0xBF, 0x88); sub_81B120C(); - gUnknown_0203CEC4->unk9_0 = sub_81B5F74(0xBF, 0x98); + sPartyMenuInternal->spriteIdCancelPokeball = CreateMenuPokeballSprite(0xBF, 0x98); } else { - gUnknown_0203CEC4->unk9_0 = sub_81B5F34(0xC6, 0x94); + sPartyMenuInternal->spriteIdCancelPokeball = CreateCancelPokeballSprite(198, 148); } - sub_81B0FCC(gUnknown_0203CEC8.slotId, 1); + AnimatePartySlot(gPartyMenu.slotId, 1); } } -void sub_81B0FCC(u8 slot, u8 b) +void AnimatePartySlot(u8 slot, u8 animNum) { u8 spriteId; @@ -2213,27 +2300,27 @@ void sub_81B0FCC(u8 slot, u8 b) default: if (GetMonData(&gPlayerParty[slot], MON_DATA_SPECIES) != SPECIES_NONE) { - UpdateSelectedPartyBox(&gUnknown_0203CEDC[slot], GetPartyBoxPalBitfield(slot, b)); - AnimateSelectedPartyIcon(gUnknown_0203CEDC[slot].monSpriteId, b); - sub_81B5F98(gUnknown_0203CEDC[slot].pokeballSpriteId, b); + LoadPartyBoxPalette(&sPartyMenuBoxes[slot], GetPartyBoxPaletteFlags(slot, animNum)); + AnimateSelectedPartyIcon(sPartyMenuBoxes[slot].monSpriteId, animNum); + PartyMenuStartSpriteAnim(sPartyMenuBoxes[slot].pokeballSpriteId, animNum); } return; - case 6: - if (b == 0) + case PARTY_SIZE: + if (animNum == 0) sub_8199C30(1, 23, 16, 7, 2, 1); else sub_8199C30(1, 23, 16, 7, 2, 2); - spriteId = gUnknown_0203CEC4->unk8_2; + spriteId = sPartyMenuInternal->spriteIdConfirmPokeball; break; - case 7: - if (!gUnknown_0203CEC4->unk8_0) + case PARTY_SIZE + 1: // Cancel + if (!sPartyMenuInternal->chooseHalf) { - if (b == 0) + if (animNum == 0) sub_8199C30(1, 23, 17, 7, 2, 1); else sub_8199C30(1, 23, 17, 7, 2, 2); } - else if (b == 0) + else if (animNum == 0) { sub_8199C30(1, 23, 18, 7, 2, 1); } @@ -2241,51 +2328,52 @@ void sub_81B0FCC(u8 slot, u8 b) { sub_8199C30(1, 23, 18, 7, 2, 2); } - spriteId = gUnknown_0203CEC4->unk9_0; + spriteId = sPartyMenuInternal->spriteIdCancelPokeball; break; } - sub_81B5F98(spriteId, b); + PartyMenuStartSpriteAnim(spriteId, animNum); schedule_bg_copy_tilemap_to_vram(1); } -static u8 GetPartyBoxPalBitfield(u8 slot, u8 b) +static u8 GetPartyBoxPaletteFlags(u8 slot, u8 animNum) { - u8 returnVar = 0; + u8 palFlags = 0; - if (b == 1) - returnVar |= 1; + if (animNum == 1) + palFlags |= PARTY_PAL_SELECTED; if (GetMonData(&gPlayerParty[slot], MON_DATA_HP) == 0) - returnVar |= 2; + palFlags |= PARTY_PAL_FAINTED; if (PartyBoxPal_ParnterOrDisqualifiedInArena(slot) == TRUE) - returnVar |= 8; - if (gUnknown_0203CEC8.unkB == 9) - returnVar |= 16; - if (gUnknown_0203CEC8.unkB == 8) + palFlags |= PARTY_PAL_MULTI_ALT; + if (gPartyMenu.action == PARTY_ACTION_SWITCHING) + palFlags |= PARTY_PAL_SWITCHING; + if (gPartyMenu.action == PARTY_ACTION_SWITCH) { - if (slot == gUnknown_0203CEC8.slotId || slot == gUnknown_0203CEC8.unkA) - returnVar |= 4; + if (slot == gPartyMenu.slotId || slot == gPartyMenu.slotId2) + palFlags |= PARTY_PAL_TO_SWITCH; } - if (gUnknown_0203CEC8.unkB == 10 && slot == gUnknown_0203CEC8.slotId ) - returnVar |= 32; + if (gPartyMenu.action == PARTY_ACTION_SOFTBOILED && slot == gPartyMenu.slotId ) + palFlags |= PARTY_PAL_TO_SOFTBOIL; - return returnVar; + return palFlags; } static bool8 PartyBoxPal_ParnterOrDisqualifiedInArena(u8 slot) { - if (gUnknown_0203CEC8.mode == 2 && (slot == 1 || slot == 4 || slot == 5)) + if (gPartyMenu.layout == PARTY_LAYOUT_MULTI && (slot == 1 || slot == 4 || slot == 5)) return TRUE; - if (slot < 3 && (gBattleTypeFlags & BATTLE_TYPE_ARENA) && gMain.inBattle && (gBattleStruct->arenaLostPlayerMons >> sub_81B8F38(slot) & 1)) + if (slot < 3 && (gBattleTypeFlags & BATTLE_TYPE_ARENA) && gMain.inBattle && (gBattleStruct->arenaLostPlayerMons >> GetPartyIdFromBattleSlot(slot) & 1)) return TRUE; return FALSE; } +//TODO: tilemaps for confirm/cancel buttons in choose 3, double check static void sub_81B120C(void) { - CopyToBgTilemapBufferRect_ChangePalette(1, gUnknown_086157C4, 23, 16, 7, 2, 17); - CopyToBgTilemapBufferRect_ChangePalette(1, gUnknown_086157E0, 23, 18, 7, 2, 17); + CopyToBgTilemapBufferRect_ChangePalette(1, sConfirmButtonPokeball_Tilemap, 23, 16, 7, 2, 17); + CopyToBgTilemapBufferRect_ChangePalette(1, sCancelButtonPokeball_Tilemap, 23, 18, 7, 2, 17); schedule_bg_copy_tilemap_to_vram(1); } @@ -2297,13 +2385,13 @@ bool8 IsMultiBattle(void) return FALSE; } -static void sub_81B1288(struct Pokemon *partySlot, struct Pokemon *pokemon) +static void SwapPartyPokemon(struct Pokemon *mon1, struct Pokemon *mon2) { struct Pokemon *temp = Alloc(sizeof(struct Pokemon)); - *temp = *partySlot; - *partySlot = *pokemon; - *pokemon = *temp; + *temp = *mon1; + *mon1 = *mon2; + *mon2 = *temp; Free(temp); } @@ -2318,13 +2406,13 @@ static void Task_ClosePartyMenuAndSetCB2(u8 taskId) { if (!gPaletteFade.active) { - if (gUnknown_0203CEC8.unk8_0 == 1) - sub_81B9080(); + if (gPartyMenu.menuType == PARTY_MENU_TYPE_IN_BATTLE) + UpdatePartyToFieldOrder(); - if (gUnknown_0203CEC4->exitCallback != NULL) - SetMainCallback2(gUnknown_0203CEC4->exitCallback); + if (sPartyMenuInternal->exitCallback != NULL) + SetMainCallback2(sPartyMenuInternal->exitCallback); else - SetMainCallback2(gUnknown_0203CEC8.exitCallback); + SetMainCallback2(gPartyMenu.exitCallback); ResetSpriteData(); FreePartyPointers(); @@ -2334,30 +2422,30 @@ static void Task_ClosePartyMenuAndSetCB2(u8 taskId) u8 GetCursorSelectionMonId(void) { - return gUnknown_0203CEC8.slotId; + return gPartyMenu.slotId; } -u8 sub_81B1360(void) +u8 GetPartyMenuType(void) { - return gUnknown_0203CEC8.unk8_0; + return gPartyMenu.menuType; } -void sub_81B1370(u8 taskId) +void Task_HandleChooseMonInput(u8 taskId) { if (!gPaletteFade.active && sub_81221EC() != TRUE) { - s8 *ptr = sub_81B13EC(); + s8 *slotPtr = GetCurrentPartySlotPtr(); - switch (PartyMenuButtonHandler(ptr)) + switch (PartyMenuButtonHandler(slotPtr)) { - case 1: - sub_81B140C(taskId, ptr); + case 1: // Selected mon + HandleChooseMonSelection(taskId, slotPtr); break; - case 2: - sub_81B15D0(taskId, ptr); + case 2: // Selected Cancel + HandleChooseMonCancel(taskId, slotPtr); break; - case 8: - if (gUnknown_0203CEC4->unk8_0) + case 8: // Start button + if (sPartyMenuInternal->chooseHalf) { PlaySE(SE_SELECT); sub_81B4F88(); @@ -2367,91 +2455,91 @@ void sub_81B1370(u8 taskId) } } -static s8* sub_81B13EC(void) +static s8* GetCurrentPartySlotPtr(void) { - if (gUnknown_0203CEC8.unkB == 8 || gUnknown_0203CEC8.unkB == 10) - return &gUnknown_0203CEC8.unkA; + if (gPartyMenu.action == PARTY_ACTION_SWITCH || gPartyMenu.action == PARTY_ACTION_SOFTBOILED) + return &gPartyMenu.slotId2; else - return &gUnknown_0203CEC8.slotId; + return &gPartyMenu.slotId; } -static void sub_81B140C(u8 taskId, s8 *ptr) +static void HandleChooseMonSelection(u8 taskId, s8 *slotPtr) { - if (*ptr == 6) + if (*slotPtr == PARTY_SIZE) { - gUnknown_0203CEC8.unk4(taskId); + gPartyMenu.task(taskId); } else { - switch (gUnknown_0203CEC8.unkB - 3) + switch (gPartyMenu.action - 3) { - case 7: - if (sub_81B15A4((u8*)ptr)) + case PARTY_ACTION_SOFTBOILED - 3: + if (IsSelectedMonNotEgg((u8*)slotPtr)) { - PartyMenuRemoveWindow(&gUnknown_0203CEC4->windowId[1]); - sub_81615A8(taskId); + PartyMenuRemoveWindow(&sPartyMenuInternal->windowId[1]); + Task_TryUseSoftboiledOnPartyMon(taskId); } break; - case 0: - if (sub_81B15A4((u8*)ptr)) + case PARTY_ACTION_USE_ITEM - 3: + if (IsSelectedMonNotEgg((u8*)slotPtr)) { - if (gUnknown_0203CEC8.unk8_0 == 1) - gUnknown_0203CEC4->exitCallback = sub_81B9140; + if (gPartyMenu.menuType == PARTY_MENU_TYPE_IN_BATTLE) + sPartyMenuInternal->exitCallback = CB2_SetUpExitToBattleScreen; - PartyMenuRemoveWindow(&gUnknown_0203CEC4->windowId[1]); - gUnknown_03006328(taskId, sub_81B6794); + PartyMenuRemoveWindow(&sPartyMenuInternal->windowId[1]); + gItemUseCB(taskId, Task_ClosePartyMenuAfterText); } break; - case 9: - if (sub_81B15A4((u8*)ptr)) + case PARTY_ACTION_MOVE_TUTOR - 3: + if (IsSelectedMonNotEgg((u8*)slotPtr)) { PlaySE(SE_SELECT); - PartyMenuRemoveWindow(&gUnknown_0203CEC4->windowId[1]); - sub_81B7E4C(taskId); + PartyMenuRemoveWindow(&sPartyMenuInternal->windowId[1]); + TryTutorSelectedMon(taskId); } break; - case 4: - if (sub_81B15A4((u8*)ptr)) + case PARTY_ACTION_GIVE_MAILBOX_MAIL - 3: + if (IsSelectedMonNotEgg((u8*)slotPtr)) { PlaySE(SE_SELECT); - PartyMenuRemoveWindow(&gUnknown_0203CEC4->windowId[1]); - sub_81B8474(taskId); + PartyMenuRemoveWindow(&sPartyMenuInternal->windowId[1]); + TryGiveMailToSelectedMon(taskId); } break; - case 2: - case 3: - if (sub_81B15A4((u8*)ptr)) + case PARTY_ACTION_GIVE_ITEM - 3: + case PARTY_ACTION_GIVE_PC_ITEM - 3: + if (IsSelectedMonNotEgg((u8*)slotPtr)) { PlaySE(SE_SELECT); - PartyMenuRemoveWindow(&gUnknown_0203CEC4->windowId[1]); - sub_81B7FAC(taskId); + PartyMenuRemoveWindow(&sPartyMenuInternal->windowId[1]); + TryGiveItemToSelectedMon(taskId); } break; - case 5: + case PARTY_ACTION_SWITCH - 3: PlaySE(SE_SELECT); - sub_81B3938(taskId); + SwitchSelectedMons(taskId); break; - case 8: + case PARTY_ACTION_CHOOSE_AND_CLOSE - 3: PlaySE(SE_SELECT); Task_ClosePartyMenu(taskId); break; - case 10: - if (sub_81B15A4((u8*)ptr)) + case PARTY_ACTION_MINIGAME - 3: + if (IsSelectedMonNotEgg((u8*)slotPtr)) { - sub_81B21AC(taskId, (u8)*ptr); + TryEnterMonForMinigame(taskId, (u8)*slotPtr); } break; default: - case 1: - case 6: + case PARTY_ACTION_ABILITY_PREVENTS - 3: + case PARTY_ACTION_SWITCHING - 3: PlaySE(SE_SELECT); - sub_81B36FC(taskId); + Task_TryCreateSelectionWindow(taskId); break; } } } -static bool8 sub_81B15A4(u8 *slotPtr) +static bool8 IsSelectedMonNotEgg(u8 *slotPtr) { if (GetMonData(&gPlayerParty[*slotPtr], MON_DATA_IS_EGG) == TRUE) { @@ -2461,83 +2549,84 @@ static bool8 sub_81B15A4(u8 *slotPtr) return TRUE; } -static void sub_81B15D0(u8 taskId, s8 *ptr) +static void HandleChooseMonCancel(u8 taskId, s8 *slotPtr) { - switch (gUnknown_0203CEC8.unkB) + switch (gPartyMenu.action) { - case 1: + case PARTY_ACTION_SEND_OUT: PlaySE(SE_HAZURE); break; - case 8: - case 10: + case PARTY_ACTION_SWITCH: + case PARTY_ACTION_SOFTBOILED: PlaySE(SE_SELECT); - sub_81B407C(taskId); + FinishTwoMonAction(taskId); break; - case 13: + case PARTY_ACTION_MINIGAME: PlaySE(SE_SELECT); - sub_81B2210(taskId); + CancelParticipationPrompt(taskId); break; default: PlaySE(SE_SELECT); - if (sub_81B1660(taskId) != TRUE) + if (DisplayCancelChooseMonYesNo(taskId) != TRUE) { if (!sub_81221AC()) - gSpecialVar_0x8004 = 7; - gUnknown_0203CEE8 = 0; - *ptr = 7; + gSpecialVar_0x8004 = PARTY_SIZE + 1; + gUnknown_0203CEE8 = FALSE; + *slotPtr = PARTY_SIZE + 1; Task_ClosePartyMenu(taskId); } break; } } -static bool8 sub_81B1660(u8 taskId) +static bool8 DisplayCancelChooseMonYesNo(u8 taskId) { const u8* stringPtr = NULL; - if (gUnknown_0203CEC8.unk8_0 == 2) + if (gPartyMenu.menuType == PARTY_MENU_TYPE_CONTEST) stringPtr = gText_CancelParticipation; - else if (gUnknown_0203CEC8.unk8_0 == 4) - stringPtr = sub_81B88BC(); + else if (gPartyMenu.menuType == PARTY_MENU_TYPE_CHOOSE_HALF) + stringPtr = GetFacilityCancelString(); if (stringPtr == NULL) return FALSE; - PartyMenuRemoveWindow(&gUnknown_0203CEC4->windowId[1]); + PartyMenuRemoveWindow(&sPartyMenuInternal->windowId[1]); StringExpandPlaceholders(gStringVar4, stringPtr); - DisplayPartyMenuMessage(gStringVar4, 1); - gTasks[taskId].func = sub_81B16D4; + DisplayPartyMenuMessage(gStringVar4, TRUE); + gTasks[taskId].func = Task_CancelChooseMonYesNo; return TRUE; } -static void sub_81B16D4(u8 taskId) +static void Task_CancelChooseMonYesNo(u8 taskId) { - if (sub_81B1BD4() != TRUE) + if (IsPartyMenuTextPrinterActive() != TRUE) { - sub_81B334C(); - gTasks[taskId].func = sub_81B1708; + PartyMenuDisplayYesNoMenu(); + gTasks[taskId].func = Task_HandleCancelChooseMonYesNoInput; } } -static void sub_81B1708(u8 taskId) +static void Task_HandleCancelChooseMonYesNoInput(u8 taskId) { switch (Menu_ProcessInputNoWrapClearOnChoose()) { case 0: - gUnknown_0203CEE8 = 0; - gUnknown_0203CEC8.slotId = 7; - sub_81B8558(); + gUnknown_0203CEE8 = FALSE; + gPartyMenu.slotId = PARTY_SIZE + 1; + ClearSelectedPartyOrder(); Task_ClosePartyMenu(taskId); break; case MENU_B_PRESSED: PlaySE(SE_SELECT); + // fallthrough case 1: - sub_81B1C1C(taskId); + Task_ReturnToChooseMonAfterText(taskId); break; } } -static u16 PartyMenuButtonHandler(s8 *ptr) +static u16 PartyMenuButtonHandler(s8 *slotPtr) { s8 movementDir; @@ -2556,12 +2645,12 @@ static u16 PartyMenuButtonHandler(s8 *ptr) movementDir = 2; break; default: - switch (sub_812210C()) + switch (GetLRKeysPressedAndHeld()) { - case 1: + case MENU_L_PRESSED: movementDir = -1; break; - case 2: + case MENU_R_PRESSED: movementDir = 1; break; default: @@ -2576,203 +2665,208 @@ static u16 PartyMenuButtonHandler(s8 *ptr) if (movementDir) { - UpdateCurrentPartySelection(ptr, movementDir); + UpdateCurrentPartySelection(slotPtr, movementDir); return 0; } - if ((gMain.newKeys & A_BUTTON) && *ptr == 7) + // Pressed Cancel + if ((gMain.newKeys & A_BUTTON) && *slotPtr == PARTY_SIZE + 1) return 2; return gMain.newKeys & (A_BUTTON | B_BUTTON); } -static void UpdateCurrentPartySelection(s8 *ptr, s8 movementDir) +static void UpdateCurrentPartySelection(s8 *slotPtr, s8 movementDir) { - s8 slot = *ptr; - u8 mode = gUnknown_0203CEC8.mode; + s8 newSlotId = *slotPtr; + u8 layout = gPartyMenu.layout; - if (mode == 0) - SetNewPartySelectTarget1(ptr, movementDir); - else - SetNewPartySelectTarget2(ptr, movementDir); + if (layout == PARTY_LAYOUT_SINGLE) + UpdatePartySelectionSingleLayout(slotPtr, movementDir); + else // remaining double/multi layouts handle movement the same way + UpdatePartySelectionDoubleLayout(slotPtr, movementDir); - if (*ptr != slot) + if (*slotPtr != newSlotId) { PlaySE(SE_SELECT); - sub_81B0FCC(slot, 0); - sub_81B0FCC(*ptr, 1); + AnimatePartySlot(newSlotId, 0); + AnimatePartySlot(*slotPtr, 1); } } -static void SetNewPartySelectTarget1(s8 *ptr, s8 b) +// TODO: clean up +static void UpdatePartySelectionSingleLayout(s8 *slotPtr, s8 movementDir) { - switch (b) + // PARTY_SIZE + 1 is Cancel, the 7th party menu selection + switch (movementDir) { case -1: - if (*ptr == 0) + if (*slotPtr == 0) { - *ptr = 7; + *slotPtr = PARTY_SIZE + 1; } - else if (*ptr == 6) + else if (*slotPtr == PARTY_SIZE) { - *ptr = gPlayerPartyCount - 1; + *slotPtr = gPlayerPartyCount - 1; } - else if (*ptr == 7) + else if (*slotPtr == PARTY_SIZE + 1) { - if (gUnknown_0203CEC4->unk8_0) - *ptr = 6; + if (sPartyMenuInternal->chooseHalf) + *slotPtr = PARTY_SIZE; else - *ptr = gPlayerPartyCount - 1; + *slotPtr = gPlayerPartyCount - 1; } else { - (*ptr)--; + (*slotPtr)--; } break; case 1: - if (*ptr == 7) + if (*slotPtr == PARTY_SIZE + 1) { - *ptr = 0; + *slotPtr = 0; } else { - if (*ptr == gPlayerPartyCount - 1) + if (*slotPtr == gPlayerPartyCount - 1) { - if (gUnknown_0203CEC4->unk8_0) - *ptr = 6; + if (sPartyMenuInternal->chooseHalf) + *slotPtr = PARTY_SIZE; else - *ptr = 7; + *slotPtr = PARTY_SIZE + 1; } else { - (*ptr)++; + (*slotPtr)++; } } break; case 2: - if (gPlayerPartyCount != 1 && *ptr == 0) + if (gPlayerPartyCount != 1 && *slotPtr == 0) { - if (gUnknown_0203CEC4->unk8_1 == 0) - *ptr = 1; + if (sPartyMenuInternal->unk8_1 == 0) + *slotPtr = 1; else - *ptr = gUnknown_0203CEC4->unk8_1; + *slotPtr = sPartyMenuInternal->unk8_1; } break; case -2: - if (*ptr != 0 && *ptr != 6 && *ptr != 7) + if (*slotPtr != 0 && *slotPtr != PARTY_SIZE && *slotPtr != PARTY_SIZE + 1) { - gUnknown_0203CEC4->unk8_1 = *ptr; - *ptr = 0; + sPartyMenuInternal->unk8_1 = *slotPtr; + *slotPtr = 0; } break; } } -static void SetNewPartySelectTarget2(s8 *ptr, s8 b) +// TODO: clean up +static void UpdatePartySelectionDoubleLayout(s8 *slotPtr, s8 movementDir) { - s8 unk2 = b; + // PARTY_SIZE + 1 is Cancel, the 7th party menu selection + s8 unk2 = movementDir; - switch (b) + switch (movementDir) { case -1: - if (*ptr == 0) + if (*slotPtr == 0) { - *ptr = 7; + *slotPtr = PARTY_SIZE + 1; break; } - else if (*ptr == 6) + else if (*slotPtr == PARTY_SIZE) { - *ptr = gPlayerPartyCount - 1; + *slotPtr = gPlayerPartyCount - 1; break; } - else if (*ptr == 7) + else if (*slotPtr == PARTY_SIZE + 1) { - if (gUnknown_0203CEC4->unk8_0) + if (sPartyMenuInternal->chooseHalf) { - *ptr = 6; + *slotPtr = PARTY_SIZE; break; } - (*ptr)--; + (*slotPtr)--; } - unk2 = sub_81B1B00(*ptr, unk2); + unk2 = sub_81B1B00(*slotPtr, unk2); if (unk2 != -1) - *ptr = unk2; + *slotPtr = unk2; break; case 1: - if (*ptr == 6) + if (*slotPtr == PARTY_SIZE) { - *ptr = 7; + *slotPtr = PARTY_SIZE + 1; } - else if (*ptr == 7) + else if (*slotPtr == PARTY_SIZE + 1) { - *ptr = 0; + *slotPtr = 0; } else { - unk2 = sub_81B1B00(*ptr, 1); + unk2 = sub_81B1B00(*slotPtr, 1); if (unk2 == -1) { - if (gUnknown_0203CEC4->unk8_0) - *ptr = 6; + if (sPartyMenuInternal->chooseHalf) + *slotPtr = PARTY_SIZE; else - *ptr = 7; + *slotPtr = PARTY_SIZE + 1; } else { - *ptr = unk2; + *slotPtr = unk2; } } break; case 2: - if (*ptr == 0) + if (*slotPtr == 0) { - if (gUnknown_0203CEC4->unk8_1 == 3) + if (sPartyMenuInternal->unk8_1 == 3) { if (GetMonData(&gPlayerParty[3], MON_DATA_SPECIES) != SPECIES_NONE) - *ptr = 3; + *slotPtr = 3; } else if (GetMonData(&gPlayerParty[2], MON_DATA_SPECIES) != SPECIES_NONE) { - *ptr = 2; + *slotPtr = 2; } } - else if (*ptr == 1) + else if (*slotPtr == 1) { - if (gUnknown_0203CEC4->unk8_1 == 5) + if (sPartyMenuInternal->unk8_1 == 5) { if (GetMonData(&gPlayerParty[5], MON_DATA_SPECIES) != SPECIES_NONE) - *ptr = 5; + *slotPtr = 5; } else if (GetMonData(&gPlayerParty[4], MON_DATA_SPECIES) != SPECIES_NONE) { - *ptr = 4; + *slotPtr = 4; } } break; case -2: - if (*ptr == 2 || *ptr == 3) + if (*slotPtr == 2 || *slotPtr == 3) { - gUnknown_0203CEC4->unk8_1 = *ptr; - *ptr = 0; + sPartyMenuInternal->unk8_1 = *slotPtr; + *slotPtr = 0; } - else if (*ptr == 4 || *ptr == 5) + else if (*slotPtr == 4 || *slotPtr == 5) { - gUnknown_0203CEC4->unk8_1 = *ptr; - *ptr = 1; + sPartyMenuInternal->unk8_1 = *slotPtr; + *slotPtr = 1; } break; } } -static s8 sub_81B1B00(s8 a, s8 b) +static s8 sub_81B1B00(s8 slotId, s8 b) { while (TRUE) { - a += b; - if ((u8)a >= 6) + slotId += b; + if ((u8)slotId >= PARTY_SIZE) return -1; - if (GetMonData(&gPlayerParty[a], MON_DATA_SPECIES) != SPECIES_NONE) - return a; + if (GetMonData(&gPlayerParty[slotId], MON_DATA_SPECIES) != SPECIES_NONE) + return slotId; } } @@ -2782,21 +2876,23 @@ u8* GetMonNickname(struct Pokemon *mon, u8 *dest) return StringGetEnd10(dest); } -u8 DisplayPartyMenuMessage(const u8* str, u8 b) +#define tKeepOpen data[0] + +u8 DisplayPartyMenuMessage(const u8* str, bool8 keepOpen) { u8 taskId; PartyMenuPrintText(str); - taskId = CreateTask(sub_81B1B8C, 1); - gTasks[taskId].data[0] = b; + taskId = CreateTask(Task_PrintAndWaitForText, 1); + gTasks[taskId].tKeepOpen = keepOpen; return taskId; } -static void sub_81B1B8C(u8 taskId) +static void Task_PrintAndWaitForText(u8 taskId) { if (RunTextPrintersRetIsActive(6) != TRUE) { - if (gTasks[taskId].data[0] == 0) + if (gTasks[taskId].tKeepOpen == FALSE) { ClearStdWindowAndFrameToTransparent(6, 0); ClearWindowTilemap(6); @@ -2805,75 +2901,77 @@ static void sub_81B1B8C(u8 taskId) } } -bool8 sub_81B1BD4(void) +#undef tKeepOpen + +bool8 IsPartyMenuTextPrinterActive(void) { - return FuncIsActiveTask(sub_81B1B8C); + return FuncIsActiveTask(Task_PrintAndWaitForText); } -static void sub_81B1BE8(u8 taskId) +static void Task_WaitForLinkAndReturnToChooseMon(u8 taskId) { if (sub_81221EC() != TRUE) { - DisplayPartyMenuStdMessage(0); - gTasks[taskId].func = sub_81B1370; + DisplayPartyMenuStdMessage(PARTY_MSG_CHOOSE_MON); + gTasks[taskId].func = Task_HandleChooseMonInput; } } -static void sub_81B1C1C(u8 taskId) +static void Task_ReturnToChooseMonAfterText(u8 taskId) { - if (sub_81B1BD4() != TRUE) + if (IsPartyMenuTextPrinterActive() != TRUE) { ClearStdWindowAndFrameToTransparent(6, 0); ClearWindowTilemap(6); if (sub_81221AC() == TRUE) { - gTasks[taskId].func = sub_81B1BE8; + gTasks[taskId].func = Task_WaitForLinkAndReturnToChooseMon; } else { - DisplayPartyMenuStdMessage(0); - gTasks[taskId].func = sub_81B1370; + DisplayPartyMenuStdMessage(PARTY_MSG_CHOOSE_MON); + gTasks[taskId].func = Task_HandleChooseMonInput; } } } -static void sub_81B1C84(struct Pokemon *mon, u16 item, u8 c, u8 unused) +static void DisplayGaveHeldItemMessage(struct Pokemon *mon, u16 item, bool8 keepOpen, u8 unused) { GetMonNickname(mon, gStringVar1); CopyItemName(item, gStringVar2); StringExpandPlaceholders(gStringVar4, gText_PkmnWasGivenItem); - DisplayPartyMenuMessage(gStringVar4, c); + DisplayPartyMenuMessage(gStringVar4, keepOpen); schedule_bg_copy_tilemap_to_vram(2); } -static void sub_81B1CD0(struct Pokemon *mon, u16 item, u8 c) +static void DisplayTookHeldItemMessage(struct Pokemon *mon, u16 item, bool8 keepOpen) { GetMonNickname(mon, gStringVar1); CopyItemName(item, gStringVar2); StringExpandPlaceholders(gStringVar4, gText_ReceivedItemFromPkmn); - DisplayPartyMenuMessage(gStringVar4, c); + DisplayPartyMenuMessage(gStringVar4, keepOpen); schedule_bg_copy_tilemap_to_vram(2); } -static void sub_81B1D1C(struct Pokemon *mon, u16 item, u8 c) +static void DisplayAlreadyHoldingItemSwitchMessage(struct Pokemon *mon, u16 item, bool8 keepOpen) { GetMonNickname(mon, gStringVar1); CopyItemName(item, gStringVar2); - StringExpandPlaceholders(gStringVar4, gText_SwitchPkmnItem); - DisplayPartyMenuMessage(gStringVar4, c); + StringExpandPlaceholders(gStringVar4, gText_PkmnAlreadyHoldingItemSwitch); + DisplayPartyMenuMessage(gStringVar4, keepOpen); schedule_bg_copy_tilemap_to_vram(2); } -static void sub_81B1D68(u16 item, u16 item2, u8 c) +static void DisplaySwitchedHeldItemMessage(u16 item, u16 item2, bool8 keepOpen) { CopyItemName(item, gStringVar1); CopyItemName(item2, gStringVar2); StringExpandPlaceholders(gStringVar4, gText_SwitchedPkmnItem); - DisplayPartyMenuMessage(gStringVar4, c); + DisplayPartyMenuMessage(gStringVar4, keepOpen); schedule_bg_copy_tilemap_to_vram(2); } -static void sub_81B1DB8(struct Pokemon *mon, u16 item) +static void GiveItemToMon(struct Pokemon *mon, u16 item) { u8 itemBytes[2]; @@ -2901,71 +2999,89 @@ static u8 TryTakeMonItem(struct Pokemon* mon) return 2; } -static void pokemon_item_not_removed(u16 itemUnused) +static void BufferBagFullCantTakeItemMessage(u16 itemUnused) { StringExpandPlaceholders(gStringVar4, gText_BagFullCouldNotRemoveItem); } -static void sub_81B1E60(u8 taskId) +#define tHP data[0] +#define tMaxHP data[1] +#define tHPIncrement data[2] +#define tHPToAdd data[3] +#define tPartyId data[4] +#define tStartHP data[5] + +static void Task_PartyMenuModifyHP(u8 taskId) { s16 *data = gTasks[taskId].data; - data[0] += data[2]; - data[3]--; - SetMonData(&gPlayerParty[data[4]], MON_DATA_HP, &data[0]); - DisplayPartyPokemonHPCheck(&gPlayerParty[data[4]], &gUnknown_0203CEDC[data[4]], 1); - DisplayPartyPokemonHPBarCheck(&gPlayerParty[data[4]], &gUnknown_0203CEDC[data[4]]); - if (data[3] == 0 || data[0] == 0 || data[0] == data[1]) + tHP += tHPIncrement; + tHPToAdd--; + SetMonData(&gPlayerParty[tPartyId], MON_DATA_HP, &tHP); + DisplayPartyPokemonHPCheck(&gPlayerParty[tPartyId], &sPartyMenuBoxes[tPartyId], 1); + DisplayPartyPokemonHPBarCheck(&gPlayerParty[tPartyId], &sPartyMenuBoxes[tPartyId]); + if (tHPToAdd == 0 || tHP == 0 || tHP == tMaxHP) { - if (data[0] > data[5]) - ConvertIntToDecimalStringN(gStringVar2, data[0] - data[5], STR_CONV_MODE_LEFT_ALIGN, 3); + // If HP was recovered, buffer the amount recovered + if (tHP > tStartHP) + ConvertIntToDecimalStringN(gStringVar2, tHP - tStartHP, STR_CONV_MODE_LEFT_ALIGN, 3); + SwitchTaskToFollowupFunc(taskId); } } -void sub_81B1F18(u8 taskId, u8 slot, s8 c, s16 HPDifference, TaskFunc func) +void PartyMenuModifyHP(u8 taskId, u8 slot, s8 hpIncrement, s16 hpDifference, TaskFunc followUpFunc) { struct Pokemon *mon = &gPlayerParty[slot]; s16 *data = gTasks[taskId].data; - data[0] = GetMonData(mon, MON_DATA_HP); - data[1] = GetMonData(mon, MON_DATA_MAX_HP); - data[2] = c; - data[3] = HPDifference; - data[4] = slot; - data[5] = data[0]; - SetTaskFuncWithFollowupFunc(taskId, sub_81B1E60, func); + tHP = GetMonData(mon, MON_DATA_HP); + tMaxHP = GetMonData(mon, MON_DATA_MAX_HP); + tHPIncrement = hpIncrement; + tHPToAdd = hpDifference; + tPartyId = slot; + tStartHP = tHP; + SetTaskFuncWithFollowupFunc(taskId, Task_PartyMenuModifyHP, followUpFunc); } -static void sub_81B1FA8(u8 taskId, u8 b, u32 hp) +// The usage of hp in this function is mostly nonsense +// Because caseId is always passed 0, none of the other cases ever occur +static void ResetHPTaskData(u8 taskId, u8 caseId, u32 hp) { s16 *data = gTasks[taskId].data; - switch (b) // only case 0 is used + switch (caseId) // always zero { case 0: - data[0] = hp; - data[5] = hp; + tHP = hp; + tStartHP = hp; break; case 1: - data[1] = hp; + tMaxHP = hp; break; case 2: - data[2] = hp; + tHPIncrement = hp; break; case 3: - data[3] = hp; + tHPToAdd = hp; break; case 4: - data[4] = hp; + tPartyId = hp; break; case 5: - SetTaskFuncWithFollowupFunc(taskId, sub_81B1E60, (TaskFunc)hp); // >casting hp as a taskfunc + SetTaskFuncWithFollowupFunc(taskId, Task_PartyMenuModifyHP, (TaskFunc)hp); // >casting hp as a taskfunc break; } } -u8 pokemon_ailments_get_primary(u32 status) +#undef tHP +#undef tMaxHP +#undef tHPIncrement +#undef tHPToAdd +#undef tPartyId +#undef tStartHP + +u8 GetAilmentFromStatus(u32 status) { if (status & STATUS1_PSN_ANY) return AILMENT_PSN; @@ -2986,7 +3102,7 @@ u8 GetMonAilment(struct Pokemon *mon) if (GetMonData(mon, MON_DATA_HP) == 0) return AILMENT_FNT; - ailment = pokemon_ailments_get_primary(GetMonData(mon, MON_DATA_STATUS)); + ailment = GetAilmentFromStatus(GetMonData(mon, MON_DATA_STATUS)); if (ailment != AILMENT_NONE) return ailment; if (CheckPartyPokerus(mon, 0)) @@ -2994,16 +3110,16 @@ u8 GetMonAilment(struct Pokemon *mon) return AILMENT_NONE; } -static void sub_81B209C(void) +static void SetPartyMonsAllowedInMinigame(void) { u16 *ptr; - if (gUnknown_0203CEC8.unk8_0 == 11) + if (gPartyMenu.menuType == PARTY_MENU_TYPE_MINIGAME) { u8 i; - ptr = &gUnknown_0203CEC8.unkE; - gUnknown_0203CEC8.unkE = 0; + ptr = &gPartyMenu.unkE; + gPartyMenu.unkE = 0; if (gSpecialVar_0x8005 == 0) { for (i = 0; i < gPlayerPartyCount; i++) @@ -3012,7 +3128,7 @@ static void sub_81B209C(void) else { for (i = 0; i < gPlayerPartyCount; i++) - *ptr += sub_81B2164(&gPlayerParty[i]) << i; + *ptr += IsMonAllowedInDodrioBerryPicking(&gPlayerParty[i]) << i; } } } @@ -3024,25 +3140,24 @@ static bool16 IsMonAllowedInPokemonJump(struct Pokemon *mon) return FALSE; } -// Dodrio Berry Picking select? -static bool16 sub_81B2164(struct Pokemon *mon) +static bool16 IsMonAllowedInDodrioBerryPicking(struct Pokemon *mon) { if (GetMonData(mon, MON_DATA_IS_EGG) != TRUE && GetMonData(mon, MON_DATA_SPECIES) == SPECIES_DODRIO) return TRUE; return FALSE; } -static bool8 sub_81B218C(u8 slot) +static bool8 IsMonAllowedInMinigame(u8 slot) { - if (!((gUnknown_0203CEC8.unkE >> slot) & 1)) + if (!((gPartyMenu.unkE >> slot) & 1)) return FALSE; return TRUE; } -static void sub_81B21AC(u8 taskId, u8 slot) +static void TryEnterMonForMinigame(u8 taskId, u8 slot) { - if (sub_81B218C(slot) == TRUE) + if (IsMonAllowedInMinigame(slot) == TRUE) { PlaySE(SE_SELECT); gSpecialVar_0x8004 = slot; @@ -3051,40 +3166,41 @@ static void sub_81B21AC(u8 taskId, u8 slot) else { PlaySE(SE_HAZURE); - DisplayPartyMenuMessage(gText_PkmnCantParticipate, 0); + DisplayPartyMenuMessage(gText_PkmnCantParticipate, FALSE); schedule_bg_copy_tilemap_to_vram(2); - gTasks[taskId].func = sub_81B1C1C; + gTasks[taskId].func = Task_ReturnToChooseMonAfterText; } } -static void sub_81B2210(u8 taskId) +static void CancelParticipationPrompt(u8 taskId) { - DisplayPartyMenuMessage(gText_CancelParticipation, 1); + DisplayPartyMenuMessage(gText_CancelParticipation, TRUE); schedule_bg_copy_tilemap_to_vram(2); - gTasks[taskId].func = sub_81B2248; + gTasks[taskId].func = Task_CancelParticipationYesNo; } -static void sub_81B2248(u8 taskId) +static void Task_CancelParticipationYesNo(u8 taskId) { - if (sub_81B1BD4() != TRUE) + if (IsPartyMenuTextPrinterActive() != TRUE) { - sub_81B334C(); - gTasks[taskId].func = sub_81B227C; + PartyMenuDisplayYesNoMenu(); + gTasks[taskId].func = Task_HandleCancelParticipationYesNoInput; } } -static void sub_81B227C(u8 taskId) +static void Task_HandleCancelParticipationYesNoInput(u8 taskId) { switch (Menu_ProcessInputNoWrapClearOnChoose()) { case 0: - gSpecialVar_0x8004 = 7; + gSpecialVar_0x8004 = PARTY_SIZE + 1; Task_ClosePartyMenu(taskId); break; case MENU_B_PRESSED: PlaySE(SE_SELECT); + // fallthrough case 1: - gTasks[taskId].func = sub_81B1C1C; + gTasks[taskId].func = Task_ReturnToChooseMonAfterText; break; } } @@ -3132,23 +3248,23 @@ static bool8 CanLearnTutorMove(u16 species, u8 tutor) return FALSE; } -static void sub_81B239C(u8 a) +static void InitPartyMenuWindows(u8 layout) { u8 i; - switch (a) + switch (layout) { - case 0: - InitWindows(gUnknown_08615810); + case PARTY_LAYOUT_SINGLE: + InitWindows(sSinglePartyMenuWindowTemplate); break; - case 1: - InitWindows(gUnknown_08615850); + case PARTY_LAYOUT_DOUBLE: + InitWindows(sDoublePartyMenuWindowTemplate); break; - case 2: - InitWindows(gUnknown_08615890); + case PARTY_LAYOUT_MULTI: + InitWindows(sMultiPartyMenuWindowTemplate); break; - default: - InitWindows(gUnknown_086158D0); + default: // PARTY_LAYOUT_MULTI_SHOWCASE + InitWindows(sShowcaseMultiPartyMenuWindowTemplate); break; } DeactivateAllTextPrinters(); @@ -3159,16 +3275,17 @@ static void sub_81B239C(u8 a) LoadPalette(gUnknown_0860F074, 0xF0, 0x20); } -static void sub_81B2428(bool8 a) +// TODO +static void sub_81B2428(bool8 chooseHalf) { u8 firstWindowId; u8 windowId; u8 offset; u8 mainOffset; - if (gUnknown_0203CEC8.unk8_0 != 5) + if (gPartyMenu.menuType != PARTY_MENU_TYPE_IN_MULTI_BATTLE) { - if (a == TRUE) + if (chooseHalf == TRUE) { firstWindowId = AddWindow(&gUnknown_08615918); FillWindowPixelBuffer(firstWindowId, PIXEL_FILL(0)); @@ -3185,13 +3302,14 @@ static void sub_81B2428(bool8 a) offset = 3; } FillWindowPixelBuffer(windowId, PIXEL_FILL(0)); - if (gUnknown_0203CEC8.unk8_0 != 10) + if (gPartyMenu.menuType != PARTY_MENU_TYPE_SPIN_TRADE) { mainOffset = GetStringCenterAlignXOffset(0, gText_Cancel, 48); AddTextPrinterParameterized3(windowId, 0, mainOffset + offset, 1, sFontColorTable[0], -1, gText_Cancel); } else { + // Identical to above, Spin Trade wasnt implemented mainOffset = GetStringCenterAlignXOffset(0, gText_Cancel2, 48); AddTextPrinterParameterized3(windowId, 0, mainOffset + offset, 1, sFontColorTable[0], -1, gText_Cancel2); } @@ -3201,9 +3319,9 @@ static void sub_81B2428(bool8 a) } } -static u16* GetPartyMenuPaletteFromBuffer(u8 paletteId) +static u16* GetPartyMenuPalBufferPtr(u8 paletteId) { - return &gUnknown_0203CEC4->palBuffer[paletteId]; + return &sPartyMenuInternal->palBuffer[paletteId]; } static void BlitBitmapToPartyWindow(u8 windowId, const u8 *b, u8 c, u8 x, u8 y, u8 width, u8 height) @@ -3216,14 +3334,14 @@ static void BlitBitmapToPartyWindow(u8 windowId, const u8 *b, u8 c, u8 x, u8 y, for (i = 0; i < height; i++) { for (j = 0; j < width; j++) - CpuCopy16(GetPartyMiscGraphicsTile(b[x + j + ((y + i) * c)]), &pixels[(i * width + j) * 32], 32); + CpuCopy16(GetPartyMenuBgTile(b[x + j + ((y + i) * c)]), &pixels[(i * width + j) * 32], 32); } BlitBitmapToWindow(windowId, pixels, x * 8, y * 8, width * 8, height * 8); Free(pixels); } } -static void BlitBitmapToPartyWindow_Default1(u8 windowId, u8 x, u8 y, u8 width, u8 height, u8 isEgg) +static void BlitBitmapToPartyWindow_LeftColumn(u8 windowId, u8 x, u8 y, u8 width, u8 height, u8 isEgg) { if (width == 0 && height == 0) { @@ -3236,7 +3354,7 @@ static void BlitBitmapToPartyWindow_Default1(u8 windowId, u8 x, u8 y, u8 width, BlitBitmapToPartyWindow(windowId, sMainSlotTileNums_Egg, 10, x, y, width, height); } -static void BlitBitmapToPartyWindow_Default2(u8 windowId, u8 x, u8 y, u8 width, u8 height, u8 isEgg) +static void BlitBitmapToPartyWindow_RightColumn(u8 windowId, u8 x, u8 y, u8 width, u8 height, u8 isEgg) { if (width == 0 && height == 0) { @@ -3254,126 +3372,134 @@ static void DrawEmptySlot(u8 windowId) BlitBitmapToPartyWindow(windowId, sEmptySlotTileNums, 18, 0, 0, 18, 3); } -static void UpdateSelectedPartyBox(struct Struct203CEDC *ptr, u8 bitfield) -{ - u8 palNum = GetWindowAttribute(ptr->windowId, WINDOW_PALETTE_NUM) * 16; +// If LoadPartyBoxPalette is too dense, this macro could be used to replace the LoadPalette triplets +#define LOAD_PARTY_BOX_PAL(paletteIds, paletteOffsets) \ +{ \ + LoadPalette(GetPartyMenuPalBufferPtr(paletteIds[0]), paletteOffsets[0] + palNum, 2); \ + LoadPalette(GetPartyMenuPalBufferPtr(paletteIds[1]), paletteOffsets[1] + palNum, 2); \ + LoadPalette(GetPartyMenuPalBufferPtr(paletteIds[2]), paletteOffsets[2] + palNum, 2); \ +} - if (bitfield & 0x40) +static void LoadPartyBoxPalette(struct PartyMenuBox *menuBox, u8 palFlags) +{ + u8 palNum = GetWindowAttribute(menuBox->windowId, WINDOW_PALETTE_NUM) * 16; + + if (palFlags & PARTY_PAL_NO_MON) { - LoadPalette(GetPartyMenuPaletteFromBuffer(gUnknown_08615AF1[0]), gUnknown_08615AC0[0] + palNum, 2); - LoadPalette(GetPartyMenuPaletteFromBuffer(gUnknown_08615AF1[1]), gUnknown_08615AC0[1] + palNum, 2); - LoadPalette(GetPartyMenuPaletteFromBuffer(gUnknown_08615AF1[2]), gUnknown_08615AC0[2] + palNum, 2); + LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxNoMonPalIds[0]), sPartyBoxNoMonPalOffsets[0] + palNum, 2); + LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxNoMonPalIds[1]), sPartyBoxNoMonPalOffsets[1] + palNum, 2); + LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxNoMonPalIds[2]), sPartyBoxNoMonPalOffsets[2] + palNum, 2); } - else if (bitfield & 0x20) + else if (palFlags & PARTY_PAL_TO_SOFTBOIL) { - if (bitfield & 1) + if (palFlags & PARTY_PAL_SELECTED) { - LoadPalette(GetPartyMenuPaletteFromBuffer(gUnknown_08615ADF[0]), gUnknown_08615ABA[0] + palNum, 2); - LoadPalette(GetPartyMenuPaletteFromBuffer(gUnknown_08615ADF[1]), gUnknown_08615ABA[1] + palNum, 2); - LoadPalette(GetPartyMenuPaletteFromBuffer(gUnknown_08615ADF[2]), gUnknown_08615ABA[2] + palNum, 2); - LoadPalette(GetPartyMenuPaletteFromBuffer(gUnknown_08615AEB[0]), gUnknown_08615ABD[0] + palNum, 2); - LoadPalette(GetPartyMenuPaletteFromBuffer(gUnknown_08615AEB[1]), gUnknown_08615ABD[1] + palNum, 2); - LoadPalette(GetPartyMenuPaletteFromBuffer(gUnknown_08615AEB[2]), gUnknown_08615ABD[2] + palNum, 2); + LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxSelectedForActionPalIds1[0]), sPartyBoxPalOffsets1[0] + palNum, 2); + LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxSelectedForActionPalIds1[1]), sPartyBoxPalOffsets1[1] + palNum, 2); + LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxSelectedForActionPalIds1[2]), sPartyBoxPalOffsets1[2] + palNum, 2); + LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxCurrSelectionPalIds2[0]), sPartyBoxPalOffsets2[0] + palNum, 2); + LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxCurrSelectionPalIds2[1]), sPartyBoxPalOffsets2[1] + palNum, 2); + LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxCurrSelectionPalIds2[2]), sPartyBoxPalOffsets2[2] + palNum, 2); } else { - LoadPalette(GetPartyMenuPaletteFromBuffer(gUnknown_08615ADF[0]), gUnknown_08615ABA[0] + palNum, 2); - LoadPalette(GetPartyMenuPaletteFromBuffer(gUnknown_08615ADF[1]), gUnknown_08615ABA[1] + palNum, 2); - LoadPalette(GetPartyMenuPaletteFromBuffer(gUnknown_08615ADF[2]), gUnknown_08615ABA[2] + palNum, 2); - LoadPalette(GetPartyMenuPaletteFromBuffer(gUnknown_08615AEE[0]), gUnknown_08615ABD[0] + palNum, 2); - LoadPalette(GetPartyMenuPaletteFromBuffer(gUnknown_08615AEE[1]), gUnknown_08615ABD[1] + palNum, 2); - LoadPalette(GetPartyMenuPaletteFromBuffer(gUnknown_08615AEE[2]), gUnknown_08615ABD[2] + palNum, 2); + LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxSelectedForActionPalIds1[0]), sPartyBoxPalOffsets1[0] + palNum, 2); + LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxSelectedForActionPalIds1[1]), sPartyBoxPalOffsets1[1] + palNum, 2); + LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxSelectedForActionPalIds1[2]), sPartyBoxPalOffsets1[2] + palNum, 2); + LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxSelectedForActionPalIds2[0]), sPartyBoxPalOffsets2[0] + palNum, 2); + LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxSelectedForActionPalIds2[1]), sPartyBoxPalOffsets2[1] + palNum, 2); + LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxSelectedForActionPalIds2[2]), sPartyBoxPalOffsets2[2] + palNum, 2); } } - else if (bitfield & 0x10) + else if (palFlags & PARTY_PAL_SWITCHING) { - LoadPalette(GetPartyMenuPaletteFromBuffer(gUnknown_08615ADF[0]), gUnknown_08615ABA[0] + palNum, 2); - LoadPalette(GetPartyMenuPaletteFromBuffer(gUnknown_08615ADF[1]), gUnknown_08615ABA[1] + palNum, 2); - LoadPalette(GetPartyMenuPaletteFromBuffer(gUnknown_08615ADF[2]), gUnknown_08615ABA[2] + palNum, 2); - LoadPalette(GetPartyMenuPaletteFromBuffer(gUnknown_08615AEE[0]), gUnknown_08615ABD[0] + palNum, 2); - LoadPalette(GetPartyMenuPaletteFromBuffer(gUnknown_08615AEE[1]), gUnknown_08615ABD[1] + palNum, 2); - LoadPalette(GetPartyMenuPaletteFromBuffer(gUnknown_08615AEE[2]), gUnknown_08615ABD[2] + palNum, 2); + LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxSelectedForActionPalIds1[0]), sPartyBoxPalOffsets1[0] + palNum, 2); + LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxSelectedForActionPalIds1[1]), sPartyBoxPalOffsets1[1] + palNum, 2); + LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxSelectedForActionPalIds1[2]), sPartyBoxPalOffsets1[2] + palNum, 2); + LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxSelectedForActionPalIds2[0]), sPartyBoxPalOffsets2[0] + palNum, 2); + LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxSelectedForActionPalIds2[1]), sPartyBoxPalOffsets2[1] + palNum, 2); + LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxSelectedForActionPalIds2[2]), sPartyBoxPalOffsets2[2] + palNum, 2); } - else if (bitfield & 4) + else if (palFlags & PARTY_PAL_TO_SWITCH) { - if (bitfield & 1) + if (palFlags & PARTY_PAL_SELECTED) { - LoadPalette(GetPartyMenuPaletteFromBuffer(gUnknown_08615ADF[0]), gUnknown_08615ABA[0] + palNum, 2); - LoadPalette(GetPartyMenuPaletteFromBuffer(gUnknown_08615ADF[1]), gUnknown_08615ABA[1] + palNum, 2); - LoadPalette(GetPartyMenuPaletteFromBuffer(gUnknown_08615ADF[2]), gUnknown_08615ABA[2] + palNum, 2); - LoadPalette(GetPartyMenuPaletteFromBuffer(gUnknown_08615AEB[0]), gUnknown_08615ABD[0] + palNum, 2); - LoadPalette(GetPartyMenuPaletteFromBuffer(gUnknown_08615AEB[1]), gUnknown_08615ABD[1] + palNum, 2); - LoadPalette(GetPartyMenuPaletteFromBuffer(gUnknown_08615AEB[2]), gUnknown_08615ABD[2] + palNum, 2); + LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxSelectedForActionPalIds1[0]), sPartyBoxPalOffsets1[0] + palNum, 2); + LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxSelectedForActionPalIds1[1]), sPartyBoxPalOffsets1[1] + palNum, 2); + LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxSelectedForActionPalIds1[2]), sPartyBoxPalOffsets1[2] + palNum, 2); + LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxCurrSelectionPalIds2[0]), sPartyBoxPalOffsets2[0] + palNum, 2); + LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxCurrSelectionPalIds2[1]), sPartyBoxPalOffsets2[1] + palNum, 2); + LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxCurrSelectionPalIds2[2]), sPartyBoxPalOffsets2[2] + palNum, 2); } else { - LoadPalette(GetPartyMenuPaletteFromBuffer(gUnknown_08615ADF[0]), gUnknown_08615ABA[0] + palNum, 2); - LoadPalette(GetPartyMenuPaletteFromBuffer(gUnknown_08615ADF[1]), gUnknown_08615ABA[1] + palNum, 2); - LoadPalette(GetPartyMenuPaletteFromBuffer(gUnknown_08615ADF[2]), gUnknown_08615ABA[2] + palNum, 2); - LoadPalette(GetPartyMenuPaletteFromBuffer(gUnknown_08615AEE[0]), gUnknown_08615ABD[0] + palNum, 2); - LoadPalette(GetPartyMenuPaletteFromBuffer(gUnknown_08615AEE[1]), gUnknown_08615ABD[1] + palNum, 2); - LoadPalette(GetPartyMenuPaletteFromBuffer(gUnknown_08615AEE[2]), gUnknown_08615ABD[2] + palNum, 2); + LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxSelectedForActionPalIds1[0]), sPartyBoxPalOffsets1[0] + palNum, 2); + LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxSelectedForActionPalIds1[1]), sPartyBoxPalOffsets1[1] + palNum, 2); + LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxSelectedForActionPalIds1[2]), sPartyBoxPalOffsets1[2] + palNum, 2); + LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxSelectedForActionPalIds2[0]), sPartyBoxPalOffsets2[0] + palNum, 2); + LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxSelectedForActionPalIds2[1]), sPartyBoxPalOffsets2[1] + palNum, 2); + LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxSelectedForActionPalIds2[2]), sPartyBoxPalOffsets2[2] + palNum, 2); } } - else if (bitfield & 2) + else if (palFlags & PARTY_PAL_FAINTED) { - if (bitfield & 1) + if (palFlags & PARTY_PAL_SELECTED) { - LoadPalette(GetPartyMenuPaletteFromBuffer(gUnknown_08615ADC[0]), gUnknown_08615ABA[0] + palNum, 2); - LoadPalette(GetPartyMenuPaletteFromBuffer(gUnknown_08615ADC[1]), gUnknown_08615ABA[1] + palNum, 2); - LoadPalette(GetPartyMenuPaletteFromBuffer(gUnknown_08615ADC[2]), gUnknown_08615ABA[2] + palNum, 2); - LoadPalette(GetPartyMenuPaletteFromBuffer(gUnknown_08615AEB[0]), gUnknown_08615ABD[0] + palNum, 2); - LoadPalette(GetPartyMenuPaletteFromBuffer(gUnknown_08615AEB[1]), gUnknown_08615ABD[1] + palNum, 2); - LoadPalette(GetPartyMenuPaletteFromBuffer(gUnknown_08615AEB[2]), gUnknown_08615ABD[2] + palNum, 2); + LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxCurrSelectionFaintedPalIds[0]), sPartyBoxPalOffsets1[0] + palNum, 2); + LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxCurrSelectionFaintedPalIds[1]), sPartyBoxPalOffsets1[1] + palNum, 2); + LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxCurrSelectionFaintedPalIds[2]), sPartyBoxPalOffsets1[2] + palNum, 2); + LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxCurrSelectionPalIds2[0]), sPartyBoxPalOffsets2[0] + palNum, 2); + LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxCurrSelectionPalIds2[1]), sPartyBoxPalOffsets2[1] + palNum, 2); + LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxCurrSelectionPalIds2[2]), sPartyBoxPalOffsets2[2] + palNum, 2); } else { - LoadPalette(GetPartyMenuPaletteFromBuffer(gUnknown_08615AD3[0]), gUnknown_08615ABA[0] + palNum, 2); - LoadPalette(GetPartyMenuPaletteFromBuffer(gUnknown_08615AD3[1]), gUnknown_08615ABA[1] + palNum, 2); - LoadPalette(GetPartyMenuPaletteFromBuffer(gUnknown_08615AD3[2]), gUnknown_08615ABA[2] + palNum, 2); - LoadPalette(GetPartyMenuPaletteFromBuffer(gUnknown_08615AE8[0]), gUnknown_08615ABD[0] + palNum, 2); - LoadPalette(GetPartyMenuPaletteFromBuffer(gUnknown_08615AE8[1]), gUnknown_08615ABD[1] + palNum, 2); - LoadPalette(GetPartyMenuPaletteFromBuffer(gUnknown_08615AE8[2]), gUnknown_08615ABD[2] + palNum, 2); + LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxFaintedPalIds1[0]), sPartyBoxPalOffsets1[0] + palNum, 2); + LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxFaintedPalIds1[1]), sPartyBoxPalOffsets1[1] + palNum, 2); + LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxFaintedPalIds1[2]), sPartyBoxPalOffsets1[2] + palNum, 2); + LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxFaintedPalIds2[0]), sPartyBoxPalOffsets2[0] + palNum, 2); + LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxFaintedPalIds2[1]), sPartyBoxPalOffsets2[1] + palNum, 2); + LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxFaintedPalIds2[2]), sPartyBoxPalOffsets2[2] + palNum, 2); } } - else if (bitfield & 8) + else if (palFlags & PARTY_PAL_MULTI_ALT) { - if (bitfield & 1) + if (palFlags & PARTY_PAL_SELECTED) { - LoadPalette(GetPartyMenuPaletteFromBuffer(gUnknown_08615AD9[0]), gUnknown_08615ABA[0] + palNum, 2); - LoadPalette(GetPartyMenuPaletteFromBuffer(gUnknown_08615AD9[1]), gUnknown_08615ABA[1] + palNum, 2); - LoadPalette(GetPartyMenuPaletteFromBuffer(gUnknown_08615AD9[2]), gUnknown_08615ABA[2] + palNum, 2); - LoadPalette(GetPartyMenuPaletteFromBuffer(gUnknown_08615AEB[0]), gUnknown_08615ABD[0] + palNum, 2); - LoadPalette(GetPartyMenuPaletteFromBuffer(gUnknown_08615AEB[1]), gUnknown_08615ABD[1] + palNum, 2); - LoadPalette(GetPartyMenuPaletteFromBuffer(gUnknown_08615AEB[2]), gUnknown_08615ABD[2] + palNum, 2); + LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxCurrSelectionMultiPalIds[0]), sPartyBoxPalOffsets1[0] + palNum, 2); + LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxCurrSelectionMultiPalIds[1]), sPartyBoxPalOffsets1[1] + palNum, 2); + LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxCurrSelectionMultiPalIds[2]), sPartyBoxPalOffsets1[2] + palNum, 2); + LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxCurrSelectionPalIds2[0]), sPartyBoxPalOffsets2[0] + palNum, 2); + LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxCurrSelectionPalIds2[1]), sPartyBoxPalOffsets2[1] + palNum, 2); + LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxCurrSelectionPalIds2[2]), sPartyBoxPalOffsets2[2] + palNum, 2); } else { - LoadPalette(GetPartyMenuPaletteFromBuffer(gUnknown_08615AD0[0]), gUnknown_08615ABA[0] + palNum, 2); - LoadPalette(GetPartyMenuPaletteFromBuffer(gUnknown_08615AD0[1]), gUnknown_08615ABA[1] + palNum, 2); - LoadPalette(GetPartyMenuPaletteFromBuffer(gUnknown_08615AD0[2]), gUnknown_08615ABA[2] + palNum, 2); - LoadPalette(GetPartyMenuPaletteFromBuffer(gUnknown_08615AE5[0]), gUnknown_08615ABD[0] + palNum, 2); - LoadPalette(GetPartyMenuPaletteFromBuffer(gUnknown_08615AE5[1]), gUnknown_08615ABD[1] + palNum, 2); - LoadPalette(GetPartyMenuPaletteFromBuffer(gUnknown_08615AE5[2]), gUnknown_08615ABD[2] + palNum, 2); + LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxMultiPalIds1[0]), sPartyBoxPalOffsets1[0] + palNum, 2); + LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxMultiPalIds1[1]), sPartyBoxPalOffsets1[1] + palNum, 2); + LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxMultiPalIds1[2]), sPartyBoxPalOffsets1[2] + palNum, 2); + LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxMultiPalIds2[0]), sPartyBoxPalOffsets2[0] + palNum, 2); + LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxMultiPalIds2[1]), sPartyBoxPalOffsets2[1] + palNum, 2); + LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxMultiPalIds2[2]), sPartyBoxPalOffsets2[2] + palNum, 2); } } - else if (bitfield & 1) + else if (palFlags & PARTY_PAL_SELECTED) { - LoadPalette(GetPartyMenuPaletteFromBuffer(gUnknown_08615AD6[0]), gUnknown_08615ABA[0] + palNum, 2); - LoadPalette(GetPartyMenuPaletteFromBuffer(gUnknown_08615AD6[1]), gUnknown_08615ABA[1] + palNum, 2); - LoadPalette(GetPartyMenuPaletteFromBuffer(gUnknown_08615AD6[2]), gUnknown_08615ABA[2] + palNum, 2); - LoadPalette(GetPartyMenuPaletteFromBuffer(gUnknown_08615AEB[0]), gUnknown_08615ABD[0] + palNum, 2); - LoadPalette(GetPartyMenuPaletteFromBuffer(gUnknown_08615AEB[1]), gUnknown_08615ABD[1] + palNum, 2); - LoadPalette(GetPartyMenuPaletteFromBuffer(gUnknown_08615AEB[2]), gUnknown_08615ABD[2] + palNum, 2); + LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxCurrSelectionPalIds1[0]), sPartyBoxPalOffsets1[0] + palNum, 2); + LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxCurrSelectionPalIds1[1]), sPartyBoxPalOffsets1[1] + palNum, 2); + LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxCurrSelectionPalIds1[2]), sPartyBoxPalOffsets1[2] + palNum, 2); + LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxCurrSelectionPalIds2[0]), sPartyBoxPalOffsets2[0] + palNum, 2); + LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxCurrSelectionPalIds2[1]), sPartyBoxPalOffsets2[1] + palNum, 2); + LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxCurrSelectionPalIds2[2]), sPartyBoxPalOffsets2[2] + palNum, 2); } else { - LoadPalette(GetPartyMenuPaletteFromBuffer(gUnknown_08615ACD[0]), gUnknown_08615ABA[0] + palNum, 2); - LoadPalette(GetPartyMenuPaletteFromBuffer(gUnknown_08615ACD[1]), gUnknown_08615ABA[1] + palNum, 2); - LoadPalette(GetPartyMenuPaletteFromBuffer(gUnknown_08615ACD[2]), gUnknown_08615ABA[2] + palNum, 2); - LoadPalette(GetPartyMenuPaletteFromBuffer(gUnknown_08615AE2[0]), gUnknown_08615ABD[0] + palNum, 2); - LoadPalette(GetPartyMenuPaletteFromBuffer(gUnknown_08615AE2[1]), gUnknown_08615ABD[1] + palNum, 2); - LoadPalette(GetPartyMenuPaletteFromBuffer(gUnknown_08615AE2[2]), gUnknown_08615ABD[2] + palNum, 2); + LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxEmptySlotPalIds1[0]), sPartyBoxPalOffsets1[0] + palNum, 2); + LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxEmptySlotPalIds1[1]), sPartyBoxPalOffsets1[1] + palNum, 2); + LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxEmptySlotPalIds1[2]), sPartyBoxPalOffsets1[2] + palNum, 2); + LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxEmptySlotPalIds2[0]), sPartyBoxPalOffsets2[0] + palNum, 2); + LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxEmptySlotPalIds2[1]), sPartyBoxPalOffsets2[1] + palNum, 2); + LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxEmptySlotPalIds2[2]), sPartyBoxPalOffsets2[2] + palNum, 2); } } @@ -3382,20 +3508,20 @@ static void DisplayPartyPokemonBarDetail(u8 windowId, const u8 *str, u8 color, c AddTextPrinterParameterized3(windowId, 0, align[0], align[1], sFontColorTable[color], 0, str); } -static void DisplayPartyPokemonNickname(struct Pokemon *mon, struct Struct203CEDC *ptr, u8 c) +static void DisplayPartyPokemonNickname(struct Pokemon *mon, struct PartyMenuBox *menuBox, u8 c) { u8 nickname[POKEMON_NAME_LENGTH + 1]; if (GetMonData(mon, MON_DATA_SPECIES) != SPECIES_NONE) { if (c == 1) - ptr->unk0->unk0(ptr->windowId, ptr->unk0->unk4[0] >> 3, ptr->unk0->unk4[1] >> 3, ptr->unk0->unk4[2] >> 3, ptr->unk0->unk4[3] >> 3, 0); + menuBox->infoRects->blitFunc(menuBox->windowId, menuBox->infoRects->dimensions[0] >> 3, menuBox->infoRects->dimensions[1] >> 3, menuBox->infoRects->dimensions[2] >> 3, menuBox->infoRects->dimensions[3] >> 3, FALSE); GetMonNickname(mon, nickname); - DisplayPartyPokemonBarDetail(ptr->windowId, nickname, 0, ptr->unk0->unk4); + DisplayPartyPokemonBarDetail(menuBox->windowId, nickname, 0, menuBox->infoRects->dimensions); } } -static void DisplayPartyPokemonLevelCheck(struct Pokemon *mon, struct Struct203CEDC *ptr, u8 c) +static void DisplayPartyPokemonLevelCheck(struct Pokemon *mon, struct PartyMenuBox *menuBox, u8 c) { if (GetMonData(mon, MON_DATA_SPECIES) != SPECIES_NONE) { @@ -3403,34 +3529,34 @@ static void DisplayPartyPokemonLevelCheck(struct Pokemon *mon, struct Struct203C if (ailment == AILMENT_NONE || ailment == AILMENT_PKRS) { if (c != 0) - ptr->unk0->unk0(ptr->windowId, ptr->unk0->unk4[4] >> 3, (ptr->unk0->unk4[5] >> 3) + 1, ptr->unk0->unk4[6] >> 3, ptr->unk0->unk4[7] >> 3, 0); + menuBox->infoRects->blitFunc(menuBox->windowId, menuBox->infoRects->dimensions[4] >> 3, (menuBox->infoRects->dimensions[5] >> 3) + 1, menuBox->infoRects->dimensions[6] >> 3, menuBox->infoRects->dimensions[7] >> 3, FALSE); if (c != 2) - DisplayPartyPokemonLevel(GetMonData(mon, MON_DATA_LEVEL), ptr); + DisplayPartyPokemonLevel(GetMonData(mon, MON_DATA_LEVEL), menuBox); } } } -static void DisplayPartyPokemonLevel(u8 level, struct Struct203CEDC *ptr) +static void DisplayPartyPokemonLevel(u8 level, struct PartyMenuBox *menuBox) { ConvertIntToDecimalStringN(gStringVar2, level, STR_CONV_MODE_LEFT_ALIGN, 3); StringCopy(gStringVar1, gText_LevelSymbol); StringAppend(gStringVar1, gStringVar2); - DisplayPartyPokemonBarDetail(ptr->windowId, gStringVar1, 0, &ptr->unk0->unk4[4]); + DisplayPartyPokemonBarDetail(menuBox->windowId, gStringVar1, 0, &menuBox->infoRects->dimensions[4]); } -static void DisplayPartyPokemonGenderNidoranCheck(struct Pokemon *mon, struct Struct203CEDC *ptr, u8 c) +static void DisplayPartyPokemonGenderNidoranCheck(struct Pokemon *mon, struct PartyMenuBox *menuBox, u8 c) { u8 nickname[POKEMON_NAME_LENGTH + 1]; if (c == 1) - ptr->unk0->unk0(ptr->windowId, ptr->unk0->unk4[8] >> 3, (ptr->unk0->unk4[9] >> 3) + 1, ptr->unk0->unk4[10] >> 3, ptr->unk0->unk4[11] >> 3, 0); + menuBox->infoRects->blitFunc(menuBox->windowId, menuBox->infoRects->dimensions[8] >> 3, (menuBox->infoRects->dimensions[9] >> 3) + 1, menuBox->infoRects->dimensions[10] >> 3, menuBox->infoRects->dimensions[11] >> 3, FALSE); GetMonNickname(mon, nickname); - DisplayPartyPokemonGender(GetMonGender(mon), GetMonData(mon, MON_DATA_SPECIES), nickname, ptr); + DisplayPartyPokemonGender(GetMonGender(mon), GetMonData(mon, MON_DATA_SPECIES), nickname, menuBox); } -static void DisplayPartyPokemonGender(u8 gender, u16 species, u8 *nickname, struct Struct203CEDC *ptr) +static void DisplayPartyPokemonGender(u8 gender, u16 species, u8 *nickname, struct PartyMenuBox *menuBox) { - u8 palNum = GetWindowAttribute(ptr->windowId, WINDOW_PALETTE_NUM) * 16; + u8 palNum = GetWindowAttribute(menuBox->windowId, WINDOW_PALETTE_NUM) * 16; if (species == SPECIES_NONE) return; @@ -3439,108 +3565,108 @@ static void DisplayPartyPokemonGender(u8 gender, u16 species, u8 *nickname, stru switch (gender) { case MON_MALE: - LoadPalette(GetPartyMenuPaletteFromBuffer(gUnknown_08615AC3[0]), gUnknown_08615AB6[0] + palNum, 2); - LoadPalette(GetPartyMenuPaletteFromBuffer(gUnknown_08615AC3[1]), gUnknown_08615AB6[1] + palNum, 2); - DisplayPartyPokemonBarDetail(ptr->windowId, gText_MaleSymbol, 2, &ptr->unk0->unk4[8]); + LoadPalette(GetPartyMenuPalBufferPtr(sGenderMalePalIds[0]), sGenderPalOffsets[0] + palNum, 2); + LoadPalette(GetPartyMenuPalBufferPtr(sGenderMalePalIds[1]), sGenderPalOffsets[1] + palNum, 2); + DisplayPartyPokemonBarDetail(menuBox->windowId, gText_MaleSymbol, 2, &menuBox->infoRects->dimensions[8]); break; case MON_FEMALE: - LoadPalette(GetPartyMenuPaletteFromBuffer(gUnknown_08615AC5[0]), gUnknown_08615AB6[0] + palNum, 2); - LoadPalette(GetPartyMenuPaletteFromBuffer(gUnknown_08615AC5[1]), gUnknown_08615AB6[1] + palNum, 2); - DisplayPartyPokemonBarDetail(ptr->windowId, gText_FemaleSymbol, 2, &ptr->unk0->unk4[8]); + LoadPalette(GetPartyMenuPalBufferPtr(sGenderFemalePalIds[0]), sGenderPalOffsets[0] + palNum, 2); + LoadPalette(GetPartyMenuPalBufferPtr(sGenderFemalePalIds[1]), sGenderPalOffsets[1] + palNum, 2); + DisplayPartyPokemonBarDetail(menuBox->windowId, gText_FemaleSymbol, 2, &menuBox->infoRects->dimensions[8]); break; } } -static void DisplayPartyPokemonHPCheck(struct Pokemon *mon, struct Struct203CEDC *ptr, u8 c) +static void DisplayPartyPokemonHPCheck(struct Pokemon *mon, struct PartyMenuBox *menuBox, u8 c) { if (GetMonData(mon, MON_DATA_SPECIES) != SPECIES_NONE) { if (c != 0) - ptr->unk0->unk0(ptr->windowId, ptr->unk0->unk4[12] >> 3, (ptr->unk0->unk4[13] >> 3) + 1, ptr->unk0->unk4[14] >> 3, ptr->unk0->unk4[15] >> 3, 0); + menuBox->infoRects->blitFunc(menuBox->windowId, menuBox->infoRects->dimensions[12] >> 3, (menuBox->infoRects->dimensions[13] >> 3) + 1, menuBox->infoRects->dimensions[14] >> 3, menuBox->infoRects->dimensions[15] >> 3, FALSE); if (c != 2) - DisplayPartyPokemonHP(GetMonData(mon, MON_DATA_HP), ptr); + DisplayPartyPokemonHP(GetMonData(mon, MON_DATA_HP), menuBox); } } -static void DisplayPartyPokemonHP(u16 hp, struct Struct203CEDC *ptr) +static void DisplayPartyPokemonHP(u16 hp, struct PartyMenuBox *menuBox) { u8 *strOut = ConvertIntToDecimalStringN(gStringVar1, hp, STR_CONV_MODE_RIGHT_ALIGN, 3); strOut[0] = CHAR_SLASH; strOut[1] = EOS; - DisplayPartyPokemonBarDetail(ptr->windowId, gStringVar1, 0, &ptr->unk0->unk4[12]); + DisplayPartyPokemonBarDetail(menuBox->windowId, gStringVar1, 0, &menuBox->infoRects->dimensions[12]); } -static void DisplayPartyPokemonMaxHPCheck(struct Pokemon *mon, struct Struct203CEDC *ptr, u8 c) +static void DisplayPartyPokemonMaxHPCheck(struct Pokemon *mon, struct PartyMenuBox *menuBox, u8 c) { if (GetMonData(mon, MON_DATA_SPECIES) != SPECIES_NONE) { if (c != 0) - ptr->unk0->unk0(ptr->windowId, (ptr->unk0->unk4[16] >> 3) + 1, (ptr->unk0->unk4[17] >> 3) + 1, ptr->unk0->unk4[18] >> 3, ptr->unk0->unk4[19] >> 3, 0); + menuBox->infoRects->blitFunc(menuBox->windowId, (menuBox->infoRects->dimensions[16] >> 3) + 1, (menuBox->infoRects->dimensions[17] >> 3) + 1, menuBox->infoRects->dimensions[18] >> 3, menuBox->infoRects->dimensions[19] >> 3, FALSE); if (c != 2) - DisplayPartyPokemonMaxHP(GetMonData(mon, MON_DATA_MAX_HP), ptr); + DisplayPartyPokemonMaxHP(GetMonData(mon, MON_DATA_MAX_HP), menuBox); } } -static void DisplayPartyPokemonMaxHP(u16 maxhp, struct Struct203CEDC *ptr) +static void DisplayPartyPokemonMaxHP(u16 maxhp, struct PartyMenuBox *menuBox) { ConvertIntToDecimalStringN(gStringVar2, maxhp, STR_CONV_MODE_RIGHT_ALIGN, 3); StringCopy(gStringVar1, gText_Slash); StringAppend(gStringVar1, gStringVar2); - DisplayPartyPokemonBarDetail(ptr->windowId, gStringVar1, 0, &ptr->unk0->unk4[16]); + DisplayPartyPokemonBarDetail(menuBox->windowId, gStringVar1, 0, &menuBox->infoRects->dimensions[16]); } -static void DisplayPartyPokemonHPBarCheck(struct Pokemon *mon, struct Struct203CEDC *ptr) +static void DisplayPartyPokemonHPBarCheck(struct Pokemon *mon, struct PartyMenuBox *menuBox) { if (GetMonData(mon, MON_DATA_SPECIES) != SPECIES_NONE) - DisplayPartyPokemonHPBar(GetMonData(mon, MON_DATA_HP), GetMonData(mon, MON_DATA_MAX_HP), ptr); + DisplayPartyPokemonHPBar(GetMonData(mon, MON_DATA_HP), GetMonData(mon, MON_DATA_MAX_HP), menuBox); } -static void DisplayPartyPokemonHPBar(u16 hp, u16 maxhp, struct Struct203CEDC *ptr) +static void DisplayPartyPokemonHPBar(u16 hp, u16 maxhp, struct PartyMenuBox *menuBox) { - u8 palNum = GetWindowAttribute(ptr->windowId, WINDOW_PALETTE_NUM) * 16; + u8 palNum = GetWindowAttribute(menuBox->windowId, WINDOW_PALETTE_NUM) * 16; u8 hpFraction; switch (GetHPBarLevel(hp, maxhp)) { case HP_BAR_GREEN: case HP_BAR_FULL: - LoadPalette(GetPartyMenuPaletteFromBuffer(gUnknown_08615AC7[0]), gUnknown_08615AB8[0] + palNum, 2); - LoadPalette(GetPartyMenuPaletteFromBuffer(gUnknown_08615AC7[1]), gUnknown_08615AB8[1] + palNum, 2); + LoadPalette(GetPartyMenuPalBufferPtr(sHPBarGreenPalIds[0]), sHPBarPalOffsets[0] + palNum, 2); + LoadPalette(GetPartyMenuPalBufferPtr(sHPBarGreenPalIds[1]), sHPBarPalOffsets[1] + palNum, 2); break; case HP_BAR_YELLOW: - LoadPalette(GetPartyMenuPaletteFromBuffer(gUnknown_08615AC9[0]), gUnknown_08615AB8[0] + palNum, 2); - LoadPalette(GetPartyMenuPaletteFromBuffer(gUnknown_08615AC9[1]), gUnknown_08615AB8[1] + palNum, 2); + LoadPalette(GetPartyMenuPalBufferPtr(sHPBarYellowPalIds[0]), sHPBarPalOffsets[0] + palNum, 2); + LoadPalette(GetPartyMenuPalBufferPtr(sHPBarYellowPalIds[1]), sHPBarPalOffsets[1] + palNum, 2); break; default: - LoadPalette(GetPartyMenuPaletteFromBuffer(gUnknown_08615ACB[0]), gUnknown_08615AB8[0] + palNum, 2); - LoadPalette(GetPartyMenuPaletteFromBuffer(gUnknown_08615ACB[1]), gUnknown_08615AB8[1] + palNum, 2); + LoadPalette(GetPartyMenuPalBufferPtr(sHPBarRedPalIds[0]), sHPBarPalOffsets[0] + palNum, 2); + LoadPalette(GetPartyMenuPalBufferPtr(sHPBarRedPalIds[1]), sHPBarPalOffsets[1] + palNum, 2); break; } - hpFraction = GetScaledHPFraction(hp, maxhp, ptr->unk0->unk4[22]); - FillWindowPixelRect(ptr->windowId, gUnknown_08615AB8[1], ptr->unk0->unk4[20], ptr->unk0->unk4[21], hpFraction, 1); - FillWindowPixelRect(ptr->windowId, gUnknown_08615AB8[0], ptr->unk0->unk4[20], ptr->unk0->unk4[21] + 1, hpFraction, 2); - if (hpFraction != ptr->unk0->unk4[22]) + hpFraction = GetScaledHPFraction(hp, maxhp, menuBox->infoRects->dimensions[22]); + FillWindowPixelRect(menuBox->windowId, sHPBarPalOffsets[1], menuBox->infoRects->dimensions[20], menuBox->infoRects->dimensions[21], hpFraction, 1); + FillWindowPixelRect(menuBox->windowId, sHPBarPalOffsets[0], menuBox->infoRects->dimensions[20], menuBox->infoRects->dimensions[21] + 1, hpFraction, 2); + if (hpFraction != menuBox->infoRects->dimensions[22]) { // This appears to be an alternating fill - FillWindowPixelRect(ptr->windowId, 0x0D, ptr->unk0->unk4[20] + hpFraction, ptr->unk0->unk4[21], ptr->unk0->unk4[22] - hpFraction, 1); - FillWindowPixelRect(ptr->windowId, 0x02, ptr->unk0->unk4[20] + hpFraction, ptr->unk0->unk4[21] + 1, ptr->unk0->unk4[22] - hpFraction, 2); + FillWindowPixelRect(menuBox->windowId, 0x0D, menuBox->infoRects->dimensions[20] + hpFraction, menuBox->infoRects->dimensions[21], menuBox->infoRects->dimensions[22] - hpFraction, 1); + FillWindowPixelRect(menuBox->windowId, 0x02, menuBox->infoRects->dimensions[20] + hpFraction, menuBox->infoRects->dimensions[21] + 1, menuBox->infoRects->dimensions[22] - hpFraction, 2); } - CopyWindowToVram(ptr->windowId, 2); + CopyWindowToVram(menuBox->windowId, 2); } -static void DisplayPartyPokemonSelectionText(u8 stringID, struct Struct203CEDC *ptr, u8 c) +static void DisplayPartyPokemonDescriptionText(u8 stringID, struct PartyMenuBox *menuBox, u8 c) { - if (c != 0) + if (c) { - int unk = ((ptr->unk0->unk1C % 8) + ptr->unk0->unk1E + 7) / 8; - int unk2 = ((ptr->unk0->unk1D % 8) + ptr->unk0->unk1F + 7) / 8; - ptr->unk0->unk0(ptr->windowId, ptr->unk0->unk1C >> 3, ptr->unk0->unk1D >> 3, unk, unk2, 1); + int width = ((menuBox->infoRects->descTextLeft % 8) + menuBox->infoRects->descTextWidth + 7) / 8; + int height = ((menuBox->infoRects->descTextTop % 8) + menuBox->infoRects->descTextHeight + 7) / 8; + menuBox->infoRects->blitFunc(menuBox->windowId, menuBox->infoRects->descTextLeft >> 3, menuBox->infoRects->descTextTop >> 3, width, height, TRUE); } if (c != 2) - AddTextPrinterParameterized3(ptr->windowId, 1, ptr->unk0->unk1C, ptr->unk0->unk1D, sFontColorTable[0], 0, sSelectionStringTable[stringID]); + AddTextPrinterParameterized3(menuBox->windowId, 1, menuBox->infoRects->descTextLeft, menuBox->infoRects->descTextTop, sFontColorTable[0], 0, sDescriptionStringTable[stringID]); } static void PartyMenuRemoveWindow(u8 *ptr) @@ -3556,41 +3682,41 @@ static void PartyMenuRemoveWindow(u8 *ptr) void DisplayPartyMenuStdMessage(u32 stringID) { - u8 *windowPtr = &gUnknown_0203CEC4->windowId[1]; + u8 *windowPtr = &sPartyMenuInternal->windowId[1]; if (*windowPtr != 0xFF) PartyMenuRemoveWindow(windowPtr); - if (stringID != 0x7F) + if (stringID != PARTY_MSG_NONE) { switch (stringID) { - case 21: - *windowPtr = AddWindow(&gUnknown_08615928); + case PARTY_MSG_DO_WHAT_WITH_MON: + *windowPtr = AddWindow(&sDoWhatWithMonMsgWindowTemplate); break; - case 24: - *windowPtr = AddWindow(&gUnknown_08615930); + case PARTY_MSG_DO_WHAT_WITH_ITEM: + *windowPtr = AddWindow(&sDoWhatWithItemMsgWindowTemplate); break; - case 25: - *windowPtr = AddWindow(&gUnknown_08615938); + case PARTY_MSG_DO_WHAT_WITH_MAIL: + *windowPtr = AddWindow(&sDoWhatWithMailMsgWindowTemplate); break; - case 22: - case 23: - *windowPtr = AddWindow(&gUnknown_08615940); + case PARTY_MSG_RESTORE_WHICH_MOVE: + case PARTY_MSG_BOOST_PP_WHICH_MOVE: + *windowPtr = AddWindow(&sWhichMoveMsgWindowTemplate); break; - case 26: - *windowPtr = AddWindow(&gUnknown_08615948); + case PARTY_MSG_ALREADY_HOLDING_ONE: + *windowPtr = AddWindow(&sAlreadyHoldingOneMsgWindowTemplate); break; default: - *windowPtr = AddWindow(&gUnknown_08615920); + *windowPtr = AddWindow(&sDefaultPartyMsgWindowTemplate); break; } - if (stringID == 0) + if (stringID == PARTY_MSG_CHOOSE_MON) { - if (gUnknown_0203CEC4->unk8_0) - stringID = 2; + if (sPartyMenuInternal->chooseHalf) + stringID = PARTY_MSG_CHOOSE_MON_AND_CONFIRM; else if (sub_81B314C() == FALSE) - stringID = 1; + stringID = PARTY_MSG_CHOOSE_MON_OR_CANCEL; } DrawStdFrameWithCustomTileAndPalette(*windowPtr, FALSE, 0x4F, 0xD); StringExpandPlaceholders(gStringVar4, sActionStringTable[stringID]); @@ -3599,65 +3725,66 @@ void DisplayPartyMenuStdMessage(u32 stringID) } } +// TOOD: TRUE if should be forced to choose mon, but why when nummons > 1 static bool8 sub_81B314C(void) { struct Pokemon *party = gPlayerParty; u8 i; - u8 j = 0; + u8 numAliveMons = 0; - if (gUnknown_0203CEC8.unkB == 1) + if (gPartyMenu.action == PARTY_ACTION_SEND_OUT) return TRUE; - for (i = 0; i < 6; i++) + for (i = 0; i < PARTY_SIZE; i++) { if (GetMonData(&party[i], MON_DATA_SPECIES) != SPECIES_NONE && (GetMonData(&party[i], MON_DATA_HP) != 0 || GetMonData(&party[i], MON_DATA_IS_EGG))) - j++; - if (j > 1) + numAliveMons++; + if (numAliveMons > 1) return TRUE; } return FALSE; } -static u8 sub_81B31B0(u8 a) +static u8 DisplaySelectionWindow(u8 windowType) { struct WindowTemplate window; u8 cursorDimension; u8 fontAttribute; u8 i; - switch (a) + switch (windowType) { - case 0: - SetWindowTemplateFields(&window, 2, 19, 19 - (gUnknown_0203CEC4->listSize * 2), 10, gUnknown_0203CEC4->listSize * 2, 14, 0x2E9); + case SELECTWINDOW_ACTIONS: + SetWindowTemplateFields(&window, 2, 19, 19 - (sPartyMenuInternal->numActions * 2), 10, sPartyMenuInternal->numActions * 2, 14, 0x2E9); break; - case 1: - window = gUnknown_08615950; + case SELECTWINDOW_ITEM: + window = sItemGiveTakeWindowTemplate; break; - case 2: - window = gUnknown_08615958; + case SELECTWINDOW_MAIL: + window = sMailReadTakeWindowTemplate; break; - default: - window = gUnknown_08615960; + default: // SELECTWINDOW_MOVES + window = sMoveSelectWindowTemplate; break; } - gUnknown_0203CEC4->windowId[0] = AddWindow(&window); - DrawStdFrameWithCustomTileAndPalette(gUnknown_0203CEC4->windowId[0], FALSE, 0x4F, 13); - if (a == 3) - return gUnknown_0203CEC4->windowId[0]; + sPartyMenuInternal->windowId[0] = AddWindow(&window); + DrawStdFrameWithCustomTileAndPalette(sPartyMenuInternal->windowId[0], FALSE, 0x4F, 13); + if (windowType == 3) + return sPartyMenuInternal->windowId[0]; cursorDimension = GetMenuCursorDimensionByFont(1, 0); fontAttribute = GetFontAttribute(1, 2); - for (i = 0; i < gUnknown_0203CEC4->listSize; i++) + for (i = 0; i < sPartyMenuInternal->numActions; i++) { - u8 unk = (gUnknown_0203CEC4->actions[i] >= MENU_FIELD_MOVES) ? 4 : 3; - AddTextPrinterParameterized4(gUnknown_0203CEC4->windowId[0], 1, cursorDimension, (i * 16) + 1, fontAttribute, 0, sFontColorTable[unk], 0, sCursorOptions[gUnknown_0203CEC4->actions[i]].text); + u8 unk = (sPartyMenuInternal->actions[i] >= MENU_FIELD_MOVES) ? 4 : 3; + AddTextPrinterParameterized4(sPartyMenuInternal->windowId[0], 1, cursorDimension, (i * 16) + 1, fontAttribute, 0, sFontColorTable[unk], 0, sCursorOptions[sPartyMenuInternal->actions[i]].text); } - InitMenuInUpperLeftCorner(gUnknown_0203CEC4->windowId[0], gUnknown_0203CEC4->listSize, 0, 1); + InitMenuInUpperLeftCorner(sPartyMenuInternal->windowId[0], sPartyMenuInternal->numActions, 0, 1); schedule_bg_copy_tilemap_to_vram(2); - return gUnknown_0203CEC4->windowId[0]; + return sPartyMenuInternal->windowId[0]; } static void PartyMenuPrintText(const u8 *text) @@ -3667,53 +3794,55 @@ static void PartyMenuPrintText(const u8 *text) AddTextPrinterParameterized2(6, 1, text, GetPlayerTextSpeedDelay(), 0, 2, 1, 3); } -static void sub_81B334C(void) +static void PartyMenuDisplayYesNoMenu(void) { - CreateYesNoMenu(&gUnknown_08615968, 0x4F, 13, 0); + CreateYesNoMenu(&sPartyMenuYesNoWindowTemplate, 0x4F, 13, 0); } -static u8 sub_81B3364(void) +static u8 CreateLevelUpStatsWindow(void) { - gUnknown_0203CEC4->windowId[0] = AddWindow(&gUnknown_08615970); - DrawStdFrameWithCustomTileAndPalette(gUnknown_0203CEC4->windowId[0], FALSE, 0x4F, 13); - return gUnknown_0203CEC4->windowId[0]; + sPartyMenuInternal->windowId[0] = AddWindow(&sLevelUpStatsWindowTemplate); + DrawStdFrameWithCustomTileAndPalette(sPartyMenuInternal->windowId[0], FALSE, 0x4F, 13); + return sPartyMenuInternal->windowId[0]; } -static void sub_81B3394(void) +static void RemoveLevelUpStatsWindow(void) { - ClearWindowTilemap(gUnknown_0203CEC4->windowId[0]); - PartyMenuRemoveWindow(&gUnknown_0203CEC4->windowId[0]); + ClearWindowTilemap(sPartyMenuInternal->windowId[0]); + PartyMenuRemoveWindow(&sPartyMenuInternal->windowId[0]); } -static void sub_81B33B4(struct Pokemon *mons, u8 slotId, u8 b) +static void SetPartyMonSelectionActions(struct Pokemon *mons, u8 slotId, u8 action) { u8 i; - if (b == 0) + if (action == ACTIONS_NONE) { - CreateActionList(mons, slotId); + SetPartyMonFieldSelectionActions(mons, slotId); } else { - gUnknown_0203CEC4->listSize = sListSizeTable[b]; - for (i = 0; i < gUnknown_0203CEC4->listSize; i++) - gUnknown_0203CEC4->actions[i] = sActionTable[b][i]; + sPartyMenuInternal->numActions = sPartyMenuActionCounts[action]; + for (i = 0; i < sPartyMenuInternal->numActions; i++) + sPartyMenuInternal->actions[i] = sPartyMenuActions[action][i]; } } -static void CreateActionList(struct Pokemon *mons, u8 slotId) +static void SetPartyMonFieldSelectionActions(struct Pokemon *mons, u8 slotId) { u8 i, j; - gUnknown_0203CEC4->listSize = 0; - AppendToList(gUnknown_0203CEC4->actions, &gUnknown_0203CEC4->listSize, MENU_SUMMARY); + sPartyMenuInternal->numActions = 0; + AppendToList(sPartyMenuInternal->actions, &sPartyMenuInternal->numActions, MENU_SUMMARY); + + // Add field moves to action list for (i = 0; i < MAX_MON_MOVES; i++) { for (j = 0; sFieldMoves[j] != FIELD_MOVE_TERMINATOR; j++) { if (GetMonData(&mons[slotId], i + MON_DATA_MOVE1) == sFieldMoves[j]) { - AppendToList(gUnknown_0203CEC4->actions, &gUnknown_0203CEC4->listSize, j + MENU_FIELD_MOVES); + AppendToList(sPartyMenuInternal->actions, &sPartyMenuInternal->numActions, j + MENU_FIELD_MOVES); break; } } @@ -3722,118 +3851,124 @@ static void CreateActionList(struct Pokemon *mons, u8 slotId) if (!InBattlePike()) { if (GetMonData(&mons[1], MON_DATA_SPECIES) != SPECIES_NONE) - AppendToList(gUnknown_0203CEC4->actions, &gUnknown_0203CEC4->listSize, MENU_SWITCH); + AppendToList(sPartyMenuInternal->actions, &sPartyMenuInternal->numActions, MENU_SWITCH); if (ItemIsMail(GetMonData(&mons[slotId], MON_DATA_HELD_ITEM))) - AppendToList(gUnknown_0203CEC4->actions, &gUnknown_0203CEC4->listSize, MENU_MAIL); + AppendToList(sPartyMenuInternal->actions, &sPartyMenuInternal->numActions, MENU_MAIL); else - AppendToList(gUnknown_0203CEC4->actions, &gUnknown_0203CEC4->listSize, MENU_ITEM); + AppendToList(sPartyMenuInternal->actions, &sPartyMenuInternal->numActions, MENU_ITEM); } - AppendToList(gUnknown_0203CEC4->actions, &gUnknown_0203CEC4->listSize, MENU_CANCEL1); + AppendToList(sPartyMenuInternal->actions, &sPartyMenuInternal->numActions, MENU_CANCEL1); } -static u8 sub_81B353C(struct Pokemon *mon) +static u8 GetPartyMenuActionsType(struct Pokemon *mon) { - u32 returnVar; + u32 actionType; - switch (gUnknown_0203CEC8.unk8_0) + switch (gPartyMenu.menuType) { - case 0: + case PARTY_MENU_TYPE_FIELD: if (InMultiBattleRoom() == TRUE || GetMonData(mon, MON_DATA_IS_EGG)) - returnVar = 1; + actionType = ACTIONS_SWITCH; else - returnVar = 0; + actionType = ACTIONS_NONE; // actions populated by SetPartyMonFieldSelectionActions break; - case 1: - returnVar = sub_81B8A2C(mon); + case PARTY_MENU_TYPE_IN_BATTLE: + actionType = GetPartyMenuActionsTypeInBattle(mon); break; - case 4: - switch (sub_81B856C(gUnknown_0203CEC8.slotId)) + case PARTY_MENU_TYPE_CHOOSE_HALF: + switch (GetPartySlotEntryStatus(gPartyMenu.slotId)) { - default: - returnVar = 7; + default: // Not eligible + actionType = ACTIONS_SUMMARY_ONLY; break; - case 0: - returnVar = 4; + case 0: // Eligible + actionType = ACTIONS_ENTER; break; - case 1: - returnVar = 5; + case 1: // Already selected + actionType = ACTIONS_NO_ENTRY; break; } break; - case 6: - returnVar = (GetMonData(mon, MON_DATA_IS_EGG)) ? 7 : 6; + case PARTY_MENU_TYPE_DAYCARE: + actionType = (GetMonData(mon, MON_DATA_IS_EGG)) ? ACTIONS_SUMMARY_ONLY : ACTIONS_STORE; break; - case 8: - returnVar = 10; + case PARTY_MENU_TYPE_UNION_ROOM_REGISTER: + actionType = ACTIONS_REGISTER; break; - case 9: - returnVar = 11; + case PARTY_MENU_TYPE_UNION_ROOM_TRADE: + actionType = ACTIONS_TRADE; break; - case 10: - returnVar = 12; + case PARTY_MENU_TYPE_SPIN_TRADE: + actionType = ACTIONS_SPIN_TRADE; break; - case 12: - returnVar = 13; + case PARTY_MENU_TYPE_STORE_PYRAMID_HELD_ITEMS: + actionType = ACTIONS_TAKEITEM_TOSS; break; + // The following have no selection actions because they exit immediately upon selection + // PARTY_MENU_TYPE_CONTEST + // PARTY_MENU_TYPE_CHOOSE_MON + // PARTY_MENU_TYPE_IN_MULTI_BATTLE ?? TODO + // PARTY_MENU_TYPE_MOVE_RELEARNER + // PARTY_MENU_TYPE_MINIGAME default: - returnVar = 0; + actionType = ACTIONS_NONE; break; } - return returnVar; + return actionType; } -static bool8 sub_81B3608(u8 taskId) +static bool8 CreateSelectionWindow(u8 taskId) { - struct Pokemon *mon = &gPlayerParty[gUnknown_0203CEC8.slotId]; + struct Pokemon *mon = &gPlayerParty[gPartyMenu.slotId]; u16 item; GetMonNickname(mon, gStringVar1); - PartyMenuRemoveWindow(&gUnknown_0203CEC4->windowId[1]); - if (gUnknown_0203CEC8.unk8_0 != 12) + PartyMenuRemoveWindow(&sPartyMenuInternal->windowId[1]); + if (gPartyMenu.menuType != PARTY_MENU_TYPE_STORE_PYRAMID_HELD_ITEMS) { - sub_81B33B4(gPlayerParty, gUnknown_0203CEC8.slotId, sub_81B353C(mon)); - sub_81B31B0(0); - DisplayPartyMenuStdMessage(21); + SetPartyMonSelectionActions(gPlayerParty, gPartyMenu.slotId, GetPartyMenuActionsType(mon)); + DisplaySelectionWindow(SELECTWINDOW_ACTIONS); + DisplayPartyMenuStdMessage(PARTY_MSG_DO_WHAT_WITH_MON); } else { item = GetMonData(mon, MON_DATA_HELD_ITEM); if (item != ITEM_NONE) { - sub_81B33B4(gPlayerParty, gUnknown_0203CEC8.slotId, sub_81B353C(mon)); - sub_81B31B0(1); + SetPartyMonSelectionActions(gPlayerParty, gPartyMenu.slotId, GetPartyMenuActionsType(mon)); + DisplaySelectionWindow(SELECTWINDOW_ITEM); CopyItemName(item, gStringVar2); - DisplayPartyMenuStdMessage(26); + DisplayPartyMenuStdMessage(PARTY_MSG_ALREADY_HOLDING_ONE); } else { StringExpandPlaceholders(gStringVar4, gText_PkmnNotHolding); - DisplayPartyMenuMessage(gStringVar4, 1); + DisplayPartyMenuMessage(gStringVar4, TRUE); schedule_bg_copy_tilemap_to_vram(2); - gTasks[taskId].func = sub_81B469C; + gTasks[taskId].func = Task_UpdateHeldItemSprite; return FALSE; } } return TRUE; } -static void sub_81B36FC(u8 taskId) +static void Task_TryCreateSelectionWindow(u8 taskId) { - if (sub_81B3608(taskId)) + if (CreateSelectionWindow(taskId)) { gTasks[taskId].data[0] = 0xFF; - gTasks[taskId].func = HandleMenuInput; + gTasks[taskId].func = Task_HandleSelectionMenuInput; } } -static void HandleMenuInput(u8 taskId) +static void Task_HandleSelectionMenuInput(u8 taskId) { if (!gPaletteFade.active && sub_81221EC() != TRUE) { s8 input; s16 *data = gTasks[taskId].data; - if (gUnknown_0203CEC4->listSize <= 3) + if (sPartyMenuInternal->numActions <= 3) input = Menu_ProcessInputNoWrapAround_other(); else input = ProcessMenuInput_other(); @@ -3845,12 +3980,12 @@ static void HandleMenuInput(u8 taskId) break; case MENU_B_PRESSED: PlaySE(SE_SELECT); - PartyMenuRemoveWindow(&gUnknown_0203CEC4->windowId[2]); - sCursorOptions[gUnknown_0203CEC4->actions[gUnknown_0203CEC4->listSize - 1]].func(taskId); + PartyMenuRemoveWindow(&sPartyMenuInternal->windowId[2]); + sCursorOptions[sPartyMenuInternal->actions[sPartyMenuInternal->numActions - 1]].func(taskId); break; default: - PartyMenuRemoveWindow(&gUnknown_0203CEC4->windowId[2]); - sCursorOptions[gUnknown_0203CEC4->actions[input]].func(taskId); + PartyMenuRemoveWindow(&sPartyMenuInternal->windowId[2]); + sCursorOptions[sPartyMenuInternal->actions[input]].func(taskId); break; } } @@ -3859,209 +3994,229 @@ static void HandleMenuInput(u8 taskId) static void CursorCb_Summary(u8 taskId) { PlaySE(SE_SELECT); - gUnknown_0203CEC4->exitCallback = sub_81B3828; + sPartyMenuInternal->exitCallback = CB2_ShowPokemonSummaryScreen; Task_ClosePartyMenu(taskId); } -static void sub_81B3828(void) +static void CB2_ShowPokemonSummaryScreen(void) { - if (gUnknown_0203CEC8.unk8_0 == 1) + if (gPartyMenu.menuType == PARTY_MENU_TYPE_IN_BATTLE) { - pokemon_change_order(); - ShowPokemonSummaryScreen(PSS_MODE_UNK1, gPlayerParty, gUnknown_0203CEC8.slotId, gPlayerPartyCount - 1, sub_81B3894); + UpdatePartyToBattleOrder(); + ShowPokemonSummaryScreen(PSS_MODE_UNK1, gPlayerParty, gPartyMenu.slotId, gPlayerPartyCount - 1, CB2_ReturnToPartyMenuFromSummaryScreen); } else { - ShowPokemonSummaryScreen(PSS_MODE_NORMAL, gPlayerParty, gUnknown_0203CEC8.slotId, gPlayerPartyCount - 1, sub_81B3894); + ShowPokemonSummaryScreen(PSS_MODE_NORMAL, gPlayerParty, gPartyMenu.slotId, gPlayerPartyCount - 1, CB2_ReturnToPartyMenuFromSummaryScreen); } } -static void sub_81B3894(void) +static void CB2_ReturnToPartyMenuFromSummaryScreen(void) { gPaletteFade.bufferTransferDisabled = TRUE; - gUnknown_0203CEC8.slotId = gLastViewedMonIndex; - InitPartyMenu(gUnknown_0203CEC8.unk8_0, 0xFF, gUnknown_0203CEC8.unkB, 1, 21, sub_81B36FC, gUnknown_0203CEC8.exitCallback); + gPartyMenu.slotId = gLastViewedMonIndex; + InitPartyMenu(gPartyMenu.menuType, KEEP_PARTY_LAYOUT, gPartyMenu.action, TRUE, PARTY_MSG_DO_WHAT_WITH_MON, Task_TryCreateSelectionWindow, gPartyMenu.exitCallback); } static void CursorCb_Switch(u8 taskId) { PlaySE(SE_SELECT); - gUnknown_0203CEC8.unkB = 8; - PartyMenuRemoveWindow(&gUnknown_0203CEC4->windowId[1]); - PartyMenuRemoveWindow(&gUnknown_0203CEC4->windowId[0]); - DisplayPartyMenuStdMessage(3); - sub_81B0FCC(gUnknown_0203CEC8.slotId, 1); - gUnknown_0203CEC8.unkA = gUnknown_0203CEC8.slotId; - gTasks[taskId].func = sub_81B1370; + gPartyMenu.action = PARTY_ACTION_SWITCH; + PartyMenuRemoveWindow(&sPartyMenuInternal->windowId[1]); + PartyMenuRemoveWindow(&sPartyMenuInternal->windowId[0]); + DisplayPartyMenuStdMessage(PARTY_MSG_MOVE_TO_WHERE); + AnimatePartySlot(gPartyMenu.slotId, 1); + gPartyMenu.slotId2 = gPartyMenu.slotId; + gTasks[taskId].func = Task_HandleChooseMonInput; } -static void sub_81B3938(u8 taskId) +#define tSlot1Left data[0] +#define tSlot1Top data[1] +#define tSlot1Width data[2] +#define tSlot1Height data[3] +#define tSlot2Left data[4] +#define tSlot2Top data[5] +#define tSlot2Width data[6] +#define tSlot2Height data[7] +#define tSlot1Offset data[8] +#define tSlot2Offset data[9] +#define tSlot1SlideDir data[10] +#define tSlot2SlideDir data[11] + +static void SwitchSelectedMons(u8 taskId) { s16 *data = gTasks[taskId].data; u8 windowIds[2]; - if (gUnknown_0203CEC8.unkA == gUnknown_0203CEC8.slotId) + if (gPartyMenu.slotId2 == gPartyMenu.slotId) { - sub_81B407C(taskId); + FinishTwoMonAction(taskId); } else { - windowIds[0] = gUnknown_0203CEDC[gUnknown_0203CEC8.slotId].windowId; - data[0] = GetWindowAttribute(windowIds[0], WINDOW_TILEMAP_LEFT); - data[1] = GetWindowAttribute(windowIds[0], WINDOW_TILEMAP_TOP); - data[2] = GetWindowAttribute(windowIds[0], WINDOW_WIDTH); - data[3] = GetWindowAttribute(windowIds[0], WINDOW_HEIGHT); - data[8] = 0; - if (data[2] == 10) - data[10] = -1; + // Initialize switching party mons slide animation + windowIds[0] = sPartyMenuBoxes[gPartyMenu.slotId].windowId; + tSlot1Left = GetWindowAttribute(windowIds[0], WINDOW_TILEMAP_LEFT); + tSlot1Top = GetWindowAttribute(windowIds[0], WINDOW_TILEMAP_TOP); + tSlot1Width = GetWindowAttribute(windowIds[0], WINDOW_WIDTH); + tSlot1Height = GetWindowAttribute(windowIds[0], WINDOW_HEIGHT); + tSlot1Offset = 0; + if (tSlot1Width == 10) + tSlot1SlideDir = -1; else - data[10] = 1; - windowIds[1] = gUnknown_0203CEDC[gUnknown_0203CEC8.unkA].windowId; - data[4] = GetWindowAttribute(windowIds[1], WINDOW_TILEMAP_LEFT); - data[5] = GetWindowAttribute(windowIds[1], WINDOW_TILEMAP_TOP); - data[6] = GetWindowAttribute(windowIds[1], WINDOW_WIDTH); - data[7] = GetWindowAttribute(windowIds[1], WINDOW_HEIGHT); - data[9] = 0; - if (data[6] == 10) - data[11] = -1; + tSlot1SlideDir = 1; + windowIds[1] = sPartyMenuBoxes[gPartyMenu.slotId2].windowId; + tSlot2Left = GetWindowAttribute(windowIds[1], WINDOW_TILEMAP_LEFT); + tSlot2Top = GetWindowAttribute(windowIds[1], WINDOW_TILEMAP_TOP); + tSlot2Width = GetWindowAttribute(windowIds[1], WINDOW_WIDTH); + tSlot2Height = GetWindowAttribute(windowIds[1], WINDOW_HEIGHT); + tSlot2Offset = 0; + if (tSlot2Width == 10) + tSlot2SlideDir = -1; else - data[11] = 1; - gUnknown_0203CEF0 = Alloc(data[2] * (data[3] << 1)); - gUnknown_0203CEF4 = Alloc(data[6] * (data[7] << 1)); - sub_8199CBC(0, gUnknown_0203CEF0, data[0], data[1], data[2], data[3]); - sub_8199CBC(0, gUnknown_0203CEF4, data[4], data[5], data[6], data[7]); + tSlot2SlideDir = 1; + sSlot1TilemapBuffer = Alloc(tSlot1Width * (tSlot1Height << 1)); + sSlot2TilemapBuffer = Alloc(tSlot2Width * (tSlot2Height << 1)); + CopyToBufferFromBgTilemap(0, sSlot1TilemapBuffer, tSlot1Left, tSlot1Top, tSlot1Width, tSlot1Height); + CopyToBufferFromBgTilemap(0, sSlot2TilemapBuffer, tSlot2Left, tSlot2Top, tSlot2Width, tSlot2Height); ClearWindowTilemap(windowIds[0]); ClearWindowTilemap(windowIds[1]); - gUnknown_0203CEC8.unkB = 9; - sub_81B0FCC(gUnknown_0203CEC8.slotId, 1); - sub_81B0FCC(gUnknown_0203CEC8.unkA, 1); - sub_81B3CC0(taskId); - gTasks[taskId].func = sub_81B3D48; + gPartyMenu.action = PARTY_ACTION_SWITCHING; + AnimatePartySlot(gPartyMenu.slotId, 1); + AnimatePartySlot(gPartyMenu.slotId2, 1); + SlidePartyMenuBoxOneStep(taskId); + gTasks[taskId].func = Task_SlideSelectedSlotsOffscreen; } } -static bool8 sub_81B3AD8(s16 a, s16 b, u8 *c, u8 *d, u8 *e) +// returns FALSE if the slot has slid fully offscreen / back onscreen +static bool8 TryMovePartySlot(s16 a, s16 srcWidth, u8 *srcX, u8 *srcHeight, u8 *destY) { - if ((a + b) < 0) + if ((a + srcWidth) < 0) return FALSE; if (a > 31) return FALSE; if (a < 0) { - *c = a * -1; - *d = 0; - *e = b + a; + *srcX = a * -1; + *srcHeight = 0; + *destY = srcWidth + a; } else { - *c = 0; - *d = a; - if ((a + b) > 31) - *e = 32 - a; + *srcX = 0; + *srcHeight = a; + if ((a + srcWidth) > 31) + *destY = 32 - a; else - *e = b; + *destY = srcWidth; } return TRUE; } -static void sub_81B3B40(const void *rectSrc, s16 a, s16 b, s16 c, s16 d, s16 e) +static void MoveAndBufferPartySlot(const void *rectSrc, s16 a, s16 destX, s16 srcWidth, s16 rectWidth, s16 offset) { - u8 f, g, h; + u8 srcX, srcHeight, destY; - if (sub_81B3AD8(a, c, &f, &g, &h)) + if (TryMovePartySlot(a, srcWidth, &srcX, &srcHeight, &destY)) { - FillBgTilemapBufferRect_Palette0(0, 0, g, b, h, d); - if (sub_81B3AD8(a + e, c, &f, &g, &h)) - CopyRectToBgTilemapBufferRect(0, rectSrc, f, 0, c, d, g, b, h, d, 17, 0, 0); + FillBgTilemapBufferRect_Palette0(0, 0, srcHeight, destX, destY, rectWidth); + if (TryMovePartySlot(a + offset, srcWidth, &srcX, &srcHeight, &destY)) + CopyRectToBgTilemapBufferRect(0, rectSrc, srcX, 0, srcWidth, rectWidth, srcHeight, destX, destY, rectWidth, 17, 0, 0); } } -static void sub_81B3C0C(struct Struct203CEDC *ptr, s16 a) +static void MovePartyMenuBoxSprites(struct PartyMenuBox *menuBox, s16 offset) { - gSprites[ptr->pokeballSpriteId].pos2.x += a * 8; - gSprites[ptr->itemSpriteId].pos2.x += a * 8; - gSprites[ptr->monSpriteId].pos2.x += a * 8; - gSprites[ptr->statusSpriteId].pos2.x += a * 8; + gSprites[menuBox->pokeballSpriteId].pos2.x += offset * 8; + gSprites[menuBox->itemSpriteId].pos2.x += offset * 8; + gSprites[menuBox->monSpriteId].pos2.x += offset * 8; + gSprites[menuBox->statusSpriteId].pos2.x += offset * 8; } -static void sub_81B3C60(u8 taskId) +static void SlidePartyMenuBoxSpritesOneStep(u8 taskId) { s16 *data = gTasks[taskId].data; - if (data[10] != 0) - sub_81B3C0C(&gUnknown_0203CEDC[gUnknown_0203CEC8.slotId], data[10]); - if (data[11] != 0) - sub_81B3C0C(&gUnknown_0203CEDC[gUnknown_0203CEC8.unkA], data[11]); + if (tSlot1SlideDir != 0) + MovePartyMenuBoxSprites(&sPartyMenuBoxes[gPartyMenu.slotId], tSlot1SlideDir); + if (tSlot2SlideDir != 0) + MovePartyMenuBoxSprites(&sPartyMenuBoxes[gPartyMenu.slotId2], tSlot2SlideDir); } -static void sub_81B3CC0(u8 taskId) +static void SlidePartyMenuBoxOneStep(u8 taskId) { s16 *data = gTasks[taskId].data; - if (data[10] != 0) - sub_81B3B40(gUnknown_0203CEF0, data[0] + data[8], data[1], data[2], data[3], data[10]); - if (data[11] != 0) - sub_81B3B40(gUnknown_0203CEF4, data[4] + data[9], data[5], data[6], data[7], data[11]); + if (tSlot1SlideDir != 0) + MoveAndBufferPartySlot(sSlot1TilemapBuffer, tSlot1Left + tSlot1Offset, tSlot1Top, tSlot1Width, tSlot1Height, tSlot1SlideDir); + if (tSlot2SlideDir != 0) + MoveAndBufferPartySlot(sSlot2TilemapBuffer, tSlot2Left + tSlot2Offset, tSlot2Top, tSlot2Width, tSlot2Height, tSlot2SlideDir); schedule_bg_copy_tilemap_to_vram(0); } -static void sub_81B3D48(u8 taskId) +static void Task_SlideSelectedSlotsOffscreen(u8 taskId) { s16 *data = gTasks[taskId].data; - u16 tilemapRelatedMaybe[2]; + u16 slidingSlotPositions[2]; - sub_81B3CC0(taskId); - sub_81B3C60(taskId); - data[8] += data[10]; - data[9] += data[11]; - tilemapRelatedMaybe[0] = data[0] + data[8]; - tilemapRelatedMaybe[1] = data[4] + data[9]; - if (tilemapRelatedMaybe[0] > 33 && tilemapRelatedMaybe[1] > 33) + SlidePartyMenuBoxOneStep(taskId); + SlidePartyMenuBoxSpritesOneStep(taskId); + tSlot1Offset += tSlot1SlideDir; + tSlot2Offset += tSlot2SlideDir; + slidingSlotPositions[0] = tSlot1Left + tSlot1Offset; + slidingSlotPositions[1] = tSlot2Left + tSlot2Offset; + + // Both slots have slid offscreen + if (slidingSlotPositions[0] > 33 && slidingSlotPositions[1] > 33) { - data[10] *= -1; - data[11] *= -1; - swap_pokemon_and_oams(); - DisplayPartyPokemonData(gUnknown_0203CEC8.slotId); - DisplayPartyPokemonData(gUnknown_0203CEC8.unkA); - PutWindowTilemap(gUnknown_0203CEDC[gUnknown_0203CEC8.slotId].windowId); - PutWindowTilemap(gUnknown_0203CEDC[gUnknown_0203CEC8.unkA].windowId); - sub_8199CBC(0, gUnknown_0203CEF0, data[0], data[1], data[2], data[3]); - sub_8199CBC(0, gUnknown_0203CEF4, data[4], data[5], data[6], data[7]); - ClearWindowTilemap(gUnknown_0203CEDC[gUnknown_0203CEC8.slotId].windowId); - ClearWindowTilemap(gUnknown_0203CEDC[gUnknown_0203CEC8.unkA].windowId); - gTasks[taskId].func = sub_81B3E60; + tSlot1SlideDir *= -1; + tSlot2SlideDir *= -1; + SwitchPartyMon(); + DisplayPartyPokemonData(gPartyMenu.slotId); + DisplayPartyPokemonData(gPartyMenu.slotId2); + PutWindowTilemap(sPartyMenuBoxes[gPartyMenu.slotId].windowId); + PutWindowTilemap(sPartyMenuBoxes[gPartyMenu.slotId2].windowId); + CopyToBufferFromBgTilemap(0, sSlot1TilemapBuffer, tSlot1Left, tSlot1Top, tSlot1Width, tSlot1Height); + CopyToBufferFromBgTilemap(0, sSlot2TilemapBuffer, tSlot2Left, tSlot2Top, tSlot2Width, tSlot2Height); + ClearWindowTilemap(sPartyMenuBoxes[gPartyMenu.slotId].windowId); + ClearWindowTilemap(sPartyMenuBoxes[gPartyMenu.slotId2].windowId); + gTasks[taskId].func = Task_SlideSelectedSlotsOnscreen; } } -static void sub_81B3E60(u8 taskId) +static void Task_SlideSelectedSlotsOnscreen(u8 taskId) { s16 *data = gTasks[taskId].data; - sub_81B3CC0(taskId); - sub_81B3C60(taskId); - if (data[10] == 0 && data[11] == 0) + SlidePartyMenuBoxOneStep(taskId); + SlidePartyMenuBoxSpritesOneStep(taskId); + + // Both slots have slid back onscreen + if (tSlot1SlideDir == 0 && tSlot2SlideDir == 0) { - PutWindowTilemap(gUnknown_0203CEDC[gUnknown_0203CEC8.slotId].windowId); - PutWindowTilemap(gUnknown_0203CEDC[gUnknown_0203CEC8.unkA].windowId); + PutWindowTilemap(sPartyMenuBoxes[gPartyMenu.slotId].windowId); + PutWindowTilemap(sPartyMenuBoxes[gPartyMenu.slotId2].windowId); schedule_bg_copy_tilemap_to_vram(0); - Free(gUnknown_0203CEF0); - Free(gUnknown_0203CEF4); - sub_81B407C(taskId); + Free(sSlot1TilemapBuffer); + Free(sSlot2TilemapBuffer); + FinishTwoMonAction(taskId); } + // Continue sliding else { - data[8] += data[10]; - data[9] += data[11]; - if (data[8] == 0) - data[10] = 0; - if (data[9] == 0) - data[11] = 0; + tSlot1Offset += tSlot1SlideDir; + tSlot2Offset += tSlot2SlideDir; + if (tSlot1Offset == 0) + tSlot1SlideDir = 0; + if (tSlot2Offset == 0) + tSlot2SlideDir = 0; } } -static void oamt_swap_pos(u8 *spriteIdPtr1, u8 *spriteIdPtr2) +static void SwitchMenuBoxSprites(u8 *spriteIdPtr1, u8 *spriteIdPtr2) { u8 spriteIdBuffer = *spriteIdPtr1; u16 xBuffer1, yBuffer1, xBuffer2, yBuffer2; @@ -4082,204 +4237,227 @@ static void oamt_swap_pos(u8 *spriteIdPtr1, u8 *spriteIdPtr2) gSprites[*spriteIdPtr2].pos2.y = yBuffer2; } -static void swap_pokemon_and_oams(void) +static void SwitchPartyMon(void) { - struct Struct203CEDC *structPtrs[2]; + struct PartyMenuBox *menuBoxes[2]; struct Pokemon *mon1, *mon2; struct Pokemon *monBuffer; - structPtrs[0] = &gUnknown_0203CEDC[gUnknown_0203CEC8.slotId]; - structPtrs[1] = &gUnknown_0203CEDC[gUnknown_0203CEC8.unkA]; - mon1 = &gPlayerParty[gUnknown_0203CEC8.slotId]; - mon2 = &gPlayerParty[gUnknown_0203CEC8.unkA]; + menuBoxes[0] = &sPartyMenuBoxes[gPartyMenu.slotId]; + menuBoxes[1] = &sPartyMenuBoxes[gPartyMenu.slotId2]; + mon1 = &gPlayerParty[gPartyMenu.slotId]; + mon2 = &gPlayerParty[gPartyMenu.slotId2]; monBuffer = Alloc(sizeof(struct Pokemon)); *monBuffer = *mon1; *mon1 = *mon2; *mon2 = *monBuffer; Free(monBuffer); - oamt_swap_pos(&structPtrs[0]->pokeballSpriteId, &structPtrs[1]->pokeballSpriteId); - oamt_swap_pos(&structPtrs[0]->itemSpriteId, &structPtrs[1]->itemSpriteId); - oamt_swap_pos(&structPtrs[0]->monSpriteId, &structPtrs[1]->monSpriteId); - oamt_swap_pos(&structPtrs[0]->statusSpriteId, &structPtrs[1]->statusSpriteId); + SwitchMenuBoxSprites(&menuBoxes[0]->pokeballSpriteId, &menuBoxes[1]->pokeballSpriteId); + SwitchMenuBoxSprites(&menuBoxes[0]->itemSpriteId, &menuBoxes[1]->itemSpriteId); + SwitchMenuBoxSprites(&menuBoxes[0]->monSpriteId, &menuBoxes[1]->monSpriteId); + SwitchMenuBoxSprites(&menuBoxes[0]->statusSpriteId, &menuBoxes[1]->statusSpriteId); } -static void sub_81B407C(u8 taskId) +// Finish switching mons or using Softboiled +static void FinishTwoMonAction(u8 taskId) { - PartyMenuRemoveWindow(&gUnknown_0203CEC4->windowId[1]); - gUnknown_0203CEC8.unkB = 0; - sub_81B0FCC(gUnknown_0203CEC8.slotId, 0); - gUnknown_0203CEC8.slotId = gUnknown_0203CEC8.unkA; - sub_81B0FCC(gUnknown_0203CEC8.unkA, 1); - DisplayPartyMenuStdMessage(0); - gTasks[taskId].func = sub_81B1370; + PartyMenuRemoveWindow(&sPartyMenuInternal->windowId[1]); + gPartyMenu.action = PARTY_ACTION_CHOOSE_MON; + AnimatePartySlot(gPartyMenu.slotId, 0); + gPartyMenu.slotId = gPartyMenu.slotId2; + AnimatePartySlot(gPartyMenu.slotId2, 1); + DisplayPartyMenuStdMessage(PARTY_MSG_CHOOSE_MON); + gTasks[taskId].func = Task_HandleChooseMonInput; } +#undef tSlot1Left +#undef tSlot1Top +#undef tSlot1Width +#undef tSlot1Height +#undef tSlot2Left +#undef tSlot2Top +#undef tSlot2Width +#undef tSlot2Height +#undef tSlot1Offset +#undef tSlot2Offset +#undef tSlot1SlideDir +#undef tSlot2SlideDir + static void CursorCb_Cancel1(u8 taskId) { PlaySE(SE_SELECT); - PartyMenuRemoveWindow(&gUnknown_0203CEC4->windowId[0]); - PartyMenuRemoveWindow(&gUnknown_0203CEC4->windowId[1]); - if (gUnknown_0203CEC8.unk8_0 == 6) - DisplayPartyMenuStdMessage(15); + PartyMenuRemoveWindow(&sPartyMenuInternal->windowId[0]); + PartyMenuRemoveWindow(&sPartyMenuInternal->windowId[1]); + if (gPartyMenu.menuType == PARTY_MENU_TYPE_DAYCARE) + DisplayPartyMenuStdMessage(PARTY_MSG_CHOOSE_MON_2); else - DisplayPartyMenuStdMessage(0); - gTasks[taskId].func = sub_81B1370; + DisplayPartyMenuStdMessage(PARTY_MSG_CHOOSE_MON); + gTasks[taskId].func = Task_HandleChooseMonInput; } static void CursorCb_Item(u8 taskId) { PlaySE(SE_SELECT); - PartyMenuRemoveWindow(&gUnknown_0203CEC4->windowId[0]); - PartyMenuRemoveWindow(&gUnknown_0203CEC4->windowId[1]); - sub_81B33B4(gPlayerParty, gUnknown_0203CEC8.slotId, 8); - sub_81B31B0(1); - DisplayPartyMenuStdMessage(24); + PartyMenuRemoveWindow(&sPartyMenuInternal->windowId[0]); + PartyMenuRemoveWindow(&sPartyMenuInternal->windowId[1]); + SetPartyMonSelectionActions(gPlayerParty, gPartyMenu.slotId, ACTIONS_ITEM); + DisplaySelectionWindow(SELECTWINDOW_ITEM); + DisplayPartyMenuStdMessage(PARTY_MSG_DO_WHAT_WITH_ITEM); gTasks[taskId].data[0] = 0xFF; - gTasks[taskId].func = HandleMenuInput; + gTasks[taskId].func = Task_HandleSelectionMenuInput; } static void CursorCb_Give(u8 taskId) { PlaySE(SE_SELECT); - gUnknown_0203CEC4->exitCallback = sub_81B41C4; + sPartyMenuInternal->exitCallback = CB2_SelectBagItemToGive; Task_ClosePartyMenu(taskId); } -static void sub_81B41C4(void) +static void CB2_SelectBagItemToGive(void) { if (InBattlePyramid() == FALSE) - GoToBagMenu(RETURN_LOCATION_POKEMON_LIST, POCKETS_COUNT, c2_8123744); + GoToBagMenu(RETURN_LOCATION_POKEMON_LIST, POCKETS_COUNT, CB2_GiveHoldItem); else - sub_81C4F98(2, c2_8123744); + GoToBattlePyramidBagMenu(2, CB2_GiveHoldItem); } -static void c2_8123744(void) +static void CB2_GiveHoldItem(void) { if (gSpecialVar_ItemId == ITEM_NONE) { - InitPartyMenu(gUnknown_0203CEC8.unk8_0, 0xFF, gUnknown_0203CEC8.unkB, 1, 0x7F, sub_81B36FC, gUnknown_0203CEC8.exitCallback); + InitPartyMenu(gPartyMenu.menuType, KEEP_PARTY_LAYOUT, gPartyMenu.action, TRUE, PARTY_MSG_NONE, Task_TryCreateSelectionWindow, gPartyMenu.exitCallback); } else { - gUnknown_0203CEFC = GetMonData(&gPlayerParty[gUnknown_0203CEC8.slotId], MON_DATA_HELD_ITEM); - if (gUnknown_0203CEFC != ITEM_NONE) + sPartyMenuItemId = GetMonData(&gPlayerParty[gPartyMenu.slotId], MON_DATA_HELD_ITEM); + + // Already holding item + if (sPartyMenuItemId != ITEM_NONE) { - InitPartyMenu(gUnknown_0203CEC8.unk8_0, 0xFF, gUnknown_0203CEC8.unkB, 1, 0x7F, sub_81B4350, gUnknown_0203CEC8.exitCallback); + InitPartyMenu(gPartyMenu.menuType, KEEP_PARTY_LAYOUT, gPartyMenu.action, TRUE, PARTY_MSG_NONE, Task_SwitchHoldItemsPrompt, gPartyMenu.exitCallback); } + // Give mail else if (ItemIsMail(gSpecialVar_ItemId)) { RemoveBagItem(gSpecialVar_ItemId, 1); - sub_81B1DB8(&gPlayerParty[gUnknown_0203CEC8.slotId], gSpecialVar_ItemId); - sub_81B452C(); + GiveItemToMon(&gPlayerParty[gPartyMenu.slotId], gSpecialVar_ItemId); + CB2_WriteMailToGiveMon(); } + // Give item else { - InitPartyMenu(gUnknown_0203CEC8.unk8_0, 0xFF, gUnknown_0203CEC8.unkB, 1, 0x7F, sub_81B42D0, gUnknown_0203CEC8.exitCallback); + InitPartyMenu(gPartyMenu.menuType, KEEP_PARTY_LAYOUT, gPartyMenu.action, TRUE, PARTY_MSG_NONE, Task_GiveHoldItem, gPartyMenu.exitCallback); } } } -static void sub_81B42D0(u8 taskId) +static void Task_GiveHoldItem(u8 taskId) { u16 item; if (!gPaletteFade.active) { item = gSpecialVar_ItemId; - sub_81B1C84(&gPlayerParty[gUnknown_0203CEC8.slotId], item, 0, 0); - sub_81B1DB8(&gPlayerParty[gUnknown_0203CEC8.slotId], item); + DisplayGaveHeldItemMessage(&gPlayerParty[gPartyMenu.slotId], item, FALSE, 0); + GiveItemToMon(&gPlayerParty[gPartyMenu.slotId], item); RemoveBagItem(item, 1); - gTasks[taskId].func = sub_81B469C; + gTasks[taskId].func = Task_UpdateHeldItemSprite; } } -static void sub_81B4350(u8 taskId) +static void Task_SwitchHoldItemsPrompt(u8 taskId) { if (!gPaletteFade.active) { - sub_81B1D1C(&gPlayerParty[gUnknown_0203CEC8.slotId], gUnknown_0203CEFC, 1); - gTasks[taskId].func = sub_81B43A8; + DisplayAlreadyHoldingItemSwitchMessage(&gPlayerParty[gPartyMenu.slotId], sPartyMenuItemId, TRUE); + gTasks[taskId].func = Task_SwitchItemsYesNo; } } -static void sub_81B43A8(u8 taskId) +static void Task_SwitchItemsYesNo(u8 taskId) { - if (sub_81B1BD4() != TRUE) + if (IsPartyMenuTextPrinterActive() != TRUE) { - sub_81B334C(); - gTasks[taskId].func = sub_81B43DC; + PartyMenuDisplayYesNoMenu(); + gTasks[taskId].func = Task_HandleSwitchItemsYesNoInput; } } -static void sub_81B43DC(u8 taskId) +static void Task_HandleSwitchItemsYesNoInput(u8 taskId) { switch (Menu_ProcessInputNoWrapClearOnChoose()) { - case 0: + case 0: // Yes, switch items RemoveBagItem(gSpecialVar_ItemId, 1); - if (AddBagItem(gUnknown_0203CEFC, 1) == FALSE) + + // No room to return held item to bag + if (AddBagItem(sPartyMenuItemId, 1) == FALSE) { AddBagItem(gSpecialVar_ItemId, 1); - pokemon_item_not_removed(gUnknown_0203CEFC); - DisplayPartyMenuMessage(gStringVar4, 0); - gTasks[taskId].func = sub_81B1C1C; + BufferBagFullCantTakeItemMessage(sPartyMenuItemId); + DisplayPartyMenuMessage(gStringVar4, FALSE); + gTasks[taskId].func = Task_ReturnToChooseMonAfterText; } + // Giving mail else if (ItemIsMail(gSpecialVar_ItemId)) { - sub_81B1DB8(&gPlayerParty[gUnknown_0203CEC8.slotId], gSpecialVar_ItemId); - gTasks[taskId].func = sub_81B44FC; + GiveItemToMon(&gPlayerParty[gPartyMenu.slotId], gSpecialVar_ItemId); + gTasks[taskId].func = Task_WriteMailToGiveMonAfterText; } + // Giving item else { - sub_81B1DB8(&gPlayerParty[gUnknown_0203CEC8.slotId], gSpecialVar_ItemId); - sub_81B1D68(gSpecialVar_ItemId, gUnknown_0203CEFC, 1); - gTasks[taskId].func = sub_81B469C; + GiveItemToMon(&gPlayerParty[gPartyMenu.slotId], gSpecialVar_ItemId); + DisplaySwitchedHeldItemMessage(gSpecialVar_ItemId, sPartyMenuItemId, TRUE); + gTasks[taskId].func = Task_UpdateHeldItemSprite; } break; case MENU_B_PRESSED: PlaySE(SE_SELECT); - case 1: - gTasks[taskId].func = sub_81B1C1C; + // fallthrough + case 1: // No + gTasks[taskId].func = Task_ReturnToChooseMonAfterText; break; } } -static void sub_81B44FC(u8 taskId) +static void Task_WriteMailToGiveMonAfterText(u8 taskId) { - if (sub_81B1BD4() != TRUE) + if (IsPartyMenuTextPrinterActive() != TRUE) { - gUnknown_0203CEC4->exitCallback = sub_81B452C; + sPartyMenuInternal->exitCallback = CB2_WriteMailToGiveMon; Task_ClosePartyMenu(taskId); } } -static void sub_81B452C(void) +static void CB2_WriteMailToGiveMon(void) { - u8 mail = GetMonData(&gPlayerParty[gUnknown_0203CEC8.slotId], MON_DATA_MAIL); + u8 mail = GetMonData(&gPlayerParty[gPartyMenu.slotId], MON_DATA_MAIL); DoEasyChatScreen( EASY_CHAT_TYPE_MAIL, gSaveBlock1Ptr->mail[mail].words, - sub_81B4578, + CB2_ReturnToPartyMenuFromWritingMail, EASY_CHAT_PERSON_DISPLAY_NONE); } -static void sub_81B4578(void) +static void CB2_ReturnToPartyMenuFromWritingMail(void) { - struct Pokemon *mon = &gPlayerParty[gUnknown_0203CEC8.slotId]; + struct Pokemon *mon = &gPlayerParty[gPartyMenu.slotId]; u16 item = GetMonData(mon, MON_DATA_HELD_ITEM); if (gSpecialVar_Result == FALSE) { TakeMailFromMon(mon); - SetMonData(mon, MON_DATA_HELD_ITEM, &gUnknown_0203CEFC); - RemoveBagItem(gUnknown_0203CEFC, 1); + SetMonData(mon, MON_DATA_HELD_ITEM, &sPartyMenuItemId); + RemoveBagItem(sPartyMenuItemId, 1); AddBagItem(item, 1); - InitPartyMenu(gUnknown_0203CEC8.unk8_0, 0xFF, gUnknown_0203CEC8.unkB, 1, 0, sub_81B36FC, gUnknown_0203CEC8.exitCallback); + InitPartyMenu(gPartyMenu.menuType, KEEP_PARTY_LAYOUT, gPartyMenu.action, TRUE, PARTY_MSG_CHOOSE_MON, Task_TryCreateSelectionWindow, gPartyMenu.exitCallback); } else { - InitPartyMenu(gUnknown_0203CEC8.unk8_0, 0xFF, gUnknown_0203CEC8.unkB, 1, 0x7F, sub_81B4624, gUnknown_0203CEC8.exitCallback); + InitPartyMenu(gPartyMenu.menuType, KEEP_PARTY_LAYOUT, gPartyMenu.action, TRUE, PARTY_MSG_NONE, sub_81B4624, gPartyMenu.exitCallback); } } @@ -4287,171 +4465,172 @@ static void sub_81B4624(u8 taskId) { if (!gPaletteFade.active) { - if (gUnknown_0203CEFC == ITEM_NONE) - sub_81B1C84(&gPlayerParty[gUnknown_0203CEC8.slotId], gSpecialVar_ItemId, 0, 0); + if (sPartyMenuItemId == ITEM_NONE) + DisplayGaveHeldItemMessage(&gPlayerParty[gPartyMenu.slotId], gSpecialVar_ItemId, FALSE, 0); else - sub_81B1D68(gSpecialVar_ItemId, gUnknown_0203CEFC, 0); - gTasks[taskId].func = sub_81B469C; + DisplaySwitchedHeldItemMessage(gSpecialVar_ItemId, sPartyMenuItemId, FALSE); + gTasks[taskId].func = Task_UpdateHeldItemSprite; } } -static void sub_81B469C(u8 taskId) +static void Task_UpdateHeldItemSprite(u8 taskId) { - struct Pokemon *mon = &gPlayerParty[gUnknown_0203CEC8.slotId]; + struct Pokemon *mon = &gPlayerParty[gPartyMenu.slotId]; - if (sub_81B1BD4() != TRUE) + if (IsPartyMenuTextPrinterActive() != TRUE) { - sub_81B5C94(mon, &gUnknown_0203CEDC[gUnknown_0203CEC8.slotId]); - if (gUnknown_0203CEC8.unk8_0 == 12) + UpdatePartyMonHeldItemSprite(mon, &sPartyMenuBoxes[gPartyMenu.slotId]); + if (gPartyMenu.menuType == PARTY_MENU_TYPE_STORE_PYRAMID_HELD_ITEMS) { if (GetMonData(mon, MON_DATA_HELD_ITEM) != ITEM_NONE) - DisplayPartyPokemonSelectionText(11, &gUnknown_0203CEDC[gUnknown_0203CEC8.slotId], 1); + DisplayPartyPokemonDescriptionText(PARTYBOX_DESC_HAVE, &sPartyMenuBoxes[gPartyMenu.slotId], 1); else - DisplayPartyPokemonSelectionText(12, &gUnknown_0203CEDC[gUnknown_0203CEC8.slotId], 1); + DisplayPartyPokemonDescriptionText(PARTYBOX_DESC_DONT_HAVE, &sPartyMenuBoxes[gPartyMenu.slotId], 1); } - sub_81B1C1C(taskId); + Task_ReturnToChooseMonAfterText(taskId); } } static void CursorCb_TakeItem(u8 taskId) { - struct Pokemon *mon = &gPlayerParty[gUnknown_0203CEC8.slotId]; + struct Pokemon *mon = &gPlayerParty[gPartyMenu.slotId]; u16 item = GetMonData(mon, MON_DATA_HELD_ITEM); PlaySE(SE_SELECT); - PartyMenuRemoveWindow(&gUnknown_0203CEC4->windowId[0]); - PartyMenuRemoveWindow(&gUnknown_0203CEC4->windowId[1]); + PartyMenuRemoveWindow(&sPartyMenuInternal->windowId[0]); + PartyMenuRemoveWindow(&sPartyMenuInternal->windowId[1]); switch (TryTakeMonItem(mon)) { - case 0: + case 0: // Not holding item GetMonNickname(mon, gStringVar1); StringExpandPlaceholders(gStringVar4, gText_PkmnNotHolding); - DisplayPartyMenuMessage(gStringVar4, 1); + DisplayPartyMenuMessage(gStringVar4, TRUE); break; - case 1: - pokemon_item_not_removed(item); - DisplayPartyMenuMessage(gStringVar4, 1); + case 1: // No room to take item + BufferBagFullCantTakeItemMessage(item); + DisplayPartyMenuMessage(gStringVar4, TRUE); break; - default: - sub_81B1CD0(mon, item, 1); + default: // Took item + DisplayTookHeldItemMessage(mon, item, TRUE); break; } schedule_bg_copy_tilemap_to_vram(2); - gTasks[taskId].func = sub_81B469C; + gTasks[taskId].func = Task_UpdateHeldItemSprite; } static void CursorCb_Toss(u8 taskId) { - struct Pokemon *mon = &gPlayerParty[gUnknown_0203CEC8.slotId]; + struct Pokemon *mon = &gPlayerParty[gPartyMenu.slotId]; u16 item = GetMonData(mon, MON_DATA_HELD_ITEM); PlaySE(SE_SELECT); - PartyMenuRemoveWindow(&gUnknown_0203CEC4->windowId[0]); - PartyMenuRemoveWindow(&gUnknown_0203CEC4->windowId[1]); + PartyMenuRemoveWindow(&sPartyMenuInternal->windowId[0]); + PartyMenuRemoveWindow(&sPartyMenuInternal->windowId[1]); if (item == ITEM_NONE) { GetMonNickname(mon, gStringVar1); StringExpandPlaceholders(gStringVar4, gText_PkmnNotHolding); - DisplayPartyMenuMessage(gStringVar4, 1); - gTasks[taskId].func = sub_81B469C; + DisplayPartyMenuMessage(gStringVar4, TRUE); + gTasks[taskId].func = Task_UpdateHeldItemSprite; } else { CopyItemName(item, gStringVar1); StringExpandPlaceholders(gStringVar4, gText_ThrowAwayItem); - DisplayPartyMenuMessage(gStringVar4, 1); - gTasks[taskId].func = sub_81B48A8; + DisplayPartyMenuMessage(gStringVar4, TRUE); + gTasks[taskId].func = Task_TossHeldItemYesNo; } } -static void sub_81B48A8(u8 taskId) +static void Task_TossHeldItemYesNo(u8 taskId) { - if (sub_81B1BD4() != TRUE) + if (IsPartyMenuTextPrinterActive() != TRUE) { - sub_81B334C(); - gTasks[taskId].func = sub_81B48DC; + PartyMenuDisplayYesNoMenu(); + gTasks[taskId].func = Task_HandleTossHeldItemYesNoInput; } } -static void sub_81B48DC(u8 taskId) +static void Task_HandleTossHeldItemYesNoInput(u8 taskId) { - struct Pokemon *mon = &gPlayerParty[gUnknown_0203CEC8.slotId]; + struct Pokemon *mon = &gPlayerParty[gPartyMenu.slotId]; switch (Menu_ProcessInputNoWrapClearOnChoose()) { case 0: CopyItemName(GetMonData(mon, MON_DATA_HELD_ITEM), gStringVar1); StringExpandPlaceholders(gStringVar4, gText_ItemThrownAway); - DisplayPartyMenuMessage(gStringVar4, 0); - gTasks[taskId].func = sub_81B4988; + DisplayPartyMenuMessage(gStringVar4, FALSE); + gTasks[taskId].func = Task_TossHeldItem; break; case MENU_B_PRESSED: PlaySE(SE_SELECT); + // fallthrough case 1: - gTasks[taskId].func = sub_81B1C1C; + gTasks[taskId].func = Task_ReturnToChooseMonAfterText; break; } } -static void sub_81B4988(u8 taskId) +static void Task_TossHeldItem(u8 taskId) { - struct Pokemon *mon = &gPlayerParty[gUnknown_0203CEC8.slotId]; + struct Pokemon *mon = &gPlayerParty[gPartyMenu.slotId]; - if (sub_81B1BD4() != TRUE) + if (IsPartyMenuTextPrinterActive() != TRUE) { u16 item = ITEM_NONE; SetMonData(mon, MON_DATA_HELD_ITEM, &item); - sub_81B5C94(mon, &gUnknown_0203CEDC[gUnknown_0203CEC8.slotId]); - DisplayPartyPokemonSelectionText(12, &gUnknown_0203CEDC[gUnknown_0203CEC8.slotId], 1); - gTasks[taskId].func = sub_81B1C1C; + UpdatePartyMonHeldItemSprite(mon, &sPartyMenuBoxes[gPartyMenu.slotId]); + DisplayPartyPokemonDescriptionText(PARTYBOX_DESC_DONT_HAVE, &sPartyMenuBoxes[gPartyMenu.slotId], 1); + gTasks[taskId].func = Task_ReturnToChooseMonAfterText; } } static void CursorCb_Mail(u8 taskId) { PlaySE(SE_SELECT); - PartyMenuRemoveWindow(&gUnknown_0203CEC4->windowId[0]); - PartyMenuRemoveWindow(&gUnknown_0203CEC4->windowId[1]); - sub_81B33B4(gPlayerParty, gUnknown_0203CEC8.slotId, 9); - sub_81B31B0(2); - DisplayPartyMenuStdMessage(25); + PartyMenuRemoveWindow(&sPartyMenuInternal->windowId[0]); + PartyMenuRemoveWindow(&sPartyMenuInternal->windowId[1]); + SetPartyMonSelectionActions(gPlayerParty, gPartyMenu.slotId, ACTIONS_MAIL); + DisplaySelectionWindow(SELECTWINDOW_MAIL); + DisplayPartyMenuStdMessage(PARTY_MSG_DO_WHAT_WITH_MAIL); gTasks[taskId].data[0] = 0xFF; - gTasks[taskId].func = HandleMenuInput; + gTasks[taskId].func = Task_HandleSelectionMenuInput; } static void CursorCb_Read(u8 taskId) { PlaySE(SE_SELECT); - gUnknown_0203CEC4->exitCallback = sub_81B4A98; + sPartyMenuInternal->exitCallback = sub_81B4A98; Task_ClosePartyMenu(taskId); } static void sub_81B4A98(void) { - ReadMail(&gSaveBlock1Ptr->mail[GetMonData(&gPlayerParty[gUnknown_0203CEC8.slotId], MON_DATA_MAIL)], sub_81B4AE0, 1); + ReadMail(&gSaveBlock1Ptr->mail[GetMonData(&gPlayerParty[gPartyMenu.slotId], MON_DATA_MAIL)], sub_81B4AE0, 1); } static void sub_81B4AE0(void) { gPaletteFade.bufferTransferDisabled = TRUE; - InitPartyMenu(gUnknown_0203CEC8.unk8_0, 0xFF, gUnknown_0203CEC8.unkB, 1, 21, sub_81B36FC, gUnknown_0203CEC8.exitCallback); + InitPartyMenu(gPartyMenu.menuType, KEEP_PARTY_LAYOUT, gPartyMenu.action, TRUE, PARTY_MSG_DO_WHAT_WITH_MON, Task_TryCreateSelectionWindow, gPartyMenu.exitCallback); } static void CursorCb_TakeMail(u8 taskId) { PlaySE(SE_SELECT); - PartyMenuRemoveWindow(&gUnknown_0203CEC4->windowId[1]); - PartyMenuRemoveWindow(&gUnknown_0203CEC4->windowId[0]); - DisplayPartyMenuMessage(gText_SendMailToPC, 1); + PartyMenuRemoveWindow(&sPartyMenuInternal->windowId[1]); + PartyMenuRemoveWindow(&sPartyMenuInternal->windowId[0]); + DisplayPartyMenuMessage(gText_SendMailToPC, TRUE); gTasks[taskId].func = sub_81B4B6C; } static void sub_81B4B6C(u8 taskId) { - if (sub_81B1BD4() != TRUE) + if (IsPartyMenuTextPrinterActive() != TRUE) { - sub_81B334C(); + PartyMenuDisplayYesNoMenu(); gTasks[taskId].func = sub_81B4BA0; } } @@ -4461,21 +4640,22 @@ static void sub_81B4BA0(u8 taskId) switch (Menu_ProcessInputNoWrapClearOnChoose()) { case 0: - if (TakeMailFromMon2(&gPlayerParty[gUnknown_0203CEC8.slotId]) != 0xFF) + if (TakeMailFromMon2(&gPlayerParty[gPartyMenu.slotId]) != 0xFF) { - DisplayPartyMenuMessage(gText_MailSentToPC, 0); - gTasks[taskId].func = sub_81B469C; + DisplayPartyMenuMessage(gText_MailSentToPC, FALSE); + gTasks[taskId].func = Task_UpdateHeldItemSprite; } else { - DisplayPartyMenuMessage(gText_PCMailboxFull, 0); - gTasks[taskId].func = sub_81B1C1C; + DisplayPartyMenuMessage(gText_PCMailboxFull, FALSE); + gTasks[taskId].func = Task_ReturnToChooseMonAfterText; } break; case MENU_B_PRESSED: PlaySE(SE_SELECT); + // fallthrough case 1: - DisplayPartyMenuMessage(gText_MailMessageWillBeLost, 1); + DisplayPartyMenuMessage(gText_MailMessageWillBeLost, TRUE); gTasks[taskId].func = sub_81B4C60; break; } @@ -4483,9 +4663,9 @@ static void sub_81B4BA0(u8 taskId) static void sub_81B4C60(u8 taskId) { - if (sub_81B1BD4() != TRUE) + if (IsPartyMenuTextPrinterActive() != TRUE) { - sub_81B334C(); + PartyMenuDisplayYesNoMenu(); gTasks[taskId].func = sub_81B4C94; } } @@ -4497,130 +4677,132 @@ static void sub_81B4C94(u8 taskId) switch (Menu_ProcessInputNoWrapClearOnChoose()) { case 0: - item = GetMonData(&gPlayerParty[gUnknown_0203CEC8.slotId], MON_DATA_HELD_ITEM); + item = GetMonData(&gPlayerParty[gPartyMenu.slotId], MON_DATA_HELD_ITEM); if (AddBagItem(item, 1) == TRUE) { - TakeMailFromMon(&gPlayerParty[gUnknown_0203CEC8.slotId]); - DisplayPartyMenuMessage(gText_MailTakenFromPkmn, 0); - gTasks[taskId].func = sub_81B469C; + TakeMailFromMon(&gPlayerParty[gPartyMenu.slotId]); + DisplayPartyMenuMessage(gText_MailTakenFromPkmn, FALSE); + gTasks[taskId].func = Task_UpdateHeldItemSprite; } else { - pokemon_item_not_removed(item); - DisplayPartyMenuMessage(gStringVar4, 0); - gTasks[taskId].func = sub_81B1C1C; + BufferBagFullCantTakeItemMessage(item); + DisplayPartyMenuMessage(gStringVar4, FALSE); + gTasks[taskId].func = Task_ReturnToChooseMonAfterText; } break; case MENU_B_PRESSED: PlaySE(SE_SELECT); + // fallthrough case 1: - gTasks[taskId].func = sub_81B1C1C; + gTasks[taskId].func = Task_ReturnToChooseMonAfterText; break; } } static void CursorCb_Cancel2(u8 taskId) { - struct Pokemon *mon = &gPlayerParty[gUnknown_0203CEC8.slotId]; + struct Pokemon *mon = &gPlayerParty[gPartyMenu.slotId]; PlaySE(SE_SELECT); - PartyMenuRemoveWindow(&gUnknown_0203CEC4->windowId[0]); - PartyMenuRemoveWindow(&gUnknown_0203CEC4->windowId[1]); - sub_81B33B4(gPlayerParty, gUnknown_0203CEC8.slotId, sub_81B353C(mon)); - if (gUnknown_0203CEC8.unk8_0 != 12) + PartyMenuRemoveWindow(&sPartyMenuInternal->windowId[0]); + PartyMenuRemoveWindow(&sPartyMenuInternal->windowId[1]); + SetPartyMonSelectionActions(gPlayerParty, gPartyMenu.slotId, GetPartyMenuActionsType(mon)); + if (gPartyMenu.menuType != PARTY_MENU_TYPE_STORE_PYRAMID_HELD_ITEMS) { - sub_81B31B0(0); - DisplayPartyMenuStdMessage(21); + DisplaySelectionWindow(SELECTWINDOW_ACTIONS); + DisplayPartyMenuStdMessage(PARTY_MSG_DO_WHAT_WITH_MON); } else { - sub_81B31B0(1); + DisplaySelectionWindow(SELECTWINDOW_ITEM); CopyItemName(GetMonData(mon, MON_DATA_HELD_ITEM), gStringVar2); - DisplayPartyMenuStdMessage(26); + DisplayPartyMenuStdMessage(PARTY_MSG_ALREADY_HOLDING_ONE); } gTasks[taskId].data[0] = 0xFF; - gTasks[taskId].func = HandleMenuInput; + gTasks[taskId].func = Task_HandleSelectionMenuInput; } static void CursorCb_SendMon(u8 taskId) { PlaySE(SE_SELECT); - PartyMenuRemoveWindow(&gUnknown_0203CEC4->windowId[0]); - if (sub_81B8A7C() == TRUE) + PartyMenuRemoveWindow(&sPartyMenuInternal->windowId[0]); + if (TrySwitchInPokemon() == TRUE) { Task_ClosePartyMenu(taskId); } else { - PartyMenuRemoveWindow(&gUnknown_0203CEC4->windowId[1]); - DisplayPartyMenuMessage(gStringVar4, 1); - gTasks[taskId].func = sub_81B1C1C; + // gStringVar4 below is the error message buffered by TrySwitchInPokemon + PartyMenuRemoveWindow(&sPartyMenuInternal->windowId[1]); + DisplayPartyMenuMessage(gStringVar4, TRUE); + gTasks[taskId].func = Task_ReturnToChooseMonAfterText; } } static void CursorCb_Enter(u8 taskId) { - u8 unk; + u8 maxBattlers; u8 i; - PartyMenuRemoveWindow(&gUnknown_0203CEC4->windowId[0]); - PartyMenuRemoveWindow(&gUnknown_0203CEC4->windowId[1]); - unk = sub_81B8830(); - for (i = 0; i < unk; i++) + PartyMenuRemoveWindow(&sPartyMenuInternal->windowId[0]); + PartyMenuRemoveWindow(&sPartyMenuInternal->windowId[1]); + maxBattlers = GetMaxBattleEntries(); + for (i = 0; i < maxBattlers; i++) { if (gSelectedOrderFromParty[i] == 0) { PlaySE(SE_SELECT); - gSelectedOrderFromParty[i] = gUnknown_0203CEC8.slotId + 1; - DisplayPartyPokemonSelectionText(i + 2, &gUnknown_0203CEDC[gUnknown_0203CEC8.slotId], 1); - if (i == (unk - 1)) + gSelectedOrderFromParty[i] = gPartyMenu.slotId + 1; + DisplayPartyPokemonDescriptionText(i + PARTYBOX_DESC_FIRST, &sPartyMenuBoxes[gPartyMenu.slotId], 1); + if (i == (maxBattlers - 1)) sub_81B4F88(); - DisplayPartyMenuStdMessage(0); - gTasks[taskId].func = sub_81B1370; + DisplayPartyMenuStdMessage(PARTY_MSG_CHOOSE_MON); + gTasks[taskId].func = Task_HandleChooseMonInput; return; } } - ConvertIntToDecimalStringN(gStringVar1, unk, STR_CONV_MODE_LEFT_ALIGN, 1); + ConvertIntToDecimalStringN(gStringVar1, maxBattlers, STR_CONV_MODE_LEFT_ALIGN, 1); StringExpandPlaceholders(gStringVar4, gText_NoMoreThanVar1Pkmn); PlaySE(SE_HAZURE); - DisplayPartyMenuMessage(gStringVar4, 1); - gTasks[taskId].func = sub_81B1C1C; + DisplayPartyMenuMessage(gStringVar4, TRUE); + gTasks[taskId].func = Task_ReturnToChooseMonAfterText; } static void sub_81B4F88(void) { - sub_81B0FCC(gUnknown_0203CEC8.slotId, 0); - gUnknown_0203CEC8.slotId = 6; - sub_81B0FCC(gUnknown_0203CEC8.slotId, 1); + AnimatePartySlot(gPartyMenu.slotId, 0); + gPartyMenu.slotId = PARTY_SIZE; + AnimatePartySlot(gPartyMenu.slotId, 1); } static void CursorCb_NoEntry(u8 taskId) { - u8 unk; + u8 maxBattlers; u8 i, j; PlaySE(SE_SELECT); - PartyMenuRemoveWindow(&gUnknown_0203CEC4->windowId[0]); - PartyMenuRemoveWindow(&gUnknown_0203CEC4->windowId[1]); - unk = sub_81B8830(); - for (i = 0; i < unk; i++) + PartyMenuRemoveWindow(&sPartyMenuInternal->windowId[0]); + PartyMenuRemoveWindow(&sPartyMenuInternal->windowId[1]); + maxBattlers = GetMaxBattleEntries(); + for (i = 0; i < maxBattlers; i++) { - if (gSelectedOrderFromParty[i] == (gUnknown_0203CEC8.slotId + 1)) + if (gSelectedOrderFromParty[i] == (gPartyMenu.slotId + 1)) { - for (j = i; j < (unk - 1); j++) + for (j = i; j < (maxBattlers - 1); j++) gSelectedOrderFromParty[j] = gSelectedOrderFromParty[j + 1]; gSelectedOrderFromParty[j] = 0; break; } } - DisplayPartyPokemonSelectionText(1, &gUnknown_0203CEDC[gUnknown_0203CEC8.slotId], 1); - for (i = 0; i < (unk - 1); i++) + DisplayPartyPokemonDescriptionText(PARTYBOX_DESC_ABLE_3, &sPartyMenuBoxes[gPartyMenu.slotId], 1); + for (i = 0; i < (maxBattlers - 1); i++) { if (gSelectedOrderFromParty[i] != 0) - DisplayPartyPokemonSelectionText(i + 2, &gUnknown_0203CEDC[gSelectedOrderFromParty[i] - 1], 1); + DisplayPartyPokemonDescriptionText(i + PARTYBOX_DESC_FIRST, &sPartyMenuBoxes[gSelectedOrderFromParty[i] - 1], 1); } - DisplayPartyMenuStdMessage(0); - gTasks[taskId].func = sub_81B1370; + DisplayPartyMenuStdMessage(PARTY_MSG_CHOOSE_MON); + gTasks[taskId].func = Task_HandleChooseMonInput; } static void CursorCb_Store(u8 taskId) @@ -4632,9 +4814,9 @@ static void CursorCb_Store(u8 taskId) // Register mon for the Trading Board in Union Room static void CursorCb_Register(u8 taskId) { - u16 species2 = GetMonData(&gPlayerParty[gUnknown_0203CEC8.slotId], MON_DATA_SPECIES2); - u16 species = GetMonData(&gPlayerParty[gUnknown_0203CEC8.slotId], MON_DATA_SPECIES); - u8 obedience = GetMonData(&gPlayerParty[gUnknown_0203CEC8.slotId], MON_DATA_OBEDIENCE); + u16 species2 = GetMonData(&gPlayerParty[gPartyMenu.slotId], MON_DATA_SPECIES2); + u16 species = GetMonData(&gPlayerParty[gPartyMenu.slotId], MON_DATA_SPECIES); + u8 obedience = GetMonData(&gPlayerParty[gPartyMenu.slotId], MON_DATA_OBEDIENCE); switch (CanRegisterMonForTradingBoard(*(struct UnkLinkRfuStruct_02022B14Substruct *)sub_800F7DC(), species2, species, obedience)) { @@ -4650,29 +4832,29 @@ static void CursorCb_Register(u8 taskId) return; } PlaySE(SE_HAZURE); - PartyMenuRemoveWindow(&gUnknown_0203CEC4->windowId[0]); - PartyMenuRemoveWindow(&gUnknown_0203CEC4->windowId[1]); + PartyMenuRemoveWindow(&sPartyMenuInternal->windowId[0]); + PartyMenuRemoveWindow(&sPartyMenuInternal->windowId[1]); StringAppend(gStringVar4, gText_PauseUntilPress); - DisplayPartyMenuMessage(gStringVar4, 1); - gTasks[taskId].func = sub_81B1C1C; + DisplayPartyMenuMessage(gStringVar4, TRUE); + gTasks[taskId].func = Task_ReturnToChooseMonAfterText; } static void CursorCb_Trade1(u8 taskId) { - u16 species2 = GetMonData(&gPlayerParty[gUnknown_0203CEC8.slotId], MON_DATA_SPECIES2); - u16 species = GetMonData(&gPlayerParty[gUnknown_0203CEC8.slotId], MON_DATA_SPECIES); - u8 obedience = GetMonData(&gPlayerParty[gUnknown_0203CEC8.slotId], MON_DATA_OBEDIENCE); + u16 species2 = GetMonData(&gPlayerParty[gPartyMenu.slotId], MON_DATA_SPECIES2); + u16 species = GetMonData(&gPlayerParty[gPartyMenu.slotId], MON_DATA_SPECIES); + u8 obedience = GetMonData(&gPlayerParty[gPartyMenu.slotId], MON_DATA_OBEDIENCE); u32 stringId = GetUnionRoomTradeMessageId(*(struct UnkLinkRfuStruct_02022B14Substruct *)sub_800F7DC(), gUnknown_02022C38, species2, gUnionRoomOfferedSpecies, gUnionRoomRequestedMonType, species, obedience); if (stringId != UR_TRADE_MSG_NONE) { StringExpandPlaceholders(gStringVar4, sUnionRoomTradeMessages[stringId - 1]); PlaySE(SE_HAZURE); - PartyMenuRemoveWindow(&gUnknown_0203CEC4->windowId[0]); - PartyMenuRemoveWindow(&gUnknown_0203CEC4->windowId[1]); + PartyMenuRemoveWindow(&sPartyMenuInternal->windowId[0]); + PartyMenuRemoveWindow(&sPartyMenuInternal->windowId[1]); StringAppend(gStringVar4, gText_PauseUntilPress); - DisplayPartyMenuMessage(gStringVar4, 1); - gTasks[taskId].func = sub_81B1C1C; + DisplayPartyMenuMessage(gStringVar4, TRUE); + gTasks[taskId].func = Task_ReturnToChooseMonAfterText; } else { @@ -4681,11 +4863,13 @@ static void CursorCb_Trade1(u8 taskId) } } +// Spin Trade (based on the translation of the Japanese trade prompt) +// Not fully implemented, and normally unreachable because PARTY_MENU_TYPE_SPIN_TRADE is never used static void CursorCb_Trade2(u8 taskId) { - PartyMenuRemoveWindow(&gUnknown_0203CEC4->windowId[0]); - PartyMenuRemoveWindow(&gUnknown_0203CEC4->windowId[1]); - switch (CanTradeSelectedPartyMenuMon(gPlayerParty, gUnknown_0203CEC8.slotId)) + PartyMenuRemoveWindow(&sPartyMenuInternal->windowId[0]); + PartyMenuRemoveWindow(&sPartyMenuInternal->windowId[1]); + switch (CanSpinTradeMon(gPlayerParty, gPartyMenu.slotId)) { case CANT_TRADE_LAST_MON: StringExpandPlaceholders(gStringVar4, gText_OnlyPkmnForBattle); @@ -4693,33 +4877,34 @@ static void CursorCb_Trade2(u8 taskId) case CANT_TRADE_NATIONAL: StringExpandPlaceholders(gStringVar4, gText_PkmnCantBeTradedNow); break; - case CANT_TRADE_EGG: + case CANT_TRADE_EGG_YET: StringExpandPlaceholders(gStringVar4, gText_EggCantBeTradedNow); break; - default: + default: // CAN_TRADE_MON PlaySE(SE_SELECT); - GetMonNickname(&gPlayerParty[gUnknown_0203CEC8.slotId], gStringVar1); - StringExpandPlaceholders(gStringVar4, gJPText_PutVar1IntoSpinner); - DisplayPartyMenuMessage(gStringVar4, 1); - gTasks[taskId].func = sub_81B53FC; + GetMonNickname(&gPlayerParty[gPartyMenu.slotId], gStringVar1); + StringExpandPlaceholders(gStringVar4, gJPText_AreYouSureYouWantToSpinTradeMon); + DisplayPartyMenuMessage(gStringVar4, TRUE); + gTasks[taskId].func = Task_SpinTradeYesNo; return; } PlaySE(SE_HAZURE); StringAppend(gStringVar4, gText_PauseUntilPress); - DisplayPartyMenuMessage(gStringVar4, 1); - gTasks[taskId].func = sub_81B1C1C; + DisplayPartyMenuMessage(gStringVar4, TRUE); + gTasks[taskId].func = Task_ReturnToChooseMonAfterText; } -static void sub_81B53FC(u8 taskId) +static void Task_SpinTradeYesNo(u8 taskId) { - if (sub_81B1BD4() != TRUE) + if (IsPartyMenuTextPrinterActive() != TRUE) { - sub_81B334C(); - gTasks[taskId].func = sub_81B5430; + PartyMenuDisplayYesNoMenu(); + gTasks[taskId].func = Task_HandleSpinTradeYesNoInput; } } -static void sub_81B5430(u8 taskId) +// See comment on CursorCb_Trade2. Selecting YES (0) to spin trade just closes the party menu +static void Task_HandleSpinTradeYesNoInput(u8 taskId) { switch (Menu_ProcessInputNoWrapClearOnChoose()) { @@ -4728,39 +4913,40 @@ static void sub_81B5430(u8 taskId) break; case MENU_B_PRESSED: PlaySE(SE_SELECT); + // fallthrough case 1: - sub_81B1C1C(taskId); + Task_ReturnToChooseMonAfterText(taskId); break; } } static void CursorCb_FieldMove(u8 taskId) { - u8 fieldMove = gUnknown_0203CEC4->actions[Menu_GetCursorPos()] - MENU_FIELD_MOVES; + u8 fieldMove = sPartyMenuInternal->actions[Menu_GetCursorPos()] - MENU_FIELD_MOVES; const struct MapHeader *mapHeader; PlaySE(SE_SELECT); if (sFieldMoveCursorCallbacks[fieldMove].fieldMoveFunc == NULL) return; - PartyMenuRemoveWindow(&gUnknown_0203CEC4->windowId[0]); - PartyMenuRemoveWindow(&gUnknown_0203CEC4->windowId[1]); + PartyMenuRemoveWindow(&sPartyMenuInternal->windowId[0]); + PartyMenuRemoveWindow(&sPartyMenuInternal->windowId[1]); if (sub_81221AC() == TRUE || InUnionRoom() == TRUE) { if (fieldMove == FIELD_MOVE_MILK_DRINK || fieldMove == FIELD_MOVE_SOFT_BOILED) - DisplayPartyMenuStdMessage(13); + DisplayPartyMenuStdMessage(PARTY_MSG_CANT_USE_HERE); else DisplayPartyMenuStdMessage(sFieldMoveCursorCallbacks[fieldMove].msgId); - gTasks[taskId].func = task_brm_cancel_1_on_keypad_a_or_b; + gTasks[taskId].func = Task_CancelAfterAorBPress; } else { // All field moves before WATERFALL are HMs. if (fieldMove <= FIELD_MOVE_WATERFALL && FlagGet(FLAG_BADGE01_GET + fieldMove) != TRUE) { - DisplayPartyMenuMessage(gText_CantUseUntilNewBadge, 1); - gTasks[taskId].func = sub_81B1C1C; + DisplayPartyMenuMessage(gText_CantUseUntilNewBadge, TRUE); + gTasks[taskId].func = Task_ReturnToChooseMonAfterText; } else if (sFieldMoveCursorCallbacks[fieldMove].fieldMoveFunc() == TRUE) { @@ -4768,80 +4954,82 @@ static void CursorCb_FieldMove(u8 taskId) { case FIELD_MOVE_MILK_DRINK: case FIELD_MOVE_SOFT_BOILED: - sub_8161560(taskId); + ChooseMonForSoftboiled(taskId); break; case FIELD_MOVE_TELEPORT: mapHeader = Overworld_GetMapHeaderByGroupAndId(gSaveBlock1Ptr->lastHealLocation.mapGroup, gSaveBlock1Ptr->lastHealLocation.mapNum); - sub_81245DC(gStringVar1, mapHeader->regionMapSectionId); + GetMapNameGeneric(gStringVar1, mapHeader->regionMapSectionId); StringExpandPlaceholders(gStringVar4, gText_ReturnToHealingSpot); - sub_81B5674(taskId); - gUnknown_0203CEC4->data[0] = fieldMove; + DisplayFieldMoveExitAreaMessage(taskId); + sPartyMenuInternal->data[0] = fieldMove; break; case FIELD_MOVE_DIG: mapHeader = Overworld_GetMapHeaderByGroupAndId(gSaveBlock1Ptr->escapeWarp.mapGroup, gSaveBlock1Ptr->escapeWarp.mapNum); - sub_81245DC(gStringVar1, mapHeader->regionMapSectionId); + GetMapNameGeneric(gStringVar1, mapHeader->regionMapSectionId); StringExpandPlaceholders(gStringVar4, gText_EscapeFromHere); - sub_81B5674(taskId); - gUnknown_0203CEC4->data[0] = fieldMove; + DisplayFieldMoveExitAreaMessage(taskId); + sPartyMenuInternal->data[0] = fieldMove; break; case FIELD_MOVE_FLY: - gUnknown_0203CEC8.exitCallback = MCB2_FlyMap; + gPartyMenu.exitCallback = MCB2_FlyMap; Task_ClosePartyMenu(taskId); break; default: - gUnknown_0203CEC8.exitCallback = CB2_ReturnToField; + gPartyMenu.exitCallback = CB2_ReturnToField; Task_ClosePartyMenu(taskId); break; } } + // Cant use Field Move else { switch (fieldMove) { case FIELD_MOVE_SURF: - sub_81B5864(); + DisplayCantUseSurfMessage(); break; case FIELD_MOVE_FLASH: - sub_81B57DC(); + DisplayCantUseFlashMessage(); break; default: DisplayPartyMenuStdMessage(sFieldMoveCursorCallbacks[fieldMove].msgId); break; } - gTasks[taskId].func = task_brm_cancel_1_on_keypad_a_or_b; + gTasks[taskId].func = Task_CancelAfterAorBPress; } } } -static void sub_81B5674(u8 taskId) +static void DisplayFieldMoveExitAreaMessage(u8 taskId) { - DisplayPartyMenuMessage(gStringVar4, 1); - gTasks[taskId].func = sub_81B56A4; + DisplayPartyMenuMessage(gStringVar4, TRUE); + gTasks[taskId].func = Task_FieldMoveExitAreaYesNo; } -static void sub_81B56A4(u8 taskId) +static void Task_FieldMoveExitAreaYesNo(u8 taskId) { - if (sub_81B1BD4() != TRUE) + if (IsPartyMenuTextPrinterActive() != TRUE) { - sub_81B334C(); - gTasks[taskId].func = sub_81B56D8; + PartyMenuDisplayYesNoMenu(); + gTasks[taskId].func = Task_HandleFieldMoveExitAreaYesNoInput; } } -static void sub_81B56D8(u8 taskId) +static void Task_HandleFieldMoveExitAreaYesNoInput(u8 taskId) { switch (Menu_ProcessInputNoWrapClearOnChoose()) { case 0: - gUnknown_0203CEC8.exitCallback = CB2_ReturnToField; + gPartyMenu.exitCallback = CB2_ReturnToField; Task_ClosePartyMenu(taskId); break; case MENU_B_PRESSED: PlaySE(SE_SELECT); + // fallthrough case 1: gFieldCallback2 = NULL; gPostMenuFieldCallback = NULL; - sub_81B1C1C(taskId); + Task_ReturnToChooseMonAfterText(taskId); break; } } @@ -4849,40 +5037,40 @@ static void sub_81B56D8(u8 taskId) bool8 FieldCallback_PrepareFadeInFromMenu(void) { pal_fill_black(); - CreateTask(task_launch_hm_phase_2, 8); + CreateTask(Task_FieldMoveWaitForFade, 8); return TRUE; } -static void task_launch_hm_phase_2(u8 taskId) +static void Task_FieldMoveWaitForFade(u8 taskId) { if (IsWeatherNotFadingIn() == TRUE) { - gFieldEffectArguments[0] = brm_get_selected_species(); + gFieldEffectArguments[0] = GetFieldMoveMonSpecies(); gPostMenuFieldCallback(); DestroyTask(taskId); } } -static u16 brm_get_selected_species(void) +static u16 GetFieldMoveMonSpecies(void) { - return GetMonData(&gPlayerParty[gUnknown_0203CEC8.slotId], MON_DATA_SPECIES); + return GetMonData(&gPlayerParty[gPartyMenu.slotId], MON_DATA_SPECIES); } -static void task_brm_cancel_1_on_keypad_a_or_b(u8 taskId) +static void Task_CancelAfterAorBPress(u8 taskId) { if ((gMain.newKeys & A_BUTTON) || (gMain.newKeys & B_BUTTON)) CursorCb_Cancel1(taskId); } -static void sub_81B57DC(void) +static void DisplayCantUseFlashMessage(void) { if (FlagGet(FLAG_SYS_USE_FLASH) == TRUE) - DisplayPartyMenuStdMessage(12); + DisplayPartyMenuStdMessage(PARTY_MSG_ALREADY_IN_USE); else - DisplayPartyMenuStdMessage(13); + DisplayPartyMenuStdMessage(PARTY_MSG_CANT_USE_HERE); } -static void hm_surf_run_dp02scr(void) +static void FieldCallback_Surf(void) { gFieldEffectArguments[0] = GetCursorSelectionMonId(); FieldEffectStart(FLDEFF_USE_SURF); @@ -4893,18 +5081,18 @@ static bool8 SetUpFieldMove_Surf(void) if (PartyHasMonWithSurf() == TRUE && IsPlayerFacingSurfableFishableWater() == TRUE) { gFieldCallback2 = FieldCallback_PrepareFadeInFromMenu; - gPostMenuFieldCallback = hm_surf_run_dp02scr; + gPostMenuFieldCallback = FieldCallback_Surf; return TRUE; } return FALSE; } -static void sub_81B5864(void) +static void DisplayCantUseSurfMessage(void) { if (TestPlayerAvatarFlags(PLAYER_AVATAR_FLAG_SURFING)) - DisplayPartyMenuStdMessage(9); + DisplayPartyMenuStdMessage(PARTY_MSG_ALREADY_SURFING); else - DisplayPartyMenuStdMessage(8); + DisplayPartyMenuStdMessage(PARTY_MSG_CANT_SURF_HERE); } static bool8 SetUpFieldMove_Fly(void) @@ -4915,12 +5103,12 @@ static bool8 SetUpFieldMove_Fly(void) return FALSE; } -void sub_81B58A8(void) +void CB2_ReturnToPartyMenuFromFlyMap(void) { - InitPartyMenu(0, 0, 0, 1, 0, sub_81B1370, CB2_ReturnToFieldWithOpenMenu); + InitPartyMenu(PARTY_MENU_TYPE_FIELD, PARTY_LAYOUT_SINGLE, PARTY_ACTION_CHOOSE_MON, TRUE, PARTY_MSG_CHOOSE_MON, Task_HandleChooseMonInput, CB2_ReturnToFieldWithOpenMenu); } -static void hm2_waterfall(void) +static void FieldCallback_Waterfall(void) { gFieldEffectArguments[0] = GetCursorSelectionMonId(); FieldEffectStart(FLDEFF_USE_WATERFALL); @@ -4934,13 +5122,13 @@ static bool8 SetUpFieldMove_Waterfall(void) if (MetatileBehavior_IsWaterfall(MapGridGetMetatileBehaviorAt(x, y)) == TRUE && IsPlayerSurfingNorth() == TRUE) { gFieldCallback2 = FieldCallback_PrepareFadeInFromMenu; - gPostMenuFieldCallback = hm2_waterfall; + gPostMenuFieldCallback = FieldCallback_Waterfall; return TRUE; } return FALSE; } -static void sub_81B5958(void) +static void FieldCallback_Dive(void) { gFieldEffectArguments[0] = GetCursorSelectionMonId(); FieldEffectStart(FLDEFF_USE_DIVE); @@ -4952,34 +5140,34 @@ static bool8 SetUpFieldMove_Dive(void) if (gFieldEffectArguments[1] != 0) { gFieldCallback2 = FieldCallback_PrepareFadeInFromMenu; - gPostMenuFieldCallback = sub_81B5958; + gPostMenuFieldCallback = FieldCallback_Dive; return TRUE; } return FALSE; } -static void party_menu_icon_anim(struct Pokemon *mon, struct Struct203CEDC *ptr, u32 a) +static void party_menu_icon_anim(struct Pokemon *mon, struct PartyMenuBox *menuBox, u32 slot) { - u32 bit = 1; + bool32 bit = 1; u16 species2; if (IsMultiBattle() == TRUE && gMain.inBattle) - bit = (gUnknown_08616020[a] ^ bit) ? 1 : 0; + bit = (sMultiBattlePartnersPartyMask[slot] ^ bit) ? 1 : 0; species2 = GetMonData(mon, MON_DATA_SPECIES2); - party_menu_link_mon_icon_anim(species2, GetMonData(mon, MON_DATA_PERSONALITY), ptr, 1, bit); - sub_81B5B38(ptr->monSpriteId, mon); + party_menu_link_mon_icon_anim(species2, GetMonData(mon, MON_DATA_PERSONALITY), menuBox, 1, bit); + UpdatePartyMonHPBar(menuBox->monSpriteId, mon); } -static void party_menu_link_mon_icon_anim(u16 species, u32 pid, struct Struct203CEDC *ptr, u8 priority, u32 bit) +static void party_menu_link_mon_icon_anim(u16 species, u32 pid, struct PartyMenuBox *menuBox, u8 priority, bool32 bit) { if (species != SPECIES_NONE) { - ptr->monSpriteId = CreateMonIcon(species, UpdateTradeMonIconFrame, ptr->unk4[0], ptr->unk4[1], 4, pid, bit); - gSprites[ptr->monSpriteId].oam.priority = priority; + menuBox->monSpriteId = CreateMonIcon(species, UpdateTradeMonIconFrame, menuBox->spriteCoords[0], menuBox->spriteCoords[1], 4, pid, bit); + gSprites[menuBox->monSpriteId].oam.priority = priority; } } -static void sub_81B5A8C(u8 spriteId, u16 hp, u16 maxhp) +static void UpdateHPBar(u8 spriteId, u16 hp, u16 maxhp) { switch (GetHPBarLevel(hp, maxhp)) { @@ -5001,15 +5189,15 @@ static void sub_81B5A8C(u8 spriteId, u16 hp, u16 maxhp) } } -static void sub_81B5B38(u8 spriteId, struct Pokemon *mon) +static void UpdatePartyMonHPBar(u8 spriteId, struct Pokemon *mon) { - sub_81B5A8C(spriteId, GetMonData(mon, MON_DATA_HP), GetMonData(mon, MON_DATA_MAX_HP)); + UpdateHPBar(spriteId, GetMonData(mon, MON_DATA_HP), GetMonData(mon, MON_DATA_MAX_HP)); } -static void AnimateSelectedPartyIcon(u8 spriteId, u8 a) +static void AnimateSelectedPartyIcon(u8 spriteId, u8 animNum) { gSprites[spriteId].data[0] = 0; - if (a == 0) + if (animNum == 0) { if (gSprites[spriteId].pos1.x == 16) { @@ -5049,43 +5237,43 @@ static void UpdatePartyMonIconFrame(struct Sprite *sprite) UpdateMonIconFrame(sprite); } -static void party_menu_held_item_object(struct Pokemon *mon, struct Struct203CEDC *ptr) +static void party_menu_held_item_object(struct Pokemon *mon, struct PartyMenuBox *menuBox) { if (GetMonData(mon, MON_DATA_SPECIES) != SPECIES_NONE) { - ptr->itemSpriteId = CreateSprite(&sSpriteTemplate_HeldItem, ptr->unk4[2], ptr->unk4[3], 0); - sub_81B5C94(mon, ptr); + menuBox->itemSpriteId = CreateSprite(&sSpriteTemplate_HeldItem, menuBox->spriteCoords[2], menuBox->spriteCoords[3], 0); + UpdatePartyMonHeldItemSprite(mon, menuBox); } } -static void party_menu_link_mon_held_item_object(u16 species, u16 item, struct Struct203CEDC *ptr) +static void party_menu_link_mon_held_item_object(u16 species, u16 item, struct PartyMenuBox *menuBox) { if (species != SPECIES_NONE) { - ptr->itemSpriteId = CreateSprite(&sSpriteTemplate_HeldItem, ptr->unk4[2], ptr->unk4[3], 0); - gSprites[ptr->itemSpriteId].oam.priority = 0; - sub_81B5CB0(item, ptr); + menuBox->itemSpriteId = CreateSprite(&sSpriteTemplate_HeldItem, menuBox->spriteCoords[2], menuBox->spriteCoords[3], 0); + gSprites[menuBox->itemSpriteId].oam.priority = 0; + ShowOrHideHeldItemSprite(item, menuBox); } } -static void sub_81B5C94(struct Pokemon *mon, struct Struct203CEDC *ptr) +static void UpdatePartyMonHeldItemSprite(struct Pokemon *mon, struct PartyMenuBox *menuBox) { - sub_81B5CB0(GetMonData(mon, MON_DATA_HELD_ITEM), ptr); + ShowOrHideHeldItemSprite(GetMonData(mon, MON_DATA_HELD_ITEM), menuBox); } -static void sub_81B5CB0(u16 item, struct Struct203CEDC *ptr) +static void ShowOrHideHeldItemSprite(u16 item, struct PartyMenuBox *menuBox) { if (item == ITEM_NONE) { - gSprites[ptr->itemSpriteId].invisible = TRUE; + gSprites[menuBox->itemSpriteId].invisible = TRUE; } else { if (ItemIsMail(item)) - StartSpriteAnim(&gSprites[ptr->itemSpriteId], 1); + StartSpriteAnim(&gSprites[menuBox->itemSpriteId], 1); else - StartSpriteAnim(&gSprites[ptr->itemSpriteId], 0); - gSprites[ptr->itemSpriteId].invisible = FALSE; + StartSpriteAnim(&gSprites[menuBox->itemSpriteId], 0); + gSprites[menuBox->itemSpriteId].invisible = FALSE; } } @@ -5150,22 +5338,22 @@ static void SpriteCB_HeldItem(struct Sprite *sprite) } } -static void party_menu_pokeball_object(struct Pokemon *mon, struct Struct203CEDC *ptr) +static void party_menu_pokeball_object(struct Pokemon *mon, struct PartyMenuBox *menuBox) { if (GetMonData(mon, MON_DATA_SPECIES) != SPECIES_NONE) - ptr->pokeballSpriteId = CreateSprite(&sSpriteTemplate_MenuPokeball, ptr->unk4[6], ptr->unk4[7], 8); + menuBox->pokeballSpriteId = CreateSprite(&sSpriteTemplate_MenuPokeball, menuBox->spriteCoords[6], menuBox->spriteCoords[7], 8); } -static void party_menu_link_mon_pokeball_object(u16 species, struct Struct203CEDC *ptr) +static void party_menu_link_mon_pokeball_object(u16 species, struct PartyMenuBox *menuBox) { if (species != SPECIES_NONE) { - ptr->pokeballSpriteId = CreateSprite(&sSpriteTemplate_MenuPokeball, ptr->unk4[6], ptr->unk4[7], 8); - gSprites[ptr->pokeballSpriteId].oam.priority = 0; + menuBox->pokeballSpriteId = CreateSprite(&sSpriteTemplate_MenuPokeball, menuBox->spriteCoords[6], menuBox->spriteCoords[7], 8); + gSprites[menuBox->pokeballSpriteId].oam.priority = 0; } } -static u8 sub_81B5F34(u8 x, u8 y) +static u8 CreateCancelPokeballSprite(u8 x, u8 y) { u8 spriteId = CreateSprite(&sSpriteTemplate_MenuPokeball, x, y, 8); @@ -5173,14 +5361,15 @@ static u8 sub_81B5F34(u8 x, u8 y) return spriteId; } -static u8 sub_81B5F74(u8 x, u8 y) +// For Confirm and Cancel in Choose 3 party menus +static u8 CreateMenuPokeballSprite(u8 x, u8 y) { return CreateSprite(&gSpriteTemplate_8615F78, x, y, 8); } -static void sub_81B5F98(u8 spriteId, u8 a) +static void PartyMenuStartSpriteAnim(u8 spriteId, u8 animNum) { - StartSpriteAnim(&gSprites[spriteId], a); + StartSpriteAnim(&gSprites[spriteId], animNum); } static void sub_81B5FBC(u8 spriteId, u8 spriteId2, u8 a) @@ -5208,41 +5397,41 @@ static void LoadPartyMenuPokeballGfx(void) LoadCompressedSpritePalette(&sSpritePalette_MenuPokeball); } -static void party_menu_status_condition_object(struct Pokemon *mon, struct Struct203CEDC *ptr) +static void party_menu_status_condition_object(struct Pokemon *mon, struct PartyMenuBox *menuBox) { if (GetMonData(mon, MON_DATA_SPECIES) != SPECIES_NONE) { - ptr->statusSpriteId = CreateSprite(&sSpriteTemplate_StatusIcons, ptr->unk4[4], ptr->unk4[5], 0); - party_menu_get_status_condition_and_update_object(mon, ptr); + menuBox->statusSpriteId = CreateSprite(&sSpriteTemplate_StatusIcons, menuBox->spriteCoords[4], menuBox->spriteCoords[5], 0); + SetPartyMonAilmentGfx(mon, menuBox); } } -static void party_menu_link_mon_status_condition_object(u16 species, u8 status, struct Struct203CEDC *ptr) +static void party_menu_link_mon_status_condition_object(u16 species, u8 status, struct PartyMenuBox *menuBox) { if (species != SPECIES_NONE) { - ptr->statusSpriteId = CreateSprite(&sSpriteTemplate_StatusIcons, ptr->unk4[4], ptr->unk4[5], 0); - party_menu_update_status_condition_object(status, ptr); - gSprites[ptr->statusSpriteId].oam.priority = 0; + menuBox->statusSpriteId = CreateSprite(&sSpriteTemplate_StatusIcons, menuBox->spriteCoords[4], menuBox->spriteCoords[5], 0); + UpdatePartyMonAilmentGfx(status, menuBox); + gSprites[menuBox->statusSpriteId].oam.priority = 0; } } -static void party_menu_get_status_condition_and_update_object(struct Pokemon *mon, struct Struct203CEDC *ptr) +static void SetPartyMonAilmentGfx(struct Pokemon *mon, struct PartyMenuBox *menuBox) { - party_menu_update_status_condition_object(GetMonAilment(mon), ptr); + UpdatePartyMonAilmentGfx(GetMonAilment(mon), menuBox); } -static void party_menu_update_status_condition_object(u8 status, struct Struct203CEDC *ptr) +static void UpdatePartyMonAilmentGfx(u8 status, struct PartyMenuBox *menuBox) { switch (status) { case AILMENT_NONE: case AILMENT_PKRS: - gSprites[ptr->statusSpriteId].invisible = TRUE; + gSprites[menuBox->statusSpriteId].invisible = TRUE; break; default: - StartSpriteAnim(&gSprites[ptr->statusSpriteId], status - 1); - gSprites[ptr->statusSpriteId].invisible = FALSE; + StartSpriteAnim(&gSprites[menuBox->statusSpriteId], status - 1); + gSprites[menuBox->statusSpriteId].invisible = FALSE; break; } } @@ -5253,68 +5442,68 @@ static void LoadPartyMenuAilmentGfx(void) LoadCompressedSpritePalette(&sSpritePalette_StatusIcons); } -void sub_81B617C(void) +void CB2_ShowPartyMenuForItemUse(void) { - MainCallback callback = c2_815ABFC; - u8 doubleBattleStatus; - bool8 inBattle; + MainCallback callback = CB2_ReturnToBagMenu; + u8 partyLayout; + u8 menuType; u8 i; - u8 msgIdMaybe; + u8 msgId; TaskFunc task; if (gMain.inBattle) { - inBattle = TRUE; - doubleBattleStatus = sub_81B8984(); + menuType = PARTY_MENU_TYPE_IN_BATTLE; + partyLayout = GetPartyLayoutFromBattleType(); } else { - inBattle = FALSE; - doubleBattleStatus = 0; + menuType = PARTY_MENU_TYPE_FIELD; + partyLayout = PARTY_LAYOUT_SINGLE; } if (GetItemEffectType(gSpecialVar_ItemId) == ITEM_EFFECT_SACRED_ASH) { - gUnknown_0203CEC8.slotId = 0; + gPartyMenu.slotId = 0; for (i = 0; i < PARTY_SIZE; i++) { if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES) != SPECIES_NONE && GetMonData(&gPlayerParty[i], MON_DATA_HP) == 0) { - gUnknown_0203CEC8.slotId = i; + gPartyMenu.slotId = i; break; } } task = sub_81B6280; - msgIdMaybe = 0x7F; + msgId = PARTY_MSG_NONE; } else { if (GetPocketByItemId(gSpecialVar_ItemId) == POCKET_TM_HM) - msgIdMaybe = 4; + msgId = PARTY_MSG_TEACH_WHICH_MON; else - msgIdMaybe = 5; + msgId = PARTY_MSG_USE_ON_WHICH_MON; - task = sub_81B1370; + task = Task_HandleChooseMonInput; } - InitPartyMenu(inBattle, doubleBattleStatus, 3, 1, msgIdMaybe, task, callback); + InitPartyMenu(menuType, partyLayout, PARTY_ACTION_USE_ITEM, TRUE, msgId, task, callback); } -static void c2_815ABFC(void) +static void CB2_ReturnToBagMenu(void) { if (InBattlePyramid() == FALSE) GoToBagMenu(RETURN_LOCATION_UNCHANGED, POCKETS_COUNT, NULL); else - sub_81C4F98(4, gPyramidBagCursorData.callback); + GoToBattlePyramidBagMenu(4, gPyramidBagCursorData.callback); } static void sub_81B6280(u8 taskId) { if (!gPaletteFade.active) { - if (gUnknown_0203CEC8.unk8_0 == 1) - gUnknown_0203CEC4->exitCallback = sub_81B9140; - gUnknown_03006328(taskId, sub_81B6794); + if (gPartyMenu.menuType == PARTY_MENU_TYPE_IN_BATTLE) + sPartyMenuInternal->exitCallback = CB2_SetUpExitToBattleScreen; + gItemUseCB(taskId, Task_ClosePartyMenuAfterText); } } @@ -5398,7 +5587,7 @@ static void GetMedicineItemEffectMessage(u16 item) } } -static bool8 UsingHPEVItemOnShedinja(struct Pokemon *mon, u16 item) +static bool8 NotUsingHPEVItemOnShedinja(struct Pokemon *mon, u16 item) { if (GetItemEffectType(item) == ITEM_EFFECT_HP_EV && GetMonData(mon, MON_DATA_SPECIES) == SPECIES_SHEDINJA) return FALSE; @@ -5412,10 +5601,10 @@ static bool8 IsItemFlute(u16 item) return FALSE; } -static bool8 ExecuteTableBasedItemEffect__(u8 partyMonIndex, u16 item, u8 monMoveIndex) +static bool8 ExecuteTableBasedItemEffect_(u8 partyMonIndex, u16 item, u8 monMoveIndex) { if (gMain.inBattle) - return ExecuteTableBasedItemEffect(&gPlayerParty[partyMonIndex], item, sub_81B8F38(partyMonIndex), monMoveIndex); + return ExecuteTableBasedItemEffect(&gPlayerParty[partyMonIndex], item, GetPartyIdFromBattleSlot(partyMonIndex), monMoveIndex); else return ExecuteTableBasedItemEffect(&gPlayerParty[partyMonIndex], item, partyMonIndex, monMoveIndex); } @@ -5423,11 +5612,11 @@ static bool8 ExecuteTableBasedItemEffect__(u8 partyMonIndex, u16 item, u8 monMov void ItemUseCB_Medicine(u8 taskId, TaskFunc task) { u16 hp = 0; - struct Pokemon *mon = &gPlayerParty[gUnknown_0203CEC8.slotId]; + struct Pokemon *mon = &gPlayerParty[gPartyMenu.slotId]; u16 item = gSpecialVar_ItemId; bool8 canHeal; - if (UsingHPEVItemOnShedinja(mon, item)) + if (NotUsingHPEVItemOnShedinja(mon, item)) { canHeal = IsHPRecoveryItem(item); if (canHeal == TRUE) @@ -5436,12 +5625,12 @@ void ItemUseCB_Medicine(u8 taskId, TaskFunc task) if (hp == GetMonData(mon, MON_DATA_MAX_HP)) canHeal = FALSE; } - if (ExecuteTableBasedItemEffect__(gUnknown_0203CEC8.slotId, item, 0)) + if (ExecuteTableBasedItemEffect_(gPartyMenu.slotId, item, 0)) { iTriedHonestlyIDid: - gUnknown_0203CEE8 = 0; + gUnknown_0203CEE8 = FALSE; PlaySE(SE_SELECT); - DisplayPartyMenuMessage(gText_WontHaveEffect, 1); + DisplayPartyMenuMessage(gText_WontHaveEffect, TRUE); schedule_bg_copy_tilemap_to_vram(2); gTasks[taskId].func = task; return; @@ -5449,89 +5638,89 @@ void ItemUseCB_Medicine(u8 taskId, TaskFunc task) } else { - goto iTriedHonestlyIDid; + goto iTriedHonestlyIDid; //TODO: resolve this goto } - gUnknown_0203CEE8 = 1; - if (IsItemFlute(item) == FALSE) + gUnknown_0203CEE8 = TRUE; + if (!IsItemFlute(item)) { PlaySE(SE_KAIFUKU); - if (gUnknown_0203CEC8.unkB != 14) + if (gPartyMenu.action != PARTY_ACTION_REUSABLE_ITEM) RemoveBagItem(item, 1); } else { PlaySE(SE_BIDORO); } - party_menu_get_status_condition_and_update_object(mon, &gUnknown_0203CEDC[gUnknown_0203CEC8.slotId]); - if (gSprites[gUnknown_0203CEDC[gUnknown_0203CEC8.slotId].statusSpriteId].invisible) - DisplayPartyPokemonLevelCheck(mon, &gUnknown_0203CEDC[gUnknown_0203CEC8.slotId], 1); + SetPartyMonAilmentGfx(mon, &sPartyMenuBoxes[gPartyMenu.slotId]); + if (gSprites[sPartyMenuBoxes[gPartyMenu.slotId].statusSpriteId].invisible) + DisplayPartyPokemonLevelCheck(mon, &sPartyMenuBoxes[gPartyMenu.slotId], 1); if (canHeal == TRUE) { if (hp == 0) - sub_81B0FCC(gUnknown_0203CEC8.slotId, 1); - sub_81B1F18(taskId, gUnknown_0203CEC8.slotId, 1, GetMonData(mon, MON_DATA_HP) - hp, sub_81B672C); - sub_81B1FA8(taskId, 0, hp); + AnimatePartySlot(gPartyMenu.slotId, 1); + PartyMenuModifyHP(taskId, gPartyMenu.slotId, 1, GetMonData(mon, MON_DATA_HP) - hp, Task_DisplayHPRestoredMessage); + ResetHPTaskData(taskId, 0, hp); return; } else { GetMonNickname(mon, gStringVar1); GetMedicineItemEffectMessage(item); - DisplayPartyMenuMessage(gStringVar4, 1); + DisplayPartyMenuMessage(gStringVar4, TRUE); schedule_bg_copy_tilemap_to_vram(2); gTasks[taskId].func = task; } } -static void sub_81B672C(u8 taskId) +static void Task_DisplayHPRestoredMessage(u8 taskId) { - GetMonNickname(&gPlayerParty[gUnknown_0203CEC8.slotId], gStringVar1); + GetMonNickname(&gPlayerParty[gPartyMenu.slotId], gStringVar1); StringExpandPlaceholders(gStringVar4, gText_PkmnHPRestoredByVar2); - DisplayPartyMenuMessage(gStringVar4, 0); + DisplayPartyMenuMessage(gStringVar4, FALSE); schedule_bg_copy_tilemap_to_vram(2); HandleBattleLowHpMusicChange(); - gTasks[taskId].func = sub_81B6794; + gTasks[taskId].func = Task_ClosePartyMenuAfterText; } -static void sub_81B6794(u8 taskId) +static void Task_ClosePartyMenuAfterText(u8 taskId) { - if (sub_81B1BD4() != TRUE) + if (IsPartyMenuTextPrinterActive() != TRUE) { - if (gUnknown_0203CEE8 == 0) - gUnknown_0203CEC4->exitCallback = NULL; + if (gUnknown_0203CEE8 == FALSE) + sPartyMenuInternal->exitCallback = NULL; Task_ClosePartyMenu(taskId); } } -void sub_81B67C8(u8 taskId, TaskFunc task) +void ItemUseCB_ReduceEV(u8 taskId, TaskFunc task) { - struct Pokemon *mon = &gPlayerParty[gUnknown_0203CEC8.slotId]; + struct Pokemon *mon = &gPlayerParty[gPartyMenu.slotId]; u16 item = gSpecialVar_ItemId; u8 effectType = GetItemEffectType(item); u16 friendship = GetMonData(mon, MON_DATA_FRIENDSHIP); - u16 relevantEV = ItemEffectToMonEv(mon, effectType); - bool8 cannotUseEffect = ExecuteTableBasedItemEffect__(gUnknown_0203CEC8.slotId, item, 0); + u16 ev = ItemEffectToMonEv(mon, effectType); + bool8 cannotUseEffect = ExecuteTableBasedItemEffect_(gPartyMenu.slotId, item, 0); u16 newFriendship = GetMonData(mon, MON_DATA_FRIENDSHIP); - u16 newRelevantEV = ItemEffectToMonEv(mon, effectType); + u16 newEv = ItemEffectToMonEv(mon, effectType); - if (cannotUseEffect || (friendship == newFriendship && relevantEV == newRelevantEV)) + if (cannotUseEffect || (friendship == newFriendship && ev == newEv)) { - gUnknown_0203CEE8 = 0; + gUnknown_0203CEE8 = FALSE; PlaySE(SE_SELECT); - DisplayPartyMenuMessage(gText_WontHaveEffect, 1); + DisplayPartyMenuMessage(gText_WontHaveEffect, TRUE); schedule_bg_copy_tilemap_to_vram(2); gTasks[taskId].func = task; } else { - gUnknown_0203CEE8 = 1; + gUnknown_0203CEE8 = TRUE; PlaySE(SE_KAIFUKU); RemoveBagItem(item, 1); GetMonNickname(mon, gStringVar1); ItemEffectToStatString(effectType, gStringVar2); if (friendship != newFriendship) { - if (relevantEV != newRelevantEV) + if (ev != newEv) StringExpandPlaceholders(gStringVar4, gText_PkmnFriendlyBaseVar2Fell); else StringExpandPlaceholders(gStringVar4, gText_PkmnFriendlyBaseVar2CantFall); @@ -5540,7 +5729,7 @@ void sub_81B67C8(u8 taskId, TaskFunc task) { StringExpandPlaceholders(gStringVar4, gText_PkmnAdoresBaseVar2Fell); } - DisplayPartyMenuMessage(gStringVar4, 1); + DisplayPartyMenuMessage(gStringVar4, TRUE); schedule_bg_copy_tilemap_to_vram(2); gTasks[taskId].func = task; } @@ -5593,18 +5782,18 @@ static void ItemEffectToStatString(u8 effectType, u8 *dest) } } -static void sub_81B6A10(u8 slot) +static void ShowMoveSelectWindow(u8 slot) { u8 i; u8 moveCount = 0; u8 fontId = 1; - u8 windowId = sub_81B31B0(3); + u8 windowId = DisplaySelectionWindow(SELECTWINDOW_MOVES); u16 move; for (i = 0; i < MAX_MON_MOVES; i++) { move = GetMonData(&gPlayerParty[slot], MON_DATA_MOVE1 + i); - AddTextPrinterParameterized(windowId, fontId, gMoveNames[move], 8, (i * 16) + 1, 0xFF, NULL); + AddTextPrinterParameterized(windowId, fontId, gMoveNames[move], 8, (i * 16) + 1, TEXT_SPEED_FF, NULL); if (move != MOVE_NONE) moveCount++; } @@ -5612,7 +5801,7 @@ static void sub_81B6A10(u8 slot) schedule_bg_copy_tilemap_to_vram(2); } -static void ether_effect_related_3(u8 taskId) +static void Task_HandleWhichMoveInput(u8 taskId) { s8 input = Menu_ProcessInput(); @@ -5621,17 +5810,17 @@ static void ether_effect_related_3(u8 taskId) if (input == MENU_B_PRESSED) { PlaySE(SE_SELECT); - sub_81B6BB4(taskId); + ReturnToUseOnWhichMon(taskId); } else { - PartyMenuRemoveWindow(&gUnknown_0203CEC4->windowId[1]); - ether_effect_related_2(taskId); + PartyMenuRemoveWindow(&sPartyMenuInternal->windowId[1]); + SetSelectedMoveForPPItem(taskId); } } } -void dp05_ether(u8 taskId, TaskFunc task) +void ItemUseCB_PPRecovery(u8 taskId, TaskFunc task) { const u8 *effect; u16 item = gSpecialVar_ItemId; @@ -5643,76 +5832,76 @@ void dp05_ether(u8 taskId, TaskFunc task) if (!(effect[4] & ITEM4_HEAL_PP_ONE)) { - gUnknown_0203CEC8.unkE = 0; - ether_effect_related(taskId); + gPartyMenu.unkE = 0; + TryUsePPItem(taskId); } else { PlaySE(SE_SELECT); - DisplayPartyMenuStdMessage(22); - sub_81B6A10(gUnknown_0203CEC8.slotId); - gTasks[taskId].func = ether_effect_related_3; + DisplayPartyMenuStdMessage(PARTY_MSG_RESTORE_WHICH_MOVE); + ShowMoveSelectWindow(gPartyMenu.slotId); + gTasks[taskId].func = Task_HandleWhichMoveInput; } } -static void ether_effect_related_2(u8 taskId) +static void SetSelectedMoveForPPItem(u8 taskId) { - PartyMenuRemoveWindow(&gUnknown_0203CEC4->windowId[0]); - gUnknown_0203CEC8.unkE = Menu_GetCursorPos(); - ether_effect_related(taskId); + PartyMenuRemoveWindow(&sPartyMenuInternal->windowId[0]); + gPartyMenu.unkE = Menu_GetCursorPos(); + TryUsePPItem(taskId); } -static void sub_81B6BB4(u8 taskId) +static void ReturnToUseOnWhichMon(u8 taskId) { - gTasks[taskId].func = sub_81B1370; - gUnknown_0203CEC4->exitCallback = NULL; - PartyMenuRemoveWindow(&gUnknown_0203CEC4->windowId[0]); - DisplayPartyMenuStdMessage(5); + gTasks[taskId].func = Task_HandleChooseMonInput; + sPartyMenuInternal->exitCallback = NULL; + PartyMenuRemoveWindow(&sPartyMenuInternal->windowId[0]); + DisplayPartyMenuStdMessage(PARTY_MSG_USE_ON_WHICH_MON); } -static void ether_effect_related(u8 taskId) +static void TryUsePPItem(u8 taskId) { u16 move = MOVE_NONE; - s16 *moveslot = &gUnknown_0203CEC8.unkE; + s16 *moveSlot = &gPartyMenu.unkE; u16 item = gSpecialVar_ItemId; - struct Struct203CEC8 *ptr = &gUnknown_0203CEC8; + struct PartyMenu *ptr = &gPartyMenu; struct Pokemon *mon; - if (ExecuteTableBasedItemEffect__(ptr->slotId, item, *moveslot)) + if (ExecuteTableBasedItemEffect_(ptr->slotId, item, *moveSlot)) { - gUnknown_0203CEE8 = 0; + gUnknown_0203CEE8 = FALSE; PlaySE(SE_SELECT); - DisplayPartyMenuMessage(gText_WontHaveEffect, 1); + DisplayPartyMenuMessage(gText_WontHaveEffect, TRUE); schedule_bg_copy_tilemap_to_vram(2); - gTasks[taskId].func = sub_81B6794; + gTasks[taskId].func = Task_ClosePartyMenuAfterText; } else { - gUnknown_0203CEE8 = 1; + gUnknown_0203CEE8 = TRUE; mon = &gPlayerParty[ptr->slotId]; PlaySE(SE_KAIFUKU); RemoveBagItem(item, 1); - move = GetMonData(mon, MON_DATA_MOVE1 + *moveslot); + move = GetMonData(mon, MON_DATA_MOVE1 + *moveSlot); StringCopy(gStringVar1, gMoveNames[move]); GetMedicineItemEffectMessage(item); - DisplayPartyMenuMessage(gStringVar4, 1); + DisplayPartyMenuMessage(gStringVar4, TRUE); schedule_bg_copy_tilemap_to_vram(2); - gTasks[taskId].func = sub_81B6794; + gTasks[taskId].func = Task_ClosePartyMenuAfterText; } } -void dp05_pp_up(u8 taskId, TaskFunc task) +void ItemUseCB_PPUp(u8 taskId, TaskFunc task) { PlaySE(SE_SELECT); - DisplayPartyMenuStdMessage(23); - sub_81B6A10(gUnknown_0203CEC8.slotId); - gTasks[taskId].func = ether_effect_related_3; + DisplayPartyMenuStdMessage(PARTY_MSG_BOOST_PP_WHICH_MOVE); + ShowMoveSelectWindow(gPartyMenu.slotId); + gTasks[taskId].func = Task_HandleWhichMoveInput; } u16 ItemIdToBattleMoveId(u16 item) { u16 tmNumber = item - ITEM_TM01_FOCUS_PUNCH; - return gTMHMMoves[tmNumber]; + return sTMHMMoves[tmNumber]; } bool8 IsMoveHm(u16 move) @@ -5721,7 +5910,7 @@ bool8 IsMoveHm(u16 move) for (i = 0; i < NUM_HIDDEN_MACHINES; i++) { - if (gTMHMMoves[i + NUM_TECHNICAL_MACHINES] == move) + if (sTMHMMoves[i + NUM_TECHNICAL_MACHINES] == move) return TRUE; } return FALSE; @@ -5739,30 +5928,30 @@ bool8 MonKnowsMove(struct Pokemon *mon, u16 move) return FALSE; } -static void sub_81B6D74(const u8 *str) +static void DisplayLearnMoveMessage(const u8 *str) { StringExpandPlaceholders(gStringVar4, str); - DisplayPartyMenuMessage(gStringVar4, 1); + DisplayPartyMenuMessage(gStringVar4, TRUE); schedule_bg_copy_tilemap_to_vram(2); } -static void sub_81B6D98(u8 taskId, const u8 *str) +static void DisplayLearnMoveMessageAndClose(u8 taskId, const u8 *str) { - sub_81B6D74(str); - gTasks[taskId].func = sub_81B6794; + DisplayLearnMoveMessage(str); + gTasks[taskId].func = Task_ClosePartyMenuAfterText; } // move[1] doesn't use constants cause I don't know if it's actually a move ID storage -void sub_81B6DC4(u8 taskId, TaskFunc task) +void ItemUseCB_TMHM(u8 taskId, TaskFunc task) { struct Pokemon *mon; s16 *move; u16 item; PlaySE(SE_SELECT); - mon = &gPlayerParty[gUnknown_0203CEC8.slotId]; - move = &gUnknown_0203CEC8.unkE; + mon = &gPlayerParty[gPartyMenu.slotId]; + move = &gPartyMenu.unkE; item = gSpecialVar_ItemId; GetMonNickname(mon, gStringVar1); move[0] = ItemIdToBattleMoveId(item); @@ -5772,28 +5961,28 @@ void sub_81B6DC4(u8 taskId, TaskFunc task) switch (CanMonLearnTMTutor(mon, item, 0)) { case CANNOT_LEARN_MOVE: - sub_81B6D98(taskId, gText_PkmnCantLearnMove); + DisplayLearnMoveMessageAndClose(taskId, gText_PkmnCantLearnMove); return; case ALREADY_KNOWS_MOVE: - sub_81B6D98(taskId, gText_PkmnAlreadyKnows); + DisplayLearnMoveMessageAndClose(taskId, gText_PkmnAlreadyKnows); return; } - if (GiveMoveToMon(mon, move[0]) != 0xFFFF) + if (GiveMoveToMon(mon, move[0]) != MON_HAS_MAX_MOVES) { - gTasks[taskId].func = sub_81B6EB4; + gTasks[taskId].func = Task_LearnedMove; } else { - sub_81B6D74(gText_PkmnNeedsToReplaceMove); - gTasks[taskId].func = sub_81B6FF4; + DisplayLearnMoveMessage(gText_PkmnNeedsToReplaceMove); + gTasks[taskId].func = Task_ReplaceMoveYesNo; } } -static void sub_81B6EB4(u8 taskId) +static void Task_LearnedMove(u8 taskId) { - struct Pokemon *mon = &gPlayerParty[gUnknown_0203CEC8.slotId]; - s16 *move = &gUnknown_0203CEC8.unkE; + struct Pokemon *mon = &gPlayerParty[gPartyMenu.slotId]; + s16 *move = &gPartyMenu.unkE; u16 item = gSpecialVar_ItemId; if (move[1] == 0) @@ -5805,186 +5994,188 @@ static void sub_81B6EB4(u8 taskId) GetMonNickname(mon, gStringVar1); StringCopy(gStringVar2, gMoveNames[move[0]]); StringExpandPlaceholders(gStringVar4, gText_PkmnLearnedMove3); - DisplayPartyMenuMessage(gStringVar4, 1); + DisplayPartyMenuMessage(gStringVar4, TRUE); schedule_bg_copy_tilemap_to_vram(2); - gTasks[taskId].func = sub_81B6F60; + gTasks[taskId].func = Task_DoLearnedMoveFanfareAfterText; } -static void sub_81B6F60(u8 taskId) +static void Task_DoLearnedMoveFanfareAfterText(u8 taskId) { - if (sub_81B1BD4() != TRUE) + if (IsPartyMenuTextPrinterActive() != TRUE) { PlayFanfare(MUS_FANFA1); - gTasks[taskId].func = sub_81B6F98; + gTasks[taskId].func = Task_LearnNextMoveOrClosePartyMenu; } } -static void sub_81B6F98(u8 taskId) +static void Task_LearnNextMoveOrClosePartyMenu(u8 taskId) { if (IsFanfareTaskInactive() && ((gMain.newKeys & A_BUTTON) || (gMain.newKeys & B_BUTTON))) { - if (gUnknown_0203CEC8.unk10 == 1) - sub_81B77AC(taskId); + if (gPartyMenu.learnMoveState == 1) + Task_TryLearningNextMove(taskId); else { - if (gUnknown_0203CEC8.unk10 == 2) + if (gPartyMenu.learnMoveState == 2) // never occurs gSpecialVar_Result = TRUE; Task_ClosePartyMenu(taskId); } } } -static void sub_81B6FF4(u8 taskId) +static void Task_ReplaceMoveYesNo(u8 taskId) { - if (sub_81B1BD4() != TRUE) + if (IsPartyMenuTextPrinterActive() != TRUE) { - sub_81B334C(); - gTasks[taskId].func = sub_81B7028; + PartyMenuDisplayYesNoMenu(); + gTasks[taskId].func = Task_HandleReplaceMoveYesNoInput; } } -static void sub_81B7028(u8 taskId) +static void Task_HandleReplaceMoveYesNoInput(u8 taskId) { switch (Menu_ProcessInputNoWrapClearOnChoose()) { case 0: - DisplayPartyMenuMessage(gText_WhichMoveToForget, 1); - gTasks[taskId].func = sub_81B7088; + DisplayPartyMenuMessage(gText_WhichMoveToForget, TRUE); + gTasks[taskId].func = Task_ShowSummaryScreenToForgetMove; break; case MENU_B_PRESSED: PlaySE(SE_SELECT); + // fallthrough case 1: - sub_81B7230(taskId); + StopLearningMovePrompt(taskId); break; } } -static void sub_81B7088(u8 taskId) +static void Task_ShowSummaryScreenToForgetMove(u8 taskId) { - if (sub_81B1BD4() != TRUE) + if (IsPartyMenuTextPrinterActive() != TRUE) { - gUnknown_0203CEC4->exitCallback = sub_81B70B8; + sPartyMenuInternal->exitCallback = CB2_ShowSummaryScreenToForgetMove; Task_ClosePartyMenu(taskId); } } -static void sub_81B70B8(void) +static void CB2_ShowSummaryScreenToForgetMove(void) { - ShowSelectMovePokemonSummaryScreen(gPlayerParty, gUnknown_0203CEC8.slotId, gPlayerPartyCount - 1, sub_81B70F0, gUnknown_0203CEC8.unkE); + ShowSelectMovePokemonSummaryScreen(gPlayerParty, gPartyMenu.slotId, gPlayerPartyCount - 1, CB2_ReturnToPartyMenuWhileLearningMove, gPartyMenu.unkE); } -static void sub_81B70F0(void) +static void CB2_ReturnToPartyMenuWhileLearningMove(void) { - InitPartyMenu(0, 0, 0, 1, 0x7F, sub_81B711C, gUnknown_0203CEC8.exitCallback); + InitPartyMenu(PARTY_MENU_TYPE_FIELD, PARTY_LAYOUT_SINGLE, PARTY_ACTION_CHOOSE_MON, TRUE, PARTY_MSG_NONE, Task_ReturnToPartyMenuWhileLearningMove, gPartyMenu.exitCallback); } -static void sub_81B711C(u8 taskId) +static void Task_ReturnToPartyMenuWhileLearningMove(u8 taskId) { if (!gPaletteFade.active) { - if (sub_81C1B94() != 4) - sub_81B7154(taskId); + if (GetMoveSlotToReplace() != MAX_MON_MOVES) + DisplayPartyMenuForgotMoveMessage(taskId); else - sub_81B7230(taskId); + StopLearningMovePrompt(taskId); } } -static void sub_81B7154(u8 taskId) +static void DisplayPartyMenuForgotMoveMessage(u8 taskId) { - struct Pokemon *mon = &gPlayerParty[gUnknown_0203CEC8.slotId]; - u16 move = GetMonData(mon, MON_DATA_MOVE1 + sub_81C1B94()); + struct Pokemon *mon = &gPlayerParty[gPartyMenu.slotId]; + u16 move = GetMonData(mon, MON_DATA_MOVE1 + GetMoveSlotToReplace()); GetMonNickname(mon, gStringVar1); StringCopy(gStringVar2, gMoveNames[move]); - sub_81B6D74(gText_12PoofForgotMove); - gTasks[taskId].func = sub_81B71D4; + DisplayLearnMoveMessage(gText_12PoofForgotMove); + gTasks[taskId].func = Task_PartyMenuReplaceMove; } -static void sub_81B71D4(u8 taskId) +static void Task_PartyMenuReplaceMove(u8 taskId) { struct Pokemon *mon; u16 move; - if (sub_81B1BD4() != TRUE) + if (IsPartyMenuTextPrinterActive() != TRUE) { - mon = &gPlayerParty[gUnknown_0203CEC8.slotId]; - RemoveMonPPBonus(mon, sub_81C1B94()); - move = gUnknown_0203CEC8.unkE; - SetMonMoveSlot(mon, move, sub_81C1B94()); - sub_81B6EB4(taskId); + mon = &gPlayerParty[gPartyMenu.slotId]; + RemoveMonPPBonus(mon, GetMoveSlotToReplace()); + move = gPartyMenu.unkE; + SetMonMoveSlot(mon, move, GetMoveSlotToReplace()); + Task_LearnedMove(taskId); } } -static void sub_81B7230(u8 taskId) +static void StopLearningMovePrompt(u8 taskId) { - StringCopy(gStringVar2, gMoveNames[gUnknown_0203CEC8.unkE]); + StringCopy(gStringVar2, gMoveNames[gPartyMenu.unkE]); StringExpandPlaceholders(gStringVar4, gText_StopLearningMove2); - DisplayPartyMenuMessage(gStringVar4, 1); + DisplayPartyMenuMessage(gStringVar4, TRUE); schedule_bg_copy_tilemap_to_vram(2); - gTasks[taskId].func = sub_81B7294; + gTasks[taskId].func = Task_StopLearningMoveYesNo; } -static void sub_81B7294(u8 taskId) +static void Task_StopLearningMoveYesNo(u8 taskId) { - if (sub_81B1BD4() != TRUE) + if (IsPartyMenuTextPrinterActive() != TRUE) { - sub_81B334C(); - gTasks[taskId].func = sub_81B72C8; + PartyMenuDisplayYesNoMenu(); + gTasks[taskId].func = Task_HandleStopLearningMoveYesNoInput; } } -static void sub_81B72C8(u8 taskId) +static void Task_HandleStopLearningMoveYesNoInput(u8 taskId) { - struct Pokemon *mon = &gPlayerParty[gUnknown_0203CEC8.slotId]; + struct Pokemon *mon = &gPlayerParty[gPartyMenu.slotId]; switch (Menu_ProcessInputNoWrapClearOnChoose()) { case 0: GetMonNickname(mon, gStringVar1); - StringCopy(gStringVar2, gMoveNames[gUnknown_0203CEC8.unkE]); + StringCopy(gStringVar2, gMoveNames[gPartyMenu.unkE]); StringExpandPlaceholders(gStringVar4, gText_MoveNotLearned); - DisplayPartyMenuMessage(gStringVar4, 1); - if (gUnknown_0203CEC8.unk10 == 1) + DisplayPartyMenuMessage(gStringVar4, TRUE); + if (gPartyMenu.learnMoveState == 1) { - gTasks[taskId].func = sub_81B73E4; + gTasks[taskId].func = Task_TryLearningNextMoveAfterText; } else { - if (gUnknown_0203CEC8.unk10 == 2) + if (gPartyMenu.learnMoveState == 2) // never occurs gSpecialVar_Result = FALSE; - gTasks[taskId].func = sub_81B6794; + gTasks[taskId].func = Task_ClosePartyMenuAfterText; } break; case MENU_B_PRESSED: PlaySE(SE_SELECT); + // fallthrough case 1: GetMonNickname(mon, gStringVar1); - StringCopy(gStringVar2, gMoveNames[gUnknown_0203CEC8.unkE]); - sub_81B6D74(gText_PkmnNeedsToReplaceMove); - gTasks[taskId].func = sub_81B6FF4; + StringCopy(gStringVar2, gMoveNames[gPartyMenu.unkE]); + DisplayLearnMoveMessage(gText_PkmnNeedsToReplaceMove); + gTasks[taskId].func = Task_ReplaceMoveYesNo; break; } } -static void sub_81B73E4(u8 taskId) +static void Task_TryLearningNextMoveAfterText(u8 taskId) { - if (sub_81B1BD4() != TRUE) - sub_81B77AC(taskId); + if (IsPartyMenuTextPrinterActive() != TRUE) + Task_TryLearningNextMove(taskId); } -void dp05_rare_candy(u8 taskId, TaskFunc task) +void ItemUseCB_RareCandy(u8 taskId, TaskFunc task) { - struct Pokemon *mon = &gPlayerParty[gUnknown_0203CEC8.slotId]; - struct Struct203CEC4 *ptr = gUnknown_0203CEC4; + struct Pokemon *mon = &gPlayerParty[gPartyMenu.slotId]; + struct PartyMenuInternal *ptr = sPartyMenuInternal; s16 *arrayPtr = ptr->data; u16 *itemPtr = &gSpecialVar_ItemId; bool8 cannotUseEffect; if (GetMonData(mon, MON_DATA_LEVEL) != MAX_LEVEL) { - sub_81B79A0(mon, arrayPtr); - cannotUseEffect = ExecuteTableBasedItemEffect__(gUnknown_0203CEC8.slotId, *itemPtr, 0); - sub_81B79A0(mon, &ptr->data[6]); + BufferMonStatsToTaskData(mon, arrayPtr); + cannotUseEffect = ExecuteTableBasedItemEffect_(gPartyMenu.slotId, *itemPtr, 0); + BufferMonStatsToTaskData(mon, &ptr->data[6]); } else { @@ -5993,166 +6184,166 @@ void dp05_rare_candy(u8 taskId, TaskFunc task) PlaySE(SE_SELECT); if (cannotUseEffect) { - gUnknown_0203CEE8 = 0; - DisplayPartyMenuMessage(gText_WontHaveEffect, 1); + gUnknown_0203CEE8 = FALSE; + DisplayPartyMenuMessage(gText_WontHaveEffect, TRUE); schedule_bg_copy_tilemap_to_vram(2); gTasks[taskId].func = task; } else { - gUnknown_0203CEE8 = 1; + gUnknown_0203CEE8 = TRUE; PlayFanfareByFanfareNum(0); - sub_81B754C(gUnknown_0203CEC8.slotId, mon); + UpdateMonDisplayInfoAfterRareCandy(gPartyMenu.slotId, mon); RemoveBagItem(gSpecialVar_ItemId, 1); GetMonNickname(mon, gStringVar1); ConvertIntToDecimalStringN(gStringVar2, GetMonData(mon, MON_DATA_LEVEL), STR_CONV_MODE_LEFT_ALIGN, 3); StringExpandPlaceholders(gStringVar4, gText_PkmnElevatedToLvVar2); - DisplayPartyMenuMessage(gStringVar4, 1); + DisplayPartyMenuMessage(gStringVar4, TRUE); schedule_bg_copy_tilemap_to_vram(2); - gTasks[taskId].func = sub_81B75D4; + gTasks[taskId].func = Task_DisplayLevelUpStatsPg1; } } -static void sub_81B754C(u8 slot, struct Pokemon *mon) +static void UpdateMonDisplayInfoAfterRareCandy(u8 slot, struct Pokemon *mon) { - party_menu_get_status_condition_and_update_object(mon, &gUnknown_0203CEDC[slot]); - if (gSprites[gUnknown_0203CEDC[slot].statusSpriteId].invisible) - DisplayPartyPokemonLevelCheck(mon, &gUnknown_0203CEDC[slot], 1); - DisplayPartyPokemonHPCheck(mon, &gUnknown_0203CEDC[slot], 1); - DisplayPartyPokemonMaxHPCheck(mon, &gUnknown_0203CEDC[slot], 1); - DisplayPartyPokemonHPBarCheck(mon, &gUnknown_0203CEDC[slot]); - sub_81B5B38(gUnknown_0203CEDC[slot].monSpriteId, mon); - sub_81B0FCC(slot, 1); + SetPartyMonAilmentGfx(mon, &sPartyMenuBoxes[slot]); + if (gSprites[sPartyMenuBoxes[slot].statusSpriteId].invisible) + DisplayPartyPokemonLevelCheck(mon, &sPartyMenuBoxes[slot], 1); + DisplayPartyPokemonHPCheck(mon, &sPartyMenuBoxes[slot], 1); + DisplayPartyPokemonMaxHPCheck(mon, &sPartyMenuBoxes[slot], 1); + DisplayPartyPokemonHPBarCheck(mon, &sPartyMenuBoxes[slot]); + UpdatePartyMonHPBar(sPartyMenuBoxes[slot].monSpriteId, mon); + AnimatePartySlot(slot, 1); schedule_bg_copy_tilemap_to_vram(0); } -static void sub_81B75D4(u8 taskId) +static void Task_DisplayLevelUpStatsPg1(u8 taskId) { - if (WaitFanfare(FALSE) && sub_81B1BD4() != TRUE && ((gMain.newKeys & A_BUTTON) || (gMain.newKeys & B_BUTTON))) + if (WaitFanfare(FALSE) && IsPartyMenuTextPrinterActive() != TRUE && ((gMain.newKeys & A_BUTTON) || (gMain.newKeys & B_BUTTON))) { PlaySE(SE_SELECT); - sub_81B767C(taskId); - gTasks[taskId].func = sub_81B7634; + DisplayLevelUpStatsPg1(taskId); + gTasks[taskId].func = Task_DisplayLevelUpStatsPg2; } } -static void sub_81B7634(u8 taskId) +static void Task_DisplayLevelUpStatsPg2(u8 taskId) { if ((gMain.newKeys & A_BUTTON) || (gMain.newKeys & B_BUTTON)) { PlaySE(SE_SELECT); - sub_81B76C8(taskId); - gTasks[taskId].func = sub_81B7704; + DisplayLevelUpStatsPg2(taskId); + gTasks[taskId].func = Task_TryLearnNewMoves; } } -static void sub_81B767C(u8 taskId) +static void DisplayLevelUpStatsPg1(u8 taskId) { - s16 *arrayPtr = gUnknown_0203CEC4->data; + s16 *arrayPtr = sPartyMenuInternal->data; - arrayPtr[12] = sub_81B3364(); + arrayPtr[12] = CreateLevelUpStatsWindow(); DrawLevelUpWindowPg1(arrayPtr[12], arrayPtr, &arrayPtr[6], 1, 2, 3); CopyWindowToVram(arrayPtr[12], 2); schedule_bg_copy_tilemap_to_vram(2); } -static void sub_81B76C8(u8 taskId) +static void DisplayLevelUpStatsPg2(u8 taskId) { - s16 *arrayPtr = gUnknown_0203CEC4->data; + s16 *arrayPtr = sPartyMenuInternal->data; DrawLevelUpWindowPg2(arrayPtr[12], &arrayPtr[6], 1, 2, 3); CopyWindowToVram(arrayPtr[12], 2); schedule_bg_copy_tilemap_to_vram(2); } -static void sub_81B7704(u8 taskId) +static void Task_TryLearnNewMoves(u8 taskId) { - u16 result; + u16 learnMove; if (WaitFanfare(0) && ((gMain.newKeys & A_BUTTON) || (gMain.newKeys & B_BUTTON))) { - sub_81B3394(); - result = MonTryLearningNewMove(&gPlayerParty[gUnknown_0203CEC8.slotId], 1); - gUnknown_0203CEC8.unk10 = 1; - switch (result) + RemoveLevelUpStatsWindow(); + learnMove = MonTryLearningNewMove(&gPlayerParty[gPartyMenu.slotId], TRUE); + gPartyMenu.learnMoveState = 1; + switch (learnMove) { - case 0: - sub_81B7810(taskId); + case 0: // No moves to learn + PartyMenuTryEvolution(taskId); break; - case 0xFFFF: - sub_81B787C(taskId); + case MON_HAS_MAX_MOVES: + DisplayMonNeedsToReplaceMove(taskId); break; - case 0xFFFE: - gTasks[taskId].func = sub_81B77AC; + case MON_ALREADY_KNOWS_MOVE: + gTasks[taskId].func = Task_TryLearningNextMove; break; default: - sub_81B7910(taskId, result); + DisplayMonLearnedMove(taskId, learnMove); break; } } } -static void sub_81B77AC(u8 taskId) +static void Task_TryLearningNextMove(u8 taskId) { - u16 result = MonTryLearningNewMove(&gPlayerParty[gUnknown_0203CEC8.slotId], 0); + u16 result = MonTryLearningNewMove(&gPlayerParty[gPartyMenu.slotId], FALSE); switch (result) { - case 0: - sub_81B7810(taskId); + case 0: // No moves to learn + PartyMenuTryEvolution(taskId); break; - case 0xFFFF: - sub_81B787C(taskId); + case MON_HAS_MAX_MOVES: + DisplayMonNeedsToReplaceMove(taskId); break; - case 0xFFFE: + case MON_ALREADY_KNOWS_MOVE: return; default: - sub_81B7910(taskId, result); + DisplayMonLearnedMove(taskId, result); break; } } -static void sub_81B7810(u8 taskId) +static void PartyMenuTryEvolution(u8 taskId) { - struct Pokemon *mon = &gPlayerParty[gUnknown_0203CEC8.slotId]; + struct Pokemon *mon = &gPlayerParty[gPartyMenu.slotId]; u16 targetSpecies = GetEvolutionTargetSpecies(mon, 0, 0); if (targetSpecies != SPECIES_NONE) { FreePartyPointers(); - gCB2_AfterEvolution = gUnknown_0203CEC8.exitCallback; - BeginEvolutionScene(mon, targetSpecies, 1, gUnknown_0203CEC8.slotId); + gCB2_AfterEvolution = gPartyMenu.exitCallback; + BeginEvolutionScene(mon, targetSpecies, 1, gPartyMenu.slotId); DestroyTask(taskId); } else { - gTasks[taskId].func = sub_81B6794; + gTasks[taskId].func = Task_ClosePartyMenuAfterText; } } -static void sub_81B787C(u8 taskId) +static void DisplayMonNeedsToReplaceMove(u8 taskId) { - GetMonNickname(&gPlayerParty[gUnknown_0203CEC8.slotId], gStringVar1); + GetMonNickname(&gPlayerParty[gPartyMenu.slotId], gStringVar1); StringCopy(gStringVar2, gMoveNames[gMoveToLearn]); StringExpandPlaceholders(gStringVar4, gText_PkmnNeedsToReplaceMove); - DisplayPartyMenuMessage(gStringVar4, 1); + DisplayPartyMenuMessage(gStringVar4, TRUE); schedule_bg_copy_tilemap_to_vram(2); - gUnknown_0203CEC8.unkE = gMoveToLearn; - gTasks[taskId].func = sub_81B6FF4; + gPartyMenu.unkE = gMoveToLearn; + gTasks[taskId].func = Task_ReplaceMoveYesNo; } -static void sub_81B7910(u8 taskId, u16 move) +static void DisplayMonLearnedMove(u8 taskId, u16 move) { - GetMonNickname(&gPlayerParty[gUnknown_0203CEC8.slotId], gStringVar1); + GetMonNickname(&gPlayerParty[gPartyMenu.slotId], gStringVar1); StringCopy(gStringVar2, gMoveNames[move]); StringExpandPlaceholders(gStringVar4, gText_PkmnLearnedMove3); - DisplayPartyMenuMessage(gStringVar4, 1); + DisplayPartyMenuMessage(gStringVar4, TRUE); schedule_bg_copy_tilemap_to_vram(2); - gUnknown_0203CEC8.unkE = move; - gTasks[taskId].func = sub_81B6F60; + gPartyMenu.unkE = move; + gTasks[taskId].func = Task_DoLearnedMoveFanfareAfterText; } -static void sub_81B79A0(struct Pokemon *mon, s16 *data) +static void BufferMonStatsToTaskData(struct Pokemon *mon, s16 *data) { data[0] = GetMonData(mon, MON_DATA_MAX_HP); data[1] = GetMonData(mon, MON_DATA_ATK); @@ -6162,17 +6353,17 @@ static void sub_81B79A0(struct Pokemon *mon, s16 *data) data[3] = GetMonData(mon, MON_DATA_SPEED); } -void sub_81B79E8(u8 taskId, TaskFunc task) +void ItemUseCB_SacredAsh(u8 taskId, TaskFunc task) { - gUnknown_0203CEC4->data[0] = 0; - gUnknown_0203CEC4->data[1] = 0; - gUnknown_0203CEC4->data[2] = gUnknown_0203CEC8.slotId; + sPartyMenuInternal->data[0] = 0; + sPartyMenuInternal->data[1] = 0; + sPartyMenuInternal->data[2] = gPartyMenu.slotId; sub_81B7A28(taskId); } static void sub_81B7A28(u8 taskId) { - struct Pokemon *mon = &gPlayerParty[gUnknown_0203CEC8.slotId]; + struct Pokemon *mon = &gPlayerParty[gPartyMenu.slotId]; u16 hp; if (GetMonData(mon, MON_DATA_SPECIES) == SPECIES_NONE) @@ -6182,48 +6373,48 @@ static void sub_81B7A28(u8 taskId) } hp = GetMonData(mon, MON_DATA_HP); - if (ExecuteTableBasedItemEffect__(gUnknown_0203CEC8.slotId, gSpecialVar_ItemId, 0)) + if (ExecuteTableBasedItemEffect_(gPartyMenu.slotId, gSpecialVar_ItemId, 0)) { gTasks[taskId].func = task_sacred_ash_party_loop; return; } PlaySE(SE_KAIFUKU); - party_menu_get_status_condition_and_update_object(mon, &gUnknown_0203CEDC[gUnknown_0203CEC8.slotId]); - if (gSprites[gUnknown_0203CEDC[gUnknown_0203CEC8.slotId].statusSpriteId].invisible) - DisplayPartyPokemonLevelCheck(mon, &gUnknown_0203CEDC[gUnknown_0203CEC8.slotId], 1); - sub_81B0FCC(gUnknown_0203CEC4->data[2], 0); - sub_81B0FCC(gUnknown_0203CEC8.slotId, 1); - sub_81B1F18(taskId, gUnknown_0203CEC8.slotId, 1, GetMonData(mon, MON_DATA_HP) - hp, sub_81B7C10); - sub_81B1FA8(taskId, 0, hp); - gUnknown_0203CEC4->data[0] = 1; - gUnknown_0203CEC4->data[1] = 1; + SetPartyMonAilmentGfx(mon, &sPartyMenuBoxes[gPartyMenu.slotId]); + if (gSprites[sPartyMenuBoxes[gPartyMenu.slotId].statusSpriteId].invisible) + DisplayPartyPokemonLevelCheck(mon, &sPartyMenuBoxes[gPartyMenu.slotId], 1); + AnimatePartySlot(sPartyMenuInternal->data[2], 0); + AnimatePartySlot(gPartyMenu.slotId, 1); + PartyMenuModifyHP(taskId, gPartyMenu.slotId, 1, GetMonData(mon, MON_DATA_HP) - hp, Task_SacredAshDisplayHPRestored); + ResetHPTaskData(taskId, 0, hp); + sPartyMenuInternal->data[0] = 1; + sPartyMenuInternal->data[1] = 1; } static void task_sacred_ash_party_loop(u8 taskId) { - if (sub_81B1BD4() != TRUE) + if (IsPartyMenuTextPrinterActive() != TRUE) { - if (gUnknown_0203CEC4->data[0] == 1) + if (sPartyMenuInternal->data[0] == 1) { - gUnknown_0203CEC4->data[0] = 0; - gUnknown_0203CEC4->data[2] = gUnknown_0203CEC8.slotId; + sPartyMenuInternal->data[0] = 0; + sPartyMenuInternal->data[2] = gPartyMenu.slotId; } - if (++(gUnknown_0203CEC8.slotId) == PARTY_SIZE) + if (++(gPartyMenu.slotId) == PARTY_SIZE) { - if (gUnknown_0203CEC4->data[1] == 0) + if (sPartyMenuInternal->data[1] == 0) { - gUnknown_0203CEE8 = 0; - DisplayPartyMenuMessage(gText_WontHaveEffect, 1); + gUnknown_0203CEE8 = FALSE; + DisplayPartyMenuMessage(gText_WontHaveEffect, TRUE); schedule_bg_copy_tilemap_to_vram(2); } else { - gUnknown_0203CEE8 = 1; + gUnknown_0203CEE8 = TRUE; RemoveBagItem(gSpecialVar_ItemId, 1); } - gTasks[taskId].func = sub_81B6794; - gUnknown_0203CEC8.slotId = 0; + gTasks[taskId].func = Task_ClosePartyMenuAfterText; + gPartyMenu.slotId = 0; } else { @@ -6232,23 +6423,23 @@ static void task_sacred_ash_party_loop(u8 taskId) } } -static void sub_81B7C10(u8 taskId) +static void Task_SacredAshDisplayHPRestored(u8 taskId) { - GetMonNickname(&gPlayerParty[gUnknown_0203CEC8.slotId], gStringVar1); + GetMonNickname(&gPlayerParty[gPartyMenu.slotId], gStringVar1); StringExpandPlaceholders(gStringVar4, gText_PkmnHPRestoredByVar2); - DisplayPartyMenuMessage(gStringVar4, 0); + DisplayPartyMenuMessage(gStringVar4, FALSE); schedule_bg_copy_tilemap_to_vram(2); gTasks[taskId].func = task_sacred_ash_party_loop; } -void sub_81B7C74(u8 taskId, TaskFunc task) +void ItemUseCB_EvolutionStone(u8 taskId, TaskFunc task) { PlaySE(SE_SELECT); - gCB2_AfterEvolution = gUnknown_0203CEC8.exitCallback; - if (ExecuteTableBasedItemEffect__(gUnknown_0203CEC8.slotId, gSpecialVar_ItemId, 0)) + gCB2_AfterEvolution = gPartyMenu.exitCallback; + if (ExecuteTableBasedItemEffect_(gPartyMenu.slotId, gSpecialVar_ItemId, 0)) { - gUnknown_0203CEE8 = 0; - DisplayPartyMenuMessage(gText_WontHaveEffect, 1); + gUnknown_0203CEE8 = FALSE; + DisplayPartyMenuMessage(gText_WontHaveEffect, TRUE); schedule_bg_copy_tilemap_to_vram(2); gTasks[taskId].func = task; } @@ -6327,76 +6518,79 @@ u8 GetItemEffectType(u16 item) return ITEM_EFFECT_NONE; } -static void sub_81B7E4C(u8 taskId) +static void TryTutorSelectedMon(u8 taskId) { struct Pokemon *mon; s16 *move; if (!gPaletteFade.active) { - mon = &gPlayerParty[gUnknown_0203CEC8.slotId]; - move = &gUnknown_0203CEC8.unkE; + mon = &gPlayerParty[gPartyMenu.slotId]; + move = &gPartyMenu.unkE; GetMonNickname(mon, gStringVar1); - gUnknown_0203CEC8.unkE = GetTutorMove(gSpecialVar_0x8005); - StringCopy(gStringVar2, gMoveNames[gUnknown_0203CEC8.unkE]); + gPartyMenu.unkE = GetTutorMove(gSpecialVar_0x8005); + StringCopy(gStringVar2, gMoveNames[gPartyMenu.unkE]); move[1] = 2; switch (CanMonLearnTMTutor(mon, 0, gSpecialVar_0x8005)) { case CANNOT_LEARN_MOVE: - sub_81B6D98(taskId, gText_PkmnCantLearnMove); + DisplayLearnMoveMessageAndClose(taskId, gText_PkmnCantLearnMove); return; case ALREADY_KNOWS_MOVE: - sub_81B6D98(taskId, gText_PkmnAlreadyKnows); + DisplayLearnMoveMessageAndClose(taskId, gText_PkmnAlreadyKnows); return; default: - if (GiveMoveToMon(mon, gUnknown_0203CEC8.unkE) != 0xFFFF) + if (GiveMoveToMon(mon, gPartyMenu.unkE) != MON_HAS_MAX_MOVES) { - sub_81B6EB4(taskId); + Task_LearnedMove(taskId); return; } break; } - sub_81B6D74(gText_PkmnNeedsToReplaceMove); - gTasks[taskId].func = sub_81B6FF4; + DisplayLearnMoveMessage(gText_PkmnNeedsToReplaceMove); + gTasks[taskId].func = Task_ReplaceMoveYesNo; } } void CB2_PartyMenuFromStartMenu(void) { - InitPartyMenu(0, 0, 0, 0, 0, sub_81B1370, CB2_ReturnToFieldWithOpenMenu); + InitPartyMenu(PARTY_MENU_TYPE_FIELD, PARTY_LAYOUT_SINGLE, PARTY_ACTION_CHOOSE_MON, FALSE, PARTY_MSG_CHOOSE_MON, Task_HandleChooseMonInput, CB2_ReturnToFieldWithOpenMenu); } -void sub_81B7F60(void) +// Giving an item by selecting Give from the bag menu +// As opposted to by selecting Give in the party menu, which is handled by CursorCb_Give +void CB2_ChooseMonToGiveItem(void) { - MainCallback callback = (InBattlePyramid() == FALSE) ? c2_815ABFC : sub_81C4F84; - InitPartyMenu(0, 0, 5, 0, 6, sub_81B1370, callback); - gUnknown_0203CEC8.unkC = gSpecialVar_ItemId; + MainCallback callback = (InBattlePyramid() == FALSE) ? CB2_ReturnToBagMenu : CB2_ReturnToPyramidBagMenu; + InitPartyMenu(PARTY_MENU_TYPE_FIELD, PARTY_LAYOUT_SINGLE, PARTY_ACTION_GIVE_ITEM, FALSE, PARTY_MSG_GIVE_TO_WHICH_MON, Task_HandleChooseMonInput, callback); + gPartyMenu.bagItem = gSpecialVar_ItemId; } -static void sub_81B7FAC(u8 taskId) +//TODO next +static void TryGiveItemToSelectedMon(u8 taskId) { - gUnknown_0203CEFC = GetMonData(&gPlayerParty[gUnknown_0203CEC8.slotId], MON_DATA_HELD_ITEM); - if (gUnknown_0203CEFC == ITEM_NONE) + sPartyMenuItemId = GetMonData(&gPlayerParty[gPartyMenu.slotId], MON_DATA_HELD_ITEM); + if (sPartyMenuItemId == ITEM_NONE) { - sub_81B8044(taskId); + GiveItemToSelectedMon(taskId); } - else if (ItemIsMail(gUnknown_0203CEFC)) + else if (ItemIsMail(sPartyMenuItemId)) { sub_81B83B8(taskId); } else { - sub_81B1D1C(&gPlayerParty[gUnknown_0203CEC8.slotId], gUnknown_0203CEFC, 1); + DisplayAlreadyHoldingItemSwitchMessage(&gPlayerParty[gPartyMenu.slotId], sPartyMenuItemId, TRUE); gTasks[taskId].func = sub_81B82A0; } } -static void sub_81B8044(u8 taskId) +static void GiveItemToSelectedMon(u8 taskId) { - if (ItemIsMail(gUnknown_0203CEC8.unkC)) + if (ItemIsMail(gPartyMenu.bagItem)) { - sub_81B83F0(gUnknown_0203CEC8.unkC); - gUnknown_0203CEC4->exitCallback = sub_81B814C; + RemoveItemToGiveFromBag(gPartyMenu.bagItem); + sPartyMenuInternal->exitCallback = CB2_WriteMailToGiveMonFromBag; Task_ClosePartyMenu(taskId); } else @@ -6411,54 +6605,54 @@ static void sub_81B8088(u8 taskId) if (!gPaletteFade.active) { - item = gUnknown_0203CEC8.unkC; - sub_81B1C84(&gPlayerParty[gUnknown_0203CEC8.slotId], item, 0, 1); - sub_81B1DB8(&gPlayerParty[gUnknown_0203CEC8.slotId], item); - sub_81B83F0(item); - gTasks[taskId].func = sub_81B8104; + item = gPartyMenu.bagItem; + DisplayGaveHeldItemMessage(&gPlayerParty[gPartyMenu.slotId], item, FALSE, 1); + GiveItemToMon(&gPlayerParty[gPartyMenu.slotId], item); + RemoveItemToGiveFromBag(item); + gTasks[taskId].func = Task_UpdateHeldItemSpriteAndClosePartyMenu; } } -static void sub_81B8104(u8 taskId) +static void Task_UpdateHeldItemSpriteAndClosePartyMenu(u8 taskId) { - s8 slot = gUnknown_0203CEC8.slotId; + s8 slot = gPartyMenu.slotId; - if (sub_81B1BD4() != TRUE) + if (IsPartyMenuTextPrinterActive() != TRUE) { - sub_81B5C94(&gPlayerParty[slot], &gUnknown_0203CEDC[slot]); + UpdatePartyMonHeldItemSprite(&gPlayerParty[slot], &sPartyMenuBoxes[slot]); Task_ClosePartyMenu(taskId); } } -static void sub_81B814C(void) +static void CB2_WriteMailToGiveMonFromBag(void) { u8 mail; - sub_81B1DB8(&gPlayerParty[gUnknown_0203CEC8.slotId], gUnknown_0203CEC8.unkC); - mail = GetMonData(&gPlayerParty[gUnknown_0203CEC8.slotId], MON_DATA_MAIL); + GiveItemToMon(&gPlayerParty[gPartyMenu.slotId], gPartyMenu.bagItem); + mail = GetMonData(&gPlayerParty[gPartyMenu.slotId], MON_DATA_MAIL); DoEasyChatScreen( EASY_CHAT_TYPE_MAIL, gSaveBlock1Ptr->mail[mail].words, - sub_81B81A8, + CB2_ReturnToPartyOrBagMenuFromWritingMail, EASY_CHAT_PERSON_DISPLAY_NONE); } -static void sub_81B81A8(void) +static void CB2_ReturnToPartyOrBagMenuFromWritingMail(void) { - struct Pokemon *mon = &gPlayerParty[gUnknown_0203CEC8.slotId]; + struct Pokemon *mon = &gPlayerParty[gPartyMenu.slotId]; u16 item = GetMonData(mon, MON_DATA_HELD_ITEM); if (gSpecialVar_Result == FALSE) { TakeMailFromMon(mon); - SetMonData(mon, MON_DATA_HELD_ITEM, &gUnknown_0203CEFC); - RemoveBagItem(gUnknown_0203CEFC, 1); + SetMonData(mon, MON_DATA_HELD_ITEM, &sPartyMenuItemId); + RemoveBagItem(sPartyMenuItemId, 1); sub_81B841C(item); - SetMainCallback2(gUnknown_0203CEC8.exitCallback); + SetMainCallback2(gPartyMenu.exitCallback); } else { - InitPartyMenu(gUnknown_0203CEC8.unk8_0, 0xFF, gUnknown_0203CEC8.unkB, 1, 0x7F, sub_81B8230, gUnknown_0203CEC8.exitCallback); + InitPartyMenu(gPartyMenu.menuType, KEEP_PARTY_LAYOUT, gPartyMenu.action, TRUE, PARTY_MSG_NONE, sub_81B8230, gPartyMenu.exitCallback); } } @@ -6466,19 +6660,19 @@ static void sub_81B8230(u8 taskId) { if (!gPaletteFade.active) { - if (gUnknown_0203CEFC != ITEM_NONE) - sub_81B1D68(gUnknown_0203CEC8.unkC, gUnknown_0203CEFC, 0); + if (sPartyMenuItemId != ITEM_NONE) + DisplaySwitchedHeldItemMessage(gPartyMenu.bagItem, sPartyMenuItemId, FALSE); else - sub_81B1C84(&gPlayerParty[gUnknown_0203CEC8.slotId], gUnknown_0203CEC8.unkC, 0, 1); - gTasks[taskId].func = sub_81B8104; + DisplayGaveHeldItemMessage(&gPlayerParty[gPartyMenu.slotId], gPartyMenu.bagItem, FALSE, 1); + gTasks[taskId].func = Task_UpdateHeldItemSpriteAndClosePartyMenu; } } static void sub_81B82A0(u8 taskId) { - if (sub_81B1BD4() != TRUE) + if (IsPartyMenuTextPrinterActive() != TRUE) { - sub_81B334C(); + PartyMenuDisplayYesNoMenu(); gTasks[taskId].func = sub_81B82D4; } } @@ -6490,45 +6684,46 @@ static void sub_81B82D4(u8 taskId) switch (Menu_ProcessInputNoWrapClearOnChoose()) { case 0: - item = gUnknown_0203CEC8.unkC; - sub_81B83F0(item); - if (AddBagItem(gUnknown_0203CEFC, 1) == FALSE) + item = gPartyMenu.bagItem; + RemoveItemToGiveFromBag(item); + if (AddBagItem(sPartyMenuItemId, 1) == FALSE) { sub_81B841C(item); - pokemon_item_not_removed(gUnknown_0203CEFC); - DisplayPartyMenuMessage(gStringVar4, 0); - gTasks[taskId].func = sub_81B8104; + BufferBagFullCantTakeItemMessage(sPartyMenuItemId); + DisplayPartyMenuMessage(gStringVar4, FALSE); + gTasks[taskId].func = Task_UpdateHeldItemSpriteAndClosePartyMenu; } else if (ItemIsMail(item)) { - gUnknown_0203CEC4->exitCallback = sub_81B814C; + sPartyMenuInternal->exitCallback = CB2_WriteMailToGiveMonFromBag; Task_ClosePartyMenu(taskId); } else { - sub_81B1DB8(&gPlayerParty[gUnknown_0203CEC8.slotId], item); - sub_81B1D68(item, gUnknown_0203CEFC, 1); - gTasks[taskId].func = sub_81B8104; + GiveItemToMon(&gPlayerParty[gPartyMenu.slotId], item); + DisplaySwitchedHeldItemMessage(item, sPartyMenuItemId, TRUE); + gTasks[taskId].func = Task_UpdateHeldItemSpriteAndClosePartyMenu; } break; case MENU_B_PRESSED: PlaySE(SE_SELECT); + // fallthrough case 1: - gTasks[taskId].func = sub_81B8104; + gTasks[taskId].func = Task_UpdateHeldItemSpriteAndClosePartyMenu; break; } } static void sub_81B83B8(u8 taskId) { - DisplayPartyMenuMessage(gText_RemoveMailBeforeItem, 1); + DisplayPartyMenuMessage(gText_RemoveMailBeforeItem, TRUE); schedule_bg_copy_tilemap_to_vram(2); - gTasks[taskId].func = sub_81B8104; + gTasks[taskId].func = Task_UpdateHeldItemSpriteAndClosePartyMenu; } -static void sub_81B83F0(u16 item) +static void RemoveItemToGiveFromBag(u16 item) { - if (gUnknown_0203CEC8.unkB == 6) + if (gPartyMenu.action == PARTY_ACTION_GIVE_PC_ITEM) // Unused, never occurs RemovePCItem(item, 1); else RemoveBagItem(item, 1); @@ -6536,55 +6731,55 @@ static void sub_81B83F0(u16 item) static bool8 sub_81B841C(u16 item) { - if (gUnknown_0203CEC8.unkB == 5) + if (gPartyMenu.action == PARTY_ACTION_GIVE_ITEM) return AddBagItem(item, 1); else return AddPCItem(item, 1); } -void sub_81B8448(void) +void ChooseMonToGiveMailFromMailbox(void) { - InitPartyMenu(0, 0, 7, 0, 6, sub_81B1370, Mailbox_ReturnToMailListAfterDeposit); + InitPartyMenu(PARTY_MENU_TYPE_FIELD, PARTY_LAYOUT_SINGLE, PARTY_ACTION_GIVE_MAILBOX_MAIL, FALSE, PARTY_MSG_GIVE_TO_WHICH_MON, Task_HandleChooseMonInput, Mailbox_ReturnToMailListAfterDeposit); } -static void sub_81B8474(u8 taskId) +static void TryGiveMailToSelectedMon(u8 taskId) { - struct Pokemon *mon = &gPlayerParty[gUnknown_0203CEC8.slotId]; + struct Pokemon *mon = &gPlayerParty[gPartyMenu.slotId]; struct MailStruct *mail; - gUnknown_0203CEE8 = 0; + gUnknown_0203CEE8 = FALSE; mail = &gSaveBlock1Ptr->mail[playerPCItemPageInfo.itemsAbove + 6 + playerPCItemPageInfo.cursorPos]; if (GetMonData(mon, MON_DATA_HELD_ITEM) != ITEM_NONE) { - DisplayPartyMenuMessage(gText_PkmnHoldingItemCantHoldMail, 1); + DisplayPartyMenuMessage(gText_PkmnHoldingItemCantHoldMail, TRUE); } else { GiveMailToMon2(mon, mail); ClearMailStruct(mail); - DisplayPartyMenuMessage(gText_MailTransferredFromMailbox, 1); + DisplayPartyMenuMessage(gText_MailTransferredFromMailbox, TRUE); } schedule_bg_copy_tilemap_to_vram(2); - gTasks[taskId].func = sub_81B8104; + gTasks[taskId].func = Task_UpdateHeldItemSpriteAndClosePartyMenu; } void InitChooseHalfPartyForBattle(u8 unused) { - sub_81B8558(); - InitPartyMenu(4, 0, 0, 0, 0, sub_81B1370, gMain.savedCallback); - gUnknown_0203CEC8.unk4 = sub_81B879C; + ClearSelectedPartyOrder(); + InitPartyMenu(PARTY_MENU_TYPE_CHOOSE_HALF, PARTY_LAYOUT_SINGLE, PARTY_ACTION_CHOOSE_MON, FALSE, PARTY_MSG_CHOOSE_MON, Task_HandleChooseMonInput, gMain.savedCallback); + gPartyMenu.task = Task_ValidateChosenHalfParty; } -void sub_81B8558(void) +void ClearSelectedPartyOrder(void) { memset(gSelectedOrderFromParty, 0, sizeof(gSelectedOrderFromParty)); } -static u8 sub_81B856C(s8 slot) +static u8 GetPartySlotEntryStatus(s8 slot) { if (GetBattleEntryEligibility(&gPlayerParty[slot]) == FALSE) return 2; - if (sub_81B8770(slot + 1) == TRUE) + if (HasPartySlotAlreadyBeenSelected(slot + 1) == TRUE) return 1; return 0; } @@ -6595,7 +6790,7 @@ static bool8 GetBattleEntryEligibility(struct Pokemon *mon) u16 species; if (GetMonData(mon, MON_DATA_IS_EGG) - || GetMonData(mon, MON_DATA_LEVEL) > sub_81B8888() + || GetMonData(mon, MON_DATA_LEVEL) > GetBattleEntryLevelCap() || (gSaveBlock1Ptr->location.mapGroup == MAP_GROUP(BATTLE_FRONTIER_BATTLE_PYRAMID_LOBBY) && gSaveBlock1Ptr->location.mapNum == MAP_NUM(BATTLE_FRONTIER_BATTLE_PYRAMID_LOBBY) && GetMonData(mon, MON_DATA_HELD_ITEM) != ITEM_NONE)) @@ -6603,15 +6798,15 @@ static bool8 GetBattleEntryEligibility(struct Pokemon *mon) return FALSE; } - switch (VarGet(VAR_FRONTIER_FACILITY)) // oddly the specific cases are beyond 6, turns out case 9 is apparently related to link battles + switch (VarGet(VAR_FRONTIER_FACILITY)) { - case 9: + case FACILITY_MULTI_OR_EREADER: if (GetMonData(mon, MON_DATA_HP) != 0) return TRUE; return FALSE; - case 8: + case FACILITY_UNION_ROOM: return TRUE; - default: + default: // Battle Frontier species = GetMonData(mon, MON_DATA_SPECIES); for (; gFrontierBannedSpecies[i] != 0xFFFF; i++) { @@ -6622,49 +6817,49 @@ static bool8 GetBattleEntryEligibility(struct Pokemon *mon) } } -static u8 sub_81B865C(void) +static u8 CheckBattleEntriesAndGetMessage(void) { - u8 unk2; + u8 maxBattlers; u8 i, j; u8 facility; struct Pokemon *party = gPlayerParty; - u8 unk = sub_81B885C(); + u8 minBattlers = GetMinBattleEntries(); u8 *order = gSelectedOrderFromParty; - if (order[unk - 1] == 0) + if (order[minBattlers - 1] == 0) { - if (unk == 1) - return 14; - ConvertIntToDecimalStringN(gStringVar1, unk, STR_CONV_MODE_LEFT_ALIGN, 1); - return 17; + if (minBattlers == 1) + return PARTY_MSG_NO_MON_FOR_BATTLE; + ConvertIntToDecimalStringN(gStringVar1, minBattlers, STR_CONV_MODE_LEFT_ALIGN, 1); + return PARTY_MSG_X_MONS_ARE_NEEDED; } facility = VarGet(VAR_FRONTIER_FACILITY); - if (facility == 8 || facility == 9) + if (facility == FACILITY_UNION_ROOM || facility == FACILITY_MULTI_OR_EREADER) return 0xFF; - unk2 = sub_81B8830(); - for (i = 0; i < unk2 - 1; i++) + maxBattlers = GetMaxBattleEntries(); + for (i = 0; i < maxBattlers - 1; i++) { u16 species = GetMonData(&party[order[i] - 1], MON_DATA_SPECIES); u16 item = GetMonData(&party[order[i] - 1], MON_DATA_HELD_ITEM); - for (j = i + 1; j < unk2; j++) + for (j = i + 1; j < maxBattlers; j++) { if (species == GetMonData(&party[order[j] - 1], MON_DATA_SPECIES)) - return 18; + return PARTY_MSG_MONS_CANT_BE_SAME; if (item != ITEM_NONE && item == GetMonData(&party[order[j] - 1], MON_DATA_HELD_ITEM)) - return 19; + return PARTY_MSG_NO_SAME_HOLD_ITEMS; } } return 0xFF; } -static bool8 sub_81B8770(u8 slot) +static bool8 HasPartySlotAlreadyBeenSelected(u8 slot) { u8 i; - for (i = 0; i < 4; i++) + for (i = 0; i < ARRAY_COUNT(gSelectedOrderFromParty); i++) { if (gSelectedOrderFromParty[i] == slot) return TRUE; @@ -6672,15 +6867,15 @@ static bool8 sub_81B8770(u8 slot) return FALSE; } -static void sub_81B879C(u8 taskId) +static void Task_ValidateChosenHalfParty(u8 taskId) { - u8 msgId = sub_81B865C(); + u8 msgId = CheckBattleEntriesAndGetMessage(); if (msgId != 0xFF) { PlaySE(SE_HAZURE); DisplayPartyMenuStdMessage(msgId); - gTasks[taskId].func = sub_81B87E8; + gTasks[taskId].func = Task_ContinueChoosingHalfParty; } else { @@ -6689,62 +6884,62 @@ static void sub_81B879C(u8 taskId) } } -static void sub_81B87E8(u8 taskId) +static void Task_ContinueChoosingHalfParty(u8 taskId) { if ((gMain.newKeys & A_BUTTON) || (gMain.newKeys & B_BUTTON)) { PlaySE(SE_SELECT); - DisplayPartyMenuStdMessage(0); - gTasks[taskId].func = sub_81B1370; + DisplayPartyMenuStdMessage(PARTY_MSG_CHOOSE_MON); + gTasks[taskId].func = Task_HandleChooseMonInput; } } -static u8 sub_81B8830(void) +static u8 GetMaxBattleEntries(void) { switch (VarGet(VAR_FRONTIER_FACILITY)) { - case 9: + case FACILITY_MULTI_OR_EREADER: return 3; - case 8: + case FACILITY_UNION_ROOM: return 2; - default: + default: // Battle Frontier return gSpecialVar_0x8005; } } -static u8 sub_81B885C(void) +static u8 GetMinBattleEntries(void) { switch (VarGet(VAR_FRONTIER_FACILITY)) { - case 9: + case FACILITY_MULTI_OR_EREADER: return 1; - case 8: + case FACILITY_UNION_ROOM: return 2; - default: + default: // Battle Frontier return gSpecialVar_0x8005; } } -static u8 sub_81B8888(void) +static u8 GetBattleEntryLevelCap(void) { switch (VarGet(VAR_FRONTIER_FACILITY)) { - case 9: - return 100; - case 8: + case FACILITY_MULTI_OR_EREADER: + return MAX_LEVEL; + case FACILITY_UNION_ROOM: return 30; - default: - if (gSpecialVar_0x8004 == 0) + default: // Battle Frontier + if (gSpecialVar_0x8004 == FRONTIER_LVL_50) return 50; - return 100; + return MAX_LEVEL; } } -static const u8* sub_81B88BC(void) +static const u8* GetFacilityCancelString(void) { u8 facilityNum = VarGet(VAR_FRONTIER_FACILITY); - if (!(facilityNum != 8 && facilityNum != 9)) + if (!(facilityNum != FACILITY_UNION_ROOM && facilityNum != FACILITY_MULTI_OR_EREADER)) return gText_CancelBattle; else if (facilityNum == FRONTIER_FACILITY_DOME && gSpecialVar_0x8005 == 2) return gText_ReturnToWaitingRoom; @@ -6752,62 +6947,63 @@ static const u8* sub_81B88BC(void) return gText_CancelChallenge; } -void sub_81B8904(u8 initArg, MainCallback callback) +void ChooseMonForTradingBoard(u8 initArg, MainCallback callback) { - InitPartyMenu(initArg, 0, 0, 0, 0, sub_81B1370, callback); + InitPartyMenu(initArg, PARTY_LAYOUT_SINGLE, PARTY_ACTION_CHOOSE_MON, FALSE, PARTY_MSG_CHOOSE_MON, Task_HandleChooseMonInput, callback); } -void OpenPartyMenuForMoveTutor(void) +void ChooseMonForMoveTutor(void) { - InitPartyMenu(0, 0, 12, 0, 4, sub_81B1370, CB2_ReturnToFieldContinueScriptPlayMapMusic); + InitPartyMenu(PARTY_MENU_TYPE_FIELD, PARTY_LAYOUT_SINGLE, PARTY_ACTION_MOVE_TUTOR, FALSE, PARTY_MSG_TEACH_WHICH_MON, Task_HandleChooseMonInput, CB2_ReturnToFieldContinueScriptPlayMapMusic); } void ChooseMonForWirelessMinigame(void) { - InitPartyMenu(11, 0, 13, 0, 1, sub_81B1370, CB2_ReturnToFieldContinueScriptPlayMapMusic); + InitPartyMenu(PARTY_MENU_TYPE_MINIGAME, PARTY_LAYOUT_SINGLE, PARTY_ACTION_MINIGAME, FALSE, PARTY_MSG_CHOOSE_MON_OR_CANCEL, Task_HandleChooseMonInput, CB2_ReturnToFieldContinueScriptPlayMapMusic); } -static u8 sub_81B8984(void) +static u8 GetPartyLayoutFromBattleType(void) { if (IsDoubleBattle() == FALSE) - return 0; + return PARTY_LAYOUT_SINGLE; if (IsMultiBattle() == TRUE) - return 2; - return 1; + return PARTY_LAYOUT_MULTI; + return PARTY_LAYOUT_DOUBLE; } -void OpenPartyMenuInBattle(u8 arg) +void OpenPartyMenuInBattle(u8 partyAction) { - InitPartyMenu(1, sub_81B8984(), arg, 0, 0, sub_81B1370, SetCB2ToReshowScreenAfterMenu); + InitPartyMenu(PARTY_MENU_TYPE_IN_BATTLE, GetPartyLayoutFromBattleType(), partyAction, FALSE, PARTY_MSG_CHOOSE_MON, Task_HandleChooseMonInput, CB2_SetUpReshowBattleScreenAfterMenu); nullsub_35(); - pokemon_change_order(); + UpdatePartyToBattleOrder(); } -void sub_81B89F0(void) +void ChooseMonForInBattleItem(void) { - InitPartyMenu(1, sub_81B8984(), 3, 0, 5, sub_81B1370, c2_815ABFC); + InitPartyMenu(PARTY_MENU_TYPE_IN_BATTLE, GetPartyLayoutFromBattleType(), PARTY_ACTION_USE_ITEM, FALSE, PARTY_MSG_USE_ON_WHICH_MON, Task_HandleChooseMonInput, CB2_ReturnToBagMenu); nullsub_35(); - pokemon_change_order(); + UpdatePartyToBattleOrder(); } -static u8 sub_81B8A2C(struct Pokemon *mon) +static u8 GetPartyMenuActionsTypeInBattle(struct Pokemon *mon) { if (GetMonData(&gPlayerParty[1], MON_DATA_SPECIES) != SPECIES_NONE && GetMonData(mon, MON_DATA_IS_EGG) == FALSE) { - if (gUnknown_0203CEC8.unkB == 1) - return 3; + if (gPartyMenu.action == PARTY_ACTION_SEND_OUT) + return ACTIONS_SEND_OUT; if (!(gBattleTypeFlags & BATTLE_TYPE_ARENA)) - return 2; + return ACTIONS_SHIFT; } - return 7; + return ACTIONS_SUMMARY_ONLY; } -static bool8 sub_81B8A7C(void) +static bool8 TrySwitchInPokemon(void) { u8 slot = GetCursorSelectionMonId(); u8 newSlot; u8 i; + // In a multi battle, slots 1, 4, and 5 are the partner's pokemon if (IsMultiBattle() == TRUE && (slot == 1 || slot == 4 || slot == 5)) { StringCopy(gStringVar1, GetTrainerPartnerName()); @@ -6822,7 +7018,7 @@ static bool8 sub_81B8A7C(void) } for (i = 0; i < gBattlersCount; i++) { - if (GetBattlerSide(i) == B_SIDE_PLAYER && sub_81B8F38(slot) == gBattlerPartyIndexes[i]) + if (GetBattlerSide(i) == B_SIDE_PLAYER && GetPartyIdFromBattleSlot(slot) == gBattlerPartyIndexes[i]) { GetMonNickname(&gPlayerParty[slot], gStringVar1); StringExpandPlaceholders(gStringVar4, gText_PkmnAlreadyInBattle); @@ -6834,55 +7030,55 @@ static bool8 sub_81B8A7C(void) StringExpandPlaceholders(gStringVar4, gText_EggCantBattle); return FALSE; } - if (sub_81B8F38(slot) == gBattleStruct->field_8B) + if (GetPartyIdFromBattleSlot(slot) == gBattleStruct->field_8B) { GetMonNickname(&gPlayerParty[slot], gStringVar1); StringExpandPlaceholders(gStringVar4, gText_PkmnAlreadySelected); return FALSE; } - if (gUnknown_0203CEC8.unkB == 4) + if (gPartyMenu.action == PARTY_ACTION_ABILITY_PREVENTS) { SetMonPreventsSwitchingString(); return FALSE; } - if (gUnknown_0203CEC8.unkB == 2) + if (gPartyMenu.action == PARTY_ACTION_CANT_SWITCH) { u8 currBattler = gBattlerInMenuId; - GetMonNickname(&gPlayerParty[pokemon_order_func(gBattlerPartyIndexes[currBattler])], gStringVar1); + GetMonNickname(&gPlayerParty[GetBattlerPartyId(gBattlerPartyIndexes[currBattler])], gStringVar1); StringExpandPlaceholders(gStringVar4, gText_PkmnCantSwitchOut); return FALSE; } - gUnknown_0203CEE9 = sub_81B8F38(slot); - gUnknown_0203CEE8 = 1; - newSlot = pokemon_order_func(gBattlerPartyIndexes[gBattlerInMenuId]); - sub_81B8FB0(newSlot, slot); - sub_81B1288(&gPlayerParty[newSlot], &gPlayerParty[slot]); + gUnknown_0203CEE9 = GetPartyIdFromBattleSlot(slot); + gUnknown_0203CEE8 = TRUE; + newSlot = GetBattlerPartyId(gBattlerPartyIndexes[gBattlerInMenuId]); + SwitchPartyMonSlots(newSlot, slot); + SwapPartyPokemon(&gPlayerParty[newSlot], &gPlayerParty[slot]); return TRUE; } void sub_81B8C68(void) { - sub_81B8C88(gUnknown_0203CF00, sub_806D7EC()); + sub_81B8C88(gBattlePartyCurrentOrder, sub_806D7EC()); } -static void sub_81B8C88(u8 *ptr, bool8 multiplayerFlag) +static void sub_81B8C88(u8 *partyBattleOrder, bool8 multiplayerFlag) { - u8 partyIndexes[6]; + u8 partyIndexes[PARTY_SIZE]; int i, j; if (IsMultiBattle() == TRUE) { if (multiplayerFlag) { - ptr[0] = 0 | (3 << 4); - ptr[1] = 5 | (4 << 4); - ptr[2] = 2 | (1 << 4); + partyBattleOrder[0] = 0 | (3 << 4); + partyBattleOrder[1] = 5 | (4 << 4); + partyBattleOrder[2] = 2 | (1 << 4); } else { - ptr[0] = 3 | (0 << 4); - ptr[1] = 2 | (1 << 4); - ptr[2] = 5 | (4 << 4); + partyBattleOrder[0] = 3 | (0 << 4); + partyBattleOrder[1] = 2 | (1 << 4); + partyBattleOrder[2] = 5 | (4 << 4); } return; } @@ -6913,8 +7109,8 @@ static void sub_81B8C88(u8 *ptr, bool8 multiplayerFlag) } } } - for (i = 0; i < 3; i++) - ptr[i] = (partyIndexes[0 + (i * 2)] << 4) | partyIndexes[1 + (i * 2)]; + for (i = 0; i < (int)ARRAY_COUNT(gBattlePartyCurrentOrder); i++) + partyBattleOrder[i] = (partyIndexes[0 + (i * 2)] << 4) | partyIndexes[1 + (i * 2)]; } void sub_81B8D64(u8 battlerId, u8 multiplayerFlag) @@ -6924,7 +7120,7 @@ void sub_81B8D64(u8 battlerId, u8 multiplayerFlag) static void sub_81B8D88(u8 *ptr, bool8 multiplayerFlag, u8 battlerId) { - u8 partyIndexes[6]; + u8 partyIndexes[PARTY_SIZE]; int i, j; u8 leftBattler; u8 rightBattler; @@ -6990,7 +7186,7 @@ static void sub_81B8D88(u8 *ptr, bool8 multiplayerFlag, u8 battlerId) void sub_81B8E80(u8 battlerId, u8 unk, u8 arrayIndex) { - u8 possiblePartyIndexes[6]; + u8 possiblePartyIndexes[PARTY_SIZE]; u8 unk2 = 0; int i, j; u8 *battleStructRelated; @@ -7025,47 +7221,48 @@ void sub_81B8E80(u8 battlerId, u8 unk, u8 arrayIndex) } } -static u8 sub_81B8F38(u8 slot) +static u8 GetPartyIdFromBattleSlot(u8 slot) { u8 modResult = slot & 1; u8 retVal; slot /= 2; if (modResult != 0) - retVal = gUnknown_0203CF00[slot] & 0xF; + retVal = gBattlePartyCurrentOrder[slot] & 0xF; else - retVal = gUnknown_0203CF00[slot] >> 4; + retVal = gBattlePartyCurrentOrder[slot] >> 4; return retVal; } -static void sub_81B8F6C(u8 slot, u8 setVal) +static void SetPartyIdAtBattleSlot(u8 slot, u8 setVal) { bool32 modResult = slot & 1; slot /= 2; if (modResult != 0) - gUnknown_0203CF00[slot] = (gUnknown_0203CF00[slot] & 0xF0) | setVal; + gBattlePartyCurrentOrder[slot] = (gBattlePartyCurrentOrder[slot] & 0xF0) | setVal; else - gUnknown_0203CF00[slot] = (gUnknown_0203CF00[slot] & 0xF) | (setVal << 4); + gBattlePartyCurrentOrder[slot] = (gBattlePartyCurrentOrder[slot] & 0xF) | (setVal << 4); } -void sub_81B8FB0(u8 slot, u8 slot2) +void SwitchPartyMonSlots(u8 slot, u8 slot2) { - u8 valBuffer = sub_81B8F38(slot); - sub_81B8F6C(slot, sub_81B8F38(slot2)); - sub_81B8F6C(slot2, valBuffer); + u8 partyId = GetPartyIdFromBattleSlot(slot); + SetPartyIdAtBattleSlot(slot, GetPartyIdFromBattleSlot(slot2)); + SetPartyIdAtBattleSlot(slot2, partyId); } -u8 pokemon_order_func(u8 slot) +// TODO: rename? get party id from battle party id? +u8 GetBattlerPartyId(u8 slot) { u8 i, j; - for (j = i = 0; i < 3; j++, i++) + for (j = i = 0; i < (int)ARRAY_COUNT(gBattlePartyCurrentOrder); j++, i++) { - if ((gUnknown_0203CF00[i] >> 4) != slot) + if ((gBattlePartyCurrentOrder[i] >> 4) != slot) { j++; - if ((gUnknown_0203CF00[i] & 0xF) == slot) + if ((gBattlePartyCurrentOrder[i] & 0xF) == slot) return j; } else @@ -7076,147 +7273,156 @@ u8 pokemon_order_func(u8 slot) return 0; } -static void pokemon_change_order(void) +static void UpdatePartyToBattleOrder(void) { struct Pokemon *partyBuffer = Alloc(sizeof(gPlayerParty)); u8 i; memcpy(partyBuffer, gPlayerParty, sizeof(gPlayerParty)); for (i = 0; i < PARTY_SIZE; i++) - memcpy(&gPlayerParty[pokemon_order_func(i)], &partyBuffer[i], sizeof(struct Pokemon)); + memcpy(&gPlayerParty[GetBattlerPartyId(i)], &partyBuffer[i], sizeof(struct Pokemon)); Free(partyBuffer); } -static void sub_81B9080(void) +static void UpdatePartyToFieldOrder(void) { struct Pokemon *partyBuffer = Alloc(sizeof(gPlayerParty)); u8 i; memcpy(partyBuffer, gPlayerParty, sizeof(gPlayerParty)); for (i = 0; i < PARTY_SIZE; i++) - memcpy(&gPlayerParty[sub_81B8F38(i)], &partyBuffer[i], sizeof(struct Pokemon)); + memcpy(&gPlayerParty[GetPartyIdFromBattleSlot(i)], &partyBuffer[i], sizeof(struct Pokemon)); Free(partyBuffer); } -static void sub_81B90D0(void) +// Unused +static void SwitchAliveMonIntoLeadSlot(void) { u8 i; struct Pokemon *mon; - u8 leadVal; + u8 partyId; for (i = 1; i < PARTY_SIZE; i++) { - mon = &gPlayerParty[sub_81B8F38(i)]; + mon = &gPlayerParty[GetPartyIdFromBattleSlot(i)]; if (GetMonData(mon, MON_DATA_SPECIES) != SPECIES_NONE && GetMonData(mon, MON_DATA_HP) != 0) { - leadVal = sub_81B8F38(0); - sub_81B8FB0(0, i); - sub_81B1288(&gPlayerParty[leadVal], mon); + partyId = GetPartyIdFromBattleSlot(0); + SwitchPartyMonSlots(0, i); + SwapPartyPokemon(&gPlayerParty[partyId], mon); break; } } } -static void sub_81B9140(void) +static void CB2_SetUpExitToBattleScreen(void) { - SetMainCallback2(SetCB2ToReshowScreenAfterMenu); + SetMainCallback2(CB2_SetUpReshowBattleScreenAfterMenu); } -void sub_81B9150(void) +void ShowPartyMenuToShowcaseMultiBattleParty(void) { - InitPartyMenu(5, 3, 0, 0, 0x7F, sub_81B917C, gMain.savedCallback); + InitPartyMenu(PARTY_MENU_TYPE_IN_MULTI_BATTLE, PARTY_LAYOUT_MULTI_SHOWCASE, PARTY_ACTION_CHOOSE_MON, FALSE, PARTY_MSG_NONE, Task_InitMultiPartnerPartySlideIn, gMain.savedCallback); } -static void sub_81B917C(u8 taskId) +#define tXPos data[0] + +// set up multi party partner slide +static void Task_InitMultiPartnerPartySlideIn(u8 taskId) { - gTasks[taskId].data[0] = 256; - sub_81B9294(taskId); + // The first slide step also sets the sprites offscreen + gTasks[taskId].tXPos = 256; + SlideMultiPartyMenuBoxSpritesOneStep(taskId); ChangeBgX(2, 0x10000, 0); - gTasks[taskId].func = sub_81B91B4; + gTasks[taskId].func = Task_MultiPartnerPartySlideIn; } -static void sub_81B91B4(u8 taskId) +static void Task_MultiPartnerPartySlideIn(u8 taskId) { s16 *data = gTasks[taskId].data; u8 i; if (!gPaletteFade.active) { - data[0] -= 8; - sub_81B9294(taskId); - if (data[0] == 0) + tXPos -= 8; + SlideMultiPartyMenuBoxSpritesOneStep(taskId); + if (tXPos == 0) { for (i = 3; i < PARTY_SIZE; i++) { - if (gUnknown_02022FF8[i - 3].species != SPECIES_NONE) - AnimateSelectedPartyIcon(gUnknown_0203CEDC[i].monSpriteId, 0); + if (gMultiPartnerParty[i - 3].species != SPECIES_NONE) + AnimateSelectedPartyIcon(sPartyMenuBoxes[i].monSpriteId, 0); } - PlaySE(SE_W231); // Harden SE? - gTasks[taskId].func = sub_81B9240; + PlaySE(SE_W231); // The Harden SE plays once the partners party mons have slid on screen + gTasks[taskId].func = Task_WaitAfterMultiPartnerPartySlideIn; } } } -static void sub_81B9240(u8 taskId) +static void Task_WaitAfterMultiPartnerPartySlideIn(u8 taskId) { s16 *data = gTasks[taskId].data; - if (++data[0] == 0x100) + // data[0] used as a timer afterwards rather than the x pos + if (++data[0] == 256) Task_ClosePartyMenu(taskId); } -static void sub_81B9270(u8 spriteId, s16 x) +static void MoveMultiPartyMenuBoxSprite(u8 spriteId, s16 x) { if (x >= 0) gSprites[spriteId].pos2.x = x; } -static void sub_81B9294(u8 taskId) +static void SlideMultiPartyMenuBoxSpritesOneStep(u8 taskId) { s16 *data = gTasks[taskId].data; u8 i; for (i = 3; i < PARTY_SIZE; i++) { - if (gUnknown_02022FF8[i - 3].species != SPECIES_NONE) + if (gMultiPartnerParty[i - 3].species != SPECIES_NONE) { - sub_81B9270(gUnknown_0203CEDC[i].monSpriteId, data[0] - 8); - sub_81B9270(gUnknown_0203CEDC[i].itemSpriteId, data[0] - 8); - sub_81B9270(gUnknown_0203CEDC[i].pokeballSpriteId, data[0] - 8); - sub_81B9270(gUnknown_0203CEDC[i].statusSpriteId, data[0] - 8); + MoveMultiPartyMenuBoxSprite(sPartyMenuBoxes[i].monSpriteId, tXPos - 8); + MoveMultiPartyMenuBoxSprite(sPartyMenuBoxes[i].itemSpriteId, tXPos - 8); + MoveMultiPartyMenuBoxSprite(sPartyMenuBoxes[i].pokeballSpriteId, tXPos - 8); + MoveMultiPartyMenuBoxSprite(sPartyMenuBoxes[i].statusSpriteId, tXPos - 8); } } ChangeBgX(2, 0x800, 1); } -void sub_81B9328(void) +#undef tXpos + +void ChooseMonForDaycare(void) { - InitPartyMenu(6, 0, 0, 0, 15, sub_81B1370, sub_81B9390); + InitPartyMenu(PARTY_MENU_TYPE_DAYCARE, PARTY_LAYOUT_SINGLE, PARTY_ACTION_CHOOSE_MON, FALSE, PARTY_MSG_CHOOSE_MON_2, Task_HandleChooseMonInput, BufferMonSelection); } -static void sub_81B9354(u8 arg1) +// Unused +static void ChoosePartyMonByMenuType(u8 menuType) { - gFieldCallback2 = hm_add_c3_without_phase_2; - InitPartyMenu(arg1, 0, 11, 0, 0, sub_81B1370, CB2_ReturnToField); + gFieldCallback2 = CB2_FadeFromPartyMenu; + InitPartyMenu(menuType, PARTY_LAYOUT_SINGLE, PARTY_ACTION_CHOOSE_AND_CLOSE, FALSE, PARTY_MSG_CHOOSE_MON, Task_HandleChooseMonInput, CB2_ReturnToField); } -static void sub_81B9390(void) +static void BufferMonSelection(void) { gSpecialVar_0x8004 = GetCursorSelectionMonId(); if (gSpecialVar_0x8004 >= PARTY_SIZE) gSpecialVar_0x8004 = 0xFF; - gFieldCallback2 = hm_add_c3_without_phase_2; + gFieldCallback2 = CB2_FadeFromPartyMenu; SetMainCallback2(CB2_ReturnToField); } -bool8 hm_add_c3_without_phase_2(void) // might not be bool +bool8 CB2_FadeFromPartyMenu(void) { pal_fill_black(); - CreateTask(task_hm_without_phase_2, 10); + CreateTask(Task_PartyMenuWaitForFade, 10); return TRUE; } -static void task_hm_without_phase_2(u8 taskId) +static void Task_PartyMenuWaitForFade(u8 taskId) { if (IsWeatherNotFadingIn()) { @@ -7226,79 +7432,80 @@ static void task_hm_without_phase_2(u8 taskId) } } -void sub_81B9404(void) +void ChooseContestMon(void) { ScriptContext2_Enable(); FadeScreen(FADE_TO_BLACK, 0); - CreateTask(sub_81B9424, 10); + CreateTask(Task_ChooseContestMon, 10); } -static void sub_81B9424(u8 taskId) +static void Task_ChooseContestMon(u8 taskId) { if (!gPaletteFade.active) { CleanupOverworldWindowsAndTilemaps(); - InitPartyMenu(2, 0, 11, 0, 0, sub_81B1370, sub_81B9470); + InitPartyMenu(PARTY_MENU_TYPE_CONTEST, PARTY_LAYOUT_SINGLE, PARTY_ACTION_CHOOSE_AND_CLOSE, FALSE, PARTY_MSG_CHOOSE_MON, Task_HandleChooseMonInput, CB2_ChooseContestMon); DestroyTask(taskId); } } -static void sub_81B9470(void) +static void CB2_ChooseContestMon(void) { gContestMonPartyIndex = GetCursorSelectionMonId(); if (gContestMonPartyIndex >= PARTY_SIZE) gContestMonPartyIndex = 0xFF; gSpecialVar_0x8004 = gContestMonPartyIndex; - gFieldCallback2 = hm_add_c3_without_phase_2; + gFieldCallback2 = CB2_FadeFromPartyMenu; SetMainCallback2(CB2_ReturnToField); } -void sub_81B94B0(void) +// Used as a script special for showing a party mon to various npcs (e.g. in-game trades, move deleter) +void ChoosePartyMon(void) { ScriptContext2_Enable(); FadeScreen(FADE_TO_BLACK, 0); - CreateTask(sub_81B94D0, 10); + CreateTask(Task_ChoosePartyMon, 10); } -static void sub_81B94D0(u8 taskId) +static void Task_ChoosePartyMon(u8 taskId) { if (!gPaletteFade.active) { CleanupOverworldWindowsAndTilemaps(); - InitPartyMenu(3, 0, 11, 0, 0, sub_81B1370, sub_81B9390); + InitPartyMenu(PARTY_MENU_TYPE_CHOOSE_MON, PARTY_LAYOUT_SINGLE, PARTY_ACTION_CHOOSE_AND_CLOSE, FALSE, PARTY_MSG_CHOOSE_MON, Task_HandleChooseMonInput, BufferMonSelection); DestroyTask(taskId); } } -void sub_81B951C(void) +void ChooseMonForMoveRelearner(void) { ScriptContext2_Enable(); FadeScreen(FADE_TO_BLACK, 0); - CreateTask(sub_81B953C, 10); + CreateTask(Task_ChooseMonForMoveRelearner, 10); } -static void sub_81B953C(u8 taskId) +static void Task_ChooseMonForMoveRelearner(u8 taskId) { if (!gPaletteFade.active) { CleanupOverworldWindowsAndTilemaps(); - InitPartyMenu(7, 0, 11, 0, 0, sub_81B1370, sub_81B9588); + InitPartyMenu(PARTY_MENU_TYPE_MOVE_RELEARNER, PARTY_LAYOUT_SINGLE, PARTY_ACTION_CHOOSE_AND_CLOSE, FALSE, PARTY_MSG_CHOOSE_MON, Task_HandleChooseMonInput, CB2_ChooseMonForMoveRelearner); DestroyTask(taskId); } } -static void sub_81B9588(void) +static void CB2_ChooseMonForMoveRelearner(void) { gSpecialVar_0x8004 = GetCursorSelectionMonId(); if (gSpecialVar_0x8004 >= PARTY_SIZE) gSpecialVar_0x8004 = 0xFF; else gSpecialVar_0x8005 = GetNumberOfRelearnableMoves(&gPlayerParty[gSpecialVar_0x8004]); - gFieldCallback2 = hm_add_c3_without_phase_2; + gFieldCallback2 = CB2_FadeFromPartyMenu; SetMainCallback2(CB2_ReturnToField); } -void sub_81B95E0(void) +void DoBattlePyramidMonsHaveHeldItem(void) { u8 i; @@ -7313,42 +7520,44 @@ void sub_81B95E0(void) } } -void sub_81B9620(void) +// Can be called if the Battle Pyramid Bag is full on exiting and at least one party mon still has held items +// The player can then select to toss items from the bag or take/toss held items from the party +void BattlePyramidChooseMonHeldItems(void) { ScriptContext2_Enable(); FadeScreen(FADE_TO_BLACK, 0); - CreateTask(sub_81B9640, 10); + CreateTask(Task_BattlePyramidChooseMonHeldItems, 10); } -static void sub_81B9640(u8 taskId) +static void Task_BattlePyramidChooseMonHeldItems(u8 taskId) { if (!gPaletteFade.active) { CleanupOverworldWindowsAndTilemaps(); - InitPartyMenu(12, 0, 0, 0, 0, sub_81B1370, sub_81B9390); + InitPartyMenu(PARTY_MENU_TYPE_STORE_PYRAMID_HELD_ITEMS, PARTY_LAYOUT_SINGLE, PARTY_ACTION_CHOOSE_MON, FALSE, PARTY_MSG_CHOOSE_MON, Task_HandleChooseMonInput, BufferMonSelection); DestroyTask(taskId); } } -void sub_81B968C(void) +void MoveDeleterChooseMoveToForget(void) { ShowPokemonSummaryScreen(PSS_MODE_SELECT_MOVE, gPlayerParty, gSpecialVar_0x8004, gPlayerPartyCount - 1, CB2_ReturnToField); gFieldCallback = FieldCallback_ReturnToEventScript2; } -void sub_81B96D0(void) +void GetNumMovesSelectedMonHas(void) { u8 i; gSpecialVar_Result = 0; for (i = 0; i < MAX_MON_MOVES; i++) { - if (GetMonData(&gPlayerParty[gSpecialVar_0x8004], MON_DATA_MOVE1 + i) != ITEM_NONE) + if (GetMonData(&gPlayerParty[gSpecialVar_0x8004], MON_DATA_MOVE1 + i) != MOVE_NONE) gSpecialVar_Result++; } } -void sub_81B9718(void) +void BufferMoveDeleterNicknameAndMove(void) { struct Pokemon *mon = &gPlayerParty[gSpecialVar_0x8004]; u16 move = GetMonData(mon, MON_DATA_MOVE1 + gSpecialVar_0x8005); @@ -7357,17 +7566,17 @@ void sub_81B9718(void) StringCopy(gStringVar2, gMoveNames[move]); } -void sub_81B9770(void) +void MoveDeleterForgetMove(void) { u16 i; SetMonMoveSlot(&gPlayerParty[gSpecialVar_0x8004], MOVE_NONE, gSpecialVar_0x8005); RemoveMonPPBonus(&gPlayerParty[gSpecialVar_0x8004], gSpecialVar_0x8005); for (i = gSpecialVar_0x8005; i < MAX_MON_MOVES - 1; i++) - sub_81B97DC(&gPlayerParty[gSpecialVar_0x8004], i, i + 1); + ShiftMoveSlot(&gPlayerParty[gSpecialVar_0x8004], i, i + 1); } -static void sub_81B97DC(struct Pokemon *mon, u8 slotTo, u8 slotFrom) +static void ShiftMoveSlot(struct Pokemon *mon, u8 slotTo, u8 slotFrom) { u16 move1 = GetMonData(mon, MON_DATA_MOVE1 + slotTo); u16 move0 = GetMonData(mon, MON_DATA_MOVE1 + slotFrom); @@ -7388,7 +7597,7 @@ static void sub_81B97DC(struct Pokemon *mon, u8 slotTo, u8 slotFrom) SetMonData(mon, MON_DATA_PP_BONUSES, &ppBonuses); } -void sub_81B98DC(void) +void IsSelectedMonEgg(void) { if (GetMonData(&gPlayerParty[gSpecialVar_0x8004], MON_DATA_IS_EGG)) gSpecialVar_Result = TRUE; @@ -7396,7 +7605,7 @@ void sub_81B98DC(void) gSpecialVar_Result = FALSE; } -void sub_81B9918(void) +void IsLastMonThatKnowsSurf(void) { u16 move; u32 i, j; diff --git a/src/player_pc.c b/src/player_pc.c index dd90bbd8a7..0ce8f81f43 100644 --- a/src/player_pc.c +++ b/src/player_pc.c @@ -824,7 +824,7 @@ static void Mailbox_DoGiveMailPokeMenu(u8 taskId) { sub_81D1EC0(); CleanupOverworldWindowsAndTilemaps(); - sub_81B8448(); + ChooseMonToGiveMailFromMailbox(); DestroyTask(taskId); } } diff --git a/src/pokeblock.c b/src/pokeblock.c index 14e5b6a1fd..4c744b5377 100644 --- a/src/pokeblock.c +++ b/src/pokeblock.c @@ -462,7 +462,7 @@ void OpenPokeblockCase(u8 caseId, void (*callback)(void)) void OpenPokeblockCaseInBattle(void) { - OpenPokeblockCase(PBLOCK_CASE_BATTLE, SetCB2ToReshowScreenAfterMenu2); + OpenPokeblockCase(PBLOCK_CASE_BATTLE, CB2_SetUpReshowBattleScreenAfterMenu2); } void OpenPokeblockCaseOnFeeder(void) diff --git a/src/pokemon.c b/src/pokemon.c index c555ca3d71..18d4fdb12a 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -60,6 +60,7 @@ static void EncryptBoxMon(struct BoxPokemon *boxMon); static void DecryptBoxMon(struct BoxPokemon *boxMon); static void sub_806E6CC(u8 taskId); static bool8 ShouldGetStatBadgeBoost(u16 flagId, u8 battlerId); +static u16 GiveMoveToBoxMon(struct BoxPokemon *boxMon, u16 move); // EWRAM vars EWRAM_DATA static u8 sLearningMoveTableID = 0; @@ -2879,22 +2880,22 @@ u16 GiveMoveToMon(struct Pokemon *mon, u16 move) return GiveMoveToBoxMon(&mon->box, move); } -u16 GiveMoveToBoxMon(struct BoxPokemon *boxMon, u16 move) +static u16 GiveMoveToBoxMon(struct BoxPokemon *boxMon, u16 move) { s32 i; for (i = 0; i < MAX_MON_MOVES; i++) { u16 existingMove = GetBoxMonData(boxMon, MON_DATA_MOVE1 + i, NULL); - if (!existingMove) + if (existingMove == MOVE_NONE) { SetBoxMonData(boxMon, MON_DATA_MOVE1 + i, &move); SetBoxMonData(boxMon, MON_DATA_PP1 + i, &gBattleMoves[move].pp); return move; } if (existingMove == move) - return -2; + return MON_ALREADY_KNOWS_MOVE; } - return 0xFFFF; + return MON_HAS_MAX_MOVES; } u16 GiveMoveToBattleMon(struct BattlePokemon *mon, u16 move) @@ -2949,7 +2950,7 @@ void GiveBoxMonInitialMoveset(struct BoxPokemon *boxMon) move = (gLevelUpLearnsets[species][i] & 0x1FF); - if (GiveMoveToBoxMon(boxMon, move) == 0xFFFF) + if (GiveMoveToBoxMon(boxMon, move) == MON_HAS_MAX_MOVES) DeleteFirstMoveAndGiveMoveToBoxMon(boxMon, move); } } @@ -4860,7 +4861,7 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov if (battlerId != 4) { gAbsentBattlerFlags &= ~gBitTable[battlerId]; - CopyPlayerPartyMonToBattleData(battlerId, pokemon_order_func(gBattlerPartyIndexes[battlerId])); + CopyPlayerPartyMonToBattleData(battlerId, GetBattlerPartyId(gBattlerPartyIndexes[battlerId])); if (GetBattlerSide(gActiveBattler) == B_SIDE_PLAYER && gBattleResults.numRevivesUsed < 255) gBattleResults.numRevivesUsed++; } @@ -6439,11 +6440,11 @@ void SetMonPreventsSwitchingString(void) gBattleTextBuff1[4] = B_BUFF_EOS; if (GetBattlerSide(gBattleStruct->battlerPreventingSwitchout) == B_SIDE_PLAYER) - gBattleTextBuff1[3] = pokemon_order_func(gBattlerPartyIndexes[gBattleStruct->battlerPreventingSwitchout]); + gBattleTextBuff1[3] = GetBattlerPartyId(gBattlerPartyIndexes[gBattleStruct->battlerPreventingSwitchout]); else gBattleTextBuff1[3] = gBattlerPartyIndexes[gBattleStruct->battlerPreventingSwitchout]; - PREPARE_MON_NICK_WITH_PREFIX_BUFFER(gBattleTextBuff2, gBattlerInMenuId, pokemon_order_func(gBattlerPartyIndexes[gBattlerInMenuId])) + PREPARE_MON_NICK_WITH_PREFIX_BUFFER(gBattleTextBuff2, gBattlerInMenuId, GetBattlerPartyId(gBattlerPartyIndexes[gBattlerInMenuId])) BattleStringExpandPlaceholders(gText_PkmnsXPreventsSwitching, gStringVar4); } diff --git a/src/pokemon_summary_screen.c b/src/pokemon_summary_screen.c index 1190b73d55..5ab13b09e9 100644 --- a/src/pokemon_summary_screen.c +++ b/src/pokemon_summary_screen.c @@ -42,6 +42,7 @@ #include "window.h" #include "constants/items.h" #include "constants/moves.h" +#include "constants/party_menu.h" #include "constants/region_map_sections.h" #include "constants/rgb.h" #include "constants/songs.h" @@ -162,7 +163,7 @@ static EWRAM_DATA struct PokemonSummaryScreenData u8 unk_filler4[6]; } *sMonSummaryScreen = NULL; EWRAM_DATA u8 gLastViewedMonIndex = 0; -static EWRAM_DATA u8 sUnknown_0203CF21 = 0; +static EWRAM_DATA u8 sMoveSlotToReplace = 0; ALIGNED(4) static EWRAM_DATA u8 sUnknownTaskId = 0; struct UnkStruct_61CC04 @@ -1491,11 +1492,11 @@ static void HandleInput(u8 taskId) { ChangeSummaryPokemon(taskId, 1); } - else if ((gMain.newKeys & DPAD_LEFT) || GetLRKeysState() == 1) + else if ((gMain.newKeys & DPAD_LEFT) || GetLRKeysPressed() == MENU_L_PRESSED) { ChangePage(taskId, -1); } - else if ((gMain.newKeys & DPAD_RIGHT) || GetLRKeysState() == 2) + else if ((gMain.newKeys & DPAD_RIGHT) || GetLRKeysPressed() == MENU_R_PRESSED) { ChangePage(taskId, 1); } @@ -2159,11 +2160,11 @@ static void HandleReplaceMoveInput(u8 taskId) data[0] = 4; sub_81C1070(data, 1, &sMonSummaryScreen->firstMoveIndex); } - else if (gMain.newKeys & DPAD_LEFT || GetLRKeysState() == 1) + else if (gMain.newKeys & DPAD_LEFT || GetLRKeysPressed() == MENU_L_PRESSED) { ChangePage(taskId, -1); } - else if (gMain.newKeys & DPAD_RIGHT || GetLRKeysState() == 2) + else if (gMain.newKeys & DPAD_RIGHT || GetLRKeysPressed() == MENU_R_PRESSED) { ChangePage(taskId, 1); } @@ -2173,8 +2174,8 @@ static void HandleReplaceMoveInput(u8 taskId) { StopPokemonAnimations(); PlaySE(SE_SELECT); - sUnknown_0203CF21 = sMonSummaryScreen->firstMoveIndex; - gSpecialVar_0x8005 = sUnknown_0203CF21; + sMoveSlotToReplace = sMonSummaryScreen->firstMoveIndex; + gSpecialVar_0x8005 = sMoveSlotToReplace; BeginCloseSummaryScreen(taskId); } else @@ -2188,8 +2189,8 @@ static void HandleReplaceMoveInput(u8 taskId) u32 var1; StopPokemonAnimations(); PlaySE(SE_SELECT); - sUnknown_0203CF21 = 4; - gSpecialVar_0x8005 = 4; + sMoveSlotToReplace = MAX_MON_MOVES; + gSpecialVar_0x8005 = MAX_MON_MOVES; BeginCloseSummaryScreen(taskId); } } @@ -2238,7 +2239,7 @@ static void HandleHMMovesCantBeForgottenInput(u8 taskId) data[1] = 0; gTasks[taskId].func = HandleReplaceMoveInput; } - else if (gMain.newKeys & DPAD_LEFT || GetLRKeysState() == 1) + else if (gMain.newKeys & DPAD_LEFT || GetLRKeysPressed() == MENU_L_PRESSED) { if (sMonSummaryScreen->currPageIndex != 2) { @@ -2252,7 +2253,7 @@ static void HandleHMMovesCantBeForgottenInput(u8 taskId) sub_81C1EFC(9, -2, move); } } - else if (gMain.newKeys & DPAD_RIGHT || GetLRKeysState() == 2) + else if (gMain.newKeys & DPAD_RIGHT || GetLRKeysPressed() == MENU_R_PRESSED) { if (sMonSummaryScreen->currPageIndex != 3) { @@ -2281,9 +2282,9 @@ static void HandleHMMovesCantBeForgottenInput(u8 taskId) } } -u8 sub_81C1B94(void) +u8 GetMoveSlotToReplace(void) { - return sUnknown_0203CF21; + return sMoveSlotToReplace; } static void DrawPagination(void) // Updates the pagination dots at the top of the summary screen diff --git a/src/region_map.c b/src/region_map.c index 3bb532a193..b6133ee0de 100644 --- a/src/region_map.c +++ b/src/region_map.c @@ -55,7 +55,7 @@ static EWRAM_DATA struct { /*0x008*/ struct RegionMap regionMap; /*0x88c*/ u8 unk_88c[0x1c0]; /*0xa4c*/ u8 unk_a4c[0x26]; - /*0xa72*/ bool8 unk_a72; + /*0xa72*/ bool8 choseFlyLocation; } *sFlyMap = NULL; // a74 static bool32 gUnknown_03001180; @@ -1605,7 +1605,8 @@ u8 *GetMapName(u8 *dest, u16 regionMapId, u16 padLength) return str; } -u8 *sub_81245DC(u8 *dest, u16 mapSecId) +// TODO: probably needs a better name +u8 *GetMapNameGeneric(u8 *dest, u16 mapSecId) { switch (mapSecId) { @@ -1626,7 +1627,7 @@ u8 *sub_8124610(u8 *dest, u16 mapSecId) } else { - return sub_81245DC(dest, mapSecId); + return GetMapNameGeneric(dest, mapSecId); } } @@ -1972,13 +1973,13 @@ static void sub_8124D64(void) if (sFlyMap->regionMap.iconDrawType == MAPSECTYPE_CITY_CANFLY || sFlyMap->regionMap.iconDrawType == MAPSECTYPE_BATTLE_FRONTIER) { m4aSongNumStart(SE_SELECT); - sFlyMap->unk_a72 = TRUE; + sFlyMap->choseFlyLocation = TRUE; sub_81248F4(sub_8124E0C); } break; case INPUT_EVENT_B_BUTTON: m4aSongNumStart(SE_SELECT); - sFlyMap->unk_a72 = FALSE; + sFlyMap->choseFlyLocation = FALSE; sub_81248F4(sub_8124E0C); break; } @@ -1997,7 +1998,7 @@ static void sub_8124E0C(void) if (!UpdatePaletteFade()) { FreeRegionMapIconResources(); - if (sFlyMap->unk_a72) + if (sFlyMap->choseFlyLocation) { switch (sFlyMap->regionMap.mapSecId) { @@ -2024,11 +2025,11 @@ static void sub_8124E0C(void) } break; } - sub_80B69DC(); + ReturnToFieldFromFlyMapSelect(); } else { - SetMainCallback2(sub_81B58A8); + SetMainCallback2(CB2_ReturnToPartyMenuFromFlyMap); } if (sFlyMap != NULL) { diff --git a/src/scrcmd.c b/src/scrcmd.c index bdeee0524d..0bec4d35b1 100644 --- a/src/scrcmd.c +++ b/src/scrcmd.c @@ -39,7 +39,6 @@ #include "script_menu.h" #include "script_movement.h" #include "script_pokemon_80F8.h" -#include "script_pokemon_81B9.h" #include "shop.h" #include "slot_machine.h" #include "sound.h" @@ -1938,7 +1937,7 @@ bool8 ScrCmd_getpricereduction(struct ScriptContext *ctx) bool8 ScrCmd_choosecontestmon(struct ScriptContext *ctx) { - sub_81B9404(); + ChooseContestMon(); ScriptContext1_Stop(); return TRUE; } diff --git a/src/script_pokemon_util_80F87D8.c b/src/script_pokemon_util_80F87D8.c index f8206797b0..16c5d477aa 100755 --- a/src/script_pokemon_util_80F87D8.c +++ b/src/script_pokemon_util_80F87D8.c @@ -646,7 +646,7 @@ void ScriptSetMonMoveSlot(u8 monIndex, u16 move, u8 slot) void ChooseHalfPartyForBattle(void) { gMain.savedCallback = CB2_ReturnFromChooseHalfParty; - VarSet(VAR_FRONTIER_FACILITY, FRONTIER_FACILITY_DOUBLE_COLOSSEUM); + VarSet(VAR_FRONTIER_FACILITY, FACILITY_MULTI_OR_EREADER); InitChooseHalfPartyForBattle(0); } diff --git a/src/strings.c b/src/strings.c index ed702958e6..ef63b52c42 100644 --- a/src/strings.c +++ b/src/strings.c @@ -388,7 +388,7 @@ const u8 gText_PCMailboxFull[] = _("Your PC's MAILBOX is full.{PAUSE_UNTIL_PRESS const u8 gText_MailMessageWillBeLost[] = _("If the MAIL is removed, the\nmessage will be lost. Okay?"); const u8 gText_RemoveMailBeforeItem[] = _("MAIL must be removed before\nholding an item.{PAUSE_UNTIL_PRESS}"); const u8 gText_PkmnWasGivenItem[] = _("{STR_VAR_1} was given the\n{STR_VAR_2} to hold.{PAUSE_UNTIL_PRESS}"); -const u8 gText_SwitchPkmnItem[] = _("{STR_VAR_1} is already holding\none {STR_VAR_2}.\pWould you like to switch the\ntwo items?"); +const u8 gText_PkmnAlreadyHoldingItemSwitch[] = _("{STR_VAR_1} is already holding\none {STR_VAR_2}.\pWould you like to switch the\ntwo items?"); const u8 gText_PkmnNotHolding[] = _("{STR_VAR_1} isn't holding\nanything.{PAUSE_UNTIL_PRESS}"); const u8 gText_ReceivedItemFromPkmn[] = _("Received the {STR_VAR_2}\nfrom {STR_VAR_1}.{PAUSE_UNTIL_PRESS}"); const u8 gText_MailTakenFromPkmn[] = _("MAIL was taken from the\nPOKéMON.{PAUSE_UNTIL_PRESS}"); @@ -471,7 +471,7 @@ const u8 gText_CancelChallenge[] = _("Cancel the challenge?"); const u8 gText_EscapeFromHere[] = _("Want to escape from here and return\nto {STR_VAR_1}?"); const u8 gText_ReturnToHealingSpot[] = _("Want to return to the healing spot\nused last in {STR_VAR_1}?"); const u8 gText_PauseUntilPress[] = _("{PAUSE_UNTIL_PRESS}"); -const u8 gJPText_PutVar1IntoSpinner[] = _("{STR_VAR_1}を ぐるぐるこうかんに\nだして よろしいですか?"); +const u8 gJPText_AreYouSureYouWantToSpinTradeMon[] = _("{STR_VAR_1}を ぐるぐるこうかんに\nだして よろしいですか?"); ALIGNED(4) const u8 gText_OnlyPkmnForBattle[] = _("That's your only\nPOKéMON for battle."); ALIGNED(4) const u8 gText_PkmnCantBeTradedNow[] = _("That POKéMON can't be traded\nnow."); ALIGNED(4) const u8 gText_EggCantBeTradedNow[] = _("An EGG can't be traded now."); diff --git a/src/trade.c b/src/trade.c index bfbc241944..6dbc60f1d6 100644 --- a/src/trade.c +++ b/src/trade.c @@ -1439,8 +1439,8 @@ static void TradeMenuProcessInput_SelectedMon(void) QueueAction(QUEUE_DELAY_MSG, QUEUE_MON_CANT_BE_TRADED); sTradeMenuData->tradeMenuFunc = TRADEMENUFUNC_REDRAW_MAIN_MENU; break; - case CANT_TRADE_EGG: - case CANT_TRADE_EGG2: + case CANT_TRADE_EGG_YET: + case CANT_TRADE_EGG_YET2: QueueAction(QUEUE_DELAY_MSG, QUEUE_EGG_CANT_BE_TRADED); sTradeMenuData->tradeMenuFunc = TRADEMENUFUNC_REDRAW_MAIN_MENU; break; @@ -2352,7 +2352,7 @@ static u32 CanTradeSelectedMon(struct Pokemon *playerParty, int partyCount, int if (!IsNationalPokedexEnabled()) { if (species2[monIdx] == SPECIES_EGG) - return CANT_TRADE_EGG; + return CANT_TRADE_EGG_YET; if (!IsSpeciesInHoennDex(species2[monIdx])) return CANT_TRADE_NATIONAL; @@ -2366,7 +2366,7 @@ static u32 CanTradeSelectedMon(struct Pokemon *playerParty, int partyCount, int if (!(player->progressFlagsCopy & 0xF)) { if (species2[monIdx] == SPECIES_EGG) - return CANT_TRADE_EGG2; + return CANT_TRADE_EGG_YET2; if (!IsSpeciesInHoennDex(species2[monIdx])) return CANT_TRADE_INVALID_MON; @@ -2542,8 +2542,10 @@ int CanRegisterMonForTradingBoard(struct UnkLinkRfuStruct_02022B14Substruct rfuP } // r6/r7 flip. Ugh. +// Spin Trade wasnt fully implemented, but this checks if a mon would be valid to Spin Trade +// Unlike later generations, this version of Spin Trade isnt only for Eggs #ifdef NONMATCHING -int CanTradeSelectedPartyMenuMon(struct Pokemon *mon, u16 monIdx) +int CanSpinTradeMon(struct Pokemon *mon, u16 monIdx) { int i, version, versions, canTradeAnyMon, numMonsLeft; int speciesArray[PARTY_SIZE]; @@ -2592,7 +2594,7 @@ int CanTradeSelectedPartyMenuMon(struct Pokemon *mon, u16 monIdx) return CANT_TRADE_NATIONAL; if (speciesArray[monIdx] == SPECIES_NONE) - return CANT_TRADE_EGG; + return CANT_TRADE_EGG_YET; } numMonsLeft = 0; @@ -2611,7 +2613,7 @@ int CanTradeSelectedPartyMenuMon(struct Pokemon *mon, u16 monIdx) } #else NAKED -int CanTradeSelectedPartyMenuMon(struct Pokemon *mon, u16 a1) +int CanSpinTradeMon(struct Pokemon *mon, u16 a1) { asm_unified("push {r4-r7,lr}\n\ mov r7, r8\n\ diff --git a/src/union_room.c b/src/union_room.c index f259a38f0d..5952b03ebc 100644 --- a/src/union_room.c +++ b/src/union_room.c @@ -47,6 +47,7 @@ #include "constants/cable_club.h" #include "constants/game_stat.h" #include "constants/maps.h" +#include "constants/party_menu.h" #include "constants/rgb.h" #include "constants/songs.h" #include "constants/species.h" @@ -2308,7 +2309,9 @@ void sub_80156E0(u8 taskId) data->state = 3; break; case 3: - if ((sub_81B1360() == 8 || sub_81B1360() == 9) && sUnionRoomTrade.field_0 != 0) + if ((GetPartyMenuType() == PARTY_MENU_TYPE_UNION_ROOM_REGISTER + || GetPartyMenuType() == PARTY_MENU_TYPE_UNION_ROOM_TRADE) + && sUnionRoomTrade.field_0 != 0) { id = GetCursorSelectionMonId(); switch (sUnionRoomTrade.field_0) @@ -2876,7 +2879,7 @@ void sub_80156E0(u8 taskId) { sUnionRoomTrade.field_0 = 1; gFieldCallback = sub_80AF128; - sub_81B8904(8, CB2_ReturnToField); + ChooseMonForTradingBoard(PARTY_MENU_TYPE_UNION_ROOM_REGISTER, CB2_ReturnToField); } break; case 52: @@ -2988,7 +2991,7 @@ void sub_80156E0(u8 taskId) gUnionRoomRequestedMonType = data->field_0->arr[taskData[1]].unk.field_0.type; gUnionRoomOfferedSpecies = data->field_0->arr[taskData[1]].unk.field_0.species; gFieldCallback = sub_80AF128; - sub_81B8904(9, CB2_ReturnToField); + ChooseMonForTradingBoard(PARTY_MENU_TYPE_UNION_ROOM_TRADE, CB2_ReturnToField); sub_80156B0(data); sUnionRoomTrade.field_8 = taskData[1]; } From f35a3f73b20aa11c05434b23262e1eeacc62e081 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Tue, 22 Oct 2019 19:44:38 -0400 Subject: [PATCH 27/46] Document gabby_and_ty.inc --- data/maps/Route111/map.json | 12 +- data/maps/Route111/scripts.inc | 2 +- data/maps/Route118/map.json | 12 +- data/maps/Route118/scripts.inc | 2 +- data/maps/Route120/map.json | 8 +- data/maps/Route120/scripts.inc | 2 +- data/scripts/gabby_and_ty.inc | 301 ++++++++++++++++----------------- data/text/tv.inc | 62 +++---- 8 files changed, 190 insertions(+), 211 deletions(-) diff --git a/data/maps/Route111/map.json b/data/maps/Route111/map.json index ef7e29999a..0317366cdf 100644 --- a/data/maps/Route111/map.json +++ b/data/maps/Route111/map.json @@ -196,7 +196,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "Route111_EventScript_28CDF6", + "script": "GabbyAndTy_EventScript_TyBattle1", "flag": "FLAG_HIDE_ROUTE_111_GABBY_AND_TY_1" }, { @@ -209,7 +209,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "Route111_EventScript_28CDD6", + "script": "GabbyAndTy_EventScript_GabbyBattle1", "flag": "FLAG_HIDE_ROUTE_111_GABBY_AND_TY_1" }, { @@ -300,7 +300,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "Route111_EventScript_28CE96", + "script": "GabbyAndTy_EventScript_GabbyBattle4", "flag": "FLAG_HIDE_ROUTE_111_GABBY_AND_TY_3" }, { @@ -313,7 +313,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "Route111_EventScript_28CEB6", + "script": "GabbyAndTy_EventScript_TyBattle4", "flag": "FLAG_HIDE_ROUTE_111_GABBY_AND_TY_3" }, { @@ -326,7 +326,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "Route111_EventScript_28CF16", + "script": "GabbyAndTy_EventScript_GabbyBattle6", "flag": "FLAG_HIDE_ROUTE_111_GABBY_AND_TY_2" }, { @@ -339,7 +339,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "Route111_EventScript_28CF36", + "script": "GabbyAndTy_EventScript_TyBattle6", "flag": "FLAG_HIDE_ROUTE_111_GABBY_AND_TY_2" }, { diff --git a/data/maps/Route111/scripts.inc b/data/maps/Route111/scripts.inc index fceacdfcc5..8121265bbb 100644 --- a/data/maps/Route111/scripts.inc +++ b/data/maps/Route111/scripts.inc @@ -46,7 +46,7 @@ Route111_OnTransition: @ 81F0D87 compare VAR_MIRAGE_TOWER_STATE, 2 call_if_eq Route111_EventScript_1F0E40 call Route111_EventScript_1F0DE6 - call Route111_EventScript_28CCC7 + call GabbyAndTy_EventScript_UpdateLocation checktrainerflag TRAINER_VICKY goto_if_lt Route111_EventScript_1F0E26 end diff --git a/data/maps/Route118/map.json b/data/maps/Route118/map.json index e7737bf1e0..40a988bad8 100644 --- a/data/maps/Route118/map.json +++ b/data/maps/Route118/map.json @@ -92,7 +92,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "Route118_EventScript_28CE16", + "script": "GabbyAndTy_EventScript_GabbyBattle2", "flag": "FLAG_HIDE_ROUTE_118_GABBY_AND_TY_1" }, { @@ -105,7 +105,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "Route118_EventScript_28CE36", + "script": "GabbyAndTy_EventScript_TyBattle2", "flag": "FLAG_HIDE_ROUTE_118_GABBY_AND_TY_1" }, { @@ -131,7 +131,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "Route118_EventScript_28CED6", + "script": "Route118_EventScript_GabbyBattle5", "flag": "FLAG_HIDE_ROUTE_118_GABBY_AND_TY_2" }, { @@ -144,7 +144,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "Route118_EventScript_28CEF6", + "script": "Route118_EventScript_TyBattle5", "flag": "FLAG_HIDE_ROUTE_118_GABBY_AND_TY_2" }, { @@ -157,7 +157,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "Route118_EventScript_28CF16", + "script": "GabbyAndTy_EventScript_GabbyBattle6", "flag": "FLAG_HIDE_ROUTE_118_GABBY_AND_TY_3" }, { @@ -170,7 +170,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "Route118_EventScript_28CF36", + "script": "GabbyAndTy_EventScript_TyBattle6", "flag": "FLAG_HIDE_ROUTE_118_GABBY_AND_TY_3" }, { diff --git a/data/maps/Route118/scripts.inc b/data/maps/Route118/scripts.inc index 661bd938c6..38b231111a 100644 --- a/data/maps/Route118/scripts.inc +++ b/data/maps/Route118/scripts.inc @@ -5,7 +5,7 @@ Route118_MapScripts:: @ 81F3DBC .byte 0 Route118_OnTransition: @ 81F3DCC - call Route118_EventScript_28CCC7 + call GabbyAndTy_EventScript_UpdateLocation compare VAR_SHOULD_END_UNUSUAL_WEATHER, 1 call_if_eq UnusualWeather_EventScript_HideMapNamePopup compare VAR_UNUSUAL_WEATHER_LOCATION, UNUSUAL_WEATHER_ROUTE_118_EAST diff --git a/data/maps/Route120/map.json b/data/maps/Route120/map.json index 47f472a3d7..8bcfafc728 100644 --- a/data/maps/Route120/map.json +++ b/data/maps/Route120/map.json @@ -243,7 +243,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "Route120_EventScript_28CE76", + "script": "GabbyAndTy_EventScript_TyBattle3", "flag": "FLAG_HIDE_ROUTE_120_GABBY_AND_TY_1" }, { @@ -256,7 +256,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "Route120_EventScript_28CE56", + "script": "GabbyAndTy_EventScript_GabbyBattle3", "flag": "FLAG_HIDE_ROUTE_120_GABBY_AND_TY_1" }, { @@ -269,7 +269,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "Route120_EventScript_28CF16", + "script": "GabbyAndTy_EventScript_GabbyBattle6", "flag": "FLAG_HIDE_ROUTE_120_GABBY_AND_TY_2" }, { @@ -282,7 +282,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "Route120_EventScript_28CF36", + "script": "GabbyAndTy_EventScript_TyBattle6", "flag": "FLAG_HIDE_ROUTE_120_GABBY_AND_TY_2" }, { diff --git a/data/maps/Route120/scripts.inc b/data/maps/Route120/scripts.inc index 0629d8f0d5..562416c1d6 100644 --- a/data/maps/Route120/scripts.inc +++ b/data/maps/Route120/scripts.inc @@ -61,7 +61,7 @@ Route120_EventScript_1F54C8:: @ 81F54C8 return Route120_OnTransition: @ 81F54CD - call Route120_EventScript_28CCC7 + call GabbyAndTy_EventScript_UpdateLocation call Route120_EventScript_1F54D8 end diff --git a/data/scripts/gabby_and_ty.inc b/data/scripts/gabby_and_ty.inc index 0f8d71f6b0..7ed366aca1 100644 --- a/data/scripts/gabby_and_ty.inc +++ b/data/scripts/gabby_and_ty.inc @@ -1,337 +1,332 @@ +@ Unused EventScript_28CCAA:: @ 828CCAA setvar VAR_0x8005, 8 special InterviewBefore compare VAR_RESULT, 1 - goto_if_eq EventScript_28CCC6 + goto_if_eq EventScript_UnusedRet setvar VAR_0x8005, 8 special InterviewAfter return -EventScript_28CCC6:: @ 828CCC6 +EventScript_UnusedRet:: @ 828CCC6 return -Route111_EventScript_28CCC7:: @ 828CCC7 -Route118_EventScript_28CCC7:: @ 828CCC7 -Route120_EventScript_28CCC7:: @ 828CCC7 +@ Gabby and Ty always move to the same spots for the first 5 battles +@ From the 6th battle onwards, they move randomly between locations 6-8 +GabbyAndTy_EventScript_UpdateLocation:: @ 828CCC7 cleartrainerflag TRAINER_GABBY_AND_TY_6 specialvar VAR_RESULT, GabbyAndTyGetBattleNum switch VAR_RESULT - case 0, Route111_EventScript_28CD38 - case 1, Route111_EventScript_28CD3E - case 2, Route111_EventScript_28CD49 - case 3, Route111_EventScript_28CD54 - case 4, Route111_EventScript_28CD5F - case 5, Route111_EventScript_28CD6A - case 6, Route111_EventScript_28CD75 - case 7, Route111_EventScript_28CD80 - case 8, Route111_EventScript_28CD8B + case 0, GabbyAndTy_EventScript_MoveForBattle1 + case 1, GabbyAndTy_EventScript_MoveForBattle2 + case 2, GabbyAndTy_EventScript_MoveForBattle3 + case 3, GabbyAndTy_EventScript_MoveForBattle4 + case 4, GabbyAndTy_EventScript_MoveForBattle5 + case 5, GabbyAndTy_EventScript_MoveForBattle6 + case 6, GabbyAndTy_EventScript_MoveForBattle7 + case 7, GabbyAndTy_EventScript_MoveForBattle8 + case 8, GabbyAndTy_EventScript_MoveForBattle9 end -Route111_EventScript_28CD38:: @ 828CD38 - call Route111_EventScript_28CD9A +GabbyAndTy_EventScript_MoveForBattle1:: @ 828CD38 + call GabbyAndTy_EventScript_ShowAtRoute111_1 return -Route111_EventScript_28CD3E:: @ 828CD3E - call Route111_EventScript_28CDA2 - call Route111_EventScript_28CD96 +GabbyAndTy_EventScript_MoveForBattle2:: @ 828CD3E + call GabbyAndTy_EventScript_ShowAtRoute118_1 + call GabbyAndTy_EventScript_HideAtRoute111_1 return -Route111_EventScript_28CD49:: @ 828CD49 - call Route111_EventScript_28CDAA - call Route111_EventScript_28CD9E +GabbyAndTy_EventScript_MoveForBattle3:: @ 828CD49 + call GabbyAndTy_EventScript_ShowAtRoute120_1 + call GabbyAndTy_EventScript_HideAtRoute118_1 return -Route111_EventScript_28CD54:: @ 828CD54 - call Route111_EventScript_28CDB2 - call Route111_EventScript_28CDA6 +GabbyAndTy_EventScript_MoveForBattle4:: @ 828CD54 + call GabbyAndTy_EventScript_ShowAtRoute111_3 + call GabbyAndTy_EventScript_HideAtRoute120_1 return -Route111_EventScript_28CD5F:: @ 828CD5F - call Route111_EventScript_28CDBA - call Route111_EventScript_28CDAE +GabbyAndTy_EventScript_MoveForBattle5:: @ 828CD5F + call GabbyAndTy_EventScript_ShowAtRoute118_2 + call GabbyAndTy_EventScript_HideAtRoute111_3 return -Route111_EventScript_28CD6A:: @ 828CD6A - call Route111_EventScript_28CDC2 - call Route111_EventScript_28CDB6 +GabbyAndTy_EventScript_MoveForBattle6:: @ 828CD6A + call GabbyAndTy_EventScript_ShowAtRoute120_2 + call GabbyAndTy_EventScript_HideAtRoute118_2 return -Route111_EventScript_28CD75:: @ 828CD75 - call Route111_EventScript_28CDCA - call Route111_EventScript_28CDBE +GabbyAndTy_EventScript_MoveForBattle7:: @ 828CD75 + call GabbyAndTy_EventScript_ShowAtRoute111_2 + call GabbyAndTy_EventScript_HideAtRoute120_2 return -Route111_EventScript_28CD80:: @ 828CD80 - call Route111_EventScript_28CDD2 - call Route111_EventScript_28CDC6 +GabbyAndTy_EventScript_MoveForBattle8:: @ 828CD80 + call GabbyAndTy_EventScript_ShowAtRoute118_3 + call GabbyAndTy_EventScript_HideAtRoute111_2 return -Route111_EventScript_28CD8B:: @ 828CD8B - call Route111_EventScript_28CDC2 - call Route111_EventScript_28CDCE +GabbyAndTy_EventScript_MoveForBattle9:: @ 828CD8B + call GabbyAndTy_EventScript_ShowAtRoute120_2 + call GabbyAndTy_EventScript_HideAtRoute118_3 return -Route111_EventScript_28CD96:: @ 828CD96 +GabbyAndTy_EventScript_HideAtRoute111_1:: @ 828CD96 setflag FLAG_HIDE_ROUTE_111_GABBY_AND_TY_1 return -Route111_EventScript_28CD9A:: @ 828CD9A +GabbyAndTy_EventScript_ShowAtRoute111_1:: @ 828CD9A clearflag FLAG_HIDE_ROUTE_111_GABBY_AND_TY_1 return -Route111_EventScript_28CD9E:: @ 828CD9E +GabbyAndTy_EventScript_HideAtRoute118_1:: @ 828CD9E setflag FLAG_HIDE_ROUTE_118_GABBY_AND_TY_1 return -Route111_EventScript_28CDA2:: @ 828CDA2 +GabbyAndTy_EventScript_ShowAtRoute118_1:: @ 828CDA2 clearflag FLAG_HIDE_ROUTE_118_GABBY_AND_TY_1 return -Route111_EventScript_28CDA6:: @ 828CDA6 +GabbyAndTy_EventScript_HideAtRoute120_1:: @ 828CDA6 setflag FLAG_HIDE_ROUTE_120_GABBY_AND_TY_1 return -Route111_EventScript_28CDAA:: @ 828CDAA +GabbyAndTy_EventScript_ShowAtRoute120_1:: @ 828CDAA clearflag FLAG_HIDE_ROUTE_120_GABBY_AND_TY_1 return -Route111_EventScript_28CDAE:: @ 828CDAE +GabbyAndTy_EventScript_HideAtRoute111_3:: @ 828CDAE setflag FLAG_HIDE_ROUTE_111_GABBY_AND_TY_3 return -Route111_EventScript_28CDB2:: @ 828CDB2 +GabbyAndTy_EventScript_ShowAtRoute111_3:: @ 828CDB2 clearflag FLAG_HIDE_ROUTE_111_GABBY_AND_TY_3 return -Route111_EventScript_28CDB6:: @ 828CDB6 +GabbyAndTy_EventScript_HideAtRoute118_2:: @ 828CDB6 setflag FLAG_HIDE_ROUTE_118_GABBY_AND_TY_2 return -Route111_EventScript_28CDBA:: @ 828CDBA +GabbyAndTy_EventScript_ShowAtRoute118_2:: @ 828CDBA clearflag FLAG_HIDE_ROUTE_118_GABBY_AND_TY_2 return -Route111_EventScript_28CDBE:: @ 828CDBE +GabbyAndTy_EventScript_HideAtRoute120_2:: @ 828CDBE setflag FLAG_HIDE_ROUTE_120_GABBY_AND_TY_2 return -Route111_EventScript_28CDC2:: @ 828CDC2 +GabbyAndTy_EventScript_ShowAtRoute120_2:: @ 828CDC2 clearflag FLAG_HIDE_ROUTE_120_GABBY_AND_TY_2 return -Route111_EventScript_28CDC6:: @ 828CDC6 +GabbyAndTy_EventScript_HideAtRoute111_2:: @ 828CDC6 setflag FLAG_HIDE_ROUTE_111_GABBY_AND_TY_2 return -Route111_EventScript_28CDCA:: @ 828CDCA +GabbyAndTy_EventScript_ShowAtRoute111_2:: @ 828CDCA clearflag FLAG_HIDE_ROUTE_111_GABBY_AND_TY_2 return -Route111_EventScript_28CDCE:: @ 828CDCE +GabbyAndTy_EventScript_HideAtRoute118_3:: @ 828CDCE setflag FLAG_HIDE_ROUTE_118_GABBY_AND_TY_3 return -Route111_EventScript_28CDD2:: @ 828CDD2 +GabbyAndTy_EventScript_ShowAtRoute118_3:: @ 828CDD2 clearflag FLAG_HIDE_ROUTE_118_GABBY_AND_TY_3 return -Route111_EventScript_28CDD6:: @ 828CDD6 - trainerbattle_double TRAINER_GABBY_AND_TY_1, Route111_Text_28AF05, Route111_Text_28B000, Route111_Text_28B5EC, Route111_EventScript_28CF56 - msgbox Route111_Text_28B5C0, MSGBOX_DEFAULT +GabbyAndTy_EventScript_GabbyBattle1:: @ 828CDD6 + trainerbattle_double TRAINER_GABBY_AND_TY_1, GabbyAndTy_Text_GabbyPreFirstBattle, GabbyAndTy_Text_GabbyDefeatFirstTime, GabbyAndTy_Text_GabbyNotEnoughMons, GabbyAndTy_EventScript_FirstInterview + msgbox GabbyAndTy_Text_KeepingAnEyeOutForYou, MSGBOX_DEFAULT release end -Route111_EventScript_28CDF6:: @ 828CDF6 - trainerbattle_double TRAINER_GABBY_AND_TY_1, Route111_Text_28B75C, Route111_Text_28B8B1, Route111_Text_28B841, Route111_EventScript_28CF56 - msgbox Route111_Text_28B805, MSGBOX_DEFAULT +GabbyAndTy_EventScript_TyBattle1:: @ 828CDF6 + trainerbattle_double TRAINER_GABBY_AND_TY_1, GabbyAndTy_Text_TyPreFirstBattle, GabbyAndTy_Text_TyDefeatFirstTime, GabbyAndTy_Text_TyNotEnoughMons, GabbyAndTy_EventScript_FirstInterview + msgbox GabbyAndTy_Text_TyPostBattle, MSGBOX_DEFAULT release end -Route118_EventScript_28CE16:: @ 828CE16 - trainerbattle_double TRAINER_GABBY_AND_TY_2, Route118_Text_28AF7D, Route118_Text_28B719, Route118_Text_28B5EC, Route118_EventScript_28CFC3 - msgbox Route118_Text_28B5C0, MSGBOX_DEFAULT +GabbyAndTy_EventScript_GabbyBattle2:: @ 828CE16 + trainerbattle_double TRAINER_GABBY_AND_TY_2, GabbyAndTy_Text_GabbyPreBattle, GabbyAndTy_Text_GabbyDefeat, GabbyAndTy_Text_GabbyNotEnoughMons, GabbyAndTy_EventScript_RequestInterview + msgbox GabbyAndTy_Text_KeepingAnEyeOutForYou, MSGBOX_DEFAULT release end -Route118_EventScript_28CE36:: @ 828CE36 - trainerbattle_double TRAINER_GABBY_AND_TY_2, Route118_Text_28B7B1, Route118_Text_28B8F6, Route118_Text_28B841, Route118_EventScript_28CFC3 - msgbox Route118_Text_28B805, MSGBOX_DEFAULT +GabbyAndTy_EventScript_TyBattle2:: @ 828CE36 + trainerbattle_double TRAINER_GABBY_AND_TY_2, GabbyAndTy_Text_TyPreBattle, GabbyAndTy_Text_TyDefeat, GabbyAndTy_Text_TyNotEnoughMons, GabbyAndTy_EventScript_RequestInterview + msgbox GabbyAndTy_Text_TyPostBattle, MSGBOX_DEFAULT release end -Route120_EventScript_28CE56:: @ 828CE56 - trainerbattle_double TRAINER_GABBY_AND_TY_3, Route120_Text_28AF7D, Route120_Text_28B719, Route120_Text_28B5EC, Route120_EventScript_28CFC3 - msgbox Route120_Text_28B5C0, MSGBOX_DEFAULT +GabbyAndTy_EventScript_GabbyBattle3:: @ 828CE56 + trainerbattle_double TRAINER_GABBY_AND_TY_3, GabbyAndTy_Text_GabbyPreBattle, GabbyAndTy_Text_GabbyDefeat, GabbyAndTy_Text_GabbyNotEnoughMons, GabbyAndTy_EventScript_RequestInterview + msgbox GabbyAndTy_Text_KeepingAnEyeOutForYou, MSGBOX_DEFAULT release end -Route120_EventScript_28CE76:: @ 828CE76 - trainerbattle_double TRAINER_GABBY_AND_TY_3, Route120_Text_28B7B1, Route120_Text_28B8F6, Route120_Text_28B841, Route120_EventScript_28CFC3 - msgbox Route120_Text_28B805, MSGBOX_DEFAULT +GabbyAndTy_EventScript_TyBattle3:: @ 828CE76 + trainerbattle_double TRAINER_GABBY_AND_TY_3, GabbyAndTy_Text_TyPreBattle, GabbyAndTy_Text_TyDefeat, GabbyAndTy_Text_TyNotEnoughMons, GabbyAndTy_EventScript_RequestInterview + msgbox GabbyAndTy_Text_TyPostBattle, MSGBOX_DEFAULT release end -Route111_EventScript_28CE96:: @ 828CE96 - trainerbattle_double TRAINER_GABBY_AND_TY_4, Route111_Text_28AF7D, Route111_Text_28B719, Route111_Text_28B5EC, Route111_EventScript_28CFC3 - msgbox Route111_Text_28B5C0, MSGBOX_DEFAULT +GabbyAndTy_EventScript_GabbyBattle4:: @ 828CE96 + trainerbattle_double TRAINER_GABBY_AND_TY_4, GabbyAndTy_Text_GabbyPreBattle, GabbyAndTy_Text_GabbyDefeat, GabbyAndTy_Text_GabbyNotEnoughMons, GabbyAndTy_EventScript_RequestInterview + msgbox GabbyAndTy_Text_KeepingAnEyeOutForYou, MSGBOX_DEFAULT release end -Route111_EventScript_28CEB6:: @ 828CEB6 - trainerbattle_double TRAINER_GABBY_AND_TY_4, Route111_Text_28B7B1, Route111_Text_28B8F6, Route111_Text_28B841, Route111_EventScript_28CFC3 - msgbox Route111_Text_28B805, MSGBOX_DEFAULT +GabbyAndTy_EventScript_TyBattle4:: @ 828CEB6 + trainerbattle_double TRAINER_GABBY_AND_TY_4, GabbyAndTy_Text_TyPreBattle, GabbyAndTy_Text_TyDefeat, GabbyAndTy_Text_TyNotEnoughMons, GabbyAndTy_EventScript_RequestInterview + msgbox GabbyAndTy_Text_TyPostBattle, MSGBOX_DEFAULT release end -Route118_EventScript_28CED6:: @ 828CED6 - trainerbattle_double TRAINER_GABBY_AND_TY_5, Route118_Text_28AF7D, Route118_Text_28B719, Route118_Text_28B5EC, Route118_EventScript_28CFC3 - msgbox Route118_Text_28B5C0, MSGBOX_DEFAULT +Route118_EventScript_GabbyBattle5:: @ 828CED6 + trainerbattle_double TRAINER_GABBY_AND_TY_5, GabbyAndTy_Text_GabbyPreBattle, GabbyAndTy_Text_GabbyDefeat, GabbyAndTy_Text_GabbyNotEnoughMons, GabbyAndTy_EventScript_RequestInterview + msgbox GabbyAndTy_Text_KeepingAnEyeOutForYou, MSGBOX_DEFAULT release end -Route118_EventScript_28CEF6:: @ 828CEF6 - trainerbattle_double TRAINER_GABBY_AND_TY_5, Route118_Text_28B7B1, Route118_Text_28B8F6, Route118_Text_28B841, Route118_EventScript_28CFC3 - msgbox Route118_Text_28B805, MSGBOX_DEFAULT +Route118_EventScript_TyBattle5:: @ 828CEF6 + trainerbattle_double TRAINER_GABBY_AND_TY_5, GabbyAndTy_Text_TyPreBattle, GabbyAndTy_Text_TyDefeat, GabbyAndTy_Text_TyNotEnoughMons, GabbyAndTy_EventScript_RequestInterview + msgbox GabbyAndTy_Text_TyPostBattle, MSGBOX_DEFAULT release end -Route111_EventScript_28CF16:: @ 828CF16 -Route118_EventScript_28CF16:: @ 828CF16 -Route120_EventScript_28CF16:: @ 828CF16 - trainerbattle_double TRAINER_GABBY_AND_TY_6, Route111_Text_28AF7D, Route111_Text_28B719, Route111_Text_28B5EC, Route111_EventScript_28CFC3 - msgbox Route111_Text_28B5C0, MSGBOX_DEFAULT +GabbyAndTy_EventScript_GabbyBattle6:: @ 828CF16 + trainerbattle_double TRAINER_GABBY_AND_TY_6, GabbyAndTy_Text_GabbyPreBattle, GabbyAndTy_Text_GabbyDefeat, GabbyAndTy_Text_GabbyNotEnoughMons, GabbyAndTy_EventScript_RequestInterview + msgbox GabbyAndTy_Text_KeepingAnEyeOutForYou, MSGBOX_DEFAULT release end -Route111_EventScript_28CF36:: @ 828CF36 -Route118_EventScript_28CF36:: @ 828CF36 -Route120_EventScript_28CF36:: @ 828CF36 - trainerbattle_double TRAINER_GABBY_AND_TY_6, Route111_Text_28B7B1, Route111_Text_28B8F6, Route111_Text_28B841, Route111_EventScript_28CFC3 - msgbox Route111_Text_28B805, MSGBOX_DEFAULT +GabbyAndTy_EventScript_TyBattle6:: @ 828CF36 + trainerbattle_double TRAINER_GABBY_AND_TY_6, GabbyAndTy_Text_TyPreBattle, GabbyAndTy_Text_TyDefeat, GabbyAndTy_Text_TyNotEnoughMons, GabbyAndTy_EventScript_RequestInterview + msgbox GabbyAndTy_Text_TyPostBattle, MSGBOX_DEFAULT release end -Route111_EventScript_28CF56:: @ 828CF56 +GabbyAndTy_EventScript_FirstInterview:: @ 828CF56 special GabbyAndTyBeforeInterview special GabbyAndTySetScriptVarsToEventObjectLocalIds compare VAR_FACING, DIR_NORTH - call_if_eq Route111_EventScript_28CF94 + call_if_eq GabbyAndTy_EventScript_FacePlayerNorth compare VAR_FACING, DIR_SOUTH - call_if_eq Route111_EventScript_28CF9F + call_if_eq GabbyAndTy_EventScript_FacePlayerSouth compare VAR_FACING, DIR_EAST - call_if_eq Route111_EventScript_28CFB1 - goto_if_set FLAG_TEMP_1, Route111_EventScript_28D0EE - msgbox Route111_Text_28B042, MSGBOX_YESNO - goto Route111_EventScript_28D0A7 + call_if_eq GabbyAndTy_EventScript_FacePlayerEast + goto_if_set FLAG_TEMP_1, GabbyAndTy_EventScript_KeepingAnEyeOutForYou + msgbox GabbyAndTy_Text_WhoAreYouInterview, MSGBOX_YESNO + goto GabbyAndTy_EventScript_Interview end -Route111_EventScript_28CF94:: @ 828CF94 - applymovement VAR_0x8004, Route111_Movement_28D04D +GabbyAndTy_EventScript_FacePlayerNorth:: @ 828CF94 + applymovement VAR_0x8004, GabbyAndTy_Movement_WalkInPlaceDown waitmovement 0 return -Route111_EventScript_28CF9F:: @ 828CF9F - applymovement VAR_0x8004, Route111_Movement_28D04F +GabbyAndTy_EventScript_FacePlayerSouth:: @ 828CF9F + applymovement VAR_0x8004, GabbyAndTy_Movement_WalkInPlaceUp applymovement VAR_0x8005, Common_Movement_WalkInPlaceFastestUp waitmovement 0 return -Route111_EventScript_28CFB1:: @ 828CFB1 - applymovement VAR_0x8004, Route111_Movement_28D051 +GabbyAndTy_EventScript_FacePlayerEast:: @ 828CFB1 + applymovement VAR_0x8004, GabbyAndTy_Movement_WalkInPlaceLeft applymovement VAR_0x8005, Common_Movement_WalkInPlaceFastestLeft waitmovement 0 return -Route111_EventScript_28CFC3:: @ 828CFC3 -Route118_EventScript_28CFC3:: @ 828CFC3 -Route120_EventScript_28CFC3:: @ 828CFC3 +GabbyAndTy_EventScript_RequestInterview:: @ 828CFC3 special GabbyAndTyBeforeInterview special GabbyAndTySetScriptVarsToEventObjectLocalIds compare VAR_FACING, DIR_NORTH - call_if_eq Route111_EventScript_28CF94 + call_if_eq GabbyAndTy_EventScript_FacePlayerNorth compare VAR_FACING, DIR_SOUTH - call_if_eq Route111_EventScript_28CF9F + call_if_eq GabbyAndTy_EventScript_FacePlayerSouth compare VAR_FACING, DIR_EAST - call_if_eq Route111_EventScript_28CFB1 - goto_if_set FLAG_TEMP_1, Route111_EventScript_28D0EE + call_if_eq GabbyAndTy_EventScript_FacePlayerEast + goto_if_set FLAG_TEMP_1, GabbyAndTy_EventScript_KeepingAnEyeOutForYou specialvar VAR_RESULT, GabbyAndTyGetLastQuote compare VAR_RESULT, 0 - goto_if_eq Route111_EventScript_28D053 - msgbox Route111_Text_28B137, MSGBOX_DEFAULT + goto_if_eq GabbyAndTy_EventScript_DidntInterviewLastTime + msgbox GabbyAndTy_Text_QuoteFromLastInterview, MSGBOX_DEFAULT specialvar VAR_RESULT, GabbyAndTyGetLastBattleTrivia switch VAR_RESULT - case 0, Route111_EventScript_28D061 - case 1, Route111_EventScript_28D06F - case 2, Route111_EventScript_28D07D - case 3, Route111_EventScript_28D08B - case 4, Route111_EventScript_28D099 + case 0, GabbyAndTy_EventScript_RequestInterviewNoTrivia + case 1, GabbyAndTy_EventScript_RequestInterviewShortBattle + case 2, GabbyAndTy_EventScript_RequestInterviewThrewBall + case 3, GabbyAndTy_EventScript_RequestInterviewUsedItems + case 4, GabbyAndTy_EventScript_RequestInterviewLostAMon end -Route111_Movement_28D04D: @ 828D04D +GabbyAndTy_Movement_WalkInPlaceDown: @ 828D04D walk_in_place_down step_end -Route111_Movement_28D04F: @ 828D04F +GabbyAndTy_Movement_WalkInPlaceUp: @ 828D04F walk_in_place_up step_end -Route111_Movement_28D051: @ 828D051 +GabbyAndTy_Movement_WalkInPlaceLeft: @ 828D051 walk_in_place_left step_end -Route111_EventScript_28D053:: @ 828D053 - msgbox Route111_Text_28B62D, MSGBOX_YESNO - goto Route111_EventScript_28D0A7 +GabbyAndTy_EventScript_DidntInterviewLastTime:: @ 828D053 + msgbox GabbyAndTy_Text_GiveUsAnInterviewThisTime, MSGBOX_YESNO + goto GabbyAndTy_EventScript_Interview end -Route111_EventScript_28D061:: @ 828D061 - msgbox Route111_Text_28B3F3, MSGBOX_YESNO - goto Route111_EventScript_28D0A7 +GabbyAndTy_EventScript_RequestInterviewNoTrivia:: @ 828D061 + msgbox GabbyAndTy_Text_InterviewAgain, MSGBOX_YESNO + goto GabbyAndTy_EventScript_Interview end -Route111_EventScript_28D06F:: @ 828D06F - msgbox Route111_Text_28B1B3, MSGBOX_YESNO - goto Route111_EventScript_28D0A7 +GabbyAndTy_EventScript_RequestInterviewShortBattle:: @ 828D06F + msgbox GabbyAndTy_Text_YouStompedUsInterviewAgain, MSGBOX_YESNO + goto GabbyAndTy_EventScript_Interview end -Route111_EventScript_28D07D:: @ 828D07D - msgbox Route111_Text_28B23D, MSGBOX_YESNO - goto Route111_EventScript_28D0A7 +GabbyAndTy_EventScript_RequestInterviewThrewBall:: @ 828D07D + msgbox GabbyAndTy_Text_YouThrewABallAtUsInterviewAgain, MSGBOX_YESNO + goto GabbyAndTy_EventScript_Interview end -Route111_EventScript_28D08B:: @ 828D08B - msgbox Route111_Text_28B2FA, MSGBOX_YESNO - goto Route111_EventScript_28D0A7 +GabbyAndTy_EventScript_RequestInterviewUsedItems:: @ 828D08B + msgbox GabbyAndTy_Text_CleverItemSkillsInterviewAgain, MSGBOX_YESNO + goto GabbyAndTy_EventScript_Interview end -Route111_EventScript_28D099:: @ 828D099 - msgbox Route111_Text_28B379, MSGBOX_YESNO - goto Route111_EventScript_28D0A7 +GabbyAndTy_EventScript_RequestInterviewLostAMon:: @ 828D099 + msgbox GabbyAndTy_Text_WeLookedRespectableInterviewAgain, MSGBOX_YESNO + goto GabbyAndTy_EventScript_Interview end -Route111_EventScript_28D0A7:: @ 828D0A7 +GabbyAndTy_EventScript_Interview:: @ 828D0A7 compare VAR_RESULT, 0 - goto_if_eq Route111_EventScript_28D0E1 - msgbox Route111_Text_28B433, MSGBOX_DEFAULT + goto_if_eq GabbyAndTy_EventScript_DontGiveUpKeepingEyeOut + msgbox GabbyAndTy_Text_DescribeYourFeelings, MSGBOX_DEFAULT setvar VAR_0x8004, EASY_CHAT_TYPE_GABBY_AND_TY call Common_ShowEasyChatScreen lock faceplayer compare VAR_RESULT, 0 - goto_if_eq Route111_EventScript_28D0E1 - msgbox Route111_Text_28B4AB, MSGBOX_DEFAULT + goto_if_eq GabbyAndTy_EventScript_DontGiveUpKeepingEyeOut + msgbox GabbyAndTy_Text_PerfectWellBeSeeingYou, MSGBOX_DEFAULT special GabbyAndTyAfterInterview setflag FLAG_TEMP_1 release end -Route111_EventScript_28D0E1:: @ 828D0E1 - msgbox Route111_Text_28B577, MSGBOX_DEFAULT +GabbyAndTy_EventScript_DontGiveUpKeepingEyeOut:: @ 828D0E1 + msgbox GabbyAndTy_Text_DontGiveUpKeepingEyeOut, MSGBOX_DEFAULT setflag FLAG_TEMP_1 release end -Route111_EventScript_28D0EE:: @ 828D0EE - msgbox Route111_Text_28B5C0, MSGBOX_DEFAULT +GabbyAndTy_EventScript_KeepingAnEyeOutForYou:: @ 828D0EE + msgbox GabbyAndTy_Text_KeepingAnEyeOutForYou, MSGBOX_DEFAULT release end diff --git a/data/text/tv.inc b/data/text/tv.inc index f084ac0556..c717935850 100644 --- a/data/text/tv.inc +++ b/data/text/tv.inc @@ -2694,25 +2694,23 @@ gTVPokemonBattleUpdateText07:: @ 0828AE26 .string "This concludes this episode of\n" .string "“POKéMON BATTLE UPDATE!”$" -Route111_Text_28AF05: @ 0828AF05 +GabbyAndTy_Text_GabbyPreFirstBattle: @ 0828AF05 .string "GABBY: Oh! We've just spotted a tough-\n" .string "looking TRAINER here of all places!\p" .string "Okay, roll camera!\n" .string "Let's get this interview.$" -Route111_Text_28AF7D: @ 0828AF7D -Route118_Text_28AF7D: @ 0828AF7D -Route120_Text_28AF7D: @ 0828AF7D +GabbyAndTy_Text_GabbyPreBattle: @ 0828AF7D .string "GABBY: Oh! You're {PLAYER}! Hi!\n" .string "Do you remember us from last time?\p" .string "Can you show us how much stronger\n" .string "you've become? Okay, cue interview!$" -Route111_Text_28B000: @ 0828B000 +GabbyAndTy_Text_GabbyDefeatFirstTime: @ 0828B000 .string "GABBY: My eyes didn't lie!\n" .string "I did discover an astonishing TRAINER!$" -Route111_Text_28B042: @ 0828B042 +GabbyAndTy_Text_WhoAreYouInterview: @ 0828B042 .string "GABBY: Awesome! Awesome!\n" .string "Who are you?!\p" .string "I knew we were onto something wild\n" @@ -2723,19 +2721,19 @@ Route111_Text_28B042: @ 0828B042 .string "So, would you give us a bit of your time\n" .string "for an interview?$" -Route111_Text_28B137: @ 0828B137 +GabbyAndTy_Text_QuoteFromLastInterview: @ 0828B137 .string "GABBY: “{STR_VAR_1}!”\p" .string "Remember? That's the quote you gave\n" .string "us as the battle clincher last time.\p" .string "I never, ever forget stuff like that!$" -Route111_Text_28B1B3: @ 0828B1B3 +GabbyAndTy_Text_YouStompedUsInterviewAgain: @ 0828B1B3 .string "The last time we battled, you stomped\n" .string "us before we could brace ourselves…\p" .string "Anyway, what do you think?\n" .string "Do you want to be interviewed again?$" -Route111_Text_28B23D: @ 0828B23D +GabbyAndTy_Text_YouThrewABallAtUsInterviewAgain: @ 0828B23D .string "The last time we battled, didn't you\n" .string "throw a POKé BALL at us?\p" .string "We were shocked! So we told everyone,\n" @@ -2743,30 +2741,30 @@ Route111_Text_28B23D: @ 0828B23D .string "Anyway, what do you think?\n" .string "Do you want to be interviewed again?$" -Route111_Text_28B2FA: @ 0828B2FA +GabbyAndTy_Text_CleverItemSkillsInterviewAgain: @ 0828B2FA .string "The last time we battled, your item\n" .string "skills cleverly did us in.\p" .string "Anyway, what do you think?\n" .string "Do you want to be interviewed again?$" -Route111_Text_28B379: @ 0828B379 +GabbyAndTy_Text_WeLookedRespectableInterviewAgain: @ 0828B379 .string "The last time we battled, we managed\n" .string "to look respectable.\p" .string "Anyway, what do you think?\n" .string "Do you want to be interviewed again?$" -Route111_Text_28B3F3: @ 0828B3F3 +GabbyAndTy_Text_InterviewAgain: @ 0828B3F3 .string "Anyway, what do you think?\n" .string "Do you want to be interviewed again?$" -Route111_Text_28B433: @ 0828B433 +GabbyAndTy_Text_DescribeYourFeelings: @ 0828B433 .string "You will?\n" .string "Thank you!\p" .string "Okay, I need you to describe your\n" .string "feelings about our battle, but it\l" .string "has to be short and sweet. Go!$" -Route111_Text_28B4AB: @ 0828B4AB +GabbyAndTy_Text_PerfectWellBeSeeingYou: @ 0828B4AB .string "GABBY: Mmm, yeah!\n" .string "That's the perfect clincher!\p" .string "I get the feeling that this will make\n" @@ -2776,24 +2774,20 @@ Route111_Text_28B4AB: @ 0828B4AB .string "Okay!\n" .string "We'll be seeing you!$" -Route111_Text_28B577: @ 0828B577 +GabbyAndTy_Text_DontGiveUpKeepingEyeOut: @ 0828B577 .string "GABBY: Oh…\p" .string "Okay, but don't give up!\n" .string "We'll be keeping an eye out for you!$" -Route111_Text_28B5C0: @ 0828B5C0 -Route118_Text_28B5C0: @ 0828B5C0 -Route120_Text_28B5C0: @ 0828B5C0 +GabbyAndTy_Text_KeepingAnEyeOutForYou: @ 0828B5C0 .string "GABBY: We'll be keeping an eye out\n" .string "for you!$" -Route111_Text_28B5EC: @ 0828B5EC -Route118_Text_28B5EC: @ 0828B5EC -Route120_Text_28B5EC: @ 0828B5EC +GabbyAndTy_Text_GabbyNotEnoughMons: @ 0828B5EC .string "GABBY: Is there a strong TRAINER\n" .string "anywhere with a lot of POKéMON?$" -Route111_Text_28B62D: @ 0828B62D +GabbyAndTy_Text_GiveUsAnInterviewThisTime: @ 0828B62D .string "GABBY: Wow, you are something!\p" .string "You've gotten a lot stronger--a lot--\n" .string "since we last battled.\p" @@ -2803,46 +2797,36 @@ Route111_Text_28B62D: @ 0828B62D .string "Are you willing to give us an interview\l" .string "this time?$" -Route111_Text_28B719: @ 0828B719 -Route118_Text_28B719: @ 0828B719 -Route120_Text_28B719: @ 0828B719 +GabbyAndTy_Text_GabbyDefeat: @ 0828B719 .string "GABBY: That was an intense battle!\n" .string "Did you get all that on camera?$" -Route111_Text_28B75C: @ 0828B75C +GabbyAndTy_Text_TyPreFirstBattle: @ 0828B75C .string "TY: Hey, lookie here! A tough-looking\n" .string "TRAINER here, of all places!\l" .string "Camera's rolling!$" -Route111_Text_28B7B1: @ 0828B7B1 -Route118_Text_28B7B1: @ 0828B7B1 -Route120_Text_28B7B1: @ 0828B7B1 +GabbyAndTy_Text_TyPreBattle: @ 0828B7B1 .string "TY: Hey, lookie here!\n" .string "I remember you!\p" .string "I'll get this battle all on this\n" .string "here camera!$" -Route111_Text_28B805: @ 0828B805 -Route118_Text_28B805: @ 0828B805 -Route120_Text_28B805: @ 0828B805 +GabbyAndTy_Text_TyPostBattle: @ 0828B805 .string "TY: You're a natural!\n" .string "Got me some prime footage right here!$" -Route111_Text_28B841: @ 0828B841 -Route118_Text_28B841: @ 0828B841 -Route120_Text_28B841: @ 0828B841 +GabbyAndTy_Text_TyNotEnoughMons: @ 0828B841 .string "TY: Do you only have the one POKéMON\n" .string "and that's it?\p" .string "If you had more POKéMON, it'd make for\n" .string "better footage, but…$" -Route111_Text_28B8B1: @ 0828B8B1 +GabbyAndTy_Text_TyDefeatFirstTime: @ 0828B8B1 .string "TY: Yep, we sure spotted a hot TRAINER.\n" .string "This is a huge scoop for us!$" -Route111_Text_28B8F6: @ 0828B8F6 -Route118_Text_28B8F6: @ 0828B8F6 -Route120_Text_28B8F6: @ 0828B8F6 +GabbyAndTy_Text_TyDefeat: @ 0828B8F6 .string "TY: Yep, I got it all.\n" .string "That whole battle's on camera.$" From 13f97601876155203eeee8a76b16f9aa3d2c73ca Mon Sep 17 00:00:00 2001 From: Marcus Huderle Date: Sat, 26 Oct 2019 11:16:04 -0500 Subject: [PATCH 28/46] Document route 109 scripts --- data/event_scripts.s | 20 +- data/maps/DewfordTown/scripts.inc | 15 +- data/maps/Route104/scripts.inc | 12 +- data/maps/Route104_MrBrineysHouse/scripts.inc | 2 +- data/maps/Route109/map.json | 48 +-- data/maps/Route109/scripts.inc | 280 +++++++++--------- data/scripts/new_game.inc | 2 +- data/text/trainers.inc | 104 +++---- include/constants/flags.h | 2 +- 9 files changed, 241 insertions(+), 244 deletions(-) diff --git a/data/event_scripts.s b/data/event_scripts.s index 2e059113a0..6d80d4eae8 100644 --- a/data/event_scripts.s +++ b/data/event_scripts.s @@ -712,13 +712,13 @@ EventScript_ResetMrBriney:: @ 8271862 compare VAR_BRINEY_LOCATION, 2 goto_if_eq EventScript_MoveMrBrineyToDewford compare VAR_BRINEY_LOCATION, 3 - goto_if_eq EventScript_MoveMrBrineyToRoute108 + goto_if_eq EventScript_MoveMrBrineyToRoute109 end EventScript_MoveMrBrineyToHouse:: @ 8271884 setflag FLAG_HIDE_MR_BRINEY_DEWFORD_TOWN setflag FLAG_HIDE_MR_BRINEY_BOAT_DEWFORD_TOWN - setflag FLAG_HIDE_ROUTE_108_MR_BRINEY + setflag FLAG_HIDE_ROUTE_109_MR_BRINEY setflag FLAG_HIDE_ROUTE_109_MR_BRINEY_BOAT clearflag FLAG_HIDE_ROUTE_104_MR_BRINEY_BOAT clearflag FLAG_HIDE_BRINEYS_HOUSE_MR_BRINEY @@ -726,7 +726,7 @@ EventScript_MoveMrBrineyToHouse:: @ 8271884 end EventScript_MoveMrBrineyToDewford:: @ 827189A - setflag FLAG_HIDE_ROUTE_108_MR_BRINEY + setflag FLAG_HIDE_ROUTE_109_MR_BRINEY setflag FLAG_HIDE_ROUTE_109_MR_BRINEY_BOAT setflag FLAG_HIDE_ROUTE_104_MR_BRINEY setflag FLAG_HIDE_ROUTE_104_MR_BRINEY_BOAT @@ -736,14 +736,14 @@ EventScript_MoveMrBrineyToDewford:: @ 827189A clearflag FLAG_HIDE_MR_BRINEY_BOAT_DEWFORD_TOWN end -EventScript_MoveMrBrineyToRoute108:: @ 82718B3 +EventScript_MoveMrBrineyToRoute109:: @ 82718B3 setflag FLAG_HIDE_ROUTE_104_MR_BRINEY setflag FLAG_HIDE_ROUTE_104_MR_BRINEY_BOAT setflag FLAG_HIDE_BRINEYS_HOUSE_MR_BRINEY setflag FLAG_HIDE_BRINEYS_HOUSE_PEEKO setflag FLAG_HIDE_MR_BRINEY_DEWFORD_TOWN setflag FLAG_HIDE_MR_BRINEY_BOAT_DEWFORD_TOWN - clearflag FLAG_HIDE_ROUTE_108_MR_BRINEY + clearflag FLAG_HIDE_ROUTE_109_MR_BRINEY clearflag FLAG_HIDE_ROUTE_109_MR_BRINEY_BOAT end @@ -760,7 +760,7 @@ Common_EventScript_UpdateBrineyLocation:: @ 82718DE goto_if_set FLAG_DEFEATED_PETALBURG_GYM, Common_EventScript_NopReturn goto_if_unset FLAG_HIDE_ROUTE_104_MR_BRINEY_BOAT, EventScript_SetBrineyLocation_House goto_if_unset FLAG_HIDE_MR_BRINEY_DEWFORD_TOWN, EventScript_SetBrineyLocation_Dewford - goto_if_unset FLAG_HIDE_ROUTE_108_MR_BRINEY, EventScript_SetBrineyLocation_Route108 + goto_if_unset FLAG_HIDE_ROUTE_109_MR_BRINEY, EventScript_SetBrineyLocation_Route109 return EventScript_SetBrineyLocation_House:: @ 827190C @@ -771,7 +771,7 @@ EventScript_SetBrineyLocation_Dewford:: @ 8271912 setvar VAR_BRINEY_LOCATION, 2 return -EventScript_SetBrineyLocation_Route108:: @ 8271918 +EventScript_SetBrineyLocation_Route109:: @ 8271918 setvar VAR_BRINEY_LOCATION, 3 return @@ -807,9 +807,7 @@ DewfordTown_Hall_EventScript_271E8B:: @ 8271E8B special BufferTrendyPhraseString return -DewfordTown_EventScript_271E95:: @ 8271E95 -Route104_MrBrineysHouse_EventScript_271E95:: @ 8271E95 -Route109_EventScript_271E95:: @ 8271E95 +EventScript_BackupMrBrineyLocation:: @ 8271E95 copyvar VAR_0x8008, VAR_BRINEY_LOCATION setvar VAR_BRINEY_LOCATION, 0 return @@ -894,7 +892,7 @@ Movement_FerryDepart: @ 82721F0 EventScript_HideMrBriney:: @ 82721F8 setflag FLAG_HIDE_MR_BRINEY_DEWFORD_TOWN setflag FLAG_HIDE_MR_BRINEY_BOAT_DEWFORD_TOWN - setflag FLAG_HIDE_ROUTE_108_MR_BRINEY + setflag FLAG_HIDE_ROUTE_109_MR_BRINEY setflag FLAG_HIDE_ROUTE_109_MR_BRINEY_BOAT setflag FLAG_HIDE_ROUTE_104_MR_BRINEY setflag FLAG_HIDE_ROUTE_104_MR_BRINEY_BOAT diff --git a/data/maps/DewfordTown/scripts.inc b/data/maps/DewfordTown/scripts.inc index ac0155df9b..862d91bf36 100644 --- a/data/maps/DewfordTown/scripts.inc +++ b/data/maps/DewfordTown/scripts.inc @@ -115,7 +115,7 @@ DewfordTown_EventScript_1E9656:: @ 81E9656 end DewfordTown_EventScript_1E9660:: @ 81E9660 - call DewfordTown_EventScript_271E95 + call EventScript_BackupMrBrineyLocation setobjectpriority 2, MAP_DEWFORD_TOWN, 0 setobjectpriority EVENT_OBJ_ID_PLAYER, MAP_DEWFORD_TOWN, 0 applymovement 2, DewfordTown_Movement_1E991D @@ -147,7 +147,7 @@ DewfordTown_EventScript_1E9660:: @ 81E9660 end DewfordTown_EventScript_1E96E7:: @ 81E96E7 - call DewfordTown_EventScript_271E95 + call EventScript_BackupMrBrineyLocation setobjectpriority 2, MAP_DEWFORD_TOWN, 0 setobjectpriority EVENT_OBJ_ID_PLAYER, MAP_DEWFORD_TOWN, 1 applymovement 2, DewfordTown_Movement_1E991D @@ -169,7 +169,7 @@ DewfordTown_EventScript_1E96E7:: @ 81E96E7 setobjectpriority 2, MAP_ROUTE109, 0 applymovement 2, DewfordTown_Movement_1E991F waitmovement 0 - clearflag FLAG_HIDE_ROUTE_108_MR_BRINEY + clearflag FLAG_HIDE_ROUTE_109_MR_BRINEY addobject 1 clearflag FLAG_HIDE_ROUTE_109_MR_BRINEY_BOAT setflag FLAG_HIDE_MR_BRINEY_BOAT_DEWFORD_TOWN @@ -185,11 +185,11 @@ DewfordTown_EventScript_1E96E7:: @ 81E96E7 end DewfordTown_EventScript_1E9790:: @ 81E9790 - msgbox DewfordTown_Text_1EEC1D, MSGBOX_DEFAULT + msgbox DewfordTown_Text_BrineyLandedInSlateportDeliverGoods, MSGBOX_DEFAULT return DewfordTown_EventScript_1E9799:: @ 81E9799 - msgbox DewfordTown_Text_1EEDA7, MSGBOX_DEFAULT + msgbox DewfordTown_Text_BrineyLandedInSlateport, MSGBOX_DEFAULT return DewfordTown_Movement_1E97A2: @ 81E97A2 @@ -654,7 +654,7 @@ DewfordTown_Text_1E9A7F: @ 81E9A7F .string "DEWFORD HALL\n" .string "“Everyone's information exchange!”$" -Route104_Text_1E9AAF: @ 81E9AAF +Route104_Text_LandedInDewfordDeliverLetter: @ 81E9AAF .string "MR. BRINEY: Ahoy!\n" .string "We've hit land in DEWFORD.\p" .string "I suppose you're off to deliver that\n" @@ -675,8 +675,7 @@ DewfordTown_Text_1E9BD9: @ 81E9BD9 .string "MR. BRINEY: Then you go on and deliver\n" .string "the LETTER. I'll be waiting.$" -Route104_Text_1E9C1D: @ 81E9C1D -Route109_Text_1E9C1D: @ 81E9C1D +DewfordTown_Text_BrineyLandedInDewford: @ 81E9C1D .string "MR. BRINEY: Ahoy!\n" .string "We've hit land in DEWFORD!\p" .string "You just go on and tell me whenever\n" diff --git a/data/maps/Route104/scripts.inc b/data/maps/Route104/scripts.inc index 0fcf361de2..9c31aadb5f 100644 --- a/data/maps/Route104/scripts.inc +++ b/data/maps/Route104/scripts.inc @@ -418,17 +418,17 @@ Route104_EventScript_1ED139:: @ 81ED139 resetobjectpriority 2, MAP_DEWFORD_TOWN copyobjectxytoperm 2 setvar VAR_BOARD_BRINEY_BOAT_STATE, 0 - goto_if_unset FLAG_DELIVERED_STEVEN_LETTER, Route104_EventScript_1ED1B4 - goto_if_set FLAG_DELIVERED_STEVEN_LETTER, Route104_EventScript_1ED1BE + goto_if_unset FLAG_DELIVERED_STEVEN_LETTER, Route104_EventScript_DeliverLetterReminder + goto_if_set FLAG_DELIVERED_STEVEN_LETTER, Route104_EventScript_LandedInDewford end -Route104_EventScript_1ED1B4:: @ 81ED1B4 - msgbox Route104_Text_1E9AAF, MSGBOX_DEFAULT +Route104_EventScript_DeliverLetterReminder:: @ 81ED1B4 + msgbox Route104_Text_LandedInDewfordDeliverLetter, MSGBOX_DEFAULT releaseall end -Route104_EventScript_1ED1BE:: @ 81ED1BE - msgbox Route104_Text_1E9C1D, MSGBOX_DEFAULT +Route104_EventScript_LandedInDewford:: @ 81ED1BE + msgbox DewfordTown_Text_BrineyLandedInDewford, MSGBOX_DEFAULT releaseall end diff --git a/data/maps/Route104_MrBrineysHouse/scripts.inc b/data/maps/Route104_MrBrineysHouse/scripts.inc index b2baff82bf..68fe98ffdf 100644 --- a/data/maps/Route104_MrBrineysHouse/scripts.inc +++ b/data/maps/Route104_MrBrineysHouse/scripts.inc @@ -74,7 +74,7 @@ Route104_MrBrineysHouse_EventScript_229E1D:: @ 8229E1D Route104_MrBrineysHouse_EventScript_229E27:: @ 8229E27 msgbox Route104_MrBrineysHouse_Text_229FE9, MSGBOX_DEFAULT - call Route104_MrBrineysHouse_EventScript_271E95 + call EventScript_BackupMrBrineyLocation setvar VAR_BOARD_BRINEY_BOAT_STATE, 1 clearflag FLAG_HIDE_ROUTE_104_MR_BRINEY setflag FLAG_HIDE_BRINEYS_HOUSE_MR_BRINEY diff --git a/data/maps/Route109/map.json b/data/maps/Route109/map.json index 3614672663..4ba9baf9fe 100644 --- a/data/maps/Route109/map.json +++ b/data/maps/Route109/map.json @@ -48,8 +48,8 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "Route109_EventScript_1EE910", - "flag": "FLAG_HIDE_ROUTE_108_MR_BRINEY" + "script": "Route109_EventScript_MrBriney", + "flag": "FLAG_HIDE_ROUTE_109_MR_BRINEY" }, { "graphics_id": "EVENT_OBJ_GFX_SWIMMER_M", @@ -61,7 +61,7 @@ "movement_range_y": 0, "trainer_type": "1", "trainer_sight_or_berry_tree_id": "5", - "script": "Route109_EventScript_1EEA3D", + "script": "Route109_EventScript_David", "flag": "0" }, { @@ -74,7 +74,7 @@ "movement_range_y": 0, "trainer_type": "1", "trainer_sight_or_berry_tree_id": "5", - "script": "Route109_EventScript_1EEA54", + "script": "Route109_EventScript_Alice", "flag": "0" }, { @@ -87,7 +87,7 @@ "movement_range_y": 0, "trainer_type": "1", "trainer_sight_or_berry_tree_id": "1", - "script": "Route109_EventScript_1EEA6B", + "script": "Route109_EventScript_Huey", "flag": "0" }, { @@ -100,7 +100,7 @@ "movement_range_y": 0, "trainer_type": "1", "trainer_sight_or_berry_tree_id": "6", - "script": "Route109_EventScript_1EEA82", + "script": "Route109_EventScript_Edmond", "flag": "0" }, { @@ -113,7 +113,7 @@ "movement_range_y": 0, "trainer_type": "1", "trainer_sight_or_berry_tree_id": "3", - "script": "Route109_EventScript_1EEA99", + "script": "Route109_EventScript_Ricky", "flag": "0" }, { @@ -126,7 +126,7 @@ "movement_range_y": 0, "trainer_type": "1", "trainer_sight_or_berry_tree_id": "4", - "script": "Route109_EventScript_1EEAFB", + "script": "Route109_EventScript_Lola", "flag": "0" }, { @@ -139,7 +139,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "Route109_EventScript_1EE995", + "script": "Route109_EventScript_SeashoreHouseGirl", "flag": "0" }, { @@ -165,7 +165,7 @@ "movement_range_y": 0, "trainer_type": "1", "trainer_sight_or_berry_tree_id": "3", - "script": "Route109_EventScript_1EEB74", + "script": "Route109_EventScript_Gwen", "flag": "0" }, { @@ -178,7 +178,7 @@ "movement_range_y": 0, "trainer_type": "1", "trainer_sight_or_berry_tree_id": "3", - "script": "Route109_EventScript_1EEB5D", + "script": "Route109_EventScript_Austina", "flag": "0" }, { @@ -191,7 +191,7 @@ "movement_range_y": 0, "trainer_type": "1", "trainer_sight_or_berry_tree_id": "3", - "script": "Route109_EventScript_1EEB8B", + "script": "Route109_EventScript_Carter", "flag": "0" }, { @@ -204,7 +204,7 @@ "movement_range_y": 1, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "Route109_EventScript_1EE99E", + "script": "Route109_EventScript_SandCastleBoy", "flag": "0" }, { @@ -217,7 +217,7 @@ "movement_range_y": 1, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "Route109_EventScript_1EE9B5", + "script": "Route109_EventScript_SoftSandGirl", "flag": "0" }, { @@ -230,7 +230,7 @@ "movement_range_y": 1, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "Route109_EventScript_1EEA06", + "script": "Route109_EventScript_Woman", "flag": "0" }, { @@ -243,7 +243,7 @@ "movement_range_y": 1, "trainer_type": "1", "trainer_sight_or_berry_tree_id": "1", - "script": "Route109_EventScript_1EEBBD", + "script": "Route109_EventScript_Mel", "flag": "0" }, { @@ -256,7 +256,7 @@ "movement_range_y": 1, "trainer_type": "1", "trainer_sight_or_berry_tree_id": "1", - "script": "Route109_EventScript_1EEBA2", + "script": "Route109_EventScript_Paul", "flag": "0" }, { @@ -269,7 +269,7 @@ "movement_range_y": 1, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "Route109_EventScript_1EEA0F", + "script": "Route109_EventScript_OldMan", "flag": "0" }, { @@ -282,7 +282,7 @@ "movement_range_y": 1, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "Route109_EventScript_1EEA18", + "script": "Route109_EventScript_Zigzagoon", "flag": "0" }, { @@ -295,7 +295,7 @@ "movement_range_y": 1, "trainer_type": "1", "trainer_sight_or_berry_tree_id": "6", - "script": "Route109_EventScript_1EEBEF", + "script": "Route109_EventScript_Hailey", "flag": "0" }, { @@ -308,7 +308,7 @@ "movement_range_y": 1, "trainer_type": "1", "trainer_sight_or_berry_tree_id": "4", - "script": "Route109_EventScript_1EEBD8", + "script": "Route109_EventScript_Chandler", "flag": "0" }, { @@ -334,7 +334,7 @@ "movement_range_y": 1, "trainer_type": "1", "trainer_sight_or_berry_tree_id": "3", - "script": "Route109_EventScript_1EEC06", + "script": "Route109_EventScript_Elijah", "flag": "0" } ], @@ -355,7 +355,7 @@ "y": 5, "elevation": 0, "player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY", - "script": "Route109_EventScript_1EEA2B" + "script": "Route109_EventScript_SeashoreHouseSign" }, { "type": "sign", @@ -363,7 +363,7 @@ "y": 10, "elevation": 3, "player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY", - "script": "Route109_EventScript_1EEA34" + "script": "Route109_EventScript_TrainerTipsSign" }, { "type": "hidden_item", diff --git a/data/maps/Route109/scripts.inc b/data/maps/Route109/scripts.inc index a4ac60a9c2..adaab110b4 100644 --- a/data/maps/Route109/scripts.inc +++ b/data/maps/Route109/scripts.inc @@ -1,59 +1,59 @@ Route109_MapScripts:: @ 81EE75F .byte 0 -Route109_EventScript_1EE760:: @ 81EE760 - call Route109_EventScript_271E95 +Route109_EventScript_StartDepartForDewford:: @ 81EE760 + call EventScript_BackupMrBrineyLocation setobjectpriority 2, MAP_ROUTE109, 0 setobjectpriority EVENT_OBJ_ID_PLAYER, MAP_ROUTE109, 0 - applymovement 2, Route109_Movement_1EE90B + applymovement 2, Route109_Movement_BrineyEnterBoat waitmovement 0 removeobject 2 switch VAR_FACING - case DIR_SOUTH, Route109_EventScript_1EE7A5 - case DIR_WEST, Route109_EventScript_1EE7C5 - case DIR_EAST, Route109_EventScript_1EE7B5 + case DIR_SOUTH, Route109_EventScript_EnterBoatSouth + case DIR_WEST, Route109_EventScript_EnterBoatWest + case DIR_EAST, Route109_EventScript_EnterBoatEast end -Route109_EventScript_1EE7A5:: @ 81EE7A5 - applymovement EVENT_OBJ_ID_PLAYER, Route109_Movement_1EE8FD +Route109_EventScript_EnterBoatSouth:: @ 81EE7A5 + applymovement EVENT_OBJ_ID_PLAYER, Route109_Movement_PlayerEnterBoatSouth waitmovement 0 - goto Route109_EventScript_1EE7D5 + goto Route109_EventScript_DoSailToDewford end -Route109_EventScript_1EE7B5:: @ 81EE7B5 - applymovement EVENT_OBJ_ID_PLAYER, Route109_Movement_1EE905 +Route109_EventScript_EnterBoatEast:: @ 81EE7B5 + applymovement EVENT_OBJ_ID_PLAYER, Route109_Movement_PlayerEnterBoatEast waitmovement 0 - goto Route109_EventScript_1EE7D5 + goto Route109_EventScript_DoSailToDewford end -Route109_EventScript_1EE7C5:: @ 81EE7C5 - applymovement EVENT_OBJ_ID_PLAYER, Route109_Movement_1EE908 +Route109_EventScript_EnterBoatWest:: @ 81EE7C5 + applymovement EVENT_OBJ_ID_PLAYER, Route109_Movement_PlayerEnterBoatWest waitmovement 0 - goto Route109_EventScript_1EE7D5 + goto Route109_EventScript_DoSailToDewford end -Route109_EventScript_1EE7D5:: @ 81EE7D5 +Route109_EventScript_DoSailToDewford:: @ 81EE7D5 hideobjectat EVENT_OBJ_ID_PLAYER, MAP_ROUTE109 call Common_EventScript_PlayBrineysBoatMusic - applymovement 1, Route109_Movement_1EE84F - applymovement EVENT_OBJ_ID_PLAYER, Route109_Movement_1EE84F + applymovement 1, Route109_Movement_SailToDewford + applymovement EVENT_OBJ_ID_PLAYER, Route109_Movement_SailToDewford waitmovement 0 delay 50 call Common_EventScript_StopBrineysBoatMusic showobjectat EVENT_OBJ_ID_PLAYER, MAP_DEWFORD_TOWN - applymovement EVENT_OBJ_ID_PLAYER, Route109_Movement_1EE900 + applymovement EVENT_OBJ_ID_PLAYER, Route109_Movement_PlayerExitBoat waitmovement 0 addobject 4 clearflag FLAG_HIDE_MR_BRINEY_BOAT_DEWFORD_TOWN setobjectxyperm 2, 12, 8 addobject 2 setobjectpriority 2, MAP_DEWFORD_TOWN, 0 - applymovement 2, Route109_Movement_1EE90D + applymovement 2, Route109_Movement_BrineyExitBoat waitmovement 0 clearflag FLAG_HIDE_MR_BRINEY_DEWFORD_TOWN setflag FLAG_HIDE_ROUTE_109_MR_BRINEY_BOAT hideobjectat 1, MAP_ROUTE109 - msgbox Route109_Text_1E9C1D, MSGBOX_DEFAULT + msgbox DewfordTown_Text_BrineyLandedInDewford, MSGBOX_DEFAULT closemessage copyvar VAR_BRINEY_LOCATION, VAR_0x8008 resetobjectpriority EVENT_OBJ_ID_PLAYER, MAP_ROUTE109 @@ -62,7 +62,7 @@ Route109_EventScript_1EE7D5:: @ 81EE7D5 release end -Route109_Movement_1EE84F: @ 81EE84F +Route109_Movement_SailToDewford: @ 81EE84F walk_in_place_fastest_down walk_down walk_down @@ -238,98 +238,98 @@ Route109_Movement_1EE84F: @ 81EE84F walk_in_place_fastest_down step_end -Route109_Movement_1EE8FD: @ 81EE8FD +Route109_Movement_PlayerEnterBoatSouth: @ 81EE8FD walk_down walk_down step_end -Route109_Movement_1EE900: @ 81EE900 +Route109_Movement_PlayerExitBoat: @ 81EE900 walk_down walk_down walk_left walk_in_place_fastest_right step_end -Route109_Movement_1EE905: @ 81EE905 +Route109_Movement_PlayerEnterBoatEast: @ 81EE905 walk_right walk_down step_end -Route109_Movement_1EE908: @ 81EE908 +Route109_Movement_PlayerEnterBoatWest: @ 81EE908 walk_left walk_down step_end -Route109_Movement_1EE90B: @ 81EE90B +Route109_Movement_BrineyEnterBoat: @ 81EE90B walk_down step_end -Route109_Movement_1EE90D: @ 81EE90D +Route109_Movement_BrineyExitBoat: @ 81EE90D walk_down walk_in_place_fastest_left step_end -Route109_EventScript_1EE910:: @ 81EE910 +Route109_EventScript_MrBriney:: @ 81EE910 lock faceplayer - goto_if_unset FLAG_DELIVERED_DEVON_GOODS, Route109_EventScript_1EE921 - goto Route109_EventScript_1EE93F + goto_if_unset FLAG_DELIVERED_DEVON_GOODS, Route109_EventScript_HaveNotDeliveredDevonGood + goto Route109_EventScript_DeliveredDevonGoods end -Route109_EventScript_1EE921:: @ 81EE921 - message Route109_Text_1EEC96 - msgbox Route109_Text_1EEC96, MSGBOX_YESNO - compare VAR_RESULT, 0 - goto_if_eq Route109_EventScript_1EE981 - goto Route109_EventScript_1EE972 +Route109_EventScript_HaveNotDeliveredDevonGood:: @ 81EE921 + message Route109_Text_BrineySailToDewfordQuestion + msgbox Route109_Text_BrineySailToDewfordQuestion, MSGBOX_YESNO + compare VAR_RESULT, FALSE + goto_if_eq Route109_EventScript_StayHere + goto Route109_EventScript_SailToDewford end -Route109_EventScript_1EE93F:: @ 81EE93F - message Route109_Text_1EEE17 +Route109_EventScript_DeliveredDevonGoods:: @ 81EE93F + message Route109_Text_BrineyWhereAreWeBound waitmessage multichoicedefault 21, 8, MULTI_BRINEY_OFF_DEWFORD, 1, 0 switch VAR_RESULT - case 0, Route109_EventScript_1EE972 - case 1, Route109_EventScript_1EE98B - case MULTI_B_PRESSED, Route109_EventScript_1EE98B + case 0, Route109_EventScript_SailToDewford + case 1, Route109_EventScript_ChoseNotToSail + case MULTI_B_PRESSED, Route109_EventScript_ChoseNotToSail end -Route109_EventScript_1EE972:: @ 81EE972 - msgbox Route109_Text_1EED06, MSGBOX_DEFAULT +Route109_EventScript_SailToDewford:: @ 81EE972 + msgbox Route109_Text_BrineyDewfordItIs, MSGBOX_DEFAULT closemessage - goto Route109_EventScript_1EE760 + goto Route109_EventScript_StartDepartForDewford end -Route109_EventScript_1EE981:: @ 81EE981 - msgbox Route109_Text_1EED5E, MSGBOX_DEFAULT +Route109_EventScript_StayHere:: @ 81EE981 + msgbox Route109_Text_BrineyDeliverDevonGoods, MSGBOX_DEFAULT release end -Route109_EventScript_1EE98B:: @ 81EE98B - msgbox Route109_Text_1EEE72, MSGBOX_DEFAULT +Route109_EventScript_ChoseNotToSail:: @ 81EE98B + msgbox Route109_Text_BrineyTellMeWhenYouNeedToSail, MSGBOX_DEFAULT release end -Route109_EventScript_1EE995:: @ 81EE995 - msgbox Route109_Text_1EEEB4, MSGBOX_NPC +Route109_EventScript_SeashoreHouseGirl:: @ 81EE995 + msgbox Route109_Text_ChillAtMyPapasSpot, MSGBOX_NPC end -Route109_EventScript_1EE99E:: @ 81EE99E +Route109_EventScript_SandCastleBoy:: @ 81EE99E lock faceplayer - msgbox Route109_Text_1EEFB0, MSGBOX_DEFAULT + msgbox Route109_Text_SandCastleTakingLongTime, MSGBOX_DEFAULT closemessage applymovement VAR_LAST_TALKED, Common_Movement_FaceOriginalDirection waitmovement 0 release end -Route109_EventScript_1EE9B5:: @ 81EE9B5 +Route109_EventScript_SoftSandGirl:: @ 81EE9B5 lock faceplayer special GetPlayerBigGuyGirlString - goto_if_set FLAG_RECEIVED_SOFT_SAND, Route109_EventScript_1EE9F2 - msgbox Route109_Text_1EEFDE, MSGBOX_DEFAULT + goto_if_set FLAG_RECEIVED_SOFT_SAND, Route109_EventScript_AlreadyReceivedSoftSand + msgbox Route109_Text_YouCanHaveThis, MSGBOX_DEFAULT giveitem_std ITEM_SOFT_SAND compare VAR_RESULT, 0 goto_if_eq Common_EventScript_ShowBagIsFull @@ -340,207 +340,207 @@ Route109_EventScript_1EE9B5:: @ 81EE9B5 release end -Route109_EventScript_1EE9F2:: @ 81EE9F2 - msgbox Route109_Text_1EEFF1, MSGBOX_DEFAULT +Route109_EventScript_AlreadyReceivedSoftSand:: @ 81EE9F2 + msgbox Route109_Text_WereGoingToMakeBigCastle, MSGBOX_DEFAULT applymovement VAR_LAST_TALKED, Common_Movement_FaceOriginalDirection waitmovement 0 release end -Route109_EventScript_1EEA06:: @ 81EEA06 - msgbox Route109_Text_1EEF08, MSGBOX_NPC +Route109_EventScript_Woman:: @ 81EEA06 + msgbox Route109_Text_LittleKidsDartAround, MSGBOX_NPC end -Route109_EventScript_1EEA0F:: @ 81EEA0F - msgbox Route109_Text_1EF080, MSGBOX_NPC +Route109_EventScript_OldMan:: @ 81EEA0F + msgbox Route109_Text_ZigzagoonPicksUpLitter, MSGBOX_NPC end -Route109_EventScript_1EEA18:: @ 81EEA18 +Route109_EventScript_Zigzagoon:: @ 81EEA18 lock faceplayer waitse playmoncry SPECIES_ZIGZAGOON, 0 - msgbox Route109_Text_1EF173, MSGBOX_DEFAULT + msgbox Route109_Text_ZigzagoonCry, MSGBOX_DEFAULT waitmoncry release end -Route109_EventScript_1EEA2B:: @ 81EEA2B - msgbox Route109_Text_1EF185, MSGBOX_SIGN +Route109_EventScript_SeashoreHouseSign:: @ 81EEA2B + msgbox Route109_Text_SeashoreHouseSign, MSGBOX_SIGN end -Route109_EventScript_1EEA34:: @ 81EEA34 - msgbox Route109_Text_1EF1D5, MSGBOX_SIGN +Route109_EventScript_TrainerTipsSign:: @ 81EEA34 + msgbox Route109_Text_TrainerTipsSign, MSGBOX_SIGN end -Route109_EventScript_1EEA3D:: @ 81EEA3D - trainerbattle_single TRAINER_DAVID, Route109_Text_297140, Route109_Text_29717D - msgbox Route109_Text_297191, MSGBOX_AUTOCLOSE +Route109_EventScript_David:: @ 81EEA3D + trainerbattle_single TRAINER_DAVID, Route109_Text_DavidIntro, Route109_Text_DavidDefeated + msgbox Route109_Text_DavidPostBattle, MSGBOX_AUTOCLOSE end -Route109_EventScript_1EEA54:: @ 81EEA54 - trainerbattle_single TRAINER_ALICE, Route109_Text_2971D1, Route109_Text_2971FD - msgbox Route109_Text_29720F, MSGBOX_AUTOCLOSE +Route109_EventScript_Alice:: @ 81EEA54 + trainerbattle_single TRAINER_ALICE, Route109_Text_AliceIntro, Route109_Text_AliceDefeated + msgbox Route109_Text_AlicePostBattle, MSGBOX_AUTOCLOSE end -Route109_EventScript_1EEA6B:: @ 81EEA6B - trainerbattle_single TRAINER_HUEY, Route109_Text_297235, Route109_Text_29727B - msgbox Route109_Text_29728C, MSGBOX_AUTOCLOSE +Route109_EventScript_Huey:: @ 81EEA6B + trainerbattle_single TRAINER_HUEY, Route109_Text_HueyIntro, Route109_Text_HueyDefeated + msgbox Route109_Text_HueyPostBattle, MSGBOX_AUTOCLOSE end -Route109_EventScript_1EEA82:: @ 81EEA82 - trainerbattle_single TRAINER_EDMOND, Route109_Text_2972B3, Route109_Text_2972CE - msgbox Route109_Text_2972ED, MSGBOX_AUTOCLOSE +Route109_EventScript_Edmond:: @ 81EEA82 + trainerbattle_single TRAINER_EDMOND, Route109_Text_EdmondIntro, Route109_Text_EdmondDefeated + msgbox Route109_Text_EdmondPostBattle, MSGBOX_AUTOCLOSE end -Route109_EventScript_1EEA99:: @ 81EEA99 - trainerbattle_single TRAINER_RICKY_1, Route109_Text_29733B, Route109_Text_297379, Route109_EventScript_1EEAC5 +Route109_EventScript_Ricky:: @ 81EEA99 + trainerbattle_single TRAINER_RICKY_1, Route109_Text_RickyIntro, Route109_Text_RickyDefeated, Route109_EventScript_RickyRegisterMatchCallAfterBattle specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, 1 - goto_if_eq Route109_EventScript_1EEAE4 - msgbox Route109_Text_297380, MSGBOX_DEFAULT + compare VAR_RESULT, TRUE + goto_if_eq Route109_EventScript_RickyRematch + msgbox Route109_Text_RickyPostBattle, MSGBOX_DEFAULT release end -Route109_EventScript_1EEAC5:: @ 81EEAC5 +Route109_EventScript_RickyRegisterMatchCallAfterBattle:: @ 81EEAC5 special sub_80B4808 waitmovement 0 - msgbox Route109_Text_2973C1, MSGBOX_DEFAULT + msgbox Route109_Text_RickyRegister, MSGBOX_DEFAULT register_matchcall TRAINER_RICKY_1 release end -Route109_EventScript_1EEAE4:: @ 81EEAE4 - trainerbattle_rematch TRAINER_RICKY_1, Route109_Text_2973FF, Route109_Text_297437 - msgbox Route109_Text_297458, MSGBOX_AUTOCLOSE +Route109_EventScript_RickyRematch:: @ 81EEAE4 + trainerbattle_rematch TRAINER_RICKY_1, Route109_Text_RickyRematchIntro, Route109_Text_RickyRematchDefeated + msgbox Route109_Text_RickyRematchPostBattle, MSGBOX_AUTOCLOSE end -Route109_EventScript_1EEAFB:: @ 81EEAFB - trainerbattle_single TRAINER_LOLA_1, Route109_Text_29749C, Route109_Text_2974CF, Route109_EventScript_1EEB27 +Route109_EventScript_Lola:: @ 81EEAFB + trainerbattle_single TRAINER_LOLA_1, Route109_Text_LolaIntro, Route109_Text_LolaDefeated, Route109_EventScript_LolaRegisterMatchCallAfterBattle specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, 1 - goto_if_eq Route109_EventScript_1EEB46 - msgbox Route109_Text_2974D6, MSGBOX_DEFAULT + compare VAR_RESULT, TRUE + goto_if_eq Route109_EventScript_LolaRematch + msgbox Route109_Text_LolaPostBattle, MSGBOX_DEFAULT release end -Route109_EventScript_1EEB27:: @ 81EEB27 +Route109_EventScript_LolaRegisterMatchCallAfterBattle:: @ 81EEB27 special sub_80B4808 waitmovement 0 - msgbox Route109_Text_297520, MSGBOX_DEFAULT + msgbox Route109_Text_LolaRegister, MSGBOX_DEFAULT register_matchcall TRAINER_LOLA_1 release end -Route109_EventScript_1EEB46:: @ 81EEB46 - trainerbattle_rematch TRAINER_LOLA_1, Route109_Text_297538, Route109_Text_297576 - msgbox Route109_Text_29757D, MSGBOX_AUTOCLOSE +Route109_EventScript_LolaRematch:: @ 81EEB46 + trainerbattle_rematch TRAINER_LOLA_1, Route109_Text_LolaRematchIntro, Route109_Text_LolaRematchDefeated + msgbox Route109_Text_LolaRematchPostBattle, MSGBOX_AUTOCLOSE end -Route109_EventScript_1EEB5D:: @ 81EEB5D - trainerbattle_single TRAINER_AUSTINA, Route109_Text_2975C0, Route109_Text_297601 - msgbox Route109_Text_29762A, MSGBOX_AUTOCLOSE +Route109_EventScript_Austina:: @ 81EEB5D + trainerbattle_single TRAINER_AUSTINA, Route109_Text_AustinaIntro, Route109_Text_AustinaDefeated + msgbox Route109_Text_AustinaPostBattle, MSGBOX_AUTOCLOSE end -Route109_EventScript_1EEB74:: @ 81EEB74 - trainerbattle_single TRAINER_GWEN, Route109_Text_297667, Route109_Text_297691 - msgbox Route109_Text_2976A4, MSGBOX_AUTOCLOSE +Route109_EventScript_Gwen:: @ 81EEB74 + trainerbattle_single TRAINER_GWEN, Route109_Text_GwenIntro, Route109_Text_GwenDefeated + msgbox Route109_Text_GwenPostBattle, MSGBOX_AUTOCLOSE end -Route109_EventScript_1EEB8B:: @ 81EEB8B - trainerbattle_single TRAINER_CARTER, Route109_Text_2976C5, Route109_Text_2976FC - msgbox Route109_Text_297715, MSGBOX_AUTOCLOSE +Route109_EventScript_Carter:: @ 81EEB8B + trainerbattle_single TRAINER_CARTER, Route109_Text_CarterIntro, Route109_Text_CarterDefeated + msgbox Route109_Text_CarterPostBattle, MSGBOX_AUTOCLOSE end -Route109_EventScript_1EEBA2:: @ 81EEBA2 - trainerbattle_double TRAINER_MEL_AND_PAUL, Route109_Text_297754, Route109_Text_2977B0, Route109_Text_29781D - msgbox Route109_Text_2977C7, MSGBOX_AUTOCLOSE +Route109_EventScript_Paul:: @ 81EEBA2 + trainerbattle_double TRAINER_MEL_AND_PAUL, Route109_Text_PaulIntro, Route109_Text_PaulDefeated, Route109_Text_PaulNotEnoughPokemon + msgbox Route109_Text_PaulPostBattle, MSGBOX_AUTOCLOSE end -Route109_EventScript_1EEBBD:: @ 81EEBBD - trainerbattle_double TRAINER_MEL_AND_PAUL, Route109_Text_297872, Route109_Text_2978BD, Route109_Text_29792E - msgbox Route109_Text_2978F1, MSGBOX_AUTOCLOSE +Route109_EventScript_Mel:: @ 81EEBBD + trainerbattle_double TRAINER_MEL_AND_PAUL, Route109_Text_MelIntro, Route109_Text_MelDefeated, Route109_Text_MelNotEnoughPokemon + msgbox Route109_Text_MelPostBattle, MSGBOX_AUTOCLOSE end -Route109_EventScript_1EEBD8:: @ 81EEBD8 - trainerbattle_single TRAINER_CHANDLER, Route109_Text_29798A, Route109_Text_2979AE - msgbox Route109_Text_2979BF, MSGBOX_AUTOCLOSE +Route109_EventScript_Chandler:: @ 81EEBD8 + trainerbattle_single TRAINER_CHANDLER, Route109_Text_ChandlerIntro, Route109_Text_ChandlerDefeated + msgbox Route109_Text_ChandlerPostBattle, MSGBOX_AUTOCLOSE end -Route109_EventScript_1EEBEF:: @ 81EEBEF - trainerbattle_single TRAINER_HAILEY, Route109_Text_2979EC, Route109_Text_297A15 - msgbox Route109_Text_297A40, MSGBOX_AUTOCLOSE +Route109_EventScript_Hailey:: @ 81EEBEF + trainerbattle_single TRAINER_HAILEY, Route109_Text_HaileyIntro, Route109_Text_HaileyDefeated + msgbox Route109_Text_HaileyPostBattle, MSGBOX_AUTOCLOSE end -Route109_EventScript_1EEC06:: @ 81EEC06 - trainerbattle_single TRAINER_ELIJAH, Route109_Text_297A82, Route109_Text_297AC7 - msgbox Route109_Text_297AE5, MSGBOX_AUTOCLOSE +Route109_EventScript_Elijah:: @ 81EEC06 + trainerbattle_single TRAINER_ELIJAH, Route109_Text_ElijahIntro, Route109_Text_ElijahDefeated + msgbox Route109_Text_ElijahPostBattle, MSGBOX_AUTOCLOSE end -DewfordTown_Text_1EEC1D: @ 81EEC1D +DewfordTown_Text_BrineyLandedInSlateportDeliverGoods: @ 81EEC1D .string "MR. BRINEY: Ahoy!\n" .string "We've made land in SLATEPORT!\p" .string "I suppose you're going to visit CAPT.\n" .string "STERN and deliver the DEVON GOODS?$" -Route109_Text_1EEC96: @ 81EEC96 +Route109_Text_BrineySailToDewfordQuestion: @ 81EEC96 .string "MR. BRINEY: I thought you're supposed\n" .string "to deliver the DEVON GOODS.\p" .string "Would you like to sail back to\n" .string "DEWFORD, then?$" -Route109_Text_1EED06: @ 81EED06 +Route109_Text_BrineyDewfordItIs: @ 81EED06 .string "MR. BRINEY: DEWFORD it is, then!\p" .string "Anchors aweigh!\n" .string "PEEKO, we're setting sail, my darling!$" -Route109_Text_1EED5E: @ 81EED5E +Route109_Text_BrineyDeliverDevonGoods: @ 81EED5E .string "MR. BRINEY: Then you go on and deliver\n" .string "the DEVON GOODS. I'll be waiting.$" -DewfordTown_Text_1EEDA7: @ 81EEDA7 +DewfordTown_Text_BrineyLandedInSlateport: @ 81EEDA7 .string "MR. BRINEY: Ahoy! We've made land in\n" .string "SLATEPORT!\p" .string "You just go on and tell me whenever\n" .string "you want to set sail again!$" -Route109_Text_1EEE17: @ 81EEE17 +Route109_Text_BrineyWhereAreWeBound: @ 81EEE17 .string "MR. BRINEY: Ahoy!\n" .string "For you, I'll go out to sea anytime!\p" .string "Now, my friend, where are we bound?$" -Route109_Text_1EEE72: @ 81EEE72 +Route109_Text_BrineyTellMeWhenYouNeedToSail: @ 81EEE72 .string "MR. BRINEY: You just tell me whenever\n" .string "you need to set sail again!$" -Route109_Text_1EEEB4: @ 81EEEB4 +Route109_Text_ChillAtMyPapasSpot: @ 81EEEB4 .string "Yo, TRAINERS!\n" .string "Whether you're hot to trot,\l" .string "or cool cat not,\l" .string "chill at my papa's spot!$" -Route109_Text_1EEF08: @ 81EEF08 +Route109_Text_LittleKidsDartAround: @ 81EEF08 .string "Little kids can dart around so quickly…\p" .string "You don't dare take your eyes off them\n" .string "for an instant. It's very taxing.\p" .string "Mine are with my POKéMON, so they\n" .string "should be okay, but…$" -Route109_Text_1EEFB0: @ 81EEFB0 +Route109_Text_SandCastleTakingLongTime: @ 81EEFB0 .string "Our sand castle's taking a long time\n" .string "to make.$" -Route109_Text_1EEFDE: @ 81EEFDE +Route109_Text_YouCanHaveThis: @ 81EEFDE .string "You can have this!$" -Route109_Text_1EEFF1: @ 81EEFF1 +Route109_Text_WereGoingToMakeBigCastle: @ 81EEFF1 .string "We're going to get all the sand from\n" .string "the beach and make a big castle!\p" .string "And then we're going to be a king and\n" .string "queen.\p" .string "We'll let you be a servant.$" -Route109_Text_1EF080: @ 81EF080 +Route109_Text_ZigzagoonPicksUpLitter: @ 81EF080 .string "The water around these parts is clean.\p" .string "But, I get my ZIGZAGOON to pick up\n" .string "litter from the shoreline at times.\p" @@ -549,15 +549,15 @@ Route109_Text_1EF080: @ 81EF080 .string "If we pollute the sea, it all comes\n" .string "back to haunt us eventually.$" -Route109_Text_1EF173: @ 81EF173 +Route109_Text_ZigzagoonCry: @ 81EF173 .string "ZIGZAGOON: Guguu?$" -Route109_Text_1EF185: @ 81EF185 +Route109_Text_SeashoreHouseSign: @ 81EF185 .string "SEASHORE HOUSE\p" .string "“May hot battles rage on hot sands!\n" .string "The place for hot TRAINERS!”$" -Route109_Text_1EF1D5: @ 81EF1D5 +Route109_Text_TrainerTipsSign: @ 81EF1D5 .string "TRAINER TIPS\p" .string "POKéMON at the same level may not\n" .string "always have identical stats.\p" diff --git a/data/scripts/new_game.inc b/data/scripts/new_game.inc index e8cfc34a00..ea1b21ac7a 100644 --- a/data/scripts/new_game.inc +++ b/data/scripts/new_game.inc @@ -102,7 +102,7 @@ EventScript_ResetAllMapFlags:: @ 82715DE setflag FLAG_HIDE_BRINEYS_HOUSE_PEEKO setflag FLAG_HIDE_ROUTE_104_MR_BRINEY setflag FLAG_HIDE_MR_BRINEY_DEWFORD_TOWN - setflag FLAG_HIDE_ROUTE_108_MR_BRINEY + setflag FLAG_HIDE_ROUTE_109_MR_BRINEY setflag FLAG_HIDE_MR_BRINEY_BOAT_DEWFORD_TOWN setflag FLAG_HIDE_ROUTE_109_MR_BRINEY_BOAT setflag FLAG_HIDE_ROUTE_104_WHITE_HERB_FLORIST diff --git a/data/text/trainers.inc b/data/text/trainers.inc index b9cabdfe79..53e6c07b16 100644 --- a/data/text/trainers.inc +++ b/data/text/trainers.inc @@ -799,206 +799,206 @@ Route108_Text_CarolinaPostBattle: @ 82970F0 .string "Since I'm at sea like this, I wouldn't\n" .string "mind putting on a pink, frilly swimsuit…$" -Route109_Text_297140: @ 8297140 +Route109_Text_DavidIntro: @ 8297140 .string "Hiyah! Look at my chiseled abs!\n" .string "This is what you call “cut”!$" -Route109_Text_29717D: @ 829717D +Route109_Text_DavidDefeated: @ 829717D .string "Aiyah!\n" .string "Flubbed out!$" -Route109_Text_297191: @ 8297191 +Route109_Text_DavidPostBattle: @ 8297191 .string "Hiyah!\p" .string "My sculpted abs have nothing to do\n" .string "with POKéMON battles!$" -Route109_Text_2971D1: @ 82971D1 +Route109_Text_AliceIntro: @ 82971D1 .string "Are you properly protected against\n" .string "the sun?$" -Route109_Text_2971FD: @ 82971FD +Route109_Text_AliceDefeated: @ 82971FD .string "Ouch, ouch, ouch!$" -Route109_Text_29720F: @ 829720F +Route109_Text_AlicePostBattle: @ 829720F .string "Cheeks are the most prone to burning!$" -Route109_Text_297235: @ 8297235 +Route109_Text_HueyIntro: @ 8297235 .string "I've laid anchor in ports around\n" .string "the world, but SLATEPORT's the best.$" -Route109_Text_29727B: @ 829727B +Route109_Text_HueyDefeated: @ 829727B .string "You're the best!$" -Route109_Text_29728C: @ 829728C +Route109_Text_HueyPostBattle: @ 829728C .string "In the best port was the best\n" .string "TRAINER…$" -Route109_Text_2972B3: @ 82972B3 +Route109_Text_EdmondIntro: @ 82972B3 .string "Urrrrppp…\n" .string "Battle? With me?$" -Route109_Text_2972CE: @ 82972CE +Route109_Text_EdmondDefeated: @ 82972CE .string "Urp… Ooooooohhhhhh…\n" .string "Urrrrpppp…$" -Route109_Text_2972ED: @ 82972ED +Route109_Text_EdmondPostBattle: @ 82972ED .string "I'm usually stronger than this!\n" .string "I'm just seasick as a dog!\p" .string "I'm a SAILOR, but…$" -Route109_Text_29733B: @ 829733B +Route109_Text_RickyIntro: @ 829733B .string "I'm thirsty… I could go for a SODA POP\n" .string "at the SEASHORE HOUSE…$" -Route109_Text_297379: @ 8297379 +Route109_Text_RickyDefeated: @ 8297379 .string "Groan…$" -Route109_Text_297380: @ 8297380 +Route109_Text_RickyPostBattle: @ 8297380 .string "I'm getting famished… My inner tube\n" .string "looks like a giant doughnut…$" -Route109_Text_2973C1: @ 82973C1 +Route109_Text_RickyRegister: @ 82973C1 .string "Will you have another match with me\n" .string "when I'm not all thirsty?$" -Route109_Text_2973FF: @ 82973FF +Route109_Text_RickyRematchIntro: @ 82973FF .string "I'm hungry, but I've got enough pep in\n" .string "me for a battle!$" -Route109_Text_297437: @ 8297437 +Route109_Text_RickyRematchDefeated: @ 8297437 .string "I lost…\n" .string "It's because I'm hungry…$" -Route109_Text_297458: @ 8297458 +Route109_Text_RickyRematchPostBattle: @ 8297458 .string "When you eat on a beach, everything\n" .string "seems to taste a little better.$" -Route109_Text_29749C: @ 829749C +Route109_Text_LolaIntro: @ 829749C .string "Doesn't a beach umbrella look like\n" .string "a giant flower?$" -Route109_Text_2974CF: @ 82974CF +Route109_Text_LolaDefeated: @ 82974CF .string "Mommy!$" -Route109_Text_2974D6: @ 82974D6 +Route109_Text_LolaPostBattle: @ 82974D6 .string "If you look at the beach from the sky,\n" .string "it looks like a big flower garden!$" -Route109_Text_297520: @ 8297520 +Route109_Text_LolaRegister: @ 8297520 .string "Me?\n" .string "I'm here every day!$" -Route109_Text_297538: @ 8297538 +Route109_Text_LolaRematchIntro: @ 8297538 .string "I'm not losing to you again!\n" .string "That's why I have my inner tube!$" -Route109_Text_297576: @ 8297576 +Route109_Text_LolaRematchDefeated: @ 8297576 .string "Mommy!$" -Route109_Text_29757D: @ 829757D +Route109_Text_LolaRematchPostBattle: @ 829757D .string "If I have an inner tube, me and my\n" .string "POKéMON's cuteness goes way up!$" -Route109_Text_2975C0: @ 82975C0 +Route109_Text_AustinaIntro: @ 82975C0 .string "I can't swim without my inner tube,\n" .string "but I won't lose at POKéMON!$" -Route109_Text_297601: @ 8297601 +Route109_Text_AustinaDefeated: @ 8297601 .string "Did I lose because I have an inner\n" .string "tube?$" -Route109_Text_29762A: @ 829762A +Route109_Text_AustinaPostBattle: @ 829762A .string "My inner tube is a fashion item.\n" .string "I can't be seen without it.$" -Route109_Text_297667: @ 8297667 +Route109_Text_GwenIntro: @ 8297667 .string "Hi, big TRAINER.\n" .string "Will you battle with me?$" -Route109_Text_297691: @ 8297691 +Route109_Text_GwenDefeated: @ 8297691 .string "Oh, you're strong.$" -Route109_Text_2976A4: @ 82976A4 +Route109_Text_GwenPostBattle: @ 82976A4 .string "How did you get to be so strong?$" -Route109_Text_2976C5: @ 82976C5 +Route109_Text_CarterIntro: @ 82976C5 .string "Wahahah! This dude's going to catch\n" .string "himself a big one!$" -Route109_Text_2976FC: @ 82976FC +Route109_Text_CarterDefeated: @ 82976FC .string "This dude just lost one…$" -Route109_Text_297715: @ 8297715 +Route109_Text_CarterPostBattle: @ 8297715 .string "This dude thinks you're a big one.\n" .string "No, you're a big-one-to-be!$" -Route109_Text_297754: @ 8297754 +Route109_Text_PaulIntro: @ 8297754 .string "PAUL: Well, this is a mood-breaker.\p" .string "I wish you wouldn't disturb our\n" .string "precious time together.$" -Route109_Text_2977B0: @ 82977B0 +Route109_Text_PaulDefeated: @ 82977B0 .string "PAUL: Well, I give up.$" -Route109_Text_2977C7: @ 82977C7 +Route109_Text_PaulPostBattle: @ 82977C7 .string "PAUL: Well, don't tell anyone that\n" .string "we're here.\l" .string "This is just our private world of two!$" -Route109_Text_29781D: @ 829781D +Route109_Text_PaulNotEnoughPokemon: @ 829781D .string "PAUL: We're totally, deeply in love.\n" .string "That's why we make our POKéMON battle\l" .string "together.$" -Route109_Text_297872: @ 8297872 +Route109_Text_MelIntro: @ 8297872 .string "MEL: We're, like, totally in love.\n" .string "Our romance is heating up all of HOENN!$" -Route109_Text_2978BD: @ 82978BD +Route109_Text_MelDefeated: @ 82978BD .string "MEL: We lost, and it's my fault!\n" .string "PAUL will hate me!$" -Route109_Text_2978F1: @ 82978F1 +Route109_Text_MelPostBattle: @ 82978F1 .string "MEL: Um, PAUL, are you angry with me?\n" .string "Please don't be angry.$" -Route109_Text_29792E: @ 829792E +Route109_Text_MelNotEnoughPokemon: @ 829792E .string "MEL: We're, like, deeply and truly in love.\n" .string "That's why we make our POKéMON\l" .string "battle together.$" -Route109_Text_29798A: @ 829798A +Route109_Text_ChandlerIntro: @ 829798A .string "Tadaah! See?\n" .string "My inner tube's round!$" -Route109_Text_2979AE: @ 82979AE +Route109_Text_ChandlerDefeated: @ 82979AE .string "Oh, oh!\n" .string "Too bad!$" -Route109_Text_2979BF: @ 82979BF +Route109_Text_ChandlerPostBattle: @ 82979BF .string "After I showed you my round inner\n" .string "tube, too…$" -Route109_Text_2979EC: @ 82979EC +Route109_Text_HaileyIntro: @ 82979EC .string "I can't swim, so I'm pretending\n" .string "to swim.$" -Route109_Text_297A15: @ 8297A15 +Route109_Text_HaileyDefeated: @ 8297A15 .string "I thought so!\n" .string "I didn't think we could win.$" -Route109_Text_297A40: @ 8297A40 +Route109_Text_HaileyPostBattle: @ 8297A40 .string "When I learn how to swim, I think\n" .string "my POKéMON will become tougher.$" -Route109_Text_297A82: @ 8297A82 +Route109_Text_ElijahIntro: @ 8297A82 .string "For a guy as macho as me, this kind\n" .string "of POKéMON is the perfect match!$" -Route109_Text_297AC7: @ 8297AC7 +Route109_Text_ElijahDefeated: @ 8297AC7 .string "I'm cool even in defeat, hey?$" -Route109_Text_297AE5: @ 8297AE5 +Route109_Text_ElijahPostBattle: @ 8297AE5 .string "For a guy as macho as me, a port\n" .string "is the perfect setting!\p" .string "I guess I'll head for SLATEPORT.$" diff --git a/include/constants/flags.h b/include/constants/flags.h index e9f9aa7705..b61bf0b11c 100644 --- a/include/constants/flags.h +++ b/include/constants/flags.h @@ -694,7 +694,7 @@ #define FLAG_HIDE_ROUTE_104_MR_BRINEY 0x2E2 #define FLAG_HIDE_BRINEYS_HOUSE_MR_BRINEY 0x2E3 #define FLAG_HIDE_MR_BRINEY_DEWFORD_TOWN 0x2E4 -#define FLAG_HIDE_ROUTE_108_MR_BRINEY 0x2E5 +#define FLAG_HIDE_ROUTE_109_MR_BRINEY 0x2E5 #define FLAG_HIDE_ROUTE_104_MR_BRINEY_BOAT 0x2E6 #define FLAG_HIDE_MR_BRINEY_BOAT_DEWFORD_TOWN 0x2E7 #define FLAG_HIDE_ROUTE_109_MR_BRINEY_BOAT 0x2E8 From 8b75d977e3e0bf70274688aed830a0a9c65126b8 Mon Sep 17 00:00:00 2001 From: Marcus Huderle Date: Sat, 26 Oct 2019 11:26:16 -0500 Subject: [PATCH 29/46] Document seashore house scripts --- data/maps/Route109_SeashoreHouse/map.json | 8 +- data/maps/Route109_SeashoreHouse/scripts.inc | 114 +++++++++---------- 2 files changed, 61 insertions(+), 61 deletions(-) diff --git a/data/maps/Route109_SeashoreHouse/map.json b/data/maps/Route109_SeashoreHouse/map.json index 3f293b2916..ebd5583c6f 100644 --- a/data/maps/Route109_SeashoreHouse/map.json +++ b/data/maps/Route109_SeashoreHouse/map.json @@ -24,7 +24,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "Route109_SeashoreHouse_EventScript_2693FE", + "script": "Route109_SeashoreHouse_EventScript_Owner", "flag": "0" }, { @@ -37,7 +37,7 @@ "movement_range_y": 0, "trainer_type": "1", "trainer_sight_or_berry_tree_id": "2", - "script": "Route109_SeashoreHouse_EventScript_2694E2", + "script": "Route109_SeashoreHouse_EventScript_Dwayne", "flag": "0" }, { @@ -50,7 +50,7 @@ "movement_range_y": 0, "trainer_type": "1", "trainer_sight_or_berry_tree_id": "2", - "script": "Route109_SeashoreHouse_EventScript_269518", + "script": "Route109_SeashoreHouse_EventScript_Simon", "flag": "0" }, { @@ -63,7 +63,7 @@ "movement_range_y": 0, "trainer_type": "1", "trainer_sight_or_berry_tree_id": "2", - "script": "Route109_SeashoreHouse_EventScript_2694FD", + "script": "Route109_SeashoreHouse_EventScript_Johanna", "flag": "0" } ], diff --git a/data/maps/Route109_SeashoreHouse/scripts.inc b/data/maps/Route109_SeashoreHouse/scripts.inc index d74b6b671b..bc018c2f05 100644 --- a/data/maps/Route109_SeashoreHouse/scripts.inc +++ b/data/maps/Route109_SeashoreHouse/scripts.inc @@ -6,56 +6,56 @@ Route109_SeashoreHouse_OnTransition: @ 82693FA setflag FLAG_LANDMARK_SEASHORE_HOUSE end -Route109_SeashoreHouse_EventScript_2693FE:: @ 82693FE +Route109_SeashoreHouse_EventScript_Owner:: @ 82693FE lock faceplayer - goto_if_set FLAG_RECEIVED_6_SODA_POP, Route109_SeashoreHouse_EventScript_269460 - goto_if_set FLAG_DEFEATED_SEASHORE_HOUSE, Route109_SeashoreHouse_EventScript_269432 - goto_if_set FLAG_TEMP_2, Route109_SeashoreHouse_EventScript_269428 - msgbox Route109_SeashoreHouse_Text_269555, MSGBOX_DEFAULT + goto_if_set FLAG_RECEIVED_6_SODA_POP, Route109_SeashoreHouse_EventScript_AlreadyReceivedSodaPop + goto_if_set FLAG_DEFEATED_SEASHORE_HOUSE, Route109_SeashoreHouse_EventScript_DefeatedTrainers + goto_if_set FLAG_TEMP_2, Route109_SeashoreHouse_EventScript_AlreadyGaveIntroduction + msgbox Route109_SeashoreHouse_Text_SeashoreHouseIntro, MSGBOX_DEFAULT setflag FLAG_TEMP_2 release end -Route109_SeashoreHouse_EventScript_269428:: @ 8269428 - msgbox Route109_SeashoreHouse_Text_269635, MSGBOX_DEFAULT +Route109_SeashoreHouse_EventScript_AlreadyGaveIntroduction:: @ 8269428 + msgbox Route109_SeashoreHouse_Text_ShowMeSomeHotMatches, MSGBOX_DEFAULT release end -Route109_SeashoreHouse_EventScript_269432:: @ 8269432 - msgbox Route109_SeashoreHouse_Text_269685, MSGBOX_DEFAULT +Route109_SeashoreHouse_EventScript_DefeatedTrainers:: @ 8269432 + msgbox Route109_SeashoreHouse_Text_TakeTheseSodaPopBottles, MSGBOX_DEFAULT giveitem_std ITEM_SODA_POP, 6 compare VAR_RESULT, 0 - goto_if_eq Route109_SeashoreHouse_EventScript_269456 + goto_if_eq Route109_SeashoreHouse_EventScript_BagFull setflag FLAG_RECEIVED_6_SODA_POP release end -Route109_SeashoreHouse_EventScript_269456:: @ 8269456 - msgbox Route109_SeashoreHouse_Text_26973A, MSGBOX_DEFAULT +Route109_SeashoreHouse_EventScript_BagFull:: @ 8269456 + msgbox Route109_SeashoreHouse_Text_BagFull, MSGBOX_DEFAULT release end -Route109_SeashoreHouse_EventScript_269460:: @ 8269460 +Route109_SeashoreHouse_EventScript_AlreadyReceivedSodaPop:: @ 8269460 showmoneybox 0, 0, 0 - msgbox Route109_SeashoreHouse_Text_26977E, MSGBOX_YESNO - compare VAR_RESULT, 1 - goto_if_eq Route109_SeashoreHouse_EventScript_269484 - msgbox Route109_SeashoreHouse_Text_2697EF, MSGBOX_DEFAULT + msgbox Route109_SeashoreHouse_Text_WantToBuySodaPop, MSGBOX_YESNO + compare VAR_RESULT, YES + goto_if_eq Route109_SeashoreHouse_EventScript_BuySodaPop + msgbox Route109_SeashoreHouse_Text_ThatsTooBad, MSGBOX_DEFAULT hidemoneybox nop nop release end -Route109_SeashoreHouse_EventScript_269484:: @ 8269484 +Route109_SeashoreHouse_EventScript_BuySodaPop:: @ 8269484 checkmoney 300, 0 - compare VAR_RESULT, 0 - goto_if_eq Route109_SeashoreHouse_EventScript_2694C8 + compare VAR_RESULT, FALSE + goto_if_eq Route109_SeashoreHouse_EventScript_NotEnoughMoney checkitemspace ITEM_SODA_POP, 1 - compare VAR_RESULT, 0 - goto_if_eq Route109_SeashoreHouse_EventScript_2694D5 - msgbox Route109_SeashoreHouse_Text_2697C8, MSGBOX_DEFAULT + compare VAR_RESULT, FALSE + goto_if_eq Route109_SeashoreHouse_EventScript_NotEnoughSpace + msgbox Route109_SeashoreHouse_Text_HereYouGo, MSGBOX_DEFAULT takemoney 300, 0 updatemoneybox 0, 0 giveitem_std ITEM_SODA_POP @@ -65,15 +65,15 @@ Route109_SeashoreHouse_EventScript_269484:: @ 8269484 release end -Route109_SeashoreHouse_EventScript_2694C8:: @ 82694C8 - msgbox Route109_SeashoreHouse_Text_2697D5, MSGBOX_DEFAULT +Route109_SeashoreHouse_EventScript_NotEnoughMoney:: @ 82694C8 + msgbox Route109_SeashoreHouse_Text_NotEnoughMoney, MSGBOX_DEFAULT hidemoneybox nop nop release end -Route109_SeashoreHouse_EventScript_2694D5:: @ 82694D5 +Route109_SeashoreHouse_EventScript_NotEnoughSpace:: @ 82694D5 msgbox gText_TooBadBagIsFull, MSGBOX_DEFAULT hidemoneybox nop @@ -81,37 +81,37 @@ Route109_SeashoreHouse_EventScript_2694D5:: @ 82694D5 release end -Route109_SeashoreHouse_EventScript_2694E2:: @ 82694E2 - trainerbattle_single TRAINER_DWAYNE, Route109_SeashoreHouse_Text_269803, Route109_SeashoreHouse_Text_269867, Route109_SeashoreHouse_EventScript_269533 - msgbox Route109_SeashoreHouse_Text_26989D, MSGBOX_AUTOCLOSE +Route109_SeashoreHouse_EventScript_Dwayne:: @ 82694E2 + trainerbattle_single TRAINER_DWAYNE, Route109_SeashoreHouse_Text_DwayneIntro, Route109_SeashoreHouse_Text_DwayneDefeated, Route109_SeashoreHouse_EventScript_CheckTrainersCompletion + msgbox Route109_SeashoreHouse_Text_DwaynePostBattle, MSGBOX_AUTOCLOSE end -Route109_SeashoreHouse_EventScript_2694FD:: @ 82694FD - trainerbattle_single TRAINER_JOHANNA, Route109_SeashoreHouse_Text_2698E3, Route109_SeashoreHouse_Text_269947, Route109_SeashoreHouse_EventScript_269533 - msgbox Route109_SeashoreHouse_Text_269953, MSGBOX_AUTOCLOSE +Route109_SeashoreHouse_EventScript_Johanna:: @ 82694FD + trainerbattle_single TRAINER_JOHANNA, Route109_SeashoreHouse_Text_JohannaIntro, Route109_SeashoreHouse_Text_JohannaDefeated, Route109_SeashoreHouse_EventScript_CheckTrainersCompletion + msgbox Route109_SeashoreHouse_Text_JohannaPostBattle, MSGBOX_AUTOCLOSE end -Route109_SeashoreHouse_EventScript_269518:: @ 8269518 - trainerbattle_single TRAINER_SIMON, Route109_SeashoreHouse_Text_269986, Route109_SeashoreHouse_Text_2699C5, Route109_SeashoreHouse_EventScript_269533 - msgbox Route109_SeashoreHouse_Text_2699DF, MSGBOX_AUTOCLOSE +Route109_SeashoreHouse_EventScript_Simon:: @ 8269518 + trainerbattle_single TRAINER_SIMON, Route109_SeashoreHouse_Text_SimonIntro, Route109_SeashoreHouse_Text_SimonDefeated, Route109_SeashoreHouse_EventScript_CheckTrainersCompletion + msgbox Route109_SeashoreHouse_Text_SimonPostBattle, MSGBOX_AUTOCLOSE end -Route109_SeashoreHouse_EventScript_269533:: @ 8269533 +Route109_SeashoreHouse_EventScript_CheckTrainersCompletion:: @ 8269533 checktrainerflag TRAINER_DWAYNE - goto_if_lt Route109_SeashoreHouse_EventScript_269553 + goto_if_lt Route109_SeashoreHouse_EventScript_TrainersNotCompleted checktrainerflag TRAINER_JOHANNA - goto_if_lt Route109_SeashoreHouse_EventScript_269553 + goto_if_lt Route109_SeashoreHouse_EventScript_TrainersNotCompleted checktrainerflag TRAINER_SIMON - goto_if_lt Route109_SeashoreHouse_EventScript_269553 + goto_if_lt Route109_SeashoreHouse_EventScript_TrainersNotCompleted setflag FLAG_DEFEATED_SEASHORE_HOUSE release end -Route109_SeashoreHouse_EventScript_269553:: @ 8269553 +Route109_SeashoreHouse_EventScript_TrainersNotCompleted:: @ 8269553 release end -Route109_SeashoreHouse_Text_269555: @ 8269555 +Route109_SeashoreHouse_Text_SeashoreHouseIntro: @ 8269555 .string "I'm the owner of the SEASHORE HOUSE.\n" .string "But you can call me MR. SEA!\p" .string "What I love above all is to see hot\n" @@ -120,12 +120,12 @@ Route109_SeashoreHouse_Text_269555: @ 8269555 .string "If you can defeat all the TRAINERS\n" .string "here, I'll reward your efforts.$" -Route109_SeashoreHouse_Text_269635: @ 8269635 +Route109_SeashoreHouse_Text_ShowMeSomeHotMatches: @ 8269635 .string "Show me some hot matches!\p" .string "I run this SEASHORE HOUSE just for\n" .string "that reason alone!$" -Route109_SeashoreHouse_Text_269685: @ 8269685 +Route109_SeashoreHouse_Text_TakeTheseSodaPopBottles: @ 8269685 .string "You're scorching hot!\n" .string "Those battles blazed!\l" .string "I'm more than just satisfied!\p" @@ -133,59 +133,59 @@ Route109_SeashoreHouse_Text_269685: @ 8269685 .string "streak, I want you to take these.\p" .string "It's half a dozen bottles of SODA POP!$" -Route109_SeashoreHouse_Text_26973A: @ 826973A +Route109_SeashoreHouse_Text_BagFull: @ 826973A .string "Oh, but hey, your BAG's jammed full.\n" .string "I'll hang on to these for you.$" -Route109_SeashoreHouse_Text_26977E: @ 826977E +Route109_SeashoreHouse_Text_WantToBuySodaPop: @ 826977E .string "Want to buy some SODA POP?\n" .string "POKéMON love it!\p" .string "Just ¥300 a bottle!\n" .string "Buy some!$" -Route109_SeashoreHouse_Text_2697C8: @ 82697C8 +Route109_SeashoreHouse_Text_HereYouGo: @ 82697C8 .string "Here you go!$" -Route109_SeashoreHouse_Text_2697D5: @ 82697D5 +Route109_SeashoreHouse_Text_NotEnoughMoney: @ 82697D5 .string "You don't have the money.$" -Route109_SeashoreHouse_Text_2697EF: @ 82697EF +Route109_SeashoreHouse_Text_ThatsTooBad: @ 82697EF .string "No?\n" .string "That's too bad.$" -Route109_SeashoreHouse_Text_269803: @ 8269803 +Route109_SeashoreHouse_Text_DwayneIntro: @ 8269803 .string "If you're looking for a battle in the\n" .string "SEASHORE HOUSE, you'll find no\l" .string "hotter TRAINER than me, matey!$" -Route109_SeashoreHouse_Text_269867: @ 8269867 +Route109_SeashoreHouse_Text_DwayneDefeated: @ 8269867 .string "That was a hot battle!\n" .string "I can accept that loss, matey!$" -Route109_SeashoreHouse_Text_26989D: @ 826989D +Route109_SeashoreHouse_Text_DwaynePostBattle: @ 826989D .string "Whenever I'm in SLATEPORT, I enjoy\n" .string "hot battles and ice-cold SODA POP!$" -Route109_SeashoreHouse_Text_2698E3: @ 82698E3 +Route109_SeashoreHouse_Text_JohannaIntro: @ 82698E3 .string "Boring battles aren't worth the effort.\p" .string "Fiery hot battles are what toughen up\n" .string "TRAINERS and POKéMON!$" -Route109_SeashoreHouse_Text_269947: @ 8269947 +Route109_SeashoreHouse_Text_JohannaDefeated: @ 8269947 .string "That's hot!$" -Route109_SeashoreHouse_Text_269953: @ 8269953 +Route109_SeashoreHouse_Text_JohannaPostBattle: @ 8269953 .string "Whew, I'm all thirsty.\n" .string "Maybe I'll have a SODA POP.$" -Route109_SeashoreHouse_Text_269986: @ 8269986 +Route109_SeashoreHouse_Text_SimonIntro: @ 8269986 .string "I'm going to show you how great\n" .string "my POKéMON are, but don't cry!$" -Route109_SeashoreHouse_Text_2699C5: @ 82699C5 +Route109_SeashoreHouse_Text_SimonDefeated: @ 82699C5 .string "…I lost, but I won't cry…$" -Route109_SeashoreHouse_Text_2699DF: @ 82699DF +Route109_SeashoreHouse_Text_SimonPostBattle: @ 82699DF .string "If one of my POKéMON knew the move\n" .string "for carrying me across water on its\l" .string "back, I could get rid of this inner tube.$" From aad430c049e4cd428427c5a28599587d5f3f983f Mon Sep 17 00:00:00 2001 From: Marcus Huderle Date: Sat, 26 Oct 2019 12:22:36 -0500 Subject: [PATCH 30/46] Document route 110 scripts --- data/maps/Route110/map.json | 92 ++--- data/maps/Route110/scripts.inc | 670 ++++++++++++++++----------------- data/text/trainers.inc | 116 +++--- 3 files changed, 439 insertions(+), 439 deletions(-) diff --git a/data/maps/Route110/map.json b/data/maps/Route110/map.json index 570c38dcca..660f24cccf 100644 --- a/data/maps/Route110/map.json +++ b/data/maps/Route110/map.json @@ -40,7 +40,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "Route110_EventScript_1EF338", + "script": "Route110_EventScript_Boy2", "flag": "0" }, { @@ -53,7 +53,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "Route110_EventScript_1EF32F", + "script": "Route110_EventScript_CyclingGuy2", "flag": "0" }, { @@ -66,7 +66,7 @@ "movement_range_y": 1, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "Route110_EventScript_1EF326", + "script": "Route110_EventScript_OldWoman", "flag": "0" }, { @@ -79,7 +79,7 @@ "movement_range_y": 1, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "Route110_EventScript_1EF314", + "script": "Route110_EventScript_CyclingGuy1", "flag": "0" }, { @@ -92,7 +92,7 @@ "movement_range_y": 1, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "Route110_EventScript_1EF31D", + "script": "Route110_EventScript_OldMan", "flag": "0" }, { @@ -105,7 +105,7 @@ "movement_range_y": 3, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "Route110_EventScript_1EF30B", + "script": "Route110_EventScript_CyclingGirl1", "flag": "0" }, { @@ -118,7 +118,7 @@ "movement_range_y": 1, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "Route110_EventScript_1EF302", + "script": "Route110_EventScript_Boy1", "flag": "0" }, { @@ -131,7 +131,7 @@ "movement_range_y": 14, "trainer_type": "1", "trainer_sight_or_berry_tree_id": "3", - "script": "Route110_EventScript_1EF529", + "script": "Route110_EventScript_Jasmine", "flag": "0" }, { @@ -144,7 +144,7 @@ "movement_range_y": 1, "trainer_type": "1", "trainer_sight_or_berry_tree_id": "3", - "script": "Route110_EventScript_1EF4B0", + "script": "Route110_EventScript_Anthony", "flag": "0" }, { @@ -157,7 +157,7 @@ "movement_range_y": 1, "trainer_type": "1", "trainer_sight_or_berry_tree_id": "4", - "script": "Route110_EventScript_1EF540", + "script": "Route110_EventScript_Abigail", "flag": "0" }, { @@ -170,7 +170,7 @@ "movement_range_y": 4, "trainer_type": "1", "trainer_sight_or_berry_tree_id": "3", - "script": "Route110_EventScript_1EF4C7", + "script": "Route110_EventScript_Benjamin", "flag": "0" }, { @@ -183,7 +183,7 @@ "movement_range_y": 0, "trainer_type": "1", "trainer_sight_or_berry_tree_id": "6", - "script": "Route110_EventScript_1EF3F2", + "script": "Route110_EventScript_Edward", "flag": "0" }, { @@ -196,7 +196,7 @@ "movement_range_y": 0, "trainer_type": "1", "trainer_sight_or_berry_tree_id": "1", - "script": "Route110_EventScript_1EF409", + "script": "Route110_EventScript_Jaclyn", "flag": "0" }, { @@ -209,7 +209,7 @@ "movement_range_y": 0, "trainer_type": "1", "trainer_sight_or_berry_tree_id": "4", - "script": "Route110_EventScript_1EF420", + "script": "Route110_EventScript_Edwin", "flag": "0" }, { @@ -222,7 +222,7 @@ "movement_range_y": 0, "trainer_type": "1", "trainer_sight_or_berry_tree_id": "1", - "script": "Route110_EventScript_1EF482", + "script": "Route110_EventScript_Dale", "flag": "0" }, { @@ -300,7 +300,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "Route110_EventScript_1EF3B7", + "script": "Route110_EventScript_ChallengeGuy", "flag": "0" }, { @@ -313,7 +313,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "Route110_EventScript_1EF2AA", + "script": "Route110_EventScript_AquaGrunt1", "flag": "FLAG_HIDE_ROUTE_110_TEAM_AQUA" }, { @@ -326,7 +326,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "Route110_EventScript_1EF2C0", + "script": "Route110_EventScript_AquaGrunt2", "flag": "FLAG_HIDE_ROUTE_110_TEAM_AQUA" }, { @@ -339,7 +339,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "Route110_EventScript_1EF2D6", + "script": "Route110_EventScript_AquaGrunt3", "flag": "FLAG_HIDE_ROUTE_110_TEAM_AQUA" }, { @@ -352,7 +352,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "Route110_EventScript_1EF2EC", + "script": "Route110_EventScript_AquaGrunt4", "flag": "FLAG_HIDE_ROUTE_110_TEAM_AQUA" }, { @@ -378,7 +378,7 @@ "movement_range_y": 1, "trainer_type": "1", "trainer_sight_or_berry_tree_id": "2", - "script": "Route110_EventScript_1EF499", + "script": "Route110_EventScript_Jacob", "flag": "0" }, { @@ -417,7 +417,7 @@ "movement_range_y": 0, "trainer_type": "1", "trainer_sight_or_berry_tree_id": "3", - "script": "Route110_EventScript_1EF604", + "script": "Route110_EventScript_Timmy", "flag": "0" }, { @@ -430,7 +430,7 @@ "movement_range_y": 0, "trainer_type": "1", "trainer_sight_or_berry_tree_id": "2", - "script": "Route110_EventScript_1EF5A2", + "script": "Route110_EventScript_Isabel", "flag": "0" }, { @@ -443,7 +443,7 @@ "movement_range_y": 1, "trainer_type": "1", "trainer_sight_or_berry_tree_id": "2", - "script": "Route110_EventScript_1EF61C", + "script": "Route110_EventScript_Kaleb", "flag": "0" }, { @@ -456,7 +456,7 @@ "movement_range_y": 1, "trainer_type": "1", "trainer_sight_or_berry_tree_id": "6", - "script": "Route110_EventScript_1EF64A", + "script": "Route110_EventScript_Alyssa", "flag": "0" }, { @@ -469,7 +469,7 @@ "movement_range_y": 1, "trainer_type": "1", "trainer_sight_or_berry_tree_id": "3", - "script": "Route110_EventScript_1EF633", + "script": "Route110_EventScript_Joseph", "flag": "0" }, { @@ -551,7 +551,7 @@ "elevation": 3, "var": "VAR_CYCLING_CHALLENGE_STATE", "var_value": "2", - "script": "Route110_EventScript_1EF661" + "script": "Route110_EventScript_CyclingChallengeEnd" }, { "type": "trigger", @@ -560,7 +560,7 @@ "elevation": 3, "var": "VAR_CYCLING_CHALLENGE_STATE", "var_value": "2", - "script": "Route110_EventScript_1EF661" + "script": "Route110_EventScript_CyclingChallengeEnd" }, { "type": "trigger", @@ -569,7 +569,7 @@ "elevation": 3, "var": "VAR_ROUTE110_STATE", "var_value": "0", - "script": "Route110_EventScript_1EF74D" + "script": "Route110_EventScript_RivalTrigger1" }, { "type": "trigger", @@ -578,7 +578,7 @@ "elevation": 3, "var": "VAR_ROUTE110_STATE", "var_value": "0", - "script": "Route110_EventScript_1EF758" + "script": "Route110_EventScript_RivalTrigger2" }, { "type": "trigger", @@ -587,7 +587,7 @@ "elevation": 3, "var": "VAR_ROUTE110_STATE", "var_value": "0", - "script": "Route110_EventScript_1EF763" + "script": "Route110_EventScript_RivalTrigger3" }, { "type": "trigger", @@ -596,7 +596,7 @@ "elevation": 3, "var": "VAR_REGISTER_BIRCH_STATE", "var_value": "1", - "script": "Route110_EventScript_1EF9CB" + "script": "Route110_EventScript_BirchScene1" }, { "type": "trigger", @@ -605,7 +605,7 @@ "elevation": 3, "var": "VAR_REGISTER_BIRCH_STATE", "var_value": "1", - "script": "Route110_EventScript_1EF9D6" + "script": "Route110_EventScript_BirchScene2" }, { "type": "trigger", @@ -614,7 +614,7 @@ "elevation": 3, "var": "VAR_REGISTER_BIRCH_STATE", "var_value": "1", - "script": "Route110_EventScript_1EF9E1" + "script": "Route110_EventScript_BirchScene3" }, { "type": "trigger", @@ -623,7 +623,7 @@ "elevation": 3, "var": "VAR_REGISTER_BIRCH_STATE", "var_value": "1", - "script": "Route110_EventScript_1EF9EC" + "script": "Route110_EventScript_BirchScene4" } ], "bg_events": [ @@ -633,7 +633,7 @@ "y": 25, "elevation": 0, "player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY", - "script": "Route110_EventScript_1EF353" + "script": "Route110_EventScript_VandalizedSign" }, { "type": "sign", @@ -641,7 +641,7 @@ "y": 51, "elevation": 0, "player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY", - "script": "Route110_EventScript_1EF365" + "script": "Route110_EventScript_SeasideParkingSign" }, { "type": "sign", @@ -649,7 +649,7 @@ "y": 88, "elevation": 0, "player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY", - "script": "Route110_EventScript_1EF34A" + "script": "Route110_EventScript_CyclingRoadSign" }, { "type": "sign", @@ -657,7 +657,7 @@ "y": 94, "elevation": 0, "player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY", - "script": "Route110_EventScript_1EF341" + "script": "Route110_EventScript_SlateportCitySign" }, { "type": "sign", @@ -665,7 +665,7 @@ "y": 79, "elevation": 0, "player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY", - "script": "Route110_EventScript_1EF35C" + "script": "Route110_EventScript_Route103Sign" }, { "type": "sign", @@ -673,7 +673,7 @@ "y": 17, "elevation": 0, "player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY", - "script": "Route110_EventScript_1EF36E" + "script": "Route110_EventScript_MauvilleCitySign" }, { "type": "secret_base", @@ -695,7 +695,7 @@ "y": 39, "elevation": 3, "player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY", - "script": "Route110_EventScript_1EF377" + "script": "Route110_EventScript_TrainerTipsPrlzSleep" }, { "type": "sign", @@ -703,7 +703,7 @@ "y": 70, "elevation": 3, "player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY", - "script": "Route110_EventScript_1EF380" + "script": "Route110_EventScript_TrainerTipsRegisterItems" }, { "type": "sign", @@ -711,7 +711,7 @@ "y": 67, "elevation": 0, "player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY", - "script": "Route110_EventScript_1EF389" + "script": "Route110_EventScript_TrickHouseSign" }, { "type": "sign", @@ -719,7 +719,7 @@ "y": 93, "elevation": 0, "player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY", - "script": "Route110_EventScript_1EF392" + "script": "Route110_EventScript_CyclingRoadResultsSign" }, { "type": "hidden_item", @@ -759,7 +759,7 @@ "y": 16, "elevation": 0, "player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY", - "script": "Route110_EventScript_1EF34A" + "script": "Route110_EventScript_CyclingRoadSign" } ] } diff --git a/data/maps/Route110/scripts.inc b/data/maps/Route110/scripts.inc index cafd99a9cd..68ae1d573f 100644 --- a/data/maps/Route110/scripts.inc +++ b/data/maps/Route110/scripts.inc @@ -1,10 +1,10 @@ Route110_MapScripts:: @ 81EF269 - map_script MAP_SCRIPT_ON_RESUME, Route110_MapScript1_1EF279 + map_script MAP_SCRIPT_ON_RESUME, Route110_OnResume map_script MAP_SCRIPT_ON_TRANSITION, Route110_OnTransition - map_script MAP_SCRIPT_ON_FRAME_TABLE, Route110_MapScript2_1EF297 + map_script MAP_SCRIPT_ON_FRAME_TABLE, Route110_OnFrame .byte 0 -Route110_MapScript1_1EF279: @ 81EF279 +Route110_OnResume: @ 81EF279 special UpdateCyclingRoadState end @@ -12,300 +12,300 @@ Route110_OnTransition: @ 81EF27D call Common_EventScript_SetupRivalGfxId call Common_EventScript_SetupRivalOnBikeGfxId compare VAR_CYCLING_CHALLENGE_STATE, 1 - call_if_eq Route110_EventScript_1EF293 + call_if_eq Route110_EventScript_SaveCyclingMusic end -Route110_EventScript_1EF293:: @ 81EF293 +Route110_EventScript_SaveCyclingMusic:: @ 81EF293 savebgm MUS_CYCLING return -Route110_MapScript2_1EF297: @ 81EF297 - map_script_2 VAR_CYCLING_CHALLENGE_STATE, 1, Route110_EventScript_1EF2A1 +Route110_OnFrame: @ 81EF297 + map_script_2 VAR_CYCLING_CHALLENGE_STATE, 1, Route110_EventScript_BeginCylcingRoadChallenge .2byte 0 -Route110_EventScript_1EF2A1:: @ 81EF2A1 +Route110_EventScript_BeginCylcingRoadChallenge:: @ 81EF2A1 special Special_BeginCyclingRoadChallenge setvar VAR_CYCLING_CHALLENGE_STATE, 2 return -Route110_EventScript_1EF2AA:: @ 81EF2AA +Route110_EventScript_AquaGrunt1:: @ 81EF2AA lock faceplayer - msgbox Route110_Text_1EFB5D, MSGBOX_DEFAULT + msgbox Route110_Text_WeCantTalkAboutAquaActivities, MSGBOX_DEFAULT applymovement VAR_LAST_TALKED, Common_Movement_FaceOriginalDirection waitmovement 0 release end -Route110_EventScript_1EF2C0:: @ 81EF2C0 +Route110_EventScript_AquaGrunt2:: @ 81EF2C0 lock faceplayer - msgbox Route110_Text_1EFB93, MSGBOX_DEFAULT + msgbox Route110_Text_KickUpARuckus, MSGBOX_DEFAULT applymovement VAR_LAST_TALKED, Common_Movement_FaceOriginalDirection waitmovement 0 release end -Route110_EventScript_1EF2D6:: @ 81EF2D6 +Route110_EventScript_AquaGrunt3:: @ 81EF2D6 lock faceplayer - msgbox Route110_Text_1EFBCA, MSGBOX_DEFAULT + msgbox Route110_Text_MyFirstJobInAqua, MSGBOX_DEFAULT applymovement VAR_LAST_TALKED, Common_Movement_FaceOriginalDirection waitmovement 0 release end -Route110_EventScript_1EF2EC:: @ 81EF2EC +Route110_EventScript_AquaGrunt4:: @ 81EF2EC lock faceplayer - msgbox Route110_Text_1EFC0D, MSGBOX_DEFAULT + msgbox Route110_Text_AquaActionsBringSmiles, MSGBOX_DEFAULT applymovement VAR_LAST_TALKED, Common_Movement_FaceOriginalDirection waitmovement 0 release end -Route110_EventScript_1EF302:: @ 81EF302 - msgbox Route110_Text_1EFFC3, MSGBOX_NPC +Route110_EventScript_Boy1:: @ 81EF302 + msgbox Route110_Text_RideBikeAtFullSpeed, MSGBOX_NPC end -Route110_EventScript_1EF30B:: @ 81EF30B - msgbox Route110_Text_1F0006, MSGBOX_NPC +Route110_EventScript_CyclingGirl1:: @ 81EF30B + msgbox Route110_Text_HairStreamsBehindMe, MSGBOX_NPC end -Route110_EventScript_1EF314:: @ 81EF314 - msgbox Route110_Text_1F006A, MSGBOX_NPC +Route110_EventScript_CyclingGuy1:: @ 81EF314 + msgbox Route110_Text_YouGotBikeFromRydel, MSGBOX_NPC end -Route110_EventScript_1EF31D:: @ 81EF31D - msgbox Route110_Text_1F0261, MSGBOX_NPC +Route110_EventScript_OldMan:: @ 81EF31D + msgbox Route110_Text_TwoRoads, MSGBOX_NPC end -Route110_EventScript_1EF326:: @ 81EF326 - msgbox Route110_Text_1F02CA, MSGBOX_NPC +Route110_EventScript_OldWoman:: @ 81EF326 + msgbox Route110_Text_WalkOnTheLowRoad, MSGBOX_NPC end -Route110_EventScript_1EF32F:: @ 81EF32F - msgbox Route110_Text_1F030E, MSGBOX_NPC +Route110_EventScript_CyclingGuy2:: @ 81EF32F + msgbox Route110_Text_BikeTechniques, MSGBOX_NPC end -Route110_EventScript_1EF338:: @ 81EF338 - msgbox Route110_Text_1F0390, MSGBOX_NPC +Route110_EventScript_Boy2:: @ 81EF338 + msgbox Route110_Text_WhichShouldIChoose, MSGBOX_NPC end -Route110_EventScript_1EF341:: @ 81EF341 - msgbox Route110_Text_1F0812, MSGBOX_SIGN +Route110_EventScript_SlateportCitySign:: @ 81EF341 + msgbox Route110_Text_SlateportCitySign, MSGBOX_SIGN end -Route110_EventScript_1EF34A:: @ 81EF34A - msgbox Route110_Text_1F082D, MSGBOX_SIGN +Route110_EventScript_CyclingRoadSign:: @ 81EF34A + msgbox Route110_Text_CyclingRoadSign, MSGBOX_SIGN end -Route110_EventScript_1EF353:: @ 81EF353 - msgbox Route110_Text_1F0842, MSGBOX_SIGN +Route110_EventScript_VandalizedSign:: @ 81EF353 + msgbox Route110_Text_AquaWasHere, MSGBOX_SIGN end -Route110_EventScript_1EF35C:: @ 81EF35C - msgbox Route110_Text_1F08CD, MSGBOX_SIGN +Route110_EventScript_Route103Sign:: @ 81EF35C + msgbox Route110_Text_Route103Sign, MSGBOX_SIGN end -Route110_EventScript_1EF365:: @ 81EF365 - msgbox Route110_Text_1F08E3, MSGBOX_SIGN +Route110_EventScript_SeasideParkingSign:: @ 81EF365 + msgbox Route110_Text_SeasideParkingSign, MSGBOX_SIGN end -Route110_EventScript_1EF36E:: @ 81EF36E - msgbox Route110_Text_1F08F3, MSGBOX_SIGN +Route110_EventScript_MauvilleCitySign:: @ 81EF36E + msgbox Route110_Text_MauvilleCitySign, MSGBOX_SIGN end -Route110_EventScript_1EF377:: @ 81EF377 - msgbox Route110_Text_1F090D, MSGBOX_SIGN +Route110_EventScript_TrainerTipsPrlzSleep:: @ 81EF377 + msgbox Route110_Text_TrainerTipsPrlzSleep, MSGBOX_SIGN end -Route110_EventScript_1EF380:: @ 81EF380 - msgbox Route110_Text_1F0992, MSGBOX_SIGN +Route110_EventScript_TrainerTipsRegisterItems:: @ 81EF380 + msgbox Route110_Text_TrainerTipsRegisterItems, MSGBOX_SIGN end -Route110_EventScript_1EF389:: @ 81EF389 - msgbox Route110_Text_1F09DB, MSGBOX_SIGN +Route110_EventScript_TrickHouseSign:: @ 81EF389 + msgbox Route110_Text_TrickHouseSign, MSGBOX_SIGN end -Route110_EventScript_1EF392:: @ 81EF392 +Route110_EventScript_CyclingRoadResultsSign:: @ 81EF392 lockall specialvar VAR_RESULT, GetRecordedCyclingRoadResults - compare VAR_RESULT, 0 - goto_if_eq Route110_EventScript_1EF3AD - msgbox Route110_Text_1F0A1E, MSGBOX_DEFAULT + compare VAR_RESULT, FALSE + goto_if_eq Route110_EventScript_NoRecordSet + msgbox Route110_Text_BestRecord, MSGBOX_DEFAULT releaseall end -Route110_EventScript_1EF3AD:: @ 81EF3AD - msgbox Route110_Text_1F0A5E, MSGBOX_DEFAULT +Route110_EventScript_NoRecordSet:: @ 81EF3AD + msgbox Route110_Text_ThereIsNoRecord, MSGBOX_DEFAULT releaseall end -Route110_EventScript_1EF3B7:: @ 81EF3B7 +Route110_EventScript_ChallengeGuy:: @ 81EF3B7 lock faceplayer specialvar VAR_RESULT, GetPlayerAvatarBike compare VAR_RESULT, 1 - goto_if_eq Route110_EventScript_1EF3E8 + goto_if_eq Route110_EventScript_PlayerRidingAcroBike compare VAR_CYCLING_CHALLENGE_STATE, 0 - goto_if_eq Route110_EventScript_1EF3DE - msgbox Route110_Text_1F06FB, MSGBOX_DEFAULT + goto_if_eq Route110_EventScript_PlayerNotRidingBike + msgbox Route110_Text_AlwaysAimHigher, MSGBOX_DEFAULT release end -Route110_EventScript_1EF3DE:: @ 81EF3DE - msgbox Route110_Text_1F0661, MSGBOX_DEFAULT +Route110_EventScript_PlayerNotRidingBike:: @ 81EF3DE + msgbox Route110_Text_RatedForNumberOfCollisions, MSGBOX_DEFAULT release end -Route110_EventScript_1EF3E8:: @ 81EF3E8 - msgbox Route110_Text_1F0755, MSGBOX_DEFAULT +Route110_EventScript_PlayerRidingAcroBike:: @ 81EF3E8 + msgbox Route110_Text_AcroBikesDoNotQualify, MSGBOX_DEFAULT release end -Route110_EventScript_1EF3F2:: @ 81EF3F2 - trainerbattle_single TRAINER_EDWARD, Route110_Text_29802B, Route110_Text_298064 - msgbox Route110_Text_29808A, MSGBOX_AUTOCLOSE +Route110_EventScript_Edward:: @ 81EF3F2 + trainerbattle_single TRAINER_EDWARD, Route110_Text_EdwardIntro, Route110_Text_EdwardDefeated + msgbox Route110_Text_EdwardPostBattle, MSGBOX_AUTOCLOSE end -Route110_EventScript_1EF409:: @ 81EF409 - trainerbattle_single TRAINER_JACLYN, Route110_Text_2980B9, Route110_Text_2980E5 - msgbox Route110_Text_2980F8, MSGBOX_AUTOCLOSE +Route110_EventScript_Jaclyn:: @ 81EF409 + trainerbattle_single TRAINER_JACLYN, Route110_Text_JaclynIntro, Route110_Text_JaclynDefeated + msgbox Route110_Text_JaclynPostBattle, MSGBOX_AUTOCLOSE end -Route110_EventScript_1EF420:: @ 81EF420 - trainerbattle_single TRAINER_EDWIN_1, Route110_Text_29815E, Route110_Text_29818F, Route110_EventScript_1EF44C +Route110_EventScript_Edwin:: @ 81EF420 + trainerbattle_single TRAINER_EDWIN_1, Route110_Text_EdwinIntro, Route110_Text_EdwinDefeated, Route110_EventScript_EdwinRegisterMatchCallAfterBattle specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, 1 - goto_if_eq Route110_EventScript_1EF46B - msgbox Route110_Text_2981B3, MSGBOX_DEFAULT + compare VAR_RESULT, TRUE + goto_if_eq Route110_EventScript_EdwinRematch + msgbox Route110_Text_EdwinPostBattle, MSGBOX_DEFAULT release end -Route110_EventScript_1EF44C:: @ 81EF44C +Route110_EventScript_EdwinRegisterMatchCallAfterBattle:: @ 81EF44C special sub_80B4808 waitmovement 0 - msgbox Route110_Text_298201, MSGBOX_DEFAULT + msgbox Route110_Text_EdwinRegister, MSGBOX_DEFAULT register_matchcall TRAINER_EDWIN_1 release end -Route110_EventScript_1EF46B:: @ 81EF46B - trainerbattle_rematch TRAINER_EDWIN_1, Route110_Text_298232, Route110_Text_298288 - msgbox Route110_Text_2982A2, MSGBOX_AUTOCLOSE +Route110_EventScript_EdwinRematch:: @ 81EF46B + trainerbattle_rematch TRAINER_EDWIN_1, Route110_Text_EdwinRematchIntro, Route110_Text_EdwinRematchDefeated + msgbox Route110_Text_EdwinRematchPostBattle, MSGBOX_AUTOCLOSE end -Route110_EventScript_1EF482:: @ 81EF482 - trainerbattle_single TRAINER_DALE, Route110_Text_2982CC, Route110_Text_2982F5 - msgbox Route110_Text_298303, MSGBOX_AUTOCLOSE +Route110_EventScript_Dale:: @ 81EF482 + trainerbattle_single TRAINER_DALE, Route110_Text_DaleIntro, Route110_Text_DaleDefeated + msgbox Route110_Text_DalePostBattle, MSGBOX_AUTOCLOSE end -Route110_EventScript_1EF499:: @ 81EF499 - trainerbattle_single TRAINER_JACOB, Route110_Text_297B3F, Route110_Text_297B77 - msgbox Route110_Text_297B8F, MSGBOX_AUTOCLOSE +Route110_EventScript_Jacob:: @ 81EF499 + trainerbattle_single TRAINER_JACOB, Route110_Text_JacobIntro, Route110_Text_JacobDefeated + msgbox Route110_Text_JacobPostBattle, MSGBOX_AUTOCLOSE end -Route110_EventScript_1EF4B0:: @ 81EF4B0 - trainerbattle_single TRAINER_ANTHONY, Route110_Text_297BE7, Route110_Text_297C0F - msgbox Route110_Text_297C1F, MSGBOX_AUTOCLOSE +Route110_EventScript_Anthony:: @ 81EF4B0 + trainerbattle_single TRAINER_ANTHONY, Route110_Text_AnthonyIntro, Route110_Text_AnthonyDefeated + msgbox Route110_Text_AnthonyPostBattle, MSGBOX_AUTOCLOSE end -Route110_EventScript_1EF4C7:: @ 81EF4C7 - trainerbattle_single TRAINER_BENJAMIN_1, Route110_Text_297C63, Route110_Text_297C8A, Route110_EventScript_1EF4F3 +Route110_EventScript_Benjamin:: @ 81EF4C7 + trainerbattle_single TRAINER_BENJAMIN_1, Route110_Text_BenjaminIntro, Route110_Text_BenjaminDefeated, Route110_EventScript_BenjaminRegisterMatchCallAfterBattle specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, 1 - goto_if_eq Route110_EventScript_1EF512 - msgbox Route110_Text_297CB4, MSGBOX_DEFAULT + compare VAR_RESULT, TRUE + goto_if_eq Route110_EventScript_BenjaminRematch + msgbox Route110_Text_BenjaminPostBattle, MSGBOX_DEFAULT release end -Route110_EventScript_1EF4F3:: @ 81EF4F3 +Route110_EventScript_BenjaminRegisterMatchCallAfterBattle:: @ 81EF4F3 special sub_80B4808 waitmovement 0 - msgbox Route110_Text_297CFE, MSGBOX_DEFAULT + msgbox Route110_Text_BenjaminRegister, MSGBOX_DEFAULT register_matchcall TRAINER_BENJAMIN_1 release end -Route110_EventScript_1EF512:: @ 81EF512 - trainerbattle_rematch TRAINER_BENJAMIN_1, Route110_Text_297D4B, Route110_Text_297D8E - msgbox Route110_Text_297DB0, MSGBOX_AUTOCLOSE +Route110_EventScript_BenjaminRematch:: @ 81EF512 + trainerbattle_rematch TRAINER_BENJAMIN_1, Route110_Text_BenjaminRematchIntro, Route110_Text_BenjaminRematchDefeated + msgbox Route110_Text_BenjaminRematchPostBattle, MSGBOX_AUTOCLOSE end -Route110_EventScript_1EF529:: @ 81EF529 - trainerbattle_single TRAINER_JASMINE, Route110_Text_297F93, Route110_Text_297FD0 - msgbox Route110_Text_297FF1, MSGBOX_AUTOCLOSE +Route110_EventScript_Jasmine:: @ 81EF529 + trainerbattle_single TRAINER_JASMINE, Route110_Text_JasmineIntro, Route110_Text_JasmineDefeated + msgbox Route110_Text_JasminePostBattle, MSGBOX_AUTOCLOSE end -Route110_EventScript_1EF540:: @ 81EF540 - trainerbattle_single TRAINER_ABIGAIL_1, Route110_Text_297DFA, Route110_Text_297E69, Route110_EventScript_1EF56C +Route110_EventScript_Abigail:: @ 81EF540 + trainerbattle_single TRAINER_ABIGAIL_1, Route110_Text_AbigailIntro, Route110_Text_AbigailDefeated, Route110_EventScript_AbigailRegisterMatchCallAfterBattle specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, 1 - goto_if_eq Route110_EventScript_1EF58B - msgbox Route110_Text_297E88, MSGBOX_DEFAULT + compare VAR_RESULT, TRUE + goto_if_eq Route110_EventScript_AbigailRematch + msgbox Route110_Text_AbigailPostBattle, MSGBOX_DEFAULT release end -Route110_EventScript_1EF56C:: @ 81EF56C +Route110_EventScript_AbigailRegisterMatchCallAfterBattle:: @ 81EF56C special sub_80B4808 waitmovement 0 - msgbox Route110_Text_297ECD, MSGBOX_DEFAULT + msgbox Route110_Text_AbigailRegister, MSGBOX_DEFAULT register_matchcall TRAINER_ABIGAIL_1 release end -Route110_EventScript_1EF58B:: @ 81EF58B - trainerbattle_rematch TRAINER_ABIGAIL_1, Route110_Text_297F09, Route110_Text_297F37 - msgbox Route110_Text_297F58, MSGBOX_AUTOCLOSE +Route110_EventScript_AbigailRematch:: @ 81EF58B + trainerbattle_rematch TRAINER_ABIGAIL_1, Route110_Text_AbigailRematchIntro, Route110_Text_AbigailRematchDefeated + msgbox Route110_Text_AbigailRematchPostBattle, MSGBOX_AUTOCLOSE end -Route110_EventScript_1EF5A2:: @ 81EF5A2 - trainerbattle_single TRAINER_ISABEL_1, Route110_Text_298349, Route110_Text_298389, Route110_EventScript_1EF5CE +Route110_EventScript_Isabel:: @ 81EF5A2 + trainerbattle_single TRAINER_ISABEL_1, Route110_Text_IsabelIntro, Route110_Text_IsabelDefeated, Route110_EventScript_IsabelRegisterMatchCallAfterBattle specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, 1 - goto_if_eq Route110_EventScript_1EF5ED - msgbox Route110_Text_2983A2, MSGBOX_DEFAULT + compare VAR_RESULT, TRUE + goto_if_eq Route110_EventScript_IsabelRematch + msgbox Route110_Text_IsabelPostBattle, MSGBOX_DEFAULT release end -Route110_EventScript_1EF5CE:: @ 81EF5CE +Route110_EventScript_IsabelRegisterMatchCallAfterBattle:: @ 81EF5CE special sub_80B4808 waitmovement 0 - msgbox Route110_Text_2983EE, MSGBOX_DEFAULT + msgbox Route110_Text_IsabelRegister, MSGBOX_DEFAULT register_matchcall TRAINER_ISABEL_1 release end -Route110_EventScript_1EF5ED:: @ 81EF5ED - trainerbattle_rematch TRAINER_ISABEL_1, Route110_Text_298466, Route110_Text_2984AF - msgbox Route110_Text_2984C8, MSGBOX_AUTOCLOSE +Route110_EventScript_IsabelRematch:: @ 81EF5ED + trainerbattle_rematch TRAINER_ISABEL_1, Route110_Text_IsabelRematchIntro, Route110_Text_IsabelRematchDefeated + msgbox Route110_Text_IsabelRematchPostBattle, MSGBOX_AUTOCLOSE end -Route110_EventScript_1EF604:: @ 81EF604 - trainerbattle_single TRAINER_TIMMY, Route110_Text_298525, Route110_Text_298559 - msgbox Route110_Text_298579, MSGBOX_AUTOCLOSE +Route110_EventScript_Timmy:: @ 81EF604 + trainerbattle_single TRAINER_TIMMY, Route110_Text_TimmyIntro, Route110_Text_TimmyDefeated + msgbox Route110_Text_TimmyPostBattle, MSGBOX_AUTOCLOSE end -Route110_EventScript_1EF61B:: @ 81EF61B +Route110_EventScript_Unused:: @ 81EF61B end -Route110_EventScript_1EF61C:: @ 81EF61C - trainerbattle_single TRAINER_KALEB, Route110_Text_2986ED, Route110_Text_298735 - msgbox Route110_Text_298755, MSGBOX_AUTOCLOSE +Route110_EventScript_Kaleb:: @ 81EF61C + trainerbattle_single TRAINER_KALEB, Route110_Text_KalebIntro, Route110_Text_KalebDefeated + msgbox Route110_Text_KalebPostBattle, MSGBOX_AUTOCLOSE end -Route110_EventScript_1EF633:: @ 81EF633 - trainerbattle_single TRAINER_JOSEPH, Route110_Text_298642, Route110_Text_298686 - msgbox Route110_Text_2986A9, MSGBOX_AUTOCLOSE +Route110_EventScript_Joseph:: @ 81EF633 + trainerbattle_single TRAINER_JOSEPH, Route110_Text_JosephIntro, Route110_Text_JosephDefeated + msgbox Route110_Text_JosephPostBattle, MSGBOX_AUTOCLOSE end -Route110_EventScript_1EF64A:: @ 81EF64A - trainerbattle_single TRAINER_ALYSSA, Route110_Text_2985AB, Route110_Text_2985F9 - msgbox Route110_Text_298612, MSGBOX_AUTOCLOSE +Route110_EventScript_Alyssa:: @ 81EF64A + trainerbattle_single TRAINER_ALYSSA, Route110_Text_AlyssaIntro, Route110_Text_AlyssaDefeated + msgbox Route110_Text_AlyssaPostBattle, MSGBOX_AUTOCLOSE end -Route110_EventScript_1EF661:: @ 81EF661 +Route110_EventScript_CyclingChallengeEnd:: @ 81EF661 lockall applymovement 21, Common_Movement_WalkInPlaceFastestRight waitmovement 0 @@ -315,74 +315,74 @@ Route110_EventScript_1EF661:: @ 81EF661 Route110_EventScript_1EF673:: @ 81EF673 special FinishCyclingRoadChallenge - msgbox Route110_Text_1F03FF, MSGBOX_DEFAULT + msgbox Route110_Text_CyclingChallengeResultSummary, MSGBOX_DEFAULT switch VAR_RESULT - case 10, Route110_EventScript_1EF6FD - case 9, Route110_EventScript_1EF70B - case 8, Route110_EventScript_1EF70B - case 7, Route110_EventScript_1EF70B - case 6, Route110_EventScript_1EF719 - case 5, Route110_EventScript_1EF719 - case 4, Route110_EventScript_1EF719 - case 3, Route110_EventScript_1EF727 - case 2, Route110_EventScript_1EF727 - case 1, Route110_EventScript_1EF727 - case 0, Route110_EventScript_1EF735 + case 10, Route110_EventScript_ChallengeReactionBest + case 9, Route110_EventScript_ChallengeReactionGood + case 8, Route110_EventScript_ChallengeReactionGood + case 7, Route110_EventScript_ChallengeReactionGood + case 6, Route110_EventScript_ChallengeReactionOk + case 5, Route110_EventScript_ChallengeReactionOk + case 4, Route110_EventScript_ChallengeReactionOk + case 3, Route110_EventScript_ChallengeReactionBad + case 2, Route110_EventScript_ChallengeReactionBad + case 1, Route110_EventScript_ChallengeReactionBad + case 0, Route110_EventScript_ChallengeReactionWorst end -Route110_EventScript_1EF6FD:: @ 81EF6FD - msgbox Route110_Text_1F0431, MSGBOX_DEFAULT - goto Route110_EventScript_1EF743 +Route110_EventScript_ChallengeReactionBest:: @ 81EF6FD + msgbox Route110_Text_ChallengeReactionBest, MSGBOX_DEFAULT + goto Route110_EventScript_EndChallenge end -Route110_EventScript_1EF70B:: @ 81EF70B - msgbox Route110_Text_1F04A4, MSGBOX_DEFAULT - goto Route110_EventScript_1EF743 +Route110_EventScript_ChallengeReactionGood:: @ 81EF70B + msgbox Route110_Text_ChallengeReactionGood, MSGBOX_DEFAULT + goto Route110_EventScript_EndChallenge end -Route110_EventScript_1EF719:: @ 81EF719 - msgbox Route110_Text_1F0500, MSGBOX_DEFAULT - goto Route110_EventScript_1EF743 +Route110_EventScript_ChallengeReactionOk:: @ 81EF719 + msgbox Route110_Text_ChallengeReactionOk, MSGBOX_DEFAULT + goto Route110_EventScript_EndChallenge end -Route110_EventScript_1EF727:: @ 81EF727 - msgbox Route110_Text_1F0567, MSGBOX_DEFAULT - goto Route110_EventScript_1EF743 +Route110_EventScript_ChallengeReactionBad:: @ 81EF727 + msgbox Route110_Text_ChallengeReactionBad, MSGBOX_DEFAULT + goto Route110_EventScript_EndChallenge end -Route110_EventScript_1EF735:: @ 81EF735 - msgbox Route110_Text_1F05CE, MSGBOX_DEFAULT - goto Route110_EventScript_1EF743 +Route110_EventScript_ChallengeReactionWorst:: @ 81EF735 + msgbox Route110_Text_ChallengeReactionWorst, MSGBOX_DEFAULT + goto Route110_EventScript_EndChallenge end -Route110_EventScript_1EF743:: @ 81EF743 +Route110_EventScript_EndChallenge:: @ 81EF743 setvar VAR_CYCLING_CHALLENGE_STATE, 3 savebgm MUS_DUMMY fadedefaultbgm return -Route110_EventScript_1EF74D:: @ 81EF74D +Route110_EventScript_RivalTrigger1:: @ 81EF74D setvar VAR_0x8008, 1 - goto Route110_EventScript_1EF76E + goto Route110_EventScript_RivalScene end -Route110_EventScript_1EF758:: @ 81EF758 +Route110_EventScript_RivalTrigger2:: @ 81EF758 setvar VAR_0x8008, 2 - goto Route110_EventScript_1EF76E + goto Route110_EventScript_RivalScene end -Route110_EventScript_1EF763:: @ 81EF763 +Route110_EventScript_RivalTrigger3:: @ 81EF763 setvar VAR_0x8008, 3 - goto Route110_EventScript_1EF76E + goto Route110_EventScript_RivalScene end -Route110_EventScript_1EF76E:: @ 81EF76E +Route110_EventScript_RivalScene:: @ 81EF76E lockall checkplayergender compare VAR_RESULT, MALE - call_if_eq Route110_EventScript_1EF7E1 + call_if_eq Route110_EventScript_PlayMayMusic compare VAR_RESULT, FEMALE - call_if_eq Route110_EventScript_1EF7E6 + call_if_eq Route110_EventScript_PlayBrendanMusic applymovement 28, Common_Movement_WalkInPlaceFastestDown waitmovement 0 applymovement 28, Common_Movement_ExclamationMark @@ -391,110 +391,110 @@ Route110_EventScript_1EF76E:: @ 81EF76E waitmovement 0 delay 30 compare VAR_0x8008, 1 - call_if_eq Route110_EventScript_1EF94E + call_if_eq Route110_EventScript_RivalApproachPlayer1 compare VAR_0x8008, 2 - call_if_eq Route110_EventScript_1EF959 + call_if_eq Route110_EventScript_RivalApproachPlayer2 compare VAR_0x8008, 3 - call_if_eq Route110_EventScript_1EF964 + call_if_eq Route110_EventScript_RivalApproachPlayer3 checkplayergender compare VAR_RESULT, MALE - goto_if_eq Route110_EventScript_1EF7EB + goto_if_eq Route110_EventScript_MayBattle compare VAR_RESULT, FEMALE - goto_if_eq Route110_EventScript_1EF865 + goto_if_eq Route110_EventScript_BrendanBattle releaseall end -Route110_EventScript_1EF7E1:: @ 81EF7E1 +Route110_EventScript_PlayMayMusic:: @ 81EF7E1 playbgm MUS_GIRL_SUP, 1 return -Route110_EventScript_1EF7E6:: @ 81EF7E6 +Route110_EventScript_PlayBrendanMusic:: @ 81EF7E6 playbgm MUS_BOY_SUP, 1 return -Route110_EventScript_1EF7EB:: @ 81EF7EB - msgbox Route110_Text_1EFC48, MSGBOX_DEFAULT +Route110_EventScript_MayBattle:: @ 81EF7EB + msgbox Route110_Text_MayLetsBattle, MSGBOX_DEFAULT switch VAR_STARTER_MON - case 0, Route110_EventScript_1EF81A - case 1, Route110_EventScript_1EF82A - case 2, Route110_EventScript_1EF83A + case 0, Route110_EventScript_MayBattleTreecko + case 1, Route110_EventScript_MayBattleTorchic + case 2, Route110_EventScript_MayBattleMudkip end -Route110_EventScript_1EF81A:: @ 81EF81A - trainerbattle_no_intro TRAINER_MAY_5, Route110_Text_1EFCCB - goto Route110_EventScript_1EF84A +Route110_EventScript_MayBattleTreecko:: @ 81EF81A + trainerbattle_no_intro TRAINER_MAY_5, Route110_Text_MayDefeated + goto Route110_EventScript_MayDefeated end -Route110_EventScript_1EF82A:: @ 81EF82A - trainerbattle_no_intro TRAINER_MAY_8, Route110_Text_1EFCCB - goto Route110_EventScript_1EF84A +Route110_EventScript_MayBattleTorchic:: @ 81EF82A + trainerbattle_no_intro TRAINER_MAY_8, Route110_Text_MayDefeated + goto Route110_EventScript_MayDefeated end -Route110_EventScript_1EF83A:: @ 81EF83A - trainerbattle_no_intro TRAINER_MAY_2, Route110_Text_1EFCCB - goto Route110_EventScript_1EF84A +Route110_EventScript_MayBattleMudkip:: @ 81EF83A + trainerbattle_no_intro TRAINER_MAY_2, Route110_Text_MayDefeated + goto Route110_EventScript_MayDefeated end -Route110_EventScript_1EF84A:: @ 81EF84A - msgbox Route110_Text_1EFCF1, MSGBOX_DEFAULT - call Route110_EventScript_1EF8DF - msgbox Route110_Text_1EFD58, MSGBOX_DEFAULT - goto Route110_EventScript_1EF8EC +Route110_EventScript_MayDefeated:: @ 81EF84A + msgbox Route110_Text_MayTakeThis, MSGBOX_DEFAULT + call Route110_EventScript_GiveItemfinder + msgbox Route110_Text_MayExplainItemfinder, MSGBOX_DEFAULT + goto Route110_EventScript_RivalExit end -Route110_EventScript_1EF865:: @ 81EF865 - msgbox Route110_Text_1EFE3F, MSGBOX_DEFAULT +Route110_EventScript_BrendanBattle:: @ 81EF865 + msgbox Route110_Text_BrendayLetsBattle, MSGBOX_DEFAULT switch VAR_STARTER_MON - case 0, Route110_EventScript_1EF894 - case 1, Route110_EventScript_1EF8A4 - case 2, Route110_EventScript_1EF8B4 + case 0, Route110_EventScript_BrendanBattleTreecko + case 1, Route110_EventScript_BrendanBattleTorchic + case 2, Route110_EventScript_BrendanBattleMudkip end -Route110_EventScript_1EF894:: @ 81EF894 - trainerbattle_no_intro TRAINER_BRENDAN_5, Route110_Text_1EFEB4 - goto Route110_EventScript_1EF8C4 +Route110_EventScript_BrendanBattleTreecko:: @ 81EF894 + trainerbattle_no_intro TRAINER_BRENDAN_5, Route110_Text_BrendanDefeated + goto Route110_EventScript_BrendanDefeated end -Route110_EventScript_1EF8A4:: @ 81EF8A4 - trainerbattle_no_intro TRAINER_BRENDAN_8, Route110_Text_1EFEB4 - goto Route110_EventScript_1EF8C4 +Route110_EventScript_BrendanBattleTorchic:: @ 81EF8A4 + trainerbattle_no_intro TRAINER_BRENDAN_8, Route110_Text_BrendanDefeated + goto Route110_EventScript_BrendanDefeated end -Route110_EventScript_1EF8B4:: @ 81EF8B4 - trainerbattle_no_intro TRAINER_BRENDAN_2, Route110_Text_1EFEB4 - goto Route110_EventScript_1EF8C4 +Route110_EventScript_BrendanBattleMudkip:: @ 81EF8B4 + trainerbattle_no_intro TRAINER_BRENDAN_2, Route110_Text_BrendanDefeated + goto Route110_EventScript_BrendanDefeated end -Route110_EventScript_1EF8C4:: @ 81EF8C4 - msgbox Route110_Text_1EFECD, MSGBOX_DEFAULT - call Route110_EventScript_1EF8DF - msgbox Route110_Text_1EFF1C, MSGBOX_DEFAULT - goto Route110_EventScript_1EF8EC +Route110_EventScript_BrendanDefeated:: @ 81EF8C4 + msgbox Route110_Text_BrendanTakeThis, MSGBOX_DEFAULT + call Route110_EventScript_GiveItemfinder + msgbox Route110_Text_BrendanExplainItemfinder, MSGBOX_DEFAULT + goto Route110_EventScript_RivalExit end -Route110_EventScript_1EF8DF:: @ 81EF8DF +Route110_EventScript_GiveItemfinder:: @ 81EF8DF giveitem_std ITEM_ITEMFINDER return -Route110_EventScript_1EF8EC:: @ 81EF8EC +Route110_EventScript_RivalExit:: @ 81EF8EC closemessage compare VAR_0x8008, 1 - call_if_eq Route110_EventScript_1EF990 + call_if_eq Route110_EventScript_MoveRival1 compare VAR_0x8008, 2 - call_if_eq Route110_EventScript_1EF998 + call_if_eq Route110_EventScript_MoveRival2 compare VAR_0x8008, 3 - call_if_eq Route110_EventScript_1EF9A0 + call_if_eq Route110_EventScript_MoveRival3 setobjectmovementtype 28, MOVEMENT_TYPE_FACE_RIGHT setobjectmovementtype 29, MOVEMENT_TYPE_FACE_RIGHT removeobject 28 addobject 29 delay 45 compare VAR_0x8008, 1 - call_if_eq Route110_EventScript_1EF96F + call_if_eq Route110_EventScript_RivalExit1 compare VAR_0x8008, 2 - call_if_eq Route110_EventScript_1EF97A + call_if_eq Route110_EventScript_RivalExit2 compare VAR_0x8008, 3 - call_if_eq Route110_EventScript_1EF985 + call_if_eq Route110_EventScript_RivalExit3 removeobject 29 setvar VAR_ROUTE110_STATE, 1 savebgm MUS_DUMMY @@ -502,65 +502,65 @@ Route110_EventScript_1EF8EC:: @ 81EF8EC releaseall end -Route110_EventScript_1EF94E:: @ 81EF94E - applymovement 28, Route110_Movement_1EF9A8 +Route110_EventScript_RivalApproachPlayer1:: @ 81EF94E + applymovement 28, Route110_Movement_RivalApproachPlayer1 waitmovement 0 return -Route110_EventScript_1EF959:: @ 81EF959 - applymovement 28, Route110_Movement_1EF9AC +Route110_EventScript_RivalApproachPlayer2:: @ 81EF959 + applymovement 28, Route110_Movement_RivalApproachPlayer2 waitmovement 0 return -Route110_EventScript_1EF964:: @ 81EF964 - applymovement 28, Route110_Movement_1EF9AE +Route110_EventScript_RivalApproachPlayer3:: @ 81EF964 + applymovement 28, Route110_Movement_RivalApproachPlayer3 waitmovement 0 return -Route110_EventScript_1EF96F:: @ 81EF96F - applymovement 29, Route110_Movement_1EF9B2 +Route110_EventScript_RivalExit1:: @ 81EF96F + applymovement 29, Route110_Movement_RivalExit1 waitmovement 0 return -Route110_EventScript_1EF97A:: @ 81EF97A - applymovement 29, Route110_Movement_1EF9BA +Route110_EventScript_RivalExit2:: @ 81EF97A + applymovement 29, Route110_Movement_RivalExit2 waitmovement 0 return -Route110_EventScript_1EF985:: @ 81EF985 - applymovement 29, Route110_Movement_1EF9C3 +Route110_EventScript_RivalExit3:: @ 81EF985 + applymovement 29, Route110_Movement_RivalExit3 waitmovement 0 return -Route110_EventScript_1EF990:: @ 81EF990 +Route110_EventScript_MoveRival1:: @ 81EF990 setobjectxyperm 29, 33, 55 return -Route110_EventScript_1EF998:: @ 81EF998 +Route110_EventScript_MoveRival2:: @ 81EF998 setobjectxyperm 29, 34, 55 return -Route110_EventScript_1EF9A0:: @ 81EF9A0 +Route110_EventScript_MoveRival3:: @ 81EF9A0 setobjectxyperm 29, 35, 55 return -Route110_Movement_1EF9A8: @ 81EF9A8 +Route110_Movement_RivalApproachPlayer1: @ 81EF9A8 walk_down walk_left walk_in_place_fastest_down step_end -Route110_Movement_1EF9AC: @ 81EF9AC +Route110_Movement_RivalApproachPlayer2: @ 81EF9AC walk_down step_end -Route110_Movement_1EF9AE: @ 81EF9AE +Route110_Movement_RivalApproachPlayer3: @ 81EF9AE walk_down walk_right walk_in_place_fastest_down step_end -Route110_Movement_1EF9B2: @ 81EF9B2 +Route110_Movement_RivalExit1: @ 81EF9B2 walk_fast_up walk_fast_up walk_fast_up @@ -570,7 +570,7 @@ Route110_Movement_1EF9B2: @ 81EF9B2 walk_fast_up step_end -Route110_Movement_1EF9BA: @ 81EF9BA +Route110_Movement_RivalExit2: @ 81EF9BA walk_fast_up walk_fast_up walk_fast_up @@ -581,7 +581,7 @@ Route110_Movement_1EF9BA: @ 81EF9BA walk_fast_down step_end -Route110_Movement_1EF9C3: @ 81EF9C3 +Route110_Movement_RivalExit3: @ 81EF9C3 walk_fast_up walk_fast_up walk_fast_up @@ -591,29 +591,29 @@ Route110_Movement_1EF9C3: @ 81EF9C3 walk_fast_up step_end -Route110_EventScript_1EF9CB:: @ 81EF9CB +Route110_EventScript_BirchScene1:: @ 81EF9CB lockall setvar VAR_0x8008, 1 - goto Route110_EventScript_1EF9F7 + goto Route110_EventScript_BirchScene -Route110_EventScript_1EF9D6:: @ 81EF9D6 +Route110_EventScript_BirchScene2:: @ 81EF9D6 lockall setvar VAR_0x8008, 2 - goto Route110_EventScript_1EF9F7 + goto Route110_EventScript_BirchScene -Route110_EventScript_1EF9E1:: @ 81EF9E1 +Route110_EventScript_BirchScene3:: @ 81EF9E1 lockall setvar VAR_0x8008, 3 - goto Route110_EventScript_1EF9F7 + goto Route110_EventScript_BirchScene -Route110_EventScript_1EF9EC:: @ 81EF9EC +Route110_EventScript_BirchScene4:: @ 81EF9EC lockall setvar VAR_0x8008, 4 - goto Route110_EventScript_1EF9F7 + goto Route110_EventScript_BirchScene -Route110_EventScript_1EF9F7:: @ 81EF9F7 +Route110_EventScript_BirchScene:: @ 81EF9F7 addobject 36 - applymovement 36, Route110_Movement_1EFB30 + applymovement 36, Route110_Movement_BirchEntrance waitmovement 0 playse SE_PIN applymovement 36, Common_Movement_ExclamationMark @@ -621,14 +621,14 @@ Route110_EventScript_1EF9F7:: @ 81EF9F7 applymovement 36, Common_Movement_Delay48 waitmovement 0 compare VAR_0x8008, 1 - call_if_eq Route110_EventScript_1EFAD8 + call_if_eq Route110_EventScript_BirchApproachPlayer1 compare VAR_0x8008, 2 - call_if_eq Route110_EventScript_1EFAE3 + call_if_eq Route110_EventScript_BirchApproachPlayer2 compare VAR_0x8008, 3 - call_if_eq Route110_EventScript_1EFAEE + call_if_eq Route110_EventScript_BirchApproachPlayer3 compare VAR_0x8008, 4 - call_if_eq Route110_EventScript_1EFAF9 - msgbox Route110_Text_1F0AB5, MSGBOX_DEFAULT + call_if_eq Route110_EventScript_BirchApproachPlayer4 + msgbox Route110_Text_ImagineSeeingYouHere, MSGBOX_DEFAULT closemessage delay 20 applymovement 36, Common_Movement_WalkInPlaceFastestLeft @@ -640,101 +640,101 @@ Route110_EventScript_1EF9F7:: @ 81EF9F7 applymovement 36, Common_Movement_WalkInPlaceFastestDown waitmovement 0 delay 30 - msgbox Route110_Text_1F0AFF, MSGBOX_DEFAULT + msgbox Route110_Text_HeardYouInstallMatchCall, MSGBOX_DEFAULT closemessage delay 30 playfanfare MUS_ME_TORE_EYE - msgbox Route110_Text_1F0C0C, MSGBOX_DEFAULT + msgbox Route110_Text_RegisteredBirchInPokenav, MSGBOX_DEFAULT waitfanfare closemessage delay 30 setflag FLAG_ENABLE_PROF_BIRCH_MATCH_CALL - msgbox Route110_Text_1F0C33, MSGBOX_DEFAULT + msgbox Route110_Text_KeepAnEyeOutForRival, MSGBOX_DEFAULT closemessage compare VAR_0x8008, 1 - call_if_eq Route110_EventScript_1EFB04 + call_if_eq Route110_EventScript_BirchExit1 compare VAR_0x8008, 2 - call_if_eq Route110_EventScript_1EFB0F + call_if_eq Route110_EventScript_BirchExit2 compare VAR_0x8008, 3 - call_if_eq Route110_EventScript_1EFB1A + call_if_eq Route110_EventScript_BirchExit3 compare VAR_0x8008, 4 - call_if_eq Route110_EventScript_1EFB25 + call_if_eq Route110_EventScript_BirchExit4 removeobject 36 setvar VAR_REGISTER_BIRCH_STATE, 2 releaseall end -Route110_EventScript_1EFAD8:: @ 81EFAD8 - applymovement 36, Route110_Movement_1EFB34 +Route110_EventScript_BirchApproachPlayer1:: @ 81EFAD8 + applymovement 36, Route110_Movement_BirchApproachPlayer1 waitmovement 0 return -Route110_EventScript_1EFAE3:: @ 81EFAE3 - applymovement 36, Route110_Movement_1EFB39 +Route110_EventScript_BirchApproachPlayer2:: @ 81EFAE3 + applymovement 36, Route110_Movement_BirchApproachPlayer2 waitmovement 0 return -Route110_EventScript_1EFAEE:: @ 81EFAEE - applymovement 36, Route110_Movement_1EFB3D +Route110_EventScript_BirchApproachPlayer3:: @ 81EFAEE + applymovement 36, Route110_Movement_BirchApproachPlayer3 waitmovement 0 return -Route110_EventScript_1EFAF9:: @ 81EFAF9 - applymovement 36, Route110_Movement_1EFB40 +Route110_EventScript_BirchApproachPlayer4:: @ 81EFAF9 + applymovement 36, Route110_Movement_BirchApproachPlayer4 waitmovement 0 return -Route110_EventScript_1EFB04:: @ 81EFB04 - applymovement 36, Route110_Movement_1EFB44 +Route110_EventScript_BirchExit1:: @ 81EFB04 + applymovement 36, Route110_Movement_BirchExit1 waitmovement 0 return -Route110_EventScript_1EFB0F:: @ 81EFB0F - applymovement 36, Route110_Movement_1EFB4B +Route110_EventScript_BirchExit2:: @ 81EFB0F + applymovement 36, Route110_Movement_BirchExit2 waitmovement 0 return -Route110_EventScript_1EFB1A:: @ 81EFB1A - applymovement 36, Route110_Movement_1EFB51 +Route110_EventScript_BirchExit3:: @ 81EFB1A + applymovement 36, Route110_Movement_BirchExit3 waitmovement 0 return -Route110_EventScript_1EFB25:: @ 81EFB25 - applymovement 36, Route110_Movement_1EFB57 +Route110_EventScript_BirchExit4:: @ 81EFB25 + applymovement 36, Route110_Movement_BirchExit4 waitmovement 0 return -Route110_Movement_1EFB30: @ 81EFB30 +Route110_Movement_BirchEntrance: @ 81EFB30 walk_down walk_down walk_down step_end -Route110_Movement_1EFB34: @ 81EFB34 +Route110_Movement_BirchApproachPlayer1: @ 81EFB34 walk_down walk_left walk_left walk_down step_end -Route110_Movement_1EFB39: @ 81EFB39 +Route110_Movement_BirchApproachPlayer2: @ 81EFB39 walk_down walk_left walk_down step_end -Route110_Movement_1EFB3D: @ 81EFB3D +Route110_Movement_BirchApproachPlayer3: @ 81EFB3D walk_down walk_down step_end -Route110_Movement_1EFB40: @ 81EFB40 +Route110_Movement_BirchApproachPlayer4: @ 81EFB40 walk_down walk_right walk_down step_end -Route110_Movement_1EFB44: @ 81EFB44 +Route110_Movement_BirchExit1: @ 81EFB44 walk_up walk_up walk_right @@ -743,7 +743,7 @@ Route110_Movement_1EFB44: @ 81EFB44 walk_up step_end -Route110_Movement_1EFB4B: @ 81EFB4B +Route110_Movement_BirchExit2: @ 81EFB4B walk_up walk_up walk_up @@ -751,7 +751,7 @@ Route110_Movement_1EFB4B: @ 81EFB4B walk_up step_end -Route110_Movement_1EFB51: @ 81EFB51 +Route110_Movement_BirchExit3: @ 81EFB51 walk_up walk_up walk_up @@ -759,7 +759,7 @@ Route110_Movement_1EFB51: @ 81EFB51 walk_up step_end -Route110_Movement_1EFB57: @ 81EFB57 +Route110_Movement_BirchExit4: @ 81EFB57 walk_up walk_up walk_up @@ -767,40 +767,40 @@ Route110_Movement_1EFB57: @ 81EFB57 walk_up step_end -Route110_Text_1EFB5D: @ 81EFB5D +Route110_Text_WeCantTalkAboutAquaActivities: @ 81EFB5D .string "TEAM AQUA's activities…\n" .string "We can't talk about them yet.$" -Route110_Text_1EFB93: @ 81EFB93 +Route110_Text_KickUpARuckus: @ 81EFB93 .string "I want to get going to SLATEPORT and\n" .string "kick up a ruckus!$" -Route110_Text_1EFBCA: @ 81EFBCA +Route110_Text_MyFirstJobInAqua: @ 81EFBCA .string "This is my first job after joining\n" .string "TEAM AQUA. It's a little scary.$" -Route110_Text_1EFC0D: @ 81EFC0D +Route110_Text_AquaActionsBringSmiles: @ 81EFC0D .string "TEAM AQUA's actions should bring\n" .string "smiles to people's faces!$" -Route110_Text_1EFC48: @ 81EFC48 +Route110_Text_MayLetsBattle: @ 81EFC48 .string "MAY: Hi, {PLAYER}{KUN}, long time no see!\p" .string "While I was searching for other\n" .string "POKéMON, my POKéMON grew stronger.\p" .string "So…\n" .string "How about a little battle?$" -Route110_Text_1EFCCB: @ 81EFCCB +Route110_Text_MayDefeated: @ 81EFCCB .string "Yikes!\n" .string "You're better than I expected!$" -Route110_Text_1EFCF1: @ 81EFCF1 +Route110_Text_MayTakeThis: @ 81EFCF1 .string "MAY: {PLAYER}{KUN}, you've been busy\n" .string "training, too, haven't you?\p" .string "I think you deserve a reward!\n" .string "This is from me!$" -Route110_Text_1EFD58: @ 81EFD58 +Route110_Text_MayExplainItemfinder: @ 81EFD58 .string "MAY: That's an ITEMFINDER.\p" .string "Try it out. If there is an item that's\n" .string "not visible, it emits a sound.\p" @@ -809,24 +809,24 @@ Route110_Text_1EFD58: @ 81EFD58 .string "me, but I think you should train a lot\l" .string "harder for the next time.$" -Route110_Text_1EFE3F: @ 81EFE3F +Route110_Text_BrendayLetsBattle: @ 81EFE3F .string "BRENDAN: Hey, {PLAYER}.\n" .string "So this is where you were.\l" .string "How's it going?\p" .string "Have you been raising your POKéMON?\n" .string "I'll check for you.$" -Route110_Text_1EFEB4: @ 81EFEB4 +Route110_Text_BrendanDefeated: @ 81EFEB4 .string "Hmm…\n" .string "You're pretty good.$" -Route110_Text_1EFECD: @ 81EFECD +Route110_Text_BrendanTakeThis: @ 81EFECD .string "BRENDAN: {PLAYER}, you've trained\n" .string "without me noticing…\p" .string "Good enough!\n" .string "Here, take this.$" -Route110_Text_1EFF1C: @ 81EFF1C +Route110_Text_BrendanExplainItemfinder: @ 81EFF1C .string "BRENDAN: That's an ITEMFINDER.\p" .string "Use it to root around for items that\n" .string "aren't visible.\p" @@ -835,16 +835,16 @@ Route110_Text_1EFF1C: @ 81EFF1C .string "Anyway, I'm off to look for new\n" .string "POKéMON.$" -Route110_Text_1EFFC3: @ 81EFFC3 +Route110_Text_RideBikeAtFullSpeed: @ 81EFFC3 .string "Wouldn't it be great to ride a BIKE\n" .string "at full speed on CYCLING ROAD?$" -Route110_Text_1F0006: @ 81F0006 +Route110_Text_HairStreamsBehindMe: @ 81F0006 .string "How do you like the way my raven-\n" .string "colored hair streams behind me?\p" .string "I grew my hair out just for that.$" -Route110_Text_1F006A: @ 81F006A +Route110_Text_YouGotBikeFromRydel: @ 81F006A .string "Oh, hey, you got that BIKE from RYDEL!\p" .string "Oh, it's glaringly obvious.\n" .string "It says right on your bike…\p" @@ -861,139 +861,139 @@ Route110_Text_1F006A: @ 81F006A .string "You should ride it around all over\n" .string "the place--it's good advertising!$" -Route110_Text_1F0261: @ 81F0261 +Route110_Text_TwoRoads: @ 81F0261 .string "The two roads, one above, one below…\p" .string "A road each for people and POKéMON.\n" .string "Perhaps that is right and fair.$" -Route110_Text_1F02CA: @ 81F02CA +Route110_Text_WalkOnTheLowRoad: @ 81F02CA .string "I don't have a BIKE, so I'll take\n" .string "a leisurely walk on the low road.$" -Route110_Text_1F030E: @ 81F030E +Route110_Text_BikeTechniques: @ 81F030E .string "Learning techniques will make BIKE\n" .string "riding even more fun.\p" .string "There are some places that you can\n" .string "reach only by using a BIKE technique.$" -Route110_Text_1F0390: @ 81F0390 +Route110_Text_WhichShouldIChoose: @ 81F0390 .string "Which should I choose?\p" .string "Make a beeline for MAUVILLE on\n" .string "CYCLING ROAD, or take the low road\l" .string "and look for POKéMON?$" -Route110_Text_1F03FF: @ 81F03FF +Route110_Text_CyclingChallengeResultSummary: @ 81F03FF .string "Number of collisions:\n" .string "… … {STR_VAR_1}!\p" .string "Total time:\n" .string "… … {STR_VAR_2}!$" -Route110_Text_1F0431: @ 81F0431 +Route110_Text_ChallengeReactionBest: @ 81F0431 .string "Bravo! Splendid showing!\p" .string "Your love of cycling comes from deep\n" .string "within your heart.\l" .string "You've shaken me to my very soul!$" -Route110_Text_1F04A4: @ 81F04A4 +Route110_Text_ChallengeReactionGood: @ 81F04A4 .string "Your technique is remarkable.\p" .string "I suggest you speed up a bit while\n" .string "still avoiding collisions.$" -Route110_Text_1F0500: @ 81F0500 +Route110_Text_ChallengeReactionOk: @ 81F0500 .string "I would consider you a work in\n" .string "progress.\p" .string "Still, I hope you don't forget the\n" .string "sheer pleasure of cycling.$" -Route110_Text_1F0567: @ 81F0567 +Route110_Text_ChallengeReactionBad: @ 81F0567 .string "My word… Your cycling skills border\n" .string "on terrifying.\p" .string "Most certainly, you need much more\n" .string "practice riding.$" -Route110_Text_1F05CE: @ 81F05CE +Route110_Text_ChallengeReactionWorst: @ 81F05CE .string "…I am aghast…\p" .string "You're perhaps not cut out for this\n" .string "unfortunate cycling business.\p" .string "You ought to give serious thought to\n" .string "returning that BIKE to RYDEL.$" -Route110_Text_1F0661: @ 81F0661 +Route110_Text_RatedForNumberOfCollisions: @ 81F0661 .string "This is CYCLING ROAD.\p" .string "If you were to ride from MAUVILLE to\n" .string "SLATEPORT on a MACH BIKE, you would\l" .string "be rated for the number of collisions\l" .string "and your total time.$" -Route110_Text_1F06FB: @ 81F06FB +Route110_Text_AlwaysAimHigher: @ 81F06FB .string "Regardless of the results, I count on\n" .string "seeing more challenges from you.\l" .string "Always aim higher!$" -Route110_Text_1F0755: @ 81F0755 +Route110_Text_AcroBikesDoNotQualify: @ 81F0755 .string "On this CYCLING ROAD, those riding\n" .string "MACH BIKES are rated for their number\l" .string "of collisions and their total times.\p" .string "ACRO BIKES do not qualify for rating.\n" .string "They are easy to turn, so it's not fair.$" -Route110_Text_1F0812: @ 81F0812 +Route110_Text_SlateportCitySign: @ 81F0812 .string "ROUTE 110\n" .string "{DOWN_ARROW} SLATEPORT CITY$" -Route110_Text_1F082D: @ 81F082D +Route110_Text_CyclingRoadSign: @ 81F082D .string "SEASIDE CYCLING ROAD$" -Route110_Text_1F0842: @ 81F0842 +Route110_Text_AquaWasHere: @ 81F0842 .string "“TEAM AQUA was here!”\p" .string "Someone painted that onto this sign,\n" .string "but then someone else painted over it.\p" .string "“TEAM MAGMA rules!” is what it\n" .string "says now.$" -Route110_Text_1F08CD: @ 81F08CD +Route110_Text_Route103Sign: @ 81F08CD .string "ROUTE 110\n" .string "{LEFT_ARROW} ROUTE 103$" -Route110_Text_1F08E3: @ 81F08E3 +Route110_Text_SeasideParkingSign: @ 81F08E3 .string "SEASIDE PARKING$" -Route110_Text_1F08F3: @ 81F08F3 +Route110_Text_MauvilleCitySign: @ 81F08F3 .string "ROUTE 110\n" .string "{UP_ARROW} MAUVILLE CITY$" -Route110_Text_1F090D: @ 81F090D +Route110_Text_TrainerTipsPrlzSleep: @ 81F090D .string "TRAINER TIPS\p" .string "The foe can be made helpless by\n" .string "paralyzing it or causing it to sleep.\p" .string "It is an important technique for\n" .string "POKéMON battles.$" -Route110_Text_1F0992: @ 81F0992 +Route110_Text_TrainerTipsRegisterItems: @ 81F0992 .string "TRAINER TIPS\p" .string "The items in the BAG can be reorganized\n" .string "by pressing SELECT.$" -Route110_Text_1F09DB: @ 81F09DB +Route110_Text_TrickHouseSign: @ 81F09DB .string "“Three steps {RIGHT_ARROW} and two steps {UP_ARROW}\n" .string "to reach the wondrous TRICK HOUSE.”$" -Route110_Text_1F0A1E: @ 81F0A1E +Route110_Text_BestRecord: @ 81F0A1E .string "THE BEST RECORD TO DATE…\p" .string "No. of collisions: {STR_VAR_1}\p" .string "Elapsed time: {STR_VAR_2}$" -Route110_Text_1F0A5E: @ 81F0A5E +Route110_Text_ThereIsNoRecord: @ 81F0A5E .string "THE BEST RECORD TO DATE…\p" .string "No one seems to have taken the\n" .string "challenge. There is no record…$" -Route110_Text_1F0AB5: @ 81F0AB5 +Route110_Text_ImagineSeeingYouHere: @ 81F0AB5 .string "PROF. BIRCH: Oh, {PLAYER}{KUN}!\n" .string "Imagine seeing you here!\p" .string "And where might my {RIVAL} be?$" -Route110_Text_1F0AFF: @ 81F0AFF +Route110_Text_HeardYouInstallMatchCall: @ 81F0AFF .string "Oh, I see!\n" .string "You two are running separately.\l" .string "Well, that's fine.\p" @@ -1005,11 +1005,11 @@ Route110_Text_1F0AFF: @ 81F0AFF .string "I can rate your POKéDEX anytime.\p" .string "… … … … … …$" -Route110_Text_1F0C0C: @ 81F0C0C +Route110_Text_RegisteredBirchInPokenav: @ 81F0C0C .string "Registered PROF. BIRCH\n" .string "in the POKéNAV.$" -Route110_Text_1F0C33: @ 81F0C33 +Route110_Text_KeepAnEyeOutForRival: @ 81F0C33 .string "PROF. BIRCH: {PLAYER}{KUN}…\p" .string "Please keep an eye out for my {RIVAL}.\n" .string "… … … … … …\p" diff --git a/data/text/trainers.inc b/data/text/trainers.inc index 53e6c07b16..3e835ccd16 100644 --- a/data/text/trainers.inc +++ b/data/text/trainers.inc @@ -1003,232 +1003,232 @@ Route109_Text_ElijahPostBattle: @ 8297AE5 .string "is the perfect setting!\p" .string "I guess I'll head for SLATEPORT.$" -Route110_Text_297B3F: @ 8297B3F +Route110_Text_JacobIntro: @ 8297B3F .string "Whoa! Watch it!\n" .string "I guess you're not used to BIKE racing.$" -Route110_Text_297B77: @ 8297B77 +Route110_Text_JacobDefeated: @ 8297B77 .string "Whoa!\n" .string "My brakes failed!$" -Route110_Text_297B8F: @ 8297B8F +Route110_Text_JacobPostBattle: @ 8297B8F .string "Flat tires and brake problems can\n" .string "cause serious injury!\l" .string "Inspect your BIKE for problems!$" -Route110_Text_297BE7: @ 8297BE7 +Route110_Text_AnthonyIntro: @ 8297BE7 .string "Yo, you!\n" .string "Can you keep up with my speed?$" -Route110_Text_297C0F: @ 8297C0F +Route110_Text_AnthonyDefeated: @ 8297C0F .string "Crash and burn!$" -Route110_Text_297C1F: @ 8297C1F +Route110_Text_AnthonyPostBattle: @ 8297C1F .string "Speed alone won't let me win at POKéMON.\n" .string "I need to reconsider this…$" -Route110_Text_297C63: @ 8297C63 +Route110_Text_BenjaminIntro: @ 8297C63 .string "Don't panic if your BIKE's going fast!$" -Route110_Text_297C8A: @ 8297C8A +Route110_Text_BenjaminDefeated: @ 8297C8A .string "I shouldn't panic during POKéMON\n" .string "battles…$" -Route110_Text_297CB4: @ 8297CB4 +Route110_Text_BenjaminPostBattle: @ 8297CB4 .string "There's no need to panic or stress.\n" .string "Take it easy. There's plenty of time.$" -Route110_Text_297CFE: @ 8297CFE +Route110_Text_BenjaminRegister: @ 8297CFE .string "I'll keep chugging on without stressing.\n" .string "Give me a shout if you're up to it.$" -Route110_Text_297D4B: @ 8297D4B +Route110_Text_BenjaminRematchIntro: @ 8297D4B .string "Aren't you going a little too fast?\n" .string "Take it easy and let's battle.$" -Route110_Text_297D8E: @ 8297D8E +Route110_Text_BenjaminRematchDefeated: @ 8297D8E .string "I didn't panic, but I still lost…$" -Route110_Text_297DB0: @ 8297DB0 +Route110_Text_BenjaminRematchPostBattle: @ 8297DB0 .string "There's no need to panic or stress.\n" .string "Take it easy. There's plenty of time.$" -Route110_Text_297DFA: @ 8297DFA +Route110_Text_AbigailIntro: @ 8297DFA .string "The triathlon is hard in the extreme.\p" .string "You have to complete the three events\n" .string "of swimming, cycling, and running.$" -Route110_Text_297E69: @ 8297E69 +Route110_Text_AbigailDefeated: @ 8297E69 .string "POKéMON battles are hard, too!$" -Route110_Text_297E88: @ 8297E88 +Route110_Text_AbigailPostBattle: @ 8297E88 .string "I'm exhausted, so I need a break.\n" .string "It's important to get proper rest.$" -Route110_Text_297ECD: @ 8297ECD +Route110_Text_AbigailRegister: @ 8297ECD .string "You know, I like you!\n" .string "Let's have a rematch on CYCLING ROAD.$" -Route110_Text_297F09: @ 8297F09 +Route110_Text_AbigailRematchIntro: @ 8297F09 .string "Isn't it neat to hold a battle while\n" .string "cycling?$" -Route110_Text_297F37: @ 8297F37 +Route110_Text_AbigailRematchDefeated: @ 8297F37 .string "Wow…\n" .string "How could you be so strong?$" -Route110_Text_297F58: @ 8297F58 +Route110_Text_AbigailRematchPostBattle: @ 8297F58 .string "Were you going after a record?\p" .string "I'm sorry if I held you up!$" -Route110_Text_297F93: @ 8297F93 +Route110_Text_JasmineIntro: @ 8297F93 .string "I've been riding without stopping.\n" .string "My thighs are like rocks!$" -Route110_Text_297FD0: @ 8297FD0 +Route110_Text_JasmineDefeated: @ 8297FD0 .string "I'm worried about muscle cramps…$" -Route110_Text_297FF1: @ 8297FF1 +Route110_Text_JasminePostBattle: @ 8297FF1 .string "Oh, you have some GYM BADGES?\n" .string "No wonder you're so strong!$" -Route110_Text_29802B: @ 829802B +Route110_Text_EdwardIntro: @ 829802B .string "I have foreseen your intentions!\n" .string "I cannot possibly lose!$" -Route110_Text_298064: @ 8298064 +Route110_Text_EdwardDefeated: @ 8298064 .string "I failed to prophesize my own demise!$" -Route110_Text_29808A: @ 829808A +Route110_Text_EdwardPostBattle: @ 829808A .string "I see your future…\p" .string "Hmm…\n" .string "I see a shining light…$" -Route110_Text_2980B9: @ 82980B9 +Route110_Text_JaclynIntro: @ 82980B9 .string "Ahahahaha!\n" .string "I'll dazzle you with my wonders!$" -Route110_Text_2980E5: @ 82980E5 +Route110_Text_JaclynDefeated: @ 82980E5 .string "I wondrously lost!$" -Route110_Text_2980F8: @ 82980F8 +Route110_Text_JaclynPostBattle: @ 82980F8 .string "You managed to win only because it was\n" .string "a wonder! Yes, a wonder!\l" .string "Don't think you can win all the time!$" -Route110_Text_29815E: @ 829815E +Route110_Text_EdwinIntro: @ 829815E .string "Could I see your POKéMON?\n" .string "Just one look, please?$" -Route110_Text_29818F: @ 829818F +Route110_Text_EdwinDefeated: @ 829818F .string "I wanted to complete\n" .string "my collection…$" -Route110_Text_2981B3: @ 82981B3 +Route110_Text_EdwinPostBattle: @ 82981B3 .string "When I see a POKéMON that I don't know,\n" .string "my passion as a collector is ignited!$" -Route110_Text_298201: @ 8298201 +Route110_Text_EdwinRegister: @ 8298201 .string "I like collecting MATCH CALL\n" .string "registrations, too…$" -Route110_Text_298232: @ 8298232 +Route110_Text_EdwinRematchIntro: @ 8298232 .string "Hi, have you caught any new POKéMON?\p" .string "Could I see your POKéMON?\n" .string "Just one look, please?$" -Route110_Text_298288: @ 8298288 +Route110_Text_EdwinRematchDefeated: @ 8298288 .string "Your POKéMON…\n" .string "I envy you.$" -Route110_Text_2982A2: @ 82982A2 +Route110_Text_EdwinRematchPostBattle: @ 82982A2 .string "Oh, I long to make all rare POKéMON\n" .string "mine!$" -Route110_Text_2982CC: @ 82982CC +Route110_Text_DaleIntro: @ 82982CC .string "Hey!\n" .string "Don't sneak up behind me like that!$" -Route110_Text_2982F5: @ 82982F5 +Route110_Text_DaleDefeated: @ 82982F5 .string "I lost!\n" .string "Drat!$" -Route110_Text_298303: @ 8298303 +Route110_Text_DalePostBattle: @ 8298303 .string "Fishing is all about concentration.\n" .string "You have to focus on the floater.$" -Route110_Text_298349: @ 8298349 +Route110_Text_IsabelIntro: @ 8298349 .string "Ahahaha! I would go anywhere to show\n" .string "off my delightful POKéMON.$" -Route110_Text_298389: @ 8298389 +Route110_Text_IsabelDefeated: @ 8298389 .string "Oh, dear, this won't do.$" -Route110_Text_2983A2: @ 82983A2 +Route110_Text_IsabelPostBattle: @ 82983A2 .string "Rather than battling, perhaps I should\n" .string "show off my POKéMON at the FAN CLUB.$" -Route110_Text_2983EE: @ 82983EE +Route110_Text_IsabelRegister: @ 82983EE .string "That wasn't close to what I could\n" .string "do to show off my POKéMON.\p" .string "I'll have you as my captive audience\n" .string "as often as possible!$" -Route110_Text_298466: @ 8298466 +Route110_Text_IsabelRematchIntro: @ 8298466 .string "Ahahahaha! I would be happy to show\n" .string "off my POKéMON as often as you like!$" -Route110_Text_2984AF: @ 82984AF +Route110_Text_IsabelRematchDefeated: @ 82984AF .string "Oh, dear, this won't do.$" -Route110_Text_2984C8: @ 82984C8 +Route110_Text_IsabelRematchPostBattle: @ 82984C8 .string "I don't think that I could ever stop\n" .string "from showing off my POKéMON.\p" .string "But I like to battle, too!$" -Route110_Text_298525: @ 8298525 +Route110_Text_TimmyIntro: @ 8298525 .string "I found some cool POKéMON in the grass\n" .string "around here!$" -Route110_Text_298559: @ 8298559 +Route110_Text_TimmyDefeated: @ 8298559 .string "Being cool isn't enough to win…$" -Route110_Text_298579: @ 8298579 +Route110_Text_TimmyPostBattle: @ 8298579 .string "It's hard to battle with POKéMON you\n" .string "just caught.$" -Route110_Text_2985AB: @ 82985AB +Route110_Text_AlyssaIntro: @ 82985AB .string "I fell off CYCLING ROAD…\p" .string "I'll get over my embarrassment by\n" .string "battling with you!$" -Route110_Text_2985F9: @ 82985F9 +Route110_Text_AlyssaDefeated: @ 82985F9 .string "Oops!\n" .string "I ended up losing!$" -Route110_Text_298612: @ 8298612 +Route110_Text_AlyssaPostBattle: @ 8298612 .string "Falling… Losing…\n" .string "This is so humiliating for me!$" -Route110_Text_298642: @ 8298642 +Route110_Text_JosephIntro: @ 8298642 .string "Okay! Full-throttle time! If you can't\n" .string "groove, you get left behind!$" -Route110_Text_298686: @ 8298686 +Route110_Text_JosephDefeated: @ 8298686 .string "You got into the groove all right…$" -Route110_Text_2986A9: @ 82986A9 +Route110_Text_JosephPostBattle: @ 82986A9 .string "This isn't going to bring me down!\n" .string "Losing has made me a better man!$" -Route110_Text_2986ED: @ 82986ED +Route110_Text_KalebIntro: @ 82986ED .string "When cute POKéMON help each other…\n" .string "You won't see a more adorable sight!$" -Route110_Text_298735: @ 8298735 +Route110_Text_KalebDefeated: @ 8298735 .string "Have you no compassion or pity?$" -Route110_Text_298755: @ 8298755 +Route110_Text_KalebPostBattle: @ 8298755 .string "Okay, okay, you've done the best you\n" .string "could, my pretties.$" From c31aafed5720d2b5abced7f1936fa6f3377532c2 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Sun, 27 Oct 2019 10:26:27 -0400 Subject: [PATCH 31/46] Name unknown flag from R/S --- include/constants/flags.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/include/constants/flags.h b/include/constants/flags.h index b61bf0b11c..13adf11e69 100644 --- a/include/constants/flags.h +++ b/include/constants/flags.h @@ -778,9 +778,7 @@ #define FLAG_HIDE_AQUA_HIDEOUT_1F_GRUNT_2_BLOCKING_ENTRANCE 0x336 #define FLAG_HIDE_MOSSDEEP_CITY_TEAM_MAGMA 0x337 #define FLAG_HIDE_PETALBURG_GYM_WALLYS_UNCLE 0x338 - -#define FLAG_UNUSED_0x339 0x339 // Unused Flag - +#define FLAG_HIDE_LEGEND_MON_CAVE_OF_ORIGIN 0x339 // Unused, leftover from R/S #define FLAG_HIDE_SOOTOPOLIS_CITY_ARCHIE 0x33A #define FLAG_HIDE_SOOTOPOLIS_CITY_MAXIE 0x33B #define FLAG_HIDE_SEAFLOOR_CAVERN_ROOM_9_ARCHIE 0x33C From ff0109e0fda22e4893dc748d59d8c8e57abd3b9b Mon Sep 17 00:00:00 2001 From: GriffinR Date: Sun, 27 Oct 2019 11:25:38 -0400 Subject: [PATCH 32/46] Define unused hidden item flags --- include/constants/flags.h | 105 ++++++++++++++++++++++++++++++++++---- 1 file changed, 96 insertions(+), 9 deletions(-) diff --git a/include/constants/flags.h b/include/constants/flags.h index 13adf11e69..72f3a5b9ad 100644 --- a/include/constants/flags.h +++ b/include/constants/flags.h @@ -163,9 +163,7 @@ #define FLAG_MR_BRINEY_SAILING_INTRO 0x93 #define FLAG_DOCK_REJECTED_DEVON_GOODS 0x94 #define FLAG_DELIVERED_DEVON_GOODS 0x95 - -#define FLAG_UNUSED_0x096 0x96 // Unused Flag - +#define FLAG_RECEIVED_CONTEST_PASS 0x96 // Unused, leftover from R/S #define FLAG_RECEIVED_CASTFORM 0x97 #define FLAG_RECEIVED_SUPER_ROD 0x98 #define FLAG_RUSTBORO_NPC_TRADE_COMPLETED 0x99 @@ -332,10 +330,10 @@ #define FLAG_MET_SCOTT_RUSTBORO 0x136 #define FLAG_WALLACE_GOES_TO_SKY_PILLAR 0x137 // Set after speaking to Wallace within the Cave of Origin. #define FLAG_RECEIVED_HM07 0x138 -#define FLAG_BEAT_MAGMA_GRUNT_JAGGED_PASS 0x139 // Beat Magma Grunt blocking Magma Hideout entrance. -#define FLAG_RECEIVED_AURORA_TICKET 0x13A // RECEIVED Aurora Ticket in Mystery Gift -#define FLAG_RECEIVED_MYSTIC_TICKET 0x13B // RECEIVED Mystic Ticket in Mystery Gift -#define FLAG_RECEIVED_OLD_SEA_MAP 0x13C // RECEIVED Old Sea Map in Mystery Gift +#define FLAG_BEAT_MAGMA_GRUNT_JAGGED_PASS 0x139 +#define FLAG_RECEIVED_AURORA_TICKET 0x13A +#define FLAG_RECEIVED_MYSTIC_TICKET 0x13B +#define FLAG_RECEIVED_OLD_SEA_MAP 0x13C #define FLAG_UNUSED_MYSTERY_GIFT_0x13D 0x13D #define FLAG_UNUSED_MYSTERY_GIFT_0x13E 0x13E #define FLAG_UNUSED_MYSTERY_GIFT_0x13F 0x13F @@ -355,8 +353,8 @@ #define FLAG_UNUSED_MYSTERY_GIFT_0x14D 0x14D #define FLAG_MIRAGE_TOWER_VISIBLE 0x14E -#define FLAG_CHOSE_CLAW_FOSSIL 0x14F // Player chose Claw Fossil -#define FLAG_CHOSE_ROOT_FOSSIL 0x150 // Player chose Root Fossil +#define FLAG_CHOSE_CLAW_FOSSIL 0x14F +#define FLAG_CHOSE_ROOT_FOSSIL 0x150 #define FLAG_RECEIVED_POWDER_JAR 0x151 #define FLAG_CHOSEN_MULTI_BATTLE_NPC_PARTNER 0x152 @@ -650,6 +648,95 @@ #define FLAG_HIDDEN_ITEM_ROUTE_128_HEART_SCALE_2 (FLAG_HIDDEN_ITEMS_START + 0x5D) #define FLAG_HIDDEN_ITEM_ROUTE_128_HEART_SCALE_3 (FLAG_HIDDEN_ITEMS_START + 0x5E) +#define FLAG_UNUSED_0x264 0x264 // Unused Flag +#define FLAG_UNUSED_0x265 0x265 // Unused Flag +#define FLAG_UNUSED_0x266 0x266 // Unused Flag +#define FLAG_UNUSED_0x267 0x267 // Unused Flag +#define FLAG_UNUSED_0x268 0x268 // Unused Flag +#define FLAG_UNUSED_0x269 0x269 // Unused Flag +#define FLAG_UNUSED_0x26A 0x26A // Unused Flag +#define FLAG_UNUSED_0x26B 0x26B // Unused Flag +#define FLAG_UNUSED_0x26C 0x26C // Unused Flag +#define FLAG_UNUSED_0x26D 0x26D // Unused Flag +#define FLAG_UNUSED_0x26E 0x26E // Unused Flag +#define FLAG_UNUSED_0x26F 0x26F // Unused Flag +#define FLAG_UNUSED_0x270 0x270 // Unused Flag +#define FLAG_UNUSED_0x271 0x271 // Unused Flag +#define FLAG_UNUSED_0x272 0x272 // Unused Flag +#define FLAG_UNUSED_0x273 0x273 // Unused Flag +#define FLAG_UNUSED_0x274 0x274 // Unused Flag +#define FLAG_UNUSED_0x275 0x275 // Unused Flag +#define FLAG_UNUSED_0x276 0x276 // Unused Flag +#define FLAG_UNUSED_0x277 0x277 // Unused Flag +#define FLAG_UNUSED_0x278 0x278 // Unused Flag +#define FLAG_UNUSED_0x279 0x279 // Unused Flag +#define FLAG_UNUSED_0x27A 0x27A // Unused Flag +#define FLAG_UNUSED_0x27B 0x27B // Unused Flag +#define FLAG_UNUSED_0x27C 0x27C // Unused Flag +#define FLAG_UNUSED_0x27D 0x27D // Unused Flag +#define FLAG_UNUSED_0x27E 0x27E // Unused Flag +#define FLAG_UNUSED_0x27F 0x27F // Unused Flag +#define FLAG_UNUSED_0x280 0x280 // Unused Flag +#define FLAG_UNUSED_0x281 0x281 // Unused Flag +#define FLAG_UNUSED_0x282 0x282 // Unused Flag +#define FLAG_UNUSED_0x283 0x283 // Unused Flag +#define FLAG_UNUSED_0x284 0x284 // Unused Flag +#define FLAG_UNUSED_0x285 0x285 // Unused Flag +#define FLAG_UNUSED_0x286 0x286 // Unused Flag +#define FLAG_UNUSED_0x287 0x287 // Unused Flag +#define FLAG_UNUSED_0x288 0x288 // Unused Flag +#define FLAG_UNUSED_0x289 0x289 // Unused Flag +#define FLAG_UNUSED_0x28A 0x28A // Unused Flag +#define FLAG_UNUSED_0x28B 0x28B // Unused Flag +#define FLAG_UNUSED_0x28C 0x28C // Unused Flag +#define FLAG_UNUSED_0x28D 0x28D // Unused Flag +#define FLAG_UNUSED_0x28E 0x28E // Unused Flag +#define FLAG_UNUSED_0x28F 0x28F // Unused Flag +#define FLAG_UNUSED_0x290 0x290 // Unused Flag +#define FLAG_UNUSED_0x291 0x291 // Unused Flag +#define FLAG_UNUSED_0x292 0x292 // Unused Flag +#define FLAG_UNUSED_0x293 0x293 // Unused Flag +#define FLAG_UNUSED_0x294 0x294 // Unused Flag +#define FLAG_UNUSED_0x295 0x295 // Unused Flag +#define FLAG_UNUSED_0x296 0x296 // Unused Flag +#define FLAG_UNUSED_0x297 0x297 // Unused Flag +#define FLAG_UNUSED_0x298 0x298 // Unused Flag +#define FLAG_UNUSED_0x299 0x299 // Unused Flag +#define FLAG_UNUSED_0x29A 0x29A // Unused Flag +#define FLAG_UNUSED_0x29B 0x29B // Unused Flag +#define FLAG_UNUSED_0x29C 0x29C // Unused Flag +#define FLAG_UNUSED_0x29D 0x29D // Unused Flag +#define FLAG_UNUSED_0x29E 0x29E // Unused Flag +#define FLAG_UNUSED_0x29F 0x29F // Unused Flag +#define FLAG_UNUSED_0x2A0 0x2A0 // Unused Flag +#define FLAG_UNUSED_0x2A1 0x2A1 // Unused Flag +#define FLAG_UNUSED_0x2A2 0x2A2 // Unused Flag +#define FLAG_UNUSED_0x2A3 0x2A3 // Unused Flag +#define FLAG_UNUSED_0x2A4 0x2A4 // Unused Flag +#define FLAG_UNUSED_0x2A5 0x2A5 // Unused Flag +#define FLAG_UNUSED_0x2A6 0x2A6 // Unused Flag +#define FLAG_UNUSED_0x2A7 0x2A7 // Unused Flag +#define FLAG_UNUSED_0x2A8 0x2A8 // Unused Flag +#define FLAG_UNUSED_0x2A9 0x2A9 // Unused Flag +#define FLAG_UNUSED_0x2AA 0x2AA // Unused Flag +#define FLAG_UNUSED_0x2AB 0x2AB // Unused Flag +#define FLAG_UNUSED_0x2AC 0x2AC // Unused Flag +#define FLAG_UNUSED_0x2AD 0x2AD // Unused Flag +#define FLAG_UNUSED_0x2AE 0x2AE // Unused Flag +#define FLAG_UNUSED_0x2AF 0x2AF // Unused Flag +#define FLAG_UNUSED_0x2B0 0x2B0 // Unused Flag +#define FLAG_UNUSED_0x2B1 0x2B1 // Unused Flag +#define FLAG_UNUSED_0x2B2 0x2B2 // Unused Flag +#define FLAG_UNUSED_0x2B3 0x2B3 // Unused Flag +#define FLAG_UNUSED_0x2B4 0x2B4 // Unused Flag +#define FLAG_UNUSED_0x2B5 0x2B5 // Unused Flag +#define FLAG_UNUSED_0x2B6 0x2B6 // Unused Flag +#define FLAG_UNUSED_0x2B7 0x2B7 // Unused Flag +#define FLAG_UNUSED_0x2B8 0x2B8 // Unused Flag +#define FLAG_UNUSED_0x2B9 0x2B9 // Unused Flag +#define FLAG_UNUSED_0x2BA 0x2BA // Unused Flag +#define FLAG_UNUSED_0x2BB 0x2BB // Unused Flag + // Event Flags #define FLAG_HIDE_ROUTE_101_BIRCH_STARTERS_BAG 0x2BC #define FLAG_HIDE_APPRENTICE 0x2BD From 93e2851fc187499259affb1ee32c845a7e9f9023 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Tue, 22 Oct 2019 20:50:41 -0400 Subject: [PATCH 33/46] Document players_house.inc and Littleroot house scripts --- .../LittlerootTown_BrendansHouse_1F/map.json | 18 +- .../scripts.inc | 225 +++++---- .../LittlerootTown_BrendansHouse_2F/map.json | 12 +- .../scripts.inc | 153 +++--- .../maps/LittlerootTown_MaysHouse_1F/map.json | 20 +- .../LittlerootTown_MaysHouse_1F/scripts.inc | 216 ++++----- .../maps/LittlerootTown_MaysHouse_2F/map.json | 12 +- .../LittlerootTown_MaysHouse_2F/scripts.inc | 198 ++++---- data/scripts/new_game.inc | 2 +- data/scripts/players_house.inc | 455 +++++++++--------- data/scripts/tv.inc | 4 +- include/constants/flags.h | 4 +- include/event_scripts.h | 8 +- src/field_control_avatar.c | 4 +- src/player_pc.c | 6 +- 15 files changed, 659 insertions(+), 678 deletions(-) diff --git a/data/maps/LittlerootTown_BrendansHouse_1F/map.json b/data/maps/LittlerootTown_BrendansHouse_1F/map.json index d6d4af86c3..8b0c762f94 100644 --- a/data/maps/LittlerootTown_BrendansHouse_1F/map.json +++ b/data/maps/LittlerootTown_BrendansHouse_1F/map.json @@ -24,7 +24,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "LittlerootTown_BrendansHouse_1F_EventScript_2929C5", + "script": "PlayersHouse_1F_EventScript_Mom", "flag": "FLAG_HIDE_LITTLEROOT_TOWN_BRENDANS_HOUSE_MOM" }, { @@ -37,7 +37,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "LittlerootTown_BrendansHouse_1F_EventScript_292ACD", + "script": "PlayersHouse_1F_EventScript_Vigoroth2", "flag": "FLAG_HIDE_LITTLEROOT_TOWN_PLAYERS_HOUSE_VIGOROTH_2" }, { @@ -50,7 +50,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "LittlerootTown_BrendansHouse_1F_EventScript_292ABA", + "script": "PlayersHouse_1F_EventScript_Vigoroth1", "flag": "FLAG_HIDE_LITTLEROOT_TOWN_PLAYERS_HOUSE_VIGOROTH_1" }, { @@ -63,7 +63,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "LittlerootTown_BrendansHouse_1F_EventScript_1F89F3", + "script": "RivalsHouse_1F_EventScript_RivalMom", "flag": "FLAG_HIDE_LITTLEROOT_TOWN_BRENDANS_HOUSE_RIVAL_MOM" }, { @@ -89,7 +89,7 @@ "movement_range_y": 1, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "LittlerootTown_BrendansHouse_1F_EventScript_1F8A3D", + "script": "RivalsHouse_1F_EventScript_RivalSibling", "flag": "FLAG_HIDE_LITTLEROOT_TOWN_BRENDANS_HOUSE_RIVAL_SIBLING" }, { @@ -137,7 +137,7 @@ "elevation": 0, "var": "VAR_LITTLEROOT_INTRO_STATE", "var_value": "4", - "script": "LittlerootTown_BrendansHouse_1F_EventScript_1F78A3" + "script": "LittlerootTown_BrendansHouse_1F_EventScript_GoSeeRoom" }, { "type": "trigger", @@ -146,7 +146,7 @@ "elevation": 0, "var": "VAR_LITTLEROOT_RIVAL_STATE", "var_value": "2", - "script": "LittlerootTown_BrendansHouse_1F_EventScript_1F78BE" + "script": "LittlerootTown_BrendansHouse_1F_EventScript_MeetRival0" }, { "type": "trigger", @@ -155,7 +155,7 @@ "elevation": 0, "var": "VAR_LITTLEROOT_RIVAL_STATE", "var_value": "2", - "script": "LittlerootTown_BrendansHouse_1F_EventScript_1F78CA" + "script": "LittlerootTown_BrendansHouse_1F_EventScript_MeetRival1" }, { "type": "trigger", @@ -164,7 +164,7 @@ "elevation": 0, "var": "VAR_LITTLEROOT_RIVAL_STATE", "var_value": "2", - "script": "LittlerootTown_BrendansHouse_1F_EventScript_1F78D6" + "script": "LittlerootTown_BrendansHouse_1F_EventScript_MeetRival2" } ], "bg_events": [] diff --git a/data/maps/LittlerootTown_BrendansHouse_1F/scripts.inc b/data/maps/LittlerootTown_BrendansHouse_1F/scripts.inc index 3d62846006..59c173cf97 100644 --- a/data/maps/LittlerootTown_BrendansHouse_1F/scripts.inc +++ b/data/maps/LittlerootTown_BrendansHouse_1F/scripts.inc @@ -1,93 +1,94 @@ LittlerootTown_BrendansHouse_1F_MapScripts:: @ 81F7755 - map_script MAP_SCRIPT_ON_LOAD, LittlerootTown_BrendansHouse_1F_MapScript1_1F7765 - map_script MAP_SCRIPT_ON_TRANSITION, LittlerootTown_BrendansHouse_1F_MapScript1_1F77A4 - map_script MAP_SCRIPT_ON_FRAME_TABLE, LittlerootTown_BrendansHouse_1F_MapScript2_1F77EA + map_script MAP_SCRIPT_ON_LOAD, LittlerootTown_BrendansHouse_1F_OnLoad + map_script MAP_SCRIPT_ON_TRANSITION, LittlerootTown_BrendansHouse_1F_OnTransition + map_script MAP_SCRIPT_ON_FRAME_TABLE, LittlerootTown_BrendansHouse_1F_OnFrame .byte 0 -LittlerootTown_BrendansHouse_1F_MapScript1_1F7765: @ 81F7765 +LittlerootTown_BrendansHouse_1F_OnLoad: @ 81F7765 compare VAR_LITTLEROOT_INTRO_STATE, 6 - call_if_lt LittlerootTown_BrendansHouse_1F_EventScript_1F777A - call_if_set FLAG_RECEIVED_RUNNING_SHOES, LittlerootTown_BrendansHouse_1F_EventScript_1F778D + call_if_lt LittlerootTown_BrendansHouse_1F_EventScript_SetMovingBoxes + call_if_set FLAG_RECEIVED_RUNNING_SHOES, LittlerootTown_BrendansHouse_1F_EventScript_CheckShowShoesManual end -LittlerootTown_BrendansHouse_1F_EventScript_1F777A:: @ 81F777A +LittlerootTown_BrendansHouse_1F_EventScript_SetMovingBoxes:: @ 81F777A setmetatile 5, 4, METATILE_BrendansMaysHouse_MovingBox_Open, 1 setmetatile 5, 2, METATILE_BrendansMaysHouse_MovingBox_Closed, 1 return -LittlerootTown_BrendansHouse_1F_EventScript_1F778D:: @ 81F778D +LittlerootTown_BrendansHouse_1F_EventScript_CheckShowShoesManual:: @ 81F778D checkplayergender compare VAR_RESULT, MALE - goto_if_eq LittlerootTown_BrendansHouse_1F_EventScript_1F779A + goto_if_eq LittlerootTown_BrendansHouse_1F_EventScript_ShowRunningShoesManual return -LittlerootTown_BrendansHouse_1F_EventScript_1F779A:: @ 81F779A +LittlerootTown_BrendansHouse_1F_EventScript_ShowRunningShoesManual:: @ 81F779A setmetatile 3, 7, METATILE_BrendansMaysHouse_BookOnTable, 1 return -LittlerootTown_BrendansHouse_1F_MapScript1_1F77A4: @ 81F77A4 +LittlerootTown_BrendansHouse_1F_OnTransition: @ 81F77A4 compare VAR_LITTLEROOT_INTRO_STATE, 3 - call_if_eq LittlerootTown_BrendansHouse_1F_EventScript_1F77DE + call_if_eq LittlerootTown_BrendansHouse_1F_EventScript_MoveMomToDoor compare VAR_LITTLEROOT_INTRO_STATE, 5 - call_if_eq LittlerootTown_BrendansHouse_1F_EventScript_1F77C6 + call_if_eq LittlerootTown_BrendansHouse_1F_EventScript_MoveMomToStairs compare VAR_LITTLEROOT_INTRO_STATE, 6 - call_if_eq LittlerootTown_BrendansHouse_1F_EventScript_1F77D2 + call_if_eq LittlerootTown_BrendansHouse_1F_EventScript_MoveMomToTV end -LittlerootTown_BrendansHouse_1F_EventScript_1F77C6:: @ 81F77C6 +LittlerootTown_BrendansHouse_1F_EventScript_MoveMomToStairs:: @ 81F77C6 setobjectxyperm 1, 8, 4 setobjectmovementtype 1, MOVEMENT_TYPE_FACE_UP return -LittlerootTown_BrendansHouse_1F_EventScript_1F77D2:: @ 81F77D2 +LittlerootTown_BrendansHouse_1F_EventScript_MoveMomToTV:: @ 81F77D2 setobjectxyperm 1, 4, 5 setobjectmovementtype 1, MOVEMENT_TYPE_FACE_UP return -LittlerootTown_BrendansHouse_1F_EventScript_1F77DE:: @ 81F77DE +LittlerootTown_BrendansHouse_1F_EventScript_MoveMomToDoor:: @ 81F77DE setobjectxyperm 1, 9, 8 setobjectmovementtype 1, MOVEMENT_TYPE_FACE_UP return -LittlerootTown_BrendansHouse_1F_MapScript2_1F77EA: @ 81F77EA - map_script_2 VAR_LITTLEROOT_INTRO_STATE, 3, LittlerootTown_BrendansHouse_1F_EventScript_1F783C - map_script_2 VAR_LITTLEROOT_INTRO_STATE, 5, LittlerootTown_BrendansHouse_1F_EventScript_1F7814 - map_script_2 VAR_LITTLEROOT_INTRO_STATE, 6, LittlerootTown_BrendansHouse_1F_EventScript_1F784D - map_script_2 VAR_LITTLEROOT_HOUSES_STATE, 1, LittlerootTown_BrendansHouse_1F_EventScript_1F785E - map_script_2 VAR_LITTLEROOT_HOUSES_STATE, 3, LittlerootTown_BrendansHouse_1F_EventScript_292AF2 +@ Many of the below scripts have no gender check because they assume youre in the correct house +LittlerootTown_BrendansHouse_1F_OnFrame: @ 81F77EA + map_script_2 VAR_LITTLEROOT_INTRO_STATE, 3, LittlerootTown_BrendansHouse_1F_EventScript_EnterHouseMovingIn + map_script_2 VAR_LITTLEROOT_INTRO_STATE, 5, LittlerootTown_BrendansHouse_1F_EventScript_GoUpstairsToSetClock + map_script_2 VAR_LITTLEROOT_INTRO_STATE, 6, LittlerootTown_BrendansHouse_1F_EventScript_PetalburgGymReport + map_script_2 VAR_LITTLEROOT_HOUSES_STATE, 1, LittlerootTown_BrendansHouse_1F_EventScript_YoureNewNeighbor + map_script_2 VAR_LITTLEROOT_HOUSES_STATE, 3, PlayersHouse_1F_EventScript_GetSSTicketAndSeeLatiTV .2byte 0 -LittlerootTown_BrendansHouse_1F_EventScript_1F7814:: @ 81F7814 +LittlerootTown_BrendansHouse_1F_EventScript_GoUpstairsToSetClock:: @ 81F7814 lockall - msgbox LittlerootTown_BrendansHouse_1F_Text_1F7B67, MSGBOX_DEFAULT + msgbox PlayersHouse_1F_Text_GoSetTheClock, MSGBOX_DEFAULT closemessage - applymovement EVENT_OBJ_ID_PLAYER, LittlerootTown_BrendansHouse_1F_Movement_1F783A - applymovement 1, LittlerootTown_BrendansHouse_1F_Movement_1F783A + applymovement EVENT_OBJ_ID_PLAYER, LittlerootTown_BrendansHouse_1F_Movement_PushTowardStairs + applymovement 1, LittlerootTown_BrendansHouse_1F_Movement_PushTowardStairs waitmovement 0 warp MAP_LITTLEROOT_TOWN_BRENDANS_HOUSE_2F, 255, 7, 1 waitstate releaseall end -LittlerootTown_BrendansHouse_1F_Movement_1F783A: @ 81F783A +LittlerootTown_BrendansHouse_1F_Movement_PushTowardStairs: @ 81F783A walk_up step_end -LittlerootTown_BrendansHouse_1F_EventScript_1F783C:: @ 81F783C +LittlerootTown_BrendansHouse_1F_EventScript_EnterHouseMovingIn:: @ 81F783C lockall setvar VAR_0x8004, 1 - setvar VAR_0x8005, 0 - goto LittlerootTown_BrendansHouse_1F_EventScript_292704 + setvar VAR_0x8005, MALE + goto PlayersHouse_1F_EventScript_EnterHouseMovingIn end -LittlerootTown_BrendansHouse_1F_EventScript_1F784D:: @ 81F784D +LittlerootTown_BrendansHouse_1F_EventScript_PetalburgGymReport:: @ 81F784D lockall setvar VAR_0x8004, 0 - setvar VAR_0x8005, 1 - goto LittlerootTown_BrendansHouse_1F_EventScript_29286D + setvar VAR_0x8005, 1 @ Object event ID for Mom + goto PlayersHouse_1F_EventScript_PetalburgGymReportMale end -LittlerootTown_BrendansHouse_1F_EventScript_1F785E:: @ 81F785E +LittlerootTown_BrendansHouse_1F_EventScript_YoureNewNeighbor:: @ 81F785E lockall playse SE_PIN applymovement 4, Common_Movement_ExclamationMark @@ -95,16 +96,16 @@ LittlerootTown_BrendansHouse_1F_EventScript_1F785E:: @ 81F785E applymovement 4, Common_Movement_Delay48 waitmovement 0 applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceFastestLeft - applymovement 4, LittlerootTown_BrendansHouse_1F_Movement_1F789C + applymovement 4, LittlerootTown_BrendansHouse_1F_Movement_RivalMomApproach waitmovement 0 special GetRivalSonDaughterString - msgbox LittlerootTown_BrendansHouse_1F_Text_1F8BC5, MSGBOX_DEFAULT + msgbox RivalsHouse_1F_Text_OhYoureTheNewNeighbor, MSGBOX_DEFAULT setflag FLAG_MET_RIVAL_MOM setvar VAR_LITTLEROOT_HOUSES_STATE, 2 releaseall end -LittlerootTown_BrendansHouse_1F_Movement_1F789C: @ 81F789C +LittlerootTown_BrendansHouse_1F_Movement_RivalMomApproach: @ 81F789C walk_down walk_right walk_right @@ -113,34 +114,34 @@ LittlerootTown_BrendansHouse_1F_Movement_1F789C: @ 81F789C walk_right step_end -LittlerootTown_BrendansHouse_1F_EventScript_1F78A3:: @ 81F78A3 +LittlerootTown_BrendansHouse_1F_EventScript_GoSeeRoom:: @ 81F78A3 lockall setvar VAR_0x8004, 1 - setvar VAR_0x8005, 0 + setvar VAR_0x8005, MALE applymovement VAR_0x8004, Common_Movement_WalkInPlaceFastestLeft waitmovement 0 - goto LittlerootTown_BrendansHouse_1F_EventScript_292765 + goto PlayersHouse_1F_EventScript_MomGoSeeRoom end -LittlerootTown_BrendansHouse_1F_EventScript_1F78BE:: @ 81F78BE +LittlerootTown_BrendansHouse_1F_EventScript_MeetRival0:: @ 81F78BE lockall setvar VAR_0x8008, 0 - goto LittlerootTown_BrendansHouse_1F_EventScript_1F78E2 + goto LittlerootTown_BrendansHouse_1F_EventScript_MeetRival end -LittlerootTown_BrendansHouse_1F_EventScript_1F78CA:: @ 81F78CA +LittlerootTown_BrendansHouse_1F_EventScript_MeetRival1:: @ 81F78CA lockall setvar VAR_0x8008, 1 - goto LittlerootTown_BrendansHouse_1F_EventScript_1F78E2 + goto LittlerootTown_BrendansHouse_1F_EventScript_MeetRival end -LittlerootTown_BrendansHouse_1F_EventScript_1F78D6:: @ 81F78D6 +LittlerootTown_BrendansHouse_1F_EventScript_MeetRival2:: @ 81F78D6 lockall setvar VAR_0x8008, 2 - goto LittlerootTown_BrendansHouse_1F_EventScript_1F78E2 + goto LittlerootTown_BrendansHouse_1F_EventScript_MeetRival end -LittlerootTown_BrendansHouse_1F_EventScript_1F78E2:: @ 81F78E2 +LittlerootTown_BrendansHouse_1F_EventScript_MeetRival:: @ 81F78E2 playse SE_KAIDAN delay 10 addobject 7 @@ -151,22 +152,22 @@ LittlerootTown_BrendansHouse_1F_EventScript_1F78E2:: @ 81F78E2 applymovement 7, Common_Movement_Delay48 waitmovement 0 compare VAR_0x8008, 1 - call_if_ne LittlerootTown_BrendansHouse_1F_EventScript_1F7981 + call_if_ne LittlerootTown_BrendansHouse_1F_EventScript_PlayerFaceBrendan playbgm MUS_BOY_SUP, 1 compare VAR_0x8008, 0 - call_if_eq LittlerootTown_BrendansHouse_1F_EventScript_1F798C + call_if_eq LittlerootTown_BrendansHouse_1F_EventScript_BrendanApproachPlayer0 compare VAR_0x8008, 1 - call_if_eq LittlerootTown_BrendansHouse_1F_EventScript_1F7997 + call_if_eq LittlerootTown_BrendansHouse_1F_EventScript_BrendanApproachPlayer1 compare VAR_0x8008, 2 - call_if_eq LittlerootTown_BrendansHouse_1F_EventScript_1F79A2 - msgbox LittlerootTown_BrendansHouse_1F_Text_1F90B4, MSGBOX_DEFAULT + call_if_eq LittlerootTown_BrendansHouse_1F_EventScript_BrendanApproachPlayer2 + msgbox RivalsHouse_1F_Text_BrendanWhoAreYou, MSGBOX_DEFAULT closemessage compare VAR_0x8008, 0 - call_if_eq LittlerootTown_BrendansHouse_1F_EventScript_1F79C1 + call_if_eq LittlerootTown_BrendansHouse_1F_EventScript_BrendanGoUpstairs0 compare VAR_0x8008, 1 - call_if_eq LittlerootTown_BrendansHouse_1F_EventScript_1F79D3 + call_if_eq LittlerootTown_BrendansHouse_1F_EventScript_BrendanGoUpstairs1 compare VAR_0x8008, 2 - call_if_eq LittlerootTown_BrendansHouse_1F_EventScript_1F79E5 + call_if_eq LittlerootTown_BrendansHouse_1F_EventScript_BrendanGoUpstairs2 playse SE_KAIDAN removeobject 7 setflag FLAG_HIDE_LITTLEROOT_TOWN_BRENDANS_HOUSE_BRENDAN @@ -180,27 +181,27 @@ LittlerootTown_BrendansHouse_1F_EventScript_1F78E2:: @ 81F78E2 releaseall end -LittlerootTown_BrendansHouse_1F_EventScript_1F7981:: @ 81F7981 +LittlerootTown_BrendansHouse_1F_EventScript_PlayerFaceBrendan:: @ 81F7981 applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceFastestDown waitmovement 0 return -LittlerootTown_BrendansHouse_1F_EventScript_1F798C:: @ 81F798C - applymovement 7, LittlerootTown_BrendansHouse_1F_Movement_1F79AD +LittlerootTown_BrendansHouse_1F_EventScript_BrendanApproachPlayer0:: @ 81F798C + applymovement 7, LittlerootTown_BrendansHouse_1F_Movement_BrendanApproachPlayer0 waitmovement 0 return -LittlerootTown_BrendansHouse_1F_EventScript_1F7997:: @ 81F7997 - applymovement 7, LittlerootTown_BrendansHouse_1F_Movement_1F79B5 +LittlerootTown_BrendansHouse_1F_EventScript_BrendanApproachPlayer1:: @ 81F7997 + applymovement 7, LittlerootTown_BrendansHouse_1F_Movement_BrendanApproachPlayer1 waitmovement 0 return -LittlerootTown_BrendansHouse_1F_EventScript_1F79A2:: @ 81F79A2 - applymovement 7, LittlerootTown_BrendansHouse_1F_Movement_1F79B9 +LittlerootTown_BrendansHouse_1F_EventScript_BrendanApproachPlayer2:: @ 81F79A2 + applymovement 7, LittlerootTown_BrendansHouse_1F_Movement_BrendanApproachPlayer2 waitmovement 0 return -LittlerootTown_BrendansHouse_1F_Movement_1F79AD: @ 81F79AD +LittlerootTown_BrendansHouse_1F_Movement_BrendanApproachPlayer0: @ 81F79AD walk_in_place_fastest_left walk_left walk_in_place_fastest_up @@ -210,13 +211,13 @@ LittlerootTown_BrendansHouse_1F_Movement_1F79AD: @ 81F79AD walk_up step_end -LittlerootTown_BrendansHouse_1F_Movement_1F79B5: @ 81F79B5 +LittlerootTown_BrendansHouse_1F_Movement_BrendanApproachPlayer1: @ 81F79B5 walk_up walk_up walk_up step_end -LittlerootTown_BrendansHouse_1F_Movement_1F79B9: @ 81F79B9 +LittlerootTown_BrendansHouse_1F_Movement_BrendanApproachPlayer2: @ 81F79B9 walk_in_place_fastest_right walk_right walk_in_place_fastest_up @@ -226,31 +227,31 @@ LittlerootTown_BrendansHouse_1F_Movement_1F79B9: @ 81F79B9 walk_up step_end -LittlerootTown_BrendansHouse_1F_EventScript_1F79C1:: @ 81F79C1 - applymovement EVENT_OBJ_ID_PLAYER, LittlerootTown_BrendansHouse_1F_Movement_1F79F7 - applymovement 7, LittlerootTown_BrendansHouse_1F_Movement_1F7A06 +LittlerootTown_BrendansHouse_1F_EventScript_BrendanGoUpstairs0:: @ 81F79C1 + applymovement EVENT_OBJ_ID_PLAYER, LittlerootTown_BrendansHouse_1F_Movement_PlayerWatchBrendanExit0 + applymovement 7, LittlerootTown_BrendansHouse_1F_Movement_BrendanGoUpstairs0 waitmovement 0 return -LittlerootTown_BrendansHouse_1F_EventScript_1F79D3:: @ 81F79D3 - applymovement EVENT_OBJ_ID_PLAYER, LittlerootTown_BrendansHouse_1F_Movement_1F79FB - applymovement 7, LittlerootTown_BrendansHouse_1F_Movement_1F7A0C +LittlerootTown_BrendansHouse_1F_EventScript_BrendanGoUpstairs1:: @ 81F79D3 + applymovement EVENT_OBJ_ID_PLAYER, LittlerootTown_BrendansHouse_1F_Movement_PlayerWatchBrendanExit1 + applymovement 7, LittlerootTown_BrendansHouse_1F_Movement_BrendanGoUpstairs1 waitmovement 0 return -LittlerootTown_BrendansHouse_1F_EventScript_1F79E5:: @ 81F79E5 - applymovement EVENT_OBJ_ID_PLAYER, LittlerootTown_BrendansHouse_1F_Movement_1F7A02 - applymovement 7, LittlerootTown_BrendansHouse_1F_Movement_1F7A16 +LittlerootTown_BrendansHouse_1F_EventScript_BrendanGoUpstairs2:: @ 81F79E5 + applymovement EVENT_OBJ_ID_PLAYER, LittlerootTown_BrendansHouse_1F_Movement_PlayerWatchBrendanExit2 + applymovement 7, LittlerootTown_BrendansHouse_1F_Movement_BrendanGoUpstairs2 waitmovement 0 return -LittlerootTown_BrendansHouse_1F_Movement_1F79F7: @ 81F79F7 +LittlerootTown_BrendansHouse_1F_Movement_PlayerWatchBrendanExit0: @ 81F79F7 delay_16 delay_8 walk_in_place_fastest_right step_end -LittlerootTown_BrendansHouse_1F_Movement_1F79FB: @ 81F79FB +LittlerootTown_BrendansHouse_1F_Movement_PlayerWatchBrendanExit1: @ 81F79FB delay_16 delay_8 walk_in_place_fastest_right @@ -259,13 +260,13 @@ LittlerootTown_BrendansHouse_1F_Movement_1F79FB: @ 81F79FB walk_in_place_fastest_up step_end -LittlerootTown_BrendansHouse_1F_Movement_1F7A02: @ 81F7A02 +LittlerootTown_BrendansHouse_1F_Movement_PlayerWatchBrendanExit2: @ 81F7A02 delay_16 delay_8 walk_in_place_fastest_left step_end -LittlerootTown_BrendansHouse_1F_Movement_1F7A06: @ 81F7A06 +LittlerootTown_BrendansHouse_1F_Movement_BrendanGoUpstairs0: @ 81F7A06 walk_in_place_fastest_right walk_right walk_in_place_fastest_up @@ -273,7 +274,7 @@ LittlerootTown_BrendansHouse_1F_Movement_1F7A06: @ 81F7A06 walk_up step_end -LittlerootTown_BrendansHouse_1F_Movement_1F7A0C: @ 81F7A0C +LittlerootTown_BrendansHouse_1F_Movement_BrendanGoUpstairs1: @ 81F7A0C walk_in_place_fastest_right walk_right walk_in_place_fastest_up @@ -285,7 +286,7 @@ LittlerootTown_BrendansHouse_1F_Movement_1F7A0C: @ 81F7A0C walk_up step_end -LittlerootTown_BrendansHouse_1F_Movement_1F7A16: @ 81F7A16 +LittlerootTown_BrendansHouse_1F_Movement_BrendanGoUpstairs2: @ 81F7A16 walk_in_place_fastest_left walk_left walk_in_place_fastest_up @@ -293,11 +294,11 @@ LittlerootTown_BrendansHouse_1F_Movement_1F7A16: @ 81F7A16 walk_up step_end -LittlerootTown_BrendansHouse_1F_Text_1F7A1C: @ 81F7A1C +PlayersHouse_1F_Text_IsntItNiceInHere: @ 81F7A1C .string "MOM: See, {PLAYER}?\n" .string "Isn't it nice in here, too?$" -LittlerootTown_BrendansHouse_1F_Text_1F7A46: @ 81F7A46 +PlayersHouse_1F_Text_MoversPokemonGoSetClock: @ 81F7A46 .string "The mover's POKéMON do all the work\n" .string "of moving us in and cleaning up after.\l" .string "This is so convenient!\p" @@ -307,91 +308,87 @@ LittlerootTown_BrendansHouse_1F_Text_1F7A46: @ 81F7A46 .string "our move here.\l" .string "Don't forget to set it!$" -LittlerootTown_BrendansHouse_1F_Text_1F7B24: @ 81F7B24 +PlayersHouse_1F_Text_ArentYouInterestedInRoom: @ 81F7B24 .string "MOM: Well, {PLAYER}?\p" .string "Aren't you interested in seeing your\n" .string "very own room?$" -LittlerootTown_BrendansHouse_1F_Text_1F7B67: @ 81F7B67 -LittlerootTown_MaysHouse_1F_Text_1F7B67: @ 81F7B67 +PlayersHouse_1F_Text_GoSetTheClock: @ 81F7B67 .string "MOM: {PLAYER}.\p" .string "Go set the clock in your room, honey.$" -LittlerootTown_BrendansHouse_1F_Text_1F7B96: @ 81F7B96 +PlayersHouse_1F_Text_OhComeQuickly: @ 81F7B96 .string "MOM: Oh! {PLAYER}, {PLAYER}!\n" .string "Quick! Come quickly!$" -LittlerootTown_BrendansHouse_1F_Text_1F7BBC: @ 81F7BBC -LittlerootTown_MaysHouse_1F_Text_1F7BBC: @ 81F7BBC +PlayersHouse_1F_Text_MaybeDadWillBeOn: @ 81F7BBC .string "MOM: Look! It's PETALBURG GYM!\n" .string "Maybe DAD will be on!$" -LittlerootTown_BrendansHouse_1F_Text_1F7BF1: @ 81F7BF1 -LittlerootTown_MaysHouse_1F_Text_1F7BF1: @ 81F7BF1 +PlayersHouse_1F_Text_ItsOverWeMissedHim: @ 81F7BF1 .string "MOM: Oh… It's over.\p" .string "I think DAD was on, but we missed him.\n" .string "Too bad.$" -LittlerootTown_BrendansHouse_1F_Text_1F7C35: @ 81F7C35 -LittlerootTown_MaysHouse_1F_Text_1F7C35: @ 81F7C35 +PlayersHouse_1F_Text_GoIntroduceYourselfNextDoor: @ 81F7C35 .string "Oh, yes.\n" .string "One of DAD's friends lives in town.\p" .string "PROF. BIRCH is his name.\p" .string "He lives right next door, so you should\n" .string "go over and introduce yourself.$" -LittlerootTown_BrendansHouse_1F_Text_1F7CC3: @ 81F7CC3 +PlayersHouse_1F_Text_SeeYouHoney: @ 81F7CC3 .string "MOM: See you, honey!$" -LittlerootTown_BrendansHouse_1F_Text_1F7CD8: @ 81F7CD8 +PlayersHouse_1F_Text_DidYouMeetProfBirch: @ 81F7CD8 .string "MOM: Did you introduce yourself to\n" .string "PROF. BIRCH?$" -LittlerootTown_BrendansHouse_1F_Text_1F7D08: @ 81F7D08 +PlayersHouse_1F_Text_YouShouldRestABit: @ 81F7D08 .string "MOM: How are you doing, {PLAYER}?\n" .string "You look a little tired.\p" .string "I think you should rest a bit.$" -LittlerootTown_BrendansHouse_1F_Text_1F7D5C: @ 81F7D5C +PlayersHouse_1F_Text_TakeCareHoney: @ 81F7D5C .string "MOM: Take care, honey!$" -LittlerootTown_BrendansHouse_1F_Text_1F7D73: @ 81F7D73 +PlayersHouse_1F_Text_GotDadsBadgeHeresSomethingFromMom: @ 81F7D73 .string "MOM: Oh? Did DAD give you that BADGE?\p" .string "Then here's something from your MOM!$" -LittlerootTown_BrendansHouse_1F_Text_1F7DBE: @ 81F7DBE +PlayersHouse_1F_Text_DontPushYourselfTooHard: @ 81F7DBE .string "Don't push yourself too hard, dear.\n" .string "You can always come home.\p" .string "Go for it, honey!$" -LittlerootTown_BrendansHouse_1F_Text_1F7E0E: @ 81F7E0E +PlayersHouse_1F_Text_IsThatAPokenav: @ 81F7E0E .string "MOM: What is that, honey? A POKéNAV?\n" .string "Someone from DEVON gave it to you?\p" .string "Well, honey, how about registering\n" .string "your mom?\p" .string "… … …$" -LittlerootTown_BrendansHouse_1F_Text_1F7E89: @ 81F7E89 +PlayersHouse_1F_Text_RegisteredMom: @ 81F7E89 .string "Registered MOM\n" .string "in the POKéNAV.$" -LittlerootTown_BrendansHouse_1F_Text_1F7EA8: @ 81F7EA8 +PlayersHouse_1F_Text_Vigoroth1: @ 81F7EA8 .string "Fugiiiiih!$" -LittlerootTown_BrendansHouse_1F_Text_1F7EB3: @ 81F7EB3 +PlayersHouse_1F_Text_Vigoroth2: @ 81F7EB3 .string "Huggoh, uggo uggo…$" -LittlerootTown_BrendansHouse_1F_Text_1F7EC6: @ 81F7EC6 +PlayersHouse_1F_Text_ReportFromPetalburgGym: @ 81F7EC6 .string "INTERVIEWER: …We brought you this\n" .string "report from in front of PETALBURG GYM.$" -LittlerootTown_BrendansHouse_1F_Text_1F7F0F: @ 81F7F0F +PlayersHouse_1F_Text_TheresAMovieOnTV: @ 81F7F0F .string "There is a movie on TV.\p" .string "Two men are dancing on a big piano\n" .string "keyboard.\p" .string "Better get going!$" -LittlerootTown_BrendansHouse_1F_Text_1F7F66: @ 81F7F66 +PlayersHouse_1F_Text_RunningShoesManual: @ 81F7F66 .string "It's the instruction booklet for the\n" .string "RUNNING SHOES.\p" .string "“Press the B Button to run while\n" @@ -399,7 +396,7 @@ LittlerootTown_BrendansHouse_1F_Text_1F7F66: @ 81F7F66 .string "“Lace up your RUNNING SHOES and hit\n" .string "the road running!”$" -LittlerootTown_BrendansHouse_1F_Text_1F800E: @ 81F800E +PlayersHouse_1F_Text_TicketFromBrineyCameForYou: @ 81F800E .string "DAD: Hm?\p" .string "Hey, it's {PLAYER}!\p" .string "It's been a while since I saw you,\n" @@ -410,26 +407,26 @@ LittlerootTown_BrendansHouse_1F_Text_1F800E: @ 81F800E .string "This came to you from someone named\l" .string "MR. BRINEY.$" -LittlerootTown_BrendansHouse_1F_Text_1F80FE: @ 81F80FE +PlayersHouse_1F_Text_PortsInSlateportLilycove: @ 81F80FE .string "DAD: Hm, a TICKET for a ferry?\p" .string "If I recall, there are ferry ports in\n" .string "SLATEPORT and LILYCOVE.$" -LittlerootTown_BrendansHouse_1F_Text_1F815B: @ 81F815B +PlayersHouse_1F_Text_BetterGetBackToGym: @ 81F815B .string "I'd better get back to PETALBURG GYM.\p" .string "MOM, thanks for looking after the house\n" .string "while I'm away.$" -LittlerootTown_BrendansHouse_1F_Text_1F81B9: @ 81F81B9 +PlayersHouse_1F_Text_DadShouldStayLonger: @ 81F81B9 .string "MOM: That DAD of yours…\p" .string "He comes home for the first time in a\n" .string "while, but all he talks about is POKéMON.\p" .string "He should relax and stay a little longer.$" -LittlerootTown_BrendansHouse_1F_Text_1F824B: @ 81F824B +PlayersHouse_1F_Text_IsThatABreakingStory: @ 81F824B .string "MOM: Is that a breaking news story?$" -LittlerootTown_BrendansHouse_1F_Text_1F826F: @ 81F826F +PlayersHouse_1F_Text_LatiEmergencyNewsFlash: @ 81F826F .string "We bring you this emergency\n" .string "news flash!\p" .string "In various HOENN locales, there have\n" @@ -440,11 +437,11 @@ LittlerootTown_BrendansHouse_1F_Text_1F826F: @ 81F826F .string "We now return you to the regular\n" .string "movie program.$" -LittlerootTown_BrendansHouse_1F_Text_1F8351: @ 81F8351 +PlayersHouse_1F_Text_WhatColorDidTheySay: @ 81F8351 .string "MOM: {PLAYER}, did you catch that?\p" .string "What color did the announcer say\n" .string "that POKéMON was?$" -LittlerootTown_BrendansHouse_1F_Text_1F83A1: @ 81F83A1 +PlayersHouse_1F_Text_StillUnknownPokemon: @ 81F83A1 .string "MOM: Well, isn't that something!\n" .string "There are still unknown POKéMON.$" diff --git a/data/maps/LittlerootTown_BrendansHouse_2F/map.json b/data/maps/LittlerootTown_BrendansHouse_2F/map.json index e07959b205..01af64e7d3 100644 --- a/data/maps/LittlerootTown_BrendansHouse_2F/map.json +++ b/data/maps/LittlerootTown_BrendansHouse_2F/map.json @@ -24,7 +24,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "LittlerootTown_BrendansHouse_2F_EventScript_1F94C1", + "script": "RivalsHouse_2F_EventScript_Rival", "flag": "FLAG_HIDE_LITTLEROOT_TOWN_BRENDANS_HOUSE_RIVAL_BEDROOM" }, { @@ -206,7 +206,7 @@ "movement_range_y": 1, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "LittlerootTown_BrendansHouse_2F_EventScript_1F8481", + "script": "LittlerootTown_BrendansHouse_2F_EventScript_RivalsPokeBall", "flag": "FLAG_HIDE_LITTLEROOT_TOWN_BRENDANS_HOUSE_2F_POKE_BALL" }, { @@ -240,7 +240,7 @@ "y": 1, "elevation": 0, "player_facing_dir": "BG_EVENT_PLAYER_FACING_NORTH", - "script": "EventScript_PlayerPCMale" + "script": "LittlerootTown_BrendansHouse_2F_EventScript_PC" }, { "type": "sign", @@ -248,7 +248,7 @@ "y": 1, "elevation": 0, "player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY", - "script": "LittlerootTown_BrendansHouse_2F_EventScript_1F8656" + "script": "PlayersHouse_2F_EventScript_Notebook" }, { "type": "sign", @@ -256,7 +256,7 @@ "y": 1, "elevation": 0, "player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY", - "script": "LittlerootTown_BrendansHouse_2F_EventScript_292781" + "script": "LittlerootTown_BrendansHouse_2F_EventScript_WallClock" }, { "type": "sign", @@ -264,7 +264,7 @@ "y": 1, "elevation": 0, "player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY", - "script": "LittlerootTown_BrendansHouse_2F_EventScript_1F865F" + "script": "PlayersHouse_2F_EventScript_GameCube" } ] } \ No newline at end of file diff --git a/data/maps/LittlerootTown_BrendansHouse_2F/scripts.inc b/data/maps/LittlerootTown_BrendansHouse_2F/scripts.inc index 130781f23c..101e2bbad1 100644 --- a/data/maps/LittlerootTown_BrendansHouse_2F/scripts.inc +++ b/data/maps/LittlerootTown_BrendansHouse_2F/scripts.inc @@ -1,70 +1,70 @@ LittlerootTown_BrendansHouse_2F_MapScripts:: @ 81F83E3 - map_script MAP_SCRIPT_ON_TRANSITION, LittlerootTown_BrendansHouse_2F_MapScript1_1F83EE - map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, LittlerootTown_BrendansHouse_2F_MapScript2_1F846A + map_script MAP_SCRIPT_ON_TRANSITION, LittlerootTown_BrendansHouse_2F_OnTransition + map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, LittlerootTown_BrendansHouse_2F_OnWarp .byte 0 -LittlerootTown_BrendansHouse_2F_MapScript1_1F83EE: @ 81F83EE +LittlerootTown_BrendansHouse_2F_OnTransition: @ 81F83EE compare VAR_LITTLEROOT_RIVAL_STATE, 2 - call_if_lt LittlerootTown_BrendansHouse_2F_EventScript_1F8457 + call_if_lt LittlerootTown_BrendansHouse_2F_EventScript_CheckSetReadyToMeetBrendan compare VAR_LITTLEROOT_RIVAL_STATE, 3 - call_if_ge LittlerootTown_BrendansHouse_2F_EventScript_1F841A + call_if_ge LittlerootTown_BrendansHouse_2F_EventScript_CheckShouldUpdateBrendanPos compare VAR_LITTLEROOT_INTRO_STATE, 4 - call_if_eq LittlerootTown_BrendansHouse_2F_EventScript_2926FE + call_if_eq PlayersHouse_2F_EventScript_BlockStairsUntilClockIsSet call SecretBase_EventScript_SetDecorationFlags setvar VAR_SECRET_BASE_INITIALIZED, 0 end -LittlerootTown_BrendansHouse_2F_EventScript_1F841A:: @ 81F841A - goto_if_set FLAG_MET_RIVAL_LILYCOVE, LittlerootTown_BrendansHouse_2F_EventScript_1F8433 +LittlerootTown_BrendansHouse_2F_EventScript_CheckShouldUpdateBrendanPos:: @ 81F841A + goto_if_set FLAG_MET_RIVAL_LILYCOVE, LittlerootTown_BrendansHouse_2F_EventScript_TryUpdateBrendanPos compare VAR_BIRCH_LAB_STATE, 2 - goto_if_ge LittlerootTown_BrendansHouse_2F_EventScript_1F8456 - goto LittlerootTown_BrendansHouse_2F_EventScript_1F8433 + goto_if_ge LittlerootTown_BrendansHouse_2F_EventScript_Ret + goto LittlerootTown_BrendansHouse_2F_EventScript_TryUpdateBrendanPos -LittlerootTown_BrendansHouse_2F_EventScript_1F8433:: @ 81F8433 +LittlerootTown_BrendansHouse_2F_EventScript_TryUpdateBrendanPos:: @ 81F8433 checkplayergender compare VAR_RESULT, MALE - goto_if_eq LittlerootTown_BrendansHouse_2F_EventScript_1F8456 + goto_if_eq LittlerootTown_BrendansHouse_2F_EventScript_Ret compare VAR_DEX_UPGRADE_JOHTO_STARTER_STATE, 2 - goto_if_ge LittlerootTown_BrendansHouse_2F_EventScript_1F9309 + goto_if_ge LittlerootTown_MaysHouse_2F_EventScript_Ret @ Odd that the MaysHouse equivalent was used here instead setobjectxyperm 1, 0, 2 setobjectmovementtype 1, MOVEMENT_TYPE_FACE_UP return -LittlerootTown_BrendansHouse_2F_EventScript_1F8456:: @ 81F8456 +LittlerootTown_BrendansHouse_2F_EventScript_Ret:: @ 81F8456 return -LittlerootTown_BrendansHouse_2F_EventScript_1F8457:: @ 81F8457 +LittlerootTown_BrendansHouse_2F_EventScript_CheckSetReadyToMeetBrendan:: @ 81F8457 checkplayergender compare VAR_RESULT, FEMALE - goto_if_eq LittlerootTown_BrendansHouse_2F_EventScript_1F8464 + goto_if_eq LittlerootTown_BrendansHouse_2F_EventScript_SetReadyToMeetBrendan return -LittlerootTown_BrendansHouse_2F_EventScript_1F8464:: @ 81F8464 +LittlerootTown_BrendansHouse_2F_EventScript_SetReadyToMeetBrendan:: @ 81F8464 setvar VAR_LITTLEROOT_RIVAL_STATE, 2 return -LittlerootTown_BrendansHouse_2F_MapScript2_1F846A: @ 81F846A - map_script_2 VAR_SECRET_BASE_INITIALIZED, 0, LittlerootTown_BrendansHouse_2F_EventScript_1F8474 +LittlerootTown_BrendansHouse_2F_OnWarp: @ 81F846A + map_script_2 VAR_SECRET_BASE_INITIALIZED, 0, LittlerootTown_BrendansHouse_2F_EventScript_CheckInitDecor .2byte 0 -LittlerootTown_BrendansHouse_2F_EventScript_1F8474:: @ 81F8474 +LittlerootTown_BrendansHouse_2F_EventScript_CheckInitDecor:: @ 81F8474 checkplayergender compare VAR_RESULT, MALE goto_if_eq SecretBase_EventScript_InitDecorations end -LittlerootTown_BrendansHouse_2F_EventScript_1F8481:: @ 81F8481 +LittlerootTown_BrendansHouse_2F_EventScript_RivalsPokeBall:: @ 81F8481 lockall compare VAR_LITTLEROOT_RIVAL_STATE, 2 - goto_if_eq LittlerootTown_BrendansHouse_2F_EventScript_1F8497 - msgbox LittlerootTown_BrendansHouse_2F_Text_1F9991, MSGBOX_DEFAULT + goto_if_eq LittlerootTown_BrendansHouse_2F_EventScript_MeetBrendan + msgbox RivalsHouse_2F_Text_ItsRivalsPokeBall, MSGBOX_DEFAULT releaseall end -LittlerootTown_BrendansHouse_2F_EventScript_1F8497:: @ 81F8497 +LittlerootTown_BrendansHouse_2F_EventScript_MeetBrendan:: @ 81F8497 delay 10 addobject 1 - applymovement 1, LittlerootTown_BrendansHouse_2F_Movement_1F85BC + applymovement 1, LittlerootTown_BrendansHouse_2F_Movement_BrendanEnters waitmovement 0 playse SE_PIN applymovement 1, Common_Movement_ExclamationMark @@ -74,13 +74,13 @@ LittlerootTown_BrendansHouse_2F_EventScript_1F8497:: @ 81F8497 delay 10 playbgm MUS_BOY_SUP, 1 compare VAR_FACING, DIR_NORTH - call_if_eq LittlerootTown_BrendansHouse_2F_EventScript_1F8507 + call_if_eq LittlerootTown_BrendansHouse_2F_EventScript_MeetBrendanNorth compare VAR_FACING, DIR_SOUTH - call_if_eq LittlerootTown_BrendansHouse_2F_EventScript_1F8536 + call_if_eq LittlerootTown_BrendansHouse_2F_EventScript_MeetBrendanSouth compare VAR_FACING, DIR_WEST - call_if_eq LittlerootTown_BrendansHouse_2F_EventScript_1F8565 + call_if_eq LittlerootTown_BrendansHouse_2F_EventScript_MeetBrendanWest compare VAR_FACING, DIR_EAST - call_if_eq LittlerootTown_BrendansHouse_2F_EventScript_1F8594 + call_if_eq LittlerootTown_BrendansHouse_2F_EventScript_MeetBrendanEast setvar VAR_LITTLEROOT_RIVAL_STATE, 3 setflag FLAG_HIDE_LITTLEROOT_TOWN_BRENDANS_HOUSE_2F_POKE_BALL clearflag FLAG_HIDE_LITTLEROOT_TOWN_BRENDANS_HOUSE_RIVAL_BEDROOM @@ -90,60 +90,60 @@ LittlerootTown_BrendansHouse_2F_EventScript_1F8497:: @ 81F8497 releaseall end -LittlerootTown_BrendansHouse_2F_EventScript_1F8507:: @ 81F8507 - applymovement 1, LittlerootTown_BrendansHouse_2F_Movement_1F85C0 +LittlerootTown_BrendansHouse_2F_EventScript_MeetBrendanNorth:: @ 81F8507 + applymovement 1, LittlerootTown_BrendansHouse_2F_Movement_BrendanApproachPlayerNorth waitmovement 0 applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceFastestRight waitmovement 0 - msgbox LittlerootTown_BrendansHouse_2F_Text_1F97B4, MSGBOX_DEFAULT + msgbox RivalsHouse_2F_Text_BrendanWhoAreYou, MSGBOX_DEFAULT closemessage - applymovement EVENT_OBJ_ID_PLAYER, LittlerootTown_BrendansHouse_2F_Movement_1F85CF - applymovement 1, LittlerootTown_BrendansHouse_2F_Movement_1F85C6 + applymovement EVENT_OBJ_ID_PLAYER, LittlerootTown_BrendansHouse_2F_Movement_PlayerWatchBrendanNorth + applymovement 1, LittlerootTown_BrendansHouse_2F_Movement_BrendanWalkToPCNorth waitmovement 0 return -LittlerootTown_BrendansHouse_2F_EventScript_1F8536:: @ 81F8536 - applymovement 1, LittlerootTown_BrendansHouse_2F_Movement_1F85D7 +LittlerootTown_BrendansHouse_2F_EventScript_MeetBrendanSouth:: @ 81F8536 + applymovement 1, LittlerootTown_BrendansHouse_2F_Movement_BrendanApproachPlayerSouth waitmovement 0 applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceFastestRight waitmovement 0 - msgbox LittlerootTown_BrendansHouse_2F_Text_1F97B4, MSGBOX_DEFAULT + msgbox RivalsHouse_2F_Text_BrendanWhoAreYou, MSGBOX_DEFAULT closemessage - applymovement EVENT_OBJ_ID_PLAYER, LittlerootTown_BrendansHouse_2F_Movement_1F85E2 - applymovement 1, LittlerootTown_BrendansHouse_2F_Movement_1F85DB + applymovement EVENT_OBJ_ID_PLAYER, LittlerootTown_BrendansHouse_2F_Movement_PlayerWatchBrendanSouth + applymovement 1, LittlerootTown_BrendansHouse_2F_Movement_BrendanWalkToPCSouth waitmovement 0 return -LittlerootTown_BrendansHouse_2F_EventScript_1F8565:: @ 81F8565 - applymovement 1, LittlerootTown_BrendansHouse_2F_Movement_1F85E8 +LittlerootTown_BrendansHouse_2F_EventScript_MeetBrendanWest:: @ 81F8565 + applymovement 1, LittlerootTown_BrendansHouse_2F_Movement_BrendanApproachPlayerWest waitmovement 0 applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceFastestRight waitmovement 0 - msgbox LittlerootTown_BrendansHouse_2F_Text_1F97B4, MSGBOX_DEFAULT + msgbox RivalsHouse_2F_Text_BrendanWhoAreYou, MSGBOX_DEFAULT closemessage - applymovement EVENT_OBJ_ID_PLAYER, LittlerootTown_BrendansHouse_2F_Movement_1F85F6 - applymovement 1, LittlerootTown_BrendansHouse_2F_Movement_1F85ED + applymovement EVENT_OBJ_ID_PLAYER, LittlerootTown_BrendansHouse_2F_Movement_PlayerWatchBrendanWest + applymovement 1, LittlerootTown_BrendansHouse_2F_Movement_BrendanWalkToPCWest waitmovement 0 return -LittlerootTown_BrendansHouse_2F_EventScript_1F8594:: @ 81F8594 - applymovement 1, LittlerootTown_BrendansHouse_2F_Movement_1F85FD +LittlerootTown_BrendansHouse_2F_EventScript_MeetBrendanEast:: @ 81F8594 + applymovement 1, LittlerootTown_BrendansHouse_2F_Movement_BrendanApproachPlayerEast waitmovement 0 applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceFastestUp waitmovement 0 - msgbox LittlerootTown_BrendansHouse_2F_Text_1F97B4, MSGBOX_DEFAULT + msgbox RivalsHouse_2F_Text_BrendanWhoAreYou, MSGBOX_DEFAULT closemessage - applymovement 1, LittlerootTown_BrendansHouse_2F_Movement_1F8604 + applymovement 1, LittlerootTown_BrendansHouse_2F_Movement_BrendanWalkToPCEast waitmovement 0 return -LittlerootTown_BrendansHouse_2F_Movement_1F85BC: @ 81F85BC +LittlerootTown_BrendansHouse_2F_Movement_BrendanEnters: @ 81F85BC walk_down walk_down walk_in_place_fastest_left step_end -LittlerootTown_BrendansHouse_2F_Movement_1F85C0: @ 81F85C0 +LittlerootTown_BrendansHouse_2F_Movement_BrendanApproachPlayerNorth: @ 81F85C0 walk_left walk_left walk_down @@ -151,7 +151,7 @@ LittlerootTown_BrendansHouse_2F_Movement_1F85C0: @ 81F85C0 walk_left step_end -LittlerootTown_BrendansHouse_2F_Movement_1F85C6: @ 81F85C6 +LittlerootTown_BrendansHouse_2F_Movement_BrendanWalkToPCNorth: @ 81F85C6 walk_up walk_up walk_up @@ -162,7 +162,7 @@ LittlerootTown_BrendansHouse_2F_Movement_1F85C6: @ 81F85C6 walk_in_place_fastest_up step_end -LittlerootTown_BrendansHouse_2F_Movement_1F85CF: @ 81F85CF +LittlerootTown_BrendansHouse_2F_Movement_PlayerWatchBrendanNorth: @ 81F85CF delay_16 walk_in_place_fastest_up delay_16 @@ -172,13 +172,13 @@ LittlerootTown_BrendansHouse_2F_Movement_1F85CF: @ 81F85CF walk_in_place_fastest_left step_end -LittlerootTown_BrendansHouse_2F_Movement_1F85D7: @ 81F85D7 +LittlerootTown_BrendansHouse_2F_Movement_BrendanApproachPlayerSouth: @ 81F85D7 walk_left walk_left walk_left step_end -LittlerootTown_BrendansHouse_2F_Movement_1F85DB: @ 81F85DB +LittlerootTown_BrendansHouse_2F_Movement_BrendanWalkToPCSouth: @ 81F85DB walk_up walk_left walk_left @@ -187,7 +187,7 @@ LittlerootTown_BrendansHouse_2F_Movement_1F85DB: @ 81F85DB walk_in_place_fastest_up step_end -LittlerootTown_BrendansHouse_2F_Movement_1F85E2: @ 81F85E2 +LittlerootTown_BrendansHouse_2F_Movement_PlayerWatchBrendanSouth: @ 81F85E2 delay_16 walk_in_place_fastest_up delay_16 @@ -195,14 +195,14 @@ LittlerootTown_BrendansHouse_2F_Movement_1F85E2: @ 81F85E2 walk_in_place_fastest_left step_end -LittlerootTown_BrendansHouse_2F_Movement_1F85E8: @ 81F85E8 +LittlerootTown_BrendansHouse_2F_Movement_BrendanApproachPlayerWest: @ 81F85E8 walk_left walk_left walk_down walk_in_place_fastest_left step_end -LittlerootTown_BrendansHouse_2F_Movement_1F85ED: @ 81F85ED +LittlerootTown_BrendansHouse_2F_Movement_BrendanWalkToPCWest: @ 81F85ED walk_up walk_up walk_left @@ -213,7 +213,7 @@ LittlerootTown_BrendansHouse_2F_Movement_1F85ED: @ 81F85ED walk_in_place_fastest_up step_end -LittlerootTown_BrendansHouse_2F_Movement_1F85F6: @ 81F85F6 +LittlerootTown_BrendansHouse_2F_Movement_PlayerWatchBrendanWest: @ 81F85F6 delay_8 delay_16 walk_in_place_fastest_up @@ -222,7 +222,7 @@ LittlerootTown_BrendansHouse_2F_Movement_1F85F6: @ 81F85F6 walk_in_place_fastest_left step_end -LittlerootTown_BrendansHouse_2F_Movement_1F85FD: @ 81F85FD +LittlerootTown_BrendansHouse_2F_Movement_BrendanApproachPlayerEast: @ 81F85FD walk_left walk_left walk_left @@ -231,29 +231,30 @@ LittlerootTown_BrendansHouse_2F_Movement_1F85FD: @ 81F85FD walk_in_place_fastest_down step_end -LittlerootTown_BrendansHouse_2F_Movement_1F8604: @ 81F8604 +LittlerootTown_BrendansHouse_2F_Movement_BrendanWalkToPCEast: @ 81F8604 walk_up walk_left walk_left walk_in_place_fastest_up step_end -LittlerootTown_BrendansHouse_2F_Movement_1F8609: @ 81F8609 +@ Unused, the player is already facing this direction so its unneeded +LittlerootTown_BrendansHouse_2F_Movement_PlayerWatchBrendanEast: @ 81F8609 delay_16 delay_16 walk_in_place_fastest_left step_end -EventScript_PlayerPCMale:: @ 81F860D +LittlerootTown_BrendansHouse_2F_EventScript_PC:: @ 81F860D lockall checkplayergender compare VAR_RESULT, MALE - goto_if_eq LittlerootTown_BrendansHouse_2F_EventScript_1F8626 + goto_if_eq LittlerootTown_BrendansHouse_2F_EventScript_CheckPlayersPC compare VAR_RESULT, FEMALE - goto_if_eq LittlerootTown_BrendansHouse_2F_EventScript_1F864C + goto_if_eq LittlerootTown_BrendansHouse_2F_EventScript_CheckRivalsPC end -LittlerootTown_BrendansHouse_2F_EventScript_1F8626:: @ 81F8626 +LittlerootTown_BrendansHouse_2F_EventScript_CheckPlayersPC:: @ 81F8626 setvar VAR_0x8004, 1 special DoPCTurnOnEffect playse SE_PC_ON @@ -263,33 +264,31 @@ LittlerootTown_BrendansHouse_2F_EventScript_1F8626:: @ 81F8626 releaseall end -LittlerootTown_BrendansHouse_2F_EventScript_1F863F:: @ 81F863F +LittlerootTown_BrendansHouse_2F_EventScript_TurnOffPlayerPC:: @ 81F863F setvar VAR_0x8004, 1 playse SE_PC_OFF special DoPCTurnOffEffect releaseall end -LittlerootTown_BrendansHouse_2F_EventScript_1F864C:: @ 81F864C +LittlerootTown_BrendansHouse_2F_EventScript_CheckRivalsPC:: @ 81F864C msgbox gText_PokemonTrainerSchoolEmail, MSGBOX_DEFAULT releaseall end -LittlerootTown_BrendansHouse_2F_EventScript_1F8656:: @ 81F8656 -LittlerootTown_MaysHouse_2F_EventScript_1F8656:: @ 81F8656 - msgbox LittlerootTown_BrendansHouse_2F_Text_1F877F, MSGBOX_SIGN +PlayersHouse_2F_EventScript_Notebook:: @ 81F8656 + msgbox PlayersHouse_2F_Text_Notebook, MSGBOX_SIGN end -LittlerootTown_BrendansHouse_2F_EventScript_1F865F:: @ 81F865F -LittlerootTown_MaysHouse_2F_EventScript_1F865F:: @ 81F865F - msgbox LittlerootTown_BrendansHouse_2F_Text_1F884F, MSGBOX_SIGN +PlayersHouse_2F_EventScript_GameCube:: @ 81F865F + msgbox PlayersHouse_2F_Text_ItsAGameCube, MSGBOX_SIGN end -LittlerootTown_BrendansHouse_2F_Text_1F8668: @ 81F8668 +PlayersHouse_2F_Text_ClockIsStopped: @ 81F8668 .string "The clock is stopped…\p" .string "Better set it and start it!$" -LittlerootTown_BrendansHouse_2F_Text_1F869A: @ 81F869A +PlayersHouse_2F_Text_HowDoYouLikeYourRoom: @ 81F869A .string "MOM: {PLAYER}, how do you like your\n" .string "new room?\p" .string "Good! Everything's put away neatly!\p" @@ -299,7 +298,7 @@ LittlerootTown_BrendansHouse_2F_Text_1F869A: @ 81F869A .string "Oh, you should make sure that\n" .string "everything's all there on your desk.$" -LittlerootTown_BrendansHouse_2F_Text_1F877F: @ 81F877F +PlayersHouse_2F_Text_Notebook: @ 81F877F .string "{PLAYER} flipped open the notebook.\p" .string "ADVENTURE RULE NO. 1\n" .string "Open the MENU with START.\p" @@ -311,7 +310,7 @@ Common_Text_LookCloserAtMap: @ 81F8820 .string "{PLAYER} took a closer look at the\n" .string "HOENN region map.$" -LittlerootTown_BrendansHouse_2F_Text_1F884F: @ 81F884F +PlayersHouse_2F_Text_ItsAGameCube: @ 81F884F .string "It's a Nintendo GameCube.\p" .string "A Game Boy Advance is connected to\n" .string "serve as the Controller.$" diff --git a/data/maps/LittlerootTown_MaysHouse_1F/map.json b/data/maps/LittlerootTown_MaysHouse_1F/map.json index 0938e69660..118e3e8193 100644 --- a/data/maps/LittlerootTown_MaysHouse_1F/map.json +++ b/data/maps/LittlerootTown_MaysHouse_1F/map.json @@ -24,7 +24,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "LittlerootTown_MaysHouse_1F_EventScript_2929C5", + "script": "PlayersHouse_1F_EventScript_Mom", "flag": "FLAG_HIDE_LITTLEROOT_TOWN_MAYS_HOUSE_MOM" }, { @@ -37,7 +37,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "LittlerootTown_MaysHouse_1F_EventScript_292ABA", + "script": "PlayersHouse_1F_EventScript_Vigoroth1", "flag": "FLAG_HIDE_LITTLEROOT_TOWN_PLAYERS_HOUSE_VIGOROTH_1" }, { @@ -50,7 +50,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "LittlerootTown_MaysHouse_1F_EventScript_292ACD", + "script": "PlayersHouse_1F_EventScript_Vigoroth2", "flag": "FLAG_HIDE_LITTLEROOT_TOWN_PLAYERS_HOUSE_VIGOROTH_2" }, { @@ -63,7 +63,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "LittlerootTown_MaysHouse_1F_EventScript_1F89F3", + "script": "RivalsHouse_1F_EventScript_RivalMom", "flag": "FLAG_HIDE_LITTLEROOT_TOWN_MAYS_HOUSE_RIVAL_MOM" }, { @@ -89,7 +89,7 @@ "movement_range_y": 1, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "LittlerootTown_MaysHouse_1F_EventScript_1F8A3D", + "script": "RivalsHouse_1F_EventScript_RivalSibling", "flag": "FLAG_HIDE_LITTLEROOT_TOWN_MAYS_HOUSE_RIVAL_SIBLING" }, { @@ -103,7 +103,7 @@ "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", "script": "0x0", - "flag": "FLAG_HIDE_LITTLEROOT_TOWN_MAYS_HOUSE_BRENDAN" + "flag": "FLAG_HIDE_LITTLEROOT_TOWN_MAYS_HOUSE_MAY" } ], "warp_events": [ @@ -137,7 +137,7 @@ "elevation": 0, "var": "VAR_LITTLEROOT_INTRO_STATE", "var_value": "4", - "script": "LittlerootTown_MaysHouse_1F_EventScript_1F8A4C" + "script": "LittlerootTown_MaysHouse_1F_EventScript_GoSeeRoom" }, { "type": "trigger", @@ -146,7 +146,7 @@ "elevation": 0, "var": "VAR_LITTLEROOT_RIVAL_STATE", "var_value": "2", - "script": "LittlerootTown_MaysHouse_1F_EventScript_1F8A67" + "script": "LittlerootTown_MaysHouse_1F_EventScript_MeetRival0" }, { "type": "trigger", @@ -155,7 +155,7 @@ "elevation": 0, "var": "VAR_LITTLEROOT_RIVAL_STATE", "var_value": "2", - "script": "LittlerootTown_MaysHouse_1F_EventScript_1F8A73" + "script": "LittlerootTown_MaysHouse_1F_EventScript_MeetRival1" }, { "type": "trigger", @@ -164,7 +164,7 @@ "elevation": 0, "var": "VAR_LITTLEROOT_RIVAL_STATE", "var_value": "2", - "script": "LittlerootTown_MaysHouse_1F_EventScript_1F8A7F" + "script": "LittlerootTown_MaysHouse_1F_EventScript_MeetRival2" } ], "bg_events": [] diff --git a/data/maps/LittlerootTown_MaysHouse_1F/scripts.inc b/data/maps/LittlerootTown_MaysHouse_1F/scripts.inc index 74654f7eef..55736f652c 100644 --- a/data/maps/LittlerootTown_MaysHouse_1F/scripts.inc +++ b/data/maps/LittlerootTown_MaysHouse_1F/scripts.inc @@ -1,93 +1,94 @@ LittlerootTown_MaysHouse_1F_MapScripts:: @ 81F88A5 - map_script MAP_SCRIPT_ON_LOAD, LittlerootTown_MaysHouse_1F_MapScript1_1F88B5 - map_script MAP_SCRIPT_ON_TRANSITION, LittlerootTown_MaysHouse_1F_MapScript1_1F88F4 - map_script MAP_SCRIPT_ON_FRAME_TABLE, LittlerootTown_MaysHouse_1F_MapScript2_1F893A + map_script MAP_SCRIPT_ON_LOAD, LittlerootTown_MaysHouse_1F_OnLoad + map_script MAP_SCRIPT_ON_TRANSITION, LittlerootTown_MaysHouse_1F_OnTransition + map_script MAP_SCRIPT_ON_FRAME_TABLE, LittlerootTown_MaysHouse_1F_OnFrame .byte 0 -LittlerootTown_MaysHouse_1F_MapScript1_1F88B5: @ 81F88B5 +LittlerootTown_MaysHouse_1F_OnLoad: @ 81F88B5 compare VAR_LITTLEROOT_INTRO_STATE, 6 - call_if_lt LittlerootTown_MaysHouse_1F_EventScript_1F88CA - call_if_set FLAG_RECEIVED_RUNNING_SHOES, LittlerootTown_MaysHouse_1F_EventScript_1F88DD + call_if_lt LittlerootTown_MaysHouse_1F_EventScript_SetMovingBoxes + call_if_set FLAG_RECEIVED_RUNNING_SHOES, LittlerootTown_MaysHouse_1F_EventScript_CheckShowShoesManual end -LittlerootTown_MaysHouse_1F_EventScript_1F88CA:: @ 81F88CA +LittlerootTown_MaysHouse_1F_EventScript_SetMovingBoxes:: @ 81F88CA setmetatile 5, 4, METATILE_BrendansMaysHouse_MovingBox_Open, 1 setmetatile 5, 2, METATILE_BrendansMaysHouse_MovingBox_Closed, 1 return -LittlerootTown_MaysHouse_1F_EventScript_1F88DD:: @ 81F88DD +LittlerootTown_MaysHouse_1F_EventScript_CheckShowShoesManual:: @ 81F88DD checkplayergender compare VAR_RESULT, FEMALE - goto_if_eq LittlerootTown_MaysHouse_1F_EventScript_1F88EA + goto_if_eq LittlerootTown_MaysHouse_1F_EventScript_ShowRunningShoesManual return -LittlerootTown_MaysHouse_1F_EventScript_1F88EA:: @ 81F88EA +LittlerootTown_MaysHouse_1F_EventScript_ShowRunningShoesManual:: @ 81F88EA setmetatile 6, 7, METATILE_BrendansMaysHouse_BookOnTable, 1 return -LittlerootTown_MaysHouse_1F_MapScript1_1F88F4: @ 81F88F4 +LittlerootTown_MaysHouse_1F_OnTransition: @ 81F88F4 compare VAR_LITTLEROOT_INTRO_STATE, 3 - call_if_eq LittlerootTown_MaysHouse_1F_EventScript_1F892E + call_if_eq LittlerootTown_MaysHouse_1F_EventScript_MoveMomToDoor compare VAR_LITTLEROOT_INTRO_STATE, 5 - call_if_eq LittlerootTown_MaysHouse_1F_EventScript_1F8916 + call_if_eq LittlerootTown_MaysHouse_1F_EventScript_MoveMomToStairs compare VAR_LITTLEROOT_INTRO_STATE, 6 - call_if_eq LittlerootTown_MaysHouse_1F_EventScript_1F8922 + call_if_eq LittlerootTown_MaysHouse_1F_EventScript_MoveMomToTV end -LittlerootTown_MaysHouse_1F_EventScript_1F8916:: @ 81F8916 +LittlerootTown_MaysHouse_1F_EventScript_MoveMomToStairs:: @ 81F8916 setobjectxyperm 1, 2, 4 setobjectmovementtype 1, MOVEMENT_TYPE_FACE_UP return -LittlerootTown_MaysHouse_1F_EventScript_1F8922:: @ 81F8922 +LittlerootTown_MaysHouse_1F_EventScript_MoveMomToTV:: @ 81F8922 setobjectxyperm 1, 6, 5 setobjectmovementtype 1, MOVEMENT_TYPE_FACE_UP return -LittlerootTown_MaysHouse_1F_EventScript_1F892E:: @ 81F892E +LittlerootTown_MaysHouse_1F_EventScript_MoveMomToDoor:: @ 81F892E setobjectxyperm 1, 1, 8 setobjectmovementtype 1, MOVEMENT_TYPE_FACE_UP return -LittlerootTown_MaysHouse_1F_MapScript2_1F893A: @ 81F893A - map_script_2 VAR_LITTLEROOT_INTRO_STATE, 3, LittlerootTown_MaysHouse_1F_EventScript_1F898C - map_script_2 VAR_LITTLEROOT_INTRO_STATE, 5, LittlerootTown_MaysHouse_1F_EventScript_1F8964 - map_script_2 VAR_LITTLEROOT_INTRO_STATE, 6, LittlerootTown_MaysHouse_1F_EventScript_1F899D - map_script_2 VAR_LITTLEROOT_HOUSES_STATE_2, 1, LittlerootTown_MaysHouse_1F_EventScript_1F89AE - map_script_2 VAR_LITTLEROOT_HOUSES_STATE, 3, LittlerootTown_MaysHouse_1F_EventScript_292AF2 +@ Many of the below scripts have no gender check because they assume youre in the correct house +LittlerootTown_MaysHouse_1F_OnFrame: @ 81F893A + map_script_2 VAR_LITTLEROOT_INTRO_STATE, 3, LittlerootTown_MaysHouse_1F_EventScript_EnterHouseMovingIn + map_script_2 VAR_LITTLEROOT_INTRO_STATE, 5, LittlerootTown_MaysHouse_1F_EventScript_GoUpstairsToSetClock + map_script_2 VAR_LITTLEROOT_INTRO_STATE, 6, LittlerootTown_MaysHouse_1F_EventScript_PetalburgGymReport + map_script_2 VAR_LITTLEROOT_HOUSES_STATE_2, 1, LittlerootTown_MaysHouse_1F_EventScript_YoureNewNeighbor + map_script_2 VAR_LITTLEROOT_HOUSES_STATE, 3, PlayersHouse_1F_EventScript_GetSSTicketAndSeeLatiTV .2byte 0 -LittlerootTown_MaysHouse_1F_EventScript_1F8964:: @ 81F8964 +LittlerootTown_MaysHouse_1F_EventScript_GoUpstairsToSetClock:: @ 81F8964 lockall - msgbox LittlerootTown_MaysHouse_1F_Text_1F7B67, MSGBOX_DEFAULT + msgbox PlayersHouse_1F_Text_GoSetTheClock, MSGBOX_DEFAULT closemessage - applymovement EVENT_OBJ_ID_PLAYER, LittlerootTown_MaysHouse_1F_Movement_1F898A - applymovement 1, LittlerootTown_MaysHouse_1F_Movement_1F898A + applymovement EVENT_OBJ_ID_PLAYER, LittlerootTown_MaysHouse_1F_Movement_PushTowardStairs + applymovement 1, LittlerootTown_MaysHouse_1F_Movement_PushTowardStairs waitmovement 0 warp MAP_LITTLEROOT_TOWN_MAYS_HOUSE_2F, 255, 1, 1 waitstate releaseall end -LittlerootTown_MaysHouse_1F_Movement_1F898A: @ 81F898A +LittlerootTown_MaysHouse_1F_Movement_PushTowardStairs: @ 81F898A walk_up step_end -LittlerootTown_MaysHouse_1F_EventScript_1F898C:: @ 81F898C +LittlerootTown_MaysHouse_1F_EventScript_EnterHouseMovingIn:: @ 81F898C + lockall + setvar VAR_0x8004, 1 + setvar VAR_0x8005, FEMALE + goto PlayersHouse_1F_EventScript_EnterHouseMovingIn + end + +LittlerootTown_MaysHouse_1F_EventScript_PetalburgGymReport:: @ 81F899D lockall setvar VAR_0x8004, 1 setvar VAR_0x8005, 1 - goto LittlerootTown_MaysHouse_1F_EventScript_292704 + goto PlayersHouse_1F_EventScript_PetalburgGymReportFemale end -LittlerootTown_MaysHouse_1F_EventScript_1F899D:: @ 81F899D - lockall - setvar VAR_0x8004, 1 - setvar VAR_0x8005, 1 - goto LittlerootTown_MaysHouse_1F_EventScript_2928DC - end - -LittlerootTown_MaysHouse_1F_EventScript_1F89AE:: @ 81F89AE +LittlerootTown_MaysHouse_1F_EventScript_YoureNewNeighbor:: @ 81F89AE lockall playse SE_PIN applymovement 4, Common_Movement_ExclamationMark @@ -95,16 +96,16 @@ LittlerootTown_MaysHouse_1F_EventScript_1F89AE:: @ 81F89AE applymovement 4, Common_Movement_Delay48 waitmovement 0 applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceFastestRight - applymovement 4, LittlerootTown_MaysHouse_1F_Movement_1F89EC + applymovement 4, LittlerootTown_MaysHouse_1F_Movement_RivalMomApproach waitmovement 0 special GetRivalSonDaughterString - msgbox LittlerootTown_MaysHouse_1F_Text_1F8BC5, MSGBOX_DEFAULT + msgbox RivalsHouse_1F_Text_OhYoureTheNewNeighbor, MSGBOX_DEFAULT setflag FLAG_MET_RIVAL_MOM setvar VAR_LITTLEROOT_HOUSES_STATE_2, 2 releaseall end -LittlerootTown_MaysHouse_1F_Movement_1F89EC: @ 81F89EC +LittlerootTown_MaysHouse_1F_Movement_RivalMomApproach: @ 81F89EC walk_down walk_left walk_left @@ -113,71 +114,69 @@ LittlerootTown_MaysHouse_1F_Movement_1F89EC: @ 81F89EC walk_left step_end -LittlerootTown_BrendansHouse_1F_EventScript_1F89F3:: @ 81F89F3 -LittlerootTown_MaysHouse_1F_EventScript_1F89F3:: @ 81F89F3 +RivalsHouse_1F_EventScript_RivalMom:: @ 81F89F3 lock faceplayer - goto_if_set FLAG_DEFEATED_RIVAL_ROUTE103, LittlerootTown_BrendansHouse_1F_EventScript_1F8A33 - goto_if_set FLAG_SYS_POKEMON_GET, LittlerootTown_BrendansHouse_1F_EventScript_1F8A29 + goto_if_set FLAG_DEFEATED_RIVAL_ROUTE103, RivalsHouse_1F_EventScript_GoHomeEverySoOften + goto_if_set FLAG_SYS_POKEMON_GET, RivalsHouse_1F_EventScript_RivalIsOnRoute103 compare VAR_LITTLEROOT_RIVAL_STATE, 3 - goto_if_eq LittlerootTown_BrendansHouse_1F_EventScript_1F8A1F + goto_if_eq RivalsHouse_1F_EventScript_RivalTooBusy special GetRivalSonDaughterString - msgbox LittlerootTown_BrendansHouse_1F_Text_1F8CA5, MSGBOX_DEFAULT + msgbox RivalsHouse_1F_Text_LikeChildLikeFather, MSGBOX_DEFAULT release end -LittlerootTown_BrendansHouse_1F_EventScript_1F8A1F:: @ 81F8A1F - msgbox LittlerootTown_BrendansHouse_1F_Text_1F8D37, MSGBOX_DEFAULT +RivalsHouse_1F_EventScript_RivalTooBusy:: @ 81F8A1F + msgbox RivalsHouse_1F_Text_TooBusyToNoticeVisit, MSGBOX_DEFAULT release end -LittlerootTown_BrendansHouse_1F_EventScript_1F8A29:: @ 81F8A29 - msgbox LittlerootTown_BrendansHouse_1F_Text_1F8D93, MSGBOX_DEFAULT +RivalsHouse_1F_EventScript_RivalIsOnRoute103:: @ 81F8A29 + msgbox RivalsHouse_1F_Text_WentOutToRoute103, MSGBOX_DEFAULT release end -LittlerootTown_BrendansHouse_1F_EventScript_1F8A33:: @ 81F8A33 - msgbox LittlerootTown_BrendansHouse_1F_Text_1F8E01, MSGBOX_DEFAULT +RivalsHouse_1F_EventScript_GoHomeEverySoOften:: @ 81F8A33 + msgbox RivalsHouse_1F_Text_ShouldGoHomeEverySoOften, MSGBOX_DEFAULT release end -LittlerootTown_BrendansHouse_1F_EventScript_1F8A3D:: @ 81F8A3D -LittlerootTown_MaysHouse_1F_EventScript_1F8A3D:: @ 81F8A3D +RivalsHouse_1F_EventScript_RivalSibling:: @ 81F8A3D lock faceplayer special GetPlayerBigGuyGirlString - msgbox LittlerootTown_BrendansHouse_1F_Text_1F9262, MSGBOX_DEFAULT + msgbox RivalsHouse_1F_Text_DoYouHavePokemon, MSGBOX_DEFAULT release end -LittlerootTown_MaysHouse_1F_EventScript_1F8A4C:: @ 81F8A4C +LittlerootTown_MaysHouse_1F_EventScript_GoSeeRoom:: @ 81F8A4C lockall setvar VAR_0x8004, 1 - setvar VAR_0x8005, 1 + setvar VAR_0x8005, FEMALE applymovement VAR_0x8004, Common_Movement_WalkInPlaceFastestRight waitmovement 0 - goto LittlerootTown_MaysHouse_1F_EventScript_292765 + goto PlayersHouse_1F_EventScript_MomGoSeeRoom end -LittlerootTown_MaysHouse_1F_EventScript_1F8A67:: @ 81F8A67 +LittlerootTown_MaysHouse_1F_EventScript_MeetRival0:: @ 81F8A67 lockall setvar VAR_0x8008, 0 - goto LittlerootTown_MaysHouse_1F_EventScript_1F8A8B + goto LittlerootTown_MaysHouse_1F_EventScript_MeetRival end -LittlerootTown_MaysHouse_1F_EventScript_1F8A73:: @ 81F8A73 +LittlerootTown_MaysHouse_1F_EventScript_MeetRival1:: @ 81F8A73 lockall setvar VAR_0x8008, 1 - goto LittlerootTown_MaysHouse_1F_EventScript_1F8A8B + goto LittlerootTown_MaysHouse_1F_EventScript_MeetRival end -LittlerootTown_MaysHouse_1F_EventScript_1F8A7F:: @ 81F8A7F +LittlerootTown_MaysHouse_1F_EventScript_MeetRival2:: @ 81F8A7F lockall setvar VAR_0x8008, 2 - goto LittlerootTown_MaysHouse_1F_EventScript_1F8A8B + goto LittlerootTown_MaysHouse_1F_EventScript_MeetRival end -LittlerootTown_MaysHouse_1F_EventScript_1F8A8B:: @ 81F8A8B +LittlerootTown_MaysHouse_1F_EventScript_MeetRival:: @ 81F8A8B playse SE_KAIDAN delay 10 addobject 7 @@ -188,25 +187,25 @@ LittlerootTown_MaysHouse_1F_EventScript_1F8A8B:: @ 81F8A8B applymovement 7, Common_Movement_Delay48 waitmovement 0 compare VAR_0x8008, 1 - call_if_ne LittlerootTown_MaysHouse_1F_EventScript_1F8B2A + call_if_ne LittlerootTown_MaysHouse_1F_EventScript_PlayerFaceMay playbgm MUS_GIRL_SUP, 1 compare VAR_0x8008, 0 - call_if_eq LittlerootTown_MaysHouse_1F_EventScript_1F8B35 + call_if_eq LittlerootTown_MaysHouse_1F_EventScript_MayApproachPlayer0 compare VAR_0x8008, 1 - call_if_eq LittlerootTown_MaysHouse_1F_EventScript_1F8B40 + call_if_eq LittlerootTown_MaysHouse_1F_EventScript_MayApproachPlayer1 compare VAR_0x8008, 2 - call_if_eq LittlerootTown_MaysHouse_1F_EventScript_1F8B4B - msgbox LittlerootTown_MaysHouse_1F_Text_1F8EC6, MSGBOX_DEFAULT + call_if_eq LittlerootTown_MaysHouse_1F_EventScript_MayApproachPlayer2 + msgbox RivalsHouse_1F_Text_MayWhoAreYou, MSGBOX_DEFAULT closemessage compare VAR_0x8008, 0 - call_if_eq LittlerootTown_MaysHouse_1F_EventScript_1F8B6A + call_if_eq LittlerootTown_MaysHouse_1F_EventScript_MayGoUpstairs0 compare VAR_0x8008, 1 - call_if_eq LittlerootTown_MaysHouse_1F_EventScript_1F8B7C + call_if_eq LittlerootTown_MaysHouse_1F_EventScript_MayGoUpstairs1 compare VAR_0x8008, 2 - call_if_eq LittlerootTown_MaysHouse_1F_EventScript_1F8B8E + call_if_eq LittlerootTown_MaysHouse_1F_EventScript_MayGoUpstairs2 playse SE_KAIDAN removeobject 7 - setflag FLAG_HIDE_LITTLEROOT_TOWN_MAYS_HOUSE_BRENDAN + setflag FLAG_HIDE_LITTLEROOT_TOWN_MAYS_HOUSE_MAY setflag FLAG_HIDE_LITTLEROOT_TOWN_MAYS_HOUSE_2F_POKE_BALL clearflag FLAG_HIDE_LITTLEROOT_TOWN_MAYS_HOUSE_RIVAL_BEDROOM delay 30 @@ -217,27 +216,27 @@ LittlerootTown_MaysHouse_1F_EventScript_1F8A8B:: @ 81F8A8B releaseall end -LittlerootTown_MaysHouse_1F_EventScript_1F8B2A:: @ 81F8B2A +LittlerootTown_MaysHouse_1F_EventScript_PlayerFaceMay:: @ 81F8B2A applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceFastestDown waitmovement 0 return -LittlerootTown_MaysHouse_1F_EventScript_1F8B35:: @ 81F8B35 - applymovement 7, LittlerootTown_MaysHouse_1F_Movement_1F8B56 +LittlerootTown_MaysHouse_1F_EventScript_MayApproachPlayer0:: @ 81F8B35 + applymovement 7, LittlerootTown_MaysHouse_1F_Movement_MayApproachPlayer0 waitmovement 0 return -LittlerootTown_MaysHouse_1F_EventScript_1F8B40:: @ 81F8B40 - applymovement 7, LittlerootTown_MaysHouse_1F_Movement_1F8B5E +LittlerootTown_MaysHouse_1F_EventScript_MayApproachPlayer1:: @ 81F8B40 + applymovement 7, LittlerootTown_MaysHouse_1F_Movement_MayApproachPlayer1 waitmovement 0 return -LittlerootTown_MaysHouse_1F_EventScript_1F8B4B:: @ 81F8B4B - applymovement 7, LittlerootTown_MaysHouse_1F_Movement_1F8B62 +LittlerootTown_MaysHouse_1F_EventScript_MayApproachPlayer2:: @ 81F8B4B + applymovement 7, LittlerootTown_MaysHouse_1F_Movement_MayApproachPlayer2 waitmovement 0 return -LittlerootTown_MaysHouse_1F_Movement_1F8B56: @ 81F8B56 +LittlerootTown_MaysHouse_1F_Movement_MayApproachPlayer0: @ 81F8B56 walk_in_place_fastest_left walk_left walk_in_place_fastest_up @@ -247,13 +246,13 @@ LittlerootTown_MaysHouse_1F_Movement_1F8B56: @ 81F8B56 walk_up step_end -LittlerootTown_MaysHouse_1F_Movement_1F8B5E: @ 81F8B5E +LittlerootTown_MaysHouse_1F_Movement_MayApproachPlayer1: @ 81F8B5E walk_up walk_up walk_up step_end -LittlerootTown_MaysHouse_1F_Movement_1F8B62: @ 81F8B62 +LittlerootTown_MaysHouse_1F_Movement_MayApproachPlayer2: @ 81F8B62 walk_in_place_fastest_right walk_right walk_in_place_fastest_up @@ -263,31 +262,31 @@ LittlerootTown_MaysHouse_1F_Movement_1F8B62: @ 81F8B62 walk_up step_end -LittlerootTown_MaysHouse_1F_EventScript_1F8B6A:: @ 81F8B6A - applymovement EVENT_OBJ_ID_PLAYER, LittlerootTown_MaysHouse_1F_Movement_1F8BA0 - applymovement 7, LittlerootTown_MaysHouse_1F_Movement_1F8BAF +LittlerootTown_MaysHouse_1F_EventScript_MayGoUpstairs0:: @ 81F8B6A + applymovement EVENT_OBJ_ID_PLAYER, LittlerootTown_MaysHouse_1F_Movement_PlayerWatchMayExit0 + applymovement 7, LittlerootTown_MaysHouse_1F_Movement_MayGoUpstairs0 waitmovement 0 return -LittlerootTown_MaysHouse_1F_EventScript_1F8B7C:: @ 81F8B7C - applymovement EVENT_OBJ_ID_PLAYER, LittlerootTown_MaysHouse_1F_Movement_1F8BA4 - applymovement 7, LittlerootTown_MaysHouse_1F_Movement_1F8BB5 +LittlerootTown_MaysHouse_1F_EventScript_MayGoUpstairs1:: @ 81F8B7C + applymovement EVENT_OBJ_ID_PLAYER, LittlerootTown_MaysHouse_1F_Movement_PlayerWatchMayExit1 + applymovement 7, LittlerootTown_MaysHouse_1F_Movement_MayGoUpstairs1 waitmovement 0 return -LittlerootTown_MaysHouse_1F_EventScript_1F8B8E:: @ 81F8B8E - applymovement EVENT_OBJ_ID_PLAYER, LittlerootTown_MaysHouse_1F_Movement_1F8BAB - applymovement 7, LittlerootTown_MaysHouse_1F_Movement_1F8BBF +LittlerootTown_MaysHouse_1F_EventScript_MayGoUpstairs2:: @ 81F8B8E + applymovement EVENT_OBJ_ID_PLAYER, LittlerootTown_MaysHouse_1F_Movement_PlayerWatchMayExit2 + applymovement 7, LittlerootTown_MaysHouse_1F_Movement_MayGoUpstairs2 waitmovement 0 return -LittlerootTown_MaysHouse_1F_Movement_1F8BA0: @ 81F8BA0 +LittlerootTown_MaysHouse_1F_Movement_PlayerWatchMayExit0: @ 81F8BA0 delay_16 delay_8 walk_in_place_fastest_right step_end -LittlerootTown_MaysHouse_1F_Movement_1F8BA4: @ 81F8BA4 +LittlerootTown_MaysHouse_1F_Movement_PlayerWatchMayExit1: @ 81F8BA4 delay_16 delay_8 walk_in_place_fastest_right @@ -296,13 +295,13 @@ LittlerootTown_MaysHouse_1F_Movement_1F8BA4: @ 81F8BA4 walk_in_place_fastest_up step_end -LittlerootTown_MaysHouse_1F_Movement_1F8BAB: @ 81F8BAB +LittlerootTown_MaysHouse_1F_Movement_PlayerWatchMayExit2: @ 81F8BAB delay_16 delay_8 walk_in_place_fastest_left step_end -LittlerootTown_MaysHouse_1F_Movement_1F8BAF: @ 81F8BAF +LittlerootTown_MaysHouse_1F_Movement_MayGoUpstairs0: @ 81F8BAF walk_in_place_fastest_right walk_right walk_in_place_fastest_up @@ -310,7 +309,7 @@ LittlerootTown_MaysHouse_1F_Movement_1F8BAF: @ 81F8BAF walk_up step_end -LittlerootTown_MaysHouse_1F_Movement_1F8BB5: @ 81F8BB5 +LittlerootTown_MaysHouse_1F_Movement_MayGoUpstairs1: @ 81F8BB5 walk_in_place_fastest_right walk_right walk_in_place_fastest_up @@ -322,7 +321,7 @@ LittlerootTown_MaysHouse_1F_Movement_1F8BB5: @ 81F8BB5 walk_up step_end -LittlerootTown_MaysHouse_1F_Movement_1F8BBF: @ 81F8BBF +LittlerootTown_MaysHouse_1F_Movement_MayGoUpstairs2: @ 81F8BBF walk_in_place_fastest_left walk_left walk_in_place_fastest_up @@ -330,8 +329,7 @@ LittlerootTown_MaysHouse_1F_Movement_1F8BBF: @ 81F8BBF walk_up step_end -LittlerootTown_BrendansHouse_1F_Text_1F8BC5: @ 81F8BC5 -LittlerootTown_MaysHouse_1F_Text_1F8BC5: @ 81F8BC5 +RivalsHouse_1F_Text_OhYoureTheNewNeighbor: @ 81F8BC5 .string "Oh, hello. And you are?\p" .string "… … … … … … … … …\n" .string "… … … … … … … … …\p" @@ -343,26 +341,26 @@ LittlerootTown_MaysHouse_1F_Text_1F8BC5: @ 81F8BC5 .string "a new friend.\p" .string "Our {STR_VAR_1} is upstairs, I think.$" -LittlerootTown_BrendansHouse_1F_Text_1F8CA5: @ 81F8CA5 +RivalsHouse_1F_Text_LikeChildLikeFather: @ 81F8CA5 .string "Like child, like father.\p" .string "My husband is as wild about POKéMON\n" .string "as our child.\p" .string "If he's not at his LAB, he's likely\n" .string "scrabbling about in grassy places.$" -LittlerootTown_BrendansHouse_1F_Text_1F8D37: @ 81F8D37 +RivalsHouse_1F_Text_TooBusyToNoticeVisit: @ 81F8D37 .string "That {RIVAL}!\p" .string "I guess our child is too busy with\n" .string "POKéMON to notice that you came\l" .string "to visit, {PLAYER}{KUN}.$" -LittlerootTown_BrendansHouse_1F_Text_1F8D93: @ 81F8D93 +RivalsHouse_1F_Text_WentOutToRoute103: @ 81F8D93 .string "Oh, {RIVAL} went out to ROUTE 103\n" .string "just a little while ago.\p" .string "Like father, like child.\n" .string "{RIVAL} can't stay quietly at home.$" -LittlerootTown_BrendansHouse_1F_Text_1F8E01: @ 81F8E01 +RivalsHouse_1F_Text_ShouldGoHomeEverySoOften: @ 81F8E01 .string "I think it's wonderful for people to\n" .string "travel with POKéMON.\p" .string "But you should go home every so often\n" @@ -370,7 +368,7 @@ LittlerootTown_BrendansHouse_1F_Text_1F8E01: @ 81F8E01 .string "She might not say it, but I'm sure she\n" .string "worries about you, {PLAYER}{KUN}.$" -LittlerootTown_MaysHouse_1F_Text_1F8EC6: @ 81F8EC6 +RivalsHouse_1F_Text_MayWhoAreYou: @ 81F8EC6 .string "Huh?\n" .string "Who… Who are you?\p" .string "… … … … … … … …\n" @@ -394,7 +392,7 @@ LittlerootTown_MaysHouse_1F_Text_1F8EC6: @ 81F8EC6 .string "some wild POKéMON!\p" .string "{PLAYER}{KUN}, I'll catch you later!$" -LittlerootTown_BrendansHouse_1F_Text_1F90B4: @ 81F90B4 +RivalsHouse_1F_Text_BrendanWhoAreYou: @ 81F90B4 .string "Hey!\n" .string "You…\p" .string "Who are you?\p" @@ -414,7 +412,7 @@ LittlerootTown_BrendansHouse_1F_Text_1F90B4: @ 81F90B4 .string "some wild POKéMON.\p" .string "Some other time, okay?$" -LittlerootTown_BrendansHouse_1F_Text_1F9262: @ 81F9262 +RivalsHouse_1F_Text_DoYouHavePokemon: @ 81F9262 .string "Hi, neighbor!\p" .string "Do you already have your\n" .string "own POKéMON?$" diff --git a/data/maps/LittlerootTown_MaysHouse_2F/map.json b/data/maps/LittlerootTown_MaysHouse_2F/map.json index d92b024c6d..33cdfb7c16 100644 --- a/data/maps/LittlerootTown_MaysHouse_2F/map.json +++ b/data/maps/LittlerootTown_MaysHouse_2F/map.json @@ -24,7 +24,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "LittlerootTown_MaysHouse_2F_EventScript_1F94C1", + "script": "RivalsHouse_2F_EventScript_Rival", "flag": "FLAG_HIDE_LITTLEROOT_TOWN_MAYS_HOUSE_RIVAL_BEDROOM" }, { @@ -219,7 +219,7 @@ "movement_range_y": 1, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "LittlerootTown_MaysHouse_2F_EventScript_1F9334", + "script": "LittlerootTown_MaysHouse_2F_EventScript_RivalsPokeBall", "flag": "FLAG_HIDE_LITTLEROOT_TOWN_MAYS_HOUSE_2F_POKE_BALL" } ], @@ -240,7 +240,7 @@ "y": 1, "elevation": 0, "player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY", - "script": "LittlerootTown_MaysHouse_2F_EventScript_1F865F" + "script": "PlayersHouse_2F_EventScript_GameCube" }, { "type": "sign", @@ -248,7 +248,7 @@ "y": 1, "elevation": 0, "player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY", - "script": "LittlerootTown_MaysHouse_2F_EventScript_1F8656" + "script": "PlayersHouse_2F_EventScript_Notebook" }, { "type": "sign", @@ -256,7 +256,7 @@ "y": 1, "elevation": 0, "player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY", - "script": "LittlerootTown_MaysHouse_2F_EventScript_29278D" + "script": "LittlerootTown_MaysHouse_2F_EventScript_WallClock" }, { "type": "sign", @@ -264,7 +264,7 @@ "y": 1, "elevation": 0, "player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY", - "script": "EventScript_PlayerPCFemale" + "script": "LittlerootTown_MaysHouse_2F_EventScript_PC" } ] } \ No newline at end of file diff --git a/data/maps/LittlerootTown_MaysHouse_2F/scripts.inc b/data/maps/LittlerootTown_MaysHouse_2F/scripts.inc index 31a097ead5..9fe74a3443 100644 --- a/data/maps/LittlerootTown_MaysHouse_2F/scripts.inc +++ b/data/maps/LittlerootTown_MaysHouse_2F/scripts.inc @@ -1,71 +1,70 @@ LittlerootTown_MaysHouse_2F_MapScripts:: @ 81F9296 - map_script MAP_SCRIPT_ON_TRANSITION, LittlerootTown_MaysHouse_2F_MapScript1_1F92A1 - map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, LittlerootTown_MaysHouse_2F_MapScript2_1F931D + map_script MAP_SCRIPT_ON_TRANSITION, LittlerootTown_MaysHouse_2F_OnTransition + map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, LittlerootTown_MaysHouse_2F_OnWarp .byte 0 -LittlerootTown_MaysHouse_2F_MapScript1_1F92A1: @ 81F92A1 +LittlerootTown_MaysHouse_2F_OnTransition: @ 81F92A1 compare VAR_LITTLEROOT_RIVAL_STATE, 2 - call_if_lt LittlerootTown_MaysHouse_2F_EventScript_1F930A + call_if_lt LittlerootTown_MaysHouse_2F_EventScript_CheckSetReadyToMeetMay compare VAR_LITTLEROOT_RIVAL_STATE, 3 - call_if_ge LittlerootTown_MaysHouse_2F_EventScript_1F92CD + call_if_ge LittlerootTown_MaysHouse_2F_EventScript_CheckShouldUpdateMayPos compare VAR_LITTLEROOT_INTRO_STATE, 4 - call_if_eq LittlerootTown_MaysHouse_2F_EventScript_2926FE + call_if_eq PlayersHouse_2F_EventScript_BlockStairsUntilClockIsSet call SecretBase_EventScript_SetDecorationFlags setvar VAR_SECRET_BASE_INITIALIZED, 0 end -LittlerootTown_MaysHouse_2F_EventScript_1F92CD:: @ 81F92CD - goto_if_set FLAG_MET_RIVAL_LILYCOVE, LittlerootTown_MaysHouse_2F_EventScript_1F92E6 +LittlerootTown_MaysHouse_2F_EventScript_CheckShouldUpdateMayPos:: @ 81F92CD + goto_if_set FLAG_MET_RIVAL_LILYCOVE, LittlerootTown_MaysHouse_2F_EventScript_TryUpdateMayPos compare VAR_BIRCH_LAB_STATE, 2 - goto_if_ge LittlerootTown_MaysHouse_2F_EventScript_1F9309 - goto LittlerootTown_MaysHouse_2F_EventScript_1F92E6 + goto_if_ge LittlerootTown_MaysHouse_2F_EventScript_Ret + goto LittlerootTown_MaysHouse_2F_EventScript_TryUpdateMayPos -LittlerootTown_MaysHouse_2F_EventScript_1F92E6:: @ 81F92E6 +LittlerootTown_MaysHouse_2F_EventScript_TryUpdateMayPos:: @ 81F92E6 checkplayergender compare VAR_RESULT, FEMALE - goto_if_eq LittlerootTown_MaysHouse_2F_EventScript_1F9309 + goto_if_eq LittlerootTown_MaysHouse_2F_EventScript_Ret compare VAR_DEX_UPGRADE_JOHTO_STARTER_STATE, 2 - goto_if_ge LittlerootTown_MaysHouse_2F_EventScript_1F9309 + goto_if_ge LittlerootTown_MaysHouse_2F_EventScript_Ret setobjectxyperm 1, 8, 2 setobjectmovementtype 1, MOVEMENT_TYPE_FACE_UP return -LittlerootTown_BrendansHouse_2F_EventScript_1F9309:: @ 81F9309 -LittlerootTown_MaysHouse_2F_EventScript_1F9309:: @ 81F9309 +LittlerootTown_MaysHouse_2F_EventScript_Ret:: @ 81F9309 return -LittlerootTown_MaysHouse_2F_EventScript_1F930A:: @ 81F930A +LittlerootTown_MaysHouse_2F_EventScript_CheckSetReadyToMeetMay:: @ 81F930A checkplayergender compare VAR_RESULT, MALE - goto_if_eq LittlerootTown_MaysHouse_2F_EventScript_1F9317 + goto_if_eq LittlerootTown_MaysHouse_2F_EventScript_SetReadyToMeetMay return -LittlerootTown_MaysHouse_2F_EventScript_1F9317:: @ 81F9317 +LittlerootTown_MaysHouse_2F_EventScript_SetReadyToMeetMay:: @ 81F9317 setvar VAR_LITTLEROOT_RIVAL_STATE, 2 return -LittlerootTown_MaysHouse_2F_MapScript2_1F931D: @ 81F931D - map_script_2 VAR_SECRET_BASE_INITIALIZED, 0, LittlerootTown_MaysHouse_2F_EventScript_1F9327 +LittlerootTown_MaysHouse_2F_OnWarp: @ 81F931D + map_script_2 VAR_SECRET_BASE_INITIALIZED, 0, LittlerootTown_MaysHouse_2F_EventScript_CheckInitDecor .2byte 0 -LittlerootTown_MaysHouse_2F_EventScript_1F9327:: @ 81F9327 +LittlerootTown_MaysHouse_2F_EventScript_CheckInitDecor:: @ 81F9327 checkplayergender compare VAR_RESULT, FEMALE goto_if_eq SecretBase_EventScript_InitDecorations end -LittlerootTown_MaysHouse_2F_EventScript_1F9334:: @ 81F9334 +LittlerootTown_MaysHouse_2F_EventScript_RivalsPokeBall:: @ 81F9334 lockall compare VAR_LITTLEROOT_RIVAL_STATE, 2 - goto_if_eq LittlerootTown_MaysHouse_2F_EventScript_1F934A - msgbox LittlerootTown_MaysHouse_2F_Text_1F9991, MSGBOX_DEFAULT + goto_if_eq LittlerootTown_MaysHouse_2F_EventScript_MeetMay + msgbox RivalsHouse_2F_Text_ItsRivalsPokeBall, MSGBOX_DEFAULT releaseall end -LittlerootTown_MaysHouse_2F_EventScript_1F934A:: @ 81F934A +LittlerootTown_MaysHouse_2F_EventScript_MeetMay:: @ 81F934A delay 10 addobject 1 - applymovement 1, LittlerootTown_MaysHouse_2F_Movement_1F946F + applymovement 1, LittlerootTown_MaysHouse_2F_Movement_MayEnters waitmovement 0 playse SE_PIN applymovement 1, Common_Movement_ExclamationMark @@ -75,13 +74,13 @@ LittlerootTown_MaysHouse_2F_EventScript_1F934A:: @ 81F934A delay 10 playbgm MUS_GIRL_SUP, 1 compare VAR_FACING, DIR_NORTH - call_if_eq LittlerootTown_MaysHouse_2F_EventScript_1F93BA + call_if_eq LittlerootTown_MaysHouse_2F_EventScript_MeetMayNorth compare VAR_FACING, DIR_SOUTH - call_if_eq LittlerootTown_MaysHouse_2F_EventScript_1F93E9 + call_if_eq LittlerootTown_MaysHouse_2F_EventScript_MeetMaySouth compare VAR_FACING, DIR_WEST - call_if_eq LittlerootTown_MaysHouse_2F_EventScript_1F9418 + call_if_eq LittlerootTown_MaysHouse_2F_EventScript_MeetMayWest compare VAR_FACING, DIR_EAST - call_if_eq LittlerootTown_MaysHouse_2F_EventScript_1F9440 + call_if_eq LittlerootTown_MaysHouse_2F_EventScript_MeetMayEast setvar VAR_LITTLEROOT_RIVAL_STATE, 3 setflag FLAG_HIDE_LITTLEROOT_TOWN_MAYS_HOUSE_2F_POKE_BALL clearflag FLAG_HIDE_LITTLEROOT_TOWN_MAYS_HOUSE_RIVAL_BEDROOM @@ -91,60 +90,60 @@ LittlerootTown_MaysHouse_2F_EventScript_1F934A:: @ 81F934A releaseall end -LittlerootTown_MaysHouse_2F_EventScript_1F93BA:: @ 81F93BA - applymovement 1, LittlerootTown_MaysHouse_2F_Movement_1F9473 +LittlerootTown_MaysHouse_2F_EventScript_MeetMayNorth:: @ 81F93BA + applymovement 1, LittlerootTown_MaysHouse_2F_Movement_MayApproachPlayerNorth waitmovement 0 applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceFastestLeft waitmovement 0 - msgbox LittlerootTown_MaysHouse_2F_Text_1F959C, MSGBOX_DEFAULT + msgbox RivalsHouse_2F_Text_MayWhoAreYou, MSGBOX_DEFAULT closemessage - applymovement EVENT_OBJ_ID_PLAYER, LittlerootTown_MaysHouse_2F_Movement_1F9483 - applymovement 1, LittlerootTown_MaysHouse_2F_Movement_1F9479 + applymovement EVENT_OBJ_ID_PLAYER, LittlerootTown_MaysHouse_2F_Movement_PlayerWatchMayNorth + applymovement 1, LittlerootTown_MaysHouse_2F_Movement_MayWalkToPCNorth waitmovement 0 return -LittlerootTown_MaysHouse_2F_EventScript_1F93E9:: @ 81F93E9 - applymovement 1, LittlerootTown_MaysHouse_2F_Movement_1F948B +LittlerootTown_MaysHouse_2F_EventScript_MeetMaySouth:: @ 81F93E9 + applymovement 1, LittlerootTown_MaysHouse_2F_Movement_MayApproachPlayerSouth waitmovement 0 applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceFastestLeft waitmovement 0 - msgbox LittlerootTown_MaysHouse_2F_Text_1F959C, MSGBOX_DEFAULT + msgbox RivalsHouse_2F_Text_MayWhoAreYou, MSGBOX_DEFAULT closemessage - applymovement EVENT_OBJ_ID_PLAYER, LittlerootTown_MaysHouse_2F_Movement_1F9497 - applymovement 1, LittlerootTown_MaysHouse_2F_Movement_1F948F + applymovement EVENT_OBJ_ID_PLAYER, LittlerootTown_MaysHouse_2F_Movement_PlayerWatchMaySouth + applymovement 1, LittlerootTown_MaysHouse_2F_Movement_MayWalkToPCSouth waitmovement 0 return -LittlerootTown_MaysHouse_2F_EventScript_1F9418:: @ 81F9418 - applymovement 1, LittlerootTown_MaysHouse_2F_Movement_1F949D +LittlerootTown_MaysHouse_2F_EventScript_MeetMayWest:: @ 81F9418 + applymovement 1, LittlerootTown_MaysHouse_2F_Movement_MayApproachPlayerWest waitmovement 0 applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceFastestUp waitmovement 0 - msgbox LittlerootTown_MaysHouse_2F_Text_1F959C, MSGBOX_DEFAULT + msgbox RivalsHouse_2F_Text_MayWhoAreYou, MSGBOX_DEFAULT closemessage - applymovement 1, LittlerootTown_MaysHouse_2F_Movement_1F94A4 + applymovement 1, LittlerootTown_MaysHouse_2F_Movement_MayWalkToPCWest waitmovement 0 return -LittlerootTown_MaysHouse_2F_EventScript_1F9440:: @ 81F9440 - applymovement 1, LittlerootTown_MaysHouse_2F_Movement_1F94AD +LittlerootTown_MaysHouse_2F_EventScript_MeetMayEast:: @ 81F9440 + applymovement 1, LittlerootTown_MaysHouse_2F_Movement_MayApproachPlayerEast waitmovement 0 applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceFastestLeft waitmovement 0 - msgbox LittlerootTown_MaysHouse_2F_Text_1F959C, MSGBOX_DEFAULT + msgbox RivalsHouse_2F_Text_MayWhoAreYou, MSGBOX_DEFAULT closemessage - applymovement EVENT_OBJ_ID_PLAYER, LittlerootTown_MaysHouse_2F_Movement_1F94BB - applymovement 1, LittlerootTown_MaysHouse_2F_Movement_1F94B2 + applymovement EVENT_OBJ_ID_PLAYER, LittlerootTown_MaysHouse_2F_Movement_PlayerWatchMayEast + applymovement 1, LittlerootTown_MaysHouse_2F_Movement_MayWalkToPCEast waitmovement 0 return -LittlerootTown_MaysHouse_2F_Movement_1F946F: @ 81F946F +LittlerootTown_MaysHouse_2F_Movement_MayEnters: @ 81F946F walk_down walk_down walk_in_place_fastest_right step_end -LittlerootTown_MaysHouse_2F_Movement_1F9473: @ 81F9473 +LittlerootTown_MaysHouse_2F_Movement_MayApproachPlayerNorth: @ 81F9473 walk_right walk_right walk_down @@ -152,7 +151,7 @@ LittlerootTown_MaysHouse_2F_Movement_1F9473: @ 81F9473 walk_right step_end -LittlerootTown_MaysHouse_2F_Movement_1F9479: @ 81F9479 +LittlerootTown_MaysHouse_2F_Movement_MayWalkToPCNorth: @ 81F9479 walk_up walk_up walk_up @@ -164,7 +163,7 @@ LittlerootTown_MaysHouse_2F_Movement_1F9479: @ 81F9479 walk_in_place_fastest_up step_end -LittlerootTown_MaysHouse_2F_Movement_1F9483: @ 81F9483 +LittlerootTown_MaysHouse_2F_Movement_PlayerWatchMayNorth: @ 81F9483 delay_16 walk_in_place_fastest_up delay_16 @@ -174,13 +173,13 @@ LittlerootTown_MaysHouse_2F_Movement_1F9483: @ 81F9483 walk_in_place_fastest_right step_end -LittlerootTown_MaysHouse_2F_Movement_1F948B: @ 81F948B +LittlerootTown_MaysHouse_2F_Movement_MayApproachPlayerSouth: @ 81F948B walk_right walk_right walk_right step_end -LittlerootTown_MaysHouse_2F_Movement_1F948F: @ 81F948F +LittlerootTown_MaysHouse_2F_Movement_MayWalkToPCSouth: @ 81F948F walk_up walk_in_place_fastest_right walk_right @@ -190,7 +189,7 @@ LittlerootTown_MaysHouse_2F_Movement_1F948F: @ 81F948F walk_in_place_fastest_up step_end -LittlerootTown_MaysHouse_2F_Movement_1F9497: @ 81F9497 +LittlerootTown_MaysHouse_2F_Movement_PlayerWatchMaySouth: @ 81F9497 delay_16 walk_in_place_fastest_up delay_16 @@ -198,7 +197,7 @@ LittlerootTown_MaysHouse_2F_Movement_1F9497: @ 81F9497 walk_in_place_fastest_right step_end -LittlerootTown_MaysHouse_2F_Movement_1F949D: @ 81F949D +LittlerootTown_MaysHouse_2F_Movement_MayApproachPlayerWest: @ 81F949D walk_right walk_right walk_right @@ -207,27 +206,28 @@ LittlerootTown_MaysHouse_2F_Movement_1F949D: @ 81F949D walk_in_place_fastest_down step_end -LittlerootTown_MaysHouse_2F_Movement_1F94A4: @ 81F94A4 +LittlerootTown_MaysHouse_2F_Movement_MayWalkToPCWest: @ 81F94A4 walk_up walk_right walk_right walk_in_place_fastest_up step_end -LittlerootTown_MaysHouse_2F_Movement_1F94A9: @ 81F94A9 +@ Unused, the player is already facing this direction so its unneeded +LittlerootTown_MaysHouse_2F_Movement_PlayerWatchMayWest: @ 81F94A9 delay_16 delay_16 walk_in_place_fastest_right step_end -LittlerootTown_MaysHouse_2F_Movement_1F94AD: @ 81F94AD +LittlerootTown_MaysHouse_2F_Movement_MayApproachPlayerEast: @ 81F94AD walk_right walk_right walk_down walk_in_place_fastest_right step_end -LittlerootTown_MaysHouse_2F_Movement_1F94B2: @ 81F94B2 +LittlerootTown_MaysHouse_2F_Movement_MayWalkToPCEast: @ 81F94B2 walk_up walk_up walk_right @@ -238,7 +238,7 @@ LittlerootTown_MaysHouse_2F_Movement_1F94B2: @ 81F94B2 walk_in_place_fastest_up step_end -LittlerootTown_MaysHouse_2F_Movement_1F94BB: @ 81F94BB +LittlerootTown_MaysHouse_2F_Movement_PlayerWatchMayEast: @ 81F94BB delay_16 walk_in_place_fastest_up delay_16 @@ -246,72 +246,71 @@ LittlerootTown_MaysHouse_2F_Movement_1F94BB: @ 81F94BB walk_in_place_fastest_right step_end -LittlerootTown_BrendansHouse_2F_EventScript_1F94C1:: @ 81F94C1 -LittlerootTown_MaysHouse_2F_EventScript_1F94C1:: @ 81F94C1 +RivalsHouse_2F_EventScript_Rival:: @ 81F94C1 lockall - goto_if_set FLAG_MET_RIVAL_LILYCOVE, LittlerootTown_BrendansHouse_2F_EventScript_1F94F7 + goto_if_set FLAG_MET_RIVAL_LILYCOVE, RivalsHouse_2F_EventScript_RivalPostLilycove checkplayergender compare VAR_RESULT, MALE - goto_if_eq LittlerootTown_BrendansHouse_2F_EventScript_1F94E3 + goto_if_eq RivalsHouse_2F_EventScript_May compare VAR_RESULT, FEMALE - goto_if_eq LittlerootTown_BrendansHouse_2F_EventScript_1F94ED + goto_if_eq RivalsHouse_2F_EventScript_Brendan end -LittlerootTown_BrendansHouse_2F_EventScript_1F94E3:: @ 81F94E3 - msgbox LittlerootTown_BrendansHouse_2F_Text_1F978A, MSGBOX_DEFAULT +RivalsHouse_2F_EventScript_May:: @ 81F94E3 + msgbox RivalsHouse_2F_Text_MayGettingReady, MSGBOX_DEFAULT releaseall end -LittlerootTown_BrendansHouse_2F_EventScript_1F94ED:: @ 81F94ED - msgbox LittlerootTown_BrendansHouse_2F_Text_1F9962, MSGBOX_DEFAULT +RivalsHouse_2F_EventScript_Brendan:: @ 81F94ED + msgbox RivalsHouse_2F_Text_BrendanGettingReady, MSGBOX_DEFAULT releaseall end -LittlerootTown_BrendansHouse_2F_EventScript_1F94F7:: @ 81F94F7 +RivalsHouse_2F_EventScript_RivalPostLilycove:: @ 81F94F7 applymovement VAR_LAST_TALKED, Common_Movement_FacePlayer waitmovement 0 checkplayergender compare VAR_RESULT, MALE - call_if_eq LittlerootTown_BrendansHouse_2F_EventScript_1F951D + call_if_eq RivalsHouse_2F_EventScript_MayPostLilycove compare VAR_RESULT, FEMALE - call_if_eq LittlerootTown_BrendansHouse_2F_EventScript_1F952F + call_if_eq RivalsHouse_2F_EventScript_BrendanPostLilycove setflag FLAG_MET_RIVAL_IN_HOUSE_AFTER_LILYCOVE releaseall end -LittlerootTown_BrendansHouse_2F_EventScript_1F951D:: @ 81F951D - goto_if_set FLAG_MET_RIVAL_IN_HOUSE_AFTER_LILYCOVE, LittlerootTown_BrendansHouse_2F_EventScript_1F9541 - msgbox LittlerootTown_BrendansHouse_2F_Text_1F99C9, MSGBOX_DEFAULT +RivalsHouse_2F_EventScript_MayPostLilycove:: @ 81F951D + goto_if_set FLAG_MET_RIVAL_IN_HOUSE_AFTER_LILYCOVE, RivalsHouse_2F_EventScript_MayWhereShouldIGoNext + msgbox RivalsHouse_2F_Text_MayJustCheckingMyPokedex, MSGBOX_DEFAULT return -LittlerootTown_BrendansHouse_2F_EventScript_1F952F:: @ 81F952F - goto_if_set FLAG_MET_RIVAL_IN_HOUSE_AFTER_LILYCOVE, LittlerootTown_BrendansHouse_2F_EventScript_1F954A - msgbox LittlerootTown_BrendansHouse_2F_Text_1F9B0D, MSGBOX_DEFAULT +RivalsHouse_2F_EventScript_BrendanPostLilycove:: @ 81F952F + goto_if_set FLAG_MET_RIVAL_IN_HOUSE_AFTER_LILYCOVE, PlayersHouse_2F_EventScript_BrendanWhereShouldIGoNext + msgbox RivalsHouse_2F_Text_BrendanJustCheckingMyPokedex, MSGBOX_DEFAULT return -LittlerootTown_BrendansHouse_2F_EventScript_1F9541:: @ 81F9541 - msgbox LittlerootTown_BrendansHouse_2F_Text_1F9A9E, MSGBOX_DEFAULT +RivalsHouse_2F_EventScript_MayWhereShouldIGoNext:: @ 81F9541 + msgbox RivalsHouse_2F_Text_MayWhereShouldIGoNext, MSGBOX_DEFAULT return -LittlerootTown_BrendansHouse_2F_EventScript_1F954A:: @ 81F954A - msgbox LittlerootTown_BrendansHouse_2F_Text_1F9BE7, MSGBOX_DEFAULT +PlayersHouse_2F_EventScript_BrendanWhereShouldIGoNext:: @ 81F954A + msgbox RivalsHouse_2F_Text_BrendanWhereShouldIGoNext, MSGBOX_DEFAULT return -EventScript_PlayerPCFemale:: @ 81F9553 +LittlerootTown_MaysHouse_2F_EventScript_PC:: @ 81F9553 lockall checkplayergender compare VAR_RESULT, MALE - goto_if_eq LittlerootTown_MaysHouse_2F_EventScript_1F956C + goto_if_eq LittlerootTown_MaysHouse_2F_EventScript_CheckRivalsPC compare VAR_RESULT, FEMALE - goto_if_eq LittlerootTown_MaysHouse_2F_EventScript_1F9576 + goto_if_eq LittlerootTown_MaysHouse_2F_EventScript_CheckPlayersPC end -LittlerootTown_MaysHouse_2F_EventScript_1F956C:: @ 81F956C +LittlerootTown_MaysHouse_2F_EventScript_CheckRivalsPC:: @ 81F956C msgbox gText_PokemonTrainerSchoolEmail, MSGBOX_DEFAULT releaseall end -LittlerootTown_MaysHouse_2F_EventScript_1F9576:: @ 81F9576 +LittlerootTown_MaysHouse_2F_EventScript_CheckPlayersPC:: @ 81F9576 setvar VAR_0x8004, 2 special DoPCTurnOnEffect playse SE_PC_ON @@ -321,14 +320,14 @@ LittlerootTown_MaysHouse_2F_EventScript_1F9576:: @ 81F9576 releaseall end -LittlerootTown_MaysHouse_2F_EventScript_1F958F:: @ 81F958F +LittlerootTown_MaysHouse_2F_EventScript_TurnOffPlayerPC:: @ 81F958F setvar VAR_0x8004, 2 playse SE_PC_OFF special DoPCTurnOffEffect releaseall end -LittlerootTown_MaysHouse_2F_Text_1F959C: @ 81F959C +RivalsHouse_2F_Text_MayWhoAreYou: @ 81F959C .string "Huh?\n" .string "Who… Who are you?\p" .string "… … … … … … … …\n" @@ -352,11 +351,11 @@ LittlerootTown_MaysHouse_2F_Text_1F959C: @ 81F959C .string "some wild POKéMON!\p" .string "{PLAYER}{KUN}, I'll catch you later!$" -LittlerootTown_BrendansHouse_2F_Text_1F978A: @ 81F978A +RivalsHouse_2F_Text_MayGettingReady: @ 81F978A .string "POKéMON fully restored!\n" .string "Items ready, and…$" -LittlerootTown_BrendansHouse_2F_Text_1F97B4: @ 81F97B4 +RivalsHouse_2F_Text_BrendanWhoAreYou: @ 81F97B4 .string "Hey!\n" .string "You…\p" .string "Who are you?\p" @@ -376,16 +375,15 @@ LittlerootTown_BrendansHouse_2F_Text_1F97B4: @ 81F97B4 .string "some wild POKéMON.\p" .string "Some other time, okay?$" -LittlerootTown_BrendansHouse_2F_Text_1F9962: @ 81F9962 +RivalsHouse_2F_Text_BrendanGettingReady: @ 81F9962 .string "POKéMON fully restored…\n" .string "Items all packed, and…$" -LittlerootTown_BrendansHouse_2F_Text_1F9991: @ 81F9991 -LittlerootTown_MaysHouse_2F_Text_1F9991: @ 81F9991 +RivalsHouse_2F_Text_ItsRivalsPokeBall: @ 81F9991 .string "It's {RIVAL}'s POKé BALL!\p" .string "Better leave it right where it is.$" -LittlerootTown_BrendansHouse_2F_Text_1F99C9: @ 81F99C9 +RivalsHouse_2F_Text_MayJustCheckingMyPokedex: @ 81F99C9 .string "MAY: {PLAYER}{KUN}!\p" .string "I was just checking my POKéDEX.\p" .string "There's still a lot of POKéMON that\n" @@ -395,13 +393,13 @@ LittlerootTown_BrendansHouse_2F_Text_1F99C9: @ 81F99C9 .string "I wonder where I should go catch\n" .string "some POKéMON next?$" -LittlerootTown_BrendansHouse_2F_Text_1F9A9E: @ 81F9A9E +RivalsHouse_2F_Text_MayWhereShouldIGoNext: @ 81F9A9E .string "MAY: I wonder where I should go catch\n" .string "some POKéMON next?\p" .string "Wouldn't it be funny if we ran into each\n" .string "other, {PLAYER}{KUN}?$" -LittlerootTown_BrendansHouse_2F_Text_1F9B0D: @ 81F9B0D +RivalsHouse_2F_Text_BrendanJustCheckingMyPokedex: @ 81F9B0D .string "BRENDAN: Hey, it's {PLAYER}.\p" .string "I was just checking out my POKéDEX.\p" .string "There are still many POKéMON that\n" @@ -410,7 +408,7 @@ LittlerootTown_BrendansHouse_2F_Text_1F9B0D: @ 81F9B0D .string "Checking this POKéDEX out gives me\n" .string "the urge to hit the road again.$" -LittlerootTown_BrendansHouse_2F_Text_1F9BE7: @ 81F9BE7 +RivalsHouse_2F_Text_BrendanWhereShouldIGoNext: @ 81F9BE7 .string "BRENDAN: I'm having a hard time deciding\n" .string "where I should catch POKéMON next.\p" .string "Hey, {PLAYER}, if I see you while I'm out\n" diff --git a/data/scripts/new_game.inc b/data/scripts/new_game.inc index ea1b21ac7a..f053b32990 100644 --- a/data/scripts/new_game.inc +++ b/data/scripts/new_game.inc @@ -117,7 +117,7 @@ EventScript_ResetAllMapFlags:: @ 82715DE setflag FLAG_HIDE_PETALBURG_GYM_GREETER setflag FLAG_HIDE_PETALBURG_GYM_WALLYS_UNCLE setflag FLAG_HIDE_LITTLEROOT_TOWN_BRENDANS_HOUSE_BRENDAN - setflag FLAG_HIDE_LITTLEROOT_TOWN_MAYS_HOUSE_BRENDAN + setflag FLAG_HIDE_LITTLEROOT_TOWN_MAYS_HOUSE_MAY setflag FLAG_HIDE_LITTLEROOT_TOWN_BRENDANS_HOUSE_RIVAL_BEDROOM setflag FLAG_HIDE_LITTLEROOT_TOWN_MAYS_HOUSE_RIVAL_BEDROOM setflag FLAG_HIDE_PLAYERS_HOUSE_DAD diff --git a/data/scripts/players_house.inc b/data/scripts/players_house.inc index f88d3af6c0..acb1536e8a 100644 --- a/data/scripts/players_house.inc +++ b/data/scripts/players_house.inc @@ -1,67 +1,63 @@ -LittlerootTown_BrendansHouse_2F_EventScript_2926FE:: @ 82926FE -LittlerootTown_MaysHouse_2F_EventScript_2926FE:: @ 82926FE +PlayersHouse_2F_EventScript_BlockStairsUntilClockIsSet:: @ 82926FE setvar VAR_LITTLEROOT_INTRO_STATE, 5 return -LittlerootTown_BrendansHouse_1F_EventScript_292704:: @ 8292704 -LittlerootTown_MaysHouse_1F_EventScript_292704:: @ 8292704 - msgbox LittlerootTown_BrendansHouse_1F_Text_1F7A1C, MSGBOX_DEFAULT +PlayersHouse_1F_EventScript_EnterHouseMovingIn:: @ 8292704 + msgbox PlayersHouse_1F_Text_IsntItNiceInHere, MSGBOX_DEFAULT applymovement VAR_0x8004, Common_Movement_FacePlayer waitmovement 0 - compare VAR_0x8005, 0 - call_if_eq LittlerootTown_BrendansHouse_1F_EventScript_29274D - compare VAR_0x8005, 1 - call_if_eq LittlerootTown_BrendansHouse_1F_EventScript_292758 - msgbox LittlerootTown_BrendansHouse_1F_Text_1F7A46, MSGBOX_DEFAULT + compare VAR_0x8005, MALE + call_if_eq PlayersHouse_1F_EventScript_MomFacePlayerMovingInMale + compare VAR_0x8005, FEMALE + call_if_eq PlayersHouse_1F_EventScript_MomFacePlayerMovingInFemale + msgbox PlayersHouse_1F_Text_MoversPokemonGoSetClock, MSGBOX_DEFAULT closemessage setvar VAR_LITTLEROOT_INTRO_STATE, 4 - applymovement EVENT_OBJ_ID_PLAYER, LittlerootTown_BrendansHouse_1F_Movement_292763 + applymovement EVENT_OBJ_ID_PLAYER, PlayersHouse_1F_Movement_PlayerWalkIn applymovement VAR_0x8004, Common_Movement_WalkInPlaceFastestUp waitmovement 0 releaseall end -LittlerootTown_BrendansHouse_1F_EventScript_29274D:: @ 829274D +PlayersHouse_1F_EventScript_MomFacePlayerMovingInMale:: @ 829274D applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceFastestRight waitmovement 0 return -LittlerootTown_BrendansHouse_1F_EventScript_292758:: @ 8292758 +PlayersHouse_1F_EventScript_MomFacePlayerMovingInFemale:: @ 8292758 applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceFastestLeft waitmovement 0 return -LittlerootTown_BrendansHouse_1F_Movement_292763: @ 8292763 +PlayersHouse_1F_Movement_PlayerWalkIn: @ 8292763 walk_up step_end -LittlerootTown_BrendansHouse_1F_EventScript_292765:: @ 8292765 -LittlerootTown_MaysHouse_1F_EventScript_292765:: @ 8292765 - msgbox LittlerootTown_BrendansHouse_1F_Text_1F7B24, MSGBOX_DEFAULT +PlayersHouse_1F_EventScript_MomGoSeeRoom:: @ 8292765 + msgbox PlayersHouse_1F_Text_ArentYouInterestedInRoom, MSGBOX_DEFAULT closemessage applymovement VAR_0x8004, Common_Movement_WalkInPlaceFastestUp - applymovement EVENT_OBJ_ID_PLAYER, LittlerootTown_BrendansHouse_1F_Movement_292AF0 + applymovement EVENT_OBJ_ID_PLAYER, PlayersHouse_1F_Movement_MovePlayerAwayFromDoor waitmovement 0 releaseall end -LittlerootTown_BrendansHouse_2F_EventScript_292781:: @ 8292781 +LittlerootTown_BrendansHouse_2F_EventScript_WallClock:: @ 8292781 lockall - setvar VAR_0x8004, 0 - goto LittlerootTown_BrendansHouse_2F_EventScript_292799 + setvar VAR_0x8004, MALE + goto PlayersHouse_2F_EventScript_WallClock end -LittlerootTown_MaysHouse_2F_EventScript_29278D:: @ 829278D +LittlerootTown_MaysHouse_2F_EventScript_WallClock:: @ 829278D lockall - setvar VAR_0x8004, 1 - goto LittlerootTown_MaysHouse_2F_EventScript_292799 + setvar VAR_0x8004, FEMALE + goto PlayersHouse_2F_EventScript_WallClock end -LittlerootTown_BrendansHouse_2F_EventScript_292799:: @ 8292799 -LittlerootTown_MaysHouse_2F_EventScript_292799:: @ 8292799 - goto_if_set FLAG_SET_WALL_CLOCK, LittlerootTown_BrendansHouse_2F_EventScript_29283F - msgbox LittlerootTown_BrendansHouse_2F_Text_1F8668, MSGBOX_DEFAULT - call LittlerootTown_BrendansHouse_2F_EventScript_292849 +PlayersHouse_2F_EventScript_WallClock:: @ 8292799 + goto_if_set FLAG_SET_WALL_CLOCK, PlayersHouse_2F_EventScript_CheckWallClock + msgbox PlayersHouse_2F_Text_ClockIsStopped, MSGBOX_DEFAULT + call PlayersHouse_2F_EventScript_SetWallClock delay 30 setvar VAR_LITTLEROOT_INTRO_STATE, 6 setflag FLAG_SET_WALL_CLOCK @@ -69,41 +65,41 @@ LittlerootTown_MaysHouse_2F_EventScript_292799:: @ 8292799 setflag FLAG_HIDE_LITTLEROOT_TOWN_PLAYERS_HOUSE_VIGOROTH_2 checkplayergender compare VAR_RESULT, MALE - call_if_eq LittlerootTown_BrendansHouse_2F_EventScript_2927DF + call_if_eq PlayersHouse_2F_EventScript_MomComesUpstairsMale compare VAR_RESULT, FEMALE - call_if_eq LittlerootTown_BrendansHouse_2F_EventScript_29280F + call_if_eq PlayersHouse_2F_EventScript_MomComesUpstairsFemale playse SE_KAIDAN removeobject VAR_0x8008 releaseall end -LittlerootTown_BrendansHouse_2F_EventScript_2927DF:: @ 82927DF +PlayersHouse_2F_EventScript_MomComesUpstairsMale:: @ 82927DF setvar VAR_0x8008, 14 addobject VAR_0x8008 - applymovement VAR_0x8008, LittlerootTown_BrendansHouse_2F_Movement_292850 + applymovement VAR_0x8008, PlayersHouse_2F_Movement_MomEntersMale waitmovement 0 applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceFastestRight waitmovement 0 - msgbox LittlerootTown_BrendansHouse_2F_Text_1F869A, MSGBOX_DEFAULT + msgbox PlayersHouse_2F_Text_HowDoYouLikeYourRoom, MSGBOX_DEFAULT closemessage - applymovement VAR_0x8008, LittlerootTown_BrendansHouse_2F_Movement_292857 + applymovement VAR_0x8008, PlayersHouse_2F_Movement_MomExitsMale waitmovement 0 return -LittlerootTown_BrendansHouse_2F_EventScript_29280F:: @ 829280F +PlayersHouse_2F_EventScript_MomComesUpstairsFemale:: @ 829280F setvar VAR_0x8008, 14 addobject VAR_0x8008 - applymovement VAR_0x8008, LittlerootTown_BrendansHouse_2F_Movement_29285B + applymovement VAR_0x8008, PlayersHouse_2F_Movement_MomEntersFemale waitmovement 0 applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceFastestLeft waitmovement 0 - msgbox LittlerootTown_BrendansHouse_2F_Text_1F869A, MSGBOX_DEFAULT + msgbox PlayersHouse_2F_Text_HowDoYouLikeYourRoom, MSGBOX_DEFAULT closemessage - applymovement VAR_0x8008, LittlerootTown_BrendansHouse_2F_Movement_292862 + applymovement VAR_0x8008, PlayersHouse_2F_Movement_MomExitsFemale waitmovement 0 return -LittlerootTown_BrendansHouse_2F_EventScript_29283F:: @ 829283F +PlayersHouse_2F_EventScript_CheckWallClock:: @ 829283F incrementgamestat GAME_STAT_CHECKED_CLOCK fadescreen 1 special Special_ViewWallClock @@ -111,13 +107,13 @@ LittlerootTown_BrendansHouse_2F_EventScript_29283F:: @ 829283F releaseall end -LittlerootTown_BrendansHouse_2F_EventScript_292849:: @ 8292849 +PlayersHouse_2F_EventScript_SetWallClock:: @ 8292849 fadescreen 1 special StartWallClock waitstate return -LittlerootTown_BrendansHouse_2F_Movement_292850: @ 8292850 +PlayersHouse_2F_Movement_MomEntersMale: @ 8292850 delay_8 walk_down walk_in_place_fastest_left @@ -126,13 +122,13 @@ LittlerootTown_BrendansHouse_2F_Movement_292850: @ 8292850 walk_left step_end -LittlerootTown_BrendansHouse_2F_Movement_292857: @ 8292857 +PlayersHouse_2F_Movement_MomExitsMale: @ 8292857 walk_right walk_up delay_8 step_end -LittlerootTown_BrendansHouse_2F_Movement_29285B: @ 829285B +PlayersHouse_2F_Movement_MomEntersFemale: @ 829285B delay_8 walk_down walk_in_place_fastest_right @@ -141,91 +137,88 @@ LittlerootTown_BrendansHouse_2F_Movement_29285B: @ 829285B walk_right step_end -LittlerootTown_BrendansHouse_2F_Movement_292862: @ 8292862 +PlayersHouse_2F_Movement_MomExitsFemale: @ 8292862 walk_left walk_up delay_8 step_end -LittlerootTown_BrendansHouse_1F_EventScript_292866:: @ 8292866 -LittlerootTown_MaysHouse_1F_EventScript_292866:: @ 8292866 +PlayersHouse_1F_EventScript_SetWatchedBroadcast:: @ 8292866 setvar VAR_LITTLEROOT_INTRO_STATE, 7 releaseall end -LittlerootTown_BrendansHouse_1F_EventScript_29286D:: @ 829286D +PlayersHouse_1F_EventScript_PetalburgGymReportMale:: @ 829286D applymovement VAR_0x8005, Common_Movement_WalkInPlaceFastestRight waitmovement 0 - call LittlerootTown_BrendansHouse_1F_EventScript_29294B - applymovement EVENT_OBJ_ID_PLAYER, LittlerootTown_BrendansHouse_1F_Movement_292AE0 + call PlayersHouse_1F_EventScript_MomNoticeGymBroadcast + applymovement EVENT_OBJ_ID_PLAYER, PlayersHouse_1F_Movement_PlayerApproachTVForGymMale waitmovement 0 playbgm MUS_INTER_V, 0 - msgbox LittlerootTown_BrendansHouse_1F_Text_1F7BBC, MSGBOX_DEFAULT + msgbox PlayersHouse_1F_Text_MaybeDadWillBeOn, MSGBOX_DEFAULT closemessage - applymovement VAR_0x8005, LittlerootTown_BrendansHouse_1F_Movement_2929B7 + applymovement VAR_0x8005, PlayersHouse_1F_Movement_MomMakeRoomToSeeTVMale waitmovement 0 - applymovement EVENT_OBJ_ID_PLAYER, LittlerootTown_BrendansHouse_1F_Movement_292AE6 + applymovement EVENT_OBJ_ID_PLAYER, PlayersHouse_1F_Movement_PlayerMoveToTVMale waitmovement 0 - call LittlerootTown_BrendansHouse_1F_EventScript_29296C + call PlayersHouse_1F_EventScript_WatchGymBroadcast applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceFastestLeft waitmovement 0 - msgbox LittlerootTown_BrendansHouse_1F_Text_1F7BF1, MSGBOX_DEFAULT - msgbox LittlerootTown_BrendansHouse_1F_Text_1F7C35, MSGBOX_DEFAULT + msgbox PlayersHouse_1F_Text_ItsOverWeMissedHim, MSGBOX_DEFAULT + msgbox PlayersHouse_1F_Text_GoIntroduceYourselfNextDoor, MSGBOX_DEFAULT closemessage setvar VAR_TEMP_1, 1 - applymovement VAR_0x8005, LittlerootTown_BrendansHouse_1F_Movement_2929BD + applymovement VAR_0x8005, PlayersHouse_1F_Movement_MomReturnToSeatMale waitmovement 0 - goto LittlerootTown_BrendansHouse_1F_EventScript_292866 + goto PlayersHouse_1F_EventScript_SetWatchedBroadcast end -LittlerootTown_MaysHouse_1F_EventScript_2928DC:: @ 82928DC +PlayersHouse_1F_EventScript_PetalburgGymReportFemale:: @ 82928DC applymovement VAR_0x8005, Common_Movement_WalkInPlaceFastestLeft waitmovement 0 - call LittlerootTown_MaysHouse_1F_EventScript_29294B - applymovement EVENT_OBJ_ID_PLAYER, LittlerootTown_MaysHouse_1F_Movement_292AE8 + call PlayersHouse_1F_EventScript_MomNoticeGymBroadcast + applymovement EVENT_OBJ_ID_PLAYER, PlayersHouse_1F_Movement_PlayerApproachTVForGymFemale waitmovement 0 playbgm MUS_INTER_V, 0 - msgbox LittlerootTown_MaysHouse_1F_Text_1F7BBC, MSGBOX_DEFAULT + msgbox PlayersHouse_1F_Text_MaybeDadWillBeOn, MSGBOX_DEFAULT closemessage - applymovement VAR_0x8005, LittlerootTown_MaysHouse_1F_Movement_2929BA + applymovement VAR_0x8005, PlayersHouse_1F_Movement_MomMakeRoomToSeeTVFemale waitmovement 0 - applymovement EVENT_OBJ_ID_PLAYER, LittlerootTown_MaysHouse_1F_Movement_292AEE + applymovement EVENT_OBJ_ID_PLAYER, PlayersHouse_1F_Movement_PlayerMoveToTVFemale waitmovement 0 - call LittlerootTown_MaysHouse_1F_EventScript_29296C + call PlayersHouse_1F_EventScript_WatchGymBroadcast applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceFastestRight waitmovement 0 - msgbox LittlerootTown_MaysHouse_1F_Text_1F7BF1, MSGBOX_DEFAULT - msgbox LittlerootTown_MaysHouse_1F_Text_1F7C35, MSGBOX_DEFAULT + msgbox PlayersHouse_1F_Text_ItsOverWeMissedHim, MSGBOX_DEFAULT + msgbox PlayersHouse_1F_Text_GoIntroduceYourselfNextDoor, MSGBOX_DEFAULT closemessage setvar VAR_TEMP_1, 1 - applymovement VAR_0x8005, LittlerootTown_MaysHouse_1F_Movement_2929C1 + applymovement VAR_0x8005, PlayersHouse_1F_Movement_MomReturnToSeatFemale waitmovement 0 - goto LittlerootTown_MaysHouse_1F_EventScript_292866 + goto PlayersHouse_1F_EventScript_SetWatchedBroadcast end -LittlerootTown_BrendansHouse_1F_EventScript_29294B:: @ 829294B -LittlerootTown_MaysHouse_1F_EventScript_29294B:: @ 829294B +PlayersHouse_1F_EventScript_MomNoticeGymBroadcast:: @ 829294B playse SE_PIN applymovement VAR_0x8005, Common_Movement_ExclamationMark waitmovement 0 applymovement VAR_0x8005, Common_Movement_Delay48 waitmovement 0 - msgbox LittlerootTown_BrendansHouse_1F_Text_1F7B96, MSGBOX_DEFAULT + msgbox PlayersHouse_1F_Text_OhComeQuickly, MSGBOX_DEFAULT closemessage return -LittlerootTown_BrendansHouse_1F_EventScript_29296C:: @ 829296C -LittlerootTown_MaysHouse_1F_EventScript_29296C:: @ 829296C +PlayersHouse_1F_EventScript_WatchGymBroadcast:: @ 829296C applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceFastestUp waitmovement 0 - msgbox LittlerootTown_BrendansHouse_1F_Text_1F7EC6, MSGBOX_DEFAULT + msgbox PlayersHouse_1F_Text_ReportFromPetalburgGym, MSGBOX_DEFAULT fadedefaultbgm special TurnOffTVScreen setflag FLAG_SYS_TV_HOME delay 35 return -LittlerootTown_BrendansHouse_1F_Movement_292989: @ 8292989 +PlayersHouse_1F_Movement_MomApproachDadMale: @ 8292989 walk_up walk_right walk_right @@ -235,7 +228,7 @@ LittlerootTown_BrendansHouse_1F_Movement_292989: @ 8292989 walk_in_place_fastest_right step_end -LittlerootTown_BrendansHouse_1F_Movement_292991: @ 8292991 +PlayersHouse_1F_Movement_MomApproachDadFemale: @ 8292991 walk_up walk_left walk_left @@ -245,15 +238,15 @@ LittlerootTown_BrendansHouse_1F_Movement_292991: @ 8292991 walk_in_place_fastest_left step_end -LittlerootTown_BrendansHouse_1F_Movement_292999: @ 8292999 +PlayersHouse_1F_Movement_MomApproachPlayerMale: @ 8292999 walk_right step_end -LittlerootTown_BrendansHouse_1F_Movement_29299B: @ 829299B +PlayersHouse_1F_Movement_MomApproachPlayerFemale: @ 829299B walk_left step_end -LittlerootTown_BrendansHouse_1F_Movement_29299D: @ 829299D +PlayersHouse_1F_Movement_MomNoticesLatiBroadcastMale: @ 829299D walk_in_place_fastest_left delay_16 delay_16 @@ -264,7 +257,7 @@ LittlerootTown_BrendansHouse_1F_Movement_29299D: @ 829299D delay_16 step_end -LittlerootTown_BrendansHouse_1F_Movement_2929A6: @ 82929A6 +PlayersHouse_1F_Movement_MomNoticesLatiBroadcastFemale: @ 82929A6 walk_in_place_fastest_right delay_16 delay_16 @@ -275,70 +268,69 @@ LittlerootTown_BrendansHouse_1F_Movement_2929A6: @ 82929A6 delay_16 step_end -LittlerootTown_BrendansHouse_1F_Movement_2929AF: @ 82929AF +PlayersHouse_1F_Movement_MomApproachPlayerAfterTVMale: @ 82929AF walk_up walk_left walk_left step_end -LittlerootTown_BrendansHouse_1F_Movement_2929B3: @ 82929B3 +PlayersHouse_1F_Movement_MomApproachPlayerAfterTVFemale: @ 82929B3 walk_up walk_right walk_right step_end -LittlerootTown_BrendansHouse_1F_Movement_2929B7: @ 82929B7 +PlayersHouse_1F_Movement_MomMakeRoomToSeeTVMale: @ 82929B7 walk_left walk_in_place_fastest_right step_end -LittlerootTown_MaysHouse_1F_Movement_2929BA: @ 82929BA +PlayersHouse_1F_Movement_MomMakeRoomToSeeTVFemale: @ 82929BA walk_right walk_in_place_fastest_left step_end -LittlerootTown_BrendansHouse_1F_Movement_2929BD: @ 82929BD +PlayersHouse_1F_Movement_MomReturnToSeatMale: @ 82929BD walk_left walk_down walk_in_place_fastest_right step_end -LittlerootTown_MaysHouse_1F_Movement_2929C1: @ 82929C1 +PlayersHouse_1F_Movement_MomReturnToSeatFemale: @ 82929C1 walk_right walk_down walk_in_place_fastest_left step_end -LittlerootTown_BrendansHouse_1F_EventScript_2929C5:: @ 82929C5 -LittlerootTown_MaysHouse_1F_EventScript_2929C5:: @ 82929C5 +PlayersHouse_1F_EventScript_Mom:: @ 82929C5 lock faceplayer compare VAR_LITTLEROOT_HOUSES_STATE, 4 - goto_if_eq LittlerootTown_BrendansHouse_1F_EventScript_292A0F + goto_if_eq PlayersHouse_1F_EventScript_DontPushYourselfTooHard compare VAR_LITTLEROOT_HOUSES_STATE_2, 4 - goto_if_eq LittlerootTown_BrendansHouse_1F_EventScript_292A0F - goto_if_set FLAG_HAS_MATCH_CALL, LittlerootTown_BrendansHouse_1F_EventScript_292A19 - goto_if_set FLAG_RESCUED_BIRCH, LittlerootTown_BrendansHouse_1F_EventScript_292A86 + goto_if_eq PlayersHouse_1F_EventScript_DontPushYourselfTooHard + goto_if_set FLAG_HAS_MATCH_CALL, PlayersHouse_1F_EventScript_TryRegisterMom + goto_if_set FLAG_RESCUED_BIRCH, PlayersHouse_1F_EventScript_MomHealsParty compare VAR_TEMP_1, 1 - goto_if_eq LittlerootTown_BrendansHouse_1F_EventScript_292A94 + goto_if_eq PlayersHouse_1F_EventScript_SeeYouHoney compare VAR_LITTLEROOT_INTRO_STATE, 7 - goto_if_eq LittlerootTown_BrendansHouse_1F_EventScript_292AB0 - msgbox LittlerootTown_BrendansHouse_1F_Text_1F7A1C, MSGBOX_DEFAULT + goto_if_eq PlayersHouse_1F_EventScript_DidYouMeetProfBirch + msgbox PlayersHouse_1F_Text_IsntItNiceInHere, MSGBOX_DEFAULT release end -LittlerootTown_BrendansHouse_1F_EventScript_292A0F:: @ 8292A0F - msgbox LittlerootTown_BrendansHouse_1F_Text_1F7DBE, MSGBOX_DEFAULT +PlayersHouse_1F_EventScript_DontPushYourselfTooHard:: @ 8292A0F + msgbox PlayersHouse_1F_Text_DontPushYourselfTooHard, MSGBOX_DEFAULT release end -LittlerootTown_BrendansHouse_1F_EventScript_292A19:: @ 8292A19 - goto_if_set FLAG_ENABLE_MOM_MATCH_CALL, LittlerootTown_BrendansHouse_1F_EventScript_292A43 - msgbox LittlerootTown_BrendansHouse_1F_Text_1F7E0E, MSGBOX_DEFAULT +PlayersHouse_1F_EventScript_TryRegisterMom:: @ 8292A19 + goto_if_set FLAG_ENABLE_MOM_MATCH_CALL, PlayersHouse_1F_EventScript_CheckGiveAmuletCoin + msgbox PlayersHouse_1F_Text_IsThatAPokenav, MSGBOX_DEFAULT closemessage delay 30 playfanfare MUS_ME_TORE_EYE - msgbox LittlerootTown_BrendansHouse_1F_Text_1F7E89, MSGBOX_DEFAULT + msgbox PlayersHouse_1F_Text_RegisteredMom, MSGBOX_DEFAULT waitfanfare closemessage delay 30 @@ -346,67 +338,65 @@ LittlerootTown_BrendansHouse_1F_EventScript_292A19:: @ 8292A19 release end -LittlerootTown_BrendansHouse_1F_EventScript_292A43:: @ 8292A43 - goto_if_set FLAG_BADGE05_GET, LittlerootTown_BrendansHouse_1F_EventScript_292A51 - goto LittlerootTown_BrendansHouse_1F_EventScript_292A86 +PlayersHouse_1F_EventScript_CheckGiveAmuletCoin:: @ 8292A43 + goto_if_set FLAG_BADGE05_GET, PlayersHouse_1F_EventScript_TryGiveAmuletCoin + goto PlayersHouse_1F_EventScript_MomHealsParty -LittlerootTown_BrendansHouse_1F_EventScript_292A51:: @ 8292A51 - goto_if_set FLAG_MOM_SAYS_GOODBYE, LittlerootTown_BrendansHouse_1F_EventScript_292A86 - msgbox LittlerootTown_BrendansHouse_1F_Text_1F7D73, MSGBOX_DEFAULT +PlayersHouse_1F_EventScript_TryGiveAmuletCoin:: @ 8292A51 + goto_if_set FLAG_RECEIVED_AMULET_COIN, PlayersHouse_1F_EventScript_MomHealsParty + msgbox PlayersHouse_1F_Text_GotDadsBadgeHeresSomethingFromMom, MSGBOX_DEFAULT giveitem_std ITEM_AMULET_COIN compare VAR_RESULT, 0 goto_if_eq Common_EventScript_ShowBagIsFull - msgbox LittlerootTown_BrendansHouse_1F_Text_1F7DBE, MSGBOX_DEFAULT - setflag FLAG_MOM_SAYS_GOODBYE + msgbox PlayersHouse_1F_Text_DontPushYourselfTooHard, MSGBOX_DEFAULT + setflag FLAG_RECEIVED_AMULET_COIN release end -LittlerootTown_BrendansHouse_1F_EventScript_292A86:: @ 8292A86 - msgbox LittlerootTown_BrendansHouse_1F_Text_1F7D08, MSGBOX_DEFAULT - goto LittlerootTown_BrendansHouse_1F_EventScript_292A9E +PlayersHouse_1F_EventScript_MomHealsParty:: @ 8292A86 + msgbox PlayersHouse_1F_Text_YouShouldRestABit, MSGBOX_DEFAULT + goto PlayersHouse_1F_EventScript_HealParty end -LittlerootTown_BrendansHouse_1F_EventScript_292A94:: @ 8292A94 - msgbox LittlerootTown_BrendansHouse_1F_Text_1F7CC3, MSGBOX_DEFAULT +PlayersHouse_1F_EventScript_SeeYouHoney:: @ 8292A94 + msgbox PlayersHouse_1F_Text_SeeYouHoney, MSGBOX_DEFAULT release end -LittlerootTown_BrendansHouse_1F_EventScript_292A9E:: @ 8292A9E +PlayersHouse_1F_EventScript_HealParty:: @ 8292A9E closemessage call Common_EventScript_OutOfCenterPartyHeal incrementgamestat GAME_STAT_RESTED_AT_HOME - msgbox LittlerootTown_BrendansHouse_1F_Text_1F7D5C, MSGBOX_DEFAULT + msgbox PlayersHouse_1F_Text_TakeCareHoney, MSGBOX_DEFAULT release end -LittlerootTown_BrendansHouse_1F_EventScript_292AB0:: @ 8292AB0 - msgbox LittlerootTown_BrendansHouse_1F_Text_1F7CD8, MSGBOX_DEFAULT +PlayersHouse_1F_EventScript_DidYouMeetProfBirch:: @ 8292AB0 + msgbox PlayersHouse_1F_Text_DidYouMeetProfBirch, MSGBOX_DEFAULT release end -LittlerootTown_BrendansHouse_1F_EventScript_292ABA:: @ 8292ABA -LittlerootTown_MaysHouse_1F_EventScript_292ABA:: @ 8292ABA +PlayersHouse_1F_EventScript_Vigoroth1:: @ 8292ABA lock faceplayer waitse playmoncry SPECIES_VIGOROTH, 0 - msgbox LittlerootTown_BrendansHouse_1F_Text_1F7EA8, MSGBOX_DEFAULT + msgbox PlayersHouse_1F_Text_Vigoroth1, MSGBOX_DEFAULT waitmoncry release end -LittlerootTown_BrendansHouse_1F_EventScript_292ACD:: @ 8292ACD -LittlerootTown_MaysHouse_1F_EventScript_292ACD:: @ 8292ACD +PlayersHouse_1F_EventScript_Vigoroth2:: @ 8292ACD lock faceplayer waitse playmoncry SPECIES_VIGOROTH, 0 - msgbox LittlerootTown_BrendansHouse_1F_Text_1F7EB3, MSGBOX_DEFAULT + msgbox PlayersHouse_1F_Text_Vigoroth2, MSGBOX_DEFAULT waitmoncry release end -LittlerootTown_BrendansHouse_1F_Movement_292AE0: @ 8292AE0 +PlayersHouse_1F_Movement_PlayerApproachTVForGymMale: @ 8292AE0 walk_down walk_down walk_left @@ -414,11 +404,11 @@ LittlerootTown_BrendansHouse_1F_Movement_292AE0: @ 8292AE0 walk_left step_end -LittlerootTown_BrendansHouse_1F_Movement_292AE6: @ 8292AE6 +PlayersHouse_1F_Movement_PlayerMoveToTVMale: @ 8292AE6 walk_left step_end -LittlerootTown_MaysHouse_1F_Movement_292AE8: @ 8292AE8 +PlayersHouse_1F_Movement_PlayerApproachTVForGymFemale: @ 8292AE8 walk_down walk_down walk_right @@ -426,26 +416,25 @@ LittlerootTown_MaysHouse_1F_Movement_292AE8: @ 8292AE8 walk_right step_end -LittlerootTown_MaysHouse_1F_Movement_292AEE: @ 8292AEE +PlayersHouse_1F_Movement_PlayerMoveToTVFemale: @ 8292AEE walk_right step_end -LittlerootTown_BrendansHouse_1F_Movement_292AF0: @ 8292AF0 +PlayersHouse_1F_Movement_MovePlayerAwayFromDoor: @ 8292AF0 walk_up step_end -LittlerootTown_BrendansHouse_1F_EventScript_292AF2:: @ 8292AF2 -LittlerootTown_MaysHouse_1F_EventScript_292AF2:: @ 8292AF2 +PlayersHouse_1F_EventScript_GetSSTicketAndSeeLatiTV:: @ 8292AF2 lockall checkplayergender compare VAR_RESULT, MALE - call_if_eq LittlerootTown_BrendansHouse_1F_EventScript_292C76 + call_if_eq PlayersHouse_1F_EventScript_SetUpObjectEventVarsMale compare VAR_RESULT, FEMALE - call_if_eq LittlerootTown_BrendansHouse_1F_EventScript_292C86 - compare VAR_0x8008, 0 - call_if_eq LittlerootTown_BrendansHouse_1F_EventScript_292D08 - compare VAR_0x8008, 1 - call_if_eq LittlerootTown_BrendansHouse_1F_EventScript_292D13 + call_if_eq PlayersHouse_1F_EventScript_SetUpObjectEventVarsFemale + compare VAR_0x8008, MALE + call_if_eq PlayersHouse_1F_EventScript_PlayerEnterRoomMale + compare VAR_0x8008, FEMALE + call_if_eq PlayersHouse_1F_EventScript_PlayerEnterRoomFemale applymovement VAR_0x8009, Common_Movement_FacePlayer waitmovement 0 playse SE_PIN @@ -454,64 +443,64 @@ LittlerootTown_MaysHouse_1F_EventScript_292AF2:: @ 8292AF2 applymovement VAR_0x8009, Common_Movement_Delay48 waitmovement 0 delay 20 - compare VAR_0x8008, 0 - call_if_eq LittlerootTown_BrendansHouse_1F_EventScript_292C96 - compare VAR_0x8008, 1 - call_if_eq LittlerootTown_BrendansHouse_1F_EventScript_292CA1 - msgbox LittlerootTown_BrendansHouse_1F_Text_1F800E, MSGBOX_DEFAULT + compare VAR_0x8008, MALE + call_if_eq PlayersHouse_1F_EventScript_DadApproachPlayerMale + compare VAR_0x8008, FEMALE + call_if_eq PlayersHouse_1F_EventScript_DadApproachPlayerFemale + msgbox PlayersHouse_1F_Text_TicketFromBrineyCameForYou, MSGBOX_DEFAULT giveitem_std ITEM_SS_TICKET - msgbox LittlerootTown_BrendansHouse_1F_Text_1F80FE, MSGBOX_DEFAULT + msgbox PlayersHouse_1F_Text_PortsInSlateportLilycove, MSGBOX_DEFAULT closemessage delay 20 - compare VAR_0x8008, 0 - call_if_eq LittlerootTown_BrendansHouse_1F_EventScript_292CAC - compare VAR_0x8008, 1 - call_if_eq LittlerootTown_BrendansHouse_1F_EventScript_292CC1 - msgbox LittlerootTown_BrendansHouse_1F_Text_1F815B, MSGBOX_DEFAULT + compare VAR_0x8008, MALE + call_if_eq PlayersHouse_1F_EventScript_MomApproachDadMale + compare VAR_0x8008, FEMALE + call_if_eq PlayersHouse_1F_EventScript_MomApproachDadFemale + msgbox PlayersHouse_1F_Text_BetterGetBackToGym, MSGBOX_DEFAULT closemessage - compare VAR_0x8008, 0 - call_if_eq LittlerootTown_BrendansHouse_1F_EventScript_292CD6 - compare VAR_0x8008, 1 - call_if_eq LittlerootTown_BrendansHouse_1F_EventScript_292CEF + compare VAR_0x8008, MALE + call_if_eq PlayersHouse_1F_EventScript_DadExitsMale + compare VAR_0x8008, FEMALE + call_if_eq PlayersHouse_1F_EventScript_DadExitsFemale playse SE_DOOR removeobject VAR_0x8009 setflag FLAG_RECEIVED_SS_TICKET delay 30 - compare VAR_0x8008, 0 - call_if_eq LittlerootTown_BrendansHouse_1F_EventScript_292D48 - compare VAR_0x8008, 1 - call_if_eq LittlerootTown_BrendansHouse_1F_EventScript_292D5D + compare VAR_0x8008, MALE + call_if_eq PlayersHouse_1F_EventScript_MomApproachPlayerMale + compare VAR_0x8008, FEMALE + call_if_eq PlayersHouse_1F_EventScript_MomApproachPlayerFemale delay 20 - msgbox LittlerootTown_BrendansHouse_1F_Text_1F81B9, MSGBOX_DEFAULT + msgbox PlayersHouse_1F_Text_DadShouldStayLonger, MSGBOX_DEFAULT closemessage setflag FLAG_SYS_TV_LATIAS_LATIOS special TurnOnTVScreen delay 60 - compare VAR_0x8008, 0 - call_if_eq LittlerootTown_BrendansHouse_1F_EventScript_292D72 - compare VAR_0x8008, 1 - call_if_eq LittlerootTown_BrendansHouse_1F_EventScript_292D7D - msgbox LittlerootTown_BrendansHouse_1F_Text_1F824B, MSGBOX_DEFAULT + compare VAR_0x8008, MALE + call_if_eq PlayersHouse_1F_EventScript_MomNoticesLatiBroadcastMale + compare VAR_0x8008, FEMALE + call_if_eq PlayersHouse_1F_EventScript_MomNoticesLatiBroadcastFemale + msgbox PlayersHouse_1F_Text_IsThatABreakingStory, MSGBOX_DEFAULT closemessage - compare VAR_0x8008, 0 - call_if_eq LittlerootTown_BrendansHouse_1F_EventScript_292D1E - compare VAR_0x8008, 1 - call_if_eq LittlerootTown_BrendansHouse_1F_EventScript_292D33 - msgbox LittlerootTown_BrendansHouse_1F_Text_1F826F, MSGBOX_DEFAULT + compare VAR_0x8008, MALE + call_if_eq PlayersHouse_1F_EventScript_PlayerApproachTVForLatiMale + compare VAR_0x8008, FEMALE + call_if_eq PlayersHouse_1F_EventScript_PlayerApproachTVForLatiFemale + msgbox PlayersHouse_1F_Text_LatiEmergencyNewsFlash, MSGBOX_DEFAULT closemessage clearflag FLAG_SYS_TV_LATIAS_LATIOS setflag FLAG_LATIOS_OR_LATIAS_ROAMING special TurnOffTVScreen - compare VAR_0x8008, 0 - call_if_eq LittlerootTown_BrendansHouse_1F_EventScript_292D88 - compare VAR_0x8008, 1 - call_if_eq LittlerootTown_BrendansHouse_1F_EventScript_292D9D - msgbox LittlerootTown_BrendansHouse_1F_Text_1F8351, MSGBOX_DEFAULT + compare VAR_0x8008, MALE + call_if_eq PlayersHouse_1F_EventScript_MomApproachPlayerAfterTVMale + compare VAR_0x8008, FEMALE + call_if_eq PlayersHouse_1F_EventScript_MomApproachPlayerAfterTVFemale + msgbox PlayersHouse_1F_Text_WhatColorDidTheySay, MSGBOX_DEFAULT multichoice 22, 8, MULTI_TV_LATI, 1 copyvar VAR_0x8004, VAR_RESULT special InitRoamer copyvar VAR_ROAMER_POKEMON, VAR_RESULT - msgbox LittlerootTown_BrendansHouse_1F_Text_1F83A1, MSGBOX_DEFAULT + msgbox PlayersHouse_1F_Text_StillUnknownPokemon, MSGBOX_DEFAULT closemessage setvar VAR_LITTLEROOT_HOUSES_STATE, 4 setvar VAR_LITTLEROOT_HOUSES_STATE_2, 4 @@ -519,155 +508,155 @@ LittlerootTown_MaysHouse_1F_EventScript_292AF2:: @ 8292AF2 end @ Never called. -LittlerootTown_BrendansHouse_1F_EventScript_292C72:: @ 8292C72 +PlayersHouse_1F_EventScript_AirLatiBroadcast:: @ 8292C72 setflag FLAG_SYS_TV_LATIAS_LATIOS return -LittlerootTown_BrendansHouse_1F_EventScript_292C76:: @ 8292C76 - setvar VAR_0x8008, 0 - setvar VAR_0x8009, 5 - setvar VAR_0x800A, 1 +PlayersHouse_1F_EventScript_SetUpObjectEventVarsMale:: @ 8292C76 + setvar VAR_0x8008, MALE + setvar VAR_0x8009, 5 @ Dad object event ID + setvar VAR_0x800A, 1 @ Mom object event ID return -LittlerootTown_BrendansHouse_1F_EventScript_292C86:: @ 8292C86 - setvar VAR_0x8008, 1 - setvar VAR_0x8009, 5 - setvar VAR_0x800A, 1 +PlayersHouse_1F_EventScript_SetUpObjectEventVarsFemale:: @ 8292C86 + setvar VAR_0x8008, FEMALE + setvar VAR_0x8009, 5 @ Dad object event ID + setvar VAR_0x800A, 1 @ Mom object event ID return -LittlerootTown_BrendansHouse_1F_EventScript_292C96:: @ 8292C96 - applymovement VAR_0x8009, LittlerootTown_BrendansHouse_1F_Movement_292DB2 +PlayersHouse_1F_EventScript_DadApproachPlayerMale:: @ 8292C96 + applymovement VAR_0x8009, PlayersHouse_1F_Movement_DadApproachPlayerMale waitmovement 0 return -LittlerootTown_BrendansHouse_1F_EventScript_292CA1:: @ 8292CA1 - applymovement VAR_0x8009, LittlerootTown_BrendansHouse_1F_Movement_292DB5 +PlayersHouse_1F_EventScript_DadApproachPlayerFemale:: @ 8292CA1 + applymovement VAR_0x8009, PlayersHouse_1F_Movement_DadApproachPlayerFemale waitmovement 0 return -LittlerootTown_BrendansHouse_1F_EventScript_292CAC:: @ 8292CAC - applymovement VAR_0x800A, LittlerootTown_BrendansHouse_1F_Movement_292989 +PlayersHouse_1F_EventScript_MomApproachDadMale:: @ 8292CAC + applymovement VAR_0x800A, PlayersHouse_1F_Movement_MomApproachDadMale waitmovement 0 - applymovement VAR_0x8009, LittlerootTown_BrendansHouse_1F_Movement_292DB8 + applymovement VAR_0x8009, PlayersHouse_1F_Movement_DadFaceMomMale waitmovement 0 return -LittlerootTown_BrendansHouse_1F_EventScript_292CC1:: @ 8292CC1 - applymovement VAR_0x800A, LittlerootTown_BrendansHouse_1F_Movement_292991 +PlayersHouse_1F_EventScript_MomApproachDadFemale:: @ 8292CC1 + applymovement VAR_0x800A, PlayersHouse_1F_Movement_MomApproachDadFemale waitmovement 0 - applymovement VAR_0x8009, LittlerootTown_BrendansHouse_1F_Movement_292DBA + applymovement VAR_0x8009, PlayersHouse_1F_Movement_DadFaceMomFemale waitmovement 0 return -LittlerootTown_BrendansHouse_1F_EventScript_292CD6:: @ 8292CD6 - applymovement EVENT_OBJ_ID_PLAYER, LittlerootTown_BrendansHouse_1F_Movement_292DCC - applymovement VAR_0x800A, LittlerootTown_BrendansHouse_1F_Movement_292DCC - applymovement VAR_0x8009, LittlerootTown_BrendansHouse_1F_Movement_292DBC +PlayersHouse_1F_EventScript_DadExitsMale:: @ 8292CD6 + applymovement EVENT_OBJ_ID_PLAYER, PlayersHouse_1F_Movement_MomAndPlayerWatchDadExit + applymovement VAR_0x800A, PlayersHouse_1F_Movement_MomAndPlayerWatchDadExit + applymovement VAR_0x8009, PlayersHouse_1F_Movement_DadExitsMale waitmovement 0 return -LittlerootTown_BrendansHouse_1F_EventScript_292CEF:: @ 8292CEF - applymovement EVENT_OBJ_ID_PLAYER, LittlerootTown_BrendansHouse_1F_Movement_292DCC - applymovement VAR_0x800A, LittlerootTown_BrendansHouse_1F_Movement_292DCC - applymovement VAR_0x8009, LittlerootTown_BrendansHouse_1F_Movement_292DC1 +PlayersHouse_1F_EventScript_DadExitsFemale:: @ 8292CEF + applymovement EVENT_OBJ_ID_PLAYER, PlayersHouse_1F_Movement_MomAndPlayerWatchDadExit + applymovement VAR_0x800A, PlayersHouse_1F_Movement_MomAndPlayerWatchDadExit + applymovement VAR_0x8009, PlayersHouse_1F_Movement_DadExitsFemale waitmovement 0 return -LittlerootTown_BrendansHouse_1F_EventScript_292D08:: @ 8292D08 - applymovement EVENT_OBJ_ID_PLAYER, LittlerootTown_BrendansHouse_1F_Movement_292DC6 +PlayersHouse_1F_EventScript_PlayerEnterRoomMale:: @ 8292D08 + applymovement EVENT_OBJ_ID_PLAYER, PlayersHouse_1F_Movement_PlayerEnterRoomMale waitmovement 0 return -LittlerootTown_BrendansHouse_1F_EventScript_292D13:: @ 8292D13 - applymovement EVENT_OBJ_ID_PLAYER, LittlerootTown_BrendansHouse_1F_Movement_292DD1 +PlayersHouse_1F_EventScript_PlayerEnterRoomFemale:: @ 8292D13 + applymovement EVENT_OBJ_ID_PLAYER, PlayersHouse_1F_Movement_PlayerEnterRoomFemale waitmovement 0 return -LittlerootTown_BrendansHouse_1F_EventScript_292D1E:: @ 8292D1E - applymovement EVENT_OBJ_ID_PLAYER, LittlerootTown_BrendansHouse_1F_Movement_292DD7 +PlayersHouse_1F_EventScript_PlayerApproachTVForLatiMale:: @ 8292D1E + applymovement EVENT_OBJ_ID_PLAYER, PlayersHouse_1F_Movement_PlayerApproachTVForLatiMale waitmovement 0 applymovement VAR_0x800A, Common_Movement_WalkInPlaceFastestLeft waitmovement 0 return -LittlerootTown_BrendansHouse_1F_EventScript_292D33:: @ 8292D33 - applymovement EVENT_OBJ_ID_PLAYER, LittlerootTown_BrendansHouse_1F_Movement_292DDE +PlayersHouse_1F_EventScript_PlayerApproachTVForLatiFemale:: @ 8292D33 + applymovement EVENT_OBJ_ID_PLAYER, PlayersHouse_1F_Movement_PlayerApproachTVForLatiFemale waitmovement 0 applymovement VAR_0x800A, Common_Movement_WalkInPlaceFastestRight waitmovement 0 return -LittlerootTown_BrendansHouse_1F_EventScript_292D48:: @ 8292D48 - applymovement VAR_0x800A, LittlerootTown_BrendansHouse_1F_Movement_292999 +PlayersHouse_1F_EventScript_MomApproachPlayerMale:: @ 8292D48 + applymovement VAR_0x800A, PlayersHouse_1F_Movement_MomApproachPlayerMale waitmovement 0 applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceFastestLeft waitmovement 0 return -LittlerootTown_BrendansHouse_1F_EventScript_292D5D:: @ 8292D5D - applymovement VAR_0x800A, LittlerootTown_BrendansHouse_1F_Movement_29299B +PlayersHouse_1F_EventScript_MomApproachPlayerFemale:: @ 8292D5D + applymovement VAR_0x800A, PlayersHouse_1F_Movement_MomApproachPlayerFemale waitmovement 0 applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceFastestRight waitmovement 0 return -LittlerootTown_BrendansHouse_1F_EventScript_292D72:: @ 8292D72 - applymovement VAR_0x800A, LittlerootTown_BrendansHouse_1F_Movement_29299D +PlayersHouse_1F_EventScript_MomNoticesLatiBroadcastMale:: @ 8292D72 + applymovement VAR_0x800A, PlayersHouse_1F_Movement_MomNoticesLatiBroadcastMale waitmovement 0 return -LittlerootTown_BrendansHouse_1F_EventScript_292D7D:: @ 8292D7D - applymovement VAR_0x800A, LittlerootTown_BrendansHouse_1F_Movement_2929A6 +PlayersHouse_1F_EventScript_MomNoticesLatiBroadcastFemale:: @ 8292D7D + applymovement VAR_0x800A, PlayersHouse_1F_Movement_MomNoticesLatiBroadcastFemale waitmovement 0 return -LittlerootTown_BrendansHouse_1F_EventScript_292D88:: @ 8292D88 - applymovement VAR_0x800A, LittlerootTown_BrendansHouse_1F_Movement_2929AF +PlayersHouse_1F_EventScript_MomApproachPlayerAfterTVMale:: @ 8292D88 + applymovement VAR_0x800A, PlayersHouse_1F_Movement_MomApproachPlayerAfterTVMale waitmovement 0 applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceFastestRight waitmovement 0 return -LittlerootTown_BrendansHouse_1F_EventScript_292D9D:: @ 8292D9D - applymovement VAR_0x800A, LittlerootTown_BrendansHouse_1F_Movement_2929B3 +PlayersHouse_1F_EventScript_MomApproachPlayerAfterTVFemale:: @ 8292D9D + applymovement VAR_0x800A, PlayersHouse_1F_Movement_MomApproachPlayerAfterTVFemale waitmovement 0 applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceFastestLeft waitmovement 0 return -LittlerootTown_BrendansHouse_1F_Movement_292DB2: @ 8292DB2 +PlayersHouse_1F_Movement_DadApproachPlayerMale: @ 8292DB2 walk_right walk_right step_end -LittlerootTown_BrendansHouse_1F_Movement_292DB5: @ 8292DB5 +PlayersHouse_1F_Movement_DadApproachPlayerFemale: @ 8292DB5 walk_left walk_left step_end -LittlerootTown_BrendansHouse_1F_Movement_292DB8: @ 8292DB8 +PlayersHouse_1F_Movement_DadFaceMomMale: @ 8292DB8 face_left step_end -LittlerootTown_BrendansHouse_1F_Movement_292DBA: @ 8292DBA +PlayersHouse_1F_Movement_DadFaceMomFemale: @ 8292DBA face_right step_end -LittlerootTown_BrendansHouse_1F_Movement_292DBC: @ 8292DBC +PlayersHouse_1F_Movement_DadExitsMale: @ 8292DBC walk_down walk_right walk_down delay_8 step_end -LittlerootTown_BrendansHouse_1F_Movement_292DC1: @ 8292DC1 +PlayersHouse_1F_Movement_DadExitsFemale: @ 8292DC1 walk_down walk_left walk_down delay_8 step_end -LittlerootTown_BrendansHouse_1F_Movement_292DC6: @ 8292DC6 +PlayersHouse_1F_Movement_PlayerEnterRoomMale: @ 8292DC6 delay_16 walk_down walk_down @@ -675,14 +664,14 @@ LittlerootTown_BrendansHouse_1F_Movement_292DC6: @ 8292DC6 walk_in_place_fastest_left step_end -LittlerootTown_BrendansHouse_1F_Movement_292DCC: @ 8292DCC +PlayersHouse_1F_Movement_MomAndPlayerWatchDadExit: @ 8292DCC delay_8 delay_16 delay_16 walk_in_place_fastest_down step_end -LittlerootTown_BrendansHouse_1F_Movement_292DD1: @ 8292DD1 +PlayersHouse_1F_Movement_PlayerEnterRoomFemale: @ 8292DD1 delay_16 walk_down walk_down @@ -690,7 +679,7 @@ LittlerootTown_BrendansHouse_1F_Movement_292DD1: @ 8292DD1 walk_in_place_fastest_right step_end -LittlerootTown_BrendansHouse_1F_Movement_292DD7: @ 8292DD7 +PlayersHouse_1F_Movement_PlayerApproachTVForLatiMale: @ 8292DD7 walk_up walk_left walk_left @@ -699,7 +688,7 @@ LittlerootTown_BrendansHouse_1F_Movement_292DD7: @ 8292DD7 walk_in_place_fastest_up step_end -LittlerootTown_BrendansHouse_1F_Movement_292DDE: @ 8292DDE +PlayersHouse_1F_Movement_PlayerApproachTVForLatiFemale: @ 8292DDE walk_up walk_right walk_right @@ -709,5 +698,5 @@ LittlerootTown_BrendansHouse_1F_Movement_292DDE: @ 8292DDE step_end EventScript_RunningShoesManual:: @ 8292DE5 - msgbox LittlerootTown_BrendansHouse_1F_Text_1F7F66, MSGBOX_SIGN + msgbox PlayersHouse_1F_Text_RunningShoesManual, MSGBOX_SIGN end diff --git a/data/scripts/tv.inc b/data/scripts/tv.inc index ed279d478e..67141d7a17 100644 --- a/data/scripts/tv.inc +++ b/data/scripts/tv.inc @@ -36,12 +36,12 @@ EventScript_27EE8A:: @ 827EE8A end EventScript_27EE9A:: @ 827EE9A - msgbox LittlerootTown_BrendansHouse_1F_Text_1F7F0F, MSGBOX_DEFAULT + msgbox PlayersHouse_1F_Text_TheresAMovieOnTV, MSGBOX_DEFAULT releaseall end EventScript_27EEA4:: @ 827EEA4 - msgbox LittlerootTown_BrendansHouse_1F_Text_1F826F, MSGBOX_DEFAULT + msgbox PlayersHouse_1F_Text_LatiEmergencyNewsFlash, MSGBOX_DEFAULT @ This is a junk call. Its input var (VAR_0x8004) hasn't been set, and @ It's called again when Mom actually asks for the color, overwriting @ whatever it does here. diff --git a/include/constants/flags.h b/include/constants/flags.h index 72f3a5b9ad..87463db988 100644 --- a/include/constants/flags.h +++ b/include/constants/flags.h @@ -146,7 +146,7 @@ #define FLAG_DEFEATED_RIVAL_ROUTE103 0x82 #define FLAG_RECEIVED_DOLL_LANETTE 0x83 #define FLAG_RECEIVED_POTION_OLDALE 0x84 -#define FLAG_MOM_SAYS_GOODBYE 0x85 +#define FLAG_RECEIVED_AMULET_COIN 0x85 #define FLAG_PENDING_DAYCARE_EGG 0x86 #define FLAG_THANKED_FOR_PLAYING_WITH_WALLY 0x87 #define FLAG_ENABLE_FIRST_WALLY_POKENAV_CALL 0x88 // Set after defeating Wally outside Mauville Gym. Will activate a call later to register Wally. @@ -786,7 +786,7 @@ #define FLAG_HIDE_MR_BRINEY_BOAT_DEWFORD_TOWN 0x2E7 #define FLAG_HIDE_ROUTE_109_MR_BRINEY_BOAT 0x2E8 #define FLAG_HIDE_LITTLEROOT_TOWN_BRENDANS_HOUSE_BRENDAN 0x2E9 -#define FLAG_HIDE_LITTLEROOT_TOWN_MAYS_HOUSE_BRENDAN 0x2EA +#define FLAG_HIDE_LITTLEROOT_TOWN_MAYS_HOUSE_MAY 0x2EA #define FLAG_HIDE_SAFARI_ZONE_SOUTH_EAST_EXPANSION 0x2EB #define FLAG_HIDE_LILYCOVE_HARBOR_EVENT_TICKET_TAKER 0x2EC #define FLAG_HIDE_SLATEPORT_CITY_SCOTT 0x2ED diff --git a/include/event_scripts.h b/include/event_scripts.h index 6ebce69f38..bf68d309e8 100644 --- a/include/event_scripts.h +++ b/include/event_scripts.h @@ -380,8 +380,8 @@ extern const u8 EventScript_FldEffFlash[]; extern const u8 EventScript_FldEffRockSmash[]; //player pc -extern const u8 LittlerootTown_BrendansHouse_2F_EventScript_1F863F[]; -extern const u8 LittlerootTown_MaysHouse_2F_EventScript_1F958F[]; +extern const u8 LittlerootTown_BrendansHouse_2F_EventScript_TurnOffPlayerPC[]; +extern const u8 LittlerootTown_MaysHouse_2F_EventScript_TurnOffPlayerPC[]; //contest_strings extern const u8 gText_0827D507[]; @@ -517,8 +517,8 @@ extern const u8 MauvilleCity_PokemonCenter_1F_Text_HotSpringsTitle[]; extern const u8 MauvilleCity_PokemonCenter_1F_Text_HotSpringsAction[]; extern const u8 MauvilleCity_PokemonCenter_1F_Text_HotSpringsStory[]; -extern const u8 EventScript_PlayerPCMale[]; -extern const u8 EventScript_PlayerPCFemale[]; +extern const u8 LittlerootTown_BrendansHouse_2F_EventScript_PC[]; +extern const u8 LittlerootTown_MaysHouse_2F_EventScript_PC[]; extern const u8 EventScript_PC[]; extern const u8 EventScript_TestSignpostMsg[]; extern const u8 EventScript_HiddenItemScript[]; diff --git a/src/field_control_avatar.c b/src/field_control_avatar.c index 47246d75af..85c3f13ae0 100644 --- a/src/field_control_avatar.c +++ b/src/field_control_avatar.c @@ -223,8 +223,8 @@ static bool8 TryStartInteractionScript(struct MapPosition *position, u16 metatil return FALSE; // Don't play interaction sound for certain scripts. - if (script != EventScript_PlayerPCMale - && script != EventScript_PlayerPCFemale + if (script != LittlerootTown_BrendansHouse_2F_EventScript_PC + && script != LittlerootTown_MaysHouse_2F_EventScript_PC && script != SecretBase_EventScript_PC && script != SecretBase_EventScript_RecordMixingPC && script != SecretBase_EventScript_DollInteract diff --git a/src/player_pc.c b/src/player_pc.c index dd90bbd8a7..f720295a13 100644 --- a/src/player_pc.c +++ b/src/player_pc.c @@ -419,12 +419,12 @@ static void PlayerPC_Decoration(u8 taskId) static void PlayerPC_TurnOff(u8 taskId) { - if (gPcItemMenuOptionsNum == 4) // if the option count is 4, we are at the bedroom PC and not player PC, so do gender specific handling. + if (gPcItemMenuOptionsNum == 4) // if the option count is 4, we are at the bedroom PC, so do gender specific handling. { if (gSaveBlock2Ptr->playerGender == MALE) - ScriptContext1_SetupScript(LittlerootTown_BrendansHouse_2F_EventScript_1F863F); + ScriptContext1_SetupScript(LittlerootTown_BrendansHouse_2F_EventScript_TurnOffPlayerPC); else - ScriptContext1_SetupScript(LittlerootTown_MaysHouse_2F_EventScript_1F958F); + ScriptContext1_SetupScript(LittlerootTown_MaysHouse_2F_EventScript_TurnOffPlayerPC); } else { From 67ce8c9cc2dc9d018cae17e71b46c2c999cb048a Mon Sep 17 00:00:00 2001 From: GriffinR Date: Mon, 28 Oct 2019 09:28:08 -0400 Subject: [PATCH 34/46] Clean up players_house doc --- data/maps/LittlerootTown_MaysHouse_2F/scripts.inc | 4 ++-- data/scripts/tv.inc | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/data/maps/LittlerootTown_MaysHouse_2F/scripts.inc b/data/maps/LittlerootTown_MaysHouse_2F/scripts.inc index 9fe74a3443..5bfbfbbcdc 100644 --- a/data/maps/LittlerootTown_MaysHouse_2F/scripts.inc +++ b/data/maps/LittlerootTown_MaysHouse_2F/scripts.inc @@ -284,7 +284,7 @@ RivalsHouse_2F_EventScript_MayPostLilycove:: @ 81F951D return RivalsHouse_2F_EventScript_BrendanPostLilycove:: @ 81F952F - goto_if_set FLAG_MET_RIVAL_IN_HOUSE_AFTER_LILYCOVE, PlayersHouse_2F_EventScript_BrendanWhereShouldIGoNext + goto_if_set FLAG_MET_RIVAL_IN_HOUSE_AFTER_LILYCOVE, RivalsHouse_2F_EventScript_BrendanWhereShouldIGoNext msgbox RivalsHouse_2F_Text_BrendanJustCheckingMyPokedex, MSGBOX_DEFAULT return @@ -292,7 +292,7 @@ RivalsHouse_2F_EventScript_MayWhereShouldIGoNext:: @ 81F9541 msgbox RivalsHouse_2F_Text_MayWhereShouldIGoNext, MSGBOX_DEFAULT return -PlayersHouse_2F_EventScript_BrendanWhereShouldIGoNext:: @ 81F954A +RivalsHouse_2F_EventScript_BrendanWhereShouldIGoNext:: @ 81F954A msgbox RivalsHouse_2F_Text_BrendanWhereShouldIGoNext, MSGBOX_DEFAULT return diff --git a/data/scripts/tv.inc b/data/scripts/tv.inc index 67141d7a17..427775a76f 100644 --- a/data/scripts/tv.inc +++ b/data/scripts/tv.inc @@ -4,9 +4,9 @@ EventScript_TV:: @ 827EE0B special ResetTVShowState specialvar VAR_RESULT, CheckForBigMovieOrEmergencyNewsOnTV compare VAR_RESULT, 2 - goto_if_eq EventScript_27EE9A + goto_if_eq EventScript_PlayersHouseMovie compare VAR_RESULT, 1 - goto_if_eq EventScript_27EEA4 + goto_if_eq EventScript_PlayersHouseLatiNewsFlash goto_if_unset FLAG_SYS_TV_START, EventScript_27EE8A goto_if_set FLAG_SYS_TV_WATCH, EventScript_27EE8A specialvar VAR_RESULT, IsTVShowInSearchOfTrainersAiring @@ -35,12 +35,12 @@ EventScript_27EE8A:: @ 827EE8A releaseall end -EventScript_27EE9A:: @ 827EE9A +EventScript_PlayersHouseMovie:: @ 827EE9A msgbox PlayersHouse_1F_Text_TheresAMovieOnTV, MSGBOX_DEFAULT releaseall end -EventScript_27EEA4:: @ 827EEA4 +EventScript_PlayersHouseLatiNewsFlash:: @ 827EEA4 msgbox PlayersHouse_1F_Text_LatiEmergencyNewsFlash, MSGBOX_DEFAULT @ This is a junk call. Its input var (VAR_0x8004) hasn't been set, and @ It's called again when Mom actually asks for the color, overwriting From e01ec84837c018bd3bfde58d7987d32733cc8bd6 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Fri, 25 Oct 2019 21:55:01 -0400 Subject: [PATCH 35/46] Document party_menu second pass --- ...157E0.bin => party_menu_cancel_button.bin} | Bin ...57C4.bin => party_menu_confirm_button.bin} | Bin include/battle_main.h | 2 +- include/battle_util2.h | 2 +- include/constants/party_menu.h | 2 +- include/menu.h | 2 +- include/party_menu.h | 14 +- include/pokemon_icon.h | 2 +- src/battle_controller_player.c | 4 +- src/battle_controllers.c | 6 +- src/battle_gfx_sfx_util.c | 4 +- src/battle_main.c | 14 +- src/battle_script_commands.c | 14 +- src/battle_util2.c | 4 +- src/field_screen_effect.c | 2 +- src/menu.c | 2 +- src/party_menu.c | 1506 +++++++++-------- src/pokemon.c | 6 +- src/pokemon_icon.c | 16 +- src/pokemon_summary_screen.c | 4 +- src/trade.c | 12 +- 21 files changed, 824 insertions(+), 794 deletions(-) rename graphics/interface/{unknown_6157E0.bin => party_menu_cancel_button.bin} (100%) rename graphics/interface/{unknown_6157C4.bin => party_menu_confirm_button.bin} (100%) diff --git a/graphics/interface/unknown_6157E0.bin b/graphics/interface/party_menu_cancel_button.bin similarity index 100% rename from graphics/interface/unknown_6157E0.bin rename to graphics/interface/party_menu_cancel_button.bin diff --git a/graphics/interface/unknown_6157C4.bin b/graphics/interface/party_menu_confirm_button.bin similarity index 100% rename from graphics/interface/unknown_6157C4.bin rename to graphics/interface/party_menu_confirm_button.bin diff --git a/include/battle_main.h b/include/battle_main.h index 5dd1aed444..fe88204bf7 100644 --- a/include/battle_main.h +++ b/include/battle_main.h @@ -77,7 +77,7 @@ void sub_803B3AC(void); // unused void sub_803B598(void); // unused void BattleTurnPassed(void); u8 IsRunningFromBattleImpossible(void); -void sub_803BDA0(u8 battlerId); +void SwitchPartyOrder(u8 battlerId); void SwapTurnOrder(u8 id1, u8 id2); u8 GetWhoStrikesFirst(u8 battlerId1, u8 battlerId2, bool8 ignoreChosenMoves); void RunBattleScriptCommands_PopCallbacksStack(void); diff --git a/include/battle_util2.h b/include/battle_util2.h index 336698ea32..fe767ea4bf 100644 --- a/include/battle_util2.h +++ b/include/battle_util2.h @@ -4,7 +4,7 @@ void AllocateBattleResources(void); void FreeBattleResources(void); void AdjustFriendshipOnBattleFaint(u8 battler); -void sub_80571DC(u8 battler, u8 arg1); +void SwitchPartyOrderInGameMulti(u8 battler, u8 arg1); u32 sub_805725C(u8 battler); #endif // GUARD_BATTLE_UTIL_H diff --git a/include/constants/party_menu.h b/include/constants/party_menu.h index a15280afb0..7953967ed7 100644 --- a/include/constants/party_menu.h +++ b/include/constants/party_menu.h @@ -54,7 +54,7 @@ #define PARTY_MENU_TYPE_CONTEST 2 #define PARTY_MENU_TYPE_CHOOSE_MON 3 #define PARTY_MENU_TYPE_CHOOSE_HALF 4 // multi battles, eReader battles, and some battle facilities -#define PARTY_MENU_TYPE_IN_MULTI_BATTLE 5 // TODO: investigate +#define PARTY_MENU_TYPE_MULTI_SHOWCASE 5 #define PARTY_MENU_TYPE_DAYCARE 6 #define PARTY_MENU_TYPE_MOVE_RELEARNER 7 #define PARTY_MENU_TYPE_UNION_ROOM_REGISTER 8 // trading board diff --git a/include/menu.h b/include/menu.h index 14f4c130d6..c5cef202ce 100644 --- a/include/menu.h +++ b/include/menu.h @@ -86,7 +86,7 @@ void RemoveMapNamePopUpWindow(void); u8 GetMapNamePopUpWindowId(void); u8 AddMapNamePopUpWindow(void); void AddTextPrinterParameterized5(u8 windowId, u8 fontId, const u8 *str, u8 left, u8 top, u8 speed, void (*callback)(struct TextPrinterTemplate *, u16), u8 letterSpacing, u8 lineSpacing); -void sub_8199C30(u8 bgId, u8 left, u8 top, u8 width, u8 height, u8 palette); +void SetBgTilemapPalette(u8 bgId, u8 left, u8 top, u8 width, u8 height, u8 palette); void sub_8199D3C(void *ptr, int delta, int width, int height, bool32 is8BPP); void sub_8198204(const u8 *string, const u8 *string2, u8 a3, u8 a4, bool8 copyToVram); void sub_8197AE8(bool8 copyToVram); diff --git a/include/party_menu.h b/include/party_menu.h index c9c62febec..c8926c0b95 100644 --- a/include/party_menu.h +++ b/include/party_menu.h @@ -4,6 +4,8 @@ #include "main.h" #include "task.h" +// seems like the last two fields may have been left as all-purpose vars +// and the second of the two just happens to only be used in one case struct PartyMenu { MainCallback exitCallback; @@ -15,13 +17,13 @@ struct PartyMenu s8 slotId2; u8 action; u16 bagItem; - s16 unkE; // used as both a moveId and a move slot/cursor position - s16 learnMoveState; + s16 data1; // used variously as a moveId, counter, moveSlotId, or cursorPos + s16 learnMoveState; // data2, used only as a learn move state }; extern struct PartyMenu gPartyMenu; -extern bool8 gUnknown_0203CEE8; -extern u8 gUnknown_0203CEE9; +extern bool8 gPartyMenuUseExitCallback; +extern u8 gSelectedMonPartyId; extern MainCallback gPostMenuFieldCallback; extern u8 gSelectedOrderFromParty[4]; extern u8 gBattlePartyCurrentOrder[3]; @@ -71,9 +73,9 @@ void OpenPartyMenuInBattle(u8 arg); void ChooseMonForInBattleItem(void); void sub_81B8C68(void); void sub_81B8D64(u8 battlerId, u8 multiplayerFlag); -void sub_81B8E80(u8 battlerId, u8 unk, u8 arrayIndex); +void SwitchPartyOrderLinkMulti(u8 battlerId, u8 slot, u8 arrayIndex); void SwitchPartyMonSlots(u8 slot, u8 slot2); -u8 GetBattlerPartyId(u8 slot); +u8 GetPartyIdFromBattlePartyId(u8 slot); void ShowPartyMenuToShowcaseMultiBattleParty(void); void ChooseMonForDaycare(void); bool8 CB2_FadeFromPartyMenu(void); diff --git a/include/pokemon_icon.h b/include/pokemon_icon.h index 5018de37c9..4fb9903026 100644 --- a/include/pokemon_icon.h +++ b/include/pokemon_icon.h @@ -21,7 +21,7 @@ u8 CreateMonIcon(u16 species, void (*callback)(struct Sprite *), s16 x, s16 y, u u8 UpdateMonIconFrame(struct Sprite *sprite); void LoadMonIconPalette(u16 species); void sub_80D328C(struct Sprite *sprite); -void UpdateTradeMonIconFrame(struct Sprite *sprite); +void MonIconSpriteCallback(struct Sprite *sprite); void SetPartyHPBarSprite(struct Sprite *sprite, u8 animNum); u8 GetMonIconPaletteIndexFromSpecies(u16 species); diff --git a/src/battle_controller_player.c b/src/battle_controller_player.c index 840ba6e629..57239bca6b 100644 --- a/src/battle_controller_player.c +++ b/src/battle_controller_player.c @@ -1342,8 +1342,8 @@ static void WaitForMonSelection(void) { if (gMain.callback2 == BattleMainCB2 && !gPaletteFade.active) { - if (gUnknown_0203CEE8 == TRUE) - BtlController_EmitChosenMonReturnValue(1, gUnknown_0203CEE9, gBattlePartyCurrentOrder); + if (gPartyMenuUseExitCallback == TRUE) + BtlController_EmitChosenMonReturnValue(1, gSelectedMonPartyId, gBattlePartyCurrentOrder); else BtlController_EmitChosenMonReturnValue(1, PARTY_SIZE, NULL); diff --git a/src/battle_controllers.c b/src/battle_controllers.c index 236b0bb5e4..29540f3a94 100644 --- a/src/battle_controllers.c +++ b/src/battle_controllers.c @@ -1311,14 +1311,14 @@ void BtlController_EmitTwoReturnValues(u8 bufferId, u8 arg1, u16 arg2) PrepareBufferDataTransfer(bufferId, sBattleBuffersTransferData, 4); } -void BtlController_EmitChosenMonReturnValue(u8 bufferId, u8 partyId, u8 *c) +void BtlController_EmitChosenMonReturnValue(u8 bufferId, u8 partyId, u8 *battlePartyOrder) { s32 i; sBattleBuffersTransferData[0] = CONTROLLER_CHOSENMONRETURNVALUE; sBattleBuffersTransferData[1] = partyId; - for (i = 0; i < 3; i++) - sBattleBuffersTransferData[2 + i] = c[i]; + for (i = 0; i < (int)ARRAY_COUNT(gBattlePartyCurrentOrder); i++) + sBattleBuffersTransferData[2 + i] = battlePartyOrder[i]; PrepareBufferDataTransfer(bufferId, sBattleBuffersTransferData, 5); } diff --git a/src/battle_gfx_sfx_util.c b/src/battle_gfx_sfx_util.c index a70a9c34b4..c29bf7526e 100644 --- a/src/battle_gfx_sfx_util.c +++ b/src/battle_gfx_sfx_util.c @@ -1061,8 +1061,8 @@ void HandleBattleLowHpMusicChange(void) { u8 playerBattler1 = GetBattlerAtPosition(B_POSITION_PLAYER_LEFT); u8 playerBattler2 = GetBattlerAtPosition(B_POSITION_PLAYER_RIGHT); - u8 battler1PartyId = GetBattlerPartyId(gBattlerPartyIndexes[playerBattler1]); - u8 battler2PartyId = GetBattlerPartyId(gBattlerPartyIndexes[playerBattler2]); + u8 battler1PartyId = GetPartyIdFromBattlePartyId(gBattlerPartyIndexes[playerBattler1]); + u8 battler2PartyId = GetPartyIdFromBattlePartyId(gBattlerPartyIndexes[playerBattler2]); if (GetMonData(&gPlayerParty[battler1PartyId], MON_DATA_HP) != 0) HandleLowHpMusicChange(&gPlayerParty[battler1PartyId], playerBattler1); diff --git a/src/battle_main.c b/src/battle_main.c index 863fabef82..7ae8d5c468 100644 --- a/src/battle_main.c +++ b/src/battle_main.c @@ -4122,20 +4122,20 @@ u8 IsRunningFromBattleImpossible(void) return 0; } -void sub_803BDA0(u8 battler) +void SwitchPartyOrder(u8 battler) { s32 i; - u8 r4; - u8 r1; + u8 partyId1; + u8 partyId2; // gBattleStruct->field_60[battler][i] for (i = 0; i < (int)ARRAY_COUNT(gBattlePartyCurrentOrder); i++) gBattlePartyCurrentOrder[i] = *(battler * 3 + i + (u8*)(gBattleStruct->field_60)); - r4 = GetBattlerPartyId(gBattlerPartyIndexes[battler]); - r1 = GetBattlerPartyId(*(gBattleStruct->monToSwitchIntoId + battler)); - SwitchPartyMonSlots(r4, r1); + partyId1 = GetPartyIdFromBattlePartyId(gBattlerPartyIndexes[battler]); + partyId2 = GetPartyIdFromBattlePartyId(*(gBattleStruct->monToSwitchIntoId + battler)); + SwitchPartyMonSlots(partyId1, partyId2); if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE) { @@ -4590,7 +4590,7 @@ static void HandleTurnActionSelectionState(void) for (i = 0; i < gBattlersCount; i++) { if (gChosenActionByBattler[i] == B_ACTION_SWITCH) - sub_80571DC(i, *(gBattleStruct->monToSwitchIntoId + i)); + SwitchPartyOrderInGameMulti(i, *(gBattleStruct->monToSwitchIntoId + i)); } } } diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index a9903b3d1d..82461be32e 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -5434,7 +5434,7 @@ static void atk51_switchhandleorder(void) break; case 1: if (!(gBattleTypeFlags & BATTLE_TYPE_MULTI)) - sub_803BDA0(gActiveBattler); + SwitchPartyOrder(gActiveBattler); break; case 2: if (!(gBattleStruct->field_93 & gBitTable[gActiveBattler])) @@ -5459,11 +5459,11 @@ static void atk51_switchhandleorder(void) } else if (gBattleTypeFlags & BATTLE_TYPE_INGAME_PARTNER) { - sub_80571DC(gActiveBattler, *(gBattleStruct->monToSwitchIntoId + gActiveBattler)); + SwitchPartyOrderInGameMulti(gActiveBattler, *(gBattleStruct->monToSwitchIntoId + gActiveBattler)); } else { - sub_803BDA0(gActiveBattler); + SwitchPartyOrder(gActiveBattler); } PREPARE_SPECIES_BUFFER(gBattleTextBuff1, gBattleMons[gBattlerAttacker].species) @@ -7567,19 +7567,19 @@ static void atk8F_forcerandomswitch(void) *(gBattleStruct->monToSwitchIntoId + gBattlerTarget) = i; if (!IsMultiBattle()) - sub_803BDA0(gBattlerTarget); + SwitchPartyOrder(gBattlerTarget); if ((gBattleTypeFlags & BATTLE_TYPE_LINK && gBattleTypeFlags & BATTLE_TYPE_BATTLE_TOWER) || (gBattleTypeFlags & BATTLE_TYPE_LINK && gBattleTypeFlags & BATTLE_TYPE_MULTI) || (gBattleTypeFlags & BATTLE_TYPE_x2000000 && gBattleTypeFlags & BATTLE_TYPE_BATTLE_TOWER) || (gBattleTypeFlags & BATTLE_TYPE_x2000000 && gBattleTypeFlags & BATTLE_TYPE_MULTI)) { - sub_81B8E80(gBattlerTarget, i, 0); - sub_81B8E80(gBattlerTarget ^ BIT_FLANK, i, 1); + SwitchPartyOrderLinkMulti(gBattlerTarget, i, 0); + SwitchPartyOrderLinkMulti(gBattlerTarget ^ BIT_FLANK, i, 1); } if (gBattleTypeFlags & BATTLE_TYPE_INGAME_PARTNER) - sub_80571DC(gBattlerTarget, i); + SwitchPartyOrderInGameMulti(gBattlerTarget, i); } } else diff --git a/src/battle_util2.c b/src/battle_util2.c index 2c8e8c8f2e..fd0dda76b9 100644 --- a/src/battle_util2.c +++ b/src/battle_util2.c @@ -102,7 +102,7 @@ void AdjustFriendshipOnBattleFaint(u8 battlerId) } } -void sub_80571DC(u8 battlerId, u8 arg1) +void SwitchPartyOrderInGameMulti(u8 battlerId, u8 arg1) { if (GetBattlerSide(battlerId) != B_SIDE_OPPONENT) { @@ -113,7 +113,7 @@ void sub_80571DC(u8 battlerId, u8 arg1) for (i = 0; i < (int)ARRAY_COUNT(gBattlePartyCurrentOrder); i++) gBattlePartyCurrentOrder[i] = *(0 * 3 + i + (u8*)(gBattleStruct->field_60)); - SwitchPartyMonSlots(GetBattlerPartyId(gBattlerPartyIndexes[battlerId]), GetBattlerPartyId(arg1)); + SwitchPartyMonSlots(GetPartyIdFromBattlePartyId(gBattlerPartyIndexes[battlerId]), GetPartyIdFromBattlePartyId(arg1)); for (i = 0; i < (int)ARRAY_COUNT(gBattlePartyCurrentOrder); i++) *(0 * 3 + i + (u8*)(gBattleStruct->field_60)) = gBattlePartyCurrentOrder[i]; diff --git a/src/field_screen_effect.c b/src/field_screen_effect.c index 18faf0e60d..3fbeec6e34 100644 --- a/src/field_screen_effect.c +++ b/src/field_screen_effect.c @@ -1124,7 +1124,7 @@ static void sub_80B0318(u8 taskId) SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(12, 7)); SetGpuReg(REG_OFFSET_WININ, WININ_WIN0_BG_ALL | WININ_WIN0_OBJ | WININ_WIN0_CLR); SetGpuReg(REG_OFFSET_WINOUT, WINOUT_WIN01_BG1 | WINOUT_WIN01_BG2 | WINOUT_WIN01_BG3 | WINOUT_WIN01_OBJ); - sub_8199C30(0, 0, 0, 0x1E, 0x14, 0xF); + SetBgTilemapPalette(0, 0, 0, 0x1E, 0x14, 0xF); schedule_bg_copy_tilemap_to_vram(0); SetFlash2ScanlineEffectWindowBoundaries(&gScanlineEffectRegBuffers[0][0], data[2], data[3], 1); CpuFastSet(&gScanlineEffectRegBuffers[0], &gScanlineEffectRegBuffers[1], 480); diff --git a/src/menu.c b/src/menu.c index 0950e6305b..056fc6a9df 100644 --- a/src/menu.c +++ b/src/menu.c @@ -1868,7 +1868,7 @@ u16 copy_decompressed_tile_data_to_vram(u8 bgId, const void *src, u16 size, u16 } } -void sub_8199C30(u8 bgId, u8 left, u8 top, u8 width, u8 height, u8 palette) +void SetBgTilemapPalette(u8 bgId, u8 left, u8 top, u8 width, u8 height, u8 palette) { u8 i; u8 j; diff --git a/src/party_menu.c b/src/party_menu.c index 7de8ceee2d..07042774be 100755 --- a/src/party_menu.c +++ b/src/party_menu.c @@ -87,6 +87,11 @@ #define PARTY_PAL_NO_MON (1 << 6) #define PARTY_PAL_UNUSED (1 << 7) +#define MENU_DIR_DOWN 1 +#define MENU_DIR_UP -1 +#define MENU_DIR_RIGHT 2 +#define MENU_DIR_LEFT -2 + enum { CAN_LEARN_MOVE, @@ -110,7 +115,7 @@ struct PartyMenuInternal TaskFunc task; MainCallback exitCallback; u32 chooseHalf:1; - u32 unk8_1:3; + u32 lastSelectedSlot:3; // Used to return to same slot when going left/right bewtween columns u32 spriteIdConfirmPokeball:7; u32 spriteIdCancelPokeball:7; u32 messageId:14; @@ -142,8 +147,8 @@ EWRAM_DATA struct PartyMenu gPartyMenu = {0}; static EWRAM_DATA struct PartyMenuBox *sPartyMenuBoxes = NULL; static EWRAM_DATA u8 *sPartyBgGfxTilemap = NULL; static EWRAM_DATA u8 *sPartyBgTilemapBuffer = NULL; -EWRAM_DATA bool8 gUnknown_0203CEE8 = 0; // executed party action -ish -EWRAM_DATA u8 gUnknown_0203CEE9 = 0; // party id for something +EWRAM_DATA bool8 gPartyMenuUseExitCallback = 0; +EWRAM_DATA u8 gSelectedMonPartyId = 0; // only used for switching mons, oddly EWRAM_DATA MainCallback gPostMenuFieldCallback = NULL; static EWRAM_DATA u16 *sSlot1TilemapBuffer = 0; // for switching party slots static EWRAM_DATA u16 *sSlot2TilemapBuffer = 0; // @@ -166,10 +171,10 @@ static void InitPartyMenuWindows(u8); static void InitPartyMenuBoxes(u8); static void LoadPartyMenuPokeballGfx(void); static void LoadPartyMenuAilmentGfx(void); -static bool8 party_menu_add_per_mon_objects(void); +static bool8 CreatePartyMonSpritesLoop(void); static bool8 RenderPartyMenuBoxes(void); static void CreateCancelConfirmPokeballSprites(void); -static void sub_81B2428(u8); +static void CreateCancelConfirmWindows(u8); static void Task_ExitPartyMenu(u8); static void FreePartyPointers(void); static void PartyPaletteBufferCopy(u8); @@ -199,17 +204,19 @@ static void DisplayPartyPokemonGender(u8, u16, u8*, struct PartyMenuBox *); static void DisplayPartyPokemonHP(u16, struct PartyMenuBox *); static void DisplayPartyPokemonMaxHP(u16, struct PartyMenuBox *); static void DisplayPartyPokemonHPBar(u16, u16, struct PartyMenuBox *); -static void party_menu_link_mon_icon_anim(u16, u32, struct PartyMenuBox *, u8, u32); -static void party_menu_link_mon_held_item_object(u16, u16, struct PartyMenuBox *); -static void party_menu_link_mon_pokeball_object(u16, struct PartyMenuBox *); -static void party_menu_link_mon_status_condition_object(u16, u8, struct PartyMenuBox *); -static void party_menu_held_item_object(struct Pokemon *, struct PartyMenuBox *); -static void party_menu_pokeball_object(struct Pokemon *, struct PartyMenuBox *); -static void party_menu_icon_anim(struct Pokemon *, struct PartyMenuBox *, u32); -static void party_menu_status_condition_object(struct Pokemon *, struct PartyMenuBox *); -static u8 CreateMenuPokeballSprite(u8, u8); -static void sub_81B120C(void); -static u8 CreateCancelPokeballSprite(u8, u8); +static void CreatePartyMonIconSpriteParameterized(u16, u32, struct PartyMenuBox *, u8, u32); +static void CreatePartyMonHeldItemSpriteParameterized(u16, u16, struct PartyMenuBox *); +static void CreatePartyMonPokeballSpriteParameterized(u16, struct PartyMenuBox *); +static void CreatePartyMonStatusSpriteParameterized(u16, u8, struct PartyMenuBox *); +// These next 4 functions are essentially redundant with the above 4 +// The only difference is that rather than receive the data directly they retrieve it from the mon struct +static void CreatePartyMonHeldItemSprite(struct Pokemon *, struct PartyMenuBox *); +static void CreatePartyMonPokeballSprite(struct Pokemon *, struct PartyMenuBox *); +static void CreatePartyMonIconSprite(struct Pokemon *, struct PartyMenuBox *, u32); +static void CreatePartyMonStatusSprite(struct Pokemon *, struct PartyMenuBox *); +static u8 CreateSmallPokeballButtonSprite(u8, u8); +static void DrawCancelConfirmButtons(void); +static u8 CreatePokeballButtonSprite(u8, u8); static void AnimateSelectedPartyIcon(u8, u8); static void PartyMenuStartSpriteAnim(u8, u8); static u8 GetPartyBoxPaletteFlags(u8, u8); @@ -217,7 +224,7 @@ static bool8 PartyBoxPal_ParnterOrDisqualifiedInArena(u8); static u8 GetPartyIdFromBattleSlot(u8); static void Task_ClosePartyMenuAndSetCB2(u8); static void UpdatePartyToFieldOrder(void); -static void sub_81B4F88(void); +static void MoveCursorToConfirm(void); static void HandleChooseMonCancel(u8, s8*); static void HandleChooseMonSelection(u8, s8*); static u16 PartyMenuButtonHandler(s8*); @@ -228,7 +235,7 @@ static void CB2_SetUpExitToBattleScreen(void); static void Task_ClosePartyMenuAfterText(u8); static void TryTutorSelectedMon(u8); static void TryGiveMailToSelectedMon(u8); -static void TryGiveItemToSelectedMon(u8); +static void TryGiveItemOrMailToSelectedMon(u8); static void SwitchSelectedMons(u8); static void TryEnterMonForMinigame(u8, u8); static void Task_TryCreateSelectionWindow(u8); @@ -243,7 +250,7 @@ static void Task_ReturnToChooseMonAfterText(u8); static void UpdateCurrentPartySelection(s8*, s8); static void UpdatePartySelectionSingleLayout(s8*, s8); static void UpdatePartySelectionDoubleLayout(s8*, s8); -static s8 sub_81B1B00(s8, s8); +static s8 GetNewSlotDoubleLayout(s8, s8); static void PartyMenuPrintText(const u8*); static void Task_PrintAndWaitForText(u8); static bool16 IsMonAllowedInPokemonJump(struct Pokemon*); @@ -252,7 +259,7 @@ static void Task_CancelParticipationYesNo(u8); static void Task_HandleCancelParticipationYesNoInput(u8); static bool8 CanLearnTutorMove(u16, u8); static u16 GetTutorMove(u8); -static bool8 sub_81B314C(void); +static bool8 ShouldUseChooseMonText(void); static void SetPartyMonFieldSelectionActions(struct Pokemon*, u8); static u8 GetPartyMenuActionsTypeInBattle(struct Pokemon*); static u8 GetPartySlotEntryStatus(s8); @@ -274,17 +281,17 @@ static void Task_SwitchItemsYesNo(u8); static void Task_HandleSwitchItemsYesNoInput(u8); static void Task_WriteMailToGiveMonAfterText(u8); static void CB2_ReturnToPartyMenuFromWritingMail(void); -static void sub_81B4624(u8); +static void Task_DisplayGaveMailFromPartyMessage(u8); static void UpdatePartyMonHeldItemSprite(struct Pokemon*, struct PartyMenuBox*); static void Task_TossHeldItemYesNo(u8 taskId); static void Task_HandleTossHeldItemYesNoInput(u8); static void Task_TossHeldItem(u8); -static void sub_81B4A98(void); -static void sub_81B4AE0(void); -static void sub_81B4B6C(u8); -static void sub_81B4BA0(u8); -static void sub_81B4C60(u8); -static void sub_81B4C94(u8); +static void CB2_ReadHeldMail(void); +static void CB2_ReturnToPartyMenuFromReadingMail(void); +static void Task_SendMailToPCYesNo(u8); +static void Task_HandleSendMailToPCYesNoInput(u8); +static void Task_LoseMailMessageYesNo(u8); +static void Task_HandleLoseMailMessageYesNoInput(u8); static bool8 TrySwitchInPokemon(void); static void Task_SpinTradeYesNo(u8); static void Task_HandleSpinTradeYesNoInput(u8); @@ -297,15 +304,15 @@ static void Task_HandleFieldMoveExitAreaYesNoInput(u8); static void Task_FieldMoveWaitForFade(u8); static u16 GetFieldMoveMonSpecies(void); static void UpdatePartyMonHPBar(u8, struct Pokemon*); -static void UpdatePartyMonIconFrame(struct Sprite*); -static void UpdatePartyMonIconFrameAndBounce(struct Sprite*); +static void SpriteCB_UpdatePartyMonIcon(struct Sprite*); +static void SpriteCB_BouncePartyMonIcon(struct Sprite*); static void ShowOrHideHeldItemSprite(u16, struct PartyMenuBox*); static void CreateHeldItemSpriteForTrade(u8, bool8); static void SpriteCB_HeldItem(struct Sprite*); static void SetPartyMonAilmentGfx(struct Pokemon*, struct PartyMenuBox*); static void UpdatePartyMonAilmentGfx(u8, struct PartyMenuBox*); static u8 GetPartyLayoutFromBattleType(void); -static void sub_81B6280(u8); +static void Task_SetSacredAshCB(u8); static void CB2_ReturnToBagMenu(void); static void Task_DisplayHPRestoredMessage(u8); static u16 ItemEffectToMonEv(struct Pokemon*, u8); @@ -339,20 +346,20 @@ static void Task_TryLearnNewMoves(u8); static void PartyMenuTryEvolution(u8); static void DisplayMonNeedsToReplaceMove(u8); static void DisplayMonLearnedMove(u8, u16); -static void sub_81B7A28(u8); -static void task_sacred_ash_party_loop(u8); +static void UseSacredAsh(u8); +static void Task_SacredAshLoop(u8); static void Task_SacredAshDisplayHPRestored(u8); -static void GiveItemToSelectedMon(u8); -static void sub_81B83B8(u8); -static void sub_81B82A0(u8); +static void GiveItemOrMailToSelectedMon(u8); +static void DisplayItemMustBeRemovedFirstMessage(u8); +static void Task_SwitchItemsFromBagYesNo(u8); static void RemoveItemToGiveFromBag(u16); static void CB2_WriteMailToGiveMonFromBag(void); -static void sub_81B8088(u8); +static void GiveItemToSelectedMon(u8); static void Task_UpdateHeldItemSpriteAndClosePartyMenu(u8); static void CB2_ReturnToPartyOrBagMenuFromWritingMail(void); -static bool8 sub_81B841C(u16); -static void sub_81B8230(u8); -static void sub_81B82D4(u8); +static bool8 ReturnGiveItemToBagOrPC(u16); +static void Task_DisplayGaveMailFromBagMessage(u8); +static void Task_HandleSwitchItemsFromBagYesNoInput(u8); static void Task_ValidateChosenHalfParty(u8); static bool8 GetBattleEntryEligibility(struct Pokemon*); static bool8 HasPartySlotAlreadyBeenSelected(u8); @@ -474,498 +481,501 @@ static const struct PartyMenuBoxInfoRects sPartyBoxInfoRects[] = }; -// Each layout array has the sprite coords for each of the party mons in the following order +// Each layout array has an array for each of the 6 party slots +// The array for each slot has the sprite coords of its various sprites in the following order // Pokemon icon (x, y), held item (x, y), status condition (x, y), menu pokeball (x, y) static const u8 sPartyMenuSpriteCoords[PARTY_LAYOUT_COUNT][PARTY_SIZE][4 * 2] = { [PARTY_LAYOUT_SINGLE] = { { 16, 40, 20, 50, 50, 52, 16, 34}, - {104, 18, 108, 28, 136, 27, 102, 25}, - {104, 42, 108, 52, 136, 51, 102, 49}, - {104, 66, 108, 76, 136, 75, 102, 73}, - {104, 90, 108, 100, 136, 99, 102, 97}, - {104, 114, 108, 124, 136, 123, 102, 121}, - }, + {104, 18, 108, 28, 136, 27, 102, 25}, + {104, 42, 108, 52, 136, 51, 102, 49}, + {104, 66, 108, 76, 136, 75, 102, 73}, + {104, 90, 108, 100, 136, 99, 102, 97}, + {104, 114, 108, 124, 136, 123, 102, 121}, + }, [PARTY_LAYOUT_DOUBLE] = - { - {16, 24, 20, 34, 50, 36, 16, 18}, - {16, 80, 20, 90, 50, 92, 16, 74}, - {104, 18, 108, 28, 136, 27, 102, 25}, - {104, 50, 108, 60, 136, 59, 102, 57}, - {104, 82, 108, 92, 136, 91, 102, 89}, - {104, 114, 108, 124, 136, 123, 102, 121}, - }, + { + {16, 24, 20, 34, 50, 36, 16, 18}, + {16, 80, 20, 90, 50, 92, 16, 74}, + {104, 18, 108, 28, 136, 27, 102, 25}, + {104, 50, 108, 60, 136, 59, 102, 57}, + {104, 82, 108, 92, 136, 91, 102, 89}, + {104, 114, 108, 124, 136, 123, 102, 121}, + }, [PARTY_LAYOUT_MULTI] = - { - {16, 24, 20, 34, 50, 36, 16, 18}, - {16, 80, 20, 90, 50, 92, 16, 74}, - {104, 26, 106, 36, 136, 35, 102, 33}, - {104, 50, 106, 60, 136, 59, 102, 57}, - {104, 82, 106, 92, 136, 91, 102, 89}, - {104, 106, 106, 116, 136, 115, 102, 113}, - }, + { + {16, 24, 20, 34, 50, 36, 16, 18}, + {16, 80, 20, 90, 50, 92, 16, 74}, + {104, 26, 106, 36, 136, 35, 102, 33}, + {104, 50, 106, 60, 136, 59, 102, 57}, + {104, 82, 106, 92, 136, 91, 102, 89}, + {104, 106, 106, 116, 136, 115, 102, 113}, + }, [PARTY_LAYOUT_MULTI_SHOWCASE] = - { - {16, 32, 20, 42, 50, 44, 16, 26}, - {104, 34, 106, 44, 136, 43, 102, 41}, - {104, 58, 106, 68, 136, 67, 102, 65}, - {16, 104, 20, 114, 50, 116, 16, 98}, - {104, 106, 106, 116, 136, 115, 102, 113}, - {104, 130, 106, 140, 136, 139, 102, 137}, - }, + { + {16, 32, 20, 42, 50, 44, 16, 26}, + {104, 34, 106, 44, 136, 43, 102, 41}, + {104, 58, 106, 68, 136, 67, 102, 65}, + {16, 104, 20, 114, 50, 116, 16, 98}, + {104, 106, 106, 116, 136, 115, 102, 113}, + {104, 130, 106, 140, 136, 139, 102, 137}, + }, }; -static const u32 sConfirmButtonPokeball_Tilemap[] = INCBIN_U32("graphics/interface/unknown_6157C4.bin"); -static const u32 sCancelButtonPokeball_Tilemap[] = INCBIN_U32("graphics/interface/unknown_6157E0.bin"); +// Used only when both Cancel and Confirm are present +static const u32 sConfirmButton_Tilemap[] = INCBIN_U32("graphics/interface/party_menu_confirm_button.bin"); +static const u32 sCancelButton_Tilemap[] = INCBIN_U32("graphics/interface/party_menu_cancel_button.bin"); +// Text colors for BG, FG, and Shadow in that order static const u8 sFontColorTable[][3] = { - {0, 3, 2}, - {0, 1, 6}, - {0, 11, 12}, - {1, 2, 3}, - {1, 8, 9}, - {0, 1, 2}, + {TEXT_COLOR_TRANSPARENT, TEXT_COLOR_LIGHT_GREY, TEXT_COLOR_DARK_GREY}, // Default + {TEXT_COLOR_TRANSPARENT, TEXT_COLOR_WHITE, TEXT_COLOR_GREEN}, // Unused + {TEXT_COLOR_TRANSPARENT, TEXT_DYNAMIC_COLOR_2, TEXT_DYNAMIC_COLOR_3}, // Gender symbol + {TEXT_COLOR_WHITE, TEXT_COLOR_DARK_GREY, TEXT_COLOR_LIGHT_GREY}, // Selection actions + {TEXT_COLOR_WHITE, TEXT_COLOR_BLUE, TEXT_COLOR_LIGHT_BLUE}, // Field moves + {TEXT_COLOR_TRANSPARENT, TEXT_COLOR_WHITE, TEXT_COLOR_DARK_GREY}, // Unused }; static const struct WindowTemplate sSinglePartyMenuWindowTemplate[] = { - { - .bg = 0, - .tilemapLeft = 1, - .tilemapTop = 3, - .width = 10, - .height = 7, - .paletteNum = 3, - .baseBlock = 0x63, - }, - { - .bg = 0, - .tilemapLeft = 12, - .tilemapTop = 1, - .width = 18, - .height = 3, - .paletteNum = 4, - .baseBlock = 0xA9, - }, - { - .bg = 0, - .tilemapLeft = 12, - .tilemapTop = 4, - .width = 18, - .height = 3, - .paletteNum = 5, - .baseBlock = 0xDF, - }, - { - .bg = 0, - .tilemapLeft = 12, - .tilemapTop = 7, - .width = 18, - .height = 3, - .paletteNum = 6, - .baseBlock = 0x115, - }, - { - .bg = 0, - .tilemapLeft = 12, - .tilemapTop = 10, - .width = 18, - .height = 3, - .paletteNum = 7, - .baseBlock = 0x14B, - }, - { - .bg = 0, - .tilemapLeft = 12, - .tilemapTop = 13, - .width = 18, - .height = 3, - .paletteNum = 8, - .baseBlock = 0x181, - }, - { - .bg = 2, - .tilemapLeft = 1, - .tilemapTop = 15, - .width = 28, - .height = 4, - .paletteNum = 14, - .baseBlock = 0x1DF, - }, - DUMMY_WIN_TEMPLATE + { + .bg = 0, + .tilemapLeft = 1, + .tilemapTop = 3, + .width = 10, + .height = 7, + .paletteNum = 3, + .baseBlock = 0x63, + }, + { + .bg = 0, + .tilemapLeft = 12, + .tilemapTop = 1, + .width = 18, + .height = 3, + .paletteNum = 4, + .baseBlock = 0xA9, + }, + { + .bg = 0, + .tilemapLeft = 12, + .tilemapTop = 4, + .width = 18, + .height = 3, + .paletteNum = 5, + .baseBlock = 0xDF, + }, + { + .bg = 0, + .tilemapLeft = 12, + .tilemapTop = 7, + .width = 18, + .height = 3, + .paletteNum = 6, + .baseBlock = 0x115, + }, + { + .bg = 0, + .tilemapLeft = 12, + .tilemapTop = 10, + .width = 18, + .height = 3, + .paletteNum = 7, + .baseBlock = 0x14B, + }, + { + .bg = 0, + .tilemapLeft = 12, + .tilemapTop = 13, + .width = 18, + .height = 3, + .paletteNum = 8, + .baseBlock = 0x181, + }, + { + .bg = 2, + .tilemapLeft = 1, + .tilemapTop = 15, + .width = 28, + .height = 4, + .paletteNum = 14, + .baseBlock = 0x1DF, + }, + DUMMY_WIN_TEMPLATE }; static const struct WindowTemplate sDoublePartyMenuWindowTemplate[] = { - { - .bg = 0, - .tilemapLeft = 1, - .tilemapTop = 1, - .width = 10, - .height = 7, - .paletteNum = 3, - .baseBlock = 0x63, - }, - { - .bg = 0, - .tilemapLeft = 1, - .tilemapTop = 8, - .width = 10, - .height = 7, - .paletteNum = 4, - .baseBlock = 0xA9, - }, - { - .bg = 0, - .tilemapLeft = 12, - .tilemapTop = 1, - .width = 18, - .height = 3, - .paletteNum = 5, - .baseBlock = 0xEF, - }, - { - .bg = 0, - .tilemapLeft = 12, - .tilemapTop = 5, - .width = 18, - .height = 3, - .paletteNum = 6, - .baseBlock = 0x125, - }, - { - .bg = 0, - .tilemapLeft = 12, - .tilemapTop = 9, - .width = 18, - .height = 3, - .paletteNum = 7, - .baseBlock = 0x15B, - }, - { - .bg = 0, - .tilemapLeft = 12, - .tilemapTop = 13, - .width = 18, - .height = 3, - .paletteNum = 8, - .baseBlock = 0x191, - }, - { - .bg = 2, - .tilemapLeft = 1, - .tilemapTop = 15, - .width = 28, - .height = 4, - .paletteNum = 14, - .baseBlock = 0x1DF, - }, - DUMMY_WIN_TEMPLATE + { + .bg = 0, + .tilemapLeft = 1, + .tilemapTop = 1, + .width = 10, + .height = 7, + .paletteNum = 3, + .baseBlock = 0x63, + }, + { + .bg = 0, + .tilemapLeft = 1, + .tilemapTop = 8, + .width = 10, + .height = 7, + .paletteNum = 4, + .baseBlock = 0xA9, + }, + { + .bg = 0, + .tilemapLeft = 12, + .tilemapTop = 1, + .width = 18, + .height = 3, + .paletteNum = 5, + .baseBlock = 0xEF, + }, + { + .bg = 0, + .tilemapLeft = 12, + .tilemapTop = 5, + .width = 18, + .height = 3, + .paletteNum = 6, + .baseBlock = 0x125, + }, + { + .bg = 0, + .tilemapLeft = 12, + .tilemapTop = 9, + .width = 18, + .height = 3, + .paletteNum = 7, + .baseBlock = 0x15B, + }, + { + .bg = 0, + .tilemapLeft = 12, + .tilemapTop = 13, + .width = 18, + .height = 3, + .paletteNum = 8, + .baseBlock = 0x191, + }, + { + .bg = 2, + .tilemapLeft = 1, + .tilemapTop = 15, + .width = 28, + .height = 4, + .paletteNum = 14, + .baseBlock = 0x1DF, + }, + DUMMY_WIN_TEMPLATE }; static const struct WindowTemplate sMultiPartyMenuWindowTemplate[] = { - { - .bg = 0, - .tilemapLeft = 1, - .tilemapTop = 1, - .width = 10, - .height = 7, - .paletteNum = 3, - .baseBlock = 0x63, - }, - { - .bg = 0, - .tilemapLeft = 1, - .tilemapTop = 8, - .width = 10, - .height = 7, - .paletteNum = 4, - .baseBlock = 0xA9, - }, - { - .bg = 0, - .tilemapLeft = 12, - .tilemapTop = 2, - .width = 18, - .height = 3, - .paletteNum = 5, - .baseBlock = 0xEF, - }, - { - .bg = 0, - .tilemapLeft = 12, - .tilemapTop = 5, - .width = 18, - .height = 3, - .paletteNum = 6, - .baseBlock = 0x125, - }, - { - .bg = 0, - .tilemapLeft = 12, - .tilemapTop = 9, - .width = 18, - .height = 3, - .paletteNum = 7, - .baseBlock = 0x15B, - }, - { - .bg = 0, - .tilemapLeft = 12, - .tilemapTop = 12, - .width = 18, - .height = 3, - .paletteNum = 8, - .baseBlock = 0x191, - }, - { - .bg = 2, - .tilemapLeft = 1, - .tilemapTop = 15, - .width = 28, - .height = 4, - .paletteNum = 14, - .baseBlock = 0x1DF, - }, - DUMMY_WIN_TEMPLATE + { + .bg = 0, + .tilemapLeft = 1, + .tilemapTop = 1, + .width = 10, + .height = 7, + .paletteNum = 3, + .baseBlock = 0x63, + }, + { + .bg = 0, + .tilemapLeft = 1, + .tilemapTop = 8, + .width = 10, + .height = 7, + .paletteNum = 4, + .baseBlock = 0xA9, + }, + { + .bg = 0, + .tilemapLeft = 12, + .tilemapTop = 2, + .width = 18, + .height = 3, + .paletteNum = 5, + .baseBlock = 0xEF, + }, + { + .bg = 0, + .tilemapLeft = 12, + .tilemapTop = 5, + .width = 18, + .height = 3, + .paletteNum = 6, + .baseBlock = 0x125, + }, + { + .bg = 0, + .tilemapLeft = 12, + .tilemapTop = 9, + .width = 18, + .height = 3, + .paletteNum = 7, + .baseBlock = 0x15B, + }, + { + .bg = 0, + .tilemapLeft = 12, + .tilemapTop = 12, + .width = 18, + .height = 3, + .paletteNum = 8, + .baseBlock = 0x191, + }, + { + .bg = 2, + .tilemapLeft = 1, + .tilemapTop = 15, + .width = 28, + .height = 4, + .paletteNum = 14, + .baseBlock = 0x1DF, + }, + DUMMY_WIN_TEMPLATE }; static const struct WindowTemplate sShowcaseMultiPartyMenuWindowTemplate[] = { - { - .bg = 0, - .tilemapLeft = 1, - .tilemapTop = 2, - .width = 10, - .height = 7, - .paletteNum = 3, - .baseBlock = 0x63, - }, - { - .bg = 0, - .tilemapLeft = 12, - .tilemapTop = 3, - .width = 18, - .height = 3, - .paletteNum = 5, - .baseBlock = 0xA9, - }, - { - .bg = 0, - .tilemapLeft = 12, - .tilemapTop = 6, - .width = 18, - .height = 3, - .paletteNum = 6, - .baseBlock = 0xDF, - }, - { - .bg = 2, - .tilemapLeft = 1, - .tilemapTop = 11, - .width = 10, - .height = 7, - .paletteNum = 4, - .baseBlock = 0x115, - }, - { - .bg = 2, - .tilemapLeft = 12, - .tilemapTop = 12, - .width = 18, - .height = 3, - .paletteNum = 7, - .baseBlock = 0x16B, - }, - { - .bg = 2, - .tilemapLeft = 12, - .tilemapTop = 15, - .width = 18, - .height = 3, - .paletteNum = 8, - .baseBlock = 0x1A1, - }, - DUMMY_WIN_TEMPLATE + { + .bg = 0, + .tilemapLeft = 1, + .tilemapTop = 2, + .width = 10, + .height = 7, + .paletteNum = 3, + .baseBlock = 0x63, + }, + { + .bg = 0, + .tilemapLeft = 12, + .tilemapTop = 3, + .width = 18, + .height = 3, + .paletteNum = 5, + .baseBlock = 0xA9, + }, + { + .bg = 0, + .tilemapLeft = 12, + .tilemapTop = 6, + .width = 18, + .height = 3, + .paletteNum = 6, + .baseBlock = 0xDF, + }, + { + .bg = 2, + .tilemapLeft = 1, + .tilemapTop = 11, + .width = 10, + .height = 7, + .paletteNum = 4, + .baseBlock = 0x115, + }, + { + .bg = 2, + .tilemapLeft = 12, + .tilemapTop = 12, + .width = 18, + .height = 3, + .paletteNum = 7, + .baseBlock = 0x16B, + }, + { + .bg = 2, + .tilemapLeft = 12, + .tilemapTop = 15, + .width = 18, + .height = 3, + .paletteNum = 8, + .baseBlock = 0x1A1, + }, + DUMMY_WIN_TEMPLATE }; -static const struct WindowTemplate gUnknown_08615908 = +static const struct WindowTemplate sCancelButtonWindowTemplate = { - .bg = 0, - .tilemapLeft = 24, - .tilemapTop = 17, - .width = 6, - .height = 2, - .paletteNum = 3, - .baseBlock = 0x1C7, + .bg = 0, + .tilemapLeft = 24, + .tilemapTop = 17, + .width = 6, + .height = 2, + .paletteNum = 3, + .baseBlock = 0x1C7, }; -static const struct WindowTemplate gUnknown_08615910 = +static const struct WindowTemplate sMultiCancelButtonWindowTemplate = { - .bg = 0, - .tilemapLeft = 24, - .tilemapTop = 18, - .width = 6, - .height = 2, - .paletteNum = 3, - .baseBlock = 0x1C7, + .bg = 0, + .tilemapLeft = 24, + .tilemapTop = 18, + .width = 6, + .height = 2, + .paletteNum = 3, + .baseBlock = 0x1C7, }; -static const struct WindowTemplate gUnknown_08615918 = +static const struct WindowTemplate sConfirmButtonWindowTemplate = { - .bg = 0, - .tilemapLeft = 24, - .tilemapTop = 16, - .width = 6, - .height = 2, - .paletteNum = 3, - .baseBlock = 0x1D3, + .bg = 0, + .tilemapLeft = 24, + .tilemapTop = 16, + .width = 6, + .height = 2, + .paletteNum = 3, + .baseBlock = 0x1D3, }; static const struct WindowTemplate sDefaultPartyMsgWindowTemplate = { - .bg = 2, - .tilemapLeft = 1, - .tilemapTop = 17, - .width = 21, - .height = 2, - .paletteNum = 15, - .baseBlock = 0x24F, + .bg = 2, + .tilemapLeft = 1, + .tilemapTop = 17, + .width = 21, + .height = 2, + .paletteNum = 15, + .baseBlock = 0x24F, }; static const struct WindowTemplate sDoWhatWithMonMsgWindowTemplate = { - .bg = 2, - .tilemapLeft = 1, - .tilemapTop = 17, - .width = 16, - .height = 2, - .paletteNum = 15, - .baseBlock = 0x279, + .bg = 2, + .tilemapLeft = 1, + .tilemapTop = 17, + .width = 16, + .height = 2, + .paletteNum = 15, + .baseBlock = 0x279, }; static const struct WindowTemplate sDoWhatWithItemMsgWindowTemplate = { - .bg = 2, - .tilemapLeft = 1, - .tilemapTop = 17, - .width = 20, - .height = 2, - .paletteNum = 15, - .baseBlock = 0x299, + .bg = 2, + .tilemapLeft = 1, + .tilemapTop = 17, + .width = 20, + .height = 2, + .paletteNum = 15, + .baseBlock = 0x299, }; static const struct WindowTemplate sDoWhatWithMailMsgWindowTemplate = { - .bg = 2, - .tilemapLeft = 1, - .tilemapTop = 17, - .width = 18, - .height = 2, - .paletteNum = 15, - .baseBlock = 0x299, + .bg = 2, + .tilemapLeft = 1, + .tilemapTop = 17, + .width = 18, + .height = 2, + .paletteNum = 15, + .baseBlock = 0x299, }; static const struct WindowTemplate sWhichMoveMsgWindowTemplate = { - .bg = 2, - .tilemapLeft = 1, - .tilemapTop = 17, - .width = 16, - .height = 2, - .paletteNum = 15, - .baseBlock = 0x299, + .bg = 2, + .tilemapLeft = 1, + .tilemapTop = 17, + .width = 16, + .height = 2, + .paletteNum = 15, + .baseBlock = 0x299, }; static const struct WindowTemplate sAlreadyHoldingOneMsgWindowTemplate = { - .bg = 2, - .tilemapLeft = 1, - .tilemapTop = 15, - .width = 20, - .height = 4, - .paletteNum = 15, - .baseBlock = 0x299, + .bg = 2, + .tilemapLeft = 1, + .tilemapTop = 15, + .width = 20, + .height = 4, + .paletteNum = 15, + .baseBlock = 0x299, }; static const struct WindowTemplate sItemGiveTakeWindowTemplate = { - .bg = 2, - .tilemapLeft = 23, - .tilemapTop = 13, - .width = 6, - .height = 6, - .paletteNum = 14, - .baseBlock = 0x39D, + .bg = 2, + .tilemapLeft = 23, + .tilemapTop = 13, + .width = 6, + .height = 6, + .paletteNum = 14, + .baseBlock = 0x39D, }; static const struct WindowTemplate sMailReadTakeWindowTemplate = { - .bg = 2, - .tilemapLeft = 21, - .tilemapTop = 13, - .width = 8, - .height = 6, - .paletteNum = 14, - .baseBlock = 0x39D, + .bg = 2, + .tilemapLeft = 21, + .tilemapTop = 13, + .width = 8, + .height = 6, + .paletteNum = 14, + .baseBlock = 0x39D, }; static const struct WindowTemplate sMoveSelectWindowTemplate = { - .bg = 2, - .tilemapLeft = 19, - .tilemapTop = 11, - .width = 10, - .height = 8, - .paletteNum = 14, - .baseBlock = 0x2E9, + .bg = 2, + .tilemapLeft = 19, + .tilemapTop = 11, + .width = 10, + .height = 8, + .paletteNum = 14, + .baseBlock = 0x2E9, }; static const struct WindowTemplate sPartyMenuYesNoWindowTemplate = { - .bg = 2, - .tilemapLeft = 21, - .tilemapTop = 9, - .width = 5, - .height = 4, - .paletteNum = 14, - .baseBlock = 0x2E9, + .bg = 2, + .tilemapLeft = 21, + .tilemapTop = 9, + .width = 5, + .height = 4, + .paletteNum = 14, + .baseBlock = 0x2E9, }; static const struct WindowTemplate sLevelUpStatsWindowTemplate = { - .bg = 2, - .tilemapLeft = 19, - .tilemapTop = 1, - .width = 10, - .height = 11, - .paletteNum = 14, - .baseBlock = 0x2E9, + .bg = 2, + .tilemapLeft = 19, + .tilemapTop = 1, + .width = 10, + .height = 11, + .paletteNum = 14, + .baseBlock = 0x2E9, }; static const struct WindowTemplate sUnusedWindowTemplate_08615978 = { - .bg = 2, - .tilemapLeft = 2, - .tilemapTop = 15, - .width = 27, - .height = 4, - .paletteNum = 14, - .baseBlock = 0x1DF, + .bg = 2, + .tilemapLeft = 2, + .tilemapTop = 15, + .width = 27, + .height = 4, + .paletteNum = 14, + .baseBlock = 0x1DF, }; static const struct WindowTemplate sUnusedWindowTemplate_08615980 = { - .bg = 2, - .tilemapLeft = 0, - .tilemapTop = 13, - .width = 18, - .height = 3, - .paletteNum = 12, - .baseBlock = 0x39D, + .bg = 2, + .tilemapLeft = 0, + .tilemapTop = 13, + .width = 18, + .height = 3, + .paletteNum = 12, + .baseBlock = 0x39D, }; // Tile nums @@ -1024,36 +1034,35 @@ static const u8 sPartyBoxCurrSelectionPalIds2[] = {97, 103, 104}; static const u8 sPartyBoxSelectedForActionPalIds2[] = {161, 167, 168}; static const u8 sPartyBoxNoMonPalIds[] = {17, 27, 28}; -//TOOD: IDs? static const u8 *const sActionStringTable[] = { - gText_ChoosePokemon, - gText_ChoosePokemonCancel, - gText_ChoosePokemonConfirm, - gText_MoveToWhere, - gText_TeachWhichPokemon, - gText_UseOnWhichPokemon, - gText_GiveToWhichPokemon, - gText_NothingToCut, - gText_CantSurfHere, - gText_AlreadySurfing, - gText_CurrentIsTooFast, - gText_EnjoyCycling, - gText_InUseAlready_PM, - gText_CantUseHere, - gText_NoPokemonForBattle, - gText_ChoosePokemon2, - gText_NotEnoughHp, - gText_PokemonAreNeeded, - gText_PokemonCantBeSame, - gText_NoIdenticalHoldItems, - gText_EmptyString2, - gText_DoWhatWithPokemon, - gText_RestoreWhichMove, - gText_BoostPp, - gText_DoWhatWithItem, - gText_DoWhatWithMail, - gText_AlreadyHoldingOne, + [PARTY_MSG_CHOOSE_MON] = gText_ChoosePokemon, + [PARTY_MSG_CHOOSE_MON_OR_CANCEL] = gText_ChoosePokemonCancel, + [PARTY_MSG_CHOOSE_MON_AND_CONFIRM] = gText_ChoosePokemonConfirm, + [PARTY_MSG_MOVE_TO_WHERE] = gText_MoveToWhere, + [PARTY_MSG_TEACH_WHICH_MON] = gText_TeachWhichPokemon, + [PARTY_MSG_USE_ON_WHICH_MON] = gText_UseOnWhichPokemon, + [PARTY_MSG_GIVE_TO_WHICH_MON] = gText_GiveToWhichPokemon, + [PARTY_MSG_NOTHING_TO_CUT] = gText_NothingToCut, + [PARTY_MSG_CANT_SURF_HERE] = gText_CantSurfHere, + [PARTY_MSG_ALREADY_SURFING] = gText_AlreadySurfing, + [PARTY_MSG_CURRENT_TOO_FAST] = gText_CurrentIsTooFast, + [PARTY_MSG_ENJOY_CYCLING] = gText_EnjoyCycling, + [PARTY_MSG_ALREADY_IN_USE] = gText_InUseAlready_PM, + [PARTY_MSG_CANT_USE_HERE] = gText_CantUseHere, + [PARTY_MSG_NO_MON_FOR_BATTLE] = gText_NoPokemonForBattle, + [PARTY_MSG_CHOOSE_MON_2] = gText_ChoosePokemon2, + [PARTY_MSG_NOT_ENOUGH_HP] = gText_NotEnoughHp, + [PARTY_MSG_X_MONS_ARE_NEEDED] = gText_PokemonAreNeeded, + [PARTY_MSG_MONS_CANT_BE_SAME] = gText_PokemonCantBeSame, + [PARTY_MSG_NO_SAME_HOLD_ITEMS] = gText_NoIdenticalHoldItems, + [PARTY_MSG_UNUSED] = gText_EmptyString2, + [PARTY_MSG_DO_WHAT_WITH_MON] = gText_DoWhatWithPokemon, + [PARTY_MSG_RESTORE_WHICH_MOVE] = gText_RestoreWhichMove, + [PARTY_MSG_BOOST_PP_WHICH_MOVE] = gText_BoostPp, + [PARTY_MSG_DO_WHAT_WITH_ITEM] = gText_DoWhatWithItem, + [PARTY_MSG_DO_WHAT_WITH_MAIL] = gText_DoWhatWithMail, + [PARTY_MSG_ALREADY_HOLDING_ONE] = gText_AlreadyHoldingOne, }; static const u8 *const sDescriptionStringTable[] = @@ -1365,7 +1374,7 @@ static const union AnimCmd sPokeballAnim_Open[] = ANIMCMD_END }; -static const union AnimCmd *const sSpriteAnimTable_Pokeball[] = +static const union AnimCmd *const sSpriteAnimTable_MenuPokeball[] = { sPokeballAnim_Closed, sPokeballAnim_Open @@ -1381,19 +1390,19 @@ static const struct CompressedSpritePalette sSpritePalette_MenuPokeball = gPartyMenuPokeball_Pal, 0x04b0 }; -// TODO: menu pokeball is vague, these are mon menu pokeballs, but not confirm/cancel pokeballs +// Used for the pokeball sprite on each party slot / Cancel button static const struct SpriteTemplate sSpriteTemplate_MenuPokeball = { .tileTag = 0x04b0, .paletteTag = 0x04b0, .oam = &sOamData_MenuPokeball, - .anims = sSpriteAnimTable_Pokeball, + .anims = sSpriteAnimTable_MenuPokeball, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, .callback = SpriteCallbackDummy, }; -static const struct OamData sOamData_8615F20 = +static const struct OamData sOamData_MenuPokeballSmall = { .y = 0, .affineMode = 0, @@ -1410,50 +1419,51 @@ static const struct OamData sOamData_8615F20 = .affineParam = 0 }; -static const union AnimCmd sSpriteAnim_8615F28[] = +static const union AnimCmd sSmallPokeballAnim_Closed[] = { ANIMCMD_FRAME(0, 0), ANIMCMD_END }; -static const union AnimCmd sSpriteAnim_8615F30[] = +static const union AnimCmd sSmallPokeballAnim_Open[] = { ANIMCMD_FRAME(4, 0), ANIMCMD_END }; -static const union AnimCmd sSpriteAnim_8615F38[] = +static const union AnimCmd sSmallPokeballAnim_Blank1[] = { ANIMCMD_FRAME(8, 0), ANIMCMD_END }; -static const union AnimCmd sSpriteAnim_8615F40[] = +static const union AnimCmd sSmallPokeballAnim_Blank2[] = { ANIMCMD_FRAME(12, 0), ANIMCMD_END }; -static const union AnimCmd sSpriteAnim_8615F48[] = +static const union AnimCmd sSmallPokeballAnim_Blank3[] = { ANIMCMD_FRAME(16, 0), ANIMCMD_END }; -static const union AnimCmd sSpriteAnim_8615F50[] = +static const union AnimCmd sSmallPokeballAnim_Blank4[] = { ANIMCMD_FRAME(20, 0), ANIMCMD_END }; -static const union AnimCmd *const sSpriteAnimTable_8615F58[] = +// The blanks below are never used +static const union AnimCmd *const sSpriteAnimTable_MenuPokeballSmall[] = { - sSpriteAnim_8615F28, - sSpriteAnim_8615F30, - sSpriteAnim_8615F38, - sSpriteAnim_8615F40, - sSpriteAnim_8615F48, - sSpriteAnim_8615F50 + sSmallPokeballAnim_Closed, + sSmallPokeballAnim_Open, + sSmallPokeballAnim_Blank1, + sSmallPokeballAnim_Blank2, + sSmallPokeballAnim_Blank3, + sSmallPokeballAnim_Blank4 }; static const struct CompressedSpriteSheet sSpriteSheet_MenuPokeballSmall = @@ -1461,12 +1471,13 @@ static const struct CompressedSpriteSheet sSpriteSheet_MenuPokeballSmall = gPartyMenuPokeballSmall_Gfx, 0x0300, 0x04b1 }; -static const struct SpriteTemplate gSpriteTemplate_8615F78 = +// Used for the pokeball sprite next to Cancel and Confirm when both are present, otherwise sSpriteTemplate_MenuPokeball is used +static const struct SpriteTemplate sSpriteTemplate_MenuPokeballSmall = { .tileTag = 1201, .paletteTag = 1200, - .oam = &sOamData_8615F20, - .anims = sSpriteAnimTable_8615F58, + .oam = &sOamData_MenuPokeballSmall, + .anims = sSpriteAnimTable_MenuPokeballSmall, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, .callback = SpriteCallbackDummy, @@ -1572,7 +1583,7 @@ static const struct SpriteTemplate sSpriteTemplate_StatusIcons = // Mask for the partners party in a multi battle // TRUE if in the partners party, FALSE otherwise -// The last two slots after the 6 party members are Confirm/Cancel TODO: this doesnt make sense, if confirm/cancel are present the partners party isnt either +// The 7th slot is Cancel, and the 8th slot is unreachable static const bool8 sMultiBattlePartnersPartyMask[PARTY_SIZE + 2] = { FALSE, @@ -1581,7 +1592,6 @@ static const bool8 sMultiBattlePartnersPartyMask[PARTY_SIZE + 2] = FALSE, TRUE, TRUE, - FALSE, FALSE }; @@ -1676,7 +1686,7 @@ static void InitPartyMenu(u8 menuType, u8 layout, u8 partyAction, bool8 keepCurs sPartyMenuInternal->messageId = messageId; sPartyMenuInternal->task = task; sPartyMenuInternal->exitCallback = NULL; - sPartyMenuInternal->unk8_1 = 0; + sPartyMenuInternal->lastSelectedSlot = 0; sPartyMenuInternal->spriteIdConfirmPokeball = 0x7F; sPartyMenuInternal->spriteIdCancelPokeball = 0x7F; @@ -1724,7 +1734,7 @@ static void CB2_InitPartyMenu(void) { while (TRUE) { - if (sub_81221EC() == TRUE || ShowPartyMenu() == TRUE || sub_81221AC() == TRUE) + if (sub_81221EC() == TRUE || ShowPartyMenu() == TRUE || sub_81221AC() == TRUE) //SKP break; } } @@ -1757,7 +1767,7 @@ static bool8 ShowPartyMenu(void) gMain.state++; break; case 5: - if (!sub_81221AC()) + if (!sub_81221AC()) //SKP ResetTasks(); gMain.state++; break; @@ -1807,7 +1817,7 @@ static bool8 ShowPartyMenu(void) gMain.state++; break; case 15: - if (party_menu_add_per_mon_objects()) + if (CreatePartyMonSpritesLoop()) { sPartyMenuInternal->data[0] = 0; gMain.state++; @@ -1825,7 +1835,7 @@ static bool8 ShowPartyMenu(void) gMain.state++; break; case 18: - sub_81B2428(sPartyMenuInternal->chooseHalf); + CreateCancelConfirmWindows(sPartyMenuInternal->chooseHalf); gMain.state++; break; case 19: @@ -1995,7 +2005,7 @@ static void InitPartyMenuBoxes(u8 layout) static void RenderPartyMenuBox(u8 slot) { - if (gPartyMenu.menuType == PARTY_MENU_TYPE_IN_MULTI_BATTLE && slot > 2) + if (gPartyMenu.menuType == PARTY_MENU_TYPE_MULTI_SHOWCASE && slot > 2) { DisplayPartyPokemonDataForMultiBattle(slot); if (gMultiPartnerParty[slot - 3].species == SPECIES_NONE) @@ -2029,7 +2039,7 @@ static void RenderPartyMenuBox(u8 slot) else if (!DisplayPartyPokemonDataForMoveTutorOrEvolutionItem(slot)) DisplayPartyPokemonData(slot); - if (gPartyMenu.menuType == PARTY_MENU_TYPE_IN_MULTI_BATTLE) + if (gPartyMenu.menuType == PARTY_MENU_TYPE_MULTI_SHOWCASE) AnimatePartySlot(slot, 0); else if (gPartyMenu.slotId == slot) AnimatePartySlot(slot, 1); @@ -2189,7 +2199,6 @@ static void DisplayPartyPokemonDataToTeachMove(u8 slot, u16 item, u8 tutor) } } -// TODO: sort out unknowns static void DisplayPartyPokemonDataForMultiBattle(u8 slot) { struct PartyMenuBox *menuBox = &sPartyMenuBoxes[slot]; @@ -2204,7 +2213,7 @@ static void DisplayPartyPokemonDataForMultiBattle(u8 slot) menuBox->infoRects->blitFunc(menuBox->windowId, 0, 0, 0, 0, FALSE); StringCopy(gStringVar1, gMultiPartnerParty[actualSlot].nickname); StringGetEnd10(gStringVar1); - sub_81DB52C(gStringVar1); + sub_81DB52C(gStringVar1); //SKP DisplayPartyPokemonBarDetail(menuBox->windowId, gStringVar1, 0, menuBox->infoRects->dimensions); DisplayPartyPokemonLevel(gMultiPartnerParty[actualSlot].level, menuBox); DisplayPartyPokemonGender(gMultiPartnerParty[actualSlot].gender, gMultiPartnerParty[actualSlot].species, gMultiPartnerParty[actualSlot].nickname, menuBox); @@ -2228,64 +2237,63 @@ static u8* GetPartyMenuBgTile(u16 tileId) return &sPartyBgGfxTilemap[tileId << 5]; } -//TODO: rename and all related functions -static void party_menu_add_per_mon_objects_internal(u8 slot) +static void CreatePartyMonSprites(u8 slot) { u8 actualSlot; - if (gPartyMenu.menuType == PARTY_MENU_TYPE_IN_MULTI_BATTLE && slot > 2) + if (gPartyMenu.menuType == PARTY_MENU_TYPE_MULTI_SHOWCASE && slot > 2) { u8 status; actualSlot = slot - 3; if (gMultiPartnerParty[actualSlot].species != SPECIES_NONE) { - party_menu_link_mon_icon_anim(gMultiPartnerParty[actualSlot].species, gMultiPartnerParty[actualSlot].personality, &sPartyMenuBoxes[slot], 0, 0); - party_menu_link_mon_held_item_object(gMultiPartnerParty[actualSlot].species, gMultiPartnerParty[actualSlot].heldItem, &sPartyMenuBoxes[slot]); - party_menu_link_mon_pokeball_object(gMultiPartnerParty[actualSlot].species, &sPartyMenuBoxes[slot]); + CreatePartyMonIconSpriteParameterized(gMultiPartnerParty[actualSlot].species, gMultiPartnerParty[actualSlot].personality, &sPartyMenuBoxes[slot], 0, FALSE); + CreatePartyMonHeldItemSpriteParameterized(gMultiPartnerParty[actualSlot].species, gMultiPartnerParty[actualSlot].heldItem, &sPartyMenuBoxes[slot]); + CreatePartyMonPokeballSpriteParameterized(gMultiPartnerParty[actualSlot].species, &sPartyMenuBoxes[slot]); if (gMultiPartnerParty[actualSlot].hp == 0) status = AILMENT_FNT; else status = GetAilmentFromStatus(gMultiPartnerParty[actualSlot].status); - party_menu_link_mon_status_condition_object(gMultiPartnerParty[actualSlot].species, status, &sPartyMenuBoxes[slot]); + CreatePartyMonStatusSpriteParameterized(gMultiPartnerParty[actualSlot].species, status, &sPartyMenuBoxes[slot]); } } else if (GetMonData(&gPlayerParty[slot], MON_DATA_SPECIES) != SPECIES_NONE) { - party_menu_icon_anim(&gPlayerParty[slot], &sPartyMenuBoxes[slot], slot); - party_menu_held_item_object(&gPlayerParty[slot], &sPartyMenuBoxes[slot]); - party_menu_pokeball_object(&gPlayerParty[slot], &sPartyMenuBoxes[slot]); - party_menu_status_condition_object(&gPlayerParty[slot], &sPartyMenuBoxes[slot]); + CreatePartyMonIconSprite(&gPlayerParty[slot], &sPartyMenuBoxes[slot], slot); + CreatePartyMonHeldItemSprite(&gPlayerParty[slot], &sPartyMenuBoxes[slot]); + CreatePartyMonPokeballSprite(&gPlayerParty[slot], &sPartyMenuBoxes[slot]); + CreatePartyMonStatusSprite(&gPlayerParty[slot], &sPartyMenuBoxes[slot]); } } -static bool8 party_menu_add_per_mon_objects(void) +static bool8 CreatePartyMonSpritesLoop(void) { - party_menu_add_per_mon_objects_internal(sPartyMenuInternal->data[0]); + CreatePartyMonSprites(sPartyMenuInternal->data[0]); if (++sPartyMenuInternal->data[0] == PARTY_SIZE) return TRUE; else return FALSE; } -// TODO Fix name, first if doesnt do that static void CreateCancelConfirmPokeballSprites(void) { - if (gPartyMenu.menuType == PARTY_MENU_TYPE_IN_MULTI_BATTLE) + if (gPartyMenu.menuType == PARTY_MENU_TYPE_MULTI_SHOWCASE) { + // The showcase has no Cancel/Confirm buttons FillBgTilemapBufferRect(1, 14, 23, 17, 7, 2, 1); } else { if (sPartyMenuInternal->chooseHalf) { - sPartyMenuInternal->spriteIdConfirmPokeball = CreateMenuPokeballSprite(0xBF, 0x88); - sub_81B120C(); - sPartyMenuInternal->spriteIdCancelPokeball = CreateMenuPokeballSprite(0xBF, 0x98); + sPartyMenuInternal->spriteIdConfirmPokeball = CreateSmallPokeballButtonSprite(0xBF, 0x88); + DrawCancelConfirmButtons(); + sPartyMenuInternal->spriteIdCancelPokeball = CreateSmallPokeballButtonSprite(0xBF, 0x98); } else { - sPartyMenuInternal->spriteIdCancelPokeball = CreateCancelPokeballSprite(198, 148); + sPartyMenuInternal->spriteIdCancelPokeball = CreatePokeballButtonSprite(198, 148); } AnimatePartySlot(gPartyMenu.slotId, 1); } @@ -2305,28 +2313,29 @@ void AnimatePartySlot(u8 slot, u8 animNum) PartyMenuStartSpriteAnim(sPartyMenuBoxes[slot].pokeballSpriteId, animNum); } return; - case PARTY_SIZE: + case PARTY_SIZE: // Confirm if (animNum == 0) - sub_8199C30(1, 23, 16, 7, 2, 1); + SetBgTilemapPalette(1, 23, 16, 7, 2, 1); else - sub_8199C30(1, 23, 16, 7, 2, 2); + SetBgTilemapPalette(1, 23, 16, 7, 2, 2); spriteId = sPartyMenuInternal->spriteIdConfirmPokeball; break; case PARTY_SIZE + 1: // Cancel + // The position of the Cancel button changes if Confirm is present if (!sPartyMenuInternal->chooseHalf) { if (animNum == 0) - sub_8199C30(1, 23, 17, 7, 2, 1); + SetBgTilemapPalette(1, 23, 17, 7, 2, 1); else - sub_8199C30(1, 23, 17, 7, 2, 2); + SetBgTilemapPalette(1, 23, 17, 7, 2, 2); } else if (animNum == 0) { - sub_8199C30(1, 23, 18, 7, 2, 1); + SetBgTilemapPalette(1, 23, 18, 7, 2, 1); } else { - sub_8199C30(1, 23, 18, 7, 2, 2); + SetBgTilemapPalette(1, 23, 18, 7, 2, 2); } spriteId = sPartyMenuInternal->spriteIdCancelPokeball; break; @@ -2369,11 +2378,10 @@ static bool8 PartyBoxPal_ParnterOrDisqualifiedInArena(u8 slot) return FALSE; } -//TODO: tilemaps for confirm/cancel buttons in choose 3, double check -static void sub_81B120C(void) +static void DrawCancelConfirmButtons(void) { - CopyToBgTilemapBufferRect_ChangePalette(1, sConfirmButtonPokeball_Tilemap, 23, 16, 7, 2, 17); - CopyToBgTilemapBufferRect_ChangePalette(1, sCancelButtonPokeball_Tilemap, 23, 18, 7, 2, 17); + CopyToBgTilemapBufferRect_ChangePalette(1, sConfirmButton_Tilemap, 23, 16, 7, 2, 17); + CopyToBgTilemapBufferRect_ChangePalette(1, sCancelButton_Tilemap, 23, 18, 7, 2, 17); schedule_bg_copy_tilemap_to_vram(1); } @@ -2409,7 +2417,7 @@ static void Task_ClosePartyMenuAndSetCB2(u8 taskId) if (gPartyMenu.menuType == PARTY_MENU_TYPE_IN_BATTLE) UpdatePartyToFieldOrder(); - if (sPartyMenuInternal->exitCallback != NULL) + if (sPartyMenuInternal->exitCallback != NULL) SetMainCallback2(sPartyMenuInternal->exitCallback); else SetMainCallback2(gPartyMenu.exitCallback); @@ -2432,7 +2440,7 @@ u8 GetPartyMenuType(void) void Task_HandleChooseMonInput(u8 taskId) { - if (!gPaletteFade.active && sub_81221EC() != TRUE) + if (!gPaletteFade.active && sub_81221EC() != TRUE) //SKP { s8 *slotPtr = GetCurrentPartySlotPtr(); @@ -2448,7 +2456,7 @@ void Task_HandleChooseMonInput(u8 taskId) if (sPartyMenuInternal->chooseHalf) { PlaySE(SE_SELECT); - sub_81B4F88(); + MoveCursorToConfirm(); } break; } @@ -2512,7 +2520,7 @@ static void HandleChooseMonSelection(u8 taskId, s8 *slotPtr) { PlaySE(SE_SELECT); PartyMenuRemoveWindow(&sPartyMenuInternal->windowId[1]); - TryGiveItemToSelectedMon(taskId); + TryGiveItemOrMailToSelectedMon(taskId); } break; case PARTY_ACTION_SWITCH - 3: @@ -2569,9 +2577,9 @@ static void HandleChooseMonCancel(u8 taskId, s8 *slotPtr) PlaySE(SE_SELECT); if (DisplayCancelChooseMonYesNo(taskId) != TRUE) { - if (!sub_81221AC()) + if (!sub_81221AC()) //SKP gSpecialVar_0x8004 = PARTY_SIZE + 1; - gUnknown_0203CEE8 = FALSE; + gPartyMenuUseExitCallback = FALSE; *slotPtr = PARTY_SIZE + 1; Task_ClosePartyMenu(taskId); } @@ -2612,7 +2620,7 @@ static void Task_HandleCancelChooseMonYesNoInput(u8 taskId) switch (Menu_ProcessInputNoWrapClearOnChoose()) { case 0: - gUnknown_0203CEE8 = FALSE; + gPartyMenuUseExitCallback = FALSE; gPartyMenu.slotId = PARTY_SIZE + 1; ClearSelectedPartyOrder(); Task_ClosePartyMenu(taskId); @@ -2633,25 +2641,25 @@ static u16 PartyMenuButtonHandler(s8 *slotPtr) switch (gMain.newAndRepeatedKeys) { case DPAD_UP: - movementDir = -1; + movementDir = MENU_DIR_UP; break; case DPAD_DOWN: - movementDir = 1; + movementDir = MENU_DIR_DOWN; break; case DPAD_LEFT: - movementDir = -2; + movementDir = MENU_DIR_LEFT; break; case DPAD_RIGHT: - movementDir = 2; + movementDir = MENU_DIR_RIGHT; break; default: switch (GetLRKeysPressedAndHeld()) { case MENU_L_PRESSED: - movementDir = -1; + movementDir = MENU_DIR_UP; break; case MENU_R_PRESSED: - movementDir = 1; + movementDir = MENU_DIR_DOWN; break; default: movementDir = 0; @@ -2683,7 +2691,7 @@ static void UpdateCurrentPartySelection(s8 *slotPtr, s8 movementDir) if (layout == PARTY_LAYOUT_SINGLE) UpdatePartySelectionSingleLayout(slotPtr, movementDir); - else // remaining double/multi layouts handle movement the same way + else UpdatePartySelectionDoubleLayout(slotPtr, movementDir); if (*slotPtr != newSlotId) @@ -2694,13 +2702,12 @@ static void UpdateCurrentPartySelection(s8 *slotPtr, s8 movementDir) } } -// TODO: clean up static void UpdatePartySelectionSingleLayout(s8 *slotPtr, s8 movementDir) { - // PARTY_SIZE + 1 is Cancel, the 7th party menu selection + // PARTY_SIZE + 1 is Cancel, PARTY_SIZE is Confirm (when choosing half only) switch (movementDir) { - case -1: + case MENU_DIR_UP: if (*slotPtr == 0) { *slotPtr = PARTY_SIZE + 1; @@ -2721,7 +2728,7 @@ static void UpdatePartySelectionSingleLayout(s8 *slotPtr, s8 movementDir) (*slotPtr)--; } break; - case 1: + case MENU_DIR_DOWN: if (*slotPtr == PARTY_SIZE + 1) { *slotPtr = 0; @@ -2741,34 +2748,34 @@ static void UpdatePartySelectionSingleLayout(s8 *slotPtr, s8 movementDir) } } break; - case 2: + case MENU_DIR_RIGHT: if (gPlayerPartyCount != 1 && *slotPtr == 0) { - if (sPartyMenuInternal->unk8_1 == 0) + if (sPartyMenuInternal->lastSelectedSlot == 0) *slotPtr = 1; else - *slotPtr = sPartyMenuInternal->unk8_1; + *slotPtr = sPartyMenuInternal->lastSelectedSlot; } break; - case -2: + case MENU_DIR_LEFT: if (*slotPtr != 0 && *slotPtr != PARTY_SIZE && *slotPtr != PARTY_SIZE + 1) { - sPartyMenuInternal->unk8_1 = *slotPtr; + sPartyMenuInternal->lastSelectedSlot = *slotPtr; *slotPtr = 0; } break; } } -// TODO: clean up static void UpdatePartySelectionDoubleLayout(s8 *slotPtr, s8 movementDir) { - // PARTY_SIZE + 1 is Cancel, the 7th party menu selection - s8 unk2 = movementDir; + // PARTY_SIZE + 1 is Cancel, PARTY_SIZE is Confirm (when choosing half only) + // newSlot is used temporarily as a movement direction during its later assignment + s8 newSlot = movementDir; switch (movementDir) { - case -1: + case MENU_DIR_UP: if (*slotPtr == 0) { *slotPtr = PARTY_SIZE + 1; @@ -2788,11 +2795,11 @@ static void UpdatePartySelectionDoubleLayout(s8 *slotPtr, s8 movementDir) } (*slotPtr)--; } - unk2 = sub_81B1B00(*slotPtr, unk2); - if (unk2 != -1) - *slotPtr = unk2; + newSlot = GetNewSlotDoubleLayout(*slotPtr, newSlot); + if (newSlot != -1) + *slotPtr = newSlot; break; - case 1: + case MENU_DIR_DOWN: if (*slotPtr == PARTY_SIZE) { *slotPtr = PARTY_SIZE + 1; @@ -2803,8 +2810,8 @@ static void UpdatePartySelectionDoubleLayout(s8 *slotPtr, s8 movementDir) } else { - unk2 = sub_81B1B00(*slotPtr, 1); - if (unk2 == -1) + newSlot = GetNewSlotDoubleLayout(*slotPtr, MENU_DIR_DOWN); + if (newSlot == -1) { if (sPartyMenuInternal->chooseHalf) *slotPtr = PARTY_SIZE; @@ -2813,14 +2820,14 @@ static void UpdatePartySelectionDoubleLayout(s8 *slotPtr, s8 movementDir) } else { - *slotPtr = unk2; + *slotPtr = newSlot; } } break; - case 2: + case MENU_DIR_RIGHT: if (*slotPtr == 0) { - if (sPartyMenuInternal->unk8_1 == 3) + if (sPartyMenuInternal->lastSelectedSlot == 3) { if (GetMonData(&gPlayerParty[3], MON_DATA_SPECIES) != SPECIES_NONE) *slotPtr = 3; @@ -2832,7 +2839,7 @@ static void UpdatePartySelectionDoubleLayout(s8 *slotPtr, s8 movementDir) } else if (*slotPtr == 1) { - if (sPartyMenuInternal->unk8_1 == 5) + if (sPartyMenuInternal->lastSelectedSlot == 5) { if (GetMonData(&gPlayerParty[5], MON_DATA_SPECIES) != SPECIES_NONE) *slotPtr = 5; @@ -2843,26 +2850,26 @@ static void UpdatePartySelectionDoubleLayout(s8 *slotPtr, s8 movementDir) } } break; - case -2: + case MENU_DIR_LEFT: if (*slotPtr == 2 || *slotPtr == 3) { - sPartyMenuInternal->unk8_1 = *slotPtr; + sPartyMenuInternal->lastSelectedSlot = *slotPtr; *slotPtr = 0; } else if (*slotPtr == 4 || *slotPtr == 5) { - sPartyMenuInternal->unk8_1 = *slotPtr; + sPartyMenuInternal->lastSelectedSlot = *slotPtr; *slotPtr = 1; } break; } } -static s8 sub_81B1B00(s8 slotId, s8 b) +static s8 GetNewSlotDoubleLayout(s8 slotId, s8 movementDir) { while (TRUE) { - slotId += b; + slotId += movementDir; if ((u8)slotId >= PARTY_SIZE) return -1; if (GetMonData(&gPlayerParty[slotId], MON_DATA_SPECIES) != SPECIES_NONE) @@ -2910,7 +2917,7 @@ bool8 IsPartyMenuTextPrinterActive(void) static void Task_WaitForLinkAndReturnToChooseMon(u8 taskId) { - if (sub_81221EC() != TRUE) + if (sub_81221EC() != TRUE) //SKP { DisplayPartyMenuStdMessage(PARTY_MSG_CHOOSE_MON); gTasks[taskId].func = Task_HandleChooseMonInput; @@ -2923,7 +2930,7 @@ static void Task_ReturnToChooseMonAfterText(u8 taskId) { ClearStdWindowAndFrameToTransparent(6, 0); ClearWindowTilemap(6); - if (sub_81221AC() == TRUE) + if (sub_81221AC() == TRUE) //SKP { gTasks[taskId].func = Task_WaitForLinkAndReturnToChooseMon; } @@ -3118,8 +3125,8 @@ static void SetPartyMonsAllowedInMinigame(void) { u8 i; - ptr = &gPartyMenu.unkE; - gPartyMenu.unkE = 0; + ptr = &gPartyMenu.data1; + gPartyMenu.data1 = 0; if (gSpecialVar_0x8005 == 0) { for (i = 0; i < gPlayerPartyCount; i++) @@ -3150,7 +3157,7 @@ static bool16 IsMonAllowedInDodrioBerryPicking(struct Pokemon *mon) static bool8 IsMonAllowedInMinigame(u8 slot) { - if (!((gPartyMenu.unkE >> slot) & 1)) + if (!((gPartyMenu.data1 >> slot) & 1)) return FALSE; return TRUE; } @@ -3275,46 +3282,46 @@ static void InitPartyMenuWindows(u8 layout) LoadPalette(gUnknown_0860F074, 0xF0, 0x20); } -// TODO -static void sub_81B2428(bool8 chooseHalf) +static void CreateCancelConfirmWindows(bool8 chooseHalf) { - u8 firstWindowId; - u8 windowId; + u8 confirmWindowId; + u8 cancelWindowId; u8 offset; u8 mainOffset; - if (gPartyMenu.menuType != PARTY_MENU_TYPE_IN_MULTI_BATTLE) + if (gPartyMenu.menuType != PARTY_MENU_TYPE_MULTI_SHOWCASE) { if (chooseHalf == TRUE) { - firstWindowId = AddWindow(&gUnknown_08615918); - FillWindowPixelBuffer(firstWindowId, PIXEL_FILL(0)); + confirmWindowId = AddWindow(&sConfirmButtonWindowTemplate); + FillWindowPixelBuffer(confirmWindowId, PIXEL_FILL(0)); mainOffset = GetStringCenterAlignXOffset(0, gMenuText_Confirm, 48); - AddTextPrinterParameterized4(firstWindowId, 0, mainOffset, 1, 0, 0, sFontColorTable[0], -1, gMenuText_Confirm); - PutWindowTilemap(firstWindowId); - CopyWindowToVram(firstWindowId, 2); - windowId = AddWindow(&gUnknown_08615910); + AddTextPrinterParameterized4(confirmWindowId, 0, mainOffset, 1, 0, 0, sFontColorTable[0], -1, gMenuText_Confirm); + PutWindowTilemap(confirmWindowId); + CopyWindowToVram(confirmWindowId, 2); + cancelWindowId = AddWindow(&sMultiCancelButtonWindowTemplate); offset = 0; } else { - windowId = AddWindow(&gUnknown_08615908); + cancelWindowId = AddWindow(&sCancelButtonWindowTemplate); offset = 3; } - FillWindowPixelBuffer(windowId, PIXEL_FILL(0)); + FillWindowPixelBuffer(cancelWindowId, PIXEL_FILL(0)); + + // Branches are functionally identical. Second branch is never reached, Spin Trade wasnt fully implemented if (gPartyMenu.menuType != PARTY_MENU_TYPE_SPIN_TRADE) { mainOffset = GetStringCenterAlignXOffset(0, gText_Cancel, 48); - AddTextPrinterParameterized3(windowId, 0, mainOffset + offset, 1, sFontColorTable[0], -1, gText_Cancel); + AddTextPrinterParameterized3(cancelWindowId, 0, mainOffset + offset, 1, sFontColorTable[0], -1, gText_Cancel); } else { - // Identical to above, Spin Trade wasnt implemented mainOffset = GetStringCenterAlignXOffset(0, gText_Cancel2, 48); - AddTextPrinterParameterized3(windowId, 0, mainOffset + offset, 1, sFontColorTable[0], -1, gText_Cancel2); + AddTextPrinterParameterized3(cancelWindowId, 0, mainOffset + offset, 1, sFontColorTable[0], -1, gText_Cancel2); } - PutWindowTilemap(windowId); - CopyWindowToVram(windowId, 2); + PutWindowTilemap(cancelWindowId); + CopyWindowToVram(cancelWindowId, 2); schedule_bg_copy_tilemap_to_vram(0); } } @@ -3711,11 +3718,12 @@ void DisplayPartyMenuStdMessage(u32 stringID) *windowPtr = AddWindow(&sDefaultPartyMsgWindowTemplate); break; } + if (stringID == PARTY_MSG_CHOOSE_MON) { if (sPartyMenuInternal->chooseHalf) stringID = PARTY_MSG_CHOOSE_MON_AND_CONFIRM; - else if (sub_81B314C() == FALSE) + else if (!ShouldUseChooseMonText()) stringID = PARTY_MSG_CHOOSE_MON_OR_CANCEL; } DrawStdFrameWithCustomTileAndPalette(*windowPtr, FALSE, 0x4F, 0xD); @@ -3725,8 +3733,7 @@ void DisplayPartyMenuStdMessage(u32 stringID) } } -// TOOD: TRUE if should be forced to choose mon, but why when nummons > 1 -static bool8 sub_81B314C(void) +static bool8 ShouldUseChooseMonText(void) { struct Pokemon *party = gPlayerParty; u8 i; @@ -3770,15 +3777,15 @@ static u8 DisplaySelectionWindow(u8 windowType) sPartyMenuInternal->windowId[0] = AddWindow(&window); DrawStdFrameWithCustomTileAndPalette(sPartyMenuInternal->windowId[0], FALSE, 0x4F, 13); - if (windowType == 3) + if (windowType == SELECTWINDOW_MOVES) return sPartyMenuInternal->windowId[0]; cursorDimension = GetMenuCursorDimensionByFont(1, 0); fontAttribute = GetFontAttribute(1, 2); for (i = 0; i < sPartyMenuInternal->numActions; i++) { - u8 unk = (sPartyMenuInternal->actions[i] >= MENU_FIELD_MOVES) ? 4 : 3; - AddTextPrinterParameterized4(sPartyMenuInternal->windowId[0], 1, cursorDimension, (i * 16) + 1, fontAttribute, 0, sFontColorTable[unk], 0, sCursorOptions[sPartyMenuInternal->actions[i]].text); + u8 fontColorsId = (sPartyMenuInternal->actions[i] >= MENU_FIELD_MOVES) ? 4 : 3; + AddTextPrinterParameterized4(sPartyMenuInternal->windowId[0], 1, cursorDimension, (i * 16) + 1, fontAttribute, 0, sFontColorTable[fontColorsId], 0, sCursorOptions[sPartyMenuInternal->actions[i]].text); } InitMenuInUpperLeftCorner(sPartyMenuInternal->windowId[0], sPartyMenuInternal->numActions, 0, 1); @@ -3904,10 +3911,10 @@ static u8 GetPartyMenuActionsType(struct Pokemon *mon) case PARTY_MENU_TYPE_STORE_PYRAMID_HELD_ITEMS: actionType = ACTIONS_TAKEITEM_TOSS; break; - // The following have no selection actions because they exit immediately upon selection + // The following have no selection actions (i.e. they exit immediately upon selection) // PARTY_MENU_TYPE_CONTEST // PARTY_MENU_TYPE_CHOOSE_MON - // PARTY_MENU_TYPE_IN_MULTI_BATTLE ?? TODO + // PARTY_MENU_TYPE_MULTI_SHOWCASE // PARTY_MENU_TYPE_MOVE_RELEARNER // PARTY_MENU_TYPE_MINIGAME default: @@ -3963,7 +3970,7 @@ static void Task_TryCreateSelectionWindow(u8 taskId) static void Task_HandleSelectionMenuInput(u8 taskId) { - if (!gPaletteFade.active && sub_81221EC() != TRUE) + if (!gPaletteFade.active && sub_81221EC() != TRUE) //SKP { s8 input; s16 *data = gTasks[taskId].data; @@ -4436,10 +4443,10 @@ static void CB2_WriteMailToGiveMon(void) u8 mail = GetMonData(&gPlayerParty[gPartyMenu.slotId], MON_DATA_MAIL); DoEasyChatScreen( - EASY_CHAT_TYPE_MAIL, - gSaveBlock1Ptr->mail[mail].words, - CB2_ReturnToPartyMenuFromWritingMail, - EASY_CHAT_PERSON_DISPLAY_NONE); + EASY_CHAT_TYPE_MAIL, + gSaveBlock1Ptr->mail[mail].words, + CB2_ReturnToPartyMenuFromWritingMail, + EASY_CHAT_PERSON_DISPLAY_NONE); } static void CB2_ReturnToPartyMenuFromWritingMail(void) @@ -4447,6 +4454,7 @@ static void CB2_ReturnToPartyMenuFromWritingMail(void) struct Pokemon *mon = &gPlayerParty[gPartyMenu.slotId]; u16 item = GetMonData(mon, MON_DATA_HELD_ITEM); + // Canceled writing mail if (gSpecialVar_Result == FALSE) { TakeMailFromMon(mon); @@ -4455,13 +4463,15 @@ static void CB2_ReturnToPartyMenuFromWritingMail(void) AddBagItem(item, 1); InitPartyMenu(gPartyMenu.menuType, KEEP_PARTY_LAYOUT, gPartyMenu.action, TRUE, PARTY_MSG_CHOOSE_MON, Task_TryCreateSelectionWindow, gPartyMenu.exitCallback); } + // Wrote mail else { - InitPartyMenu(gPartyMenu.menuType, KEEP_PARTY_LAYOUT, gPartyMenu.action, TRUE, PARTY_MSG_NONE, sub_81B4624, gPartyMenu.exitCallback); + InitPartyMenu(gPartyMenu.menuType, KEEP_PARTY_LAYOUT, gPartyMenu.action, TRUE, PARTY_MSG_NONE, Task_DisplayGaveMailFromPartyMessage, gPartyMenu.exitCallback); } } -static void sub_81B4624(u8 taskId) +// Nearly redundant with Task_DisplayGaveMailFromBagMessgae +static void Task_DisplayGaveMailFromPartyMessage(u8 taskId) { if (!gPaletteFade.active) { @@ -4602,16 +4612,16 @@ static void CursorCb_Mail(u8 taskId) static void CursorCb_Read(u8 taskId) { PlaySE(SE_SELECT); - sPartyMenuInternal->exitCallback = sub_81B4A98; + sPartyMenuInternal->exitCallback = CB2_ReadHeldMail; Task_ClosePartyMenu(taskId); } -static void sub_81B4A98(void) +static void CB2_ReadHeldMail(void) { - ReadMail(&gSaveBlock1Ptr->mail[GetMonData(&gPlayerParty[gPartyMenu.slotId], MON_DATA_MAIL)], sub_81B4AE0, 1); + ReadMail(&gSaveBlock1Ptr->mail[GetMonData(&gPlayerParty[gPartyMenu.slotId], MON_DATA_MAIL)], CB2_ReturnToPartyMenuFromReadingMail, 1); } -static void sub_81B4AE0(void) +static void CB2_ReturnToPartyMenuFromReadingMail(void) { gPaletteFade.bufferTransferDisabled = TRUE; InitPartyMenu(gPartyMenu.menuType, KEEP_PARTY_LAYOUT, gPartyMenu.action, TRUE, PARTY_MSG_DO_WHAT_WITH_MON, Task_TryCreateSelectionWindow, gPartyMenu.exitCallback); @@ -4623,23 +4633,23 @@ static void CursorCb_TakeMail(u8 taskId) PartyMenuRemoveWindow(&sPartyMenuInternal->windowId[1]); PartyMenuRemoveWindow(&sPartyMenuInternal->windowId[0]); DisplayPartyMenuMessage(gText_SendMailToPC, TRUE); - gTasks[taskId].func = sub_81B4B6C; + gTasks[taskId].func = Task_SendMailToPCYesNo; } -static void sub_81B4B6C(u8 taskId) +static void Task_SendMailToPCYesNo(u8 taskId) { if (IsPartyMenuTextPrinterActive() != TRUE) { PartyMenuDisplayYesNoMenu(); - gTasks[taskId].func = sub_81B4BA0; + gTasks[taskId].func = Task_HandleSendMailToPCYesNoInput; } } -static void sub_81B4BA0(u8 taskId) +static void Task_HandleSendMailToPCYesNoInput(u8 taskId) { switch (Menu_ProcessInputNoWrapClearOnChoose()) { - case 0: + case 0: // Yes, send to PC if (TakeMailFromMon2(&gPlayerParty[gPartyMenu.slotId]) != 0xFF) { DisplayPartyMenuMessage(gText_MailSentToPC, FALSE); @@ -4656,27 +4666,27 @@ static void sub_81B4BA0(u8 taskId) // fallthrough case 1: DisplayPartyMenuMessage(gText_MailMessageWillBeLost, TRUE); - gTasks[taskId].func = sub_81B4C60; + gTasks[taskId].func = Task_LoseMailMessageYesNo; break; } } -static void sub_81B4C60(u8 taskId) +static void Task_LoseMailMessageYesNo(u8 taskId) { if (IsPartyMenuTextPrinterActive() != TRUE) { PartyMenuDisplayYesNoMenu(); - gTasks[taskId].func = sub_81B4C94; + gTasks[taskId].func = Task_HandleLoseMailMessageYesNoInput; } } -static void sub_81B4C94(u8 taskId) +static void Task_HandleLoseMailMessageYesNoInput(u8 taskId) { u16 item; switch (Menu_ProcessInputNoWrapClearOnChoose()) { - case 0: + case 0: // Yes, lose mail message item = GetMonData(&gPlayerParty[gPartyMenu.slotId], MON_DATA_HELD_ITEM); if (AddBagItem(item, 1) == TRUE) { @@ -4756,7 +4766,7 @@ static void CursorCb_Enter(u8 taskId) gSelectedOrderFromParty[i] = gPartyMenu.slotId + 1; DisplayPartyPokemonDescriptionText(i + PARTYBOX_DESC_FIRST, &sPartyMenuBoxes[gPartyMenu.slotId], 1); if (i == (maxBattlers - 1)) - sub_81B4F88(); + MoveCursorToConfirm(); DisplayPartyMenuStdMessage(PARTY_MSG_CHOOSE_MON); gTasks[taskId].func = Task_HandleChooseMonInput; return; @@ -4769,7 +4779,7 @@ static void CursorCb_Enter(u8 taskId) gTasks[taskId].func = Task_ReturnToChooseMonAfterText; } -static void sub_81B4F88(void) +static void MoveCursorToConfirm(void) { AnimatePartySlot(gPartyMenu.slotId, 0); gPartyMenu.slotId = PARTY_SIZE; @@ -4931,7 +4941,7 @@ static void CursorCb_FieldMove(u8 taskId) PartyMenuRemoveWindow(&sPartyMenuInternal->windowId[0]); PartyMenuRemoveWindow(&sPartyMenuInternal->windowId[1]); - if (sub_81221AC() == TRUE || InUnionRoom() == TRUE) + if (sub_81221AC() == TRUE || InUnionRoom() == TRUE) //SKP { if (fieldMove == FIELD_MOVE_MILK_DRINK || fieldMove == FIELD_MOVE_SOFT_BOILED) DisplayPartyMenuStdMessage(PARTY_MSG_CANT_USE_HERE); @@ -5146,23 +5156,25 @@ static bool8 SetUpFieldMove_Dive(void) return FALSE; } -static void party_menu_icon_anim(struct Pokemon *mon, struct PartyMenuBox *menuBox, u32 slot) +static void CreatePartyMonIconSprite(struct Pokemon *mon, struct PartyMenuBox *menuBox, u32 slot) { - bool32 bit = 1; + bool32 handleDeoxys = TRUE; u16 species2; + // If in a multi battle, show partners Deoxys icon as Normal forme if (IsMultiBattle() == TRUE && gMain.inBattle) - bit = (sMultiBattlePartnersPartyMask[slot] ^ bit) ? 1 : 0; + handleDeoxys = (sMultiBattlePartnersPartyMask[slot] ^ handleDeoxys) ? TRUE : FALSE; + species2 = GetMonData(mon, MON_DATA_SPECIES2); - party_menu_link_mon_icon_anim(species2, GetMonData(mon, MON_DATA_PERSONALITY), menuBox, 1, bit); + CreatePartyMonIconSpriteParameterized(species2, GetMonData(mon, MON_DATA_PERSONALITY), menuBox, 1, handleDeoxys); UpdatePartyMonHPBar(menuBox->monSpriteId, mon); } -static void party_menu_link_mon_icon_anim(u16 species, u32 pid, struct PartyMenuBox *menuBox, u8 priority, bool32 bit) +static void CreatePartyMonIconSpriteParameterized(u16 species, u32 pid, struct PartyMenuBox *menuBox, u8 priority, bool32 handleDeoxys) { if (species != SPECIES_NONE) { - menuBox->monSpriteId = CreateMonIcon(species, UpdateTradeMonIconFrame, menuBox->spriteCoords[0], menuBox->spriteCoords[1], 4, pid, bit); + menuBox->monSpriteId = CreateMonIcon(species, MonIconSpriteCallback, menuBox->spriteCoords[0], menuBox->spriteCoords[1], 4, pid, handleDeoxys); gSprites[menuBox->monSpriteId].oam.priority = priority; } } @@ -5209,35 +5221,35 @@ static void AnimateSelectedPartyIcon(u8 spriteId, u8 animNum) gSprites[spriteId].pos2.x = -4; gSprites[spriteId].pos2.y = 0; } - gSprites[spriteId].callback = UpdatePartyMonIconFrame; + gSprites[spriteId].callback = SpriteCB_UpdatePartyMonIcon; } else { gSprites[spriteId].pos2.x = 0; gSprites[spriteId].pos2.y = 0; - gSprites[spriteId].callback = UpdatePartyMonIconFrameAndBounce; + gSprites[spriteId].callback = SpriteCB_BouncePartyMonIcon; } } -static void UpdatePartyMonIconFrameAndBounce(struct Sprite *sprite) +static void SpriteCB_BouncePartyMonIcon(struct Sprite *sprite) { - u8 unk = UpdateMonIconFrame(sprite); + u8 animCmd = UpdateMonIconFrame(sprite); - if (unk != 0) + if (animCmd != 0) { - if (unk & 1) + if (animCmd & 1) // % 2 also matches sprite->pos2.y = -3; else sprite->pos2.y = 1; } } -static void UpdatePartyMonIconFrame(struct Sprite *sprite) +static void SpriteCB_UpdatePartyMonIcon(struct Sprite *sprite) { UpdateMonIconFrame(sprite); } -static void party_menu_held_item_object(struct Pokemon *mon, struct PartyMenuBox *menuBox) +static void CreatePartyMonHeldItemSprite(struct Pokemon *mon, struct PartyMenuBox *menuBox) { if (GetMonData(mon, MON_DATA_SPECIES) != SPECIES_NONE) { @@ -5246,7 +5258,7 @@ static void party_menu_held_item_object(struct Pokemon *mon, struct PartyMenuBox } } -static void party_menu_link_mon_held_item_object(u16 species, u16 item, struct PartyMenuBox *menuBox) +static void CreatePartyMonHeldItemSpriteParameterized(u16 species, u16 item, struct PartyMenuBox *menuBox) { if (species != SPECIES_NONE) { @@ -5338,13 +5350,13 @@ static void SpriteCB_HeldItem(struct Sprite *sprite) } } -static void party_menu_pokeball_object(struct Pokemon *mon, struct PartyMenuBox *menuBox) +static void CreatePartyMonPokeballSprite(struct Pokemon *mon, struct PartyMenuBox *menuBox) { if (GetMonData(mon, MON_DATA_SPECIES) != SPECIES_NONE) menuBox->pokeballSpriteId = CreateSprite(&sSpriteTemplate_MenuPokeball, menuBox->spriteCoords[6], menuBox->spriteCoords[7], 8); } -static void party_menu_link_mon_pokeball_object(u16 species, struct PartyMenuBox *menuBox) +static void CreatePartyMonPokeballSpriteParameterized(u16 species, struct PartyMenuBox *menuBox) { if (species != SPECIES_NONE) { @@ -5353,7 +5365,8 @@ static void party_menu_link_mon_pokeball_object(u16 species, struct PartyMenuBox } } -static u8 CreateCancelPokeballSprite(u8 x, u8 y) +// For Cancel when Confirm isnt present +static u8 CreatePokeballButtonSprite(u8 x, u8 y) { u8 spriteId = CreateSprite(&sSpriteTemplate_MenuPokeball, x, y, 8); @@ -5361,10 +5374,10 @@ static u8 CreateCancelPokeballSprite(u8 x, u8 y) return spriteId; } -// For Confirm and Cancel in Choose 3 party menus -static u8 CreateMenuPokeballSprite(u8 x, u8 y) +// For Confirm and Cancel when both are present +static u8 CreateSmallPokeballButtonSprite(u8 x, u8 y) { - return CreateSprite(&gSpriteTemplate_8615F78, x, y, 8); + return CreateSprite(&sSpriteTemplate_MenuPokeballSmall, x, y, 8); } static void PartyMenuStartSpriteAnim(u8 spriteId, u8 animNum) @@ -5372,9 +5385,11 @@ static void PartyMenuStartSpriteAnim(u8 spriteId, u8 animNum) StartSpriteAnim(&gSprites[spriteId], animNum); } -static void sub_81B5FBC(u8 spriteId, u8 spriteId2, u8 a) +// Unused. Might explain the large blank section in gPartyMenuPokeballSmall_Gfx +// At the very least this is how the unused anim cmds for sSpriteAnimTable_MenuPokeballSmall were meant to be accessed +static void SpriteCB_BounceConfirmCancelButton(u8 spriteId, u8 spriteId2, u8 animNum) { - if (a == 0) + if (animNum == 0) { StartSpriteAnim(&gSprites[spriteId], 2); StartSpriteAnim(&gSprites[spriteId2], 4); @@ -5397,7 +5412,7 @@ static void LoadPartyMenuPokeballGfx(void) LoadCompressedSpritePalette(&sSpritePalette_MenuPokeball); } -static void party_menu_status_condition_object(struct Pokemon *mon, struct PartyMenuBox *menuBox) +static void CreatePartyMonStatusSprite(struct Pokemon *mon, struct PartyMenuBox *menuBox) { if (GetMonData(mon, MON_DATA_SPECIES) != SPECIES_NONE) { @@ -5406,7 +5421,7 @@ static void party_menu_status_condition_object(struct Pokemon *mon, struct Party } } -static void party_menu_link_mon_status_condition_object(u16 species, u8 status, struct PartyMenuBox *menuBox) +static void CreatePartyMonStatusSpriteParameterized(u16 species, u8 status, struct PartyMenuBox *menuBox) { if (species != SPECIES_NONE) { @@ -5473,7 +5488,7 @@ void CB2_ShowPartyMenuForItemUse(void) break; } } - task = sub_81B6280; + task = Task_SetSacredAshCB; msgId = PARTY_MSG_NONE; } else @@ -5497,13 +5512,13 @@ static void CB2_ReturnToBagMenu(void) GoToBattlePyramidBagMenu(4, gPyramidBagCursorData.callback); } -static void sub_81B6280(u8 taskId) +static void Task_SetSacredAshCB(u8 taskId) { if (!gPaletteFade.active) { if (gPartyMenu.menuType == PARTY_MENU_TYPE_IN_BATTLE) sPartyMenuInternal->exitCallback = CB2_SetUpExitToBattleScreen; - gItemUseCB(taskId, Task_ClosePartyMenuAfterText); + gItemUseCB(taskId, Task_ClosePartyMenuAfterText); // ItemUseCB_SacredAsh in this case } } @@ -5628,7 +5643,7 @@ void ItemUseCB_Medicine(u8 taskId, TaskFunc task) if (ExecuteTableBasedItemEffect_(gPartyMenu.slotId, item, 0)) { iTriedHonestlyIDid: - gUnknown_0203CEE8 = FALSE; + gPartyMenuUseExitCallback = FALSE; PlaySE(SE_SELECT); DisplayPartyMenuMessage(gText_WontHaveEffect, TRUE); schedule_bg_copy_tilemap_to_vram(2); @@ -5640,7 +5655,7 @@ void ItemUseCB_Medicine(u8 taskId, TaskFunc task) { goto iTriedHonestlyIDid; //TODO: resolve this goto } - gUnknown_0203CEE8 = TRUE; + gPartyMenuUseExitCallback = TRUE; if (!IsItemFlute(item)) { PlaySE(SE_KAIFUKU); @@ -5686,7 +5701,7 @@ static void Task_ClosePartyMenuAfterText(u8 taskId) { if (IsPartyMenuTextPrinterActive() != TRUE) { - if (gUnknown_0203CEE8 == FALSE) + if (gPartyMenuUseExitCallback == FALSE) sPartyMenuInternal->exitCallback = NULL; Task_ClosePartyMenu(taskId); } @@ -5705,7 +5720,7 @@ void ItemUseCB_ReduceEV(u8 taskId, TaskFunc task) if (cannotUseEffect || (friendship == newFriendship && ev == newEv)) { - gUnknown_0203CEE8 = FALSE; + gPartyMenuUseExitCallback = FALSE; PlaySE(SE_SELECT); DisplayPartyMenuMessage(gText_WontHaveEffect, TRUE); schedule_bg_copy_tilemap_to_vram(2); @@ -5713,7 +5728,7 @@ void ItemUseCB_ReduceEV(u8 taskId, TaskFunc task) } else { - gUnknown_0203CEE8 = TRUE; + gPartyMenuUseExitCallback = TRUE; PlaySE(SE_KAIFUKU); RemoveBagItem(item, 1); GetMonNickname(mon, gStringVar1); @@ -5832,7 +5847,7 @@ void ItemUseCB_PPRecovery(u8 taskId, TaskFunc task) if (!(effect[4] & ITEM4_HEAL_PP_ONE)) { - gPartyMenu.unkE = 0; + gPartyMenu.data1 = 0; TryUsePPItem(taskId); } else @@ -5847,7 +5862,7 @@ void ItemUseCB_PPRecovery(u8 taskId, TaskFunc task) static void SetSelectedMoveForPPItem(u8 taskId) { PartyMenuRemoveWindow(&sPartyMenuInternal->windowId[0]); - gPartyMenu.unkE = Menu_GetCursorPos(); + gPartyMenu.data1 = Menu_GetCursorPos(); TryUsePPItem(taskId); } @@ -5862,14 +5877,14 @@ static void ReturnToUseOnWhichMon(u8 taskId) static void TryUsePPItem(u8 taskId) { u16 move = MOVE_NONE; - s16 *moveSlot = &gPartyMenu.unkE; + s16 *moveSlot = &gPartyMenu.data1; u16 item = gSpecialVar_ItemId; struct PartyMenu *ptr = &gPartyMenu; struct Pokemon *mon; if (ExecuteTableBasedItemEffect_(ptr->slotId, item, *moveSlot)) { - gUnknown_0203CEE8 = FALSE; + gPartyMenuUseExitCallback = FALSE; PlaySE(SE_SELECT); DisplayPartyMenuMessage(gText_WontHaveEffect, TRUE); schedule_bg_copy_tilemap_to_vram(2); @@ -5877,7 +5892,7 @@ static void TryUsePPItem(u8 taskId) } else { - gUnknown_0203CEE8 = TRUE; + gPartyMenuUseExitCallback = TRUE; mon = &gPlayerParty[ptr->slotId]; PlaySE(SE_KAIFUKU); RemoveBagItem(item, 1); @@ -5951,7 +5966,7 @@ void ItemUseCB_TMHM(u8 taskId, TaskFunc task) PlaySE(SE_SELECT); mon = &gPlayerParty[gPartyMenu.slotId]; - move = &gPartyMenu.unkE; + move = &gPartyMenu.data1; item = gSpecialVar_ItemId; GetMonNickname(mon, gStringVar1); move[0] = ItemIdToBattleMoveId(item); @@ -5982,7 +5997,7 @@ void ItemUseCB_TMHM(u8 taskId, TaskFunc task) static void Task_LearnedMove(u8 taskId) { struct Pokemon *mon = &gPlayerParty[gPartyMenu.slotId]; - s16 *move = &gPartyMenu.unkE; + s16 *move = &gPartyMenu.data1; u16 item = gSpecialVar_ItemId; if (move[1] == 0) @@ -6060,7 +6075,7 @@ static void Task_ShowSummaryScreenToForgetMove(u8 taskId) static void CB2_ShowSummaryScreenToForgetMove(void) { - ShowSelectMovePokemonSummaryScreen(gPlayerParty, gPartyMenu.slotId, gPlayerPartyCount - 1, CB2_ReturnToPartyMenuWhileLearningMove, gPartyMenu.unkE); + ShowSelectMovePokemonSummaryScreen(gPlayerParty, gPartyMenu.slotId, gPlayerPartyCount - 1, CB2_ReturnToPartyMenuWhileLearningMove, gPartyMenu.data1); } static void CB2_ReturnToPartyMenuWhileLearningMove(void) @@ -6099,7 +6114,7 @@ static void Task_PartyMenuReplaceMove(u8 taskId) { mon = &gPlayerParty[gPartyMenu.slotId]; RemoveMonPPBonus(mon, GetMoveSlotToReplace()); - move = gPartyMenu.unkE; + move = gPartyMenu.data1; SetMonMoveSlot(mon, move, GetMoveSlotToReplace()); Task_LearnedMove(taskId); } @@ -6107,7 +6122,7 @@ static void Task_PartyMenuReplaceMove(u8 taskId) static void StopLearningMovePrompt(u8 taskId) { - StringCopy(gStringVar2, gMoveNames[gPartyMenu.unkE]); + StringCopy(gStringVar2, gMoveNames[gPartyMenu.data1]); StringExpandPlaceholders(gStringVar4, gText_StopLearningMove2); DisplayPartyMenuMessage(gStringVar4, TRUE); schedule_bg_copy_tilemap_to_vram(2); @@ -6131,7 +6146,7 @@ static void Task_HandleStopLearningMoveYesNoInput(u8 taskId) { case 0: GetMonNickname(mon, gStringVar1); - StringCopy(gStringVar2, gMoveNames[gPartyMenu.unkE]); + StringCopy(gStringVar2, gMoveNames[gPartyMenu.data1]); StringExpandPlaceholders(gStringVar4, gText_MoveNotLearned); DisplayPartyMenuMessage(gStringVar4, TRUE); if (gPartyMenu.learnMoveState == 1) @@ -6150,7 +6165,7 @@ static void Task_HandleStopLearningMoveYesNoInput(u8 taskId) // fallthrough case 1: GetMonNickname(mon, gStringVar1); - StringCopy(gStringVar2, gMoveNames[gPartyMenu.unkE]); + StringCopy(gStringVar2, gMoveNames[gPartyMenu.data1]); DisplayLearnMoveMessage(gText_PkmnNeedsToReplaceMove); gTasks[taskId].func = Task_ReplaceMoveYesNo; break; @@ -6175,7 +6190,7 @@ void ItemUseCB_RareCandy(u8 taskId, TaskFunc task) { BufferMonStatsToTaskData(mon, arrayPtr); cannotUseEffect = ExecuteTableBasedItemEffect_(gPartyMenu.slotId, *itemPtr, 0); - BufferMonStatsToTaskData(mon, &ptr->data[6]); + BufferMonStatsToTaskData(mon, &ptr->data[NUM_STATS]); } else { @@ -6184,14 +6199,14 @@ void ItemUseCB_RareCandy(u8 taskId, TaskFunc task) PlaySE(SE_SELECT); if (cannotUseEffect) { - gUnknown_0203CEE8 = FALSE; + gPartyMenuUseExitCallback = FALSE; DisplayPartyMenuMessage(gText_WontHaveEffect, TRUE); schedule_bg_copy_tilemap_to_vram(2); gTasks[taskId].func = task; } else { - gUnknown_0203CEE8 = TRUE; + gPartyMenuUseExitCallback = TRUE; PlayFanfareByFanfareNum(0); UpdateMonDisplayInfoAfterRareCandy(gPartyMenu.slotId, mon); RemoveBagItem(gSpecialVar_ItemId, 1); @@ -6328,7 +6343,7 @@ static void DisplayMonNeedsToReplaceMove(u8 taskId) StringExpandPlaceholders(gStringVar4, gText_PkmnNeedsToReplaceMove); DisplayPartyMenuMessage(gStringVar4, TRUE); schedule_bg_copy_tilemap_to_vram(2); - gPartyMenu.unkE = gMoveToLearn; + gPartyMenu.data1 = gMoveToLearn; gTasks[taskId].func = Task_ReplaceMoveYesNo; } @@ -6339,7 +6354,7 @@ static void DisplayMonLearnedMove(u8 taskId, u16 move) StringExpandPlaceholders(gStringVar4, gText_PkmnLearnedMove3); DisplayPartyMenuMessage(gStringVar4, TRUE); schedule_bg_copy_tilemap_to_vram(2); - gPartyMenu.unkE = move; + gPartyMenu.data1 = move; gTasks[taskId].func = Task_DoLearnedMoveFanfareAfterText; } @@ -6353,29 +6368,33 @@ static void BufferMonStatsToTaskData(struct Pokemon *mon, s16 *data) data[3] = GetMonData(mon, MON_DATA_SPEED); } +#define tUsedOnSlot data[0] +#define tHadEffect data[1] +#define tLastSlotUsed data[2] + void ItemUseCB_SacredAsh(u8 taskId, TaskFunc task) { - sPartyMenuInternal->data[0] = 0; - sPartyMenuInternal->data[1] = 0; - sPartyMenuInternal->data[2] = gPartyMenu.slotId; - sub_81B7A28(taskId); + sPartyMenuInternal->tUsedOnSlot = FALSE; + sPartyMenuInternal->tHadEffect = FALSE; + sPartyMenuInternal->tLastSlotUsed = gPartyMenu.slotId; + UseSacredAsh(taskId); } -static void sub_81B7A28(u8 taskId) +static void UseSacredAsh(u8 taskId) { struct Pokemon *mon = &gPlayerParty[gPartyMenu.slotId]; u16 hp; if (GetMonData(mon, MON_DATA_SPECIES) == SPECIES_NONE) { - gTasks[taskId].func = task_sacred_ash_party_loop; + gTasks[taskId].func = Task_SacredAshLoop; return; } hp = GetMonData(mon, MON_DATA_HP); if (ExecuteTableBasedItemEffect_(gPartyMenu.slotId, gSpecialVar_ItemId, 0)) { - gTasks[taskId].func = task_sacred_ash_party_loop; + gTasks[taskId].func = Task_SacredAshLoop; return; } @@ -6383,34 +6402,34 @@ static void sub_81B7A28(u8 taskId) SetPartyMonAilmentGfx(mon, &sPartyMenuBoxes[gPartyMenu.slotId]); if (gSprites[sPartyMenuBoxes[gPartyMenu.slotId].statusSpriteId].invisible) DisplayPartyPokemonLevelCheck(mon, &sPartyMenuBoxes[gPartyMenu.slotId], 1); - AnimatePartySlot(sPartyMenuInternal->data[2], 0); + AnimatePartySlot(sPartyMenuInternal->tLastSlotUsed, 0); AnimatePartySlot(gPartyMenu.slotId, 1); PartyMenuModifyHP(taskId, gPartyMenu.slotId, 1, GetMonData(mon, MON_DATA_HP) - hp, Task_SacredAshDisplayHPRestored); ResetHPTaskData(taskId, 0, hp); - sPartyMenuInternal->data[0] = 1; - sPartyMenuInternal->data[1] = 1; + sPartyMenuInternal->tUsedOnSlot = TRUE; + sPartyMenuInternal->tHadEffect = TRUE; } -static void task_sacred_ash_party_loop(u8 taskId) +static void Task_SacredAshLoop(u8 taskId) { if (IsPartyMenuTextPrinterActive() != TRUE) { - if (sPartyMenuInternal->data[0] == 1) + if (sPartyMenuInternal->tUsedOnSlot == TRUE) { - sPartyMenuInternal->data[0] = 0; - sPartyMenuInternal->data[2] = gPartyMenu.slotId; + sPartyMenuInternal->tUsedOnSlot = FALSE; + sPartyMenuInternal->tLastSlotUsed = gPartyMenu.slotId; } if (++(gPartyMenu.slotId) == PARTY_SIZE) { - if (sPartyMenuInternal->data[1] == 0) + if (sPartyMenuInternal->tHadEffect == FALSE) { - gUnknown_0203CEE8 = FALSE; + gPartyMenuUseExitCallback = FALSE; DisplayPartyMenuMessage(gText_WontHaveEffect, TRUE); schedule_bg_copy_tilemap_to_vram(2); } else { - gUnknown_0203CEE8 = TRUE; + gPartyMenuUseExitCallback = TRUE; RemoveBagItem(gSpecialVar_ItemId, 1); } gTasks[taskId].func = Task_ClosePartyMenuAfterText; @@ -6418,7 +6437,7 @@ static void task_sacred_ash_party_loop(u8 taskId) } else { - sub_81B7A28(taskId); + UseSacredAsh(taskId); } } } @@ -6429,16 +6448,20 @@ static void Task_SacredAshDisplayHPRestored(u8 taskId) StringExpandPlaceholders(gStringVar4, gText_PkmnHPRestoredByVar2); DisplayPartyMenuMessage(gStringVar4, FALSE); schedule_bg_copy_tilemap_to_vram(2); - gTasks[taskId].func = task_sacred_ash_party_loop; + gTasks[taskId].func = Task_SacredAshLoop; } +#undef tUsedOnSlot +#undef tHadEffect +#undef tLastSlotUsed + void ItemUseCB_EvolutionStone(u8 taskId, TaskFunc task) { PlaySE(SE_SELECT); gCB2_AfterEvolution = gPartyMenu.exitCallback; if (ExecuteTableBasedItemEffect_(gPartyMenu.slotId, gSpecialVar_ItemId, 0)) { - gUnknown_0203CEE8 = FALSE; + gPartyMenuUseExitCallback = FALSE; DisplayPartyMenuMessage(gText_WontHaveEffect, TRUE); schedule_bg_copy_tilemap_to_vram(2); gTasks[taskId].func = task; @@ -6526,10 +6549,10 @@ static void TryTutorSelectedMon(u8 taskId) if (!gPaletteFade.active) { mon = &gPlayerParty[gPartyMenu.slotId]; - move = &gPartyMenu.unkE; + move = &gPartyMenu.data1; GetMonNickname(mon, gStringVar1); - gPartyMenu.unkE = GetTutorMove(gSpecialVar_0x8005); - StringCopy(gStringVar2, gMoveNames[gPartyMenu.unkE]); + gPartyMenu.data1 = GetTutorMove(gSpecialVar_0x8005); + StringCopy(gStringVar2, gMoveNames[gPartyMenu.data1]); move[1] = 2; switch (CanMonLearnTMTutor(mon, 0, gSpecialVar_0x8005)) { @@ -6540,7 +6563,7 @@ static void TryTutorSelectedMon(u8 taskId) DisplayLearnMoveMessageAndClose(taskId, gText_PkmnAlreadyKnows); return; default: - if (GiveMoveToMon(mon, gPartyMenu.unkE) != MON_HAS_MAX_MOVES) + if (GiveMoveToMon(mon, gPartyMenu.data1) != MON_HAS_MAX_MOVES) { Task_LearnedMove(taskId); return; @@ -6566,26 +6589,25 @@ void CB2_ChooseMonToGiveItem(void) gPartyMenu.bagItem = gSpecialVar_ItemId; } -//TODO next -static void TryGiveItemToSelectedMon(u8 taskId) +static void TryGiveItemOrMailToSelectedMon(u8 taskId) { sPartyMenuItemId = GetMonData(&gPlayerParty[gPartyMenu.slotId], MON_DATA_HELD_ITEM); if (sPartyMenuItemId == ITEM_NONE) { - GiveItemToSelectedMon(taskId); + GiveItemOrMailToSelectedMon(taskId); } else if (ItemIsMail(sPartyMenuItemId)) { - sub_81B83B8(taskId); + DisplayItemMustBeRemovedFirstMessage(taskId); } else { DisplayAlreadyHoldingItemSwitchMessage(&gPlayerParty[gPartyMenu.slotId], sPartyMenuItemId, TRUE); - gTasks[taskId].func = sub_81B82A0; + gTasks[taskId].func = Task_SwitchItemsFromBagYesNo; } } -static void GiveItemToSelectedMon(u8 taskId) +static void GiveItemOrMailToSelectedMon(u8 taskId) { if (ItemIsMail(gPartyMenu.bagItem)) { @@ -6595,11 +6617,11 @@ static void GiveItemToSelectedMon(u8 taskId) } else { - sub_81B8088(taskId); + GiveItemToSelectedMon(taskId); } } -static void sub_81B8088(u8 taskId) +static void GiveItemToSelectedMon(u8 taskId) { u16 item; @@ -6631,10 +6653,10 @@ static void CB2_WriteMailToGiveMonFromBag(void) GiveItemToMon(&gPlayerParty[gPartyMenu.slotId], gPartyMenu.bagItem); mail = GetMonData(&gPlayerParty[gPartyMenu.slotId], MON_DATA_MAIL); DoEasyChatScreen( - EASY_CHAT_TYPE_MAIL, - gSaveBlock1Ptr->mail[mail].words, - CB2_ReturnToPartyOrBagMenuFromWritingMail, - EASY_CHAT_PERSON_DISPLAY_NONE); + EASY_CHAT_TYPE_MAIL, + gSaveBlock1Ptr->mail[mail].words, + CB2_ReturnToPartyOrBagMenuFromWritingMail, + EASY_CHAT_PERSON_DISPLAY_NONE); } static void CB2_ReturnToPartyOrBagMenuFromWritingMail(void) @@ -6642,21 +6664,23 @@ static void CB2_ReturnToPartyOrBagMenuFromWritingMail(void) struct Pokemon *mon = &gPlayerParty[gPartyMenu.slotId]; u16 item = GetMonData(mon, MON_DATA_HELD_ITEM); + // Canceled writing mail if (gSpecialVar_Result == FALSE) { TakeMailFromMon(mon); SetMonData(mon, MON_DATA_HELD_ITEM, &sPartyMenuItemId); RemoveBagItem(sPartyMenuItemId, 1); - sub_81B841C(item); + ReturnGiveItemToBagOrPC(item); SetMainCallback2(gPartyMenu.exitCallback); } + // Wrote mail else { - InitPartyMenu(gPartyMenu.menuType, KEEP_PARTY_LAYOUT, gPartyMenu.action, TRUE, PARTY_MSG_NONE, sub_81B8230, gPartyMenu.exitCallback); + InitPartyMenu(gPartyMenu.menuType, KEEP_PARTY_LAYOUT, gPartyMenu.action, TRUE, PARTY_MSG_NONE, Task_DisplayGaveMailFromBagMessage, gPartyMenu.exitCallback); } } -static void sub_81B8230(u8 taskId) +static void Task_DisplayGaveMailFromBagMessage(u8 taskId) { if (!gPaletteFade.active) { @@ -6668,27 +6692,27 @@ static void sub_81B8230(u8 taskId) } } -static void sub_81B82A0(u8 taskId) +static void Task_SwitchItemsFromBagYesNo(u8 taskId) { if (IsPartyMenuTextPrinterActive() != TRUE) { PartyMenuDisplayYesNoMenu(); - gTasks[taskId].func = sub_81B82D4; + gTasks[taskId].func = Task_HandleSwitchItemsFromBagYesNoInput; } } -static void sub_81B82D4(u8 taskId) +static void Task_HandleSwitchItemsFromBagYesNoInput(u8 taskId) { u16 item; switch (Menu_ProcessInputNoWrapClearOnChoose()) { - case 0: + case 0: // Yes, switch items item = gPartyMenu.bagItem; RemoveItemToGiveFromBag(item); if (AddBagItem(sPartyMenuItemId, 1) == FALSE) { - sub_81B841C(item); + ReturnGiveItemToBagOrPC(item); BufferBagFullCantTakeItemMessage(sPartyMenuItemId); DisplayPartyMenuMessage(gStringVar4, FALSE); gTasks[taskId].func = Task_UpdateHeldItemSpriteAndClosePartyMenu; @@ -6708,13 +6732,13 @@ static void sub_81B82D4(u8 taskId) case MENU_B_PRESSED: PlaySE(SE_SELECT); // fallthrough - case 1: + case 1: // No, dont switch items gTasks[taskId].func = Task_UpdateHeldItemSpriteAndClosePartyMenu; break; } } -static void sub_81B83B8(u8 taskId) +static void DisplayItemMustBeRemovedFirstMessage(u8 taskId) { DisplayPartyMenuMessage(gText_RemoveMailBeforeItem, TRUE); schedule_bg_copy_tilemap_to_vram(2); @@ -6729,7 +6753,9 @@ static void RemoveItemToGiveFromBag(u16 item) RemoveBagItem(item, 1); } -static bool8 sub_81B841C(u16 item) +// Returns FALSE if there was no space to return the item +// but there always should be, and the return is ignored in all uses +static bool8 ReturnGiveItemToBagOrPC(u16 item) { if (gPartyMenu.action == PARTY_ACTION_GIVE_ITEM) return AddBagItem(item, 1); @@ -6747,7 +6773,7 @@ static void TryGiveMailToSelectedMon(u8 taskId) struct Pokemon *mon = &gPlayerParty[gPartyMenu.slotId]; struct MailStruct *mail; - gUnknown_0203CEE8 = FALSE; + gPartyMenuUseExitCallback = FALSE; mail = &gSaveBlock1Ptr->mail[playerPCItemPageInfo.itemsAbove + 6 + playerPCItemPageInfo.cursorPos]; if (GetMonData(mon, MON_DATA_HELD_ITEM) != ITEM_NONE) { @@ -7044,18 +7070,19 @@ static bool8 TrySwitchInPokemon(void) if (gPartyMenu.action == PARTY_ACTION_CANT_SWITCH) { u8 currBattler = gBattlerInMenuId; - GetMonNickname(&gPlayerParty[GetBattlerPartyId(gBattlerPartyIndexes[currBattler])], gStringVar1); + GetMonNickname(&gPlayerParty[GetPartyIdFromBattlePartyId(gBattlerPartyIndexes[currBattler])], gStringVar1); StringExpandPlaceholders(gStringVar4, gText_PkmnCantSwitchOut); return FALSE; } - gUnknown_0203CEE9 = GetPartyIdFromBattleSlot(slot); - gUnknown_0203CEE8 = TRUE; - newSlot = GetBattlerPartyId(gBattlerPartyIndexes[gBattlerInMenuId]); + gSelectedMonPartyId = GetPartyIdFromBattleSlot(slot); + gPartyMenuUseExitCallback = TRUE; + newSlot = GetPartyIdFromBattlePartyId(gBattlerPartyIndexes[gBattlerInMenuId]); SwitchPartyMonSlots(newSlot, slot); SwapPartyPokemon(&gPlayerParty[newSlot], &gPlayerParty[slot]); return TRUE; } +//TODO void sub_81B8C68(void) { sub_81B8C88(gBattlePartyCurrentOrder, sub_806D7EC()); @@ -7113,6 +7140,7 @@ static void sub_81B8C88(u8 *partyBattleOrder, bool8 multiplayerFlag) partyBattleOrder[i] = (partyIndexes[0 + (i * 2)] << 4) | partyIndexes[1 + (i * 2)]; } +//TODO void sub_81B8D64(u8 battlerId, u8 multiplayerFlag) { sub_81B8D88(gBattleStruct->field_60[battlerId], multiplayerFlag, battlerId); @@ -7184,10 +7212,11 @@ static void sub_81B8D88(u8 *ptr, bool8 multiplayerFlag, u8 battlerId) ptr[i] = (partyIndexes[0 + (i * 2)] << 4) | partyIndexes[1 + (i * 2)]; } -void sub_81B8E80(u8 battlerId, u8 unk, u8 arrayIndex) +//TODO clean up +void SwitchPartyOrderLinkMulti(u8 battlerId, u8 slot, u8 arrayIndex) { u8 possiblePartyIndexes[PARTY_SIZE]; - u8 unk2 = 0; + u8 slot2 = 0; int i, j; u8 *battleStructRelated; u8 possiblePartyIndexBuffer; @@ -7204,16 +7233,16 @@ void sub_81B8E80(u8 battlerId, u8 unk, u8 arrayIndex) possiblePartyIndexBuffer = possiblePartyIndexes[arrayIndex]; for (i = 0; i < PARTY_SIZE; i++) { - if (possiblePartyIndexes[i] == unk) + if (possiblePartyIndexes[i] == slot) { - unk2 = possiblePartyIndexes[i]; + slot2 = possiblePartyIndexes[i]; possiblePartyIndexes[i] = possiblePartyIndexBuffer; break; } } if (i != PARTY_SIZE) { - possiblePartyIndexes[arrayIndex] = unk2; + possiblePartyIndexes[arrayIndex] = slot2; battleStructRelated[0] = (possiblePartyIndexes[0] << 4) | possiblePartyIndexes[1]; battleStructRelated[1] = (possiblePartyIndexes[2] << 4) | possiblePartyIndexes[3]; battleStructRelated[2] = (possiblePartyIndexes[4] << 4) | possiblePartyIndexes[5]; @@ -7252,17 +7281,16 @@ void SwitchPartyMonSlots(u8 slot, u8 slot2) SetPartyIdAtBattleSlot(slot2, partyId); } -// TODO: rename? get party id from battle party id? -u8 GetBattlerPartyId(u8 slot) +u8 GetPartyIdFromBattlePartyId(u8 battlePartyId) { u8 i, j; for (j = i = 0; i < (int)ARRAY_COUNT(gBattlePartyCurrentOrder); j++, i++) { - if ((gBattlePartyCurrentOrder[i] >> 4) != slot) + if ((gBattlePartyCurrentOrder[i] >> 4) != battlePartyId) { j++; - if ((gBattlePartyCurrentOrder[i] & 0xF) == slot) + if ((gBattlePartyCurrentOrder[i] & 0xF) == battlePartyId) return j; } else @@ -7280,7 +7308,7 @@ static void UpdatePartyToBattleOrder(void) memcpy(partyBuffer, gPlayerParty, sizeof(gPlayerParty)); for (i = 0; i < PARTY_SIZE; i++) - memcpy(&gPlayerParty[GetBattlerPartyId(i)], &partyBuffer[i], sizeof(struct Pokemon)); + memcpy(&gPlayerParty[GetPartyIdFromBattlePartyId(i)], &partyBuffer[i], sizeof(struct Pokemon)); Free(partyBuffer); } @@ -7322,7 +7350,7 @@ static void CB2_SetUpExitToBattleScreen(void) void ShowPartyMenuToShowcaseMultiBattleParty(void) { - InitPartyMenu(PARTY_MENU_TYPE_IN_MULTI_BATTLE, PARTY_LAYOUT_MULTI_SHOWCASE, PARTY_ACTION_CHOOSE_MON, FALSE, PARTY_MSG_NONE, Task_InitMultiPartnerPartySlideIn, gMain.savedCallback); + InitPartyMenu(PARTY_MENU_TYPE_MULTI_SHOWCASE, PARTY_LAYOUT_MULTI_SHOWCASE, PARTY_ACTION_CHOOSE_MON, FALSE, PARTY_MSG_NONE, Task_InitMultiPartnerPartySlideIn, gMain.savedCallback); } #define tXPos data[0] diff --git a/src/pokemon.c b/src/pokemon.c index 18d4fdb12a..ea8dcf0ccd 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -4861,7 +4861,7 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov if (battlerId != 4) { gAbsentBattlerFlags &= ~gBitTable[battlerId]; - CopyPlayerPartyMonToBattleData(battlerId, GetBattlerPartyId(gBattlerPartyIndexes[battlerId])); + CopyPlayerPartyMonToBattleData(battlerId, GetPartyIdFromBattlePartyId(gBattlerPartyIndexes[battlerId])); if (GetBattlerSide(gActiveBattler) == B_SIDE_PLAYER && gBattleResults.numRevivesUsed < 255) gBattleResults.numRevivesUsed++; } @@ -6440,11 +6440,11 @@ void SetMonPreventsSwitchingString(void) gBattleTextBuff1[4] = B_BUFF_EOS; if (GetBattlerSide(gBattleStruct->battlerPreventingSwitchout) == B_SIDE_PLAYER) - gBattleTextBuff1[3] = GetBattlerPartyId(gBattlerPartyIndexes[gBattleStruct->battlerPreventingSwitchout]); + gBattleTextBuff1[3] = GetPartyIdFromBattlePartyId(gBattlerPartyIndexes[gBattleStruct->battlerPreventingSwitchout]); else gBattleTextBuff1[3] = gBattlerPartyIndexes[gBattleStruct->battlerPreventingSwitchout]; - PREPARE_MON_NICK_WITH_PREFIX_BUFFER(gBattleTextBuff2, gBattlerInMenuId, GetBattlerPartyId(gBattlerPartyIndexes[gBattlerInMenuId])) + PREPARE_MON_NICK_WITH_PREFIX_BUFFER(gBattleTextBuff2, gBattlerInMenuId, GetPartyIdFromBattlePartyId(gBattlerPartyIndexes[gBattlerInMenuId])) BattleStringExpandPlaceholders(gText_PkmnsXPreventsSwitching, gStringVar4); } diff --git a/src/pokemon_icon.c b/src/pokemon_icon.c index 7d7dadccb0..0a758f8eec 100644 --- a/src/pokemon_icon.c +++ b/src/pokemon_icon.c @@ -1029,13 +1029,13 @@ const u16 sSpriteImageSizes[3][4] = }, }; -u8 CreateMonIcon(u16 species, void (*callback)(struct Sprite *), s16 x, s16 y, u8 subpriority, u32 personality, bool32 extra) +u8 CreateMonIcon(u16 species, void (*callback)(struct Sprite *), s16 x, s16 y, u8 subpriority, u32 personality, bool32 handleDeoxys) { u8 spriteId; struct MonIconSpriteTemplate iconTemplate = { .oam = &sMonIconOamData, - .image = GetMonIconPtr(species, personality, extra), + .image = GetMonIconPtr(species, personality, handleDeoxys), .anims = sMonIconAnims, .affineAnims = sMonIconAffineAnims, .callback = callback, @@ -1125,9 +1125,9 @@ u16 sub_80D2E84(u16 species) } } -const u8 *GetMonIconPtr(u16 species, u32 personality, bool32 extra) +const u8 *GetMonIconPtr(u16 species, u32 personality, bool32 handleDeoxys) { - return GetMonIconTiles(GetIconSpecies(species, personality), extra); + return GetMonIconTiles(GetIconSpecies(species, personality), handleDeoxys); } void sub_80D2EF8(struct Sprite *sprite) @@ -1184,17 +1184,17 @@ void FreeMonIconPalette(u16 species) FreeSpritePaletteByTag(gMonIconPaletteTable[palIndex].tag); } -void UpdateTradeMonIconFrame(struct Sprite *sprite) +void MonIconSpriteCallback(struct Sprite *sprite) { UpdateMonIconFrame(sprite); } -const u8* GetMonIconTiles(u16 species, bool32 extra) +const u8* GetMonIconTiles(u16 species, bool32 handleDeoxys) { const u8* iconSprite = gMonIconTable[species]; - if (species == SPECIES_DEOXYS && extra == TRUE) + if (species == SPECIES_DEOXYS && handleDeoxys == TRUE) { - iconSprite = (const u8*)(0x400 + (u32)iconSprite); //WTF? + iconSprite = (const u8*)(0x400 + (u32)iconSprite); // use the specific Deoxys form icon (Speed in this case) } return iconSprite; } diff --git a/src/pokemon_summary_screen.c b/src/pokemon_summary_screen.c index 5ab13b09e9..41c48d0087 100644 --- a/src/pokemon_summary_screen.c +++ b/src/pokemon_summary_screen.c @@ -2575,9 +2575,9 @@ static void DrawPokerusCuredSymbol(struct Pokemon *mon) // This checks if the mo static void SetDexNumberColor(bool8 isMonShiny) { if (!isMonShiny) - sub_8199C30(3, 1, 4, 8, 8, 0); + SetBgTilemapPalette(3, 1, 4, 8, 8, 0); else - sub_8199C30(3, 1, 4, 8, 8, 5); + SetBgTilemapPalette(3, 1, 4, 8, 8, 5); schedule_bg_copy_tilemap_to_vram(3); } diff --git a/src/trade.c b/src/trade.c index 6dbc60f1d6..004cffe713 100644 --- a/src/trade.c +++ b/src/trade.c @@ -481,7 +481,7 @@ static void CB2_CreateTradeMenu(void) { struct Pokemon *mon = &gPlayerParty[i]; sTradeMenuData->partySpriteIds[TRADE_PLAYER][i] = CreateMonIcon(GetMonData(mon, MON_DATA_SPECIES2), - UpdateTradeMonIconFrame, + MonIconSpriteCallback, (sTradeMonSpriteCoords[i][0] * 8) + 14, (sTradeMonSpriteCoords[i][1] * 8) - 12, 1, @@ -493,7 +493,7 @@ static void CB2_CreateTradeMenu(void) { struct Pokemon *mon = &gEnemyParty[i]; sTradeMenuData->partySpriteIds[TRADE_PARTNER][i] = CreateMonIcon(GetMonData(mon, MON_DATA_SPECIES2, NULL), - UpdateTradeMonIconFrame, + MonIconSpriteCallback, (sTradeMonSpriteCoords[i + PARTY_SIZE][0] * 8) + 14, (sTradeMonSpriteCoords[i + PARTY_SIZE][1] * 8) - 12, 1, @@ -668,7 +668,7 @@ static void CB2_ReturnToTradeMenu(void) { struct Pokemon *mon = &gPlayerParty[i]; sTradeMenuData->partySpriteIds[TRADE_PLAYER][i] = CreateMonIcon(GetMonData(mon, MON_DATA_SPECIES2, NULL), - UpdateTradeMonIconFrame, + MonIconSpriteCallback, (sTradeMonSpriteCoords[i][0] * 8) + 14, (sTradeMonSpriteCoords[i][1] * 8) - 12, 1, @@ -680,7 +680,7 @@ static void CB2_ReturnToTradeMenu(void) { struct Pokemon *mon = &gEnemyParty[i]; sTradeMenuData->partySpriteIds[TRADE_PARTNER][i] = CreateMonIcon(GetMonData(mon, MON_DATA_SPECIES2, NULL), - UpdateTradeMonIconFrame, + MonIconSpriteCallback, (sTradeMonSpriteCoords[i + PARTY_SIZE][0] * 8) + 14, (sTradeMonSpriteCoords[i + PARTY_SIZE][1] * 8) - 12, 1, @@ -1809,7 +1809,7 @@ static void DrawTradeMenuParty(u8 whichParty) gSprites[sTradeMenuData->partySpriteIds[0][partyIdx + (selectedMonParty * PARTY_SIZE)]].data[0] = 20; gSprites[sTradeMenuData->partySpriteIds[0][partyIdx + (selectedMonParty * PARTY_SIZE)]].data[2] = (sTradeMonSpriteCoords[selectedMonParty * PARTY_SIZE][0] + sTradeMonSpriteCoords[selectedMonParty * PARTY_SIZE + 1][0]) / 2 * 8 + 14; gSprites[sTradeMenuData->partySpriteIds[0][partyIdx + (selectedMonParty * PARTY_SIZE)]].data[4] = (sTradeMonSpriteCoords[selectedMonParty * PARTY_SIZE][1] * 8) - 12; - StoreSpriteCallbackInData6(&gSprites[sTradeMenuData->partySpriteIds[0][partyIdx + (selectedMonParty * PARTY_SIZE)]], UpdateTradeMonIconFrame); + StoreSpriteCallbackInData6(&gSprites[sTradeMenuData->partySpriteIds[0][partyIdx + (selectedMonParty * PARTY_SIZE)]], MonIconSpriteCallback); sTradeMenuData->drawPartyState[whichParty]++; TradeMenuBouncePartySprites(&gSprites[sTradeMenuData->partySpriteIds[0][partyIdx + (selectedMonParty * PARTY_SIZE)]]); CopyToBgTilemapBufferRect_ChangePalette(1, sTradePartyBoxTilemap, whichParty * 15, 0, 15, 17, 0); @@ -1820,7 +1820,7 @@ static void DrawTradeMenuParty(u8 whichParty) PrintNicknamesForTradeMenu(); break; case 2: - if (gSprites[sTradeMenuData->partySpriteIds[0][partyIdx + (selectedMonParty * PARTY_SIZE)]].callback == UpdateTradeMonIconFrame) + if (gSprites[sTradeMenuData->partySpriteIds[0][partyIdx + (selectedMonParty * PARTY_SIZE)]].callback == MonIconSpriteCallback) sTradeMenuData->drawPartyState[whichParty] = 3; break; case 3: From aec7eb60892a745115c3521a7f049798f2d84f36 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Thu, 31 Oct 2019 14:11:55 -0400 Subject: [PATCH 36/46] Clean up party_menu doc --- include/party_menu.h | 14 +- include/pokemon.h | 4 +- include/pokemon_icon.h | 2 +- src/battle_controllers.c | 34 ++-- src/battle_gfx_sfx_util.c | 2 +- src/battle_pyramid_bag.c | 4 +- src/contest.c | 10 +- src/party_menu.c | 317 ++++++++++++++++---------------------- src/pokemon.c | 12 +- src/pokemon_icon.c | 2 +- src/trade.c | 12 +- 11 files changed, 184 insertions(+), 229 deletions(-) diff --git a/include/party_menu.h b/include/party_menu.h index c8926c0b95..0140901c19 100644 --- a/include/party_menu.h +++ b/include/party_menu.h @@ -40,14 +40,14 @@ void Task_HandleChooseMonInput(u8 taskId); u8* GetMonNickname(struct Pokemon *mon, u8 *dest); u8 DisplayPartyMenuMessage(const u8* str, bool8 keepOpen); bool8 IsPartyMenuTextPrinterActive(void); -void PartyMenuModifyHP(u8 taskId, u8 slot, s8 c, s16 HPDifference, TaskFunc func); +void PartyMenuModifyHP(u8 taskId, u8 slot, s8 hpIncrement, s16 HPDifference, TaskFunc task); u8 GetAilmentFromStatus(u32 status); u8 GetMonAilment(struct Pokemon *mon); -void DisplayPartyMenuStdMessage(u32 stringID); +void DisplayPartyMenuStdMessage(u32 stringId); bool8 FieldCallback_PrepareFadeInFromMenu(void); void CB2_ReturnToPartyMenuFromFlyMap(void); void LoadHeldItemIcons(void); -void DrawHeldItemIconsForTrade(u8 *a, u8 *b, u8 c); +void DrawHeldItemIconsForTrade(u8 *partyCounts, u8 *partySpriteIds, u8 whichParty); void CB2_ShowPartyMenuForItemUse(void); void ItemUseCB_Medicine(u8 taskId, TaskFunc task); void ItemUseCB_ReduceEV(u8 taskId, TaskFunc task); @@ -66,13 +66,13 @@ void CB2_ChooseMonToGiveItem(void); void ChooseMonToGiveMailFromMailbox(void); void InitChooseHalfPartyForBattle(u8 unused); void ClearSelectedPartyOrder(void); -void ChooseMonForTradingBoard(u8 initArg, MainCallback callback); +void ChooseMonForTradingBoard(u8 menuType, MainCallback callback); void ChooseMonForMoveTutor(void); void ChooseMonForWirelessMinigame(void); -void OpenPartyMenuInBattle(u8 arg); +void OpenPartyMenuInBattle(u8 partyAction); void ChooseMonForInBattleItem(void); -void sub_81B8C68(void); -void sub_81B8D64(u8 battlerId, u8 multiplayerFlag); +void BufferBattlePartyCurrentOrder(void); +void BufferBattlePartyCurrentOrderBySide(u8 battlerId, u8 flankId); void SwitchPartyOrderLinkMulti(u8 battlerId, u8 slot, u8 arrayIndex); void SwitchPartyMonSlots(u8 slot, u8 slot2); u8 GetPartyIdFromBattlePartyId(u8 slot); diff --git a/include/pokemon.h b/include/pokemon.h index bb71aa8779..316fbc2b3a 100644 --- a/include/pokemon.h +++ b/include/pokemon.h @@ -356,8 +356,8 @@ u16 SpeciesToCryId(u16 species); void sub_806D544(u16 species, u32 personality, u8 *dest); void DrawSpindaSpots(u16 species, u32 personality, u8 *dest, u8 a4); void EvolutionRenameMon(struct Pokemon *mon, u16 oldSpecies, u16 newSpecies); -bool8 sub_806D7EC(void); -bool16 GetLinkTrainerFlankId(u8 id); +u8 GetPlayerFlankId(void); +u16 GetLinkTrainerFlankId(u8 id); s32 GetBattlerMultiplayerId(u16 a1); u8 GetTrainerEncounterMusicId(u16 trainerOpponentId); u16 ModifyStatByNature(u8 nature, u16 n, u8 statIndex); diff --git a/include/pokemon_icon.h b/include/pokemon_icon.h index 4fb9903026..9d56aebcb0 100644 --- a/include/pokemon_icon.h +++ b/include/pokemon_icon.h @@ -21,7 +21,7 @@ u8 CreateMonIcon(u16 species, void (*callback)(struct Sprite *), s16 x, s16 y, u u8 UpdateMonIconFrame(struct Sprite *sprite); void LoadMonIconPalette(u16 species); void sub_80D328C(struct Sprite *sprite); -void MonIconSpriteCallback(struct Sprite *sprite); +void SpriteCB_MonIcon(struct Sprite *sprite); void SetPartyHPBarSprite(struct Sprite *sprite, u8 animNum); u8 GetMonIconPaletteIndexFromSpecies(u16 species); diff --git a/src/battle_controllers.c b/src/battle_controllers.c index 29540f3a94..d0e76ab1b1 100644 --- a/src/battle_controllers.c +++ b/src/battle_controllers.c @@ -95,7 +95,7 @@ void sub_8032768(void) if (!(gBattleTypeFlags & BATTLE_TYPE_MULTI)) { for (i = 0; i < gBattlersCount; i++) - sub_81B8D64(i, 0); + BufferBattlePartyCurrentOrderBySide(i, 0); } for (i = 0; i < sizeof(gBattleStruct->tvMovePoints); i++) @@ -144,10 +144,10 @@ static void InitSinglePlayerBtlControllers(void) gBattlersCount = MAX_BATTLERS_COUNT; - sub_81B8D64(0, 0); - sub_81B8D64(1, 0); - sub_81B8D64(2, 1); - sub_81B8D64(3, 1); + BufferBattlePartyCurrentOrderBySide(0, 0); + BufferBattlePartyCurrentOrderBySide(1, 0); + BufferBattlePartyCurrentOrderBySide(2, 1); + BufferBattlePartyCurrentOrderBySide(3, 1); gBattlerPartyIndexes[0] = 0; gBattlerPartyIndexes[1] = 0; @@ -247,10 +247,10 @@ static void InitSinglePlayerBtlControllers(void) gBattlersCount = MAX_BATTLERS_COUNT; - sub_81B8D64(0, 0); - sub_81B8D64(1, 0); - sub_81B8D64(2, 1); - sub_81B8D64(3, 1); + BufferBattlePartyCurrentOrderBySide(0, 0); + BufferBattlePartyCurrentOrderBySide(1, 0); + BufferBattlePartyCurrentOrderBySide(2, 1); + BufferBattlePartyCurrentOrderBySide(3, 1); gBattlerPartyIndexes[0] = 0; gBattlerPartyIndexes[1] = 0; @@ -267,11 +267,11 @@ static void InitSinglePlayerBtlControllers(void) { case 0: case 3: - sub_81B8D64(gLinkPlayers[i].id, 0); + BufferBattlePartyCurrentOrderBySide(gLinkPlayers[i].id, 0); break; case 1: case 2: - sub_81B8D64(gLinkPlayers[i].id, 1); + BufferBattlePartyCurrentOrderBySide(gLinkPlayers[i].id, 1); break; } @@ -487,10 +487,10 @@ static void InitLinkBtlControllers(void) gBattlersCount = MAX_BATTLERS_COUNT; } - sub_81B8D64(0, 0); - sub_81B8D64(1, 0); - sub_81B8D64(2, 1); - sub_81B8D64(3, 1); + BufferBattlePartyCurrentOrderBySide(0, 0); + BufferBattlePartyCurrentOrderBySide(1, 0); + BufferBattlePartyCurrentOrderBySide(2, 1); + BufferBattlePartyCurrentOrderBySide(3, 1); gBattlerPartyIndexes[0] = 0; gBattlerPartyIndexes[1] = 0; gBattlerPartyIndexes[2] = 3; @@ -509,11 +509,11 @@ static void InitLinkBtlControllers(void) { case 0: case 3: - sub_81B8D64(gLinkPlayers[i].id, 0); + BufferBattlePartyCurrentOrderBySide(gLinkPlayers[i].id, 0); break; case 1: case 2: - sub_81B8D64(gLinkPlayers[i].id, 1); + BufferBattlePartyCurrentOrderBySide(gLinkPlayers[i].id, 1); break; } diff --git a/src/battle_gfx_sfx_util.c b/src/battle_gfx_sfx_util.c index c29bf7526e..341cd4a6a8 100644 --- a/src/battle_gfx_sfx_util.c +++ b/src/battle_gfx_sfx_util.c @@ -811,7 +811,7 @@ bool8 BattleInitAllSprites(u8 *state1, u8 *battlerId) break; case 6: LoadAndCreateEnemyShadowSprites(); - sub_81B8C68(); + BufferBattlePartyCurrentOrder(); retVal = TRUE; break; } diff --git a/src/battle_pyramid_bag.c b/src/battle_pyramid_bag.c index 8ad7e57582..c904d4e98a 100644 --- a/src/battle_pyramid_bag.c +++ b/src/battle_pyramid_bag.c @@ -981,7 +981,7 @@ static void HandleMenuActionInput(u8 taskId) sub_8199134(0, 1); } } - else if (gMain.newKeys & DPAD_LEFT || GetLRKeysPressed() == 1) + else if (gMain.newKeys & DPAD_LEFT || GetLRKeysPressed() == MENU_L_PRESSED) { if (id & 1 && IsValidMenuAction(id - 1)) { @@ -989,7 +989,7 @@ static void HandleMenuActionInput(u8 taskId) sub_8199134(-1, 0); } } - else if (gMain.newKeys & DPAD_RIGHT || GetLRKeysPressed() == 2) + else if (gMain.newKeys & DPAD_RIGHT || GetLRKeysPressed() == MENU_R_PRESSED) { if (!(id & 1) && IsValidMenuAction(id + 1)) { diff --git a/src/contest.c b/src/contest.c index 20fa9e1a8d..2ad1890580 100644 --- a/src/contest.c +++ b/src/contest.c @@ -2802,7 +2802,7 @@ void sub_80DACBC(u8 contestType, u8 rank, bool32 isPostgame) u8 GetContestEntryEligibility(struct Pokemon *pkmn) { u8 ribbon; - u8 contestViability; + u8 eligibility; if (GetMonData(pkmn, MON_DATA_IS_EGG)) return CANT_ENTER_CONTEST_EGG; @@ -2833,12 +2833,12 @@ u8 GetContestEntryEligibility(struct Pokemon *pkmn) // Returns 2, 1, or 0 respectively if ribbon's rank is above, equal, or below // the current contest rank. if (ribbon > gSpecialVar_ContestRank) - contestViability = CAN_ENTER_CONTEST_HIGH_RANK; + eligibility = CAN_ENTER_CONTEST_HIGH_RANK; else if (ribbon >= gSpecialVar_ContestRank) - contestViability = CAN_ENTER_CONTEST_EQUAL_RANK; + eligibility = CAN_ENTER_CONTEST_EQUAL_RANK; else - contestViability = CANT_ENTER_CONTEST; - return contestViability; + eligibility = CANT_ENTER_CONTEST; + return eligibility; } static void DrawContestantWindowText(void) diff --git a/src/party_menu.c b/src/party_menu.c index 07042774be..aad7cb7b44 100755 --- a/src/party_menu.c +++ b/src/party_menu.c @@ -148,7 +148,7 @@ static EWRAM_DATA struct PartyMenuBox *sPartyMenuBoxes = NULL; static EWRAM_DATA u8 *sPartyBgGfxTilemap = NULL; static EWRAM_DATA u8 *sPartyBgTilemapBuffer = NULL; EWRAM_DATA bool8 gPartyMenuUseExitCallback = 0; -EWRAM_DATA u8 gSelectedMonPartyId = 0; // only used for switching mons, oddly +EWRAM_DATA u8 gSelectedMonPartyId = 0; EWRAM_DATA MainCallback gPostMenuFieldCallback = NULL; static EWRAM_DATA u16 *sSlot1TilemapBuffer = 0; // for switching party slots static EWRAM_DATA u16 *sSlot2TilemapBuffer = 0; // @@ -367,8 +367,8 @@ static u8 GetBattleEntryLevelCap(void); static u8 GetMaxBattleEntries(void); static u8 GetMinBattleEntries(void); static void Task_ContinueChoosingHalfParty(u8); -static void sub_81B8C88(u8*, bool8); -static void sub_81B8D88(u8*, u8, u8); +static void BufferBattlePartyOrder(u8*, bool8); +static void BufferBattlePartyOrderBySide(u8*, u8, u8); static void Task_InitMultiPartnerPartySlideIn(u8); static void Task_MultiPartnerPartySlideIn(u8); static void SlideMultiPartyMenuBoxSpritesOneStep(u8); @@ -378,31 +378,31 @@ static void Task_PartyMenuWaitForFade(u8 taskId); static void Task_ChooseContestMon(u8 taskId); static void CB2_ChooseContestMon(void); static void Task_ChoosePartyMon(u8 taskId); -static void Task_ChooseMonForMoveRelearner(u8 taskId); +static void Task_ChooseMonForMoveRelearner(u8); static void CB2_ChooseMonForMoveRelearner(void); -static void Task_BattlePyramidChooseMonHeldItems(u8 taskId); +static void Task_BattlePyramidChooseMonHeldItems(u8); static void ShiftMoveSlot(struct Pokemon*, u8, u8); -static void BlitBitmapToPartyWindow_LeftColumn(u8 windowId, u8 x, u8 y, u8 width, u8 height, u8 f); -static void BlitBitmapToPartyWindow_RightColumn(u8 windowId, u8 x, u8 y, u8 width, u8 height, u8 f); -static void CursorCb_Summary(u8 taskId); -static void CursorCb_Switch(u8 taskId); -static void CursorCb_Cancel1(u8 taskId); -static void CursorCb_Item(u8 taskId); -static void CursorCb_Give(u8 taskId); -static void CursorCb_TakeItem(u8 taskId); -static void CursorCb_Mail(u8 taskId); -static void CursorCb_Read(u8 taskId); -static void CursorCb_TakeMail(u8 taskId); -static void CursorCb_Cancel2(u8 taskId); -static void CursorCb_SendMon(u8 taskId); -static void CursorCb_Enter(u8 taskId); -static void CursorCb_NoEntry(u8 taskId); -static void CursorCb_Store(u8 taskId); -static void CursorCb_Register(u8 taskId); -static void CursorCb_Trade1(u8 taskId); -static void CursorCb_Trade2(u8 taskId); -static void CursorCb_Toss(u8 taskId); -static void CursorCb_FieldMove(u8 taskId); +static void BlitBitmapToPartyWindow_LeftColumn(u8, u8, u8, u8, u8, u8); +static void BlitBitmapToPartyWindow_RightColumn(u8, u8, u8, u8, u8, u8); +static void CursorCb_Summary(u8); +static void CursorCb_Switch(u8); +static void CursorCb_Cancel1(u8); +static void CursorCb_Item(u8); +static void CursorCb_Give(u8); +static void CursorCb_TakeItem(u8); +static void CursorCb_Mail(u8); +static void CursorCb_Read(u8); +static void CursorCb_TakeMail(u8); +static void CursorCb_Cancel2(u8); +static void CursorCb_SendMon(u8); +static void CursorCb_Enter(u8); +static void CursorCb_NoEntry(u8); +static void CursorCb_Store(u8); +static void CursorCb_Register(u8); +static void CursorCb_Trade1(u8); +static void CursorCb_Trade2(u8); +static void CursorCb_Toss(u8); +static void CursorCb_FieldMove(u8); static bool8 SetUpFieldMove_Surf(void); static bool8 SetUpFieldMove_Fly(void); static bool8 SetUpFieldMove_Waterfall(void); @@ -1734,7 +1734,7 @@ static void CB2_InitPartyMenu(void) { while (TRUE) { - if (sub_81221EC() == TRUE || ShowPartyMenu() == TRUE || sub_81221AC() == TRUE) //SKP + if (sub_81221EC() == TRUE || ShowPartyMenu() == TRUE || sub_81221AC() == TRUE) break; } } @@ -1767,7 +1767,7 @@ static bool8 ShowPartyMenu(void) gMain.state++; break; case 5: - if (!sub_81221AC()) //SKP + if (!sub_81221AC()) ResetTasks(); gMain.state++; break; @@ -2213,7 +2213,7 @@ static void DisplayPartyPokemonDataForMultiBattle(u8 slot) menuBox->infoRects->blitFunc(menuBox->windowId, 0, 0, 0, 0, FALSE); StringCopy(gStringVar1, gMultiPartnerParty[actualSlot].nickname); StringGetEnd10(gStringVar1); - sub_81DB52C(gStringVar1); //SKP + sub_81DB52C(gStringVar1); DisplayPartyPokemonBarDetail(menuBox->windowId, gStringVar1, 0, menuBox->infoRects->dimensions); DisplayPartyPokemonLevel(gMultiPartnerParty[actualSlot].level, menuBox); DisplayPartyPokemonGender(gMultiPartnerParty[actualSlot].gender, gMultiPartnerParty[actualSlot].species, gMultiPartnerParty[actualSlot].nickname, menuBox); @@ -2440,7 +2440,7 @@ u8 GetPartyMenuType(void) void Task_HandleChooseMonInput(u8 taskId) { - if (!gPaletteFade.active && sub_81221EC() != TRUE) //SKP + if (!gPaletteFade.active && sub_81221EC() != TRUE) { s8 *slotPtr = GetCurrentPartySlotPtr(); @@ -2577,7 +2577,7 @@ static void HandleChooseMonCancel(u8 taskId, s8 *slotPtr) PlaySE(SE_SELECT); if (DisplayCancelChooseMonYesNo(taskId) != TRUE) { - if (!sub_81221AC()) //SKP + if (!sub_81221AC()) gSpecialVar_0x8004 = PARTY_SIZE + 1; gPartyMenuUseExitCallback = FALSE; *slotPtr = PARTY_SIZE + 1; @@ -2704,7 +2704,7 @@ static void UpdateCurrentPartySelection(s8 *slotPtr, s8 movementDir) static void UpdatePartySelectionSingleLayout(s8 *slotPtr, s8 movementDir) { - // PARTY_SIZE + 1 is Cancel, PARTY_SIZE is Confirm (when choosing half only) + // PARTY_SIZE + 1 is Cancel, PARTY_SIZE is Confirm switch (movementDir) { case MENU_DIR_UP: @@ -2769,7 +2769,7 @@ static void UpdatePartySelectionSingleLayout(s8 *slotPtr, s8 movementDir) static void UpdatePartySelectionDoubleLayout(s8 *slotPtr, s8 movementDir) { - // PARTY_SIZE + 1 is Cancel, PARTY_SIZE is Confirm (when choosing half only) + // PARTY_SIZE + 1 is Cancel, PARTY_SIZE is Confirm // newSlot is used temporarily as a movement direction during its later assignment s8 newSlot = movementDir; @@ -2917,7 +2917,7 @@ bool8 IsPartyMenuTextPrinterActive(void) static void Task_WaitForLinkAndReturnToChooseMon(u8 taskId) { - if (sub_81221EC() != TRUE) //SKP + if (sub_81221EC() != TRUE) { DisplayPartyMenuStdMessage(PARTY_MSG_CHOOSE_MON); gTasks[taskId].func = Task_HandleChooseMonInput; @@ -2930,7 +2930,7 @@ static void Task_ReturnToChooseMonAfterText(u8 taskId) { ClearStdWindowAndFrameToTransparent(6, 0); ClearWindowTilemap(6); - if (sub_81221AC() == TRUE) //SKP + if (sub_81221AC() == TRUE) { gTasks[taskId].func = Task_WaitForLinkAndReturnToChooseMon; } @@ -3037,7 +3037,7 @@ static void Task_PartyMenuModifyHP(u8 taskId) } } -void PartyMenuModifyHP(u8 taskId, u8 slot, s8 hpIncrement, s16 hpDifference, TaskFunc followUpFunc) +void PartyMenuModifyHP(u8 taskId, u8 slot, s8 hpIncrement, s16 hpDifference, TaskFunc task) { struct Pokemon *mon = &gPlayerParty[slot]; s16 *data = gTasks[taskId].data; @@ -3048,7 +3048,7 @@ void PartyMenuModifyHP(u8 taskId, u8 slot, s8 hpIncrement, s16 hpDifference, Tas tHPToAdd = hpDifference; tPartyId = slot; tStartHP = tHP; - SetTaskFuncWithFollowupFunc(taskId, Task_PartyMenuModifyHP, followUpFunc); + SetTaskFuncWithFollowupFunc(taskId, Task_PartyMenuModifyHP, task); } // The usage of hp in this function is mostly nonsense @@ -3379,7 +3379,6 @@ static void DrawEmptySlot(u8 windowId) BlitBitmapToPartyWindow(windowId, sEmptySlotTileNums, 18, 0, 0, 18, 3); } -// If LoadPartyBoxPalette is too dense, this macro could be used to replace the LoadPalette triplets #define LOAD_PARTY_BOX_PAL(paletteIds, paletteOffsets) \ { \ LoadPalette(GetPartyMenuPalBufferPtr(paletteIds[0]), paletteOffsets[0] + palNum, 2); \ @@ -3393,120 +3392,74 @@ static void LoadPartyBoxPalette(struct PartyMenuBox *menuBox, u8 palFlags) if (palFlags & PARTY_PAL_NO_MON) { - LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxNoMonPalIds[0]), sPartyBoxNoMonPalOffsets[0] + palNum, 2); - LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxNoMonPalIds[1]), sPartyBoxNoMonPalOffsets[1] + palNum, 2); - LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxNoMonPalIds[2]), sPartyBoxNoMonPalOffsets[2] + palNum, 2); + LOAD_PARTY_BOX_PAL(sPartyBoxNoMonPalIds, sPartyBoxNoMonPalOffsets); } else if (palFlags & PARTY_PAL_TO_SOFTBOIL) { if (palFlags & PARTY_PAL_SELECTED) { - LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxSelectedForActionPalIds1[0]), sPartyBoxPalOffsets1[0] + palNum, 2); - LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxSelectedForActionPalIds1[1]), sPartyBoxPalOffsets1[1] + palNum, 2); - LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxSelectedForActionPalIds1[2]), sPartyBoxPalOffsets1[2] + palNum, 2); - LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxCurrSelectionPalIds2[0]), sPartyBoxPalOffsets2[0] + palNum, 2); - LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxCurrSelectionPalIds2[1]), sPartyBoxPalOffsets2[1] + palNum, 2); - LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxCurrSelectionPalIds2[2]), sPartyBoxPalOffsets2[2] + palNum, 2); + LOAD_PARTY_BOX_PAL(sPartyBoxSelectedForActionPalIds1, sPartyBoxPalOffsets1); + LOAD_PARTY_BOX_PAL(sPartyBoxCurrSelectionPalIds2, sPartyBoxPalOffsets2); } else { - LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxSelectedForActionPalIds1[0]), sPartyBoxPalOffsets1[0] + palNum, 2); - LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxSelectedForActionPalIds1[1]), sPartyBoxPalOffsets1[1] + palNum, 2); - LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxSelectedForActionPalIds1[2]), sPartyBoxPalOffsets1[2] + palNum, 2); - LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxSelectedForActionPalIds2[0]), sPartyBoxPalOffsets2[0] + palNum, 2); - LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxSelectedForActionPalIds2[1]), sPartyBoxPalOffsets2[1] + palNum, 2); - LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxSelectedForActionPalIds2[2]), sPartyBoxPalOffsets2[2] + palNum, 2); + LOAD_PARTY_BOX_PAL(sPartyBoxSelectedForActionPalIds1, sPartyBoxPalOffsets1); + LOAD_PARTY_BOX_PAL(sPartyBoxSelectedForActionPalIds2, sPartyBoxPalOffsets2); } } else if (palFlags & PARTY_PAL_SWITCHING) { - LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxSelectedForActionPalIds1[0]), sPartyBoxPalOffsets1[0] + palNum, 2); - LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxSelectedForActionPalIds1[1]), sPartyBoxPalOffsets1[1] + palNum, 2); - LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxSelectedForActionPalIds1[2]), sPartyBoxPalOffsets1[2] + palNum, 2); - LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxSelectedForActionPalIds2[0]), sPartyBoxPalOffsets2[0] + palNum, 2); - LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxSelectedForActionPalIds2[1]), sPartyBoxPalOffsets2[1] + palNum, 2); - LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxSelectedForActionPalIds2[2]), sPartyBoxPalOffsets2[2] + palNum, 2); + LOAD_PARTY_BOX_PAL(sPartyBoxSelectedForActionPalIds1, sPartyBoxPalOffsets1); + LOAD_PARTY_BOX_PAL(sPartyBoxSelectedForActionPalIds2, sPartyBoxPalOffsets2); } else if (palFlags & PARTY_PAL_TO_SWITCH) { if (palFlags & PARTY_PAL_SELECTED) { - LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxSelectedForActionPalIds1[0]), sPartyBoxPalOffsets1[0] + palNum, 2); - LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxSelectedForActionPalIds1[1]), sPartyBoxPalOffsets1[1] + palNum, 2); - LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxSelectedForActionPalIds1[2]), sPartyBoxPalOffsets1[2] + palNum, 2); - LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxCurrSelectionPalIds2[0]), sPartyBoxPalOffsets2[0] + palNum, 2); - LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxCurrSelectionPalIds2[1]), sPartyBoxPalOffsets2[1] + palNum, 2); - LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxCurrSelectionPalIds2[2]), sPartyBoxPalOffsets2[2] + palNum, 2); + LOAD_PARTY_BOX_PAL(sPartyBoxSelectedForActionPalIds1, sPartyBoxPalOffsets1); + LOAD_PARTY_BOX_PAL(sPartyBoxCurrSelectionPalIds2, sPartyBoxPalOffsets2); } else { - LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxSelectedForActionPalIds1[0]), sPartyBoxPalOffsets1[0] + palNum, 2); - LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxSelectedForActionPalIds1[1]), sPartyBoxPalOffsets1[1] + palNum, 2); - LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxSelectedForActionPalIds1[2]), sPartyBoxPalOffsets1[2] + palNum, 2); - LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxSelectedForActionPalIds2[0]), sPartyBoxPalOffsets2[0] + palNum, 2); - LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxSelectedForActionPalIds2[1]), sPartyBoxPalOffsets2[1] + palNum, 2); - LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxSelectedForActionPalIds2[2]), sPartyBoxPalOffsets2[2] + palNum, 2); + LOAD_PARTY_BOX_PAL(sPartyBoxSelectedForActionPalIds1, sPartyBoxPalOffsets1); + LOAD_PARTY_BOX_PAL(sPartyBoxSelectedForActionPalIds2, sPartyBoxPalOffsets2); } } else if (palFlags & PARTY_PAL_FAINTED) { if (palFlags & PARTY_PAL_SELECTED) { - LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxCurrSelectionFaintedPalIds[0]), sPartyBoxPalOffsets1[0] + palNum, 2); - LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxCurrSelectionFaintedPalIds[1]), sPartyBoxPalOffsets1[1] + palNum, 2); - LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxCurrSelectionFaintedPalIds[2]), sPartyBoxPalOffsets1[2] + palNum, 2); - LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxCurrSelectionPalIds2[0]), sPartyBoxPalOffsets2[0] + palNum, 2); - LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxCurrSelectionPalIds2[1]), sPartyBoxPalOffsets2[1] + palNum, 2); - LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxCurrSelectionPalIds2[2]), sPartyBoxPalOffsets2[2] + palNum, 2); + LOAD_PARTY_BOX_PAL(sPartyBoxCurrSelectionFaintedPalIds, sPartyBoxPalOffsets1); + LOAD_PARTY_BOX_PAL(sPartyBoxCurrSelectionPalIds2, sPartyBoxPalOffsets2); } else { - LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxFaintedPalIds1[0]), sPartyBoxPalOffsets1[0] + palNum, 2); - LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxFaintedPalIds1[1]), sPartyBoxPalOffsets1[1] + palNum, 2); - LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxFaintedPalIds1[2]), sPartyBoxPalOffsets1[2] + palNum, 2); - LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxFaintedPalIds2[0]), sPartyBoxPalOffsets2[0] + palNum, 2); - LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxFaintedPalIds2[1]), sPartyBoxPalOffsets2[1] + palNum, 2); - LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxFaintedPalIds2[2]), sPartyBoxPalOffsets2[2] + palNum, 2); + LOAD_PARTY_BOX_PAL(sPartyBoxFaintedPalIds1, sPartyBoxPalOffsets1); + LOAD_PARTY_BOX_PAL(sPartyBoxFaintedPalIds2, sPartyBoxPalOffsets2); } } else if (palFlags & PARTY_PAL_MULTI_ALT) { if (palFlags & PARTY_PAL_SELECTED) { - LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxCurrSelectionMultiPalIds[0]), sPartyBoxPalOffsets1[0] + palNum, 2); - LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxCurrSelectionMultiPalIds[1]), sPartyBoxPalOffsets1[1] + palNum, 2); - LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxCurrSelectionMultiPalIds[2]), sPartyBoxPalOffsets1[2] + palNum, 2); - LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxCurrSelectionPalIds2[0]), sPartyBoxPalOffsets2[0] + palNum, 2); - LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxCurrSelectionPalIds2[1]), sPartyBoxPalOffsets2[1] + palNum, 2); - LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxCurrSelectionPalIds2[2]), sPartyBoxPalOffsets2[2] + palNum, 2); + LOAD_PARTY_BOX_PAL(sPartyBoxCurrSelectionMultiPalIds, sPartyBoxPalOffsets1); + LOAD_PARTY_BOX_PAL(sPartyBoxCurrSelectionPalIds2, sPartyBoxPalOffsets2); } else { - LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxMultiPalIds1[0]), sPartyBoxPalOffsets1[0] + palNum, 2); - LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxMultiPalIds1[1]), sPartyBoxPalOffsets1[1] + palNum, 2); - LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxMultiPalIds1[2]), sPartyBoxPalOffsets1[2] + palNum, 2); - LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxMultiPalIds2[0]), sPartyBoxPalOffsets2[0] + palNum, 2); - LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxMultiPalIds2[1]), sPartyBoxPalOffsets2[1] + palNum, 2); - LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxMultiPalIds2[2]), sPartyBoxPalOffsets2[2] + palNum, 2); + LOAD_PARTY_BOX_PAL(sPartyBoxMultiPalIds1, sPartyBoxPalOffsets1); + LOAD_PARTY_BOX_PAL(sPartyBoxMultiPalIds2, sPartyBoxPalOffsets2); } } else if (palFlags & PARTY_PAL_SELECTED) { - LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxCurrSelectionPalIds1[0]), sPartyBoxPalOffsets1[0] + palNum, 2); - LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxCurrSelectionPalIds1[1]), sPartyBoxPalOffsets1[1] + palNum, 2); - LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxCurrSelectionPalIds1[2]), sPartyBoxPalOffsets1[2] + palNum, 2); - LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxCurrSelectionPalIds2[0]), sPartyBoxPalOffsets2[0] + palNum, 2); - LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxCurrSelectionPalIds2[1]), sPartyBoxPalOffsets2[1] + palNum, 2); - LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxCurrSelectionPalIds2[2]), sPartyBoxPalOffsets2[2] + palNum, 2); + LOAD_PARTY_BOX_PAL(sPartyBoxCurrSelectionPalIds1, sPartyBoxPalOffsets1); + LOAD_PARTY_BOX_PAL(sPartyBoxCurrSelectionPalIds2, sPartyBoxPalOffsets2); } else { - LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxEmptySlotPalIds1[0]), sPartyBoxPalOffsets1[0] + palNum, 2); - LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxEmptySlotPalIds1[1]), sPartyBoxPalOffsets1[1] + palNum, 2); - LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxEmptySlotPalIds1[2]), sPartyBoxPalOffsets1[2] + palNum, 2); - LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxEmptySlotPalIds2[0]), sPartyBoxPalOffsets2[0] + palNum, 2); - LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxEmptySlotPalIds2[1]), sPartyBoxPalOffsets2[1] + palNum, 2); - LoadPalette(GetPartyMenuPalBufferPtr(sPartyBoxEmptySlotPalIds2[2]), sPartyBoxPalOffsets2[2] + palNum, 2); + LOAD_PARTY_BOX_PAL(sPartyBoxEmptySlotPalIds1, sPartyBoxPalOffsets1); + LOAD_PARTY_BOX_PAL(sPartyBoxEmptySlotPalIds2, sPartyBoxPalOffsets2); } } @@ -3687,16 +3640,16 @@ static void PartyMenuRemoveWindow(u8 *ptr) } } -void DisplayPartyMenuStdMessage(u32 stringID) +void DisplayPartyMenuStdMessage(u32 stringId) { u8 *windowPtr = &sPartyMenuInternal->windowId[1]; if (*windowPtr != 0xFF) PartyMenuRemoveWindow(windowPtr); - if (stringID != PARTY_MSG_NONE) + if (stringId != PARTY_MSG_NONE) { - switch (stringID) + switch (stringId) { case PARTY_MSG_DO_WHAT_WITH_MON: *windowPtr = AddWindow(&sDoWhatWithMonMsgWindowTemplate); @@ -3719,15 +3672,15 @@ void DisplayPartyMenuStdMessage(u32 stringID) break; } - if (stringID == PARTY_MSG_CHOOSE_MON) + if (stringId == PARTY_MSG_CHOOSE_MON) { if (sPartyMenuInternal->chooseHalf) - stringID = PARTY_MSG_CHOOSE_MON_AND_CONFIRM; + stringId = PARTY_MSG_CHOOSE_MON_AND_CONFIRM; else if (!ShouldUseChooseMonText()) - stringID = PARTY_MSG_CHOOSE_MON_OR_CANCEL; + stringId = PARTY_MSG_CHOOSE_MON_OR_CANCEL; } DrawStdFrameWithCustomTileAndPalette(*windowPtr, FALSE, 0x4F, 0xD); - StringExpandPlaceholders(gStringVar4, sActionStringTable[stringID]); + StringExpandPlaceholders(gStringVar4, sActionStringTable[stringId]); AddTextPrinterParameterized(*windowPtr, 1, gStringVar4, 0, 1, 0, 0); schedule_bg_copy_tilemap_to_vram(2); } @@ -3970,7 +3923,7 @@ static void Task_TryCreateSelectionWindow(u8 taskId) static void Task_HandleSelectionMenuInput(u8 taskId) { - if (!gPaletteFade.active && sub_81221EC() != TRUE) //SKP + if (!gPaletteFade.active && sub_81221EC() != TRUE) { s8 input; s16 *data = gTasks[taskId].data; @@ -4097,41 +4050,42 @@ static void SwitchSelectedMons(u8 taskId) } // returns FALSE if the slot has slid fully offscreen / back onscreen -static bool8 TryMovePartySlot(s16 a, s16 srcWidth, u8 *srcX, u8 *srcHeight, u8 *destY) +static bool8 TryMovePartySlot(s16 x, s16 width, u8 *leftMove, u8 *newX, u8 *newWidth) { - if ((a + srcWidth) < 0) + if ((x + width) < 0) return FALSE; - if (a > 31) + if (x > 31) return FALSE; - if (a < 0) + if (x < 0) { - *srcX = a * -1; - *srcHeight = 0; - *destY = srcWidth + a; + *leftMove = x * -1; + *newX = 0; + *newWidth = width + x; } else { - *srcX = 0; - *srcHeight = a; - if ((a + srcWidth) > 31) - *destY = 32 - a; + *leftMove = 0; + *newX = x; + if ((x + width) > 31) + *newWidth = 32 - x; else - *destY = srcWidth; + *newWidth = width; } return TRUE; } -static void MoveAndBufferPartySlot(const void *rectSrc, s16 a, s16 destX, s16 srcWidth, s16 rectWidth, s16 offset) +static void MoveAndBufferPartySlot(const void *rectSrc, s16 x, s16 y, s16 width, s16 height, s16 dir) { - u8 srcX, srcHeight, destY; + // The use of the dimension parameters here is a mess + u8 leftMove, newX, newWidth; // leftMove is used as a srcX, newX is used as both x and srcHeight, newWidth is used as both width and destY - if (TryMovePartySlot(a, srcWidth, &srcX, &srcHeight, &destY)) + if (TryMovePartySlot(x, width, &leftMove, &newX, &newWidth)) { - FillBgTilemapBufferRect_Palette0(0, 0, srcHeight, destX, destY, rectWidth); - if (TryMovePartySlot(a + offset, srcWidth, &srcX, &srcHeight, &destY)) - CopyRectToBgTilemapBufferRect(0, rectSrc, srcX, 0, srcWidth, rectWidth, srcHeight, destX, destY, rectWidth, 17, 0, 0); + FillBgTilemapBufferRect_Palette0(0, 0, newX, y, newWidth, height); + if (TryMovePartySlot(x + dir, width, &leftMove, &newX, &newWidth)) + CopyRectToBgTilemapBufferRect(0, rectSrc, leftMove, 0, width, height, newX, y, newWidth, height, 17, 0, 0); } } @@ -4913,7 +4867,7 @@ static void Task_SpinTradeYesNo(u8 taskId) } } -// See comment on CursorCb_Trade2. Selecting YES (0) to spin trade just closes the party menu +// See comment on CursorCb_Trade2. Because no callback is set, selecting YES (0) to spin trade just closes the party menu static void Task_HandleSpinTradeYesNoInput(u8 taskId) { switch (Menu_ProcessInputNoWrapClearOnChoose()) @@ -4941,7 +4895,7 @@ static void CursorCb_FieldMove(u8 taskId) PartyMenuRemoveWindow(&sPartyMenuInternal->windowId[0]); PartyMenuRemoveWindow(&sPartyMenuInternal->windowId[1]); - if (sub_81221AC() == TRUE || InUnionRoom() == TRUE) //SKP + if (sub_81221AC() == TRUE || InUnionRoom() == TRUE) { if (fieldMove == FIELD_MOVE_MILK_DRINK || fieldMove == FIELD_MOVE_SOFT_BOILED) DisplayPartyMenuStdMessage(PARTY_MSG_CANT_USE_HERE); @@ -5174,7 +5128,7 @@ static void CreatePartyMonIconSpriteParameterized(u16 species, u32 pid, struct P { if (species != SPECIES_NONE) { - menuBox->monSpriteId = CreateMonIcon(species, MonIconSpriteCallback, menuBox->spriteCoords[0], menuBox->spriteCoords[1], 4, pid, handleDeoxys); + menuBox->monSpriteId = CreateMonIcon(species, SpriteCB_MonIcon, menuBox->spriteCoords[0], menuBox->spriteCoords[1], 4, pid, handleDeoxys); gSprites[menuBox->monSpriteId].oam.priority = priority; } } @@ -6973,9 +6927,9 @@ static const u8* GetFacilityCancelString(void) return gText_CancelChallenge; } -void ChooseMonForTradingBoard(u8 initArg, MainCallback callback) +void ChooseMonForTradingBoard(u8 menuType, MainCallback callback) { - InitPartyMenu(initArg, PARTY_LAYOUT_SINGLE, PARTY_ACTION_CHOOSE_MON, FALSE, PARTY_MSG_CHOOSE_MON, Task_HandleChooseMonInput, callback); + InitPartyMenu(menuType, PARTY_LAYOUT_SINGLE, PARTY_ACTION_CHOOSE_MON, FALSE, PARTY_MSG_CHOOSE_MON, Task_HandleChooseMonInput, callback); } void ChooseMonForMoveTutor(void) @@ -7082,20 +7036,21 @@ static bool8 TrySwitchInPokemon(void) return TRUE; } -//TODO -void sub_81B8C68(void) +void BufferBattlePartyCurrentOrder(void) { - sub_81B8C88(gBattlePartyCurrentOrder, sub_806D7EC()); + BufferBattlePartyOrder(gBattlePartyCurrentOrder, GetPlayerFlankId()); } -static void sub_81B8C88(u8 *partyBattleOrder, bool8 multiplayerFlag) +static void BufferBattlePartyOrder(u8 *partyBattleOrder, u8 flankId) { - u8 partyIndexes[PARTY_SIZE]; + u8 partyIds[PARTY_SIZE]; int i, j; if (IsMultiBattle() == TRUE) { - if (multiplayerFlag) + // Party ids are packed in 4 bits at a time + // i.e. the party id order below would be 0, 3, 5, 4, 2, 1, and the two parties would be 0,5,4 and 3,2,1 + if (flankId != 0) { partyBattleOrder[0] = 0 | (3 << 4); partyBattleOrder[1] = 5 | (4 << 4); @@ -7112,12 +7067,12 @@ static void sub_81B8C88(u8 *partyBattleOrder, bool8 multiplayerFlag) else if (IsDoubleBattle() == FALSE) { j = 1; - partyIndexes[0] = gBattlerPartyIndexes[GetBattlerAtPosition(B_POSITION_PLAYER_LEFT)]; + partyIds[0] = gBattlerPartyIndexes[GetBattlerAtPosition(B_POSITION_PLAYER_LEFT)]; for (i = 0; i < PARTY_SIZE; i++) { - if (i != partyIndexes[0]) + if (i != partyIds[0]) { - partyIndexes[j] = i; + partyIds[j] = i; j++; } } @@ -7125,28 +7080,28 @@ static void sub_81B8C88(u8 *partyBattleOrder, bool8 multiplayerFlag) else { j = 2; - partyIndexes[0] = gBattlerPartyIndexes[GetBattlerAtPosition(B_POSITION_PLAYER_LEFT)]; - partyIndexes[1] = gBattlerPartyIndexes[GetBattlerAtPosition(B_POSITION_PLAYER_RIGHT)]; + partyIds[0] = gBattlerPartyIndexes[GetBattlerAtPosition(B_POSITION_PLAYER_LEFT)]; + partyIds[1] = gBattlerPartyIndexes[GetBattlerAtPosition(B_POSITION_PLAYER_RIGHT)]; for (i = 0; i < PARTY_SIZE; i++) { - if (i != partyIndexes[0] && i != partyIndexes[1]) + if (i != partyIds[0] && i != partyIds[1]) { - partyIndexes[j] = i; + partyIds[j] = i; j++; } } } for (i = 0; i < (int)ARRAY_COUNT(gBattlePartyCurrentOrder); i++) - partyBattleOrder[i] = (partyIndexes[0 + (i * 2)] << 4) | partyIndexes[1 + (i * 2)]; + partyBattleOrder[i] = (partyIds[0 + (i * 2)] << 4) | partyIds[1 + (i * 2)]; } -//TODO -void sub_81B8D64(u8 battlerId, u8 multiplayerFlag) +void BufferBattlePartyCurrentOrderBySide(u8 battlerId, u8 flankId) { - sub_81B8D88(gBattleStruct->field_60[battlerId], multiplayerFlag, battlerId); + BufferBattlePartyOrderBySide(gBattleStruct->field_60[battlerId], flankId, battlerId); } -static void sub_81B8D88(u8 *ptr, bool8 multiplayerFlag, u8 battlerId) +// when GetBattlerSide(battlerId) == B_SIDE_PLAYER, this function is identical the one above +static void BufferBattlePartyOrderBySide(u8 *partyBattleOrder, u8 flankId, u8 battlerId) { u8 partyIndexes[PARTY_SIZE]; int i, j; @@ -7166,17 +7121,17 @@ static void sub_81B8D88(u8 *ptr, bool8 multiplayerFlag, u8 battlerId) if (IsMultiBattle() == TRUE) { - if (multiplayerFlag) + if (flankId != 0) { - ptr[0] = 0 | (3 << 4); - ptr[1] = 5 | (4 << 4); - ptr[2] = 2 | (1 << 4); + partyBattleOrder[0] = 0 | (3 << 4); + partyBattleOrder[1] = 5 | (4 << 4); + partyBattleOrder[2] = 2 | (1 << 4); } else { - ptr[0] = 3 | (0 << 4); - ptr[1] = 2 | (1 << 4); - ptr[2] = 5 | (4 << 4); + partyBattleOrder[0] = 3 | (0 << 4); + partyBattleOrder[1] = 2 | (1 << 4); + partyBattleOrder[2] = 5 | (4 << 4); } return; } @@ -7209,43 +7164,42 @@ static void sub_81B8D88(u8 *ptr, bool8 multiplayerFlag, u8 battlerId) } for (i = 0; i < 3; i++) - ptr[i] = (partyIndexes[0 + (i * 2)] << 4) | partyIndexes[1 + (i * 2)]; + partyBattleOrder[i] = (partyIndexes[0 + (i * 2)] << 4) | partyIndexes[1 + (i * 2)]; } -//TODO clean up -void SwitchPartyOrderLinkMulti(u8 battlerId, u8 slot, u8 arrayIndex) +void SwitchPartyOrderLinkMulti(u8 battlerId, u8 slot, u8 slot2) { - u8 possiblePartyIndexes[PARTY_SIZE]; - u8 slot2 = 0; + u8 partyIds[PARTY_SIZE]; + u8 tempSlot = 0; int i, j; - u8 *battleStructRelated; - u8 possiblePartyIndexBuffer; + u8 *partyBattleOrder; + u8 partyIdBuffer; if (IsMultiBattle()) { - battleStructRelated = gBattleStruct->field_60[battlerId]; + partyBattleOrder = gBattleStruct->field_60[battlerId]; for (i = j = 0; i < 3; j++, i++) { - possiblePartyIndexes[j] = battleStructRelated[i] >> 4; + partyIds[j] = partyBattleOrder[i] >> 4; j++; - possiblePartyIndexes[j] = battleStructRelated[i] & 0xF; + partyIds[j] = partyBattleOrder[i] & 0xF; } - possiblePartyIndexBuffer = possiblePartyIndexes[arrayIndex]; + partyIdBuffer = partyIds[slot2]; for (i = 0; i < PARTY_SIZE; i++) { - if (possiblePartyIndexes[i] == slot) + if (partyIds[i] == slot) { - slot2 = possiblePartyIndexes[i]; - possiblePartyIndexes[i] = possiblePartyIndexBuffer; + tempSlot = partyIds[i]; + partyIds[i] = partyIdBuffer; break; } } if (i != PARTY_SIZE) { - possiblePartyIndexes[arrayIndex] = slot2; - battleStructRelated[0] = (possiblePartyIndexes[0] << 4) | possiblePartyIndexes[1]; - battleStructRelated[1] = (possiblePartyIndexes[2] << 4) | possiblePartyIndexes[3]; - battleStructRelated[2] = (possiblePartyIndexes[4] << 4) | possiblePartyIndexes[5]; + partyIds[slot2] = tempSlot; + partyBattleOrder[0] = (partyIds[0] << 4) | partyIds[1]; + partyBattleOrder[1] = (partyIds[2] << 4) | partyIds[3]; + partyBattleOrder[2] = (partyIds[4] << 4) | partyIds[5]; } } } @@ -7355,7 +7309,6 @@ void ShowPartyMenuToShowcaseMultiBattleParty(void) #define tXPos data[0] -// set up multi party partner slide static void Task_InitMultiPartnerPartySlideIn(u8 taskId) { // The first slide step also sets the sprites offscreen diff --git a/src/pokemon.c b/src/pokemon.c index ea8dcf0ccd..a30e20ea23 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -5658,21 +5658,23 @@ void EvolutionRenameMon(struct Pokemon *mon, u16 oldSpecies, u16 newSpecies) SetMonData(mon, MON_DATA_NICKNAME, gSpeciesNames[newSpecies]); } -bool8 sub_806D7EC(void) +// The below two functions determine which side of a multi battle the trainer battles on +// 0 is the left (top in party menu), 1 is right (bottom in party menu) +u8 GetPlayerFlankId(void) { - bool8 retVal = FALSE; + u8 flankId = 0; switch (gLinkPlayers[GetMultiplayerId()].id) { case 0: case 3: - retVal = FALSE; + flankId = 0; break; case 1: case 2: - retVal = TRUE; + flankId = 1; break; } - return retVal; + return flankId; } u16 GetLinkTrainerFlankId(u8 linkPlayerId) diff --git a/src/pokemon_icon.c b/src/pokemon_icon.c index 0a758f8eec..70af9f956d 100644 --- a/src/pokemon_icon.c +++ b/src/pokemon_icon.c @@ -1184,7 +1184,7 @@ void FreeMonIconPalette(u16 species) FreeSpritePaletteByTag(gMonIconPaletteTable[palIndex].tag); } -void MonIconSpriteCallback(struct Sprite *sprite) +void SpriteCB_MonIcon(struct Sprite *sprite) { UpdateMonIconFrame(sprite); } diff --git a/src/trade.c b/src/trade.c index 004cffe713..909abe540e 100644 --- a/src/trade.c +++ b/src/trade.c @@ -481,7 +481,7 @@ static void CB2_CreateTradeMenu(void) { struct Pokemon *mon = &gPlayerParty[i]; sTradeMenuData->partySpriteIds[TRADE_PLAYER][i] = CreateMonIcon(GetMonData(mon, MON_DATA_SPECIES2), - MonIconSpriteCallback, + SpriteCB_MonIcon, (sTradeMonSpriteCoords[i][0] * 8) + 14, (sTradeMonSpriteCoords[i][1] * 8) - 12, 1, @@ -493,7 +493,7 @@ static void CB2_CreateTradeMenu(void) { struct Pokemon *mon = &gEnemyParty[i]; sTradeMenuData->partySpriteIds[TRADE_PARTNER][i] = CreateMonIcon(GetMonData(mon, MON_DATA_SPECIES2, NULL), - MonIconSpriteCallback, + SpriteCB_MonIcon, (sTradeMonSpriteCoords[i + PARTY_SIZE][0] * 8) + 14, (sTradeMonSpriteCoords[i + PARTY_SIZE][1] * 8) - 12, 1, @@ -668,7 +668,7 @@ static void CB2_ReturnToTradeMenu(void) { struct Pokemon *mon = &gPlayerParty[i]; sTradeMenuData->partySpriteIds[TRADE_PLAYER][i] = CreateMonIcon(GetMonData(mon, MON_DATA_SPECIES2, NULL), - MonIconSpriteCallback, + SpriteCB_MonIcon, (sTradeMonSpriteCoords[i][0] * 8) + 14, (sTradeMonSpriteCoords[i][1] * 8) - 12, 1, @@ -680,7 +680,7 @@ static void CB2_ReturnToTradeMenu(void) { struct Pokemon *mon = &gEnemyParty[i]; sTradeMenuData->partySpriteIds[TRADE_PARTNER][i] = CreateMonIcon(GetMonData(mon, MON_DATA_SPECIES2, NULL), - MonIconSpriteCallback, + SpriteCB_MonIcon, (sTradeMonSpriteCoords[i + PARTY_SIZE][0] * 8) + 14, (sTradeMonSpriteCoords[i + PARTY_SIZE][1] * 8) - 12, 1, @@ -1809,7 +1809,7 @@ static void DrawTradeMenuParty(u8 whichParty) gSprites[sTradeMenuData->partySpriteIds[0][partyIdx + (selectedMonParty * PARTY_SIZE)]].data[0] = 20; gSprites[sTradeMenuData->partySpriteIds[0][partyIdx + (selectedMonParty * PARTY_SIZE)]].data[2] = (sTradeMonSpriteCoords[selectedMonParty * PARTY_SIZE][0] + sTradeMonSpriteCoords[selectedMonParty * PARTY_SIZE + 1][0]) / 2 * 8 + 14; gSprites[sTradeMenuData->partySpriteIds[0][partyIdx + (selectedMonParty * PARTY_SIZE)]].data[4] = (sTradeMonSpriteCoords[selectedMonParty * PARTY_SIZE][1] * 8) - 12; - StoreSpriteCallbackInData6(&gSprites[sTradeMenuData->partySpriteIds[0][partyIdx + (selectedMonParty * PARTY_SIZE)]], MonIconSpriteCallback); + StoreSpriteCallbackInData6(&gSprites[sTradeMenuData->partySpriteIds[0][partyIdx + (selectedMonParty * PARTY_SIZE)]], SpriteCB_MonIcon); sTradeMenuData->drawPartyState[whichParty]++; TradeMenuBouncePartySprites(&gSprites[sTradeMenuData->partySpriteIds[0][partyIdx + (selectedMonParty * PARTY_SIZE)]]); CopyToBgTilemapBufferRect_ChangePalette(1, sTradePartyBoxTilemap, whichParty * 15, 0, 15, 17, 0); @@ -1820,7 +1820,7 @@ static void DrawTradeMenuParty(u8 whichParty) PrintNicknamesForTradeMenu(); break; case 2: - if (gSprites[sTradeMenuData->partySpriteIds[0][partyIdx + (selectedMonParty * PARTY_SIZE)]].callback == MonIconSpriteCallback) + if (gSprites[sTradeMenuData->partySpriteIds[0][partyIdx + (selectedMonParty * PARTY_SIZE)]].callback == SpriteCB_MonIcon) sTradeMenuData->drawPartyState[whichParty] = 3; break; case 3: From b33db9b96cda2f03d10b9bfeec4e6ac8bc90da13 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Thu, 31 Oct 2019 14:16:43 -0400 Subject: [PATCH 37/46] Move party menu data --- src/data/party_menu.h | 1255 ++++++++++++++++++++++++++++++++++++++++ src/party_menu.c | 1257 +---------------------------------------- 2 files changed, 1256 insertions(+), 1256 deletions(-) create mode 100644 src/data/party_menu.h diff --git a/src/data/party_menu.h b/src/data/party_menu.h new file mode 100644 index 0000000000..6af8ee2a6b --- /dev/null +++ b/src/data/party_menu.h @@ -0,0 +1,1255 @@ +static const struct BgTemplate sPartyMenuBgTemplates[] = +{ + { + .bg = 0, + .charBaseIndex = 0, + .mapBaseIndex = 31, + .screenSize = 0, + .paletteMode = 0, + .priority = 1, + .baseTile = 0 + }, + { + .bg = 1, + .charBaseIndex = 0, + .mapBaseIndex = 30, + .screenSize = 0, + .paletteMode = 0, + .priority = 2, + .baseTile = 0 + }, + { + .bg = 2, + .charBaseIndex = 0, + .mapBaseIndex = 28, + .screenSize = 1, + .paletteMode = 0, + .priority = 0, + .baseTile = 0 + }, +}; + +enum +{ + PARTY_BOX_LEFT_COLUMN, + PARTY_BOX_RIGHT_COLUMN +}; + +static const struct PartyMenuBoxInfoRects sPartyBoxInfoRects[] = +{ + [PARTY_BOX_LEFT_COLUMN] = + { + BlitBitmapToPartyWindow_LeftColumn, + { + //The below are the x, y, width, and height for each of the following info + 24, 11, 40, 13, // Nickname + 32, 20, 32, 8, // Level + 64, 20, 8, 8, // Gender + 38, 37, 24, 8, // HP + 53, 37, 24, 8, // Max HP + 24, 35, 48, 3 // HP bar + }, + 12, 34, 64, 16 // Description text (e.g. NO USE) + }, + [PARTY_BOX_RIGHT_COLUMN] = + { + BlitBitmapToPartyWindow_RightColumn, + { + // See above comment + 22, 3, 40, 13, // Nickname + 30, 12, 32, 8, // Level + 62, 12, 8, 8, // Gender + 102, 12, 24, 8, // HP + 117, 12, 24, 8, // Max HP + 88, 10, 48, 3 // HP bar + }, + 77, 4, 64, 16 // Description text + }, +}; + + +// Each layout array has an array for each of the 6 party slots +// The array for each slot has the sprite coords of its various sprites in the following order +// Pokemon icon (x, y), held item (x, y), status condition (x, y), menu pokeball (x, y) +static const u8 sPartyMenuSpriteCoords[PARTY_LAYOUT_COUNT][PARTY_SIZE][4 * 2] = +{ + [PARTY_LAYOUT_SINGLE] = + { + { 16, 40, 20, 50, 50, 52, 16, 34}, + {104, 18, 108, 28, 136, 27, 102, 25}, + {104, 42, 108, 52, 136, 51, 102, 49}, + {104, 66, 108, 76, 136, 75, 102, 73}, + {104, 90, 108, 100, 136, 99, 102, 97}, + {104, 114, 108, 124, 136, 123, 102, 121}, + }, + [PARTY_LAYOUT_DOUBLE] = + { + {16, 24, 20, 34, 50, 36, 16, 18}, + {16, 80, 20, 90, 50, 92, 16, 74}, + {104, 18, 108, 28, 136, 27, 102, 25}, + {104, 50, 108, 60, 136, 59, 102, 57}, + {104, 82, 108, 92, 136, 91, 102, 89}, + {104, 114, 108, 124, 136, 123, 102, 121}, + }, + [PARTY_LAYOUT_MULTI] = + { + {16, 24, 20, 34, 50, 36, 16, 18}, + {16, 80, 20, 90, 50, 92, 16, 74}, + {104, 26, 106, 36, 136, 35, 102, 33}, + {104, 50, 106, 60, 136, 59, 102, 57}, + {104, 82, 106, 92, 136, 91, 102, 89}, + {104, 106, 106, 116, 136, 115, 102, 113}, + }, + [PARTY_LAYOUT_MULTI_SHOWCASE] = + { + {16, 32, 20, 42, 50, 44, 16, 26}, + {104, 34, 106, 44, 136, 43, 102, 41}, + {104, 58, 106, 68, 136, 67, 102, 65}, + {16, 104, 20, 114, 50, 116, 16, 98}, + {104, 106, 106, 116, 136, 115, 102, 113}, + {104, 130, 106, 140, 136, 139, 102, 137}, + }, +}; + +// Used only when both Cancel and Confirm are present +static const u32 sConfirmButton_Tilemap[] = INCBIN_U32("graphics/interface/party_menu_confirm_button.bin"); +static const u32 sCancelButton_Tilemap[] = INCBIN_U32("graphics/interface/party_menu_cancel_button.bin"); + +// Text colors for BG, FG, and Shadow in that order +static const u8 sFontColorTable[][3] = +{ + {TEXT_COLOR_TRANSPARENT, TEXT_COLOR_LIGHT_GREY, TEXT_COLOR_DARK_GREY}, // Default + {TEXT_COLOR_TRANSPARENT, TEXT_COLOR_WHITE, TEXT_COLOR_GREEN}, // Unused + {TEXT_COLOR_TRANSPARENT, TEXT_DYNAMIC_COLOR_2, TEXT_DYNAMIC_COLOR_3}, // Gender symbol + {TEXT_COLOR_WHITE, TEXT_COLOR_DARK_GREY, TEXT_COLOR_LIGHT_GREY}, // Selection actions + {TEXT_COLOR_WHITE, TEXT_COLOR_BLUE, TEXT_COLOR_LIGHT_BLUE}, // Field moves + {TEXT_COLOR_TRANSPARENT, TEXT_COLOR_WHITE, TEXT_COLOR_DARK_GREY}, // Unused +}; + +static const struct WindowTemplate sSinglePartyMenuWindowTemplate[] = +{ + { + .bg = 0, + .tilemapLeft = 1, + .tilemapTop = 3, + .width = 10, + .height = 7, + .paletteNum = 3, + .baseBlock = 0x63, + }, + { + .bg = 0, + .tilemapLeft = 12, + .tilemapTop = 1, + .width = 18, + .height = 3, + .paletteNum = 4, + .baseBlock = 0xA9, + }, + { + .bg = 0, + .tilemapLeft = 12, + .tilemapTop = 4, + .width = 18, + .height = 3, + .paletteNum = 5, + .baseBlock = 0xDF, + }, + { + .bg = 0, + .tilemapLeft = 12, + .tilemapTop = 7, + .width = 18, + .height = 3, + .paletteNum = 6, + .baseBlock = 0x115, + }, + { + .bg = 0, + .tilemapLeft = 12, + .tilemapTop = 10, + .width = 18, + .height = 3, + .paletteNum = 7, + .baseBlock = 0x14B, + }, + { + .bg = 0, + .tilemapLeft = 12, + .tilemapTop = 13, + .width = 18, + .height = 3, + .paletteNum = 8, + .baseBlock = 0x181, + }, + { + .bg = 2, + .tilemapLeft = 1, + .tilemapTop = 15, + .width = 28, + .height = 4, + .paletteNum = 14, + .baseBlock = 0x1DF, + }, + DUMMY_WIN_TEMPLATE +}; + +static const struct WindowTemplate sDoublePartyMenuWindowTemplate[] = +{ + { + .bg = 0, + .tilemapLeft = 1, + .tilemapTop = 1, + .width = 10, + .height = 7, + .paletteNum = 3, + .baseBlock = 0x63, + }, + { + .bg = 0, + .tilemapLeft = 1, + .tilemapTop = 8, + .width = 10, + .height = 7, + .paletteNum = 4, + .baseBlock = 0xA9, + }, + { + .bg = 0, + .tilemapLeft = 12, + .tilemapTop = 1, + .width = 18, + .height = 3, + .paletteNum = 5, + .baseBlock = 0xEF, + }, + { + .bg = 0, + .tilemapLeft = 12, + .tilemapTop = 5, + .width = 18, + .height = 3, + .paletteNum = 6, + .baseBlock = 0x125, + }, + { + .bg = 0, + .tilemapLeft = 12, + .tilemapTop = 9, + .width = 18, + .height = 3, + .paletteNum = 7, + .baseBlock = 0x15B, + }, + { + .bg = 0, + .tilemapLeft = 12, + .tilemapTop = 13, + .width = 18, + .height = 3, + .paletteNum = 8, + .baseBlock = 0x191, + }, + { + .bg = 2, + .tilemapLeft = 1, + .tilemapTop = 15, + .width = 28, + .height = 4, + .paletteNum = 14, + .baseBlock = 0x1DF, + }, + DUMMY_WIN_TEMPLATE +}; + +static const struct WindowTemplate sMultiPartyMenuWindowTemplate[] = +{ + { + .bg = 0, + .tilemapLeft = 1, + .tilemapTop = 1, + .width = 10, + .height = 7, + .paletteNum = 3, + .baseBlock = 0x63, + }, + { + .bg = 0, + .tilemapLeft = 1, + .tilemapTop = 8, + .width = 10, + .height = 7, + .paletteNum = 4, + .baseBlock = 0xA9, + }, + { + .bg = 0, + .tilemapLeft = 12, + .tilemapTop = 2, + .width = 18, + .height = 3, + .paletteNum = 5, + .baseBlock = 0xEF, + }, + { + .bg = 0, + .tilemapLeft = 12, + .tilemapTop = 5, + .width = 18, + .height = 3, + .paletteNum = 6, + .baseBlock = 0x125, + }, + { + .bg = 0, + .tilemapLeft = 12, + .tilemapTop = 9, + .width = 18, + .height = 3, + .paletteNum = 7, + .baseBlock = 0x15B, + }, + { + .bg = 0, + .tilemapLeft = 12, + .tilemapTop = 12, + .width = 18, + .height = 3, + .paletteNum = 8, + .baseBlock = 0x191, + }, + { + .bg = 2, + .tilemapLeft = 1, + .tilemapTop = 15, + .width = 28, + .height = 4, + .paletteNum = 14, + .baseBlock = 0x1DF, + }, + DUMMY_WIN_TEMPLATE +}; + +static const struct WindowTemplate sShowcaseMultiPartyMenuWindowTemplate[] = +{ + { + .bg = 0, + .tilemapLeft = 1, + .tilemapTop = 2, + .width = 10, + .height = 7, + .paletteNum = 3, + .baseBlock = 0x63, + }, + { + .bg = 0, + .tilemapLeft = 12, + .tilemapTop = 3, + .width = 18, + .height = 3, + .paletteNum = 5, + .baseBlock = 0xA9, + }, + { + .bg = 0, + .tilemapLeft = 12, + .tilemapTop = 6, + .width = 18, + .height = 3, + .paletteNum = 6, + .baseBlock = 0xDF, + }, + { + .bg = 2, + .tilemapLeft = 1, + .tilemapTop = 11, + .width = 10, + .height = 7, + .paletteNum = 4, + .baseBlock = 0x115, + }, + { + .bg = 2, + .tilemapLeft = 12, + .tilemapTop = 12, + .width = 18, + .height = 3, + .paletteNum = 7, + .baseBlock = 0x16B, + }, + { + .bg = 2, + .tilemapLeft = 12, + .tilemapTop = 15, + .width = 18, + .height = 3, + .paletteNum = 8, + .baseBlock = 0x1A1, + }, + DUMMY_WIN_TEMPLATE +}; + +static const struct WindowTemplate sCancelButtonWindowTemplate = +{ + .bg = 0, + .tilemapLeft = 24, + .tilemapTop = 17, + .width = 6, + .height = 2, + .paletteNum = 3, + .baseBlock = 0x1C7, +}; + +static const struct WindowTemplate sMultiCancelButtonWindowTemplate = +{ + .bg = 0, + .tilemapLeft = 24, + .tilemapTop = 18, + .width = 6, + .height = 2, + .paletteNum = 3, + .baseBlock = 0x1C7, +}; + +static const struct WindowTemplate sConfirmButtonWindowTemplate = +{ + .bg = 0, + .tilemapLeft = 24, + .tilemapTop = 16, + .width = 6, + .height = 2, + .paletteNum = 3, + .baseBlock = 0x1D3, +}; + +static const struct WindowTemplate sDefaultPartyMsgWindowTemplate = +{ + .bg = 2, + .tilemapLeft = 1, + .tilemapTop = 17, + .width = 21, + .height = 2, + .paletteNum = 15, + .baseBlock = 0x24F, +}; + +static const struct WindowTemplate sDoWhatWithMonMsgWindowTemplate = +{ + .bg = 2, + .tilemapLeft = 1, + .tilemapTop = 17, + .width = 16, + .height = 2, + .paletteNum = 15, + .baseBlock = 0x279, +}; + +static const struct WindowTemplate sDoWhatWithItemMsgWindowTemplate = +{ + .bg = 2, + .tilemapLeft = 1, + .tilemapTop = 17, + .width = 20, + .height = 2, + .paletteNum = 15, + .baseBlock = 0x299, +}; + +static const struct WindowTemplate sDoWhatWithMailMsgWindowTemplate = +{ + .bg = 2, + .tilemapLeft = 1, + .tilemapTop = 17, + .width = 18, + .height = 2, + .paletteNum = 15, + .baseBlock = 0x299, +}; + +static const struct WindowTemplate sWhichMoveMsgWindowTemplate = +{ + .bg = 2, + .tilemapLeft = 1, + .tilemapTop = 17, + .width = 16, + .height = 2, + .paletteNum = 15, + .baseBlock = 0x299, +}; + +static const struct WindowTemplate sAlreadyHoldingOneMsgWindowTemplate = +{ + .bg = 2, + .tilemapLeft = 1, + .tilemapTop = 15, + .width = 20, + .height = 4, + .paletteNum = 15, + .baseBlock = 0x299, +}; + +static const struct WindowTemplate sItemGiveTakeWindowTemplate = +{ + .bg = 2, + .tilemapLeft = 23, + .tilemapTop = 13, + .width = 6, + .height = 6, + .paletteNum = 14, + .baseBlock = 0x39D, +}; + +static const struct WindowTemplate sMailReadTakeWindowTemplate = +{ + .bg = 2, + .tilemapLeft = 21, + .tilemapTop = 13, + .width = 8, + .height = 6, + .paletteNum = 14, + .baseBlock = 0x39D, +}; + +static const struct WindowTemplate sMoveSelectWindowTemplate = +{ + .bg = 2, + .tilemapLeft = 19, + .tilemapTop = 11, + .width = 10, + .height = 8, + .paletteNum = 14, + .baseBlock = 0x2E9, +}; + +static const struct WindowTemplate sPartyMenuYesNoWindowTemplate = +{ + .bg = 2, + .tilemapLeft = 21, + .tilemapTop = 9, + .width = 5, + .height = 4, + .paletteNum = 14, + .baseBlock = 0x2E9, +}; + +static const struct WindowTemplate sLevelUpStatsWindowTemplate = +{ + .bg = 2, + .tilemapLeft = 19, + .tilemapTop = 1, + .width = 10, + .height = 11, + .paletteNum = 14, + .baseBlock = 0x2E9, +}; + +static const struct WindowTemplate sUnusedWindowTemplate_08615978 = +{ + .bg = 2, + .tilemapLeft = 2, + .tilemapTop = 15, + .width = 27, + .height = 4, + .paletteNum = 14, + .baseBlock = 0x1DF, +}; + +static const struct WindowTemplate sUnusedWindowTemplate_08615980 = +{ + .bg = 2, + .tilemapLeft = 0, + .tilemapTop = 13, + .width = 18, + .height = 3, + .paletteNum = 12, + .baseBlock = 0x39D, +}; + +// Tile nums +static const u8 sMainSlotTileNums[] = {24, 25, 25, 25, 25, 25, 25, 25, 25, 26, + 32, 33, 33, 33, 33, 33, 33, 33, 33, 34, + 32, 33, 33, 33, 33, 33, 33, 33, 33, 34, + 32, 33, 33, 33, 33, 33, 33, 33, 33, 34, + 40, 59, 60, 58, 58, 58, 58, 58, 58, 61, + 15, 16, 16, 16, 16, 16, 16, 16, 16, 17, + 46, 47, 47, 47, 47, 47, 47, 47, 47, 48}; + +static const u8 sMainSlotTileNums_Egg[] = {24, 25, 25, 25, 25, 25, 25, 25, 25, 26, + 32, 33, 33, 33, 33, 33, 33, 33, 33, 34, + 32, 33, 33, 33, 33, 33, 33, 33, 33, 34, + 32, 33, 33, 33, 33, 33, 33, 33, 33, 34, + 40, 41, 41, 41, 41, 41, 41, 41, 41, 42, + 15, 16, 16, 16, 16, 16, 16, 16, 16, 17, + 46, 47, 47, 47, 47, 47, 47, 47, 47, 48}; + +static const u8 sOtherSlotsTileNums[] = {43, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 45, + 49, 33, 33, 33, 33, 33, 33, 33, 33, 52, 53, 51, 51, 51, 51, 51, 51, 54, + 55, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 57}; + +static const u8 sOtherSlotsTileNums_Egg[] = {43, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 45, + 49, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 50, + 55, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 57}; + +static const u8 sEmptySlotTileNums[] = {21, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 23, + 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, + 37, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 39}; + +// Palette offsets +static const u8 sGenderPalOffsets[] = {11, 12}; +static const u8 sHPBarPalOffsets[] = {9, 10}; +static const u8 sPartyBoxPalOffsets1[] = {4, 5, 6}; +static const u8 sPartyBoxPalOffsets2[] = {1, 7, 8}; +static const u8 sPartyBoxNoMonPalOffsets[] = {1, 11, 12}; + +// Palette ids +static const u8 sGenderMalePalIds[] = {59, 60}; +static const u8 sGenderFemalePalIds[] = {75, 76}; +static const u8 sHPBarGreenPalIds[] = {57, 58}; +static const u8 sHPBarYellowPalIds[] = {73, 74}; +static const u8 sHPBarRedPalIds[] = {89, 90}; +static const u8 sPartyBoxEmptySlotPalIds1[] = {52, 53, 54}; +static const u8 sPartyBoxMultiPalIds1[] = {68, 69, 70}; +static const u8 sPartyBoxFaintedPalIds1[] = {84, 85, 86}; +static const u8 sPartyBoxCurrSelectionPalIds1[] = {116, 117, 118}; +static const u8 sPartyBoxCurrSelectionMultiPalIds[] = {132, 133, 134}; +static const u8 sPartyBoxCurrSelectionFaintedPalIds[] = {148, 149, 150}; +static const u8 sPartyBoxSelectedForActionPalIds1[] = {100, 101, 102}; +static const u8 sPartyBoxEmptySlotPalIds2[] = {49, 55, 56}; +static const u8 sPartyBoxMultiPalIds2[] = {65, 71, 72}; +static const u8 sPartyBoxFaintedPalIds2[] = {81, 87, 88}; +static const u8 sPartyBoxCurrSelectionPalIds2[] = {97, 103, 104}; +static const u8 sPartyBoxSelectedForActionPalIds2[] = {161, 167, 168}; +static const u8 sPartyBoxNoMonPalIds[] = {17, 27, 28}; + +static const u8 *const sActionStringTable[] = +{ + [PARTY_MSG_CHOOSE_MON] = gText_ChoosePokemon, + [PARTY_MSG_CHOOSE_MON_OR_CANCEL] = gText_ChoosePokemonCancel, + [PARTY_MSG_CHOOSE_MON_AND_CONFIRM] = gText_ChoosePokemonConfirm, + [PARTY_MSG_MOVE_TO_WHERE] = gText_MoveToWhere, + [PARTY_MSG_TEACH_WHICH_MON] = gText_TeachWhichPokemon, + [PARTY_MSG_USE_ON_WHICH_MON] = gText_UseOnWhichPokemon, + [PARTY_MSG_GIVE_TO_WHICH_MON] = gText_GiveToWhichPokemon, + [PARTY_MSG_NOTHING_TO_CUT] = gText_NothingToCut, + [PARTY_MSG_CANT_SURF_HERE] = gText_CantSurfHere, + [PARTY_MSG_ALREADY_SURFING] = gText_AlreadySurfing, + [PARTY_MSG_CURRENT_TOO_FAST] = gText_CurrentIsTooFast, + [PARTY_MSG_ENJOY_CYCLING] = gText_EnjoyCycling, + [PARTY_MSG_ALREADY_IN_USE] = gText_InUseAlready_PM, + [PARTY_MSG_CANT_USE_HERE] = gText_CantUseHere, + [PARTY_MSG_NO_MON_FOR_BATTLE] = gText_NoPokemonForBattle, + [PARTY_MSG_CHOOSE_MON_2] = gText_ChoosePokemon2, + [PARTY_MSG_NOT_ENOUGH_HP] = gText_NotEnoughHp, + [PARTY_MSG_X_MONS_ARE_NEEDED] = gText_PokemonAreNeeded, + [PARTY_MSG_MONS_CANT_BE_SAME] = gText_PokemonCantBeSame, + [PARTY_MSG_NO_SAME_HOLD_ITEMS] = gText_NoIdenticalHoldItems, + [PARTY_MSG_UNUSED] = gText_EmptyString2, + [PARTY_MSG_DO_WHAT_WITH_MON] = gText_DoWhatWithPokemon, + [PARTY_MSG_RESTORE_WHICH_MOVE] = gText_RestoreWhichMove, + [PARTY_MSG_BOOST_PP_WHICH_MOVE] = gText_BoostPp, + [PARTY_MSG_DO_WHAT_WITH_ITEM] = gText_DoWhatWithItem, + [PARTY_MSG_DO_WHAT_WITH_MAIL] = gText_DoWhatWithMail, + [PARTY_MSG_ALREADY_HOLDING_ONE] = gText_AlreadyHoldingOne, +}; + +static const u8 *const sDescriptionStringTable[] = +{ + [PARTYBOX_DESC_NO_USE] = gText_NoUse, + [PARTYBOX_DESC_ABLE_3] = gText_Able, + [PARTYBOX_DESC_FIRST] = gText_First_PM, + [PARTYBOX_DESC_SECOND] = gText_Second_PM, + [PARTYBOX_DESC_THIRD] = gText_Third_PM, + [PARTYBOX_DESC_FOURTH] = gText_Fourth, + [PARTYBOX_DESC_ABLE] = gText_Able2, + [PARTYBOX_DESC_NOT_ABLE] = gText_NotAble, + [PARTYBOX_DESC_ABLE_2] = gText_Able3, + [PARTYBOX_DESC_NOT_ABLE_2] = gText_NotAble2, + [PARTYBOX_DESC_LEARNED] = gText_Learned, + [PARTYBOX_DESC_HAVE] = gText_Have, + [PARTYBOX_DESC_DONT_HAVE] = gText_DontHave, +}; + +static const u16 sUnused_08615B94[] = +{ + 0x0108, 0x0151, 0x0160, 0x015b, 0x002e, 0x005c, 0x0102, 0x0153, 0x014b, 0x00ed, 0x00f1, 0x010d, 0x003a, 0x003b, 0x003f, 0x0071, + 0x00b6, 0x00f0, 0x00ca, 0x00db, 0x00da, 0x004c, 0x00e7, 0x0055, 0x0057, 0x0059, 0x00d8, 0x005b, 0x005e, 0x00f7, 0x0118, 0x0068, + 0x0073, 0x015f, 0x0035, 0x00bc, 0x00c9, 0x007e, 0x013d, 0x014c, 0x0103, 0x0107, 0x0122, 0x009c, 0x00d5, 0x00a8, 0x00d3, 0x011d, + 0x0121, 0x013b, 0x000f, 0x0013, 0x0039, 0x0046, 0x0094, 0x00f9, 0x007f, 0x0123, +}; + +enum +{ + MENU_SUMMARY, + MENU_SWITCH, + MENU_CANCEL1, + MENU_ITEM, + MENU_GIVE, + MENU_TAKE_ITEM, + MENU_MAIL, + MENU_TAKE_MAIL, + MENU_READ, + MENU_CANCEL2, + MENU_SHIFT, + MENU_SEND_OUT, + MENU_ENTER, + MENU_NO_ENTRY, + MENU_STORE, + MENU_REGISTER, + MENU_TRADE1, + MENU_TRADE2, + MENU_TOSS, + MENU_FIELD_MOVES, +}; + +enum +{ + FIELD_MOVE_CUT, + FIELD_MOVE_FLASH, + FIELD_MOVE_ROCK_SMASH, + FIELD_MOVE_STRENGTH, + FIELD_MOVE_SURF, + FIELD_MOVE_FLY, + FIELD_MOVE_DIVE, + FIELD_MOVE_WATERFALL, + FIELD_MOVE_TELEPORT, + FIELD_MOVE_DIG, + FIELD_MOVE_SECRET_POWER, + FIELD_MOVE_MILK_DRINK, + FIELD_MOVE_SOFT_BOILED, + FIELD_MOVE_SWEET_SCENT, +}; + +// What a weird choice of table termination; +#define FIELD_MOVE_TERMINATOR MOVE_SWORDS_DANCE + +struct +{ + const u8 *text; + TaskFunc func; +} static const sCursorOptions[] = +{ + [MENU_SUMMARY] = {gText_Summary5, CursorCb_Summary}, + [MENU_SWITCH] = {gText_Switch2, CursorCb_Switch}, + [MENU_CANCEL1] = {gText_Cancel2, CursorCb_Cancel1}, + [MENU_ITEM] = {gText_Item, CursorCb_Item}, + [MENU_GIVE] = {gMenuText_Give, CursorCb_Give}, + [MENU_TAKE_ITEM] = {gText_Take, CursorCb_TakeItem}, + [MENU_MAIL] = {gText_Mail, CursorCb_Mail}, + [MENU_TAKE_MAIL] = {gText_Take2, CursorCb_TakeMail}, + [MENU_READ] = {gText_Read2, CursorCb_Read}, + [MENU_CANCEL2] = {gText_Cancel2, CursorCb_Cancel2}, + [MENU_SHIFT] = {gText_Shift, CursorCb_SendMon}, + [MENU_SEND_OUT] = {gText_SendOut, CursorCb_SendMon}, + [MENU_ENTER] = {gText_Enter, CursorCb_Enter}, + [MENU_NO_ENTRY] = {gText_NoEntry, CursorCb_NoEntry}, + [MENU_STORE] = {gText_Store, CursorCb_Store}, + [MENU_REGISTER] = {gText_Register, CursorCb_Register}, + [MENU_TRADE1] = {gText_Trade4, CursorCb_Trade1}, + [MENU_TRADE2] = {gText_Trade4, CursorCb_Trade2}, + [MENU_TOSS] = {gMenuText_Toss, CursorCb_Toss}, + [MENU_FIELD_MOVES + FIELD_MOVE_CUT] = {gMoveNames[MOVE_CUT], CursorCb_FieldMove}, + [MENU_FIELD_MOVES + FIELD_MOVE_FLASH] = {gMoveNames[MOVE_FLASH], CursorCb_FieldMove}, + [MENU_FIELD_MOVES + FIELD_MOVE_ROCK_SMASH] = {gMoveNames[MOVE_ROCK_SMASH], CursorCb_FieldMove}, + [MENU_FIELD_MOVES + FIELD_MOVE_STRENGTH] = {gMoveNames[MOVE_STRENGTH], CursorCb_FieldMove}, + [MENU_FIELD_MOVES + FIELD_MOVE_SURF] = {gMoveNames[MOVE_SURF], CursorCb_FieldMove}, + [MENU_FIELD_MOVES + FIELD_MOVE_FLY] = {gMoveNames[MOVE_FLY], CursorCb_FieldMove}, + [MENU_FIELD_MOVES + FIELD_MOVE_DIVE] = {gMoveNames[MOVE_DIVE], CursorCb_FieldMove}, + [MENU_FIELD_MOVES + FIELD_MOVE_WATERFALL] = {gMoveNames[MOVE_WATERFALL], CursorCb_FieldMove}, + [MENU_FIELD_MOVES + FIELD_MOVE_TELEPORT] = {gMoveNames[MOVE_TELEPORT], CursorCb_FieldMove}, + [MENU_FIELD_MOVES + FIELD_MOVE_DIG] = {gMoveNames[MOVE_DIG], CursorCb_FieldMove}, + [MENU_FIELD_MOVES + FIELD_MOVE_SECRET_POWER] = {gMoveNames[MOVE_SECRET_POWER], CursorCb_FieldMove}, + [MENU_FIELD_MOVES + FIELD_MOVE_MILK_DRINK] = {gMoveNames[MOVE_MILK_DRINK], CursorCb_FieldMove}, + [MENU_FIELD_MOVES + FIELD_MOVE_SOFT_BOILED] = {gMoveNames[MOVE_SOFT_BOILED], CursorCb_FieldMove}, + [MENU_FIELD_MOVES + FIELD_MOVE_SWEET_SCENT] = {gMoveNames[MOVE_SWEET_SCENT], CursorCb_FieldMove}, +}; + +static const u8 sPartyMenuAction_SummarySwitchCancel[] = {MENU_SUMMARY, MENU_SWITCH, MENU_CANCEL1}; +static const u8 sPartyMenuAction_ShiftSummaryCancel[] = {MENU_SHIFT, MENU_SUMMARY, MENU_CANCEL1}; +static const u8 sPartyMenuAction_SendOutSummaryCancel[] = {MENU_SEND_OUT, MENU_SUMMARY, MENU_CANCEL1}; +static const u8 sPartyMenuAction_SummaryCancel[] = {MENU_SUMMARY, MENU_CANCEL1}; +static const u8 sPartyMenuAction_EnterSummaryCancel[] = {MENU_ENTER, MENU_SUMMARY, MENU_CANCEL1}; +static const u8 sPartyMenuAction_NoEntrySummaryCancel[] = {MENU_NO_ENTRY, MENU_SUMMARY, MENU_CANCEL1}; +static const u8 sPartyMenuAction_StoreSummaryCancel[] = {MENU_STORE, MENU_SUMMARY, MENU_CANCEL1}; +static const u8 sPartyMenuAction_GiveTakeItemCancel[] = {MENU_GIVE, MENU_TAKE_ITEM, MENU_CANCEL2}; +static const u8 sPartyMenuAction_ReadTakeMailCancel[] = {MENU_READ, MENU_TAKE_MAIL, MENU_CANCEL2}; +static const u8 sPartyMenuAction_RegisterSummaryCancel[] = {MENU_REGISTER, MENU_SUMMARY, MENU_CANCEL1}; +static const u8 sPartyMenuAction_TradeSummaryCancel1[] = {MENU_TRADE1, MENU_SUMMARY, MENU_CANCEL1}; +static const u8 sPartyMenuAction_TradeSummaryCancel2[] = {MENU_TRADE2, MENU_SUMMARY, MENU_CANCEL1}; +static const u8 sPartyMenuAction_TakeItemTossCancel[] = {MENU_TAKE_ITEM, MENU_TOSS, MENU_CANCEL1}; + +// IDs for the action lists that appear when a party mon is selected +enum +{ + ACTIONS_NONE, + ACTIONS_SWITCH, + ACTIONS_SHIFT, + ACTIONS_SEND_OUT, + ACTIONS_ENTER, + ACTIONS_NO_ENTRY, + ACTIONS_STORE, + ACTIONS_SUMMARY_ONLY, + ACTIONS_ITEM, + ACTIONS_MAIL, + ACTIONS_REGISTER, + ACTIONS_TRADE, + ACTIONS_SPIN_TRADE, + ACTIONS_TAKEITEM_TOSS +}; + +static const u8 *const sPartyMenuActions[] = +{ + [ACTIONS_NONE] = NULL, + [ACTIONS_SWITCH] = sPartyMenuAction_SummarySwitchCancel, + [ACTIONS_SHIFT] = sPartyMenuAction_ShiftSummaryCancel, + [ACTIONS_SEND_OUT] = sPartyMenuAction_SendOutSummaryCancel, + [ACTIONS_ENTER] = sPartyMenuAction_EnterSummaryCancel, + [ACTIONS_NO_ENTRY] = sPartyMenuAction_NoEntrySummaryCancel, + [ACTIONS_STORE] = sPartyMenuAction_StoreSummaryCancel, + [ACTIONS_SUMMARY_ONLY] = sPartyMenuAction_SummaryCancel, + [ACTIONS_ITEM] = sPartyMenuAction_GiveTakeItemCancel, + [ACTIONS_MAIL] = sPartyMenuAction_ReadTakeMailCancel, + [ACTIONS_REGISTER] = sPartyMenuAction_RegisterSummaryCancel, + [ACTIONS_TRADE] = sPartyMenuAction_TradeSummaryCancel1, + [ACTIONS_SPIN_TRADE] = sPartyMenuAction_TradeSummaryCancel2, + [ACTIONS_TAKEITEM_TOSS] = sPartyMenuAction_TakeItemTossCancel, +}; + +static const u8 sPartyMenuActionCounts[] = +{ + [ACTIONS_NONE] = 0, + [ACTIONS_SWITCH] = ARRAY_COUNT(sPartyMenuAction_SummarySwitchCancel), + [ACTIONS_SHIFT] = ARRAY_COUNT(sPartyMenuAction_ShiftSummaryCancel), + [ACTIONS_SEND_OUT] = ARRAY_COUNT(sPartyMenuAction_SendOutSummaryCancel), + [ACTIONS_ENTER] = ARRAY_COUNT(sPartyMenuAction_EnterSummaryCancel), + [ACTIONS_NO_ENTRY] = ARRAY_COUNT(sPartyMenuAction_NoEntrySummaryCancel), + [ACTIONS_STORE] = ARRAY_COUNT(sPartyMenuAction_StoreSummaryCancel), + [ACTIONS_SUMMARY_ONLY] = ARRAY_COUNT(sPartyMenuAction_SummaryCancel), + [ACTIONS_ITEM] = ARRAY_COUNT(sPartyMenuAction_GiveTakeItemCancel), + [ACTIONS_MAIL] = ARRAY_COUNT(sPartyMenuAction_ReadTakeMailCancel), + [ACTIONS_REGISTER] = ARRAY_COUNT(sPartyMenuAction_RegisterSummaryCancel), + [ACTIONS_TRADE] = ARRAY_COUNT(sPartyMenuAction_TradeSummaryCancel1), + [ACTIONS_SPIN_TRADE] = ARRAY_COUNT(sPartyMenuAction_TradeSummaryCancel2), + [ACTIONS_TAKEITEM_TOSS] = ARRAY_COUNT(sPartyMenuAction_TakeItemTossCancel) +}; + +static const u16 sFieldMoves[] = +{ + MOVE_CUT, MOVE_FLASH, MOVE_ROCK_SMASH, MOVE_STRENGTH, MOVE_SURF, MOVE_FLY, MOVE_DIVE, MOVE_WATERFALL, MOVE_TELEPORT, + MOVE_DIG, MOVE_SECRET_POWER, MOVE_MILK_DRINK, MOVE_SOFT_BOILED, MOVE_SWEET_SCENT, FIELD_MOVE_TERMINATOR +}; + +struct +{ + bool8 (*fieldMoveFunc)(void); + u8 msgId; +} static const sFieldMoveCursorCallbacks[] = +{ + [FIELD_MOVE_CUT] = {SetUpFieldMove_Cut, PARTY_MSG_NOTHING_TO_CUT}, + [FIELD_MOVE_FLASH] = {SetUpFieldMove_Flash, PARTY_MSG_CANT_USE_HERE}, + [FIELD_MOVE_ROCK_SMASH] = {SetUpFieldMove_RockSmash, PARTY_MSG_CANT_USE_HERE}, + [FIELD_MOVE_STRENGTH] = {SetUpFieldMove_Strength, PARTY_MSG_CANT_USE_HERE}, + [FIELD_MOVE_SURF] = {SetUpFieldMove_Surf, PARTY_MSG_CANT_SURF_HERE}, + [FIELD_MOVE_FLY] = {SetUpFieldMove_Fly, PARTY_MSG_CANT_USE_HERE}, + [FIELD_MOVE_DIVE] = {SetUpFieldMove_Dive, PARTY_MSG_CANT_USE_HERE}, + [FIELD_MOVE_WATERFALL] = {SetUpFieldMove_Waterfall, PARTY_MSG_CANT_USE_HERE}, + [FIELD_MOVE_TELEPORT] = {SetUpFieldMove_Teleport, PARTY_MSG_CANT_USE_HERE}, + [FIELD_MOVE_DIG] = {SetUpFieldMove_Dig, PARTY_MSG_CANT_USE_HERE}, + [FIELD_MOVE_SECRET_POWER] = {SetUpFieldMove_SecretPower, PARTY_MSG_CANT_USE_HERE}, + [FIELD_MOVE_MILK_DRINK] = {SetUpFieldMove_SoftBoiled, PARTY_MSG_NOT_ENOUGH_HP}, + [FIELD_MOVE_SOFT_BOILED] = {SetUpFieldMove_SoftBoiled, PARTY_MSG_NOT_ENOUGH_HP}, + [FIELD_MOVE_SWEET_SCENT] = {SetUpFieldMove_SweetScent, PARTY_MSG_CANT_USE_HERE}, +}; + +static const u8 *const sUnionRoomTradeMessages[] = +{ + [UR_TRADE_MSG_NOT_MON_PARTNER_WANTS - 1] = gText_NotPkmnOtherTrainerWants, + [UR_TRADE_MSG_NOT_EGG - 1] = gText_ThatIsntAnEgg, + [UR_TRADE_MSG_MON_CANT_BE_TRADED_1 - 1] = gText_PkmnCantBeTradedNow, + [UR_TRADE_MSG_MON_CANT_BE_TRADED_2 - 1] = gText_PkmnCantBeTradedNow, + [UR_TRADE_MSG_PARTNERS_MON_CANT_BE_TRADED - 1] = gText_OtherTrainersPkmnCantBeTraded, + [UR_TRADE_MSG_EGG_CANT_BE_TRADED -1] = gText_EggCantBeTradedNow, + [UR_TRADE_MSG_PARTNER_CANT_ACCEPT_MON - 1] = gText_OtherTrainerCantAcceptPkmn, + [UR_TRADE_MSG_CANT_TRADE_WITH_PARTNER_1 - 1] = gText_CantTradeWithTrainer, + [UR_TRADE_MSG_CANT_TRADE_WITH_PARTNER_2 - 1] = gText_CantTradeWithTrainer, +}; + +static const u32 sHeldItemGfx[] = INCBIN_U32("graphics/interface/hold_icons.4bpp"); +static const u16 sHeldItemPalette[] = INCBIN_U16("graphics/interface/hold_icons.gbapal"); + +static const struct OamData sOamData_HeldItem = +{ + .y = 0, + .affineMode = 0, + .objMode = 0, + .mosaic = 0, + .bpp = 0, + .shape = SPRITE_SHAPE(8x8), + .x = 0, + .matrixNum = 0, + .size = SPRITE_SIZE(8x8), + .tileNum = 0, + .priority = 1, + .paletteNum = 0, + .affineParam = 0, +}; + +static const union AnimCmd sSpriteAnim_HeldItem[] = +{ + ANIMCMD_FRAME(0, 1), + ANIMCMD_END +}; + +static const union AnimCmd sSpriteAnim_HeldMail[] = +{ + ANIMCMD_FRAME(1, 1), + ANIMCMD_END +}; + +static const union AnimCmd *const sSpriteAnimTable_HeldItem[] = +{ + sSpriteAnim_HeldItem, + sSpriteAnim_HeldMail, +}; + +static const struct SpriteSheet sSpriteSheet_HeldItem = +{ + sHeldItemGfx, sizeof(sHeldItemGfx), 0xd750 +}; + +static const struct SpritePalette sSpritePalette_HeldItem = +{ + sHeldItemPalette, 0xd750 +}; + +static const struct SpriteTemplate sSpriteTemplate_HeldItem = +{ + 0xd750, + 0xd750, + &sOamData_HeldItem, + sSpriteAnimTable_HeldItem, + NULL, + gDummySpriteAffineAnimTable, + SpriteCallbackDummy +}; + +static const struct OamData sOamData_MenuPokeball = +{ + .y = 0, + .affineMode = 0, + .objMode = 0, + .mosaic = 0, + .bpp = 0, + .shape = SPRITE_SHAPE(32x32), + .x = 0, + .matrixNum = 0, + .size = SPRITE_SIZE(32x32), + .tileNum = 0, + .priority = 1, + .paletteNum = 0, + .affineParam = 0 +}; + +static const union AnimCmd sPokeballAnim_Closed[] = +{ + ANIMCMD_FRAME(0, 0), + ANIMCMD_END +}; + +static const union AnimCmd sPokeballAnim_Open[] = +{ + ANIMCMD_FRAME(16, 0), + ANIMCMD_END +}; + +static const union AnimCmd *const sSpriteAnimTable_MenuPokeball[] = +{ + sPokeballAnim_Closed, + sPokeballAnim_Open +}; + +static const struct CompressedSpriteSheet sSpriteSheet_MenuPokeball = +{ + gPartyMenuPokeball_Gfx, 0x400, 0x04b0 +}; + +static const struct CompressedSpritePalette sSpritePalette_MenuPokeball = +{ + gPartyMenuPokeball_Pal, 0x04b0 +}; + +// Used for the pokeball sprite on each party slot / Cancel button +static const struct SpriteTemplate sSpriteTemplate_MenuPokeball = +{ + .tileTag = 0x04b0, + .paletteTag = 0x04b0, + .oam = &sOamData_MenuPokeball, + .anims = sSpriteAnimTable_MenuPokeball, + .images = NULL, + .affineAnims = gDummySpriteAffineAnimTable, + .callback = SpriteCallbackDummy, +}; + +static const struct OamData sOamData_MenuPokeballSmall = +{ + .y = 0, + .affineMode = 0, + .objMode = 0, + .mosaic = 0, + .bpp = 0, + .shape = SPRITE_SHAPE(16x16), + .x = 0, + .matrixNum = 0, + .size = SPRITE_SIZE(16x16), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, + .affineParam = 0 +}; + +static const union AnimCmd sSmallPokeballAnim_Closed[] = +{ + ANIMCMD_FRAME(0, 0), + ANIMCMD_END +}; + +static const union AnimCmd sSmallPokeballAnim_Open[] = +{ + ANIMCMD_FRAME(4, 0), + ANIMCMD_END +}; + +static const union AnimCmd sSmallPokeballAnim_Blank1[] = +{ + ANIMCMD_FRAME(8, 0), + ANIMCMD_END +}; + +static const union AnimCmd sSmallPokeballAnim_Blank2[] = +{ + ANIMCMD_FRAME(12, 0), + ANIMCMD_END +}; + +static const union AnimCmd sSmallPokeballAnim_Blank3[] = +{ + ANIMCMD_FRAME(16, 0), + ANIMCMD_END +}; + +static const union AnimCmd sSmallPokeballAnim_Blank4[] = +{ + ANIMCMD_FRAME(20, 0), + ANIMCMD_END +}; + +// The blanks below are never used. See SpriteCB_BounceConfirmCancelButton, where they were intended to be used +static const union AnimCmd *const sSpriteAnimTable_MenuPokeballSmall[] = +{ + sSmallPokeballAnim_Closed, + sSmallPokeballAnim_Open, + sSmallPokeballAnim_Blank1, + sSmallPokeballAnim_Blank2, + sSmallPokeballAnim_Blank3, + sSmallPokeballAnim_Blank4 +}; + +static const struct CompressedSpriteSheet sSpriteSheet_MenuPokeballSmall = +{ + gPartyMenuPokeballSmall_Gfx, 0x0300, 0x04b1 +}; + +// Used for the pokeball sprite next to Cancel and Confirm when both are present, otherwise sSpriteTemplate_MenuPokeball is used +static const struct SpriteTemplate sSpriteTemplate_MenuPokeballSmall = +{ + .tileTag = 1201, + .paletteTag = 1200, + .oam = &sOamData_MenuPokeballSmall, + .anims = sSpriteAnimTable_MenuPokeballSmall, + .images = NULL, + .affineAnims = gDummySpriteAffineAnimTable, + .callback = SpriteCallbackDummy, +}; + +static const struct OamData sOamData_StatusCondition = +{ + .y = 0, + .affineMode = 0, + .objMode = 0, + .mosaic = 0, + .bpp = 0, + .shape = SPRITE_SHAPE(32x8), + .x = 0, + .matrixNum = 0, + .size = SPRITE_SIZE(32x8), + .tileNum = 0, + .priority = 1, + .paletteNum = 0, + .affineParam = 0 +}; + +static const union AnimCmd sSpriteAnim_StatusPoison[] = +{ + ANIMCMD_FRAME(0, 0), + ANIMCMD_END +}; + +static const union AnimCmd sSpriteAnim_StatusParalyzed[] = +{ + ANIMCMD_FRAME(4, 0), + ANIMCMD_END +}; + +static const union AnimCmd sSpriteAnim_StatusSleep[] = +{ + ANIMCMD_FRAME(8, 0), + ANIMCMD_END +}; + +static const union AnimCmd sSpriteAnim_StatusFrozen[] = +{ + ANIMCMD_FRAME(12, 0), + ANIMCMD_END +}; + +static const union AnimCmd sSpriteAnim_StatusBurn[] = +{ + ANIMCMD_FRAME(16, 0), + ANIMCMD_END +}; + +static const union AnimCmd sSpriteAnim_StatusPokerus[] = +{ + ANIMCMD_FRAME(20, 0), + ANIMCMD_END +}; + +static const union AnimCmd sSpriteAnim_StatusFaint[] = +{ + ANIMCMD_FRAME(24, 0), + ANIMCMD_END +}; + +static const union AnimCmd sSpriteAnim_Blank[] = +{ + ANIMCMD_FRAME(28, 0), + ANIMCMD_END +}; + +static const union AnimCmd *const sSpriteTemplate_StatusCondition[] = +{ + sSpriteAnim_StatusPoison, + sSpriteAnim_StatusParalyzed, + sSpriteAnim_StatusSleep, + sSpriteAnim_StatusFrozen, + sSpriteAnim_StatusBurn, + sSpriteAnim_StatusPokerus, + sSpriteAnim_StatusFaint, + sSpriteAnim_Blank +}; + +static const struct CompressedSpriteSheet sSpriteSheet_StatusIcons = +{ + gStatusGfx_Icons, 0x400, 1202 +}; + +static const struct CompressedSpritePalette sSpritePalette_StatusIcons = +{ + gStatusPal_Icons, 1202 +}; + +static const struct SpriteTemplate sSpriteTemplate_StatusIcons = +{ + .tileTag = 1202, + .paletteTag = 1202, + .oam = &sOamData_StatusCondition, + .anims = sSpriteTemplate_StatusCondition, + .images = NULL, + .affineAnims = gDummySpriteAffineAnimTable, + .callback = SpriteCallbackDummy, +}; + +// Mask for the partners party in a multi battle. TRUE if in the partners party, FALSE otherwise +// The 7th slot is Cancel, and the 8th slot is unreachable +// Used only to determine whether or not to show the Deoxys form icon sprite +static const bool8 sMultiBattlePartnersPartyMask[PARTY_SIZE + 2] = +{ + FALSE, + TRUE, + FALSE, + FALSE, + TRUE, + TRUE, + FALSE +}; + +static const u8 *const sUnused_StatStrings[] = +{ + gText_HP4, + gText_Attack3, + gText_Defense3, + gText_SpAtk4, + gText_SpDef4, + gText_Speed2 +}; + +static const u16 sTMHMMoves[] = +{ + MOVE_FOCUS_PUNCH, + MOVE_DRAGON_CLAW, + MOVE_WATER_PULSE, + MOVE_CALM_MIND, + MOVE_ROAR, + MOVE_TOXIC, + MOVE_HAIL, + MOVE_BULK_UP, + MOVE_BULLET_SEED, + MOVE_HIDDEN_POWER, + MOVE_SUNNY_DAY, + MOVE_TAUNT, + MOVE_ICE_BEAM, + MOVE_BLIZZARD, + MOVE_HYPER_BEAM, + MOVE_LIGHT_SCREEN, + MOVE_PROTECT, + MOVE_RAIN_DANCE, + MOVE_GIGA_DRAIN, + MOVE_SAFEGUARD, + MOVE_FRUSTRATION, + MOVE_SOLAR_BEAM, + MOVE_IRON_TAIL, + MOVE_THUNDERBOLT, + MOVE_THUNDER, + MOVE_EARTHQUAKE, + MOVE_RETURN, + MOVE_DIG, + MOVE_PSYCHIC, + MOVE_SHADOW_BALL, + MOVE_BRICK_BREAK, + MOVE_DOUBLE_TEAM, + MOVE_REFLECT, + MOVE_SHOCK_WAVE, + MOVE_FLAMETHROWER, + MOVE_SLUDGE_BOMB, + MOVE_SANDSTORM, + MOVE_FIRE_BLAST, + MOVE_ROCK_TOMB, + MOVE_AERIAL_ACE, + MOVE_TORMENT, + MOVE_FACADE, + MOVE_SECRET_POWER, + MOVE_REST, + MOVE_ATTRACT, + MOVE_THIEF, + MOVE_STEEL_WING, + MOVE_SKILL_SWAP, + MOVE_SNATCH, + MOVE_OVERHEAT, + MOVE_CUT, + MOVE_FLY, + MOVE_SURF, + MOVE_STRENGTH, + MOVE_FLASH, + MOVE_ROCK_SMASH, + MOVE_WATERFALL, + MOVE_DIVE, +}; diff --git a/src/party_menu.c b/src/party_menu.c index aad7cb7b44..55243c1cfa 100755 --- a/src/party_menu.c +++ b/src/party_menu.c @@ -410,1262 +410,7 @@ static bool8 SetUpFieldMove_Dive(void); // static const data #include "data/pokemon/tutor_learnsets.h" - -static const struct BgTemplate sPartyMenuBgTemplates[] = -{ - { - .bg = 0, - .charBaseIndex = 0, - .mapBaseIndex = 31, - .screenSize = 0, - .paletteMode = 0, - .priority = 1, - .baseTile = 0 - }, - { - .bg = 1, - .charBaseIndex = 0, - .mapBaseIndex = 30, - .screenSize = 0, - .paletteMode = 0, - .priority = 2, - .baseTile = 0 - }, - { - .bg = 2, - .charBaseIndex = 0, - .mapBaseIndex = 28, - .screenSize = 1, - .paletteMode = 0, - .priority = 0, - .baseTile = 0 - }, -}; - -enum -{ - PARTY_BOX_LEFT_COLUMN, - PARTY_BOX_RIGHT_COLUMN -}; - -static const struct PartyMenuBoxInfoRects sPartyBoxInfoRects[] = -{ - [PARTY_BOX_LEFT_COLUMN] = - { - BlitBitmapToPartyWindow_LeftColumn, - { - //The below are the x, y, width, and height for each of the following info - 24, 11, 40, 13, // Nickname - 32, 20, 32, 8, // Level - 64, 20, 8, 8, // Gender - 38, 37, 24, 8, // HP - 53, 37, 24, 8, // Max HP - 24, 35, 48, 3 // HP bar - }, - 12, 34, 64, 16 // Description text (e.g. NO USE) - }, - [PARTY_BOX_RIGHT_COLUMN] = - { - BlitBitmapToPartyWindow_RightColumn, - { - // See above comment - 22, 3, 40, 13, // Nickname - 30, 12, 32, 8, // Level - 62, 12, 8, 8, // Gender - 102, 12, 24, 8, // HP - 117, 12, 24, 8, // Max HP - 88, 10, 48, 3 // HP bar - }, - 77, 4, 64, 16 // Description text - }, -}; - - -// Each layout array has an array for each of the 6 party slots -// The array for each slot has the sprite coords of its various sprites in the following order -// Pokemon icon (x, y), held item (x, y), status condition (x, y), menu pokeball (x, y) -static const u8 sPartyMenuSpriteCoords[PARTY_LAYOUT_COUNT][PARTY_SIZE][4 * 2] = -{ - [PARTY_LAYOUT_SINGLE] = - { - { 16, 40, 20, 50, 50, 52, 16, 34}, - {104, 18, 108, 28, 136, 27, 102, 25}, - {104, 42, 108, 52, 136, 51, 102, 49}, - {104, 66, 108, 76, 136, 75, 102, 73}, - {104, 90, 108, 100, 136, 99, 102, 97}, - {104, 114, 108, 124, 136, 123, 102, 121}, - }, - [PARTY_LAYOUT_DOUBLE] = - { - {16, 24, 20, 34, 50, 36, 16, 18}, - {16, 80, 20, 90, 50, 92, 16, 74}, - {104, 18, 108, 28, 136, 27, 102, 25}, - {104, 50, 108, 60, 136, 59, 102, 57}, - {104, 82, 108, 92, 136, 91, 102, 89}, - {104, 114, 108, 124, 136, 123, 102, 121}, - }, - [PARTY_LAYOUT_MULTI] = - { - {16, 24, 20, 34, 50, 36, 16, 18}, - {16, 80, 20, 90, 50, 92, 16, 74}, - {104, 26, 106, 36, 136, 35, 102, 33}, - {104, 50, 106, 60, 136, 59, 102, 57}, - {104, 82, 106, 92, 136, 91, 102, 89}, - {104, 106, 106, 116, 136, 115, 102, 113}, - }, - [PARTY_LAYOUT_MULTI_SHOWCASE] = - { - {16, 32, 20, 42, 50, 44, 16, 26}, - {104, 34, 106, 44, 136, 43, 102, 41}, - {104, 58, 106, 68, 136, 67, 102, 65}, - {16, 104, 20, 114, 50, 116, 16, 98}, - {104, 106, 106, 116, 136, 115, 102, 113}, - {104, 130, 106, 140, 136, 139, 102, 137}, - }, -}; - -// Used only when both Cancel and Confirm are present -static const u32 sConfirmButton_Tilemap[] = INCBIN_U32("graphics/interface/party_menu_confirm_button.bin"); -static const u32 sCancelButton_Tilemap[] = INCBIN_U32("graphics/interface/party_menu_cancel_button.bin"); - -// Text colors for BG, FG, and Shadow in that order -static const u8 sFontColorTable[][3] = -{ - {TEXT_COLOR_TRANSPARENT, TEXT_COLOR_LIGHT_GREY, TEXT_COLOR_DARK_GREY}, // Default - {TEXT_COLOR_TRANSPARENT, TEXT_COLOR_WHITE, TEXT_COLOR_GREEN}, // Unused - {TEXT_COLOR_TRANSPARENT, TEXT_DYNAMIC_COLOR_2, TEXT_DYNAMIC_COLOR_3}, // Gender symbol - {TEXT_COLOR_WHITE, TEXT_COLOR_DARK_GREY, TEXT_COLOR_LIGHT_GREY}, // Selection actions - {TEXT_COLOR_WHITE, TEXT_COLOR_BLUE, TEXT_COLOR_LIGHT_BLUE}, // Field moves - {TEXT_COLOR_TRANSPARENT, TEXT_COLOR_WHITE, TEXT_COLOR_DARK_GREY}, // Unused -}; - -static const struct WindowTemplate sSinglePartyMenuWindowTemplate[] = -{ - { - .bg = 0, - .tilemapLeft = 1, - .tilemapTop = 3, - .width = 10, - .height = 7, - .paletteNum = 3, - .baseBlock = 0x63, - }, - { - .bg = 0, - .tilemapLeft = 12, - .tilemapTop = 1, - .width = 18, - .height = 3, - .paletteNum = 4, - .baseBlock = 0xA9, - }, - { - .bg = 0, - .tilemapLeft = 12, - .tilemapTop = 4, - .width = 18, - .height = 3, - .paletteNum = 5, - .baseBlock = 0xDF, - }, - { - .bg = 0, - .tilemapLeft = 12, - .tilemapTop = 7, - .width = 18, - .height = 3, - .paletteNum = 6, - .baseBlock = 0x115, - }, - { - .bg = 0, - .tilemapLeft = 12, - .tilemapTop = 10, - .width = 18, - .height = 3, - .paletteNum = 7, - .baseBlock = 0x14B, - }, - { - .bg = 0, - .tilemapLeft = 12, - .tilemapTop = 13, - .width = 18, - .height = 3, - .paletteNum = 8, - .baseBlock = 0x181, - }, - { - .bg = 2, - .tilemapLeft = 1, - .tilemapTop = 15, - .width = 28, - .height = 4, - .paletteNum = 14, - .baseBlock = 0x1DF, - }, - DUMMY_WIN_TEMPLATE -}; - -static const struct WindowTemplate sDoublePartyMenuWindowTemplate[] = -{ - { - .bg = 0, - .tilemapLeft = 1, - .tilemapTop = 1, - .width = 10, - .height = 7, - .paletteNum = 3, - .baseBlock = 0x63, - }, - { - .bg = 0, - .tilemapLeft = 1, - .tilemapTop = 8, - .width = 10, - .height = 7, - .paletteNum = 4, - .baseBlock = 0xA9, - }, - { - .bg = 0, - .tilemapLeft = 12, - .tilemapTop = 1, - .width = 18, - .height = 3, - .paletteNum = 5, - .baseBlock = 0xEF, - }, - { - .bg = 0, - .tilemapLeft = 12, - .tilemapTop = 5, - .width = 18, - .height = 3, - .paletteNum = 6, - .baseBlock = 0x125, - }, - { - .bg = 0, - .tilemapLeft = 12, - .tilemapTop = 9, - .width = 18, - .height = 3, - .paletteNum = 7, - .baseBlock = 0x15B, - }, - { - .bg = 0, - .tilemapLeft = 12, - .tilemapTop = 13, - .width = 18, - .height = 3, - .paletteNum = 8, - .baseBlock = 0x191, - }, - { - .bg = 2, - .tilemapLeft = 1, - .tilemapTop = 15, - .width = 28, - .height = 4, - .paletteNum = 14, - .baseBlock = 0x1DF, - }, - DUMMY_WIN_TEMPLATE -}; - -static const struct WindowTemplate sMultiPartyMenuWindowTemplate[] = -{ - { - .bg = 0, - .tilemapLeft = 1, - .tilemapTop = 1, - .width = 10, - .height = 7, - .paletteNum = 3, - .baseBlock = 0x63, - }, - { - .bg = 0, - .tilemapLeft = 1, - .tilemapTop = 8, - .width = 10, - .height = 7, - .paletteNum = 4, - .baseBlock = 0xA9, - }, - { - .bg = 0, - .tilemapLeft = 12, - .tilemapTop = 2, - .width = 18, - .height = 3, - .paletteNum = 5, - .baseBlock = 0xEF, - }, - { - .bg = 0, - .tilemapLeft = 12, - .tilemapTop = 5, - .width = 18, - .height = 3, - .paletteNum = 6, - .baseBlock = 0x125, - }, - { - .bg = 0, - .tilemapLeft = 12, - .tilemapTop = 9, - .width = 18, - .height = 3, - .paletteNum = 7, - .baseBlock = 0x15B, - }, - { - .bg = 0, - .tilemapLeft = 12, - .tilemapTop = 12, - .width = 18, - .height = 3, - .paletteNum = 8, - .baseBlock = 0x191, - }, - { - .bg = 2, - .tilemapLeft = 1, - .tilemapTop = 15, - .width = 28, - .height = 4, - .paletteNum = 14, - .baseBlock = 0x1DF, - }, - DUMMY_WIN_TEMPLATE -}; - -static const struct WindowTemplate sShowcaseMultiPartyMenuWindowTemplate[] = -{ - { - .bg = 0, - .tilemapLeft = 1, - .tilemapTop = 2, - .width = 10, - .height = 7, - .paletteNum = 3, - .baseBlock = 0x63, - }, - { - .bg = 0, - .tilemapLeft = 12, - .tilemapTop = 3, - .width = 18, - .height = 3, - .paletteNum = 5, - .baseBlock = 0xA9, - }, - { - .bg = 0, - .tilemapLeft = 12, - .tilemapTop = 6, - .width = 18, - .height = 3, - .paletteNum = 6, - .baseBlock = 0xDF, - }, - { - .bg = 2, - .tilemapLeft = 1, - .tilemapTop = 11, - .width = 10, - .height = 7, - .paletteNum = 4, - .baseBlock = 0x115, - }, - { - .bg = 2, - .tilemapLeft = 12, - .tilemapTop = 12, - .width = 18, - .height = 3, - .paletteNum = 7, - .baseBlock = 0x16B, - }, - { - .bg = 2, - .tilemapLeft = 12, - .tilemapTop = 15, - .width = 18, - .height = 3, - .paletteNum = 8, - .baseBlock = 0x1A1, - }, - DUMMY_WIN_TEMPLATE -}; - -static const struct WindowTemplate sCancelButtonWindowTemplate = -{ - .bg = 0, - .tilemapLeft = 24, - .tilemapTop = 17, - .width = 6, - .height = 2, - .paletteNum = 3, - .baseBlock = 0x1C7, -}; - -static const struct WindowTemplate sMultiCancelButtonWindowTemplate = -{ - .bg = 0, - .tilemapLeft = 24, - .tilemapTop = 18, - .width = 6, - .height = 2, - .paletteNum = 3, - .baseBlock = 0x1C7, -}; - -static const struct WindowTemplate sConfirmButtonWindowTemplate = -{ - .bg = 0, - .tilemapLeft = 24, - .tilemapTop = 16, - .width = 6, - .height = 2, - .paletteNum = 3, - .baseBlock = 0x1D3, -}; - -static const struct WindowTemplate sDefaultPartyMsgWindowTemplate = -{ - .bg = 2, - .tilemapLeft = 1, - .tilemapTop = 17, - .width = 21, - .height = 2, - .paletteNum = 15, - .baseBlock = 0x24F, -}; - -static const struct WindowTemplate sDoWhatWithMonMsgWindowTemplate = -{ - .bg = 2, - .tilemapLeft = 1, - .tilemapTop = 17, - .width = 16, - .height = 2, - .paletteNum = 15, - .baseBlock = 0x279, -}; - -static const struct WindowTemplate sDoWhatWithItemMsgWindowTemplate = -{ - .bg = 2, - .tilemapLeft = 1, - .tilemapTop = 17, - .width = 20, - .height = 2, - .paletteNum = 15, - .baseBlock = 0x299, -}; - -static const struct WindowTemplate sDoWhatWithMailMsgWindowTemplate = -{ - .bg = 2, - .tilemapLeft = 1, - .tilemapTop = 17, - .width = 18, - .height = 2, - .paletteNum = 15, - .baseBlock = 0x299, -}; - -static const struct WindowTemplate sWhichMoveMsgWindowTemplate = -{ - .bg = 2, - .tilemapLeft = 1, - .tilemapTop = 17, - .width = 16, - .height = 2, - .paletteNum = 15, - .baseBlock = 0x299, -}; - -static const struct WindowTemplate sAlreadyHoldingOneMsgWindowTemplate = -{ - .bg = 2, - .tilemapLeft = 1, - .tilemapTop = 15, - .width = 20, - .height = 4, - .paletteNum = 15, - .baseBlock = 0x299, -}; - -static const struct WindowTemplate sItemGiveTakeWindowTemplate = -{ - .bg = 2, - .tilemapLeft = 23, - .tilemapTop = 13, - .width = 6, - .height = 6, - .paletteNum = 14, - .baseBlock = 0x39D, -}; - -static const struct WindowTemplate sMailReadTakeWindowTemplate = -{ - .bg = 2, - .tilemapLeft = 21, - .tilemapTop = 13, - .width = 8, - .height = 6, - .paletteNum = 14, - .baseBlock = 0x39D, -}; - -static const struct WindowTemplate sMoveSelectWindowTemplate = -{ - .bg = 2, - .tilemapLeft = 19, - .tilemapTop = 11, - .width = 10, - .height = 8, - .paletteNum = 14, - .baseBlock = 0x2E9, -}; - -static const struct WindowTemplate sPartyMenuYesNoWindowTemplate = -{ - .bg = 2, - .tilemapLeft = 21, - .tilemapTop = 9, - .width = 5, - .height = 4, - .paletteNum = 14, - .baseBlock = 0x2E9, -}; - -static const struct WindowTemplate sLevelUpStatsWindowTemplate = -{ - .bg = 2, - .tilemapLeft = 19, - .tilemapTop = 1, - .width = 10, - .height = 11, - .paletteNum = 14, - .baseBlock = 0x2E9, -}; - -static const struct WindowTemplate sUnusedWindowTemplate_08615978 = -{ - .bg = 2, - .tilemapLeft = 2, - .tilemapTop = 15, - .width = 27, - .height = 4, - .paletteNum = 14, - .baseBlock = 0x1DF, -}; - -static const struct WindowTemplate sUnusedWindowTemplate_08615980 = -{ - .bg = 2, - .tilemapLeft = 0, - .tilemapTop = 13, - .width = 18, - .height = 3, - .paletteNum = 12, - .baseBlock = 0x39D, -}; - -// Tile nums -static const u8 sMainSlotTileNums[] = {24, 25, 25, 25, 25, 25, 25, 25, 25, 26, - 32, 33, 33, 33, 33, 33, 33, 33, 33, 34, - 32, 33, 33, 33, 33, 33, 33, 33, 33, 34, - 32, 33, 33, 33, 33, 33, 33, 33, 33, 34, - 40, 59, 60, 58, 58, 58, 58, 58, 58, 61, - 15, 16, 16, 16, 16, 16, 16, 16, 16, 17, - 46, 47, 47, 47, 47, 47, 47, 47, 47, 48}; - -static const u8 sMainSlotTileNums_Egg[] = {24, 25, 25, 25, 25, 25, 25, 25, 25, 26, - 32, 33, 33, 33, 33, 33, 33, 33, 33, 34, - 32, 33, 33, 33, 33, 33, 33, 33, 33, 34, - 32, 33, 33, 33, 33, 33, 33, 33, 33, 34, - 40, 41, 41, 41, 41, 41, 41, 41, 41, 42, - 15, 16, 16, 16, 16, 16, 16, 16, 16, 17, - 46, 47, 47, 47, 47, 47, 47, 47, 47, 48}; - -static const u8 sOtherSlotsTileNums[] = {43, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 45, - 49, 33, 33, 33, 33, 33, 33, 33, 33, 52, 53, 51, 51, 51, 51, 51, 51, 54, - 55, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 57}; - -static const u8 sOtherSlotsTileNums_Egg[] = {43, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 45, - 49, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 50, - 55, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 57}; - -static const u8 sEmptySlotTileNums[] = {21, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 23, - 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, - 37, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 39}; - -// Palette offsets -static const u8 sGenderPalOffsets[] = {11, 12}; -static const u8 sHPBarPalOffsets[] = {9, 10}; -static const u8 sPartyBoxPalOffsets1[] = {4, 5, 6}; -static const u8 sPartyBoxPalOffsets2[] = {1, 7, 8}; -static const u8 sPartyBoxNoMonPalOffsets[] = {1, 11, 12}; - -// Palette ids -static const u8 sGenderMalePalIds[] = {59, 60}; -static const u8 sGenderFemalePalIds[] = {75, 76}; -static const u8 sHPBarGreenPalIds[] = {57, 58}; -static const u8 sHPBarYellowPalIds[] = {73, 74}; -static const u8 sHPBarRedPalIds[] = {89, 90}; -static const u8 sPartyBoxEmptySlotPalIds1[] = {52, 53, 54}; -static const u8 sPartyBoxMultiPalIds1[] = {68, 69, 70}; -static const u8 sPartyBoxFaintedPalIds1[] = {84, 85, 86}; -static const u8 sPartyBoxCurrSelectionPalIds1[] = {116, 117, 118}; -static const u8 sPartyBoxCurrSelectionMultiPalIds[] = {132, 133, 134}; -static const u8 sPartyBoxCurrSelectionFaintedPalIds[] = {148, 149, 150}; -static const u8 sPartyBoxSelectedForActionPalIds1[] = {100, 101, 102}; -static const u8 sPartyBoxEmptySlotPalIds2[] = {49, 55, 56}; -static const u8 sPartyBoxMultiPalIds2[] = {65, 71, 72}; -static const u8 sPartyBoxFaintedPalIds2[] = {81, 87, 88}; -static const u8 sPartyBoxCurrSelectionPalIds2[] = {97, 103, 104}; -static const u8 sPartyBoxSelectedForActionPalIds2[] = {161, 167, 168}; -static const u8 sPartyBoxNoMonPalIds[] = {17, 27, 28}; - -static const u8 *const sActionStringTable[] = -{ - [PARTY_MSG_CHOOSE_MON] = gText_ChoosePokemon, - [PARTY_MSG_CHOOSE_MON_OR_CANCEL] = gText_ChoosePokemonCancel, - [PARTY_MSG_CHOOSE_MON_AND_CONFIRM] = gText_ChoosePokemonConfirm, - [PARTY_MSG_MOVE_TO_WHERE] = gText_MoveToWhere, - [PARTY_MSG_TEACH_WHICH_MON] = gText_TeachWhichPokemon, - [PARTY_MSG_USE_ON_WHICH_MON] = gText_UseOnWhichPokemon, - [PARTY_MSG_GIVE_TO_WHICH_MON] = gText_GiveToWhichPokemon, - [PARTY_MSG_NOTHING_TO_CUT] = gText_NothingToCut, - [PARTY_MSG_CANT_SURF_HERE] = gText_CantSurfHere, - [PARTY_MSG_ALREADY_SURFING] = gText_AlreadySurfing, - [PARTY_MSG_CURRENT_TOO_FAST] = gText_CurrentIsTooFast, - [PARTY_MSG_ENJOY_CYCLING] = gText_EnjoyCycling, - [PARTY_MSG_ALREADY_IN_USE] = gText_InUseAlready_PM, - [PARTY_MSG_CANT_USE_HERE] = gText_CantUseHere, - [PARTY_MSG_NO_MON_FOR_BATTLE] = gText_NoPokemonForBattle, - [PARTY_MSG_CHOOSE_MON_2] = gText_ChoosePokemon2, - [PARTY_MSG_NOT_ENOUGH_HP] = gText_NotEnoughHp, - [PARTY_MSG_X_MONS_ARE_NEEDED] = gText_PokemonAreNeeded, - [PARTY_MSG_MONS_CANT_BE_SAME] = gText_PokemonCantBeSame, - [PARTY_MSG_NO_SAME_HOLD_ITEMS] = gText_NoIdenticalHoldItems, - [PARTY_MSG_UNUSED] = gText_EmptyString2, - [PARTY_MSG_DO_WHAT_WITH_MON] = gText_DoWhatWithPokemon, - [PARTY_MSG_RESTORE_WHICH_MOVE] = gText_RestoreWhichMove, - [PARTY_MSG_BOOST_PP_WHICH_MOVE] = gText_BoostPp, - [PARTY_MSG_DO_WHAT_WITH_ITEM] = gText_DoWhatWithItem, - [PARTY_MSG_DO_WHAT_WITH_MAIL] = gText_DoWhatWithMail, - [PARTY_MSG_ALREADY_HOLDING_ONE] = gText_AlreadyHoldingOne, -}; - -static const u8 *const sDescriptionStringTable[] = -{ - [PARTYBOX_DESC_NO_USE] = gText_NoUse, - [PARTYBOX_DESC_ABLE_3] = gText_Able, - [PARTYBOX_DESC_FIRST] = gText_First_PM, - [PARTYBOX_DESC_SECOND] = gText_Second_PM, - [PARTYBOX_DESC_THIRD] = gText_Third_PM, - [PARTYBOX_DESC_FOURTH] = gText_Fourth, - [PARTYBOX_DESC_ABLE] = gText_Able2, - [PARTYBOX_DESC_NOT_ABLE] = gText_NotAble, - [PARTYBOX_DESC_ABLE_2] = gText_Able3, - [PARTYBOX_DESC_NOT_ABLE_2] = gText_NotAble2, - [PARTYBOX_DESC_LEARNED] = gText_Learned, - [PARTYBOX_DESC_HAVE] = gText_Have, - [PARTYBOX_DESC_DONT_HAVE] = gText_DontHave, -}; - -static const u16 sUnused_08615B94[] = -{ - 0x0108, 0x0151, 0x0160, 0x015b, 0x002e, 0x005c, 0x0102, 0x0153, 0x014b, 0x00ed, 0x00f1, 0x010d, 0x003a, 0x003b, 0x003f, 0x0071, - 0x00b6, 0x00f0, 0x00ca, 0x00db, 0x00da, 0x004c, 0x00e7, 0x0055, 0x0057, 0x0059, 0x00d8, 0x005b, 0x005e, 0x00f7, 0x0118, 0x0068, - 0x0073, 0x015f, 0x0035, 0x00bc, 0x00c9, 0x007e, 0x013d, 0x014c, 0x0103, 0x0107, 0x0122, 0x009c, 0x00d5, 0x00a8, 0x00d3, 0x011d, - 0x0121, 0x013b, 0x000f, 0x0013, 0x0039, 0x0046, 0x0094, 0x00f9, 0x007f, 0x0123, -}; - -enum -{ - MENU_SUMMARY, - MENU_SWITCH, - MENU_CANCEL1, - MENU_ITEM, - MENU_GIVE, - MENU_TAKE_ITEM, - MENU_MAIL, - MENU_TAKE_MAIL, - MENU_READ, - MENU_CANCEL2, - MENU_SHIFT, - MENU_SEND_OUT, - MENU_ENTER, - MENU_NO_ENTRY, - MENU_STORE, - MENU_REGISTER, - MENU_TRADE1, - MENU_TRADE2, - MENU_TOSS, - MENU_FIELD_MOVES, -}; - -enum -{ - FIELD_MOVE_CUT, - FIELD_MOVE_FLASH, - FIELD_MOVE_ROCK_SMASH, - FIELD_MOVE_STRENGTH, - FIELD_MOVE_SURF, - FIELD_MOVE_FLY, - FIELD_MOVE_DIVE, - FIELD_MOVE_WATERFALL, - FIELD_MOVE_TELEPORT, - FIELD_MOVE_DIG, - FIELD_MOVE_SECRET_POWER, - FIELD_MOVE_MILK_DRINK, - FIELD_MOVE_SOFT_BOILED, - FIELD_MOVE_SWEET_SCENT, -}; - -// What a weird choice of table termination; -#define FIELD_MOVE_TERMINATOR MOVE_SWORDS_DANCE - -struct -{ - const u8 *text; - TaskFunc func; -} static const sCursorOptions[] = -{ - [MENU_SUMMARY] = {gText_Summary5, CursorCb_Summary}, - [MENU_SWITCH] = {gText_Switch2, CursorCb_Switch}, - [MENU_CANCEL1] = {gText_Cancel2, CursorCb_Cancel1}, - [MENU_ITEM] = {gText_Item, CursorCb_Item}, - [MENU_GIVE] = {gMenuText_Give, CursorCb_Give}, - [MENU_TAKE_ITEM] = {gText_Take, CursorCb_TakeItem}, - [MENU_MAIL] = {gText_Mail, CursorCb_Mail}, - [MENU_TAKE_MAIL] = {gText_Take2, CursorCb_TakeMail}, - [MENU_READ] = {gText_Read2, CursorCb_Read}, - [MENU_CANCEL2] = {gText_Cancel2, CursorCb_Cancel2}, - [MENU_SHIFT] = {gText_Shift, CursorCb_SendMon}, - [MENU_SEND_OUT] = {gText_SendOut, CursorCb_SendMon}, - [MENU_ENTER] = {gText_Enter, CursorCb_Enter}, - [MENU_NO_ENTRY] = {gText_NoEntry, CursorCb_NoEntry}, - [MENU_STORE] = {gText_Store, CursorCb_Store}, - [MENU_REGISTER] = {gText_Register, CursorCb_Register}, - [MENU_TRADE1] = {gText_Trade4, CursorCb_Trade1}, - [MENU_TRADE2] = {gText_Trade4, CursorCb_Trade2}, - [MENU_TOSS] = {gMenuText_Toss, CursorCb_Toss}, - [MENU_FIELD_MOVES + FIELD_MOVE_CUT] = {gMoveNames[MOVE_CUT], CursorCb_FieldMove}, - [MENU_FIELD_MOVES + FIELD_MOVE_FLASH] = {gMoveNames[MOVE_FLASH], CursorCb_FieldMove}, - [MENU_FIELD_MOVES + FIELD_MOVE_ROCK_SMASH] = {gMoveNames[MOVE_ROCK_SMASH], CursorCb_FieldMove}, - [MENU_FIELD_MOVES + FIELD_MOVE_STRENGTH] = {gMoveNames[MOVE_STRENGTH], CursorCb_FieldMove}, - [MENU_FIELD_MOVES + FIELD_MOVE_SURF] = {gMoveNames[MOVE_SURF], CursorCb_FieldMove}, - [MENU_FIELD_MOVES + FIELD_MOVE_FLY] = {gMoveNames[MOVE_FLY], CursorCb_FieldMove}, - [MENU_FIELD_MOVES + FIELD_MOVE_DIVE] = {gMoveNames[MOVE_DIVE], CursorCb_FieldMove}, - [MENU_FIELD_MOVES + FIELD_MOVE_WATERFALL] = {gMoveNames[MOVE_WATERFALL], CursorCb_FieldMove}, - [MENU_FIELD_MOVES + FIELD_MOVE_TELEPORT] = {gMoveNames[MOVE_TELEPORT], CursorCb_FieldMove}, - [MENU_FIELD_MOVES + FIELD_MOVE_DIG] = {gMoveNames[MOVE_DIG], CursorCb_FieldMove}, - [MENU_FIELD_MOVES + FIELD_MOVE_SECRET_POWER] = {gMoveNames[MOVE_SECRET_POWER], CursorCb_FieldMove}, - [MENU_FIELD_MOVES + FIELD_MOVE_MILK_DRINK] = {gMoveNames[MOVE_MILK_DRINK], CursorCb_FieldMove}, - [MENU_FIELD_MOVES + FIELD_MOVE_SOFT_BOILED] = {gMoveNames[MOVE_SOFT_BOILED], CursorCb_FieldMove}, - [MENU_FIELD_MOVES + FIELD_MOVE_SWEET_SCENT] = {gMoveNames[MOVE_SWEET_SCENT], CursorCb_FieldMove}, -}; - -static const u8 sPartyMenuAction_SummarySwitchCancel[] = {MENU_SUMMARY, MENU_SWITCH, MENU_CANCEL1}; -static const u8 sPartyMenuAction_ShiftSummaryCancel[] = {MENU_SHIFT, MENU_SUMMARY, MENU_CANCEL1}; -static const u8 sPartyMenuAction_SendOutSummaryCancel[] = {MENU_SEND_OUT, MENU_SUMMARY, MENU_CANCEL1}; -static const u8 sPartyMenuAction_SummaryCancel[] = {MENU_SUMMARY, MENU_CANCEL1}; -static const u8 sPartyMenuAction_EnterSummaryCancel[] = {MENU_ENTER, MENU_SUMMARY, MENU_CANCEL1}; -static const u8 sPartyMenuAction_NoEntrySummaryCancel[] = {MENU_NO_ENTRY, MENU_SUMMARY, MENU_CANCEL1}; -static const u8 sPartyMenuAction_StoreSummaryCancel[] = {MENU_STORE, MENU_SUMMARY, MENU_CANCEL1}; -static const u8 sPartyMenuAction_GiveTakeItemCancel[] = {MENU_GIVE, MENU_TAKE_ITEM, MENU_CANCEL2}; -static const u8 sPartyMenuAction_ReadTakeMailCancel[] = {MENU_READ, MENU_TAKE_MAIL, MENU_CANCEL2}; -static const u8 sPartyMenuAction_RegisterSummaryCancel[] = {MENU_REGISTER, MENU_SUMMARY, MENU_CANCEL1}; -static const u8 sPartyMenuAction_TradeSummaryCancel1[] = {MENU_TRADE1, MENU_SUMMARY, MENU_CANCEL1}; -static const u8 sPartyMenuAction_TradeSummaryCancel2[] = {MENU_TRADE2, MENU_SUMMARY, MENU_CANCEL1}; -static const u8 sPartyMenuAction_TakeItemTossCancel[] = {MENU_TAKE_ITEM, MENU_TOSS, MENU_CANCEL1}; - -// IDs for the action lists that appear when a party mon is selected -enum -{ - ACTIONS_NONE, - ACTIONS_SWITCH, - ACTIONS_SHIFT, - ACTIONS_SEND_OUT, - ACTIONS_ENTER, - ACTIONS_NO_ENTRY, - ACTIONS_STORE, - ACTIONS_SUMMARY_ONLY, - ACTIONS_ITEM, - ACTIONS_MAIL, - ACTIONS_REGISTER, - ACTIONS_TRADE, - ACTIONS_SPIN_TRADE, - ACTIONS_TAKEITEM_TOSS -}; - -static const u8 *const sPartyMenuActions[] = -{ - [ACTIONS_NONE] = NULL, - [ACTIONS_SWITCH] = sPartyMenuAction_SummarySwitchCancel, - [ACTIONS_SHIFT] = sPartyMenuAction_ShiftSummaryCancel, - [ACTIONS_SEND_OUT] = sPartyMenuAction_SendOutSummaryCancel, - [ACTIONS_ENTER] = sPartyMenuAction_EnterSummaryCancel, - [ACTIONS_NO_ENTRY] = sPartyMenuAction_NoEntrySummaryCancel, - [ACTIONS_STORE] = sPartyMenuAction_StoreSummaryCancel, - [ACTIONS_SUMMARY_ONLY] = sPartyMenuAction_SummaryCancel, - [ACTIONS_ITEM] = sPartyMenuAction_GiveTakeItemCancel, - [ACTIONS_MAIL] = sPartyMenuAction_ReadTakeMailCancel, - [ACTIONS_REGISTER] = sPartyMenuAction_RegisterSummaryCancel, - [ACTIONS_TRADE] = sPartyMenuAction_TradeSummaryCancel1, - [ACTIONS_SPIN_TRADE] = sPartyMenuAction_TradeSummaryCancel2, - [ACTIONS_TAKEITEM_TOSS] = sPartyMenuAction_TakeItemTossCancel, -}; - -static const u8 sPartyMenuActionCounts[] = -{ - [ACTIONS_NONE] = 0, - [ACTIONS_SWITCH] = ARRAY_COUNT(sPartyMenuAction_SummarySwitchCancel), - [ACTIONS_SHIFT] = ARRAY_COUNT(sPartyMenuAction_ShiftSummaryCancel), - [ACTIONS_SEND_OUT] = ARRAY_COUNT(sPartyMenuAction_SendOutSummaryCancel), - [ACTIONS_ENTER] = ARRAY_COUNT(sPartyMenuAction_EnterSummaryCancel), - [ACTIONS_NO_ENTRY] = ARRAY_COUNT(sPartyMenuAction_NoEntrySummaryCancel), - [ACTIONS_STORE] = ARRAY_COUNT(sPartyMenuAction_StoreSummaryCancel), - [ACTIONS_SUMMARY_ONLY] = ARRAY_COUNT(sPartyMenuAction_SummaryCancel), - [ACTIONS_ITEM] = ARRAY_COUNT(sPartyMenuAction_GiveTakeItemCancel), - [ACTIONS_MAIL] = ARRAY_COUNT(sPartyMenuAction_ReadTakeMailCancel), - [ACTIONS_REGISTER] = ARRAY_COUNT(sPartyMenuAction_RegisterSummaryCancel), - [ACTIONS_TRADE] = ARRAY_COUNT(sPartyMenuAction_TradeSummaryCancel1), - [ACTIONS_SPIN_TRADE] = ARRAY_COUNT(sPartyMenuAction_TradeSummaryCancel2), - [ACTIONS_TAKEITEM_TOSS] = ARRAY_COUNT(sPartyMenuAction_TakeItemTossCancel) -}; - -static const u16 sFieldMoves[] = -{ - MOVE_CUT, MOVE_FLASH, MOVE_ROCK_SMASH, MOVE_STRENGTH, MOVE_SURF, MOVE_FLY, MOVE_DIVE, MOVE_WATERFALL, MOVE_TELEPORT, - MOVE_DIG, MOVE_SECRET_POWER, MOVE_MILK_DRINK, MOVE_SOFT_BOILED, MOVE_SWEET_SCENT, FIELD_MOVE_TERMINATOR -}; - -struct -{ - bool8 (*fieldMoveFunc)(void); - u8 msgId; -} static const sFieldMoveCursorCallbacks[] = -{ - [FIELD_MOVE_CUT] = {SetUpFieldMove_Cut, PARTY_MSG_NOTHING_TO_CUT}, - [FIELD_MOVE_FLASH] = {SetUpFieldMove_Flash, PARTY_MSG_CANT_USE_HERE}, - [FIELD_MOVE_ROCK_SMASH] = {SetUpFieldMove_RockSmash, PARTY_MSG_CANT_USE_HERE}, - [FIELD_MOVE_STRENGTH] = {SetUpFieldMove_Strength, PARTY_MSG_CANT_USE_HERE}, - [FIELD_MOVE_SURF] = {SetUpFieldMove_Surf, PARTY_MSG_CANT_SURF_HERE}, - [FIELD_MOVE_FLY] = {SetUpFieldMove_Fly, PARTY_MSG_CANT_USE_HERE}, - [FIELD_MOVE_DIVE] = {SetUpFieldMove_Dive, PARTY_MSG_CANT_USE_HERE}, - [FIELD_MOVE_WATERFALL] = {SetUpFieldMove_Waterfall, PARTY_MSG_CANT_USE_HERE}, - [FIELD_MOVE_TELEPORT] = {SetUpFieldMove_Teleport, PARTY_MSG_CANT_USE_HERE}, - [FIELD_MOVE_DIG] = {SetUpFieldMove_Dig, PARTY_MSG_CANT_USE_HERE}, - [FIELD_MOVE_SECRET_POWER] = {SetUpFieldMove_SecretPower, PARTY_MSG_CANT_USE_HERE}, - [FIELD_MOVE_MILK_DRINK] = {SetUpFieldMove_SoftBoiled, PARTY_MSG_NOT_ENOUGH_HP}, - [FIELD_MOVE_SOFT_BOILED] = {SetUpFieldMove_SoftBoiled, PARTY_MSG_NOT_ENOUGH_HP}, - [FIELD_MOVE_SWEET_SCENT] = {SetUpFieldMove_SweetScent, PARTY_MSG_CANT_USE_HERE}, -}; - -static const u8 *const sUnionRoomTradeMessages[] = -{ - [UR_TRADE_MSG_NOT_MON_PARTNER_WANTS - 1] = gText_NotPkmnOtherTrainerWants, - [UR_TRADE_MSG_NOT_EGG - 1] = gText_ThatIsntAnEgg, - [UR_TRADE_MSG_MON_CANT_BE_TRADED_1 - 1] = gText_PkmnCantBeTradedNow, - [UR_TRADE_MSG_MON_CANT_BE_TRADED_2 - 1] = gText_PkmnCantBeTradedNow, - [UR_TRADE_MSG_PARTNERS_MON_CANT_BE_TRADED - 1] = gText_OtherTrainersPkmnCantBeTraded, - [UR_TRADE_MSG_EGG_CANT_BE_TRADED -1] = gText_EggCantBeTradedNow, - [UR_TRADE_MSG_PARTNER_CANT_ACCEPT_MON - 1] = gText_OtherTrainerCantAcceptPkmn, - [UR_TRADE_MSG_CANT_TRADE_WITH_PARTNER_1 - 1] = gText_CantTradeWithTrainer, - [UR_TRADE_MSG_CANT_TRADE_WITH_PARTNER_2 - 1] = gText_CantTradeWithTrainer, -}; - -static const u32 sHeldItemGfx[] = INCBIN_U32("graphics/interface/hold_icons.4bpp"); -static const u16 sHeldItemPalette[] = INCBIN_U16("graphics/interface/hold_icons.gbapal"); - -static const struct OamData sOamData_HeldItem = -{ - .y = 0, - .affineMode = 0, - .objMode = 0, - .mosaic = 0, - .bpp = 0, - .shape = SPRITE_SHAPE(8x8), - .x = 0, - .matrixNum = 0, - .size = SPRITE_SIZE(8x8), - .tileNum = 0, - .priority = 1, - .paletteNum = 0, - .affineParam = 0, -}; - -static const union AnimCmd sSpriteAnim_HeldItem[] = -{ - ANIMCMD_FRAME(0, 1), - ANIMCMD_END -}; - -static const union AnimCmd sSpriteAnim_HeldMail[] = -{ - ANIMCMD_FRAME(1, 1), - ANIMCMD_END -}; - -static const union AnimCmd *const sSpriteAnimTable_HeldItem[] = -{ - sSpriteAnim_HeldItem, - sSpriteAnim_HeldMail, -}; - -static const struct SpriteSheet sSpriteSheet_HeldItem = -{ - sHeldItemGfx, sizeof(sHeldItemGfx), 0xd750 -}; - -static const struct SpritePalette sSpritePalette_HeldItem = -{ - sHeldItemPalette, 0xd750 -}; - -static const struct SpriteTemplate sSpriteTemplate_HeldItem = -{ - 0xd750, - 0xd750, - &sOamData_HeldItem, - sSpriteAnimTable_HeldItem, - NULL, - gDummySpriteAffineAnimTable, - SpriteCallbackDummy -}; - -static const struct OamData sOamData_MenuPokeball = -{ - .y = 0, - .affineMode = 0, - .objMode = 0, - .mosaic = 0, - .bpp = 0, - .shape = SPRITE_SHAPE(32x32), - .x = 0, - .matrixNum = 0, - .size = SPRITE_SIZE(32x32), - .tileNum = 0, - .priority = 1, - .paletteNum = 0, - .affineParam = 0 -}; - -static const union AnimCmd sPokeballAnim_Closed[] = -{ - ANIMCMD_FRAME(0, 0), - ANIMCMD_END -}; - -static const union AnimCmd sPokeballAnim_Open[] = -{ - ANIMCMD_FRAME(16, 0), - ANIMCMD_END -}; - -static const union AnimCmd *const sSpriteAnimTable_MenuPokeball[] = -{ - sPokeballAnim_Closed, - sPokeballAnim_Open -}; - -static const struct CompressedSpriteSheet sSpriteSheet_MenuPokeball = -{ - gPartyMenuPokeball_Gfx, 0x400, 0x04b0 -}; - -static const struct CompressedSpritePalette sSpritePalette_MenuPokeball = -{ - gPartyMenuPokeball_Pal, 0x04b0 -}; - -// Used for the pokeball sprite on each party slot / Cancel button -static const struct SpriteTemplate sSpriteTemplate_MenuPokeball = -{ - .tileTag = 0x04b0, - .paletteTag = 0x04b0, - .oam = &sOamData_MenuPokeball, - .anims = sSpriteAnimTable_MenuPokeball, - .images = NULL, - .affineAnims = gDummySpriteAffineAnimTable, - .callback = SpriteCallbackDummy, -}; - -static const struct OamData sOamData_MenuPokeballSmall = -{ - .y = 0, - .affineMode = 0, - .objMode = 0, - .mosaic = 0, - .bpp = 0, - .shape = SPRITE_SHAPE(16x16), - .x = 0, - .matrixNum = 0, - .size = SPRITE_SIZE(16x16), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, - .affineParam = 0 -}; - -static const union AnimCmd sSmallPokeballAnim_Closed[] = -{ - ANIMCMD_FRAME(0, 0), - ANIMCMD_END -}; - -static const union AnimCmd sSmallPokeballAnim_Open[] = -{ - ANIMCMD_FRAME(4, 0), - ANIMCMD_END -}; - -static const union AnimCmd sSmallPokeballAnim_Blank1[] = -{ - ANIMCMD_FRAME(8, 0), - ANIMCMD_END -}; - -static const union AnimCmd sSmallPokeballAnim_Blank2[] = -{ - ANIMCMD_FRAME(12, 0), - ANIMCMD_END -}; - -static const union AnimCmd sSmallPokeballAnim_Blank3[] = -{ - ANIMCMD_FRAME(16, 0), - ANIMCMD_END -}; - -static const union AnimCmd sSmallPokeballAnim_Blank4[] = -{ - ANIMCMD_FRAME(20, 0), - ANIMCMD_END -}; - -// The blanks below are never used -static const union AnimCmd *const sSpriteAnimTable_MenuPokeballSmall[] = -{ - sSmallPokeballAnim_Closed, - sSmallPokeballAnim_Open, - sSmallPokeballAnim_Blank1, - sSmallPokeballAnim_Blank2, - sSmallPokeballAnim_Blank3, - sSmallPokeballAnim_Blank4 -}; - -static const struct CompressedSpriteSheet sSpriteSheet_MenuPokeballSmall = -{ - gPartyMenuPokeballSmall_Gfx, 0x0300, 0x04b1 -}; - -// Used for the pokeball sprite next to Cancel and Confirm when both are present, otherwise sSpriteTemplate_MenuPokeball is used -static const struct SpriteTemplate sSpriteTemplate_MenuPokeballSmall = -{ - .tileTag = 1201, - .paletteTag = 1200, - .oam = &sOamData_MenuPokeballSmall, - .anims = sSpriteAnimTable_MenuPokeballSmall, - .images = NULL, - .affineAnims = gDummySpriteAffineAnimTable, - .callback = SpriteCallbackDummy, -}; - -static const struct OamData sOamData_StatusCondition = -{ - .y = 0, - .affineMode = 0, - .objMode = 0, - .mosaic = 0, - .bpp = 0, - .shape = SPRITE_SHAPE(32x8), - .x = 0, - .matrixNum = 0, - .size = SPRITE_SIZE(32x8), - .tileNum = 0, - .priority = 1, - .paletteNum = 0, - .affineParam = 0 -}; - -static const union AnimCmd sSpriteAnim_StatusPoison[] = -{ - ANIMCMD_FRAME(0, 0), - ANIMCMD_END -}; - -static const union AnimCmd sSpriteAnim_StatusParalyzed[] = -{ - ANIMCMD_FRAME(4, 0), - ANIMCMD_END -}; - -static const union AnimCmd sSpriteAnim_StatusSleep[] = -{ - ANIMCMD_FRAME(8, 0), - ANIMCMD_END -}; - -static const union AnimCmd sSpriteAnim_StatusFrozen[] = -{ - ANIMCMD_FRAME(12, 0), - ANIMCMD_END -}; - -static const union AnimCmd sSpriteAnim_StatusBurn[] = -{ - ANIMCMD_FRAME(16, 0), - ANIMCMD_END -}; - -static const union AnimCmd sSpriteAnim_StatusPokerus[] = -{ - ANIMCMD_FRAME(20, 0), - ANIMCMD_END -}; - -static const union AnimCmd sSpriteAnim_StatusFaint[] = -{ - ANIMCMD_FRAME(24, 0), - ANIMCMD_END -}; - -static const union AnimCmd sSpriteAnim_Blank[] = -{ - ANIMCMD_FRAME(28, 0), - ANIMCMD_END -}; - -static const union AnimCmd *const sSpriteTemplate_StatusCondition[] = -{ - sSpriteAnim_StatusPoison, - sSpriteAnim_StatusParalyzed, - sSpriteAnim_StatusSleep, - sSpriteAnim_StatusFrozen, - sSpriteAnim_StatusBurn, - sSpriteAnim_StatusPokerus, - sSpriteAnim_StatusFaint, - sSpriteAnim_Blank -}; - -static const struct CompressedSpriteSheet sSpriteSheet_StatusIcons = -{ - gStatusGfx_Icons, 0x400, 1202 -}; - -static const struct CompressedSpritePalette sSpritePalette_StatusIcons = -{ - gStatusPal_Icons, 1202 -}; - -static const struct SpriteTemplate sSpriteTemplate_StatusIcons = -{ - .tileTag = 1202, - .paletteTag = 1202, - .oam = &sOamData_StatusCondition, - .anims = sSpriteTemplate_StatusCondition, - .images = NULL, - .affineAnims = gDummySpriteAffineAnimTable, - .callback = SpriteCallbackDummy, -}; - -// Mask for the partners party in a multi battle -// TRUE if in the partners party, FALSE otherwise -// The 7th slot is Cancel, and the 8th slot is unreachable -static const bool8 sMultiBattlePartnersPartyMask[PARTY_SIZE + 2] = -{ - FALSE, - TRUE, - FALSE, - FALSE, - TRUE, - TRUE, - FALSE -}; - -static const u8 *const sUnused_StatStrings[] = -{ - gText_HP4, - gText_Attack3, - gText_Defense3, - gText_SpAtk4, - gText_SpDef4, - gText_Speed2 -}; - -static const u16 sTMHMMoves[] = -{ - MOVE_FOCUS_PUNCH, - MOVE_DRAGON_CLAW, - MOVE_WATER_PULSE, - MOVE_CALM_MIND, - MOVE_ROAR, - MOVE_TOXIC, - MOVE_HAIL, - MOVE_BULK_UP, - MOVE_BULLET_SEED, - MOVE_HIDDEN_POWER, - MOVE_SUNNY_DAY, - MOVE_TAUNT, - MOVE_ICE_BEAM, - MOVE_BLIZZARD, - MOVE_HYPER_BEAM, - MOVE_LIGHT_SCREEN, - MOVE_PROTECT, - MOVE_RAIN_DANCE, - MOVE_GIGA_DRAIN, - MOVE_SAFEGUARD, - MOVE_FRUSTRATION, - MOVE_SOLAR_BEAM, - MOVE_IRON_TAIL, - MOVE_THUNDERBOLT, - MOVE_THUNDER, - MOVE_EARTHQUAKE, - MOVE_RETURN, - MOVE_DIG, - MOVE_PSYCHIC, - MOVE_SHADOW_BALL, - MOVE_BRICK_BREAK, - MOVE_DOUBLE_TEAM, - MOVE_REFLECT, - MOVE_SHOCK_WAVE, - MOVE_FLAMETHROWER, - MOVE_SLUDGE_BOMB, - MOVE_SANDSTORM, - MOVE_FIRE_BLAST, - MOVE_ROCK_TOMB, - MOVE_AERIAL_ACE, - MOVE_TORMENT, - MOVE_FACADE, - MOVE_SECRET_POWER, - MOVE_REST, - MOVE_ATTRACT, - MOVE_THIEF, - MOVE_STEEL_WING, - MOVE_SKILL_SWAP, - MOVE_SNATCH, - MOVE_OVERHEAT, - MOVE_CUT, - MOVE_FLY, - MOVE_SURF, - MOVE_STRENGTH, - MOVE_FLASH, - MOVE_ROCK_SMASH, - MOVE_WATERFALL, - MOVE_DIVE, -}; +#include "data/party_menu.h" // code static void InitPartyMenu(u8 menuType, u8 layout, u8 partyAction, bool8 keepCursorPos, u8 messageId, TaskFunc task, MainCallback callback) From 8055548fa4d6707ac311e32afc9614d4603115db Mon Sep 17 00:00:00 2001 From: GriffinR Date: Thu, 31 Oct 2019 17:00:37 -0400 Subject: [PATCH 38/46] Document legendary scripts --- asm/macros/event.inc | 2 +- data/event_scripts.s | 16 ++-- data/maps/AncientTomb/map.json | 8 +- data/maps/AncientTomb/scripts.inc | 48 +++++------ .../BattleFrontier_OutsideWest/scripts.inc | 2 +- data/maps/BirthIsland_Exterior/map.json | 2 +- data/maps/BirthIsland_Exterior/scripts.inc | 56 ++++++------ data/maps/BirthIsland_Harbor/map.json | 2 +- data/maps/BirthIsland_Harbor/scripts.inc | 8 +- data/maps/CaveOfOrigin_1F/scripts.inc | 2 +- data/maps/CaveOfOrigin_B1F/map.json | 2 +- data/maps/CaveOfOrigin_B1F/scripts.inc | 54 ++++++------ data/maps/CaveOfOrigin_Entrance/scripts.inc | 4 +- .../scripts.inc | 2 +- .../scripts.inc | 2 +- .../scripts.inc | 2 +- data/maps/DesertRuins/map.json | 8 +- data/maps/DesertRuins/scripts.inc | 48 +++++------ data/maps/FarawayIsland_Entrance/map.json | 10 +-- data/maps/FarawayIsland_Entrance/scripts.inc | 14 +-- data/maps/FarawayIsland_Interior/map.json | 2 +- data/maps/FarawayIsland_Interior/scripts.inc | 86 +++++++++---------- data/maps/IslandCave/map.json | 8 +- data/maps/IslandCave/scripts.inc | 64 +++++++------- data/maps/MarineCave_End/map.json | 2 +- data/maps/MarineCave_End/scripts.inc | 28 +++--- data/maps/MarineCave_Entrance/scripts.inc | 4 +- data/maps/NavelRock_Bottom/map.json | 2 +- data/maps/NavelRock_Bottom/scripts.inc | 30 +++---- data/maps/NavelRock_Harbor/map.json | 2 +- data/maps/NavelRock_Harbor/scripts.inc | 8 +- data/maps/NavelRock_Top/map.json | 2 +- data/maps/NavelRock_Top/scripts.inc | 46 +++++----- data/maps/SealedChamber_InnerRoom/scripts.inc | 14 +-- data/maps/SealedChamber_OuterRoom/scripts.inc | 24 +++--- data/maps/SkyPillar_Top/map.json | 6 +- data/maps/SkyPillar_Top/scripts.inc | 72 ++++++++-------- data/maps/SouthernIsland_Exterior/map.json | 4 +- data/maps/SouthernIsland_Exterior/scripts.inc | 22 ++--- data/maps/SouthernIsland_Interior/map.json | 2 +- data/maps/SouthernIsland_Interior/scripts.inc | 78 ++++++++--------- data/maps/TerraCave_End/map.json | 2 +- data/maps/TerraCave_End/scripts.inc | 28 +++--- .../maps/Underwater_SealedChamber/scripts.inc | 2 +- data/script_cmd_table.inc | 2 +- data/scripts/cave_of_origin.inc | 23 +++-- data/scripts/new_game.inc | 2 +- data/specials.inc | 2 +- data/text/braille.inc | 6 +- include/constants/flags.h | 2 +- include/event_scripts.h | 2 +- src/field_control_avatar.c | 2 +- src/field_specials.c | 2 +- src/fldeff_cut.c | 4 +- src/scrcmd.c | 8 +- 55 files changed, 439 insertions(+), 446 deletions(-) diff --git a/asm/macros/event.inc b/asm/macros/event.inc index 39510c2071..64f2cdc920 100644 --- a/asm/macros/event.inc +++ b/asm/macros/event.inc @@ -1506,7 +1506,7 @@ .byte 0xd9 .endm - .macro hidebox2 + .macro closebraillemessage .byte 0xda .endm diff --git a/data/event_scripts.s b/data/event_scripts.s index 6d80d4eae8..32e17aff61 100644 --- a/data/event_scripts.s +++ b/data/event_scripts.s @@ -910,30 +910,26 @@ RusturfTunnel_EventScript_272216:: @ 8272216 setflag FLAG_RUSTURF_TUNNEL_OPENED return -EventScript_27222B:: @ 827222B +EventScript_UnusedBoardFerry:: @ 827222B delay 30 applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceFastestUp waitmovement 0 showobjectat 255, MAP_PETALBURG_CITY delay 30 - applymovement EVENT_OBJ_ID_PLAYER, Movement_27224E + applymovement EVENT_OBJ_ID_PLAYER, Movement_UnusedBoardFerry waitmovement 0 delay 30 return -Movement_27224E: @ 827224E +Movement_UnusedBoardFerry: @ 827224E walk_up step_end -BattleFrontier_OutsideWest_EventScript_272250:: @ 8272250 -BirthIsland_Harbor_EventScript_272250:: @ 8272250 -FarawayIsland_Entrance_EventScript_272250:: @ 8272250 -NavelRock_Harbor_EventScript_272250:: @ 8272250 -SouthernIsland_Exterior_EventScript_272250:: @ 8272250 +Common_EventScript_FerryDepartIsland:: @ 8272250 compare VAR_FACING, DIR_SOUTH - call_if_eq BattleFrontier_OutsideWest_EventScript_242A21 + call_if_eq Ferry_EventScript_DepartIslandSouth compare VAR_FACING, DIR_WEST - call_if_eq BattleFrontier_OutsideWest_EventScript_242A2C + call_if_eq Ferry_EventScript_DepartIslandWest delay 30 hideobjectat 255, MAP_PETALBURG_CITY call Common_EventScript_FerryDepart diff --git a/data/maps/AncientTomb/map.json b/data/maps/AncientTomb/map.json index 9de100bff1..9229f7581c 100644 --- a/data/maps/AncientTomb/map.json +++ b/data/maps/AncientTomb/map.json @@ -24,7 +24,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "AncientTomb_EventScript_23905A", + "script": "AncientTomb_EventScript_Registeel", "flag": "FLAG_HIDE_REGISTEEL" } ], @@ -59,7 +59,7 @@ "y": 20, "elevation": 0, "player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY", - "script": "AncientTomb_EventScript_239033" + "script": "AncientTomb_EventScript_CaveEntranceMiddle" }, { "type": "sign", @@ -67,7 +67,7 @@ "y": 20, "elevation": 0, "player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY", - "script": "AncientTomb_EventScript_239050" + "script": "AncientTomb_EventScript_CaveEntranceSide" }, { "type": "sign", @@ -75,7 +75,7 @@ "y": 20, "elevation": 0, "player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY", - "script": "AncientTomb_EventScript_239050" + "script": "AncientTomb_EventScript_CaveEntranceSide" } ] } \ No newline at end of file diff --git a/data/maps/AncientTomb/scripts.inc b/data/maps/AncientTomb/scripts.inc index 322bd06b78..95dd85d286 100644 --- a/data/maps/AncientTomb/scripts.inc +++ b/data/maps/AncientTomb/scripts.inc @@ -1,14 +1,14 @@ AncientTomb_MapScripts:: @ 8238FB3 - map_script MAP_SCRIPT_ON_RESUME, AncientTomb_MapScript1_238FC3 - map_script MAP_SCRIPT_ON_LOAD, AncientTomb_MapScript1_238FF2 + map_script MAP_SCRIPT_ON_RESUME, AncientTomb_OnResume + map_script MAP_SCRIPT_ON_LOAD, AncientTomb_OnLoad map_script MAP_SCRIPT_ON_TRANSITION, AncientTomb_OnTransition .byte 0 -AncientTomb_MapScript1_238FC3: @ 8238FC3 - call_if_set FLAG_SYS_CTRL_OBJ_DELETE, AncientTomb_EventScript_238FCD +AncientTomb_OnResume: @ 8238FC3 + call_if_set FLAG_SYS_CTRL_OBJ_DELETE, AncientTomb_EventScript_TryRemoveRegisteel end -AncientTomb_EventScript_238FCD:: @ 8238FCD +AncientTomb_EventScript_TryRemoveRegisteel:: @ 8238FCD specialvar VAR_RESULT, GetBattleOutcome compare VAR_RESULT, B_OUTCOME_CAUGHT goto_if_ne Common_EventScript_NopReturn @@ -17,18 +17,18 @@ AncientTomb_EventScript_238FCD:: @ 8238FCD AncientTomb_OnTransition: @ 8238FE1 setflag FLAG_LANDMARK_ANCIENT_TOMB - call_if_unset FLAG_DEFEATED_REGISTEEL, AncientTomb_EventScript_238FEE + call_if_unset FLAG_DEFEATED_REGISTEEL, AncientTomb_EventScript_ShowRegisteel end -AncientTomb_EventScript_238FEE:: @ 8238FEE +AncientTomb_EventScript_ShowRegisteel:: @ 8238FEE clearflag FLAG_HIDE_REGISTEEL return -AncientTomb_MapScript1_238FF2: @ 8238FF2 - call_if_unset FLAG_SYS_REGISTEEL_PUZZLE_COMPLETED, AncientTomb_EventScript_238FFC +AncientTomb_OnLoad: @ 8238FF2 + call_if_unset FLAG_SYS_REGISTEEL_PUZZLE_COMPLETED, AncientTomb_EventScript_HideRegiEntrance end -AncientTomb_EventScript_238FFC:: @ 8238FFC +AncientTomb_EventScript_HideRegiEntrance:: @ 8238FFC setmetatile 7, 19, METATILE_Cave_EntranceCover, 1 setmetatile 8, 19, METATILE_Cave_EntranceCover, 1 setmetatile 9, 19, METATILE_Cave_EntranceCover, 1 @@ -37,29 +37,29 @@ AncientTomb_EventScript_238FFC:: @ 8238FFC setmetatile 9, 20, METATILE_Cave_SealedChamberBraille_Mid, 1 return -AncientTomb_EventScript_239033:: @ 8239033 +AncientTomb_EventScript_CaveEntranceMiddle:: @ 8239033 lockall - goto_if_set FLAG_SYS_REGISTEEL_PUZZLE_COMPLETED, AncientTomb_EventScript_239046 - braillemessage AncientTomb_Braille_2A6D06 + goto_if_set FLAG_SYS_REGISTEEL_PUZZLE_COMPLETED, AncientTomb_EventScript_BigHoleInWall + braillemessage AncientTomb_Braille_ShineInTheMiddle waitbuttonpress - hidebox2 + closebraillemessage releaseall end -AncientTomb_EventScript_239046:: @ 8239046 +AncientTomb_EventScript_BigHoleInWall:: @ 8239046 msgbox gText_BigHoleInTheWall, MSGBOX_DEFAULT releaseall end -AncientTomb_EventScript_239050:: @ 8239050 +AncientTomb_EventScript_CaveEntranceSide:: @ 8239050 lockall - braillemessage AncientTomb_Braille_2A6D06 + braillemessage AncientTomb_Braille_ShineInTheMiddle waitbuttonpress - hidebox2 + closebraillemessage releaseall end -AncientTomb_EventScript_23905A:: @ 823905A +AncientTomb_EventScript_Registeel:: @ 823905A lock faceplayer waitse @@ -73,21 +73,21 @@ AncientTomb_EventScript_23905A:: @ 823905A clearflag FLAG_SYS_CTRL_OBJ_DELETE specialvar VAR_RESULT, GetBattleOutcome compare VAR_RESULT, B_OUTCOME_WON - goto_if_eq AncientTomb_EventScript_2390A1 + goto_if_eq AncientTomb_EventScript_DefeatedRegisteel compare VAR_RESULT, B_OUTCOME_RAN - goto_if_eq AncientTomb_EventScript_2390AA + goto_if_eq AncientTomb_EventScript_RanFromRegisteel compare VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED - goto_if_eq AncientTomb_EventScript_2390AA + goto_if_eq AncientTomb_EventScript_RanFromRegisteel setflag FLAG_DEFEATED_REGISTEEL release end -AncientTomb_EventScript_2390A1:: @ 82390A1 +AncientTomb_EventScript_DefeatedRegisteel:: @ 82390A1 setflag FLAG_DEFEATED_REGISTEEL goto Common_EventScript_RemoveStaticPokemon end -AncientTomb_EventScript_2390AA:: @ 82390AA +AncientTomb_EventScript_RanFromRegisteel:: @ 82390AA setvar VAR_0x8004, SPECIES_REGISTEEL goto Common_EventScript_LegendaryFlewAway end diff --git a/data/maps/BattleFrontier_OutsideWest/scripts.inc b/data/maps/BattleFrontier_OutsideWest/scripts.inc index 1f3d61628e..5d4d55ab4e 100644 --- a/data/maps/BattleFrontier_OutsideWest/scripts.inc +++ b/data/maps/BattleFrontier_OutsideWest/scripts.inc @@ -68,7 +68,7 @@ BattleFrontier_OutsideWest_EventScript_23D4BA:: @ 823D4BA delay 30 hideobjectat 3, MAP_BATTLE_FRONTIER_OUTSIDE_WEST setvar VAR_0x8004, 2 - call BattleFrontier_OutsideWest_EventScript_272250 + call Common_EventScript_FerryDepartIsland return BattleFrontier_OutsideWest_EventScript_23D4D8:: @ 823D4D8 diff --git a/data/maps/BirthIsland_Exterior/map.json b/data/maps/BirthIsland_Exterior/map.json index c3e5ddddf6..50bd57f0b7 100644 --- a/data/maps/BirthIsland_Exterior/map.json +++ b/data/maps/BirthIsland_Exterior/map.json @@ -24,7 +24,7 @@ "movement_range_y": 1, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "BirthIsland_Exterior_EventScript_267F83", + "script": "BirthIsland_Exterior_EventScript_Triangle", "flag": "FLAG_HIDE_BIRTH_ISLAND_DEOXYS_TRIANGLE" }, { diff --git a/data/maps/BirthIsland_Exterior/scripts.inc b/data/maps/BirthIsland_Exterior/scripts.inc index 72469f5194..b51940a7c6 100644 --- a/data/maps/BirthIsland_Exterior/scripts.inc +++ b/data/maps/BirthIsland_Exterior/scripts.inc @@ -1,11 +1,11 @@ BirthIsland_Exterior_MapScripts:: @ 8267F15 map_script MAP_SCRIPT_ON_TRANSITION, BirthIsland_Exterior_OnTransition - map_script MAP_SCRIPT_ON_RESUME, BirthIsland_Exterior_MapScript1_267F65 - map_script MAP_SCRIPT_ON_RETURN_TO_FIELD, BirthIsland_Exterior_MapScript1_267F25 + map_script MAP_SCRIPT_ON_RESUME, BirthIsland_Exterior_OnResume + map_script MAP_SCRIPT_ON_RETURN_TO_FIELD, BirthIsland_Exterior_OnReturnToField .byte 0 -BirthIsland_Exterior_MapScript1_267F25: @ 8267F25 - special sub_813B1D0 +BirthIsland_Exterior_OnReturnToField: @ 8267F25 + special SetDeoxysRockPalette end BirthIsland_Exterior_OnTransition: @ 8267F29 @@ -13,57 +13,57 @@ BirthIsland_Exterior_OnTransition: @ 8267F29 setvar VAR_OBJ_GFX_ID_0, EVENT_OBJ_GFX_RIVAL_BRENDAN_NORMAL setvar VAR_DEOXYS_ROCK_STEP_COUNT, 0 setvar VAR_DEOXYS_ROCK_LEVEL, 0 - call_if_set FLAG_BATTLED_DEOXYS, BirthIsland_Exterior_EventScript_267F4E - call_if_unset FLAG_BATTLED_DEOXYS, BirthIsland_Exterior_EventScript_267F55 + call_if_set FLAG_BATTLED_DEOXYS, BirthIsland_Exterior_EventScript_HideDeoxysAndPuzzle + call_if_unset FLAG_BATTLED_DEOXYS, BirthIsland_Exterior_EventScript_TryShowDeoxysPuzzle end -BirthIsland_Exterior_EventScript_267F4E:: @ 8267F4E +BirthIsland_Exterior_EventScript_HideDeoxysAndPuzzle:: @ 8267F4E setflag FLAG_HIDE_DEOXYS setflag FLAG_HIDE_BIRTH_ISLAND_DEOXYS_TRIANGLE return -BirthIsland_Exterior_EventScript_267F55:: @ 8267F55 +BirthIsland_Exterior_EventScript_TryShowDeoxysPuzzle:: @ 8267F55 goto_if_set FLAG_DEFEATED_DEOXYS, Common_EventScript_NopReturn clearflag FLAG_HIDE_BIRTH_ISLAND_DEOXYS_TRIANGLE clearflag FLAG_DEOXYS_ROCK_COMPLETE return -BirthIsland_Exterior_MapScript1_267F65: @ 8267F65 - call_if_set FLAG_SYS_CTRL_OBJ_DELETE, BirthIsland_Exterior_EventScript_267F6F +BirthIsland_Exterior_OnResume: @ 8267F65 + call_if_set FLAG_SYS_CTRL_OBJ_DELETE, BirthIsland_Exterior_EventScript_TryRemoveDeoxys end -BirthIsland_Exterior_EventScript_267F6F:: @ 8267F6F +BirthIsland_Exterior_EventScript_TryRemoveDeoxys:: @ 8267F6F specialvar VAR_RESULT, GetBattleOutcome compare VAR_RESULT, B_OUTCOME_CAUGHT goto_if_ne Common_EventScript_NopReturn removeobject 2 return -BirthIsland_Exterior_EventScript_267F83:: @ 8267F83 +BirthIsland_Exterior_EventScript_Triangle:: @ 8267F83 lock faceplayer special DoDeoxysRockInteraction waitstate switch VAR_RESULT - case 0, BirthIsland_Exterior_EventScript_267FBB - case 1, BirthIsland_Exterior_EventScript_267FBD - case 2, BirthIsland_Exterior_EventScript_267FC1 - case 3, BirthIsland_Exterior_EventScript_267FBF + case 0, BirthIsland_Exterior_EventScript_NotSolved1 + case 1, BirthIsland_Exterior_EventScript_NotSolved2 + case 2, BirthIsland_Exterior_EventScript_Deoxys + case 3, BirthIsland_Exterior_EventScript_NotSolved3 end -BirthIsland_Exterior_EventScript_267FBB:: @ 8267FBB +BirthIsland_Exterior_EventScript_NotSolved1:: @ 8267FBB release end -BirthIsland_Exterior_EventScript_267FBD:: @ 8267FBD +BirthIsland_Exterior_EventScript_NotSolved2:: @ 8267FBD release end -BirthIsland_Exterior_EventScript_267FBF:: @ 8267FBF +BirthIsland_Exterior_EventScript_NotSolved3:: @ 8267FBF release end -BirthIsland_Exterior_EventScript_267FC1:: @ 8267FC1 +BirthIsland_Exterior_EventScript_Deoxys:: @ 8267FC1 waitse setfieldeffectargument 0, 1 setfieldeffectargument 1, 58 @@ -72,7 +72,7 @@ BirthIsland_Exterior_EventScript_267FC1:: @ 8267FC1 playbgm MUS_RG_DEOEYE, 0 waitfieldeffect FLDEFF_65 addobject 2 - applymovement 2, BirthIsland_Exterior_Movement_268054 + applymovement 2, BirthIsland_Exterior_Movement_DeoxysApproach waitmovement 0 waitse playmoncry SPECIES_DEOXYS, 2 @@ -80,7 +80,7 @@ BirthIsland_Exterior_EventScript_267FC1:: @ 8267FC1 waitmoncry setvar VAR_LAST_TALKED, 2 setvar VAR_0x8004, SPECIES_DEOXYS - setvar VAR_0x8005, 30 @level + setvar VAR_0x8005, 30 @ level setvar VAR_0x8006, ITEM_NONE special CreateObedientEnemyMon setflag FLAG_SYS_CTRL_OBJ_DELETE @@ -89,27 +89,27 @@ BirthIsland_Exterior_EventScript_267FC1:: @ 8267FC1 clearflag FLAG_SYS_CTRL_OBJ_DELETE specialvar VAR_RESULT, GetBattleOutcome compare VAR_RESULT, B_OUTCOME_WON - goto_if_eq BirthIsland_Exterior_EventScript_26803B + goto_if_eq BirthIsland_Exterior_EventScript_DefeatedDeoxys compare VAR_RESULT, B_OUTCOME_RAN - goto_if_eq BirthIsland_Exterior_EventScript_268049 + goto_if_eq BirthIsland_Exterior_EventScript_RanFromDeoxys compare VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED - goto_if_eq BirthIsland_Exterior_EventScript_268049 + goto_if_eq BirthIsland_Exterior_EventScript_RanFromDeoxys setflag FLAG_BATTLED_DEOXYS release end -BirthIsland_Exterior_EventScript_26803B:: @ 826803B +BirthIsland_Exterior_EventScript_DefeatedDeoxys:: @ 826803B setflag FLAG_DEFEATED_DEOXYS setvar VAR_0x8004, SPECIES_DEOXYS goto Common_EventScript_LegendaryFlewAway end -BirthIsland_Exterior_EventScript_268049:: @ 8268049 +BirthIsland_Exterior_EventScript_RanFromDeoxys:: @ 8268049 setvar VAR_0x8004, SPECIES_DEOXYS goto Common_EventScript_LegendaryFlewAway end -BirthIsland_Exterior_Movement_268054: @ 8268054 +BirthIsland_Exterior_Movement_DeoxysApproach: @ 8268054 walk_slow_down walk_slow_down walk_slow_down diff --git a/data/maps/BirthIsland_Harbor/map.json b/data/maps/BirthIsland_Harbor/map.json index 48937d4824..ea124d9efb 100644 --- a/data/maps/BirthIsland_Harbor/map.json +++ b/data/maps/BirthIsland_Harbor/map.json @@ -24,7 +24,7 @@ "movement_range_y": 1, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "BirthIsland_Harbor_EventScript_26805D", + "script": "BirthIsland_Harbor_EventScript_Sailor", "flag": "0" }, { diff --git a/data/maps/BirthIsland_Harbor/scripts.inc b/data/maps/BirthIsland_Harbor/scripts.inc index a421521831..b12123c943 100644 --- a/data/maps/BirthIsland_Harbor/scripts.inc +++ b/data/maps/BirthIsland_Harbor/scripts.inc @@ -1,12 +1,12 @@ BirthIsland_Harbor_MapScripts:: @ 826805C .byte 0 -BirthIsland_Harbor_EventScript_26805D:: @ 826805D +BirthIsland_Harbor_EventScript_Sailor:: @ 826805D lock faceplayer msgbox BirthIsland_Harbor_Text_SailorReturn, MSGBOX_YESNO compare VAR_RESULT, 0 - goto_if_eq BirthIsland_Harbor_EventScript_2680A2 + goto_if_eq BirthIsland_Harbor_EventScript_AsYouLike msgbox EventTicket_Text_SailHome, MSGBOX_DEFAULT closemessage applymovement VAR_LAST_TALKED, Common_Movement_WalkInPlaceFastestDown @@ -14,13 +14,13 @@ BirthIsland_Harbor_EventScript_26805D:: @ 826805D delay 30 hideobjectat 1, MAP_BIRTH_ISLAND_HARBOR setvar VAR_0x8004, 2 - call BirthIsland_Harbor_EventScript_272250 + call Common_EventScript_FerryDepartIsland warp MAP_LILYCOVE_CITY_HARBOR, 255, 8, 11 waitstate release end -BirthIsland_Harbor_EventScript_2680A2:: @ 82680A2 +BirthIsland_Harbor_EventScript_AsYouLike:: @ 82680A2 msgbox EventTicket_Text_AsYouLike, MSGBOX_DEFAULT release end diff --git a/data/maps/CaveOfOrigin_1F/scripts.inc b/data/maps/CaveOfOrigin_1F/scripts.inc index 8c72ec4b8d..de1d979d43 100644 --- a/data/maps/CaveOfOrigin_1F/scripts.inc +++ b/data/maps/CaveOfOrigin_1F/scripts.inc @@ -3,5 +3,5 @@ CaveOfOrigin_1F_MapScripts:: @ 8235768 .byte 0 CaveOfOrigin_1F_OnTransition: @ 823576E - call_if_set FLAG_UNUSED_RS_LEGENDARY_BATTLE_DONE, CaveOfOrigin_1F_EventScript_2722C1 + call_if_set FLAG_UNUSED_RS_LEGENDARY_BATTLE_DONE, CaveOfOrigin_EventScript_SetTempVars end diff --git a/data/maps/CaveOfOrigin_B1F/map.json b/data/maps/CaveOfOrigin_B1F/map.json index ac3baeaf87..61d8dc715d 100644 --- a/data/maps/CaveOfOrigin_B1F/map.json +++ b/data/maps/CaveOfOrigin_B1F/map.json @@ -24,7 +24,7 @@ "movement_range_y": 1, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "CaveOfOrigin_B1F_EventScript_2357A9", + "script": "CaveOfOrigin_B1F_EventScript_Wallace", "flag": "FLAG_HIDE_CAVE_OF_ORIGIN_B1F_WALLACE" } ], diff --git a/data/maps/CaveOfOrigin_B1F/scripts.inc b/data/maps/CaveOfOrigin_B1F/scripts.inc index 5a6383199d..378819f43e 100644 --- a/data/maps/CaveOfOrigin_B1F/scripts.inc +++ b/data/maps/CaveOfOrigin_B1F/scripts.inc @@ -1,10 +1,10 @@ CaveOfOrigin_B1F_MapScripts:: @ 82357A8 .byte 0 -CaveOfOrigin_B1F_EventScript_2357A9:: @ 82357A9 +CaveOfOrigin_B1F_EventScript_Wallace:: @ 82357A9 lock faceplayer - msgbox CaveOfOrigin_B1F_Text_23586E, MSGBOX_DEFAULT + msgbox CaveOfOrigin_B1F_Text_WallaceStory, MSGBOX_DEFAULT closemessage applymovement 1, Common_Movement_WalkInPlaceFastestUp waitmovement 0 @@ -17,37 +17,37 @@ CaveOfOrigin_B1F_EventScript_2357A9:: @ 82357A9 delay 30 applymovement 1, Common_Movement_FacePlayer waitmovement 0 - message CaveOfOrigin_B1F_Text_235ACE + message CaveOfOrigin_B1F_Text_WhereIsRayquaza waitmessage - goto CaveOfOrigin_B1F_EventScript_2357F0 + goto CaveOfOrigin_B1F_EventScript_WheresRayquaza -CaveOfOrigin_B1F_EventScript_2357F0:: @ 82357F0 +CaveOfOrigin_B1F_EventScript_WheresRayquaza:: @ 82357F0 multichoice 0, 0, MULTI_WHERES_RAYQUAZA, 0 switch VAR_RESULT - case 0, CaveOfOrigin_B1F_EventScript_23582C - case 1, CaveOfOrigin_B1F_EventScript_235837 - case 2, CaveOfOrigin_B1F_EventScript_23584D - case 3, CaveOfOrigin_B1F_EventScript_235842 - goto CaveOfOrigin_B1F_EventScript_235842 + case 0, CaveOfOrigin_B1F_EventScript_AtCaveOfOrigin + case 1, CaveOfOrigin_B1F_EventScript_AtMtPyre + case 2, CaveOfOrigin_B1F_EventScript_AtSkyPillar + case 3, CaveOfOrigin_B1F_EventScript_DontRemember + goto CaveOfOrigin_B1F_EventScript_DontRemember end -CaveOfOrigin_B1F_EventScript_23582C:: @ 823582C - message CaveOfOrigin_B1F_Text_235B23 +CaveOfOrigin_B1F_EventScript_AtCaveOfOrigin:: @ 823582C + message CaveOfOrigin_B1F_Text_ButWereInCaveOfOrigin waitmessage - goto CaveOfOrigin_B1F_EventScript_2357F0 + goto CaveOfOrigin_B1F_EventScript_WheresRayquaza -CaveOfOrigin_B1F_EventScript_235837:: @ 8235837 - message CaveOfOrigin_B1F_Text_235BBF +CaveOfOrigin_B1F_EventScript_AtMtPyre:: @ 8235837 + message CaveOfOrigin_B1F_Text_OldLadyDidntMentionThat waitmessage - goto CaveOfOrigin_B1F_EventScript_2357F0 + goto CaveOfOrigin_B1F_EventScript_WheresRayquaza -CaveOfOrigin_B1F_EventScript_235842:: @ 8235842 - message CaveOfOrigin_B1F_Text_235C99 +CaveOfOrigin_B1F_EventScript_DontRemember:: @ 8235842 + message CaveOfOrigin_B1F_Text_CantYouRememberSomehow waitmessage - goto CaveOfOrigin_B1F_EventScript_2357F0 + goto CaveOfOrigin_B1F_EventScript_WheresRayquaza -CaveOfOrigin_B1F_EventScript_23584D:: @ 823584D - msgbox CaveOfOrigin_B1F_Text_235CEE, MSGBOX_DEFAULT +CaveOfOrigin_B1F_EventScript_AtSkyPillar:: @ 823584D + msgbox CaveOfOrigin_B1F_Text_WellHeadToSkyPillar, MSGBOX_DEFAULT closemessage playse SE_KAIDAN fadescreenspeed 1, 4 @@ -59,7 +59,7 @@ CaveOfOrigin_B1F_EventScript_23584D:: @ 823584D release end -CaveOfOrigin_B1F_Text_23586E: @ 823586E +CaveOfOrigin_B1F_Text_WallaceStory: @ 823586E .string "Ah, so you are {PLAYER}{KUN}?\n" .string "I've heard tales of your exploits.\p" .string "My name is WALLACE.\p" @@ -83,19 +83,19 @@ CaveOfOrigin_B1F_Text_23586E: @ 823586E .string "But even I have no clue as to\n" .string "RAYQUAZA's whereabouts…$" -CaveOfOrigin_B1F_Text_235ACE: @ 8235ACE +CaveOfOrigin_B1F_Text_WhereIsRayquaza: @ 8235ACE .string "WALLACE: {PLAYER}{KUN}, do you perhaps\n" .string "know where RAYQUAZA is now?\p" .string "If you do, please tell me.$" -CaveOfOrigin_B1F_Text_235B23: @ 8235B23 +CaveOfOrigin_B1F_Text_ButWereInCaveOfOrigin: @ 8235B23 .string "WALLACE: The CAVE OF ORIGIN?\p" .string "But that's right here!\n" .string "I need you to do better than that!\p" .string "Please, I need you to think about\n" .string "where RAYQUAZA might be right now.$" -CaveOfOrigin_B1F_Text_235BBF: @ 8235BBF +CaveOfOrigin_B1F_Text_OldLadyDidntMentionThat: @ 8235BBF .string "WALLACE: MT. PYRE?\p" .string "But when I met the old lady there\n" .string "earlier, she made no mention of it.\p" @@ -104,12 +104,12 @@ CaveOfOrigin_B1F_Text_235BBF: @ 8235BBF .string "{PLAYER}{KUN}, could you think about this\n" .string "more carefully for me?$" -CaveOfOrigin_B1F_Text_235C99: @ 8235C99 +CaveOfOrigin_B1F_Text_CantYouRememberSomehow: @ 8235C99 .string "WALLACE: Huh? You don't remember?\n" .string "Hmm… That's a problem…\p" .string "Can't you remember somehow?$" -CaveOfOrigin_B1F_Text_235CEE: @ 8235CEE +CaveOfOrigin_B1F_Text_WellHeadToSkyPillar: @ 8235CEE .string "WALLACE: The SKY PILLAR?\p" .string "That's it!\n" .string "It must be the SKY PILLAR!\p" diff --git a/data/maps/CaveOfOrigin_Entrance/scripts.inc b/data/maps/CaveOfOrigin_Entrance/scripts.inc index 53228f63c8..76cdbc7ad2 100644 --- a/data/maps/CaveOfOrigin_Entrance/scripts.inc +++ b/data/maps/CaveOfOrigin_Entrance/scripts.inc @@ -1,8 +1,8 @@ CaveOfOrigin_Entrance_MapScripts:: @ 8235759 - map_script MAP_SCRIPT_ON_RESUME, CaveOfOrigin_Entrance_MapScript1_23575F + map_script MAP_SCRIPT_ON_RESUME, CaveOfOrigin_Entrance_OnResume .byte 0 -CaveOfOrigin_Entrance_MapScript1_23575F: @ 823575F +CaveOfOrigin_Entrance_OnResume: @ 823575F setescapewarp MAP_SOOTOPOLIS_CITY, 255, 31, 17 end diff --git a/data/maps/CaveOfOrigin_UnusedRubySapphireMap1/scripts.inc b/data/maps/CaveOfOrigin_UnusedRubySapphireMap1/scripts.inc index bc574be2d8..326ea21e3a 100644 --- a/data/maps/CaveOfOrigin_UnusedRubySapphireMap1/scripts.inc +++ b/data/maps/CaveOfOrigin_UnusedRubySapphireMap1/scripts.inc @@ -3,5 +3,5 @@ CaveOfOrigin_UnusedRubySapphireMap1_MapScripts:: @ 8235778 .byte 0 CaveOfOrigin_UnusedRubySapphireMap1_OnTransition: @ 823577E - call_if_set FLAG_UNUSED_RS_LEGENDARY_BATTLE_DONE, CaveOfOrigin_UnusedRubySapphireMap1_EventScript_2722C1 + call_if_set FLAG_UNUSED_RS_LEGENDARY_BATTLE_DONE, CaveOfOrigin_EventScript_SetTempVars end diff --git a/data/maps/CaveOfOrigin_UnusedRubySapphireMap2/scripts.inc b/data/maps/CaveOfOrigin_UnusedRubySapphireMap2/scripts.inc index 340e4a5859..5e92a7d45e 100644 --- a/data/maps/CaveOfOrigin_UnusedRubySapphireMap2/scripts.inc +++ b/data/maps/CaveOfOrigin_UnusedRubySapphireMap2/scripts.inc @@ -3,6 +3,6 @@ CaveOfOrigin_UnusedRubySapphireMap2_MapScripts:: @ 8235788 .byte 0 CaveOfOrigin_UnusedRubySapphireMap2_OnTransition: @ 823578E - call_if_set FLAG_UNUSED_RS_LEGENDARY_BATTLE_DONE, CaveOfOrigin_UnusedRubySapphireMap2_EventScript_2722C1 + call_if_set FLAG_UNUSED_RS_LEGENDARY_BATTLE_DONE, CaveOfOrigin_EventScript_SetTempVars end diff --git a/data/maps/CaveOfOrigin_UnusedRubySapphireMap3/scripts.inc b/data/maps/CaveOfOrigin_UnusedRubySapphireMap3/scripts.inc index f2e1189070..2f0e2b66c7 100644 --- a/data/maps/CaveOfOrigin_UnusedRubySapphireMap3/scripts.inc +++ b/data/maps/CaveOfOrigin_UnusedRubySapphireMap3/scripts.inc @@ -3,6 +3,6 @@ CaveOfOrigin_UnusedRubySapphireMap3_MapScripts:: @ 8235798 .byte 0 CaveOfOrigin_UnusedRubySapphireMap3_OnTransition: @ 823579E - call_if_set FLAG_UNUSED_RS_LEGENDARY_BATTLE_DONE, CaveOfOrigin_UnusedRubySapphireMap3_EventScript_2722C1 + call_if_set FLAG_UNUSED_RS_LEGENDARY_BATTLE_DONE, CaveOfOrigin_EventScript_SetTempVars end diff --git a/data/maps/DesertRuins/map.json b/data/maps/DesertRuins/map.json index 28a04a458d..441157d861 100644 --- a/data/maps/DesertRuins/map.json +++ b/data/maps/DesertRuins/map.json @@ -24,7 +24,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "DesertRuins_EventScript_22DA02", + "script": "DesertRuins_EventScript_Regirock", "flag": "FLAG_HIDE_REGIROCK" } ], @@ -59,7 +59,7 @@ "y": 20, "elevation": 0, "player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY", - "script": "DesertRuins_EventScript_22D9DB" + "script": "DesertRuins_EventScript_CaveEntranceMiddle" }, { "type": "sign", @@ -67,7 +67,7 @@ "y": 20, "elevation": 0, "player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY", - "script": "DesertRuins_EventScript_22D9F8" + "script": "DesertRuins_EventScript_CaveEntranceSide" }, { "type": "sign", @@ -75,7 +75,7 @@ "y": 20, "elevation": 0, "player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY", - "script": "DesertRuins_EventScript_22D9F8" + "script": "DesertRuins_EventScript_CaveEntranceSide" } ] } \ No newline at end of file diff --git a/data/maps/DesertRuins/scripts.inc b/data/maps/DesertRuins/scripts.inc index dbadad2ab2..bd7b04fb43 100644 --- a/data/maps/DesertRuins/scripts.inc +++ b/data/maps/DesertRuins/scripts.inc @@ -1,25 +1,25 @@ DesertRuins_MapScripts:: @ 822D95B - map_script MAP_SCRIPT_ON_RESUME, DesertRuins_MapScript1_22D96B - map_script MAP_SCRIPT_ON_LOAD, DesertRuins_MapScript1_22D989 + map_script MAP_SCRIPT_ON_RESUME, DesertRuins_OnResume + map_script MAP_SCRIPT_ON_LOAD, DesertRuins_OnLoad map_script MAP_SCRIPT_ON_TRANSITION, DesertRuins_OnTransition .byte 0 -DesertRuins_MapScript1_22D96B: @ 822D96B - call_if_set FLAG_SYS_CTRL_OBJ_DELETE, DesertRuins_EventScript_22D975 +DesertRuins_OnResume: @ 822D96B + call_if_set FLAG_SYS_CTRL_OBJ_DELETE, DesertRuins_EventScript_TryRemoveRegirock end -DesertRuins_EventScript_22D975:: @ 822D975 +DesertRuins_EventScript_TryRemoveRegirock:: @ 822D975 specialvar VAR_RESULT, GetBattleOutcome compare VAR_RESULT, B_OUTCOME_CAUGHT goto_if_ne Common_EventScript_NopReturn removeobject VAR_LAST_TALKED return -DesertRuins_MapScript1_22D989: @ 822D989 - call_if_unset FLAG_SYS_REGIROCK_PUZZLE_COMPLETED, DesertRuins_EventScript_22D993 +DesertRuins_OnLoad: @ 822D989 + call_if_unset FLAG_SYS_REGIROCK_PUZZLE_COMPLETED, DesertRuins_EventScript_HideRegiEntrance end -DesertRuins_EventScript_22D993:: @ 822D993 +DesertRuins_EventScript_HideRegiEntrance:: @ 822D993 setmetatile 7, 19, METATILE_Cave_EntranceCover, 1 setmetatile 8, 19, METATILE_Cave_EntranceCover, 1 setmetatile 9, 19, METATILE_Cave_EntranceCover, 1 @@ -30,36 +30,36 @@ DesertRuins_EventScript_22D993:: @ 822D993 DesertRuins_OnTransition: @ 822D9CA setflag FLAG_LANDMARK_DESERT_RUINS - call_if_unset FLAG_DEFEATED_REGIROCK, DesertRuins_EventScript_22D9D7 + call_if_unset FLAG_DEFEATED_REGIROCK, DesertRuins_EventScript_ShowRegirock end -DesertRuins_EventScript_22D9D7:: @ 822D9D7 +DesertRuins_EventScript_ShowRegirock:: @ 822D9D7 clearflag FLAG_HIDE_REGIROCK return -DesertRuins_EventScript_22D9DB:: @ 822D9DB +DesertRuins_EventScript_CaveEntranceMiddle:: @ 822D9DB lockall - goto_if_set FLAG_SYS_REGIROCK_PUZZLE_COMPLETED, DesertRuins_EventScript_22D9EE - braillemessage DesertRuins_Braille_2A6CA0 + goto_if_set FLAG_SYS_REGIROCK_PUZZLE_COMPLETED, DesertRuins_EventScript_BigHoleInWall + braillemessage DesertRuins_Braille_UseRockSmash waitbuttonpress - hidebox2 + closebraillemessage releaseall end -DesertRuins_EventScript_22D9EE:: @ 822D9EE +DesertRuins_EventScript_BigHoleInWall:: @ 822D9EE msgbox gText_BigHoleInTheWall, MSGBOX_DEFAULT releaseall end -DesertRuins_EventScript_22D9F8:: @ 822D9F8 +DesertRuins_EventScript_CaveEntranceSide:: @ 822D9F8 lockall - braillemessage DesertRuins_Braille_2A6CA0 + braillemessage DesertRuins_Braille_UseRockSmash waitbuttonpress - hidebox2 + closebraillemessage releaseall end -DesertRuins_EventScript_22DA02:: @ 822DA02 +DesertRuins_EventScript_Regirock:: @ 822DA02 lock faceplayer waitse @@ -73,21 +73,21 @@ DesertRuins_EventScript_22DA02:: @ 822DA02 clearflag FLAG_SYS_CTRL_OBJ_DELETE specialvar VAR_RESULT, GetBattleOutcome compare VAR_RESULT, B_OUTCOME_WON - goto_if_eq DesertRuins_EventScript_22DA49 + goto_if_eq DesertRuins_EventScript_DefeatedRegirock compare VAR_RESULT, B_OUTCOME_RAN - goto_if_eq DesertRuins_EventScript_22DA52 + goto_if_eq DesertRuins_EventScript_RanFromRegirock compare VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED - goto_if_eq DesertRuins_EventScript_22DA52 + goto_if_eq DesertRuins_EventScript_RanFromRegirock setflag FLAG_DEFEATED_REGIROCK release end -DesertRuins_EventScript_22DA49:: @ 822DA49 +DesertRuins_EventScript_DefeatedRegirock:: @ 822DA49 setflag FLAG_DEFEATED_REGIROCK goto Common_EventScript_RemoveStaticPokemon end -DesertRuins_EventScript_22DA52:: @ 822DA52 +DesertRuins_EventScript_RanFromRegirock:: @ 822DA52 setvar VAR_0x8004, SPECIES_REGIROCK goto Common_EventScript_LegendaryFlewAway end diff --git a/data/maps/FarawayIsland_Entrance/map.json b/data/maps/FarawayIsland_Entrance/map.json index e8dc6dbed1..fe81fd10a7 100644 --- a/data/maps/FarawayIsland_Entrance/map.json +++ b/data/maps/FarawayIsland_Entrance/map.json @@ -24,7 +24,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "FarawayIsland_Entrance_EventScript_267CA2", + "script": "FarawayIsland_Entrance_EventScript_Sailor", "flag": "0" }, { @@ -65,7 +65,7 @@ "elevation": 3, "var": "0", "var_value": "0", - "script": "FarawayIsland_Entrance_EventScript_267C98" + "script": "FarawayIsland_Entrance_EventScript_SetCloudsWeather" }, { "type": "trigger", @@ -74,7 +74,7 @@ "elevation": 3, "var": "0", "var_value": "0", - "script": "FarawayIsland_Entrance_EventScript_267C9D" + "script": "FarawayIsland_Entrance_EventScript_ClearWeather" }, { "type": "trigger", @@ -83,7 +83,7 @@ "elevation": 3, "var": "0", "var_value": "0", - "script": "FarawayIsland_Entrance_EventScript_267C98" + "script": "FarawayIsland_Entrance_EventScript_SetCloudsWeather" } ], "bg_events": [ @@ -93,7 +93,7 @@ "y": 32, "elevation": 0, "player_facing_dir": "BG_EVENT_PLAYER_FACING_NORTH", - "script": "FarawayIsland_Entrance_EventScript_267CF1" + "script": "FarawayIsland_Entrance_EventScript_Sign" } ] } \ No newline at end of file diff --git a/data/maps/FarawayIsland_Entrance/scripts.inc b/data/maps/FarawayIsland_Entrance/scripts.inc index f69bca3779..f8906c685b 100644 --- a/data/maps/FarawayIsland_Entrance/scripts.inc +++ b/data/maps/FarawayIsland_Entrance/scripts.inc @@ -6,22 +6,22 @@ FarawayIsland_Entrance_OnTransition: @ 8267C94 setflag FLAG_ARRIVED_ON_FARAWAY_ISLAND end -FarawayIsland_Entrance_EventScript_267C98:: @ 8267C98 +FarawayIsland_Entrance_EventScript_SetCloudsWeather:: @ 8267C98 setweather WEATHER_CLOUDS doweather end -FarawayIsland_Entrance_EventScript_267C9D:: @ 8267C9D +FarawayIsland_Entrance_EventScript_ClearWeather:: @ 8267C9D setweather WEATHER_NONE doweather end -FarawayIsland_Entrance_EventScript_267CA2:: @ 8267CA2 +FarawayIsland_Entrance_EventScript_Sailor:: @ 8267CA2 lock faceplayer msgbox FarawayIsland_Entrance_Text_SailorReturn, MSGBOX_YESNO compare VAR_RESULT, 0 - goto_if_eq FarawayIsland_Entrance_EventScript_267CE7 + goto_if_eq FarawayIsland_Entrance_EventScript_AsYouLike msgbox EventTicket_Text_SailHome, MSGBOX_DEFAULT closemessage applymovement VAR_LAST_TALKED, Common_Movement_WalkInPlaceFastestDown @@ -29,18 +29,18 @@ FarawayIsland_Entrance_EventScript_267CA2:: @ 8267CA2 delay 30 hideobjectat 1, MAP_FARAWAY_ISLAND_ENTRANCE setvar VAR_0x8004, 2 - call FarawayIsland_Entrance_EventScript_272250 + call Common_EventScript_FerryDepartIsland warp MAP_LILYCOVE_CITY_HARBOR, 255, 8, 11 waitstate release end -FarawayIsland_Entrance_EventScript_267CE7:: @ 8267CE7 +FarawayIsland_Entrance_EventScript_AsYouLike:: @ 8267CE7 msgbox EventTicket_Text_AsYouLike, MSGBOX_DEFAULT release end -FarawayIsland_Entrance_EventScript_267CF1:: @ 8267CF1 +FarawayIsland_Entrance_EventScript_Sign:: @ 8267CF1 msgbox FarawayIsland_Entrance_Text_Sign, MSGBOX_SIGN end diff --git a/data/maps/FarawayIsland_Interior/map.json b/data/maps/FarawayIsland_Interior/map.json index b41c5461a2..4998380e1a 100644 --- a/data/maps/FarawayIsland_Interior/map.json +++ b/data/maps/FarawayIsland_Interior/map.json @@ -24,7 +24,7 @@ "movement_range_y": 15, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "1", - "script": "FarawayIsland_Interior_EventScript_267DF2", + "script": "FarawayIsland_Interior_EventScript_Mew", "flag": "FLAG_HIDE_MEW" } ], diff --git a/data/maps/FarawayIsland_Interior/scripts.inc b/data/maps/FarawayIsland_Interior/scripts.inc index 6322408142..20121d500d 100644 --- a/data/maps/FarawayIsland_Interior/scripts.inc +++ b/data/maps/FarawayIsland_Interior/scripts.inc @@ -1,11 +1,11 @@ FarawayIsland_Interior_MapScripts:: @ 8267CFA - map_script MAP_SCRIPT_ON_RESUME, FarawayIsland_Interior_MapScript1_267D54 + map_script MAP_SCRIPT_ON_RESUME, FarawayIsland_Interior_OnResume map_script MAP_SCRIPT_ON_TRANSITION, FarawayIsland_Interior_OnTransition - map_script MAP_SCRIPT_ON_FRAME_TABLE, FarawayIsland_Interior_MapScript2_267D98 - map_script MAP_SCRIPT_ON_RETURN_TO_FIELD, FarawayIsland_Interior_MapScript1_267D0F + map_script MAP_SCRIPT_ON_FRAME_TABLE, FarawayIsland_Interior_OnFrame + map_script MAP_SCRIPT_ON_RETURN_TO_FIELD, FarawayIsland_Interior_OnReturnToField .byte 0 -FarawayIsland_Interior_MapScript1_267D0F: @ 8267D0F +FarawayIsland_Interior_OnReturnToField: @ 8267D0F call_if_set FLAG_SYS_CTRL_OBJ_DELETE, FarawayIsland_Interior_EventScript_267D19 end @@ -26,11 +26,11 @@ FarawayIsland_Interior_EventScript_267D4B:: @ 8267D4B special sub_81D4A90 return -FarawayIsland_Interior_MapScript1_267D54: @ 8267D54 - call_if_set FLAG_SYS_CTRL_OBJ_DELETE, FarawayIsland_Interior_EventScript_267D5E +FarawayIsland_Interior_OnResume: @ 8267D54 + call_if_set FLAG_SYS_CTRL_OBJ_DELETE, FarawayIsland_Interior_EventScript_TryRemoveMew end -FarawayIsland_Interior_EventScript_267D5E:: @ 8267D5E +FarawayIsland_Interior_EventScript_TryRemoveMew:: @ 8267D5E specialvar VAR_RESULT, GetBattleOutcome compare VAR_RESULT, B_OUTCOME_CAUGHT goto_if_ne Common_EventScript_NopReturn @@ -40,34 +40,34 @@ FarawayIsland_Interior_EventScript_267D5E:: @ 8267D5E FarawayIsland_Interior_OnTransition: @ 8267D72 setvar VAR_FARAWAY_ISLAND_STEP_COUNTER, 0 setvar VAR_TEMP_1, 1 - call_if_unset FLAG_CAUGHT_MEW, FarawayIsland_Interior_EventScript_267D86 + call_if_unset FLAG_CAUGHT_MEW, FarawayIsland_Interior_EventScript_TryShowMew end -FarawayIsland_Interior_EventScript_267D86:: @ 8267D86 +FarawayIsland_Interior_EventScript_TryShowMew:: @ 8267D86 goto_if_set FLAG_DEFEATED_MEW, Common_EventScript_NopReturn clearflag FLAG_HIDE_MEW setvar VAR_TEMP_1, 0 return -FarawayIsland_Interior_MapScript2_267D98: @ 8267D98 - map_script_2 VAR_TEMP_1, 0, FarawayIsland_Interior_EventScript_267DA2 +FarawayIsland_Interior_OnFrame: @ 8267D98 + map_script_2 VAR_TEMP_1, 0, FarawayIsland_Interior_EventScript_FindMew .2byte 0 -FarawayIsland_Interior_EventScript_267DA2:: @ 8267DA2 +FarawayIsland_Interior_EventScript_FindMew:: @ 8267DA2 lockall playse SE_PIN applymovement 1, Common_Movement_ExclamationMark waitmovement 0 applymovement 1, Common_Movement_Delay48 waitmovement 0 - applymovement 1, FarawayIsland_Interior_Movement_267DCE + applymovement 1, FarawayIsland_Interior_Movement_MewMoveAndHide waitmovement 0 copyobjectxytoperm 1 setvar VAR_TEMP_1, 1 releaseall end -FarawayIsland_Interior_Movement_267DCE: @ 8267DCE +FarawayIsland_Interior_Movement_MewMoveAndHide: @ 8267DCE walk_up walk_up walk_up @@ -75,11 +75,11 @@ FarawayIsland_Interior_Movement_267DCE: @ 8267DCE set_invisible step_end -FarawayIsland_Interior_Movement_267DD4: @ 8267DD4 +FarawayIsland_Interior_Movement_MewAppear: @ 8267DD4 set_visible step_end -FarawayIsland_Interior_Movement_267DD6: @ 8267DD6 +FarawayIsland_Interior_Movement_MewHideDown: @ 8267DD6 lock_facing_direction walk_fast_up walk_fast_up @@ -88,7 +88,7 @@ FarawayIsland_Interior_Movement_267DD6: @ 8267DD6 walk_in_place_down step_end -FarawayIsland_Interior_Movement_267DDD: @ 8267DDD +FarawayIsland_Interior_Movement_MewHideUp: @ 8267DDD lock_facing_direction walk_fast_up walk_fast_up @@ -97,7 +97,7 @@ FarawayIsland_Interior_Movement_267DDD: @ 8267DDD walk_in_place_up step_end -FarawayIsland_Interior_Movement_267DE4: @ 8267DE4 +FarawayIsland_Interior_Movement_MewHideRight: @ 8267DE4 lock_facing_direction walk_fast_up walk_fast_up @@ -106,7 +106,7 @@ FarawayIsland_Interior_Movement_267DE4: @ 8267DE4 walk_in_place_right step_end -FarawayIsland_Interior_Movement_267DEB: @ 8267DEB +FarawayIsland_Interior_Movement_MewHideLeft: @ 8267DEB lock_facing_direction walk_fast_up walk_fast_up @@ -115,10 +115,10 @@ FarawayIsland_Interior_Movement_267DEB: @ 8267DEB walk_in_place_left step_end -FarawayIsland_Interior_EventScript_267DF2:: @ 8267DF2 +FarawayIsland_Interior_EventScript_Mew:: @ 8267DF2 lock faceplayer - applymovement 1, FarawayIsland_Interior_Movement_267DD4 + applymovement 1, FarawayIsland_Interior_Movement_MewAppear waitmovement 0 setvar VAR_0x8004, 0 special sub_81D4A90 @@ -126,18 +126,18 @@ FarawayIsland_Interior_EventScript_267DF2:: @ 8267DF2 waitse playmoncry SPECIES_MEW, 2 compare VAR_FACING, DIR_NORTH - call_if_eq FarawayIsland_Interior_EventScript_267EAF + call_if_eq FarawayIsland_Interior_EventScript_MewHideDown compare VAR_FACING, DIR_SOUTH - call_if_eq FarawayIsland_Interior_EventScript_267EBA + call_if_eq FarawayIsland_Interior_EventScript_MewHideUp compare VAR_FACING, DIR_WEST - call_if_eq FarawayIsland_Interior_EventScript_267EC5 + call_if_eq FarawayIsland_Interior_EventScript_MewHideRight compare VAR_FACING, DIR_EAST - call_if_eq FarawayIsland_Interior_EventScript_267ED0 + call_if_eq FarawayIsland_Interior_EventScript_MewHideLeft special sub_81D4BEC delay 40 waitmoncry setvar VAR_0x8004, SPECIES_MEW - setvar VAR_0x8005, 30 @level + setvar VAR_0x8005, 30 @ level setvar VAR_0x8006, ITEM_NONE special CreateObedientEnemyMon setflag FLAG_SYS_CTRL_OBJ_DELETE @@ -146,58 +146,58 @@ FarawayIsland_Interior_EventScript_267DF2:: @ 8267DF2 clearflag FLAG_SYS_CTRL_OBJ_DELETE specialvar VAR_RESULT, GetBattleOutcome compare VAR_RESULT, B_OUTCOME_WON - goto_if_eq FarawayIsland_Interior_EventScript_267E96 + goto_if_eq FarawayIsland_Interior_EventScript_MewDefeated compare VAR_RESULT, B_OUTCOME_RAN - goto_if_eq FarawayIsland_Interior_EventScript_267EA4 + goto_if_eq FarawayIsland_Interior_EventScript_PlayerOrMewRan compare VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED - goto_if_eq FarawayIsland_Interior_EventScript_267EA4 + goto_if_eq FarawayIsland_Interior_EventScript_PlayerOrMewRan compare VAR_RESULT, B_OUTCOME_MON_TELEPORTED - goto_if_eq FarawayIsland_Interior_EventScript_267EA4 + goto_if_eq FarawayIsland_Interior_EventScript_PlayerOrMewRan setflag FLAG_CAUGHT_MEW release end -FarawayIsland_Interior_EventScript_267E96:: @ 8267E96 +FarawayIsland_Interior_EventScript_MewDefeated:: @ 8267E96 setflag FLAG_DEFEATED_MEW setvar VAR_0x8004, SPECIES_MEW goto Common_EventScript_LegendaryFlewAway end -FarawayIsland_Interior_EventScript_267EA4:: @ 8267EA4 +FarawayIsland_Interior_EventScript_PlayerOrMewRan:: @ 8267EA4 setvar VAR_0x8004, SPECIES_MEW goto Common_EventScript_LegendaryFlewAway end -FarawayIsland_Interior_EventScript_267EAF:: @ 8267EAF - applymovement 1, FarawayIsland_Interior_Movement_267DD6 +FarawayIsland_Interior_EventScript_MewHideDown:: @ 8267EAF + applymovement 1, FarawayIsland_Interior_Movement_MewHideDown waitmovement 0 return -FarawayIsland_Interior_EventScript_267EBA:: @ 8267EBA - applymovement 1, FarawayIsland_Interior_Movement_267DDD +FarawayIsland_Interior_EventScript_MewHideUp:: @ 8267EBA + applymovement 1, FarawayIsland_Interior_Movement_MewHideUp waitmovement 0 return -FarawayIsland_Interior_EventScript_267EC5:: @ 8267EC5 - applymovement 1, FarawayIsland_Interior_Movement_267DE4 +FarawayIsland_Interior_EventScript_MewHideRight:: @ 8267EC5 + applymovement 1, FarawayIsland_Interior_Movement_MewHideRight waitmovement 0 return -FarawayIsland_Interior_EventScript_267ED0:: @ 8267ED0 - applymovement 1, FarawayIsland_Interior_Movement_267DEB +FarawayIsland_Interior_EventScript_MewHideLeft:: @ 8267ED0 + applymovement 1, FarawayIsland_Interior_Movement_MewHideLeft waitmovement 0 return -FarawayIsland_Interior_EventScript_267EDB:: @ 8267EDB +FarawayIsland_Interior_EventScript_HideMewWhenGrassCut:: @ 8267EDB lockall fadescreenswapbuffers 1 setflag FLAG_HIDE_MEW removeobject 1 fadescreenswapbuffers 0 - msgbox FarawayIsland_Interior_Text_267EF1, MSGBOX_DEFAULT + msgbox FarawayIsland_Interior_Text_TheFeelingOfBeingWatchedFaded, MSGBOX_DEFAULT closemessage releaseall end -FarawayIsland_Interior_Text_267EF1: @ 8267EF1 +FarawayIsland_Interior_Text_TheFeelingOfBeingWatchedFaded: @ 8267EF1 .string "The feeling of being watched faded…$" diff --git a/data/maps/IslandCave/map.json b/data/maps/IslandCave/map.json index 27876f5e58..dbecdf4ed9 100644 --- a/data/maps/IslandCave/map.json +++ b/data/maps/IslandCave/map.json @@ -24,7 +24,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "IslandCave_EventScript_238F58", + "script": "IslandCave_EventScript_Regice", "flag": "FLAG_HIDE_REGICE" } ], @@ -59,7 +59,7 @@ "y": 20, "elevation": 0, "player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY", - "script": "IslandCave_EventScript_238EEF" + "script": "IslandCave_EventScript_CaveEntranceMiddle" }, { "type": "sign", @@ -67,7 +67,7 @@ "y": 20, "elevation": 0, "player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY", - "script": "IslandCave_EventScript_238F1D" + "script": "IslandCave_EventScript_CaveEntranceSide" }, { "type": "sign", @@ -75,7 +75,7 @@ "y": 20, "elevation": 0, "player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY", - "script": "IslandCave_EventScript_238F1D" + "script": "IslandCave_EventScript_CaveEntranceSide" } ] } \ No newline at end of file diff --git a/data/maps/IslandCave/scripts.inc b/data/maps/IslandCave/scripts.inc index b0843667c3..8587e62c21 100644 --- a/data/maps/IslandCave/scripts.inc +++ b/data/maps/IslandCave/scripts.inc @@ -1,25 +1,25 @@ IslandCave_MapScripts:: @ 8238E2A - map_script MAP_SCRIPT_ON_RESUME, IslandCave_MapScript1_238E3A - map_script MAP_SCRIPT_ON_LOAD, IslandCave_MapScript1_238E58 + map_script MAP_SCRIPT_ON_RESUME, IslandCave_OnResume + map_script MAP_SCRIPT_ON_LOAD, IslandCave_OnLoad map_script MAP_SCRIPT_ON_TRANSITION, IslandCave_OnTransition .byte 0 -IslandCave_MapScript1_238E3A: @ 8238E3A - call_if_set FLAG_SYS_CTRL_OBJ_DELETE, IslandCave_EventScript_238E44 +IslandCave_OnResume: @ 8238E3A + call_if_set FLAG_SYS_CTRL_OBJ_DELETE, IslandCave_EventScript_TryRemoveRegice end -IslandCave_EventScript_238E44:: @ 8238E44 +IslandCave_EventScript_TryRemoveRegice:: @ 8238E44 specialvar VAR_RESULT, GetBattleOutcome compare VAR_RESULT, B_OUTCOME_CAUGHT goto_if_ne Common_EventScript_NopReturn removeobject VAR_LAST_TALKED return -IslandCave_MapScript1_238E58: @ 8238E58 - call_if_unset FLAG_SYS_BRAILLE_REGICE_COMPLETED, IslandCave_EventScript_238E62 +IslandCave_OnLoad: @ 8238E58 + call_if_unset FLAG_SYS_BRAILLE_REGICE_COMPLETED, IslandCave_EventScript_HideRegiEntrance end -IslandCave_EventScript_238E62:: @ 8238E62 +IslandCave_EventScript_HideRegiEntrance:: @ 8238E62 setmetatile 7, 19, METATILE_Cave_EntranceCover, 1 setmetatile 8, 19, METATILE_Cave_EntranceCover, 1 setmetatile 9, 19, METATILE_Cave_EntranceCover, 1 @@ -30,15 +30,15 @@ IslandCave_EventScript_238E62:: @ 8238E62 IslandCave_OnTransition: @ 8238E99 setflag FLAG_LANDMARK_ISLAND_CAVE - call IslandCave_EventScript_238F45 - call_if_unset FLAG_DEFEATED_REGICE, IslandCave_EventScript_238EAB + call IslandCave_EventScript_ClearSteps + call_if_unset FLAG_DEFEATED_REGICE, IslandCave_EventScript_ShowRegice end -IslandCave_EventScript_238EAB:: @ 8238EAB +IslandCave_EventScript_ShowRegice:: @ 8238EAB clearflag FLAG_HIDE_REGICE return -IslandCave_EventScript_238EAF:: @ 8238EAF +IslandCave_EventScript_OpenRegiEntrance:: @ 8238EAF setmetatile 7, 19, METATILE_Cave_SealedChamberEntrance_TopLeft, 1 setmetatile 8, 19, METATILE_Cave_SealedChamberEntrance_TopMid, 1 setmetatile 9, 19, METATILE_Cave_SealedChamberEntrance_TopRight, 1 @@ -50,45 +50,45 @@ IslandCave_EventScript_238EAF:: @ 8238EAF setflag FLAG_SYS_BRAILLE_REGICE_COMPLETED end -IslandCave_EventScript_238EEF:: @ 8238EEF +IslandCave_EventScript_CaveEntranceMiddle:: @ 8238EEF lockall - call_if_set FLAG_TEMP_3, IslandCave_EventScript_238F45 - goto_if_set FLAG_SYS_BRAILLE_REGICE_COMPLETED, IslandCave_EventScript_238F13 - braillemessage IslandCave_Braille_2A6CD4 + call_if_set FLAG_TEMP_3, IslandCave_EventScript_ClearSteps + goto_if_set FLAG_SYS_BRAILLE_REGICE_COMPLETED, IslandCave_EventScript_BigHoleInWall + braillemessage IslandCave_Braille_RunLapAroundWall setflag FLAG_TEMP_2 special ShouldDoBrailleRegicePuzzle - goto IslandCave_EventScript_238F41 + goto IslandCave_EventScript_CloseBrailleMsg end -IslandCave_EventScript_238F13:: @ 8238F13 +IslandCave_EventScript_BigHoleInWall:: @ 8238F13 msgbox gText_BigHoleInTheWall, MSGBOX_DEFAULT releaseall end -IslandCave_EventScript_238F1D:: @ 8238F1D +IslandCave_EventScript_CaveEntranceSide:: @ 8238F1D lockall - call_if_set FLAG_TEMP_3, IslandCave_EventScript_238F45 - braillemessage IslandCave_Braille_2A6CD4 - goto_if_set FLAG_SYS_BRAILLE_REGICE_COMPLETED, IslandCave_EventScript_238F41 + call_if_set FLAG_TEMP_3, IslandCave_EventScript_ClearSteps + braillemessage IslandCave_Braille_RunLapAroundWall + goto_if_set FLAG_SYS_BRAILLE_REGICE_COMPLETED, IslandCave_EventScript_CloseBrailleMsg setflag FLAG_TEMP_2 special ShouldDoBrailleRegicePuzzle - goto IslandCave_EventScript_238F41 + goto IslandCave_EventScript_CloseBrailleMsg end -IslandCave_EventScript_238F41:: @ 8238F41 +IslandCave_EventScript_CloseBrailleMsg:: @ 8238F41 waitbuttonpress - hidebox2 + closebraillemessage releaseall end -IslandCave_EventScript_238F45:: @ 8238F45 +IslandCave_EventScript_ClearSteps:: @ 8238F45 setvar VAR_REGICE_STEPS_1, 0 setvar VAR_REGICE_STEPS_2, 0 setvar VAR_REGICE_STEPS_3, 0 clearflag FLAG_TEMP_3 return -IslandCave_EventScript_238F58:: @ 8238F58 +IslandCave_EventScript_Regice:: @ 8238F58 lock faceplayer waitse @@ -102,21 +102,21 @@ IslandCave_EventScript_238F58:: @ 8238F58 clearflag FLAG_SYS_CTRL_OBJ_DELETE specialvar VAR_RESULT, GetBattleOutcome compare VAR_RESULT, B_OUTCOME_WON - goto_if_eq IslandCave_EventScript_238F9F + goto_if_eq IslandCave_EventScript_DefeatedRegice compare VAR_RESULT, B_OUTCOME_RAN - goto_if_eq IslandCave_EventScript_238FA8 + goto_if_eq IslandCave_EventScript_RanFromRegice compare VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED - goto_if_eq IslandCave_EventScript_238FA8 + goto_if_eq IslandCave_EventScript_RanFromRegice setflag FLAG_DEFEATED_REGICE release end -IslandCave_EventScript_238F9F:: @ 8238F9F +IslandCave_EventScript_DefeatedRegice:: @ 8238F9F setflag FLAG_DEFEATED_REGICE goto Common_EventScript_RemoveStaticPokemon end -IslandCave_EventScript_238FA8:: @ 8238FA8 +IslandCave_EventScript_RanFromRegice:: @ 8238FA8 setvar VAR_0x8004, SPECIES_REGICE goto Common_EventScript_LegendaryFlewAway end diff --git a/data/maps/MarineCave_End/map.json b/data/maps/MarineCave_End/map.json index ec1c3389a4..133d89fe0c 100644 --- a/data/maps/MarineCave_End/map.json +++ b/data/maps/MarineCave_End/map.json @@ -45,7 +45,7 @@ "elevation": 3, "var": "VAR_TEMP_1", "var_value": "1", - "script": "MarineCave_End_EventScript_23B01B" + "script": "MarineCave_End_EventScript_Kyogre" } ], "bg_events": [] diff --git a/data/maps/MarineCave_End/scripts.inc b/data/maps/MarineCave_End/scripts.inc index fd434804e2..0050af939f 100644 --- a/data/maps/MarineCave_End/scripts.inc +++ b/data/maps/MarineCave_End/scripts.inc @@ -1,13 +1,13 @@ MarineCave_End_MapScripts:: @ 823AFDF - map_script MAP_SCRIPT_ON_RESUME, MarineCave_End_MapScript1_23AFEA + map_script MAP_SCRIPT_ON_RESUME, MarineCave_End_OnResume map_script MAP_SCRIPT_ON_TRANSITION, MarineCave_End_OnTransition .byte 0 -MarineCave_End_MapScript1_23AFEA: @ 823AFEA - call_if_set FLAG_SYS_CTRL_OBJ_DELETE, MarineCave_End_EventScript_23AFF4 +MarineCave_End_OnResume: @ 823AFEA + call_if_set FLAG_SYS_CTRL_OBJ_DELETE, MarineCave_End_EventScript_TryRemoveKyogre end -MarineCave_End_EventScript_23AFF4:: @ 823AFF4 +MarineCave_End_EventScript_TryRemoveKyogre:: @ 823AFF4 specialvar VAR_RESULT, GetBattleOutcome compare VAR_RESULT, B_OUTCOME_CAUGHT goto_if_ne Common_EventScript_NopReturn @@ -15,19 +15,19 @@ MarineCave_End_EventScript_23AFF4:: @ 823AFF4 return MarineCave_End_OnTransition: @ 823B008 - call_if_unset FLAG_DEFEATED_KYOGRE, MarineCave_End_EventScript_23B012 + call_if_unset FLAG_DEFEATED_KYOGRE, MarineCave_End_EventScript_ShowKyogre end -MarineCave_End_EventScript_23B012:: @ 823B012 +MarineCave_End_EventScript_ShowKyogre:: @ 823B012 clearflag FLAG_HIDE_MARINE_CAVE_KYOGRE setvar VAR_TEMP_1, 1 return -MarineCave_End_EventScript_23B01B:: @ 823B01B +MarineCave_End_EventScript_Kyogre:: @ 823B01B lockall applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_FaceUp waitmovement 0 - applymovement 1, MarineCave_End_Movement_23B09D + applymovement 1, MarineCave_End_Movement_KyogreApproach waitmovement 0 waitse playmoncry SPECIES_KYOGRE, 2 @@ -42,28 +42,28 @@ MarineCave_End_EventScript_23B01B:: @ 823B01B setvar VAR_TEMP_1, 0 specialvar VAR_RESULT, GetBattleOutcome compare VAR_RESULT, B_OUTCOME_WON - goto_if_eq MarineCave_End_EventScript_23B084 + goto_if_eq MarineCave_End_EventScript_DefeatedKyogre compare VAR_RESULT, B_OUTCOME_RAN - goto_if_eq MarineCave_End_EventScript_23B092 + goto_if_eq MarineCave_End_EventScript_RanFromKyogre compare VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED - goto_if_eq MarineCave_End_EventScript_23B092 + goto_if_eq MarineCave_End_EventScript_RanFromKyogre setvar VAR_SHOULD_END_UNUSUAL_WEATHER, 1 setflag FLAG_DEFEATED_KYOGRE releaseall end -MarineCave_End_EventScript_23B084:: @ 823B084 +MarineCave_End_EventScript_DefeatedKyogre:: @ 823B084 setvar VAR_SHOULD_END_UNUSUAL_WEATHER, 1 setflag FLAG_DEFEATED_KYOGRE goto Common_EventScript_RemoveStaticPokemon end -MarineCave_End_EventScript_23B092:: @ 823B092 +MarineCave_End_EventScript_RanFromKyogre:: @ 823B092 setvar VAR_0x8004, SPECIES_KYOGRE goto Common_EventScript_LegendaryFlewAway end -MarineCave_End_Movement_23B09D: @ 823B09D +MarineCave_End_Movement_KyogreApproach: @ 823B09D init_affine_anim walk_down_start_affine delay_16 diff --git a/data/maps/MarineCave_Entrance/scripts.inc b/data/maps/MarineCave_Entrance/scripts.inc index 82ff756e1d..1ba4546e31 100644 --- a/data/maps/MarineCave_Entrance/scripts.inc +++ b/data/maps/MarineCave_Entrance/scripts.inc @@ -1,8 +1,8 @@ MarineCave_Entrance_MapScripts:: @ 823AFD0 - map_script MAP_SCRIPT_ON_RESUME, MarineCave_Entrance_MapScript1_23AFD6 + map_script MAP_SCRIPT_ON_RESUME, MarineCave_Entrance_OnResume .byte 0 -MarineCave_Entrance_MapScript1_23AFD6: @ 823AFD6 +MarineCave_Entrance_OnResume: @ 823AFD6 setdivewarp MAP_UNDERWATER_MARINE_CAVE, 255, 9, 6 end diff --git a/data/maps/NavelRock_Bottom/map.json b/data/maps/NavelRock_Bottom/map.json index ee324635bd..1ae004107a 100644 --- a/data/maps/NavelRock_Bottom/map.json +++ b/data/maps/NavelRock_Bottom/map.json @@ -24,7 +24,7 @@ "movement_range_y": 1, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "NavelRock_Bottom_EventScript_2692A2", + "script": "NavelRock_Bottom_EventScript_Lugia", "flag": "FLAG_HIDE_LUGIA" } ], diff --git a/data/maps/NavelRock_Bottom/scripts.inc b/data/maps/NavelRock_Bottom/scripts.inc index a09b6ed139..e43f6d5139 100644 --- a/data/maps/NavelRock_Bottom/scripts.inc +++ b/data/maps/NavelRock_Bottom/scripts.inc @@ -1,34 +1,34 @@ NavelRock_Bottom_MapScripts:: @ 8269255 map_script MAP_SCRIPT_ON_TRANSITION, NavelRock_Bottom_OnTransition - map_script MAP_SCRIPT_ON_RESUME, NavelRock_Bottom_MapScript1_269284 + map_script MAP_SCRIPT_ON_RESUME, NavelRock_Bottom_OnResume .byte 0 NavelRock_Bottom_OnTransition: @ 8269260 - call_if_set FLAG_CAUGHT_LUGIA, NavelRock_Bottom_EventScript_269273 - call_if_unset FLAG_CAUGHT_LUGIA, NavelRock_Bottom_EventScript_269277 + call_if_set FLAG_CAUGHT_LUGIA, NavelRock_Bottom_EventScript_HideLugia + call_if_unset FLAG_CAUGHT_LUGIA, NavelRock_Bottom_EventScript_TryShowLugia end -NavelRock_Bottom_EventScript_269273:: @ 8269273 +NavelRock_Bottom_EventScript_HideLugia:: @ 8269273 setflag FLAG_HIDE_LUGIA return -NavelRock_Bottom_EventScript_269277:: @ 8269277 +NavelRock_Bottom_EventScript_TryShowLugia:: @ 8269277 goto_if_set FLAG_DEFEATED_LUGIA, Common_EventScript_NopReturn clearflag FLAG_HIDE_LUGIA return -NavelRock_Bottom_MapScript1_269284: @ 8269284 - call_if_set FLAG_SYS_CTRL_OBJ_DELETE, NavelRock_Bottom_EventScript_26928E +NavelRock_Bottom_OnResume: @ 8269284 + call_if_set FLAG_SYS_CTRL_OBJ_DELETE, NavelRock_Bottom_EventScript_TryRemoveLugia end -NavelRock_Bottom_EventScript_26928E:: @ 826928E +NavelRock_Bottom_EventScript_TryRemoveLugia:: @ 826928E specialvar VAR_RESULT, GetBattleOutcome compare VAR_RESULT, B_OUTCOME_CAUGHT goto_if_ne Common_EventScript_NopReturn removeobject 1 return -NavelRock_Bottom_EventScript_2692A2:: @ 82692A2 +NavelRock_Bottom_EventScript_Lugia:: @ 82692A2 lock faceplayer waitse @@ -53,7 +53,7 @@ NavelRock_Bottom_EventScript_2692A2:: @ 82692A2 waitmoncry delay 20 setvar VAR_0x8004, SPECIES_LUGIA - setvar VAR_0x8005, 70 @level + setvar VAR_0x8005, 70 @ level setvar VAR_0x8006, ITEM_NONE special CreateObedientEnemyMon setflag FLAG_SYS_CTRL_OBJ_DELETE @@ -62,22 +62,22 @@ NavelRock_Bottom_EventScript_2692A2:: @ 82692A2 clearflag FLAG_SYS_CTRL_OBJ_DELETE specialvar VAR_RESULT, GetBattleOutcome compare VAR_RESULT, B_OUTCOME_WON - goto_if_eq NavelRock_Bottom_EventScript_269336 + goto_if_eq NavelRock_Bottom_EventScript_DefeatedLugia compare VAR_RESULT, B_OUTCOME_RAN - goto_if_eq NavelRock_Bottom_EventScript_269344 + goto_if_eq NavelRock_Bottom_EventScript_RanFromLugia compare VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED - goto_if_eq NavelRock_Bottom_EventScript_269344 + goto_if_eq NavelRock_Bottom_EventScript_RanFromLugia setflag FLAG_CAUGHT_LUGIA release end -NavelRock_Bottom_EventScript_269336:: @ 8269336 +NavelRock_Bottom_EventScript_DefeatedLugia:: @ 8269336 setflag FLAG_DEFEATED_LUGIA setvar VAR_0x8004, SPECIES_LUGIA goto Common_EventScript_LegendaryFlewAway end -NavelRock_Bottom_EventScript_269344:: @ 8269344 +NavelRock_Bottom_EventScript_RanFromLugia:: @ 8269344 setvar VAR_0x8004, SPECIES_LUGIA goto Common_EventScript_LegendaryFlewAway end diff --git a/data/maps/NavelRock_Harbor/map.json b/data/maps/NavelRock_Harbor/map.json index 7ea3ef0e7b..e91dfa8d1a 100644 --- a/data/maps/NavelRock_Harbor/map.json +++ b/data/maps/NavelRock_Harbor/map.json @@ -24,7 +24,7 @@ "movement_range_y": 1, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "NavelRock_Harbor_EventScript_2690BD", + "script": "NavelRock_Harbor_EventScript_Sailor", "flag": "0" }, { diff --git a/data/maps/NavelRock_Harbor/scripts.inc b/data/maps/NavelRock_Harbor/scripts.inc index 6538b2b8ea..3d23991e48 100644 --- a/data/maps/NavelRock_Harbor/scripts.inc +++ b/data/maps/NavelRock_Harbor/scripts.inc @@ -1,12 +1,12 @@ NavelRock_Harbor_MapScripts:: @ 82690BC .byte 0 -NavelRock_Harbor_EventScript_2690BD:: @ 82690BD +NavelRock_Harbor_EventScript_Sailor:: @ 82690BD lock faceplayer msgbox NavelRock_Harbor_Text_SailorReturn, MSGBOX_YESNO compare VAR_RESULT, 0 - goto_if_eq NavelRock_Harbor_EventScript_269102 + goto_if_eq NavelRock_Harbor_EventScript_AsYouLike msgbox EventTicket_Text_SailHome, MSGBOX_DEFAULT closemessage applymovement VAR_LAST_TALKED, Common_Movement_WalkInPlaceFastestDown @@ -14,13 +14,13 @@ NavelRock_Harbor_EventScript_2690BD:: @ 82690BD delay 30 hideobjectat 1, MAP_NAVEL_ROCK_HARBOR setvar VAR_0x8004, 2 - call NavelRock_Harbor_EventScript_272250 + call Common_EventScript_FerryDepartIsland warp MAP_LILYCOVE_CITY_HARBOR, 255, 8, 11 waitstate release end -NavelRock_Harbor_EventScript_269102:: @ 8269102 +NavelRock_Harbor_EventScript_AsYouLike:: @ 8269102 msgbox EventTicket_Text_AsYouLike, MSGBOX_DEFAULT release end diff --git a/data/maps/NavelRock_Top/map.json b/data/maps/NavelRock_Top/map.json index 4b025ccae6..c906c4ceb9 100644 --- a/data/maps/NavelRock_Top/map.json +++ b/data/maps/NavelRock_Top/map.json @@ -45,7 +45,7 @@ "elevation": 3, "var": "VAR_TEMP_1", "var_value": "0", - "script": "NavelRock_Top_EventScript_26916F" + "script": "NavelRock_Top_EventScript_HoOh" } ], "bg_events": [ diff --git a/data/maps/NavelRock_Top/scripts.inc b/data/maps/NavelRock_Top/scripts.inc index 6734ef5f01..fcd043d3dc 100644 --- a/data/maps/NavelRock_Top/scripts.inc +++ b/data/maps/NavelRock_Top/scripts.inc @@ -1,45 +1,45 @@ NavelRock_Top_MapScripts:: @ 8269113 map_script MAP_SCRIPT_ON_TRANSITION, NavelRock_Top_OnTransition - map_script MAP_SCRIPT_ON_RESUME, NavelRock_Top_MapScript1_269151 + map_script MAP_SCRIPT_ON_RESUME, NavelRock_Top_OnResume .byte 0 NavelRock_Top_OnTransition: @ 826911E - call_if_set FLAG_CAUGHT_HO_OH, NavelRock_Top_EventScript_269131 - call_if_unset FLAG_CAUGHT_HO_OH, NavelRock_Top_EventScript_26913A + call_if_set FLAG_CAUGHT_HO_OH, NavelRock_Top_EventScript_HideHoOh + call_if_unset FLAG_CAUGHT_HO_OH, NavelRock_Top_EventScript_TryShowHoOh end -NavelRock_Top_EventScript_269131:: @ 8269131 +NavelRock_Top_EventScript_HideHoOh:: @ 8269131 setvar VAR_TEMP_1, 1 setflag FLAG_HIDE_HO_OH return -NavelRock_Top_EventScript_26913A:: @ 826913A +NavelRock_Top_EventScript_TryShowHoOh:: @ 826913A setvar VAR_TEMP_1, 1 goto_if_set FLAG_DEFEATED_HO_OH, Common_EventScript_NopReturn setvar VAR_TEMP_1, 0 clearflag FLAG_HIDE_HO_OH return -NavelRock_Top_MapScript1_269151: @ 8269151 - call_if_set FLAG_SYS_CTRL_OBJ_DELETE, NavelRock_Top_EventScript_26915B +NavelRock_Top_OnResume: @ 8269151 + call_if_set FLAG_SYS_CTRL_OBJ_DELETE, NavelRock_Top_EventScript_TryRemoveHoOh end -NavelRock_Top_EventScript_26915B:: @ 826915B +NavelRock_Top_EventScript_TryRemoveHoOh:: @ 826915B specialvar VAR_RESULT, GetBattleOutcome compare VAR_RESULT, B_OUTCOME_CAUGHT goto_if_ne Common_EventScript_NopReturn removeobject 1 return -NavelRock_Top_EventScript_26916F:: @ 826916F +NavelRock_Top_EventScript_HoOh:: @ 826916F lockall setvar VAR_TEMP_1, 1 special SpawnCameraObject setvar VAR_0x8004, 3 @ num loops setvar VAR_0x8005, 35 @ delay special LoopWingFlapSE - applymovement 1, NavelRock_Top_Movement_269243 - applymovement EVENT_OBJ_ID_CAMERA, NavelRock_Top_Movement_269230 + applymovement 1, NavelRock_Top_Movement_HoOhAppear + applymovement EVENT_OBJ_ID_CAMERA, NavelRock_Top_Movement_CameraPanUp waitmovement 0 delay 50 setweather WEATHER_NONE @@ -52,12 +52,12 @@ NavelRock_Top_EventScript_26916F:: @ 826916F setvar VAR_0x8004, 3 @ num loops setvar VAR_0x8005, 35 @ delay special LoopWingFlapSE - applymovement EVENT_OBJ_ID_CAMERA, NavelRock_Top_Movement_269234 - applymovement 1, NavelRock_Top_Movement_26923A + applymovement EVENT_OBJ_ID_CAMERA, NavelRock_Top_Movement_CameraPanDown + applymovement 1, NavelRock_Top_Movement_HoOhApproach waitmovement 0 special RemoveCameraObject setvar VAR_0x8004, SPECIES_HO_OH - setvar VAR_0x8005, 70 @level + setvar VAR_0x8005, 70 @ level setvar VAR_0x8006, ITEM_NONE special CreateObedientEnemyMon setflag FLAG_SYS_CTRL_OBJ_DELETE @@ -67,33 +67,33 @@ NavelRock_Top_EventScript_26916F:: @ 826916F setvar VAR_LAST_TALKED, 1 specialvar VAR_RESULT, GetBattleOutcome compare VAR_RESULT, B_OUTCOME_WON - goto_if_eq NavelRock_Top_EventScript_269217 + goto_if_eq NavelRock_Top_EventScript_DefeatedHoOh compare VAR_RESULT, B_OUTCOME_RAN - goto_if_eq NavelRock_Top_EventScript_269225 + goto_if_eq NavelRock_Top_EventScript_RanFromHoOh compare VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED - goto_if_eq NavelRock_Top_EventScript_269225 + goto_if_eq NavelRock_Top_EventScript_RanFromHoOh setflag FLAG_CAUGHT_HO_OH releaseall end -NavelRock_Top_EventScript_269217:: @ 8269217 +NavelRock_Top_EventScript_DefeatedHoOh:: @ 8269217 setflag FLAG_DEFEATED_HO_OH setvar VAR_0x8004, SPECIES_HO_OH goto Common_EventScript_LegendaryFlewAway end -NavelRock_Top_EventScript_269225:: @ 8269225 +NavelRock_Top_EventScript_RanFromHoOh:: @ 8269225 setvar VAR_0x8004, SPECIES_HO_OH goto Common_EventScript_LegendaryFlewAway end -NavelRock_Top_Movement_269230: @ 8269230 +NavelRock_Top_Movement_CameraPanUp: @ 8269230 walk_up walk_up walk_up step_end -NavelRock_Top_Movement_269234: @ 8269234 +NavelRock_Top_Movement_CameraPanDown: @ 8269234 delay_16 delay_16 walk_down @@ -101,7 +101,7 @@ NavelRock_Top_Movement_269234: @ 8269234 walk_down step_end -NavelRock_Top_Movement_26923A: @ 826923A +NavelRock_Top_Movement_HoOhApproach: @ 826923A walk_down walk_down walk_down @@ -112,7 +112,7 @@ NavelRock_Top_Movement_26923A: @ 826923A delay_16 step_end -NavelRock_Top_Movement_269243: @ 8269243 +NavelRock_Top_Movement_HoOhAppear: @ 8269243 delay_16 delay_16 walk_in_place_down diff --git a/data/maps/SealedChamber_InnerRoom/scripts.inc b/data/maps/SealedChamber_InnerRoom/scripts.inc index b34355e3f4..6dde1d4443 100644 --- a/data/maps/SealedChamber_InnerRoom/scripts.inc +++ b/data/maps/SealedChamber_InnerRoom/scripts.inc @@ -5,7 +5,7 @@ SealedChamber_InnerRoom_EventScript_2391F8:: @ 82391F8 lockall braillemessage SealedChamber_InnerRoom_Braille_2A6B99 waitbuttonpress - hidebox2 + closebraillemessage goto_if_set FLAG_REGI_DOORS_OPENED, SealedChamber_InnerRoom_EventScript_239253 specialvar VAR_RESULT, CheckRelicanthWailord compare VAR_RESULT, 0 @@ -42,7 +42,7 @@ SealedChamber_InnerRoom_EventScript_239255:: @ 8239255 lockall braillemessage SealedChamber_InnerRoom_Braille_2A6BCA waitbuttonpress - hidebox2 + closebraillemessage releaseall end @@ -50,7 +50,7 @@ SealedChamber_InnerRoom_EventScript_23925F:: @ 823925F lockall braillemessage SealedChamber_InnerRoom_Braille_2A6BEC waitbuttonpress - hidebox2 + closebraillemessage releaseall end @@ -58,7 +58,7 @@ SealedChamber_InnerRoom_EventScript_239269:: @ 8239269 lockall braillemessage SealedChamber_InnerRoom_Braille_2A6C0D waitbuttonpress - hidebox2 + closebraillemessage releaseall end @@ -66,7 +66,7 @@ SealedChamber_InnerRoom_EventScript_239273:: @ 8239273 lockall braillemessage SealedChamber_InnerRoom_Braille_2A6C34 waitbuttonpress - hidebox2 + closebraillemessage releaseall end @@ -74,7 +74,7 @@ SealedChamber_InnerRoom_EventScript_23927D:: @ 823927D lockall braillemessage SealedChamber_InnerRoom_Braille_2A6C48 waitbuttonpress - hidebox2 + closebraillemessage releaseall end @@ -82,7 +82,7 @@ SealedChamber_InnerRoom_EventScript_239287:: @ 8239287 lockall braillemessage SealedChamber_InnerRoom_Braille_2A6C73 waitbuttonpress - hidebox2 + closebraillemessage releaseall end diff --git a/data/maps/SealedChamber_OuterRoom/scripts.inc b/data/maps/SealedChamber_OuterRoom/scripts.inc index 4d9ed93d4c..e3a7086a30 100644 --- a/data/maps/SealedChamber_OuterRoom/scripts.inc +++ b/data/maps/SealedChamber_OuterRoom/scripts.inc @@ -30,7 +30,7 @@ SealedChamber_OuterRoom_EventScript_23916C:: @ 823916C lockall braillemessage SealedChamber_OuterRoom_Braille_2A6B27 waitbuttonpress - hidebox2 + closebraillemessage releaseall end @@ -38,7 +38,7 @@ SealedChamber_OuterRoom_EventScript_239176:: @ 8239176 lockall braillemessage SealedChamber_OuterRoom_Braille_2A6B31 waitbuttonpress - hidebox2 + closebraillemessage releaseall end @@ -46,7 +46,7 @@ SealedChamber_OuterRoom_EventScript_239180:: @ 8239180 lockall braillemessage SealedChamber_OuterRoom_Braille_2A6B3B waitbuttonpress - hidebox2 + closebraillemessage releaseall end @@ -54,7 +54,7 @@ SealedChamber_OuterRoom_EventScript_23918A:: @ 823918A lockall braillemessage SealedChamber_OuterRoom_Braille_2A6B45 waitbuttonpress - hidebox2 + closebraillemessage releaseall end @@ -62,7 +62,7 @@ SealedChamber_OuterRoom_EventScript_239194:: @ 8239194 lockall braillemessage SealedChamber_OuterRoom_Braille_2A6B4F waitbuttonpress - hidebox2 + closebraillemessage releaseall end @@ -70,7 +70,7 @@ SealedChamber_OuterRoom_EventScript_23919E:: @ 823919E lockall braillemessage SealedChamber_OuterRoom_Braille_2A6B59 waitbuttonpress - hidebox2 + closebraillemessage releaseall end @@ -78,7 +78,7 @@ SealedChamber_OuterRoom_EventScript_2391A8:: @ 82391A8 lockall braillemessage SealedChamber_OuterRoom_Braille_2A6B63 waitbuttonpress - hidebox2 + closebraillemessage releaseall end @@ -86,7 +86,7 @@ SealedChamber_OuterRoom_EventScript_2391B2:: @ 82391B2 lockall braillemessage SealedChamber_OuterRoom_Braille_2A6B6E waitbuttonpress - hidebox2 + closebraillemessage releaseall end @@ -94,7 +94,7 @@ SealedChamber_OuterRoom_EventScript_2391BC:: @ 82391BC lockall braillemessage SealedChamber_OuterRoom_Braille_2A6B76 waitbuttonpress - hidebox2 + closebraillemessage releaseall end @@ -102,7 +102,7 @@ SealedChamber_OuterRoom_EventScript_2391C6:: @ 82391C6 lockall braillemessage SealedChamber_OuterRoom_Braille_2A6B81 waitbuttonpress - hidebox2 + closebraillemessage releaseall end @@ -111,7 +111,7 @@ SealedChamber_OuterRoom_EventScript_2391D0:: @ 82391D0 goto_if_set FLAG_SYS_BRAILLE_DIG, SealedChamber_OuterRoom_EventScript_2391E3 braillemessage SealedChamber_OuterRoom_Braille_2A6B89 waitbuttonpress - hidebox2 + closebraillemessage releaseall end @@ -124,7 +124,7 @@ SealedChamber_OuterRoom_EventScript_2391ED:: @ 82391ED lockall braillemessage SealedChamber_OuterRoom_Braille_2A6B89 waitbuttonpress - hidebox2 + closebraillemessage releaseall end diff --git a/data/maps/SkyPillar_Top/map.json b/data/maps/SkyPillar_Top/map.json index 2d1a6fa1a3..eba1eff393 100644 --- a/data/maps/SkyPillar_Top/map.json +++ b/data/maps/SkyPillar_Top/map.json @@ -37,8 +37,8 @@ "movement_range_y": 1, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "SkyPillar_Top_EventScript_239722", - "flag": "FLAG_RAYQUAZA_ON_SKY_TOWER_SUMMIT" + "script": "SkyPillar_Top_EventScript_Rayquaza", + "flag": "FLAG_HIDE_RAYQUAZA_SKY_TOWER_SUMMIT" } ], "warp_events": [ @@ -58,7 +58,7 @@ "elevation": 3, "var": "VAR_SKY_PILLAR_RAQUAZA_CRY_DONE", "var_value": "0", - "script": "SkyPillar_Top_EventScript_23979A" + "script": "SkyPillar_Top_EventScript_AwakenRayquaza" } ], "bg_events": [] diff --git a/data/maps/SkyPillar_Top/scripts.inc b/data/maps/SkyPillar_Top/scripts.inc index 95f430cbda..e12919082e 100644 --- a/data/maps/SkyPillar_Top/scripts.inc +++ b/data/maps/SkyPillar_Top/scripts.inc @@ -1,14 +1,14 @@ SkyPillar_Top_MapScripts:: @ 82396B8 - map_script MAP_SCRIPT_ON_RESUME, SkyPillar_Top_MapScript1_2396C8 + map_script MAP_SCRIPT_ON_RESUME, SkyPillar_Top_OnResume map_script MAP_SCRIPT_ON_TRANSITION, SkyPillar_Top_OnTransition - map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, SkyPillar_Top_MapScript2_239713 + map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, SkyPillar_Top_OnWarp .byte 0 -SkyPillar_Top_MapScript1_2396C8: @ 82396C8 - call_if_set FLAG_SYS_CTRL_OBJ_DELETE, SkyPillar_Top_EventScript_2396D2 +SkyPillar_Top_OnResume: @ 82396C8 + call_if_set FLAG_SYS_CTRL_OBJ_DELETE, SkyPillar_Top_EventScript_TryRemoveRayquaza end -SkyPillar_Top_EventScript_2396D2:: @ 82396D2 +SkyPillar_Top_EventScript_TryRemoveRayquaza:: @ 82396D2 specialvar VAR_RESULT, GetBattleOutcome compare VAR_RESULT, B_OUTCOME_CAUGHT goto_if_ne Common_EventScript_NopReturn @@ -17,33 +17,33 @@ SkyPillar_Top_EventScript_2396D2:: @ 82396D2 SkyPillar_Top_OnTransition: @ 82396E6 compare VAR_SKY_PILLAR_STATE, 2 - call_if_lt SkyPillar_Top_EventScript_2396FD + call_if_lt SkyPillar_Top_EventScript_SetCleanLayout compare VAR_SKY_PILLAR_STATE, 2 - call_if_ge SkyPillar_Top_EventScript_239705 + call_if_ge SkyPillar_Top_EventScript_TryShowRayquaza end -SkyPillar_Top_EventScript_2396FD:: @ 82396FD +SkyPillar_Top_EventScript_SetCleanLayout:: @ 82396FD setmaplayoutindex LAYOUT_SKY_PILLAR_TOP_CLEAN setobjectmovementtype 1, MOVEMENT_TYPE_FACE_DOWN return -SkyPillar_Top_EventScript_239705:: @ 8239705 - call_if_unset FLAG_DEFEATED_RAYQUAZA, SkyPillar_Top_EventScript_23970F +SkyPillar_Top_EventScript_TryShowRayquaza:: @ 8239705 + call_if_unset FLAG_DEFEATED_RAYQUAZA, SkyPillar_Top_EventScript_ShowRayquaza return -SkyPillar_Top_EventScript_23970F:: @ 823970F - clearflag FLAG_RAYQUAZA_ON_SKY_TOWER_SUMMIT +SkyPillar_Top_EventScript_ShowRayquaza:: @ 823970F + clearflag FLAG_HIDE_RAYQUAZA_SKY_TOWER_SUMMIT return -SkyPillar_Top_MapScript2_239713: @ 8239713 - map_script_2 VAR_SKY_PILLAR_STATE, 0, SkyPillar_Top_EventScript_23971D +SkyPillar_Top_OnWarp: @ 8239713 + map_script_2 VAR_SKY_PILLAR_STATE, 0, SkyPillar_Top_EventScript_RayquazaFaceDown .2byte 0 -SkyPillar_Top_EventScript_23971D:: @ 823971D +SkyPillar_Top_EventScript_RayquazaFaceDown:: @ 823971D turnobject 1, DIR_SOUTH end -SkyPillar_Top_EventScript_239722:: @ 8239722 +SkyPillar_Top_EventScript_Rayquaza:: @ 8239722 lockall waitse playmoncry SPECIES_RAYQUAZA, 2 @@ -56,33 +56,33 @@ SkyPillar_Top_EventScript_239722:: @ 8239722 clearflag FLAG_SYS_CTRL_OBJ_DELETE specialvar VAR_RESULT, GetBattleOutcome compare VAR_RESULT, B_OUTCOME_WON - goto_if_eq SkyPillar_Top_EventScript_239768 + goto_if_eq SkyPillar_Top_EventScript_DefeatedRayquaza compare VAR_RESULT, B_OUTCOME_RAN - goto_if_eq SkyPillar_Top_EventScript_239771 + goto_if_eq SkyPillar_Top_EventScript_RanFromRayquaza compare VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED - goto_if_eq SkyPillar_Top_EventScript_239771 + goto_if_eq SkyPillar_Top_EventScript_RanFromRayquaza setflag FLAG_DEFEATED_RAYQUAZA releaseall end -SkyPillar_Top_EventScript_239768:: @ 8239768 +SkyPillar_Top_EventScript_DefeatedRayquaza:: @ 8239768 setflag FLAG_DEFEATED_RAYQUAZA - goto SkyPillar_Top_EventScript_23977C + goto SkyPillar_Top_EventScript_DefeatedRayquaza2 end -SkyPillar_Top_EventScript_239771:: @ 8239771 +SkyPillar_Top_EventScript_RanFromRayquaza:: @ 8239771 setvar VAR_0x8004, SPECIES_RAYQUAZA - goto SkyPillar_Top_EventScript_239785 + goto SkyPillar_Top_EventScript_RanFromRayquaza2 end -SkyPillar_Top_EventScript_23977C:: @ 823977C +SkyPillar_Top_EventScript_DefeatedRayquaza2:: @ 823977C fadescreenswapbuffers 1 removeobject VAR_LAST_TALKED fadescreenswapbuffers 0 releaseall end -SkyPillar_Top_EventScript_239785:: @ 8239785 +SkyPillar_Top_EventScript_RanFromRayquaza2:: @ 8239785 fadescreenswapbuffers 1 removeobject VAR_LAST_TALKED fadescreenswapbuffers 0 @@ -91,16 +91,16 @@ SkyPillar_Top_EventScript_239785:: @ 8239785 releaseall end -SkyPillar_Top_EventScript_23979A:: @ 823979A +SkyPillar_Top_EventScript_AwakenRayquaza:: @ 823979A lockall fadeoutbgm 1 applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_FaceUp waitmovement 0 special SpawnCameraObject - applymovement EVENT_OBJ_ID_CAMERA, SkyPillar_Top_Movement_239858 + applymovement EVENT_OBJ_ID_CAMERA, SkyPillar_Top_Movement_CameraPanUp waitmovement 0 special RemoveCameraObject - applymovement 1, SkyPillar_Top_Movement_23983A + applymovement 1, SkyPillar_Top_Movement_RayquazaStir waitmovement 0 waitse playmoncry SPECIES_RAYQUAZA, 2 @@ -119,15 +119,15 @@ SkyPillar_Top_EventScript_23979A:: @ 823979A special ShakeCamera waitstate waitmoncry - applymovement 1, SkyPillar_Top_Movement_23984B + applymovement 1, SkyPillar_Top_Movement_RayquazaFlyOff waitmovement 0 removeobject 1 - msgbox SkyPillar_Top_Text_239860, MSGBOX_DEFAULT + msgbox SkyPillar_Top_Text_RayquazaFlewOff, MSGBOX_DEFAULT closemessage delay 20 fadeinbgm 1 special SpawnCameraObject - applymovement EVENT_OBJ_ID_CAMERA, SkyPillar_Top_Movement_23985C + applymovement EVENT_OBJ_ID_CAMERA, SkyPillar_Top_Movement_CameraPanDown waitmovement 0 special RemoveCameraObject setvar VAR_SOOTOPOLIS_CITY_STATE, 5 @@ -136,7 +136,7 @@ SkyPillar_Top_EventScript_23979A:: @ 823979A releaseall end -SkyPillar_Top_Movement_23983A: @ 823983A +SkyPillar_Top_Movement_RayquazaStir: @ 823983A delay_16 walk_in_place_fast_left delay_16 @@ -155,7 +155,7 @@ SkyPillar_Top_Movement_23983A: @ 823983A delay_16 step_end -SkyPillar_Top_Movement_23984B: @ 823984B +SkyPillar_Top_Movement_RayquazaFlyOff: @ 823984B delay_16 walk_in_place_down delay_8 @@ -170,18 +170,18 @@ SkyPillar_Top_Movement_23984B: @ 823984B slide_up step_end -SkyPillar_Top_Movement_239858: @ 8239858 +SkyPillar_Top_Movement_CameraPanUp: @ 8239858 walk_slow_up walk_slow_up walk_slow_up step_end -SkyPillar_Top_Movement_23985C: @ 823985C +SkyPillar_Top_Movement_CameraPanDown: @ 823985C walk_slow_down walk_slow_down walk_slow_down step_end -SkyPillar_Top_Text_239860: @ 8239860 +SkyPillar_Top_Text_RayquazaFlewOff: @ 8239860 .string "The awakened RAYQUAZA flew off…$" diff --git a/data/maps/SouthernIsland_Exterior/map.json b/data/maps/SouthernIsland_Exterior/map.json index 26447c163d..cf8be22279 100644 --- a/data/maps/SouthernIsland_Exterior/map.json +++ b/data/maps/SouthernIsland_Exterior/map.json @@ -24,7 +24,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "SouthernIsland_Exterior_EventScript_2429D2", + "script": "SouthernIsland_Exterior_EventScript_Sailor", "flag": "0" }, { @@ -65,7 +65,7 @@ "y": 7, "elevation": 3, "player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY", - "script": "SouthernIsland_Exterior_EventScript_242A3C" + "script": "SouthernIsland_Exterior_EventScript_Sign" } ] } \ No newline at end of file diff --git a/data/maps/SouthernIsland_Exterior/scripts.inc b/data/maps/SouthernIsland_Exterior/scripts.inc index f5879e1e89..c771fc66a1 100644 --- a/data/maps/SouthernIsland_Exterior/scripts.inc +++ b/data/maps/SouthernIsland_Exterior/scripts.inc @@ -6,12 +6,12 @@ SouthernIsland_Exterior_OnTransition: @ 82429CE setflag FLAG_LANDMARK_SOUTHERN_ISLAND end -SouthernIsland_Exterior_EventScript_2429D2:: @ 82429D2 +SouthernIsland_Exterior_EventScript_Sailor:: @ 82429D2 lock faceplayer msgbox EventTicket_Text_SouthernIslandSailBack, MSGBOX_YESNO compare VAR_RESULT, 0 - goto_if_eq SouthernIsland_Exterior_EventScript_242A17 + goto_if_eq SouthernIsland_Exterior_EventScript_AsYouLike msgbox EventTicket_Text_SailHome, MSGBOX_DEFAULT closemessage applymovement VAR_LAST_TALKED, Common_Movement_WalkInPlaceFastestDown @@ -19,37 +19,37 @@ SouthernIsland_Exterior_EventScript_2429D2:: @ 82429D2 delay 30 hideobjectat 1, MAP_SOUTHERN_ISLAND_EXTERIOR setvar VAR_0x8004, 2 - call SouthernIsland_Exterior_EventScript_272250 + call Common_EventScript_FerryDepartIsland warp MAP_LILYCOVE_CITY_HARBOR, 255, 8, 11 waitstate release end -SouthernIsland_Exterior_EventScript_242A17:: @ 8242A17 +SouthernIsland_Exterior_EventScript_AsYouLike:: @ 8242A17 msgbox EventTicket_Text_AsYouLike, MSGBOX_DEFAULT release end -BattleFrontier_OutsideWest_EventScript_242A21:: @ 8242A21 - applymovement EVENT_OBJ_ID_PLAYER, BattleFrontier_OutsideWest_Movement_242A37 +Ferry_EventScript_DepartIslandSouth:: @ 8242A21 + applymovement EVENT_OBJ_ID_PLAYER, Ferry_EventScript_DepartIslandBoardSouth waitmovement 0 return -BattleFrontier_OutsideWest_EventScript_242A2C:: @ 8242A2C - applymovement EVENT_OBJ_ID_PLAYER, BattleFrontier_OutsideWest_Movement_242A39 +Ferry_EventScript_DepartIslandWest:: @ 8242A2C + applymovement EVENT_OBJ_ID_PLAYER, Ferry_EventScript_DepartIslandBoardWest waitmovement 0 return -BattleFrontier_OutsideWest_Movement_242A37: @ 8242A37 +Ferry_EventScript_DepartIslandBoardSouth: @ 8242A37 walk_down step_end -BattleFrontier_OutsideWest_Movement_242A39: @ 8242A39 +Ferry_EventScript_DepartIslandBoardWest: @ 8242A39 walk_left walk_in_place_fastest_down step_end -SouthernIsland_Exterior_EventScript_242A3C:: @ 8242A3C +SouthernIsland_Exterior_EventScript_Sign:: @ 8242A3C msgbox SouthernIsland_Exterior_Text_Sign, MSGBOX_SIGN end diff --git a/data/maps/SouthernIsland_Interior/map.json b/data/maps/SouthernIsland_Interior/map.json index 5fd8354f6c..a647076bad 100644 --- a/data/maps/SouthernIsland_Interior/map.json +++ b/data/maps/SouthernIsland_Interior/map.json @@ -65,7 +65,7 @@ "y": 11, "elevation": 3, "player_facing_dir": "BG_EVENT_PLAYER_FACING_NORTH", - "script": "SouthernIsland_Interior_EventScript_242AC4" + "script": "SouthernIsland_Interior_EventScript_TryLatiEncounter" } ] } \ No newline at end of file diff --git a/data/maps/SouthernIsland_Interior/scripts.inc b/data/maps/SouthernIsland_Interior/scripts.inc index 7f4a55f295..7a2a04771c 100644 --- a/data/maps/SouthernIsland_Interior/scripts.inc +++ b/data/maps/SouthernIsland_Interior/scripts.inc @@ -1,13 +1,13 @@ SouthernIsland_Interior_MapScripts:: @ 8242A45 - map_script MAP_SCRIPT_ON_RESUME, SouthernIsland_Interior_MapScript1_242A50 + map_script MAP_SCRIPT_ON_RESUME, SouthernIsland_Interior_OnResume map_script MAP_SCRIPT_ON_TRANSITION, SouthernIsland_Interior_OnTransition .byte 0 -SouthernIsland_Interior_MapScript1_242A50: @ 8242A50 - call_if_set FLAG_SYS_CTRL_OBJ_DELETE, SouthernIsland_Interior_EventScript_242A5A +SouthernIsland_Interior_OnResume: @ 8242A50 + call_if_set FLAG_SYS_CTRL_OBJ_DELETE, SouthernIsland_Interior_EventScript_TryRemoveLati end -SouthernIsland_Interior_EventScript_242A5A:: @ 8242A5A +SouthernIsland_Interior_EventScript_TryRemoveLati:: @ 8242A5A specialvar VAR_RESULT, GetBattleOutcome compare VAR_RESULT, B_OUTCOME_CAUGHT goto_if_ne Common_EventScript_NopReturn @@ -16,53 +16,53 @@ SouthernIsland_Interior_EventScript_242A5A:: @ 8242A5A SouthernIsland_Interior_OnTransition: @ 8242A6E compare VAR_ROAMER_POKEMON, 0 - call_if_eq SouthernIsland_Interior_EventScript_242A8A + call_if_eq SouthernIsland_Interior_EventScript_SetUpLatios compare VAR_ROAMER_POKEMON, 0 - call_if_ne SouthernIsland_Interior_EventScript_242A95 - call SouthernIsland_Interior_EventScript_242AA0 + call_if_ne SouthernIsland_Interior_EventScript_SetUpLatias + call SouthernIsland_Interior_EventScript_SetUpPlayerGfx end -SouthernIsland_Interior_EventScript_242A8A:: @ 8242A8A +SouthernIsland_Interior_EventScript_SetUpLatios:: @ 8242A8A setvar VAR_OBJ_GFX_ID_1, EVENT_OBJ_GFX_LATIOS setvar VAR_TEMP_4, SPECIES_LATIOS return -SouthernIsland_Interior_EventScript_242A95:: @ 8242A95 +SouthernIsland_Interior_EventScript_SetUpLatias:: @ 8242A95 setvar VAR_OBJ_GFX_ID_1, EVENT_OBJ_GFX_LATIAS setvar VAR_TEMP_4, SPECIES_LATIAS return -SouthernIsland_Interior_EventScript_242AA0:: @ 8242AA0 +SouthernIsland_Interior_EventScript_SetUpPlayerGfx:: @ 8242AA0 checkplayergender compare VAR_RESULT, MALE - goto_if_eq SouthernIsland_Interior_EventScript_242AB8 + goto_if_eq SouthernIsland_Interior_EventScript_SetBrendanGfx compare VAR_RESULT, FEMALE - goto_if_eq SouthernIsland_Interior_EventScript_242ABE + goto_if_eq SouthernIsland_Interior_EventScript_SetMayGfx end -SouthernIsland_Interior_EventScript_242AB8:: @ 8242AB8 +SouthernIsland_Interior_EventScript_SetBrendanGfx:: @ 8242AB8 setvar VAR_OBJ_GFX_ID_0, EVENT_OBJ_GFX_RIVAL_BRENDAN_NORMAL return -SouthernIsland_Interior_EventScript_242ABE:: @ 8242ABE +SouthernIsland_Interior_EventScript_SetMayGfx:: @ 8242ABE setvar VAR_OBJ_GFX_ID_0, EVENT_OBJ_GFX_RIVAL_MAY_NORMAL return -SouthernIsland_Interior_EventScript_242AC4:: @ 8242AC4 +SouthernIsland_Interior_EventScript_TryLatiEncounter:: @ 8242AC4 lockall setvar VAR_0x8008, 12 - goto SouthernIsland_Interior_EventScript_242AD0 + goto SouthernIsland_Interior_EventScript_Lati end -SouthernIsland_Interior_EventScript_242AD0:: @ 8242AD0 - goto_if_set FLAG_TEMP_2, SouthernIsland_Interior_EventScript_242B9A - goto_if_set FLAG_DEFEATED_LATIAS_OR_LATIOS, SouthernIsland_Interior_EventScript_242B9A - goto_if_set FLAG_CAUGHT_LATIAS_OR_LATIOS, SouthernIsland_Interior_EventScript_242B9A - goto_if_unset FLAG_SYS_HAS_EON_TICKET, SouthernIsland_Interior_EventScript_242B9A +SouthernIsland_Interior_EventScript_Lati:: @ 8242AD0 + goto_if_set FLAG_TEMP_2, SouthernIsland_Interior_EventScript_Sign + goto_if_set FLAG_DEFEATED_LATIAS_OR_LATIOS, SouthernIsland_Interior_EventScript_Sign + goto_if_set FLAG_CAUGHT_LATIAS_OR_LATIOS, SouthernIsland_Interior_EventScript_Sign + goto_if_unset FLAG_SYS_HAS_EON_TICKET, SouthernIsland_Interior_EventScript_Sign setflag FLAG_ENCOUNTERED_LATIAS_OR_LATIOS setflag FLAG_TEMP_2 special SpawnCameraObject - applymovement EVENT_OBJ_ID_CAMERA, SouthernIsland_Interior_Movement_242BCA + applymovement EVENT_OBJ_ID_CAMERA, SouthernIsland_Interior_Movement_CameraPanUp waitmovement 0 delay 50 waitse @@ -71,68 +71,68 @@ SouthernIsland_Interior_EventScript_242AD0:: @ 8242AD0 waitmoncry addobject 2 delay 30 - applymovement EVENT_OBJ_ID_CAMERA, SouthernIsland_Interior_Movement_242BCE - applymovement 2, SouthernIsland_Interior_Movement_242BDA + applymovement EVENT_OBJ_ID_CAMERA, SouthernIsland_Interior_Movement_CameraPanDown + applymovement 2, SouthernIsland_Interior_Movement_LatiApproach waitmovement 0 delay 50 special RemoveCameraObject setvar VAR_LAST_TALKED, 2 compare VAR_ROAMER_POKEMON, 0 - call_if_eq SouthernIsland_Interior_EventScript_242BA4 + call_if_eq SouthernIsland_Interior_EventScript_SetLatiosBattleVars compare VAR_ROAMER_POKEMON, 0 - call_if_ne SouthernIsland_Interior_EventScript_242BB7 + call_if_ne SouthernIsland_Interior_EventScript_SetLatiasBattleVars setflag FLAG_SYS_CTRL_OBJ_DELETE special BattleSetup_StartLatiBattle waitstate clearflag FLAG_SYS_CTRL_OBJ_DELETE specialvar VAR_RESULT, GetBattleOutcome compare VAR_RESULT, B_OUTCOME_WON - goto_if_eq SouthernIsland_Interior_EventScript_242B81 + goto_if_eq SouthernIsland_Interior_EventScript_LatiDefeated compare VAR_RESULT, B_OUTCOME_RAN - goto_if_eq SouthernIsland_Interior_EventScript_242B8F + goto_if_eq SouthernIsland_Interior_EventScript_RanFromLati compare VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED - goto_if_eq SouthernIsland_Interior_EventScript_242B8F + goto_if_eq SouthernIsland_Interior_EventScript_RanFromLati setflag FLAG_CAUGHT_LATIAS_OR_LATIOS releaseall end -SouthernIsland_Interior_EventScript_242B81:: @ 8242B81 +SouthernIsland_Interior_EventScript_LatiDefeated:: @ 8242B81 setflag FLAG_DEFEATED_LATIAS_OR_LATIOS copyvar VAR_0x8004, VAR_TEMP_4 goto Common_EventScript_LegendaryFlewAway end -SouthernIsland_Interior_EventScript_242B8F:: @ 8242B8F +SouthernIsland_Interior_EventScript_RanFromLati:: @ 8242B8F copyvar VAR_0x8004, VAR_TEMP_4 goto Common_EventScript_LegendaryFlewAway end -SouthernIsland_Interior_EventScript_242B9A:: @ 8242B9A +SouthernIsland_Interior_EventScript_Sign:: @ 8242B9A msgbox SouthernIsland_Interior_Text_Sign, MSGBOX_DEFAULT releaseall end -SouthernIsland_Interior_EventScript_242BA4:: @ 8242BA4 +SouthernIsland_Interior_EventScript_SetLatiosBattleVars:: @ 8242BA4 setvar VAR_0x8004, SPECIES_LATIOS - setvar VAR_0x8005, 50 @level + setvar VAR_0x8005, 50 @ level setvar VAR_0x8006, ITEM_SOUL_DEW special CreateObedientEnemyMon return -SouthernIsland_Interior_EventScript_242BB7:: @ 8242BB7 +SouthernIsland_Interior_EventScript_SetLatiasBattleVars:: @ 8242BB7 setvar VAR_0x8004, SPECIES_LATIAS - setvar VAR_0x8005, 50 @level + setvar VAR_0x8005, 50 @ level setvar VAR_0x8006, ITEM_SOUL_DEW special CreateObedientEnemyMon return -SouthernIsland_Interior_Movement_242BCA: @ 8242BCA +SouthernIsland_Interior_Movement_CameraPanUp: @ 8242BCA walk_up walk_up walk_up step_end -SouthernIsland_Interior_Movement_242BCE: @ 8242BCE +SouthernIsland_Interior_Movement_CameraPanDown: @ 8242BCE delay_16 delay_16 delay_16 @@ -146,7 +146,7 @@ SouthernIsland_Interior_Movement_242BCE: @ 8242BCE walk_in_place_fastest_up step_end -SouthernIsland_Interior_Movement_242BDA: @ 8242BDA +SouthernIsland_Interior_Movement_LatiApproach: @ 8242BDA walk_down walk_down walk_down diff --git a/data/maps/TerraCave_End/map.json b/data/maps/TerraCave_End/map.json index 991743d63e..2854ec9759 100644 --- a/data/maps/TerraCave_End/map.json +++ b/data/maps/TerraCave_End/map.json @@ -45,7 +45,7 @@ "elevation": 3, "var": "VAR_TEMP_1", "var_value": "1", - "script": "TerraCave_End_EventScript_23B0EC" + "script": "TerraCave_End_EventScript_Groudon" } ], "bg_events": [] diff --git a/data/maps/TerraCave_End/scripts.inc b/data/maps/TerraCave_End/scripts.inc index efab053aa1..2a7d912f19 100644 --- a/data/maps/TerraCave_End/scripts.inc +++ b/data/maps/TerraCave_End/scripts.inc @@ -1,13 +1,13 @@ TerraCave_End_MapScripts:: @ 823B0B0 - map_script MAP_SCRIPT_ON_RESUME, TerraCave_End_MapScript1_23B0BB + map_script MAP_SCRIPT_ON_RESUME, TerraCave_End_OnResume map_script MAP_SCRIPT_ON_TRANSITION, TerraCave_End_OnTransition .byte 0 -TerraCave_End_MapScript1_23B0BB: @ 823B0BB - call_if_set FLAG_SYS_CTRL_OBJ_DELETE, TerraCave_End_EventScript_23B0C5 +TerraCave_End_OnResume: @ 823B0BB + call_if_set FLAG_SYS_CTRL_OBJ_DELETE, TerraCave_End_EventScript_TryRemoveGroudon end -TerraCave_End_EventScript_23B0C5:: @ 823B0C5 +TerraCave_End_EventScript_TryRemoveGroudon:: @ 823B0C5 specialvar VAR_RESULT, GetBattleOutcome compare VAR_RESULT, B_OUTCOME_CAUGHT goto_if_ne Common_EventScript_NopReturn @@ -15,19 +15,19 @@ TerraCave_End_EventScript_23B0C5:: @ 823B0C5 return TerraCave_End_OnTransition: @ 823B0D9 - call_if_unset FLAG_DEFEATED_GROUDON, TerraCave_End_EventScript_23B0E3 + call_if_unset FLAG_DEFEATED_GROUDON, TerraCave_End_EventScript_ShowGroudon end -TerraCave_End_EventScript_23B0E3:: @ 823B0E3 +TerraCave_End_EventScript_ShowGroudon:: @ 823B0E3 clearflag FLAG_HIDE_TERRA_CAVE_GROUDON setvar VAR_TEMP_1, 1 return -TerraCave_End_EventScript_23B0EC:: @ 823B0EC +TerraCave_End_EventScript_Groudon:: @ 823B0EC lockall applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_FaceUp waitmovement 0 - applymovement 1, TerraCave_End_Movement_23B16E + applymovement 1, TerraCave_End_Movement_GroudonApproach waitmovement 0 waitse playmoncry SPECIES_GROUDON, 2 @@ -42,28 +42,28 @@ TerraCave_End_EventScript_23B0EC:: @ 823B0EC setvar VAR_TEMP_1, 0 specialvar VAR_RESULT, GetBattleOutcome compare VAR_RESULT, B_OUTCOME_WON - goto_if_eq TerraCave_End_EventScript_23B155 + goto_if_eq TerraCave_End_EventScript_DefeatedGroudon compare VAR_RESULT, B_OUTCOME_RAN - goto_if_eq TerraCave_End_EventScript_23B163 + goto_if_eq TerraCave_End_EventScript_RanFromGroudon compare VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED - goto_if_eq TerraCave_End_EventScript_23B163 + goto_if_eq TerraCave_End_EventScript_RanFromGroudon setvar VAR_SHOULD_END_UNUSUAL_WEATHER, 1 setflag FLAG_DEFEATED_GROUDON releaseall end -TerraCave_End_EventScript_23B155:: @ 823B155 +TerraCave_End_EventScript_DefeatedGroudon:: @ 823B155 setvar VAR_SHOULD_END_UNUSUAL_WEATHER, 1 setflag FLAG_DEFEATED_GROUDON goto Common_EventScript_RemoveStaticPokemon end -TerraCave_End_EventScript_23B163:: @ 823B163 +TerraCave_End_EventScript_RanFromGroudon:: @ 823B163 setvar VAR_0x8004, SPECIES_GROUDON goto Common_EventScript_LegendaryFlewAway end -TerraCave_End_Movement_23B16E: @ 823B16E +TerraCave_End_Movement_GroudonApproach: @ 823B16E init_affine_anim walk_down_start_affine delay_16 diff --git a/data/maps/Underwater_SealedChamber/scripts.inc b/data/maps/Underwater_SealedChamber/scripts.inc index 9ec884781a..168383f5dd 100644 --- a/data/maps/Underwater_SealedChamber/scripts.inc +++ b/data/maps/Underwater_SealedChamber/scripts.inc @@ -22,7 +22,7 @@ Underwater_SealedChamber_EventScript_2390FC:: @ 82390FC lockall braillemessage Underwater_SealedChamber_Braille_2A6B15 waitbuttonpress - hidebox2 + closebraillemessage releaseall end diff --git a/data/script_cmd_table.inc b/data/script_cmd_table.inc index 5a6a1e613a..0061674435 100644 --- a/data/script_cmd_table.inc +++ b/data/script_cmd_table.inc @@ -218,7 +218,7 @@ gScriptCmdTable:: @ 81DB67C .4byte ScrCmd_warpmossdeepgym .4byte ScrCmd_cmdD8 .4byte ScrCmd_cmdD9 - .4byte ScrCmd_cmdDA + .4byte ScrCmd_closebraillemessage .4byte ScrCmd_cmdDB .4byte ScrCmd_fadescreenswapbuffers .4byte ScrCmd_buffertrainerclassname diff --git a/data/scripts/cave_of_origin.inc b/data/scripts/cave_of_origin.inc index da4a977615..52a1da84f2 100644 --- a/data/scripts/cave_of_origin.inc +++ b/data/scripts/cave_of_origin.inc @@ -1,32 +1,32 @@ @ All unused / leftover scripts from RS -EventScript_272274:: @ 8272274 +CaveOfOrigin_EventScript_LegendaryCry:: @ 8272274 lockall waitse - playmoncry SPECIES_KYOGRE, 2 + playmoncry SPECIES_KYOGRE, 2 @ SPECIES_GROUDON in Ruby waitmoncry setvar VAR_TEMP_5, 1 releaseall end -EventScript_272283:: @ 8272283 +CaveOfOrigin_EventScript_Shake1:: @ 8272283 lockall setvar VAR_TEMP_1, 1 - goto EventScript_2722A7 + goto CaveOfOrigin_EventScript_Shake end -EventScript_27228F:: @ 827228F +CaveOfOrigin_EventScript_Shake2:: @ 827228F lockall setvar VAR_TEMP_2, 1 - goto EventScript_2722A7 + goto CaveOfOrigin_EventScript_Shake end -EventScript_27229B:: @ 827229B +CaveOfOrigin_EventScript_Shake3:: @ 827229B lockall setvar VAR_TEMP_3, 1 - goto EventScript_2722A7 + goto CaveOfOrigin_EventScript_Shake end -EventScript_2722A7:: @ 82722A7 +CaveOfOrigin_EventScript_Shake:: @ 82722A7 setvar VAR_0x8004, 1 @ vertical pan setvar VAR_0x8005, 1 @ horizontal pan setvar VAR_0x8006, 8 @ num shakes @@ -36,10 +36,7 @@ EventScript_2722A7:: @ 82722A7 releaseall end -CaveOfOrigin_1F_EventScript_2722C1:: @ 82722C1 -CaveOfOrigin_UnusedRubySapphireMap1_EventScript_2722C1:: @ 82722C1 -CaveOfOrigin_UnusedRubySapphireMap2_EventScript_2722C1:: @ 82722C1 -CaveOfOrigin_UnusedRubySapphireMap3_EventScript_2722C1:: @ 82722C1 +CaveOfOrigin_EventScript_SetTempVars:: @ 82722C1 setvar VAR_TEMP_1, 1 setvar VAR_TEMP_2, 1 setvar VAR_TEMP_3, 1 diff --git a/data/scripts/new_game.inc b/data/scripts/new_game.inc index f053b32990..e30dad1cca 100644 --- a/data/scripts/new_game.inc +++ b/data/scripts/new_game.inc @@ -240,6 +240,6 @@ EventScript_ResetAllMapFlags:: @ 82715DE setflag FLAG_HIDE_FALLORBOR_TOWN_BATTLE_TENT_SCOTT setflag FLAG_HIDE_EVER_GRANDE_POKEMON_CENTER_1F_SCOTT setflag FLAG_HIDE_SKY_PILLAR_WALLACE - setflag FLAG_RAYQUAZA_ON_SKY_TOWER_SUMMIT + setflag FLAG_HIDE_RAYQUAZA_SKY_TOWER_SUMMIT call EventScript_ResetAllBerries end diff --git a/data/specials.inc b/data/specials.inc index dbf075493c..92f36beba3 100644 --- a/data/specials.inc +++ b/data/specials.inc @@ -489,7 +489,7 @@ gSpecials:: @ 81DBA64 def_special GetBattleFrontierTutorMoveIndex def_special sub_813AF48 def_special DoDeoxysRockInteraction - def_special sub_813B1D0 + def_special SetDeoxysRockPalette def_special CreateObedientEnemyMon def_special StartMirageTowerDisintegration def_special StartMirageTowerShake diff --git a/data/text/braille.inc b/data/text/braille.inc index 3d4b8e1166..13c66c52fd 100644 --- a/data/text/braille.inc +++ b/data/text/braille.inc @@ -186,7 +186,7 @@ SealedChamber_InnerRoom_Braille_2A6C73: @ 82A6C73 .braille "POKEMON\n" .braille "WAITS.$" -DesertRuins_Braille_2A6CA0: @ 82A6CA0 +DesertRuins_Braille_UseRockSmash: @ 82A6CA0 .byte 1 .byte 0 .byte 27 @@ -198,7 +198,7 @@ DesertRuins_Braille_2A6CA0: @ 82A6CA0 .braille "THEN, USE\n" .braille "ROCK SMASH.$" -IslandCave_Braille_2A6CD4: @ 82A6CD4 +IslandCave_Braille_RunLapAroundWall: @ 82A6CD4 .byte 5 .byte 0 .byte 25 @@ -210,7 +210,7 @@ IslandCave_Braille_2A6CD4: @ 82A6CD4 .braille "RUN AROUND\n" .braille "ONE LAP.$" -AncientTomb_Braille_2A6D06: @ 82A6D06 +AncientTomb_Braille_ShineInTheMiddle: @ 82A6D06 .byte 3 .byte 0 .byte 25 diff --git a/include/constants/flags.h b/include/constants/flags.h index 87463db988..8623af9683 100644 --- a/include/constants/flags.h +++ b/include/constants/flags.h @@ -87,7 +87,7 @@ #define FLAG_UNUSED_0x04F 0x4F // Unused Flag // Scripts -#define FLAG_RAYQUAZA_ON_SKY_TOWER_SUMMIT 0x50 +#define FLAG_HIDE_RAYQUAZA_SKY_TOWER_SUMMIT 0x50 #define FLAG_SET_WALL_CLOCK 0x51 #define FLAG_RESCUED_BIRCH 0x52 #define FLAG_LEGENDARIES_IN_SOOTOPOLIS 0x53 diff --git a/include/event_scripts.h b/include/event_scripts.h index bf68d309e8..b0630ecd42 100644 --- a/include/event_scripts.h +++ b/include/event_scripts.h @@ -551,7 +551,7 @@ extern const u8 BattleFrontier_BattlePyramidEmptySquare_EventScript_252BE8[]; extern const u8 EventScript_FieldPoison[]; extern const u8 EventScript_EggHatch[]; extern const u8 UnusualWeather_EventScript_EndEventAndCleanup_1[]; -extern const u8 IslandCave_EventScript_238EAF[]; +extern const u8 IslandCave_EventScript_OpenRegiEntrance[]; extern const u8 MauvilleCity_EventScript_1DF7BA[]; extern const u8 Route119_EventScript_1F49EC[]; extern const u8 LittlerootTown_ProfessorBirchsLab_EventScript_1FA4D6[]; diff --git a/src/field_control_avatar.c b/src/field_control_avatar.c index 85c3f13ae0..e868a7b995 100644 --- a/src/field_control_avatar.c +++ b/src/field_control_avatar.c @@ -563,7 +563,7 @@ static bool8 TryStartStepCountScript(u16 metatileBehavior) } if (ShouldDoBrailleRegicePuzzle() == TRUE) { - ScriptContext1_SetupScript(IslandCave_EventScript_238EAF); + ScriptContext1_SetupScript(IslandCave_EventScript_OpenRegiEntrance); return TRUE; } if (ShouldDoWallyCall() == TRUE) diff --git a/src/field_specials.c b/src/field_specials.c index aa7ff4e42a..2bf67dc256 100644 --- a/src/field_specials.c +++ b/src/field_specials.c @@ -3481,7 +3481,7 @@ void IncrementBirthIslandRockStepCount(void) } } -void sub_813B1D0(void) +void SetDeoxysRockPalette(void) { LoadPalette(&sDeoxysRockPalettes[(u8)VarGet(VAR_DEOXYS_ROCK_LEVEL)], 0x1A0, 8); BlendPalettes(0x04000000, 16, 0); diff --git a/src/fldeff_cut.c b/src/fldeff_cut.c index 00eed76245..fe21ff060b 100644 --- a/src/fldeff_cut.c +++ b/src/fldeff_cut.c @@ -25,7 +25,7 @@ extern struct MapPosition gPlayerFacingPosition; extern const u8 EventScript_FldEffCut[]; -extern const u8 FarawayIsland_Interior_EventScript_267EDB[]; +extern const u8 FarawayIsland_Interior_EventScript_HideMewWhenGrassCut[]; extern const u8 gFieldEffectPic_CutGrass[]; extern const u16 gFieldEffectObjectPalette6[]; @@ -584,7 +584,7 @@ static void CutGrassSpriteCallbackEnd(struct Sprite *sprite) ScriptContext2_Disable(); if (IsMewPlayingHideAndSeek() == TRUE) - ScriptContext1_SetupScript(FarawayIsland_Interior_EventScript_267EDB); + ScriptContext1_SetupScript(FarawayIsland_Interior_EventScript_HideMewWhenGrassCut); } void FixLongGrassMetatilesWindowTop(s16 x, s16 y) diff --git a/src/scrcmd.c b/src/scrcmd.c index d97e3de476..f468ac83ed 100644 --- a/src/scrcmd.c +++ b/src/scrcmd.c @@ -68,7 +68,7 @@ extern const SpecialFunc gSpecials[]; extern const u8 *gStdScripts[]; extern const u8 *gStdScripts_End[]; -void sub_809BDB4(void); +static void CloseBrailleWindow(void); // This is defined in here so the optimizer can't see its value when compiling // script.c. @@ -1528,9 +1528,9 @@ bool8 ScrCmd_braillemessage(struct ScriptContext *ctx) return FALSE; } -bool8 ScrCmd_cmdDA(struct ScriptContext *ctx) +bool8 ScrCmd_closebraillemessage(struct ScriptContext *ctx) { - sub_809BDB4(); + CloseBrailleWindow(); return FALSE; } @@ -2257,7 +2257,7 @@ bool8 ScrCmd_setmonmetlocation(struct ScriptContext *ctx) return FALSE; } -void sub_809BDB4(void) +static void CloseBrailleWindow(void) { ClearStdWindowAndFrame(gBrailleWindowId, 1); RemoveWindow(gBrailleWindowId); From 27169f634b27a8985945e8b592f3f4ce0a38c53e Mon Sep 17 00:00:00 2001 From: GriffinR Date: Thu, 31 Oct 2019 21:33:01 -0400 Subject: [PATCH 39/46] Review changes for party menu doc --- include/battle_main.h | 2 +- include/constants/global.h | 2 ++ include/global.h | 12 ++++++------ include/party_menu.h | 1 - src/battle_main.c | 12 ++++++------ src/party_menu.c | 18 +++++++++--------- 6 files changed, 24 insertions(+), 23 deletions(-) diff --git a/include/battle_main.h b/include/battle_main.h index fe88204bf7..e04db17bb0 100644 --- a/include/battle_main.h +++ b/include/battle_main.h @@ -84,7 +84,7 @@ void RunBattleScriptCommands_PopCallbacksStack(void); void RunBattleScriptCommands(void); bool8 TryRunFromBattle(u8 battlerId); -extern struct UnknownPokemonStruct4 gMultiPartnerParty[PARTY_SIZE / 2]; +extern struct UnknownPokemonStruct4 gMultiPartnerParty[MULTI_PARTY_SIZE]; extern const struct SpriteTemplate gUnknown_0831AC88; extern const struct OamData gOamData_831ACA8; diff --git a/include/constants/global.h b/include/constants/global.h index ca48c1d2ae..4ade1c8236 100644 --- a/include/constants/global.h +++ b/include/constants/global.h @@ -54,6 +54,8 @@ #define TRAINER_ID_LENGTH 4 #define PARTY_SIZE 6 +#define FRONTIER_PARTY_SIZE 3 +#define MULTI_PARTY_SIZE PARTY_SIZE / 2 #define MAX_MON_MOVES 4 // string lengths diff --git a/include/global.h b/include/global.h index 5fd49f773a..94dfebc28b 100644 --- a/include/global.h +++ b/include/global.h @@ -220,7 +220,7 @@ struct Apprentice u8 lvlMode:2; // + 1 u8 field_1; u8 number; - struct ApprenticeMon party[3]; + struct ApprenticeMon party[MULTI_PARTY_SIZE]; u16 easyChatWords[6]; u8 playerId[TRAINER_ID_LENGTH]; u8 playerName[PLAYER_NAME_LENGTH]; @@ -282,7 +282,7 @@ struct BattleTowerEReaderTrainer /*0x10*/ u16 greeting[6]; /*0x1C*/ u16 farewellPlayerLost[6]; /*0x28*/ u16 farewellPlayerWon[6]; - /*0x34*/ struct BattleTowerPokemon party[3]; + /*0x34*/ struct BattleTowerPokemon party[FRONTIER_PARTY_SIZE]; /*0xB8*/ u32 checksum; }; @@ -329,7 +329,7 @@ struct BattleFrontier /*0xCA9*/ u8 field_CA9_d:1; // 0x20 /*0xCA9*/ u8 field_CA9_e:1; // 0x40 /*0xCA9*/ u8 field_CA9_f:1; // 0x80 - /*0xCAA*/ u16 selectedPartyMons[3]; + /*0xCAA*/ u16 selectedPartyMons[FRONTIER_PARTY_SIZE]; /*0xCB0*/ u16 field_CB0; /*0xCB2*/ u16 curChallengeBattleNum; // In case of battle pyramid, the floor. /*0xCB4*/ u16 trainerIds[20]; @@ -356,7 +356,7 @@ struct BattleFrontier /*0xD14*/ u16 domeRecordWinStreaks[2][2]; /*0xD1C*/ u16 domeTotalChampionships[2][2]; /*0xD24*/ struct BattleDomeTrainer domeTrainers[DOME_TOURNAMENT_TRAINERS_COUNT]; - /*0xD64*/ u16 domeMonIds[DOME_TOURNAMENT_TRAINERS_COUNT][3]; + /*0xD64*/ u16 domeMonIds[DOME_TOURNAMENT_TRAINERS_COUNT][FRONTIER_PARTY_SIZE]; /*0xDC4*/ u16 field_DC4; /*0xDC6*/ u16 field_DC6; /*0xDC8*/ u16 palaceWinStreaks[2][2]; @@ -375,7 +375,7 @@ struct BattleFrontier /*0xE10*/ u8 pikeHintedRoomIndex:3; /*0xE10*/ u8 pikeHintedRoomType:4; /*0xE10*/ u8 pikeHealingRoomsDisabled:1; - /*0xE12*/ u16 pikeHeldItemsBackup[3]; + /*0xE12*/ u16 pikeHeldItemsBackup[FRONTIER_PARTY_SIZE]; /*0xE18*/ u16 pyramidRewardItem; /*0xE1A*/ u16 pyramidWinStreaks[2]; /*0xE1E*/ u16 pyramidRecordStreaks[2]; @@ -419,7 +419,7 @@ struct PlayersApprentice /*0xB2*/ u8 field_B2_0:3; /*0xB2*/ u8 field_B2_1:2; /*0xB3*/ u8 field_B3; - /*0xB4*/ u8 monIds[3]; + /*0xB4*/ u8 monIds[MULTI_PARTY_SIZE]; /*0xB8*/ struct Sav2_B8 field_B8[9]; }; diff --git a/include/party_menu.h b/include/party_menu.h index 0140901c19..126931762a 100644 --- a/include/party_menu.h +++ b/include/party_menu.h @@ -12,7 +12,6 @@ struct PartyMenu TaskFunc task; u8 menuType:4; u8 layout:2; - u8 unused:2; s8 slotId; s8 slotId2; u8 action; diff --git a/src/battle_main.c b/src/battle_main.c index 7ae8d5c468..8a44791190 100644 --- a/src/battle_main.c +++ b/src/battle_main.c @@ -167,7 +167,7 @@ EWRAM_DATA static u32 sUnusedUnknownArray[25] = {0}; EWRAM_DATA u32 gBattleTypeFlags = 0; EWRAM_DATA u8 gBattleTerrain = 0; EWRAM_DATA u32 gUnknown_02022FF4 = 0; -EWRAM_DATA struct UnknownPokemonStruct4 gMultiPartnerParty[PARTY_SIZE / 2] = {0}; +EWRAM_DATA struct UnknownPokemonStruct4 gMultiPartnerParty[MULTI_PARTY_SIZE] = {0}; EWRAM_DATA static struct UnknownPokemonStruct4* sMultiPartnerPartyBuffer = NULL; EWRAM_DATA u8 *gUnknown_0202305C = NULL; EWRAM_DATA u8 *gUnknown_02023060 = NULL; @@ -1249,12 +1249,12 @@ static void CB2_HandleStartMultiPartnerBattle(void) if (gLinkPlayers[playerMultiplayerId].id != 0) { memcpy(gPlayerParty, gBlockRecvBuffer[enemyMultiplayerId], sizeof(struct Pokemon) * 2); - memcpy(gPlayerParty + PARTY_SIZE / 2, gBlockRecvBuffer[playerMultiplayerId], sizeof(struct Pokemon) * 2); + memcpy(gPlayerParty + MULTI_PARTY_SIZE, gBlockRecvBuffer[playerMultiplayerId], sizeof(struct Pokemon) * 2); } else { memcpy(gPlayerParty, gBlockRecvBuffer[playerMultiplayerId], sizeof(struct Pokemon) * 2); - memcpy(gPlayerParty + PARTY_SIZE / 2, gBlockRecvBuffer[enemyMultiplayerId], sizeof(struct Pokemon) * 2); + memcpy(gPlayerParty + MULTI_PARTY_SIZE, gBlockRecvBuffer[enemyMultiplayerId], sizeof(struct Pokemon) * 2); } gBattleCommunication[MULTIUSE_STATE]++; } @@ -1667,7 +1667,7 @@ static void CB2_HandleStartMultiBattle(void) break; case 1: case 2: - memcpy(gPlayerParty + PARTY_SIZE / 2, gBlockRecvBuffer[id], sizeof(struct Pokemon) * 2); + memcpy(gPlayerParty + MULTI_PARTY_SIZE, gBlockRecvBuffer[id], sizeof(struct Pokemon) * 2); break; } } @@ -1684,7 +1684,7 @@ static void CB2_HandleStartMultiBattle(void) break; case 1: case 2: - memcpy(gPlayerParty + PARTY_SIZE / 2, gBlockRecvBuffer[id], sizeof(struct Pokemon) * 2); + memcpy(gPlayerParty + MULTI_PARTY_SIZE, gBlockRecvBuffer[id], sizeof(struct Pokemon) * 2); break; } } @@ -1698,7 +1698,7 @@ static void CB2_HandleStartMultiBattle(void) break; case 1: case 2: - memcpy(gEnemyParty + PARTY_SIZE / 2, gBlockRecvBuffer[id], sizeof(struct Pokemon) * 2); + memcpy(gEnemyParty + MULTI_PARTY_SIZE, gBlockRecvBuffer[id], sizeof(struct Pokemon) * 2); break; } } diff --git a/src/party_menu.c b/src/party_menu.c index 55243c1cfa..c711881b0b 100755 --- a/src/party_menu.c +++ b/src/party_menu.c @@ -155,7 +155,7 @@ static EWRAM_DATA u16 *sSlot2TilemapBuffer = 0; // EWRAM_DATA u8 gSelectedOrderFromParty[4] = {0}; static EWRAM_DATA u16 sPartyMenuItemId = 0; static EWRAM_DATA u16 sUnused_0203CEFE = 0; -EWRAM_DATA u8 gBattlePartyCurrentOrder[3] = {0}; // bits 0-3 are the current pos of Slot 1, 4-7 are Slot 2, and so on +EWRAM_DATA u8 gBattlePartyCurrentOrder[PARTY_SIZE / 2] = {0}; // bits 0-3 are the current pos of Slot 1, 4-7 are Slot 2, and so on // IWRAM common void (*gItemUseCB)(u8, TaskFunc); @@ -750,10 +750,10 @@ static void InitPartyMenuBoxes(u8 layout) static void RenderPartyMenuBox(u8 slot) { - if (gPartyMenu.menuType == PARTY_MENU_TYPE_MULTI_SHOWCASE && slot > 2) + if (gPartyMenu.menuType == PARTY_MENU_TYPE_MULTI_SHOWCASE && slot >= MULTI_PARTY_SIZE) { DisplayPartyPokemonDataForMultiBattle(slot); - if (gMultiPartnerParty[slot - 3].species == SPECIES_NONE) + if (gMultiPartnerParty[slot - MULTI_PARTY_SIZE].species == SPECIES_NONE) LoadPartyBoxPalette(&sPartyMenuBoxes[slot], PARTY_PAL_NO_MON); else LoadPartyBoxPalette(&sPartyMenuBoxes[slot], PARTY_PAL_MULTI_ALT); @@ -986,10 +986,10 @@ static void CreatePartyMonSprites(u8 slot) { u8 actualSlot; - if (gPartyMenu.menuType == PARTY_MENU_TYPE_MULTI_SHOWCASE && slot > 2) + if (gPartyMenu.menuType == PARTY_MENU_TYPE_MULTI_SHOWCASE && slot >= MULTI_PARTY_SIZE) { u8 status; - actualSlot = slot - 3; + actualSlot = slot - MULTI_PARTY_SIZE; if (gMultiPartnerParty[actualSlot].species != SPECIES_NONE) { @@ -1117,7 +1117,7 @@ static bool8 PartyBoxPal_ParnterOrDisqualifiedInArena(u8 slot) if (gPartyMenu.layout == PARTY_LAYOUT_MULTI && (slot == 1 || slot == 4 || slot == 5)) return TRUE; - if (slot < 3 && (gBattleTypeFlags & BATTLE_TYPE_ARENA) && gMain.inBattle && (gBattleStruct->arenaLostPlayerMons >> GetPartyIdFromBattleSlot(slot) & 1)) + if (slot < MULTI_PARTY_SIZE && (gBattleTypeFlags & BATTLE_TYPE_ARENA) && gMain.inBattle && (gBattleStruct->arenaLostPlayerMons >> GetPartyIdFromBattleSlot(slot) & 1)) return TRUE; return FALSE; @@ -6076,7 +6076,7 @@ static void Task_MultiPartnerPartySlideIn(u8 taskId) { for (i = 3; i < PARTY_SIZE; i++) { - if (gMultiPartnerParty[i - 3].species != SPECIES_NONE) + if (gMultiPartnerParty[i - MULTI_PARTY_SIZE].species != SPECIES_NONE) AnimateSelectedPartyIcon(sPartyMenuBoxes[i].monSpriteId, 0); } PlaySE(SE_W231); // The Harden SE plays once the partners party mons have slid on screen @@ -6107,7 +6107,7 @@ static void SlideMultiPartyMenuBoxSpritesOneStep(u8 taskId) for (i = 3; i < PARTY_SIZE; i++) { - if (gMultiPartnerParty[i - 3].species != SPECIES_NONE) + if (gMultiPartnerParty[i - MULTI_PARTY_SIZE].species != SPECIES_NONE) { MoveMultiPartyMenuBoxSprite(sPartyMenuBoxes[i].monSpriteId, tXPos - 8); MoveMultiPartyMenuBoxSprite(sPartyMenuBoxes[i].itemSpriteId, tXPos - 8); @@ -6236,7 +6236,7 @@ void DoBattlePyramidMonsHaveHeldItem(void) u8 i; gSpecialVar_Result = FALSE; - for (i = 0; i < 3; i++) + for (i = 0; i < FRONTIER_PARTY_SIZE; i++) { if (GetMonData(&gPlayerParty[i], MON_DATA_HELD_ITEM) != ITEM_NONE) { From 218fcd99b395777e99b3b6b9478a3d97c7a7fc87 Mon Sep 17 00:00:00 2001 From: tustin2121 Date: Thu, 31 Oct 2019 20:56:26 -0400 Subject: [PATCH 40/46] Itemfinder code should use flag constant --- src/item_use.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/item_use.c b/src/item_use.c index 456a393390..959c7659f4 100755 --- a/src/item_use.c +++ b/src/item_use.c @@ -350,7 +350,7 @@ bool8 ItemfinderCheckForHiddenItems(const struct MapEvents *events, u8 taskId) gTasks[taskId].data[2] = FALSE; for (i = 0; i < events->bgEventCount; i++) { - if (events->bgEvents[i].kind == BG_EVENT_HIDDEN_ITEM && !FlagGet(events->bgEvents[i].bgUnion.hiddenItem.hiddenItemId + 0x1F4)) + if (events->bgEvents[i].kind == BG_EVENT_HIDDEN_ITEM && !FlagGet(events->bgEvents[i].bgUnion.hiddenItem.hiddenItemId + FLAG_HIDDEN_ITEMS_START)) { distanceX = (u16)events->bgEvents[i].x + 7; newDistanceX = distanceX - x; @@ -379,7 +379,7 @@ bool8 sub_80FD6D4(const struct MapEvents *events, s16 x, s16 y) { if (bgEvent[i].kind == BG_EVENT_HIDDEN_ITEM && x == (u16)bgEvent[i].x && y == (u16)bgEvent[i].y) // hidden item and coordinates matches x and y passed? { - if (!FlagGet(bgEvent[i].bgUnion.hiddenItem.hiddenItemId + 0x1F4)) + if (!FlagGet(bgEvent[i].bgUnion.hiddenItem.hiddenItemId + FLAG_HIDDEN_ITEMS_START)) return TRUE; else return FALSE; From dd01942c4f41d65fb861a42097108e5f5d9b93e9 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Fri, 1 Nov 2019 03:41:55 -0400 Subject: [PATCH 41/46] Document aqua/magma hideout scripts --- common_syms/trainer_see.txt | 6 +- data/io_reg.s | 12 +- data/maps/AbandonedShip_Rooms_1F/scripts.inc | 2 +- data/maps/AquaHideout_1F/map.json | 6 +- data/maps/AquaHideout_1F/scripts.inc | 61 +++---- data/maps/AquaHideout_B1F/map.json | 12 +- data/maps/AquaHideout_B1F/scripts.inc | 94 +++++------ data/maps/AquaHideout_B2F/map.json | 12 +- data/maps/AquaHideout_B2F/scripts.inc | 79 ++++----- data/maps/JaggedPass/scripts.inc | 4 +- data/maps/MagmaHideout_1F/map.json | 4 +- data/maps/MagmaHideout_1F/scripts.inc | 24 +-- data/maps/MagmaHideout_2F_1R/map.json | 8 +- data/maps/MagmaHideout_2F_1R/scripts.inc | 48 +++--- data/maps/MagmaHideout_2F_2R/map.json | 8 +- data/maps/MagmaHideout_2F_2R/scripts.inc | 48 +++--- data/maps/MagmaHideout_3F_1R/map.json | 4 +- data/maps/MagmaHideout_3F_1R/scripts.inc | 24 +-- data/maps/MagmaHideout_3F_2R/map.json | 2 +- data/maps/MagmaHideout_3F_2R/scripts.inc | 12 +- data/maps/MagmaHideout_4F/map.json | 10 +- data/maps/MagmaHideout_4F/scripts.inc | 90 +++++------ data/maps/MeteorFalls_1F_2R/scripts.inc | 2 +- .../MossdeepCity_SpaceCenter_1F/scripts.inc | 4 +- data/maps/MtChimney/scripts.inc | 4 +- data/maps/MtPyre_3F/scripts.inc | 2 +- data/maps/MtPyre_6F/scripts.inc | 2 +- data/maps/PetalburgWoods/scripts.inc | 2 +- data/maps/Route102/scripts.inc | 2 +- data/maps/Route103/scripts.inc | 2 +- data/maps/Route104/scripts.inc | 6 +- data/maps/Route105/scripts.inc | 2 +- data/maps/Route106/scripts.inc | 2 +- data/maps/Route107/scripts.inc | 2 +- data/maps/Route108/scripts.inc | 2 +- data/maps/Route109/scripts.inc | 4 +- data/maps/Route110/scripts.inc | 8 +- data/maps/Route111/scripts.inc | 6 +- data/maps/Route112/scripts.inc | 2 +- data/maps/Route113/scripts.inc | 4 +- data/maps/Route114/scripts.inc | 4 +- data/maps/Route115/scripts.inc | 6 +- data/maps/Route116/scripts.inc | 4 +- data/maps/Route117/scripts.inc | 8 +- data/maps/Route118/scripts.inc | 4 +- data/maps/Route119/scripts.inc | 4 +- data/maps/Route120/scripts.inc | 4 +- data/maps/Route121/scripts.inc | 6 +- data/maps/Route123/scripts.inc | 6 +- data/maps/Route124/scripts.inc | 2 +- data/maps/Route125/scripts.inc | 2 +- data/maps/Route126/scripts.inc | 2 +- data/maps/Route127/scripts.inc | 2 +- data/maps/Route128/scripts.inc | 4 +- data/maps/SeafloorCavern_Room1/map.json | 4 +- data/maps/SeafloorCavern_Room1/scripts.inc | 24 +-- data/maps/SeafloorCavern_Room3/map.json | 4 +- data/maps/SeafloorCavern_Room3/scripts.inc | 24 +-- data/maps/SeafloorCavern_Room4/map.json | 4 +- data/maps/SeafloorCavern_Room4/scripts.inc | 24 +-- data/maps/SeafloorCavern_Room9/map.json | 2 +- data/maps/SeafloorCavern_Room9/scripts.inc | 118 +++++++------- data/specials.inc | 6 +- include/field_screen_effect.h | 4 +- include/script.h | 2 +- include/trainer_see.h | 8 +- src/battle_setup.c | 6 +- src/field_screen_effect.c | 152 ++++++++++-------- src/scrcmd.c | 2 +- src/trainer_see.c | 37 ++--- 70 files changed, 567 insertions(+), 540 deletions(-) diff --git a/common_syms/trainer_see.txt b/common_syms/trainer_see.txt index 2d05143254..0b30a632a0 100644 --- a/common_syms/trainer_see.txt +++ b/common_syms/trainer_see.txt @@ -1,5 +1,5 @@ -gUnknown_03006080 -gUnknown_03006084 +gWhichTrainerToFaceAfterBattle +gPostBattleMovementScript gApproachingTrainers gNoOfApproachingTrainers -gUnknown_030060AC +gTrainerApproachedPlayer diff --git a/data/io_reg.s b/data/io_reg.s index 9c5f64f583..24e0e3d2de 100644 --- a/data/io_reg.s +++ b/data/io_reg.s @@ -1,4 +1,4 @@ - .include "asm/macros.inc" + .include "asm/macros.inc" .include "constants/constants.inc" .section .rodata @@ -30,8 +30,8 @@ gOverworldBackgroundLayerFlags:: @ 82EC7C4 .2byte 0x0400 /* BLDCNT_TGT2_BG2 */ .2byte 0x0800 /* BLDCNT_TGT2_BG3 */ -gUnknown_82EC7CC:: @ 82EC7CC - .2byte 0x0001 - .2byte 0x0002 - .2byte 0x0004 - .2byte 0x0008 +gOrbEffectBackgroundLayerFlags:: @ 82EC7CC + .2byte 0x0001 /* BLDCNT_TGT1_BG0 */ + .2byte 0x0002 /* BLDCNT_TGT1_BG1 */ + .2byte 0x0004 /* BLDCNT_TGT1_BG2 */ + .2byte 0x0008 /* BLDCNT_TGT1_BG3 */ diff --git a/data/maps/AbandonedShip_Rooms_1F/scripts.inc b/data/maps/AbandonedShip_Rooms_1F/scripts.inc index 5797ed5fb6..2c3ff862a1 100644 --- a/data/maps/AbandonedShip_Rooms_1F/scripts.inc +++ b/data/maps/AbandonedShip_Rooms_1F/scripts.inc @@ -20,7 +20,7 @@ AbandonedShip_Rooms_1F_EventScript_237AB3:: @ 8237AB3 end AbandonedShip_Rooms_1F_EventScript_237ADF:: @ 8237ADF - special sub_80B4808 + special PlayerFaceTrainerAfterBattle waitmovement 0 msgbox AbandonedShip_Rooms_1F_Text_237C2A, MSGBOX_DEFAULT register_matchcall TRAINER_THALIA_1 diff --git a/data/maps/AquaHideout_1F/map.json b/data/maps/AquaHideout_1F/map.json index 5f585f32f3..25fe48a9ed 100644 --- a/data/maps/AquaHideout_1F/map.json +++ b/data/maps/AquaHideout_1F/map.json @@ -24,7 +24,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "AquaHideout_1F_EventScript_233494", + "script": "AquaHideout_1F_EventScript_HideoutEntranceGrunt1", "flag": "FLAG_HIDE_AQUA_HIDEOUT_1F_GRUNT_1_BLOCKING_ENTRANCE" }, { @@ -37,7 +37,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "AquaHideout_1F_EventScript_2334C6", + "script": "AquaHideout_1F_EventScript_HideoutEntranceGrunt2", "flag": "FLAG_HIDE_AQUA_HIDEOUT_1F_GRUNT_2_BLOCKING_ENTRANCE" }, { @@ -50,7 +50,7 @@ "movement_range_y": 5, "trainer_type": "1", "trainer_sight_or_berry_tree_id": "3", - "script": "AquaHideout_1F_EventScript_2334F8", + "script": "AquaHideout_1F_EventScript_Grunt1", "flag": "FLAG_HIDE_AQUA_HIDEOUT_GRUNTS" } ], diff --git a/data/maps/AquaHideout_1F/scripts.inc b/data/maps/AquaHideout_1F/scripts.inc index 653e0f7c71..ff8b6c16d0 100644 --- a/data/maps/AquaHideout_1F/scripts.inc +++ b/data/maps/AquaHideout_1F/scripts.inc @@ -1,55 +1,56 @@ AquaHideout_1F_MapScripts:: @ 8233493 .byte 0 -AquaHideout_1F_EventScript_233494:: @ 8233494 +@ The below two entrance guards give hints about what to do to progress the story +AquaHideout_1F_EventScript_HideoutEntranceGrunt1:: @ 8233494 lock faceplayer - goto_if_set FLAG_GROUDON_AWAKENED_MAGMA_HIDEOUT, AquaHideout_1F_EventScript_2334BC - goto_if_set FLAG_RECEIVED_RED_OR_BLUE_ORB, AquaHideout_1F_EventScript_2334B2 - msgbox AquaHideout_1F_Text_23351D, MSGBOX_DEFAULT + goto_if_set FLAG_GROUDON_AWAKENED_MAGMA_HIDEOUT, AquaHideout_1F_EventScript_SlateportHint1 + goto_if_set FLAG_RECEIVED_RED_OR_BLUE_ORB, AquaHideout_1F_EventScript_MagmaHideoutHint1 + msgbox AquaHideout_1F_Text_OurBossIsSnatchingSomething, MSGBOX_DEFAULT release end -AquaHideout_1F_EventScript_2334B2:: @ 82334B2 - msgbox AquaHideout_1F_Text_2335E3, MSGBOX_DEFAULT +AquaHideout_1F_EventScript_MagmaHideoutHint1:: @ 82334B2 + msgbox AquaHideout_1F_Text_WhereMightMagmaHideoutBe, MSGBOX_DEFAULT release end -AquaHideout_1F_EventScript_2334BC:: @ 82334BC - msgbox AquaHideout_1F_Text_23367D, MSGBOX_DEFAULT +AquaHideout_1F_EventScript_SlateportHint1:: @ 82334BC + msgbox AquaHideout_1F_Text_BossWentToJackASubmarine, MSGBOX_DEFAULT release end -AquaHideout_1F_EventScript_2334C6:: @ 82334C6 +AquaHideout_1F_EventScript_HideoutEntranceGrunt2:: @ 82334C6 lock faceplayer - goto_if_set FLAG_GROUDON_AWAKENED_MAGMA_HIDEOUT, AquaHideout_1F_EventScript_2334EE - goto_if_set FLAG_RECEIVED_RED_OR_BLUE_ORB, AquaHideout_1F_EventScript_2334E4 - msgbox AquaHideout_1F_Text_233739, MSGBOX_DEFAULT + goto_if_set FLAG_GROUDON_AWAKENED_MAGMA_HIDEOUT, AquaHideout_1F_EventScript_SlateportHint2 + goto_if_set FLAG_RECEIVED_RED_OR_BLUE_ORB, AquaHideout_1F_EventScript_MagmaHideoutHint2 + msgbox AquaHideout_1F_Text_BossIsOnRoute122, MSGBOX_DEFAULT release end -AquaHideout_1F_EventScript_2334E4:: @ 82334E4 - msgbox AquaHideout_1F_Text_2337FA, MSGBOX_DEFAULT +AquaHideout_1F_EventScript_MagmaHideoutHint2:: @ 82334E4 + msgbox AquaHideout_1F_Text_TeamMagmaAtMtChimney, MSGBOX_DEFAULT release end -AquaHideout_1F_EventScript_2334EE:: @ 82334EE - msgbox AquaHideout_1F_Text_233884, MSGBOX_DEFAULT +AquaHideout_1F_EventScript_SlateportHint2:: @ 82334EE + msgbox AquaHideout_1F_Text_BossIsInSlateportCity, MSGBOX_DEFAULT release end -AquaHideout_1F_EventScript_2334F8:: @ 82334F8 - trainerbattle_single TRAINER_GRUNT_1, AquaHideout_1F_Text_23393D, AquaHideout_1F_Text_233964, AquaHideout_1F_EventScript_233513 - msgbox AquaHideout_1F_Text_233977, MSGBOX_AUTOCLOSE +AquaHideout_1F_EventScript_Grunt1:: @ 82334F8 + trainerbattle_single TRAINER_GRUNT_1, AquaHideout_1F_Text_Grunt1Intro, AquaHideout_1F_Text_Grunt1Defeat, AquaHideout_1F_EventScript_Grunt1Defeated + msgbox AquaHideout_1F_Text_Grunt1PostBattle, MSGBOX_AUTOCLOSE end -AquaHideout_1F_EventScript_233513:: @ 8233513 - msgbox AquaHideout_1F_Text_233977, MSGBOX_DEFAULT +AquaHideout_1F_EventScript_Grunt1Defeated:: @ 8233513 + msgbox AquaHideout_1F_Text_Grunt1PostBattle, MSGBOX_DEFAULT release end -AquaHideout_1F_Text_23351D: @ 823351D +AquaHideout_1F_Text_OurBossIsSnatchingSomething: @ 823351D .string "What? What? What do you want with \n" .string "TEAM AQUA?\p" .string "Our BOSS isn't here! He's gone off to\n" @@ -59,7 +60,7 @@ AquaHideout_1F_Text_23351D: @ 823351D .string "Wahaha! Do you really think I'd tell\n" .string "you something that crucial?$" -AquaHideout_1F_Text_2335E3: @ 82335E3 +AquaHideout_1F_Text_WhereMightMagmaHideoutBe: @ 82335E3 .string "What? What?\n" .string "Are you a TEAM MAGMA grunt?\p" .string "I hear that TEAM MAGMA is trying to\n" @@ -67,7 +68,7 @@ AquaHideout_1F_Text_2335E3: @ 82335E3 .string "HIDEOUT.\p" .string "But where might their HIDEOUT be?$" -AquaHideout_1F_Text_23367D: @ 823367D +AquaHideout_1F_Text_BossWentToJackASubmarine: @ 823367D .string "What? What? What do you want with \n" .string "TEAM AQUA?\p" .string "Our BOSS isn't here!\n" @@ -77,7 +78,7 @@ AquaHideout_1F_Text_23367D: @ 823367D .string "Wahaha! Do you really think I'd tell\n" .string "you something that crucial?$" -AquaHideout_1F_Text_233739: @ 8233739 +AquaHideout_1F_Text_BossIsOnRoute122: @ 8233739 .string "What? What? What do you want with \n" .string "TEAM AQUA?\p" .string "Our BOSS isn't here! He's on his way to\n" @@ -87,14 +88,14 @@ AquaHideout_1F_Text_233739: @ 8233739 .string "Wahaha! Do you really think I'd tell\n" .string "you something that crucial?$" -AquaHideout_1F_Text_2337FA: @ 82337FA +AquaHideout_1F_Text_TeamMagmaAtMtChimney: @ 82337FA .string "What? What?\n" .string "Are you a TEAM MAGMA grunt?\p" .string "I hear that TEAM MAGMA is after\n" .string "an awesome POKéMON at MT. CHIMNEY.\p" .string "But what is that POKéMON like?$" -AquaHideout_1F_Text_233884: @ 8233884 +AquaHideout_1F_Text_BossIsInSlateportCity: @ 8233884 .string "What? What? What do you want with\n" .string "TEAM AQUA?\p" .string "Our BOSS isn't here!\n" @@ -104,15 +105,15 @@ AquaHideout_1F_Text_233884: @ 8233884 .string "Wahaha! Do you really think I'd tell\n" .string "you something that crucial?$" -AquaHideout_1F_Text_23393D: @ 823393D +AquaHideout_1F_Text_Grunt1Intro: @ 823393D .string "Ayiyiyi!\n" .string "Suspicious character spotted!$" -AquaHideout_1F_Text_233964: @ 8233964 +AquaHideout_1F_Text_Grunt1Defeat: @ 8233964 .string "Grrrrr…\n" .string "I lost it!$" -AquaHideout_1F_Text_233977: @ 8233977 +AquaHideout_1F_Text_Grunt1PostBattle: @ 8233977 .string "I took the loss for the TEAM,\n" .string "but I did my job…$" diff --git a/data/maps/AquaHideout_B1F/map.json b/data/maps/AquaHideout_B1F/map.json index 8cdc901ecf..78e37bdf9a 100644 --- a/data/maps/AquaHideout_B1F/map.json +++ b/data/maps/AquaHideout_B1F/map.json @@ -24,7 +24,7 @@ "movement_range_y": 0, "trainer_type": "1", "trainer_sight_or_berry_tree_id": "4", - "script": "AquaHideout_B1F_EventScript_233A85", + "script": "AquaHideout_B1F_EventScript_Grunt2", "flag": "FLAG_HIDE_AQUA_HIDEOUT_GRUNTS" }, { @@ -37,7 +37,7 @@ "movement_range_y": 0, "trainer_type": "1", "trainer_sight_or_berry_tree_id": "5", - "script": "AquaHideout_B1F_EventScript_233AB0", + "script": "AquaHideout_B1F_EventScript_Grunt3", "flag": "FLAG_HIDE_AQUA_HIDEOUT_GRUNTS" }, { @@ -63,7 +63,7 @@ "movement_range_y": 0, "trainer_type": "1", "trainer_sight_or_berry_tree_id": "4", - "script": "AquaHideout_B1F_EventScript_233AD5", + "script": "AquaHideout_B1F_EventScript_Grunt21", "flag": "FLAG_HIDE_AQUA_HIDEOUT_GRUNTS" }, { @@ -89,7 +89,7 @@ "movement_range_y": 1, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "AquaHideout_B1F_EventScript_2339EB", + "script": "AquaHideout_B1F_EventScript_Electrode1", "flag": "FLAG_HIDE_AQUA_HIDEOUT_B1F_ELECTRODE_1" }, { @@ -115,7 +115,7 @@ "movement_range_y": 1, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "AquaHideout_B1F_EventScript_233A38", + "script": "AquaHideout_B1F_EventScript_Electrode2", "flag": "FLAG_HIDE_AQUA_HIDEOUT_B1F_ELECTRODE_2" }, { @@ -128,7 +128,7 @@ "movement_range_y": 1, "trainer_type": "1", "trainer_sight_or_berry_tree_id": "4", - "script": "AquaHideout_B1F_EventScript_233AEC", + "script": "AquaHideout_B1F_EventScript_Grunt25", "flag": "FLAG_HIDE_AQUA_HIDEOUT_GRUNTS" } ], diff --git a/data/maps/AquaHideout_B1F/scripts.inc b/data/maps/AquaHideout_B1F/scripts.inc index 83906c5091..8b1a07c545 100644 --- a/data/maps/AquaHideout_B1F/scripts.inc +++ b/data/maps/AquaHideout_B1F/scripts.inc @@ -1,13 +1,13 @@ AquaHideout_B1F_MapScripts:: @ 82339A7 - map_script MAP_SCRIPT_ON_RESUME, AquaHideout_B1F_MapScript1_2339B2 + map_script MAP_SCRIPT_ON_RESUME, AquaHideout_B1F_OnResume map_script MAP_SCRIPT_ON_TRANSITION, AquaHideout_B1F_OnTransition .byte 0 -AquaHideout_B1F_MapScript1_2339B2: @ 82339B2 - call_if_set FLAG_SYS_CTRL_OBJ_DELETE, AquaHideout_B1F_EventScript_2339BC +AquaHideout_B1F_OnResume: @ 82339B2 + call_if_set FLAG_SYS_CTRL_OBJ_DELETE, AquaHideout_B1F_EventScript_TryRemoveElectrode end -AquaHideout_B1F_EventScript_2339BC:: @ 82339BC +AquaHideout_B1F_EventScript_TryRemoveElectrode:: @ 82339BC specialvar VAR_RESULT, GetBattleOutcome compare VAR_RESULT, B_OUTCOME_CAUGHT goto_if_ne Common_EventScript_NopReturn @@ -15,19 +15,19 @@ AquaHideout_B1F_EventScript_2339BC:: @ 82339BC return AquaHideout_B1F_OnTransition: @ 82339D0 - call_if_unset FLAG_DEFEATED_ELECTRODE_1_AQUA_HIDEOUT, AquaHideout_B1F_EventScript_2339E3 - call_if_unset FLAG_DEFEATED_ELECTRODE_2_AQUA_HIDEOUT, AquaHideout_B1F_EventScript_2339E7 + call_if_unset FLAG_DEFEATED_ELECTRODE_1_AQUA_HIDEOUT, AquaHideout_B1F_EventScript_ShowElectrode1 + call_if_unset FLAG_DEFEATED_ELECTRODE_2_AQUA_HIDEOUT, AquaHideout_B1F_EventScript_ShowElectrode2 end -AquaHideout_B1F_EventScript_2339E3:: @ 82339E3 +AquaHideout_B1F_EventScript_ShowElectrode1:: @ 82339E3 clearflag FLAG_HIDE_AQUA_HIDEOUT_B1F_ELECTRODE_1 return -AquaHideout_B1F_EventScript_2339E7:: @ 82339E7 +AquaHideout_B1F_EventScript_ShowElectrode2:: @ 82339E7 clearflag FLAG_HIDE_AQUA_HIDEOUT_B1F_ELECTRODE_2 return -AquaHideout_B1F_EventScript_2339EB:: @ 82339EB +AquaHideout_B1F_EventScript_Electrode1:: @ 82339EB lock faceplayer setwildbattle SPECIES_ELECTRODE, 30, ITEM_NONE @@ -40,21 +40,21 @@ AquaHideout_B1F_EventScript_2339EB:: @ 82339EB clearflag FLAG_SYS_CTRL_OBJ_DELETE specialvar VAR_RESULT, GetBattleOutcome compare VAR_RESULT, B_OUTCOME_WON - goto_if_eq AquaHideout_B1F_EventScript_233A2F + goto_if_eq AquaHideout_B1F_EventScript_DefeatedElectrode1 compare VAR_RESULT, B_OUTCOME_RAN - goto_if_eq AquaHideout_B1F_EventScript_233A2F + goto_if_eq AquaHideout_B1F_EventScript_DefeatedElectrode1 compare VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED - goto_if_eq AquaHideout_B1F_EventScript_233A2F + goto_if_eq AquaHideout_B1F_EventScript_DefeatedElectrode1 setflag FLAG_DEFEATED_ELECTRODE_1_AQUA_HIDEOUT release end -AquaHideout_B1F_EventScript_233A2F:: @ 8233A2F +AquaHideout_B1F_EventScript_DefeatedElectrode1:: @ 8233A2F setflag FLAG_DEFEATED_ELECTRODE_1_AQUA_HIDEOUT goto Common_EventScript_RemoveStaticPokemon end -AquaHideout_B1F_EventScript_233A38:: @ 8233A38 +AquaHideout_B1F_EventScript_Electrode2:: @ 8233A38 lock faceplayer setwildbattle SPECIES_ELECTRODE, 30, ITEM_NONE @@ -67,101 +67,101 @@ AquaHideout_B1F_EventScript_233A38:: @ 8233A38 clearflag FLAG_SYS_CTRL_OBJ_DELETE specialvar VAR_RESULT, GetBattleOutcome compare VAR_RESULT, B_OUTCOME_WON - goto_if_eq AquaHideout_B1F_EventScript_233A7C + goto_if_eq AquaHideout_B1F_EventScript_DefeatedElectrode2 compare VAR_RESULT, B_OUTCOME_RAN - goto_if_eq AquaHideout_B1F_EventScript_233A7C + goto_if_eq AquaHideout_B1F_EventScript_DefeatedElectrode2 compare VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED - goto_if_eq AquaHideout_B1F_EventScript_233A7C + goto_if_eq AquaHideout_B1F_EventScript_DefeatedElectrode2 setflag FLAG_DEFEATED_ELECTRODE_2_AQUA_HIDEOUT release end -AquaHideout_B1F_EventScript_233A7C:: @ 8233A7C +AquaHideout_B1F_EventScript_DefeatedElectrode2:: @ 8233A7C setflag FLAG_DEFEATED_ELECTRODE_2_AQUA_HIDEOUT goto Common_EventScript_RemoveStaticPokemon end -AquaHideout_B1F_EventScript_233A85:: @ 8233A85 - trainerbattle_single TRAINER_GRUNT_2, AquaHideout_B1F_Text_233B03, AquaHideout_B1F_Text_233B4A, AquaHideout_B1F_EventScript_233AA0 - msgbox AquaHideout_B1F_Text_233B5E, MSGBOX_AUTOCLOSE +AquaHideout_B1F_EventScript_Grunt2:: @ 8233A85 + trainerbattle_single TRAINER_GRUNT_2, AquaHideout_B1F_Text_Grunt2Intro, AquaHideout_B1F_Text_Grunt2Defeat, AquaHideout_B1F_EventScript_Grunt2Defeated + msgbox AquaHideout_B1F_Text_Grunt2PostBattle, MSGBOX_AUTOCLOSE end -AquaHideout_B1F_EventScript_233AA0:: @ 8233AA0 - special sub_80B4808 +AquaHideout_B1F_EventScript_Grunt2Defeated:: @ 8233AA0 + special PlayerFaceTrainerAfterBattle waitmovement 0 - msgbox AquaHideout_B1F_Text_233B5E, MSGBOX_DEFAULT + msgbox AquaHideout_B1F_Text_Grunt2PostBattle, MSGBOX_DEFAULT release end -AquaHideout_B1F_EventScript_233AB0:: @ 8233AB0 - trainerbattle_single TRAINER_GRUNT_3, AquaHideout_B1F_Text_233BC5, AquaHideout_B1F_Text_233C27, AquaHideout_B1F_EventScript_233ACB - msgbox AquaHideout_B1F_Text_233C41, MSGBOX_AUTOCLOSE +AquaHideout_B1F_EventScript_Grunt3:: @ 8233AB0 + trainerbattle_single TRAINER_GRUNT_3, AquaHideout_B1F_Text_Grunt3Intro, AquaHideout_B1F_Text_Grunt3Defeat, AquaHideout_B1F_EventScript_Grunt3Defeated + msgbox AquaHideout_B1F_Text_Grunt3PostBattle, MSGBOX_AUTOCLOSE end -AquaHideout_B1F_EventScript_233ACB:: @ 8233ACB - msgbox AquaHideout_B1F_Text_233C41, MSGBOX_DEFAULT +AquaHideout_B1F_EventScript_Grunt3Defeated:: @ 8233ACB + msgbox AquaHideout_B1F_Text_Grunt3PostBattle, MSGBOX_DEFAULT release end -AquaHideout_B1F_EventScript_233AD5:: @ 8233AD5 - trainerbattle_single TRAINER_GRUNT_21, AquaHideout_B1F_Text_233C89, AquaHideout_B1F_Text_233CCA - msgbox AquaHideout_B1F_Text_233CDC, MSGBOX_AUTOCLOSE +AquaHideout_B1F_EventScript_Grunt21:: @ 8233AD5 + trainerbattle_single TRAINER_GRUNT_21, AquaHideout_B1F_Text_Grunt21Intro, AquaHideout_B1F_Text_Grunt21Defeat + msgbox AquaHideout_B1F_Text_Grunt21PostBattle, MSGBOX_AUTOCLOSE end -AquaHideout_B1F_EventScript_233AEC:: @ 8233AEC - trainerbattle_single TRAINER_GRUNT_25, AquaHideout_B1F_Text_233D1B, AquaHideout_B1F_Text_233D6E - msgbox AquaHideout_B1F_Text_233D84, MSGBOX_AUTOCLOSE +AquaHideout_B1F_EventScript_Grunt25:: @ 8233AEC + trainerbattle_single TRAINER_GRUNT_25, AquaHideout_B1F_Text_Grunt25Intro, AquaHideout_B1F_Text_Grunt25Defeat + msgbox AquaHideout_B1F_Text_Grunt25PostBattle, MSGBOX_AUTOCLOSE end -AquaHideout_B1F_Text_233B03: @ 8233B03 +AquaHideout_B1F_Text_Grunt2Intro: @ 8233B03 .string "If you want to know the secret about\n" .string "our HIDEOUT, you have me to beat!$" -AquaHideout_B1F_Text_233B4A: @ 8233B4A +AquaHideout_B1F_Text_Grunt2Defeat: @ 8233B4A .string "I can't win at all…$" -AquaHideout_B1F_Text_233B5E: @ 8233B5E +AquaHideout_B1F_Text_Grunt2PostBattle: @ 8233B5E .string "Our HIDEOUT's secret?\p" .string "Well, let's just say…\n" .string "There's a submarine at the far end!\p" .string "But, by now…\n" .string "Kekekeke…$" -AquaHideout_B1F_Text_233BC5: @ 8233BC5 +AquaHideout_B1F_Text_Grunt3Intro: @ 8233BC5 .string "Fuel supply loaded A-OK!\n" .string "In-cruise snacks loaded A-OK!\p" .string "Nothing left to do but KO a pesky\n" .string "meddler!$" -AquaHideout_B1F_Text_233C27: @ 8233C27 +AquaHideout_B1F_Text_Grunt3Defeat: @ 8233C27 .string "I took a serious licking!$" -AquaHideout_B1F_Text_233C41: @ 8233C41 +AquaHideout_B1F_Text_Grunt3PostBattle: @ 8233C41 .string "Humph!\n" .string "This was supposed to happen!\p" .string "My mission was to just hold you up!$" -AquaHideout_B1F_Text_233C89: @ 8233C89 +AquaHideout_B1F_Text_Grunt21Intro: @ 8233C89 .string "Yawn… Keeping watch over the\n" .string "HIDEOUT bores me. I'll take you on.$" -AquaHideout_B1F_Text_233CCA: @ 8233CCA +AquaHideout_B1F_Text_Grunt21Defeat: @ 8233CCA .string "Yawn…\n" .string "Oh, I lost…$" -AquaHideout_B1F_Text_233CDC: @ 8233CDC +AquaHideout_B1F_Text_Grunt21PostBattle: @ 8233CDC .string "If you scurry too much, other TEAM\n" .string "AQUA members might get you.$" -AquaHideout_B1F_Text_233D1B: @ 8233D1B +AquaHideout_B1F_Text_Grunt25Intro: @ 8233D1B .string "Hey!\n" .string "You there!\p" .string "Which do you think is cooler?\n" .string "TEAM AQUA's uniform or TEAM MAGMA's?$" -AquaHideout_B1F_Text_233D6E: @ 8233D6E +AquaHideout_B1F_Text_Grunt25Defeat: @ 8233D6E .string "I lost in a cool way…$" -AquaHideout_B1F_Text_233D84: @ 8233D84 +AquaHideout_B1F_Text_Grunt25PostBattle: @ 8233D84 .string "If you have a cool uniform, you look\n" .string "good even in a loss, don't you think?$" diff --git a/data/maps/AquaHideout_B2F/map.json b/data/maps/AquaHideout_B2F/map.json index b286872af8..a5d58554dd 100644 --- a/data/maps/AquaHideout_B2F/map.json +++ b/data/maps/AquaHideout_B2F/map.json @@ -24,7 +24,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "AquaHideout_B2F_EventScript_233E09", + "script": "AquaHideout_B2F_EventScript_Matt", "flag": "FLAG_HIDE_AQUA_HIDEOUT_GRUNTS" }, { @@ -37,7 +37,7 @@ "movement_range_y": 3, "trainer_type": "1", "trainer_sight_or_berry_tree_id": "3", - "script": "AquaHideout_B2F_EventScript_233E8A", + "script": "AquaHideout_B2F_EventScript_Grunt4", "flag": "FLAG_HIDE_AQUA_HIDEOUT_GRUNTS" }, { @@ -76,7 +76,7 @@ "movement_range_y": 1, "trainer_type": "1", "trainer_sight_or_berry_tree_id": "5", - "script": "AquaHideout_B2F_EventScript_233EAF", + "script": "AquaHideout_B2F_EventScript_Grunt22", "flag": "FLAG_HIDE_AQUA_HIDEOUT_GRUNTS" }, { @@ -89,7 +89,7 @@ "movement_range_y": 1, "trainer_type": "1", "trainer_sight_or_berry_tree_id": "5", - "script": "AquaHideout_B2F_EventScript_233EC6", + "script": "AquaHideout_B2F_EventScript_Grunt26", "flag": "FLAG_HIDE_AQUA_HIDEOUT_GRUNTS" } ], @@ -173,7 +173,7 @@ "elevation": 3, "var": "VAR_TEMP_1", "var_value": "0", - "script": "AquaHideout_B2F_EventScript_233DE5" + "script": "AquaHideout_B2F_EventScript_MattNoticePlayer" }, { "type": "trigger", @@ -182,7 +182,7 @@ "elevation": 3, "var": "VAR_TEMP_1", "var_value": "0", - "script": "AquaHideout_B2F_EventScript_233DE5" + "script": "AquaHideout_B2F_EventScript_MattNoticePlayer" } ], "bg_events": [] diff --git a/data/maps/AquaHideout_B2F/scripts.inc b/data/maps/AquaHideout_B2F/scripts.inc index 87830e500c..84e0c66227 100644 --- a/data/maps/AquaHideout_B2F/scripts.inc +++ b/data/maps/AquaHideout_B2F/scripts.inc @@ -3,16 +3,16 @@ AquaHideout_B2F_MapScripts:: @ 8233DCF .byte 0 AquaHideout_B2F_OnTransition: @ 8233DD5 - call_if_set FLAG_TEAM_AQUA_ESCAPED_IN_SUBMARINE, AquaHideout_B2F_EventScript_233DDF + call_if_set FLAG_TEAM_AQUA_ESCAPED_IN_SUBMARINE, AquaHideout_B2F_EventScript_PreventMattNoticing end -AquaHideout_B2F_EventScript_233DDF:: @ 8233DDF +AquaHideout_B2F_EventScript_PreventMattNoticing:: @ 8233DDF setvar VAR_TEMP_1, 1 return -AquaHideout_B2F_EventScript_233DE5:: @ 8233DE5 +AquaHideout_B2F_EventScript_MattNoticePlayer:: @ 8233DE5 lockall - setvar VAR_0x8008, 1 + setvar VAR_0x8008, 1 @ Matt object event id playse SE_PIN applymovement VAR_0x8008, Common_Movement_ExclamationMark waitmovement 0 @@ -22,70 +22,71 @@ AquaHideout_B2F_EventScript_233DE5:: @ 8233DE5 releaseall end -AquaHideout_B2F_EventScript_233E09:: @ 8233E09 - trainerbattle_single TRAINER_MATT, AquaHideout_B2F_Text_233EDD, AquaHideout_B2F_Text_233F8D, AquaHideout_B2F_EventScript_233E25 - msgbox AquaHideout_B2F_Text_233FF2, MSGBOX_DEFAULT +AquaHideout_B2F_EventScript_Matt:: @ 8233E09 + trainerbattle_single TRAINER_MATT, AquaHideout_B2F_Text_MattIntro, AquaHideout_B2F_Text_MattDefeat, AquaHideout_B2F_EventScript_SubmarineEscape + msgbox AquaHideout_B2F_Text_MattPostBattle, MSGBOX_DEFAULT release end -AquaHideout_B2F_EventScript_233E25:: @ 8233E25 - setvar VAR_0x8008, 1 - setvar VAR_0x8009, 4 +AquaHideout_B2F_EventScript_SubmarineEscape:: @ 8233E25 + setvar VAR_0x8008, 1 @ Matt object event id + setvar VAR_0x8009, 4 @ Submarine object event id applymovement VAR_0x8008, Common_Movement_WalkInPlaceFastestLeft waitmovement 0 delay 20 applymovement VAR_0x8008, Common_Movement_FacePlayer waitmovement 0 - msgbox AquaHideout_B2F_Text_233FA6, MSGBOX_DEFAULT + msgbox AquaHideout_B2F_Text_OurBossGotThroughHisPreparations, MSGBOX_DEFAULT closemessage applymovement VAR_0x8008, Common_Movement_WalkInPlaceFastestLeft - applymovement VAR_0x8009, AquaHideout_B2F_Movement_233E80 + applymovement VAR_0x8009, AquaHideout_B2F_Movement_SumbarineDepartLeft waitmovement 0 removeobject VAR_0x8009 delay 20 applymovement VAR_0x8008, Common_Movement_FacePlayer waitmovement 0 - msgbox AquaHideout_B2F_Text_233FF2, MSGBOX_DEFAULT + msgbox AquaHideout_B2F_Text_MattPostBattle, MSGBOX_DEFAULT setflag FLAG_TEAM_AQUA_ESCAPED_IN_SUBMARINE setflag FLAG_HIDE_LILYCOVE_CITY_AQUA_GRUNTS release end -AquaHideout_B2F_Movement_233E80: @ 8233E80 +AquaHideout_B2F_Movement_SumbarineDepartLeft: @ 8233E80 walk_left walk_left walk_left walk_left step_end -AquaHideout_B2F_Movement_233E85: @ 8233E85 +@ Unused +AquaHideout_B2F_Movement_SumbarineDepartRight: @ 8233E85 walk_right walk_right walk_right walk_right step_end -AquaHideout_B2F_EventScript_233E8A:: @ 8233E8A - trainerbattle_single TRAINER_GRUNT_4, AquaHideout_B2F_Text_2340B4, AquaHideout_B2F_Text_2340F0, AquaHideout_B2F_EventScript_233EA5 - msgbox AquaHideout_B2F_Text_234112, MSGBOX_AUTOCLOSE +AquaHideout_B2F_EventScript_Grunt4:: @ 8233E8A + trainerbattle_single TRAINER_GRUNT_4, AquaHideout_B2F_Text_Grunt4Intro, AquaHideout_B2F_Text_Grunt4Defeat, AquaHideout_B2F_EventScript_Grunt4Defeated + msgbox AquaHideout_B2F_Text_Grunt4PostBattle, MSGBOX_AUTOCLOSE end -AquaHideout_B2F_EventScript_233EA5:: @ 8233EA5 - msgbox AquaHideout_B2F_Text_234112, MSGBOX_DEFAULT +AquaHideout_B2F_EventScript_Grunt4Defeated:: @ 8233EA5 + msgbox AquaHideout_B2F_Text_Grunt4PostBattle, MSGBOX_DEFAULT release end -AquaHideout_B2F_EventScript_233EAF:: @ 8233EAF - trainerbattle_single TRAINER_GRUNT_22, AquaHideout_B2F_Text_23412D, AquaHideout_B2F_Text_2341CE - msgbox AquaHideout_B2F_Text_2341FE, MSGBOX_AUTOCLOSE +AquaHideout_B2F_EventScript_Grunt22:: @ 8233EAF + trainerbattle_single TRAINER_GRUNT_22, AquaHideout_B2F_Text_Grunt22Intro, AquaHideout_B2F_Text_Grunt22Defeat + msgbox AquaHideout_B2F_Text_Grunt22PostBattle, MSGBOX_AUTOCLOSE end -AquaHideout_B2F_EventScript_233EC6:: @ 8233EC6 - trainerbattle_single TRAINER_GRUNT_26, AquaHideout_B2F_Text_23426F, AquaHideout_B2F_Text_2342CC - msgbox AquaHideout_B2F_Text_2342FF, MSGBOX_AUTOCLOSE +AquaHideout_B2F_EventScript_Grunt26:: @ 8233EC6 + trainerbattle_single TRAINER_GRUNT_26, AquaHideout_B2F_Text_Grunt26Intro, AquaHideout_B2F_Text_Grunt26Defeat + msgbox AquaHideout_B2F_Text_Grunt26PostBattle, MSGBOX_AUTOCLOSE end -AquaHideout_B2F_Text_233EDD: @ 8233EDD +AquaHideout_B2F_Text_MattIntro: @ 8233EDD .string "Hehehe…\p" .string "Got here already, did you?\n" .string "We underestimated you!\p" @@ -95,16 +96,16 @@ AquaHideout_B2F_Text_233EDD: @ 8233EDD .string "I'm not stalling for time.\n" .string "I'm going to pulverize you!$" -AquaHideout_B2F_Text_233F8D: @ 8233F8D +AquaHideout_B2F_Text_MattDefeat: @ 8233F8D .string "Hehehe…\n" .string "So, I lost, too…$" -AquaHideout_B2F_Text_233FA6: @ 8233FA6 +AquaHideout_B2F_Text_OurBossGotThroughHisPreparations: @ 8233FA6 .string "Hehehe!\p" .string "While I was toying with you, our BOSS\n" .string "got through his preparations!$" -AquaHideout_B2F_Text_233FF2: @ 8233FF2 +AquaHideout_B2F_Text_MattPostBattle: @ 8233FF2 .string "Hehehe!\p" .string "Our BOSS has already gone on his way to\n" .string "some cave under the sea!\p" @@ -114,19 +115,19 @@ AquaHideout_B2F_Text_233FF2: @ 8233FF2 .string "But will you find it then?\n" .string "Hehehe!$" -AquaHideout_B2F_Text_2340B4: @ 82340B4 +AquaHideout_B2F_Text_Grunt4Intro: @ 82340B4 .string "Wahahah, I grew weary of waiting!\n" .string "You owe me a battle, too!$" -AquaHideout_B2F_Text_2340F0: @ 82340F0 +AquaHideout_B2F_Text_Grunt4Defeat: @ 82340F0 .string "Tired of waiting…\n" .string "Lost and dazed…$" -AquaHideout_B2F_Text_234112: @ 8234112 +AquaHideout_B2F_Text_Grunt4PostBattle: @ 8234112 .string "BOSS…\n" .string "Is this good enough?$" -AquaHideout_B2F_Text_23412D: @ 823412D +AquaHideout_B2F_Text_Grunt22Intro: @ 823412D .string "Warp panels, the HIDEOUT's pride\n" .string "and joy!\p" .string "You're clueless about where you are,\n" @@ -134,25 +135,25 @@ AquaHideout_B2F_Text_23412D: @ 823412D .string "Fluster and tire out the enemy, then\n" .string "lower the boom! That's our plan!$" -AquaHideout_B2F_Text_2341CE: @ 82341CE +AquaHideout_B2F_Text_Grunt22Defeat: @ 82341CE .string "What's wrong with you?\n" .string "You're not tired at all!$" -AquaHideout_B2F_Text_2341FE: @ 82341FE +AquaHideout_B2F_Text_Grunt22PostBattle: @ 82341FE .string "That reminds me… I can't remember\n" .string "where I put the MASTER BALL.\p" .string "If I fail to guard it, our BOSS will\n" .string "chew me out…$" -AquaHideout_B2F_Text_23426F: @ 823426F +AquaHideout_B2F_Text_Grunt26Intro: @ 823426F .string "When I joined TEAM AQUA, the first\n" .string "thing I had to learn was how these\l" .string "warp panels connected.$" -AquaHideout_B2F_Text_2342CC: @ 82342CC +AquaHideout_B2F_Text_Grunt26Defeat: @ 82342CC .string "I was too occupied thinking about\n" .string "the warp panels…$" -AquaHideout_B2F_Text_2342FF: @ 82342FF +AquaHideout_B2F_Text_Grunt26PostBattle: @ 82342FF .string "I'll have to learn about how I can\n" .string "battle more effectively…$" diff --git a/data/maps/JaggedPass/scripts.inc b/data/maps/JaggedPass/scripts.inc index 62ef6e1a95..a3a6234d3e 100644 --- a/data/maps/JaggedPass/scripts.inc +++ b/data/maps/JaggedPass/scripts.inc @@ -111,7 +111,7 @@ JaggedPass_EventScript_23079C:: @ 823079C end JaggedPass_EventScript_2307C8:: @ 82307C8 - special sub_80B4808 + special PlayerFaceTrainerAfterBattle msgbox JaggedPass_Text_230A2C, MSGBOX_DEFAULT register_matchcall TRAINER_DIANA_1 release @@ -132,7 +132,7 @@ JaggedPass_EventScript_2307FB:: @ 82307FB end JaggedPass_EventScript_230827:: @ 8230827 - special sub_80B4808 + special PlayerFaceTrainerAfterBattle msgbox JaggedPass_Text_230BC6, MSGBOX_DEFAULT register_matchcall TRAINER_ETHAN_1 release diff --git a/data/maps/MagmaHideout_1F/map.json b/data/maps/MagmaHideout_1F/map.json index 350c52b4f4..37bad78ffb 100644 --- a/data/maps/MagmaHideout_1F/map.json +++ b/data/maps/MagmaHideout_1F/map.json @@ -24,7 +24,7 @@ "movement_range_y": 1, "trainer_type": "1", "trainer_sight_or_berry_tree_id": "2", - "script": "MagmaHideout_1F_EventScript_23988C", + "script": "MagmaHideout_1F_EventScript_Grunt38", "flag": "FLAG_HIDE_MAGMA_HIDEOUT_GRUNTS" }, { @@ -50,7 +50,7 @@ "movement_range_y": 1, "trainer_type": "1", "trainer_sight_or_berry_tree_id": "4", - "script": "MagmaHideout_1F_EventScript_2398A3", + "script": "MagmaHideout_1F_EventScript_Grunt39", "flag": "FLAG_HIDE_MAGMA_HIDEOUT_GRUNTS" }, { diff --git a/data/maps/MagmaHideout_1F/scripts.inc b/data/maps/MagmaHideout_1F/scripts.inc index 2fe4ad581a..6b41021a9c 100644 --- a/data/maps/MagmaHideout_1F/scripts.inc +++ b/data/maps/MagmaHideout_1F/scripts.inc @@ -6,33 +6,33 @@ MagmaHideout_1F_OnTransition: @ 8239886 setvar VAR_JAGGED_PASS_ASH_WEATHER, 0 end -MagmaHideout_1F_EventScript_23988C:: @ 823988C - trainerbattle_single TRAINER_GRUNT_38, MagmaHideout_1F_Text_2398BA, MagmaHideout_1F_Text_239964 - msgbox MagmaHideout_1F_Text_2399B1, MSGBOX_AUTOCLOSE +MagmaHideout_1F_EventScript_Grunt38:: @ 823988C + trainerbattle_single TRAINER_GRUNT_38, MagmaHideout_1F_Text_Grunt38Intro, MagmaHideout_1F_Text_Grunt38Defeat + msgbox MagmaHideout_1F_Text_Grunt38PostBattle, MSGBOX_AUTOCLOSE end -MagmaHideout_1F_EventScript_2398A3:: @ 82398A3 - trainerbattle_single TRAINER_GRUNT_39, MagmaHideout_1F_Text_2399F5, MagmaHideout_1F_Text_239ABA - msgbox MagmaHideout_1F_Text_239ACD, MSGBOX_AUTOCLOSE +MagmaHideout_1F_EventScript_Grunt39:: @ 82398A3 + trainerbattle_single TRAINER_GRUNT_39, MagmaHideout_1F_Text_Grunt39Intro, MagmaHideout_1F_Text_Grunt39Defeat + msgbox MagmaHideout_1F_Text_Grunt39PostBattle, MSGBOX_AUTOCLOSE end -MagmaHideout_1F_Text_2398BA: @ 82398BA +MagmaHideout_1F_Text_Grunt38Intro: @ 82398BA .string "When TEAM MAGMA has roll call, we get\n" .string "important guarding assignments in\l" .string "the order that we line up.\p" .string "That's why I'm stuck off in this corner.\n" .string "I'm always late to roll call!$" -MagmaHideout_1F_Text_239964: @ 8239964 +MagmaHideout_1F_Text_Grunt38Defeat: @ 8239964 .string "I'm always late for training sessions,\n" .string "too!\p" .string "I hate to say it, but I'm wimpy…$" -MagmaHideout_1F_Text_2399B1: @ 82399B1 +MagmaHideout_1F_Text_Grunt38PostBattle: @ 82399B1 .string "Okay, I'll try to put a little more\n" .string "effort into things from now on…$" -MagmaHideout_1F_Text_2399F5: @ 82399F5 +MagmaHideout_1F_Text_Grunt39Intro: @ 82399F5 .string "Our leader told us to dig into\n" .string "MT. CHIMNEY, so we dug and dug.\p" .string "And in the course of digging, we came\n" @@ -41,11 +41,11 @@ MagmaHideout_1F_Text_2399F5: @ 82399F5 .string "Fuhahaha!\n" .string "I'll tell you if you beat me!$" -MagmaHideout_1F_Text_239ABA: @ 8239ABA +MagmaHideout_1F_Text_Grunt39Defeat: @ 8239ABA .string "Arrgh!\n" .string "Taken down!$" -MagmaHideout_1F_Text_239ACD: @ 8239ACD +MagmaHideout_1F_Text_Grunt39PostBattle: @ 8239ACD .string "I won't tell you after all.\n" .string "You'll find out when you get there!\p" .string "It'd be better if you saved surprises\n" diff --git a/data/maps/MagmaHideout_2F_1R/map.json b/data/maps/MagmaHideout_2F_1R/map.json index d628c1b5ae..6b0d9614d4 100644 --- a/data/maps/MagmaHideout_2F_1R/map.json +++ b/data/maps/MagmaHideout_2F_1R/map.json @@ -24,7 +24,7 @@ "movement_range_y": 4, "trainer_type": "1", "trainer_sight_or_berry_tree_id": "1", - "script": "MagmaHideout_2F_1R_EventScript_239B7F", + "script": "MagmaHideout_2F_1R_EventScript_Grunt41", "flag": "FLAG_HIDE_MAGMA_HIDEOUT_GRUNTS" }, { @@ -37,7 +37,7 @@ "movement_range_y": 6, "trainer_type": "1", "trainer_sight_or_berry_tree_id": "3", - "script": "MagmaHideout_2F_1R_EventScript_239B96", + "script": "MagmaHideout_2F_1R_EventScript_Grunt42", "flag": "FLAG_HIDE_MAGMA_HIDEOUT_GRUNTS" }, { @@ -50,7 +50,7 @@ "movement_range_y": 1, "trainer_type": "1", "trainer_sight_or_berry_tree_id": "7", - "script": "MagmaHideout_2F_1R_EventScript_239B51", + "script": "MagmaHideout_2F_1R_EventScript_Grunt51", "flag": "FLAG_HIDE_MAGMA_HIDEOUT_GRUNTS" }, { @@ -63,7 +63,7 @@ "movement_range_y": 1, "trainer_type": "1", "trainer_sight_or_berry_tree_id": "3", - "script": "MagmaHideout_2F_1R_EventScript_239B68", + "script": "MagmaHideout_2F_1R_EventScript_Grunt40", "flag": "FLAG_HIDE_MAGMA_HIDEOUT_GRUNTS" } ], diff --git a/data/maps/MagmaHideout_2F_1R/scripts.inc b/data/maps/MagmaHideout_2F_1R/scripts.inc index 9ea2ef6fe3..b6c3154b00 100644 --- a/data/maps/MagmaHideout_2F_1R/scripts.inc +++ b/data/maps/MagmaHideout_2F_1R/scripts.inc @@ -1,27 +1,27 @@ MagmaHideout_2F_1R_MapScripts:: @ 8239B50 .byte 0 -MagmaHideout_2F_1R_EventScript_239B51:: @ 8239B51 - trainerbattle_single TRAINER_GRUNT_51, MagmaHideout_2F_1R_Text_239BAD, MagmaHideout_2F_1R_Text_239C4B - msgbox MagmaHideout_2F_1R_Text_239C74, MSGBOX_AUTOCLOSE +MagmaHideout_2F_1R_EventScript_Grunt51:: @ 8239B51 + trainerbattle_single TRAINER_GRUNT_51, MagmaHideout_2F_1R_Text_Grunt51Intro, MagmaHideout_2F_1R_Text_Grunt51Defeat + msgbox MagmaHideout_2F_1R_Text_Grunt51PostBattle, MSGBOX_AUTOCLOSE end -MagmaHideout_2F_1R_EventScript_239B68:: @ 8239B68 - trainerbattle_single TRAINER_GRUNT_40, MagmaHideout_2F_1R_Text_239CAB, MagmaHideout_2F_1R_Text_239D09 - msgbox MagmaHideout_2F_1R_Text_239D1D, MSGBOX_AUTOCLOSE +MagmaHideout_2F_1R_EventScript_Grunt40:: @ 8239B68 + trainerbattle_single TRAINER_GRUNT_40, MagmaHideout_2F_1R_Text_Grunt40Intro, MagmaHideout_2F_1R_Text_Grunt40Defeat + msgbox MagmaHideout_2F_1R_Text_Grunt40PostBattle, MSGBOX_AUTOCLOSE end -MagmaHideout_2F_1R_EventScript_239B7F:: @ 8239B7F - trainerbattle_single TRAINER_GRUNT_41, MagmaHideout_2F_1R_Text_239D62, MagmaHideout_2F_1R_Text_239D75 - msgbox MagmaHideout_2F_1R_Text_239D7D, MSGBOX_AUTOCLOSE +MagmaHideout_2F_1R_EventScript_Grunt41:: @ 8239B7F + trainerbattle_single TRAINER_GRUNT_41, MagmaHideout_2F_1R_Text_Grunt41Intro, MagmaHideout_2F_1R_Text_Grunt41Defeat + msgbox MagmaHideout_2F_1R_Text_Grunt41PostBattle, MSGBOX_AUTOCLOSE end -MagmaHideout_2F_1R_EventScript_239B96:: @ 8239B96 - trainerbattle_single TRAINER_GRUNT_42, MagmaHideout_2F_1R_Text_239DC5, MagmaHideout_2F_1R_Text_239DDA - msgbox MagmaHideout_2F_1R_Text_239DE2, MSGBOX_AUTOCLOSE +MagmaHideout_2F_1R_EventScript_Grunt42:: @ 8239B96 + trainerbattle_single TRAINER_GRUNT_42, MagmaHideout_2F_1R_Text_Grunt42Intro, MagmaHideout_2F_1R_Text_Grunt42Defeat + msgbox MagmaHideout_2F_1R_Text_Grunt42PostBattle, MSGBOX_AUTOCLOSE end -MagmaHideout_2F_1R_Text_239BAD: @ 8239BAD +MagmaHideout_2F_1R_Text_Grunt51Intro: @ 8239BAD .string "What, what, what?\p" .string "Only TEAM MAGMA members are supposed\n" .string "to be in here!\p" @@ -30,46 +30,46 @@ MagmaHideout_2F_1R_Text_239BAD: @ 8239BAD .string "You rouse my suspicion!\n" .string "Battle with me!$" -MagmaHideout_2F_1R_Text_239C4B: @ 8239C4B +MagmaHideout_2F_1R_Text_Grunt51Defeat: @ 8239C4B .string "Aiyiyi…\n" .string "My pride as a TEAM MAGMA member…$" -MagmaHideout_2F_1R_Text_239C74: @ 8239C74 +MagmaHideout_2F_1R_Text_Grunt51PostBattle: @ 8239C74 .string "If you suffer from chills, you should\n" .string "join TEAM MAGMA.$" -MagmaHideout_2F_1R_Text_239CAB: @ 8239CAB +MagmaHideout_2F_1R_Text_Grunt40Intro: @ 8239CAB .string "Hold it right there!\p" .string "You don't really expect me to keep\n" .string "my trap shut and let you waltz by me?$" -MagmaHideout_2F_1R_Text_239D09: @ 8239D09 +MagmaHideout_2F_1R_Text_Grunt40Defeat: @ 8239D09 .string "Ooh wow!\n" .string "I concede!$" -MagmaHideout_2F_1R_Text_239D1D: @ 8239D1D +MagmaHideout_2F_1R_Text_Grunt40PostBattle: @ 8239D1D .string "Maybe it would've been better if I did\n" .string "just let you go unchallenged…$" -MagmaHideout_2F_1R_Text_239D62: @ 8239D62 +MagmaHideout_2F_1R_Text_Grunt41Intro: @ 8239D62 .string "Ahah!\n" .string "An intruder!$" -MagmaHideout_2F_1R_Text_239D75: @ 8239D75 +MagmaHideout_2F_1R_Text_Grunt41Defeat: @ 8239D75 .string "Graaah!$" -MagmaHideout_2F_1R_Text_239D7D: @ 8239D7D +MagmaHideout_2F_1R_Text_Grunt41PostBattle: @ 8239D7D .string "I've already lost.\p" .string "Do I really need to keep running\n" .string "around in a circle?$" -MagmaHideout_2F_1R_Text_239DC5: @ 8239DC5 +MagmaHideout_2F_1R_Text_Grunt42Intro: @ 8239DC5 .string "Oh, oh!\n" .string "An intruder!$" -MagmaHideout_2F_1R_Text_239DDA: @ 8239DDA +MagmaHideout_2F_1R_Text_Grunt42Defeat: @ 8239DDA .string "Mutter…$" -MagmaHideout_2F_1R_Text_239DE2: @ 8239DE2 +MagmaHideout_2F_1R_Text_Grunt42PostBattle: @ 8239DE2 .string "Actually, I'm no expert at battling…$" diff --git a/data/maps/MagmaHideout_2F_2R/map.json b/data/maps/MagmaHideout_2F_2R/map.json index b52d342127..8befdc42ad 100644 --- a/data/maps/MagmaHideout_2F_2R/map.json +++ b/data/maps/MagmaHideout_2F_2R/map.json @@ -24,7 +24,7 @@ "movement_range_y": 1, "trainer_type": "1", "trainer_sight_or_berry_tree_id": "7", - "script": "MagmaHideout_2F_2R_EventScript_239E4D", + "script": "MagmaHideout_2F_2R_EventScript_Grunt45", "flag": "FLAG_HIDE_MAGMA_HIDEOUT_GRUNTS" }, { @@ -37,7 +37,7 @@ "movement_range_y": 1, "trainer_type": "1", "trainer_sight_or_berry_tree_id": "2", - "script": "MagmaHideout_2F_2R_EventScript_239E36", + "script": "MagmaHideout_2F_2R_EventScript_Grunt44", "flag": "FLAG_HIDE_MAGMA_HIDEOUT_GRUNTS" }, { @@ -63,7 +63,7 @@ "movement_range_y": 1, "trainer_type": "1", "trainer_sight_or_berry_tree_id": "4", - "script": "MagmaHideout_2F_2R_EventScript_239E1F", + "script": "MagmaHideout_2F_2R_EventScript_Grunt43", "flag": "FLAG_HIDE_MAGMA_HIDEOUT_GRUNTS" }, { @@ -76,7 +76,7 @@ "movement_range_y": 1, "trainer_type": "1", "trainer_sight_or_berry_tree_id": "1", - "script": "MagmaHideout_2F_2R_EventScript_239E08", + "script": "MagmaHideout_2F_2R_EventScript_Grunt52", "flag": "FLAG_HIDE_MAGMA_HIDEOUT_GRUNTS" }, { diff --git a/data/maps/MagmaHideout_2F_2R/scripts.inc b/data/maps/MagmaHideout_2F_2R/scripts.inc index 5539d26de6..af63aa5de5 100644 --- a/data/maps/MagmaHideout_2F_2R/scripts.inc +++ b/data/maps/MagmaHideout_2F_2R/scripts.inc @@ -1,78 +1,78 @@ MagmaHideout_2F_2R_MapScripts:: @ 8239E07 .byte 0 -MagmaHideout_2F_2R_EventScript_239E08:: @ 8239E08 - trainerbattle_single TRAINER_GRUNT_52, MagmaHideout_2F_2R_Text_239E64, MagmaHideout_2F_2R_Text_239EA5 - msgbox MagmaHideout_2F_2R_Text_239EBB, MSGBOX_AUTOCLOSE +MagmaHideout_2F_2R_EventScript_Grunt52:: @ 8239E08 + trainerbattle_single TRAINER_GRUNT_52, MagmaHideout_2F_2R_Text_Grunt52Intro, MagmaHideout_2F_2R_Text_Grunt52Defeat + msgbox MagmaHideout_2F_2R_Text_Grunt52PostBattle, MSGBOX_AUTOCLOSE end -MagmaHideout_2F_2R_EventScript_239E1F:: @ 8239E1F - trainerbattle_single TRAINER_GRUNT_43, MagmaHideout_2F_2R_Text_239F31, MagmaHideout_2F_2R_Text_239F71 - msgbox MagmaHideout_2F_2R_Text_239FA1, MSGBOX_AUTOCLOSE +MagmaHideout_2F_2R_EventScript_Grunt43:: @ 8239E1F + trainerbattle_single TRAINER_GRUNT_43, MagmaHideout_2F_2R_Text_Grunt43Intro, MagmaHideout_2F_2R_Text_Grunt43Defeat + msgbox MagmaHideout_2F_2R_Text_Grunt43PostBattle, MSGBOX_AUTOCLOSE end -MagmaHideout_2F_2R_EventScript_239E36:: @ 8239E36 - trainerbattle_single TRAINER_GRUNT_44, MagmaHideout_2F_2R_Text_239FDE, MagmaHideout_2F_2R_Text_23A050 - msgbox MagmaHideout_2F_2R_Text_23A07D, MSGBOX_AUTOCLOSE +MagmaHideout_2F_2R_EventScript_Grunt44:: @ 8239E36 + trainerbattle_single TRAINER_GRUNT_44, MagmaHideout_2F_2R_Text_Grunt44Intro, MagmaHideout_2F_2R_Text_Grunt44Defeat + msgbox MagmaHideout_2F_2R_Text_Grunt44PostBattle, MSGBOX_AUTOCLOSE end -MagmaHideout_2F_2R_EventScript_239E4D:: @ 8239E4D - trainerbattle_single TRAINER_GRUNT_45, MagmaHideout_2F_2R_Text_23A0E4, MagmaHideout_2F_2R_Text_23A14C - msgbox MagmaHideout_2F_2R_Text_23A16F, MSGBOX_AUTOCLOSE +MagmaHideout_2F_2R_EventScript_Grunt45:: @ 8239E4D + trainerbattle_single TRAINER_GRUNT_45, MagmaHideout_2F_2R_Text_Grunt45Intro, MagmaHideout_2F_2R_Text_Grunt45Defeat + msgbox MagmaHideout_2F_2R_Text_Grunt45PostBattle, MSGBOX_AUTOCLOSE end -MagmaHideout_2F_2R_Text_239E64: @ 8239E64 +MagmaHideout_2F_2R_Text_Grunt52Intro: @ 8239E64 .string "I don't have a bone to pick with you.\n" .string "I'm just following orders!$" -MagmaHideout_2F_2R_Text_239EA5: @ 8239EA5 +MagmaHideout_2F_2R_Text_Grunt52Defeat: @ 8239EA5 .string "I may have lost, but…$" -MagmaHideout_2F_2R_Text_239EBB: @ 8239EBB +MagmaHideout_2F_2R_Text_Grunt52PostBattle: @ 8239EBB .string "We dug up something beyond belief!\n" .string "And, we got the BLUE ORB!\p" .string "All that's left is for our leader to…\n" .string "Fufufu… Fwahahaha!$" -MagmaHideout_2F_2R_Text_239F31: @ 8239F31 +MagmaHideout_2F_2R_Text_Grunt43Intro: @ 8239F31 .string "I can't stand heat. Maybe I should've\n" .string "joined TEAM AQUA instead…$" -MagmaHideout_2F_2R_Text_239F71: @ 8239F71 +MagmaHideout_2F_2R_Text_Grunt43Defeat: @ 8239F71 .string "Yeah, I really may not be right for\n" .string "TEAM MAGMA…$" -MagmaHideout_2F_2R_Text_239FA1: @ 8239FA1 +MagmaHideout_2F_2R_Text_Grunt43PostBattle: @ 8239FA1 .string "Don't you get lonely for the sea\n" .string "being in a place like this?$" -MagmaHideout_2F_2R_Text_239FDE: @ 8239FDE +MagmaHideout_2F_2R_Text_Grunt44Intro: @ 8239FDE .string "You can hear tremors here sometimes.\p" .string "Could it be the volcano rattling?\n" .string "Or is it GROU…\p" .string "Whoops!\n" .string "No, no, never mind!$" -MagmaHideout_2F_2R_Text_23A050: @ 823A050 +MagmaHideout_2F_2R_Text_Grunt44Defeat: @ 823A050 .string "You're a fiery battler.\n" .string "Just like a volcano!$" -MagmaHideout_2F_2R_Text_23A07D: @ 823A07D +MagmaHideout_2F_2R_Text_Grunt44PostBattle: @ 823A07D .string "You just happened to win this time,\n" .string "but that doesn't matter.\p" .string "TEAM MAGMA's goal is about to be\n" .string "reached!$" -MagmaHideout_2F_2R_Text_23A0E4: @ 823A0E4 +MagmaHideout_2F_2R_Text_Grunt45Intro: @ 823A0E4 .string "One of our guys was freaking out that\n" .string "he lost his MAGMA EMBLEM…\p" .string "Wait a minute!\n" .string "Was it you who found it?$" -MagmaHideout_2F_2R_Text_23A14C: @ 823A14C +MagmaHideout_2F_2R_Text_Grunt45Defeat: @ 823A14C .string "I'm having trouble believing this…$" -MagmaHideout_2F_2R_Text_23A16F: @ 823A16F +MagmaHideout_2F_2R_Text_Grunt45PostBattle: @ 823A16F .string "I'm getting this feeling that our plan\n" .string "is going to end in failure…$" diff --git a/data/maps/MagmaHideout_3F_1R/map.json b/data/maps/MagmaHideout_3F_1R/map.json index e3c1bac70c..ef370ee8b9 100644 --- a/data/maps/MagmaHideout_3F_1R/map.json +++ b/data/maps/MagmaHideout_3F_1R/map.json @@ -24,7 +24,7 @@ "movement_range_y": 1, "trainer_type": "1", "trainer_sight_or_berry_tree_id": "5", - "script": "MagmaHideout_3F_1R_EventScript_23A1B3", + "script": "MagmaHideout_3F_1R_EventScript_Grunt46", "flag": "FLAG_HIDE_MAGMA_HIDEOUT_GRUNTS" }, { @@ -37,7 +37,7 @@ "movement_range_y": 1, "trainer_type": "1", "trainer_sight_or_berry_tree_id": "4", - "script": "MagmaHideout_3F_1R_EventScript_23A1CA", + "script": "MagmaHideout_3F_1R_EventScript_Grunt53", "flag": "FLAG_HIDE_MAGMA_HIDEOUT_GRUNTS" }, { diff --git a/data/maps/MagmaHideout_3F_1R/scripts.inc b/data/maps/MagmaHideout_3F_1R/scripts.inc index 879cd282d9..a54e38c659 100644 --- a/data/maps/MagmaHideout_3F_1R/scripts.inc +++ b/data/maps/MagmaHideout_3F_1R/scripts.inc @@ -1,29 +1,29 @@ MagmaHideout_3F_1R_MapScripts:: @ 823A1B2 .byte 0 -MagmaHideout_3F_1R_EventScript_23A1B3:: @ 823A1B3 - trainerbattle_single TRAINER_GRUNT_46, MagmaHideout_3F_1R_Text_23A1E1, MagmaHideout_3F_1R_Text_23A229 - msgbox MagmaHideout_3F_1R_Text_23A246, MSGBOX_AUTOCLOSE +MagmaHideout_3F_1R_EventScript_Grunt46:: @ 823A1B3 + trainerbattle_single TRAINER_GRUNT_46, MagmaHideout_3F_1R_Text_Grunt46Intro, MagmaHideout_3F_1R_Text_Grunt46Defeat + msgbox MagmaHideout_3F_1R_Text_Grunt46PostBattle, MSGBOX_AUTOCLOSE end -MagmaHideout_3F_1R_EventScript_23A1CA:: @ 823A1CA - trainerbattle_single TRAINER_GRUNT_53, MagmaHideout_3F_1R_Text_23A293, MagmaHideout_3F_1R_Text_23A353 - msgbox MagmaHideout_3F_1R_Text_23A37C, MSGBOX_AUTOCLOSE +MagmaHideout_3F_1R_EventScript_Grunt53:: @ 823A1CA + trainerbattle_single TRAINER_GRUNT_53, MagmaHideout_3F_1R_Text_Grunt53Intro, MagmaHideout_3F_1R_Text_Grunt53Defeat + msgbox MagmaHideout_3F_1R_Text_Grunt53PostBattle, MSGBOX_AUTOCLOSE end -MagmaHideout_3F_1R_Text_23A1E1: @ 823A1E1 +MagmaHideout_3F_1R_Text_Grunt46Intro: @ 823A1E1 .string "What did I do to deserve this guard\n" .string "posting?\p" .string "My left ear is burning up!$" -MagmaHideout_3F_1R_Text_23A229: @ 823A229 +MagmaHideout_3F_1R_Text_Grunt46Defeat: @ 823A229 .string "I'm getting heat exhaustion…$" -MagmaHideout_3F_1R_Text_23A246: @ 823A246 +MagmaHideout_3F_1R_Text_Grunt46PostBattle: @ 823A246 .string "Do you think it's odd that we're wearing\n" .string "hoods in this magma-filled volcano?$" -MagmaHideout_3F_1R_Text_23A293: @ 823A293 +MagmaHideout_3F_1R_Text_Grunt53Intro: @ 823A293 .string "We joined so we can help our leader\n" .string "achieve his fantastic vision.\p" .string "I don't care if you're with TEAM AQUA\n" @@ -31,11 +31,11 @@ MagmaHideout_3F_1R_Text_23A293: @ 823A293 .string "No one interferes with us and gets\n" .string "away with it!$" -MagmaHideout_3F_1R_Text_23A353: @ 823A353 +MagmaHideout_3F_1R_Text_Grunt53Defeat: @ 823A353 .string "Oh, no!\n" .string "You're not to be trusted at all!$" -MagmaHideout_3F_1R_Text_23A37C: @ 823A37C +MagmaHideout_3F_1R_Text_Grunt53PostBattle: @ 823A37C .string "Listen to me.\n" .string "TEAM MAGMA is right!\p" .string "Don't listen to TEAM AQUA.\n" diff --git a/data/maps/MagmaHideout_3F_2R/map.json b/data/maps/MagmaHideout_3F_2R/map.json index e4b267858b..c6fc9906cb 100644 --- a/data/maps/MagmaHideout_3F_2R/map.json +++ b/data/maps/MagmaHideout_3F_2R/map.json @@ -24,7 +24,7 @@ "movement_range_y": 1, "trainer_type": "1", "trainer_sight_or_berry_tree_id": "3", - "script": "MagmaHideout_3F_2R_EventScript_23A3D5", + "script": "MagmaHideout_3F_2R_EventScript_Grunt47", "flag": "FLAG_HIDE_MAGMA_HIDEOUT_GRUNTS" }, { diff --git a/data/maps/MagmaHideout_3F_2R/scripts.inc b/data/maps/MagmaHideout_3F_2R/scripts.inc index 14f7001fa9..968754b06d 100644 --- a/data/maps/MagmaHideout_3F_2R/scripts.inc +++ b/data/maps/MagmaHideout_3F_2R/scripts.inc @@ -1,12 +1,12 @@ MagmaHideout_3F_2R_MapScripts:: @ 823A3D4 .byte 0 -MagmaHideout_3F_2R_EventScript_23A3D5:: @ 823A3D5 - trainerbattle_single TRAINER_GRUNT_47, MagmaHideout_3F_2R_Text_23A3EC, MagmaHideout_3F_2R_Text_23A4BB - msgbox MagmaHideout_3F_2R_Text_23A4EF, MSGBOX_AUTOCLOSE +MagmaHideout_3F_2R_EventScript_Grunt47:: @ 823A3D5 + trainerbattle_single TRAINER_GRUNT_47, MagmaHideout_3F_2R_Text_Grunt47Intro, MagmaHideout_3F_2R_Text_Grunt47Defeat + msgbox MagmaHideout_3F_2R_Text_Grunt47PostBattle, MSGBOX_AUTOCLOSE end -MagmaHideout_3F_2R_Text_23A3EC: @ 823A3EC +MagmaHideout_3F_2R_Text_Grunt47Intro: @ 823A3EC .string "I understand everything our leader\n" .string "says. But you know what?\p" .string "Doing stuff like digging up a super-\n" @@ -15,11 +15,11 @@ MagmaHideout_3F_2R_Text_23A3EC: @ 823A3EC .string "I think we're going a little too far.\n" .string "What do you think?$" -MagmaHideout_3F_2R_Text_23A4BB: @ 823A4BB +MagmaHideout_3F_2R_Text_Grunt47Defeat: @ 823A4BB .string "Yeah, I think we are doing something\n" .string "wrong somehow.$" -MagmaHideout_3F_2R_Text_23A4EF: @ 823A4EF +MagmaHideout_3F_2R_Text_Grunt47PostBattle: @ 823A4EF .string "You know, losing to you cleared my mind.\p" .string "The next time I see our leader,\n" .string "I'm going to ask him about what we do.$" diff --git a/data/maps/MagmaHideout_4F/map.json b/data/maps/MagmaHideout_4F/map.json index 5eebc41d80..e7ea5b6693 100644 --- a/data/maps/MagmaHideout_4F/map.json +++ b/data/maps/MagmaHideout_4F/map.json @@ -37,7 +37,7 @@ "movement_range_y": 1, "trainer_type": "1", "trainer_sight_or_berry_tree_id": "3", - "script": "MagmaHideout_4F_EventScript_23A68C", + "script": "MagmaHideout_4F_EventScript_Grunt48", "flag": "FLAG_HIDE_MAGMA_HIDEOUT_GRUNTS" }, { @@ -50,7 +50,7 @@ "movement_range_y": 1, "trainer_type": "1", "trainer_sight_or_berry_tree_id": "3", - "script": "MagmaHideout_4F_EventScript_23A6A3", + "script": "MagmaHideout_4F_EventScript_Grunt49", "flag": "FLAG_HIDE_MAGMA_HIDEOUT_GRUNTS" }, { @@ -63,7 +63,7 @@ "movement_range_y": 1, "trainer_type": "1", "trainer_sight_or_berry_tree_id": "3", - "script": "MagmaHideout_4F_EventScript_23A6BA", + "script": "MagmaHideout_4F_EventScript_Grunt50", "flag": "FLAG_HIDE_MAGMA_HIDEOUT_GRUNTS" }, { @@ -76,7 +76,7 @@ "movement_range_y": 1, "trainer_type": "1", "trainer_sight_or_berry_tree_id": "4", - "script": "MagmaHideout_4F_EventScript_23A6D1", + "script": "MagmaHideout_4F_EventScript_Tabitha", "flag": "FLAG_HIDE_MAGMA_HIDEOUT_GRUNTS" }, { @@ -89,7 +89,7 @@ "movement_range_y": 1, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "MagmaHideout_4F_EventScript_23A560", + "script": "MagmaHideout_4F_EventScript_Maxie", "flag": "FLAG_HIDE_MAGMA_HIDEOUT_GRUNTS" }, { diff --git a/data/maps/MagmaHideout_4F/scripts.inc b/data/maps/MagmaHideout_4F/scripts.inc index ce22293962..1c5ea4dbb8 100644 --- a/data/maps/MagmaHideout_4F/scripts.inc +++ b/data/maps/MagmaHideout_4F/scripts.inc @@ -1,10 +1,10 @@ MagmaHideout_4F_MapScripts:: @ 823A55F .byte 0 -MagmaHideout_4F_EventScript_23A560:: @ 823A560 +MagmaHideout_4F_EventScript_Maxie:: @ 823A560 lockall playbgm MUS_MGM0, 0 - msgbox MagmaHideout_4F_Text_23A9F4, MSGBOX_DEFAULT + msgbox MagmaHideout_4F_Text_MaxieAwakenGroudon, MSGBOX_DEFAULT closemessage delay 20 setvar VAR_RESULT, 1 @@ -17,17 +17,17 @@ MagmaHideout_4F_EventScript_23A560:: @ 823A560 setvar VAR_RESULT, 1 playfanfare MUS_ME_TAMA playse SE_TAMA - special sub_80B0534 + special DoOrbEffect applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceFastestUp waitmovement 0 delay 150 - removeobject 7 - addobject 1 + removeobject 7 @ sleeping Groudon + addobject 1 @ awakened Groudon waitstate delay 60 - applymovement 1, MagmaHideout_4F_Movement_23A672 + applymovement 1, MagmaHideout_4F_Movement_GroudonApproach waitmovement 0 - special sub_80B058C + special FadeOutOrbEffect waitstate setvar VAR_0x8004, 1 @ vertical pan setvar VAR_0x8005, 1 @ horizontal pan @@ -35,7 +35,7 @@ MagmaHideout_4F_EventScript_23A560:: @ 823A560 setvar VAR_0x8007, 5 @ shake delay special ShakeCamera waitstate - applymovement 1, MagmaHideout_4F_Movement_23A67D + applymovement 1, MagmaHideout_4F_Movement_GroudonExit waitmovement 0 removeobject 1 delay 4 @@ -46,19 +46,19 @@ MagmaHideout_4F_EventScript_23A560:: @ 823A560 special ShakeCamera waitstate delay 30 - applymovement 6, MagmaHideout_4F_Movement_23A680 + applymovement 6, MagmaHideout_4F_Movement_MaxieLookAround waitmovement 0 - msgbox MagmaHideout_4F_Text_23AADA, MSGBOX_DEFAULT + msgbox MagmaHideout_4F_Text_MaxieGroudonWhatsWrong, MSGBOX_DEFAULT closemessage applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceFastestRight waitmovement 0 delay 30 applymovement 6, Common_Movement_FacePlayer waitmovement 0 - msgbox MagmaHideout_4F_Text_23AB33, MSGBOX_DEFAULT + msgbox MagmaHideout_4F_Text_MaxieOhItWasYou, MSGBOX_DEFAULT closemessage - trainerbattle_no_intro TRAINER_MAXIE_1, MagmaHideout_4F_Text_23ABB5 - msgbox MagmaHideout_4F_Text_23ABE2, MSGBOX_DEFAULT + trainerbattle_no_intro TRAINER_MAXIE_1, MagmaHideout_4F_Text_MaxieDefeat + msgbox MagmaHideout_4F_Text_MaxieImGoingAfterGroudon, MSGBOX_DEFAULT closemessage clearflag FLAG_HIDE_SLATEPORT_CITY_CAPTAIN_STERN clearflag FLAG_HIDE_SLATEPORT_CITY_GABBY_AND_TY @@ -76,7 +76,7 @@ MagmaHideout_4F_EventScript_23A560:: @ 823A560 releaseall end -MagmaHideout_4F_Movement_23A672: @ 823A672 +MagmaHideout_4F_Movement_GroudonApproach: @ 823A672 delay_16 delay_16 walk_slow_down @@ -89,12 +89,12 @@ MagmaHideout_4F_Movement_23A672: @ 823A672 delay_16 step_end -MagmaHideout_4F_Movement_23A67D: @ 823A67D +MagmaHideout_4F_Movement_GroudonExit: @ 823A67D slide_up slide_up step_end -MagmaHideout_4F_Movement_23A680: @ 823A680 +MagmaHideout_4F_Movement_MaxieLookAround: @ 823A680 face_left delay_16 face_right @@ -108,64 +108,64 @@ MagmaHideout_4F_Movement_23A680: @ 823A680 delay_16 step_end -MagmaHideout_4F_EventScript_23A68C:: @ 823A68C - trainerbattle_single TRAINER_GRUNT_48, MagmaHideout_4F_Text_23A6E8, MagmaHideout_4F_Text_23A775 - msgbox MagmaHideout_4F_Text_23A7B5, MSGBOX_AUTOCLOSE +MagmaHideout_4F_EventScript_Grunt48:: @ 823A68C + trainerbattle_single TRAINER_GRUNT_48, MagmaHideout_4F_Text_Grunt48Intro, MagmaHideout_4F_Text_Grunt48Defeat + msgbox MagmaHideout_4F_Text_Grunt48PostBattle, MSGBOX_AUTOCLOSE end -MagmaHideout_4F_EventScript_23A6A3:: @ 823A6A3 - trainerbattle_single TRAINER_GRUNT_49, MagmaHideout_4F_Text_23A7DA, MagmaHideout_4F_Text_23A81B - msgbox MagmaHideout_4F_Text_23A841, MSGBOX_AUTOCLOSE +MagmaHideout_4F_EventScript_Grunt49:: @ 823A6A3 + trainerbattle_single TRAINER_GRUNT_49, MagmaHideout_4F_Text_Grunt49Intro, MagmaHideout_4F_Text_Grunt49Defeat + msgbox MagmaHideout_4F_Text_Grunt49PostBattle, MSGBOX_AUTOCLOSE end -MagmaHideout_4F_EventScript_23A6BA:: @ 823A6BA - trainerbattle_single TRAINER_GRUNT_50, MagmaHideout_4F_Text_23A86D, MagmaHideout_4F_Text_23A8A7 - msgbox MagmaHideout_4F_Text_23A8C6, MSGBOX_AUTOCLOSE +MagmaHideout_4F_EventScript_Grunt50:: @ 823A6BA + trainerbattle_single TRAINER_GRUNT_50, MagmaHideout_4F_Text_Grunt50Intro, MagmaHideout_4F_Text_Grunt50Defeat + msgbox MagmaHideout_4F_Text_Grunt50PostBattle, MSGBOX_AUTOCLOSE end -MagmaHideout_4F_EventScript_23A6D1:: @ 823A6D1 - trainerbattle_single TRAINER_TABITHA_3, MagmaHideout_4F_Text_23A8E1, MagmaHideout_4F_Text_23A994 - msgbox MagmaHideout_4F_Text_23A9AC, MSGBOX_AUTOCLOSE +MagmaHideout_4F_EventScript_Tabitha:: @ 823A6D1 + trainerbattle_single TRAINER_TABITHA_3, MagmaHideout_4F_Text_TabithaIntro, MagmaHideout_4F_Text_TabithaDefeat + msgbox MagmaHideout_4F_Text_TabithaPostBattle, MSGBOX_AUTOCLOSE end -MagmaHideout_4F_Text_23A6E8: @ 823A6E8 +MagmaHideout_4F_Text_Grunt48Intro: @ 823A6E8 .string "I want to see GROUDON, too, but they\n" .string "won't let me see even its tail…\p" .string "It's got me feeling really frustrated.\p" .string "Oh, no!\n" .string "I blabbed about GROUDON!$" -MagmaHideout_4F_Text_23A775: @ 823A775 +MagmaHideout_4F_Text_Grunt48Defeat: @ 823A775 .string "I guess it's impossible to win if one\n" .string "doesn't have a calm mind…$" -MagmaHideout_4F_Text_23A7B5: @ 823A7B5 +MagmaHideout_4F_Text_Grunt48PostBattle: @ 823A7B5 .string "I wonder if GROUDON even has a tail?$" -MagmaHideout_4F_Text_23A7DA: @ 823A7DA +MagmaHideout_4F_Text_Grunt49Intro: @ 823A7DA .string "Fuhahaha!\n" .string "Soon! Very soon!\l" .string "Our grand objective will be achieved!$" -MagmaHideout_4F_Text_23A81B: @ 823A81B +MagmaHideout_4F_Text_Grunt49Defeat: @ 823A81B .string "Grrr…\n" .string "I've come so far, but now this?$" -MagmaHideout_4F_Text_23A841: @ 823A841 +MagmaHideout_4F_Text_Grunt49PostBattle: @ 823A841 .string "MAXIE, sir!\n" .string "An intruder is headed your way!$" -MagmaHideout_4F_Text_23A86D: @ 823A86D +MagmaHideout_4F_Text_Grunt50Intro: @ 823A86D .string "You're not finished yet!\n" .string "You're not getting by me easily!$" -MagmaHideout_4F_Text_23A8A7: @ 823A8A7 +MagmaHideout_4F_Text_Grunt50Defeat: @ 823A8A7 .string "Was I that easy to knock down?$" -MagmaHideout_4F_Text_23A8C6: @ 823A8C6 +MagmaHideout_4F_Text_Grunt50PostBattle: @ 823A8C6 .string "C-come on, one more match…$" -MagmaHideout_4F_Text_23A8E1: @ 823A8E1 +MagmaHideout_4F_Text_TabithaIntro: @ 823A8E1 .string "Hehehe!\n" .string "You made it this far, so I'll tell you!\p" .string "That's right!\n" @@ -175,15 +175,15 @@ MagmaHideout_4F_Text_23A8E1: @ 823A8E1 .string "It's going to awaken real soon!\n" .string "Hehe! Hehehe!$" -MagmaHideout_4F_Text_23A994: @ 823A994 +MagmaHideout_4F_Text_TabithaDefeat: @ 823A994 .string "Taken down again…\n" .string "Hehe…$" -MagmaHideout_4F_Text_23A9AC: @ 823A9AC +MagmaHideout_4F_Text_TabithaPostBattle: @ 823A9AC .string "…And while you wasted time with me,\n" .string "MAXIE should have awakened GROUDON…$" -MagmaHideout_4F_Text_23A9F4: @ 823A9F4 +MagmaHideout_4F_Text_MaxieAwakenGroudon: @ 823A9F4 .string "MAXIE: GROUDON…\p" .string "Nothing could awaken you from your\n" .string "sleep bathed in magma…\p" @@ -194,25 +194,25 @@ MagmaHideout_4F_Text_23A9F4: @ 823A9F4 .string "And show me…\n" .string "Show me the full extent of your power!$" -MagmaHideout_4F_Text_23AADA: @ 823AADA +MagmaHideout_4F_Text_MaxieGroudonWhatsWrong: @ 823AADA .string "MAXIE: GROUDON!\n" .string "What's wrong?\p" .string "Wasn't the BLUE ORB the key?\p" .string "GROUDON!\n" .string "Where have you gone…$" -MagmaHideout_4F_Text_23AB33: @ 823AB33 +MagmaHideout_4F_Text_MaxieOhItWasYou: @ 823AB33 .string "MAXIE: Oh, so it was you?\p" .string "I've seen you poking around uninvited\n" .string "here and there…\p" .string "I get it now!\n" .string "You must have pulled a cheap stunt!$" -MagmaHideout_4F_Text_23ABB5: @ 823ABB5 +MagmaHideout_4F_Text_MaxieDefeat: @ 823ABB5 .string "What makes you so adept at handling\n" .string "POKéMON?$" -MagmaHideout_4F_Text_23ABE2: @ 823ABE2 +MagmaHideout_4F_Text_MaxieImGoingAfterGroudon: @ 823ABE2 .string "MAXIE: There has to be some reason\n" .string "why GROUDON fled…\p" .string "That's what you're trying to say,\n" diff --git a/data/maps/MeteorFalls_1F_2R/scripts.inc b/data/maps/MeteorFalls_1F_2R/scripts.inc index fee636e0b5..9ed8053c61 100644 --- a/data/maps/MeteorFalls_1F_2R/scripts.inc +++ b/data/maps/MeteorFalls_1F_2R/scripts.inc @@ -11,7 +11,7 @@ MeteorFalls_1F_2R_EventScript_22C4DE:: @ 822C4DE end MeteorFalls_1F_2R_EventScript_22C50A:: @ 822C50A - special sub_80B4808 + special PlayerFaceTrainerAfterBattle waitmovement 0 msgbox MeteorFalls_1F_2R_Text_22C6F6, MSGBOX_DEFAULT register_matchcall TRAINER_NICOLAS_1 diff --git a/data/maps/MossdeepCity_SpaceCenter_1F/scripts.inc b/data/maps/MossdeepCity_SpaceCenter_1F/scripts.inc index 1058761c53..e5f43565ca 100644 --- a/data/maps/MossdeepCity_SpaceCenter_1F/scripts.inc +++ b/data/maps/MossdeepCity_SpaceCenter_1F/scripts.inc @@ -1,5 +1,5 @@ MossdeepCity_SpaceCenter_1F_MapScripts:: @ 8222F41 - map_script MAP_SCRIPT_ON_LOAD, MossdeepCity_SpaceCenter_1F_MapScript1_222FC2 + map_script MAP_SCRIPT_ON_LOAD, MossdeepCity_SpaceCenter_1F_OnLoad map_script MAP_SCRIPT_ON_TRANSITION, MossdeepCity_SpaceCenter_1F_OnTransition .byte 0 @@ -38,7 +38,7 @@ MossdeepCity_SpaceCenter_1F_EventScript_222FBA:: @ 8222FBA setobjectxyperm 9, 14, 2 end -MossdeepCity_SpaceCenter_1F_MapScript1_222FC2: @ 8222FC2 +MossdeepCity_SpaceCenter_1F_OnLoad: @ 8222FC2 compare VAR_MOSSDEEP_CITY_STATE, 2 goto_if_le MossdeepCity_SpaceCenter_1F_EventScript_222FCE end diff --git a/data/maps/MtChimney/scripts.inc b/data/maps/MtChimney/scripts.inc index 71ee724b5b..91cdb9e423 100644 --- a/data/maps/MtChimney/scripts.inc +++ b/data/maps/MtChimney/scripts.inc @@ -491,7 +491,7 @@ MtChimney_EventScript_22F14A:: @ 822F14A end MtChimney_EventScript_22F176:: @ 822F176 - special sub_80B4808 + special PlayerFaceTrainerAfterBattle waitmovement 0 msgbox MtChimney_Text_2300E3, MSGBOX_DEFAULT register_matchcall TRAINER_SHELBY_1 @@ -533,7 +533,7 @@ MtChimney_EventScript_22F208:: @ 822F208 end MtChimney_EventScript_22F234:: @ 822F234 - special sub_80B4808 + special PlayerFaceTrainerAfterBattle waitmovement 0 msgbox MtChimney_Text_230557, MSGBOX_DEFAULT register_matchcall TRAINER_SAWYER_1 diff --git a/data/maps/MtPyre_3F/scripts.inc b/data/maps/MtPyre_3F/scripts.inc index 558ab99997..3b84a581bd 100644 --- a/data/maps/MtPyre_3F/scripts.inc +++ b/data/maps/MtPyre_3F/scripts.inc @@ -21,7 +21,7 @@ MtPyre_3F_EventScript_231781:: @ 8231781 end MtPyre_3F_EventScript_2317AD:: @ 82317AD - special sub_80B4808 + special PlayerFaceTrainerAfterBattle waitmovement 0 msgbox MtPyre_3F_Text_231A49, MSGBOX_DEFAULT register_matchcall TRAINER_GABRIELLE_1 diff --git a/data/maps/MtPyre_6F/scripts.inc b/data/maps/MtPyre_6F/scripts.inc index f59edd7b16..bc975e9424 100644 --- a/data/maps/MtPyre_6F/scripts.inc +++ b/data/maps/MtPyre_6F/scripts.inc @@ -11,7 +11,7 @@ MtPyre_6F_EventScript_231D3B:: @ 8231D3B end MtPyre_6F_EventScript_231D67:: @ 8231D67 - special sub_80B4808 + special PlayerFaceTrainerAfterBattle waitmovement 0 msgbox MtPyre_6F_Text_231E43, MSGBOX_DEFAULT register_matchcall TRAINER_VALERIE_1 diff --git a/data/maps/PetalburgWoods/scripts.inc b/data/maps/PetalburgWoods/scripts.inc index 79179ffa65..42f0fb35ad 100644 --- a/data/maps/PetalburgWoods/scripts.inc +++ b/data/maps/PetalburgWoods/scripts.inc @@ -290,7 +290,7 @@ PetalburgWoods_EventScript_James:: @ 822E284 end PetalburgWoods_EventScript_TryRegisterJames:: @ 822E2C5 - special sub_80B4808 + special PlayerFaceTrainerAfterBattle waitmovement 0 goto_if_set FLAG_HAS_MATCH_CALL, PetalburgWoods_EventScript_RegisterJames release diff --git a/data/maps/Route102/scripts.inc b/data/maps/Route102/scripts.inc index 3c79e8c61c..b14f204e58 100644 --- a/data/maps/Route102/scripts.inc +++ b/data/maps/Route102/scripts.inc @@ -31,7 +31,7 @@ Route102_EventScript_Calvin:: @ 81EC105 end Route102_EventScript_CalvinRegisterMatchCallAfterBattle:: @ 81EC146 - special sub_80B4808 + special PlayerFaceTrainerAfterBattle waitmovement 0 goto_if_set FLAG_HAS_MATCH_CALL, Route102_EventScript_CalvinRegisterMatchCall release diff --git a/data/maps/Route103/scripts.inc b/data/maps/Route103/scripts.inc index b54ede043b..c614dae1cc 100644 --- a/data/maps/Route103/scripts.inc +++ b/data/maps/Route103/scripts.inc @@ -259,7 +259,7 @@ Route103_EventScript_Miguel:: @ 81EC6E8 end Route102_EventScript_MiguelRegisterMatchCallAfterBattle:: @ 81EC714 - special sub_80B4808 + special PlayerFaceTrainerAfterBattle waitmovement 0 msgbox Route103_Text_MiguelRegister, MSGBOX_DEFAULT register_matchcall TRAINER_MIGUEL_1 diff --git a/data/maps/Route104/scripts.inc b/data/maps/Route104/scripts.inc index 9c31aadb5f..ff420e599b 100644 --- a/data/maps/Route104/scripts.inc +++ b/data/maps/Route104/scripts.inc @@ -879,7 +879,7 @@ Route104_EventScript_1ED38D:: @ 81ED38D end Route104_EventScript_1ED3CE:: @ 81ED3CE - special sub_80B4808 + special PlayerFaceTrainerAfterBattle waitmovement 0 goto_if_set FLAG_HAS_MATCH_CALL, Route104_EventScript_1ED3DF release @@ -922,7 +922,7 @@ Route104_EventScript_1ED43B:: @ 81ED43B end Route104_EventScript_1ED47C:: @ 81ED47C - special sub_80B4808 + special PlayerFaceTrainerAfterBattle waitmovement 0 goto_if_set FLAG_HAS_MATCH_CALL, Route104_EventScript_1ED48D release @@ -965,7 +965,7 @@ Route104_EventScript_1ED4E9:: @ 81ED4E9 end Route104_EventScript_1ED52A:: @ 81ED52A - special sub_80B4808 + special PlayerFaceTrainerAfterBattle waitmovement 0 goto_if_set FLAG_HAS_MATCH_CALL, Route104_EventScript_1ED53B release diff --git a/data/maps/Route105/scripts.inc b/data/maps/Route105/scripts.inc index 1b892642e0..e1292803dc 100644 --- a/data/maps/Route105/scripts.inc +++ b/data/maps/Route105/scripts.inc @@ -70,7 +70,7 @@ Route105_EventScript_Andres:: @ 81EE2D4 end Route105_EventScript_AndresRegisterMatchCallAfterBattle:: @ 81EE300 - special sub_80B4808 + special PlayerFaceTrainerAfterBattle waitmovement 0 msgbox Route105_Text_AndresRegister, MSGBOX_DEFAULT register_matchcall TRAINER_ANDRES_1 diff --git a/data/maps/Route106/scripts.inc b/data/maps/Route106/scripts.inc index eb545cab82..f9d3fb3b93 100644 --- a/data/maps/Route106/scripts.inc +++ b/data/maps/Route106/scripts.inc @@ -25,7 +25,7 @@ Route106_EventScript_Elliot:: @ 81EE4C1 end Route106_EventScript_ElliotRegisterMatchCallAfterBattle:: @ 81EE4ED - special sub_80B4808 + special PlayerFaceTrainerAfterBattle waitmovement 0 msgbox Route106_Text_ElliotRegister, MSGBOX_DEFAULT register_matchcall TRAINER_ELLIOT_1 diff --git a/data/maps/Route107/scripts.inc b/data/maps/Route107/scripts.inc index 936634d8dd..0642c457fa 100644 --- a/data/maps/Route107/scripts.inc +++ b/data/maps/Route107/scripts.inc @@ -16,7 +16,7 @@ Route107_EventScript_Tony:: @ 81EE5AC end Route107_EventScript_TonyRegisterMatchCallAfterBattle:: @ 81EE5D8 - special sub_80B4808 + special PlayerFaceTrainerAfterBattle waitmovement 0 msgbox Route107_Text_TonyRegister, MSGBOX_DEFAULT register_matchcall TRAINER_TONY_1 diff --git a/data/maps/Route108/scripts.inc b/data/maps/Route108/scripts.inc index 4f049f71d6..57f353bd13 100644 --- a/data/maps/Route108/scripts.inc +++ b/data/maps/Route108/scripts.inc @@ -36,7 +36,7 @@ Route108_EventScript_Cory:: @ 81EE6FD end Route108_EventScript_CoryRegisterMatchCallAfterBattle:: @ 81EE729 - special sub_80B4808 + special PlayerFaceTrainerAfterBattle waitmovement 0 msgbox Route108_Text_CoryRegister, MSGBOX_DEFAULT register_matchcall TRAINER_CORY_1 diff --git a/data/maps/Route109/scripts.inc b/data/maps/Route109/scripts.inc index adaab110b4..5a45b6ceb6 100644 --- a/data/maps/Route109/scripts.inc +++ b/data/maps/Route109/scripts.inc @@ -403,7 +403,7 @@ Route109_EventScript_Ricky:: @ 81EEA99 end Route109_EventScript_RickyRegisterMatchCallAfterBattle:: @ 81EEAC5 - special sub_80B4808 + special PlayerFaceTrainerAfterBattle waitmovement 0 msgbox Route109_Text_RickyRegister, MSGBOX_DEFAULT register_matchcall TRAINER_RICKY_1 @@ -425,7 +425,7 @@ Route109_EventScript_Lola:: @ 81EEAFB end Route109_EventScript_LolaRegisterMatchCallAfterBattle:: @ 81EEB27 - special sub_80B4808 + special PlayerFaceTrainerAfterBattle waitmovement 0 msgbox Route109_Text_LolaRegister, MSGBOX_DEFAULT register_matchcall TRAINER_LOLA_1 diff --git a/data/maps/Route110/scripts.inc b/data/maps/Route110/scripts.inc index 68ae1d573f..0a8b6eafc1 100644 --- a/data/maps/Route110/scripts.inc +++ b/data/maps/Route110/scripts.inc @@ -184,7 +184,7 @@ Route110_EventScript_Edwin:: @ 81EF420 end Route110_EventScript_EdwinRegisterMatchCallAfterBattle:: @ 81EF44C - special sub_80B4808 + special PlayerFaceTrainerAfterBattle waitmovement 0 msgbox Route110_Text_EdwinRegister, MSGBOX_DEFAULT register_matchcall TRAINER_EDWIN_1 @@ -221,7 +221,7 @@ Route110_EventScript_Benjamin:: @ 81EF4C7 end Route110_EventScript_BenjaminRegisterMatchCallAfterBattle:: @ 81EF4F3 - special sub_80B4808 + special PlayerFaceTrainerAfterBattle waitmovement 0 msgbox Route110_Text_BenjaminRegister, MSGBOX_DEFAULT register_matchcall TRAINER_BENJAMIN_1 @@ -248,7 +248,7 @@ Route110_EventScript_Abigail:: @ 81EF540 end Route110_EventScript_AbigailRegisterMatchCallAfterBattle:: @ 81EF56C - special sub_80B4808 + special PlayerFaceTrainerAfterBattle waitmovement 0 msgbox Route110_Text_AbigailRegister, MSGBOX_DEFAULT register_matchcall TRAINER_ABIGAIL_1 @@ -270,7 +270,7 @@ Route110_EventScript_Isabel:: @ 81EF5A2 end Route110_EventScript_IsabelRegisterMatchCallAfterBattle:: @ 81EF5CE - special sub_80B4808 + special PlayerFaceTrainerAfterBattle waitmovement 0 msgbox Route110_Text_IsabelRegister, MSGBOX_DEFAULT register_matchcall TRAINER_ISABEL_1 diff --git a/data/maps/Route111/scripts.inc b/data/maps/Route111/scripts.inc index 8121265bbb..b5a9ca8cc4 100644 --- a/data/maps/Route111/scripts.inc +++ b/data/maps/Route111/scripts.inc @@ -476,7 +476,7 @@ Route111_EventScript_1F1260:: @ 81F1260 end Route111_EventScript_1F128C:: @ 81F128C - special sub_80B4808 + special PlayerFaceTrainerAfterBattle waitmovement 0 msgbox Route111_Text_298C00, MSGBOX_DEFAULT register_matchcall TRAINER_DUSTY_1 @@ -513,7 +513,7 @@ Route111_EventScript_1F1307:: @ 81F1307 end Route111_EventScript_1F1333:: @ 81F1333 - special sub_80B4808 + special PlayerFaceTrainerAfterBattle waitmovement 0 msgbox Route111_Text_29903D, MSGBOX_DEFAULT register_matchcall TRAINER_WILTON_1 @@ -535,7 +535,7 @@ Route111_EventScript_1F1369:: @ 81F1369 end Route111_EventScript_1F1395:: @ 81F1395 - special sub_80B4808 + special PlayerFaceTrainerAfterBattle waitmovement 0 msgbox Route111_Text_29921D, MSGBOX_DEFAULT register_matchcall TRAINER_BROOKE_1 diff --git a/data/maps/Route112/scripts.inc b/data/maps/Route112/scripts.inc index 0659095f6a..beb572f08a 100644 --- a/data/maps/Route112/scripts.inc +++ b/data/maps/Route112/scripts.inc @@ -75,7 +75,7 @@ Route112_EventScript_1F1E81:: @ 81F1E81 end Route112_EventScript_1F1EAD:: @ 81F1EAD - special sub_80B4808 + special PlayerFaceTrainerAfterBattle waitmovement 0 msgbox Route112_Text_29993C, MSGBOX_DEFAULT register_matchcall TRAINER_TRENT_1 diff --git a/data/maps/Route113/scripts.inc b/data/maps/Route113/scripts.inc index 3e1b1754fd..89bf97373c 100644 --- a/data/maps/Route113/scripts.inc +++ b/data/maps/Route113/scripts.inc @@ -68,7 +68,7 @@ Route113_EventScript_1F21EE:: @ 81F21EE end Route113_EventScript_1F221A:: @ 81F221A - special sub_80B4808 + special PlayerFaceTrainerAfterBattle waitmovement 0 msgbox Route113_Text_299F49, MSGBOX_DEFAULT register_matchcall TRAINER_MADELINE_1 @@ -90,7 +90,7 @@ Route113_EventScript_1F2250:: @ 81F2250 end Route113_EventScript_1F227C:: @ 81F227C - special sub_80B4808 + special PlayerFaceTrainerAfterBattle waitmovement 0 msgbox Route113_Text_29A0A2, MSGBOX_DEFAULT register_matchcall TRAINER_LAO_1 diff --git a/data/maps/Route114/scripts.inc b/data/maps/Route114/scripts.inc index 3434d67532..caf6e14964 100644 --- a/data/maps/Route114/scripts.inc +++ b/data/maps/Route114/scripts.inc @@ -116,7 +116,7 @@ Route114_EventScript_1F269C:: @ 81F269C end Route114_EventScript_1F26C8:: @ 81F26C8 - special sub_80B4808 + special PlayerFaceTrainerAfterBattle waitmovement 0 msgbox Route114_Text_29A9F7, MSGBOX_DEFAULT register_matchcall TRAINER_STEVE_1 @@ -138,7 +138,7 @@ Route114_EventScript_1F26FE:: @ 81F26FE end Route114_EventScript_1F272A:: @ 81F272A - special sub_80B4808 + special PlayerFaceTrainerAfterBattle waitmovement 0 msgbox Route114_Text_29ABA6, MSGBOX_DEFAULT register_matchcall TRAINER_BERNIE_1 diff --git a/data/maps/Route115/scripts.inc b/data/maps/Route115/scripts.inc index 79d2caedca..8877f31bd7 100644 --- a/data/maps/Route115/scripts.inc +++ b/data/maps/Route115/scripts.inc @@ -46,7 +46,7 @@ Route115_EventScript_1F298E:: @ 81F298E end Route115_EventScript_1F29BA:: @ 81F29BA - special sub_80B4808 + special PlayerFaceTrainerAfterBattle waitmovement 0 msgbox Route115_Text_29B2B3, MSGBOX_DEFAULT register_matchcall TRAINER_TIMOTHY_1 @@ -73,7 +73,7 @@ Route115_EventScript_1F2A07:: @ 81F2A07 end Route115_EventScript_1F2A33:: @ 81F2A33 - special sub_80B4808 + special PlayerFaceTrainerAfterBattle waitmovement 0 msgbox Route115_Text_29B50B, MSGBOX_DEFAULT register_matchcall TRAINER_NOB_1 @@ -95,7 +95,7 @@ Route115_EventScript_1F2A69:: @ 81F2A69 end Route115_EventScript_1F2A95:: @ 81F2A95 - special sub_80B4808 + special PlayerFaceTrainerAfterBattle waitmovement 0 msgbox Route115_Text_29B6AB, MSGBOX_DEFAULT register_matchcall TRAINER_CYNDY_1 diff --git a/data/maps/Route116/scripts.inc b/data/maps/Route116/scripts.inc index cef5051e07..f52c8a05fc 100644 --- a/data/maps/Route116/scripts.inc +++ b/data/maps/Route116/scripts.inc @@ -272,7 +272,7 @@ Route116_EventScript_1F2EF8:: @ 81F2EF8 end Route116_EventScript_1F2F03:: @ 81F2F03 - special sub_80B4808 + special PlayerFaceTrainerAfterBattle waitmovement 0 msgbox Route116_Text_29BE71, MSGBOX_DEFAULT register_matchcall TRAINER_JERRY_1 @@ -325,7 +325,7 @@ Route116_EventScript_1F2FD4:: @ 81F2FD4 end Route116_EventScript_1F2FDF:: @ 81F2FDF - special sub_80B4808 + special PlayerFaceTrainerAfterBattle waitmovement 0 msgbox Route116_Text_29C096, MSGBOX_DEFAULT register_matchcall TRAINER_KAREN_1 diff --git a/data/maps/Route117/scripts.inc b/data/maps/Route117/scripts.inc index 5435595ee4..40d121fc74 100644 --- a/data/maps/Route117/scripts.inc +++ b/data/maps/Route117/scripts.inc @@ -47,7 +47,7 @@ Route117_EventScript_1F39D0:: @ 81F39D0 end Route117_EventScript_1F39FC:: @ 81F39FC - special sub_80B4808 + special PlayerFaceTrainerAfterBattle waitmovement 0 msgbox Route117_Text_29C508, MSGBOX_DEFAULT register_matchcall TRAINER_ISAAC_1 @@ -69,7 +69,7 @@ Route117_EventScript_1F3A32:: @ 81F3A32 end Route117_EventScript_1F3A5E:: @ 81F3A5E - special sub_80B4808 + special PlayerFaceTrainerAfterBattle waitmovement 0 msgbox Route117_Text_29C6BC, MSGBOX_DEFAULT register_matchcall TRAINER_LYDIA_1 @@ -91,7 +91,7 @@ Route117_EventScript_1F3A94:: @ 81F3A94 end Route117_EventScript_1F3AC0:: @ 81F3AC0 - special sub_80B4808 + special PlayerFaceTrainerAfterBattle waitmovement 0 msgbox Route117_Text_29C846, MSGBOX_DEFAULT register_matchcall TRAINER_DYLAN_1 @@ -113,7 +113,7 @@ Route117_EventScript_1F3AF6:: @ 81F3AF6 end Route117_EventScript_1F3B22:: @ 81F3B22 - special sub_80B4808 + special PlayerFaceTrainerAfterBattle waitmovement 0 msgbox Route117_Text_29CA32, MSGBOX_DEFAULT register_matchcall TRAINER_MARIA_1 diff --git a/data/maps/Route118/scripts.inc b/data/maps/Route118/scripts.inc index 38b231111a..051cdfd9c5 100644 --- a/data/maps/Route118/scripts.inc +++ b/data/maps/Route118/scripts.inc @@ -195,7 +195,7 @@ Route118_EventScript_1F3F87:: @ 81F3F87 end Route118_EventScript_1F3FB3:: @ 81F3FB3 - special sub_80B4808 + special PlayerFaceTrainerAfterBattle waitmovement 0 msgbox Route118_Text_29D343, MSGBOX_DEFAULT register_matchcall TRAINER_ROSE_1 @@ -227,7 +227,7 @@ Route118_EventScript_1F4017:: @ 81F4017 end Route118_EventScript_1F4043:: @ 81F4043 - special sub_80B4808 + special PlayerFaceTrainerAfterBattle waitmovement 0 msgbox Route118_Text_29D74A, MSGBOX_DEFAULT register_matchcall TRAINER_DALTON_1 diff --git a/data/maps/Route119/scripts.inc b/data/maps/Route119/scripts.inc index ec1063c6df..4658c24073 100644 --- a/data/maps/Route119/scripts.inc +++ b/data/maps/Route119/scripts.inc @@ -375,7 +375,7 @@ Route119_EventScript_1F4810:: @ 81F4810 end Route119_EventScript_1F483C:: @ 81F483C - special sub_80B4808 + special PlayerFaceTrainerAfterBattle waitmovement 0 msgbox Route119_Text_29DD1C, MSGBOX_DEFAULT register_matchcall TRAINER_JACKSON_1 @@ -397,7 +397,7 @@ Route119_EventScript_1F4872:: @ 81F4872 end Route119_EventScript_1F489E:: @ 81F489E - special sub_80B4808 + special PlayerFaceTrainerAfterBattle waitmovement 0 msgbox Route119_Text_29DEF7, MSGBOX_DEFAULT register_matchcall TRAINER_CATHERINE_1 diff --git a/data/maps/Route120/scripts.inc b/data/maps/Route120/scripts.inc index 562416c1d6..cb4ee4cc87 100644 --- a/data/maps/Route120/scripts.inc +++ b/data/maps/Route120/scripts.inc @@ -299,7 +299,7 @@ Route120_EventScript_1F57EE:: @ 81F57EE end Route120_EventScript_1F581A:: @ 81F581A - special sub_80B4808 + special PlayerFaceTrainerAfterBattle waitmovement 0 msgbox Route120_Text_29E75D, MSGBOX_DEFAULT register_matchcall TRAINER_ROBERT_1 @@ -331,7 +331,7 @@ Route120_EventScript_1F587E:: @ 81F587E end Route120_EventScript_1F58AA:: @ 81F58AA - special sub_80B4808 + special PlayerFaceTrainerAfterBattle waitmovement 0 msgbox Route120_Text_29EA31, MSGBOX_DEFAULT register_matchcall TRAINER_JEFFREY_1 diff --git a/data/maps/Route121/scripts.inc b/data/maps/Route121/scripts.inc index 6aa82857fb..06862972c0 100644 --- a/data/maps/Route121/scripts.inc +++ b/data/maps/Route121/scripts.inc @@ -80,7 +80,7 @@ Route121_EventScript_1F5E8B:: @ 81F5E8B end Route121_EventScript_1F5EB7:: @ 81F5EB7 - special sub_80B4808 + special PlayerFaceTrainerAfterBattle waitmovement 0 msgbox Route121_Text_29F25B, MSGBOX_DEFAULT register_matchcall TRAINER_WALTER_1 @@ -117,7 +117,7 @@ Route121_EventScript_1F5F3A:: @ 81F5F3A end Route121_EventScript_1F5F66:: @ 81F5F66 - special sub_80B4808 + special PlayerFaceTrainerAfterBattle waitmovement 0 msgbox Route121_Text_29F69F, MSGBOX_DEFAULT register_matchcall TRAINER_JESSICA_1 @@ -159,7 +159,7 @@ Route121_EventScript_1F5FF8:: @ 81F5FF8 end Route121_EventScript_1F6024:: @ 81F6024 - special sub_80B4808 + special PlayerFaceTrainerAfterBattle waitmovement 0 msgbox Route121_Text_29F80D, MSGBOX_DEFAULT register_matchcall TRAINER_CRISTIN_1 diff --git a/data/maps/Route123/scripts.inc b/data/maps/Route123/scripts.inc index ce74cbadcb..b5b3e61793 100644 --- a/data/maps/Route123/scripts.inc +++ b/data/maps/Route123/scripts.inc @@ -69,7 +69,7 @@ Route123_EventScript_1F620A:: @ 81F620A end Route123_EventScript_1F6236:: @ 81F6236 - special sub_80B4808 + special PlayerFaceTrainerAfterBattle waitmovement 0 msgbox Route123_Text_29FE70, MSGBOX_DEFAULT register_matchcall TRAINER_CAMERON_1 @@ -91,7 +91,7 @@ Route123_EventScript_1F626C:: @ 81F626C end Route123_EventScript_1F6298:: @ 81F6298 - special sub_80B4808 + special PlayerFaceTrainerAfterBattle waitmovement 0 msgbox Route123_Text_2A0027, MSGBOX_DEFAULT register_matchcall TRAINER_JACKI_1 @@ -163,7 +163,7 @@ Route123_EventScript_1F63BC:: @ 81F63BC end Route123_EventScript_1F63E8:: @ 81F63E8 - special sub_80B4808 + special PlayerFaceTrainerAfterBattle waitmovement 0 msgbox Route123_Text_2A03C1, MSGBOX_DEFAULT register_matchcall TRAINER_FERNANDO_1 diff --git a/data/maps/Route124/scripts.inc b/data/maps/Route124/scripts.inc index 9a11cec2c6..ed6bc1ff02 100644 --- a/data/maps/Route124/scripts.inc +++ b/data/maps/Route124/scripts.inc @@ -30,7 +30,7 @@ Route124_EventScript_1F65B3:: @ 81F65B3 end Route124_EventScript_1F65DF:: @ 81F65DF - special sub_80B4808 + special PlayerFaceTrainerAfterBattle waitmovement 0 msgbox Route124_Text_2A0C14, MSGBOX_DEFAULT register_matchcall TRAINER_JENNY_1 diff --git a/data/maps/Route125/scripts.inc b/data/maps/Route125/scripts.inc index 62b66e3a6a..13fe6dc8f4 100644 --- a/data/maps/Route125/scripts.inc +++ b/data/maps/Route125/scripts.inc @@ -55,7 +55,7 @@ Route125_EventScript_1F6800:: @ 81F6800 end Route125_EventScript_1F682C:: @ 81F682C - special sub_80B4808 + special PlayerFaceTrainerAfterBattle waitmovement 0 msgbox Route125_Text_2A17CF, MSGBOX_DEFAULT register_matchcall TRAINER_ERNEST_1 diff --git a/data/maps/Route126/scripts.inc b/data/maps/Route126/scripts.inc index 7a606e0203..640a5660ec 100644 --- a/data/maps/Route126/scripts.inc +++ b/data/maps/Route126/scripts.inc @@ -51,7 +51,7 @@ Route126_EventScript_1F6977:: @ 81F6977 end Route126_EventScript_1F69A3:: @ 81F69A3 - special sub_80B4808 + special PlayerFaceTrainerAfterBattle waitmovement 0 msgbox Route126_Text_2A1F5A, MSGBOX_DEFAULT register_matchcall TRAINER_PABLO_1 diff --git a/data/maps/Route127/scripts.inc b/data/maps/Route127/scripts.inc index fcc666ec60..33c833e328 100644 --- a/data/maps/Route127/scripts.inc +++ b/data/maps/Route127/scripts.inc @@ -70,7 +70,7 @@ Route127_EventScript_1F6AD6:: @ 81F6AD6 end Route127_EventScript_1F6B02:: @ 81F6B02 - special sub_80B4808 + special PlayerFaceTrainerAfterBattle waitmovement 0 msgbox Route127_Text_2A26EE, MSGBOX_DEFAULT register_matchcall TRAINER_KOJI_1 diff --git a/data/maps/Route128/scripts.inc b/data/maps/Route128/scripts.inc index a19c0edf92..6cd398a32d 100644 --- a/data/maps/Route128/scripts.inc +++ b/data/maps/Route128/scripts.inc @@ -184,7 +184,7 @@ Route128_EventScript_1F6CBE:: @ 81F6CBE end Route128_EventScript_1F6CEA:: @ 81F6CEA - special sub_80B4808 + special PlayerFaceTrainerAfterBattle waitmovement 0 msgbox Route128_Text_2A2916, MSGBOX_DEFAULT register_matchcall TRAINER_ISAIAH_1 @@ -206,7 +206,7 @@ Route128_EventScript_1F6D20:: @ 81F6D20 end Route128_EventScript_1F6D4C:: @ 81F6D4C - special sub_80B4808 + special PlayerFaceTrainerAfterBattle waitmovement 0 msgbox Route128_Text_2A2AF9, MSGBOX_DEFAULT register_matchcall TRAINER_KATELYN_1 diff --git a/data/maps/SeafloorCavern_Room1/map.json b/data/maps/SeafloorCavern_Room1/map.json index 88db72b4ab..a4849023ae 100644 --- a/data/maps/SeafloorCavern_Room1/map.json +++ b/data/maps/SeafloorCavern_Room1/map.json @@ -63,7 +63,7 @@ "movement_range_y": 1, "trainer_type": "1", "trainer_sight_or_berry_tree_id": "2", - "script": "SeafloorCavern_Room1_EventScript_2347EC", + "script": "SeafloorCavern_Room1_EventScript_Grunt5", "flag": "FLAG_HIDE_SEAFLOOR_CAVERN_AQUA_GRUNTS" }, { @@ -76,7 +76,7 @@ "movement_range_y": 1, "trainer_type": "1", "trainer_sight_or_berry_tree_id": "3", - "script": "SeafloorCavern_Room1_EventScript_234803", + "script": "SeafloorCavern_Room1_EventScript_Grunt6", "flag": "FLAG_HIDE_SEAFLOOR_CAVERN_AQUA_GRUNTS" } ], diff --git a/data/maps/SeafloorCavern_Room1/scripts.inc b/data/maps/SeafloorCavern_Room1/scripts.inc index 92049e8ef3..375797d7bc 100644 --- a/data/maps/SeafloorCavern_Room1/scripts.inc +++ b/data/maps/SeafloorCavern_Room1/scripts.inc @@ -1,35 +1,35 @@ SeafloorCavern_Room1_MapScripts:: @ 82347EB .byte 0 -SeafloorCavern_Room1_EventScript_2347EC:: @ 82347EC - trainerbattle_single TRAINER_GRUNT_5, SeafloorCavern_Room1_Text_23481A, SeafloorCavern_Room1_Text_23484A - msgbox SeafloorCavern_Room1_Text_23485D, MSGBOX_AUTOCLOSE +SeafloorCavern_Room1_EventScript_Grunt5:: @ 82347EC + trainerbattle_single TRAINER_GRUNT_5, SeafloorCavern_Room1_Text_Grunt5Intro, SeafloorCavern_Room1_Text_Grunt5Defeat + msgbox SeafloorCavern_Room1_Text_Grunt5PostBattle, MSGBOX_AUTOCLOSE end -SeafloorCavern_Room1_EventScript_234803:: @ 8234803 - trainerbattle_single TRAINER_GRUNT_6, SeafloorCavern_Room1_Text_234898, SeafloorCavern_Room1_Text_2348CD - msgbox SeafloorCavern_Room1_Text_2348E3, MSGBOX_AUTOCLOSE +SeafloorCavern_Room1_EventScript_Grunt6:: @ 8234803 + trainerbattle_single TRAINER_GRUNT_6, SeafloorCavern_Room1_Text_Grunt6Intro, SeafloorCavern_Room1_Text_Grunt6Defeat + msgbox SeafloorCavern_Room1_Text_Grunt6PostBattle, MSGBOX_AUTOCLOSE end -SeafloorCavern_Room1_Text_23481A: @ 823481A +SeafloorCavern_Room1_Text_Grunt5Intro: @ 823481A .string "We don't need a kid around!\n" .string "Go on home already!$" -SeafloorCavern_Room1_Text_23484A: @ 823484A +SeafloorCavern_Room1_Text_Grunt5Defeat: @ 823484A .string "I want to go home…$" -SeafloorCavern_Room1_Text_23485D: @ 823485D +SeafloorCavern_Room1_Text_Grunt5PostBattle: @ 823485D .string "I want to get a promotion so I can\n" .string "boss around the GRUNTS…$" -SeafloorCavern_Room1_Text_234898: @ 8234898 +SeafloorCavern_Room1_Text_Grunt6Intro: @ 8234898 .string "That submarine… It's tiny inside.\n" .string "I'm sore all over!$" -SeafloorCavern_Room1_Text_2348CD: @ 82348CD +SeafloorCavern_Room1_Text_Grunt6Defeat: @ 82348CD .string "Losing makes me sore!$" -SeafloorCavern_Room1_Text_2348E3: @ 82348E3 +SeafloorCavern_Room1_Text_Grunt6PostBattle: @ 82348E3 .string "That submarine we jacked, man,\n" .string "it's brutal as a ride.\l" .string "It's way too tight in there!$" diff --git a/data/maps/SeafloorCavern_Room3/map.json b/data/maps/SeafloorCavern_Room3/map.json index 2a33c44cf3..3a0d2afb76 100644 --- a/data/maps/SeafloorCavern_Room3/map.json +++ b/data/maps/SeafloorCavern_Room3/map.json @@ -115,7 +115,7 @@ "movement_range_y": 1, "trainer_type": "1", "trainer_sight_or_berry_tree_id": "6", - "script": "SeafloorCavern_Room3_EventScript_234938", + "script": "SeafloorCavern_Room3_EventScript_Shelly", "flag": "FLAG_HIDE_SEAFLOOR_CAVERN_AQUA_GRUNTS" }, { @@ -128,7 +128,7 @@ "movement_range_y": 1, "trainer_type": "1", "trainer_sight_or_berry_tree_id": "4", - "script": "SeafloorCavern_Room3_EventScript_23494F", + "script": "SeafloorCavern_Room3_EventScript_Grunt27", "flag": "FLAG_HIDE_SEAFLOOR_CAVERN_AQUA_GRUNTS" } ], diff --git a/data/maps/SeafloorCavern_Room3/scripts.inc b/data/maps/SeafloorCavern_Room3/scripts.inc index 40913f4077..c3cbff28d8 100644 --- a/data/maps/SeafloorCavern_Room3/scripts.inc +++ b/data/maps/SeafloorCavern_Room3/scripts.inc @@ -1,17 +1,17 @@ SeafloorCavern_Room3_MapScripts:: @ 8234937 .byte 0 -SeafloorCavern_Room3_EventScript_234938:: @ 8234938 - trainerbattle_single TRAINER_SHELLY_2, SeafloorCavern_Room3_Text_234966, SeafloorCavern_Room3_Text_234A79 - msgbox SeafloorCavern_Room3_Text_234A8A, MSGBOX_AUTOCLOSE +SeafloorCavern_Room3_EventScript_Shelly:: @ 8234938 + trainerbattle_single TRAINER_SHELLY_2, SeafloorCavern_Room3_Text_ShellyIntro, SeafloorCavern_Room3_Text_ShellyDefeat + msgbox SeafloorCavern_Room3_Text_ShellyPostBattle, MSGBOX_AUTOCLOSE end -SeafloorCavern_Room3_EventScript_23494F:: @ 823494F - trainerbattle_single TRAINER_GRUNT_27, SeafloorCavern_Room3_Text_234B3A, SeafloorCavern_Room3_Text_234BFE - msgbox SeafloorCavern_Room3_Text_234C04, MSGBOX_AUTOCLOSE +SeafloorCavern_Room3_EventScript_Grunt27:: @ 823494F + trainerbattle_single TRAINER_GRUNT_27, SeafloorCavern_Room3_Text_Grunt27Intro, SeafloorCavern_Room3_Text_Grunt27Defeat + msgbox SeafloorCavern_Room3_Text_Grunt27PostBattle, MSGBOX_AUTOCLOSE end -SeafloorCavern_Room3_Text_234966: @ 8234966 +SeafloorCavern_Room3_Text_ShellyIntro: @ 8234966 .string "Ahahahaha!\p" .string "How did you manage to get here without\n" .string "a submarine?\l" @@ -23,11 +23,11 @@ SeafloorCavern_Room3_Text_234966: @ 8234966 .string "I'm going to give you a little taste\n" .string "of pain! Resign yourself to it!$" -SeafloorCavern_Room3_Text_234A79: @ 8234A79 +SeafloorCavern_Room3_Text_ShellyDefeat: @ 8234A79 .string "Ahahahaha!\p" .string "Ouch!$" -SeafloorCavern_Room3_Text_234A8A: @ 8234A8A +SeafloorCavern_Room3_Text_ShellyPostBattle: @ 8234A8A .string "Ahahahaha!\n" .string "You're so darn strong.\p" .string "It's terribly disappointing that you're\n" @@ -36,7 +36,7 @@ SeafloorCavern_Room3_Text_234A8A: @ 8234A8A .string "world our BOSS has promised as\l" .string "one of us…$" -SeafloorCavern_Room3_Text_234B3A: @ 8234B3A +SeafloorCavern_Room3_Text_Grunt27Intro: @ 8234B3A .string "For our dream to become real, we need\n" .string "the power of POKéMON.\p" .string "But meddlers like you use the power of\n" @@ -45,10 +45,10 @@ SeafloorCavern_Room3_Text_234B3A: @ 8234B3A .string "Life just doesn't work the way we\n" .string "need it to!$" -SeafloorCavern_Room3_Text_234BFE: @ 8234BFE +SeafloorCavern_Room3_Text_Grunt27Defeat: @ 8234BFE .string "Gwah!$" -SeafloorCavern_Room3_Text_234C04: @ 8234C04 +SeafloorCavern_Room3_Text_Grunt27PostBattle: @ 8234C04 .string "You know, we don't dare question\n" .string "the motives of our leader.\p" .string "But here you are, just some punk,\n" diff --git a/data/maps/SeafloorCavern_Room4/map.json b/data/maps/SeafloorCavern_Room4/map.json index 0638ab4ed3..7bd919eaba 100644 --- a/data/maps/SeafloorCavern_Room4/map.json +++ b/data/maps/SeafloorCavern_Room4/map.json @@ -24,7 +24,7 @@ "movement_range_y": 1, "trainer_type": "1", "trainer_sight_or_berry_tree_id": "3", - "script": "SeafloorCavern_Room4_EventScript_234C9C", + "script": "SeafloorCavern_Room4_EventScript_Grunt7", "flag": "FLAG_HIDE_SEAFLOOR_CAVERN_AQUA_GRUNTS" }, { @@ -37,7 +37,7 @@ "movement_range_y": 1, "trainer_type": "1", "trainer_sight_or_berry_tree_id": "3", - "script": "SeafloorCavern_Room4_EventScript_234CB3", + "script": "SeafloorCavern_Room4_EventScript_Grunt9", "flag": "FLAG_HIDE_SEAFLOOR_CAVERN_AQUA_GRUNTS" } ], diff --git a/data/maps/SeafloorCavern_Room4/scripts.inc b/data/maps/SeafloorCavern_Room4/scripts.inc index 132d24a32d..c647482510 100644 --- a/data/maps/SeafloorCavern_Room4/scripts.inc +++ b/data/maps/SeafloorCavern_Room4/scripts.inc @@ -1,35 +1,35 @@ SeafloorCavern_Room4_MapScripts:: @ 8234C9B .byte 0 -SeafloorCavern_Room4_EventScript_234C9C:: @ 8234C9C - trainerbattle_single TRAINER_GRUNT_7, SeafloorCavern_Room4_Text_234CCA, SeafloorCavern_Room4_Text_234CF3 - msgbox SeafloorCavern_Room4_Text_234CFC, MSGBOX_AUTOCLOSE +SeafloorCavern_Room4_EventScript_Grunt7:: @ 8234C9C + trainerbattle_single TRAINER_GRUNT_7, SeafloorCavern_Room4_Text_Grunt7Intro, SeafloorCavern_Room4_Text_Grunt7Defeat + msgbox SeafloorCavern_Room4_Text_Grunt7PostBattle, MSGBOX_AUTOCLOSE end -SeafloorCavern_Room4_EventScript_234CB3:: @ 8234CB3 - trainerbattle_single TRAINER_GRUNT_9, SeafloorCavern_Room4_Text_234D3A, SeafloorCavern_Room4_Text_234D68 - msgbox SeafloorCavern_Room4_Text_234D79, MSGBOX_AUTOCLOSE +SeafloorCavern_Room4_EventScript_Grunt9:: @ 8234CB3 + trainerbattle_single TRAINER_GRUNT_9, SeafloorCavern_Room4_Text_Grunt9Intro, SeafloorCavern_Room4_Text_Grunt9Defeat + msgbox SeafloorCavern_Room4_Text_Grunt9PostBattle, MSGBOX_AUTOCLOSE end -SeafloorCavern_Room4_Text_234CCA: @ 8234CCA +SeafloorCavern_Room4_Text_Grunt7Intro: @ 8234CCA .string "Who are you?\n" .string "Where did you come in from?$" -SeafloorCavern_Room4_Text_234CF3: @ 8234CF3 +SeafloorCavern_Room4_Text_Grunt7Defeat: @ 8234CF3 .string "Lost it…$" -SeafloorCavern_Room4_Text_234CFC: @ 8234CFC +SeafloorCavern_Room4_Text_Grunt7PostBattle: @ 8234CFC .string "I can't find the way out!\p" .string "I'm not afraid. Don't get me wrong!$" -SeafloorCavern_Room4_Text_234D3A: @ 8234D3A +SeafloorCavern_Room4_Text_Grunt9Intro: @ 8234D3A .string "Who are you?\n" .string "Where do you think you're going?$" -SeafloorCavern_Room4_Text_234D68: @ 8234D68 +SeafloorCavern_Room4_Text_Grunt9Defeat: @ 8234D68 .string "I failed to win!$" -SeafloorCavern_Room4_Text_234D79: @ 8234D79 +SeafloorCavern_Room4_Text_Grunt9PostBattle: @ 8234D79 .string "My partner forgot the map in that\n" .string "submarine!\p" .string "How's that for being useless?$" diff --git a/data/maps/SeafloorCavern_Room9/map.json b/data/maps/SeafloorCavern_Room9/map.json index 77dcdc1697..9a2ab1d3ec 100644 --- a/data/maps/SeafloorCavern_Room9/map.json +++ b/data/maps/SeafloorCavern_Room9/map.json @@ -123,7 +123,7 @@ "elevation": 3, "var": "VAR_SEAFLOOR_CAVERN_STATE", "var_value": "0", - "script": "SeafloorCavern_Room9_EventScript_234DC9" + "script": "SeafloorCavern_Room9_EventScript_ArchieAwakenKyogre" } ], "bg_events": [] diff --git a/data/maps/SeafloorCavern_Room9/scripts.inc b/data/maps/SeafloorCavern_Room9/scripts.inc index 026c29700a..68db475cd9 100644 --- a/data/maps/SeafloorCavern_Room9/scripts.inc +++ b/data/maps/SeafloorCavern_Room9/scripts.inc @@ -1,38 +1,38 @@ SeafloorCavern_Room9_MapScripts:: @ 8234DC8 .byte 0 -SeafloorCavern_Room9_EventScript_234DC9:: @ 8234DC9 +SeafloorCavern_Room9_EventScript_ArchieAwakenKyogre:: @ 8234DC9 lockall - setvar VAR_0x8004, 2 - setvar VAR_0x8005, 3 - setvar VAR_0x8006, 4 - setvar VAR_0x8007, 5 + setvar VAR_0x8004, 2 @ Archie + setvar VAR_0x8005, 3 @ Maxie + setvar VAR_0x8006, 4 @ Magma grunt 1 + setvar VAR_0x8007, 5 @ Magma grunt 2 applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceFastestUp waitmovement 0 - applymovement EVENT_OBJ_ID_PLAYER, SeafloorCavern_Room9_Movement_23505C + applymovement EVENT_OBJ_ID_PLAYER, SeafloorCavern_Room9_Movement_Delay32 waitmovement 0 playbgm MUS_AQA_0, 0 - msgbox SeafloorCavern_Room9_Text_23505F, MSGBOX_DEFAULT + msgbox SeafloorCavern_Room9_Text_ArchieHoldItRightThere, MSGBOX_DEFAULT closemessage addobject VAR_0x8004 applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceFastestLeft waitmovement 0 - applymovement VAR_0x8004, SeafloorCavern_Room9_Movement_23502A + applymovement VAR_0x8004, SeafloorCavern_Room9_Movement_ArchieApproachPlayer waitmovement 0 - msgbox SeafloorCavern_Room9_Text_23507C, MSGBOX_DEFAULT + msgbox SeafloorCavern_Room9_Text_ArchieSoItWasYou, MSGBOX_DEFAULT applymovement VAR_0x8004, Common_Movement_WalkInPlaceFastestUp waitmovement 0 - msgbox SeafloorCavern_Room9_Text_2350A6, MSGBOX_DEFAULT + msgbox SeafloorCavern_Room9_Text_ArchieBeholdKyogre, MSGBOX_DEFAULT applymovement VAR_0x8004, Common_Movement_FacePlayer waitmovement 0 - msgbox SeafloorCavern_Room9_Text_23512C, MSGBOX_DEFAULT - trainerbattle_no_intro TRAINER_ARCHIE, SeafloorCavern_Room9_Text_2351BC - msgbox SeafloorCavern_Room9_Text_2351E5, MSGBOX_DEFAULT + msgbox SeafloorCavern_Room9_Text_ArchieYouMustDisappear, MSGBOX_DEFAULT + trainerbattle_no_intro TRAINER_ARCHIE, SeafloorCavern_Room9_Text_ArchieDefeat + msgbox SeafloorCavern_Room9_Text_ArchieWithThisRedOrb, MSGBOX_DEFAULT setweather WEATHER_NONE doweather special Script_FadeOutMapMusic waitstate - msgbox SeafloorCavern_Room9_Text_235279, MSGBOX_DEFAULT + msgbox SeafloorCavern_Room9_Text_RedOrbShinesByItself, MSGBOX_DEFAULT special WaitWeather waitstate setvar VAR_RESULT, 1 @@ -46,18 +46,18 @@ SeafloorCavern_Room9_EventScript_234DC9:: @ 8234DC9 setvar VAR_RESULT, 0 playfanfare MUS_ME_TAMA playse SE_TAMA - special sub_80B0534 + special DoOrbEffect applymovement VAR_0x8004, Common_Movement_WalkInPlaceFastestUp applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceFastestUp waitmovement 0 delay 150 - removeobject 7 - addobject 1 + removeobject 7 @ sleeping Kyogre + addobject 1 @ awakened Kyogre waitstate delay 60 - applymovement 1, SeafloorCavern_Room9_Movement_235040 + applymovement 1, SeafloorCavern_Room9_Movement_KyogreApproach waitmovement 0 - special sub_80B058C + special FadeOutOrbEffect waitstate setvar VAR_0x8004, 1 @ vertical pan setvar VAR_0x8005, 1 @ horizontal pan @@ -65,7 +65,7 @@ SeafloorCavern_Room9_EventScript_234DC9:: @ 8234DC9 setvar VAR_0x8007, 5 @ shake delay special ShakeCamera waitstate - applymovement 1, SeafloorCavern_Room9_Movement_23504B + applymovement 1, SeafloorCavern_Room9_Movement_KyogreExit waitmovement 0 removeobject 1 delay 4 @@ -80,44 +80,44 @@ SeafloorCavern_Room9_EventScript_234DC9:: @ 8234DC9 setvar VAR_0x8005, 3 setvar VAR_0x8006, 4 setvar VAR_0x8007, 5 - msgbox SeafloorCavern_Room9_Text_2352A7, MSGBOX_DEFAULT + msgbox SeafloorCavern_Room9_Text_ArchieWhereDidKyogreGo, MSGBOX_DEFAULT playse SE_PC_LOGIN applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceFastestLeft waitmovement 0 - msgbox SeafloorCavern_Room9_Text_2352F6, MSGBOX_DEFAULT + msgbox SeafloorCavern_Room9_Text_ArchieAMessageFromOutside, MSGBOX_DEFAULT closemessage - applymovement VAR_0x8004, SeafloorCavern_Room9_Movement_235035 + applymovement VAR_0x8004, SeafloorCavern_Room9_Movement_ArchieListenMessage waitmovement 0 - msgbox SeafloorCavern_Room9_Text_23532B, MSGBOX_DEFAULT + msgbox SeafloorCavern_Room9_Text_ArchieWhatRainingTooHard, MSGBOX_DEFAULT closemessage playse SE_PC_OFF delay 20 applymovement VAR_0x8004, Common_Movement_WalkInPlaceFastestDown waitmovement 0 - msgbox SeafloorCavern_Room9_Text_23546F, MSGBOX_DEFAULT + msgbox SeafloorCavern_Room9_Text_ArchieWhyDidKyogreDisappear, MSGBOX_DEFAULT closemessage addobject VAR_0x8005 addobject VAR_0x8006 addobject VAR_0x8007 - applymovement VAR_0x8007, SeafloorCavern_Room9_Movement_235057 - applymovement VAR_0x8006, SeafloorCavern_Room9_Movement_235057 - applymovement VAR_0x8005, SeafloorCavern_Room9_Movement_23504E + applymovement VAR_0x8007, SeafloorCavern_Room9_Movement_MagmaGruntArrive + applymovement VAR_0x8006, SeafloorCavern_Room9_Movement_MagmaGruntArrive + applymovement VAR_0x8005, SeafloorCavern_Room9_Movement_MaxieArrive waitmovement 0 applymovement VAR_0x8004, Common_Movement_WalkInPlaceFastestLeft waitmovement 0 - msgbox SeafloorCavern_Room9_Text_2354F0, MSGBOX_DEFAULT + msgbox SeafloorCavern_Room9_Text_MaxieWhatHaveYouWrought, MSGBOX_DEFAULT playse SE_PIN applymovement VAR_0x8004, Common_Movement_ExclamationMark waitmovement 0 applymovement VAR_0x8004, Common_Movement_Delay48 waitmovement 0 - msgbox SeafloorCavern_Room9_Text_2355C2, MSGBOX_DEFAULT - msgbox SeafloorCavern_Room9_Text_235692, MSGBOX_DEFAULT + msgbox SeafloorCavern_Room9_Text_ArchieDontGetAllHighAndMighty, MSGBOX_DEFAULT + msgbox SeafloorCavern_Room9_Text_MaxieWeDontHaveTimeToArgue, MSGBOX_DEFAULT closemessage - applymovement VAR_0x8005, SeafloorCavern_Room9_Movement_235054 - applymovement VAR_0x8004, SeafloorCavern_Room9_Movement_23503A + applymovement VAR_0x8005, SeafloorCavern_Room9_Movement_MaxieExit + applymovement VAR_0x8004, SeafloorCavern_Room9_Movement_ArchieExit waitmovement 0 - msgbox SeafloorCavern_Room9_Text_235723, MSGBOX_DEFAULT + msgbox SeafloorCavern_Room9_Text_MaxieComeOnPlayer, MSGBOX_DEFAULT setvar VAR_ROUTE128_STATE, 1 setvar VAR_SOOTOPOLIS_CITY_STATE, 1 clearflag FLAG_HIDE_SOOTOPOLIS_CITY_STEVEN @@ -146,7 +146,7 @@ SeafloorCavern_Room9_EventScript_234DC9:: @ 8234DC9 releaseall end -SeafloorCavern_Room9_Movement_23502A: @ 823502A +SeafloorCavern_Room9_Movement_ArchieApproachPlayer: @ 823502A walk_right walk_right walk_right @@ -156,21 +156,23 @@ SeafloorCavern_Room9_Movement_23502A: @ 823502A walk_right step_end +@ Unused SeafloorCavern_Room9_Movement_235032: @ 8235032 walk_left walk_left step_end -SeafloorCavern_Room9_Movement_235035: @ 8235035 +SeafloorCavern_Room9_Movement_ArchieListenMessage: @ 8235035 walk_left delay_16 step_end +@ Unused SeafloorCavern_Room9_Movement_235038: @ 8235038 walk_right step_end -SeafloorCavern_Room9_Movement_23503A: @ 823503A +SeafloorCavern_Room9_Movement_ArchieExit: @ 823503A face_up lock_facing_direction walk_down @@ -178,7 +180,7 @@ SeafloorCavern_Room9_Movement_23503A: @ 823503A walk_in_place_fastest_right step_end -SeafloorCavern_Room9_Movement_235040: @ 8235040 +SeafloorCavern_Room9_Movement_KyogreApproach: @ 8235040 delay_16 delay_16 walk_slow_down @@ -191,12 +193,12 @@ SeafloorCavern_Room9_Movement_235040: @ 8235040 delay_16 step_end -SeafloorCavern_Room9_Movement_23504B: @ 823504B +SeafloorCavern_Room9_Movement_KyogreExit: @ 823504B slide_up slide_up step_end -SeafloorCavern_Room9_Movement_23504E: @ 823504E +SeafloorCavern_Room9_Movement_MaxieArrive: @ 823504E walk_fast_right walk_fast_right walk_fast_right @@ -204,49 +206,49 @@ SeafloorCavern_Room9_Movement_23504E: @ 823504E walk_fast_right step_end -SeafloorCavern_Room9_Movement_235054: @ 8235054 +SeafloorCavern_Room9_Movement_MaxieExit: @ 8235054 walk_right walk_right step_end -SeafloorCavern_Room9_Movement_235057: @ 8235057 +SeafloorCavern_Room9_Movement_MagmaGruntArrive: @ 8235057 walk_fast_right walk_fast_right walk_fast_right walk_fast_right step_end -SeafloorCavern_Room9_Movement_23505C: @ 823505C +SeafloorCavern_Room9_Movement_Delay32: @ 823505C delay_16 delay_16 step_end -SeafloorCavern_Room9_Text_23505F: @ 823505F +SeafloorCavern_Room9_Text_ArchieHoldItRightThere: @ 823505F .string "ARCHIE: Hold it right there.$" -SeafloorCavern_Room9_Text_23507C: @ 823507C +SeafloorCavern_Room9_Text_ArchieSoItWasYou: @ 823507C .string "ARCHIE: Fufufu…\n" .string "So it was you, after all.$" -SeafloorCavern_Room9_Text_2350A6: @ 82350A6 +SeafloorCavern_Room9_Text_ArchieBeholdKyogre: @ 82350A6 .string "ARCHIE: Behold!\p" .string "See how beautiful it is, the sleeping\n" .string "form of the ancient POKéMON KYOGRE!\p" .string "I have waited so long for this day to\n" .string "come…$" -SeafloorCavern_Room9_Text_23512C: @ 823512C +SeafloorCavern_Room9_Text_ArchieYouMustDisappear: @ 823512C .string "ARCHIE: It surprises me, how you've\n" .string "managed to chase me here.\p" .string "But that's all over now.\p" .string "For the realization of my dream,\n" .string "you must disappear now!$" -SeafloorCavern_Room9_Text_2351BC: @ 82351BC +SeafloorCavern_Room9_Text_ArchieDefeat: @ 82351BC .string "What?!\n" .string "I lost to a mere child like you?!$" -SeafloorCavern_Room9_Text_2351E5: @ 82351E5 +SeafloorCavern_Room9_Text_ArchieWithThisRedOrb: @ 82351E5 .string "ARCHIE: Fufufu…\p" .string "I commend you. I must recognize that\n" .string "you are truly gifted.\p" @@ -254,21 +256,21 @@ SeafloorCavern_Room9_Text_2351E5: @ 82351E5 .string "I have this in my possession!\p" .string "With this RED ORB, I can make KYOGRE…$" -SeafloorCavern_Room9_Text_235279: @ 8235279 +SeafloorCavern_Room9_Text_RedOrbShinesByItself: @ 8235279 .string "The RED ORB suddenly began shining\n" .string "by itself!$" -SeafloorCavern_Room9_Text_2352A7: @ 82352A7 +SeafloorCavern_Room9_Text_ArchieWhereDidKyogreGo: @ 82352A7 .string "ARCHIE: What?!\p" .string "I didn't do anything.\n" .string "Why did the RED ORB…\p" .string "Where did KYOGRE go?$" -SeafloorCavern_Room9_Text_2352F6: @ 82352F6 +SeafloorCavern_Room9_Text_ArchieAMessageFromOutside: @ 82352F6 .string "ARCHIE: Hm? It's a message from our\n" .string "members outside…$" -SeafloorCavern_Room9_Text_23532B: @ 823532B +SeafloorCavern_Room9_Text_ArchieWhatRainingTooHard: @ 823532B .string "ARCHIE: Yes, what is it?\p" .string "Hm…\n" .string "It's raining heavily?\p" @@ -284,7 +286,7 @@ SeafloorCavern_Room9_Text_23532B: @ 823532B .string "Hold your position and monitor\n" .string "the situation!$" -SeafloorCavern_Room9_Text_23546F: @ 823546F +SeafloorCavern_Room9_Text_ArchieWhyDidKyogreDisappear: @ 823546F .string "ARCHIE: There's something wrong…\p" .string "The RED ORB is supposed to awaken\n" .string "and control KYOGRE…\p" @@ -292,7 +294,7 @@ SeafloorCavern_Room9_Text_23546F: @ 823546F .string "Why did KYOGRE disappear?\p" .string "Why?!$" -SeafloorCavern_Room9_Text_2354F0: @ 82354F0 +SeafloorCavern_Room9_Text_MaxieWhatHaveYouWrought: @ 82354F0 .string "MAXIE: What have you wrought?\p" .string "ARCHIE… You've finally awoken KYOGRE,\n" .string "haven't you?\p" @@ -301,7 +303,7 @@ SeafloorCavern_Room9_Text_2354F0: @ 82354F0 .string "The world's landmass will drown in\n" .string "the deepening sea…$" -SeafloorCavern_Room9_Text_2355C2: @ 82355C2 +SeafloorCavern_Room9_Text_ArchieDontGetAllHighAndMighty: @ 82355C2 .string "ARCHIE: W-what?!\n" .string "Don't get all high and mighty with me!\p" .string "Wasn't it you, TEAM MAGMA, that\n" @@ -310,13 +312,13 @@ SeafloorCavern_Room9_Text_2355C2: @ 82355C2 .string "I should be able to control KYOGRE…\p" .string "I should be able to control it…$" -SeafloorCavern_Room9_Text_235692: @ 8235692 +SeafloorCavern_Room9_Text_MaxieWeDontHaveTimeToArgue: @ 8235692 .string "MAXIE: We don't have the time to\n" .string "argue about it here!\p" .string "Get outside and see for yourself!\p" .string "See if what you've wrought is the\n" .string "world that we desired!$" -SeafloorCavern_Room9_Text_235723: @ 8235723 +SeafloorCavern_Room9_Text_MaxieComeOnPlayer: @ 8235723 .string "MAXIE: {PLAYER}, come on, you have\n" .string "to get out of here, too!$" diff --git a/data/specials.inc b/data/specials.inc index 939284c74f..5017c3dc3b 100644 --- a/data/specials.inc +++ b/data/specials.inc @@ -292,8 +292,8 @@ gSpecials:: @ 81DBA64 def_special GetSecretBaseNearbyMapName def_special CheckRelicanthWailord def_special ShouldDoBrailleRegirockEffectOld - def_special sub_80B0534 - def_special sub_80B058C + def_special DoOrbEffect + def_special FadeOutOrbEffect def_special WaitWeather def_special BufferEReaderTrainerName def_special GetSlotMachineId @@ -527,7 +527,7 @@ gSpecials:: @ 81DBA64 def_special GetBattlePyramidHint def_special sub_80F8B94 def_special ShowTrainerHillRecords - def_special sub_80B4808 + def_special PlayerFaceTrainerAfterBattle def_special ResetHealLocationFromDewford def_special IsLastMonThatKnowsSurf def_special CountPartyAliveNonEggMons diff --git a/include/field_screen_effect.h b/include/field_screen_effect.h index af594611eb..42f077dc32 100644 --- a/include/field_screen_effect.h +++ b/include/field_screen_effect.h @@ -37,8 +37,8 @@ void AnimateFlash(u8 flashLevel); void WriteBattlePyramidViewScanlineEffectBuffer(void); void sub_80B0244(void); void sub_80B0268(void); -void sub_80B0534(void); -void sub_80B058C(void); +void DoOrbEffect(void); +void FadeOutOrbEffect(void); void sub_80B05B4(void); void WriteFlashScanlineEffectBuffer(u8 flashLevel); bool8 walkrun_is_standing_still(void); diff --git a/include/script.h b/include/script.h index cfe4934791..3f92964acd 100644 --- a/include/script.h +++ b/include/script.h @@ -62,6 +62,6 @@ u8 *GetSavedRamScriptIfValid(void); void InitRamScript_NoEventObject(u8 *script, u16 scriptSize); // srccmd.h -void sub_809BE48(u16 npcId); +void SetMovingNpcId(u16 npcId); #endif // GUARD_SCRIPT_H diff --git a/include/trainer_see.h b/include/trainer_see.h index a9b92d71ba..daf9d02984 100644 --- a/include/trainer_see.h +++ b/include/trainer_see.h @@ -9,11 +9,11 @@ struct ApproachingTrainer u8 taskId; }; -extern u16 gUnknown_03006080; -extern u8 gUnknown_03006084[4]; +extern u16 gWhichTrainerToFaceAfterBattle; +extern u8 gPostBattleMovementScript[4]; extern struct ApproachingTrainer gApproachingTrainers[2]; extern u8 gNoOfApproachingTrainers; -extern u8 gUnknown_030060AC; +extern bool8 gTrainerApproachedPlayer; extern u8 gApproachingTrainerId; bool8 CheckForTrainersWantingBattle(void); @@ -25,6 +25,6 @@ u8 FldEff_QuestionMarkIcon(void); u8 FldEff_HeartIcon(void); u8 GetCurrentApproachingTrainerEventObjectId(void); u8 GetChosenApproachingTrainerEventObjectId(u8 arrayId); -void sub_80B4808(void); +void PlayerFaceTrainerAfterBattle(void); #endif // GUARD_TRAINER_SEE_H diff --git a/src/battle_setup.c b/src/battle_setup.c index f166c7375c..a978cc24d4 100644 --- a/src/battle_setup.c +++ b/src/battle_setup.c @@ -1288,7 +1288,7 @@ void BattleSetup_StartTrainerBattle(void) sNoOfPossibleTrainerRetScripts = gNoOfApproachingTrainers; gNoOfApproachingTrainers = 0; sShouldCheckTrainerBScript = FALSE; - gUnknown_03006080 = 0; + gWhichTrainerToFaceAfterBattle = 0; gMain.savedCallback = CB2_EndTrainerBattle; if (InBattlePyramid() || InTrainerHillChallenge()) @@ -1391,7 +1391,7 @@ const u8 *BattleSetup_GetTrainerPostBattleScript(void) sShouldCheckTrainerBScript = FALSE; if (sTrainerBBattleScriptRetAddr != NULL) { - gUnknown_03006080 = 1; + gWhichTrainerToFaceAfterBattle = 1; return sTrainerBBattleScriptRetAddr; } } @@ -1399,7 +1399,7 @@ const u8 *BattleSetup_GetTrainerPostBattleScript(void) { if (sTrainerABattleScriptRetAddr != NULL) { - gUnknown_03006080 = 0; + gWhichTrainerToFaceAfterBattle = 0; return sTrainerABattleScriptRetAddr; } } diff --git a/src/field_screen_effect.c b/src/field_screen_effect.c index e05950be03..1edb775bae 100644 --- a/src/field_screen_effect.c +++ b/src/field_screen_effect.c @@ -34,7 +34,7 @@ #include "event_obj_lock.h" #include "fldeff.h" -extern const u16 gUnknown_82EC7CC[]; +extern const u16 gOrbEffectBackgroundLayerFlags[]; // This file's functions. static void sub_8080B9C(u8); @@ -800,7 +800,7 @@ static void SetFlashScanlineEffectWindowBoundaries(u16 *dest, s32 centerX, s32 c } } -static void SetFlash2ScanlineEffectWindowBoundary(u16 *dest, u32 y, s32 left, s32 right) +static void SetOrbFlashScanlineEffectWindowBoundary(u16 *dest, u32 y, s32 left, s32 right) { if (y <= 160) { @@ -816,17 +816,17 @@ static void SetFlash2ScanlineEffectWindowBoundary(u16 *dest, u32 y, s32 left, s3 } } -static void SetFlash2ScanlineEffectWindowBoundaries(u16 *dest, s32 centerX, s32 centerY, s32 radius) +static void SetOrbFlashScanlineEffectWindowBoundaries(u16 *dest, s32 centerX, s32 centerY, s32 radius) { s32 r = radius; s32 v2 = radius; s32 v3 = 0; while (r >= v3) { - SetFlash2ScanlineEffectWindowBoundary(dest, centerY - v3, centerX - r, centerX + r); - SetFlash2ScanlineEffectWindowBoundary(dest, centerY + v3, centerX - r, centerX + r); - SetFlash2ScanlineEffectWindowBoundary(dest, centerY - r, centerX - v3, centerX + v3); - SetFlash2ScanlineEffectWindowBoundary(dest, centerY + r, centerX - v3, centerX + v3); + SetOrbFlashScanlineEffectWindowBoundary(dest, centerY - v3, centerX - r, centerX + r); + SetOrbFlashScanlineEffectWindowBoundary(dest, centerY + v3, centerX - r, centerX + r); + SetOrbFlashScanlineEffectWindowBoundary(dest, centerY - r, centerX - v3, centerX + v3); + SetOrbFlashScanlineEffectWindowBoundary(dest, centerY + r, centerX - v3, centerX + v3); v2 -= (v3 * 2) - 1; v3++; if (v2 < 0) @@ -878,18 +878,18 @@ static void UpdateFlashLevelEffect(u8 taskId) } } -static void UpdateFlash2LevelEffect(u8 taskId) +static void UpdateOrbFlashEffect(u8 taskId) { s16 *data = gTasks[taskId].data; switch (data[0]) { case 0: - SetFlash2ScanlineEffectWindowBoundaries(gScanlineEffectRegBuffers[gScanlineEffect.srcBuffer], tFlashCenterX, tFlashCenterY, tCurFlashRadius); + SetOrbFlashScanlineEffectWindowBoundaries(gScanlineEffectRegBuffers[gScanlineEffect.srcBuffer], tFlashCenterX, tFlashCenterY, tCurFlashRadius); data[0] = 1; break; case 1: - SetFlash2ScanlineEffectWindowBoundaries(gScanlineEffectRegBuffers[gScanlineEffect.srcBuffer], tFlashCenterX, tFlashCenterY, tCurFlashRadius); + SetOrbFlashScanlineEffectWindowBoundaries(gScanlineEffectRegBuffers[gScanlineEffect.srcBuffer], tFlashCenterX, tFlashCenterY, tCurFlashRadius); data[0] = 0; tCurFlashRadius += tFlashRadiusDelta; if (tCurFlashRadius > tDestFlashRadius) @@ -948,7 +948,7 @@ static u8 sub_80AFFDC(s32 centerX, s32 centerY, s32 initialFlashRadius, s32 dest static u8 sub_80B003C(s32 centerX, s32 centerY, s32 initialFlashRadius, s32 destFlashRadius, s32 clearScanlineEffect, u8 delta) { - u8 taskId = CreateTask(UpdateFlash2LevelEffect, 80); + u8 taskId = CreateTask(UpdateOrbFlashEffect, 80); s16 *data = gTasks[taskId].data; tCurFlashRadius = initialFlashRadius; @@ -1063,12 +1063,12 @@ void sub_80B0268(void) CreateTask(sub_80B01BC, 10); } -static void sub_80B028C(u8 a1) +static void LoadOrbEffectPalette(bool8 blueOrb) { int i; u16 color[1]; - if (!a1) + if (!blueOrb) color[0] = RGB_RED; else color[0] = RGB_BLUE; @@ -1079,12 +1079,12 @@ static void sub_80B028C(u8 a1) } } -static bool8 sub_80B02C8(u16 a1) +static bool8 sub_80B02C8(u16 shakeDir) { u8 lo = REG_BLDALPHA & 0xFF; u8 hi = REG_BLDALPHA >> 8; - if (a1) + if (shakeDir != 0) { if (lo) { @@ -1107,58 +1107,69 @@ static bool8 sub_80B02C8(u16 a1) return FALSE; } -static void sub_80B0318(u8 taskId) +#define tState data[0] +#define tBlueOrb data[1] +#define tCenterX data[2] +#define tCenterY data[3] +#define tShakeDelay data[4] +#define tShakeDir data[5] +#define tDispCnt data[6] +#define tBldCnt data[7] +#define tBldAlpha data[8] +#define tWinIn data[9] +#define tWinOut data[10] + +static void Task_OrbEffect(u8 taskId) { s16 *data = gTasks[taskId].data; - switch (data[0]) + switch (tState) { case 0: - data[6] = REG_DISPCNT; - data[7] = REG_BLDCNT; - data[8] = REG_BLDALPHA; - data[9] = REG_WININ; - data[10] = REG_WINOUT; + tDispCnt = REG_DISPCNT; + tBldCnt = REG_BLDCNT; + tBldAlpha = REG_BLDALPHA; + tWinIn = REG_WININ; + tWinOut = REG_WINOUT; ClearGpuRegBits(REG_OFFSET_DISPCNT, DISPCNT_WIN1_ON); - SetGpuRegBits(REG_OFFSET_BLDCNT, gUnknown_82EC7CC[0]); + SetGpuRegBits(REG_OFFSET_BLDCNT, gOrbEffectBackgroundLayerFlags[0]); SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(12, 7)); SetGpuReg(REG_OFFSET_WININ, WININ_WIN0_BG_ALL | WININ_WIN0_OBJ | WININ_WIN0_CLR); SetGpuReg(REG_OFFSET_WINOUT, WINOUT_WIN01_BG1 | WINOUT_WIN01_BG2 | WINOUT_WIN01_BG3 | WINOUT_WIN01_OBJ); SetBgTilemapPalette(0, 0, 0, 0x1E, 0x14, 0xF); schedule_bg_copy_tilemap_to_vram(0); - SetFlash2ScanlineEffectWindowBoundaries(&gScanlineEffectRegBuffers[0][0], data[2], data[3], 1); + SetOrbFlashScanlineEffectWindowBoundaries(&gScanlineEffectRegBuffers[0][0], tCenterX, tCenterY, 1); CpuFastSet(&gScanlineEffectRegBuffers[0], &gScanlineEffectRegBuffers[1], 480); ScanlineEffect_SetParams(sFlashEffectParams); - data[0] = 1; + tState = 1; break; case 1: sub_8199DF0(0, PIXEL_FILL(1), 0, 1); - sub_80B028C(data[1]); - sub_80B003C(data[2], data[3], 1, 160, 1, 2); - data[0] = 2; + LoadOrbEffectPalette(tBlueOrb); + sub_80B003C(tCenterX, tCenterY, 1, 160, 1, 2); + tState = 2; break; case 2: - if (!FuncIsActiveTask(UpdateFlash2LevelEffect)) + if (!FuncIsActiveTask(UpdateOrbFlashEffect)) { EnableBothScriptContexts(); - data[0] = 3; + tState = 3; } break; case 3: InstallCameraPanAheadCallback(); SetCameraPanningCallback(NULL); - data[5] = 0; - data[4] = 4; - data[0] = 4; + tShakeDir = 0; + tShakeDelay = 4; + tState = 4; break; case 4: - data[4]--; - if (!data[4]) + if (--tShakeDelay == 0) { s32 panning; - data[4] = 4; - data[5] ^= 1; - if (data[5]) + tShakeDelay = 4; + tShakeDir ^= 1; + if (tShakeDir) panning = 4; else panning = -4; @@ -1167,70 +1178,81 @@ static void sub_80B0318(u8 taskId) break; case 6: InstallCameraPanAheadCallback(); - data[4] = 8; - data[0] = 7; + tShakeDelay = 8; + tState = 7; break; case 7: - data[4]--; - if (!data[4]) + if (--tShakeDelay == 0) { - data[4] = 8; - data[5] ^= 1; - if (sub_80B02C8(data[5]) == TRUE) + tShakeDelay = 8; + tShakeDir ^= 1; + if (sub_80B02C8(tShakeDir) == TRUE) { - data[0] = 5; + tState = 5; sub_8199DF0(0, PIXEL_FILL(0), 0, 1); } } break; case 5: SetGpuReg(REG_OFFSET_WIN0H, 255); - SetGpuReg(REG_OFFSET_DISPCNT, data[6]); - SetGpuReg(REG_OFFSET_BLDCNT, data[7]); - SetGpuReg(REG_OFFSET_BLDALPHA, data[8]); - SetGpuReg(REG_OFFSET_WININ, data[9]); - SetGpuReg(REG_OFFSET_WINOUT, data[10]); + SetGpuReg(REG_OFFSET_DISPCNT, tDispCnt); + SetGpuReg(REG_OFFSET_BLDCNT, tBldCnt); + SetGpuReg(REG_OFFSET_BLDALPHA, tBldAlpha); + SetGpuReg(REG_OFFSET_WININ, tWinIn); + SetGpuReg(REG_OFFSET_WINOUT, tWinOut); EnableBothScriptContexts(); DestroyTask(taskId); break; } } -void sub_80B0534(void) +void DoOrbEffect(void) { - u8 taskId = CreateTask(sub_80B0318, 80); + u8 taskId = CreateTask(Task_OrbEffect, 80); s16 *data = gTasks[taskId].data; if (gSpecialVar_Result == 0) { - data[1] = 0; - data[2] = 104; + tBlueOrb = FALSE; + tCenterX = 104; } else if (gSpecialVar_Result == 1) { - data[1] = 1; - data[2] = 136; + tBlueOrb = TRUE; + tCenterX = 136; } else if (gSpecialVar_Result == 2) { - data[1] = 0; - data[2] = 120; + tBlueOrb = FALSE; + tCenterX = 120; } else { - data[1] = 1; - data[2] = 120; + tBlueOrb = TRUE; + tCenterX = 120; } - data[3] = 80; + tCenterY = 80; } -void sub_80B058C(void) +void FadeOutOrbEffect(void) { - u8 taskId = FindTaskIdByFunc(sub_80B0318); - gTasks[taskId].data[0] = 6; + u8 taskId = FindTaskIdByFunc(Task_OrbEffect); + gTasks[taskId].tState = 6; } +#undef tState +#undef tBlueOrb +#undef tCenterX +#undef tCenterY +#undef tShakeDelay +#undef tShakeDir +#undef tDispCnt +#undef tBldCnt +#undef tBldAlpha +#undef tWinIn +#undef tWinOut + void Script_FadeOutMapMusic(void) { Overworld_FadeOutMapMusic(); diff --git a/src/scrcmd.c b/src/scrcmd.c index ef18fcaf0a..610547dd8e 100644 --- a/src/scrcmd.c +++ b/src/scrcmd.c @@ -2280,7 +2280,7 @@ bool8 ScrCmd_buffertrainername(struct ScriptContext *ctx) return FALSE; } -void sub_809BE48(u16 npcId) +void SetMovingNpcId(u16 npcId) { sMovingNpcId = npcId; } diff --git a/src/trainer_see.c b/src/trainer_see.c index 22b256a995..72e9037285 100644 --- a/src/trainer_see.c +++ b/src/trainer_see.c @@ -14,6 +14,7 @@ #include "util.h" #include "battle_pyramid.h" #include "constants/battle_setup.h" +#include "constants/event_objects.h" #include "constants/event_object_movement_constants.h" #include "constants/field_effects.h" @@ -47,11 +48,11 @@ static bool8 WaitRevealHiddenTrainer(u8 taskId, struct Task *task, struct EventO static void SpriteCB_TrainerIcons(struct Sprite *sprite); // IWRAM common -u16 gUnknown_03006080; -u8 gUnknown_03006084[4]; +u16 gWhichTrainerToFaceAfterBattle; +u8 gPostBattleMovementScript[4]; struct ApproachingTrainer gApproachingTrainers[2]; u8 gNoOfApproachingTrainers; -u8 gUnknown_030060AC; +bool8 gTrainerApproachedPlayer; // EWRAM EWRAM_DATA u8 gApproachingTrainerId = 0; @@ -205,7 +206,7 @@ bool8 CheckForTrainersWantingBattle(void) ResetTrainerOpponentIds(); ConfigureAndSetUpOneTrainerBattle(gApproachingTrainers[gNoOfApproachingTrainers - 1].eventObjectId, gApproachingTrainers[gNoOfApproachingTrainers - 1].trainerScriptPtr); - gUnknown_030060AC = 1; + gTrainerApproachedPlayer = TRUE; return TRUE; } else if (gNoOfApproachingTrainers == 2) @@ -218,12 +219,12 @@ bool8 CheckForTrainersWantingBattle(void) } SetUpTwoTrainersBattle(); gApproachingTrainerId = 0; - gUnknown_030060AC = 1; + gTrainerApproachedPlayer = TRUE; return TRUE; } else { - gUnknown_030060AC = 0; + gTrainerApproachedPlayer = FALSE; return FALSE; } } @@ -764,24 +765,24 @@ u8 GetChosenApproachingTrainerEventObjectId(u8 arrayId) return gApproachingTrainers[1].eventObjectId; } -void sub_80B4808(void) +void PlayerFaceTrainerAfterBattle(void) { - struct EventObject *trainerObj; + struct EventObject *eventObj; - if (gUnknown_030060AC == 1) + if (gTrainerApproachedPlayer == TRUE) { - trainerObj = &gEventObjects[gApproachingTrainers[gUnknown_03006080].eventObjectId]; - gUnknown_03006084[0] = GetFaceDirectionMovementAction(GetOppositeDirection(trainerObj->facingDirection)); - gUnknown_03006084[1] = 0xFE; - ScriptMovement_StartObjectMovementScript(0xFF, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, gUnknown_03006084); + eventObj = &gEventObjects[gApproachingTrainers[gWhichTrainerToFaceAfterBattle].eventObjectId]; + gPostBattleMovementScript[0] = GetFaceDirectionMovementAction(GetOppositeDirection(eventObj->facingDirection)); + gPostBattleMovementScript[1] = MOVEMENT_ACTION_STEP_END; + ScriptMovement_StartObjectMovementScript(EVENT_OBJ_ID_PLAYER, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, gPostBattleMovementScript); } else { - trainerObj = &gEventObjects[gPlayerAvatar.eventObjectId]; - gUnknown_03006084[0] = GetFaceDirectionMovementAction(trainerObj->facingDirection); - gUnknown_03006084[1] = 0xFE; - ScriptMovement_StartObjectMovementScript(0xFF, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, gUnknown_03006084); + eventObj = &gEventObjects[gPlayerAvatar.eventObjectId]; + gPostBattleMovementScript[0] = GetFaceDirectionMovementAction(eventObj->facingDirection); + gPostBattleMovementScript[1] = MOVEMENT_ACTION_STEP_END; + ScriptMovement_StartObjectMovementScript(EVENT_OBJ_ID_PLAYER, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, gPostBattleMovementScript); } - sub_809BE48(0xFF); + SetMovingNpcId(EVENT_OBJ_ID_PLAYER); } From 5f1fcdd0234d07b54637db05a4e7d658e89e4531 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Fri, 1 Nov 2019 17:50:54 -0400 Subject: [PATCH 42/46] Document aqua/magma area scripts --- data/maps/JaggedPass/map.json | 22 +- data/maps/JaggedPass/scripts.inc | 148 +++---- data/maps/MossdeepCity_Gym/scripts.inc | 2 +- .../maps/MossdeepCity_SpaceCenter_1F/map.json | 24 +- .../MossdeepCity_SpaceCenter_1F/scripts.inc | 253 ++++++------ .../maps/MossdeepCity_SpaceCenter_2F/map.json | 18 +- .../MossdeepCity_SpaceCenter_2F/scripts.inc | 271 ++++++------- data/maps/MtChimney/map.json | 64 +-- data/maps/MtChimney/scripts.inc | 377 +++++++++--------- data/maps/MtPyre_Summit/map.json | 24 +- data/maps/MtPyre_Summit/scripts.inc | 325 +++++++-------- .../Route119_WeatherInstitute_1F/map.json | 18 +- .../Route119_WeatherInstitute_1F/scripts.inc | 78 ++-- .../Route119_WeatherInstitute_2F/map.json | 10 +- .../Route119_WeatherInstitute_2F/scripts.inc | 183 +++++---- .../SlateportCity_OceanicMuseum_1F/map.json | 58 +-- .../scripts.inc | 220 +++++----- .../SlateportCity_OceanicMuseum_2F/map.json | 50 +-- .../scripts.inc | 203 +++++----- data/scripts/interview.inc | 2 +- data/text/match_call.inc | 4 +- include/constants/flags.h | 2 +- include/constants/vars.h | 4 +- include/event_scripts.h | 2 +- src/battle_tower.c | 8 +- src/field_control_avatar.c | 2 +- 26 files changed, 1197 insertions(+), 1175 deletions(-) diff --git a/data/maps/JaggedPass/map.json b/data/maps/JaggedPass/map.json index e695c826cc..ea13d94c2e 100644 --- a/data/maps/JaggedPass/map.json +++ b/data/maps/JaggedPass/map.json @@ -24,7 +24,7 @@ "movement_range_y": 0, "trainer_type": "1", "trainer_sight_or_berry_tree_id": "3", - "script": "JaggedPass_EventScript_230785", + "script": "JaggedPass_EventScript_Eric", "flag": "0" }, { @@ -37,7 +37,7 @@ "movement_range_y": 0, "trainer_type": "1", "trainer_sight_or_berry_tree_id": "4", - "script": "JaggedPass_EventScript_2307FB", + "script": "JaggedPass_EventScript_Ethan", "flag": "0" }, { @@ -63,7 +63,7 @@ "movement_range_y": 1, "trainer_type": "1", "trainer_sight_or_berry_tree_id": "3", - "script": "JaggedPass_EventScript_23079C", + "script": "JaggedPass_EventScript_Diana", "flag": "0" }, { @@ -76,7 +76,7 @@ "movement_range_y": 1, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "JaggedPass_EventScript_230718", + "script": "JaggedPass_EventScript_MagmaHideoutGuard", "flag": "FLAG_HIDE_JAGGED_PASS_MAGMA_GUARD" }, { @@ -89,7 +89,7 @@ "movement_range_y": 1, "trainer_type": "1", "trainer_sight_or_berry_tree_id": "3", - "script": "JaggedPass_EventScript_230871", + "script": "JaggedPass_EventScript_Autumn", "flag": "0" }, { @@ -102,7 +102,7 @@ "movement_range_y": 1, "trainer_type": "1", "trainer_sight_or_berry_tree_id": "3", - "script": "JaggedPass_EventScript_23085A", + "script": "JaggedPass_EventScript_Julio", "flag": "0" } ], @@ -186,7 +186,7 @@ "elevation": 3, "var": "VAR_JAGGED_PASS_STATE", "var_value": "1", - "script": "JaggedPass_EventScript_2306BB" + "script": "JaggedPass_EventScript_OpenMagmaHideout" }, { "type": "trigger", @@ -195,7 +195,7 @@ "elevation": 3, "var": "VAR_JAGGED_PASS_STATE", "var_value": "1", - "script": "JaggedPass_EventScript_2306BB" + "script": "JaggedPass_EventScript_OpenMagmaHideout" }, { "type": "trigger", @@ -204,7 +204,7 @@ "elevation": 3, "var": "VAR_JAGGED_PASS_STATE", "var_value": "1", - "script": "JaggedPass_EventScript_2306BB" + "script": "JaggedPass_EventScript_OpenMagmaHideout" }, { "type": "trigger", @@ -213,7 +213,7 @@ "elevation": 3, "var": "VAR_JAGGED_PASS_STATE", "var_value": "1", - "script": "JaggedPass_EventScript_2306BB" + "script": "JaggedPass_EventScript_OpenMagmaHideout" }, { "type": "trigger", @@ -222,7 +222,7 @@ "elevation": 3, "var": "VAR_JAGGED_PASS_STATE", "var_value": "1", - "script": "JaggedPass_EventScript_2306BB" + "script": "JaggedPass_EventScript_OpenMagmaHideout" } ], "bg_events": [ diff --git a/data/maps/JaggedPass/scripts.inc b/data/maps/JaggedPass/scripts.inc index a3a6234d3e..d0a032ab23 100644 --- a/data/maps/JaggedPass/scripts.inc +++ b/data/maps/JaggedPass/scripts.inc @@ -1,46 +1,46 @@ JaggedPass_MapScripts:: @ 8230656 - map_script MAP_SCRIPT_ON_RESUME, JaggedPass_MapScript1_230666 + map_script MAP_SCRIPT_ON_RESUME, JaggedPass_OnResume map_script MAP_SCRIPT_ON_TRANSITION, JaggedPass_OnTransition - map_script MAP_SCRIPT_ON_LOAD, JaggedPass_MapScript1_23069C + map_script MAP_SCRIPT_ON_LOAD, JaggedPass_OnLoad .byte 0 -JaggedPass_MapScript1_230666: @ 8230666 +JaggedPass_OnResume: @ 8230666 setstepcallback STEP_CB_ASH compare VAR_JAGGED_PASS_STATE, 0 - call_if_eq JaggedPass_EventScript_230674 + call_if_eq JaggedPass_EventScript_CheckHasMagmaEmblem end -JaggedPass_EventScript_230674:: @ 8230674 +JaggedPass_EventScript_CheckHasMagmaEmblem:: @ 8230674 checkitem ITEM_MAGMA_EMBLEM, 1 compare VAR_RESULT, 1 - goto_if_eq JaggedPass_EventScript_230685 + goto_if_eq JaggedPass_EventScript_SetReadyToOpenHideout return -JaggedPass_EventScript_230685:: @ 8230685 +JaggedPass_EventScript_SetReadyToOpenHideout:: @ 8230685 setvar VAR_JAGGED_PASS_STATE, 1 return JaggedPass_OnTransition: @ 823068B compare VAR_JAGGED_PASS_ASH_WEATHER, 1 - call_if_eq JaggedPass_EventScript_230697 + call_if_eq JaggedPass_EventScript_SetWeatherAsh end -JaggedPass_EventScript_230697:: @ 8230697 +JaggedPass_EventScript_SetWeatherAsh:: @ 8230697 setweather WEATHER_ASH doweather return -JaggedPass_MapScript1_23069C: @ 823069C +JaggedPass_OnLoad: @ 823069C compare VAR_JAGGED_PASS_STATE, 1 - goto_if_le JaggedPass_EventScript_2306A8 + goto_if_le JaggedPass_EventScript_ConcealHideoutEntrance end -JaggedPass_EventScript_2306A8:: @ 82306A8 +JaggedPass_EventScript_ConcealHideoutEntrance:: @ 82306A8 setmetatile 16, 17, METATILE_Lavaridge_RockWall, 1 setmetatile 16, 18, METATILE_Lavaridge_RockWall, 1 end -JaggedPass_EventScript_2306BB:: @ 82306BB +JaggedPass_EventScript_OpenMagmaHideout:: @ 82306BB lockall setvar VAR_0x8004, 1 @ vertical pan setvar VAR_0x8005, 1 @ horizontal pan @@ -48,7 +48,7 @@ JaggedPass_EventScript_2306BB:: @ 82306BB setvar VAR_0x8007, 5 @ shake delay special ShakeCamera waitstate - msgbox JaggedPass_Text_230DBA, MSGBOX_DEFAULT + msgbox JaggedPass_Text_BoulderShakingInResponseToEmblem, MSGBOX_DEFAULT closemessage setvar VAR_0x8004, 1 @ vertical pan setvar VAR_0x8005, 1 @ horizontal pan @@ -66,9 +66,9 @@ JaggedPass_EventScript_2306BB:: @ 82306BB releaseall end -JaggedPass_EventScript_230718:: @ 8230718 +JaggedPass_EventScript_MagmaHideoutGuard:: @ 8230718 lockall - goto_if_set FLAG_BEAT_MAGMA_GRUNT_JAGGED_PASS, JaggedPass_EventScript_230766 + goto_if_set FLAG_BEAT_MAGMA_GRUNT_JAGGED_PASS, JaggedPass_EventScript_GuardDefeated waitse playse SE_PIN applymovement 5, Common_Movement_ExclamationMark @@ -77,196 +77,196 @@ JaggedPass_EventScript_230718:: @ 8230718 waitmovement 0 applymovement 5, Common_Movement_FacePlayer waitmovement 0 - msgbox JaggedPass_Text_230CCB, MSGBOX_DEFAULT + msgbox JaggedPass_Text_Grunt30Intro, MSGBOX_DEFAULT closemessage - trainerbattle_no_intro TRAINER_GRUNT_30, JaggedPass_Text_230D2D + trainerbattle_no_intro TRAINER_GRUNT_30, JaggedPass_Text_Grunt30Defeat setflag FLAG_BEAT_MAGMA_GRUNT_JAGGED_PASS applymovement 5, Common_Movement_FaceOriginalDirection waitmovement 0 releaseall end -JaggedPass_EventScript_230766:: @ 8230766 +JaggedPass_EventScript_GuardDefeated:: @ 8230766 applymovement 5, Common_Movement_FacePlayer waitmovement 0 - msgbox JaggedPass_Text_230D65, MSGBOX_DEFAULT + msgbox JaggedPass_Text_GoWhereverYouWant, MSGBOX_DEFAULT closemessage applymovement 5, Common_Movement_FaceOriginalDirection waitmovement 0 releaseall end -JaggedPass_EventScript_230785:: @ 8230785 - trainerbattle_single TRAINER_ERIC, JaggedPass_Text_230888, JaggedPass_Text_2308FF - msgbox JaggedPass_Text_230916, MSGBOX_AUTOCLOSE +JaggedPass_EventScript_Eric:: @ 8230785 + trainerbattle_single TRAINER_ERIC, JaggedPass_Text_EricIntro, JaggedPass_Text_EricDefeat + msgbox JaggedPass_Text_EricPostBattle, MSGBOX_AUTOCLOSE end -JaggedPass_EventScript_23079C:: @ 823079C - trainerbattle_single TRAINER_DIANA_1, JaggedPass_Text_230974, JaggedPass_Text_2309B5, JaggedPass_EventScript_2307C8 +JaggedPass_EventScript_Diana:: @ 823079C + trainerbattle_single TRAINER_DIANA_1, JaggedPass_Text_DianaIntro, JaggedPass_Text_DianaDefeat, JaggedPass_EventScript_RegisterDiana specialvar VAR_RESULT, ShouldTryRematchBattle compare VAR_RESULT, 1 - goto_if_eq JaggedPass_EventScript_2307E4 - msgbox JaggedPass_Text_2309D8, MSGBOX_DEFAULT + goto_if_eq JaggedPass_EventScript_DianaRematch + msgbox JaggedPass_Text_DianaPostBattle, MSGBOX_DEFAULT release end -JaggedPass_EventScript_2307C8:: @ 82307C8 +JaggedPass_EventScript_RegisterDiana:: @ 82307C8 special PlayerFaceTrainerAfterBattle - msgbox JaggedPass_Text_230A2C, MSGBOX_DEFAULT + msgbox JaggedPass_Text_DianaRegister, MSGBOX_DEFAULT register_matchcall TRAINER_DIANA_1 release end -JaggedPass_EventScript_2307E4:: @ 82307E4 - trainerbattle_rematch TRAINER_DIANA_1, JaggedPass_Text_230A76, JaggedPass_Text_230AAA - msgbox JaggedPass_Text_230AD7, MSGBOX_AUTOCLOSE +JaggedPass_EventScript_DianaRematch:: @ 82307E4 + trainerbattle_rematch TRAINER_DIANA_1, JaggedPass_Text_DianaRematchIntro, JaggedPass_Text_DianaRematchDefeat + msgbox JaggedPass_Text_DianaPostRematch, MSGBOX_AUTOCLOSE end -JaggedPass_EventScript_2307FB:: @ 82307FB - trainerbattle_single TRAINER_ETHAN_1, JaggedPass_Text_230B10, JaggedPass_Text_230B50, JaggedPass_EventScript_230827 +JaggedPass_EventScript_Ethan:: @ 82307FB + trainerbattle_single TRAINER_ETHAN_1, JaggedPass_Text_EthanIntro, JaggedPass_Text_EthanDefeat, JaggedPass_EventScript_RegisterEthan specialvar VAR_RESULT, ShouldTryRematchBattle compare VAR_RESULT, 1 - goto_if_eq JaggedPass_EventScript_230843 - msgbox JaggedPass_Text_230B93, MSGBOX_DEFAULT + goto_if_eq JaggedPass_EventScript_EthanRematch + msgbox JaggedPass_Text_EthanPostBattle, MSGBOX_DEFAULT release end -JaggedPass_EventScript_230827:: @ 8230827 +JaggedPass_EventScript_RegisterEthan:: @ 8230827 special PlayerFaceTrainerAfterBattle - msgbox JaggedPass_Text_230BC6, MSGBOX_DEFAULT + msgbox JaggedPass_Text_EthanRegister, MSGBOX_DEFAULT register_matchcall TRAINER_ETHAN_1 release end -JaggedPass_EventScript_230843:: @ 8230843 - trainerbattle_rematch TRAINER_ETHAN_1, JaggedPass_Text_230C28, JaggedPass_Text_230C60 - msgbox JaggedPass_Text_230C94, MSGBOX_AUTOCLOSE +JaggedPass_EventScript_EthanRematch:: @ 8230843 + trainerbattle_rematch TRAINER_ETHAN_1, JaggedPass_Text_EthanRematchIntro, JaggedPass_Text_EthanRematchDefeat + msgbox JaggedPass_Text_EthanPostRematch, MSGBOX_AUTOCLOSE end -JaggedPass_EventScript_23085A:: @ 823085A - trainerbattle_single TRAINER_JULIO, JaggedPass_Text_230DF7, JaggedPass_Text_230E38 - msgbox JaggedPass_Text_230E57, MSGBOX_AUTOCLOSE +JaggedPass_EventScript_Julio:: @ 823085A + trainerbattle_single TRAINER_JULIO, JaggedPass_Text_JulioIntro, JaggedPass_Text_JulioDefeat + msgbox JaggedPass_Text_JulioPostBattle, MSGBOX_AUTOCLOSE end -JaggedPass_EventScript_230871:: @ 8230871 - trainerbattle_single TRAINER_AUTUMN, JaggedPass_Text_230E8E, JaggedPass_Text_230ECD - msgbox JaggedPass_Text_230EE3, MSGBOX_AUTOCLOSE +JaggedPass_EventScript_Autumn:: @ 8230871 + trainerbattle_single TRAINER_AUTUMN, JaggedPass_Text_AutumnIntro, JaggedPass_Text_AutumnDefeat + msgbox JaggedPass_Text_AutumnPostBattle, MSGBOX_AUTOCLOSE end -JaggedPass_Text_230888: @ 8230888 +JaggedPass_Text_EricIntro: @ 8230888 .string "MT. CHIMNEY's JAGGED PASS…\p" .string "Now this is what I've always wanted\n" .string "in a mountain.\p" .string "This jagged bumpiness…\n" .string "It rocks my soul!$" -JaggedPass_Text_2308FF: @ 82308FF +JaggedPass_Text_EricDefeat: @ 82308FF .string "Losing left me bitter!$" -JaggedPass_Text_230916: @ 8230916 +JaggedPass_Text_EricPostBattle: @ 8230916 .string "Yes, I did lose at POKéMON…\p" .string "But, when it comes to the love of\n" .string "the mountains, I have you beat!$" -JaggedPass_Text_230974: @ 8230974 +JaggedPass_Text_DianaIntro: @ 8230974 .string "This place isn't your casual hike.\n" .string "It's not suited for a picnic.$" -JaggedPass_Text_2309B5: @ 82309B5 +JaggedPass_Text_DianaDefeat: @ 82309B5 .string "Ohhh, no!\n" .string "The ground is too bumpy…$" -JaggedPass_Text_2309D8: @ 82309D8 +JaggedPass_Text_DianaPostBattle: @ 82309D8 .string "Did you know?\p" .string "Some people cleverly ride their\n" .string "bicycles up this horribly bumpy pass.$" -JaggedPass_Text_230A2C: @ 8230A2C +JaggedPass_Text_DianaRegister: @ 8230A2C .string "Will you ever be back in this area?\n" .string "If you do return, I'd like a rematch.$" -JaggedPass_Text_230A76: @ 8230A76 +JaggedPass_Text_DianaRematchIntro: @ 8230A76 .string "Picnics are fun wherever you go.\n" .string "Just like POKéMON!$" -JaggedPass_Text_230AAA: @ 8230AAA +JaggedPass_Text_DianaRematchDefeat: @ 8230AAA .string "I only lost because the ground is\n" .string "too bumpy!$" -JaggedPass_Text_230AD7: @ 8230AD7 +JaggedPass_Text_DianaPostRematch: @ 8230AD7 .string "I'll forget about losing and just\n" .string "enjoy this bumpy hike.$" -JaggedPass_Text_230B10: @ 8230B10 +JaggedPass_Text_EthanIntro: @ 8230B10 .string "JAGGED PASS is hard to walk on.\n" .string "It's a good place for training.$" -JaggedPass_Text_230B50: @ 8230B50 +JaggedPass_Text_EthanDefeat: @ 8230B50 .string "It was all over while we were still\n" .string "trying to find a good footing…$" -JaggedPass_Text_230B93: @ 8230B93 +JaggedPass_Text_EthanPostBattle: @ 8230B93 .string "If I had an ACRO BIKE, I'd be able to\n" .string "jump ledges.$" -JaggedPass_Text_230BC6: @ 8230BC6 +JaggedPass_Text_EthanRegister: @ 8230BC6 .string "When I get more used to this bumpiness,\n" .string "I'll be sure to win!\p" .string "Can you register me in your POKéNAV?$" -JaggedPass_Text_230C28: @ 8230C28 +JaggedPass_Text_EthanRematchIntro: @ 8230C28 .string "I got used to this bumpiness.\n" .string "I sing while I climb now.$" -JaggedPass_Text_230C60: @ 8230C60 +JaggedPass_Text_EthanRematchDefeat: @ 8230C60 .string "It's still not easy to battle on this\n" .string "bumpy ground…$" -JaggedPass_Text_230C94: @ 8230C94 +JaggedPass_Text_EthanPostRematch: @ 8230C94 .string "I should get an ACRO BIKE from RYDEL\n" .string "in MAUVILLE CITY…$" -JaggedPass_Text_230CCB: @ 8230CCB +JaggedPass_Text_Grunt30Intro: @ 8230CCB .string "Wah!\n" .string "What are you doing here?\p" .string "What am I doing in a place like this?\p" .string "What business is it of yours?$" -JaggedPass_Text_230D2D: @ 8230D2D +JaggedPass_Text_Grunt30Defeat: @ 8230D2D .string "Urrrgh…\p" .string "I should've ducked into our HIDEOUT\n" .string "right away…$" -JaggedPass_Text_230D65: @ 8230D65 +JaggedPass_Text_GoWhereverYouWant: @ 8230D65 .string "Okay, oh-kay!\n" .string "I admit it--you're strong!\p" .string "Don't worry about me.\n" .string "Go wherever you want!$" -JaggedPass_Text_230DBA: @ 8230DBA +JaggedPass_Text_BoulderShakingInResponseToEmblem: @ 8230DBA .string "Oh! This boulder is shaking in response\n" .string "to the MAGMA EMBLEM!$" -JaggedPass_Text_230DF7: @ 8230DF7 +JaggedPass_Text_JulioIntro: @ 8230DF7 .string "Aiyeeh! It's awfully scary to shoot\n" .string "down the mountain in one go!$" -JaggedPass_Text_230E38: @ 8230E38 +JaggedPass_Text_JulioDefeat: @ 8230E38 .string "I feel like I'm falling apart…$" -JaggedPass_Text_230E57: @ 8230E57 +JaggedPass_Text_JulioPostBattle: @ 8230E57 .string "My bicycle bounced around so much,\n" .string "my rear end's sore…$" -JaggedPass_Text_230E8E: @ 8230E8E +JaggedPass_Text_AutumnIntro: @ 8230E8E .string "I climb this hill every day.\n" .string "I have confidence in my strength!$" -JaggedPass_Text_230ECD: @ 8230ECD +JaggedPass_Text_AutumnDefeat: @ 8230ECD .string "Hmm…\n" .string "What went wrong?$" -JaggedPass_Text_230EE3: @ 8230EE3 +JaggedPass_Text_AutumnPostBattle: @ 8230EE3 .string "What is that odd rock protrusion\n" .string "a little up the hill from here?$" diff --git a/data/maps/MossdeepCity_Gym/scripts.inc b/data/maps/MossdeepCity_Gym/scripts.inc index fc6a45d843..ec5e2bb704 100644 --- a/data/maps/MossdeepCity_Gym/scripts.inc +++ b/data/maps/MossdeepCity_Gym/scripts.inc @@ -77,7 +77,7 @@ MossdeepCity_Gym_EventScript_TateAndLizaDefeated:: @ 82208D1 clearflag FLAG_HIDE_MOSSDEEP_CITY_SPACE_CENTER_2F_STEVEN setvar VAR_MOSSDEEP_CITY_STATE, 1 setflag FLAG_HIDE_MOSSDEEP_CITY_SPACE_CENTER_1F_STEVEN - setvar VAR_MOSSDEEP_SPACE_CENTER_STATE_2, 1 + setvar VAR_MOSSDEEP_SPACE_CENTER_STATE, 1 call MossdeepCity_Gym_EventScript_GiveCalmMind closemessage delay 30 diff --git a/data/maps/MossdeepCity_SpaceCenter_1F/map.json b/data/maps/MossdeepCity_SpaceCenter_1F/map.json index 0d02d368ad..b79f758cda 100644 --- a/data/maps/MossdeepCity_SpaceCenter_1F/map.json +++ b/data/maps/MossdeepCity_SpaceCenter_1F/map.json @@ -24,7 +24,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "MossdeepCity_SpaceCenter_1F_EventScript_222FD8", + "script": "MossdeepCity_SpaceCenter_1F_EventScript_RocketLaunchCounter", "flag": "0" }, { @@ -37,7 +37,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "MossdeepCity_SpaceCenter_1F_EventScript_223063", + "script": "MossdeepCity_SpaceCenter_1F_EventScript_Scientist", "flag": "0" }, { @@ -50,7 +50,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "MossdeepCity_SpaceCenter_1F_EventScript_22308E", + "script": "MossdeepCity_SpaceCenter_1F_EventScript_SunStoneMan", "flag": "0" }, { @@ -63,7 +63,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "MossdeepCity_SpaceCenter_1F_EventScript_223168", + "script": "MossdeepCity_SpaceCenter_1F_EventScript_OldMan", "flag": "0" }, { @@ -76,7 +76,7 @@ "movement_range_y": 1, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "MossdeepCity_SpaceCenter_1F_EventScript_22312D", + "script": "MossdeepCity_SpaceCenter_1F_EventScript_Woman", "flag": "0" }, { @@ -89,7 +89,7 @@ "movement_range_y": 1, "trainer_type": "1", "trainer_sight_or_berry_tree_id": "2", - "script": "MossdeepCity_SpaceCenter_1F_EventScript_2231DA", + "script": "MossdeepCity_SpaceCenter_1F_EventScript_Grunt32", "flag": "FLAG_HIDE_MOSSDEEP_CITY_SPACE_CENTER_1F_TEAM_MAGMA" }, { @@ -102,7 +102,7 @@ "movement_range_y": 1, "trainer_type": "1", "trainer_sight_or_berry_tree_id": "2", - "script": "MossdeepCity_SpaceCenter_1F_EventScript_2231F1", + "script": "MossdeepCity_SpaceCenter_1F_EventScript_Grunt16", "flag": "FLAG_HIDE_MOSSDEEP_CITY_SPACE_CENTER_1F_TEAM_MAGMA" }, { @@ -115,7 +115,7 @@ "movement_range_y": 1, "trainer_type": "1", "trainer_sight_or_berry_tree_id": "2", - "script": "MossdeepCity_SpaceCenter_1F_EventScript_223208", + "script": "MossdeepCity_SpaceCenter_1F_EventScript_Grunt33", "flag": "FLAG_HIDE_MOSSDEEP_CITY_SPACE_CENTER_1F_TEAM_MAGMA" }, { @@ -128,7 +128,7 @@ "movement_range_y": 1, "trainer_type": "1", "trainer_sight_or_berry_tree_id": "0", - "script": "MossdeepCity_SpaceCenter_1F_EventScript_22321F", + "script": "MossdeepCity_SpaceCenter_1F_EventScript_Grunt23", "flag": "FLAG_HIDE_MOSSDEEP_CITY_SPACE_CENTER_1F_TEAM_MAGMA" }, { @@ -141,8 +141,8 @@ "movement_range_y": 1, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "MossdeepCity_SpaceCenter_1F_EventScript_2231CF", - "flag": "FLAG_HIDE_MOSSDEEP_CITY_SPACE_CENTER_INVISIBLE_NINJA_BOY" + "script": "MossdeepCity_SpaceCenter_1F_EventScript_MagmaNote", + "flag": "FLAG_HIDE_MOSSDEEP_CITY_SPACE_CENTER_MAGMA_NOTE" }, { "graphics_id": "EVENT_OBJ_GFX_STEVEN", @@ -154,7 +154,7 @@ "movement_range_y": 1, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "MossdeepCity_SpaceCenter_1F_EventScript_2231B9", + "script": "MossdeepCity_SpaceCenter_1F_EventScript_Steven", "flag": "FLAG_HIDE_MOSSDEEP_CITY_SPACE_CENTER_1F_STEVEN" } ], diff --git a/data/maps/MossdeepCity_SpaceCenter_1F/scripts.inc b/data/maps/MossdeepCity_SpaceCenter_1F/scripts.inc index e5f43565ca..17bf5c8964 100644 --- a/data/maps/MossdeepCity_SpaceCenter_1F/scripts.inc +++ b/data/maps/MossdeepCity_SpaceCenter_1F/scripts.inc @@ -5,10 +5,10 @@ MossdeepCity_SpaceCenter_1F_MapScripts:: @ 8222F41 MossdeepCity_SpaceCenter_1F_OnTransition: @ 8222F4C compare VAR_MOSSDEEP_CITY_STATE, 2 - goto_if_eq MossdeepCity_SpaceCenter_1F_EventScript_222F58 + goto_if_eq MossdeepCity_SpaceCenter_1F_EventScript_MoveObjectsForTeamMagma end -MossdeepCity_SpaceCenter_1F_EventScript_222F58:: @ 8222F58 +MossdeepCity_SpaceCenter_1F_EventScript_MoveObjectsForTeamMagma:: @ 8222F58 setobjectxyperm 3, 1, 9 setobjectmovementtype 3, MOVEMENT_TYPE_FACE_RIGHT setobjectxyperm 5, 0, 8 @@ -18,291 +18,296 @@ MossdeepCity_SpaceCenter_1F_EventScript_222F58:: @ 8222F58 setobjectxyperm 1, 3, 4 setobjectmovementtype 1, MOVEMENT_TYPE_FACE_RIGHT setobjectmovementtype 2, MOVEMENT_TYPE_FACE_RIGHT - compare VAR_MOSSDEEP_SPACE_CENTER_STATE_1, 1 - goto_if_eq MossdeepCity_SpaceCenter_1F_EventScript_222FAA - compare VAR_MOSSDEEP_SPACE_CENTER_STATE_1, 2 - goto_if_eq MossdeepCity_SpaceCenter_1F_EventScript_222FB2 - compare VAR_MOSSDEEP_SPACE_CENTER_STATE_1, 3 - goto_if_eq MossdeepCity_SpaceCenter_1F_EventScript_222FBA + compare VAR_MOSSDEEP_SPACE_CENTER_STAIR_GUARD_STATE, 1 + goto_if_eq MossdeepCity_SpaceCenter_1F_EventScript_MoveStairGuardLeft + compare VAR_MOSSDEEP_SPACE_CENTER_STAIR_GUARD_STATE, 2 + goto_if_eq MossdeepCity_SpaceCenter_1F_EventScript_MoveStairGuardDown + compare VAR_MOSSDEEP_SPACE_CENTER_STAIR_GUARD_STATE, 3 + goto_if_eq MossdeepCity_SpaceCenter_1F_EventScript_MoveStairGuardRight end -MossdeepCity_SpaceCenter_1F_EventScript_222FAA:: @ 8222FAA +MossdeepCity_SpaceCenter_1F_EventScript_MoveStairGuardLeft:: @ 8222FAA setobjectxyperm 9, 12, 2 end -MossdeepCity_SpaceCenter_1F_EventScript_222FB2:: @ 8222FB2 +MossdeepCity_SpaceCenter_1F_EventScript_MoveStairGuardDown:: @ 8222FB2 setobjectxyperm 9, 13, 3 end -MossdeepCity_SpaceCenter_1F_EventScript_222FBA:: @ 8222FBA +@ Functionally unused. See comment on MossdeepCity_SpaceCenter_1F_EventScript_MoveGruntFromStairsEast +MossdeepCity_SpaceCenter_1F_EventScript_MoveStairGuardRight:: @ 8222FBA setobjectxyperm 9, 14, 2 end MossdeepCity_SpaceCenter_1F_OnLoad: @ 8222FC2 compare VAR_MOSSDEEP_CITY_STATE, 2 - goto_if_le MossdeepCity_SpaceCenter_1F_EventScript_222FCE + goto_if_le MossdeepCity_SpaceCenter_1F_EventScript_SetMagmaNote end -MossdeepCity_SpaceCenter_1F_EventScript_222FCE:: @ 8222FCE +MossdeepCity_SpaceCenter_1F_EventScript_SetMagmaNote:: @ 8222FCE setmetatile 2, 5, METATILE_Facility_DataPad, 1 return -MossdeepCity_SpaceCenter_1F_EventScript_222FD8:: @ 8222FD8 +MossdeepCity_SpaceCenter_1F_EventScript_RocketLaunchCounter:: @ 8222FD8 lock faceplayer compare VAR_MOSSDEEP_CITY_STATE, 2 - goto_if_eq MossdeepCity_SpaceCenter_1F_EventScript_223024 + goto_if_eq MossdeepCity_SpaceCenter_1F_EventScript_RocketLaunchCounterMagma dotimebasedevents specialvar VAR_RESULT, GetWeekCount buffernumberstring 0, VAR_RESULT compare VAR_RESULT, 0 - call_if_eq MossdeepCity_SpaceCenter_1F_EventScript_223012 + call_if_eq MossdeepCity_SpaceCenter_1F_EventScript_NoLaunchesYet compare VAR_RESULT, 1 - call_if_ge MossdeepCity_SpaceCenter_1F_EventScript_22301B + call_if_ge MossdeepCity_SpaceCenter_1F_EventScript_ShowLaunchNumber closemessage applymovement VAR_LAST_TALKED, Common_Movement_FaceOriginalDirection waitmovement 0 release end -MossdeepCity_SpaceCenter_1F_EventScript_223012:: @ 8223012 - msgbox MossdeepCity_SpaceCenter_1F_Text_2232A7, MSGBOX_DEFAULT +MossdeepCity_SpaceCenter_1F_EventScript_NoLaunchesYet:: @ 8223012 + msgbox MossdeepCity_SpaceCenter_1F_Text_RocketLaunchImminent, MSGBOX_DEFAULT return -MossdeepCity_SpaceCenter_1F_EventScript_22301B:: @ 822301B - msgbox MossdeepCity_SpaceCenter_1F_Text_2232C8, MSGBOX_DEFAULT +MossdeepCity_SpaceCenter_1F_EventScript_ShowLaunchNumber:: @ 822301B + msgbox MossdeepCity_SpaceCenter_1F_Text_SuccessfulLaunchNumber, MSGBOX_DEFAULT return -MossdeepCity_SpaceCenter_1F_EventScript_223024:: @ 8223024 +MossdeepCity_SpaceCenter_1F_EventScript_RocketLaunchCounterMagma:: @ 8223024 dotimebasedevents specialvar VAR_RESULT, GetWeekCount buffernumberstring 0, VAR_RESULT compare VAR_RESULT, 0 - call_if_eq MossdeepCity_SpaceCenter_1F_EventScript_223051 + call_if_eq MossdeepCity_SpaceCenter_1F_EventScript_NoLaunchesYetMagma compare VAR_RESULT, 1 - call_if_ge MossdeepCity_SpaceCenter_1F_EventScript_22305A + call_if_ge MossdeepCity_SpaceCenter_1F_EventScript_ShowLaunchNumberMagma closemessage applymovement VAR_LAST_TALKED, Common_Movement_WalkInPlaceFastestRight waitmovement 0 release end -MossdeepCity_SpaceCenter_1F_EventScript_223051:: @ 8223051 - msgbox MossdeepCity_SpaceCenter_1F_Text_223305, MSGBOX_DEFAULT +MossdeepCity_SpaceCenter_1F_EventScript_NoLaunchesYetMagma:: @ 8223051 + msgbox MossdeepCity_SpaceCenter_1F_Text_HaywireButRocketLaunchImminent, MSGBOX_DEFAULT return -MossdeepCity_SpaceCenter_1F_EventScript_22305A:: @ 822305A - msgbox MossdeepCity_SpaceCenter_1F_Text_22335E, MSGBOX_DEFAULT +MossdeepCity_SpaceCenter_1F_EventScript_ShowLaunchNumberMagma:: @ 822305A + msgbox MossdeepCity_SpaceCenter_1F_Text_HaywireButSuccessfulLaunchNumber, MSGBOX_DEFAULT return -MossdeepCity_SpaceCenter_1F_EventScript_223063:: @ 8223063 +MossdeepCity_SpaceCenter_1F_EventScript_Scientist:: @ 8223063 lock faceplayer compare VAR_MOSSDEEP_CITY_STATE, 2 - goto_if_eq MossdeepCity_SpaceCenter_1F_EventScript_22307A - msgbox MossdeepCity_SpaceCenter_1F_Text_2233D3, MSGBOX_DEFAULT + goto_if_eq MossdeepCity_SpaceCenter_1F_EventScript_ScientistMagma + msgbox MossdeepCity_SpaceCenter_1F_Text_RocketLaunchDemandsPerfection, MSGBOX_DEFAULT release end -MossdeepCity_SpaceCenter_1F_EventScript_22307A:: @ 822307A - msgbox MossdeepCity_SpaceCenter_1F_Text_2234B7, MSGBOX_DEFAULT +MossdeepCity_SpaceCenter_1F_EventScript_ScientistMagma:: @ 822307A + msgbox MossdeepCity_SpaceCenter_1F_Text_MagmaHaveSightsOnSpaceCenter, MSGBOX_DEFAULT applymovement VAR_LAST_TALKED, Common_Movement_WalkInPlaceFastestRight waitmovement 0 release end -MossdeepCity_SpaceCenter_1F_EventScript_22308E:: @ 822308E +MossdeepCity_SpaceCenter_1F_EventScript_SunStoneMan:: @ 822308E lock faceplayer compare VAR_MOSSDEEP_CITY_STATE, 2 - goto_if_eq MossdeepCity_SpaceCenter_1F_EventScript_2230DA - goto_if_set FLAG_RECEIVED_SUN_STONE_MOSSDEEP, MossdeepCity_SpaceCenter_1F_EventScript_2230D0 - msgbox MossdeepCity_SpaceCenter_1F_Text_223540, MSGBOX_DEFAULT + goto_if_eq MossdeepCity_SpaceCenter_1F_EventScript_SunStoneManMagma + goto_if_set FLAG_RECEIVED_SUN_STONE_MOSSDEEP, MossdeepCity_SpaceCenter_1F_EventScript_GaveSunStone + msgbox MossdeepCity_SpaceCenter_1F_Text_FoundThisYouCanHaveIt, MSGBOX_DEFAULT giveitem_std ITEM_SUN_STONE compare VAR_RESULT, 0 goto_if_eq Common_EventScript_ShowBagIsFull setflag FLAG_RECEIVED_SUN_STONE_MOSSDEEP - msgbox MossdeepCity_SpaceCenter_1F_Text_2235A6, MSGBOX_DEFAULT + msgbox MossdeepCity_SpaceCenter_1F_Text_HoennFamousForMeteorShowers, MSGBOX_DEFAULT release end -MossdeepCity_SpaceCenter_1F_EventScript_2230D0:: @ 82230D0 - msgbox MossdeepCity_SpaceCenter_1F_Text_2235A6, MSGBOX_DEFAULT +MossdeepCity_SpaceCenter_1F_EventScript_GaveSunStone:: @ 82230D0 + msgbox MossdeepCity_SpaceCenter_1F_Text_HoennFamousForMeteorShowers, MSGBOX_DEFAULT release end -MossdeepCity_SpaceCenter_1F_EventScript_2230DA:: @ 82230DA - goto_if_set FLAG_RECEIVED_SUN_STONE_MOSSDEEP, MossdeepCity_SpaceCenter_1F_EventScript_223119 - msgbox MossdeepCity_SpaceCenter_1F_Text_2235F0, MSGBOX_DEFAULT +MossdeepCity_SpaceCenter_1F_EventScript_SunStoneManMagma:: @ 82230DA + goto_if_set FLAG_RECEIVED_SUN_STONE_MOSSDEEP, MossdeepCity_SpaceCenter_1F_EventScript_GaveSunStoneMagma + msgbox MossdeepCity_SpaceCenter_1F_Text_MagmaCantStealFuelTakeThis, MSGBOX_DEFAULT giveitem_std ITEM_SUN_STONE compare VAR_RESULT, 0 goto_if_eq Common_EventScript_ShowBagIsFull setflag FLAG_RECEIVED_SUN_STONE_MOSSDEEP - msgbox MossdeepCity_SpaceCenter_1F_Text_223664, MSGBOX_DEFAULT + msgbox MossdeepCity_SpaceCenter_1F_Text_CantStrollOnBeachWithMagma, MSGBOX_DEFAULT applymovement VAR_LAST_TALKED, Common_Movement_WalkInPlaceFastestRight waitmovement 0 release end -MossdeepCity_SpaceCenter_1F_EventScript_223119:: @ 8223119 - msgbox MossdeepCity_SpaceCenter_1F_Text_223664, MSGBOX_DEFAULT +MossdeepCity_SpaceCenter_1F_EventScript_GaveSunStoneMagma:: @ 8223119 + msgbox MossdeepCity_SpaceCenter_1F_Text_CantStrollOnBeachWithMagma, MSGBOX_DEFAULT applymovement VAR_LAST_TALKED, Common_Movement_WalkInPlaceFastestRight waitmovement 0 release end -MossdeepCity_SpaceCenter_1F_EventScript_22312D:: @ 822312D +MossdeepCity_SpaceCenter_1F_EventScript_Woman:: @ 822312D lock faceplayer - goto_if_set FLAG_SYS_GAME_CLEAR, MossdeepCity_SpaceCenter_1F_EventScript_223154 + goto_if_set FLAG_SYS_GAME_CLEAR, MossdeepCity_SpaceCenter_1F_EventScript_WomanNormal compare VAR_MOSSDEEP_CITY_STATE, 2 - goto_if_eq MossdeepCity_SpaceCenter_1F_EventScript_22315E + goto_if_eq MossdeepCity_SpaceCenter_1F_EventScript_WomanMagma compare VAR_MOSSDEEP_CITY_STATE, 2 - goto_if_lt MossdeepCity_SpaceCenter_1F_EventScript_223154 - goto MossdeepCity_SpaceCenter_1F_EventScript_22315E + goto_if_lt MossdeepCity_SpaceCenter_1F_EventScript_WomanNormal + goto MossdeepCity_SpaceCenter_1F_EventScript_WomanMagma end -MossdeepCity_SpaceCenter_1F_EventScript_223154:: @ 8223154 - msgbox MossdeepCity_SpaceCenter_1F_Text_2236A6, MSGBOX_DEFAULT +MossdeepCity_SpaceCenter_1F_EventScript_WomanNormal:: @ 8223154 + msgbox MossdeepCity_SpaceCenter_1F_Text_DidPokemonComeFromSpace, MSGBOX_DEFAULT release end -MossdeepCity_SpaceCenter_1F_EventScript_22315E:: @ 822315E - msgbox MossdeepCity_SpaceCenter_1F_Text_2236E8, MSGBOX_DEFAULT +MossdeepCity_SpaceCenter_1F_EventScript_WomanMagma:: @ 822315E + msgbox MossdeepCity_SpaceCenter_1F_Text_AquaShouldBeatMagma, MSGBOX_DEFAULT release end -MossdeepCity_SpaceCenter_1F_EventScript_223168:: @ 8223168 +MossdeepCity_SpaceCenter_1F_EventScript_OldMan:: @ 8223168 lock faceplayer - goto_if_set FLAG_SYS_GAME_CLEAR, MossdeepCity_SpaceCenter_1F_EventScript_22318F + goto_if_set FLAG_SYS_GAME_CLEAR, MossdeepCity_SpaceCenter_1F_EventScript_OldManNormal compare VAR_MOSSDEEP_CITY_STATE, 2 - goto_if_eq MossdeepCity_SpaceCenter_1F_EventScript_2231A4 + goto_if_eq MossdeepCity_SpaceCenter_1F_EventScript_OldManMagma compare VAR_MOSSDEEP_CITY_STATE, 2 - goto_if_lt MossdeepCity_SpaceCenter_1F_EventScript_22318F - goto MossdeepCity_SpaceCenter_1F_EventScript_2231A4 + goto_if_lt MossdeepCity_SpaceCenter_1F_EventScript_OldManNormal + goto MossdeepCity_SpaceCenter_1F_EventScript_OldManMagma end -MossdeepCity_SpaceCenter_1F_EventScript_22318F:: @ 822318F - msgbox MossdeepCity_SpaceCenter_1F_Text_22375B, MSGBOX_DEFAULT +MossdeepCity_SpaceCenter_1F_EventScript_OldManNormal:: @ 822318F + msgbox MossdeepCity_SpaceCenter_1F_Text_RocketsBoggleMyMind, MSGBOX_DEFAULT closemessage applymovement VAR_LAST_TALKED, Common_Movement_FaceOriginalDirection waitmovement 0 release end -MossdeepCity_SpaceCenter_1F_EventScript_2231A4:: @ 82231A4 - msgbox MossdeepCity_SpaceCenter_1F_Text_2237B5, MSGBOX_DEFAULT +MossdeepCity_SpaceCenter_1F_EventScript_OldManMagma:: @ 82231A4 + msgbox MossdeepCity_SpaceCenter_1F_Text_MagmaWantsToSpoilMyDream, MSGBOX_DEFAULT closemessage applymovement VAR_LAST_TALKED, Common_Movement_FaceOriginalDirection waitmovement 0 release end -MossdeepCity_SpaceCenter_1F_EventScript_2231B9:: @ 82231B9 +MossdeepCity_SpaceCenter_1F_EventScript_Steven:: @ 82231B9 lock faceplayer - msgbox MossdeepCity_SpaceCenter_1F_Text_223849, MSGBOX_DEFAULT + msgbox MossdeepCity_SpaceCenter_1F_Text_StevenMagmaCantBeAllowedToTakeFuel, MSGBOX_DEFAULT applymovement VAR_LAST_TALKED, Common_Movement_FaceOriginalDirection waitmovement 0 release end -MossdeepCity_SpaceCenter_1F_EventScript_2231CF:: @ 82231CF +MossdeepCity_SpaceCenter_1F_EventScript_MagmaNote:: @ 82231CF lockall - msgbox MossdeepCity_SpaceCenter_1F_Text_223C2C, MSGBOX_DEFAULT + msgbox MossdeepCity_SpaceCenter_1F_Text_MagmaIntentToStealNotice, MSGBOX_DEFAULT releaseall end -MossdeepCity_SpaceCenter_1F_EventScript_2231DA:: @ 82231DA - trainerbattle_single TRAINER_GRUNT_32, MossdeepCity_SpaceCenter_1F_Text_22396C, MossdeepCity_SpaceCenter_1F_Text_223999 - msgbox MossdeepCity_SpaceCenter_1F_Text_2239AA, MSGBOX_AUTOCLOSE +MossdeepCity_SpaceCenter_1F_EventScript_Grunt32:: @ 82231DA + trainerbattle_single TRAINER_GRUNT_32, MossdeepCity_SpaceCenter_1F_Text_Grunt32Intro, MossdeepCity_SpaceCenter_1F_Text_Grunt32Defeat + msgbox MossdeepCity_SpaceCenter_1F_Text_Grunt32PostBattle, MSGBOX_AUTOCLOSE end -MossdeepCity_SpaceCenter_1F_EventScript_2231F1:: @ 82231F1 - trainerbattle_single TRAINER_GRUNT_16, MossdeepCity_SpaceCenter_1F_Text_2239E6, MossdeepCity_SpaceCenter_1F_Text_223A21 - msgbox MossdeepCity_SpaceCenter_1F_Text_223A4B, MSGBOX_AUTOCLOSE +MossdeepCity_SpaceCenter_1F_EventScript_Grunt16:: @ 82231F1 + trainerbattle_single TRAINER_GRUNT_16, MossdeepCity_SpaceCenter_1F_Text_Grunt16Intro, MossdeepCity_SpaceCenter_1F_Text_Grunt16Defeat + msgbox MossdeepCity_SpaceCenter_1F_Text_Grunt16PostBattle, MSGBOX_AUTOCLOSE end -MossdeepCity_SpaceCenter_1F_EventScript_223208:: @ 8223208 - trainerbattle_single TRAINER_GRUNT_33, MossdeepCity_SpaceCenter_1F_Text_223A8A, MossdeepCity_SpaceCenter_1F_Text_223AFA - msgbox MossdeepCity_SpaceCenter_1F_Text_223B37, MSGBOX_AUTOCLOSE +MossdeepCity_SpaceCenter_1F_EventScript_Grunt33:: @ 8223208 + trainerbattle_single TRAINER_GRUNT_33, MossdeepCity_SpaceCenter_1F_Text_Grunt33Intro, MossdeepCity_SpaceCenter_1F_Text_Grunt33Defeat + msgbox MossdeepCity_SpaceCenter_1F_Text_Grunt33PostBattle, MSGBOX_AUTOCLOSE end -MossdeepCity_SpaceCenter_1F_EventScript_22321F:: @ 822321F +MossdeepCity_SpaceCenter_1F_EventScript_Grunt23:: @ 822321F lock faceplayer - goto_if_set FLAG_DEFEATED_GRUNT_SPACE_CENTER_1F, MossdeepCity_SpaceCenter_1F_EventScript_22326E - msgbox MossdeepCity_SpaceCenter_1F_Text_223B90, MSGBOX_DEFAULT - trainerbattle_no_intro TRAINER_GRUNT_23, MossdeepCity_SpaceCenter_1F_Text_223BC2 + goto_if_set FLAG_DEFEATED_GRUNT_SPACE_CENTER_1F, MossdeepCity_SpaceCenter_1F_EventScript_Grunt23Defeated + msgbox MossdeepCity_SpaceCenter_1F_Text_Grunt23Intro, MSGBOX_DEFAULT + trainerbattle_no_intro TRAINER_GRUNT_23, MossdeepCity_SpaceCenter_1F_Text_Grunt23Defeat setflag FLAG_DEFEATED_GRUNT_SPACE_CENTER_1F copyobjectxytoperm 9 switch VAR_FACING - case DIR_WEST, MossdeepCity_SpaceCenter_1F_EventScript_223278 - case DIR_WEST, MossdeepCity_SpaceCenter_1F_EventScript_223289 - applymovement 9, MossdeepCity_SpaceCenter_1F_Movement_2232A2 + case DIR_WEST, MossdeepCity_SpaceCenter_1F_EventScript_MoveGruntFromStairsWest + case DIR_WEST, MossdeepCity_SpaceCenter_1F_EventScript_MoveGruntFromStairsEast @ BUG: This was meant to be case DIR_EAST + applymovement 9, MossdeepCity_SpaceCenter_1F_Movement_MoveGruntFromStairs waitmovement 0 - setvar VAR_MOSSDEEP_SPACE_CENTER_STATE_1, 2 + setvar VAR_MOSSDEEP_SPACE_CENTER_STAIR_GUARD_STATE, 2 release end -MossdeepCity_SpaceCenter_1F_EventScript_22326E:: @ 822326E - msgbox MossdeepCity_SpaceCenter_1F_Text_223BD3, MSGBOX_DEFAULT +MossdeepCity_SpaceCenter_1F_EventScript_Grunt23Defeated:: @ 822326E + msgbox MossdeepCity_SpaceCenter_1F_Text_Grunt23PostBattle, MSGBOX_DEFAULT release end -MossdeepCity_SpaceCenter_1F_EventScript_223278:: @ 8223278 - applymovement 9, MossdeepCity_SpaceCenter_1F_Movement_22329A +MossdeepCity_SpaceCenter_1F_EventScript_MoveGruntFromStairsWest:: @ 8223278 + applymovement 9, MossdeepCity_SpaceCenter_1F_Movement_MoveGruntFromStairsWest waitmovement 0 - setvar VAR_MOSSDEEP_SPACE_CENTER_STATE_1, 1 + setvar VAR_MOSSDEEP_SPACE_CENTER_STAIR_GUARD_STATE, 1 release end -MossdeepCity_SpaceCenter_1F_EventScript_223289:: @ 8223289 - applymovement 9, MossdeepCity_SpaceCenter_1F_Movement_22329E +@ Functionally unused by mistake. The movement is handled anyway after the switch (see above) +@ This also means VAR_MOSSDEEP_SPACE_CENTER_STAIR_GUARD_STATE can never be 3 +MossdeepCity_SpaceCenter_1F_EventScript_MoveGruntFromStairsEast:: @ 8223289 + applymovement 9, MossdeepCity_SpaceCenter_1F_Movement_MoveGruntFromStairsEast waitmovement 0 - setvar VAR_MOSSDEEP_SPACE_CENTER_STATE_1, 3 + setvar VAR_MOSSDEEP_SPACE_CENTER_STAIR_GUARD_STATE, 3 release end -MossdeepCity_SpaceCenter_1F_Movement_22329A: @ 822329A +MossdeepCity_SpaceCenter_1F_Movement_MoveGruntFromStairsWest: @ 822329A lock_facing_direction walk_left unlock_facing_direction step_end -MossdeepCity_SpaceCenter_1F_Movement_22329E: @ 822329E +@ Functionally unused. See above +MossdeepCity_SpaceCenter_1F_Movement_MoveGruntFromStairsEast: @ 822329E lock_facing_direction walk_right unlock_facing_direction step_end -MossdeepCity_SpaceCenter_1F_Movement_2232A2: @ 82232A2 +@ This was meant to only handle the player facing North, but by mistake(?) it also handles the player facing East +MossdeepCity_SpaceCenter_1F_Movement_MoveGruntFromStairs: @ 82232A2 face_left lock_facing_direction walk_right unlock_facing_direction step_end -MossdeepCity_SpaceCenter_1F_Text_2232A7: @ 82232A7 +MossdeepCity_SpaceCenter_1F_Text_RocketLaunchImminent: @ 82232A7 .string "The rocket's launch is imminent!$" -MossdeepCity_SpaceCenter_1F_Text_2232C8: @ 82232C8 +MossdeepCity_SpaceCenter_1F_Text_SuccessfulLaunchNumber: @ 82232C8 .string "The rocket launched safely!\n" .string "That's successful launch no. {STR_VAR_1}!$" -MossdeepCity_SpaceCenter_1F_Text_223305: @ 8223305 +MossdeepCity_SpaceCenter_1F_Text_HaywireButRocketLaunchImminent: @ 8223305 .string "I know that things are a little\n" .string "haywire right now, but…\p" .string "The rocket's launch is imminent!$" -MossdeepCity_SpaceCenter_1F_Text_22335E: @ 822335E +MossdeepCity_SpaceCenter_1F_Text_HaywireButSuccessfulLaunchNumber: @ 822335E .string "I know that things are a little\n" .string "haywire right now, but…\p" .string "The rocket launched safely!\n" .string "That's successful launch no. {STR_VAR_1}!$" -MossdeepCity_SpaceCenter_1F_Text_2233D3: @ 82233D3 +MossdeepCity_SpaceCenter_1F_Text_RocketLaunchDemandsPerfection: @ 82233D3 .string "A rocket launch demands perfection.\n" .string "Not even a 1% margin of error is allowed.\p" .string "Even if it's 99% okay, the whole thing\n" @@ -310,55 +315,55 @@ MossdeepCity_SpaceCenter_1F_Text_2233D3: @ 82233D3 .string "Despite that, we never stop trying.\n" .string "Why? It's a dream that never ends.$" -MossdeepCity_SpaceCenter_1F_Text_2234B7: @ 82234B7 +MossdeepCity_SpaceCenter_1F_Text_MagmaHaveSightsOnSpaceCenter: @ 82234B7 .string "Those MAGMA thugs have their sights\n" .string "set on our SPACE CENTER.\p" .string "But we can't allow anything that minor\n" .string "to interfere with our rocket launch!$" -MossdeepCity_SpaceCenter_1F_Text_223540: @ 8223540 +MossdeepCity_SpaceCenter_1F_Text_FoundThisYouCanHaveIt: @ 8223540 .string "I was taking a stroll down the beach\n" .string "when I found this.\p" .string "It's not anything I need, so you can\n" .string "have it.$" -MossdeepCity_SpaceCenter_1F_Text_2235A6: @ 82235A6 +MossdeepCity_SpaceCenter_1F_Text_HoennFamousForMeteorShowers: @ 82235A6 .string "The HOENN region has been famous for \n" .string "its meteor showers for a long time.$" -MossdeepCity_SpaceCenter_1F_Text_2235F0: @ 82235F0 +MossdeepCity_SpaceCenter_1F_Text_MagmaCantStealFuelTakeThis: @ 82235F0 .string "TEAM MAGMA can't be allowed to steal\n" .string "the rocket fuel.\p" .string "Oh, by the way, you can have this stone\n" .string "I found on the beach.$" -MossdeepCity_SpaceCenter_1F_Text_223664: @ 8223664 +MossdeepCity_SpaceCenter_1F_Text_CantStrollOnBeachWithMagma: @ 8223664 .string "With TEAM MAGMA around, I guess\n" .string "strolls on the beach aren't safe.$" -MossdeepCity_SpaceCenter_1F_Text_2236A6: @ 82236A6 +MossdeepCity_SpaceCenter_1F_Text_DidPokemonComeFromSpace: @ 82236A6 .string "Some people claim that POKéMON came\n" .string "from space. Could it be true?$" -MossdeepCity_SpaceCenter_1F_Text_2236E8: @ 82236E8 +MossdeepCity_SpaceCenter_1F_Text_AquaShouldBeatMagma: @ 82236E8 .string "TEAM AQUA should take care of\n" .string "TEAM MAGMA!\p" .string "But if they did that, TEAM AQUA will\n" .string "become bold and brazen, won't they?$" -MossdeepCity_SpaceCenter_1F_Text_22375B: @ 822375B +MossdeepCity_SpaceCenter_1F_Text_RocketsBoggleMyMind: @ 822375B .string "A giant chunk of metal bursts through\n" .string "the skies and flies into space…\p" .string "It boggles my mind!$" -MossdeepCity_SpaceCenter_1F_Text_2237B5: @ 82237B5 +MossdeepCity_SpaceCenter_1F_Text_MagmaWantsToSpoilMyDream: @ 82237B5 .string "A giant chunk of metal bursts through\n" .string "the skies and flies into space…\p" .string "But TEAM MAGMA wants to spoil\n" .string "that dream of mine!\p" .string "I'm not having any of that!$" -MossdeepCity_SpaceCenter_1F_Text_223849: @ 8223849 +MossdeepCity_SpaceCenter_1F_Text_StevenMagmaCantBeAllowedToTakeFuel: @ 8223849 .string "STEVEN: {PLAYER}{KUN}, have you read that\n" .string "proclamation already?\p" .string "TEAM MAGMA is coming after the rocket\n" @@ -370,57 +375,57 @@ MossdeepCity_SpaceCenter_1F_Text_223849: @ 8223849 .string "In the meantime, why don't you go\n" .string "check out the town?$" -MossdeepCity_SpaceCenter_1F_Text_22396C: @ 822396C +MossdeepCity_SpaceCenter_1F_Text_Grunt32Intro: @ 822396C .string "As promised, we've come for\n" .string "the rocket fuel!$" -MossdeepCity_SpaceCenter_1F_Text_223999: @ 8223999 +MossdeepCity_SpaceCenter_1F_Text_Grunt32Defeat: @ 8223999 .string "Ran out of fuel…$" -MossdeepCity_SpaceCenter_1F_Text_2239AA: @ 82239AA +MossdeepCity_SpaceCenter_1F_Text_Grunt32PostBattle: @ 82239AA .string "Don't think you're on a roll just\n" .string "because you've beaten me!$" -MossdeepCity_SpaceCenter_1F_Text_2239E6: @ 82239E6 +MossdeepCity_SpaceCenter_1F_Text_Grunt16Intro: @ 82239E6 .string "We gave you fair warning!\n" .string "There's nothing sneaky about us!$" -MossdeepCity_SpaceCenter_1F_Text_223A21: @ 8223A21 +MossdeepCity_SpaceCenter_1F_Text_Grunt16Defeat: @ 8223A21 .string "Grrr…\n" .string "We should've used sneaky treachery…$" -MossdeepCity_SpaceCenter_1F_Text_223A4B: @ 8223A4B +MossdeepCity_SpaceCenter_1F_Text_Grunt16PostBattle: @ 8223A4B .string "Okay, I get it already! The next time,\n" .string "we'll come unannounced.$" -MossdeepCity_SpaceCenter_1F_Text_223A8A: @ 8223A8A +MossdeepCity_SpaceCenter_1F_Text_Grunt33Intro: @ 8223A8A .string "The rocket fuel the SPACE CENTER has\n" .string "in storage--that's what we're after.\p" .string "We mean to take every last bit of it!$" -MossdeepCity_SpaceCenter_1F_Text_223AFA: @ 8223AFA +MossdeepCity_SpaceCenter_1F_Text_Grunt33Defeat: @ 8223AFA .string "Please, can you spare some fuel?\n" .string "Even a chintzy cup will do!$" -MossdeepCity_SpaceCenter_1F_Text_223B37: @ 8223B37 +MossdeepCity_SpaceCenter_1F_Text_Grunt33PostBattle: @ 8223B37 .string "What are we going to do with\n" .string "the rocket fuel?\p" .string "How would I know?\n" .string "Ask our leader upstairs!$" -MossdeepCity_SpaceCenter_1F_Text_223B90: @ 8223B90 +MossdeepCity_SpaceCenter_1F_Text_Grunt23Intro: @ 8223B90 .string "Our leader said no one, but no one,\n" .string "gets past me!$" -MossdeepCity_SpaceCenter_1F_Text_223BC2: @ 8223BC2 +MossdeepCity_SpaceCenter_1F_Text_Grunt23Defeat: @ 8223BC2 .string "Ack! Ack! Aaack!$" -MossdeepCity_SpaceCenter_1F_Text_223BD3: @ 8223BD3 +MossdeepCity_SpaceCenter_1F_Text_Grunt23PostBattle: @ 8223BD3 .string "Please, tell our leader that\n" .string "I never abandoned my post.\l" .string "That I stayed to the bitter end…$" -MossdeepCity_SpaceCenter_1F_Text_223C2C: @ 8223C2C +MossdeepCity_SpaceCenter_1F_Text_MagmaIntentToStealNotice: @ 8223C2C .string "This is…\n" .string "An intent-to-steal notice?\p" .string "“To the staff of the SPACE CENTER:\n" diff --git a/data/maps/MossdeepCity_SpaceCenter_2F/map.json b/data/maps/MossdeepCity_SpaceCenter_2F/map.json index 5c758bf3e0..9da5809104 100644 --- a/data/maps/MossdeepCity_SpaceCenter_2F/map.json +++ b/data/maps/MossdeepCity_SpaceCenter_2F/map.json @@ -24,7 +24,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "MossdeepCity_SpaceCenter_2F_EventScript_223F03", + "script": "MossdeepCity_SpaceCenter_2F_EventScript_RichBoy", "flag": "0" }, { @@ -37,7 +37,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "MossdeepCity_SpaceCenter_2F_EventScript_223EC8", + "script": "MossdeepCity_SpaceCenter_2F_EventScript_Gentleman", "flag": "0" }, { @@ -50,7 +50,7 @@ "movement_range_y": 1, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "MossdeepCity_SpaceCenter_2F_EventScript_223E8D", + "script": "MossdeepCity_SpaceCenter_2F_EventScript_Scientist", "flag": "0" }, { @@ -63,7 +63,7 @@ "movement_range_y": 1, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "MossdeepCity_SpaceCenter_2F_EventScript_223F7A", + "script": "MossdeepCity_SpaceCenter_2F_EventScript_Steven", "flag": "FLAG_HIDE_MOSSDEEP_CITY_SPACE_CENTER_2F_STEVEN" }, { @@ -76,7 +76,7 @@ "movement_range_y": 1, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "MossdeepCity_SpaceCenter_2F_EventScript_223F3E", + "script": "MossdeepCity_SpaceCenter_2F_EventScript_Grunt35", "flag": "FLAG_HIDE_MOSSDEEP_CITY_SPACE_CENTER_2F_TEAM_MAGMA" }, { @@ -89,7 +89,7 @@ "movement_range_y": 1, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "MossdeepCity_SpaceCenter_2F_EventScript_223F50", + "script": "MossdeepCity_SpaceCenter_2F_EventScript_Grunt34", "flag": "FLAG_HIDE_MOSSDEEP_CITY_SPACE_CENTER_2F_TEAM_MAGMA" }, { @@ -102,7 +102,7 @@ "movement_range_y": 1, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "MossdeepCity_SpaceCenter_2F_EventScript_223F47", + "script": "MossdeepCity_SpaceCenter_2F_EventScript_Grunt36", "flag": "FLAG_HIDE_MOSSDEEP_CITY_SPACE_CENTER_2F_TEAM_MAGMA" }, { @@ -115,7 +115,7 @@ "movement_range_y": 1, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "MossdeepCity_SpaceCenter_2F_EventScript_223F59", + "script": "MossdeepCity_SpaceCenter_2F_EventScript_Tabitha", "flag": "FLAG_HIDE_MOSSDEEP_CITY_SPACE_CENTER_2F_TEAM_MAGMA" }, { @@ -128,7 +128,7 @@ "movement_range_y": 1, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "MossdeepCity_SpaceCenter_2F_EventScript_223F6F", + "script": "MossdeepCity_SpaceCenter_2F_EventScript_Maxie", "flag": "FLAG_HIDE_MOSSDEEP_CITY_SPACE_CENTER_2F_TEAM_MAGMA" } ], diff --git a/data/maps/MossdeepCity_SpaceCenter_2F/scripts.inc b/data/maps/MossdeepCity_SpaceCenter_2F/scripts.inc index 32c34ed236..e899192d3b 100644 --- a/data/maps/MossdeepCity_SpaceCenter_2F/scripts.inc +++ b/data/maps/MossdeepCity_SpaceCenter_2F/scripts.inc @@ -1,16 +1,16 @@ MossdeepCity_SpaceCenter_2F_MapScripts:: @ 8223D58 map_script MAP_SCRIPT_ON_TRANSITION, MossdeepCity_SpaceCenter_2F_OnTransition - map_script MAP_SCRIPT_ON_FRAME_TABLE, MossdeepCity_SpaceCenter_2F_MapScript2_223DB5 + map_script MAP_SCRIPT_ON_FRAME_TABLE, MossdeepCity_SpaceCenter_2F_OnFrame .byte 0 MossdeepCity_SpaceCenter_2F_OnTransition: @ 8223D63 compare VAR_MOSSDEEP_CITY_STATE, 2 - call_if_eq MossdeepCity_SpaceCenter_2F_EventScript_223D7A - compare VAR_MOSSDEEP_SPACE_CENTER_STATE_2, 2 - call_if_eq MossdeepCity_SpaceCenter_2F_EventScript_223D9F + call_if_eq MossdeepCity_SpaceCenter_2F_EventScript_MoveStevenMaxieTabitha + compare VAR_MOSSDEEP_SPACE_CENTER_STATE, 2 + call_if_eq MossdeepCity_SpaceCenter_2F_EventScript_MoveDefeatedGrunts end -MossdeepCity_SpaceCenter_2F_EventScript_223D7A:: @ 8223D7A +MossdeepCity_SpaceCenter_2F_EventScript_MoveStevenMaxieTabitha:: @ 8223D7A clearflag FLAG_INTERACTED_WITH_STEVEN_SPACE_CENTER setobjectxyperm 3, 5, 3 setobjectmovementtype 3, MOVEMENT_TYPE_FACE_RIGHT @@ -20,193 +20,194 @@ MossdeepCity_SpaceCenter_2F_EventScript_223D7A:: @ 8223D7A setobjectmovementtype 2, MOVEMENT_TYPE_FACE_RIGHT return -MossdeepCity_SpaceCenter_2F_EventScript_223D9F:: @ 8223D9F +MossdeepCity_SpaceCenter_2F_EventScript_MoveDefeatedGrunts:: @ 8223D9F setobjectxyperm 5, 11, 2 setobjectxyperm 7, 15, 2 setobjectxyperm 6, 13, 4 return -MossdeepCity_SpaceCenter_2F_MapScript2_223DB5: @ 8223DB5 - map_script_2 VAR_MOSSDEEP_SPACE_CENTER_STATE_2, 1, MossdeepCity_SpaceCenter_2F_EventScript_223DBF +MossdeepCity_SpaceCenter_2F_OnFrame: @ 8223DB5 + map_script_2 VAR_MOSSDEEP_SPACE_CENTER_STATE, 1, MossdeepCity_SpaceCenter_2F_EventScript_ThreeMagmaGrunts .2byte 0 -MossdeepCity_SpaceCenter_2F_EventScript_223DBF:: @ 8223DBF +MossdeepCity_SpaceCenter_2F_EventScript_ThreeMagmaGrunts:: @ 8223DBF playse SE_PIN applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_ExclamationMark waitmovement 0 applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_Delay48 waitmovement 0 - msgbox MossdeepCity_SpaceCenter_2F_Text_2243A4, MSGBOX_YESNO + msgbox MossdeepCity_SpaceCenter_2F_Text_YoureOutnumberedTakeUsOn, MSGBOX_YESNO compare VAR_RESULT, 1 - goto_if_eq MossdeepCity_SpaceCenter_2F_EventScript_223E09 - msgbox MossdeepCity_SpaceCenter_2F_Text_2243FE, MSGBOX_DEFAULT + goto_if_eq MossdeepCity_SpaceCenter_2F_EventScript_BattleThreeMagmaGrunts + msgbox MossdeepCity_SpaceCenter_2F_Text_GoodAnswer, MSGBOX_DEFAULT closemessage - applymovement EVENT_OBJ_ID_PLAYER, MossdeepCity_SpaceCenter_2F_Movement_223E07 + applymovement EVENT_OBJ_ID_PLAYER, MossdeepCity_SpaceCenter_2F_Movement_PlayerExit waitmovement 0 warp MAP_MOSSDEEP_CITY_SPACE_CENTER_1F, 255, 13, 1 waitstate releaseall end -MossdeepCity_SpaceCenter_2F_Movement_223E07: @ 8223E07 +MossdeepCity_SpaceCenter_2F_Movement_PlayerExit: @ 8223E07 walk_up step_end -MossdeepCity_SpaceCenter_2F_EventScript_223E09:: @ 8223E09 - msgbox MossdeepCity_SpaceCenter_2F_Text_22442D, MSGBOX_DEFAULT - trainerbattle_no_intro TRAINER_GRUNT_34, MossdeepCity_SpaceCenter_2F_Text_224461 - applymovement 6, MossdeepCity_SpaceCenter_2F_Movement_223E85 +MossdeepCity_SpaceCenter_2F_EventScript_BattleThreeMagmaGrunts:: @ 8223E09 + msgbox MossdeepCity_SpaceCenter_2F_Text_Grunt34Intro, MSGBOX_DEFAULT + trainerbattle_no_intro TRAINER_GRUNT_34, MossdeepCity_SpaceCenter_2F_Text_Grunt34Defeat + applymovement 6, MossdeepCity_SpaceCenter_2F_Movement_Grunt34Defeated waitmovement 0 applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceFastestLeft waitmovement 0 - msgbox MossdeepCity_SpaceCenter_2F_Text_22446E, MSGBOX_DEFAULT - trainerbattle_no_intro TRAINER_GRUNT_35, MossdeepCity_SpaceCenter_2F_Text_224499 - applymovement 5, MossdeepCity_SpaceCenter_2F_Movement_223E81 + msgbox MossdeepCity_SpaceCenter_2F_Text_Grunt35Intro, MSGBOX_DEFAULT + trainerbattle_no_intro TRAINER_GRUNT_35, MossdeepCity_SpaceCenter_2F_Text_Grunt35Defeat + applymovement 5, MossdeepCity_SpaceCenter_2F_Movement_Grunt35Defeated waitmovement 0 applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceFastestRight waitmovement 0 - msgbox MossdeepCity_SpaceCenter_2F_Text_2244AB, MSGBOX_DEFAULT - trainerbattle_no_intro TRAINER_GRUNT_36, MossdeepCity_SpaceCenter_2F_Text_2244F1 - applymovement 7, MossdeepCity_SpaceCenter_2F_Movement_223E89 + msgbox MossdeepCity_SpaceCenter_2F_Text_Grunt36Intro, MSGBOX_DEFAULT + trainerbattle_no_intro TRAINER_GRUNT_36, MossdeepCity_SpaceCenter_2F_Text_Grunt36Defeat + applymovement 7, MossdeepCity_SpaceCenter_2F_Movement_Grunt36Defeated waitmovement 0 - setvar VAR_MOSSDEEP_SPACE_CENTER_STATE_2, 2 + setvar VAR_MOSSDEEP_SPACE_CENTER_STATE, 2 copyobjectxytoperm 5 copyobjectxytoperm 7 copyobjectxytoperm 6 releaseall end -MossdeepCity_SpaceCenter_2F_Movement_223E81: @ 8223E81 +MossdeepCity_SpaceCenter_2F_Movement_Grunt35Defeated: @ 8223E81 lock_facing_direction walk_left unlock_facing_direction step_end -MossdeepCity_SpaceCenter_2F_Movement_223E85: @ 8223E85 +MossdeepCity_SpaceCenter_2F_Movement_Grunt34Defeated: @ 8223E85 lock_facing_direction walk_down unlock_facing_direction step_end -MossdeepCity_SpaceCenter_2F_Movement_223E89: @ 8223E89 +MossdeepCity_SpaceCenter_2F_Movement_Grunt36Defeated: @ 8223E89 lock_facing_direction walk_right unlock_facing_direction step_end -MossdeepCity_SpaceCenter_2F_EventScript_223E8D:: @ 8223E8D +MossdeepCity_SpaceCenter_2F_EventScript_Scientist:: @ 8223E8D lock faceplayer - goto_if_set FLAG_SYS_GAME_CLEAR, MossdeepCity_SpaceCenter_2F_EventScript_223EB4 + goto_if_set FLAG_SYS_GAME_CLEAR, MossdeepCity_SpaceCenter_2F_EventScript_ScientistNormal compare VAR_MOSSDEEP_CITY_STATE, 2 - goto_if_eq MossdeepCity_SpaceCenter_2F_EventScript_223EBE + goto_if_eq MossdeepCity_SpaceCenter_2F_EventScript_ScientistMagma compare VAR_MOSSDEEP_CITY_STATE, 2 - goto_if_lt MossdeepCity_SpaceCenter_2F_EventScript_223EB4 - goto MossdeepCity_SpaceCenter_2F_EventScript_223EBE + goto_if_lt MossdeepCity_SpaceCenter_2F_EventScript_ScientistNormal + goto MossdeepCity_SpaceCenter_2F_EventScript_ScientistMagma end -MossdeepCity_SpaceCenter_2F_EventScript_223EB4:: @ 8223EB4 - msgbox MossdeepCity_SpaceCenter_2F_Text_2241A1, MSGBOX_DEFAULT +MossdeepCity_SpaceCenter_2F_EventScript_ScientistNormal:: @ 8223EB4 + msgbox MossdeepCity_SpaceCenter_2F_Text_MossdeepIdealForRockets, MSGBOX_DEFAULT release end -MossdeepCity_SpaceCenter_2F_EventScript_223EBE:: @ 8223EBE - msgbox MossdeepCity_SpaceCenter_2F_Text_22420C, MSGBOX_DEFAULT +MossdeepCity_SpaceCenter_2F_EventScript_ScientistMagma:: @ 8223EBE + msgbox MossdeepCity_SpaceCenter_2F_Text_WhyWouldMagmaStealRocketFuel, MSGBOX_DEFAULT release end -MossdeepCity_SpaceCenter_2F_EventScript_223EC8:: @ 8223EC8 +MossdeepCity_SpaceCenter_2F_EventScript_Gentleman:: @ 8223EC8 lock faceplayer - goto_if_set FLAG_SYS_GAME_CLEAR, MossdeepCity_SpaceCenter_2F_EventScript_223EEF + goto_if_set FLAG_SYS_GAME_CLEAR, MossdeepCity_SpaceCenter_2F_EventScript_GentlemanNormal compare VAR_MOSSDEEP_CITY_STATE, 2 - goto_if_eq MossdeepCity_SpaceCenter_2F_EventScript_223EF9 + goto_if_eq MossdeepCity_SpaceCenter_2F_EventScript_GentlemanMagma compare VAR_MOSSDEEP_CITY_STATE, 2 - goto_if_lt MossdeepCity_SpaceCenter_2F_EventScript_223EEF - goto MossdeepCity_SpaceCenter_2F_EventScript_223EF9 + goto_if_lt MossdeepCity_SpaceCenter_2F_EventScript_GentlemanNormal + goto MossdeepCity_SpaceCenter_2F_EventScript_GentlemanMagma end -MossdeepCity_SpaceCenter_2F_EventScript_223EEF:: @ 8223EEF - msgbox MossdeepCity_SpaceCenter_2F_Text_224253, MSGBOX_DEFAULT +MossdeepCity_SpaceCenter_2F_EventScript_GentlemanNormal:: @ 8223EEF + msgbox MossdeepCity_SpaceCenter_2F_Text_WouldveLikedToBeAstronaut, MSGBOX_DEFAULT release end -MossdeepCity_SpaceCenter_2F_EventScript_223EF9:: @ 8223EF9 - msgbox MossdeepCity_SpaceCenter_2F_Text_2242C5, MSGBOX_DEFAULT +MossdeepCity_SpaceCenter_2F_EventScript_GentlemanMagma:: @ 8223EF9 + msgbox MossdeepCity_SpaceCenter_2F_Text_MagmaCantGetAwayWithThis, MSGBOX_DEFAULT release end -MossdeepCity_SpaceCenter_2F_EventScript_223F03:: @ 8223F03 +MossdeepCity_SpaceCenter_2F_EventScript_RichBoy:: @ 8223F03 lock faceplayer - goto_if_set FLAG_SYS_GAME_CLEAR, MossdeepCity_SpaceCenter_2F_EventScript_223F2A + goto_if_set FLAG_SYS_GAME_CLEAR, MossdeepCity_SpaceCenter_2F_EventScript_RichBoyNormal compare VAR_MOSSDEEP_CITY_STATE, 2 - goto_if_eq MossdeepCity_SpaceCenter_2F_EventScript_223F34 + goto_if_eq MossdeepCity_SpaceCenter_2F_EventScript_RichBoyMagma compare VAR_MOSSDEEP_CITY_STATE, 2 - goto_if_lt MossdeepCity_SpaceCenter_2F_EventScript_223F2A - goto MossdeepCity_SpaceCenter_2F_EventScript_223F34 + goto_if_lt MossdeepCity_SpaceCenter_2F_EventScript_RichBoyNormal + goto MossdeepCity_SpaceCenter_2F_EventScript_RichBoyMagma end -MossdeepCity_SpaceCenter_2F_EventScript_223F2A:: @ 8223F2A - msgbox MossdeepCity_SpaceCenter_2F_Text_224342, MSGBOX_DEFAULT +MossdeepCity_SpaceCenter_2F_EventScript_RichBoyNormal:: @ 8223F2A + msgbox MossdeepCity_SpaceCenter_2F_Text_WishOrdinaryPeopleCouldGoIntoSpace, MSGBOX_DEFAULT release end -MossdeepCity_SpaceCenter_2F_EventScript_223F34:: @ 8223F34 - msgbox MossdeepCity_SpaceCenter_2F_Text_224376, MSGBOX_DEFAULT +MossdeepCity_SpaceCenter_2F_EventScript_RichBoyMagma:: @ 8223F34 + msgbox MossdeepCity_SpaceCenter_2F_Text_DoesMagmaWantToGoToSpace, MSGBOX_DEFAULT release end -MossdeepCity_SpaceCenter_2F_EventScript_223F3E:: @ 8223F3E - msgbox MossdeepCity_SpaceCenter_2F_Text_22452C, MSGBOX_NPC +@ Battle for the below 3 grunts is handled in MossdeepCity_SpaceCenter_2F_EventScript_BattleThreeMagmaGrunts +MossdeepCity_SpaceCenter_2F_EventScript_Grunt35:: @ 8223F3E + msgbox MossdeepCity_SpaceCenter_2F_Text_Grunt35PostBattle, MSGBOX_NPC end -MossdeepCity_SpaceCenter_2F_EventScript_223F47:: @ 8223F47 - msgbox MossdeepCity_SpaceCenter_2F_Text_224570, MSGBOX_NPC +MossdeepCity_SpaceCenter_2F_EventScript_Grunt36:: @ 8223F47 + msgbox MossdeepCity_SpaceCenter_2F_Text_Grunt36PostBattle, MSGBOX_NPC end -MossdeepCity_SpaceCenter_2F_EventScript_223F50:: @ 8223F50 - msgbox MossdeepCity_SpaceCenter_2F_Text_2245AF, MSGBOX_NPC +MossdeepCity_SpaceCenter_2F_EventScript_Grunt34:: @ 8223F50 + msgbox MossdeepCity_SpaceCenter_2F_Text_Grunt34PostBattle, MSGBOX_NPC end -MossdeepCity_SpaceCenter_2F_EventScript_223F59:: @ 8223F59 +MossdeepCity_SpaceCenter_2F_EventScript_Tabitha:: @ 8223F59 lock faceplayer - msgbox MossdeepCity_SpaceCenter_2F_Text_2245D9, MSGBOX_DEFAULT + msgbox MossdeepCity_SpaceCenter_2F_Text_WellTakeCareOfYou, MSGBOX_DEFAULT applymovement VAR_LAST_TALKED, Common_Movement_FaceOriginalDirection waitmovement 0 release end -MossdeepCity_SpaceCenter_2F_EventScript_223F6F:: @ 8223F6F +MossdeepCity_SpaceCenter_2F_EventScript_Maxie:: @ 8223F6F lockall - msgbox MossdeepCity_SpaceCenter_2F_Text_22467B, MSGBOX_DEFAULT + msgbox MossdeepCity_SpaceCenter_2F_Text_MaxieDontInterfere, MSGBOX_DEFAULT releaseall end -MossdeepCity_SpaceCenter_2F_EventScript_223F7A:: @ 8223F7A +MossdeepCity_SpaceCenter_2F_EventScript_Steven:: @ 8223F7A lockall - goto_if_set FLAG_INTERACTED_WITH_STEVEN_SPACE_CENTER, MossdeepCity_SpaceCenter_2F_EventScript_223FDA + goto_if_set FLAG_INTERACTED_WITH_STEVEN_SPACE_CENTER, MossdeepCity_SpaceCenter_2F_EventScript_ReadyForBattlePrompt setflag FLAG_INTERACTED_WITH_STEVEN_SPACE_CENTER - msgbox MossdeepCity_SpaceCenter_2F_Text_2246B2, MSGBOX_DEFAULT - msgbox MossdeepCity_SpaceCenter_2F_Text_2246F0, MSGBOX_DEFAULT + msgbox MossdeepCity_SpaceCenter_2F_Text_StevenWhyStealRocketFuel, MSGBOX_DEFAULT + msgbox MossdeepCity_SpaceCenter_2F_Text_MaxieUseFuelToEruptVolcano, MSGBOX_DEFAULT closemessage delay 30 playse SE_KOUKA_L switch VAR_FACING - case DIR_SOUTH, MossdeepCity_SpaceCenter_2F_EventScript_223FBA - applymovement 4, MossdeepCity_SpaceCenter_2F_Movement_223FC6 + case DIR_SOUTH, MossdeepCity_SpaceCenter_2F_EventScript_StevenFightMovementSouth + applymovement 4, MossdeepCity_SpaceCenter_2F_Movement_StevenFight waitmovement 0 releaseall end -MossdeepCity_SpaceCenter_2F_EventScript_223FBA:: @ 8223FBA - applymovement 4, MossdeepCity_SpaceCenter_2F_Movement_223FCF +MossdeepCity_SpaceCenter_2F_EventScript_StevenFightMovementSouth:: @ 8223FBA + applymovement 4, MossdeepCity_SpaceCenter_2F_Movement_StevenFightSouth waitmovement 0 releaseall end -MossdeepCity_SpaceCenter_2F_Movement_223FC6: @ 8223FC6 +MossdeepCity_SpaceCenter_2F_Movement_StevenFight: @ 8223FC6 lock_facing_direction walk_fast_up walk_fast_up @@ -217,7 +218,7 @@ MossdeepCity_SpaceCenter_2F_Movement_223FC6: @ 8223FC6 walk_slow_down step_end -MossdeepCity_SpaceCenter_2F_Movement_223FCF: @ 8223FCF +MossdeepCity_SpaceCenter_2F_Movement_StevenFightSouth: @ 8223FCF face_left lock_facing_direction walk_fast_right @@ -230,20 +231,20 @@ MossdeepCity_SpaceCenter_2F_Movement_223FCF: @ 8223FCF face_down step_end -MossdeepCity_SpaceCenter_2F_EventScript_223FDA:: @ 8223FDA +MossdeepCity_SpaceCenter_2F_EventScript_ReadyForBattlePrompt:: @ 8223FDA applymovement VAR_LAST_TALKED, Common_Movement_FacePlayer waitmovement 0 - msgbox MossdeepCity_SpaceCenter_2F_Text_2247FF, MSGBOX_YESNO + msgbox MossdeepCity_SpaceCenter_2F_Text_StevenAreYouReadyToBattle, MSGBOX_YESNO compare VAR_RESULT, 1 - goto_if_eq MossdeepCity_SpaceCenter_2F_EventScript_22400C - msgbox MossdeepCity_SpaceCenter_2F_Text_224854, MSGBOX_DEFAULT + goto_if_eq MossdeepCity_SpaceCenter_2F_EventScript_ChoosePartyForMultiBattle + msgbox MossdeepCity_SpaceCenter_2F_Text_StevenHurryGetReadyQuickly, MSGBOX_DEFAULT closemessage applymovement VAR_LAST_TALKED, Common_Movement_WalkInPlaceFastestDown waitmovement 0 releaseall end -MossdeepCity_SpaceCenter_2F_EventScript_22400C:: @ 822400C +MossdeepCity_SpaceCenter_2F_EventScript_ChoosePartyForMultiBattle:: @ 822400C applymovement VAR_LAST_TALKED, Common_Movement_WalkInPlaceFastestDown waitmovement 0 special SavePlayerParty @@ -251,11 +252,11 @@ MossdeepCity_SpaceCenter_2F_EventScript_22400C:: @ 822400C special ChooseHalfPartyForBattle waitstate compare VAR_RESULT, 0 - goto_if_ne MossdeepCity_SpaceCenter_2F_EventScript_224032 + goto_if_ne MossdeepCity_SpaceCenter_2F_EventScript_DoStevenMultiBattle special LoadPlayerParty - goto MossdeepCity_SpaceCenter_2F_EventScript_223FDA + goto MossdeepCity_SpaceCenter_2F_EventScript_ReadyForBattlePrompt -MossdeepCity_SpaceCenter_2F_EventScript_224032:: @ 8224032 +MossdeepCity_SpaceCenter_2F_EventScript_DoStevenMultiBattle:: @ 8224032 special ReducePlayerPartyToSelectedMons setvar VAR_0x8004, 2 setvar VAR_0x8005, 4 @@ -268,13 +269,13 @@ MossdeepCity_SpaceCenter_2F_EventScript_224032:: @ 8224032 special CallFrontierUtilFunc special LoadPlayerParty switch VAR_RESULT - case 1, MossdeepCity_SpaceCenter_2F_EventScript_224071 + case 1, MossdeepCity_SpaceCenter_2F_EventScript_DefeatedMaxieTabitha fadescreen 1 special SetCB2WhiteOut waitstate -MossdeepCity_SpaceCenter_2F_EventScript_224071:: @ 8224071 - msgbox MossdeepCity_SpaceCenter_2F_Text_2248C2, MSGBOX_DEFAULT +MossdeepCity_SpaceCenter_2F_EventScript_DefeatedMaxieTabitha:: @ 8224071 + msgbox MossdeepCity_SpaceCenter_2F_Text_MaxieWeFailedIsAquaAlsoMisguided, MSGBOX_DEFAULT closemessage delay 20 applymovement 9, Common_Movement_WalkInPlaceFastestLeft @@ -285,12 +286,12 @@ MossdeepCity_SpaceCenter_2F_EventScript_224071:: @ 8224071 applymovement 8, Common_Movement_WalkInPlaceFastestRight waitmovement 0 delay 20 - msgbox MossdeepCity_SpaceCenter_2F_Text_2249DC, MSGBOX_DEFAULT + msgbox MossdeepCity_SpaceCenter_2F_Text_MaxieWeWillGiveUp, MSGBOX_DEFAULT closemessage setvar VAR_MOSSDEEP_CITY_STATE, 3 fadedefaultbgm fadescreen 1 - setvar VAR_MOSSDEEP_SPACE_CENTER_STATE_2, 3 + setvar VAR_MOSSDEEP_SPACE_CENTER_STATE, 3 setflag FLAG_HIDE_MOSSDEEP_CITY_SPACE_CENTER_1F_TEAM_MAGMA setflag FLAG_HIDE_MOSSDEEP_CITY_SPACE_CENTER_2F_TEAM_MAGMA setflag FLAG_HIDE_MOSSDEEP_CITY_TEAM_MAGMA @@ -305,15 +306,15 @@ MossdeepCity_SpaceCenter_2F_EventScript_224071:: @ 8224071 turnobject 2, DIR_NORTH setobjectxy 1, 6, 2 turnobject 1, DIR_NORTH - call MossdeepCity_SpaceCenter_2F_EventScript_224131 + call MossdeepCity_SpaceCenter_2F_EventScript_StevenFacePlayer fadescreen 0 - msgbox MossdeepCity_SpaceCenter_2F_Text_224A4A, MSGBOX_DEFAULT + msgbox MossdeepCity_SpaceCenter_2F_Text_StevenThankYouComeSeeMeAtHome, MSGBOX_DEFAULT closemessage fadescreen 1 setflag FLAG_DEFEATED_MAGMA_SPACE_CENTER setflag FLAG_HIDE_MOSSDEEP_CITY_STEVENS_HOUSE_STEVEN removeobject 4 - setflag FLAG_HIDE_MOSSDEEP_CITY_SPACE_CENTER_INVISIBLE_NINJA_BOY + setflag FLAG_HIDE_MOSSDEEP_CITY_SPACE_CENTER_MAGMA_NOTE clearflag FLAG_HIDE_MOSSDEEP_CITY_STEVENS_HOUSE_STEVEN setvar VAR_STEVENS_HOUSE_STATE, 1 setflag FLAG_HIDE_MOSSDEEP_CITY_SCOTT @@ -324,142 +325,142 @@ MossdeepCity_SpaceCenter_2F_EventScript_224071:: @ 8224071 fadescreen 0 end -MossdeepCity_SpaceCenter_2F_EventScript_224131:: @ 8224131 +MossdeepCity_SpaceCenter_2F_EventScript_StevenFacePlayer:: @ 8224131 switch VAR_FACING - case DIR_SOUTH, MossdeepCity_SpaceCenter_2F_EventScript_22414D - case DIR_WEST, MossdeepCity_SpaceCenter_2F_EventScript_224152 + case DIR_SOUTH, MossdeepCity_SpaceCenter_2F_EventScript_StevenFacePlayerSouth + case DIR_WEST, MossdeepCity_SpaceCenter_2F_EventScript_StevenFacePlayerWest return -MossdeepCity_SpaceCenter_2F_EventScript_22414D:: @ 822414D +MossdeepCity_SpaceCenter_2F_EventScript_StevenFacePlayerSouth:: @ 822414D turnobject 4, DIR_NORTH return -MossdeepCity_SpaceCenter_2F_EventScript_224152:: @ 8224152 +MossdeepCity_SpaceCenter_2F_EventScript_StevenFacePlayerWest:: @ 8224152 turnobject 4, DIR_EAST return -MossdeepCity_SpaceCenter_2F_EventScript_224157:: @ 8224157 - trainerbattle TRAINER_BATTLE_SET_TRAINER_A, TRAINER_MAXIE_3, 0, MossdeepCity_SpaceCenter_2F_Text_22487C, MossdeepCity_SpaceCenter_2F_Text_22487C +MossdeepCity_SpaceCenter_2F_EventScript_MaxieTrainer:: @ 8224157 + trainerbattle TRAINER_BATTLE_SET_TRAINER_A, TRAINER_MAXIE_3, 0, MossdeepCity_SpaceCenter_2F_Text_JustWantToExpandLand, MossdeepCity_SpaceCenter_2F_Text_JustWantToExpandLand end -MossdeepCity_SpaceCenter_2F_EventScript_224166:: @ 8224166 - trainerbattle TRAINER_BATTLE_SET_TRAINER_B, TRAINER_TABITHA_1, 0, MossdeepCity_SpaceCenter_Text_2248AD, MossdeepCity_SpaceCenter_Text_2248AD +MossdeepCity_SpaceCenter_2F_EventScript_TabithaTrainer:: @ 8224166 + trainerbattle TRAINER_BATTLE_SET_TRAINER_B, TRAINER_TABITHA_1, 0, MossdeepCity_SpaceCenter_Text_TabithaDefeat, MossdeepCity_SpaceCenter_Text_TabithaDefeat end -MossdeepCity_SpaceCenter_2F_EventScript_224175:: @ 8224175 +MossdeepCity_SpaceCenter_2F_EventScript_RivalRayquazaCall:: @ 8224175 lockall checkplayergender compare VAR_RESULT, MALE - call_if_eq MossdeepCity_SpaceCenter_2F_EventScript_224193 + call_if_eq MossdeepCity_SpaceCenter_2F_EventScript_MayRayquazaCall compare VAR_RESULT, FEMALE - call_if_eq MossdeepCity_SpaceCenter_2F_EventScript_22419A + call_if_eq MossdeepCity_SpaceCenter_2F_EventScript_BrendanRayquazaCall closemessage clearflag FLAG_DEFEATED_MAGMA_SPACE_CENTER releaseall end -MossdeepCity_SpaceCenter_2F_EventScript_224193:: @ 8224193 - pokenavcall MossdeepCity_SpaceCenter_2F_Text_2B38C1 +MossdeepCity_SpaceCenter_2F_EventScript_MayRayquazaCall:: @ 8224193 + pokenavcall MossdeepCity_SpaceCenter_2F_Text_MayRayquazaCall waitmessage return -MossdeepCity_SpaceCenter_2F_EventScript_22419A:: @ 822419A - pokenavcall MossdeepCity_SpaceCenter_2F_Text_2B39C6 +MossdeepCity_SpaceCenter_2F_EventScript_BrendanRayquazaCall:: @ 822419A + pokenavcall MossdeepCity_SpaceCenter_2F_Text_BrendanRayquazaCall waitmessage return -MossdeepCity_SpaceCenter_2F_Text_2241A1: @ 82241A1 +MossdeepCity_SpaceCenter_2F_Text_MossdeepIdealForRockets: @ 82241A1 .string "MOSSDEEP has mainly sunny weather,\n" .string "and its winds are stable.\p" .string "It's an ideal location for launching\n" .string "rockets.$" -MossdeepCity_SpaceCenter_2F_Text_22420C: @ 822420C +MossdeepCity_SpaceCenter_2F_Text_WhyWouldMagmaStealRocketFuel: @ 822420C .string "Why would TEAM MAGMA want to steal\n" .string "our rocket fuel in the first place?$" -MossdeepCity_SpaceCenter_2F_Text_224253: @ 8224253 +MossdeepCity_SpaceCenter_2F_Text_WouldveLikedToBeAstronaut: @ 8224253 .string "If only I was a little younger, I would\n" .string "have liked being an astronaut…\p" .string "No… It's not too late!\n" .string "I can and will try!$" -MossdeepCity_SpaceCenter_2F_Text_2242C5: @ 82242C5 +MossdeepCity_SpaceCenter_2F_Text_MagmaCantGetAwayWithThis: @ 82242C5 .string "If TEAM MAGMA takes the rocket fuel,\n" .string "I won't be able to go to space!\p" .string "They can't be allowed to get away\n" .string "with such an outrage!$" -MossdeepCity_SpaceCenter_2F_Text_224342: @ 8224342 +MossdeepCity_SpaceCenter_2F_Text_WishOrdinaryPeopleCouldGoIntoSpace: @ 8224342 .string "I wish ordinary people could go into\n" .string "space one day…$" -MossdeepCity_SpaceCenter_2F_Text_224376: @ 8224376 +MossdeepCity_SpaceCenter_2F_Text_DoesMagmaWantToGoToSpace: @ 8224376 .string "TEAM MAGMA…\n" .string "Do they want to go to space, too?$" -MossdeepCity_SpaceCenter_2F_Text_2243A4: @ 82243A4 +MossdeepCity_SpaceCenter_2F_Text_YoureOutnumberedTakeUsOn: @ 82243A4 .string "What's wrong with you?\p" .string "You're outnumbered three to one,\n" .string "but you still want to take us on?$" -MossdeepCity_SpaceCenter_2F_Text_2243FE: @ 82243FE +MossdeepCity_SpaceCenter_2F_Text_GoodAnswer: @ 82243FE .string "Good answer!\n" .string "That's what a smart person'll do!$" -MossdeepCity_SpaceCenter_2F_Text_22442D: @ 822442D +MossdeepCity_SpaceCenter_2F_Text_Grunt34Intro: @ 822442D .string "A reckless go-getter, are you?\n" .string "Okay, I'll go first!$" -MossdeepCity_SpaceCenter_2F_Text_224461: @ 8224461 +MossdeepCity_SpaceCenter_2F_Text_Grunt34Defeat: @ 8224461 .string "I lost!\n" .string "But!$" -MossdeepCity_SpaceCenter_2F_Text_22446E: @ 822446E +MossdeepCity_SpaceCenter_2F_Text_Grunt35Intro: @ 822446E .string "It's too soon to be relieved!\n" .string "I'm up next!$" -MossdeepCity_SpaceCenter_2F_Text_224499: @ 8224499 +MossdeepCity_SpaceCenter_2F_Text_Grunt35Defeat: @ 8224499 .string "I lost, too!\n" .string "But!$" -MossdeepCity_SpaceCenter_2F_Text_2244AB: @ 82244AB +MossdeepCity_SpaceCenter_2F_Text_Grunt36Intro: @ 82244AB .string "I bet you want to take a break.\n" .string "But I'm not about to let you do that!$" -MossdeepCity_SpaceCenter_2F_Text_2244F1: @ 82244F1 +MossdeepCity_SpaceCenter_2F_Text_Grunt36Defeat: @ 82244F1 .string "We should've taken a break…\n" .string "That's what we should've done…$" -MossdeepCity_SpaceCenter_2F_Text_22452C: @ 822452C +MossdeepCity_SpaceCenter_2F_Text_Grunt35PostBattle: @ 822452C .string "Three of us here, and look at the sorry\n" .string "mess we got ourselves into.$" -MossdeepCity_SpaceCenter_2F_Text_224570: @ 8224570 +MossdeepCity_SpaceCenter_2F_Text_Grunt36PostBattle: @ 8224570 .string "We three losing like this…\n" .string "We look worse than usual by triple!$" -MossdeepCity_SpaceCenter_2F_Text_2245AF: @ 82245AF +MossdeepCity_SpaceCenter_2F_Text_Grunt34PostBattle: @ 82245AF .string "Are we being useful to our leader\n" .string "at all?$" -MossdeepCity_SpaceCenter_2F_Text_2245D9: @ 82245D9 +MossdeepCity_SpaceCenter_2F_Text_WellTakeCareOfYou: @ 82245D9 .string "Hehehe!\p" .string "We come all the way here to get some\n" .string "fuel, and we're interfered with again!\p" .string "If you're going to mess with us too,\n" .string "we'll take care of you at the same time!$" -MossdeepCity_SpaceCenter_2F_Text_22467B: @ 822467B +MossdeepCity_SpaceCenter_2F_Text_MaxieDontInterfere: @ 822467B .string "MAXIE: Clear out of the way!\n" .string "Don't you dare interfere!$" -MossdeepCity_SpaceCenter_2F_Text_2246B2: @ 82246B2 +MossdeepCity_SpaceCenter_2F_Text_StevenWhyStealRocketFuel: @ 82246B2 .string "STEVEN: TEAM MAGMA…\p" .string "What's the point of stealing rocket\n" .string "fuel?$" -MossdeepCity_SpaceCenter_2F_Text_2246F0: @ 82246F0 +MossdeepCity_SpaceCenter_2F_Text_MaxieUseFuelToEruptVolcano: @ 82246F0 .string "MAXIE: Fufufu… Since you're so\n" .string "curious, you deserve an explanation.\p" .string "We're going to jettison the entire\n" @@ -470,24 +471,24 @@ MossdeepCity_SpaceCenter_2F_Text_2246F0: @ 82246F0 .string "the volcano erupt!\p" .string "It will be savage!$" -MossdeepCity_SpaceCenter_2F_Text_2247FF: @ 82247FF +MossdeepCity_SpaceCenter_2F_Text_StevenAreYouReadyToBattle: @ 82247FF .string "STEVEN: {PLAYER}{KUN}!\n" .string "You're going to help me?\p" .string "Let's go into battle together!\n" .string "Are you ready?$" -MossdeepCity_SpaceCenter_2F_Text_224854: @ 8224854 +MossdeepCity_SpaceCenter_2F_Text_StevenHurryGetReadyQuickly: @ 8224854 .string "STEVEN: Then, hurry!\n" .string "Get ready quickly!$" -MossdeepCity_SpaceCenter_2F_Text_22487C: @ 822487C +MossdeepCity_SpaceCenter_2F_Text_JustWantToExpandLand: @ 822487C .string "All I want…\n" .string "I just want to expand the land mass…$" -MossdeepCity_SpaceCenter_Text_2248AD: @ 82248AD +MossdeepCity_SpaceCenter_Text_TabithaDefeat: @ 82248AD .string "I'm with our leader…$" -MossdeepCity_SpaceCenter_2F_Text_2248C2: @ 82248C2 +MossdeepCity_SpaceCenter_2F_Text_MaxieWeFailedIsAquaAlsoMisguided: @ 82248C2 .string "MAXIE: We failed to make the volcano\n" .string "erupt…\p" .string "We failed to control GROUDON after\n" @@ -502,13 +503,13 @@ MossdeepCity_SpaceCenter_2F_Text_2248C2: @ 82248C2 .string "Then might TEAM AQUA's goal to expand\n" .string "the sea also be equally misguided?$" -MossdeepCity_SpaceCenter_2F_Text_2249DC: @ 82249DC +MossdeepCity_SpaceCenter_2F_Text_MaxieWeWillGiveUp: @ 82249DC .string "MAXIE: All right…\n" .string "We will give up on the fuel…\p" .string "There appear to be more important\n" .string "matters that I must examine…$" -MossdeepCity_SpaceCenter_2F_Text_224A4A: @ 8224A4A +MossdeepCity_SpaceCenter_2F_Text_StevenThankYouComeSeeMeAtHome: @ 8224A4A .string "STEVEN: Whew, that was too tense.\n" .string "{PLAYER}{KUN}, thank you.\p" .string "I have something to give you as\n" diff --git a/data/maps/MtChimney/map.json b/data/maps/MtChimney/map.json index 2b19e7f8d8..c0763b1bc5 100644 --- a/data/maps/MtChimney/map.json +++ b/data/maps/MtChimney/map.json @@ -24,7 +24,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "MtChimney_EventScript_22EDD5", + "script": "MtChimney_EventScript_Archie", "flag": "FLAG_HIDE_MT_CHIMNEY_TEAM_AQUA" }, { @@ -37,7 +37,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "MtChimney_EventScript_22EE0B", + "script": "MtChimney_EventScript_Maxie", "flag": "FLAG_HIDE_MT_CHIMNEY_TEAM_MAGMA" }, { @@ -50,7 +50,7 @@ "movement_range_y": 0, "trainer_type": "1", "trainer_sight_or_berry_tree_id": "2", - "script": "MtChimney_EventScript_22F06E", + "script": "MtChimney_EventScript_Tabitha", "flag": "FLAG_HIDE_MT_CHIMNEY_TEAM_MAGMA" }, { @@ -63,7 +63,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "MtChimney_EventScript_22F0C0", + "script": "MtChimney_EventScript_BusyMagmaGrunt5", "flag": "FLAG_HIDE_MT_CHIMNEY_TEAM_MAGMA" }, { @@ -76,7 +76,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "MtChimney_EventScript_22F0B7", + "script": "MtChimney_EventScript_BusyMagmaGrunt4", "flag": "FLAG_HIDE_MT_CHIMNEY_TEAM_MAGMA" }, { @@ -89,7 +89,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "MtChimney_EventScript_22F05C", + "script": "MtChimney_EventScript_BusyAquaGrunt2", "flag": "FLAG_HIDE_MT_CHIMNEY_TEAM_AQUA" }, { @@ -102,7 +102,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "MtChimney_EventScript_22F053", + "script": "MtChimney_EventScript_BusyAquaGrunt1", "flag": "FLAG_HIDE_MT_CHIMNEY_TEAM_AQUA" }, { @@ -115,7 +115,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "MtChimney_EventScript_22F065", + "script": "MtChimney_EventScript_BusyAquaGrunt3", "flag": "FLAG_HIDE_MT_CHIMNEY_TEAM_AQUA" }, { @@ -128,7 +128,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "MtChimney_EventScript_22EEF3", + "script": "MtChimney_EventScript_LavaCookieLady", "flag": "FLAG_HIDE_MT_CHIMNEY_LAVA_COOKIE_LADY" }, { @@ -141,7 +141,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "MtChimney_EventScript_22F0C9", + "script": "MtChimney_EventScript_BusyMagmaGrunt6", "flag": "FLAG_HIDE_MT_CHIMNEY_TEAM_MAGMA" }, { @@ -154,7 +154,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "MtChimney_EventScript_22F0DB", + "script": "MtChimney_EventScript_AquaPoochyena", "flag": "FLAG_HIDE_MT_CHIMNEY_TEAM_AQUA" }, { @@ -167,7 +167,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "MtChimney_EventScript_22F0D2", + "script": "MtChimney_EventScript_MagmaPoochyena", "flag": "FLAG_HIDE_MT_CHIMNEY_TEAM_MAGMA" }, { @@ -180,7 +180,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "MtChimney_EventScript_22F0A5", + "script": "MtChimney_EventScript_BusyMagmaGrunt2", "flag": "FLAG_HIDE_MT_CHIMNEY_TEAM_MAGMA" }, { @@ -193,7 +193,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "MtChimney_EventScript_22F0D2", + "script": "MtChimney_EventScript_MagmaPoochyena", "flag": "FLAG_HIDE_MT_CHIMNEY_TEAM_MAGMA" }, { @@ -206,7 +206,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "MtChimney_EventScript_22F0D2", + "script": "MtChimney_EventScript_MagmaPoochyena", "flag": "FLAG_HIDE_MT_CHIMNEY_TEAM_MAGMA" }, { @@ -219,7 +219,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "MtChimney_EventScript_22F0AE", + "script": "MtChimney_EventScript_BusyMagmaGrunt3", "flag": "FLAG_HIDE_MT_CHIMNEY_TEAM_MAGMA" }, { @@ -232,7 +232,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "MtChimney_EventScript_22F09C", + "script": "MtChimney_EventScript_BusyMagmaGrunt1", "flag": "FLAG_HIDE_MT_CHIMNEY_TEAM_MAGMA" }, { @@ -245,7 +245,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "MtChimney_EventScript_22F0DB", + "script": "MtChimney_EventScript_AquaPoochyena", "flag": "FLAG_HIDE_MT_CHIMNEY_TEAM_AQUA" }, { @@ -258,7 +258,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "MtChimney_EventScript_22F0D2", + "script": "MtChimney_EventScript_MagmaPoochyena", "flag": "FLAG_HIDE_MT_CHIMNEY_TEAM_MAGMA" }, { @@ -271,7 +271,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "MtChimney_EventScript_22F0DB", + "script": "MtChimney_EventScript_AquaPoochyena", "flag": "FLAG_HIDE_MT_CHIMNEY_TEAM_AQUA" }, { @@ -284,7 +284,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "MtChimney_EventScript_22F0D2", + "script": "MtChimney_EventScript_MagmaPoochyena", "flag": "FLAG_HIDE_MT_CHIMNEY_TEAM_MAGMA" }, { @@ -297,7 +297,7 @@ "movement_range_y": 0, "trainer_type": "1", "trainer_sight_or_berry_tree_id": "3", - "script": "MtChimney_EventScript_22F085", + "script": "MtChimney_EventScript_Grunt31", "flag": "FLAG_HIDE_MT_CHIMNEY_TEAM_MAGMA" }, { @@ -310,7 +310,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "MtChimney_EventScript_22F0DB", + "script": "MtChimney_EventScript_AquaPoochyena", "flag": "FLAG_HIDE_MT_CHIMNEY_TEAM_AQUA" }, { @@ -323,7 +323,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "MtChimney_EventScript_22F0D2", + "script": "MtChimney_EventScript_MagmaPoochyena", "flag": "FLAG_HIDE_MT_CHIMNEY_TEAM_MAGMA" }, { @@ -336,7 +336,7 @@ "movement_range_y": 0, "trainer_type": "1", "trainer_sight_or_berry_tree_id": "3", - "script": "MtChimney_EventScript_22F14A", + "script": "MtChimney_EventScript_Shelby", "flag": "FLAG_HIDE_MT_CHIMNEY_TRAINERS" }, { @@ -349,7 +349,7 @@ "movement_range_y": 0, "trainer_type": "1", "trainer_sight_or_berry_tree_id": "6", - "script": "MtChimney_EventScript_22F1AC", + "script": "MtChimney_EventScript_Melissa", "flag": "FLAG_HIDE_MT_CHIMNEY_TRAINERS" }, { @@ -362,7 +362,7 @@ "movement_range_y": 1, "trainer_type": "1", "trainer_sight_or_berry_tree_id": "3", - "script": "MtChimney_EventScript_22F1C3", + "script": "MtChimney_EventScript_Sheila", "flag": "FLAG_HIDE_MT_CHIMNEY_TRAINERS" }, { @@ -375,7 +375,7 @@ "movement_range_y": 1, "trainer_type": "1", "trainer_sight_or_berry_tree_id": "3", - "script": "MtChimney_EventScript_22F1DA", + "script": "MtChimney_EventScript_Shirley", "flag": "FLAG_HIDE_MT_CHIMNEY_TRAINERS" }, { @@ -388,7 +388,7 @@ "movement_range_y": 1, "trainer_type": "1", "trainer_sight_or_berry_tree_id": "3", - "script": "MtChimney_EventScript_22F1F1", + "script": "MtChimney_EventScript_Grunt24", "flag": "FLAG_HIDE_MT_CHIMNEY_TEAM_MAGMA" }, { @@ -401,7 +401,7 @@ "movement_range_y": 1, "trainer_type": "1", "trainer_sight_or_berry_tree_id": "6", - "script": "MtChimney_EventScript_22F208", + "script": "MtChimney_EventScript_Sawyer", "flag": "FLAG_HIDE_MT_CHIMNEY_TRAINERS" } ], @@ -443,7 +443,7 @@ "y": 6, "elevation": 0, "player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY", - "script": "MtChimney_EventScript_22F0E4" + "script": "MtChimney_EventScript_MeteoriteMachine" }, { "type": "sign", @@ -451,7 +451,7 @@ "y": 37, "elevation": 3, "player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY", - "script": "MtChimney_EventScript_22F141" + "script": "MtChimney_EventScript_RouteSign" } ] } \ No newline at end of file diff --git a/data/maps/MtChimney/scripts.inc b/data/maps/MtChimney/scripts.inc index 91cdb9e423..de2ce9e8f1 100644 --- a/data/maps/MtChimney/scripts.inc +++ b/data/maps/MtChimney/scripts.inc @@ -1,5 +1,5 @@ MtChimney_MapScripts:: @ 822EDC1 - map_script MAP_SCRIPT_ON_RESUME, MtChimney_MapScript1_22EDD2 + map_script MAP_SCRIPT_ON_RESUME, MtChimney_OnResume map_script MAP_SCRIPT_ON_TRANSITION, MtChimney_OnTransition .byte 0 @@ -7,15 +7,15 @@ MtChimney_OnTransition: @ 822EDCC setvar VAR_JAGGED_PASS_ASH_WEATHER, 1 end -MtChimney_MapScript1_22EDD2: @ 822EDD2 +MtChimney_OnResume: @ 822EDD2 setstepcallback STEP_CB_ASH end -MtChimney_EventScript_22EDD5:: @ 822EDD5 +MtChimney_EventScript_Archie:: @ 822EDD5 lock faceplayer - call_if_unset FLAG_EVIL_LEADER_PLEASE_STOP, MtChimney_EventScript_22EDF9 - call_if_set FLAG_EVIL_LEADER_PLEASE_STOP, MtChimney_EventScript_22EE02 + call_if_unset FLAG_EVIL_LEADER_PLEASE_STOP, MtChimney_EventScript_ArchieGoStopTeamMagma + call_if_set FLAG_EVIL_LEADER_PLEASE_STOP, MtChimney_EventScript_ArchieBusyFighting closemessage applymovement 1, Common_Movement_FaceOriginalDirection waitmovement 0 @@ -23,18 +23,18 @@ MtChimney_EventScript_22EDD5:: @ 822EDD5 release end -MtChimney_EventScript_22EDF9:: @ 822EDF9 - msgbox MtChimney_Text_22FAD2, MSGBOX_DEFAULT +MtChimney_EventScript_ArchieGoStopTeamMagma:: @ 822EDF9 + msgbox MtChimney_Text_ArchieGoStopTeamMagma, MSGBOX_DEFAULT return -MtChimney_EventScript_22EE02:: @ 822EE02 - msgbox MtChimney_Text_22FBC7, MSGBOX_DEFAULT +MtChimney_EventScript_ArchieBusyFighting:: @ 822EE02 + msgbox MtChimney_Text_ArchieIHaveMyHandsFull, MSGBOX_DEFAULT return -MtChimney_EventScript_22EE0B:: @ 822EE0B +MtChimney_EventScript_Maxie:: @ 822EE0B lockall playbgm MUS_MGM0, 0 - msgbox MtChimney_Text_22F26A, MSGBOX_DEFAULT + msgbox MtChimney_Text_MeteoriteWillActivateVolcano, MSGBOX_DEFAULT applymovement 2, Common_Movement_FacePlayer waitmovement 0 playse SE_PIN @@ -42,9 +42,9 @@ MtChimney_EventScript_22EE0B:: @ 822EE0B waitmovement 0 applymovement 2, Common_Movement_Delay48 waitmovement 0 - msgbox MtChimney_Text_22F32E, MSGBOX_DEFAULT - trainerbattle_no_intro TRAINER_MAXIE_2, MtChimney_Text_22F5CF - msgbox MtChimney_Text_22F5F7, MSGBOX_DEFAULT + msgbox MtChimney_Text_MaxieIntro, MSGBOX_DEFAULT + trainerbattle_no_intro TRAINER_MAXIE_2, MtChimney_Text_MaxieDefeat + msgbox MtChimney_Text_MaxieYouHaventSeenLastOfMagma, MSGBOX_DEFAULT closemessage delay 30 fadescreen 1 @@ -57,17 +57,17 @@ MtChimney_EventScript_22EE0B:: @ 822EE0B setobjectxyperm 1, 10, 12 addobject 1 compare VAR_FACING, DIR_EAST - call_if_eq MtChimney_EventScript_22EEC7 + call_if_eq MtChimney_EventScript_ArchieApproachPlayerEast compare VAR_FACING, DIR_NORTH - call_if_eq MtChimney_EventScript_22EED2 + call_if_eq MtChimney_EventScript_ArchieApproachPlayerNorth applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceFastestLeft waitmovement 0 - msgbox MtChimney_Text_22FC3D, MSGBOX_DEFAULT + msgbox MtChimney_Text_ArchieThankYou, MSGBOX_DEFAULT closemessage compare VAR_FACING, DIR_EAST - call_if_eq MtChimney_EventScript_22EEDD + call_if_eq MtChimney_EventScript_ArchieExitEast compare VAR_FACING, DIR_NORTH - call_if_eq MtChimney_EventScript_22EEE8 + call_if_eq MtChimney_EventScript_ArchieExitNorth removeobject 1 setflag FLAG_HIDE_MT_CHIMNEY_TEAM_AQUA setflag FLAG_DEFEATED_EVIL_TEAM_MT_CHIMNEY @@ -77,50 +77,50 @@ MtChimney_EventScript_22EE0B:: @ 822EE0B releaseall end -MtChimney_EventScript_22EEC7:: @ 822EEC7 - applymovement 1, MtChimney_Movement_22EF83 +MtChimney_EventScript_ArchieApproachPlayerEast:: @ 822EEC7 + applymovement 1, MtChimney_Movement_ArchieApproachPlayerEast waitmovement 0 return -MtChimney_EventScript_22EED2:: @ 822EED2 - applymovement 1, MtChimney_Movement_22EF94 +MtChimney_EventScript_ArchieApproachPlayerNorth:: @ 822EED2 + applymovement 1, MtChimney_Movement_ArchieApproachPlayerNorth waitmovement 0 return -MtChimney_EventScript_22EEDD:: @ 822EEDD - applymovement 1, MtChimney_Movement_22EF8B +MtChimney_EventScript_ArchieExitEast:: @ 822EEDD + applymovement 1, MtChimney_Movement_ArchieExitEast waitmovement 0 return -MtChimney_EventScript_22EEE8:: @ 822EEE8 - applymovement 1, MtChimney_Movement_22EF9C +MtChimney_EventScript_ArchieExitNorth:: @ 822EEE8 + applymovement 1, MtChimney_Movement_ArchieExitNorth waitmovement 0 return -MtChimney_EventScript_22EEF3:: @ 822EEF3 +MtChimney_EventScript_LavaCookieLady:: @ 822EEF3 lock faceplayer showmoneybox 0, 0, 0 - msgbox MtChimney_Text_22FE04, MSGBOX_YESNO + msgbox MtChimney_Text_LavaCookiesJust200, MSGBOX_YESNO compare VAR_RESULT, 0 - goto_if_eq MtChimney_EventScript_22EF69 + goto_if_eq MtChimney_EventScript_DeclineLavaCookie checkmoney 200, 0 - compare VAR_RESULT, 0 - goto_if_eq MtChimney_EventScript_22EF76 - msgbox MtChimney_Text_22FE4D, MSGBOX_DEFAULT + compare VAR_RESULT, FALSE + goto_if_eq MtChimney_EventScript_NotEnoughMoney + msgbox MtChimney_Text_ThankYouDear, MSGBOX_DEFAULT checkitemspace ITEM_LAVA_COOKIE, 1 - compare VAR_RESULT, 1 - call_if_eq MtChimney_EventScript_22EF5E + compare VAR_RESULT, TRUE + call_if_eq MtChimney_EventScript_TakeMoney giveitem_std ITEM_LAVA_COOKIE - compare VAR_RESULT, 0 - goto_if_eq MtChimney_EventScript_22EF51 + compare VAR_RESULT, FALSE + goto_if_eq MtChimney_EventScript_BagIsFull hidemoneybox nop nop release end -MtChimney_EventScript_22EF51:: @ 822EF51 +MtChimney_EventScript_BagIsFull:: @ 822EF51 msgbox gText_TooBadBagIsFull, MSGBOX_DEFAULT hidemoneybox nop @@ -128,28 +128,28 @@ MtChimney_EventScript_22EF51:: @ 822EF51 release end -MtChimney_EventScript_22EF5E:: @ 822EF5E +MtChimney_EventScript_TakeMoney:: @ 822EF5E takemoney 200, 0 updatemoneybox 0, 0 return -MtChimney_EventScript_22EF69:: @ 822EF69 - msgbox MtChimney_Text_22FE9B, MSGBOX_DEFAULT +MtChimney_EventScript_DeclineLavaCookie:: @ 822EF69 + msgbox MtChimney_Text_OhFineThen, MSGBOX_DEFAULT hidemoneybox nop nop release end -MtChimney_EventScript_22EF76:: @ 822EF76 - msgbox MtChimney_Text_22FE5E, MSGBOX_DEFAULT +MtChimney_EventScript_NotEnoughMoney:: @ 822EF76 + msgbox MtChimney_Text_YouveNotGotTheMoney, MSGBOX_DEFAULT hidemoneybox nop nop release end -MtChimney_Movement_22EF83: @ 822EF83 +MtChimney_Movement_ArchieApproachPlayerEast: @ 822EF83 walk_up walk_up walk_up @@ -159,7 +159,7 @@ MtChimney_Movement_22EF83: @ 822EF83 walk_right step_end -MtChimney_Movement_22EF8B: @ 822EF8B +MtChimney_Movement_ArchieExitEast: @ 822EF8B walk_left walk_down walk_down @@ -170,7 +170,7 @@ MtChimney_Movement_22EF8B: @ 822EF8B walk_down step_end -MtChimney_Movement_22EF94: @ 822EF94 +MtChimney_Movement_ArchieApproachPlayerNorth: @ 822EF94 walk_up walk_up walk_up @@ -180,7 +180,7 @@ MtChimney_Movement_22EF94: @ 822EF94 walk_right step_end -MtChimney_Movement_22EF9C: @ 822EF9C +MtChimney_Movement_ArchieExitNorth: @ 822EF9C walk_left walk_left walk_down @@ -192,6 +192,7 @@ MtChimney_Movement_22EF9C: @ 822EF9C walk_down step_end +@ Unused MtChimney_Movement_22EFA6: @ 822EFA6 walk_down walk_down @@ -212,6 +213,7 @@ MtChimney_Movement_22EFA6: @ 822EFA6 walk_down step_end +@ Unused MtChimney_Movement_22EFB8: @ 822EFB8 walk_down walk_down @@ -223,6 +225,7 @@ MtChimney_Movement_22EFB8: @ 822EFB8 walk_down step_end +@ Unused MtChimney_Movement_22EFC1: @ 822EFC1 walk_right walk_down @@ -240,6 +243,7 @@ MtChimney_Movement_22EFC1: @ 822EFC1 walk_down step_end +@ Unused MtChimney_Movement_22EFD0: @ 822EFD0 walk_fast_down walk_fast_down @@ -267,6 +271,7 @@ MtChimney_Movement_22EFD0: @ 822EFD0 walk_down step_end +@ Unused MtChimney_Movement_22EFE9: @ 822EFE9 delay_16 delay_16 @@ -280,6 +285,7 @@ MtChimney_Movement_22EFE9: @ 822EFE9 walk_down step_end +@ Unused MtChimney_Movement_22EFF4: @ 822EFF4 delay_16 walk_left @@ -298,6 +304,7 @@ MtChimney_Movement_22EFF4: @ 822EFF4 walk_down step_end +@ Unused MtChimney_Movement_22F004: @ 822F004 delay_16 walk_left @@ -317,6 +324,7 @@ MtChimney_Movement_22F004: @ 822F004 walk_down step_end +@ Unused MtChimney_Movement_22F015: @ 822F015 delay_16 walk_down @@ -327,6 +335,7 @@ MtChimney_Movement_22F015: @ 822F015 walk_in_place_fastest_down step_end +@ Unused MtChimney_Movement_22F01D: @ 822F01D walk_down walk_down @@ -343,10 +352,12 @@ MtChimney_Movement_22F01D: @ 822F01D walk_down step_end +@ Unused MtChimney_Movement_22F02B: @ 822F02B walk_down step_end +@ Unused MtChimney_Movement_22F02D: @ 822F02D walk_down walk_down @@ -357,6 +368,7 @@ MtChimney_Movement_22F02D: @ 822F02D walk_down step_end +@ Unused MtChimney_Movement_22F035: @ 822F035 delay_16 delay_16 @@ -369,6 +381,7 @@ MtChimney_Movement_22F035: @ 822F035 walk_down step_end +@ Unused MtChimney_Movement_22F03F: @ 822F03F delay_16 delay_16 @@ -382,6 +395,7 @@ MtChimney_Movement_22F03F: @ 822F03F walk_down step_end +@ Unused MtChimney_Movement_22F04A: @ 822F04A lock_facing_direction walk_fast_left @@ -389,163 +403,164 @@ MtChimney_Movement_22F04A: @ 822F04A face_right step_end +@ Unused MtChimney_Movement_22F04F: @ 822F04F walk_left walk_in_place_fastest_right delay_16 step_end -MtChimney_EventScript_22F053:: @ 822F053 - msgbox MtChimney_Text_22FD1F, MSGBOX_SIGN +MtChimney_EventScript_BusyAquaGrunt1:: @ 822F053 + msgbox MtChimney_Text_MagmaOutnumbersUs, MSGBOX_SIGN end -MtChimney_EventScript_22F05C:: @ 822F05C - msgbox MtChimney_Text_22FD5B, MSGBOX_SIGN +MtChimney_EventScript_BusyAquaGrunt2:: @ 822F05C + msgbox MtChimney_Text_LessHabitatForWaterPokemon, MSGBOX_SIGN end -MtChimney_EventScript_22F065:: @ 822F065 - msgbox MtChimney_Text_22FDA1, MSGBOX_SIGN +MtChimney_EventScript_BusyAquaGrunt3:: @ 822F065 + msgbox MtChimney_Text_MagmasNameSimilar, MSGBOX_SIGN end -MtChimney_EventScript_22F06E:: @ 822F06E - trainerbattle_single TRAINER_TABITHA_2, MtChimney_Text_22F6AA, MtChimney_Text_22F72C - msgbox MtChimney_Text_22F76D, MSGBOX_AUTOCLOSE +MtChimney_EventScript_Tabitha:: @ 822F06E + trainerbattle_single TRAINER_TABITHA_2, MtChimney_Text_TabithaIntro, MtChimney_Text_TabithaDefeat + msgbox MtChimney_Text_TabithaPostBattle, MSGBOX_AUTOCLOSE end -MtChimney_EventScript_22F085:: @ 822F085 - trainerbattle_single TRAINER_GRUNT_31, MtChimney_Text_22F7A2, MtChimney_Text_22F83A - msgbox MtChimney_Text_22F859, MSGBOX_AUTOCLOSE +MtChimney_EventScript_Grunt31:: @ 822F085 + trainerbattle_single TRAINER_GRUNT_31, MtChimney_Text_Grunt31Intro, MtChimney_Text_Grunt31Defeat + msgbox MtChimney_Text_Grunt31PostBattle, MSGBOX_AUTOCLOSE end -MtChimney_EventScript_22F09C:: @ 822F09C - msgbox MtChimney_Text_22F978, MSGBOX_SIGN +MtChimney_EventScript_BusyMagmaGrunt1:: @ 822F09C + msgbox MtChimney_Text_TeamAquaAlwaysMessingWithPlans, MSGBOX_SIGN end -MtChimney_EventScript_22F0A5:: @ 822F0A5 - msgbox MtChimney_Text_22F9B2, MSGBOX_SIGN +MtChimney_EventScript_BusyMagmaGrunt2:: @ 822F0A5 + msgbox MtChimney_Text_MeteoritesPackAmazingPower, MSGBOX_SIGN end -MtChimney_EventScript_22F0AE:: @ 822F0AE - msgbox MtChimney_Text_22F9D1, MSGBOX_SIGN +MtChimney_EventScript_BusyMagmaGrunt3:: @ 822F0AE + msgbox MtChimney_Text_YouBetterNotMessWithUs, MSGBOX_SIGN end -MtChimney_EventScript_22F0B7:: @ 822F0B7 - msgbox MtChimney_Text_22FA2F, MSGBOX_SIGN +MtChimney_EventScript_BusyMagmaGrunt4:: @ 822F0B7 + msgbox MtChimney_Text_AquasNameSimilar, MSGBOX_SIGN end -MtChimney_EventScript_22F0C0:: @ 822F0C0 - msgbox MtChimney_Text_22FA8B, MSGBOX_SIGN +MtChimney_EventScript_BusyMagmaGrunt5:: @ 822F0C0 + msgbox MtChimney_Text_DouseThemInFire, MSGBOX_SIGN end -MtChimney_EventScript_22F0C9:: @ 822F0C9 - msgbox MtChimney_Text_22FAA5, MSGBOX_SIGN +MtChimney_EventScript_BusyMagmaGrunt6:: @ 822F0C9 + msgbox MtChimney_Text_KeepMakingMoreLand, MSGBOX_SIGN end -MtChimney_EventScript_22F0D2:: @ 822F0D2 - msgbox MtChimney_Text_22FACB, MSGBOX_SIGN +MtChimney_EventScript_MagmaPoochyena:: @ 822F0D2 + msgbox MtChimney_Text_Bufoh, MSGBOX_SIGN end -MtChimney_EventScript_22F0DB:: @ 822F0DB - msgbox MtChimney_Text_22FDFC, MSGBOX_SIGN +MtChimney_EventScript_AquaPoochyena:: @ 822F0DB + msgbox MtChimney_Text_Bushaa, MSGBOX_SIGN end -MtChimney_EventScript_22F0E4:: @ 822F0E4 +MtChimney_EventScript_MeteoriteMachine:: @ 822F0E4 lockall - goto_if_unset FLAG_DEFEATED_EVIL_TEAM_MT_CHIMNEY, MtChimney_EventScript_22F137 - goto_if_set FLAG_RECEIVED_METEORITE, MtChimney_EventScript_22F12D - msgbox MtChimney_Text_22FF12, MSGBOX_YESNO + goto_if_unset FLAG_DEFEATED_EVIL_TEAM_MT_CHIMNEY, MtChimney_EventScript_MachineOn + goto_if_set FLAG_RECEIVED_METEORITE, MtChimney_EventScript_MachineOff + msgbox MtChimney_Text_RemoveTheMeteorite, MSGBOX_YESNO compare VAR_RESULT, 0 - goto_if_eq MtChimney_EventScript_22F123 - msgbox MtChimney_Text_22FF66, MSGBOX_DEFAULT + goto_if_eq MtChimney_EventScript_LeaveMeteoriteAlone + msgbox MtChimney_Text_PlayerRemovedMeteorite, MSGBOX_DEFAULT giveitem_std ITEM_METEORITE setflag FLAG_RECEIVED_METEORITE releaseall end -MtChimney_EventScript_22F123:: @ 822F123 - msgbox MtChimney_Text_22FF9C, MSGBOX_DEFAULT +MtChimney_EventScript_LeaveMeteoriteAlone:: @ 822F123 + msgbox MtChimney_Text_PlayerLeftMeteorite, MSGBOX_DEFAULT releaseall end -MtChimney_EventScript_22F12D:: @ 822F12D - msgbox MtChimney_Text_22FFC0, MSGBOX_DEFAULT +MtChimney_EventScript_MachineOff:: @ 822F12D + msgbox MtChimney_Text_MachineMakesNoResponse, MSGBOX_DEFAULT releaseall end -MtChimney_EventScript_22F137:: @ 822F137 - msgbox MtChimney_Text_22FEAA, MSGBOX_DEFAULT +MtChimney_EventScript_MachineOn:: @ 822F137 + msgbox MtChimney_Text_MetoriteFittedOnMachine, MSGBOX_DEFAULT releaseall end -MtChimney_EventScript_22F141:: @ 822F141 - msgbox MtChimney_Text_22FFFA, MSGBOX_SIGN +MtChimney_EventScript_RouteSign:: @ 822F141 + msgbox MtChimney_Text_RouteSign, MSGBOX_SIGN end -MtChimney_EventScript_22F14A:: @ 822F14A - trainerbattle_single TRAINER_SHELBY_1, MtChimney_Text_23001D, MtChimney_Text_230076, MtChimney_EventScript_22F176 +MtChimney_EventScript_Shelby:: @ 822F14A + trainerbattle_single TRAINER_SHELBY_1, MtChimney_Text_ShelbyIntro, MtChimney_Text_ShelbyDefeat, MtChimney_EventScript_DefeatedShelby specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, 1 - goto_if_eq MtChimney_EventScript_22F195 - msgbox MtChimney_Text_2300A2, MSGBOX_DEFAULT + compare VAR_RESULT, TRUE + goto_if_eq MtChimney_EventScript_RematchShelby + msgbox MtChimney_Text_ShelbyPostBattle, MSGBOX_DEFAULT release end -MtChimney_EventScript_22F176:: @ 822F176 +MtChimney_EventScript_DefeatedShelby:: @ 822F176 special PlayerFaceTrainerAfterBattle waitmovement 0 - msgbox MtChimney_Text_2300E3, MSGBOX_DEFAULT + msgbox MtChimney_Text_ShelbyRegister, MSGBOX_DEFAULT register_matchcall TRAINER_SHELBY_1 release end -MtChimney_EventScript_22F195:: @ 822F195 - trainerbattle_rematch TRAINER_SHELBY_1, MtChimney_Text_230153, MtChimney_Text_2301BB - msgbox MtChimney_Text_2301E7, MSGBOX_AUTOCLOSE +MtChimney_EventScript_RematchShelby:: @ 822F195 + trainerbattle_rematch TRAINER_SHELBY_1, MtChimney_Text_ShelbyRematchIntro, MtChimney_Text_ShelbyRematchDefeat + msgbox MtChimney_Text_ShelbyPostRematch, MSGBOX_AUTOCLOSE end -MtChimney_EventScript_22F1AC:: @ 822F1AC - trainerbattle_single TRAINER_MELISSA, MtChimney_Text_23022A, MtChimney_Text_23026D - msgbox MtChimney_Text_230292, MSGBOX_AUTOCLOSE +MtChimney_EventScript_Melissa:: @ 822F1AC + trainerbattle_single TRAINER_MELISSA, MtChimney_Text_MelissaIntro, MtChimney_Text_MelissaDefeat + msgbox MtChimney_Text_MelissaPostBattle, MSGBOX_AUTOCLOSE end -MtChimney_EventScript_22F1C3:: @ 822F1C3 - trainerbattle_single TRAINER_SHEILA, MtChimney_Text_2302BD, MtChimney_Text_230304 - msgbox MtChimney_Text_23033A, MSGBOX_AUTOCLOSE +MtChimney_EventScript_Sheila:: @ 822F1C3 + trainerbattle_single TRAINER_SHEILA, MtChimney_Text_SheilaIntro, MtChimney_Text_SheilaDefeat + msgbox MtChimney_Text_SheilaPostBattle, MSGBOX_AUTOCLOSE end -MtChimney_EventScript_22F1DA:: @ 822F1DA - trainerbattle_single TRAINER_SHIRLEY, MtChimney_Text_2303DF, MtChimney_Text_230436 - msgbox MtChimney_Text_230463, MSGBOX_AUTOCLOSE +MtChimney_EventScript_Shirley:: @ 822F1DA + trainerbattle_single TRAINER_SHIRLEY, MtChimney_Text_ShirleyIntro, MtChimney_Text_ShirleyDefeat + msgbox MtChimney_Text_ShirleyPostBattle, MSGBOX_AUTOCLOSE end -MtChimney_EventScript_22F1F1:: @ 822F1F1 - trainerbattle_single TRAINER_GRUNT_24, MtChimney_Text_22F8B6, MtChimney_Text_22F921 - msgbox MtChimney_Text_22F93A, MSGBOX_AUTOCLOSE +MtChimney_EventScript_Grunt24:: @ 822F1F1 + trainerbattle_single TRAINER_GRUNT_24, MtChimney_Text_Grunt24Intro, MtChimney_Text_Grunt24Defeat + msgbox MtChimney_Text_Grunt24PostBattle, MSGBOX_AUTOCLOSE end -MtChimney_EventScript_22F208:: @ 822F208 - trainerbattle_single TRAINER_SAWYER_1, MtChimney_Text_2304B3, MtChimney_Text_2304F7, MtChimney_EventScript_22F234 +MtChimney_EventScript_Sawyer:: @ 822F208 + trainerbattle_single TRAINER_SAWYER_1, MtChimney_Text_SawyerIntro, MtChimney_Text_SawyerDefeat, MtChimney_EventScript_SawyerDefeated specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, 1 - goto_if_eq MtChimney_EventScript_22F253 - msgbox MtChimney_Text_230519, MSGBOX_DEFAULT + compare VAR_RESULT, TRUE + goto_if_eq MtChimney_EventScript_SawyerRematch + msgbox MtChimney_Text_SawyerPostBattle, MSGBOX_DEFAULT release end -MtChimney_EventScript_22F234:: @ 822F234 +MtChimney_EventScript_SawyerDefeated:: @ 822F234 special PlayerFaceTrainerAfterBattle waitmovement 0 - msgbox MtChimney_Text_230557, MSGBOX_DEFAULT + msgbox MtChimney_Text_SawyerRegister, MSGBOX_DEFAULT register_matchcall TRAINER_SAWYER_1 release end -MtChimney_EventScript_22F253:: @ 822F253 - trainerbattle_rematch TRAINER_SAWYER_1, MtChimney_Text_23059C, MtChimney_Text_2305E3 - msgbox MtChimney_Text_230614, MSGBOX_AUTOCLOSE +MtChimney_EventScript_SawyerRematch:: @ 822F253 + trainerbattle_rematch TRAINER_SAWYER_1, MtChimney_Text_SawyerRematchIntro, MtChimney_Text_SawyerRematchDefeat + msgbox MtChimney_Text_SawyerPostRematch, MSGBOX_AUTOCLOSE end -MtChimney_Text_22F26A: @ 822F26A +MtChimney_Text_MeteoriteWillActivateVolcano: @ 822F26A .string "The power contained in the METEORITE…\p" .string "By amplifying its power with this\n" .string "machine, MT. CHIMNEY's volcanic\l" @@ -554,7 +569,7 @@ MtChimney_Text_22F26A: @ 822F26A .string "the crater and…\l" .string "Fufufu…$" -MtChimney_Text_22F32E: @ 822F32E +MtChimney_Text_MaxieIntro: @ 822F32E .string "MAXIE: Hm?\n" .string "Who are you?\p" .string "… … … … … …\n" @@ -582,11 +597,11 @@ MtChimney_Text_22F32E: @ 822F32E .string "I'll teach you the consequences of\l" .string "meddling in our grand design!$" -MtChimney_Text_22F5CF: @ 822F5CF +MtChimney_Text_MaxieDefeat: @ 822F5CF .string "What?!\p" .string "I, MAXIE, was caught off guard?!$" -MtChimney_Text_22F5F7: @ 822F5F7 +MtChimney_Text_MaxieYouHaventSeenLastOfMagma: @ 822F5F7 .string "MAXIE: But, enough.\n" .string "I will back off this time.\p" .string "But don't think that this is the last\n" @@ -595,81 +610,81 @@ MtChimney_Text_22F5F7: @ 822F5F7 .string "Even without the METEORITE, if we\n" .string "obtain that ORB… Fufufu…$" -MtChimney_Text_22F6AA: @ 822F6AA +MtChimney_Text_TabithaIntro: @ 822F6AA .string "Hehehe!\p" .string "So you've come all the way here!\p" .string "But you're too late!\n" .string "I've already delivered the METEORITE\l" .string "from METEOR FALLS to the BOSS!$" -MtChimney_Text_22F72C: @ 822F72C +MtChimney_Text_TabithaDefeat: @ 822F72C .string "Hehehe…\p" .string "Even though I've lost, if our leader\n" .string "awakens that thing…$" -MtChimney_Text_22F76D: @ 822F76D +MtChimney_Text_TabithaPostBattle: @ 822F76D .string "BOSS, hurry!\n" .string "Give it the METEORITE's energy!\p" .string "Hehehe…$" -MtChimney_Text_22F7A2: @ 822F7A2 +MtChimney_Text_Grunt31Intro: @ 822F7A2 .string "We of TEAM MAGMA are working hard for\n" .string "everyone's sake.\p" .string "Like, if that thing's power made more\n" .string "land, there'd be more places to live.\p" .string "Everyone'd be happy!$" -MtChimney_Text_22F83A: @ 822F83A +MtChimney_Text_Grunt31Defeat: @ 822F83A .string "Hunh?\n" .string "What do you mean I lost?$" -MtChimney_Text_22F859: @ 822F859 +MtChimney_Text_Grunt31PostBattle: @ 822F859 .string "Our BOSS says, “It will make everyone\n" .string "happy.”\p" .string "But why does everyone keep getting\n" .string "in our way?$" -MtChimney_Text_22F8B6: @ 822F8B6 +MtChimney_Text_Grunt24Intro: @ 822F8B6 .string "If there were more land, I'd be able\n" .string "to get a big house of my own!\p" .string "I'm going to build it on hardened lava!$" -MtChimney_Text_22F921: @ 822F921 +MtChimney_Text_Grunt24Defeat: @ 822F921 .string "My dream of a big house…$" -MtChimney_Text_22F93A: @ 822F93A +MtChimney_Text_Grunt24PostBattle: @ 822F93A .string "A kid like you, you ought to be\n" .string "splashing about in the waves!$" -MtChimney_Text_22F978: @ 822F978 +MtChimney_Text_TeamAquaAlwaysMessingWithPlans: @ 822F978 .string "That annoying TEAM AQUA…\n" .string "They always mess with our plans!$" -MtChimney_Text_22F9B2: @ 822F9B2 +MtChimney_Text_MeteoritesPackAmazingPower: @ 822F9B2 .string "METEORITES pack amazing power!$" -MtChimney_Text_22F9D1: @ 822F9D1 +MtChimney_Text_YouBetterNotMessWithUs: @ 822F9D1 .string "You'd better not mess with us!\p" .string "We're trying to awaken that thing\n" .string "for the benefit of everyone!$" -MtChimney_Text_22FA2F: @ 822FA2F +MtChimney_Text_AquasNameSimilar: @ 822FA2F .string "We're TEAM MAGMA!\p" .string "They're TEAM AQUA!\p" .string "It totally annoys me that they'd\n" .string "use a name like ours!$" -MtChimney_Text_22FA8B: @ 822FA8B +MtChimney_Text_DouseThemInFire: @ 822FA8B .string "Yeah!\n" .string "Douse them in fire!$" -MtChimney_Text_22FAA5: @ 822FAA5 +MtChimney_Text_KeepMakingMoreLand: @ 822FAA5 .string "We're going to keep making more land!$" -MtChimney_Text_22FACB: @ 822FACB +MtChimney_Text_Bufoh: @ 822FACB .string "Bufoh!$" -MtChimney_Text_22FAD2: @ 822FAD2 +MtChimney_Text_ArchieGoStopTeamMagma: @ 822FAD2 .string "ARCHIE: Grr, {PLAYER}!\n" .string "I should've guessed you'd show up!\p" .string "See for yourself what the fanatics\n" @@ -679,14 +694,14 @@ MtChimney_Text_22FAD2: @ 822FAD2 .string "Doing something like that will cause\n" .string "the volcano's eruption!$" -MtChimney_Text_22FBC7: @ 822FBC7 +MtChimney_Text_ArchieIHaveMyHandsFull: @ 822FBC7 .string "ARCHIE: Grrr…\p" .string "I want to stop that MAXIE,\n" .string "but I can't!\p" .string "Not when I have my hands full battling\n" .string "three opponents at once!$" -MtChimney_Text_22FC3D: @ 822FC3D +MtChimney_Text_ArchieThankYou: @ 822FC3D .string "ARCHIE: {PLAYER}!\n" .string "Thank you!\p" .string "With your help, we thwarted TEAM\n" @@ -698,161 +713,161 @@ MtChimney_Text_22FC3D: @ 822FC3D .string "our pursuit of TEAM MAGMA.\p" .string "{PLAYER}, we shall meet again!$" -MtChimney_Text_22FD1F: @ 822FD1F +MtChimney_Text_MagmaOutnumbersUs: @ 822FD1F .string "Darn… TEAM MAGMA outnumbers us!\n" .string "We can't keep up with them!$" -MtChimney_Text_22FD5B: @ 822FD5B +MtChimney_Text_LessHabitatForWaterPokemon: @ 822FD5B .string "If they expand the land, there'll be\n" .string "less habitats for WATER POKéMON!$" -MtChimney_Text_22FDA1: @ 822FDA1 +MtChimney_Text_MagmasNameSimilar: @ 822FDA1 .string "We're TEAM AQUA!\p" .string "They're TEAM MAGMA!\p" .string "It burns me up that they'd use such\n" .string "a confusing name!$" -MtChimney_Text_22FDFC: @ 822FDFC +MtChimney_Text_Bushaa: @ 822FDFC .string "Bushaa!$" -MtChimney_Text_22FE04: @ 822FE04 +MtChimney_Text_LavaCookiesJust200: @ 822FE04 .string "LAVA COOKIES are MT. CHIMNEY's local\n" .string "specialty.\p" .string "Try one. It's just ¥200.$" -MtChimney_Text_22FE4D: @ 822FE4D +MtChimney_Text_ThankYouDear: @ 822FE4D .string "Thank you, dear!$" -MtChimney_Text_22FE5E: @ 822FE5E +MtChimney_Text_YouveNotGotTheMoney: @ 822FE5E .string "Oh, dear. You can't buy a thing if\n" .string "you've not got the money.$" -MtChimney_Text_22FE9B: @ 822FE9B +MtChimney_Text_OhFineThen: @ 822FE9B .string "Oh, fine then.$" -MtChimney_Text_22FEAA: @ 822FEAA +MtChimney_Text_MetoriteFittedOnMachine: @ 822FEAA .string "A METEORITE is fitted on a mysterious\n" .string "machine…\p" .string "The machine seems to be storing\n" .string "energy in the METEORITE.$" -MtChimney_Text_22FF12: @ 822FF12 +MtChimney_Text_RemoveTheMeteorite: @ 822FF12 .string "A METEORITE is fitted on a mysterious\n" .string "machine…\p" .string "Do you want to remove the METEORITE?$" -MtChimney_Text_22FF66: @ 822FF66 +MtChimney_Text_PlayerRemovedMeteorite: @ 822FF66 .string "{PLAYER} removed the METEORITE from\n" .string "the mysterious machine.$" -MtChimney_Text_22FF9C: @ 822FF9C +MtChimney_Text_PlayerLeftMeteorite: @ 822FF9C .string "{PLAYER} left the METEORITE where\n" .string "it was.$" -MtChimney_Text_22FFC0: @ 822FFC0 +MtChimney_Text_MachineMakesNoResponse: @ 822FFC0 .string "This mysterious machine…\n" .string "It makes no response whatsoever.$" -MtChimney_Text_22FFFA: @ 822FFFA +MtChimney_Text_RouteSign: @ 822FFFA .string "{DOWN_ARROW} JAGGED PATH\n" .string "LAVARIDGE TOWN AHEAD$" -MtChimney_Text_23001D: @ 823001D +MtChimney_Text_ShelbyIntro: @ 823001D .string "I've been to the hot springs and\n" .string "refreshed my tired bones.\l" .string "Right now I'm feeling strong!$" -MtChimney_Text_230076: @ 8230076 +MtChimney_Text_ShelbyDefeat: @ 8230076 .string "Oh, my goodness.\n" .string "Now, aren't you something!$" -MtChimney_Text_2300A2: @ 82300A2 +MtChimney_Text_ShelbyPostBattle: @ 82300A2 .string "Well, well, I've lost. I can't call\n" .string "myself an EXPERT now, can I?$" -MtChimney_Text_2300E3: @ 82300E3 +MtChimney_Text_ShelbyRegister: @ 82300E3 .string "Thank you, child. It was fun, as if\n" .string "I were battling my own grandchild.\p" .string "Please, come see me again for\n" .string "a rematch.$" -MtChimney_Text_230153: @ 8230153 +MtChimney_Text_ShelbyRematchIntro: @ 8230153 .string "If you can mesh your heart with those\n" .string "of your POKéMON, why, you should be\l" .string "able to achieve great things.$" -MtChimney_Text_2301BB: @ 82301BB +MtChimney_Text_ShelbyRematchDefeat: @ 82301BB .string "Oh, my goodness.\n" .string "Now, aren't you something!$" -MtChimney_Text_2301E7: @ 82301E7 +MtChimney_Text_ShelbyPostRematch: @ 82301E7 .string "Perhaps your heart has become one\n" .string "with the hearts of your POKéMON.$" -MtChimney_Text_23022A: @ 823022A +MtChimney_Text_MelissaIntro: @ 823022A .string "I've got the fire in me, baby.\n" .string "I can't stand it! I have to battle!$" -MtChimney_Text_23026D: @ 823026D +MtChimney_Text_MelissaDefeat: @ 823026D .string "Ooh, that was a scorching-hot match!$" -MtChimney_Text_230292: @ 8230292 +MtChimney_Text_MelissaPostBattle: @ 8230292 .string "The heat of MT. CHIMNEY warms\n" .string "me up, baby!$" -MtChimney_Text_2302BD: @ 82302BD +MtChimney_Text_SheilaIntro: @ 82302BD .string "I've finally made it to MT. CHIMNEY.\n" .string "I want to make my POKéMON battle!$" -MtChimney_Text_230304: @ 8230304 +MtChimney_Text_SheilaDefeat: @ 8230304 .string "The way you battle…\n" .string "It's like a MT. CHIMNEY eruption!$" -MtChimney_Text_23033A: @ 823033A +MtChimney_Text_SheilaPostBattle: @ 823033A .string "Like I said, I've finally made it to\n" .string "MT. CHIMNEY. It would be a shame if\l" .string "I only do a little sightseeing…\p" .string "I want to get in some battles and buy\n" .string "COOKIES as souvenirs.$" -MtChimney_Text_2303DF: @ 82303DF +MtChimney_Text_ShirleyIntro: @ 82303DF .string "Since I bathed in the hot springs,\n" .string "I've been feeling great!\l" .string "I'm sure I'm going to win!$" -MtChimney_Text_230436: @ 8230436 +MtChimney_Text_ShirleyDefeat: @ 8230436 .string "Yowch!\n" .string "I'm getting a chill out of the water.$" -MtChimney_Text_230463: @ 8230463 +MtChimney_Text_ShirleyPostBattle: @ 8230463 .string "I'll have to take another dip in the\n" .string "hot springs. Want to join me?\p" .string "Just joking!$" -MtChimney_Text_2304B3: @ 82304B3 +MtChimney_Text_SawyerIntro: @ 82304B3 .string "This is one fine mountain! Plenty of\n" .string "hot people around for company!$" -MtChimney_Text_2304F7: @ 82304F7 +MtChimney_Text_SawyerDefeat: @ 82304F7 .string "Oh, you're a real firebrand, too!$" -MtChimney_Text_230519: @ 8230519 +MtChimney_Text_SawyerPostBattle: @ 8230519 .string "I think I need a dip in LAVARIDGE\n" .string "HOT SPRING with the locals!$" -MtChimney_Text_230557: @ 8230557 +MtChimney_Text_SawyerRegister: @ 8230557 .string "I like little fireballs like you.\n" .string "Let me register you in my POKéNAV.$" -MtChimney_Text_23059C: @ 823059C +MtChimney_Text_SawyerRematchIntro: @ 823059C .string "I'm happily surrounded by hot people\n" .string "around these parts. I won't lose!$" -MtChimney_Text_2305E3: @ 82305E3 +MtChimney_Text_SawyerRematchDefeat: @ 82305E3 .string "Gosh, you're still the same\n" .string "firebrand as before!$" -MtChimney_Text_230614: @ 8230614 +MtChimney_Text_SawyerPostRematch: @ 8230614 .string "Actually, it really is hot here.\n" .string "I'm overdressed for these parts.$" diff --git a/data/maps/MtPyre_Summit/map.json b/data/maps/MtPyre_Summit/map.json index 78780ba195..93bc0b7558 100644 --- a/data/maps/MtPyre_Summit/map.json +++ b/data/maps/MtPyre_Summit/map.json @@ -24,7 +24,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "MtPyre_Summit_EventScript_23213C", + "script": "MtPyre_Summit_EventScript_OldMan", "flag": "0" }, { @@ -50,7 +50,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "MtPyre_Summit_EventScript_2321A2", + "script": "MtPyre_Summit_EventScript_OldLady", "flag": "0" }, { @@ -63,7 +63,7 @@ "movement_range_y": 0, "trainer_type": "1", "trainer_sight_or_berry_tree_id": "3", - "script": "MtPyre_Summit_EventScript_2323FD", + "script": "MtPyre_Summit_EventScript_Grunt17", "flag": "FLAG_HIDE_MT_PYRE_SUMMIT_TEAM_AQUA" }, { @@ -76,7 +76,7 @@ "movement_range_y": 0, "trainer_type": "1", "trainer_sight_or_berry_tree_id": "3", - "script": "MtPyre_Summit_EventScript_232414", + "script": "MtPyre_Summit_EventScript_Grunt18", "flag": "FLAG_HIDE_MT_PYRE_SUMMIT_TEAM_AQUA" }, { @@ -89,7 +89,7 @@ "movement_range_y": 0, "trainer_type": "1", "trainer_sight_or_berry_tree_id": "3", - "script": "MtPyre_Summit_EventScript_23242B", + "script": "MtPyre_Summit_EventScript_Grunt19", "flag": "FLAG_HIDE_MT_PYRE_SUMMIT_TEAM_AQUA" }, { @@ -102,7 +102,7 @@ "movement_range_y": 1, "trainer_type": "1", "trainer_sight_or_berry_tree_id": "3", - "script": "MtPyre_Summit_EventScript_232442", + "script": "MtPyre_Summit_EventScript_Grunt29", "flag": "FLAG_HIDE_MT_PYRE_SUMMIT_TEAM_AQUA" }, { @@ -150,7 +150,7 @@ "elevation": 3, "var": "VAR_MT_PYRE_STATE", "var_value": "0", - "script": "MtPyre_Summit_EventScript_232018" + "script": "MtPyre_Summit_EventScript_TeamAquaTrigger0" }, { "type": "trigger", @@ -159,7 +159,7 @@ "elevation": 3, "var": "VAR_MT_PYRE_STATE", "var_value": "0", - "script": "MtPyre_Summit_EventScript_232024" + "script": "MtPyre_Summit_EventScript_TeamAquaTrigger1" }, { "type": "trigger", @@ -168,7 +168,7 @@ "elevation": 3, "var": "VAR_MT_PYRE_STATE", "var_value": "0", - "script": "MtPyre_Summit_EventScript_232030" + "script": "MtPyre_Summit_EventScript_TeamAquaTrigger2" }, { "type": "trigger", @@ -177,7 +177,7 @@ "elevation": 3, "var": "VAR_MT_PYRE_STATE", "var_value": "2", - "script": "MtPyre_Summit_EventScript_2321EC" + "script": "MtPyre_Summit_EventScript_ArchieMaxieTrigger0" }, { "type": "trigger", @@ -186,7 +186,7 @@ "elevation": 3, "var": "VAR_MT_PYRE_STATE", "var_value": "2", - "script": "MtPyre_Summit_EventScript_2321F8" + "script": "MtPyre_Summit_EventScript_ArchieMaxieTrigger1" }, { "type": "trigger", @@ -195,7 +195,7 @@ "elevation": 3, "var": "VAR_MT_PYRE_STATE", "var_value": "2", - "script": "MtPyre_Summit_EventScript_232204" + "script": "MtPyre_Summit_EventScript_ArchieMaxieTrigger2" } ], "bg_events": [ diff --git a/data/maps/MtPyre_Summit/scripts.inc b/data/maps/MtPyre_Summit/scripts.inc index 4049a1f29e..3995cb25cb 100644 --- a/data/maps/MtPyre_Summit/scripts.inc +++ b/data/maps/MtPyre_Summit/scripts.inc @@ -4,33 +4,33 @@ MtPyre_Summit_MapScripts:: @ 8231FF7 MtPyre_Summit_OnTransition: @ 8231FFD compare VAR_MT_PYRE_STATE, 2 - call_if_eq MtPyre_Summit_EventScript_232009 + call_if_eq MtPyre_Summit_EventScript_SetArchieMaxiePositions end -MtPyre_Summit_EventScript_232009:: @ 8232009 +MtPyre_Summit_EventScript_SetArchieMaxiePositions:: @ 8232009 setobjectxyperm 8, 23, 6 setobjectxyperm 2, 22, 6 end -MtPyre_Summit_EventScript_232018:: @ 8232018 +MtPyre_Summit_EventScript_TeamAquaTrigger0:: @ 8232018 lockall setvar VAR_0x8008, 0 - goto MtPyre_Summit_EventScript_23203C + goto MtPyre_Summit_EventScript_TeamAquaExits end -MtPyre_Summit_EventScript_232024:: @ 8232024 +MtPyre_Summit_EventScript_TeamAquaTrigger1:: @ 8232024 lockall setvar VAR_0x8008, 1 - goto MtPyre_Summit_EventScript_23203C + goto MtPyre_Summit_EventScript_TeamAquaExits end -MtPyre_Summit_EventScript_232030:: @ 8232030 +MtPyre_Summit_EventScript_TeamAquaTrigger2:: @ 8232030 lockall setvar VAR_0x8008, 2 - goto MtPyre_Summit_EventScript_23203C + goto MtPyre_Summit_EventScript_TeamAquaExits end -MtPyre_Summit_EventScript_23203C:: @ 823203C +MtPyre_Summit_EventScript_TeamAquaExits:: @ 823203C playbgm MUS_AQA_0, 0 applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_FaceUp waitmovement 0 @@ -38,12 +38,12 @@ MtPyre_Summit_EventScript_23203C:: @ 823203C waitmovement 0 delay 50 compare VAR_0x8008, 0 - call_if_eq MtPyre_Summit_EventScript_2320E0 + call_if_eq MtPyre_Summit_EventScript_ArchieFacePlayer0 compare VAR_0x8008, 1 - call_if_eq MtPyre_Summit_EventScript_2320EB + call_if_eq MtPyre_Summit_EventScript_ArchieFacePlayer1 compare VAR_0x8008, 2 - call_if_eq MtPyre_Summit_EventScript_2320EC - msgbox MtPyre_Summit_Text_23281A, MSGBOX_DEFAULT + call_if_eq MtPyre_Summit_EventScript_ArchieFacePlayer2 + msgbox MtPyre_Summit_Text_ArchieWeGotTheOrbLetsGo, MSGBOX_DEFAULT closemessage fadescreen 1 removeobject 2 @@ -58,164 +58,165 @@ MtPyre_Summit_EventScript_23203C:: @ 823203C delay 20 setvar VAR_MT_PYRE_STATE, 1 compare VAR_0x8008, 0 - call_if_eq MtPyre_Summit_EventScript_2320F7 + call_if_eq MtPyre_Summit_EventScript_OldLadyApproachPlayer0 compare VAR_0x8008, 1 - call_if_eq MtPyre_Summit_EventScript_23210C + call_if_eq MtPyre_Summit_EventScript_OldLadyApproachPlayer1 compare VAR_0x8008, 2 - call_if_eq MtPyre_Summit_EventScript_232117 - msgbox MtPyre_Summit_Text_23290E, MSGBOX_DEFAULT + call_if_eq MtPyre_Summit_EventScript_OldLadyApproachPlayer2 + msgbox MtPyre_Summit_Text_BothOrbsTakenMagmaLeftThis, MSGBOX_DEFAULT giveitem_std ITEM_MAGMA_EMBLEM setflag FLAG_RECEIVED_RED_OR_BLUE_ORB setflag FLAG_HIDE_JAGGED_PASS_MAGMA_GUARD releaseall end -MtPyre_Summit_EventScript_2320E0:: @ 82320E0 - applymovement 2, MtPyre_Summit_Movement_232136 +MtPyre_Summit_EventScript_ArchieFacePlayer0:: @ 82320E0 + applymovement 2, MtPyre_Summit_Movement_ArchieFacePlayer0 waitmovement 0 return -MtPyre_Summit_EventScript_2320EB:: @ 82320EB +@ Archie is already facing player +MtPyre_Summit_EventScript_ArchieFacePlayer1:: @ 82320EB return -MtPyre_Summit_EventScript_2320EC:: @ 82320EC - applymovement 2, MtPyre_Summit_Movement_232139 +MtPyre_Summit_EventScript_ArchieFacePlayer2:: @ 82320EC + applymovement 2, MtPyre_Summit_Movement_ArchieFacePlayer2 waitmovement 0 return -MtPyre_Summit_EventScript_2320F7:: @ 82320F7 - applymovement 3, MtPyre_Summit_Movement_23212C +MtPyre_Summit_EventScript_OldLadyApproachPlayer0:: @ 82320F7 + applymovement 3, MtPyre_Summit_Movement_OldLadyApproachPlayer0 waitmovement 0 applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceFastestRight waitmovement 0 return -MtPyre_Summit_EventScript_23210C:: @ 823210C - applymovement 3, MtPyre_Summit_Movement_232130 +MtPyre_Summit_EventScript_OldLadyApproachPlayer1:: @ 823210C + applymovement 3, MtPyre_Summit_Movement_OldLadyApproachPlayer1 waitmovement 0 return -MtPyre_Summit_EventScript_232117:: @ 8232117 - applymovement 3, MtPyre_Summit_Movement_232132 +MtPyre_Summit_EventScript_OldLadyApproachPlayer2:: @ 8232117 + applymovement 3, MtPyre_Summit_Movement_OldLadyApproachPlayer2 waitmovement 0 applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceFastestLeft waitmovement 0 return -MtPyre_Summit_Movement_23212C: @ 823212C +MtPyre_Summit_Movement_OldLadyApproachPlayer0: @ 823212C walk_down walk_down walk_in_place_fastest_left step_end -MtPyre_Summit_Movement_232130: @ 8232130 +MtPyre_Summit_Movement_OldLadyApproachPlayer1: @ 8232130 walk_down step_end -MtPyre_Summit_Movement_232132: @ 8232132 +MtPyre_Summit_Movement_OldLadyApproachPlayer2: @ 8232132 walk_down walk_down walk_in_place_fastest_right step_end -MtPyre_Summit_Movement_232136: @ 8232136 +MtPyre_Summit_Movement_ArchieFacePlayer0: @ 8232136 walk_left walk_in_place_fastest_down step_end -MtPyre_Summit_Movement_232139: @ 8232139 +MtPyre_Summit_Movement_ArchieFacePlayer2: @ 8232139 walk_right walk_in_place_fastest_down step_end -MtPyre_Summit_EventScript_23213C:: @ 823213C +MtPyre_Summit_EventScript_OldMan:: @ 823213C lock faceplayer - goto_if_set FLAG_SOOTOPOLIS_ARCHIE_MAXIE_LEAVE, MtPyre_Summit_EventScript_232167 - msgbox MtPyre_Summit_Text_232E0C, MSGBOX_YESNO + goto_if_set FLAG_SOOTOPOLIS_ARCHIE_MAXIE_LEAVE, MtPyre_Summit_EventScript_OldManAfterRayquaza + msgbox MtPyre_Summit_Text_WillYouHearOutMyTale, MSGBOX_YESNO compare VAR_RESULT, 1 - call_if_eq MtPyre_Summit_EventScript_232187 + call_if_eq MtPyre_Summit_EventScript_OldManTale compare VAR_RESULT, 0 - call_if_eq MtPyre_Summit_EventScript_232190 + call_if_eq MtPyre_Summit_EventScript_DeclineOldManTale release end -MtPyre_Summit_EventScript_232167:: @ 8232167 - msgbox MtPyre_Summit_Text_2331A6, MSGBOX_YESNO +MtPyre_Summit_EventScript_OldManAfterRayquaza:: @ 8232167 + msgbox MtPyre_Summit_Text_HearTheNewLegendOfHoenn, MSGBOX_YESNO compare VAR_RESULT, 1 - call_if_eq MtPyre_Summit_EventScript_232199 + call_if_eq MtPyre_Summit_EventScript_OldManNewTale compare VAR_RESULT, 0 - call_if_eq MtPyre_Summit_EventScript_232190 + call_if_eq MtPyre_Summit_EventScript_DeclineOldManTale release end -MtPyre_Summit_EventScript_232187:: @ 8232187 - msgbox MtPyre_Summit_Text_232F27, MSGBOX_DEFAULT +MtPyre_Summit_EventScript_OldManTale:: @ 8232187 + msgbox MtPyre_Summit_Text_GroudonKyogreTale, MSGBOX_DEFAULT return -MtPyre_Summit_EventScript_232190:: @ 8232190 - msgbox MtPyre_Summit_Text_233162, MSGBOX_DEFAULT +MtPyre_Summit_EventScript_DeclineOldManTale:: @ 8232190 + msgbox MtPyre_Summit_Text_WellThatTooIsFine, MSGBOX_DEFAULT return -MtPyre_Summit_EventScript_232199:: @ 8232199 - msgbox MtPyre_Summit_Text_23325D, MSGBOX_DEFAULT +MtPyre_Summit_EventScript_OldManNewTale:: @ 8232199 + msgbox MtPyre_Summit_Text_HoennTrioTale, MSGBOX_DEFAULT return -MtPyre_Summit_EventScript_2321A2:: @ 82321A2 +MtPyre_Summit_EventScript_OldLady:: @ 82321A2 lock faceplayer - goto_if_set FLAG_RETURNED_RED_OR_BLUE_ORB, MtPyre_Summit_EventScript_2321E2 + goto_if_set FLAG_RETURNED_RED_OR_BLUE_ORB, MtPyre_Summit_EventScript_OldLadyAfterOrbsReturned compare VAR_MT_PYRE_STATE, 3 - call_if_ge MtPyre_Summit_EventScript_2321CB - goto_if_set FLAG_KYOGRE_ESCAPED_SEAFLOOR_CAVERN, MtPyre_Summit_EventScript_2321D8 - msgbox MtPyre_Summit_Text_232AD8, MSGBOX_DEFAULT + call_if_ge MtPyre_Summit_EventScript_OldLadyOrbsReturned + goto_if_set FLAG_KYOGRE_ESCAPED_SEAFLOOR_CAVERN, MtPyre_Summit_EventScript_OldLadyLegendariesAwake + msgbox MtPyre_Summit_Text_OrbsHaveBeenTaken, MSGBOX_DEFAULT release end -MtPyre_Summit_EventScript_2321CB:: @ 82321CB - msgbox MtPyre_Summit_Text_232CA6, MSGBOX_DEFAULT +MtPyre_Summit_EventScript_OldLadyOrbsReturned:: @ 82321CB + msgbox MtPyre_Summit_Text_ThoseTwoMenReturnedOrbs, MSGBOX_DEFAULT setflag FLAG_RETURNED_RED_OR_BLUE_ORB release end -MtPyre_Summit_EventScript_2321D8:: @ 82321D8 - msgbox MtPyre_Summit_Text_232B4F, MSGBOX_DEFAULT +MtPyre_Summit_EventScript_OldLadyLegendariesAwake:: @ 82321D8 + msgbox MtPyre_Summit_Text_GroudonKyogreAwakened, MSGBOX_DEFAULT release end -MtPyre_Summit_EventScript_2321E2:: @ 82321E2 - msgbox MtPyre_Summit_Text_232D1E, MSGBOX_DEFAULT +MtPyre_Summit_EventScript_OldLadyAfterOrbsReturned:: @ 82321E2 + msgbox MtPyre_Summit_Text_SuperAncientPokemonTaughtUs, MSGBOX_DEFAULT release end -MtPyre_Summit_EventScript_2321EC:: @ 82321EC +MtPyre_Summit_EventScript_ArchieMaxieTrigger0:: @ 82321EC lockall setvar VAR_0x8008, 0 - goto MtPyre_Summit_EventScript_232210 + goto MtPyre_Summit_EventScript_ArchieMaxieReturnOrbs end -MtPyre_Summit_EventScript_2321F8:: @ 82321F8 +MtPyre_Summit_EventScript_ArchieMaxieTrigger1:: @ 82321F8 lockall setvar VAR_0x8008, 1 - goto MtPyre_Summit_EventScript_232210 + goto MtPyre_Summit_EventScript_ArchieMaxieReturnOrbs end -MtPyre_Summit_EventScript_232204:: @ 8232204 +MtPyre_Summit_EventScript_ArchieMaxieTrigger2:: @ 8232204 lockall setvar VAR_0x8008, 2 - goto MtPyre_Summit_EventScript_232210 + goto MtPyre_Summit_EventScript_ArchieMaxieReturnOrbs end -MtPyre_Summit_EventScript_232210:: @ 8232210 +MtPyre_Summit_EventScript_ArchieMaxieReturnOrbs:: @ 8232210 applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceFastestUp waitmovement 0 delay 60 compare VAR_0x8008, 0 - call_if_eq MtPyre_Summit_EventScript_2322C4 + call_if_eq MtPyre_Summit_EventScript_ArchieMaxieBeginExit0 compare VAR_0x8008, 1 - call_if_eq MtPyre_Summit_EventScript_2322DD + call_if_eq MtPyre_Summit_EventScript_ArchieMaxieBeginExit1 compare VAR_0x8008, 2 - call_if_eq MtPyre_Summit_EventScript_2322F6 + call_if_eq MtPyre_Summit_EventScript_ArchieMaxieBeginExit2 playse SE_PIN applymovement 8, Common_Movement_ExclamationMark waitmovement 0 @@ -223,22 +224,22 @@ MtPyre_Summit_EventScript_232210:: @ 8232210 waitmovement 0 delay 30 compare VAR_0x8008, 0 - call_if_eq MtPyre_Summit_EventScript_23230F + call_if_eq MtPyre_Summit_EventScript_MaxieApproachPlayer0 compare VAR_0x8008, 1 - call_if_eq MtPyre_Summit_EventScript_232328 + call_if_eq MtPyre_Summit_EventScript_MaxieApproachPlayer1 compare VAR_0x8008, 2 - call_if_eq MtPyre_Summit_EventScript_232341 - msgbox MtPyre_Summit_Text_233183, MSGBOX_DEFAULT + call_if_eq MtPyre_Summit_EventScript_MaxieApproachPlayer2 + msgbox MtPyre_Summit_Text_MaxieSilence, MSGBOX_DEFAULT closemessage compare VAR_0x8008, 0 - call_if_eq MtPyre_Summit_EventScript_23235A + call_if_eq MtPyre_Summit_EventScript_MaxieApproachArchie0 compare VAR_0x8008, 1 - call_if_eq MtPyre_Summit_EventScript_232376 + call_if_eq MtPyre_Summit_EventScript_MaxieApproachArchie1 compare VAR_0x8008, 2 - call_if_eq MtPyre_Summit_EventScript_232392 + call_if_eq MtPyre_Summit_EventScript_MaxieApproachArchie2 delay 30 - applymovement 2, MtPyre_Summit_Movement_2323B6 - applymovement 8, MtPyre_Summit_Movement_2323BD + applymovement 2, MtPyre_Summit_Movement_MaxieExit + applymovement 8, MtPyre_Summit_Movement_ArchieExit waitmovement 0 removeobject 2 removeobject 8 @@ -246,85 +247,85 @@ MtPyre_Summit_EventScript_232210:: @ 8232210 releaseall end -MtPyre_Summit_EventScript_2322C4:: @ 82322C4 - applymovement EVENT_OBJ_ID_PLAYER, MtPyre_Summit_Movement_2323C4 - applymovement 2, MtPyre_Summit_Movement_2323B6 - applymovement 8, MtPyre_Summit_Movement_2323BD +MtPyre_Summit_EventScript_ArchieMaxieBeginExit0:: @ 82322C4 + applymovement EVENT_OBJ_ID_PLAYER, MtPyre_Summit_Movement_PlayerWatchArchieMaxieExit0 + applymovement 2, MtPyre_Summit_Movement_MaxieExit + applymovement 8, MtPyre_Summit_Movement_ArchieExit waitmovement 0 return -MtPyre_Summit_EventScript_2322DD:: @ 82322DD - applymovement EVENT_OBJ_ID_PLAYER, MtPyre_Summit_Movement_2323CB - applymovement 2, MtPyre_Summit_Movement_2323B6 - applymovement 8, MtPyre_Summit_Movement_2323BD +MtPyre_Summit_EventScript_ArchieMaxieBeginExit1:: @ 82322DD + applymovement EVENT_OBJ_ID_PLAYER, MtPyre_Summit_Movement_PlayerWatchArchieMaxieExit1 + applymovement 2, MtPyre_Summit_Movement_MaxieExit + applymovement 8, MtPyre_Summit_Movement_ArchieExit waitmovement 0 return -MtPyre_Summit_EventScript_2322F6:: @ 82322F6 - applymovement EVENT_OBJ_ID_PLAYER, MtPyre_Summit_Movement_2323D2 - applymovement 2, MtPyre_Summit_Movement_2323B6 - applymovement 8, MtPyre_Summit_Movement_2323BD +MtPyre_Summit_EventScript_ArchieMaxieBeginExit2:: @ 82322F6 + applymovement EVENT_OBJ_ID_PLAYER, MtPyre_Summit_Movement_PlayerWatchArchieMaxieExit2 + applymovement 2, MtPyre_Summit_Movement_MaxieExit + applymovement 8, MtPyre_Summit_Movement_ArchieExit waitmovement 0 return -MtPyre_Summit_EventScript_23230F:: @ 823230F - applymovement EVENT_OBJ_ID_PLAYER, MtPyre_Summit_Movement_2323AE - applymovement 2, MtPyre_Summit_Movement_2323E7 - applymovement 8, MtPyre_Summit_Movement_2323D8 +MtPyre_Summit_EventScript_MaxieApproachPlayer0:: @ 823230F + applymovement EVENT_OBJ_ID_PLAYER, MtPyre_Summit_Movement_PlayerFaceMaxie0 + applymovement 2, MtPyre_Summit_Movement_ArchieWatchMaxie + applymovement 8, MtPyre_Summit_Movement_MaxieApproachPlayer0 waitmovement 0 return -MtPyre_Summit_EventScript_232328:: @ 8232328 - applymovement EVENT_OBJ_ID_PLAYER, MtPyre_Summit_Movement_2323B2 - applymovement 2, MtPyre_Summit_Movement_2323E7 - applymovement 8, MtPyre_Summit_Movement_2323DD +MtPyre_Summit_EventScript_MaxieApproachPlayer1:: @ 8232328 + applymovement EVENT_OBJ_ID_PLAYER, MtPyre_Summit_Movement_PlayerFaceMaxie + applymovement 2, MtPyre_Summit_Movement_ArchieWatchMaxie + applymovement 8, MtPyre_Summit_Movement_MaxieApproachPlayer1 waitmovement 0 return -MtPyre_Summit_EventScript_232341:: @ 8232341 - applymovement EVENT_OBJ_ID_PLAYER, MtPyre_Summit_Movement_2323B2 - applymovement 2, MtPyre_Summit_Movement_2323E7 - applymovement 8, MtPyre_Summit_Movement_2323E2 +MtPyre_Summit_EventScript_MaxieApproachPlayer2:: @ 8232341 + applymovement EVENT_OBJ_ID_PLAYER, MtPyre_Summit_Movement_PlayerFaceMaxie + applymovement 2, MtPyre_Summit_Movement_ArchieWatchMaxie + applymovement 8, MtPyre_Summit_Movement_MaxieApproachPlayer2 waitmovement 0 return -MtPyre_Summit_EventScript_23235A:: @ 823235A - applymovement EVENT_OBJ_ID_PLAYER, MtPyre_Summit_Movement_2323EA - applymovement 8, MtPyre_Summit_Movement_2323ED +MtPyre_Summit_EventScript_MaxieApproachArchie0:: @ 823235A + applymovement EVENT_OBJ_ID_PLAYER, MtPyre_Summit_Movement_PlayerWatchMaxie + applymovement 8, MtPyre_Summit_Movement_MaxieApproachArchie0 waitmovement 0 applymovement 2, Common_Movement_WalkInPlaceFastestRight waitmovement 0 return -MtPyre_Summit_EventScript_232376:: @ 8232376 - applymovement EVENT_OBJ_ID_PLAYER, MtPyre_Summit_Movement_2323EA - applymovement 8, MtPyre_Summit_Movement_2323F3 +MtPyre_Summit_EventScript_MaxieApproachArchie1:: @ 8232376 + applymovement EVENT_OBJ_ID_PLAYER, MtPyre_Summit_Movement_PlayerWatchMaxie + applymovement 8, MtPyre_Summit_Movement_MaxieApproachArchie1 waitmovement 0 applymovement 2, Common_Movement_WalkInPlaceFastestRight waitmovement 0 return -MtPyre_Summit_EventScript_232392:: @ 8232392 - applymovement EVENT_OBJ_ID_PLAYER, MtPyre_Summit_Movement_2323EA - applymovement 8, MtPyre_Summit_Movement_2323F8 +MtPyre_Summit_EventScript_MaxieApproachArchie2:: @ 8232392 + applymovement EVENT_OBJ_ID_PLAYER, MtPyre_Summit_Movement_PlayerWatchMaxie + applymovement 8, MtPyre_Summit_Movement_MaxieApproachArchie2 waitmovement 0 applymovement 2, Common_Movement_WalkInPlaceFastestRight waitmovement 0 return -MtPyre_Summit_Movement_2323AE: @ 82323AE +MtPyre_Summit_Movement_PlayerFaceMaxie0: @ 82323AE delay_16 delay_16 walk_in_place_fastest_right step_end -MtPyre_Summit_Movement_2323B2: @ 82323B2 +MtPyre_Summit_Movement_PlayerFaceMaxie: @ 82323B2 delay_16 delay_16 walk_in_place_fastest_left step_end -MtPyre_Summit_Movement_2323B6: @ 82323B6 +MtPyre_Summit_Movement_MaxieExit: @ 82323B6 walk_down walk_down walk_down @@ -333,7 +334,7 @@ MtPyre_Summit_Movement_2323B6: @ 82323B6 walk_down step_end -MtPyre_Summit_Movement_2323BD: @ 82323BD +MtPyre_Summit_Movement_ArchieExit: @ 82323BD walk_down walk_down walk_down @@ -342,7 +343,7 @@ MtPyre_Summit_Movement_2323BD: @ 82323BD walk_down step_end -MtPyre_Summit_Movement_2323C4: @ 82323C4 +MtPyre_Summit_Movement_PlayerWatchArchieMaxieExit0: @ 82323C4 delay_16 delay_8 walk_left @@ -351,7 +352,7 @@ MtPyre_Summit_Movement_2323C4: @ 82323C4 walk_in_place_fastest_down step_end -MtPyre_Summit_Movement_2323CB: @ 82323CB +MtPyre_Summit_Movement_PlayerWatchArchieMaxieExit1: @ 82323CB delay_16 delay_8 walk_right @@ -360,7 +361,7 @@ MtPyre_Summit_Movement_2323CB: @ 82323CB walk_in_place_fastest_down step_end -MtPyre_Summit_Movement_2323D2: @ 82323D2 +MtPyre_Summit_Movement_PlayerWatchArchieMaxieExit2: @ 82323D2 delay_16 delay_8 walk_in_place_fastest_left @@ -368,38 +369,38 @@ MtPyre_Summit_Movement_2323D2: @ 82323D2 walk_in_place_fastest_down step_end -MtPyre_Summit_Movement_2323D8: @ 82323D8 +MtPyre_Summit_Movement_MaxieApproachPlayer0: @ 82323D8 walk_up walk_up walk_up walk_left step_end -MtPyre_Summit_Movement_2323DD: @ 82323DD +MtPyre_Summit_Movement_MaxieApproachPlayer1: @ 82323DD walk_up walk_up walk_up walk_in_place_fastest_right step_end -MtPyre_Summit_Movement_2323E2: @ 82323E2 +MtPyre_Summit_Movement_MaxieApproachPlayer2: @ 82323E2 walk_up walk_up walk_up walk_in_place_fastest_right step_end -MtPyre_Summit_Movement_2323E7: @ 82323E7 +MtPyre_Summit_Movement_ArchieWatchMaxie: @ 82323E7 delay_16 walk_in_place_fastest_up step_end -MtPyre_Summit_Movement_2323EA: @ 82323EA +MtPyre_Summit_Movement_PlayerWatchMaxie: @ 82323EA delay_16 walk_in_place_fastest_down step_end -MtPyre_Summit_Movement_2323ED: @ 82323ED +MtPyre_Summit_Movement_MaxieApproachArchie0: @ 82323ED walk_down walk_right walk_down @@ -407,54 +408,54 @@ MtPyre_Summit_Movement_2323ED: @ 82323ED walk_in_place_fastest_left step_end -MtPyre_Summit_Movement_2323F3: @ 82323F3 +MtPyre_Summit_Movement_MaxieApproachArchie1: @ 82323F3 walk_down walk_down walk_down walk_in_place_fastest_left step_end -MtPyre_Summit_Movement_2323F8: @ 82323F8 +MtPyre_Summit_Movement_MaxieApproachArchie2: @ 82323F8 walk_down walk_down walk_down walk_in_place_fastest_left step_end -MtPyre_Summit_EventScript_2323FD:: @ 82323FD - trainerbattle_single TRAINER_GRUNT_17, MtPyre_Summit_Text_232459, MtPyre_Summit_Text_2324A0 - msgbox MtPyre_Summit_Text_2324E0, MSGBOX_AUTOCLOSE +MtPyre_Summit_EventScript_Grunt17:: @ 82323FD + trainerbattle_single TRAINER_GRUNT_17, MtPyre_Summit_Text_Grunt17Intro, MtPyre_Summit_Text_Grunt17Defeat + msgbox MtPyre_Summit_Text_Grunt17PostBattle, MSGBOX_AUTOCLOSE end -MtPyre_Summit_EventScript_232414:: @ 8232414 - trainerbattle_single TRAINER_GRUNT_18, MtPyre_Summit_Text_232513, MtPyre_Summit_Text_2325B0 - msgbox MtPyre_Summit_Text_2325E4, MSGBOX_AUTOCLOSE +MtPyre_Summit_EventScript_Grunt18:: @ 8232414 + trainerbattle_single TRAINER_GRUNT_18, MtPyre_Summit_Text_Grunt18Intro, MtPyre_Summit_Text_Grunt18Defeat + msgbox MtPyre_Summit_Text_Grunt18PostBattle, MSGBOX_AUTOCLOSE end -MtPyre_Summit_EventScript_23242B:: @ 823242B - trainerbattle_single TRAINER_GRUNT_19, MtPyre_Summit_Text_23261D, MtPyre_Summit_Text_232678 - msgbox MtPyre_Summit_Text_2326B3, MSGBOX_AUTOCLOSE +MtPyre_Summit_EventScript_Grunt19:: @ 823242B + trainerbattle_single TRAINER_GRUNT_19, MtPyre_Summit_Text_Grunt19Intro, MtPyre_Summit_Text_Grunt19Defeat + msgbox MtPyre_Summit_Text_Grunt19PostBattle, MSGBOX_AUTOCLOSE end -MtPyre_Summit_EventScript_232442:: @ 8232442 - trainerbattle_single TRAINER_GRUNT_29, MtPyre_Summit_Text_23271B, MtPyre_Summit_Text_23279A - msgbox MtPyre_Summit_Text_2327D8, MSGBOX_AUTOCLOSE +MtPyre_Summit_EventScript_Grunt29:: @ 8232442 + trainerbattle_single TRAINER_GRUNT_29, MtPyre_Summit_Text_Grunt29Intro, MtPyre_Summit_Text_Grunt29Defeat + msgbox MtPyre_Summit_Text_Grunt29PostBattle, MSGBOX_AUTOCLOSE end -MtPyre_Summit_Text_232459: @ 8232459 +MtPyre_Summit_Text_Grunt17Intro: @ 8232459 .string "No! Those TEAM MAGMA goons got\n" .string "here ahead of us!\p" .string "We can't fall behind!$" -MtPyre_Summit_Text_2324A0: @ 82324A0 +MtPyre_Summit_Text_Grunt17Defeat: @ 82324A0 .string "I thought you were one of the MAGMAS\n" .string "who happened to come back…$" -MtPyre_Summit_Text_2324E0: @ 82324E0 +MtPyre_Summit_Text_Grunt17PostBattle: @ 82324E0 .string "Yeah, so you are strong…\n" .string "But there're a lot of us!$" -MtPyre_Summit_Text_232513: @ 8232513 +MtPyre_Summit_Text_Grunt18Intro: @ 8232513 .string "Hah!\n" .string "Too bad for you!\p" .string "If you came earlier, you only would've\n" @@ -462,46 +463,46 @@ MtPyre_Summit_Text_232513: @ 8232513 .string "But since you arrived now, you have\n" .string "to take on us toughies!$" -MtPyre_Summit_Text_2325B0: @ 82325B0 +MtPyre_Summit_Text_Grunt18Defeat: @ 82325B0 .string "Urgh… I should've let you take on\n" .string "TEAM MAGMA first…$" -MtPyre_Summit_Text_2325E4: @ 82325E4 +MtPyre_Summit_Text_Grunt18PostBattle: @ 82325E4 .string "You don't know anything!\n" .string "So why are you messing with us?$" -MtPyre_Summit_Text_23261D: @ 823261D +MtPyre_Summit_Text_Grunt19Intro: @ 823261D .string "You…\n" .string "We saw you at MT. CHIMNEY.\p" .string "You don't belong to either TEAM,\n" .string "so why would you be here?$" -MtPyre_Summit_Text_232678: @ 8232678 +MtPyre_Summit_Text_Grunt19Defeat: @ 8232678 .string "If you're going to mess with anyone,\n" .string "let it be TEAM MAGMA…$" -MtPyre_Summit_Text_2326B3: @ 82326B3 +MtPyre_Summit_Text_Grunt19PostBattle: @ 82326B3 .string "Heh, it doesn't matter!\n" .string "We bought ourselves some time!\p" .string "The BOSS should have snatched what\n" .string "he was after!$" -MtPyre_Summit_Text_23271B: @ 823271B +MtPyre_Summit_Text_Grunt29Intro: @ 823271B .string "Oh, I know!\n" .string "You tried to join TEAM MAGMA,\l" .string "but they wouldn't have you!\p" .string "Well, don't think that we'll let you\n" .string "join our TEAM AQUA!$" -MtPyre_Summit_Text_23279A: @ 823279A +MtPyre_Summit_Text_Grunt29Defeat: @ 823279A .string "If you want to join TEAM AQUA that\n" .string "badly, we can consider it…$" -MtPyre_Summit_Text_2327D8: @ 82327D8 +MtPyre_Summit_Text_Grunt29PostBattle: @ 82327D8 .string "We have a great combination going\n" .string "with us members and our leader.$" -MtPyre_Summit_Text_23281A: @ 823281A +MtPyre_Summit_Text_ArchieWeGotTheOrbLetsGo: @ 823281A .string "ARCHIE: TEAM MAGMA's MAXIE got ahead\n" .string "of us, but we also got what we wanted.\p" .string "The RED ORB preserved at MT. PYRE…\n" @@ -511,7 +512,7 @@ MtPyre_Summit_Text_23281A: @ 823281A .string "Okay, TEAM!\n" .string "We're pulling out!$" -MtPyre_Summit_Text_23290E: @ 823290E +MtPyre_Summit_Text_BothOrbsTakenMagmaLeftThis: @ 823290E .string "Oh, no…\n" .string "This cannot happen…\p" .string "Not only the BLUE ORB, but even\n" @@ -531,13 +532,13 @@ MtPyre_Summit_Text_23290E: @ 823290E .string "I would like you to have it.\n" .string "Perhaps it will be useful in some way.$" -MtPyre_Summit_Text_232AD8: @ 8232AD8 +MtPyre_Summit_Text_OrbsHaveBeenTaken: @ 8232AD8 .string "The BLUE ORB and RED ORB taken by\n" .string "those sinister men…\p" .string "They must never be apart…\n" .string "I fear something terrible will happen…$" -MtPyre_Summit_Text_232B4F: @ 8232B4F +MtPyre_Summit_Text_GroudonKyogreAwakened: @ 8232B4F .string "Oh, my goodness…\p" .string "You say that both GROUDON and KYOGRE\n" .string "have been awakened?\p" @@ -551,13 +552,13 @@ MtPyre_Summit_Text_232B4F: @ 8232B4F .string "It could be a human, or perhaps\n" .string "a POKéMON, but no one knows.$" -MtPyre_Summit_Text_232CA6: @ 8232CA6 +MtPyre_Summit_Text_ThoseTwoMenReturnedOrbs: @ 8232CA6 .string "The two men who took the ORBS came\n" .string "back to return them on their own.\p" .string "Those men…\n" .string "Perhaps they are not so evil after all…$" -MtPyre_Summit_Text_232D1E: @ 8232D1E +MtPyre_Summit_Text_SuperAncientPokemonTaughtUs: @ 8232D1E .string "The embodiments of the land, sea,\n" .string "and the sky…\p" .string "That is said to be the identities of\n" @@ -568,7 +569,7 @@ MtPyre_Summit_Text_232D1E: @ 8232D1E .string "The super-ancient POKéMON have\n" .string "taught us that…$" -MtPyre_Summit_Text_232E0C: @ 8232E0C +MtPyre_Summit_Text_WillYouHearOutMyTale: @ 8232E0C .string "MT. PYRE is where we calm the spirits\n" .string "of POKéMON that have passed on…\p" .string "This is a high place where one can\n" @@ -579,7 +580,7 @@ MtPyre_Summit_Text_232E0C: @ 8232E0C .string "Will you hear out my tale? A tale long\n" .string "told in the HOENN region?$" -MtPyre_Summit_Text_232F27: @ 8232F27 +MtPyre_Summit_Text_GroudonKyogreTale: @ 8232F27 .string "It happened long, long ago…\p" .string "The world was wracked by a ferocious\n" .string "clash between the POKéMON of the land\l" @@ -599,16 +600,16 @@ MtPyre_Summit_Text_232F27: @ 8232F27 .string "the sea where eventually they\l" .string "disappeared…$" -MtPyre_Summit_Text_233162: @ 8233162 +MtPyre_Summit_Text_WellThatTooIsFine: @ 8233162 .string "I see…\n" .string "Well, that, too, is fine…$" -MtPyre_Summit_Text_233183: @ 8233183 +MtPyre_Summit_Text_MaxieSilence: @ 8233183 .string "MAXIE: {PLAYER}…\p" .string "… … … … … …\n" .string "… … … … … …$" -MtPyre_Summit_Text_2331A6: @ 82331A6 +MtPyre_Summit_Text_HearTheNewLegendOfHoenn: @ 82331A6 .string "It is my role to pass on the legends\n" .string "of HOENN to future generations.\p" .string "And the crisis that just ended in\n" @@ -616,7 +617,7 @@ MtPyre_Summit_Text_2331A6: @ 82331A6 .string "Have you the time to hear the new\n" .string "legend of HOENN?$" -MtPyre_Summit_Text_23325D: @ 823325D +MtPyre_Summit_Text_HoennTrioTale: @ 823325D .string "It happened long, long ago…\p" .string "The world was wracked by a ferocious\n" .string "clash between the POKéMON of the land\l" diff --git a/data/maps/Route119_WeatherInstitute_1F/map.json b/data/maps/Route119_WeatherInstitute_1F/map.json index 8200c20df2..74629d77e8 100644 --- a/data/maps/Route119_WeatherInstitute_1F/map.json +++ b/data/maps/Route119_WeatherInstitute_1F/map.json @@ -24,7 +24,7 @@ "movement_range_y": 0, "trainer_type": "1", "trainer_sight_or_berry_tree_id": "3", - "script": "Route119_WeatherInstitute_1F_EventScript_26FB29", + "script": "Route119_WeatherInstitute_1F_EventScript_Grunt11", "flag": "FLAG_HIDE_ROUTE_119_TEAM_AQUA" }, { @@ -37,7 +37,7 @@ "movement_range_y": 0, "trainer_type": "1", "trainer_sight_or_berry_tree_id": "2", - "script": "Route119_WeatherInstitute_1F_EventScript_26FB40", + "script": "Route119_WeatherInstitute_1F_EventScript_Grunt20", "flag": "FLAG_HIDE_ROUTE_119_TEAM_AQUA" }, { @@ -50,7 +50,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "Route119_WeatherInstitute_1F_EventScript_26FB0F", + "script": "Route119_WeatherInstitute_1F_EventScript_InstituteWorker2", "flag": "FLAG_HIDE_WEATHER_INSTITUTE_1F_WORKERS" }, { @@ -63,7 +63,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "Route119_WeatherInstitute_1F_EventScript_26FAC8", + "script": "Route119_WeatherInstitute_1F_EventScript_InstituteWorker1", "flag": "FLAG_HIDE_WEATHER_INSTITUTE_1F_WORKERS" }, { @@ -76,7 +76,7 @@ "movement_range_y": 1, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "Route119_WeatherInstitute_1F_EventScript_26FAA4", + "script": "Route119_WeatherInstitute_1F_EventScript_LittleBoy", "flag": "0" } ], @@ -111,7 +111,7 @@ "y": 2, "elevation": 0, "player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY", - "script": "Route119_WeatherInstitute_1F_EventScript_26FB18" + "script": "Route119_WeatherInstitute_1F_EventScript_Bed" }, { "type": "sign", @@ -119,7 +119,7 @@ "y": 3, "elevation": 0, "player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY", - "script": "Route119_WeatherInstitute_1F_EventScript_26FB18" + "script": "Route119_WeatherInstitute_1F_EventScript_Bed" }, { "type": "sign", @@ -127,7 +127,7 @@ "y": 2, "elevation": 0, "player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY", - "script": "Route119_WeatherInstitute_1F_EventScript_26FB18" + "script": "Route119_WeatherInstitute_1F_EventScript_Bed" }, { "type": "sign", @@ -135,7 +135,7 @@ "y": 3, "elevation": 0, "player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY", - "script": "Route119_WeatherInstitute_1F_EventScript_26FB18" + "script": "Route119_WeatherInstitute_1F_EventScript_Bed" } ] } \ No newline at end of file diff --git a/data/maps/Route119_WeatherInstitute_1F/scripts.inc b/data/maps/Route119_WeatherInstitute_1F/scripts.inc index b4b309d80d..630f69a297 100644 --- a/data/maps/Route119_WeatherInstitute_1F/scripts.inc +++ b/data/maps/Route119_WeatherInstitute_1F/scripts.inc @@ -4,111 +4,111 @@ Route119_WeatherInstitute_1F_MapScripts:: @ 826FA86 Route119_WeatherInstitute_1F_OnTransition: @ 826FA8C compare VAR_WEATHER_INSTITUTE_STATE, 0 - call_if_eq Route119_WeatherInstitute_1F_EventScript_26FA98 + call_if_eq Route119_WeatherInstitute_1F_EventScript_SetLittleBoyPos end -Route119_WeatherInstitute_1F_EventScript_26FA98:: @ 826FA98 +Route119_WeatherInstitute_1F_EventScript_SetLittleBoyPos:: @ 826FA98 setobjectxyperm 5, 0, 5 setobjectmovementtype 5, MOVEMENT_TYPE_FACE_RIGHT return -Route119_WeatherInstitute_1F_EventScript_26FAA4:: @ 826FAA4 +Route119_WeatherInstitute_1F_EventScript_LittleBoy:: @ 826FAA4 lock faceplayer special GetPlayerBigGuyGirlString compare VAR_WEATHER_INSTITUTE_STATE, 0 - goto_if_eq Route119_WeatherInstitute_1F_EventScript_26FABE - msgbox Route119_WeatherInstitute_1F_Text_26FCE5, MSGBOX_DEFAULT + goto_if_eq Route119_WeatherInstitute_1F_EventScript_LittleBoyTeamAquaHere + msgbox Route119_WeatherInstitute_1F_Text_WowYoureStrong, MSGBOX_DEFAULT release end -Route119_WeatherInstitute_1F_EventScript_26FABE:: @ 826FABE - msgbox Route119_WeatherInstitute_1F_Text_26FCB7, MSGBOX_DEFAULT +Route119_WeatherInstitute_1F_EventScript_LittleBoyTeamAquaHere:: @ 826FABE + msgbox Route119_WeatherInstitute_1F_Text_EveryoneWentUpstairs, MSGBOX_DEFAULT release end -Route119_WeatherInstitute_1F_EventScript_26FAC8:: @ 826FAC8 +Route119_WeatherInstitute_1F_EventScript_InstituteWorker1:: @ 826FAC8 lock faceplayer - goto_if_unset FLAG_SYS_GAME_CLEAR, Route119_WeatherInstitute_1F_EventScript_26FB05 + goto_if_unset FLAG_SYS_GAME_CLEAR, Route119_WeatherInstitute_1F_EventScript_StudyingRain setvar VAR_0x8004, 0 - call_if_set FLAG_DEFEATED_KYOGRE, Route119_WeatherInstitute_1F_EventScript_26FAFF - call_if_set FLAG_DEFEATED_GROUDON, Route119_WeatherInstitute_1F_EventScript_26FAFF - compare VAR_0x8004, 2 - goto_if_eq Route119_WeatherInstitute_1F_EventScript_26FB05 - msgbox Route119_WeatherInstitute_1F_Text_26FDE8, MSGBOX_DEFAULT + call_if_set FLAG_DEFEATED_KYOGRE, Route119_WeatherInstitute_1F_EventScript_LegendaryDefeated + call_if_set FLAG_DEFEATED_GROUDON, Route119_WeatherInstitute_1F_EventScript_LegendaryDefeated + compare VAR_0x8004, 2 @ Both defeated + goto_if_eq Route119_WeatherInstitute_1F_EventScript_StudyingRain + msgbox Route119_WeatherInstitute_1F_Text_NoticingUnusualWeather, MSGBOX_DEFAULT release end -Route119_WeatherInstitute_1F_EventScript_26FAFF:: @ 826FAFF +Route119_WeatherInstitute_1F_EventScript_LegendaryDefeated:: @ 826FAFF addvar VAR_0x8004, 1 return -Route119_WeatherInstitute_1F_EventScript_26FB05:: @ 826FB05 - msgbox Route119_WeatherInstitute_1F_Text_26FD2E, MSGBOX_DEFAULT +Route119_WeatherInstitute_1F_EventScript_StudyingRain:: @ 826FB05 + msgbox Route119_WeatherInstitute_1F_Text_ProfStudyingRain, MSGBOX_DEFAULT release end -Route119_WeatherInstitute_1F_EventScript_26FB0F:: @ 826FB0F - msgbox Route119_WeatherInstitute_1F_Text_26FE94, MSGBOX_NPC +Route119_WeatherInstitute_1F_EventScript_InstituteWorker2:: @ 826FB0F + msgbox Route119_WeatherInstitute_1F_Text_WhatWereAquasUpTo, MSGBOX_NPC end -Route119_WeatherInstitute_1F_EventScript_26FB18:: @ 826FB18 +Route119_WeatherInstitute_1F_EventScript_Bed:: @ 826FB18 lockall - msgbox Route119_WeatherInstitute_1F_Text_26FEFC, MSGBOX_DEFAULT + msgbox Route119_WeatherInstitute_1F_Text_TakeRestInBed, MSGBOX_DEFAULT closemessage call Common_EventScript_OutOfCenterPartyHeal releaseall end -Route119_WeatherInstitute_1F_EventScript_26FB29:: @ 826FB29 - trainerbattle_single TRAINER_GRUNT_11, Route119_WeatherInstitute_1F_Text_26FB57, Route119_WeatherInstitute_1F_Text_26FBBB - msgbox Route119_WeatherInstitute_1F_Text_26FBD7, MSGBOX_AUTOCLOSE +Route119_WeatherInstitute_1F_EventScript_Grunt11:: @ 826FB29 + trainerbattle_single TRAINER_GRUNT_11, Route119_WeatherInstitute_1F_Text_Grunt11Intro, Route119_WeatherInstitute_1F_Text_Grunt11Defeat + msgbox Route119_WeatherInstitute_1F_Text_Grunt11PostBattle, MSGBOX_AUTOCLOSE end -Route119_WeatherInstitute_1F_EventScript_26FB40:: @ 826FB40 - trainerbattle_single TRAINER_GRUNT_20, Route119_WeatherInstitute_1F_Text_26FC34, Route119_WeatherInstitute_1F_Text_26FC52 - msgbox Route119_WeatherInstitute_1F_Text_26FC60, MSGBOX_AUTOCLOSE +Route119_WeatherInstitute_1F_EventScript_Grunt20:: @ 826FB40 + trainerbattle_single TRAINER_GRUNT_20, Route119_WeatherInstitute_1F_Text_Grunt20Intro, Route119_WeatherInstitute_1F_Text_Grunt20Defeat + msgbox Route119_WeatherInstitute_1F_Text_Grunt20PostBattle, MSGBOX_AUTOCLOSE end -Route119_WeatherInstitute_1F_Text_26FB57: @ 826FB57 +Route119_WeatherInstitute_1F_Text_Grunt11Intro: @ 826FB57 .string "The BOSS got interested in\n" .string "the research they have going here,\l" .string "so he sent us out.\p" .string "You quit meddling!$" -Route119_WeatherInstitute_1F_Text_26FBBB: @ 826FBBB +Route119_WeatherInstitute_1F_Text_Grunt11Defeat: @ 826FBBB .string "Blast it…\n" .string "Blasted by a kid…$" -Route119_WeatherInstitute_1F_Text_26FBD7: @ 826FBD7 +Route119_WeatherInstitute_1F_Text_Grunt11PostBattle: @ 826FBD7 .string "Our BOSS knows everything.\p" .string "But I'm just a GRUNT. What would I know\n" .string "about what he's thinking?$" -Route119_WeatherInstitute_1F_Text_26FC34: @ 826FC34 +Route119_WeatherInstitute_1F_Text_Grunt20Intro: @ 826FC34 .string "Huh?\n" .string "What's a kid doing here?$" -Route119_WeatherInstitute_1F_Text_26FC52: @ 826FC52 +Route119_WeatherInstitute_1F_Text_Grunt20Defeat: @ 826FC52 .string "Huh?\n" .string "I lost?!$" -Route119_WeatherInstitute_1F_Text_26FC60: @ 826FC60 +Route119_WeatherInstitute_1F_Text_Grunt20PostBattle: @ 826FC60 .string "Oh, no…\n" .string "I'll catch an earful for losing to a kid…\p" .string "I should just take a nap in the bed…$" -Route119_WeatherInstitute_1F_Text_26FCB7: @ 826FCB7 +Route119_WeatherInstitute_1F_Text_EveryoneWentUpstairs: @ 826FCB7 .string "While I was sleeping, everyone went\n" .string "upstairs!$" -Route119_WeatherInstitute_1F_Text_26FCE5: @ 826FCE5 +Route119_WeatherInstitute_1F_Text_WowYoureStrong: @ 826FCE5 .string "Wow, you're really strong!\p" .string "I wish I could be a POKéMON TRAINER\n" .string "like you!$" -Route119_WeatherInstitute_1F_Text_26FD2E: @ 826FD2E +Route119_WeatherInstitute_1F_Text_ProfStudyingRain: @ 826FD2E .string "The PROFESSOR loves rain.\n" .string "That's a fact.\p" .string "But if it keeps raining, people will be in\n" @@ -116,7 +116,7 @@ Route119_WeatherInstitute_1F_Text_26FD2E: @ 826FD2E .string "And thus, the PROFESSOR is studying\n" .string "if the rain can be put to good use.$" -Route119_WeatherInstitute_1F_Text_26FDE8: @ 826FDE8 +Route119_WeatherInstitute_1F_Text_NoticingUnusualWeather: @ 826FDE8 .string "On the 2nd floor of the INSTITUTE,\n" .string "we study the weather patterns over\l" .string "the HOENN region.\p" @@ -124,13 +124,13 @@ Route119_WeatherInstitute_1F_Text_26FDE8: @ 826FDE8 .string "isolated cases of droughts and\l" .string "heavy rain lately…$" -Route119_WeatherInstitute_1F_Text_26FE94: @ 826FE94 +Route119_WeatherInstitute_1F_Text_WhatWereAquasUpTo: @ 826FE94 .string "Hello!\n" .string "We've been saved by your actions!\p" .string "What I don't understand is what on\n" .string "earth the AQUAS were up to.$" -Route119_WeatherInstitute_1F_Text_26FEFC: @ 826FEFC +Route119_WeatherInstitute_1F_Text_TakeRestInBed: @ 826FEFC .string "There's a bed…\n" .string "Let's take a rest.$" diff --git a/data/maps/Route119_WeatherInstitute_2F/map.json b/data/maps/Route119_WeatherInstitute_2F/map.json index 4b4534a8e7..5b0301878c 100644 --- a/data/maps/Route119_WeatherInstitute_2F/map.json +++ b/data/maps/Route119_WeatherInstitute_2F/map.json @@ -24,7 +24,7 @@ "movement_range_y": 0, "trainer_type": "1", "trainer_sight_or_berry_tree_id": "4", - "script": "Route119_WeatherInstitute_2F_EventScript_26FF7F", + "script": "Route119_WeatherInstitute_2F_EventScript_Grunt12", "flag": "FLAG_HIDE_ROUTE_119_TEAM_AQUA" }, { @@ -37,7 +37,7 @@ "movement_range_y": 0, "trainer_type": "1", "trainer_sight_or_berry_tree_id": "2", - "script": "Route119_WeatherInstitute_2F_EventScript_26FF96", + "script": "Route119_WeatherInstitute_2F_EventScript_Grunt13", "flag": "FLAG_HIDE_ROUTE_119_TEAM_AQUA" }, { @@ -50,7 +50,7 @@ "movement_range_y": 0, "trainer_type": "1", "trainer_sight_or_berry_tree_id": "0", - "script": "Route119_WeatherInstitute_2F_EventScript_26FFAD", + "script": "Route119_WeatherInstitute_2F_EventScript_Shelly", "flag": "FLAG_HIDE_ROUTE_119_TEAM_AQUA" }, { @@ -76,7 +76,7 @@ "movement_range_y": 1, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "Route119_WeatherInstitute_2F_EventScript_27018B", + "script": "Route119_WeatherInstitute_2F_EventScript_WeatherScientist", "flag": "0" }, { @@ -115,7 +115,7 @@ "movement_range_y": 1, "trainer_type": "1", "trainer_sight_or_berry_tree_id": "3", - "script": "Route119_WeatherInstitute_2F_EventScript_26FF68", + "script": "Route119_WeatherInstitute_2F_EventScript_Grunt37", "flag": "FLAG_HIDE_ROUTE_119_TEAM_AQUA" } ], diff --git a/data/maps/Route119_WeatherInstitute_2F/scripts.inc b/data/maps/Route119_WeatherInstitute_2F/scripts.inc index 1e415dd415..6c70a880e0 100644 --- a/data/maps/Route119_WeatherInstitute_2F/scripts.inc +++ b/data/maps/Route119_WeatherInstitute_2F/scripts.inc @@ -4,62 +4,62 @@ Route119_WeatherInstitute_2F_MapScripts:: @ 826FF1E Route119_WeatherInstitute_2F_OnTransition: @ 826FF24 compare VAR_WEATHER_INSTITUTE_STATE, 0 - call_if_eq Route119_WeatherInstitute_2F_EventScript_26FF44 + call_if_eq Route119_WeatherInstitute_2F_EventScript_SetScientistPosAquaHere compare VAR_WEATHER_INSTITUTE_STATE, 1 - call_if_eq Route119_WeatherInstitute_2F_EventScript_26FF50 - call_if_set FLAG_SYS_GAME_CLEAR, Route119_WeatherInstitute_2F_EventScript_26FF5C + call_if_eq Route119_WeatherInstitute_2F_EventScript_SetScientistPosAquaGone + call_if_set FLAG_SYS_GAME_CLEAR, Route119_WeatherInstitute_2F_EventScript_SetScientistPosGameClear end -Route119_WeatherInstitute_2F_EventScript_26FF44:: @ 826FF44 +Route119_WeatherInstitute_2F_EventScript_SetScientistPosAquaHere:: @ 826FF44 setobjectxyperm 5, 1, 6 setobjectmovementtype 5, MOVEMENT_TYPE_FACE_RIGHT return -Route119_WeatherInstitute_2F_EventScript_26FF50:: @ 826FF50 +Route119_WeatherInstitute_2F_EventScript_SetScientistPosAquaGone:: @ 826FF50 setobjectxyperm 5, 4, 6 setobjectmovementtype 5, MOVEMENT_TYPE_FACE_RIGHT return -Route119_WeatherInstitute_2F_EventScript_26FF5C:: @ 826FF5C +Route119_WeatherInstitute_2F_EventScript_SetScientistPosGameClear:: @ 826FF5C setobjectxyperm 5, 2, 2 setobjectmovementtype 5, MOVEMENT_TYPE_FACE_UP return -Route119_WeatherInstitute_2F_EventScript_26FF68:: @ 826FF68 - trainerbattle_single TRAINER_GRUNT_37, Route119_WeatherInstitute_2F_Text_270335, Route119_WeatherInstitute_2F_Text_27039F - msgbox Route119_WeatherInstitute_2F_Text_2703C0, MSGBOX_AUTOCLOSE +Route119_WeatherInstitute_2F_EventScript_Grunt37:: @ 826FF68 + trainerbattle_single TRAINER_GRUNT_37, Route119_WeatherInstitute_2F_Text_Grunt37Intro, Route119_WeatherInstitute_2F_Text_Grunt37Defeat + msgbox Route119_WeatherInstitute_2F_Text_Grunt37PostBattle, MSGBOX_AUTOCLOSE end -Route119_WeatherInstitute_2F_EventScript_26FF7F:: @ 826FF7F - trainerbattle_single TRAINER_GRUNT_12, Route119_WeatherInstitute_2F_Text_27019C, Route119_WeatherInstitute_2F_Text_270208 - msgbox Route119_WeatherInstitute_2F_Text_27022B, MSGBOX_AUTOCLOSE +Route119_WeatherInstitute_2F_EventScript_Grunt12:: @ 826FF7F + trainerbattle_single TRAINER_GRUNT_12, Route119_WeatherInstitute_2F_Text_Grunt12Intro, Route119_WeatherInstitute_2F_Text_Grunt12Defeat + msgbox Route119_WeatherInstitute_2F_Text_Grunt12PostBattle, MSGBOX_AUTOCLOSE end -Route119_WeatherInstitute_2F_EventScript_26FF96:: @ 826FF96 - trainerbattle_single TRAINER_GRUNT_13, Route119_WeatherInstitute_2F_Text_270292, Route119_WeatherInstitute_2F_Text_2702CE - msgbox Route119_WeatherInstitute_2F_Text_2702DA, MSGBOX_AUTOCLOSE +Route119_WeatherInstitute_2F_EventScript_Grunt13:: @ 826FF96 + trainerbattle_single TRAINER_GRUNT_13, Route119_WeatherInstitute_2F_Text_Grunt13Intro, Route119_WeatherInstitute_2F_Text_Grunt13Defeat + msgbox Route119_WeatherInstitute_2F_Text_Grunt13PostBattle, MSGBOX_AUTOCLOSE end -Route119_WeatherInstitute_2F_EventScript_26FFAD:: @ 826FFAD - trainerbattle_single TRAINER_SHELLY_1, Route119_WeatherInstitute_2F_Text_270409, Route119_WeatherInstitute_2F_Text_2704BD, Route119_WeatherInstitute_2F_EventScript_26FFC8 - msgbox Route119_WeatherInstitute_2F_Text_2704E4, MSGBOX_AUTOCLOSE +Route119_WeatherInstitute_2F_EventScript_Shelly:: @ 826FFAD + trainerbattle_single TRAINER_SHELLY_1, Route119_WeatherInstitute_2F_Text_ShellyIntro, Route119_WeatherInstitute_2F_Text_ShellyDefeat, Route119_WeatherInstitute_2F_EventScript_ShellyDefeated + msgbox Route119_WeatherInstitute_2F_Text_ShellyPostBattle, MSGBOX_AUTOCLOSE end -Route119_WeatherInstitute_2F_EventScript_26FFC8:: @ 826FFC8 - msgbox Route119_WeatherInstitute_2F_Text_2704E4, MSGBOX_DEFAULT +Route119_WeatherInstitute_2F_EventScript_ShellyDefeated:: @ 826FFC8 + msgbox Route119_WeatherInstitute_2F_Text_ShellyPostBattle, MSGBOX_DEFAULT closemessage - addobject 7 - applymovement 7, Route119_WeatherInstitute_2F_Movement_270170 - applymovement EVENT_OBJ_ID_PLAYER, Route119_WeatherInstitute_2F_Movement_27017C + addobject 7 @ Aqua grunt + applymovement 7, Route119_WeatherInstitute_2F_Movement_GruntApproachShelly + applymovement EVENT_OBJ_ID_PLAYER, Route119_WeatherInstitute_2F_Movement_ShovePlayerOutOfWay waitmovement 0 - msgbox Route119_WeatherInstitute_2F_Text_270568, MSGBOX_DEFAULT + msgbox Route119_WeatherInstitute_2F_Text_TeamMagmaJustPassedBy, MSGBOX_DEFAULT closemessage playse SE_PIN applymovement 3, Common_Movement_ExclamationMark waitmovement 0 applymovement 3, Common_Movement_Delay48 waitmovement 0 - msgbox Route119_WeatherInstitute_2F_Text_2705DD, MSGBOX_DEFAULT + msgbox Route119_WeatherInstitute_2F_Text_WeHaveToHurryToMtPyre, MSGBOX_DEFAULT closemessage setvar VAR_WEATHER_INSTITUTE_STATE, 1 clearflag FLAG_HIDE_WEATHER_INSTITUTE_2F_WORKERS @@ -72,106 +72,104 @@ Route119_WeatherInstitute_2F_EventScript_26FFC8:: @ 826FFC8 removeobject 3 removeobject 8 removeobject 7 - applymovement EVENT_OBJ_ID_PLAYER, Route119_WeatherInstitute_2F_Movement_270184 + applymovement EVENT_OBJ_ID_PLAYER, Route119_WeatherInstitute_2F_Movement_PlayerReturnToPosition waitmovement 0 fadescreen 0 - applymovement 5, Route119_WeatherInstitute_2F_Movement_270187 + applymovement 5, Route119_WeatherInstitute_2F_Movement_ScientistApproachPlayer waitmovement 0 copyobjectxytoperm 5 - goto Route119_WeatherInstitute_2F_EventScript_27004D + goto Route119_WeatherInstitute_2F_EventScript_ReceiveCastform end -Route119_WeatherInstitute_2F_EventScript_27004D:: @ 827004D - msgbox Route119_WeatherInstitute_2F_Text_270650, MSGBOX_DEFAULT +Route119_WeatherInstitute_2F_EventScript_ReceiveCastform:: @ 827004D + msgbox Route119_WeatherInstitute_2F_Text_ThanksPleaseTakePokemon, MSGBOX_DEFAULT setvar VAR_TEMP_1, SPECIES_CASTFORM givemon SPECIES_CASTFORM, 25, ITEM_MYSTIC_WATER compare VAR_RESULT, 0 - goto_if_eq Route119_WeatherInstitute_2F_EventScript_270085 + goto_if_eq Route119_WeatherInstitute_2F_EventScript_ReceiveCastformParty compare VAR_RESULT, 1 - goto_if_eq Route119_WeatherInstitute_2F_EventScript_2700AD + goto_if_eq Route119_WeatherInstitute_2F_EventScript_ReceiveCastformPC goto Common_EventScript_NoMoreRoomForPokemon end -Route119_WeatherInstitute_2F_EventScript_270085:: @ 8270085 - call Route119_WeatherInstitute_2F_EventScript_2700DB +Route119_WeatherInstitute_2F_EventScript_ReceiveCastformParty:: @ 8270085 + call Route119_WeatherInstitute_2F_EventScript_ReceivedCastformFanfare msgbox gText_NicknameThisPokemon, MSGBOX_YESNO compare VAR_RESULT, 0 - goto_if_eq Route119_WeatherInstitute_2F_EventScript_2700EA + goto_if_eq Route119_WeatherInstitute_2F_EventScript_ExplainCastform call Common_EventScript_GetGiftMonPartySlot call Common_EventScript_NameReceivedPartyMon - goto Route119_WeatherInstitute_2F_EventScript_2700EA + goto Route119_WeatherInstitute_2F_EventScript_ExplainCastform end -Route119_WeatherInstitute_2F_EventScript_2700AD:: @ 82700AD - call Route119_WeatherInstitute_2F_EventScript_2700DB +Route119_WeatherInstitute_2F_EventScript_ReceiveCastformPC:: @ 82700AD + call Route119_WeatherInstitute_2F_EventScript_ReceivedCastformFanfare msgbox gText_NicknameThisPokemon, MSGBOX_YESNO compare VAR_RESULT, 0 - goto_if_eq Route119_WeatherInstitute_2F_EventScript_2700D0 + goto_if_eq Route119_WeatherInstitute_2F_EventScript_SendCastformToPC call Common_EventScript_NameReceivedBoxMon - goto Route119_WeatherInstitute_2F_EventScript_2700D0 + goto Route119_WeatherInstitute_2F_EventScript_SendCastformToPC end -Route119_WeatherInstitute_2F_EventScript_2700D0:: @ 82700D0 +Route119_WeatherInstitute_2F_EventScript_SendCastformToPC:: @ 82700D0 call Common_EventScript_TransferredToPC - goto Route119_WeatherInstitute_2F_EventScript_2700EA + goto Route119_WeatherInstitute_2F_EventScript_ExplainCastform end -Route119_WeatherInstitute_2F_EventScript_2700DB:: @ 82700DB +Route119_WeatherInstitute_2F_EventScript_ReceivedCastformFanfare:: @ 82700DB playfanfare MUS_FANFA4 - message Route119_WeatherInstitute_2F_Text_2706E8 + message Route119_WeatherInstitute_2F_Text_PlayerReceivedCastform waitmessage waitfanfare bufferspeciesname 0, SPECIES_CASTFORM return -Route119_WeatherInstitute_2F_EventScript_2700EA:: @ 82700EA - msgbox Route119_WeatherInstitute_2F_Text_2706FE, MSGBOX_DEFAULT +Route119_WeatherInstitute_2F_EventScript_ExplainCastform:: @ 82700EA + msgbox Route119_WeatherInstitute_2F_Text_PokemonChangesWithWeather, MSGBOX_DEFAULT setflag FLAG_RECEIVED_CASTFORM release end -Route119_WeatherInstitute_2F_EventScript_2700F7:: @ 82700F7 +Route119_WeatherInstitute_2F_EventScript_ScientistMentionWeather:: @ 82700F7 goto_if_set FLAG_SYS_GAME_CLEAR, Route119_WeatherInstitute_2F_EventScript_TryStartUnusualWeather - msgbox Route119_WeatherInstitute_2F_Text_27077E, MSGBOX_DEFAULT + msgbox Route119_WeatherInstitute_2F_Text_ChangingWeatherRidiculous, MSGBOX_DEFAULT release end Route119_WeatherInstitute_2F_EventScript_TryStartUnusualWeather:: @ 827010A - @ This code uses VAR_0x8004 to count the number of legendaries the player has defeated - @ already. setvar VAR_0x8004, 0 - call_if_set FLAG_DEFEATED_KYOGRE, WeatherInstitute_UnusualWeather_EventScript_IncrementLegendCount - call_if_set FLAG_DEFEATED_GROUDON, WeatherInstitute_UnusualWeather_EventScript_IncrementLegendCount - compare VAR_0x8004, 2 - goto_if_eq WeatherInstitute_UnusualWeather_EventScript_ShowLegendariesAlreadyDefeated - call_if_unset FLAG_TEMP_2, WeatherInstitute_UnusualWeather_EventScript_DoCreateUnusualWeather + call_if_set FLAG_DEFEATED_KYOGRE, Route119_WeatherInstitute_2F_EventScript_LegendaryDefeated + call_if_set FLAG_DEFEATED_GROUDON, Route119_WeatherInstitute_2F_EventScript_LegendaryDefeated + compare VAR_0x8004, 2 @ Both defeated + goto_if_eq Route119_WeatherInstitute_2F_EventScript_NoAbnormalWeather + call_if_unset FLAG_TEMP_2, Route119_WeatherInstitute_2F_EventScript_CreateUnusualWeather specialvar VAR_RESULT, GetUnusualWeatherMapNameAndType compare VAR_RESULT, 1 - goto_if_eq WeatherInstitute_UnusualWeather_EventScript_ShowKyogreWeatherMessage - msgbox WeatherInstitute_UnusualWeather_GroudonWeatherText, MSGBOX_DEFAULT + goto_if_eq Route119_WeatherInstitute_2F_EventScript_KyogreWeather + msgbox Route119_WeatherInstitute_2F_Text_GroudonWeather, MSGBOX_DEFAULT release end -WeatherInstitute_UnusualWeather_EventScript_ShowKyogreWeatherMessage:: @ 827014F - msgbox WeatherInstitute_UnusualWeather_KyogreWeatherText, MSGBOX_DEFAULT +Route119_WeatherInstitute_2F_EventScript_KyogreWeather:: @ 827014F + msgbox Route119_WeatherInstitute_2F_Text_KyogreWeather, MSGBOX_DEFAULT release end -WeatherInstitute_UnusualWeather_EventScript_DoCreateUnusualWeather:: @ 8270159 +Route119_WeatherInstitute_2F_EventScript_CreateUnusualWeather:: @ 8270159 special CreateUnusualWeatherEvent setflag FLAG_TEMP_2 return -WeatherInstitute_UnusualWeather_EventScript_IncrementLegendCount:: @ 8270160 +Route119_WeatherInstitute_2F_EventScript_LegendaryDefeated:: @ 8270160 addvar VAR_0x8004, 1 return -WeatherInstitute_UnusualWeather_EventScript_ShowLegendariesAlreadyDefeated:: @ 8270166 - msgbox WeatherInstitute_UnusualWeather_EventScript_ShowLegendariesAlreadyDefeatedText, MSGBOX_DEFAULT +Route119_WeatherInstitute_2F_EventScript_NoAbnormalWeather:: @ 8270166 + msgbox Route119_WeatherInstitute_2F_Text_NoAbnormalWeather, MSGBOX_DEFAULT release end -Route119_WeatherInstitute_2F_Movement_270170: @ 8270170 +Route119_WeatherInstitute_2F_Movement_GruntApproachShelly: @ 8270170 walk_fast_left walk_fast_left walk_fast_left @@ -185,7 +183,7 @@ Route119_WeatherInstitute_2F_Movement_270170: @ 8270170 walk_fast_left step_end -Route119_WeatherInstitute_2F_Movement_27017C: @ 827017C +Route119_WeatherInstitute_2F_Movement_ShovePlayerOutOfWay: @ 827017C delay_16 delay_16 delay_16 @@ -195,66 +193,66 @@ Route119_WeatherInstitute_2F_Movement_27017C: @ 827017C walk_in_place_fastest_down step_end -Route119_WeatherInstitute_2F_Movement_270184: @ 8270184 +Route119_WeatherInstitute_2F_Movement_PlayerReturnToPosition: @ 8270184 slide_down walk_in_place_fastest_left step_end -Route119_WeatherInstitute_2F_Movement_270187: @ 8270187 +Route119_WeatherInstitute_2F_Movement_ScientistApproachPlayer: @ 8270187 walk_right walk_right walk_right step_end -Route119_WeatherInstitute_2F_EventScript_27018B:: @ 827018B +Route119_WeatherInstitute_2F_EventScript_WeatherScientist:: @ 827018B lock faceplayer - goto_if_set FLAG_RECEIVED_CASTFORM, Route119_WeatherInstitute_2F_EventScript_2700F7 - goto Route119_WeatherInstitute_2F_EventScript_27004D + goto_if_set FLAG_RECEIVED_CASTFORM, Route119_WeatherInstitute_2F_EventScript_ScientistMentionWeather + goto Route119_WeatherInstitute_2F_EventScript_ReceiveCastform end -Route119_WeatherInstitute_2F_Text_27019C: @ 827019C +Route119_WeatherInstitute_2F_Text_Grunt12Intro: @ 827019C .string "The INSTITUTE created a type of\n" .string "POKéMON that has something to do with\l" .string "the weather. We're here to take them!$" -Route119_WeatherInstitute_2F_Text_270208: @ 8270208 +Route119_WeatherInstitute_2F_Text_Grunt12Defeat: @ 8270208 .string "Our plan's being spoiled by a kid?$" -Route119_WeatherInstitute_2F_Text_27022B: @ 827022B +Route119_WeatherInstitute_2F_Text_Grunt12PostBattle: @ 827022B .string "If the POKéMON they made here can\n" .string "control the weather freely, then we of\l" .string "TEAM AQUA definitely need it!$" -Route119_WeatherInstitute_2F_Text_270292: @ 8270292 +Route119_WeatherInstitute_2F_Text_Grunt13Intro: @ 8270292 .string "We're TEAM AQUA!\n" .string "We appear wherever anything rare is\l" .string "found!$" -Route119_WeatherInstitute_2F_Text_2702CE: @ 82702CE +Route119_WeatherInstitute_2F_Text_Grunt13Defeat: @ 82702CE .string "You got me!$" -Route119_WeatherInstitute_2F_Text_2702DA: @ 82702DA +Route119_WeatherInstitute_2F_Text_Grunt13PostBattle: @ 82702DA .string "You don't have any idea what we of\n" .string "TEAM AQUA are working towards!\l" .string "You stay out of our way!$" -Route119_WeatherInstitute_2F_Text_270335: @ 8270335 +Route119_WeatherInstitute_2F_Text_Grunt37Intro: @ 8270335 .string "Don't tell me you're looking for that\n" .string "weather POKéMON, too?\p" .string "That's a no-no!\n" .string "We were here to get it first!$" -Route119_WeatherInstitute_2F_Text_27039F: @ 827039F +Route119_WeatherInstitute_2F_Text_Grunt37Defeat: @ 827039F .string "Oh, will you look at my POKéMON?$" -Route119_WeatherInstitute_2F_Text_2703C0: @ 82703C0 +Route119_WeatherInstitute_2F_Text_Grunt37PostBattle: @ 82703C0 .string "Humph, so what?\n" .string "What we want…\p" .string "What we really want isn't here…\n" .string "Ihihihihi…$" -Route119_WeatherInstitute_2F_Text_270409: @ 8270409 +Route119_WeatherInstitute_2F_Text_ShellyIntro: @ 8270409 .string "Ahahahaha!\p" .string "You're going to meddle in TEAM AQUA's\n" .string "affairs?\p" @@ -263,55 +261,56 @@ Route119_WeatherInstitute_2F_Text_270409: @ 8270409 .string "You're so cute, you're disgusting!\n" .string "I'll put you down, kiddy!$" -Route119_WeatherInstitute_2F_Text_2704BD: @ 82704BD +Route119_WeatherInstitute_2F_Text_ShellyDefeat: @ 82704BD .string "Ahahahaha!\n" .string "You're disgustingly strong!$" -Route119_WeatherInstitute_2F_Text_2704E4: @ 82704E4 +Route119_WeatherInstitute_2F_Text_ShellyPostBattle: @ 82704E4 .string "It's bad enough to have TEAM MAGMA\n" .string "blunder about, but now there's you!\p" .string "What makes you want to sniff around\n" .string "in our business, anyway?$" -Route119_WeatherInstitute_2F_Text_270568: @ 8270568 +Route119_WeatherInstitute_2F_Text_TeamMagmaJustPassedBy: @ 8270568 .string "We have a situation here!\p" .string "A TEAM MAGMA mob just passed\n" .string "the WEATHER INSTITUTE.\p" .string "They appear to be headed for\n" .string "MT. PYRE!$" -Route119_WeatherInstitute_2F_Text_2705DD: @ 82705DD +Route119_WeatherInstitute_2F_Text_WeHaveToHurryToMtPyre: @ 82705DD .string "What?!\p" .string "We can't waste any more time here!\n" .string "We have to hurry to MT. PYRE, too!\p" .string "Ahahahaha!\n" .string "TEAM MAGMA, just you wait!$" -Route119_WeatherInstitute_2F_Text_270650: @ 8270650 +Route119_WeatherInstitute_2F_Text_ThanksPleaseTakePokemon: @ 8270650 .string "Thanks!\n" .string "Thanks to you, we're safe!\p" .string "It might be an odd way of thanking you,\n" .string "but take this POKéMON.$" -Route119_WeatherInstitute_2F_Text_2706B2: @ 82706B2 +@ Unused +Route119_WeatherInstitute_2F_Text_NoRoomForPokemon: @ 82706B2 .string "Hm? You don't seem to have any room\n" .string "for this POKéMON.$" -Route119_WeatherInstitute_2F_Text_2706E8: @ 82706E8 +Route119_WeatherInstitute_2F_Text_PlayerReceivedCastform: @ 82706E8 .string "{PLAYER} received CASTFORM!$" -Route119_WeatherInstitute_2F_Text_2706FE: @ 82706FE +Route119_WeatherInstitute_2F_Text_PokemonChangesWithWeather: @ 82706FE .string "That POKéMON changes shape according\n" .string "to the weather conditions.\p" .string "There're plenty of them in the\n" .string "INSTITUTE--go ahead and take it.$" -Route119_WeatherInstitute_2F_Text_27077E: @ 827077E +Route119_WeatherInstitute_2F_Text_ChangingWeatherRidiculous: @ 827077E .string "I've been researching rain for many\n" .string "years, but it's ridiculous to think that\l" .string "humans can freely change the weather.$" -WeatherInstitute_UnusualWeather_GroudonWeatherText: @ 82707F1 +Route119_WeatherInstitute_2F_Text_GroudonWeather: @ 82707F1 .string "I track weather patterns over\n" .string "the HOENN region.\p" .string "Presently, a drought has been recorded\n" @@ -319,7 +318,7 @@ WeatherInstitute_UnusualWeather_GroudonWeatherText: @ 82707F1 .string "Could that mean, somewhere near\n" .string "{STR_VAR_1}…$" -WeatherInstitute_UnusualWeather_KyogreWeatherText: @ 8270873 +Route119_WeatherInstitute_2F_Text_KyogreWeather: @ 8270873 .string "I track weather patterns over\n" .string "the HOENN region.\p" .string "Presently, heavy rainfall has been\n" @@ -327,7 +326,7 @@ WeatherInstitute_UnusualWeather_KyogreWeatherText: @ 8270873 .string "Could that mean, somewhere near\n" .string "{STR_VAR_1}…$" -WeatherInstitute_UnusualWeather_EventScript_ShowLegendariesAlreadyDefeatedText: @ 82708FC +Route119_WeatherInstitute_2F_Text_NoAbnormalWeather: @ 82708FC .string "Abnormal weather conditions are\n" .string "no longer being reported.\p" .string "The occasional rainfall is a blessing,\n" diff --git a/data/maps/SlateportCity_OceanicMuseum_1F/map.json b/data/maps/SlateportCity_OceanicMuseum_1F/map.json index eefb843f41..87fc0f6ee5 100644 --- a/data/maps/SlateportCity_OceanicMuseum_1F/map.json +++ b/data/maps/SlateportCity_OceanicMuseum_1F/map.json @@ -24,7 +24,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "SlateportCity_OceanicMuseum_1F_EventScript_20AD96", + "script": "SlateportCity_OceanicMuseum_1F_EventScript_EntranceAttendant", "flag": "0" }, { @@ -37,7 +37,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "SlateportCity_OceanicMuseum_1F_EventScript_20AE5F", + "script": "SlateportCity_OceanicMuseum_1F_EventScript_MuseumGrunt3", "flag": "FLAG_HIDE_SLATEPORT_CITY_OCEANIC_MUSEUM_AQUA_GRUNTS" }, { @@ -50,7 +50,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "SlateportCity_OceanicMuseum_1F_EventScript_20AE68", + "script": "SlateportCity_OceanicMuseum_1F_EventScript_MuseumGrunt4", "flag": "FLAG_HIDE_SLATEPORT_CITY_OCEANIC_MUSEUM_AQUA_GRUNTS" }, { @@ -63,7 +63,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "SlateportCity_OceanicMuseum_1F_EventScript_20AE56", + "script": "SlateportCity_OceanicMuseum_1F_EventScript_MuseumGrunt2", "flag": "FLAG_HIDE_SLATEPORT_CITY_OCEANIC_MUSEUM_AQUA_GRUNTS" }, { @@ -76,7 +76,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "SlateportCity_OceanicMuseum_1F_EventScript_20AE4D", + "script": "SlateportCity_OceanicMuseum_1F_EventScript_MuseumGrunt1", "flag": "FLAG_HIDE_SLATEPORT_CITY_OCEANIC_MUSEUM_AQUA_GRUNTS" }, { @@ -89,7 +89,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "SlateportCity_OceanicMuseum_1F_EventScript_20AE71", + "script": "SlateportCity_OceanicMuseum_1F_EventScript_MuseumGrunt5", "flag": "FLAG_HIDE_SLATEPORT_CITY_OCEANIC_MUSEUM_AQUA_GRUNTS" }, { @@ -102,7 +102,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "SlateportCity_OceanicMuseum_1F_EventScript_20AD96", + "script": "SlateportCity_OceanicMuseum_1F_EventScript_EntranceAttendant", "flag": "0" }, { @@ -115,7 +115,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "SlateportCity_OceanicMuseum_1F_EventScript_20AE7A", + "script": "SlateportCity_OceanicMuseum_1F_EventScript_MuseumGrunt6", "flag": "FLAG_HIDE_SLATEPORT_CITY_OCEANIC_MUSEUM_AQUA_GRUNTS" }, { @@ -128,7 +128,7 @@ "movement_range_y": 1, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "SlateportCity_OceanicMuseum_1F_EventScript_20AED4", + "script": "SlateportCity_OceanicMuseum_1F_EventScript_MuseumPatron1", "flag": "FLAG_HIDE_SLATEPORT_MUSEUM_POPULATION" }, { @@ -141,7 +141,7 @@ "movement_range_y": 1, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "SlateportCity_OceanicMuseum_1F_EventScript_20AEDD", + "script": "SlateportCity_OceanicMuseum_1F_EventScript_MuseumPatron2", "flag": "FLAG_HIDE_SLATEPORT_MUSEUM_POPULATION" }, { @@ -154,7 +154,7 @@ "movement_range_y": 1, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "SlateportCity_OceanicMuseum_1F_EventScript_20AEE6", + "script": "SlateportCity_OceanicMuseum_1F_EventScript_MuseumPatron3", "flag": "FLAG_HIDE_SLATEPORT_MUSEUM_POPULATION" }, { @@ -167,7 +167,7 @@ "movement_range_y": 1, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "SlateportCity_OceanicMuseum_1F_EventScript_20AEEF", + "script": "SlateportCity_OceanicMuseum_1F_EventScript_MuseumPatron4", "flag": "FLAG_HIDE_SLATEPORT_MUSEUM_POPULATION" }, { @@ -180,7 +180,7 @@ "movement_range_y": 1, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "SlateportCity_OceanicMuseum_1F_EventScript_20AEF8", + "script": "SlateportCity_OceanicMuseum_1F_EventScript_FamiliarGrunt", "flag": "FLAG_HIDE_SLATEPORT_CITY_OCEANIC_MUSEUM_FAMILIAR_AQUA_GRUNT" }, { @@ -193,7 +193,7 @@ "movement_range_y": 1, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "SlateportCity_OceanicMuseum_1F_EventScript_28C883", + "script": "SlateportCity_OceanicMuseum_1F_EventScript_Reporter", "flag": "FLAG_HIDE_SLATEPORT_MUSEUM_POPULATION" } ], @@ -228,7 +228,7 @@ "elevation": 3, "var": "VAR_SLATEPORT_MUSEUM_1F_STATE", "var_value": "0", - "script": "SlateportCity_OceanicMuseum_1F_EventScript_20AD9F" + "script": "SlateportCity_OceanicMuseum_1F_EventScript_PayEntranceFeeLeft" }, { "type": "trigger", @@ -237,7 +237,7 @@ "elevation": 3, "var": "VAR_SLATEPORT_MUSEUM_1F_STATE", "var_value": "0", - "script": "SlateportCity_OceanicMuseum_1F_EventScript_20ADB0" + "script": "SlateportCity_OceanicMuseum_1F_EventScript_PayEntranceFeeRight" } ], "bg_events": [ @@ -247,7 +247,7 @@ "y": 7, "elevation": 0, "player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY", - "script": "SlateportCity_OceanicMuseum_1F_EventScript_20AE83" + "script": "SlateportCity_OceanicMuseum_1F_EventScript_WhirlpoolExperiment" }, { "type": "sign", @@ -255,7 +255,7 @@ "y": 4, "elevation": 0, "player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY", - "script": "SlateportCity_OceanicMuseum_1F_EventScript_20AE8C" + "script": "SlateportCity_OceanicMuseum_1F_EventScript_WaterfallExperiment" }, { "type": "sign", @@ -263,7 +263,7 @@ "y": 1, "elevation": 0, "player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY", - "script": "SlateportCity_OceanicMuseum_1F_EventScript_20AE95" + "script": "SlateportCity_OceanicMuseum_1F_EventScript_OceanSoilDisplay" }, { "type": "sign", @@ -271,7 +271,7 @@ "y": 1, "elevation": 0, "player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY", - "script": "SlateportCity_OceanicMuseum_1F_EventScript_20AE9E" + "script": "SlateportCity_OceanicMuseum_1F_EventScript_BeachSandDisplay" }, { "type": "sign", @@ -279,7 +279,7 @@ "y": 1, "elevation": 0, "player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY", - "script": "SlateportCity_OceanicMuseum_1F_EventScript_20AE95" + "script": "SlateportCity_OceanicMuseum_1F_EventScript_OceanSoilDisplay" }, { "type": "sign", @@ -287,7 +287,7 @@ "y": 1, "elevation": 0, "player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY", - "script": "SlateportCity_OceanicMuseum_1F_EventScript_20AE9E" + "script": "SlateportCity_OceanicMuseum_1F_EventScript_BeachSandDisplay" }, { "type": "sign", @@ -295,7 +295,7 @@ "y": 4, "elevation": 0, "player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY", - "script": "SlateportCity_OceanicMuseum_1F_EventScript_20AEA7" + "script": "SlateportCity_OceanicMuseum_1F_EventScript_OceanicMinifact1" }, { "type": "sign", @@ -303,7 +303,7 @@ "y": 4, "elevation": 0, "player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY", - "script": "SlateportCity_OceanicMuseum_1F_EventScript_20AEB0" + "script": "SlateportCity_OceanicMuseum_1F_EventScript_OceanicMinifact2" }, { "type": "sign", @@ -311,7 +311,7 @@ "y": 7, "elevation": 0, "player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY", - "script": "SlateportCity_OceanicMuseum_1F_EventScript_20AEB9" + "script": "SlateportCity_OceanicMuseum_1F_EventScript_OceanicMinifact3" }, { "type": "sign", @@ -319,7 +319,7 @@ "y": 1, "elevation": 0, "player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY", - "script": "SlateportCity_OceanicMuseum_1F_EventScript_20AEC2" + "script": "SlateportCity_OceanicMuseum_1F_EventScript_FossilDisplay" }, { "type": "sign", @@ -327,7 +327,7 @@ "y": 1, "elevation": 0, "player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY", - "script": "SlateportCity_OceanicMuseum_1F_EventScript_20AEC2" + "script": "SlateportCity_OceanicMuseum_1F_EventScript_FossilDisplay" }, { "type": "sign", @@ -335,7 +335,7 @@ "y": 1, "elevation": 0, "player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY", - "script": "SlateportCity_OceanicMuseum_1F_EventScript_20AECB" + "script": "SlateportCity_OceanicMuseum_1F_EventScript_DepthMeasuringMachine" }, { "type": "sign", @@ -343,7 +343,7 @@ "y": 1, "elevation": 0, "player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY", - "script": "SlateportCity_OceanicMuseum_1F_EventScript_20AECB" + "script": "SlateportCity_OceanicMuseum_1F_EventScript_DepthMeasuringMachine" } ] } \ No newline at end of file diff --git a/data/maps/SlateportCity_OceanicMuseum_1F/scripts.inc b/data/maps/SlateportCity_OceanicMuseum_1F/scripts.inc index f0a4305c1b..1028deb3d1 100644 --- a/data/maps/SlateportCity_OceanicMuseum_1F/scripts.inc +++ b/data/maps/SlateportCity_OceanicMuseum_1F/scripts.inc @@ -1,46 +1,46 @@ SlateportCity_OceanicMuseum_1F_MapScripts:: @ 820AD95 .byte 0 -SlateportCity_OceanicMuseum_1F_EventScript_20AD96:: @ 820AD96 - msgbox SlateportCity_OceanicMuseum_1F_Text_20B026, MSGBOX_NPC +SlateportCity_OceanicMuseum_1F_EventScript_EntranceAttendant:: @ 820AD96 + msgbox SlateportCity_OceanicMuseum_1F_Text_PleaseEnjoyYourself, MSGBOX_NPC end -SlateportCity_OceanicMuseum_1F_EventScript_20AD9F:: @ 820AD9F +SlateportCity_OceanicMuseum_1F_EventScript_PayEntranceFeeLeft:: @ 820AD9F lockall applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceFastestLeft waitmovement 0 - goto SlateportCity_OceanicMuseum_1F_EventScript_20ADC1 + goto SlateportCity_OceanicMuseum_1F_EventScript_PayEntranceFee end -SlateportCity_OceanicMuseum_1F_EventScript_20ADB0:: @ 820ADB0 +SlateportCity_OceanicMuseum_1F_EventScript_PayEntranceFeeRight:: @ 820ADB0 lockall applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceFastestRight waitmovement 0 - goto SlateportCity_OceanicMuseum_1F_EventScript_20ADC1 + goto SlateportCity_OceanicMuseum_1F_EventScript_PayEntranceFee end -SlateportCity_OceanicMuseum_1F_EventScript_20ADC1:: @ 820ADC1 +SlateportCity_OceanicMuseum_1F_EventScript_PayEntranceFee:: @ 820ADC1 showmoneybox 0, 0, 0 - msgbox SlateportCity_OceanicMuseum_1F_Text_20AFD5, MSGBOX_YESNO + msgbox SlateportCity_OceanicMuseum_1F_Text_WouldYouLikeToEnter, MSGBOX_YESNO compare VAR_RESULT, 1 - goto_if_eq SlateportCity_OceanicMuseum_1F_EventScript_20ADE8 + goto_if_eq SlateportCity_OceanicMuseum_1F_EventScript_CheckMoneyForFee closemessage hidemoneybox nop nop - applymovement EVENT_OBJ_ID_PLAYER, SlateportCity_OceanicMuseum_1F_Movement_20AE4B + applymovement EVENT_OBJ_ID_PLAYER, SlateportCity_OceanicMuseum_1F_Movement_PushPlayerBackFromCounter waitmovement 0 releaseall end -SlateportCity_OceanicMuseum_1F_EventScript_20ADE8:: @ 820ADE8 +SlateportCity_OceanicMuseum_1F_EventScript_CheckMoneyForFee:: @ 820ADE8 checkmoney 50, 0 compare VAR_RESULT, 0 - goto_if_eq SlateportCity_OceanicMuseum_1F_EventScript_20AE18 + goto_if_eq SlateportCity_OceanicMuseum_1F_EventScript_NotEnoughMoney playse SE_REGI takemoney 50, 0 updatemoneybox 0, 0 - msgbox SlateportCity_OceanicMuseum_1F_Text_20B026, MSGBOX_DEFAULT + msgbox SlateportCity_OceanicMuseum_1F_Text_PleaseEnjoyYourself, MSGBOX_DEFAULT setvar VAR_SLATEPORT_MUSEUM_1F_STATE, 1 hidemoneybox nop @@ -48,20 +48,20 @@ SlateportCity_OceanicMuseum_1F_EventScript_20ADE8:: @ 820ADE8 releaseall end -SlateportCity_OceanicMuseum_1F_EventScript_20AE18:: @ 820AE18 - goto_if_unset FLAG_DELIVERED_DEVON_GOODS, SlateportCity_OceanicMuseum_1F_EventScript_20AE39 - msgbox SlateportCity_OceanicMuseum_1F_Text_20B03D, MSGBOX_DEFAULT +SlateportCity_OceanicMuseum_1F_EventScript_NotEnoughMoney:: @ 820AE18 + goto_if_unset FLAG_DELIVERED_DEVON_GOODS, SlateportCity_OceanicMuseum_1F_EventScript_AllowEntranceAnyway + msgbox SlateportCity_OceanicMuseum_1F_Text_NotEnoughMoney, MSGBOX_DEFAULT closemessage hidemoneybox nop nop - applymovement EVENT_OBJ_ID_PLAYER, SlateportCity_OceanicMuseum_1F_Movement_20AE4B + applymovement EVENT_OBJ_ID_PLAYER, SlateportCity_OceanicMuseum_1F_Movement_PushPlayerBackFromCounter waitmovement 0 releaseall end -SlateportCity_OceanicMuseum_1F_EventScript_20AE39:: @ 820AE39 - msgbox SlateportCity_OceanicMuseum_1F_Text_20B075, MSGBOX_DEFAULT +SlateportCity_OceanicMuseum_1F_EventScript_AllowEntranceAnyway:: @ 820AE39 + msgbox SlateportCity_OceanicMuseum_1F_Text_CatchUpWithYourGroup, MSGBOX_DEFAULT setvar VAR_SLATEPORT_MUSEUM_1F_STATE, 1 hidemoneybox nop @@ -69,87 +69,87 @@ SlateportCity_OceanicMuseum_1F_EventScript_20AE39:: @ 820AE39 releaseall end -SlateportCity_OceanicMuseum_1F_Movement_20AE4B: @ 820AE4B +SlateportCity_OceanicMuseum_1F_Movement_PushPlayerBackFromCounter: @ 820AE4B walk_down step_end -SlateportCity_OceanicMuseum_1F_EventScript_20AE4D:: @ 820AE4D - msgbox SlateportCity_OceanicMuseum_1F_Text_20B0E8, MSGBOX_NPC +SlateportCity_OceanicMuseum_1F_EventScript_MuseumGrunt1:: @ 820AE4D + msgbox SlateportCity_OceanicMuseum_1F_Text_AquaExistForGoodOfAll, MSGBOX_NPC end -SlateportCity_OceanicMuseum_1F_EventScript_20AE56:: @ 820AE56 - msgbox SlateportCity_OceanicMuseum_1F_Text_20B112, MSGBOX_NPC +SlateportCity_OceanicMuseum_1F_EventScript_MuseumGrunt2:: @ 820AE56 + msgbox SlateportCity_OceanicMuseum_1F_Text_OurBossIsntHere, MSGBOX_NPC end -SlateportCity_OceanicMuseum_1F_EventScript_20AE5F:: @ 820AE5F - msgbox SlateportCity_OceanicMuseum_1F_Text_20B165, MSGBOX_NPC +SlateportCity_OceanicMuseum_1F_EventScript_MuseumGrunt3:: @ 820AE5F + msgbox SlateportCity_OceanicMuseum_1F_Text_WouldStuffHereMakeMeRich, MSGBOX_NPC end -SlateportCity_OceanicMuseum_1F_EventScript_20AE68:: @ 820AE68 - msgbox SlateportCity_OceanicMuseum_1F_Text_20B19C, MSGBOX_SIGN +SlateportCity_OceanicMuseum_1F_EventScript_MuseumGrunt4:: @ 820AE68 + msgbox SlateportCity_OceanicMuseum_1F_Text_CanLearnForNefariousDeeds, MSGBOX_SIGN end -SlateportCity_OceanicMuseum_1F_EventScript_20AE71:: @ 820AE71 - msgbox SlateportCity_OceanicMuseum_1F_Text_20B1D4, MSGBOX_NPC +SlateportCity_OceanicMuseum_1F_EventScript_MuseumGrunt5:: @ 820AE71 + msgbox SlateportCity_OceanicMuseum_1F_Text_RustboroBungled, MSGBOX_NPC end -SlateportCity_OceanicMuseum_1F_EventScript_20AE7A:: @ 820AE7A - msgbox SlateportCity_OceanicMuseum_1F_Text_20B218, MSGBOX_NPC +SlateportCity_OceanicMuseum_1F_EventScript_MuseumGrunt6:: @ 820AE7A + msgbox SlateportCity_OceanicMuseum_1F_Text_DidntHaveMoney, MSGBOX_NPC end -SlateportCity_OceanicMuseum_1F_EventScript_20AE83:: @ 820AE83 - msgbox SlateportCity_OceanicMuseum_1F_Text_20B4CF, MSGBOX_SIGN +SlateportCity_OceanicMuseum_1F_EventScript_WhirlpoolExperiment:: @ 820AE83 + msgbox SlateportCity_OceanicMuseum_1F_Text_WhirlpoolExperiment, MSGBOX_SIGN end -SlateportCity_OceanicMuseum_1F_EventScript_20AE8C:: @ 820AE8C - msgbox SlateportCity_OceanicMuseum_1F_Text_20B547, MSGBOX_SIGN +SlateportCity_OceanicMuseum_1F_EventScript_WaterfallExperiment:: @ 820AE8C + msgbox SlateportCity_OceanicMuseum_1F_Text_WaterfallExperiment, MSGBOX_SIGN end -SlateportCity_OceanicMuseum_1F_EventScript_20AE95:: @ 820AE95 - msgbox SlateportCity_OceanicMuseum_1F_Text_20B5CA, MSGBOX_SIGN +SlateportCity_OceanicMuseum_1F_EventScript_OceanSoilDisplay:: @ 820AE95 + msgbox SlateportCity_OceanicMuseum_1F_Text_OceanSoilDisplay, MSGBOX_SIGN end -SlateportCity_OceanicMuseum_1F_EventScript_20AE9E:: @ 820AE9E - msgbox SlateportCity_OceanicMuseum_1F_Text_20B699, MSGBOX_SIGN +SlateportCity_OceanicMuseum_1F_EventScript_BeachSandDisplay:: @ 820AE9E + msgbox SlateportCity_OceanicMuseum_1F_Text_BeachSandDisplay, MSGBOX_SIGN end -SlateportCity_OceanicMuseum_1F_EventScript_20AEA7:: @ 820AEA7 - msgbox SlateportCity_OceanicMuseum_1F_Text_20B74B, MSGBOX_SIGN +SlateportCity_OceanicMuseum_1F_EventScript_OceanicMinifact1:: @ 820AEA7 + msgbox SlateportCity_OceanicMuseum_1F_Text_OceanicMinifact1, MSGBOX_SIGN end -SlateportCity_OceanicMuseum_1F_EventScript_20AEB0:: @ 820AEB0 - msgbox SlateportCity_OceanicMuseum_1F_Text_20B81F, MSGBOX_SIGN +SlateportCity_OceanicMuseum_1F_EventScript_OceanicMinifact2:: @ 820AEB0 + msgbox SlateportCity_OceanicMuseum_1F_Text_OceanicMinifact2, MSGBOX_SIGN end -SlateportCity_OceanicMuseum_1F_EventScript_20AEB9:: @ 820AEB9 - msgbox SlateportCity_OceanicMuseum_1F_Text_20B912, MSGBOX_SIGN +SlateportCity_OceanicMuseum_1F_EventScript_OceanicMinifact3:: @ 820AEB9 + msgbox SlateportCity_OceanicMuseum_1F_Text_OceanicMinifact3, MSGBOX_SIGN end -SlateportCity_OceanicMuseum_1F_EventScript_20AEC2:: @ 820AEC2 - msgbox SlateportCity_OceanicMuseum_1F_Text_20B9C0, MSGBOX_SIGN +SlateportCity_OceanicMuseum_1F_EventScript_FossilDisplay:: @ 820AEC2 + msgbox SlateportCity_OceanicMuseum_1F_Text_FossilDisplay, MSGBOX_SIGN end -SlateportCity_OceanicMuseum_1F_EventScript_20AECB:: @ 820AECB - msgbox SlateportCity_OceanicMuseum_1F_Text_20BA9C, MSGBOX_SIGN +SlateportCity_OceanicMuseum_1F_EventScript_DepthMeasuringMachine:: @ 820AECB + msgbox SlateportCity_OceanicMuseum_1F_Text_DepthMeasuringMachine, MSGBOX_SIGN end -SlateportCity_OceanicMuseum_1F_EventScript_20AED4:: @ 820AED4 - msgbox SlateportCity_OceanicMuseum_1F_Text_20B25F, MSGBOX_NPC +SlateportCity_OceanicMuseum_1F_EventScript_MuseumPatron1:: @ 820AED4 + msgbox SlateportCity_OceanicMuseum_1F_Text_LearnAboutSeaForBattling, MSGBOX_NPC end -SlateportCity_OceanicMuseum_1F_EventScript_20AEDD:: @ 820AEDD - msgbox SlateportCity_OceanicMuseum_1F_Text_20B2A2, MSGBOX_NPC +SlateportCity_OceanicMuseum_1F_EventScript_MuseumPatron2:: @ 820AEDD + msgbox SlateportCity_OceanicMuseum_1F_Text_SternIsRoleModel, MSGBOX_NPC end -SlateportCity_OceanicMuseum_1F_EventScript_20AEE6:: @ 820AEE6 - msgbox SlateportCity_OceanicMuseum_1F_Text_20B302, MSGBOX_NPC +SlateportCity_OceanicMuseum_1F_EventScript_MuseumPatron3:: @ 820AEE6 + msgbox SlateportCity_OceanicMuseum_1F_Text_MustBePokemonWeDontKnow, MSGBOX_NPC end -SlateportCity_OceanicMuseum_1F_EventScript_20AEEF:: @ 820AEEF - msgbox SlateportCity_OceanicMuseum_1F_Text_20B369, MSGBOX_NPC +SlateportCity_OceanicMuseum_1F_EventScript_MuseumPatron4:: @ 820AEEF + msgbox SlateportCity_OceanicMuseum_1F_Text_WantSeaPokemon, MSGBOX_NPC end -SlateportCity_OceanicMuseum_1F_EventScript_20AEF8:: @ 820AEF8 +SlateportCity_OceanicMuseum_1F_EventScript_FamiliarGrunt:: @ 820AEF8 lock faceplayer delay 8 @@ -158,68 +158,68 @@ SlateportCity_OceanicMuseum_1F_EventScript_20AEF8:: @ 820AEF8 waitmovement 0 applymovement 13, Common_Movement_Delay48 waitmovement 0 - msgbox SlateportCity_OceanicMuseum_1F_Text_20B3AB, MSGBOX_DEFAULT + msgbox SlateportCity_OceanicMuseum_1F_Text_RememberMeTakeThis, MSGBOX_DEFAULT giveitem_std ITEM_TM46 compare VAR_RESULT, 0 - goto_if_eq SlateportCity_OceanicMuseum_1F_EventScript_20AFB5 + goto_if_eq SlateportCity_OceanicMuseum_1F_EventScript_NoRoomForThief setflag FLAG_RECEIVED_TM46 - msgbox SlateportCity_OceanicMuseum_1F_Text_20B449, MSGBOX_DEFAULT + msgbox SlateportCity_OceanicMuseum_1F_Text_HopeINeverSeeYouAgain, MSGBOX_DEFAULT closemessage compare VAR_FACING, DIR_NORTH - goto_if_eq SlateportCity_OceanicMuseum_1F_EventScript_20AF6C + goto_if_eq SlateportCity_OceanicMuseum_1F_EventScript_FamiliarGruntExitNorth compare VAR_FACING, DIR_SOUTH - goto_if_eq SlateportCity_OceanicMuseum_1F_EventScript_20AF83 + goto_if_eq SlateportCity_OceanicMuseum_1F_EventScript_FamiliarGruntExitSouth compare VAR_FACING, DIR_WEST - goto_if_eq SlateportCity_OceanicMuseum_1F_EventScript_20AF93 + goto_if_eq SlateportCity_OceanicMuseum_1F_EventScript_FamiliarGruntExitWestEast compare VAR_FACING, DIR_EAST - goto_if_eq SlateportCity_OceanicMuseum_1F_EventScript_20AF93 + goto_if_eq SlateportCity_OceanicMuseum_1F_EventScript_FamiliarGruntExitWestEast end -SlateportCity_OceanicMuseum_1F_EventScript_20AF6C:: @ 820AF6C - applymovement EVENT_OBJ_ID_PLAYER, SlateportCity_OceanicMuseum_1F_Movement_20AFBF - applymovement 13, SlateportCity_OceanicMuseum_1F_Movement_20AFCE +SlateportCity_OceanicMuseum_1F_EventScript_FamiliarGruntExitNorth:: @ 820AF6C + applymovement EVENT_OBJ_ID_PLAYER, SlateportCity_OceanicMuseum_1F_Movement_PlayerWatchGruntExitNorth + applymovement 13, SlateportCity_OceanicMuseum_1F_Movement_FamiliarGruntExitNorth waitmovement 0 - goto SlateportCity_OceanicMuseum_1F_EventScript_20AFAA + goto SlateportCity_OceanicMuseum_1F_EventScript_FamiliarGruntExited end -SlateportCity_OceanicMuseum_1F_EventScript_20AF83:: @ 820AF83 - applymovement 13, SlateportCity_OceanicMuseum_1F_Movement_20AFC7 +SlateportCity_OceanicMuseum_1F_EventScript_FamiliarGruntExitSouth:: @ 820AF83 + applymovement 13, SlateportCity_OceanicMuseum_1F_Movement_FamiliarGruntExit waitmovement 0 - goto SlateportCity_OceanicMuseum_1F_EventScript_20AFAA + goto SlateportCity_OceanicMuseum_1F_EventScript_FamiliarGruntExited end -SlateportCity_OceanicMuseum_1F_EventScript_20AF93:: @ 820AF93 - applymovement EVENT_OBJ_ID_PLAYER, SlateportCity_OceanicMuseum_1F_Movement_20AFC4 - applymovement 13, SlateportCity_OceanicMuseum_1F_Movement_20AFC7 +SlateportCity_OceanicMuseum_1F_EventScript_FamiliarGruntExitWestEast:: @ 820AF93 + applymovement EVENT_OBJ_ID_PLAYER, SlateportCity_OceanicMuseum_1F_Movement_PlayerWatchGruntExitWestEast + applymovement 13, SlateportCity_OceanicMuseum_1F_Movement_FamiliarGruntExit waitmovement 0 - goto SlateportCity_OceanicMuseum_1F_EventScript_20AFAA + goto SlateportCity_OceanicMuseum_1F_EventScript_FamiliarGruntExited end -SlateportCity_OceanicMuseum_1F_EventScript_20AFAA:: @ 820AFAA +SlateportCity_OceanicMuseum_1F_EventScript_FamiliarGruntExited:: @ 820AFAA setflag FLAG_HIDE_SLATEPORT_CITY_OCEANIC_MUSEUM_FAMILIAR_AQUA_GRUNT playse SE_KAIDAN removeobject 13 release end -SlateportCity_OceanicMuseum_1F_EventScript_20AFB5:: @ 820AFB5 - msgbox SlateportCity_OceanicMuseum_1F_Text_20B49B, MSGBOX_DEFAULT +SlateportCity_OceanicMuseum_1F_EventScript_NoRoomForThief:: @ 820AFB5 + msgbox SlateportCity_OceanicMuseum_1F_Text_YouHaveToTakeThis, MSGBOX_DEFAULT release end -SlateportCity_OceanicMuseum_1F_Movement_20AFBF: @ 820AFBF +SlateportCity_OceanicMuseum_1F_Movement_PlayerWatchGruntExitNorth: @ 820AFBF delay_16 delay_8 delay_4 walk_in_place_fastest_down step_end -SlateportCity_OceanicMuseum_1F_Movement_20AFC4: @ 820AFC4 +SlateportCity_OceanicMuseum_1F_Movement_PlayerWatchGruntExitWestEast: @ 820AFC4 delay_16 walk_in_place_fastest_down step_end -SlateportCity_OceanicMuseum_1F_Movement_20AFC7: @ 820AFC7 +SlateportCity_OceanicMuseum_1F_Movement_FamiliarGruntExit: @ 820AFC7 face_down walk_fast_down walk_fast_down @@ -228,7 +228,7 @@ SlateportCity_OceanicMuseum_1F_Movement_20AFC7: @ 820AFC7 delay_8 step_end -SlateportCity_OceanicMuseum_1F_Movement_20AFCE: @ 820AFCE +SlateportCity_OceanicMuseum_1F_Movement_FamiliarGruntExitNorth: @ 820AFCE walk_fast_right walk_fast_down walk_fast_down @@ -237,71 +237,71 @@ SlateportCity_OceanicMuseum_1F_Movement_20AFCE: @ 820AFCE delay_8 step_end -SlateportCity_OceanicMuseum_1F_Text_20AFD5: @ 820AFD5 +SlateportCity_OceanicMuseum_1F_Text_WouldYouLikeToEnter: @ 820AFD5 .string "Welcome to the OCEANIC MUSEUM.\p" .string "The entrance fee is ¥50.\n" .string "Would you like to enter?$" -SlateportCity_OceanicMuseum_1F_Text_20B026: @ 820B026 +SlateportCity_OceanicMuseum_1F_Text_PleaseEnjoyYourself: @ 820B026 .string "Please enjoy yourself.$" -SlateportCity_OceanicMuseum_1F_Text_20B03D: @ 820B03D +SlateportCity_OceanicMuseum_1F_Text_NotEnoughMoney: @ 820B03D .string "Oh? I'm sorry, but you don't seem to\n" .string "have enough money.$" -SlateportCity_OceanicMuseum_1F_Text_20B075: @ 820B075 +SlateportCity_OceanicMuseum_1F_Text_CatchUpWithYourGroup: @ 820B075 .string "Oh? You're with that group that\n" .string "went in earlier?\p" .string "You're the only one who's late.\n" .string "You'd better go catch up to them!$" -SlateportCity_OceanicMuseum_1F_Text_20B0E8: @ 820B0E8 +SlateportCity_OceanicMuseum_1F_Text_AquaExistForGoodOfAll: @ 820B0E8 .string "We, TEAM AQUA, exist for the good\n" .string "of all!$" -SlateportCity_OceanicMuseum_1F_Text_20B112: @ 820B112 +SlateportCity_OceanicMuseum_1F_Text_OurBossIsntHere: @ 820B112 .string "We were told to assemble here,\n" .string "so we did, but…\p" .string "Our BOSS, the linchpin, isn't here.$" -SlateportCity_OceanicMuseum_1F_Text_20B165: @ 820B165 +SlateportCity_OceanicMuseum_1F_Text_WouldStuffHereMakeMeRich: @ 820B165 .string "If I ripped off the stuff here,\n" .string "would it make me rich?$" -SlateportCity_OceanicMuseum_1F_Text_20B19C: @ 820B19C +SlateportCity_OceanicMuseum_1F_Text_CanLearnForNefariousDeeds: @ 820B19C .string "What I learn here, I can put to use on\n" .string "nefarious deeds…$" -SlateportCity_OceanicMuseum_1F_Text_20B1D4: @ 820B1D4 +SlateportCity_OceanicMuseum_1F_Text_RustboroBungled: @ 820B1D4 .string "If our goons didn't bungle things\n" .string "in RUSTBORO, we wouldn't be here!$" -SlateportCity_OceanicMuseum_1F_Text_20B218: @ 820B218 +SlateportCity_OceanicMuseum_1F_Text_DidntHaveMoney: @ 820B218 .string "I didn't have ¥50, so it took a long\n" .string "time getting by the receptionist.$" -SlateportCity_OceanicMuseum_1F_Text_20B25F: @ 820B25F +SlateportCity_OceanicMuseum_1F_Text_LearnAboutSeaForBattling: @ 820B25F .string "I want to learn about the sea and\n" .string "use that knowledge for battling.$" -SlateportCity_OceanicMuseum_1F_Text_20B2A2: @ 820B2A2 +SlateportCity_OceanicMuseum_1F_Text_SternIsRoleModel: @ 820B2A2 .string "I get all giddy and gooey when\n" .string "I see the sea!\p" .string "For me, CAPT. STERN is the number\n" .string "one role model!$" -SlateportCity_OceanicMuseum_1F_Text_20B302: @ 820B302 +SlateportCity_OceanicMuseum_1F_Text_MustBePokemonWeDontKnow: @ 820B302 .string "The sea is vast without end, and\n" .string "infinitely deep…\p" .string "There must be many POKéMON that\n" .string "we don't know about.$" -SlateportCity_OceanicMuseum_1F_Text_20B369: @ 820B369 +SlateportCity_OceanicMuseum_1F_Text_WantSeaPokemon: @ 820B369 .string "I want a sea POKéMON.\p" .string "I think it would feel cool and nice\n" .string "to hug.$" -SlateportCity_OceanicMuseum_1F_Text_20B3AB: @ 820B3AB +SlateportCity_OceanicMuseum_1F_Text_RememberMeTakeThis: @ 820B3AB .string "Aiyeeeh!\n" .string "What are you doing here?\p" .string "Me? I'm the TEAM AQUA member\n" @@ -310,29 +310,29 @@ SlateportCity_OceanicMuseum_1F_Text_20B3AB: @ 820B3AB .string "Here, take this!\n" .string "You have to forgive me!$" -SlateportCity_OceanicMuseum_1F_Text_20B449: @ 820B449 +SlateportCity_OceanicMuseum_1F_Text_HopeINeverSeeYouAgain: @ 820B449 .string "That TM, it suits you more than it\n" .string "does me.\p" .string "Hope I never see you again!\n" .string "Wahahaha!$" -SlateportCity_OceanicMuseum_1F_Text_20B49B: @ 820B49B +SlateportCity_OceanicMuseum_1F_Text_YouHaveToTakeThis: @ 820B49B .string "Awww, come on!\n" .string "You have to take this and let me go!$" -SlateportCity_OceanicMuseum_1F_Text_20B4CF: @ 820B4CF +SlateportCity_OceanicMuseum_1F_Text_WhirlpoolExperiment: @ 820B4CF .string "A blue fluid is spiraling inside\n" .string "a glass vessel.\p" .string "“This is an experiment to create a\n" .string "WHIRLPOOL artificially using wind.”$" -SlateportCity_OceanicMuseum_1F_Text_20B547: @ 820B547 +SlateportCity_OceanicMuseum_1F_Text_WaterfallExperiment: @ 820B547 .string "A red ball is bobbing up and down\n" .string "inside a glass vessel.\p" .string "“This is an experiment simulating a\n" .string "WATERFALL using the ball's buoyancy.”$" -SlateportCity_OceanicMuseum_1F_Text_20B5CA: @ 820B5CA +SlateportCity_OceanicMuseum_1F_Text_OceanSoilDisplay: @ 820B5CA .string "It's a sample of soil from the ocean\n" .string "floor.\p" .string "“Over many years, the remains of\n" @@ -341,7 +341,7 @@ SlateportCity_OceanicMuseum_1F_Text_20B5CA: @ 820B5CA .string "“By analyzing these layers, the\n" .string "ancient past is revealed.”$" -SlateportCity_OceanicMuseum_1F_Text_20B699: @ 820B699 +SlateportCity_OceanicMuseum_1F_Text_BeachSandDisplay: @ 820B699 .string "It's a sample of beach sand.\p" .string "“Stones from mountains are washed\n" .string "down by rivers where they are\l" @@ -349,7 +349,7 @@ SlateportCity_OceanicMuseum_1F_Text_20B699: @ 820B699 .string "“They are reduced to grains and end\n" .string "up as sand on beaches.”$" -SlateportCity_OceanicMuseum_1F_Text_20B74B: @ 820B74B +SlateportCity_OceanicMuseum_1F_Text_OceanicMinifact1: @ 820B74B .string "“OCEANIC MINIFACT 1\n" .string "Why is seawater blue?\p" .string "“Light is composed of many colors.\p" @@ -358,7 +358,7 @@ SlateportCity_OceanicMuseum_1F_Text_20B74B: @ 820B74B .string "“However, blue light retains its\n" .string "color, making the sea appear blue.”$" -SlateportCity_OceanicMuseum_1F_Text_20B81F: @ 820B81F +SlateportCity_OceanicMuseum_1F_Text_OceanicMinifact2: @ 820B81F .string "“OCEANIC MINIFACT 2\n" .string "Why is the sea salty?\p" .string "“Seawater contains dissolved salt in\n" @@ -368,7 +368,7 @@ SlateportCity_OceanicMuseum_1F_Text_20B81F: @ 820B81F .string "“The concentration of dissolved salt\n" .string "makes the sea salty.”$" -SlateportCity_OceanicMuseum_1F_Text_20B912: @ 820B912 +SlateportCity_OceanicMuseum_1F_Text_OceanicMinifact3: @ 820B912 .string "“OCEANIC MINIFACT 3\n" .string "Which is bigger? The sea or land?\p" .string "“The sea covers about 70% of\n" @@ -376,7 +376,7 @@ SlateportCity_OceanicMuseum_1F_Text_20B912: @ 820B912 .string "“The sea is therefore more than twice\n" .string "the size of land.”$" -SlateportCity_OceanicMuseum_1F_Text_20B9C0: @ 820B9C0 +SlateportCity_OceanicMuseum_1F_Text_FossilDisplay: @ 820B9C0 .string "It's a fossil with wavy ridges on it.\p" .string "“Soil on the ocean floor gets scoured\n" .string "by the tide.\p" @@ -385,7 +385,7 @@ SlateportCity_OceanicMuseum_1F_Text_20B9C0: @ 820B9C0 .string "“If this soil becomes fossilized, it is\n" .string "called a ripple mark.”$" -SlateportCity_OceanicMuseum_1F_Text_20BA9C: @ 820BA9C +SlateportCity_OceanicMuseum_1F_Text_DepthMeasuringMachine: @ 820BA9C .string "A strange machine is rotating under\n" .string "a glass dome.\p" .string "Maybe it's for measuring the depth\n" diff --git a/data/maps/SlateportCity_OceanicMuseum_2F/map.json b/data/maps/SlateportCity_OceanicMuseum_2F/map.json index 6eaecba97a..0c45541e4c 100644 --- a/data/maps/SlateportCity_OceanicMuseum_2F/map.json +++ b/data/maps/SlateportCity_OceanicMuseum_2F/map.json @@ -24,7 +24,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "SlateportCity_OceanicMuseum_2F_EventScript_20BB00", + "script": "SlateportCity_OceanicMuseum_2F_EventScript_CaptStern", "flag": "FLAG_HIDE_SLATEPORT_CITY_OCEANIC_MUSEUM_2F_CAPTAIN_STERN" }, { @@ -76,7 +76,7 @@ "movement_range_y": 1, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "SlateportCity_OceanicMuseum_2F_EventScript_20BD64", + "script": "SlateportCity_OceanicMuseum_2F_EventScript_MuseumPatron1", "flag": "FLAG_HIDE_SLATEPORT_MUSEUM_POPULATION" }, { @@ -89,7 +89,7 @@ "movement_range_y": 1, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "SlateportCity_OceanicMuseum_2F_EventScript_20BD6D", + "script": "SlateportCity_OceanicMuseum_2F_EventScript_MuseumPatron2", "flag": "FLAG_HIDE_SLATEPORT_MUSEUM_POPULATION" }, { @@ -102,7 +102,7 @@ "movement_range_y": 1, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "SlateportCity_OceanicMuseum_2F_EventScript_20BD76", + "script": "SlateportCity_OceanicMuseum_2F_EventScript_MuseumPatron3", "flag": "FLAG_HIDE_SLATEPORT_MUSEUM_POPULATION" } ], @@ -123,7 +123,7 @@ "y": 4, "elevation": 0, "player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY", - "script": "SlateportCity_OceanicMuseum_2F_EventScript_20BD0A" + "script": "SlateportCity_OceanicMuseum_2F_EventScript_WaterQualitySample1" }, { "type": "sign", @@ -131,7 +131,7 @@ "y": 7, "elevation": 0, "player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY", - "script": "SlateportCity_OceanicMuseum_2F_EventScript_20BD13" + "script": "SlateportCity_OceanicMuseum_2F_EventScript_WaterQualitySample2" }, { "type": "sign", @@ -139,7 +139,7 @@ "y": 3, "elevation": 0, "player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY", - "script": "SlateportCity_OceanicMuseum_2F_EventScript_20BD52" + "script": "SlateportCity_OceanicMuseum_2F_EventScript_SubmersibleReplica" }, { "type": "sign", @@ -147,7 +147,7 @@ "y": 4, "elevation": 0, "player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY", - "script": "SlateportCity_OceanicMuseum_2F_EventScript_20BD52" + "script": "SlateportCity_OceanicMuseum_2F_EventScript_SubmersibleReplica" }, { "type": "sign", @@ -155,7 +155,7 @@ "y": 3, "elevation": 0, "player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY", - "script": "SlateportCity_OceanicMuseum_2F_EventScript_20BD49" + "script": "SlateportCity_OceanicMuseum_2F_EventScript_SubmarineReplica" }, { "type": "sign", @@ -163,7 +163,7 @@ "y": 3, "elevation": 0, "player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY", - "script": "SlateportCity_OceanicMuseum_2F_EventScript_20BD49" + "script": "SlateportCity_OceanicMuseum_2F_EventScript_SubmarineReplica" }, { "type": "sign", @@ -171,7 +171,7 @@ "y": 4, "elevation": 0, "player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY", - "script": "SlateportCity_OceanicMuseum_2F_EventScript_20BD49" + "script": "SlateportCity_OceanicMuseum_2F_EventScript_SubmarineReplica" }, { "type": "sign", @@ -179,7 +179,7 @@ "y": 6, "elevation": 0, "player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY", - "script": "SlateportCity_OceanicMuseum_2F_EventScript_20BD40" + "script": "SlateportCity_OceanicMuseum_2F_EventScript_SSTidalReplica" }, { "type": "sign", @@ -187,7 +187,7 @@ "y": 6, "elevation": 0, "player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY", - "script": "SlateportCity_OceanicMuseum_2F_EventScript_20BD40" + "script": "SlateportCity_OceanicMuseum_2F_EventScript_SSTidalReplica" }, { "type": "sign", @@ -195,7 +195,7 @@ "y": 7, "elevation": 0, "player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY", - "script": "SlateportCity_OceanicMuseum_2F_EventScript_20BD5B" + "script": "SlateportCity_OceanicMuseum_2F_EventScript_SSAnneReplica" }, { "type": "sign", @@ -203,7 +203,7 @@ "y": 7, "elevation": 3, "player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY", - "script": "SlateportCity_OceanicMuseum_2F_EventScript_20BD5B" + "script": "SlateportCity_OceanicMuseum_2F_EventScript_SSAnneReplica" }, { "type": "sign", @@ -211,7 +211,7 @@ "y": 1, "elevation": 0, "player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY", - "script": "SlateportCity_OceanicMuseum_2F_EventScript_20BD37" + "script": "SlateportCity_OceanicMuseum_2F_EventScript_SurfaceSeawaterDisplay" }, { "type": "sign", @@ -219,7 +219,7 @@ "y": 1, "elevation": 0, "player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY", - "script": "SlateportCity_OceanicMuseum_2F_EventScript_20BD37" + "script": "SlateportCity_OceanicMuseum_2F_EventScript_SurfaceSeawaterDisplay" }, { "type": "sign", @@ -227,7 +227,7 @@ "y": 1, "elevation": 0, "player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY", - "script": "SlateportCity_OceanicMuseum_2F_EventScript_20BD2E" + "script": "SlateportCity_OceanicMuseum_2F_EventScript_DeepSeawaterDisplay" }, { "type": "sign", @@ -235,7 +235,7 @@ "y": 1, "elevation": 0, "player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY", - "script": "SlateportCity_OceanicMuseum_2F_EventScript_20BD2E" + "script": "SlateportCity_OceanicMuseum_2F_EventScript_DeepSeawaterDisplay" }, { "type": "sign", @@ -243,7 +243,7 @@ "y": 1, "elevation": 0, "player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY", - "script": "SlateportCity_OceanicMuseum_2F_EventScript_20BD25" + "script": "SlateportCity_OceanicMuseum_2F_EventScript_HoennModel" }, { "type": "sign", @@ -251,7 +251,7 @@ "y": 1, "elevation": 0, "player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY", - "script": "SlateportCity_OceanicMuseum_2F_EventScript_20BD25" + "script": "SlateportCity_OceanicMuseum_2F_EventScript_HoennModel" }, { "type": "sign", @@ -259,7 +259,7 @@ "y": 1, "elevation": 0, "player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY", - "script": "SlateportCity_OceanicMuseum_2F_EventScript_20BD1C" + "script": "SlateportCity_OceanicMuseum_2F_EventScript_PressureExperiment" }, { "type": "sign", @@ -267,7 +267,7 @@ "y": 1, "elevation": 0, "player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY", - "script": "SlateportCity_OceanicMuseum_2F_EventScript_20BD1C" + "script": "SlateportCity_OceanicMuseum_2F_EventScript_PressureExperiment" }, { "type": "sign", @@ -275,7 +275,7 @@ "y": 7, "elevation": 0, "player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY", - "script": "SlateportCity_OceanicMuseum_2F_EventScript_20BD40" + "script": "SlateportCity_OceanicMuseum_2F_EventScript_SSTidalReplica" }, { "type": "sign", @@ -283,7 +283,7 @@ "y": 7, "elevation": 0, "player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY", - "script": "SlateportCity_OceanicMuseum_2F_EventScript_20BD40" + "script": "SlateportCity_OceanicMuseum_2F_EventScript_SSTidalReplica" } ] } \ No newline at end of file diff --git a/data/maps/SlateportCity_OceanicMuseum_2F/scripts.inc b/data/maps/SlateportCity_OceanicMuseum_2F/scripts.inc index ab47c1dea1..e3d91cd28d 100644 --- a/data/maps/SlateportCity_OceanicMuseum_2F/scripts.inc +++ b/data/maps/SlateportCity_OceanicMuseum_2F/scripts.inc @@ -1,63 +1,63 @@ SlateportCity_OceanicMuseum_2F_MapScripts:: @ 820BAFF .byte 0 -SlateportCity_OceanicMuseum_2F_EventScript_20BB00:: @ 820BB00 +SlateportCity_OceanicMuseum_2F_EventScript_CaptStern:: @ 820BB00 lock faceplayer - msgbox SlateportCity_OceanicMuseum_2F_Text_20BD8D, MSGBOX_DEFAULT + msgbox SlateportCity_OceanicMuseum_2F_Text_ThankYouForTheParts, MSGBOX_DEFAULT closemessage playbgm MUS_AQA_0, 1 addobject 3 - applymovement 3, SlateportCity_OceanicMuseum_2F_Movement_20BCE4 + applymovement 3, SlateportCity_OceanicMuseum_2F_Movement_FirstGruntEnter waitmovement 0 addobject 4 - applymovement 4, SlateportCity_OceanicMuseum_2F_Movement_20BCF3 + applymovement 4, SlateportCity_OceanicMuseum_2F_Movement_SecondGruntEnter waitmovement 0 - applymovement 3, SlateportCity_OceanicMuseum_2F_Movement_20BCE8 - applymovement 4, SlateportCity_OceanicMuseum_2F_Movement_20BCF5 + applymovement 3, SlateportCity_OceanicMuseum_2F_Movement_FirstGruntApproach + applymovement 4, SlateportCity_OceanicMuseum_2F_Movement_SecondGruntApproach waitmovement 0 compare VAR_FACING, DIR_SOUTH - call_if_eq SlateportCity_OceanicMuseum_2F_EventScript_20BC92 + call_if_eq SlateportCity_OceanicMuseum_2F_EventScript_PlayerFaceGrunts compare VAR_FACING, DIR_EAST - call_if_eq SlateportCity_OceanicMuseum_2F_EventScript_20BC92 - msgbox SlateportCity_OceanicMuseum_2F_Text_20BE40, MSGBOX_DEFAULT + call_if_eq SlateportCity_OceanicMuseum_2F_EventScript_PlayerFaceGrunts + msgbox SlateportCity_OceanicMuseum_2F_Text_WellTakeThoseParts, MSGBOX_DEFAULT compare VAR_FACING, DIR_EAST - call_if_ne SlateportCity_OceanicMuseum_2F_EventScript_20BC9D - msgbox SlateportCity_OceanicMuseum_2F_Text_20BE69, MSGBOX_DEFAULT - msgbox SlateportCity_OceanicMuseum_2F_Text_20BE93, MSGBOX_DEFAULT + call_if_ne SlateportCity_OceanicMuseum_2F_EventScript_SternFaceGrunts + msgbox SlateportCity_OceanicMuseum_2F_Text_SternWhoAreYou, MSGBOX_DEFAULT + msgbox SlateportCity_OceanicMuseum_2F_Text_WereTeamAqua, MSGBOX_DEFAULT closemessage - applymovement 4, SlateportCity_OceanicMuseum_2F_Movement_20BCE2 + applymovement 4, SlateportCity_OceanicMuseum_2F_Movement_GruntApproachToBattle waitmovement 0 compare VAR_FACING, DIR_SOUTH - call_if_eq SlateportCity_OceanicMuseum_2F_EventScript_20BCA8 + call_if_eq SlateportCity_OceanicMuseum_2F_EventScript_PlayerApproachGruntSouth compare VAR_FACING, DIR_WEST - call_if_eq SlateportCity_OceanicMuseum_2F_EventScript_20BCB3 - trainerbattle_no_intro TRAINER_GRUNT_14, SlateportCity_OceanicMuseum_2F_Text_20BEE2 - msgbox SlateportCity_OceanicMuseum_2F_Text_20BEFA, MSGBOX_DEFAULT + call_if_eq SlateportCity_OceanicMuseum_2F_EventScript_PlayerApproachGruntWest + trainerbattle_no_intro TRAINER_GRUNT_14, SlateportCity_OceanicMuseum_2F_Text_Grunt14Defeat + msgbox SlateportCity_OceanicMuseum_2F_Text_BossGoingToBeFurious, MSGBOX_DEFAULT closemessage - applymovement 4, SlateportCity_OceanicMuseum_2F_Movement_20BCEF + applymovement 4, SlateportCity_OceanicMuseum_2F_Movement_GruntDefeated waitmovement 0 - applymovement 3, SlateportCity_OceanicMuseum_2F_Movement_20BCE2 + applymovement 3, SlateportCity_OceanicMuseum_2F_Movement_GruntApproachToBattle waitmovement 0 - msgbox SlateportCity_OceanicMuseum_2F_Text_20BF35, MSGBOX_DEFAULT - trainerbattle_no_intro TRAINER_GRUNT_15, SlateportCity_OceanicMuseum_2F_Text_20BF66 - applymovement 3, SlateportCity_OceanicMuseum_2F_Movement_20BCEF + msgbox SlateportCity_OceanicMuseum_2F_Text_LetMeTakeCareOfThis, MSGBOX_DEFAULT + trainerbattle_no_intro TRAINER_GRUNT_15, SlateportCity_OceanicMuseum_2F_Text_Grunt15Defeat + applymovement 3, SlateportCity_OceanicMuseum_2F_Movement_GruntDefeated waitmovement 0 applymovement 3, Common_Movement_WalkInPlaceFastestDown applymovement 4, Common_Movement_WalkInPlaceFastestUp waitmovement 0 - msgbox SlateportCity_OceanicMuseum_2F_Text_20BF7A, MSGBOX_DEFAULT + msgbox SlateportCity_OceanicMuseum_2F_Text_MeddlingKid, MSGBOX_DEFAULT closemessage delay 35 addobject 2 - applymovement 2, SlateportCity_OceanicMuseum_2F_Movement_20BCD8 - applymovement 4, SlateportCity_OceanicMuseum_2F_Movement_20BCFE + applymovement 2, SlateportCity_OceanicMuseum_2F_Movement_ArchieEnter + applymovement 4, SlateportCity_OceanicMuseum_2F_Movement_GruntMoveForArchie waitmovement 0 - msgbox SlateportCity_OceanicMuseum_2F_Text_20BFF2, MSGBOX_DEFAULT + msgbox SlateportCity_OceanicMuseum_2F_Text_CameToSeeWhatsTakingSoLong, MSGBOX_DEFAULT closemessage - applymovement 2, SlateportCity_OceanicMuseum_2F_Movement_20BCD6 + applymovement 2, SlateportCity_OceanicMuseum_2F_Movement_ArchieApproachPlayer waitmovement 0 - msgbox SlateportCity_OceanicMuseum_2F_Text_20C059, MSGBOX_DEFAULT + msgbox SlateportCity_OceanicMuseum_2F_Text_ArchieWarning, MSGBOX_DEFAULT closemessage savebgm MUS_DUMMY fadedefaultbgm @@ -70,10 +70,10 @@ SlateportCity_OceanicMuseum_2F_EventScript_20BB00:: @ 820BB00 setflag FLAG_HIDE_SLATEPORT_CITY_OCEANIC_MUSEUM_AQUA_GRUNTS applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceFastestRight waitmovement 0 - msgbox SlateportCity_OceanicMuseum_2F_Text_20C2BE, MSGBOX_DEFAULT + msgbox SlateportCity_OceanicMuseum_2F_Text_SternThankYouForSavingUs, MSGBOX_DEFAULT setvar VAR_0x8004, ITEM_DEVON_GOODS call Common_EventScript_PlayerHandedOverTheItem - msgbox SlateportCity_OceanicMuseum_2F_Text_20C36C, MSGBOX_DEFAULT + msgbox SlateportCity_OceanicMuseum_2F_Text_SternIveGotToGo, MSGBOX_DEFAULT closemessage fadescreen 1 playfanfare MUS_ME_ASA @@ -82,7 +82,7 @@ SlateportCity_OceanicMuseum_2F_EventScript_20BB00:: @ 820BB00 removeobject 1 setflag FLAG_HIDE_ROUTE_110_TEAM_AQUA compare VAR_REGISTER_BIRCH_STATE, 0 - call_if_eq SlateportCity_OceanicMuseum_2F_EventScript_20BC8C + call_if_eq SlateportCity_OceanicMuseum_2F_EventScript_ReadyRegisterBirch setflag FLAG_DELIVERED_DEVON_GOODS clearflag FLAG_HIDE_ROUTE_116_DEVON_EMPLOYEE setflag FLAG_HIDE_RUSTBORO_CITY_DEVON_CORP_3F_EMPLOYEE @@ -91,37 +91,37 @@ SlateportCity_OceanicMuseum_2F_EventScript_20BB00:: @ 820BB00 release end -SlateportCity_OceanicMuseum_2F_EventScript_20BC8C:: @ 820BC8C +SlateportCity_OceanicMuseum_2F_EventScript_ReadyRegisterBirch:: @ 820BC8C setvar VAR_REGISTER_BIRCH_STATE, 1 return -SlateportCity_OceanicMuseum_2F_EventScript_20BC92:: @ 820BC92 +SlateportCity_OceanicMuseum_2F_EventScript_PlayerFaceGrunts:: @ 820BC92 applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceFastestLeft waitmovement 0 return -SlateportCity_OceanicMuseum_2F_EventScript_20BC9D:: @ 820BC9D +SlateportCity_OceanicMuseum_2F_EventScript_SternFaceGrunts:: @ 820BC9D applymovement 1, Common_Movement_WalkInPlaceFastestLeft waitmovement 0 return -SlateportCity_OceanicMuseum_2F_EventScript_20BCA8:: @ 820BCA8 - applymovement EVENT_OBJ_ID_PLAYER, SlateportCity_OceanicMuseum_2F_Movement_20BCBE +SlateportCity_OceanicMuseum_2F_EventScript_PlayerApproachGruntSouth:: @ 820BCA8 + applymovement EVENT_OBJ_ID_PLAYER, SlateportCity_OceanicMuseum_2F_Movement_PlayerApproachGruntSouth waitmovement 0 return -SlateportCity_OceanicMuseum_2F_EventScript_20BCB3:: @ 820BCB3 - applymovement EVENT_OBJ_ID_PLAYER, SlateportCity_OceanicMuseum_2F_Movement_20BCC2 +SlateportCity_OceanicMuseum_2F_EventScript_PlayerApproachGruntWest:: @ 820BCB3 + applymovement EVENT_OBJ_ID_PLAYER, SlateportCity_OceanicMuseum_2F_Movement_PlayerApproachGruntWest waitmovement 0 return -SlateportCity_OceanicMuseum_2F_Movement_20BCBE: @ 820BCBE +SlateportCity_OceanicMuseum_2F_Movement_PlayerApproachGruntSouth: @ 820BCBE walk_left walk_down walk_in_place_fastest_left step_end -SlateportCity_OceanicMuseum_2F_Movement_20BCC2: @ 820BCC2 +SlateportCity_OceanicMuseum_2F_Movement_PlayerApproachGruntWest: @ 820BCC2 walk_up walk_left walk_left @@ -129,6 +129,7 @@ SlateportCity_OceanicMuseum_2F_Movement_20BCC2: @ 820BCC2 walk_in_place_fastest_left step_end +@ Unused SlateportCity_OceanicMuseum_2F_Movement_20BCC8: @ 820BCC8 walk_up walk_left @@ -145,11 +146,11 @@ SlateportCity_OceanicMuseum_2F_Movement_20BCC8: @ 820BCC8 delay_8 step_end -SlateportCity_OceanicMuseum_2F_Movement_20BCD6: @ 820BCD6 +SlateportCity_OceanicMuseum_2F_Movement_ArchieApproachPlayer: @ 820BCD6 walk_right step_end -SlateportCity_OceanicMuseum_2F_Movement_20BCD8: @ 820BCD8 +SlateportCity_OceanicMuseum_2F_Movement_ArchieEnter: @ 820BCD8 walk_down walk_down walk_down @@ -161,17 +162,17 @@ SlateportCity_OceanicMuseum_2F_Movement_20BCD8: @ 820BCD8 walk_right step_end -SlateportCity_OceanicMuseum_2F_Movement_20BCE2: @ 820BCE2 +SlateportCity_OceanicMuseum_2F_Movement_GruntApproachToBattle: @ 820BCE2 walk_right step_end -SlateportCity_OceanicMuseum_2F_Movement_20BCE4: @ 820BCE4 +SlateportCity_OceanicMuseum_2F_Movement_FirstGruntEnter: @ 820BCE4 walk_down walk_right walk_in_place_fastest_down step_end -SlateportCity_OceanicMuseum_2F_Movement_20BCE8: @ 820BCE8 +SlateportCity_OceanicMuseum_2F_Movement_FirstGruntApproach: @ 820BCE8 walk_down walk_down walk_down @@ -180,17 +181,17 @@ SlateportCity_OceanicMuseum_2F_Movement_20BCE8: @ 820BCE8 walk_right step_end -SlateportCity_OceanicMuseum_2F_Movement_20BCEF: @ 820BCEF +SlateportCity_OceanicMuseum_2F_Movement_GruntDefeated: @ 820BCEF lock_facing_direction walk_left unlock_facing_direction step_end -SlateportCity_OceanicMuseum_2F_Movement_20BCF3: @ 820BCF3 +SlateportCity_OceanicMuseum_2F_Movement_SecondGruntEnter: @ 820BCF3 walk_down step_end -SlateportCity_OceanicMuseum_2F_Movement_20BCF5: @ 820BCF5 +SlateportCity_OceanicMuseum_2F_Movement_SecondGruntApproach: @ 820BCF5 walk_down walk_down walk_down @@ -201,7 +202,7 @@ SlateportCity_OceanicMuseum_2F_Movement_20BCF5: @ 820BCF5 walk_right step_end -SlateportCity_OceanicMuseum_2F_Movement_20BCFE: @ 820BCFE +SlateportCity_OceanicMuseum_2F_Movement_GruntMoveForArchie: @ 820BCFE delay_16 delay_16 delay_16 @@ -215,65 +216,65 @@ SlateportCity_OceanicMuseum_2F_Movement_20BCFE: @ 820BCFE walk_in_place_fastest_up step_end -SlateportCity_OceanicMuseum_2F_EventScript_20BD0A:: @ 820BD0A - msgbox SlateportCity_OceanicMuseum_2F_Text_20C4F9, MSGBOX_SIGN +SlateportCity_OceanicMuseum_2F_EventScript_WaterQualitySample1:: @ 820BD0A + msgbox SlateportCity_OceanicMuseum_2F_Text_WaterQualitySample1, MSGBOX_SIGN end -SlateportCity_OceanicMuseum_2F_EventScript_20BD13:: @ 820BD13 - msgbox SlateportCity_OceanicMuseum_2F_Text_20C566, MSGBOX_SIGN +SlateportCity_OceanicMuseum_2F_EventScript_WaterQualitySample2:: @ 820BD13 + msgbox SlateportCity_OceanicMuseum_2F_Text_WaterQualitySample2, MSGBOX_SIGN end -SlateportCity_OceanicMuseum_2F_EventScript_20BD1C:: @ 820BD1C - msgbox SlateportCity_OceanicMuseum_2F_Text_20C5C6, MSGBOX_SIGN +SlateportCity_OceanicMuseum_2F_EventScript_PressureExperiment:: @ 820BD1C + msgbox SlateportCity_OceanicMuseum_2F_Text_PressureExperiment, MSGBOX_SIGN end -SlateportCity_OceanicMuseum_2F_EventScript_20BD25:: @ 820BD25 - msgbox SlateportCity_OceanicMuseum_2F_Text_20C6C7, MSGBOX_SIGN +SlateportCity_OceanicMuseum_2F_EventScript_HoennModel:: @ 820BD25 + msgbox SlateportCity_OceanicMuseum_2F_Text_HoennModel, MSGBOX_SIGN end -SlateportCity_OceanicMuseum_2F_EventScript_20BD2E:: @ 820BD2E - msgbox SlateportCity_OceanicMuseum_2F_Text_20C72F, MSGBOX_SIGN +SlateportCity_OceanicMuseum_2F_EventScript_DeepSeawaterDisplay:: @ 820BD2E + msgbox SlateportCity_OceanicMuseum_2F_Text_DeepSeawaterDisplay, MSGBOX_SIGN end -SlateportCity_OceanicMuseum_2F_EventScript_20BD37:: @ 820BD37 - msgbox SlateportCity_OceanicMuseum_2F_Text_20C7C1, MSGBOX_SIGN +SlateportCity_OceanicMuseum_2F_EventScript_SurfaceSeawaterDisplay:: @ 820BD37 + msgbox SlateportCity_OceanicMuseum_2F_Text_SurfaceSeawaterDisplay, MSGBOX_SIGN end -SlateportCity_OceanicMuseum_2F_EventScript_20BD40:: @ 820BD40 - msgbox SlateportCity_OceanicMuseum_2F_Text_20C82F, MSGBOX_SIGN +SlateportCity_OceanicMuseum_2F_EventScript_SSTidalReplica:: @ 820BD40 + msgbox SlateportCity_OceanicMuseum_2F_Text_SSTidalReplica, MSGBOX_SIGN end -SlateportCity_OceanicMuseum_2F_EventScript_20BD49:: @ 820BD49 - msgbox SlateportCity_OceanicMuseum_2F_Text_20C88B, MSGBOX_SIGN +SlateportCity_OceanicMuseum_2F_EventScript_SubmarineReplica:: @ 820BD49 + msgbox SlateportCity_OceanicMuseum_2F_Text_SubmarineReplica, MSGBOX_SIGN end -SlateportCity_OceanicMuseum_2F_EventScript_20BD52:: @ 820BD52 - msgbox SlateportCity_OceanicMuseum_2F_Text_20C8E8, MSGBOX_SIGN +SlateportCity_OceanicMuseum_2F_EventScript_SubmersibleReplica:: @ 820BD52 + msgbox SlateportCity_OceanicMuseum_2F_Text_SumbersibleReplica, MSGBOX_SIGN end -SlateportCity_OceanicMuseum_2F_EventScript_20BD5B:: @ 820BD5B - msgbox SlateportCity_OceanicMuseum_2F_Text_20C93A, MSGBOX_SIGN +SlateportCity_OceanicMuseum_2F_EventScript_SSAnneReplica:: @ 820BD5B + msgbox SlateportCity_OceanicMuseum_2F_Text_SSAnneReplica, MSGBOX_SIGN end -SlateportCity_OceanicMuseum_2F_EventScript_20BD64:: @ 820BD64 - msgbox SlateportCity_OceanicMuseum_2F_Text_20C43F, MSGBOX_NPC +SlateportCity_OceanicMuseum_2F_EventScript_MuseumPatron1:: @ 820BD64 + msgbox SlateportCity_OceanicMuseum_2F_Text_RemindsMeOfAbandonedShip, MSGBOX_NPC end -SlateportCity_OceanicMuseum_2F_EventScript_20BD6D:: @ 820BD6D - msgbox SlateportCity_OceanicMuseum_2F_Text_20C495, MSGBOX_NPC +SlateportCity_OceanicMuseum_2F_EventScript_MuseumPatron2:: @ 820BD6D + msgbox SlateportCity_OceanicMuseum_2F_Text_DontRunInMuseum, MSGBOX_NPC end -SlateportCity_OceanicMuseum_2F_EventScript_20BD76:: @ 820BD76 +SlateportCity_OceanicMuseum_2F_EventScript_MuseumPatron3:: @ 820BD76 lock faceplayer - msgbox SlateportCity_OceanicMuseum_2F_Text_20C4C2, MSGBOX_DEFAULT + msgbox SlateportCity_OceanicMuseum_2F_Text_WantToRideSubmarine, MSGBOX_DEFAULT closemessage applymovement VAR_LAST_TALKED, Common_Movement_FaceOriginalDirection waitmovement 0 release end -SlateportCity_OceanicMuseum_2F_Text_20BD8D: @ 820BD8D +SlateportCity_OceanicMuseum_2F_Text_ThankYouForTheParts: @ 820BD8D .string "Yes? If you're looking for STERN,\n" .string "that would be me.\p" .string "Ah! Those must be the parts I ordered\n" @@ -281,47 +282,47 @@ SlateportCity_OceanicMuseum_2F_Text_20BD8D: @ 820BD8D .string "Thank you! That's great!\n" .string "We can prepare for our expedition now.$" -SlateportCity_OceanicMuseum_2F_Text_20BE40: @ 820BE40 +SlateportCity_OceanicMuseum_2F_Text_WellTakeThoseParts: @ 820BE40 .string "Hehehe, hold it!\n" .string "We'll take those parts!$" -SlateportCity_OceanicMuseum_2F_Text_20BE69: @ 820BE69 +SlateportCity_OceanicMuseum_2F_Text_SternWhoAreYou: @ 820BE69 .string "CAPT. STERN: Wh-what?\n" .string "Who are you people?$" -SlateportCity_OceanicMuseum_2F_Text_20BE93: @ 820BE93 +SlateportCity_OceanicMuseum_2F_Text_WereTeamAqua: @ 820BE93 .string "We're TEAM AQUA!\p" .string "Our BOSS wants those parts!\n" .string "Shut your yap and fork them over!$" -SlateportCity_OceanicMuseum_2F_Text_20BEE2: @ 820BEE2 +SlateportCity_OceanicMuseum_2F_Text_Grunt14Defeat: @ 820BEE2 .string "Awaaaah!\n" .string "A kid beat me!$" -SlateportCity_OceanicMuseum_2F_Text_20BEFA: @ 820BEFA +SlateportCity_OceanicMuseum_2F_Text_BossGoingToBeFurious: @ 820BEFA .string "Oh, man, what a disaster…\n" .string "The BOSS is going to be furious…$" -SlateportCity_OceanicMuseum_2F_Text_20BF35: @ 820BF35 +SlateportCity_OceanicMuseum_2F_Text_LetMeTakeCareOfThis: @ 820BF35 .string "Humph, sniveling wimp!\n" .string "Let me take care of this!$" -SlateportCity_OceanicMuseum_2F_Text_20BF66: @ 820BF66 +SlateportCity_OceanicMuseum_2F_Text_Grunt15Defeat: @ 820BF66 .string "What?!\n" .string "I lost, too!$" -SlateportCity_OceanicMuseum_2F_Text_20BF7A: @ 820BF7A +SlateportCity_OceanicMuseum_2F_Text_MeddlingKid: @ 820BF7A .string "Now what? If we don't get the parts,\n" .string "we're in for it!\p" .string "Arrgh, I didn't count on being meddled\n" .string "with by some meddling kid!$" -SlateportCity_OceanicMuseum_2F_Text_20BFF2: @ 820BFF2 +SlateportCity_OceanicMuseum_2F_Text_CameToSeeWhatsTakingSoLong: @ 820BFF2 .string "I came to see what was taking so\n" .string "long to snatch some parts, and you\l" .string "simps are held up by a mere child?$" -SlateportCity_OceanicMuseum_2F_Text_20C059: @ 820C059 +SlateportCity_OceanicMuseum_2F_Text_ArchieWarning: @ 820C059 .string "We are TEAM AQUA,\n" .string "and we love the sea!\p" .string "And I am TEAM AQUA's leader,\n" @@ -348,7 +349,7 @@ SlateportCity_OceanicMuseum_2F_Text_20C059: @ 820C059 .string "dearly!\p" .string "And don't you forget it!$" -SlateportCity_OceanicMuseum_2F_Text_20C2BE: @ 820C2BE +SlateportCity_OceanicMuseum_2F_Text_SternThankYouForSavingUs: @ 820C2BE .string "CAPT. STERN: You're…\n" .string "Ah, okay, you're {PLAYER}{KUN}…\p" .string "Anyway, that was a tense situation!\n" @@ -356,7 +357,7 @@ SlateportCity_OceanicMuseum_2F_Text_20C2BE: @ 820C2BE .string "Oh, yes, I almost forgot that you\n" .string "even brought the parts from DEVON!$" -SlateportCity_OceanicMuseum_2F_Text_20C36C: @ 820C36C +SlateportCity_OceanicMuseum_2F_Text_SternIveGotToGo: @ 820C36C .string "CAPT. STERN: Whoops!\n" .string "There's no time to lose!\p" .string "We have to set out on our ocean-floor\n" @@ -366,32 +367,32 @@ SlateportCity_OceanicMuseum_2F_Text_20C36C: @ 820C36C .string "Feel free to wander around and check\n" .string "out our facilities, though.$" -SlateportCity_OceanicMuseum_2F_Text_20C43F: @ 820C43F +SlateportCity_OceanicMuseum_2F_Text_RemindsMeOfAbandonedShip: @ 820C43F .string "I saw a model of a ship here.\p" .string "It reminded me of the ABANDONED SHIP\n" .string "near DEWFORD TOWN…$" -SlateportCity_OceanicMuseum_2F_Text_20C495: @ 820C495 +SlateportCity_OceanicMuseum_2F_Text_DontRunInMuseum: @ 820C495 .string "Don't you dare run around inside\n" .string "the MUSEUM!$" -SlateportCity_OceanicMuseum_2F_Text_20C4C2: @ 820C4C2 +SlateportCity_OceanicMuseum_2F_Text_WantToRideSubmarine: @ 820C4C2 .string "Wow, the submarine's awesome!\n" .string "I want to go for a ride!$" -SlateportCity_OceanicMuseum_2F_Text_20C4F9: @ 820C4F9 +SlateportCity_OceanicMuseum_2F_Text_WaterQualitySample1: @ 820C4F9 .string "“WATER QUALITY SAMPLE 1,” the\n" .string "label says.\p" .string "The sea is all connected, but the\n" .string "water seems to differ by region.$" -SlateportCity_OceanicMuseum_2F_Text_20C566: @ 820C566 +SlateportCity_OceanicMuseum_2F_Text_WaterQualitySample2: @ 820C566 .string "“WATER QUALITY SAMPLE 2,” the\n" .string "label says.\p" .string "Does the saltiness of seawater differ\n" .string "by region, too?$" -SlateportCity_OceanicMuseum_2F_Text_20C5C6: @ 820C5C6 +SlateportCity_OceanicMuseum_2F_Text_PressureExperiment: @ 820C5C6 .string "A rubber ball is expanding and\n" .string "shrinking.\p" .string "“In the sea, the weight of water itself\n" @@ -402,39 +403,39 @@ SlateportCity_OceanicMuseum_2F_Text_20C5C6: @ 820C5C6 .string "the pressure can reach even tens of\l" .string "thousands of tons on a small area.”$" -SlateportCity_OceanicMuseum_2F_Text_20C6C7: @ 820C6C7 +SlateportCity_OceanicMuseum_2F_Text_HoennModel: @ 820C6C7 .string "“MODEL OF HOENN REGION”\p" .string "It's a miniature diorama of the\n" .string "HOENN region.\p" .string "Where is LITTLEROOT TOWN on this?$" -SlateportCity_OceanicMuseum_2F_Text_20C72F: @ 820C72F +SlateportCity_OceanicMuseum_2F_Text_DeepSeawaterDisplay: @ 820C72F .string "It's a display on the flow of seawater.\p" .string "“Near the bottom of the sea, water\n" .string "flows due to differences in such\l" .string "factors as temperature and salinity.”$" -SlateportCity_OceanicMuseum_2F_Text_20C7C1: @ 820C7C1 +SlateportCity_OceanicMuseum_2F_Text_SurfaceSeawaterDisplay: @ 820C7C1 .string "It's a display on the flow of seawater.\p" .string "“Toward the surface, seawater flows\n" .string "as currents driven by the winds.”$" -SlateportCity_OceanicMuseum_2F_Text_20C82F: @ 820C82F +SlateportCity_OceanicMuseum_2F_Text_SSTidalReplica: @ 820C82F .string "“THE FERRY S.S. TIDAL\p" .string "“A scale replica of the ship under\n" .string "construction at STERN'S SHIPYARD.”$" -SlateportCity_OceanicMuseum_2F_Text_20C88B: @ 820C88B +SlateportCity_OceanicMuseum_2F_Text_SubmarineReplica: @ 820C88B .string "“SUBMARINE EXPLORER 1\p" .string "“A replica of the high-performance\n" .string "ocean floor exploration submarine.”$" -SlateportCity_OceanicMuseum_2F_Text_20C8E8: @ 820C8E8 +SlateportCity_OceanicMuseum_2F_Text_SumbersibleReplica: @ 820C8E8 .string "“SUBMERSIBLE POD\p" .string "“A replica of a compact, unmanned\n" .string "pod for seafloor exploration.”$" -SlateportCity_OceanicMuseum_2F_Text_20C93A: @ 820C93A +SlateportCity_OceanicMuseum_2F_Text_SSAnneReplica: @ 820C93A .string "“S.S. ANNE\p" .string "“A replica of the luxury liner that\n" .string "circles the globe.”$" diff --git a/data/scripts/interview.inc b/data/scripts/interview.inc index 2ad8b305e3..8512ca105a 100644 --- a/data/scripts/interview.inc +++ b/data/scripts/interview.inc @@ -50,7 +50,7 @@ SlateportCity_PokemonFanClub_EventScript_28C879:: @ 828C879 release end -SlateportCity_OceanicMuseum_1F_EventScript_28C883:: @ 828C883 +SlateportCity_OceanicMuseum_1F_EventScript_Reporter:: @ 828C883 lock faceplayer setvar VAR_0x8005, 2 diff --git a/data/text/match_call.inc b/data/text/match_call.inc index 376f36750f..a695b1b80d 100644 --- a/data/text/match_call.inc +++ b/data/text/match_call.inc @@ -2306,7 +2306,7 @@ gText_Wallace_Pokenav_2B3790:: @ 82B3790 .string "But what is a rare stone exactly?\n" .string "All I can think of is a METEORITE…$" -MossdeepCity_SpaceCenter_2F_Text_2B38C1: @ 82B38C1 +MossdeepCity_SpaceCenter_2F_Text_MayRayquazaCall: @ 82B38C1 .string "… … … … … …\n" .string "… … … … … Beep!\p" .string "MAY: Hi, {PLAYER}{KUN}!\p" @@ -2321,7 +2321,7 @@ MossdeepCity_SpaceCenter_2F_Text_2B38C1: @ 82B38C1 .string "… … … … … …\n" .string "… … … … … Click!$" -MossdeepCity_SpaceCenter_2F_Text_2B39C6: @ 82B39C6 +MossdeepCity_SpaceCenter_2F_Text_BrendanRayquazaCall: @ 82B39C6 .string "… … … … … …\n" .string "… … … … … Beep!\p" .string "BRENDAN: Hey, {PLAYER}!\n" diff --git a/include/constants/flags.h b/include/constants/flags.h index 7f2b2964d4..0e85e2570b 100644 --- a/include/constants/flags.h +++ b/include/constants/flags.h @@ -777,7 +777,7 @@ #define FLAG_HIDE_PLAYERS_HOUSE_DAD 0x2DE #define FLAG_HIDE_LITTLEROOT_TOWN_BRENDANS_HOUSE_RIVAL_SIBLING 0x2DF #define FLAG_HIDE_LITTLEROOT_TOWN_MAYS_HOUSE_RIVAL_SIBLING 0x2E0 -#define FLAG_HIDE_MOSSDEEP_CITY_SPACE_CENTER_INVISIBLE_NINJA_BOY 0x2E1 +#define FLAG_HIDE_MOSSDEEP_CITY_SPACE_CENTER_MAGMA_NOTE 0x2E1 #define FLAG_HIDE_ROUTE_104_MR_BRINEY 0x2E2 #define FLAG_HIDE_BRINEYS_HOUSE_MR_BRINEY 0x2E3 #define FLAG_HIDE_MR_BRINEY_DEWFORD_TOWN 0x2E4 diff --git a/include/constants/vars.h b/include/constants/vars.h index cfafccd9b8..64ff6622b3 100644 --- a/include/constants/vars.h +++ b/include/constants/vars.h @@ -172,8 +172,8 @@ #define VAR_UNUSED_0x409B 0x409B // Unused Var #define VAR_ELITE_4_STATE 0x409C #define VAR_UNUSED_0x409D 0x409D // Unused Var -#define VAR_MOSSDEEP_SPACE_CENTER_STATE_1 0x409E -#define VAR_MOSSDEEP_SPACE_CENTER_STATE_2 0x409F +#define VAR_MOSSDEEP_SPACE_CENTER_STAIR_GUARD_STATE 0x409E +#define VAR_MOSSDEEP_SPACE_CENTER_STATE 0x409F #define VAR_SLATEPORT_HARBOR_STATE 0x40A0 #define VAR_UNUSED_0x40A1 0x40A1 // Unused var #define VAR_SEAFLOOR_CAVERN_STATE 0x40A2 diff --git a/include/event_scripts.h b/include/event_scripts.h index b0630ecd42..b86c46df06 100644 --- a/include/event_scripts.h +++ b/include/event_scripts.h @@ -556,7 +556,7 @@ extern const u8 MauvilleCity_EventScript_1DF7BA[]; extern const u8 Route119_EventScript_1F49EC[]; extern const u8 LittlerootTown_ProfessorBirchsLab_EventScript_1FA4D6[]; extern const u8 RustboroCity_Gym_EventScript_RegisterRoxanne[]; -extern const u8 MossdeepCity_SpaceCenter_2F_EventScript_224175[]; +extern const u8 MossdeepCity_SpaceCenter_2F_EventScript_RivalRayquazaCall[]; extern const u8 SSTidalCorridor_EventScript_23C050[]; extern const u8 EventScript_FallDownHoleMtPyre[]; diff --git a/src/battle_tower.c b/src/battle_tower.c index 8efee42f75..7b9842c486 100644 --- a/src/battle_tower.c +++ b/src/battle_tower.c @@ -31,8 +31,8 @@ #include "constants/species.h" #include "constants/easy_chat.h" -extern const u8 MossdeepCity_SpaceCenter_2F_EventScript_224157[]; -extern const u8 MossdeepCity_SpaceCenter_2F_EventScript_224166[]; +extern const u8 MossdeepCity_SpaceCenter_2F_EventScript_MaxieTrainer[]; +extern const u8 MossdeepCity_SpaceCenter_2F_EventScript_TabithaTrainer[]; // EWRAM vars. EWRAM_DATA const struct BattleFrontierTrainer *gFacilityTrainers = NULL; @@ -2349,9 +2349,9 @@ void DoSpecialTrainerBattle(void) gBattleTypeFlags = BATTLE_TYPE_TRAINER | BATTLE_TYPE_DOUBLE | BATTLE_TYPE_TWO_OPPONENTS | BATTLE_TYPE_MULTI | BATTLE_TYPE_INGAME_PARTNER; FillPartnerParty(TRAINER_STEVEN_PARTNER); gApproachingTrainerId = 0; - BattleSetup_ConfigureTrainerBattle(MossdeepCity_SpaceCenter_2F_EventScript_224157 + 1); + BattleSetup_ConfigureTrainerBattle(MossdeepCity_SpaceCenter_2F_EventScript_MaxieTrainer + 1); gApproachingTrainerId = 1; - BattleSetup_ConfigureTrainerBattle(MossdeepCity_SpaceCenter_2F_EventScript_224166 + 1); + BattleSetup_ConfigureTrainerBattle(MossdeepCity_SpaceCenter_2F_EventScript_TabithaTrainer + 1); gPartnerTrainerId = TRAINER_STEVEN_PARTNER; CreateTask(Task_StartBattleAfterTransition, 1); PlayMapChosenOrBattleBGM(0); diff --git a/src/field_control_avatar.c b/src/field_control_avatar.c index e868a7b995..bbd2ebda9e 100644 --- a/src/field_control_avatar.c +++ b/src/field_control_avatar.c @@ -588,7 +588,7 @@ static bool8 TryStartStepCountScript(u16 metatileBehavior) } if (ShouldDoRivalRayquazaCall() == TRUE) { - ScriptContext1_SetupScript(MossdeepCity_SpaceCenter_2F_EventScript_224175); + ScriptContext1_SetupScript(MossdeepCity_SpaceCenter_2F_EventScript_RivalRayquazaCall); return TRUE; } } From 390d594e21067be8c24447ca5e51689327b8ce04 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Fri, 1 Nov 2019 17:56:35 -0400 Subject: [PATCH 43/46] Fix indentation --- data/io_reg.s | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/data/io_reg.s b/data/io_reg.s index 24e0e3d2de..bbb93b4900 100644 --- a/data/io_reg.s +++ b/data/io_reg.s @@ -1,4 +1,4 @@ - .include "asm/macros.inc" + .include "asm/macros.inc" .include "constants/constants.inc" .section .rodata @@ -7,22 +7,22 @@ .align 2 gUnref_82EC784:: @ 82EC784 - .4byte 0x00000000 - .4byte 0x00000000 - .4byte 0x04000008 - .4byte 0x0400000A - .4byte 0x0400000C - .4byte 0x0400000E - .4byte 0x04000010 - .4byte 0x04000014 - .4byte 0x04000018 - .4byte 0x0400001C - .4byte 0x04000012 - .4byte 0x04000016 - .4byte 0x0400001A - .4byte 0x0400001E - .4byte 0x02000100 - .4byte 0x08000400 + .4byte 0x00000000 + .4byte 0x00000000 + .4byte 0x04000008 + .4byte 0x0400000A + .4byte 0x0400000C + .4byte 0x0400000E + .4byte 0x04000010 + .4byte 0x04000014 + .4byte 0x04000018 + .4byte 0x0400001C + .4byte 0x04000012 + .4byte 0x04000016 + .4byte 0x0400001A + .4byte 0x0400001E + .4byte 0x02000100 + .4byte 0x08000400 gOverworldBackgroundLayerFlags:: @ 82EC7C4 .2byte 0x0100 /* BLDCNT_TGT2_BG0 */ From e4fe21786e79be877dc2c183204c7f8c0a9a158e Mon Sep 17 00:00:00 2001 From: GriffinR Date: Sat, 2 Nov 2019 02:19:44 -0400 Subject: [PATCH 44/46] Document misc special houses --- data/maps/FallarborTown_CozmosHouse/map.json | 4 +- .../FallarborTown_CozmosHouse/scripts.inc | 76 ++-- data/maps/MauvilleCity_BikeShop/map.json | 8 +- data/maps/MauvilleCity_BikeShop/scripts.inc | 217 ++++++------ data/maps/Route104_MrBrineysHouse/map.json | 4 +- data/maps/Route104_MrBrineysHouse/scripts.inc | 88 ++--- .../map.json | 4 +- .../scripts.inc | 328 +++++++++--------- 8 files changed, 365 insertions(+), 364 deletions(-) diff --git a/data/maps/FallarborTown_CozmosHouse/map.json b/data/maps/FallarborTown_CozmosHouse/map.json index 4895efed4e..a31c1c5bfa 100644 --- a/data/maps/FallarborTown_CozmosHouse/map.json +++ b/data/maps/FallarborTown_CozmosHouse/map.json @@ -24,7 +24,7 @@ "movement_range_y": 1, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "FallarborTown_CozmosHouse_EventScript_200F13", + "script": "FallarborTown_CozmosHouse_EventScript_ProfCozmo", "flag": "FLAG_HIDE_FALLARBOR_HOUSE_PROF_COZMO" }, { @@ -37,7 +37,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "FallarborTown_CozmosHouse_EventScript_200FBC", + "script": "FallarborTown_CozmosHouse_EventScript_CozmosWife", "flag": "0" } ], diff --git a/data/maps/FallarborTown_CozmosHouse/scripts.inc b/data/maps/FallarborTown_CozmosHouse/scripts.inc index a2578bf3fa..310cc72002 100644 --- a/data/maps/FallarborTown_CozmosHouse/scripts.inc +++ b/data/maps/FallarborTown_CozmosHouse/scripts.inc @@ -1,73 +1,73 @@ FallarborTown_CozmosHouse_MapScripts:: @ 8200F12 .byte 0 -FallarborTown_CozmosHouse_EventScript_200F13:: @ 8200F13 +FallarborTown_CozmosHouse_EventScript_ProfCozmo:: @ 8200F13 lock faceplayer - goto_if_set FLAG_RECEIVED_TM27, FallarborTown_CozmosHouse_EventScript_200FB2 + goto_if_set FLAG_RECEIVED_TM27, FallarborTown_CozmosHouse_EventScript_GaveMeteorite checkitem ITEM_METEORITE, 1 - compare VAR_RESULT, 1 - goto_if_eq FallarborTown_CozmosHouse_EventScript_200F38 - msgbox FallarborTown_CozmosHouse_Text_200FEE, MSGBOX_DEFAULT + compare VAR_RESULT, TRUE + goto_if_eq FallarborTown_CozmosHouse_EventScript_PlayerHasMeteorite + msgbox FallarborTown_CozmosHouse_Text_MeteoriteWillNeverBeMineNow, MSGBOX_DEFAULT release end -FallarborTown_CozmosHouse_EventScript_200F38:: @ 8200F38 - call_if_unset FLAG_TEMP_2, FallarborTown_CozmosHouse_EventScript_200F8B - call_if_set FLAG_TEMP_2, FallarborTown_CozmosHouse_EventScript_200F9C +FallarborTown_CozmosHouse_EventScript_PlayerHasMeteorite:: @ 8200F38 + call_if_unset FLAG_TEMP_2, FallarborTown_CozmosHouse_EventScript_NoticeMeteorite + call_if_set FLAG_TEMP_2, FallarborTown_CozmosHouse_EventScript_AskForMeteorite compare VAR_RESULT, 0 - goto_if_eq FallarborTown_CozmosHouse_EventScript_200FA5 - msgbox FallarborTown_CozmosHouse_Text_201159, MSGBOX_DEFAULT + goto_if_eq FallarborTown_CozmosHouse_EventScript_DeclineGiveMeteorite + msgbox FallarborTown_CozmosHouse_Text_PleaseUseThisTM, MSGBOX_DEFAULT giveitem_std ITEM_TM27 - compare VAR_RESULT, 0 + compare VAR_RESULT, FALSE goto_if_eq Common_EventScript_ShowBagIsFull setvar VAR_0x8004, ITEM_METEORITE call Common_EventScript_PlayerHandedOverTheItem setflag FLAG_RECEIVED_TM27 - msgbox FallarborTown_CozmosHouse_Text_2011A5, MSGBOX_DEFAULT + msgbox FallarborTown_CozmosHouse_Text_ReallyGoingToHelpMyResearch, MSGBOX_DEFAULT release end -FallarborTown_CozmosHouse_EventScript_200F8B:: @ 8200F8B - msgbox FallarborTown_CozmosHouse_Text_200FEE, MSGBOX_DEFAULT - msgbox FallarborTown_CozmosHouse_Text_2010A2, MSGBOX_YESNO +FallarborTown_CozmosHouse_EventScript_NoticeMeteorite:: @ 8200F8B + msgbox FallarborTown_CozmosHouse_Text_MeteoriteWillNeverBeMineNow, MSGBOX_DEFAULT + msgbox FallarborTown_CozmosHouse_Text_IsThatMeteoriteMayIHaveIt, MSGBOX_YESNO return -FallarborTown_CozmosHouse_EventScript_200F9C:: @ 8200F9C - msgbox FallarborTown_CozmosHouse_Text_201249, MSGBOX_YESNO +FallarborTown_CozmosHouse_EventScript_AskForMeteorite:: @ 8200F9C + msgbox FallarborTown_CozmosHouse_Text_MayIHaveMeteorite, MSGBOX_YESNO return -FallarborTown_CozmosHouse_EventScript_200FA5:: @ 8200FA5 +FallarborTown_CozmosHouse_EventScript_DeclineGiveMeteorite:: @ 8200FA5 setflag FLAG_TEMP_2 - msgbox FallarborTown_CozmosHouse_Text_201212, MSGBOX_DEFAULT + msgbox FallarborTown_CozmosHouse_Text_CrushedWithDisappointment, MSGBOX_DEFAULT release end -FallarborTown_CozmosHouse_EventScript_200FB2:: @ 8200FB2 - msgbox FallarborTown_CozmosHouse_Text_2011A5, MSGBOX_DEFAULT +FallarborTown_CozmosHouse_EventScript_GaveMeteorite:: @ 8200FB2 + msgbox FallarborTown_CozmosHouse_Text_ReallyGoingToHelpMyResearch, MSGBOX_DEFAULT release end -FallarborTown_CozmosHouse_EventScript_200FBC:: @ 8200FBC +FallarborTown_CozmosHouse_EventScript_CozmosWife:: @ 8200FBC lock faceplayer - goto_if_set FLAG_RECEIVED_TM27, FallarborTown_CozmosHouse_EventScript_200FE4 - goto_if_set FLAG_DEFEATED_EVIL_TEAM_MT_CHIMNEY, FallarborTown_CozmosHouse_EventScript_200FDA - msgbox FallarborTown_CozmosHouse_Text_2012BC, MSGBOX_DEFAULT + goto_if_set FLAG_RECEIVED_TM27, FallarborTown_CozmosHouse_EventScript_CozmoIsHappy + goto_if_set FLAG_DEFEATED_EVIL_TEAM_MT_CHIMNEY, FallarborTown_CozmosHouse_EventScript_CozmoIsSad + msgbox FallarborTown_CozmosHouse_Text_CozmoWentToMeteorFalls, MSGBOX_DEFAULT release end -FallarborTown_CozmosHouse_EventScript_200FDA:: @ 8200FDA - msgbox FallarborTown_CozmosHouse_Text_201310, MSGBOX_DEFAULT +FallarborTown_CozmosHouse_EventScript_CozmoIsSad:: @ 8200FDA + msgbox FallarborTown_CozmosHouse_Text_FeelSorryForCozmo, MSGBOX_DEFAULT release end -FallarborTown_CozmosHouse_EventScript_200FE4:: @ 8200FE4 - msgbox FallarborTown_CozmosHouse_Text_20134B, MSGBOX_DEFAULT +FallarborTown_CozmosHouse_EventScript_CozmoIsHappy:: @ 8200FE4 + msgbox FallarborTown_CozmosHouse_Text_CozmoIsSoHappy, MSGBOX_DEFAULT release end -FallarborTown_CozmosHouse_Text_200FEE: @ 8200FEE +FallarborTown_CozmosHouse_Text_MeteoriteWillNeverBeMineNow: @ 8200FEE .string "PROF. COZMO: Oh…\n" .string "I never should have let myself be\l" .string "conned into telling TEAM MAGMA where\l" @@ -75,7 +75,7 @@ FallarborTown_CozmosHouse_Text_200FEE: @ 8200FEE .string "That METEORITE from METEOR FALLS…\n" .string "It's never going to be mine now…$" -FallarborTown_CozmosHouse_Text_2010A2: @ 82010A2 +FallarborTown_CozmosHouse_Text_IsThatMeteoriteMayIHaveIt: @ 82010A2 .string "Oh!\n" .string "Hah?\p" .string "That item…\p" @@ -86,36 +86,36 @@ FallarborTown_CozmosHouse_Text_2010A2: @ 82010A2 .string "I'm not asking for it for free.\n" .string "How about in exchange for this TM?$" -FallarborTown_CozmosHouse_Text_201159: @ 8201159 +FallarborTown_CozmosHouse_Text_PleaseUseThisTM: @ 8201159 .string "PROF. COZMO: This TM, it represents\n" .string "my feeling of gratitude.\l" .string "Please use it!$" -FallarborTown_CozmosHouse_Text_2011A5: @ 82011A5 +FallarborTown_CozmosHouse_Text_ReallyGoingToHelpMyResearch: @ 82011A5 .string "PROF. COZMO: Oh, I can't believe it.\n" .string "This is really, really great!\p" .string "This is really going to help my research!$" -FallarborTown_CozmosHouse_Text_201212: @ 8201212 +FallarborTown_CozmosHouse_Text_CrushedWithDisappointment: @ 8201212 .string "PROF. COZMO: Oh, but…\n" .string "I'm crushed with disappointment…$" -FallarborTown_CozmosHouse_Text_201249: @ 8201249 +FallarborTown_CozmosHouse_Text_MayIHaveMeteorite: @ 8201249 .string "PROF. COZMO: Please, may I have that\n" .string "METEORITE?\p" .string "I'm not asking for it for free.\n" .string "How about in exchange for this TM?$" -FallarborTown_CozmosHouse_Text_2012BC: @ 82012BC +FallarborTown_CozmosHouse_Text_CozmoWentToMeteorFalls: @ 82012BC .string "PROF. COZMO went off to METEOR FALLS\n" .string "on ROUTE 114 with some people from\l" .string "TEAM MAGMA.$" -FallarborTown_CozmosHouse_Text_201310: @ 8201310 +FallarborTown_CozmosHouse_Text_FeelSorryForCozmo: @ 8201310 .string "Poor PROF. COZMO…\n" .string "He's so depressed… I feel sorry for him.$" -FallarborTown_CozmosHouse_Text_20134B: @ 820134B +FallarborTown_CozmosHouse_Text_CozmoIsSoHappy: @ 820134B .string "Look at PROF. COZMO…\n" .string "He's so happy! I think it's cute.$" diff --git a/data/maps/MauvilleCity_BikeShop/map.json b/data/maps/MauvilleCity_BikeShop/map.json index 98c1fcee1d..488ab5a4ee 100644 --- a/data/maps/MauvilleCity_BikeShop/map.json +++ b/data/maps/MauvilleCity_BikeShop/map.json @@ -24,7 +24,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "MauvilleCity_BikeShop_EventScript_20EBBC", + "script": "MauvilleCity_BikeShop_EventScript_Rydel", "flag": "0" }, { @@ -37,7 +37,7 @@ "movement_range_y": 1, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "MauvilleCity_BikeShop_EventScript_20ED31", + "script": "MauvilleCity_BikeShop_EventScript_Assistant", "flag": "0" } ], @@ -65,7 +65,7 @@ "y": 1, "elevation": 0, "player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY", - "script": "MauvilleCity_BikeShop_EventScript_20ED3A" + "script": "MauvilleCity_BikeShop_EventScript_MachBikeHandbook" }, { "type": "sign", @@ -73,7 +73,7 @@ "y": 1, "elevation": 0, "player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY", - "script": "MauvilleCity_BikeShop_EventScript_20EDAE" + "script": "MauvilleCity_BikeShop_EventScript_AcroBikeHandbook" } ] } \ No newline at end of file diff --git a/data/maps/MauvilleCity_BikeShop/scripts.inc b/data/maps/MauvilleCity_BikeShop/scripts.inc index 4c4afd8e23..f1444e20da 100644 --- a/data/maps/MauvilleCity_BikeShop/scripts.inc +++ b/data/maps/MauvilleCity_BikeShop/scripts.inc @@ -1,203 +1,204 @@ MauvilleCity_BikeShop_MapScripts:: @ 820EBBB .byte 0 -MauvilleCity_BikeShop_EventScript_20EBBC:: @ 820EBBC +MauvilleCity_BikeShop_EventScript_Rydel:: @ 820EBBC lock faceplayer - goto_if_set FLAG_RECEIVED_BIKE, MauvilleCity_BikeShop_EventScript_20EC94 - goto_if_set FLAG_DECLINED_BIKE, MauvilleCity_BikeShop_EventScript_20EBF7 - msgbox MauvilleCity_BikeShop_Text_20EE22, MSGBOX_DEFAULT - msgbox MauvilleCity_BikeShop_Text_20EE99, MSGBOX_YESNO + goto_if_set FLAG_RECEIVED_BIKE, MauvilleCity_BikeShop_EventScript_AskSwitchBikes + goto_if_set FLAG_DECLINED_BIKE, MauvilleCity_BikeShop_EventScript_SkipGreeting + msgbox MauvilleCity_BikeShop_Text_RydelGreeting, MSGBOX_DEFAULT + msgbox MauvilleCity_BikeShop_Text_DidYouComeFromFarAway, MSGBOX_YESNO compare VAR_RESULT, 1 - goto_if_eq MauvilleCity_BikeShop_EventScript_20EC4A + goto_if_eq MauvilleCity_BikeShop_EventScript_YesFar compare VAR_RESULT, 0 - goto_if_eq MauvilleCity_BikeShop_EventScript_20EC3D + goto_if_eq MauvilleCity_BikeShop_EventScript_NotFar end -MauvilleCity_BikeShop_EventScript_20EBF7:: @ 820EBF7 - msgbox MauvilleCity_BikeShop_Text_20EE99, MSGBOX_YESNO +MauvilleCity_BikeShop_EventScript_SkipGreeting:: @ 820EBF7 + msgbox MauvilleCity_BikeShop_Text_DidYouComeFromFarAway, MSGBOX_YESNO compare VAR_RESULT, 1 - goto_if_eq MauvilleCity_BikeShop_EventScript_20EC4A + goto_if_eq MauvilleCity_BikeShop_EventScript_YesFar compare VAR_RESULT, 0 - goto_if_eq MauvilleCity_BikeShop_EventScript_20EC3D + goto_if_eq MauvilleCity_BikeShop_EventScript_NotFar end -MauvilleCity_BikeShop_EventScript_20EC16:: @ 820EC16 - message MauvilleCity_BikeShop_Text_20EF32 +MauvilleCity_BikeShop_EventScript_ChooseBike:: @ 820EC16 + message MauvilleCity_BikeShop_Text_ExplainBikesChooseWhichOne waitmessage multichoice 21, 8, MULTI_BIKE, 1 switch VAR_RESULT - case 0, MauvilleCity_BikeShop_EventScript_20EC53 - case 1, MauvilleCity_BikeShop_EventScript_20EC6D + case 0, MauvilleCity_BikeShop_EventScript_GetMachBike + case 1, MauvilleCity_BikeShop_EventScript_GetAcroBike end -MauvilleCity_BikeShop_EventScript_20EC3D:: @ 820EC3D +MauvilleCity_BikeShop_EventScript_NotFar:: @ 820EC3D setflag FLAG_DECLINED_BIKE - msgbox MauvilleCity_BikeShop_Text_20EEE8, MSGBOX_DEFAULT + msgbox MauvilleCity_BikeShop_Text_GuessYouDontNeedBike, MSGBOX_DEFAULT release end -MauvilleCity_BikeShop_EventScript_20EC4A:: @ 820EC4A +MauvilleCity_BikeShop_EventScript_YesFar:: @ 820EC4A setflag FLAG_RECEIVED_BIKE - goto MauvilleCity_BikeShop_EventScript_20EC16 + goto MauvilleCity_BikeShop_EventScript_ChooseBike end -MauvilleCity_BikeShop_EventScript_20EC53:: @ 820EC53 - msgbox MauvilleCity_BikeShop_Text_20F18D, MSGBOX_DEFAULT +MauvilleCity_BikeShop_EventScript_GetMachBike:: @ 820EC53 + msgbox MauvilleCity_BikeShop_Text_ChoseMachBike, MSGBOX_DEFAULT giveitem_std ITEM_MACH_BIKE - goto MauvilleCity_BikeShop_EventScript_20EC87 + goto MauvilleCity_BikeShop_EventScript_ComeBackToSwitchBikes end -MauvilleCity_BikeShop_EventScript_20EC6D:: @ 820EC6D - msgbox MauvilleCity_BikeShop_Text_20F1A5, MSGBOX_DEFAULT +MauvilleCity_BikeShop_EventScript_GetAcroBike:: @ 820EC6D + msgbox MauvilleCity_BikeShop_Text_ChoseAcroBike, MSGBOX_DEFAULT giveitem_std ITEM_ACRO_BIKE - goto MauvilleCity_BikeShop_EventScript_20EC87 + goto MauvilleCity_BikeShop_EventScript_ComeBackToSwitchBikes end -MauvilleCity_BikeShop_EventScript_20EC87:: @ 820EC87 - msgbox MauvilleCity_BikeShop_Text_20F1BD, MSGBOX_DEFAULT +MauvilleCity_BikeShop_EventScript_ComeBackToSwitchBikes:: @ 820EC87 + msgbox MauvilleCity_BikeShop_Text_ComeBackToSwitchBikes, MSGBOX_DEFAULT special SwapRegisteredBike release end -MauvilleCity_BikeShop_EventScript_20EC94:: @ 820EC94 - msgbox MauvilleCity_BikeShop_Text_20F1FB, MSGBOX_YESNO +MauvilleCity_BikeShop_EventScript_AskSwitchBikes:: @ 820EC94 + msgbox MauvilleCity_BikeShop_Text_WantToSwitchBikes, MSGBOX_YESNO compare VAR_RESULT, 1 - goto_if_eq MauvilleCity_BikeShop_EventScript_20ECB3 + goto_if_eq MauvilleCity_BikeShop_EventScript_SwitchBikes compare VAR_RESULT, 0 - goto_if_eq MauvilleCity_BikeShop_EventScript_20ECE5 + goto_if_eq MauvilleCity_BikeShop_EventScript_KeepBike end -MauvilleCity_BikeShop_EventScript_20ECB3:: @ 820ECB3 - msgbox MauvilleCity_BikeShop_Text_20F22F, MSGBOX_DEFAULT +@ If the player does not have a bike on them Rydel assumes its stored in the PC +MauvilleCity_BikeShop_EventScript_SwitchBikes:: @ 820ECB3 + msgbox MauvilleCity_BikeShop_Text_IllSwitchBikes, MSGBOX_DEFAULT checkitem ITEM_ACRO_BIKE, 1 - compare VAR_RESULT, 1 - goto_if_eq MauvilleCity_BikeShop_EventScript_20ECEF + compare VAR_RESULT, TRUE + goto_if_eq MauvilleCity_BikeShop_EventScript_SwitchAcroForMach checkitem ITEM_MACH_BIKE, 1 - compare VAR_RESULT, 1 - goto_if_eq MauvilleCity_BikeShop_EventScript_20ED10 - msgbox MauvilleCity_BikeShop_Text_20F2F3, MSGBOX_DEFAULT + compare VAR_RESULT, TRUE + goto_if_eq MauvilleCity_BikeShop_EventScript_SwitchMachForAcro + msgbox MauvilleCity_BikeShop_Text_OhYourBikeIsInPC, MSGBOX_DEFAULT release end -MauvilleCity_BikeShop_EventScript_20ECE5:: @ 820ECE5 - msgbox MauvilleCity_BikeShop_Text_20F2C4, MSGBOX_DEFAULT +MauvilleCity_BikeShop_EventScript_KeepBike:: @ 820ECE5 + msgbox MauvilleCity_BikeShop_Text_HappyYouLikeIt, MSGBOX_DEFAULT release end -MauvilleCity_BikeShop_EventScript_20ECEF:: @ 820ECEF +MauvilleCity_BikeShop_EventScript_SwitchAcroForMach:: @ 820ECEF incrementgamestat GAME_STAT_TRADED_BIKES - msgbox MauvilleCity_BikeShop_Text_20F294, MSGBOX_DEFAULT + msgbox MauvilleCity_BikeShop_Text_ExchangedAcroForMach, MSGBOX_DEFAULT takeitem ITEM_ACRO_BIKE, 1 giveitem_std ITEM_MACH_BIKE - goto MauvilleCity_BikeShop_EventScript_20EC87 + goto MauvilleCity_BikeShop_EventScript_ComeBackToSwitchBikes end -MauvilleCity_BikeShop_EventScript_20ED10:: @ 820ED10 +MauvilleCity_BikeShop_EventScript_SwitchMachForAcro:: @ 820ED10 incrementgamestat GAME_STAT_TRADED_BIKES - msgbox MauvilleCity_BikeShop_Text_20F263, MSGBOX_DEFAULT + msgbox MauvilleCity_BikeShop_Text_ExchangedMachForAcro, MSGBOX_DEFAULT takeitem ITEM_MACH_BIKE, 1 giveitem_std ITEM_ACRO_BIKE - goto MauvilleCity_BikeShop_EventScript_20EC87 + goto MauvilleCity_BikeShop_EventScript_ComeBackToSwitchBikes end -MauvilleCity_BikeShop_EventScript_20ED31:: @ 820ED31 - msgbox MauvilleCity_BikeShop_Text_20F3C3, MSGBOX_NPC +MauvilleCity_BikeShop_EventScript_Assistant:: @ 820ED31 + msgbox MauvilleCity_BikeShop_Text_HandbooksAreInBack, MSGBOX_NPC end -MauvilleCity_BikeShop_EventScript_20ED3A:: @ 820ED3A - message MauvilleCity_BikeShop_Text_20F445 +MauvilleCity_BikeShop_EventScript_MachBikeHandbook:: @ 820ED3A + message MauvilleCity_BikeShop_Text_MachHandbookWhichPage waitmessage - goto MauvilleCity_BikeShop_EventScript_20ED46 + goto MauvilleCity_BikeShop_EventScript_ChooseMachHandbookPage end -MauvilleCity_BikeShop_EventScript_20ED46:: @ 820ED46 +MauvilleCity_BikeShop_EventScript_ChooseMachHandbookPage:: @ 820ED46 multichoice 0, 0, MULTI_MACH_BIKE_INFO, 0 switch VAR_RESULT - case 0, MauvilleCity_BikeShop_EventScript_20ED88 - case 1, MauvilleCity_BikeShop_EventScript_20ED94 - case 2, MauvilleCity_BikeShop_EventScript_20EDA0 - case 3, MauvilleCity_BikeShop_EventScript_20EDAC - case MULTI_B_PRESSED, MauvilleCity_BikeShop_EventScript_20EDAC + case 0, MauvilleCity_BikeShop_EventScript_HowToRide + case 1, MauvilleCity_BikeShop_EventScript_HowToTurn + case 2, MauvilleCity_BikeShop_EventScript_SandySlopes + case 3, MauvilleCity_BikeShop_EventScript_ExitMachHandbook + case MULTI_B_PRESSED, MauvilleCity_BikeShop_EventScript_ExitMachHandbook end -MauvilleCity_BikeShop_EventScript_20ED88:: @ 820ED88 - message MauvilleCity_BikeShop_Text_20F487 +MauvilleCity_BikeShop_EventScript_HowToRide:: @ 820ED88 + message MauvilleCity_BikeShop_Text_HowToRideMachBike waitmessage - goto MauvilleCity_BikeShop_EventScript_20ED46 + goto MauvilleCity_BikeShop_EventScript_ChooseMachHandbookPage end -MauvilleCity_BikeShop_EventScript_20ED94:: @ 820ED94 - message MauvilleCity_BikeShop_Text_20F550 +MauvilleCity_BikeShop_EventScript_HowToTurn:: @ 820ED94 + message MauvilleCity_BikeShop_Text_HowToTurnMachBike waitmessage - goto MauvilleCity_BikeShop_EventScript_20ED46 + goto MauvilleCity_BikeShop_EventScript_ChooseMachHandbookPage end -MauvilleCity_BikeShop_EventScript_20EDA0:: @ 820EDA0 - message MauvilleCity_BikeShop_Text_20F61A +MauvilleCity_BikeShop_EventScript_SandySlopes:: @ 820EDA0 + message MauvilleCity_BikeShop_Text_SandySlopes waitmessage - goto MauvilleCity_BikeShop_EventScript_20ED46 + goto MauvilleCity_BikeShop_EventScript_ChooseMachHandbookPage end -MauvilleCity_BikeShop_EventScript_20EDAC:: @ 820EDAC +MauvilleCity_BikeShop_EventScript_ExitMachHandbook:: @ 820EDAC release end -MauvilleCity_BikeShop_EventScript_20EDAE:: @ 820EDAE - message MauvilleCity_BikeShop_Text_20F6ED +MauvilleCity_BikeShop_EventScript_AcroBikeHandbook:: @ 820EDAE + message MauvilleCity_BikeShop_Text_AcroHandbookWhichPage waitmessage - goto MauvilleCity_BikeShop_EventScript_20EDBA + goto MauvilleCity_BikeShop_EventScript_ChooseAcroHandbookPage end -MauvilleCity_BikeShop_EventScript_20EDBA:: @ 820EDBA +MauvilleCity_BikeShop_EventScript_ChooseAcroHandbookPage:: @ 820EDBA multichoice 0, 0, MULTI_ACRO_BIKE_INFO, 0 switch VAR_RESULT - case 0, MauvilleCity_BikeShop_EventScript_20EDFC - case 1, MauvilleCity_BikeShop_EventScript_20EE08 - case 2, MauvilleCity_BikeShop_EventScript_20EE14 - case 3, MauvilleCity_BikeShop_EventScript_20EE20 - case MULTI_B_PRESSED, MauvilleCity_BikeShop_EventScript_20EE20 + case 0, MauvilleCity_BikeShop_EventScript_Wheelies + case 1, MauvilleCity_BikeShop_EventScript_BunnyHops + case 2, MauvilleCity_BikeShop_EventScript_Jumps + case 3, MauvilleCity_BikeShop_EventScript_ExitAcroHandbook + case MULTI_B_PRESSED, MauvilleCity_BikeShop_EventScript_ExitAcroHandbook end -MauvilleCity_BikeShop_EventScript_20EDFC:: @ 820EDFC - message MauvilleCity_BikeShop_Text_20F72F +MauvilleCity_BikeShop_EventScript_Wheelies:: @ 820EDFC + message MauvilleCity_BikeShop_Text_Wheelies waitmessage - goto MauvilleCity_BikeShop_EventScript_20EDBA + goto MauvilleCity_BikeShop_EventScript_ChooseAcroHandbookPage end -MauvilleCity_BikeShop_EventScript_20EE08:: @ 820EE08 - message MauvilleCity_BikeShop_Text_20F7F5 +MauvilleCity_BikeShop_EventScript_BunnyHops:: @ 820EE08 + message MauvilleCity_BikeShop_Text_BunnyHops waitmessage - goto MauvilleCity_BikeShop_EventScript_20EDBA + goto MauvilleCity_BikeShop_EventScript_ChooseAcroHandbookPage end -MauvilleCity_BikeShop_EventScript_20EE14:: @ 820EE14 - message MauvilleCity_BikeShop_Text_20F898 +MauvilleCity_BikeShop_EventScript_Jumps:: @ 820EE14 + message MauvilleCity_BikeShop_Text_Jumps waitmessage - goto MauvilleCity_BikeShop_EventScript_20EDBA + goto MauvilleCity_BikeShop_EventScript_ChooseAcroHandbookPage end -MauvilleCity_BikeShop_EventScript_20EE20:: @ 820EE20 +MauvilleCity_BikeShop_EventScript_ExitAcroHandbook:: @ 820EE20 release end -MauvilleCity_BikeShop_Text_20EE22: @ 820EE22 +MauvilleCity_BikeShop_Text_RydelGreeting: @ 820EE22 .string "Well, well, what have we here?\n" .string "A most energetic customer!\p" .string "Me? You may call me RYDEL.\n" .string "I'm the owner of this cycle shop.$" -MauvilleCity_BikeShop_Text_20EE99: @ 820EE99 +MauvilleCity_BikeShop_Text_DidYouComeFromFarAway: @ 820EE99 .string "RYDEL: Your RUNNING SHOES…\n" .string "They're awfully filthy.\p" .string "Did you come from far away?$" -MauvilleCity_BikeShop_Text_20EEE8: @ 820EEE8 +MauvilleCity_BikeShop_Text_GuessYouDontNeedBike: @ 820EEE8 .string "RYDEL: Is that right?\p" .string "Then, I guess you have no need for\n" .string "any of my BIKES.$" -MauvilleCity_BikeShop_Text_20EF32: @ 820EF32 +MauvilleCity_BikeShop_Text_ExplainBikesChooseWhichOne: @ 820EF32 .string "RYDEL: Hm, hm… … … … …\p" .string "You're saying that you came all this\n" .string "way from LITTLEROOT?\p" @@ -221,37 +222,37 @@ MauvilleCity_BikeShop_Text_20EF32: @ 820EF32 .string "have whichever one you like!\p" .string "Which one will you choose?$" -MauvilleCity_BikeShop_Text_20F18D: @ 820F18D +MauvilleCity_BikeShop_Text_ChoseMachBike: @ 820F18D .string "{PLAYER} chose the MACH BIKE.$" -MauvilleCity_BikeShop_Text_20F1A5: @ 820F1A5 +MauvilleCity_BikeShop_Text_ChoseAcroBike: @ 820F1A5 .string "{PLAYER} chose the ACRO BIKE.$" -MauvilleCity_BikeShop_Text_20F1BD: @ 820F1BD +MauvilleCity_BikeShop_Text_ComeBackToSwitchBikes: @ 820F1BD .string "RYDEL: If you get the urge to switch\n" .string "BIKES, just come see me!$" -MauvilleCity_BikeShop_Text_20F1FB: @ 820F1FB +MauvilleCity_BikeShop_Text_WantToSwitchBikes: @ 820F1FB .string "RYDEL: Oh? Were you thinking about\n" .string "switching BIKES?$" -MauvilleCity_BikeShop_Text_20F22F: @ 820F22F +MauvilleCity_BikeShop_Text_IllSwitchBikes: @ 820F22F .string "RYDEL: Okay, no problem!\n" .string "I'll switch BIKES for you!$" -MauvilleCity_BikeShop_Text_20F263: @ 820F263 +MauvilleCity_BikeShop_Text_ExchangedMachForAcro: @ 820F263 .string "{PLAYER} got the MACH BIKE exchanged\n" .string "for an ACRO BIKE.$" -MauvilleCity_BikeShop_Text_20F294: @ 820F294 +MauvilleCity_BikeShop_Text_ExchangedAcroForMach: @ 820F294 .string "{PLAYER} got the ACRO BIKE exchanged\n" .string "for a MACH BIKE.$" -MauvilleCity_BikeShop_Text_20F2C4: @ 820F2C4 +MauvilleCity_BikeShop_Text_HappyYouLikeIt: @ 820F2C4 .string "RYDEL: Good, good!\n" .string "I'm happy that you like it!$" -MauvilleCity_BikeShop_Text_20F2F3: @ 820F2F3 +MauvilleCity_BikeShop_Text_OhYourBikeIsInPC: @ 820F2F3 .string "Oh? What happened to that BIKE\n" .string "I gave you?\p" .string "Oh, I get it, you stored it using your PC.\p" @@ -260,18 +261,18 @@ MauvilleCity_BikeShop_Text_20F2F3: @ 820F2F3 .string "May the wind always be at your back\n" .string "on your adventure!$" -MauvilleCity_BikeShop_Text_20F3C3: @ 820F3C3 +MauvilleCity_BikeShop_Text_HandbooksAreInBack: @ 820F3C3 .string "I'm learning about BIKES while\n" .string "I work here.\p" .string "If you need advice on how to ride your\n" .string "BIKE, there're a couple handbooks in\l" .string "the back.$" -MauvilleCity_BikeShop_Text_20F445: @ 820F445 +MauvilleCity_BikeShop_Text_MachHandbookWhichPage: @ 820F445 .string "It's a handbook on the MACH BIKE.\p" .string "Which page do you want to read?$" -MauvilleCity_BikeShop_Text_20F487: @ 820F487 +MauvilleCity_BikeShop_Text_HowToRideMachBike: @ 820F487 .string "A BIKE moves in the direction that\n" .string "the + Control Pad is pressed.\p" .string "It will speed up once it gets rolling.\p" @@ -279,7 +280,7 @@ MauvilleCity_BikeShop_Text_20F487: @ 820F487 .string "The BIKE will slow to a stop.\p" .string "Want to read a different page?$" -MauvilleCity_BikeShop_Text_20F550: @ 820F550 +MauvilleCity_BikeShop_Text_HowToTurnMachBike: @ 820F550 .string "A MACH BIKE is speedy, but it can't\n" .string "stop very quickly.\p" .string "It gets a little tricky to get around\n" @@ -288,7 +289,7 @@ MauvilleCity_BikeShop_Text_20F550: @ 820F550 .string "before the corner and slow down.\p" .string "Want to read a different page?$" -MauvilleCity_BikeShop_Text_20F61A: @ 820F61A +MauvilleCity_BikeShop_Text_SandySlopes: @ 820F61A .string "There are small sandy slopes\n" .string "throughout the HOENN region.\p" .string "The loose, crumbly sand makes it\n" @@ -297,11 +298,11 @@ MauvilleCity_BikeShop_Text_20F61A: @ 820F61A .string "zip up a sandy slope.\p" .string "Want to read a different page?$" -MauvilleCity_BikeShop_Text_20F6ED: @ 820F6ED +MauvilleCity_BikeShop_Text_AcroHandbookWhichPage: @ 820F6ED .string "It's a handbook on the ACRO BIKE.\p" .string "Which page do you want to read?$" -MauvilleCity_BikeShop_Text_20F72F: @ 820F72F +MauvilleCity_BikeShop_Text_Wheelies: @ 820F72F .string "Press the B Button while riding,\n" .string "and the front wheel lifts up.\p" .string "You can zip around with the front\n" @@ -309,14 +310,14 @@ MauvilleCity_BikeShop_Text_20F72F: @ 820F72F .string "This technique is called a wheelie.\p" .string "Want to read a different page?$" -MauvilleCity_BikeShop_Text_20F7F5: @ 820F7F5 +MauvilleCity_BikeShop_Text_BunnyHops: @ 820F7F5 .string "Keeping the B Button pressed,\n" .string "your BIKE can hop on the spot.\p" .string "This technique is called a bunny hop.\p" .string "You can ride while hopping, too.\p" .string "Want to read a different page?$" -MauvilleCity_BikeShop_Text_20F898: @ 820F898 +MauvilleCity_BikeShop_Text_Jumps: @ 820F898 .string "Press the B Button and the + Control\n" .string "Pad at the same time to jump.\p" .string "Press the + Control Pad to the side\n" diff --git a/data/maps/Route104_MrBrineysHouse/map.json b/data/maps/Route104_MrBrineysHouse/map.json index 438d56b307..dc6c0ab4dd 100644 --- a/data/maps/Route104_MrBrineysHouse/map.json +++ b/data/maps/Route104_MrBrineysHouse/map.json @@ -24,7 +24,7 @@ "movement_range_y": 3, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "Route104_MrBrineysHouse_EventScript_229D67", + "script": "Route104_MrBrineysHouse_EventScript_Briney", "flag": "FLAG_HIDE_BRINEYS_HOUSE_MR_BRINEY" }, { @@ -37,7 +37,7 @@ "movement_range_y": 3, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "Route104_MrBrineysHouse_EventScript_229E5D", + "script": "Route104_MrBrineysHouse_EventScript_Peeko", "flag": "FLAG_HIDE_BRINEYS_HOUSE_PEEKO" } ], diff --git a/data/maps/Route104_MrBrineysHouse/scripts.inc b/data/maps/Route104_MrBrineysHouse/scripts.inc index 68fe98ffdf..50cc3dd7e7 100644 --- a/data/maps/Route104_MrBrineysHouse/scripts.inc +++ b/data/maps/Route104_MrBrineysHouse/scripts.inc @@ -5,75 +5,75 @@ Route104_MrBrineysHouse_MapScripts:: @ 8229D2E Route104_MrBrineysHouse_OnTransition: @ 8229D34 setflag FLAG_LANDMARK_MR_BRINEY_HOUSE compare VAR_BRINEY_HOUSE_STATE, 1 - call_if_eq Route104_MrBrineysHouse_EventScript_229D50 - call_if_set FLAG_RECEIVED_POKENAV, Route104_MrBrineysHouse_EventScript_229D4C + call_if_eq Route104_MrBrineysHouse_EventScript_SetBrineyPeekoPos + call_if_set FLAG_RECEIVED_POKENAV, Route104_MrBrineysHouse_EventScript_HideRustboroRival end -Route104_MrBrineysHouse_EventScript_229D4C:: @ 8229D4C +Route104_MrBrineysHouse_EventScript_HideRustboroRival:: @ 8229D4C setflag FLAG_HIDE_RUSBORO_CITY_RIVAL return -Route104_MrBrineysHouse_EventScript_229D50:: @ 8229D50 +Route104_MrBrineysHouse_EventScript_SetBrineyPeekoPos:: @ 8229D50 setobjectxyperm 1, 9, 3 setobjectmovementtype 1, MOVEMENT_TYPE_WALK_SEQUENCE_DOWN_LEFT_UP_RIGHT setobjectxyperm 2, 9, 6 setobjectmovementtype 2, MOVEMENT_TYPE_WALK_SEQUENCE_LEFT_UP_RIGHT_DOWN return -Route104_MrBrineysHouse_EventScript_229D67:: @ 8229D67 +Route104_MrBrineysHouse_EventScript_Briney:: @ 8229D67 lock faceplayer - call_if_unset FLAG_MR_BRINEY_SAILING_INTRO, Route104_MrBrineysHouse_EventScript_229D8A - goto_if_unset FLAG_DELIVERED_STEVEN_LETTER, Route104_MrBrineysHouse_EventScript_229DE1 - goto_if_unset FLAG_DELIVERED_DEVON_GOODS, Route104_MrBrineysHouse_EventScript_229DFA - goto Route104_MrBrineysHouse_EventScript_229DAE + call_if_unset FLAG_MR_BRINEY_SAILING_INTRO, Route104_MrBrineysHouse_EventScript_SailingIntro + goto_if_unset FLAG_DELIVERED_STEVEN_LETTER, Route104_MrBrineysHouse_EventScript_SailBothDeliveries + goto_if_unset FLAG_DELIVERED_DEVON_GOODS, Route104_MrBrineysHouse_EventScript_SailDeliverPackage + goto Route104_MrBrineysHouse_EventScript_WhereAreWeBound end -Route104_MrBrineysHouse_EventScript_229D8A:: @ 8229D8A +Route104_MrBrineysHouse_EventScript_SailingIntro:: @ 8229D8A setflag FLAG_MR_BRINEY_SAILING_INTRO - msgbox Route104_MrBrineysHouse_Text_229E70, MSGBOX_DEFAULT - msgbox Route104_MrBrineysHouse_Text_229E9B, MSGBOX_YESNO + msgbox Route104_MrBrineysHouse_Text_WaitUpPeeko, MSGBOX_DEFAULT + msgbox Route104_MrBrineysHouse_Text_ItsYouLetsSailToDewford, MSGBOX_YESNO compare VAR_RESULT, 0 - goto_if_eq Route104_MrBrineysHouse_EventScript_229E13 - goto Route104_MrBrineysHouse_EventScript_229E27 + goto_if_eq Route104_MrBrineysHouse_EventScript_DeclineDeliverySailing + goto Route104_MrBrineysHouse_EventScript_SailToDewford end -Route104_MrBrineysHouse_EventScript_229DAE:: @ 8229DAE - message Route104_MrBrineysHouse_Text_22A268 +Route104_MrBrineysHouse_EventScript_WhereAreWeBound:: @ 8229DAE + message Route104_MrBrineysHouse_Text_WhereAreWeBound waitmessage multichoicedefault 20, 8, MULTI_BRINEY_OFF_DEWFORD, 1, 0 switch VAR_RESULT - case 0, Route104_MrBrineysHouse_EventScript_229E27 - case 1, Route104_MrBrineysHouse_EventScript_229E1D - case MULTI_B_PRESSED, Route104_MrBrineysHouse_EventScript_229E1D + case 0, Route104_MrBrineysHouse_EventScript_SailToDewford + case 1, Route104_MrBrineysHouse_EventScript_DeclineSailing + case MULTI_B_PRESSED, Route104_MrBrineysHouse_EventScript_DeclineSailing end -Route104_MrBrineysHouse_EventScript_229DE1:: @ 8229DE1 - msgbox Route104_MrBrineysHouse_Text_22A0AD, MSGBOX_YESNO +Route104_MrBrineysHouse_EventScript_SailBothDeliveries:: @ 8229DE1 + msgbox Route104_MrBrineysHouse_Text_NeedToMakeDeliveriesSailToDewford, MSGBOX_YESNO compare VAR_RESULT, 0 - goto_if_eq Route104_MrBrineysHouse_EventScript_229E13 - goto Route104_MrBrineysHouse_EventScript_229E27 + goto_if_eq Route104_MrBrineysHouse_EventScript_DeclineDeliverySailing + goto Route104_MrBrineysHouse_EventScript_SailToDewford end -Route104_MrBrineysHouse_EventScript_229DFA:: @ 8229DFA - msgbox Route104_MrBrineysHouse_Text_22A18F, MSGBOX_YESNO +Route104_MrBrineysHouse_EventScript_SailDeliverPackage:: @ 8229DFA + msgbox Route104_MrBrineysHouse_Text_NeedToDeliverPackageSailToDewford, MSGBOX_YESNO compare VAR_RESULT, 0 - goto_if_eq Route104_MrBrineysHouse_EventScript_229E13 - goto Route104_MrBrineysHouse_EventScript_229E27 + goto_if_eq Route104_MrBrineysHouse_EventScript_DeclineDeliverySailing + goto Route104_MrBrineysHouse_EventScript_SailToDewford end -Route104_MrBrineysHouse_EventScript_229E13:: @ 8229E13 - msgbox Route104_MrBrineysHouse_Text_22A041, MSGBOX_DEFAULT +Route104_MrBrineysHouse_EventScript_DeclineDeliverySailing:: @ 8229E13 + msgbox Route104_MrBrineysHouse_Text_DeclineDeliverySail, MSGBOX_DEFAULT release end -Route104_MrBrineysHouse_EventScript_229E1D:: @ 8229E1D - msgbox Route104_MrBrineysHouse_Text_22A2C3, MSGBOX_DEFAULT +Route104_MrBrineysHouse_EventScript_DeclineSailing:: @ 8229E1D + msgbox Route104_MrBrineysHouse_Text_TellMeWheneverYouWantToSail, MSGBOX_DEFAULT release end -Route104_MrBrineysHouse_EventScript_229E27:: @ 8229E27 - msgbox Route104_MrBrineysHouse_Text_229FE9, MSGBOX_DEFAULT +Route104_MrBrineysHouse_EventScript_SailToDewford:: @ 8229E27 + msgbox Route104_MrBrineysHouse_Text_SetSailForDewford, MSGBOX_DEFAULT call EventScript_BackupMrBrineyLocation setvar VAR_BOARD_BRINEY_BOAT_STATE, 1 clearflag FLAG_HIDE_ROUTE_104_MR_BRINEY @@ -88,21 +88,21 @@ Route104_MrBrineysHouse_EventScript_229E27:: @ 8229E27 releaseall end -Route104_MrBrineysHouse_EventScript_229E5D:: @ 8229E5D +Route104_MrBrineysHouse_EventScript_Peeko:: @ 8229E5D lock faceplayer waitse playmoncry SPECIES_WINGULL, 0 - msgbox Route104_MrBrineysHouse_Text_22A337, MSGBOX_DEFAULT + msgbox Route104_MrBrineysHouse_Text_Peeko, MSGBOX_DEFAULT waitmoncry release end -Route104_MrBrineysHouse_Text_229E70: @ 8229E70 +Route104_MrBrineysHouse_Text_WaitUpPeeko: @ 8229E70 .string "MR. BRINEY: Hold on, lass!\n" .string "Wait up, PEEKO!$" -Route104_MrBrineysHouse_Text_229E9B: @ 8229E9B +Route104_MrBrineysHouse_Text_ItsYouLetsSailToDewford: @ 8229E9B .string "Hm? You're {PLAYER}{KUN}!\n" .string "You saved my darling PEEKO!\l" .string "We owe so much to you!\p" @@ -117,18 +117,18 @@ Route104_MrBrineysHouse_Text_229E9B: @ 8229E9B .string "You've come to the right man!\n" .string "We'll set sail for DEWFORD.$" -Route104_MrBrineysHouse_Text_229FE9: @ 8229FE9 +Route104_MrBrineysHouse_Text_SetSailForDewford: @ 8229FE9 .string "MR. BRINEY: DEWFORD it is, then!\p" .string "Anchors aweigh!\n" .string "PEEKO, we're setting sail, my darling!$" -Route104_MrBrineysHouse_Text_22A041: @ 822A041 +Route104_MrBrineysHouse_Text_DeclineDeliverySail: @ 822A041 .string "MR. BRINEY: Is that so?\n" .string "Your deliveries can wait?\p" .string "You just go on and tell me whenever\n" .string "you want to set sail!$" -Route104_MrBrineysHouse_Text_22A0AD: @ 822A0AD +Route104_MrBrineysHouse_Text_NeedToMakeDeliveriesSailToDewford: @ 822A0AD .string "MR. BRINEY: Ahoy!\n" .string "I know exactly what you want to say!\p" .string "You're to deliver a LETTER to DEWFORD\n" @@ -137,7 +137,7 @@ Route104_MrBrineysHouse_Text_22A0AD: @ 822A0AD .string "at all--I'm the man for the job!\p" .string "First, we'll set sail for DEWFORD.$" -Route104_MrBrineysHouse_Text_22A18F: @ 822A18F +Route104_MrBrineysHouse_Text_NeedToDeliverPackageSailToDewford: @ 822A18F .string "MR. BRINEY: Ahoy!\n" .string "I know exactly what you want to say!\p" .string "You're to deliver a package to\n" @@ -146,17 +146,17 @@ Route104_MrBrineysHouse_Text_22A18F: @ 822A18F .string "at all--I'm the man for the job!\p" .string "First, we'll set sail for DEWFORD.$" -Route104_MrBrineysHouse_Text_22A268: @ 822A268 +Route104_MrBrineysHouse_Text_WhereAreWeBound: @ 822A268 .string "MR. BRINEY: Ahoy!\n" .string "For you, I'll go out to sea anytime!\p" .string "Now, my friend, where are we bound?$" -Route104_MrBrineysHouse_Text_22A2C3: @ 822A2C3 +Route104_MrBrineysHouse_Text_TellMeWheneverYouWantToSail: @ 822A2C3 .string "MR. BRINEY: Is that so?\n" .string "Well, PEEKO owes her life to you.\p" .string "You just go on and tell me whenever\n" .string "you want to set sail!$" -Route104_MrBrineysHouse_Text_22A337: @ 822A337 +Route104_MrBrineysHouse_Text_Peeko: @ 822A337 .string "PEEKO: Pii piihyoro!$" diff --git a/data/maps/Route124_DivingTreasureHuntersHouse/map.json b/data/maps/Route124_DivingTreasureHuntersHouse/map.json index 2b61cd6fa6..c8ec142f2b 100644 --- a/data/maps/Route124_DivingTreasureHuntersHouse/map.json +++ b/data/maps/Route124_DivingTreasureHuntersHouse/map.json @@ -24,7 +24,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "Route124_DivingTreasureHuntersHouse_EventScript_270A32", + "script": "Route124_DivingTreasureHuntersHouse_EventScript_TreasureHunter", "flag": "0" } ], @@ -52,7 +52,7 @@ "y": 1, "elevation": 0, "player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY", - "script": "Route124_DivingTreasureHuntersHouse_EventScript_270F63" + "script": "Route124_DivingTreasureHuntersHouse_EventScript_ShardTradeBoard" } ] } \ No newline at end of file diff --git a/data/maps/Route124_DivingTreasureHuntersHouse/scripts.inc b/data/maps/Route124_DivingTreasureHuntersHouse/scripts.inc index 0fa59783df..c605c7df87 100644 --- a/data/maps/Route124_DivingTreasureHuntersHouse/scripts.inc +++ b/data/maps/Route124_DivingTreasureHuntersHouse/scripts.inc @@ -6,338 +6,338 @@ Route124_DivingTreasureHuntersHouse_OnTransition: @ 8270A2E setflag FLAG_LANDMARK_HUNTERS_HOUSE end -Route124_DivingTreasureHuntersHouse_EventScript_270A32:: @ 8270A32 +Route124_DivingTreasureHuntersHouse_EventScript_TreasureHunter:: @ 8270A32 lock faceplayer - goto_if_set FLAG_MET_DIVING_TREASURE_HUNTER, Route124_DivingTreasureHuntersHouse_EventScript_270A4E - msgbox Route124_DivingTreasureHuntersHouse_Text_270F6C, MSGBOX_DEFAULT + goto_if_set FLAG_MET_DIVING_TREASURE_HUNTER, Route124_DivingTreasureHuntersHouse_EventScript_SkipGreeting + msgbox Route124_DivingTreasureHuntersHouse_Text_Greeting, MSGBOX_DEFAULT setflag FLAG_MET_DIVING_TREASURE_HUNTER - goto Route124_DivingTreasureHuntersHouse_EventScript_270A5C + goto Route124_DivingTreasureHuntersHouse_EventScript_CheckPlayerHasShard end -Route124_DivingTreasureHuntersHouse_EventScript_270A4E:: @ 8270A4E - msgbox Route124_DivingTreasureHuntersHouse_Text_270FE5, MSGBOX_DEFAULT - goto Route124_DivingTreasureHuntersHouse_EventScript_270A5C +Route124_DivingTreasureHuntersHouse_EventScript_SkipGreeting:: @ 8270A4E + msgbox Route124_DivingTreasureHuntersHouse_Text_HaveYouSeenAnyShards, MSGBOX_DEFAULT + goto Route124_DivingTreasureHuntersHouse_EventScript_CheckPlayerHasShard end -Route124_DivingTreasureHuntersHouse_EventScript_270A5C:: @ 8270A5C - call Route124_DivingTreasureHuntersHouse_EventScript_270A72 +Route124_DivingTreasureHuntersHouse_EventScript_CheckPlayerHasShard:: @ 8270A5C + call Route124_DivingTreasureHuntersHouse_EventScript_GetPlayersShards compare VAR_TEMP_1, 0 - goto_if_eq Route124_DivingTreasureHuntersHouse_EventScript_270F57 - goto Route124_DivingTreasureHuntersHouse_EventScript_270AD0 + goto_if_eq Route124_DivingTreasureHuntersHouse_EventScript_NoShards + goto Route124_DivingTreasureHuntersHouse_EventScript_HasShard end -Route124_DivingTreasureHuntersHouse_EventScript_270A72:: @ 8270A72 +Route124_DivingTreasureHuntersHouse_EventScript_GetPlayersShards:: @ 8270A72 setvar VAR_TEMP_1, 0 checkitem ITEM_RED_SHARD, 1 - compare VAR_RESULT, 1 - call_if_eq Route124_DivingTreasureHuntersHouse_EventScript_270AB8 + compare VAR_RESULT, TRUE + call_if_eq Route124_DivingTreasureHuntersHouse_EventScript_HasRedShard checkitem ITEM_YELLOW_SHARD, 1 - compare VAR_RESULT, 1 - call_if_eq Route124_DivingTreasureHuntersHouse_EventScript_270ABE + compare VAR_RESULT, TRUE + call_if_eq Route124_DivingTreasureHuntersHouse_EventScript_HasYellowShard checkitem ITEM_BLUE_SHARD, 1 - compare VAR_RESULT, 1 - call_if_eq Route124_DivingTreasureHuntersHouse_EventScript_270AC4 + compare VAR_RESULT, TRUE + call_if_eq Route124_DivingTreasureHuntersHouse_EventScript_HasBlueShard checkitem ITEM_GREEN_SHARD, 1 - compare VAR_RESULT, 1 - call_if_eq Route124_DivingTreasureHuntersHouse_EventScript_270ACA + compare VAR_RESULT, TRUE + call_if_eq Route124_DivingTreasureHuntersHouse_EventScript_HasGreenShard return -Route124_DivingTreasureHuntersHouse_EventScript_270AB8:: @ 8270AB8 +Route124_DivingTreasureHuntersHouse_EventScript_HasRedShard:: @ 8270AB8 addvar VAR_TEMP_1, 1 return -Route124_DivingTreasureHuntersHouse_EventScript_270ABE:: @ 8270ABE +Route124_DivingTreasureHuntersHouse_EventScript_HasYellowShard:: @ 8270ABE addvar VAR_TEMP_1, 2 return -Route124_DivingTreasureHuntersHouse_EventScript_270AC4:: @ 8270AC4 +Route124_DivingTreasureHuntersHouse_EventScript_HasBlueShard:: @ 8270AC4 addvar VAR_TEMP_1, 4 return -Route124_DivingTreasureHuntersHouse_EventScript_270ACA:: @ 8270ACA +Route124_DivingTreasureHuntersHouse_EventScript_HasGreenShard:: @ 8270ACA addvar VAR_TEMP_1, 8 return -Route124_DivingTreasureHuntersHouse_EventScript_270AD0:: @ 8270AD0 - msgbox Route124_DivingTreasureHuntersHouse_Text_271098, MSGBOX_DEFAULT - goto Route124_DivingTreasureHuntersHouse_EventScript_270ADE +Route124_DivingTreasureHuntersHouse_EventScript_HasShard:: @ 8270AD0 + msgbox Route124_DivingTreasureHuntersHouse_Text_ThatsAShardIllTradeYou, MSGBOX_DEFAULT + goto Route124_DivingTreasureHuntersHouse_EventScript_ShowTradeOptions end -Route124_DivingTreasureHuntersHouse_EventScript_270ADE:: @ 8270ADE - message Route124_DivingTreasureHuntersHouse_Text_271117 +Route124_DivingTreasureHuntersHouse_EventScript_ShowTradeOptions:: @ 8270ADE + message Route124_DivingTreasureHuntersHouse_Text_WhatDoYouWantToTrade waitmessage switch VAR_TEMP_1 - case 1, Route124_DivingTreasureHuntersHouse_EventScript_270B8F - case 2, Route124_DivingTreasureHuntersHouse_EventScript_270BB5 - case 3, Route124_DivingTreasureHuntersHouse_EventScript_270BDB - case 4, Route124_DivingTreasureHuntersHouse_EventScript_270C0C - case 5, Route124_DivingTreasureHuntersHouse_EventScript_270C32 - case 6, Route124_DivingTreasureHuntersHouse_EventScript_270C63 - case 7, Route124_DivingTreasureHuntersHouse_EventScript_270C94 - case 8, Route124_DivingTreasureHuntersHouse_EventScript_270CD0 - case 9, Route124_DivingTreasureHuntersHouse_EventScript_270CF6 - case 10, Route124_DivingTreasureHuntersHouse_EventScript_270D27 - case 11, Route124_DivingTreasureHuntersHouse_EventScript_270D58 - case 12, Route124_DivingTreasureHuntersHouse_EventScript_270D94 - case 13, Route124_DivingTreasureHuntersHouse_EventScript_270DC5 - case 14, Route124_DivingTreasureHuntersHouse_EventScript_270E01 - case 15, Route124_DivingTreasureHuntersHouse_EventScript_270E3D + case 1, Route124_DivingTreasureHuntersHouse_EventScript_ShardOptionsR + case 2, Route124_DivingTreasureHuntersHouse_EventScript_ShardOptionsY + case 3, Route124_DivingTreasureHuntersHouse_EventScript_ShardOptionsRY + case 4, Route124_DivingTreasureHuntersHouse_EventScript_ShardOptionsB + case 5, Route124_DivingTreasureHuntersHouse_EventScript_ShardOptionsRB + case 6, Route124_DivingTreasureHuntersHouse_EventScript_ShardOptionsYB + case 7, Route124_DivingTreasureHuntersHouse_EventScript_ShardOptionsRYB + case 8, Route124_DivingTreasureHuntersHouse_EventScript_ShardOptionsG + case 9, Route124_DivingTreasureHuntersHouse_EventScript_ShardOptionsRG + case 10, Route124_DivingTreasureHuntersHouse_EventScript_ShardOptionsYG + case 11, Route124_DivingTreasureHuntersHouse_EventScript_ShardOptionsRYG + case 12, Route124_DivingTreasureHuntersHouse_EventScript_ShardOptionsBG + case 13, Route124_DivingTreasureHuntersHouse_EventScript_ShardOptionsRBG + case 14, Route124_DivingTreasureHuntersHouse_EventScript_ShardOptionsYBG + case 15, Route124_DivingTreasureHuntersHouse_EventScript_ShardOptionsRYBG end -Route124_DivingTreasureHuntersHouse_EventScript_270B8F:: @ 8270B8F +Route124_DivingTreasureHuntersHouse_EventScript_ShardOptionsR:: @ 8270B8F multichoice 0, 0, MULTI_SHARDS_R, 0 switch VAR_RESULT - case 0, Route124_DivingTreasureHuntersHouse_EventScript_270E84 - case 1, Route124_DivingTreasureHuntersHouse_EventScript_270F4D - goto Route124_DivingTreasureHuntersHouse_EventScript_270F4D + case 0, Route124_DivingTreasureHuntersHouse_EventScript_TradeRedShard + case 1, Route124_DivingTreasureHuntersHouse_EventScript_DeclineTrade + goto Route124_DivingTreasureHuntersHouse_EventScript_DeclineTrade end -Route124_DivingTreasureHuntersHouse_EventScript_270BB5:: @ 8270BB5 +Route124_DivingTreasureHuntersHouse_EventScript_ShardOptionsY:: @ 8270BB5 multichoice 0, 0, MULTI_SHARDS_Y, 0 switch VAR_RESULT - case 0, Route124_DivingTreasureHuntersHouse_EventScript_270E93 - case 1, Route124_DivingTreasureHuntersHouse_EventScript_270F4D - goto Route124_DivingTreasureHuntersHouse_EventScript_270F4D + case 0, Route124_DivingTreasureHuntersHouse_EventScript_TradeYellowShard + case 1, Route124_DivingTreasureHuntersHouse_EventScript_DeclineTrade + goto Route124_DivingTreasureHuntersHouse_EventScript_DeclineTrade end -Route124_DivingTreasureHuntersHouse_EventScript_270BDB:: @ 8270BDB +Route124_DivingTreasureHuntersHouse_EventScript_ShardOptionsRY:: @ 8270BDB multichoice 0, 0, MULTI_SHARDS_RY, 0 switch VAR_RESULT - case 0, Route124_DivingTreasureHuntersHouse_EventScript_270E84 - case 1, Route124_DivingTreasureHuntersHouse_EventScript_270E93 - case 2, Route124_DivingTreasureHuntersHouse_EventScript_270F4D - goto Route124_DivingTreasureHuntersHouse_EventScript_270F4D + case 0, Route124_DivingTreasureHuntersHouse_EventScript_TradeRedShard + case 1, Route124_DivingTreasureHuntersHouse_EventScript_TradeYellowShard + case 2, Route124_DivingTreasureHuntersHouse_EventScript_DeclineTrade + goto Route124_DivingTreasureHuntersHouse_EventScript_DeclineTrade end -Route124_DivingTreasureHuntersHouse_EventScript_270C0C:: @ 8270C0C +Route124_DivingTreasureHuntersHouse_EventScript_ShardOptionsB:: @ 8270C0C multichoice 0, 0, MULTI_SHARDS_B, 0 switch VAR_RESULT - case 0, Route124_DivingTreasureHuntersHouse_EventScript_270EA2 - case 1, Route124_DivingTreasureHuntersHouse_EventScript_270F4D - goto Route124_DivingTreasureHuntersHouse_EventScript_270F4D + case 0, Route124_DivingTreasureHuntersHouse_EventScript_TradeBlueShard + case 1, Route124_DivingTreasureHuntersHouse_EventScript_DeclineTrade + goto Route124_DivingTreasureHuntersHouse_EventScript_DeclineTrade end -Route124_DivingTreasureHuntersHouse_EventScript_270C32:: @ 8270C32 +Route124_DivingTreasureHuntersHouse_EventScript_ShardOptionsRB:: @ 8270C32 multichoice 0, 0, MULTI_SHARDS_RB, 0 switch VAR_RESULT - case 0, Route124_DivingTreasureHuntersHouse_EventScript_270E84 - case 1, Route124_DivingTreasureHuntersHouse_EventScript_270EA2 - case 2, Route124_DivingTreasureHuntersHouse_EventScript_270F4D - goto Route124_DivingTreasureHuntersHouse_EventScript_270F4D + case 0, Route124_DivingTreasureHuntersHouse_EventScript_TradeRedShard + case 1, Route124_DivingTreasureHuntersHouse_EventScript_TradeBlueShard + case 2, Route124_DivingTreasureHuntersHouse_EventScript_DeclineTrade + goto Route124_DivingTreasureHuntersHouse_EventScript_DeclineTrade end -Route124_DivingTreasureHuntersHouse_EventScript_270C63:: @ 8270C63 +Route124_DivingTreasureHuntersHouse_EventScript_ShardOptionsYB:: @ 8270C63 multichoice 0, 0, MULTI_SHARDS_YB, 0 switch VAR_RESULT - case 0, Route124_DivingTreasureHuntersHouse_EventScript_270E93 - case 1, Route124_DivingTreasureHuntersHouse_EventScript_270EA2 - case 2, Route124_DivingTreasureHuntersHouse_EventScript_270F4D - goto Route124_DivingTreasureHuntersHouse_EventScript_270F4D + case 0, Route124_DivingTreasureHuntersHouse_EventScript_TradeYellowShard + case 1, Route124_DivingTreasureHuntersHouse_EventScript_TradeBlueShard + case 2, Route124_DivingTreasureHuntersHouse_EventScript_DeclineTrade + goto Route124_DivingTreasureHuntersHouse_EventScript_DeclineTrade end -Route124_DivingTreasureHuntersHouse_EventScript_270C94:: @ 8270C94 +Route124_DivingTreasureHuntersHouse_EventScript_ShardOptionsRYB:: @ 8270C94 multichoice 0, 0, MULTI_SHARDS_RYB, 0 switch VAR_RESULT - case 0, Route124_DivingTreasureHuntersHouse_EventScript_270E84 - case 1, Route124_DivingTreasureHuntersHouse_EventScript_270E93 - case 2, Route124_DivingTreasureHuntersHouse_EventScript_270EA2 - case 3, Route124_DivingTreasureHuntersHouse_EventScript_270F4D - goto Route124_DivingTreasureHuntersHouse_EventScript_270F4D + case 0, Route124_DivingTreasureHuntersHouse_EventScript_TradeRedShard + case 1, Route124_DivingTreasureHuntersHouse_EventScript_TradeYellowShard + case 2, Route124_DivingTreasureHuntersHouse_EventScript_TradeBlueShard + case 3, Route124_DivingTreasureHuntersHouse_EventScript_DeclineTrade + goto Route124_DivingTreasureHuntersHouse_EventScript_DeclineTrade end -Route124_DivingTreasureHuntersHouse_EventScript_270CD0:: @ 8270CD0 +Route124_DivingTreasureHuntersHouse_EventScript_ShardOptionsG:: @ 8270CD0 multichoice 0, 0, MULTI_SHARDS_G, 0 switch VAR_RESULT - case 0, Route124_DivingTreasureHuntersHouse_EventScript_270EB1 - case 1, Route124_DivingTreasureHuntersHouse_EventScript_270F4D - goto Route124_DivingTreasureHuntersHouse_EventScript_270F4D + case 0, Route124_DivingTreasureHuntersHouse_EventScript_TradeGreenShard + case 1, Route124_DivingTreasureHuntersHouse_EventScript_DeclineTrade + goto Route124_DivingTreasureHuntersHouse_EventScript_DeclineTrade end -Route124_DivingTreasureHuntersHouse_EventScript_270CF6:: @ 8270CF6 +Route124_DivingTreasureHuntersHouse_EventScript_ShardOptionsRG:: @ 8270CF6 multichoice 0, 0, MULTI_SHARDS_RG, 0 switch VAR_RESULT - case 0, Route124_DivingTreasureHuntersHouse_EventScript_270E84 - case 1, Route124_DivingTreasureHuntersHouse_EventScript_270EB1 - case 2, Route124_DivingTreasureHuntersHouse_EventScript_270F4D - goto Route124_DivingTreasureHuntersHouse_EventScript_270F4D + case 0, Route124_DivingTreasureHuntersHouse_EventScript_TradeRedShard + case 1, Route124_DivingTreasureHuntersHouse_EventScript_TradeGreenShard + case 2, Route124_DivingTreasureHuntersHouse_EventScript_DeclineTrade + goto Route124_DivingTreasureHuntersHouse_EventScript_DeclineTrade end -Route124_DivingTreasureHuntersHouse_EventScript_270D27:: @ 8270D27 +Route124_DivingTreasureHuntersHouse_EventScript_ShardOptionsYG:: @ 8270D27 multichoice 0, 0, MULTI_SHARDS_YG, 0 switch VAR_RESULT - case 0, Route124_DivingTreasureHuntersHouse_EventScript_270E93 - case 1, Route124_DivingTreasureHuntersHouse_EventScript_270EB1 - case 2, Route124_DivingTreasureHuntersHouse_EventScript_270F4D - goto Route124_DivingTreasureHuntersHouse_EventScript_270F4D + case 0, Route124_DivingTreasureHuntersHouse_EventScript_TradeYellowShard + case 1, Route124_DivingTreasureHuntersHouse_EventScript_TradeGreenShard + case 2, Route124_DivingTreasureHuntersHouse_EventScript_DeclineTrade + goto Route124_DivingTreasureHuntersHouse_EventScript_DeclineTrade end -Route124_DivingTreasureHuntersHouse_EventScript_270D58:: @ 8270D58 +Route124_DivingTreasureHuntersHouse_EventScript_ShardOptionsRYG:: @ 8270D58 multichoice 0, 0, MULTI_SHARDS_RYG, 0 switch VAR_RESULT - case 0, Route124_DivingTreasureHuntersHouse_EventScript_270E84 - case 1, Route124_DivingTreasureHuntersHouse_EventScript_270E93 - case 2, Route124_DivingTreasureHuntersHouse_EventScript_270EB1 - case 3, Route124_DivingTreasureHuntersHouse_EventScript_270F4D - goto Route124_DivingTreasureHuntersHouse_EventScript_270F4D + case 0, Route124_DivingTreasureHuntersHouse_EventScript_TradeRedShard + case 1, Route124_DivingTreasureHuntersHouse_EventScript_TradeYellowShard + case 2, Route124_DivingTreasureHuntersHouse_EventScript_TradeGreenShard + case 3, Route124_DivingTreasureHuntersHouse_EventScript_DeclineTrade + goto Route124_DivingTreasureHuntersHouse_EventScript_DeclineTrade end -Route124_DivingTreasureHuntersHouse_EventScript_270D94:: @ 8270D94 +Route124_DivingTreasureHuntersHouse_EventScript_ShardOptionsBG:: @ 8270D94 multichoice 0, 0, MULTI_SHARDS_BG, 0 switch VAR_RESULT - case 0, Route124_DivingTreasureHuntersHouse_EventScript_270EA2 - case 1, Route124_DivingTreasureHuntersHouse_EventScript_270EB1 - case 2, Route124_DivingTreasureHuntersHouse_EventScript_270F4D - goto Route124_DivingTreasureHuntersHouse_EventScript_270F4D + case 0, Route124_DivingTreasureHuntersHouse_EventScript_TradeBlueShard + case 1, Route124_DivingTreasureHuntersHouse_EventScript_TradeGreenShard + case 2, Route124_DivingTreasureHuntersHouse_EventScript_DeclineTrade + goto Route124_DivingTreasureHuntersHouse_EventScript_DeclineTrade end -Route124_DivingTreasureHuntersHouse_EventScript_270DC5:: @ 8270DC5 +Route124_DivingTreasureHuntersHouse_EventScript_ShardOptionsRBG:: @ 8270DC5 multichoice 0, 0, MULTI_SHARDS_RBG, 0 switch VAR_RESULT - case 0, Route124_DivingTreasureHuntersHouse_EventScript_270E84 - case 1, Route124_DivingTreasureHuntersHouse_EventScript_270EA2 - case 2, Route124_DivingTreasureHuntersHouse_EventScript_270EB1 - case 3, Route124_DivingTreasureHuntersHouse_EventScript_270F4D - goto Route124_DivingTreasureHuntersHouse_EventScript_270F4D + case 0, Route124_DivingTreasureHuntersHouse_EventScript_TradeRedShard + case 1, Route124_DivingTreasureHuntersHouse_EventScript_TradeBlueShard + case 2, Route124_DivingTreasureHuntersHouse_EventScript_TradeGreenShard + case 3, Route124_DivingTreasureHuntersHouse_EventScript_DeclineTrade + goto Route124_DivingTreasureHuntersHouse_EventScript_DeclineTrade end -Route124_DivingTreasureHuntersHouse_EventScript_270E01:: @ 8270E01 +Route124_DivingTreasureHuntersHouse_EventScript_ShardOptionsYBG:: @ 8270E01 multichoice 0, 0, MULTI_SHARDS_YBG, 0 switch VAR_RESULT - case 0, Route124_DivingTreasureHuntersHouse_EventScript_270E93 - case 1, Route124_DivingTreasureHuntersHouse_EventScript_270EA2 - case 2, Route124_DivingTreasureHuntersHouse_EventScript_270EB1 - case 3, Route124_DivingTreasureHuntersHouse_EventScript_270F4D - goto Route124_DivingTreasureHuntersHouse_EventScript_270F4D + case 0, Route124_DivingTreasureHuntersHouse_EventScript_TradeYellowShard + case 1, Route124_DivingTreasureHuntersHouse_EventScript_TradeBlueShard + case 2, Route124_DivingTreasureHuntersHouse_EventScript_TradeGreenShard + case 3, Route124_DivingTreasureHuntersHouse_EventScript_DeclineTrade + goto Route124_DivingTreasureHuntersHouse_EventScript_DeclineTrade end -Route124_DivingTreasureHuntersHouse_EventScript_270E3D:: @ 8270E3D +Route124_DivingTreasureHuntersHouse_EventScript_ShardOptionsRYBG:: @ 8270E3D multichoice 0, 0, MULTI_SHARDS_RYBG, 0 switch VAR_RESULT - case 0, Route124_DivingTreasureHuntersHouse_EventScript_270E84 - case 1, Route124_DivingTreasureHuntersHouse_EventScript_270E93 - case 2, Route124_DivingTreasureHuntersHouse_EventScript_270EA2 - case 3, Route124_DivingTreasureHuntersHouse_EventScript_270EB1 - case 4, Route124_DivingTreasureHuntersHouse_EventScript_270F4D - goto Route124_DivingTreasureHuntersHouse_EventScript_270F4D + case 0, Route124_DivingTreasureHuntersHouse_EventScript_TradeRedShard + case 1, Route124_DivingTreasureHuntersHouse_EventScript_TradeYellowShard + case 2, Route124_DivingTreasureHuntersHouse_EventScript_TradeBlueShard + case 3, Route124_DivingTreasureHuntersHouse_EventScript_TradeGreenShard + case 4, Route124_DivingTreasureHuntersHouse_EventScript_DeclineTrade + goto Route124_DivingTreasureHuntersHouse_EventScript_DeclineTrade end -Route124_DivingTreasureHuntersHouse_EventScript_270E84:: @ 8270E84 +Route124_DivingTreasureHuntersHouse_EventScript_TradeRedShard:: @ 8270E84 setvar VAR_0x8008, ITEM_RED_SHARD setvar VAR_0x8009, ITEM_FIRE_STONE - goto Route124_DivingTreasureHuntersHouse_EventScript_270EC0 + goto Route124_DivingTreasureHuntersHouse_EventScript_TryTradeShard -Route124_DivingTreasureHuntersHouse_EventScript_270E93:: @ 8270E93 +Route124_DivingTreasureHuntersHouse_EventScript_TradeYellowShard:: @ 8270E93 setvar VAR_0x8008, ITEM_YELLOW_SHARD setvar VAR_0x8009, ITEM_THUNDER_STONE - goto Route124_DivingTreasureHuntersHouse_EventScript_270EC0 + goto Route124_DivingTreasureHuntersHouse_EventScript_TryTradeShard -Route124_DivingTreasureHuntersHouse_EventScript_270EA2:: @ 8270EA2 +Route124_DivingTreasureHuntersHouse_EventScript_TradeBlueShard:: @ 8270EA2 setvar VAR_0x8008, ITEM_BLUE_SHARD setvar VAR_0x8009, ITEM_WATER_STONE - goto Route124_DivingTreasureHuntersHouse_EventScript_270EC0 + goto Route124_DivingTreasureHuntersHouse_EventScript_TryTradeShard -Route124_DivingTreasureHuntersHouse_EventScript_270EB1:: @ 8270EB1 +Route124_DivingTreasureHuntersHouse_EventScript_TradeGreenShard:: @ 8270EB1 setvar VAR_0x8008, ITEM_GREEN_SHARD setvar VAR_0x8009, ITEM_LEAF_STONE - goto Route124_DivingTreasureHuntersHouse_EventScript_270EC0 + goto Route124_DivingTreasureHuntersHouse_EventScript_TryTradeShard -Route124_DivingTreasureHuntersHouse_EventScript_270EC0:: @ 8270EC0 +Route124_DivingTreasureHuntersHouse_EventScript_TryTradeShard:: @ 8270EC0 bufferitemname 0, VAR_0x8008 bufferitemname 1, VAR_0x8009 - msgbox Route124_DivingTreasureHuntersHouse_Text_271132, MSGBOX_YESNO + msgbox Route124_DivingTreasureHuntersHouse_Text_YoullTradeShardForStone, MSGBOX_YESNO compare VAR_RESULT, 0 - goto_if_eq Route124_DivingTreasureHuntersHouse_EventScript_270F4D + goto_if_eq Route124_DivingTreasureHuntersHouse_EventScript_DeclineTrade checkitemspace VAR_0x8009, 1 - compare VAR_RESULT, 1 - goto_if_eq Route124_DivingTreasureHuntersHouse_EventScript_270F01 + compare VAR_RESULT, TRUE + goto_if_eq Route124_DivingTreasureHuntersHouse_EventScript_TradeShard checkitem VAR_0x8008, 2 - compare VAR_RESULT, 0 - goto_if_eq Route124_DivingTreasureHuntersHouse_EventScript_270F01 - goto Route124_DivingTreasureHuntersHouse_EventScript_270F43 + compare VAR_RESULT, FALSE + goto_if_eq Route124_DivingTreasureHuntersHouse_EventScript_TradeShard + goto Route124_DivingTreasureHuntersHouse_EventScript_BagFull end -Route124_DivingTreasureHuntersHouse_EventScript_270F01:: @ 8270F01 +Route124_DivingTreasureHuntersHouse_EventScript_TradeShard:: @ 8270F01 takeitem VAR_0x8008, 1 giveitem_std VAR_0x8009 - msgbox Route124_DivingTreasureHuntersHouse_Text_271158, MSGBOX_DEFAULT - call Route124_DivingTreasureHuntersHouse_EventScript_270A72 + msgbox Route124_DivingTreasureHuntersHouse_Text_ItsADeal, MSGBOX_DEFAULT + call Route124_DivingTreasureHuntersHouse_EventScript_GetPlayersShards compare VAR_TEMP_1, 0 - goto_if_eq Route124_DivingTreasureHuntersHouse_EventScript_270F61 - msgbox Route124_DivingTreasureHuntersHouse_Text_27117B, MSGBOX_YESNO + goto_if_eq Route124_DivingTreasureHuntersHouse_EventScript_EndTrade + msgbox Route124_DivingTreasureHuntersHouse_Text_TradeSomethingElse, MSGBOX_YESNO compare VAR_RESULT, 1 - goto_if_eq Route124_DivingTreasureHuntersHouse_EventScript_270ADE - goto Route124_DivingTreasureHuntersHouse_EventScript_270F4D + goto_if_eq Route124_DivingTreasureHuntersHouse_EventScript_ShowTradeOptions + goto Route124_DivingTreasureHuntersHouse_EventScript_DeclineTrade end -Route124_DivingTreasureHuntersHouse_EventScript_270F43:: @ 8270F43 - msgbox Route124_DivingTreasureHuntersHouse_Text_2711A0, MSGBOX_DEFAULT +Route124_DivingTreasureHuntersHouse_EventScript_BagFull:: @ 8270F43 + msgbox Route124_DivingTreasureHuntersHouse_Text_BagFull, MSGBOX_DEFAULT release end -Route124_DivingTreasureHuntersHouse_EventScript_270F4D:: @ 8270F4D - msgbox Route124_DivingTreasureHuntersHouse_Text_2711D8, MSGBOX_DEFAULT +Route124_DivingTreasureHuntersHouse_EventScript_DeclineTrade:: @ 8270F4D + msgbox Route124_DivingTreasureHuntersHouse_Text_ComeBackIfYouChangeMind, MSGBOX_DEFAULT release end -Route124_DivingTreasureHuntersHouse_EventScript_270F57:: @ 8270F57 - msgbox Route124_DivingTreasureHuntersHouse_Text_271027, MSGBOX_DEFAULT +Route124_DivingTreasureHuntersHouse_EventScript_NoShards:: @ 8270F57 + msgbox Route124_DivingTreasureHuntersHouse_Text_YouHaventGotAnyShards, MSGBOX_DEFAULT release end -Route124_DivingTreasureHuntersHouse_EventScript_270F61:: @ 8270F61 +Route124_DivingTreasureHuntersHouse_EventScript_EndTrade:: @ 8270F61 release end -Route124_DivingTreasureHuntersHouse_EventScript_270F63:: @ 8270F63 - msgbox Route124_DivingTreasureHuntersHouse_Text_271217, MSGBOX_SIGN +Route124_DivingTreasureHuntersHouse_EventScript_ShardTradeBoard:: @ 8270F63 + msgbox Route124_DivingTreasureHuntersHouse_Text_ShardTradeBoard, MSGBOX_SIGN end -Route124_DivingTreasureHuntersHouse_Text_270F6C: @ 8270F6C +Route124_DivingTreasureHuntersHouse_Text_Greeting: @ 8270F6C .string "I'm the DIVING TREASURE HUNTER!\p" .string "I'm the awesome dude who makes\n" .string "deep-sea dives to gather treasures\l" .string "resting at the bottom.$" -Route124_DivingTreasureHuntersHouse_Text_270FE5: @ 8270FE5 +Route124_DivingTreasureHuntersHouse_Text_HaveYouSeenAnyShards: @ 8270FE5 .string "Tell me, have you seen any SHARDS of\n" .string "tools made in ancient times?$" -Route124_DivingTreasureHuntersHouse_Text_271027: @ 8271027 +Route124_DivingTreasureHuntersHouse_Text_YouHaventGotAnyShards: @ 8271027 .string "You haven't got any treasures\n" .string "for me…\p" .string "If you see any SHARDS, like the RED\n" .string "SHARD, you've got to trade it with me!$" -Route124_DivingTreasureHuntersHouse_Text_271098: @ 8271098 +Route124_DivingTreasureHuntersHouse_Text_ThatsAShardIllTradeYou: @ 8271098 .string "Oh, hey! That…\n" .string "That's a SHARD! I'm looking for those!\p" .string "Oh, man, you've got to trade that\n" .string "with me! I'll give you something good!$" -Route124_DivingTreasureHuntersHouse_Text_271117: @ 8271117 +Route124_DivingTreasureHuntersHouse_Text_WhatDoYouWantToTrade: @ 8271117 .string "What do you want to trade?$" -Route124_DivingTreasureHuntersHouse_Text_271132: @ 8271132 +Route124_DivingTreasureHuntersHouse_Text_YoullTradeShardForStone: @ 8271132 .string "You'll trade your {STR_VAR_1} for\n" .string "my {STR_VAR_2}, then?$" -Route124_DivingTreasureHuntersHouse_Text_271158: @ 8271158 +Route124_DivingTreasureHuntersHouse_Text_ItsADeal: @ 8271158 .string "It's a done deal!\n" .string "Use that wisely!$" -Route124_DivingTreasureHuntersHouse_Text_27117B: @ 827117B +Route124_DivingTreasureHuntersHouse_Text_TradeSomethingElse: @ 827117B .string "Do you want to trade something else?$" -Route124_DivingTreasureHuntersHouse_Text_2711A0: @ 82711A0 +Route124_DivingTreasureHuntersHouse_Text_BagFull: @ 82711A0 .string "Whoops, your BAG's full.\n" .string "Get rid of some items, friend!$" -Route124_DivingTreasureHuntersHouse_Text_2711D8: @ 82711D8 +Route124_DivingTreasureHuntersHouse_Text_ComeBackIfYouChangeMind: @ 82711D8 .string "No? That's a downer.\n" .string "Well, if you change your mind, come back.$" -Route124_DivingTreasureHuntersHouse_Text_271217: @ 8271217 +Route124_DivingTreasureHuntersHouse_Text_ShardTradeBoard: @ 8271217 .string "{CLEAR_TO 0x0a}Wanted item{CLEAR_TO 0x7c}Trade item\n" .string "{CLEAR_TO 0x0f}RED SHARD{CLEAR_TO 0x59}{LEFT_ARROW}{RIGHT_ARROW}{CLEAR_TO 0x7b}FIRE STONE{CLEAR_TO 0xc8}\p" .string "{CLEAR_TO 0x0a}Wanted item{CLEAR_TO 0x7c}Trade item\n" From a90b828bb8838f4500a4d91899bce2bc946e847b Mon Sep 17 00:00:00 2001 From: GriffinR Date: Sat, 2 Nov 2019 11:50:07 -0400 Subject: [PATCH 45/46] Use YES/NO constants --- data/maps/FallarborTown_CozmosHouse/scripts.inc | 2 +- data/maps/MauvilleCity_BikeShop/scripts.inc | 12 ++++++------ data/maps/Route104_MrBrineysHouse/scripts.inc | 6 +++--- .../Route124_DivingTreasureHuntersHouse/scripts.inc | 4 ++-- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/data/maps/FallarborTown_CozmosHouse/scripts.inc b/data/maps/FallarborTown_CozmosHouse/scripts.inc index 310cc72002..224147bc53 100644 --- a/data/maps/FallarborTown_CozmosHouse/scripts.inc +++ b/data/maps/FallarborTown_CozmosHouse/scripts.inc @@ -15,7 +15,7 @@ FallarborTown_CozmosHouse_EventScript_ProfCozmo:: @ 8200F13 FallarborTown_CozmosHouse_EventScript_PlayerHasMeteorite:: @ 8200F38 call_if_unset FLAG_TEMP_2, FallarborTown_CozmosHouse_EventScript_NoticeMeteorite call_if_set FLAG_TEMP_2, FallarborTown_CozmosHouse_EventScript_AskForMeteorite - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq FallarborTown_CozmosHouse_EventScript_DeclineGiveMeteorite msgbox FallarborTown_CozmosHouse_Text_PleaseUseThisTM, MSGBOX_DEFAULT giveitem_std ITEM_TM27 diff --git a/data/maps/MauvilleCity_BikeShop/scripts.inc b/data/maps/MauvilleCity_BikeShop/scripts.inc index f1444e20da..4b0372eac7 100644 --- a/data/maps/MauvilleCity_BikeShop/scripts.inc +++ b/data/maps/MauvilleCity_BikeShop/scripts.inc @@ -8,17 +8,17 @@ MauvilleCity_BikeShop_EventScript_Rydel:: @ 820EBBC goto_if_set FLAG_DECLINED_BIKE, MauvilleCity_BikeShop_EventScript_SkipGreeting msgbox MauvilleCity_BikeShop_Text_RydelGreeting, MSGBOX_DEFAULT msgbox MauvilleCity_BikeShop_Text_DidYouComeFromFarAway, MSGBOX_YESNO - compare VAR_RESULT, 1 + compare VAR_RESULT, YES goto_if_eq MauvilleCity_BikeShop_EventScript_YesFar - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq MauvilleCity_BikeShop_EventScript_NotFar end MauvilleCity_BikeShop_EventScript_SkipGreeting:: @ 820EBF7 msgbox MauvilleCity_BikeShop_Text_DidYouComeFromFarAway, MSGBOX_YESNO - compare VAR_RESULT, 1 + compare VAR_RESULT, YES goto_if_eq MauvilleCity_BikeShop_EventScript_YesFar - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq MauvilleCity_BikeShop_EventScript_NotFar end @@ -62,9 +62,9 @@ MauvilleCity_BikeShop_EventScript_ComeBackToSwitchBikes:: @ 820EC87 MauvilleCity_BikeShop_EventScript_AskSwitchBikes:: @ 820EC94 msgbox MauvilleCity_BikeShop_Text_WantToSwitchBikes, MSGBOX_YESNO - compare VAR_RESULT, 1 + compare VAR_RESULT, YES goto_if_eq MauvilleCity_BikeShop_EventScript_SwitchBikes - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq MauvilleCity_BikeShop_EventScript_KeepBike end diff --git a/data/maps/Route104_MrBrineysHouse/scripts.inc b/data/maps/Route104_MrBrineysHouse/scripts.inc index 50cc3dd7e7..1c61d3be3d 100644 --- a/data/maps/Route104_MrBrineysHouse/scripts.inc +++ b/data/maps/Route104_MrBrineysHouse/scripts.inc @@ -33,7 +33,7 @@ Route104_MrBrineysHouse_EventScript_SailingIntro:: @ 8229D8A setflag FLAG_MR_BRINEY_SAILING_INTRO msgbox Route104_MrBrineysHouse_Text_WaitUpPeeko, MSGBOX_DEFAULT msgbox Route104_MrBrineysHouse_Text_ItsYouLetsSailToDewford, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq Route104_MrBrineysHouse_EventScript_DeclineDeliverySailing goto Route104_MrBrineysHouse_EventScript_SailToDewford end @@ -50,14 +50,14 @@ Route104_MrBrineysHouse_EventScript_WhereAreWeBound:: @ 8229DAE Route104_MrBrineysHouse_EventScript_SailBothDeliveries:: @ 8229DE1 msgbox Route104_MrBrineysHouse_Text_NeedToMakeDeliveriesSailToDewford, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq Route104_MrBrineysHouse_EventScript_DeclineDeliverySailing goto Route104_MrBrineysHouse_EventScript_SailToDewford end Route104_MrBrineysHouse_EventScript_SailDeliverPackage:: @ 8229DFA msgbox Route104_MrBrineysHouse_Text_NeedToDeliverPackageSailToDewford, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq Route104_MrBrineysHouse_EventScript_DeclineDeliverySailing goto Route104_MrBrineysHouse_EventScript_SailToDewford end diff --git a/data/maps/Route124_DivingTreasureHuntersHouse/scripts.inc b/data/maps/Route124_DivingTreasureHuntersHouse/scripts.inc index c605c7df87..b2c00c1cc5 100644 --- a/data/maps/Route124_DivingTreasureHuntersHouse/scripts.inc +++ b/data/maps/Route124_DivingTreasureHuntersHouse/scripts.inc @@ -246,7 +246,7 @@ Route124_DivingTreasureHuntersHouse_EventScript_TryTradeShard:: @ 8270EC0 bufferitemname 0, VAR_0x8008 bufferitemname 1, VAR_0x8009 msgbox Route124_DivingTreasureHuntersHouse_Text_YoullTradeShardForStone, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq Route124_DivingTreasureHuntersHouse_EventScript_DeclineTrade checkitemspace VAR_0x8009, 1 compare VAR_RESULT, TRUE @@ -265,7 +265,7 @@ Route124_DivingTreasureHuntersHouse_EventScript_TradeShard:: @ 8270F01 compare VAR_TEMP_1, 0 goto_if_eq Route124_DivingTreasureHuntersHouse_EventScript_EndTrade msgbox Route124_DivingTreasureHuntersHouse_Text_TradeSomethingElse, MSGBOX_YESNO - compare VAR_RESULT, 1 + compare VAR_RESULT, YES goto_if_eq Route124_DivingTreasureHuntersHouse_EventScript_ShowTradeOptions goto Route124_DivingTreasureHuntersHouse_EventScript_DeclineTrade end From 033c6cea3bbd982b7c60ee4fe5bee477e8d8773e Mon Sep 17 00:00:00 2001 From: GriffinR Date: Sat, 2 Nov 2019 12:34:53 -0400 Subject: [PATCH 46/46] Use YES/NO constants for MSGBOX_YESNO --- .../scripts.inc | 6 +- .../scripts.inc | 6 +- .../scripts.inc | 6 +- .../scripts.inc | 6 +- .../scripts.inc | 6 +- .../scripts.inc | 18 +++--- .../scripts.inc | 6 +- .../scripts.inc | 6 +- .../scripts.inc | 6 +- .../scripts.inc | 16 ++--- .../scripts.inc | 60 +++++++++---------- .../scripts.inc | 6 +- .../scripts.inc | 6 +- .../scripts.inc | 4 +- .../scripts.inc | 24 ++++---- data/maps/BattleFrontier_Lounge3/scripts.inc | 4 +- data/maps/BattleFrontier_Lounge5/scripts.inc | 2 +- data/maps/BattleFrontier_Lounge6/scripts.inc | 2 +- data/maps/BattleFrontier_Lounge7/scripts.inc | 2 +- .../BattleFrontier_OutsideWest/scripts.inc | 4 +- .../BattleFrontier_RankingHall/scripts.inc | 2 +- data/maps/BirthIsland_Harbor/scripts.inc | 2 +- data/maps/DewfordTown/scripts.inc | 10 ++-- data/maps/DewfordTown_Hall/scripts.inc | 4 +- .../scripts.inc | 6 +- .../FallarborTown_BattleTentLobby/scripts.inc | 6 +- .../scripts.inc | 2 +- data/maps/FarawayIsland_Entrance/scripts.inc | 2 +- data/maps/FortreeCity/scripts.inc | 2 +- data/maps/FortreeCity_House1/scripts.inc | 2 +- data/maps/LavaridgeTown/scripts.inc | 4 +- data/maps/LilycoveCity/scripts.inc | 8 +-- .../LilycoveCity_ContestLobby/scripts.inc | 14 ++--- .../scripts.inc | 2 +- data/maps/LilycoveCity_Harbor/scripts.inc | 8 +-- data/maps/LilycoveCity_House3/scripts.inc | 2 +- .../scripts.inc | 4 +- .../scripts.inc | 8 +-- .../scripts.inc | 8 +-- .../scripts.inc | 30 +++++----- data/maps/MauvilleCity/scripts.inc | 4 +- data/maps/MauvilleCity_GameCorner/scripts.inc | 6 +- data/maps/MauvilleCity_House2/scripts.inc | 4 +- data/maps/MirageTower_4F/scripts.inc | 4 +- data/maps/MossdeepCity/scripts.inc | 2 +- data/maps/MossdeepCity_House3/scripts.inc | 2 +- .../MossdeepCity_SpaceCenter_2F/scripts.inc | 4 +- .../MossdeepCity_StevensHouse/scripts.inc | 6 +- data/maps/MtChimney/scripts.inc | 4 +- .../MtChimney_CableCarStation/scripts.inc | 4 +- data/maps/MtPyre_Summit/scripts.inc | 8 +-- data/maps/NavelRock_Harbor/scripts.inc | 2 +- data/maps/NewMauville_Entrance/scripts.inc | 2 +- data/maps/PacifidlogTown_House3/scripts.inc | 2 +- data/maps/PacifidlogTown_House4/scripts.inc | 4 +- data/maps/PetalburgCity_Gym/scripts.inc | 48 +++++++-------- data/maps/Route104/scripts.inc | 8 +-- .../scripts.inc | 8 +-- data/maps/Route109/scripts.inc | 2 +- .../Route110_TrickHouseEntrance/scripts.inc | 2 +- data/maps/Route111/scripts.inc | 2 +- .../Route111_OldLadysRestStop/scripts.inc | 8 +-- .../maps/Route112_CableCarStation/scripts.inc | 4 +- data/maps/Route113_GlassWorkshop/scripts.inc | 14 ++--- data/maps/Route114_LanettesHouse/scripts.inc | 4 +- data/maps/Route118/scripts.inc | 4 +- .../Route119_WeatherInstitute_2F/scripts.inc | 4 +- data/maps/Route120/scripts.inc | 8 +-- .../Route121_SafariZoneEntrance/scripts.inc | 4 +- data/maps/RustboroCity/scripts.inc | 8 +-- .../RustboroCity_DevonCorp_2F/scripts.inc | 12 ++-- data/maps/RustboroCity_Flat1_2F/scripts.inc | 4 +- data/maps/RustboroCity_House1/scripts.inc | 2 +- data/maps/SafariZone_South/scripts.inc | 2 +- .../ShoalCave_LowTideEntranceRoom/scripts.inc | 2 +- data/maps/SlateportCity/scripts.inc | 4 +- .../scripts.inc | 10 ++-- .../SlateportCity_BattleTentLobby/scripts.inc | 6 +- data/maps/SlateportCity_Harbor/scripts.inc | 8 +-- data/maps/SlateportCity_House1/scripts.inc | 8 +-- .../scripts.inc | 2 +- data/maps/SootopolisCity/scripts.inc | 2 +- data/maps/SootopolisCity_House2/scripts.inc | 4 +- data/maps/SootopolisCity_House3/scripts.inc | 2 +- data/maps/SootopolisCity_House6/scripts.inc | 2 +- .../scripts.inc | 4 +- data/maps/SouthernIsland_Exterior/scripts.inc | 2 +- data/maps/TrainerHill_Elevator/scripts.inc | 2 +- .../scripts.inc | 6 +- .../scripts.inc | 6 +- data/scripts/berry_tree.inc | 12 ++-- data/scripts/cable_club.inc | 12 ++-- data/scripts/contest_hall.inc | 8 +-- data/scripts/day_care.inc | 18 +++--- data/scripts/field_move_scripts.inc | 12 ++-- data/scripts/gabby_and_ty.inc | 2 +- data/scripts/interview.inc | 24 ++++---- data/scripts/kecleon.inc | 2 +- data/scripts/lilycove_lady.inc | 36 +++++------ data/scripts/mauville_man.inc | 24 ++++---- data/scripts/mevent.inc | 2 +- data/scripts/move_tutors.inc | 40 ++++++------- data/scripts/pkmn_center_nurse.inc | 8 +-- data/scripts/pokeblocks.inc | 12 ++-- data/scripts/prof_birch.inc | 2 +- data/scripts/record_mix.inc | 4 +- data/scripts/safari_zone.inc | 4 +- data/scripts/secret_base.inc | 34 +++++------ data/scripts/secret_power_tm.inc | 2 +- data/scripts/shared_secret_base.inc | 6 +- data/scripts/surf.inc | 2 +- 111 files changed, 432 insertions(+), 432 deletions(-) diff --git a/data/maps/BattleFrontier_BattleArenaBattleRoom/scripts.inc b/data/maps/BattleFrontier_BattleArenaBattleRoom/scripts.inc index 2823a4f30a..5f6e78a351 100644 --- a/data/maps/BattleFrontier_BattleArenaBattleRoom/scripts.inc +++ b/data/maps/BattleFrontier_BattleArenaBattleRoom/scripts.inc @@ -201,9 +201,9 @@ BattleFrontier_BattleArenaBattleRoom_EventScript_2577D0:: @ 82577D0 BattleFrontier_BattleArenaBattleRoom_EventScript_2577DA:: @ 82577DA msgbox BattleFrontier_BattleArenaBattleRoom_Text_257E6B, MSGBOX_YESNO switch VAR_RESULT - case 0, BattleFrontier_BattleArenaBattleRoom_EventScript_2576B0 - case 1, BattleFrontier_BattleArenaBattleRoom_EventScript_25789A - case 127, BattleFrontier_BattleArenaBattleRoom_EventScript_2576B0 + case NO, BattleFrontier_BattleArenaBattleRoom_EventScript_2576B0 + case YES, BattleFrontier_BattleArenaBattleRoom_EventScript_25789A + case MULTI_B_PRESSED, BattleFrontier_BattleArenaBattleRoom_EventScript_2576B0 BattleFrontier_BattleArenaBattleRoom_EventScript_257808:: @ 8257808 message BattleFrontier_BattleArenaBattleRoom_Text_257E9E diff --git a/data/maps/BattleFrontier_BattleArenaLobby/scripts.inc b/data/maps/BattleFrontier_BattleArenaLobby/scripts.inc index 0c55e9917b..00feed9c90 100644 --- a/data/maps/BattleFrontier_BattleArenaLobby/scripts.inc +++ b/data/maps/BattleFrontier_BattleArenaLobby/scripts.inc @@ -173,9 +173,9 @@ BattleFrontier_BattleArenaLobby_EventScript_255E47:: @ 8255E47 goto_if_eq BattleFrontier_BattleArenaLobby_EventScript_255FF8 msgbox BattleFrontier_BattleArenaLobby_Text_2564CE, MSGBOX_YESNO switch VAR_RESULT - case 0, BattleFrontier_BattleArenaLobby_EventScript_255FF8 - case 1, BattleFrontier_BattleArenaLobby_EventScript_255EE8 - case 127, BattleFrontier_BattleArenaLobby_EventScript_255FF8 + case NO, BattleFrontier_BattleArenaLobby_EventScript_255FF8 + case YES, BattleFrontier_BattleArenaLobby_EventScript_255EE8 + case MULTI_B_PRESSED, BattleFrontier_BattleArenaLobby_EventScript_255FF8 BattleFrontier_BattleArenaLobby_EventScript_255EE8:: @ 8255EE8 setvar VAR_TEMP_0, 0 diff --git a/data/maps/BattleFrontier_BattleDomeLobby/scripts.inc b/data/maps/BattleFrontier_BattleDomeLobby/scripts.inc index 4ba6db9671..ea62948c66 100644 --- a/data/maps/BattleFrontier_BattleDomeLobby/scripts.inc +++ b/data/maps/BattleFrontier_BattleDomeLobby/scripts.inc @@ -226,9 +226,9 @@ BattleFrontier_BattleDomeLobby_EventScript_249ABF:: @ 8249ABF goto_if_eq BattleFrontier_BattleDomeLobby_EventScript_249C61 msgbox BattleFrontier_BattleDomeLobby_Text_24A1C6, MSGBOX_YESNO switch VAR_RESULT - case 0, BattleFrontier_BattleDomeLobby_EventScript_249C61 - case 1, BattleFrontier_BattleDomeLobby_EventScript_249B60 - case 127, BattleFrontier_BattleDomeLobby_EventScript_249C61 + case NO, BattleFrontier_BattleDomeLobby_EventScript_249C61 + case YES, BattleFrontier_BattleDomeLobby_EventScript_249B60 + case MULTI_B_PRESSED, BattleFrontier_BattleDomeLobby_EventScript_249C61 BattleFrontier_BattleDomeLobby_EventScript_249B60:: @ 8249B60 setvar VAR_TEMP_0, 0 diff --git a/data/maps/BattleFrontier_BattleDomePreBattleRoom/scripts.inc b/data/maps/BattleFrontier_BattleDomePreBattleRoom/scripts.inc index 3f5d53ac1d..bd3add50c4 100644 --- a/data/maps/BattleFrontier_BattleDomePreBattleRoom/scripts.inc +++ b/data/maps/BattleFrontier_BattleDomePreBattleRoom/scripts.inc @@ -71,9 +71,9 @@ BattleFrontier_BattleDomePreBattleRoom_EventScript_24B33F:: @ 824B33F BattleFrontier_BattleDomePreBattleRoom_EventScript_24B349:: @ 824B349 msgbox BattleFrontier_BattleDomePreBattleRoom_Text_24BA69, MSGBOX_YESNO switch VAR_RESULT - case 0, BattleFrontier_BattleDomePreBattleRoom_EventScript_24B24F - case 1, BattleFrontier_BattleDomePreBattleRoom_EventScript_24B3BB - case 127, BattleFrontier_BattleDomePreBattleRoom_EventScript_24B24F + case NO, BattleFrontier_BattleDomePreBattleRoom_EventScript_24B24F + case YES, BattleFrontier_BattleDomePreBattleRoom_EventScript_24B3BB + case MULTI_B_PRESSED, BattleFrontier_BattleDomePreBattleRoom_EventScript_24B24F BattleFrontier_BattleDomePreBattleRoom_EventScript_24B377:: @ 824B377 message BattleFrontier_BattleDomePreBattleRoom_Text_24BA93 diff --git a/data/maps/BattleFrontier_BattleFactoryLobby/scripts.inc b/data/maps/BattleFrontier_BattleFactoryLobby/scripts.inc index 9569d23ca7..54ecb435cb 100644 --- a/data/maps/BattleFrontier_BattleFactoryLobby/scripts.inc +++ b/data/maps/BattleFrontier_BattleFactoryLobby/scripts.inc @@ -186,9 +186,9 @@ BattleFrontier_BattleFactoryLobby_EventScript_258653:: @ 8258653 special CallFrontierUtilFunc msgbox BattleFrontier_BattleFactoryLobby_Text_258C27, MSGBOX_YESNO switch VAR_RESULT - case 0, BattleFrontier_BattleFactoryLobby_EventScript_25879A - case 1, BattleFrontier_BattleFactoryLobby_EventScript_2586B9 - case 127, BattleFrontier_BattleFactoryLobby_EventScript_25879A + case NO, BattleFrontier_BattleFactoryLobby_EventScript_25879A + case YES, BattleFrontier_BattleFactoryLobby_EventScript_2586B9 + case MULTI_B_PRESSED, BattleFrontier_BattleFactoryLobby_EventScript_25879A BattleFrontier_BattleFactoryLobby_EventScript_2586B9:: @ 82586B9 setvar VAR_TEMP_0, 0 diff --git a/data/maps/BattleFrontier_BattleFactoryPreBattleRoom/scripts.inc b/data/maps/BattleFrontier_BattleFactoryPreBattleRoom/scripts.inc index f65ffae0db..ced2a5f13f 100644 --- a/data/maps/BattleFrontier_BattleFactoryPreBattleRoom/scripts.inc +++ b/data/maps/BattleFrontier_BattleFactoryPreBattleRoom/scripts.inc @@ -150,9 +150,9 @@ BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259D2E:: @ 8259D2E BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259D38:: @ 8259D38 msgbox BattleFrontier_BattleFactoryPreBattleRoom_Text_25A350, MSGBOX_YESNO switch VAR_RESULT - case 0, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259C13 - case 1, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259E47 - case 127, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259C13 + case NO, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259C13 + case YES, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259E47 + case MULTI_B_PRESSED, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259C13 BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259D66:: @ 8259D66 message BattleFrontier_BattleFactoryPreBattleRoom_Text_25A37A @@ -176,9 +176,9 @@ BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259D98:: @ 8259D98 call BattleFrontier_BattleFactoryPreBattleRoom_EventScript_25A004 msgbox BattleFrontier_BattleFactoryPreBattleRoom_Text_25AB2E, MSGBOX_YESNO switch VAR_RESULT - case 0, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259B74 - case 1, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259DF2 - case 127, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259B74 + case NO, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259B74 + case YES, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259DF2 + case MULTI_B_PRESSED, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259B74 BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259DF2:: @ 8259DF2 fadescreen 1 @@ -442,9 +442,9 @@ BattleFrontier_BattleFactoryPreBattleRoom_EventScript_25A146:: @ 825A146 msgbox BattleFrontier_BattleFactoryPreBattleRoom_Text_25AD61, MSGBOX_DEFAULT msgbox BattleFrontier_BattleFactoryPreBattleRoom_Text_25AB2E, MSGBOX_YESNO switch VAR_RESULT - case 0, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259B74 - case 1, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259DF2 - case 127, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259B74 + case NO, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259B74 + case YES, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259DF2 + case MULTI_B_PRESSED, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259B74 BattleFrontier_BattleFactoryPreBattleRoom_EventScript_25A17C:: @ 825A17C applymovement 1, BattleFrontier_BattleFactoryPreBattleRoom_Movement_25A1B3 diff --git a/data/maps/BattleFrontier_BattlePalaceBattleRoom/scripts.inc b/data/maps/BattleFrontier_BattlePalaceBattleRoom/scripts.inc index 0513e2bb30..766ab149a5 100644 --- a/data/maps/BattleFrontier_BattlePalaceBattleRoom/scripts.inc +++ b/data/maps/BattleFrontier_BattlePalaceBattleRoom/scripts.inc @@ -158,9 +158,9 @@ BattleFrontier_BattlePalaceBattleRoom_EventScript_24FAAA:: @ 824FAAA BattleFrontier_BattlePalaceBattleRoom_EventScript_24FAB4:: @ 824FAB4 msgbox BattleFrontier_BattlePalaceBattleRoom_Text_250030, MSGBOX_YESNO switch VAR_RESULT - case 0, BattleFrontier_BattlePalaceBattleRoom_EventScript_24F98A - case 1, BattleFrontier_BattlePalaceBattleRoom_EventScript_24FB3F - case 127, BattleFrontier_BattlePalaceBattleRoom_EventScript_24F98A + case NO, BattleFrontier_BattlePalaceBattleRoom_EventScript_24F98A + case YES, BattleFrontier_BattlePalaceBattleRoom_EventScript_24FB3F + case MULTI_B_PRESSED, BattleFrontier_BattlePalaceBattleRoom_EventScript_24F98A BattleFrontier_BattlePalaceBattleRoom_EventScript_24FAE2:: @ 824FAE2 message BattleFrontier_BattlePalaceBattleRoom_Text_25005A diff --git a/data/maps/BattleFrontier_BattlePalaceLobby/scripts.inc b/data/maps/BattleFrontier_BattlePalaceLobby/scripts.inc index c3b688661e..fd887e1d9f 100644 --- a/data/maps/BattleFrontier_BattlePalaceLobby/scripts.inc +++ b/data/maps/BattleFrontier_BattlePalaceLobby/scripts.inc @@ -197,9 +197,9 @@ BattleFrontier_BattlePalaceLobby_EventScript_24D9E6:: @ 824D9E6 goto_if_eq BattleFrontier_BattlePalaceLobby_EventScript_24DB91 msgbox BattleFrontier_BattlePalaceLobby_Text_24E3C8, MSGBOX_YESNO switch VAR_RESULT - case 0, BattleFrontier_BattlePalaceLobby_EventScript_24DB91 - case 1, BattleFrontier_BattlePalaceLobby_EventScript_24DA87 - case 127, BattleFrontier_BattlePalaceLobby_EventScript_24DB91 + case NO, BattleFrontier_BattlePalaceLobby_EventScript_24DB91 + case YES, BattleFrontier_BattlePalaceLobby_EventScript_24DA87 + case MULTI_B_PRESSED, BattleFrontier_BattlePalaceLobby_EventScript_24DB91 BattleFrontier_BattlePalaceLobby_EventScript_24DA87:: @ 824DA87 setvar VAR_TEMP_0, 0 diff --git a/data/maps/BattleFrontier_BattlePikeLobby/scripts.inc b/data/maps/BattleFrontier_BattlePikeLobby/scripts.inc index 541ffd313a..1a87dec824 100644 --- a/data/maps/BattleFrontier_BattlePikeLobby/scripts.inc +++ b/data/maps/BattleFrontier_BattlePikeLobby/scripts.inc @@ -166,9 +166,9 @@ BattleFrontier_BattlePikeLobby_EventScript_25B8BB:: @ 825B8BB goto_if_eq BattleFrontier_BattlePikeLobby_EventScript_25BA73 msgbox BattleFrontier_BattlePikeLobby_Text_25C0D8, MSGBOX_YESNO switch VAR_RESULT - case 0, BattleFrontier_BattlePikeLobby_EventScript_25BA73 - case 1, BattleFrontier_BattlePikeLobby_EventScript_25B95C - case 127, BattleFrontier_BattlePikeLobby_EventScript_25BA73 + case NO, BattleFrontier_BattlePikeLobby_EventScript_25BA73 + case YES, BattleFrontier_BattlePikeLobby_EventScript_25B95C + case MULTI_B_PRESSED, BattleFrontier_BattlePikeLobby_EventScript_25BA73 BattleFrontier_BattlePikeLobby_EventScript_25B95C:: @ 825B95C setvar VAR_TEMP_0, 0 diff --git a/data/maps/BattleFrontier_BattlePikeThreePathRoom/scripts.inc b/data/maps/BattleFrontier_BattlePikeThreePathRoom/scripts.inc index 6416ad4d74..cd72a27d1a 100644 --- a/data/maps/BattleFrontier_BattlePikeThreePathRoom/scripts.inc +++ b/data/maps/BattleFrontier_BattlePikeThreePathRoom/scripts.inc @@ -126,8 +126,8 @@ BattleFrontier_BattlePikeThreePathRoom_EventScript_25C9C8:: @ 825C9C8 BattleFrontier_BattlePikeThreePathRoom_EventScript_25C9D8:: @ 825C9D8 msgbox BattleFrontier_BattlePikeThreePathRoom_Text_25CCD4, MSGBOX_YESNO switch VAR_RESULT - case 0, BattleFrontier_BattlePikeThreePathRoom_EventScript_25CA2A - case 127, BattleFrontier_BattlePikeThreePathRoom_EventScript_25CA2A + case NO, BattleFrontier_BattlePikeThreePathRoom_EventScript_25CA2A + case MULTI_B_PRESSED, BattleFrontier_BattlePikeThreePathRoom_EventScript_25CA2A release end @@ -150,9 +150,9 @@ BattleFrontier_BattlePikeThreePathRoom_EventScript_25C9FD:: @ 825C9FD BattleFrontier_BattlePikeThreePathRoom_EventScript_25CA2A:: @ 825CA2A msgbox BattleFrontier_BattlePikeThreePathRoom_Text_25CCFB, MSGBOX_YESNO switch VAR_RESULT - case 1, BattleFrontier_BattlePikeThreePathRoom_EventScript_25C9FD - case 0, BattleFrontier_BattlePikeThreePathRoom_EventScript_25CA5A - case 127, BattleFrontier_BattlePikeThreePathRoom_EventScript_25CA5A + case YES, BattleFrontier_BattlePikeThreePathRoom_EventScript_25C9FD + case NO, BattleFrontier_BattlePikeThreePathRoom_EventScript_25CA5A + case MULTI_B_PRESSED, BattleFrontier_BattlePikeThreePathRoom_EventScript_25CA5A release end @@ -197,9 +197,9 @@ BattleFrontier_BattlePikeThreePathRoom_EventScript_25CABB:: @ 825CABB faceplayer msgbox BattleFrontier_BattlePikeThreePathRoom_Text_25CE69, MSGBOX_YESNO switch VAR_RESULT - case 1, BattleFrontier_BattlePikeThreePathRoom_EventScript_25CB0A - case 0, BattleFrontier_BattlePikeThreePathRoom_EventScript_25CB00 - case 127, BattleFrontier_BattlePikeThreePathRoom_EventScript_25CB00 + case YES, BattleFrontier_BattlePikeThreePathRoom_EventScript_25CB0A + case NO, BattleFrontier_BattlePikeThreePathRoom_EventScript_25CB00 + case MULTI_B_PRESSED, BattleFrontier_BattlePikeThreePathRoom_EventScript_25CB00 release end diff --git a/data/maps/BattleFrontier_BattlePointExchangeServiceCorner/scripts.inc b/data/maps/BattleFrontier_BattlePointExchangeServiceCorner/scripts.inc index 2011c42dfe..8fc97e74a8 100644 --- a/data/maps/BattleFrontier_BattlePointExchangeServiceCorner/scripts.inc +++ b/data/maps/BattleFrontier_BattlePointExchangeServiceCorner/scripts.inc @@ -107,7 +107,7 @@ BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F185:: @ 825F185 BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F21E:: @ 825F21E msgbox BattleFrontier_BattlePointExchangeServiceCorner_Text_25F8B6, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F185 setvar VAR_0x8008, 16 setvar VAR_0x8009, DECOR_KISS_POSTER @@ -116,7 +116,7 @@ BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F21E:: @ 825F21E BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F241:: @ 825F241 msgbox BattleFrontier_BattlePointExchangeServiceCorner_Text_25F8E6, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F185 setvar VAR_0x8008, 32 setvar VAR_0x8009, DECOR_KISS_CUSHION @@ -125,7 +125,7 @@ BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F241:: @ 825F241 BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F264:: @ 825F264 msgbox BattleFrontier_BattlePointExchangeServiceCorner_Text_25F917, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F185 setvar VAR_0x8008, 32 setvar VAR_0x8009, DECOR_SMOOCHUM_DOLL @@ -134,7 +134,7 @@ BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F264:: @ 825F264 BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F287:: @ 825F287 msgbox BattleFrontier_BattlePointExchangeServiceCorner_Text_25F949, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F185 setvar VAR_0x8008, 48 setvar VAR_0x8009, DECOR_TOGEPI_DOLL @@ -143,7 +143,7 @@ BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F287:: @ 825F287 BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F2AA:: @ 825F2AA msgbox BattleFrontier_BattlePointExchangeServiceCorner_Text_25F979, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F185 setvar VAR_0x8008, 48 setvar VAR_0x8009, DECOR_MEOWTH_DOLL @@ -152,7 +152,7 @@ BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F2AA:: @ 825F2AA BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F2CD:: @ 825F2CD msgbox BattleFrontier_BattlePointExchangeServiceCorner_Text_25F9A9, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F185 setvar VAR_0x8008, 48 setvar VAR_0x8009, DECOR_CLEFAIRY_DOLL @@ -161,7 +161,7 @@ BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F2CD:: @ 825F2CD BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F2F0:: @ 825F2F0 msgbox BattleFrontier_BattlePointExchangeServiceCorner_Text_25F9DB, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F185 setvar VAR_0x8008, 48 setvar VAR_0x8009, DECOR_DITTO_DOLL @@ -170,7 +170,7 @@ BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F2F0:: @ 825F2F0 BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F313:: @ 825F313 msgbox BattleFrontier_BattlePointExchangeServiceCorner_Text_25FA0A, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F185 setvar VAR_0x8008, 80 setvar VAR_0x8009, DECOR_CYNDAQUIL_DOLL @@ -179,7 +179,7 @@ BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F313:: @ 825F313 BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F336:: @ 825F336 msgbox BattleFrontier_BattlePointExchangeServiceCorner_Text_25FA3D, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F185 setvar VAR_0x8008, 80 setvar VAR_0x8009, DECOR_CHIKORITA_DOLL @@ -188,7 +188,7 @@ BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F336:: @ 825F336 BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F359:: @ 825F359 msgbox BattleFrontier_BattlePointExchangeServiceCorner_Text_25FA70, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F185 setvar VAR_0x8008, 80 setvar VAR_0x8009, DECOR_TOTODILE_DOLL @@ -221,7 +221,7 @@ BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F38E:: @ 825F38E BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F3F0:: @ 825F3F0 msgbox BattleFrontier_BattlePointExchangeServiceCorner_Text_25FAA2, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F38E setvar VAR_0x8008, 128 setvar VAR_0x8009, DECOR_LAPRAS_DOLL @@ -230,7 +230,7 @@ BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F3F0:: @ 825F3F0 BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F413:: @ 825F413 msgbox BattleFrontier_BattlePointExchangeServiceCorner_Text_25FAD2, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F38E setvar VAR_0x8008, 128 setvar VAR_0x8009, DECOR_SNORLAX_DOLL @@ -239,7 +239,7 @@ BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F413:: @ 825F413 BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F436:: @ 825F436 msgbox BattleFrontier_BattlePointExchangeServiceCorner_Text_25FB03, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F38E setvar VAR_0x8008, 256 setvar VAR_0x8009, DECOR_VENUSAUR_DOLL @@ -248,7 +248,7 @@ BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F436:: @ 825F436 BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F459:: @ 825F459 msgbox BattleFrontier_BattlePointExchangeServiceCorner_Text_25FB35, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F38E setvar VAR_0x8008, 256 setvar VAR_0x8009, DECOR_CHARIZARD_DOLL @@ -257,7 +257,7 @@ BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F459:: @ 825F459 BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F47C:: @ 825F47C msgbox BattleFrontier_BattlePointExchangeServiceCorner_Text_25FB68, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F38E setvar VAR_0x8008, 256 setvar VAR_0x8009, DECOR_BLASTOISE_DOLL @@ -291,7 +291,7 @@ BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F4B1:: @ 825F4B1 BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F51E:: @ 825F51E msgbox BattleFrontier_BattlePointExchangeServiceCorner_Text_25FB9B, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F4B1 setvar VAR_0x8008, 1 setvar VAR_0x8009, ITEM_PROTEIN @@ -300,7 +300,7 @@ BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F51E:: @ 825F51E BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F541:: @ 825F541 msgbox BattleFrontier_BattlePointExchangeServiceCorner_Text_25FBC7, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F4B1 setvar VAR_0x8008, 1 setvar VAR_0x8009, ITEM_CALCIUM @@ -309,7 +309,7 @@ BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F541:: @ 825F541 BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F564:: @ 825F564 msgbox BattleFrontier_BattlePointExchangeServiceCorner_Text_25FBF3, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F4B1 setvar VAR_0x8008, 1 setvar VAR_0x8009, ITEM_IRON @@ -318,7 +318,7 @@ BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F564:: @ 825F564 BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F587:: @ 825F587 msgbox BattleFrontier_BattlePointExchangeServiceCorner_Text_25FC1C, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F4B1 setvar VAR_0x8008, 1 setvar VAR_0x8009, ITEM_ZINC @@ -327,7 +327,7 @@ BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F587:: @ 825F587 BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F5AA:: @ 825F5AA msgbox BattleFrontier_BattlePointExchangeServiceCorner_Text_25FC45, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F4B1 setvar VAR_0x8008, 1 setvar VAR_0x8009, ITEM_CARBOS @@ -336,7 +336,7 @@ BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F5AA:: @ 825F5AA BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F5CD:: @ 825F5CD msgbox BattleFrontier_BattlePointExchangeServiceCorner_Text_25FC70, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F4B1 setvar VAR_0x8008, 1 setvar VAR_0x8009, ITEM_HP_UP @@ -373,7 +373,7 @@ BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F602:: @ 825F602 BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F690:: @ 825F690 msgbox BattleFrontier_BattlePointExchangeServiceCorner_Text_25FE17, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F602 setvar VAR_0x8008, 48 setvar VAR_0x8009, ITEM_LEFTOVERS @@ -382,7 +382,7 @@ BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F690:: @ 825F690 BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F6B3:: @ 825F6B3 msgbox BattleFrontier_BattlePointExchangeServiceCorner_Text_25FCCB, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F602 setvar VAR_0x8008, 48 setvar VAR_0x8009, ITEM_WHITE_HERB @@ -391,7 +391,7 @@ BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F6B3:: @ 825F6B3 BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F6D6:: @ 825F6D6 msgbox BattleFrontier_BattlePointExchangeServiceCorner_Text_25FCFA, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F602 setvar VAR_0x8008, 48 setvar VAR_0x8009, ITEM_QUICK_CLAW @@ -400,7 +400,7 @@ BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F6D6:: @ 825F6D6 BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F6F9:: @ 825F6F9 msgbox BattleFrontier_BattlePointExchangeServiceCorner_Text_25FD29, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F602 setvar VAR_0x8008, 48 setvar VAR_0x8009, ITEM_MENTAL_HERB @@ -409,7 +409,7 @@ BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F6F9:: @ 825F6F9 BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F71C:: @ 825F71C msgbox BattleFrontier_BattlePointExchangeServiceCorner_Text_25FC9A, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F602 setvar VAR_0x8008, 64 setvar VAR_0x8009, ITEM_BRIGHT_POWDER @@ -418,7 +418,7 @@ BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F71C:: @ 825F71C BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F73F:: @ 825F73F msgbox BattleFrontier_BattlePointExchangeServiceCorner_Text_25FD59, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F602 setvar VAR_0x8008, 64 setvar VAR_0x8009, ITEM_CHOICE_BAND @@ -427,7 +427,7 @@ BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F73F:: @ 825F73F BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F762:: @ 825F762 msgbox BattleFrontier_BattlePointExchangeServiceCorner_Text_25FD89, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F602 setvar VAR_0x8008, 64 setvar VAR_0x8009, ITEM_KINGS_ROCK @@ -436,7 +436,7 @@ BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F762:: @ 825F762 BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F785:: @ 825F785 msgbox BattleFrontier_BattlePointExchangeServiceCorner_Text_25FDB9, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F602 setvar VAR_0x8008, 64 setvar VAR_0x8009, ITEM_FOCUS_BAND @@ -445,7 +445,7 @@ BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F785:: @ 825F785 BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F7A8:: @ 825F7A8 msgbox BattleFrontier_BattlePointExchangeServiceCorner_Text_25FDE8, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F602 setvar VAR_0x8008, 64 setvar VAR_0x8009, ITEM_SCOPE_LENS diff --git a/data/maps/BattleFrontier_BattlePyramidLobby/scripts.inc b/data/maps/BattleFrontier_BattlePyramidLobby/scripts.inc index 2cf5608399..4982c152c4 100644 --- a/data/maps/BattleFrontier_BattlePyramidLobby/scripts.inc +++ b/data/maps/BattleFrontier_BattlePyramidLobby/scripts.inc @@ -170,9 +170,9 @@ BattleFrontier_BattlePyramidLobby_EventScript_250904:: @ 8250904 goto_if_eq BattleFrontier_BattlePyramidLobby_EventScript_250AC1 msgbox BattleFrontier_BattlePyramidLobby_Text_2514E6, MSGBOX_YESNO switch VAR_RESULT - case 0, BattleFrontier_BattlePyramidLobby_EventScript_250AC1 - case 1, BattleFrontier_BattlePyramidLobby_EventScript_2509A5 - case 127, BattleFrontier_BattlePyramidLobby_EventScript_250AC1 + case NO, BattleFrontier_BattlePyramidLobby_EventScript_250AC1 + case YES, BattleFrontier_BattlePyramidLobby_EventScript_2509A5 + case MULTI_B_PRESSED, BattleFrontier_BattlePyramidLobby_EventScript_250AC1 BattleFrontier_BattlePyramidLobby_EventScript_2509A5:: @ 82509A5 setvar VAR_TEMP_0, 0 diff --git a/data/maps/BattleFrontier_BattleTowerBattleRoom/scripts.inc b/data/maps/BattleFrontier_BattleTowerBattleRoom/scripts.inc index f2c6ca0ac9..7661b90895 100644 --- a/data/maps/BattleFrontier_BattleTowerBattleRoom/scripts.inc +++ b/data/maps/BattleFrontier_BattleTowerBattleRoom/scripts.inc @@ -131,9 +131,9 @@ BattleFrontier_BattleTowerBattleRoom_EventScript_241D72:: @ 8241D72 BattleFrontier_BattleTowerBattleRoom_EventScript_241D7C:: @ 8241D7C msgbox BattleFrontier_BattleTowerBattleRoom_Text_2423FC, MSGBOX_YESNO switch VAR_RESULT - case 0, BattleFrontier_BattleTowerBattleRoom_EventScript_241C8F - case 1, BattleFrontier_BattleTowerBattleRoom_EventScript_241E22 - case 127, BattleFrontier_BattleTowerBattleRoom_EventScript_241C8F + case NO, BattleFrontier_BattleTowerBattleRoom_EventScript_241C8F + case YES, BattleFrontier_BattleTowerBattleRoom_EventScript_241E22 + case MULTI_B_PRESSED, BattleFrontier_BattleTowerBattleRoom_EventScript_241C8F BattleFrontier_BattleTowerBattleRoom_EventScript_241DAA:: @ 8241DAA message BattleFrontier_BattleTowerBattleRoom_Text_24244C diff --git a/data/maps/BattleFrontier_BattleTowerBattleRoom2/scripts.inc b/data/maps/BattleFrontier_BattleTowerBattleRoom2/scripts.inc index 07883c7ca3..476caa21de 100644 --- a/data/maps/BattleFrontier_BattleTowerBattleRoom2/scripts.inc +++ b/data/maps/BattleFrontier_BattleTowerBattleRoom2/scripts.inc @@ -205,8 +205,8 @@ BattleFrontier_BattleTowerBattleRoom2_EventScript_249219:: @ 8249219 BattleFrontier_BattleTowerBattleRoom2_EventScript_249223:: @ 8249223 msgbox BattleFrontier_BattleTowerBattleRoom2_Text_2423FC, MSGBOX_YESNO switch VAR_RESULT - case 0, BattleFrontier_BattleTowerBattleRoom2_EventScript_249143 - case 1, BattleFrontier_BattleTowerBattleRoom2_EventScript_2492DB + case NO, BattleFrontier_BattleTowerBattleRoom2_EventScript_249143 + case YES, BattleFrontier_BattleTowerBattleRoom2_EventScript_2492DB case MULTI_B_PRESSED, BattleFrontier_BattleTowerBattleRoom2_EventScript_249143 BattleFrontier_BattleTowerBattleRoom2_EventScript_249251:: @ 8249251 diff --git a/data/maps/BattleFrontier_BattleTowerLobby/scripts.inc b/data/maps/BattleFrontier_BattleTowerLobby/scripts.inc index 00205942d1..353af931a4 100644 --- a/data/maps/BattleFrontier_BattleTowerLobby/scripts.inc +++ b/data/maps/BattleFrontier_BattleTowerLobby/scripts.inc @@ -278,9 +278,9 @@ BattleFrontier_BattleTowerLobby_EventScript_23E984:: @ 823E984 goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_23F0E3 msgbox BattleFrontier_BattleTowerLobby_Text_23FDC7, MSGBOX_YESNO switch VAR_RESULT - case 0, BattleFrontier_BattleTowerLobby_EventScript_23F0E3 - case 1, BattleFrontier_BattleTowerLobby_EventScript_23EA2A - case 127, BattleFrontier_BattleTowerLobby_EventScript_23F0E3 + case NO, BattleFrontier_BattleTowerLobby_EventScript_23F0E3 + case YES, BattleFrontier_BattleTowerLobby_EventScript_23EA2A + case MULTI_B_PRESSED, BattleFrontier_BattleTowerLobby_EventScript_23F0E3 BattleFrontier_BattleTowerLobby_EventScript_23EA2A:: @ 823EA2A setvar VAR_0x8004, 2 @@ -358,9 +358,9 @@ BattleFrontier_BattleTowerLobby_EventScript_23EAED:: @ 823EAED goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_23F0E3 msgbox BattleFrontier_BattleTowerLobby_Text_23FDC7, MSGBOX_YESNO switch VAR_RESULT - case 0, BattleFrontier_BattleTowerLobby_EventScript_23F0E3 - case 1, BattleFrontier_BattleTowerLobby_EventScript_23EB93 - case 127, BattleFrontier_BattleTowerLobby_EventScript_23F0E3 + case NO, BattleFrontier_BattleTowerLobby_EventScript_23F0E3 + case YES, BattleFrontier_BattleTowerLobby_EventScript_23EB93 + case MULTI_B_PRESSED, BattleFrontier_BattleTowerLobby_EventScript_23F0E3 BattleFrontier_BattleTowerLobby_EventScript_23EB93:: @ 823EB93 setvar VAR_0x8004, 2 @@ -439,9 +439,9 @@ BattleFrontier_BattleTowerLobby_EventScript_23EC59:: @ 823EC59 goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_23F0E3 msgbox BattleFrontier_BattleTowerLobby_Text_23FDC7, MSGBOX_YESNO switch VAR_RESULT - case 0, BattleFrontier_BattleTowerLobby_EventScript_23F0E3 - case 1, BattleFrontier_BattleTowerLobby_EventScript_23ECFF - case 127, BattleFrontier_BattleTowerLobby_EventScript_23F0E3 + case NO, BattleFrontier_BattleTowerLobby_EventScript_23F0E3 + case YES, BattleFrontier_BattleTowerLobby_EventScript_23ECFF + case MULTI_B_PRESSED, BattleFrontier_BattleTowerLobby_EventScript_23F0E3 BattleFrontier_BattleTowerLobby_EventScript_23ECFF:: @ 823ECFF setvar VAR_0x8004, 2 @@ -519,9 +519,9 @@ BattleFrontier_BattleTowerLobby_EventScript_23EDC2:: @ 823EDC2 goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_23F0E3 msgbox BattleFrontier_BattleTowerLobby_Text_23FDC7, MSGBOX_YESNO switch VAR_RESULT - case 0, BattleFrontier_BattleTowerLobby_EventScript_23F0E3 - case 1, BattleFrontier_BattleTowerLobby_EventScript_23EE68 - case 127, BattleFrontier_BattleTowerLobby_EventScript_23F0E3 + case NO, BattleFrontier_BattleTowerLobby_EventScript_23F0E3 + case YES, BattleFrontier_BattleTowerLobby_EventScript_23EE68 + case MULTI_B_PRESSED, BattleFrontier_BattleTowerLobby_EventScript_23F0E3 BattleFrontier_BattleTowerLobby_EventScript_23EE68:: @ 823EE68 setvar VAR_0x8004, 2 diff --git a/data/maps/BattleFrontier_Lounge3/scripts.inc b/data/maps/BattleFrontier_Lounge3/scripts.inc index 3be247099d..892c6ef815 100644 --- a/data/maps/BattleFrontier_Lounge3/scripts.inc +++ b/data/maps/BattleFrontier_Lounge3/scripts.inc @@ -18,10 +18,10 @@ BattleFrontier_Lounge3_EventScript_261DAF:: @ 8261DAF waitmessage waitbuttonpress msgbox BattleFrontier_Lounge3_Text_262A60, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq BattleFrontier_Lounge3_EventScript_261FA5 msgbox BattleFrontier_Lounge3_Text_262ABD, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq BattleFrontier_Lounge3_EventScript_261FA5 message BattleFrontier_Lounge3_Text_262B42 waitmessage diff --git a/data/maps/BattleFrontier_Lounge5/scripts.inc b/data/maps/BattleFrontier_Lounge5/scripts.inc index 391dc673da..a801cb1078 100644 --- a/data/maps/BattleFrontier_Lounge5/scripts.inc +++ b/data/maps/BattleFrontier_Lounge5/scripts.inc @@ -5,7 +5,7 @@ BattleFrontier_Lounge5_EventScript_NatureGirl:: @ 82645C6 lock faceplayer msgbox BattleFrontier_Lounge5_Text_NatureGirlGreeting, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq BattleFrontier_Lounge5_EventScript_NatureGirlNoneShown special ChoosePartyMon waitstate diff --git a/data/maps/BattleFrontier_Lounge6/scripts.inc b/data/maps/BattleFrontier_Lounge6/scripts.inc index cef384958b..09690c8d31 100644 --- a/data/maps/BattleFrontier_Lounge6/scripts.inc +++ b/data/maps/BattleFrontier_Lounge6/scripts.inc @@ -10,7 +10,7 @@ BattleFrontier_Lounge6_EventScript_264FED:: @ 8264FED specialvar VAR_RESULT, GetInGameTradeSpeciesInfo copyvar VAR_0x8009, VAR_RESULT msgbox BattleFrontier_Lounge6_Text_26508D, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq BattleFrontier_Lounge6_EventScript_26506B special ChoosePartyMon waitstate diff --git a/data/maps/BattleFrontier_Lounge7/scripts.inc b/data/maps/BattleFrontier_Lounge7/scripts.inc index b874c5d4e1..3605b9bf1d 100644 --- a/data/maps/BattleFrontier_Lounge7/scripts.inc +++ b/data/maps/BattleFrontier_Lounge7/scripts.inc @@ -250,7 +250,7 @@ BattleFrontier_Lounge7_EventScript_26564F:: @ 826564F buffernumberstring 1, VAR_0x8008 copyvar VAR_0x8004, VAR_TEMP_C msgbox BattleFrontier_Lounge7_Text_265921, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq BattleFrontier_Lounge7_EventScript_2656CA specialvar VAR_TEMP_1, GetFrontierBattlePoints compare VAR_TEMP_1, VAR_0x8008 diff --git a/data/maps/BattleFrontier_OutsideWest/scripts.inc b/data/maps/BattleFrontier_OutsideWest/scripts.inc index 5d4d55ab4e..41d52ba7c2 100644 --- a/data/maps/BattleFrontier_OutsideWest/scripts.inc +++ b/data/maps/BattleFrontier_OutsideWest/scripts.inc @@ -35,7 +35,7 @@ BattleFrontier_OutsideWest_EventScript_23D44E:: @ 823D44E BattleFrontier_OutsideWest_EventScript_23D458:: @ 823D458 msgbox BattleFrontier_OutsideWest_Text_23D8F2, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq BattleFrontier_OutsideWest_EventScript_23D4AE msgbox BattleFrontier_OutsideWest_Text_23D94B, MSGBOX_DEFAULT call BattleFrontier_OutsideWest_EventScript_23D4BA @@ -46,7 +46,7 @@ BattleFrontier_OutsideWest_EventScript_23D458:: @ 823D458 BattleFrontier_OutsideWest_EventScript_23D483:: @ 823D483 msgbox BattleFrontier_OutsideWest_Text_23D90E, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq BattleFrontier_OutsideWest_EventScript_23D4AE msgbox BattleFrontier_OutsideWest_Text_23D94B, MSGBOX_DEFAULT call BattleFrontier_OutsideWest_EventScript_23D4BA diff --git a/data/maps/BattleFrontier_RankingHall/scripts.inc b/data/maps/BattleFrontier_RankingHall/scripts.inc index 5f8a6c44e9..86682522cb 100644 --- a/data/maps/BattleFrontier_RankingHall/scripts.inc +++ b/data/maps/BattleFrontier_RankingHall/scripts.inc @@ -86,7 +86,7 @@ BattleFrontier_RankingHall_EventScript_25E54A:: @ 825E54A lock faceplayer msgbox BattleFrontier_RankingHall_Text_25E666, MSGBOX_YESNO - compare VAR_RESULT, 1 + compare VAR_RESULT, YES goto_if_eq BattleFrontier_RankingHall_EventScript_25E569 msgbox BattleFrontier_RankingHall_Text_25E6B6, MSGBOX_DEFAULT release diff --git a/data/maps/BirthIsland_Harbor/scripts.inc b/data/maps/BirthIsland_Harbor/scripts.inc index b12123c943..f19b373f5a 100644 --- a/data/maps/BirthIsland_Harbor/scripts.inc +++ b/data/maps/BirthIsland_Harbor/scripts.inc @@ -5,7 +5,7 @@ BirthIsland_Harbor_EventScript_Sailor:: @ 826805D lock faceplayer msgbox BirthIsland_Harbor_Text_SailorReturn, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq BirthIsland_Harbor_EventScript_AsYouLike msgbox EventTicket_Text_SailHome, MSGBOX_DEFAULT closemessage diff --git a/data/maps/DewfordTown/scripts.inc b/data/maps/DewfordTown/scripts.inc index 862d91bf36..9d6011a1ff 100644 --- a/data/maps/DewfordTown/scripts.inc +++ b/data/maps/DewfordTown/scripts.inc @@ -42,7 +42,7 @@ DewfordTown_EventScript_1E957A:: @ 81E957A DewfordTown_EventScript_1E9585:: @ 81E9585 msgbox DewfordTown_Text_1E9B24, MSGBOX_YESNO - compare VAR_RESULT, 1 + compare VAR_RESULT, YES goto_if_eq DewfordTown_EventScript_1E95A2 msgbox DewfordTown_Text_1E9BD9, MSGBOX_DEFAULT release @@ -75,9 +75,9 @@ DewfordTown_EventScript_1E95D5:: @ 81E95D5 faceplayer goto_if_set FLAG_RECEIVED_OLD_ROD, DewfordTown_EventScript_1E962A msgbox DewfordTown_Text_1E9DD1, MSGBOX_YESNO - compare VAR_RESULT, 1 + compare VAR_RESULT, YES goto_if_eq DewfordTown_EventScript_1E95FF - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq DewfordTown_EventScript_1E9620 end @@ -595,9 +595,9 @@ DewfordTown_EventScript_1E9922:: @ 81E9922 faceplayer call DewfordTown_EventScript_271E8B msgbox DewfordTown_Text_1EA136, MSGBOX_YESNO - compare VAR_RESULT, 1 + compare VAR_RESULT, YES goto_if_eq DewfordTown_EventScript_1E9948 - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq DewfordTown_EventScript_1E9952 end diff --git a/data/maps/DewfordTown_Hall/scripts.inc b/data/maps/DewfordTown_Hall/scripts.inc index 9790753cfe..e6eeec0100 100644 --- a/data/maps/DewfordTown_Hall/scripts.inc +++ b/data/maps/DewfordTown_Hall/scripts.inc @@ -31,9 +31,9 @@ DewfordTown_Hall_EventScript_1FD50A:: @ 81FD50A call DewfordTown_Hall_EventScript_271E8B special sub_811EF6C msgbox DewfordTown_Hall_Text_1FD948, MSGBOX_YESNO - compare VAR_RESULT, 1 + compare VAR_RESULT, YES goto_if_eq DewfordTown_Hall_EventScript_1FD533 - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq DewfordTown_Hall_EventScript_1FD53D end diff --git a/data/maps/FallarborTown_BattleTentBattleRoom/scripts.inc b/data/maps/FallarborTown_BattleTentBattleRoom/scripts.inc index b63846abd7..1f89899557 100644 --- a/data/maps/FallarborTown_BattleTentBattleRoom/scripts.inc +++ b/data/maps/FallarborTown_BattleTentBattleRoom/scripts.inc @@ -129,9 +129,9 @@ FallarborTown_BattleTentBattleRoom_EventScript_200A2A:: @ 8200A2A FallarborTown_BattleTentBattleRoom_EventScript_200A78:: @ 8200A78 msgbox FallarborTown_BattleTentBattleRoom_Text_257E6B, MSGBOX_YESNO switch VAR_RESULT - case 0, FallarborTown_BattleTentBattleRoom_EventScript_200A2A - case 1, FallarborTown_BattleTentBattleRoom_EventScript_200B51 - case 127, FallarborTown_BattleTentBattleRoom_EventScript_200A2A + case NO, FallarborTown_BattleTentBattleRoom_EventScript_200A2A + case YES, FallarborTown_BattleTentBattleRoom_EventScript_200B51 + case MULTI_B_PRESSED, FallarborTown_BattleTentBattleRoom_EventScript_200A2A FallarborTown_BattleTentBattleRoom_EventScript_200AA6:: @ 8200AA6 message FallarborTown_BattleTentBattleRoom_Text_257E9E diff --git a/data/maps/FallarborTown_BattleTentLobby/scripts.inc b/data/maps/FallarborTown_BattleTentLobby/scripts.inc index 3f6eec3744..5823f06112 100644 --- a/data/maps/FallarborTown_BattleTentLobby/scripts.inc +++ b/data/maps/FallarborTown_BattleTentLobby/scripts.inc @@ -169,9 +169,9 @@ FallarborTown_BattleTentLobby_EventScript_20005D:: @ 820005D goto_if_eq FallarborTown_BattleTentLobby_EventScript_2001C2 msgbox FallarborTown_BattleTentLobby_Text_2C4B35, MSGBOX_YESNO switch VAR_RESULT - case 0, FallarborTown_BattleTentLobby_EventScript_2001C2 - case 1, FallarborTown_BattleTentLobby_EventScript_2000E2 - case 127, FallarborTown_BattleTentLobby_EventScript_2001C2 + case NO, FallarborTown_BattleTentLobby_EventScript_2001C2 + case YES, FallarborTown_BattleTentLobby_EventScript_2000E2 + case MULTI_B_PRESSED, FallarborTown_BattleTentLobby_EventScript_2001C2 FallarborTown_BattleTentLobby_EventScript_2000E2:: @ 82000E2 setvar VAR_TEMP_0, 0 diff --git a/data/maps/FallarborTown_MoveRelearnersHouse/scripts.inc b/data/maps/FallarborTown_MoveRelearnersHouse/scripts.inc index 7ef8b65973..788ee088d0 100644 --- a/data/maps/FallarborTown_MoveRelearnersHouse/scripts.inc +++ b/data/maps/FallarborTown_MoveRelearnersHouse/scripts.inc @@ -17,7 +17,7 @@ FallarborTown_MoveRelearnersHouse_EventScript_AskTeachMove:: @ 82013A8 goto_if_eq FallarborTown_MoveRelearnersHouse_EventScript_ComeBackWithHeartScale msgbox FallarborTown_MoveRelearnersHouse_Text_ThatsAHeartScaleWantMeToTeachMove, MSGBOX_YESNO switch VAR_RESULT - case 0, FallarborTown_MoveRelearnersHouse_EventScript_ComeBackWithHeartScale + case NO, FallarborTown_MoveRelearnersHouse_EventScript_ComeBackWithHeartScale goto FallarborTown_MoveRelearnersHouse_EventScript_ChooseMon end diff --git a/data/maps/FarawayIsland_Entrance/scripts.inc b/data/maps/FarawayIsland_Entrance/scripts.inc index f8906c685b..33b2a294c9 100644 --- a/data/maps/FarawayIsland_Entrance/scripts.inc +++ b/data/maps/FarawayIsland_Entrance/scripts.inc @@ -20,7 +20,7 @@ FarawayIsland_Entrance_EventScript_Sailor:: @ 8267CA2 lock faceplayer msgbox FarawayIsland_Entrance_Text_SailorReturn, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq FarawayIsland_Entrance_EventScript_AsYouLike msgbox EventTicket_Text_SailHome, MSGBOX_DEFAULT closemessage diff --git a/data/maps/FortreeCity/scripts.inc b/data/maps/FortreeCity/scripts.inc index 34853336d8..716a511b00 100644 --- a/data/maps/FortreeCity/scripts.inc +++ b/data/maps/FortreeCity/scripts.inc @@ -64,7 +64,7 @@ FortreeCity_EventScript_1E2614:: @ 81E2614 FortreeCity_EventScript_1E2630:: @ 81E2630 msgbox FortreeCity_Text_1E2A08, MSGBOX_YESNO - compare VAR_RESULT, 1 + compare VAR_RESULT, YES goto_if_eq FortreeCity_EventScript_1E2645 release end diff --git a/data/maps/FortreeCity_House1/scripts.inc b/data/maps/FortreeCity_House1/scripts.inc index 260a75a782..9ef94b12b0 100644 --- a/data/maps/FortreeCity_House1/scripts.inc +++ b/data/maps/FortreeCity_House1/scripts.inc @@ -10,7 +10,7 @@ FortreeCity_House1_EventScript_2162BB:: @ 82162BB specialvar VAR_RESULT, GetInGameTradeSpeciesInfo copyvar VAR_0x8009, VAR_RESULT msgbox FortreeCity_House1_Text_21637B, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq FortreeCity_House1_EventScript_21633D special ChoosePartyMon waitstate diff --git a/data/maps/LavaridgeTown/scripts.inc b/data/maps/LavaridgeTown/scripts.inc index ee689ed299..a964d42e57 100644 --- a/data/maps/LavaridgeTown/scripts.inc +++ b/data/maps/LavaridgeTown/scripts.inc @@ -248,10 +248,10 @@ LavaridgeTown_EventScript_1EA744:: @ 81EA744 faceplayer goto_if_set FLAG_RECEIVED_LAVARIDGE_EGG, LavaridgeTown_EventScript_1EA787 msgbox LavaridgeTown_Text_1EAB80, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq LavaridgeTown_EventScript_1EA79B getpartysize - compare VAR_RESULT, 6 + compare VAR_RESULT, PARTY_SIZE goto_if_eq LavaridgeTown_EventScript_1EA791 msgbox LavaridgeTown_Text_1EACC0, MSGBOX_DEFAULT setflag FLAG_RECEIVED_LAVARIDGE_EGG diff --git a/data/maps/LilycoveCity/scripts.inc b/data/maps/LilycoveCity/scripts.inc index ed0239819c..be8a7a521a 100644 --- a/data/maps/LilycoveCity/scripts.inc +++ b/data/maps/LilycoveCity/scripts.inc @@ -241,7 +241,7 @@ LilycoveCity_EventScript_1E2DF8:: @ 81E2DF8 playbgm MUS_GIRL_SUP, 1 call_if_set FLAG_DECLINED_RIVAL_BATTLE_LILYCOVE, LilycoveCity_EventScript_1E2E48 call_if_unset FLAG_DECLINED_RIVAL_BATTLE_LILYCOVE, LilycoveCity_EventScript_1E2E51 - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq LilycoveCity_EventScript_1E2E5A msgbox LilycoveCity_Text_1E3234, MSGBOX_DEFAULT switch VAR_STARTER_MON @@ -270,7 +270,7 @@ LilycoveCity_EventScript_1E2E6B:: @ 81E2E6B playbgm MUS_BOY_SUP, 1 call_if_set FLAG_DECLINED_RIVAL_BATTLE_LILYCOVE, LilycoveCity_EventScript_1E2EBB call_if_unset FLAG_DECLINED_RIVAL_BATTLE_LILYCOVE, LilycoveCity_EventScript_1E2EC4 - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq LilycoveCity_EventScript_1E2ECD msgbox LilycoveCity_Text_1E373C, MSGBOX_DEFAULT switch VAR_STARTER_MON @@ -405,9 +405,9 @@ LilycoveCity_EventScript_1E302D:: @ 81E302D lock faceplayer msgbox LilycoveCity_Text_1E4774, MSGBOX_YESNO - compare VAR_RESULT, 1 + compare VAR_RESULT, YES call_if_eq LilycoveCity_EventScript_1E304F - compare VAR_RESULT, 0 + compare VAR_RESULT, NO call_if_eq LilycoveCity_EventScript_1E3058 release end diff --git a/data/maps/LilycoveCity_ContestLobby/scripts.inc b/data/maps/LilycoveCity_ContestLobby/scripts.inc index 3b470b8a6c..29162f3e06 100644 --- a/data/maps/LilycoveCity_ContestLobby/scripts.inc +++ b/data/maps/LilycoveCity_ContestLobby/scripts.inc @@ -44,9 +44,9 @@ LilycoveCity_ContestLobby_EventScript_21A264:: @ 821A264 drawcontestwinner 0 lockall msgbox LilycoveCity_ContestLobby_Text_21AE78, MSGBOX_YESNO - compare VAR_RESULT, 1 + compare VAR_RESULT, YES goto_if_eq LilycoveCity_ContestLobby_EventScript_21A2AA - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq LilycoveCity_ContestLobby_EventScript_21A2E4 releaseall end @@ -69,7 +69,7 @@ LilycoveCity_ContestLobby_EventScript_21A2AA:: @ 821A2AA LilycoveCity_ContestLobby_EventScript_21A2E4:: @ 821A2E4 msgbox LilycoveCity_ContestLobby_Text_21B0BC, MSGBOX_YESNO - compare VAR_RESULT, 1 + compare VAR_RESULT, YES goto_if_eq LilycoveCity_ContestLobby_EventScript_21A2AA msgbox LilycoveCity_ContestLobby_Text_21B132, MSGBOX_DEFAULT closemessage @@ -217,9 +217,9 @@ LilycoveCity_ContestLobby_EventScript_21A436:: @ 821A436 fadescreen 1 drawcontestwinner 0 msgbox LilycoveCity_ContestLobby_Text_21AE78, MSGBOX_YESNO - compare VAR_RESULT, 1 + compare VAR_RESULT, YES goto_if_eq LilycoveCity_ContestLobby_EventScript_21A47A - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq LilycoveCity_ContestLobby_EventScript_21A4B4 end @@ -241,7 +241,7 @@ LilycoveCity_ContestLobby_EventScript_21A47A:: @ 821A47A LilycoveCity_ContestLobby_EventScript_21A4B4:: @ 821A4B4 msgbox LilycoveCity_ContestLobby_Text_21B0BC, MSGBOX_YESNO - compare VAR_RESULT, 1 + compare VAR_RESULT, YES goto_if_eq LilycoveCity_ContestLobby_EventScript_21A47A msgbox LilycoveCity_ContestLobby_Text_21B132, MSGBOX_DEFAULT closemessage @@ -640,7 +640,7 @@ LilycoveCity_ContestLobby_EventScript_21A819:: @ 821A819 LilycoveCity_ContestLobby_EventScript_21A856:: @ 821A856 msgbox LilycoveCity_ContestLobby_Text_27BD17, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq LilycoveCity_ContestLobby_EventScript_21A97F call Common_EventScript_SaveGame compare VAR_RESULT, 0 diff --git a/data/maps/LilycoveCity_DepartmentStore_1F/scripts.inc b/data/maps/LilycoveCity_DepartmentStore_1F/scripts.inc index 36057b3bbe..3f9378b7a2 100644 --- a/data/maps/LilycoveCity_DepartmentStore_1F/scripts.inc +++ b/data/maps/LilycoveCity_DepartmentStore_1F/scripts.inc @@ -13,7 +13,7 @@ LilycoveCity_DepartmentStore_1F_EventScript_21F69C:: @ 821F69C goto_if_ne LilycoveCity_DepartmentStore_1F_EventScript_21F7F7 goto_if_set FLAG_DAILY_PICKED_LOTO_TICKET, LilycoveCity_DepartmentStore_1F_EventScript_21F78D msgbox LilycoveCity_DepartmentStore_1F_Text_2A6390, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq LilycoveCity_DepartmentStore_1F_EventScript_21F797 setflag FLAG_DAILY_PICKED_LOTO_TICKET message LilycoveCity_DepartmentStore_1F_Text_2A64C8 diff --git a/data/maps/LilycoveCity_Harbor/scripts.inc b/data/maps/LilycoveCity_Harbor/scripts.inc index 5ef4852d33..3d087c9145 100644 --- a/data/maps/LilycoveCity_Harbor/scripts.inc +++ b/data/maps/LilycoveCity_Harbor/scripts.inc @@ -87,7 +87,7 @@ LilycoveCity_Harbor_EventScript_GoToFarawayIsland:: @ 821E139 LilycoveCity_Harbor_EventScript_GoToSlateport:: @ 821E149 msgbox LilycoveCity_Harbor_Text_SlateportItIs, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq LilycoveCity_Harbor_EventScript_FerryDestinationChangeMind setvar VAR_PORTHOLE_STATE, 5 call LilycoveCity_Harbor_EventScript_BoardFerry @@ -98,7 +98,7 @@ LilycoveCity_Harbor_EventScript_GoToSlateport:: @ 821E149 LilycoveCity_Harbor_EventScript_GoToBattleFrontier:: @ 821E171 msgbox LilycoveCity_Harbor_Text_BattleFrontierItIs, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq LilycoveCity_Harbor_EventScript_FerryDestinationChangeMind call LilycoveCity_Harbor_EventScript_BoardFerry warp MAP_BATTLE_FRONTIER_OUTSIDE_WEST, 255, 19, 67 @@ -390,7 +390,7 @@ LilycoveCity_Harbor_EventScript_NoTicket:: @ 821E56B @ Unused LilycoveCity_Harbor_EventScript_GoToSlateportUnused:: @ 821E575 msgbox LilycoveCity_Harbor_Text_SlateportItIs, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq LilycoveCity_Harbor_EventScript_FerryDestinationChangeMind setvar VAR_PORTHOLE_STATE, 5 call LilycoveCity_Harbor_EventScript_BoardFerry @@ -402,7 +402,7 @@ LilycoveCity_Harbor_EventScript_GoToSlateportUnused:: @ 821E575 @ Unused LilycoveCity_Harbor_EventScript_GoToBattleFrontierUnused:: @ 821E59D msgbox LilycoveCity_Harbor_Text_BattleFrontierItIs, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq LilycoveCity_Harbor_EventScript_FerryDestinationChangeMind call LilycoveCity_Harbor_EventScript_BoardFerry warp MAP_BATTLE_FRONTIER_OUTSIDE_WEST, 255, 19, 67 diff --git a/data/maps/LilycoveCity_House3/scripts.inc b/data/maps/LilycoveCity_House3/scripts.inc index 7d949fd8b7..1f4cef4330 100644 --- a/data/maps/LilycoveCity_House3/scripts.inc +++ b/data/maps/LilycoveCity_House3/scripts.inc @@ -11,7 +11,7 @@ LilycoveCity_House3_EventScript_21EE4B:: @ 821EE4B lock faceplayer msgbox LilycoveCity_House3_Text_21EF99, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq LilycoveCity_House3_EventScript_21EE75 msgbox LilycoveCity_House3_Text_21F0F8, MSGBOX_DEFAULT closemessage diff --git a/data/maps/LilycoveCity_LilycoveMuseum_1F/scripts.inc b/data/maps/LilycoveCity_LilycoveMuseum_1F/scripts.inc index 51e9129f94..8075215aaf 100644 --- a/data/maps/LilycoveCity_LilycoveMuseum_1F/scripts.inc +++ b/data/maps/LilycoveCity_LilycoveMuseum_1F/scripts.inc @@ -23,9 +23,9 @@ LilycoveCity_LilycoveMuseum_1F_EventScript_218CEC:: @ 8218CEC LilycoveCity_LilycoveMuseum_1F_EventScript_218CF5:: @ 8218CF5 msgbox LilycoveCity_LilycoveMuseum_1F_Text_218F98, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq LilycoveCity_LilycoveMuseum_1F_EventScript_218D14 - compare VAR_RESULT, 1 + compare VAR_RESULT, YES goto_if_eq LilycoveCity_LilycoveMuseum_1F_EventScript_218D1E end diff --git a/data/maps/LilycoveCity_MoveDeletersHouse/scripts.inc b/data/maps/LilycoveCity_MoveDeletersHouse/scripts.inc index bf34bd0494..7d9e0f2396 100644 --- a/data/maps/LilycoveCity_MoveDeletersHouse/scripts.inc +++ b/data/maps/LilycoveCity_MoveDeletersHouse/scripts.inc @@ -7,8 +7,8 @@ LilycoveCity_MoveDeletersHouse_EventScript_MoveDeleter:: @ 821EA0B waitmovement 0 msgbox LilycoveCity_MoveDeletersHouse_Text_ICanMakeMonForgetMove, MSGBOX_YESNO switch VAR_RESULT - case 1, LilycoveCity_MoveDeletersHouse_EventScript_ChooseMonAndMoveToForget - case 0, LilycoveCity_MoveDeletersHouse_EventScript_ComeAgain + case YES, LilycoveCity_MoveDeletersHouse_EventScript_ChooseMonAndMoveToForget + case NO, LilycoveCity_MoveDeletersHouse_EventScript_ComeAgain releaseall end @@ -33,8 +33,8 @@ LilycoveCity_MoveDeletersHouse_EventScript_ChooseMonAndMoveToForget:: @ 821EA3B special BufferMoveDeleterNicknameAndMove msgbox LilycoveCity_MoveDeletersHouse_Text_MonsMoveShouldBeForgotten, MSGBOX_YESNO switch VAR_RESULT - case 1, LilycoveCity_MoveDeletersHouse_EventScript_TryForgetMove - case 0, LilycoveCity_MoveDeletersHouse_EventScript_ComeAgain + case YES, LilycoveCity_MoveDeletersHouse_EventScript_TryForgetMove + case NO, LilycoveCity_MoveDeletersHouse_EventScript_ComeAgain releaseall end diff --git a/data/maps/LilycoveCity_PokemonTrainerFanClub/scripts.inc b/data/maps/LilycoveCity_PokemonTrainerFanClub/scripts.inc index 8b0cf40acd..6348829ba0 100644 --- a/data/maps/LilycoveCity_PokemonTrainerFanClub/scripts.inc +++ b/data/maps/LilycoveCity_PokemonTrainerFanClub/scripts.inc @@ -532,9 +532,9 @@ LilycoveCity_PokemonTrainerFanClub_EventScript_21CDEE:: @ 821CDEE setvar VAR_0x8004, 8 special BufferStreakTrainerText msgbox LilycoveCity_PokemonTrainerFanClub_Text_281C3D, MSGBOX_YESNO - compare VAR_RESULT, 1 + compare VAR_RESULT, YES goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_21CEC6 - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_21CE15 end @@ -577,9 +577,9 @@ LilycoveCity_PokemonTrainerFanClub_EventScript_21CE9F:: @ 821CE9F setvar VAR_0x8004, 8 special BufferStreakTrainerText msgbox LilycoveCity_PokemonTrainerFanClub_Text_281CCD, MSGBOX_YESNO - compare VAR_RESULT, 1 + compare VAR_RESULT, YES goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_21CEC6 - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_21CE4D end diff --git a/data/maps/LittlerootTown_ProfessorBirchsLab/scripts.inc b/data/maps/LittlerootTown_ProfessorBirchsLab/scripts.inc index f9c4b46d71..bdf05dd923 100644 --- a/data/maps/LittlerootTown_ProfessorBirchsLab/scripts.inc +++ b/data/maps/LittlerootTown_ProfessorBirchsLab/scripts.inc @@ -99,9 +99,9 @@ LittlerootTown_ProfessorBirchsLab_EventScript_1F9DDB:: @ 81F9DDB playfanfare MUS_FANFA4 waitfanfare msgbox LittlerootTown_ProfessorBirchsLab_Text_1FA8B1, MSGBOX_YESNO - compare VAR_RESULT, 1 + compare VAR_RESULT, YES goto_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_1F9E07 - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_1F9E17 end @@ -113,9 +113,9 @@ LittlerootTown_ProfessorBirchsLab_EventScript_1F9E07:: @ 81F9E07 LittlerootTown_ProfessorBirchsLab_EventScript_1F9E17:: @ 81F9E17 msgbox LittlerootTown_ProfessorBirchsLab_Text_1FA8F6, MSGBOX_YESNO - compare VAR_RESULT, 1 + compare VAR_RESULT, YES goto_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_1F9E36 - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_1F9E48 end @@ -128,9 +128,9 @@ LittlerootTown_ProfessorBirchsLab_EventScript_1F9E36:: @ 81F9E36 LittlerootTown_ProfessorBirchsLab_EventScript_1F9E48:: @ 81F9E48 msgbox LittlerootTown_ProfessorBirchsLab_Text_1FAA35, MSGBOX_YESNO - compare VAR_RESULT, 1 + compare VAR_RESULT, YES goto_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_1F9E36 - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_1F9E48 end @@ -290,7 +290,7 @@ LittlerootTown_ProfessorBirchsLab_EventScript_1F9FBB:: @ 81F9FBB waitmovement 0 showmonpic SPECIES_CYNDAQUIL, 10, 3 msgbox LittlerootTown_ProfessorBirchsLab_Text_1FB7F6, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_1FA061 goto LittlerootTown_ProfessorBirchsLab_EventScript_1FA06C end @@ -303,7 +303,7 @@ LittlerootTown_ProfessorBirchsLab_EventScript_1F9FEF:: @ 81F9FEF waitmovement 0 showmonpic SPECIES_TOTODILE, 10, 3 msgbox LittlerootTown_ProfessorBirchsLab_Text_1FB869, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_1FA061 goto LittlerootTown_ProfessorBirchsLab_EventScript_1FA10D end @@ -316,7 +316,7 @@ LittlerootTown_ProfessorBirchsLab_EventScript_1FA023:: @ 81FA023 waitmovement 0 showmonpic SPECIES_CHIKORITA, 10, 3 msgbox LittlerootTown_ProfessorBirchsLab_Text_1FB8E0, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_1FA061 goto LittlerootTown_ProfessorBirchsLab_EventScript_1FA1AE end @@ -348,7 +348,7 @@ LittlerootTown_ProfessorBirchsLab_EventScript_1FA0A1:: @ 81FA0A1 call LittlerootTown_ProfessorBirchsLab_EventScript_1FA24F removeobject 4 msgbox gText_NicknameThisPokemon, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_1FA0FD call Common_EventScript_GetGiftMonPartySlot call Common_EventScript_NameReceivedPartyMon @@ -359,7 +359,7 @@ LittlerootTown_ProfessorBirchsLab_EventScript_1FA0CC:: @ 81FA0CC call LittlerootTown_ProfessorBirchsLab_EventScript_1FA24F removeobject 4 msgbox gText_NicknameThisPokemon, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_1FA0F2 call Common_EventScript_NameReceivedBoxMon goto LittlerootTown_ProfessorBirchsLab_EventScript_1FA0F2 @@ -393,7 +393,7 @@ LittlerootTown_ProfessorBirchsLab_EventScript_1FA142:: @ 81FA142 call LittlerootTown_ProfessorBirchsLab_EventScript_1FA24F removeobject 5 msgbox gText_NicknameThisPokemon, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_1FA19E call Common_EventScript_GetGiftMonPartySlot call Common_EventScript_NameReceivedPartyMon @@ -404,7 +404,7 @@ LittlerootTown_ProfessorBirchsLab_EventScript_1FA16D:: @ 81FA16D call LittlerootTown_ProfessorBirchsLab_EventScript_1FA24F removeobject 5 msgbox gText_NicknameThisPokemon, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_1FA193 call Common_EventScript_NameReceivedBoxMon goto LittlerootTown_ProfessorBirchsLab_EventScript_1FA193 @@ -438,7 +438,7 @@ LittlerootTown_ProfessorBirchsLab_EventScript_1FA1E3:: @ 81FA1E3 call LittlerootTown_ProfessorBirchsLab_EventScript_1FA24F removeobject 6 msgbox gText_NicknameThisPokemon, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_1FA23F call Common_EventScript_GetGiftMonPartySlot call Common_EventScript_NameReceivedPartyMon @@ -449,7 +449,7 @@ LittlerootTown_ProfessorBirchsLab_EventScript_1FA20E:: @ 81FA20E call LittlerootTown_ProfessorBirchsLab_EventScript_1FA24F removeobject 6 msgbox gText_NicknameThisPokemon, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_1FA234 call Common_EventScript_NameReceivedBoxMon goto LittlerootTown_ProfessorBirchsLab_EventScript_1FA234 diff --git a/data/maps/MauvilleCity/scripts.inc b/data/maps/MauvilleCity/scripts.inc index 52ff2237c5..7b853d5966 100644 --- a/data/maps/MauvilleCity/scripts.inc +++ b/data/maps/MauvilleCity/scripts.inc @@ -103,9 +103,9 @@ MauvilleCity_EventScript_1DF452:: @ 81DF452 end MauvilleCity_EventScript_1DF4AD:: @ 81DF4AD - compare VAR_RESULT, 1 + compare VAR_RESULT, YES call_if_eq MauvilleCity_EventScript_1DF63A - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq MauvilleCity_EventScript_1DF683 closemessage switch VAR_FACING diff --git a/data/maps/MauvilleCity_GameCorner/scripts.inc b/data/maps/MauvilleCity_GameCorner/scripts.inc index 6f6366c595..98f4a2a774 100644 --- a/data/maps/MauvilleCity_GameCorner/scripts.inc +++ b/data/maps/MauvilleCity_GameCorner/scripts.inc @@ -151,7 +151,7 @@ MauvilleCity_GameCorner_EventScript_20FD83:: @ 820FD83 MauvilleCity_GameCorner_EventScript_20FD91:: @ 820FD91 msgbox MauvilleCity_GameCorner_Text_210705, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq MauvilleCity_GameCorner_EventScript_20FE92 switch VAR_TEMP_1 case 1, MauvilleCity_GameCorner_EventScript_20FDCB @@ -290,7 +290,7 @@ MauvilleCity_GameCorner_EventScript_20FF77:: @ 820FF77 MauvilleCity_GameCorner_EventScript_20FF8A:: @ 820FF8A special BufferTMHMMoveName msgbox MauvilleCity_GameCorner_Text_210629, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq MauvilleCity_GameCorner_EventScript_210118 switch VAR_TEMP_1 case 1, MauvilleCity_GameCorner_EventScript_20FFDD @@ -404,7 +404,7 @@ MauvilleCity_GameCorner_EventScript_210137:: @ 8210137 faceplayer goto_if_set FLAG_RECEIVED_STARTER_DOLL, MauvilleCity_GameCorner_EventScript_210213 msgbox MauvilleCity_GameCorner_Text_210750, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq MauvilleCity_GameCorner_EventScript_210209 switch VAR_STARTER_MON case 0, MauvilleCity_GameCorner_EventScript_21017C diff --git a/data/maps/MauvilleCity_House2/scripts.inc b/data/maps/MauvilleCity_House2/scripts.inc index b683b8c155..e0b6a404f4 100644 --- a/data/maps/MauvilleCity_House2/scripts.inc +++ b/data/maps/MauvilleCity_House2/scripts.inc @@ -19,9 +19,9 @@ MauvilleCity_House2_EventScript_210C82:: @ 8210C82 applymovement VAR_LAST_TALKED, Common_Movement_Delay48 waitmovement 0 msgbox MauvilleCity_House2_Text_210D76, MSGBOX_YESNO - compare VAR_RESULT, 1 + compare VAR_RESULT, YES goto_if_eq MauvilleCity_House2_EventScript_210CB8 - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq MauvilleCity_House2_EventScript_210CE4 end diff --git a/data/maps/MirageTower_4F/scripts.inc b/data/maps/MirageTower_4F/scripts.inc index 5bb5308c3b..3c2c593555 100644 --- a/data/maps/MirageTower_4F/scripts.inc +++ b/data/maps/MirageTower_4F/scripts.inc @@ -5,7 +5,7 @@ MirageTower_4F_EventScript_23AD48:: @ 823AD48 lock faceplayer msgbox MirageTower_4F_Text_23ADF9, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq MirageTower_4F_EventScript_23AD7F giveitem_std ITEM_ROOT_FOSSIL closemessage @@ -26,7 +26,7 @@ MirageTower_4F_EventScript_23AD89:: @ 823AD89 lock faceplayer msgbox MirageTower_4F_Text_23AE98, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq MirageTower_4F_EventScript_23ADC0 giveitem_std ITEM_CLAW_FOSSIL closemessage diff --git a/data/maps/MossdeepCity/scripts.inc b/data/maps/MossdeepCity/scripts.inc index cbdec6b338..3247df143c 100644 --- a/data/maps/MossdeepCity/scripts.inc +++ b/data/maps/MossdeepCity/scripts.inc @@ -226,7 +226,7 @@ MossdeepCity_EventScript_1E4C26:: @ 81E4C26 faceplayer goto_if_set FLAG_RECEIVED_KINGS_ROCK, MossdeepCity_EventScript_1E4C68 msgbox MossdeepCity_Text_1E4CED, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq MossdeepCity_EventScript_1E4C72 msgbox MossdeepCity_Text_1E4D5B, MSGBOX_DEFAULT giveitem_std ITEM_KINGS_ROCK diff --git a/data/maps/MossdeepCity_House3/scripts.inc b/data/maps/MossdeepCity_House3/scripts.inc index 257b7cc827..1aa4e85df8 100644 --- a/data/maps/MossdeepCity_House3/scripts.inc +++ b/data/maps/MossdeepCity_House3/scripts.inc @@ -6,7 +6,7 @@ MossdeepCity_House3_EventScript_2225C3:: @ 82225C3 faceplayer goto_if_set FLAG_RECEIVED_SUPER_ROD, MossdeepCity_House3_EventScript_222602 msgbox MossdeepCity_House3_Text_222616, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq MossdeepCity_House3_EventScript_22260C msgbox MossdeepCity_House3_Text_2226B6, MSGBOX_DEFAULT giveitem_std ITEM_SUPER_ROD diff --git a/data/maps/MossdeepCity_SpaceCenter_2F/scripts.inc b/data/maps/MossdeepCity_SpaceCenter_2F/scripts.inc index e899192d3b..ddce7efc8e 100644 --- a/data/maps/MossdeepCity_SpaceCenter_2F/scripts.inc +++ b/data/maps/MossdeepCity_SpaceCenter_2F/scripts.inc @@ -37,7 +37,7 @@ MossdeepCity_SpaceCenter_2F_EventScript_ThreeMagmaGrunts:: @ 8223DBF applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_Delay48 waitmovement 0 msgbox MossdeepCity_SpaceCenter_2F_Text_YoureOutnumberedTakeUsOn, MSGBOX_YESNO - compare VAR_RESULT, 1 + compare VAR_RESULT, YES goto_if_eq MossdeepCity_SpaceCenter_2F_EventScript_BattleThreeMagmaGrunts msgbox MossdeepCity_SpaceCenter_2F_Text_GoodAnswer, MSGBOX_DEFAULT closemessage @@ -235,7 +235,7 @@ MossdeepCity_SpaceCenter_2F_EventScript_ReadyForBattlePrompt:: @ 8223FDA applymovement VAR_LAST_TALKED, Common_Movement_FacePlayer waitmovement 0 msgbox MossdeepCity_SpaceCenter_2F_Text_StevenAreYouReadyToBattle, MSGBOX_YESNO - compare VAR_RESULT, 1 + compare VAR_RESULT, YES goto_if_eq MossdeepCity_SpaceCenter_2F_EventScript_ChoosePartyForMultiBattle msgbox MossdeepCity_SpaceCenter_2F_Text_StevenHurryGetReadyQuickly, MSGBOX_DEFAULT closemessage diff --git a/data/maps/MossdeepCity_StevensHouse/scripts.inc b/data/maps/MossdeepCity_StevensHouse/scripts.inc index cc50ff37a9..247bdc4856 100644 --- a/data/maps/MossdeepCity_StevensHouse/scripts.inc +++ b/data/maps/MossdeepCity_StevensHouse/scripts.inc @@ -73,7 +73,7 @@ MossdeepCity_StevensHouse_Movement_22283B: @ 822283B MossdeepCity_StevensHouse_EventScript_222841:: @ 8222841 lockall msgbox MossdeepCity_StevensHouse_Text_222B9E, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq MossdeepCity_StevensHouse_EventScript_22285B goto MossdeepCity_StevensHouse_EventScript_222865 end @@ -96,7 +96,7 @@ MossdeepCity_StevensHouse_EventScript_222865:: @ 8222865 MossdeepCity_StevensHouse_EventScript_222895:: @ 8222895 call MossdeepCity_StevensHouse_EventScript_2228EB msgbox gText_NicknameThisPokemon, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq MossdeepCity_StevensHouse_EventScript_222901 call Common_EventScript_GetGiftMonPartySlot call Common_EventScript_NameReceivedPartyMon @@ -106,7 +106,7 @@ MossdeepCity_StevensHouse_EventScript_222895:: @ 8222895 MossdeepCity_StevensHouse_EventScript_2228BD:: @ 82228BD call MossdeepCity_StevensHouse_EventScript_2228EB msgbox gText_NicknameThisPokemon, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq MossdeepCity_StevensHouse_EventScript_2228E0 call Common_EventScript_NameReceivedBoxMon goto MossdeepCity_StevensHouse_EventScript_2228E0 diff --git a/data/maps/MtChimney/scripts.inc b/data/maps/MtChimney/scripts.inc index de2ce9e8f1..411857e2d1 100644 --- a/data/maps/MtChimney/scripts.inc +++ b/data/maps/MtChimney/scripts.inc @@ -102,7 +102,7 @@ MtChimney_EventScript_LavaCookieLady:: @ 822EEF3 faceplayer showmoneybox 0, 0, 0 msgbox MtChimney_Text_LavaCookiesJust200, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq MtChimney_EventScript_DeclineLavaCookie checkmoney 200, 0 compare VAR_RESULT, FALSE @@ -469,7 +469,7 @@ MtChimney_EventScript_MeteoriteMachine:: @ 822F0E4 goto_if_unset FLAG_DEFEATED_EVIL_TEAM_MT_CHIMNEY, MtChimney_EventScript_MachineOn goto_if_set FLAG_RECEIVED_METEORITE, MtChimney_EventScript_MachineOff msgbox MtChimney_Text_RemoveTheMeteorite, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq MtChimney_EventScript_LeaveMeteoriteAlone msgbox MtChimney_Text_PlayerRemovedMeteorite, MSGBOX_DEFAULT giveitem_std ITEM_METEORITE diff --git a/data/maps/MtChimney_CableCarStation/scripts.inc b/data/maps/MtChimney_CableCarStation/scripts.inc index 4b8cd3fe5c..588a4c3f46 100644 --- a/data/maps/MtChimney_CableCarStation/scripts.inc +++ b/data/maps/MtChimney_CableCarStation/scripts.inc @@ -32,9 +32,9 @@ MtChimney_CableCarStation_EventScript_22AC4B:: @ 822AC4B lock faceplayer msgbox MtChimney_CableCarStation_Text_22ACB9, MSGBOX_YESNO - compare VAR_RESULT, 1 + compare VAR_RESULT, YES goto_if_eq MtChimney_CableCarStation_EventScript_22AC6C - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq MtChimney_CableCarStation_EventScript_22AC9B end diff --git a/data/maps/MtPyre_Summit/scripts.inc b/data/maps/MtPyre_Summit/scripts.inc index 3995cb25cb..1a9e5d31c5 100644 --- a/data/maps/MtPyre_Summit/scripts.inc +++ b/data/maps/MtPyre_Summit/scripts.inc @@ -134,18 +134,18 @@ MtPyre_Summit_EventScript_OldMan:: @ 823213C faceplayer goto_if_set FLAG_SOOTOPOLIS_ARCHIE_MAXIE_LEAVE, MtPyre_Summit_EventScript_OldManAfterRayquaza msgbox MtPyre_Summit_Text_WillYouHearOutMyTale, MSGBOX_YESNO - compare VAR_RESULT, 1 + compare VAR_RESULT, YES call_if_eq MtPyre_Summit_EventScript_OldManTale - compare VAR_RESULT, 0 + compare VAR_RESULT, NO call_if_eq MtPyre_Summit_EventScript_DeclineOldManTale release end MtPyre_Summit_EventScript_OldManAfterRayquaza:: @ 8232167 msgbox MtPyre_Summit_Text_HearTheNewLegendOfHoenn, MSGBOX_YESNO - compare VAR_RESULT, 1 + compare VAR_RESULT, YES call_if_eq MtPyre_Summit_EventScript_OldManNewTale - compare VAR_RESULT, 0 + compare VAR_RESULT, NO call_if_eq MtPyre_Summit_EventScript_DeclineOldManTale release end diff --git a/data/maps/NavelRock_Harbor/scripts.inc b/data/maps/NavelRock_Harbor/scripts.inc index 3d23991e48..b138b7c5ab 100644 --- a/data/maps/NavelRock_Harbor/scripts.inc +++ b/data/maps/NavelRock_Harbor/scripts.inc @@ -5,7 +5,7 @@ NavelRock_Harbor_EventScript_Sailor:: @ 82690BD lock faceplayer msgbox NavelRock_Harbor_Text_SailorReturn, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq NavelRock_Harbor_EventScript_AsYouLike msgbox EventTicket_Text_SailHome, MSGBOX_DEFAULT closemessage diff --git a/data/maps/NewMauville_Entrance/scripts.inc b/data/maps/NewMauville_Entrance/scripts.inc index 9b31454fdd..e9dd09c274 100644 --- a/data/maps/NewMauville_Entrance/scripts.inc +++ b/data/maps/NewMauville_Entrance/scripts.inc @@ -30,7 +30,7 @@ NewMauville_Entrance_EventScript_2372FF:: @ 82372FF compare VAR_RESULT, 0 goto_if_eq NewMauville_Entrance_EventScript_237380 msgbox NewMauville_Entrance_Text_237396, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq NewMauville_Entrance_EventScript_237380 msgbox NewMauville_Entrance_Text_2373AC, MSGBOX_DEFAULT setmetatile 3, 0, METATILE_Facility_NewMauvilleDoor_Open_Tile0, 0 diff --git a/data/maps/PacifidlogTown_House3/scripts.inc b/data/maps/PacifidlogTown_House3/scripts.inc index 543b9de354..921f788d6d 100644 --- a/data/maps/PacifidlogTown_House3/scripts.inc +++ b/data/maps/PacifidlogTown_House3/scripts.inc @@ -10,7 +10,7 @@ PacifidlogTown_House3_EventScript_203C11:: @ 8203C11 specialvar VAR_RESULT, GetInGameTradeSpeciesInfo copyvar VAR_0x8009, VAR_RESULT msgbox PacifidlogTown_House3_Text_203CBE, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq PacifidlogTown_House3_EventScript_203C93 special ChoosePartyMon waitstate diff --git a/data/maps/PacifidlogTown_House4/scripts.inc b/data/maps/PacifidlogTown_House4/scripts.inc index e9f5f19e7d..1535b534dd 100644 --- a/data/maps/PacifidlogTown_House4/scripts.inc +++ b/data/maps/PacifidlogTown_House4/scripts.inc @@ -13,9 +13,9 @@ PacifidlogTown_House4_EventScript_203F5E:: @ 8203F5E lock faceplayer msgbox PacifidlogTown_House4_Text_204035, MSGBOX_YESNO - compare VAR_RESULT, 1 + compare VAR_RESULT, YES goto_if_eq PacifidlogTown_House4_EventScript_203F7F - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq PacifidlogTown_House4_EventScript_203F89 end diff --git a/data/maps/PetalburgCity_Gym/scripts.inc b/data/maps/PetalburgCity_Gym/scripts.inc index f6a21b0b8a..d9f299db2c 100644 --- a/data/maps/PetalburgCity_Gym/scripts.inc +++ b/data/maps/PetalburgCity_Gym/scripts.inc @@ -791,9 +791,9 @@ PetalburgCity_Gym_EventScript_SpeedRoomDoor:: @ 8205137 setvar VAR_0x8008, 7 setvar VAR_0x8009, 85 msgbox PetalburgCity_Gym_Text_EnterSpeedRoom, MSGBOX_YESNO - compare VAR_RESULT, 1 + compare VAR_RESULT, YES goto_if_eq PetalburgCity_Gym_EventScript_EnterRoom - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq PetalburgCity_Gym_EventScript_DontEnterRoom end @@ -822,9 +822,9 @@ PetalburgCity_Gym_EventScript_AccuracyRoomDoor:: @ 8205187 setvar VAR_0x8008, 1 setvar VAR_0x8009, 98 msgbox PetalburgCity_Gym_Text_EnterAccuracyRoom, MSGBOX_YESNO - compare VAR_RESULT, 1 + compare VAR_RESULT, YES goto_if_eq PetalburgCity_Gym_EventScript_EnterRoom - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq PetalburgCity_Gym_EventScript_DontEnterRoom end @@ -835,9 +835,9 @@ PetalburgCity_Gym_EventScript_ConfusionRoomDoor:: @ 82051BC setvar VAR_0x8008, 7 setvar VAR_0x8009, 46 msgbox PetalburgCity_Gym_Text_EnterConfusionRoom, MSGBOX_YESNO - compare VAR_RESULT, 1 + compare VAR_RESULT, YES goto_if_eq PetalburgCity_Gym_EventScript_EnterRoom - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq PetalburgCity_Gym_EventScript_DontEnterRoom end @@ -848,9 +848,9 @@ PetalburgCity_Gym_EventScript_LeftDefenseRoomDoor:: @ 82051EF setvar VAR_0x8008, 1 setvar VAR_0x8009, 59 msgbox PetalburgCity_Gym_Text_EnterDefenseRoom, MSGBOX_YESNO - compare VAR_RESULT, 1 + compare VAR_RESULT, YES goto_if_eq PetalburgCity_Gym_EventScript_EnterRoom - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq PetalburgCity_Gym_EventScript_DontEnterRoom end @@ -861,9 +861,9 @@ PetalburgCity_Gym_EventScript_RightDefenseRoomDoor:: @ 8205222 setvar VAR_0x8008, 7 setvar VAR_0x8009, 59 msgbox PetalburgCity_Gym_Text_EnterDefenseRoom, MSGBOX_YESNO - compare VAR_RESULT, 1 + compare VAR_RESULT, YES goto_if_eq PetalburgCity_Gym_EventScript_EnterRoom - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq PetalburgCity_Gym_EventScript_DontEnterRoom end @@ -874,9 +874,9 @@ PetalburgCity_Gym_EventScript_RecoveryRoomDoor:: @ 8205255 setvar VAR_0x8008, 1 setvar VAR_0x8009, 72 msgbox PetalburgCity_Gym_Text_EnterRecoveryRoom, MSGBOX_YESNO - compare VAR_RESULT, 1 + compare VAR_RESULT, YES goto_if_eq PetalburgCity_Gym_EventScript_EnterRoom - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq PetalburgCity_Gym_EventScript_DontEnterRoom end @@ -887,9 +887,9 @@ PetalburgCity_Gym_EventScript_LeftStrengthRoomDoor:: @ 8205288 setvar VAR_0x8008, 1 setvar VAR_0x8009, 20 msgbox PetalburgCity_Gym_Text_EnterStrengthRoom, MSGBOX_YESNO - compare VAR_RESULT, 1 + compare VAR_RESULT, YES goto_if_eq PetalburgCity_Gym_EventScript_EnterRoom - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq PetalburgCity_Gym_EventScript_DontEnterRoom end @@ -900,9 +900,9 @@ PetalburgCity_Gym_EventScript_RightStrengthRoomDoor:: @ 82052BB setvar VAR_0x8008, 7 setvar VAR_0x8009, 20 msgbox PetalburgCity_Gym_Text_EnterStrengthRoom, MSGBOX_YESNO - compare VAR_RESULT, 1 + compare VAR_RESULT, YES goto_if_eq PetalburgCity_Gym_EventScript_EnterRoom - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq PetalburgCity_Gym_EventScript_DontEnterRoom end @@ -913,9 +913,9 @@ PetalburgCity_Gym_EventScript_LeftOHKORoomDoor:: @ 82052EE setvar VAR_0x8008, 1 setvar VAR_0x8009, 33 msgbox PetalburgCity_Gym_Text_EnterOHKORoom, MSGBOX_YESNO - compare VAR_RESULT, 1 + compare VAR_RESULT, YES goto_if_eq PetalburgCity_Gym_EventScript_EnterRoom - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq PetalburgCity_Gym_EventScript_DontEnterRoom end @@ -926,9 +926,9 @@ PetalburgCity_Gym_EventScript_RightOHKORoomDoor:: @ 8205321 setvar VAR_0x8008, 7 setvar VAR_0x8009, 33 msgbox PetalburgCity_Gym_Text_EnterOHKORoom, MSGBOX_YESNO - compare VAR_RESULT, 1 + compare VAR_RESULT, YES goto_if_eq PetalburgCity_Gym_EventScript_EnterRoom - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq PetalburgCity_Gym_EventScript_DontEnterRoom end @@ -939,9 +939,9 @@ PetalburgCity_Gym_EventScript_LeftGymLeadersRoomDoor:: @ 8205354 setvar VAR_0x8008, 1 setvar VAR_0x8009, 7 msgbox PetalburgCity_Gym_Text_EnterGymLeadersRoom, MSGBOX_YESNO - compare VAR_RESULT, 1 + compare VAR_RESULT, YES goto_if_eq PetalburgCity_Gym_EventScript_EnterRoom - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq PetalburgCity_Gym_EventScript_DontEnterRoom end @@ -952,9 +952,9 @@ PetalburgCity_Gym_EventScript_RightGymLeadersRoomDoor:: @ 8205387 setvar VAR_0x8008, 7 setvar VAR_0x8009, 7 msgbox PetalburgCity_Gym_Text_EnterGymLeadersRoom, MSGBOX_YESNO - compare VAR_RESULT, 1 + compare VAR_RESULT, YES goto_if_eq PetalburgCity_Gym_EventScript_EnterRoom - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq PetalburgCity_Gym_EventScript_DontEnterRoom end diff --git a/data/maps/Route104/scripts.inc b/data/maps/Route104/scripts.inc index ff420e599b..6ca921af91 100644 --- a/data/maps/Route104/scripts.inc +++ b/data/maps/Route104/scripts.inc @@ -116,7 +116,7 @@ Route104_EventScript_1ECD4B:: @ 81ECD4B waitmovement 0 copyobjectxytoperm 34 msgbox Route104_Text_1EDCED, MSGBOX_YESNO - compare VAR_RESULT, 1 + compare VAR_RESULT, YES goto_if_eq Route104_EventScript_1ECDED msgbox Route104_Text_1EDD2A, MSGBOX_DEFAULT call Route104_EventScript_1ECE31 @@ -139,7 +139,7 @@ Route104_Movement_1ECDCD: @ 81ECDCD Route104_EventScript_1ECDD0:: @ 81ECDD0 msgbox Route104_Text_1EDD9F, MSGBOX_YESNO - compare VAR_RESULT, 1 + compare VAR_RESULT, YES goto_if_eq Route104_EventScript_1ECDED msgbox Route104_Text_1EDD2A, MSGBOX_DEFAULT releaseall @@ -205,7 +205,7 @@ Route104_EventScript_1ECE6F:: @ 81ECE6F waitmovement 0 copyobjectxytoperm 34 msgbox Route104_Text_1EE009, MSGBOX_YESNO - compare VAR_RESULT, 1 + compare VAR_RESULT, YES goto_if_eq Route104_EventScript_1ECF09 msgbox Route104_Text_1EE04D, MSGBOX_DEFAULT call Route104_EventScript_1ECE31 @@ -214,7 +214,7 @@ Route104_EventScript_1ECE6F:: @ 81ECE6F Route104_EventScript_1ECEEC:: @ 81ECEEC msgbox Route104_Text_1EE094, MSGBOX_YESNO - compare VAR_RESULT, 1 + compare VAR_RESULT, YES goto_if_eq Route104_EventScript_1ECF09 msgbox Route104_Text_1EE04D, MSGBOX_DEFAULT releaseall diff --git a/data/maps/Route104_PrettyPetalFlowerShop/scripts.inc b/data/maps/Route104_PrettyPetalFlowerShop/scripts.inc index dc5bd2ce9e..fe0dbf632b 100644 --- a/data/maps/Route104_PrettyPetalFlowerShop/scripts.inc +++ b/data/maps/Route104_PrettyPetalFlowerShop/scripts.inc @@ -21,18 +21,18 @@ Route104_PrettyPetalFlowerShop_EventScript_ShopOwner:: @ 822A373 goto_if_set FLAG_MET_PRETTY_PETAL_SHOP_OWNER, Route104_PrettyPetalFlowerShop_EventScript_AlreadyMet setflag FLAG_MET_PRETTY_PETAL_SHOP_OWNER msgbox Route104_PrettyPetalFlowerShop_Text_IntroLearnAboutBerries, MSGBOX_YESNO - compare VAR_RESULT, TRUE + compare VAR_RESULT, YES call_if_eq Route104_PrettyPetalFlowerShop_EventScript_ExplainBerries - compare VAR_RESULT, FALSE + compare VAR_RESULT, NO call_if_eq Route104_PrettyPetalFlowerShop_EventScript_DontExplainBerries release end Route104_PrettyPetalFlowerShop_EventScript_AlreadyMet:: @ 822A3B2 msgbox Route104_PrettyPetalFlowerShop_Text_LearnAboutBerries, MSGBOX_YESNO - compare VAR_RESULT, TRUE + compare VAR_RESULT, YES call_if_eq Route104_PrettyPetalFlowerShop_EventScript_ExplainBerries - compare VAR_RESULT, FALSE + compare VAR_RESULT, NO call_if_eq Route104_PrettyPetalFlowerShop_EventScript_DontExplainBerries release end diff --git a/data/maps/Route109/scripts.inc b/data/maps/Route109/scripts.inc index 5a45b6ceb6..e7080ac503 100644 --- a/data/maps/Route109/scripts.inc +++ b/data/maps/Route109/scripts.inc @@ -279,7 +279,7 @@ Route109_EventScript_MrBriney:: @ 81EE910 Route109_EventScript_HaveNotDeliveredDevonGood:: @ 81EE921 message Route109_Text_BrineySailToDewfordQuestion msgbox Route109_Text_BrineySailToDewfordQuestion, MSGBOX_YESNO - compare VAR_RESULT, FALSE + compare VAR_RESULT, NO goto_if_eq Route109_EventScript_StayHere goto Route109_EventScript_SailToDewford end diff --git a/data/maps/Route110_TrickHouseEntrance/scripts.inc b/data/maps/Route110_TrickHouseEntrance/scripts.inc index 173151c37f..ab3ef25aa7 100644 --- a/data/maps/Route110_TrickHouseEntrance/scripts.inc +++ b/data/maps/Route110_TrickHouseEntrance/scripts.inc @@ -497,7 +497,7 @@ Route110_TrickHouseEntrance_EventScript_26A106:: @ 826A106 Route110_TrickHouseEntrance_EventScript_26A110:: @ 826A110 msgbox Route110_TrickHouseEntrance_Text_26A887, MSGBOX_YESNO closemessage - compare VAR_RESULT, 1 + compare VAR_RESULT, YES goto_if_eq Route110_TrickHouseEntrance_EventScript_26A126 releaseall end diff --git a/data/maps/Route111/scripts.inc b/data/maps/Route111/scripts.inc index b5a9ca8cc4..037ddb18c9 100644 --- a/data/maps/Route111/scripts.inc +++ b/data/maps/Route111/scripts.inc @@ -276,7 +276,7 @@ Route111_EventScript_1F0FC5:: @ 81F0FC5 faceplayer setflag FLAG_LANDMARK_WINSTRATE_FAMILY msgbox Route111_Text_1F1475, MSGBOX_YESNO - compare VAR_RESULT, 1 + compare VAR_RESULT, YES goto_if_eq Route111_EventScript_1F0FE7 msgbox Route111_Text_1F14F5, MSGBOX_DEFAULT release diff --git a/data/maps/Route111_OldLadysRestStop/scripts.inc b/data/maps/Route111_OldLadysRestStop/scripts.inc index 017043eae5..63b373fbf4 100644 --- a/data/maps/Route111_OldLadysRestStop/scripts.inc +++ b/data/maps/Route111_OldLadysRestStop/scripts.inc @@ -10,9 +10,9 @@ Route111_OldLadysRestStop_EventScript_22A920:: @ 822A920 lock faceplayer msgbox Route111_OldLadysRestStop_Text_22A978, MSGBOX_YESNO - compare VAR_RESULT, 1 + compare VAR_RESULT, YES goto_if_eq Route111_OldLadysRestStop_EventScript_22A941 - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq Route111_OldLadysRestStop_EventScript_22A96E end @@ -21,9 +21,9 @@ Route111_OldLadysRestStop_EventScript_22A941:: @ 822A941 closemessage call Common_EventScript_OutOfCenterPartyHeal msgbox Route111_OldLadysRestStop_Text_22AA16, MSGBOX_YESNO - compare VAR_RESULT, 1 + compare VAR_RESULT, YES goto_if_eq Route111_OldLadysRestStop_EventScript_22A941 - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq Route111_OldLadysRestStop_EventScript_22A96E end diff --git a/data/maps/Route112_CableCarStation/scripts.inc b/data/maps/Route112_CableCarStation/scripts.inc index d3a98870ba..f319e0a28c 100644 --- a/data/maps/Route112_CableCarStation/scripts.inc +++ b/data/maps/Route112_CableCarStation/scripts.inc @@ -33,9 +33,9 @@ Route112_CableCarStation_EventScript_22AB17:: @ 822AB17 lock faceplayer msgbox Route112_CableCarStation_Text_22AB85, MSGBOX_YESNO - compare VAR_RESULT, 1 + compare VAR_RESULT, YES goto_if_eq Route112_CableCarStation_EventScript_22AB38 - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq Route112_CableCarStation_EventScript_22AB67 end diff --git a/data/maps/Route113_GlassWorkshop/scripts.inc b/data/maps/Route113_GlassWorkshop/scripts.inc index 22acd676d4..e1339c75cb 100644 --- a/data/maps/Route113_GlassWorkshop/scripts.inc +++ b/data/maps/Route113_GlassWorkshop/scripts.inc @@ -74,7 +74,7 @@ Route113_GlassWorkshop_EventScript_26EE1E:: @ 826EE1E compare VAR_ASH_GATHER_COUNT, 250 goto_if_lt Route113_GlassWorkshop_EventScript_26EFEE msgbox Route113_GlassWorkshop_Text_26F480, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq Route113_GlassWorkshop_EventScript_26F003 setvar VAR_GLASS_WORKSHOP_STATE, 10 subvar VAR_ASH_GATHER_COUNT, 250 @@ -88,7 +88,7 @@ Route113_GlassWorkshop_EventScript_26EE5A:: @ 826EE5A compare VAR_ASH_GATHER_COUNT, 500 goto_if_lt Route113_GlassWorkshop_EventScript_26EFEE msgbox Route113_GlassWorkshop_Text_26F480, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq Route113_GlassWorkshop_EventScript_26F003 setvar VAR_GLASS_WORKSHOP_STATE, 11 subvar VAR_ASH_GATHER_COUNT, 500 @@ -102,7 +102,7 @@ Route113_GlassWorkshop_EventScript_26EE96:: @ 826EE96 compare VAR_ASH_GATHER_COUNT, 500 goto_if_lt Route113_GlassWorkshop_EventScript_26EFEE msgbox Route113_GlassWorkshop_Text_26F480, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq Route113_GlassWorkshop_EventScript_26F003 setvar VAR_GLASS_WORKSHOP_STATE, 12 subvar VAR_ASH_GATHER_COUNT, 500 @@ -116,7 +116,7 @@ Route113_GlassWorkshop_EventScript_26EED2:: @ 826EED2 compare VAR_ASH_GATHER_COUNT, 1000 goto_if_lt Route113_GlassWorkshop_EventScript_26EFEE msgbox Route113_GlassWorkshop_Text_26F480, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq Route113_GlassWorkshop_EventScript_26F003 setvar VAR_GLASS_WORKSHOP_STATE, 13 subvar VAR_ASH_GATHER_COUNT, 1000 @@ -130,7 +130,7 @@ Route113_GlassWorkshop_EventScript_26EF0E:: @ 826EF0E compare VAR_ASH_GATHER_COUNT, 1000 goto_if_lt Route113_GlassWorkshop_EventScript_26EFEE msgbox Route113_GlassWorkshop_Text_26F480, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq Route113_GlassWorkshop_EventScript_26F003 setvar VAR_GLASS_WORKSHOP_STATE, 14 subvar VAR_ASH_GATHER_COUNT, 1000 @@ -145,7 +145,7 @@ Route113_GlassWorkshop_EventScript_26EF4A:: @ 826EF4A compare VAR_ASH_GATHER_COUNT, 6000 goto_if_lt Route113_GlassWorkshop_EventScript_26EFEE msgbox Route113_GlassWorkshop_Text_26F480, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq Route113_GlassWorkshop_EventScript_26F003 setvar VAR_GLASS_WORKSHOP_STATE, 15 subvar VAR_ASH_GATHER_COUNT, 6000 @@ -160,7 +160,7 @@ Route113_GlassWorkshop_EventScript_26EF8B:: @ 826EF8B compare VAR_ASH_GATHER_COUNT, 8000 goto_if_lt Route113_GlassWorkshop_EventScript_26EFEE msgbox Route113_GlassWorkshop_Text_26F480, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq Route113_GlassWorkshop_EventScript_26F003 setvar VAR_GLASS_WORKSHOP_STATE, 16 subvar VAR_ASH_GATHER_COUNT, 8000 diff --git a/data/maps/Route114_LanettesHouse/scripts.inc b/data/maps/Route114_LanettesHouse/scripts.inc index 85b22724bb..59d82ffe1a 100644 --- a/data/maps/Route114_LanettesHouse/scripts.inc +++ b/data/maps/Route114_LanettesHouse/scripts.inc @@ -27,7 +27,7 @@ Route114_LanettesHouse_EventScript_22B2FF:: @ 822B2FF Route114_LanettesHouse_EventScript_22B309:: @ 822B309 lockall msgbox Route114_LanettesHouse_Text_22B485, MSGBOX_YESNO - compare VAR_RESULT, 1 + compare VAR_RESULT, YES goto_if_eq Route114_LanettesHouse_EventScript_22B327 msgbox Route114_LanettesHouse_Text_22B6E4, MSGBOX_DEFAULT releaseall @@ -35,7 +35,7 @@ Route114_LanettesHouse_EventScript_22B309:: @ 822B309 Route114_LanettesHouse_EventScript_22B327:: @ 822B327 msgbox Route114_LanettesHouse_Text_22B53C, MSGBOX_YESNO - compare VAR_RESULT, 1 + compare VAR_RESULT, YES call_if_eq Route114_LanettesHouse_EventScript_22B33C releaseall end diff --git a/data/maps/Route118/scripts.inc b/data/maps/Route118/scripts.inc index 051cdfd9c5..fe9c4137d7 100644 --- a/data/maps/Route118/scripts.inc +++ b/data/maps/Route118/scripts.inc @@ -30,9 +30,9 @@ Route118_EventScript_1F3E14:: @ 81F3E14 faceplayer goto_if_set FLAG_RECEIVED_GOOD_ROD, Route118_EventScript_1F3E69 msgbox Route118_Text_1F427B, MSGBOX_YESNO - compare VAR_RESULT, 1 + compare VAR_RESULT, YES goto_if_eq Route118_EventScript_1F3E3E - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq Route118_EventScript_1F3E5F end diff --git a/data/maps/Route119_WeatherInstitute_2F/scripts.inc b/data/maps/Route119_WeatherInstitute_2F/scripts.inc index 6c70a880e0..211a98f0fa 100644 --- a/data/maps/Route119_WeatherInstitute_2F/scripts.inc +++ b/data/maps/Route119_WeatherInstitute_2F/scripts.inc @@ -95,7 +95,7 @@ Route119_WeatherInstitute_2F_EventScript_ReceiveCastform:: @ 827004D Route119_WeatherInstitute_2F_EventScript_ReceiveCastformParty:: @ 8270085 call Route119_WeatherInstitute_2F_EventScript_ReceivedCastformFanfare msgbox gText_NicknameThisPokemon, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq Route119_WeatherInstitute_2F_EventScript_ExplainCastform call Common_EventScript_GetGiftMonPartySlot call Common_EventScript_NameReceivedPartyMon @@ -105,7 +105,7 @@ Route119_WeatherInstitute_2F_EventScript_ReceiveCastformParty:: @ 8270085 Route119_WeatherInstitute_2F_EventScript_ReceiveCastformPC:: @ 82700AD call Route119_WeatherInstitute_2F_EventScript_ReceivedCastformFanfare msgbox gText_NicknameThisPokemon, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq Route119_WeatherInstitute_2F_EventScript_SendCastformToPC call Common_EventScript_NameReceivedBoxMon goto Route119_WeatherInstitute_2F_EventScript_SendCastformToPC diff --git a/data/maps/Route120/scripts.inc b/data/maps/Route120/scripts.inc index cb4ee4cc87..9ef80e8937 100644 --- a/data/maps/Route120/scripts.inc +++ b/data/maps/Route120/scripts.inc @@ -101,9 +101,9 @@ Route120_EventScript_1F5527:: @ 81F5527 dotimebasedevents goto_if_set FLAG_DAILY_ROUTE_120_RECEIVED_BERRY, Route120_EventScript_1F5625 msgbox Route120_Text_2A70C7, MSGBOX_YESNO - compare VAR_RESULT, 1 + compare VAR_RESULT, YES call_if_eq Route120_EventScript_1F562F - compare VAR_RESULT, 0 + compare VAR_RESULT, NO call_if_eq Route120_EventScript_1F5638 specialvar VAR_RESULT, GetPlayerTrainerIdOnesDigit switch VAR_RESULT @@ -171,7 +171,7 @@ Route120_EventScript_Steven:: @ 81F5641 faceplayer goto_if_set FLAG_NOT_READY_FOR_BATTLE_ROUTE_120, Route120_EventScript_1F5672 msgbox Route120_Text_StevenGreeting, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq Route120_EventScript_StevenNotReady goto Route120_EventScript_StevenBattleKecleon end @@ -184,7 +184,7 @@ Route120_EventScript_StevenNotReady:: @ 81F5665 Route120_EventScript_1F5672:: @ 81F5672 msgbox Route120_Text_StevenReadyForBattle, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq Route120_EventScript_StevenNotReady goto Route120_EventScript_StevenBattleKecleon end diff --git a/data/maps/Route121_SafariZoneEntrance/scripts.inc b/data/maps/Route121_SafariZoneEntrance/scripts.inc index 054f6cee80..5f64957cb5 100644 --- a/data/maps/Route121_SafariZoneEntrance/scripts.inc +++ b/data/maps/Route121_SafariZoneEntrance/scripts.inc @@ -33,7 +33,7 @@ Route121_SafariZoneEntrance_EventScript_InfoAttendant:: @ 822BBEF lock faceplayer msgbox Route121_SafariZoneEntrance_Text_WelcomeFirstTime, MSGBOX_YESNO - compare VAR_RESULT, 1 + compare VAR_RESULT, YES goto_if_eq Route121_SafariZoneEntrance_EventScript_FirstTimeInfo msgbox Route121_SafariZoneEntrance_Text_ComeInAndEnjoy, MSGBOX_DEFAULT release @@ -50,7 +50,7 @@ Route121_SafariZoneEntrance_EventScript_EntranceCounterTrigger:: @ 822BC18 waitmovement 0 showmoneybox 0, 0, 0 msgbox Route121_SafariZoneEntrance_Text_WouldYouLikeToPlay, MSGBOX_YESNO - compare VAR_RESULT, 1 + compare VAR_RESULT, YES goto_if_eq Route121_SafariZoneEntrance_EventScript_TryEnterSafariZone msgbox Route121_SafariZoneEntrance_Text_PlayAnotherTime, MSGBOX_DEFAULT goto Route121_SafariZoneEntrance_EventScript_MovePlayerBackFromCounter diff --git a/data/maps/RustboroCity/scripts.inc b/data/maps/RustboroCity/scripts.inc index 28a5f8278f..ff9f2e03bd 100644 --- a/data/maps/RustboroCity/scripts.inc +++ b/data/maps/RustboroCity/scripts.inc @@ -844,7 +844,7 @@ RustboroCity_EventScript_1E100B:: @ 81E100B setvar VAR_ROUTE104_STATE, 2 setvar VAR_0x8008, 0 msgbox RustboroCity_Text_1E1AFA, MSGBOX_YESNO - compare VAR_RESULT, 1 + compare VAR_RESULT, YES goto_if_eq RustboroCity_EventScript_1E1092 msgbox RustboroCity_Text_1E1BD3, MSGBOX_DEFAULT call RustboroCity_EventScript_1E10D6 @@ -854,7 +854,7 @@ RustboroCity_EventScript_1E100B:: @ 81E100B RustboroCity_EventScript_1E1070:: @ 81E1070 setvar VAR_0x8008, 1 msgbox RustboroCity_Text_1E1C48, MSGBOX_YESNO - compare VAR_RESULT, 1 + compare VAR_RESULT, YES goto_if_eq RustboroCity_EventScript_1E1092 msgbox RustboroCity_Text_1E1BD3, MSGBOX_DEFAULT releaseall @@ -914,7 +914,7 @@ RustboroCity_EventScript_1E1114:: @ 81E1114 setvar VAR_RUSTBORO_CITY_STATE, 8 setvar VAR_ROUTE104_STATE, 2 msgbox RustboroCity_Text_1E1E34, MSGBOX_YESNO - compare VAR_RESULT, 1 + compare VAR_RESULT, YES goto_if_eq RustboroCity_EventScript_1E1191 msgbox RustboroCity_Text_1E1F2F, MSGBOX_DEFAULT call RustboroCity_EventScript_1E10D6 @@ -923,7 +923,7 @@ RustboroCity_EventScript_1E1114:: @ 81E1114 RustboroCity_EventScript_1E1174:: @ 81E1174 msgbox RustboroCity_Text_1E1F76, MSGBOX_YESNO - compare VAR_RESULT, 1 + compare VAR_RESULT, YES goto_if_eq RustboroCity_EventScript_1E1191 msgbox RustboroCity_Text_1E1F2F, MSGBOX_DEFAULT releaseall diff --git a/data/maps/RustboroCity_DevonCorp_2F/scripts.inc b/data/maps/RustboroCity_DevonCorp_2F/scripts.inc index acdcb9528e..751285a7a8 100644 --- a/data/maps/RustboroCity_DevonCorp_2F/scripts.inc +++ b/data/maps/RustboroCity_DevonCorp_2F/scripts.inc @@ -84,7 +84,7 @@ RustboroCity_DevonCorp_2F_EventScript_211933:: @ 8211933 applymovement 5, Common_Movement_Delay48 waitmovement 0 msgbox RustboroCity_DevonCorp_2F_Text_211FA6, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq RustboroCity_DevonCorp_2F_EventScript_2119EF checkitem ITEM_CLAW_FOSSIL, 1 compare VAR_RESULT, 1 @@ -109,7 +109,7 @@ RustboroCity_DevonCorp_2F_EventScript_211991:: @ 8211991 applymovement 5, Common_Movement_Delay48 waitmovement 0 msgbox RustboroCity_DevonCorp_2F_Text_211FA6, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq RustboroCity_DevonCorp_2F_EventScript_2119EF checkitem ITEM_ROOT_FOSSIL, 1 compare VAR_RESULT, 1 @@ -168,7 +168,7 @@ RustboroCity_DevonCorp_2F_EventScript_211A3E:: @ 8211A3E RustboroCity_DevonCorp_2F_EventScript_211A6E:: @ 8211A6E call RustboroCity_DevonCorp_2F_EventScript_211AC4 msgbox gText_NicknameThisPokemon, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq RustboroCity_DevonCorp_2F_EventScript_211AD7 call Common_EventScript_GetGiftMonPartySlot call Common_EventScript_NameReceivedPartyMon @@ -178,7 +178,7 @@ RustboroCity_DevonCorp_2F_EventScript_211A6E:: @ 8211A6E RustboroCity_DevonCorp_2F_EventScript_211A96:: @ 8211A96 call RustboroCity_DevonCorp_2F_EventScript_211AC4 msgbox gText_NicknameThisPokemon, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq RustboroCity_DevonCorp_2F_EventScript_211AB9 call Common_EventScript_NameReceivedBoxMon goto RustboroCity_DevonCorp_2F_EventScript_211AB9 @@ -217,7 +217,7 @@ RustboroCity_DevonCorp_2F_EventScript_211AE1:: @ 8211AE1 RustboroCity_DevonCorp_2F_EventScript_211B11:: @ 8211B11 call RustboroCity_DevonCorp_2F_EventScript_211B67 msgbox gText_NicknameThisPokemon, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq RustboroCity_DevonCorp_2F_EventScript_211B7A call Common_EventScript_GetGiftMonPartySlot call Common_EventScript_NameReceivedPartyMon @@ -227,7 +227,7 @@ RustboroCity_DevonCorp_2F_EventScript_211B11:: @ 8211B11 RustboroCity_DevonCorp_2F_EventScript_211B39:: @ 8211B39 call RustboroCity_DevonCorp_2F_EventScript_211B67 msgbox gText_NicknameThisPokemon, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq RustboroCity_DevonCorp_2F_EventScript_211B5C call Common_EventScript_NameReceivedBoxMon goto RustboroCity_DevonCorp_2F_EventScript_211B5C diff --git a/data/maps/RustboroCity_Flat1_2F/scripts.inc b/data/maps/RustboroCity_Flat1_2F/scripts.inc index e5b6c493ab..5a4b50cccf 100644 --- a/data/maps/RustboroCity_Flat1_2F/scripts.inc +++ b/data/maps/RustboroCity_Flat1_2F/scripts.inc @@ -26,14 +26,14 @@ RustboroCity_Flat1_2F_EventScript_215157:: @ 8215157 RustboroCity_Flat1_2F_EventScript_21518D:: @ 821518D msgbox RustboroCity_Flat1_2F_Text_2152FA, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq RustboroCity_Flat1_2F_EventScript_2151CD msgbox RustboroCity_Flat1_2F_Text_2154AD, MSGBOX_DEFAULT goto RustboroCity_Flat1_2F_EventScript_215157 RustboroCity_Flat1_2F_EventScript_2151AD:: @ 82151AD msgbox RustboroCity_Flat1_2F_Text_215448, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq RustboroCity_Flat1_2F_EventScript_2151CD msgbox RustboroCity_Flat1_2F_Text_2154AD, MSGBOX_DEFAULT goto RustboroCity_Flat1_2F_EventScript_215157 diff --git a/data/maps/RustboroCity_House1/scripts.inc b/data/maps/RustboroCity_House1/scripts.inc index 4ae0a355c7..f578b251b3 100644 --- a/data/maps/RustboroCity_House1/scripts.inc +++ b/data/maps/RustboroCity_House1/scripts.inc @@ -10,7 +10,7 @@ RustboroCity_House1_EventScript_21593F:: @ 821593F specialvar VAR_RESULT, GetInGameTradeSpeciesInfo copyvar VAR_0x8009, VAR_RESULT msgbox RustboroCity_House1_Text_2159E8, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq RustboroCity_House1_EventScript_2159BD special ChoosePartyMon waitstate diff --git a/data/maps/SafariZone_South/scripts.inc b/data/maps/SafariZone_South/scripts.inc index 96a9a61ea1..ed37034491 100644 --- a/data/maps/SafariZone_South/scripts.inc +++ b/data/maps/SafariZone_South/scripts.inc @@ -53,7 +53,7 @@ SafariZone_South_EventScript_ExitAttendant:: @ 823D2E5 faceplayer goto_if_unset FLAG_GOOD_LUCK_SAFARI_ZONE, SafariZone_South_EventScript_GoodLuck msgbox SafariZone_South_Text_StillHaveTimeExit, MSGBOX_YESNO - compare VAR_RESULT, 1 + compare VAR_RESULT, YES goto_if_eq SafariZone_South_EventScript_ExitEarly msgbox SafariZone_South_Text_EnjoyTheRestOfYourAdventure, MSGBOX_DEFAULT release diff --git a/data/maps/ShoalCave_LowTideEntranceRoom/scripts.inc b/data/maps/ShoalCave_LowTideEntranceRoom/scripts.inc index 13d8f92d90..f5c487ab3b 100644 --- a/data/maps/ShoalCave_LowTideEntranceRoom/scripts.inc +++ b/data/maps/ShoalCave_LowTideEntranceRoom/scripts.inc @@ -27,7 +27,7 @@ ShoalCave_LowTideEntranceRoom_EventScript_236DD9:: @ 8236DD9 compare VAR_RESULT, 0 goto_if_eq ShoalCave_LowTideEntranceRoom_EventScript_236E9B msgbox ShoalCave_LowTideEntranceRoom_Text_2A7F37, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq ShoalCave_LowTideEntranceRoom_EventScript_236ECF checkitemspace ITEM_SHELL_BELL, 1 compare VAR_RESULT, 0 diff --git a/data/maps/SlateportCity/scripts.inc b/data/maps/SlateportCity/scripts.inc index d7fab01717..ee9c0c176f 100644 --- a/data/maps/SlateportCity/scripts.inc +++ b/data/maps/SlateportCity/scripts.inc @@ -852,7 +852,7 @@ SlateportCity_EventScript_1DD54A:: @ 81DD54A SlateportCity_EventScript_1DD557:: @ 81DD557 msgbox SlateportCity_Text_1DEE90, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq SlateportCity_EventScript_1DD3CA copyvar VAR_0x8004, VAR_0x8009 specialvar VAR_RESULT, HasEnoughBerryPowder @@ -865,7 +865,7 @@ SlateportCity_EventScript_1DD557:: @ 81DD557 special TakeBerryPowder special PrintPlayerBerryPowderAmount msgbox SlateportCity_Text_1DEEF7, MSGBOX_YESNO - compare VAR_RESULT, 1 + compare VAR_RESULT, YES goto_if_eq SlateportCity_EventScript_1DD3CA msgbox SlateportCity_Text_1DEF79, MSGBOX_DEFAULT special RemoveBerryPowderVendorMenu diff --git a/data/maps/SlateportCity_BattleTentCorridor/scripts.inc b/data/maps/SlateportCity_BattleTentCorridor/scripts.inc index fcbfa025ce..c5e5616ce7 100644 --- a/data/maps/SlateportCity_BattleTentCorridor/scripts.inc +++ b/data/maps/SlateportCity_BattleTentCorridor/scripts.inc @@ -84,9 +84,9 @@ SlateportCity_BattleTentCorridor_EventScript_208F0D:: @ 8208F0D SlateportCity_BattleTentCorridor_EventScript_208F5B:: @ 8208F5B msgbox SlateportCity_BattleTentCorridor_Text_25A350, MSGBOX_YESNO switch VAR_RESULT - case 0, SlateportCity_BattleTentCorridor_EventScript_208F0D - case 1, SlateportCity_BattleTentCorridor_EventScript_209022 - case 127, SlateportCity_BattleTentCorridor_EventScript_208F0D + case NO, SlateportCity_BattleTentCorridor_EventScript_208F0D + case YES, SlateportCity_BattleTentCorridor_EventScript_209022 + case MULTI_B_PRESSED, SlateportCity_BattleTentCorridor_EventScript_208F0D SlateportCity_BattleTentCorridor_EventScript_208F89:: @ 8208F89 message SlateportCity_BattleTentCorridor_Text_25A37A @@ -102,8 +102,8 @@ SlateportCity_BattleTentCorridor_EventScript_208FBB:: @ 8208FBB special sub_81B9D08 msgbox SlateportCity_BattleTentCorridor_Text_25AB2E, MSGBOX_YESNO switch VAR_RESULT - case 0, SlateportCity_BattleTentCorridor_EventScript_208EB4 - case 1, SlateportCity_BattleTentCorridor_EventScript_208FF1 + case NO, SlateportCity_BattleTentCorridor_EventScript_208EB4 + case YES, SlateportCity_BattleTentCorridor_EventScript_208FF1 case MULTI_B_PRESSED, SlateportCity_BattleTentCorridor_EventScript_208EB4 SlateportCity_BattleTentCorridor_EventScript_208FF1:: @ 8208FF1 diff --git a/data/maps/SlateportCity_BattleTentLobby/scripts.inc b/data/maps/SlateportCity_BattleTentLobby/scripts.inc index 80545a7f20..dcd90d16c5 100644 --- a/data/maps/SlateportCity_BattleTentLobby/scripts.inc +++ b/data/maps/SlateportCity_BattleTentLobby/scripts.inc @@ -144,9 +144,9 @@ SlateportCity_BattleTentLobby_EventScript_208906:: @ 8208906 special CallFrontierUtilFunc msgbox SlateportCity_BattleTentLobby_Text_2C5B06, MSGBOX_YESNO switch VAR_RESULT - case 0, SlateportCity_BattleTentLobby_EventScript_208A2B - case 1, SlateportCity_BattleTentLobby_EventScript_208950 - case 127, SlateportCity_BattleTentLobby_EventScript_208A2B + case NO, SlateportCity_BattleTentLobby_EventScript_208A2B + case YES, SlateportCity_BattleTentLobby_EventScript_208950 + case MULTI_B_PRESSED, SlateportCity_BattleTentLobby_EventScript_208A2B SlateportCity_BattleTentLobby_EventScript_208950:: @ 8208950 setvar VAR_TEMP_0, 0 diff --git a/data/maps/SlateportCity_Harbor/scripts.inc b/data/maps/SlateportCity_Harbor/scripts.inc index aa0eaab774..83f4b80112 100644 --- a/data/maps/SlateportCity_Harbor/scripts.inc +++ b/data/maps/SlateportCity_Harbor/scripts.inc @@ -198,7 +198,7 @@ SlateportCity_Harbor_EventScript_20CB88:: @ 820CB88 SlateportCity_Harbor_EventScript_20CB92:: @ 820CB92 msgbox SlateportCity_Harbor_Text_20CF93, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq SlateportCity_Harbor_EventScript_20CBDD setvar VAR_PORTHOLE_STATE, 1 call SlateportCity_Harbor_EventScript_20CBE9 @@ -209,7 +209,7 @@ SlateportCity_Harbor_EventScript_20CB92:: @ 820CB92 SlateportCity_Harbor_EventScript_20CBBA:: @ 820CBBA msgbox SlateportCity_Harbor_Text_20CFAE, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq SlateportCity_Harbor_EventScript_20CBDD call SlateportCity_Harbor_EventScript_20CBE9 warp MAP_BATTLE_FRONTIER_OUTSIDE_WEST, 255, 19, 67 @@ -354,7 +354,7 @@ SlateportCity_Harbor_EventScript_20CD44:: @ 820CD44 SlateportCity_Harbor_EventScript_20CD7B:: @ 820CD7B msgbox SlateportCity_Harbor_Text_20D8BC, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq SlateportCity_Harbor_EventScript_20CE05 giveitem_std ITEM_DEEP_SEA_TOOTH compare VAR_RESULT, 0 @@ -367,7 +367,7 @@ SlateportCity_Harbor_EventScript_20CD7B:: @ 820CD7B SlateportCity_Harbor_EventScript_20CDBB:: @ 820CDBB msgbox SlateportCity_Harbor_Text_20D8F1, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq SlateportCity_Harbor_EventScript_20CE05 giveitem_std ITEM_DEEP_SEA_SCALE compare VAR_RESULT, 0 diff --git a/data/maps/SlateportCity_House1/scripts.inc b/data/maps/SlateportCity_House1/scripts.inc index e6bde2f555..3e80144c61 100644 --- a/data/maps/SlateportCity_House1/scripts.inc +++ b/data/maps/SlateportCity_House1/scripts.inc @@ -5,9 +5,9 @@ SlateportCity_House1_EventScript_209AA5:: @ 8209AA5 lock faceplayer msgbox SlateportCity_House1_Text_209B8E, MSGBOX_YESNO - compare VAR_RESULT, 1 + compare VAR_RESULT, YES goto_if_eq SlateportCity_House1_EventScript_209AC6 - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq SlateportCity_House1_EventScript_209AE9 end @@ -39,9 +39,9 @@ SlateportCity_House1_EventScript_209AF3:: @ 8209AF3 compare VAR_RESULT, 1 goto_if_eq SlateportCity_House1_EventScript_209B50 msgbox SlateportCity_House1_Text_209C2B, MSGBOX_YESNO - compare VAR_RESULT, 1 + compare VAR_RESULT, YES goto_if_eq SlateportCity_House1_EventScript_209B5A - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq SlateportCity_House1_EventScript_209AE9 end diff --git a/data/maps/SlateportCity_OceanicMuseum_1F/scripts.inc b/data/maps/SlateportCity_OceanicMuseum_1F/scripts.inc index 1028deb3d1..dcf92fe2d5 100644 --- a/data/maps/SlateportCity_OceanicMuseum_1F/scripts.inc +++ b/data/maps/SlateportCity_OceanicMuseum_1F/scripts.inc @@ -22,7 +22,7 @@ SlateportCity_OceanicMuseum_1F_EventScript_PayEntranceFeeRight:: @ 820ADB0 SlateportCity_OceanicMuseum_1F_EventScript_PayEntranceFee:: @ 820ADC1 showmoneybox 0, 0, 0 msgbox SlateportCity_OceanicMuseum_1F_Text_WouldYouLikeToEnter, MSGBOX_YESNO - compare VAR_RESULT, 1 + compare VAR_RESULT, YES goto_if_eq SlateportCity_OceanicMuseum_1F_EventScript_CheckMoneyForFee closemessage hidemoneybox diff --git a/data/maps/SootopolisCity/scripts.inc b/data/maps/SootopolisCity/scripts.inc index 817ae4402f..d74ca48a1a 100644 --- a/data/maps/SootopolisCity/scripts.inc +++ b/data/maps/SootopolisCity/scripts.inc @@ -779,7 +779,7 @@ SootopolisCity_EventScript_1E5F9A:: @ 81E5F9A SootopolisCity_EventScript_1E5FBB:: @ 81E5FBB msgbox SootopolisCity_Text_2A7CEC, MSGBOX_YESNO - compare VAR_RESULT, 1 + compare VAR_RESULT, YES goto_if_eq SootopolisCity_EventScript_1E5FD8 msgbox SootopolisCity_Text_2A7DD2, MSGBOX_DEFAULT release diff --git a/data/maps/SootopolisCity_House2/scripts.inc b/data/maps/SootopolisCity_House2/scripts.inc index 9e45a09bff..4bdf401cfd 100644 --- a/data/maps/SootopolisCity_House2/scripts.inc +++ b/data/maps/SootopolisCity_House2/scripts.inc @@ -5,9 +5,9 @@ SootopolisCity_House2_EventScript_226A77:: @ 8226A77 lock faceplayer msgbox SootopolisCity_House2_Text_226AAB, MSGBOX_YESNO - compare VAR_RESULT, 1 + compare VAR_RESULT, YES call_if_eq SootopolisCity_House2_EventScript_226A99 - compare VAR_RESULT, 0 + compare VAR_RESULT, NO call_if_eq SootopolisCity_House2_EventScript_226AA2 release end diff --git a/data/maps/SootopolisCity_House3/scripts.inc b/data/maps/SootopolisCity_House3/scripts.inc index d7439f18d8..a9aaea09c1 100644 --- a/data/maps/SootopolisCity_House3/scripts.inc +++ b/data/maps/SootopolisCity_House3/scripts.inc @@ -5,7 +5,7 @@ SootopolisCity_House3_EventScript_226B72:: @ 8226B72 lock faceplayer msgbox SootopolisCity_House3_Text_226BA4, MSGBOX_YESNO - compare VAR_RESULT, 1 + compare VAR_RESULT, YES goto_if_eq SootopolisCity_House3_EventScript_226B91 msgbox SootopolisCity_House3_Text_226C44, MSGBOX_DEFAULT release diff --git a/data/maps/SootopolisCity_House6/scripts.inc b/data/maps/SootopolisCity_House6/scripts.inc index bd9c8fe51c..015ac2e365 100644 --- a/data/maps/SootopolisCity_House6/scripts.inc +++ b/data/maps/SootopolisCity_House6/scripts.inc @@ -6,7 +6,7 @@ SootopolisCity_House6_EventScript_226F5C:: @ 8226F5C faceplayer goto_if_set FLAG_RECEIVED_WAILMER_DOLL, SootopolisCity_House6_EventScript_226FA3 msgbox SootopolisCity_House6_Text_226FC3, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO call_if_eq SootopolisCity_House6_EventScript_226F99 msgbox SootopolisCity_House6_Text_227034, MSGBOX_DEFAULT givedecoration_std DECOR_WAILMER_DOLL diff --git a/data/maps/SootopolisCity_MysteryEventsHouse_1F/scripts.inc b/data/maps/SootopolisCity_MysteryEventsHouse_1F/scripts.inc index e6e5229087..c67533ca64 100644 --- a/data/maps/SootopolisCity_MysteryEventsHouse_1F/scripts.inc +++ b/data/maps/SootopolisCity_MysteryEventsHouse_1F/scripts.inc @@ -93,13 +93,13 @@ SootopolisCity_MysteryEventsHouse_1F_EventScript_227A58:: @ 8227A58 special SavePlayerParty special BufferEReaderTrainerName msgbox SootopolisCity_MysteryEventsHouse_1F_Text_227BFC, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq SootopolisCity_MysteryEventsHouse_1F_EventScript_227AE2 call SootopolisCity_MysteryEventsHouse_1F_EventScript_227AEF compare VAR_RESULT, 0 goto_if_eq SootopolisCity_MysteryEventsHouse_1F_EventScript_227AE2 msgbox SootopolisCity_MysteryEventsHouse_1F_Text_227CEB, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq SootopolisCity_MysteryEventsHouse_1F_EventScript_227AE2 special LoadPlayerParty call Common_EventScript_SaveGame diff --git a/data/maps/SouthernIsland_Exterior/scripts.inc b/data/maps/SouthernIsland_Exterior/scripts.inc index c771fc66a1..17ff25fdb5 100644 --- a/data/maps/SouthernIsland_Exterior/scripts.inc +++ b/data/maps/SouthernIsland_Exterior/scripts.inc @@ -10,7 +10,7 @@ SouthernIsland_Exterior_EventScript_Sailor:: @ 82429D2 lock faceplayer msgbox EventTicket_Text_SouthernIslandSailBack, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq SouthernIsland_Exterior_EventScript_AsYouLike msgbox EventTicket_Text_SailHome, MSGBOX_DEFAULT closemessage diff --git a/data/maps/TrainerHill_Elevator/scripts.inc b/data/maps/TrainerHill_Elevator/scripts.inc index bf3d0f9f78..39fa51db4d 100644 --- a/data/maps/TrainerHill_Elevator/scripts.inc +++ b/data/maps/TrainerHill_Elevator/scripts.inc @@ -24,7 +24,7 @@ TrainerHill_Elevator_EventScript_269375:: @ 8269375 waitmovement 0 lockall msgbox TrainerHill_Elevator_Text_268F3E, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq TrainerHill_Elevator_EventScript_269360 releaseall applymovement 1, TrainerHill_Elevator_Movement_2693F0 diff --git a/data/maps/VerdanturfTown_BattleTentBattleRoom/scripts.inc b/data/maps/VerdanturfTown_BattleTentBattleRoom/scripts.inc index 9a764cd58a..3cd012a33d 100644 --- a/data/maps/VerdanturfTown_BattleTentBattleRoom/scripts.inc +++ b/data/maps/VerdanturfTown_BattleTentBattleRoom/scripts.inc @@ -107,9 +107,9 @@ VerdanturfTown_BattleTentBattleRoom_EventScript_20243C:: @ 820243C VerdanturfTown_BattleTentBattleRoom_EventScript_20248A:: @ 820248A msgbox VerdanturfTown_BattleTentBattleRoom_Text_250030, MSGBOX_YESNO switch VAR_RESULT - case 0, VerdanturfTown_BattleTentBattleRoom_EventScript_20243C - case 1, VerdanturfTown_BattleTentBattleRoom_EventScript_20251F - case 127, VerdanturfTown_BattleTentBattleRoom_EventScript_20243C + case NO, VerdanturfTown_BattleTentBattleRoom_EventScript_20243C + case YES, VerdanturfTown_BattleTentBattleRoom_EventScript_20251F + case MULTI_B_PRESSED, VerdanturfTown_BattleTentBattleRoom_EventScript_20243C VerdanturfTown_BattleTentBattleRoom_EventScript_2024B8:: @ 82024B8 message VerdanturfTown_BattleTentBattleRoom_Text_25005A diff --git a/data/maps/VerdanturfTown_BattleTentLobby/scripts.inc b/data/maps/VerdanturfTown_BattleTentLobby/scripts.inc index 5bc3096637..d229334431 100644 --- a/data/maps/VerdanturfTown_BattleTentLobby/scripts.inc +++ b/data/maps/VerdanturfTown_BattleTentLobby/scripts.inc @@ -170,9 +170,9 @@ VerdanturfTown_BattleTentLobby_EventScript_2018CF:: @ 82018CF goto_if_eq VerdanturfTown_BattleTentLobby_EventScript_201A34 msgbox VerdanturfTown_BattleTentLobby_Text_2C5662, MSGBOX_YESNO switch VAR_RESULT - case 0, VerdanturfTown_BattleTentLobby_EventScript_201A34 - case 1, VerdanturfTown_BattleTentLobby_EventScript_201954 - case 127, VerdanturfTown_BattleTentLobby_EventScript_201A34 + case NO, VerdanturfTown_BattleTentLobby_EventScript_201A34 + case YES, VerdanturfTown_BattleTentLobby_EventScript_201954 + case MULTI_B_PRESSED, VerdanturfTown_BattleTentLobby_EventScript_201A34 VerdanturfTown_BattleTentLobby_EventScript_201954:: @ 8201954 setvar VAR_TEMP_0, 0 diff --git a/data/scripts/berry_tree.inc b/data/scripts/berry_tree.inc index 6de5ccf479..6b2da5ccb3 100644 --- a/data/scripts/berry_tree.inc +++ b/data/scripts/berry_tree.inc @@ -32,9 +32,9 @@ BerryTree_EventScript_CheckSoil:: @ 8274359 BerryTree_EventScript_WantToPlant:: @ 8274374 msgbox BerryTree_Text_WantToPlant, MSGBOX_YESNO - compare VAR_RESULT, 1 + compare VAR_RESULT, YES goto_if_eq BerryTree_EventScript_ChooseBerryToPlant - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq BerryTree_EventScript_CancelPlanting end @@ -110,9 +110,9 @@ BerryTree_EventScript_CheckBerryFullyGrown:: @ 8274421 faceplayer special EventObjectInteractionGetBerryCountString msgbox BerryTree_Text_WantToPick, MSGBOX_YESNO - compare VAR_RESULT, 1 + compare VAR_RESULT, YES goto_if_eq BerryTree_EventScript_PickBerry - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq BerryTree_EventScript_CancelPickingBerry BerryTree_EventScript_PickBerry:: @ 8274448 @@ -159,9 +159,9 @@ BerryTree_EventScript_WantToWater:: @ 827448D goto_if_eq BerryTree_EventScript_DontWater special EventObjectInteractionGetBerryName msgbox BerryTree_Text_WantToWater, MSGBOX_YESNO - compare VAR_RESULT, 1 + compare VAR_RESULT, YES goto_if_eq BerryTree_EventScript_WaterBerry - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq BerryTree_EventScript_DontWater BerryTree_EventScript_DontWater:: @ 82744BE diff --git a/data/scripts/cable_club.inc b/data/scripts/cable_club.inc index ccda6afcef..ebb2e6ef09 100644 --- a/data/scripts/cable_club.inc +++ b/data/scripts/cable_club.inc @@ -890,7 +890,7 @@ RecordCorner_EventScript_AlreadyMixed:: @ 82774E0 EventScript_ConfirmLeaveTradeRoom:: @ 82774EF msgbox Text_TerminateLinkConfirmation, MSGBOX_YESNO - compare VAR_RESULT, 1 + compare VAR_RESULT, YES goto_if_eq EventScript_TerminateLink erasebox 0, 0, 29, 19 releaseall @@ -1005,7 +1005,7 @@ CableClub_EventScript_WirelessClubAttendant:: @ 8277672 faceplayer goto_if_unset FLAG_SYS_POKEDEX_GET, CableClub_EventScript_WirelessClubAdjustements msgbox CableClub_Text_AskAboutLinking, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq CableClub_EventScript_DontAskAboutLinking msgbox CableClub_Text_ExplainWirelessClub, MSGBOX_DEFAULT release @@ -1080,7 +1080,7 @@ CableClub_EventScript_DirectCornerHasRecordMix:: @ 82777CB CableClub_EventScript_WirelessTrade:: @ 827780D msgbox CableClub_Text_TradePokemon, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq CableClub_EventScript_AbortLink call CableClub_EventScript_CheckPartyTradeRequirements compare VAR_RESULT, 0 @@ -1132,7 +1132,7 @@ CableClub_EventScript_WirelessBattleInfo:: @ 82778CB CableClub_EventScript_WirelessRecordMix:: @ 82778D9 msgbox CableClub_Text_AccessRecordCorner, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq CableClub_EventScript_AbortLink setvar VAR_0x8004, 12 goto CableClub_EventScript_SaveAndChooseLinkLeader @@ -1140,7 +1140,7 @@ CableClub_EventScript_WirelessRecordMix:: @ 82778D9 CableClub_EventScript_WirelessBerryCrush:: @ 82778F7 msgbox CableClub_Text_UseBerryCrush, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq CableClub_EventScript_AbortLink special HasAtLeastOneBerry compare VAR_RESULT, FALSE @@ -1500,7 +1500,7 @@ MossdeepCity_GameCorner_1F_EventScript_AdapterNotConnected:: @ 8277E48 MossdeepCity_GameCorner_1F_EventScript_DontHaveRequiredMon:: @ 8277E55 msgbox MossdeepCity_GameCorner_1F_Text_ExplainRequiredMon, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq MossdeepCity_GameCorner_1F_EventScript_AbortMinigame compare VAR_0x8005, 0 call_if_eq MossdeepCity_GameCorner_1F_EventScript_ExplainPokemonJumpRequirements diff --git a/data/scripts/contest_hall.inc b/data/scripts/contest_hall.inc index 9a9816a5fd..857c1e2056 100644 --- a/data/scripts/contest_hall.inc +++ b/data/scripts/contest_hall.inc @@ -154,15 +154,15 @@ LilycoveCity_ContestLobby_EventScript_279F12:: @ 8279F12 LilycoveCity_ContestLobby_EventScript_279F21:: @ 8279F21 msgbox LilycoveCity_ContestLobby_Text_27B5C4, MSGBOX_YESNO switch VAR_RESULT - case 0, LilycoveCity_ContestLobby_EventScript_279E13 - case 1, LilycoveCity_ContestLobby_EventScript_279F87 + case NO, LilycoveCity_ContestLobby_EventScript_279E13 + case YES, LilycoveCity_ContestLobby_EventScript_279F87 end LilycoveCity_ContestLobby_EventScript_279F45:: @ 8279F45 msgbox LilycoveCity_ContestLobby_Text_27B547, MSGBOX_YESNO switch VAR_RESULT - case 0, LilycoveCity_ContestLobby_EventScript_279E13 - case 1, LilycoveCity_ContestLobby_EventScript_279F87 + case NO, LilycoveCity_ContestLobby_EventScript_279E13 + case YES, LilycoveCity_ContestLobby_EventScript_279F87 end LilycoveCity_ContestLobby_EventScript_279F69:: @ 8279F69 diff --git a/data/scripts/day_care.inc b/data/scripts/day_care.inc index 062fd9f5a3..b4c23a6947 100644 --- a/data/scripts/day_care.inc +++ b/data/scripts/day_care.inc @@ -15,10 +15,10 @@ Route117_EventScript_DaycareMan:: @ 8291C18 Route117_EventScript_DaycareEggWaiting:: @ 8291C4D msgbox Route117_Text_DoYouWantEgg, MSGBOX_YESNO - compare VAR_RESULT, 1 + compare VAR_RESULT, YES goto_if_eq Route117_EventScript_DaycareAcceptEgg msgbox Route117_Text_IWillKeepDoYouWantIt, MSGBOX_YESNO - compare VAR_RESULT, 1 + compare VAR_RESULT, YES goto_if_eq Route117_EventScript_DaycareAcceptEgg msgbox Route117_Text_IllKeepIt, MSGBOX_DEFAULT clearflag FLAG_PENDING_DAYCARE_EGG @@ -88,7 +88,7 @@ Route117_PokemonDayCare_EventScript_DaycareWoman:: @ 8291D11 compare VAR_RESULT, DAYCARE_TWO_MONS goto_if_eq Route117_PokemonDayCare_EventScript_TwoMonsInDaycare msgbox Route117_PokemonDayCare_Text_WouldYouLikeUsToRaiseAMon, MSGBOX_YESNO - compare VAR_RESULT, 1 + compare VAR_RESULT, YES goto_if_eq Route117_PokemonDayCare_EventScript_GiveMonToRaise msgbox Route117_PokemonDayCare_Text_292416, MSGBOX_DEFAULT release @@ -130,7 +130,7 @@ Route117_PokemonDayCare_EventScript_ComeAgain:: @ 8291DCA Route117_PokemonDayCare_EventScript_CanRaiseOneMore:: @ 8291DD4 msgbox Route117_PokemonDayCare_Text_WeCanRaiseOneMore, MSGBOX_YESNO - compare VAR_RESULT, 1 + compare VAR_RESULT, YES goto_if_eq Route117_PokemonDayCare_EventScript_GiveMonToRaise goto Route117_PokemonDayCare_EventScript_ComeAgain end @@ -170,10 +170,10 @@ Route117_PokemonDayCare_EventScript_OneMonInDaycare:: @ 8291E2F setvar VAR_0x8004, 0 call Route117_PokemonDayCare_EventScript_DisplayLevelsGained msgbox Route117_PokemonDayCare_Text_WeCanRaiseOneMore, MSGBOX_YESNO - compare VAR_RESULT, 1 + compare VAR_RESULT, YES goto_if_eq Route117_PokemonDayCare_EventScript_GiveMonToRaise msgbox Route117_PokemonDayCare_Text_TakeYourMonBack, MSGBOX_YESNO - compare VAR_RESULT, 1 + compare VAR_RESULT, YES goto_if_eq Route117_PokemonDayCare_EventScript_TryRetrieveMon goto Route117_PokemonDayCare_EventScript_ComeAgain end @@ -197,7 +197,7 @@ Route117_PokemonDayCare_EventScript_TryRetrieveMon:: @ 8291E6D Route117_PokemonDayCare_EventScript_CostPrompt:: @ 8291EAC special GetDaycareCost msgbox Route117_PokemonDayCare_Text_ItWillCostX, MSGBOX_YESNO - compare VAR_RESULT, 1 + compare VAR_RESULT, YES goto_if_eq Route117_PokemonDayCare_EventScript_CheckEnoughMoney goto Route117_PokemonDayCare_EventScript_ComeAgain end @@ -229,7 +229,7 @@ Route117_PokemonDayCare_EventScript_RetrieveMon:: @ 8291EE2 Route117_PokemonDayCare_EventScript_AskRetrieveOtherMon:: @ 8291F24 msgbox Route117_PokemonDayCare_Text_TakeOtherOneBackToo, MSGBOX_YESNO - compare VAR_RESULT, 1 + compare VAR_RESULT, YES goto_if_eq Route117_PokemonDayCare_EventScript_TryRetrieveMon goto Route117_PokemonDayCare_EventScript_ComeAgain end @@ -272,7 +272,7 @@ Route117_PokemonDayCare_EventScript_TwoMonsInDaycare:: @ 8291F5C setvar VAR_0x8004, 1 call Route117_PokemonDayCare_EventScript_DisplayLevelsGained msgbox Route117_PokemonDayCare_Text_TakeYourMonBack, MSGBOX_YESNO - compare VAR_RESULT, 1 + compare VAR_RESULT, YES goto_if_eq Route117_PokemonDayCare_EventScript_TryRetrieveMon msgbox Route117_PokemonDayCare_Text_ComeAgain, MSGBOX_DEFAULT release diff --git a/data/scripts/field_move_scripts.inc b/data/scripts/field_move_scripts.inc index bd98a36762..56e3297b6e 100644 --- a/data/scripts/field_move_scripts.inc +++ b/data/scripts/field_move_scripts.inc @@ -9,7 +9,7 @@ EventScript_CutTree:: @ 82906BB bufferpartymonnick 0, VAR_RESULT buffermovename 1, MOVE_CUT msgbox Text_WantToCut, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq EventScript_CancelCut msgbox Text_MonUsedFieldMove, MSGBOX_DEFAULT closemessage @@ -68,7 +68,7 @@ EventScript_RockSmash:: @ 82907A6 bufferpartymonnick 0, VAR_RESULT buffermovename 1, MOVE_ROCK_SMASH msgbox Text_WantToSmash, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq EventScript_CancelSmash msgbox Text_MonUsedFieldMove, MSGBOX_DEFAULT closemessage @@ -133,7 +133,7 @@ EventScript_StrengthBoulder:: @ 82908BA goto_if_eq EventScript_CantStrength setfieldeffectargument 0, VAR_RESULT msgbox Text_WantToStrength, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq EventScript_CancelStrength closemessage dofieldeffect FLDEFF_USE_STRENGTH @@ -195,7 +195,7 @@ EventScript_UseWaterfall:: @ 8290A49 bufferpartymonnick 0, VAR_RESULT setfieldeffectargument 0, VAR_RESULT msgbox Text_WantToWaterfall, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq EventScript_EndWaterfall msgbox Text_MonUsedWaterfall, MSGBOX_DEFAULT dofieldeffect FLDEFF_USE_WATERFALL @@ -231,7 +231,7 @@ EventScript_UseDive:: @ 8290B0F setfieldeffectargument 0, VAR_RESULT setfieldeffectargument 1, 1 msgbox Text_WantToDive, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq EventScript_EndDive msgbox Text_MonUsedDive, MSGBOX_DEFAULT dofieldeffect FLDEFF_USE_DIVE @@ -256,7 +256,7 @@ EventScript_UseDiveUnderwater:: @ 8290B5A setfieldeffectargument 0, VAR_RESULT setfieldeffectargument 1, 1 msgbox Text_WantToSurface, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq EventScript_EndSurface msgbox Text_MonUsedDive, MSGBOX_DEFAULT dofieldeffect FLDEFF_USE_DIVE diff --git a/data/scripts/gabby_and_ty.inc b/data/scripts/gabby_and_ty.inc index 7ed366aca1..f61b9d6db1 100644 --- a/data/scripts/gabby_and_ty.inc +++ b/data/scripts/gabby_and_ty.inc @@ -305,7 +305,7 @@ GabbyAndTy_EventScript_RequestInterviewLostAMon:: @ 828D099 end GabbyAndTy_EventScript_Interview:: @ 828D0A7 - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq GabbyAndTy_EventScript_DontGiveUpKeepingEyeOut msgbox GabbyAndTy_Text_DescribeYourFeelings, MSGBOX_DEFAULT setvar VAR_0x8004, EASY_CHAT_TYPE_GABBY_AND_TY diff --git a/data/scripts/interview.inc b/data/scripts/interview.inc index 8512ca105a..8b2b72f755 100644 --- a/data/scripts/interview.inc +++ b/data/scripts/interview.inc @@ -14,9 +14,9 @@ SlateportCity_PokemonFanClub_EventScript_28C7F0:: @ 828C7F0 goto_if_eq SlateportCity_PokemonFanClub_EventScript_28C879 copyvar VAR_0x8009, VAR_0x8006 msgbox SlateportCity_PokemonFanClub_Text_280674, MSGBOX_YESNO - compare VAR_RESULT, 1 + compare VAR_RESULT, YES goto_if_eq SlateportCity_PokemonFanClub_EventScript_28C827 - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq SlateportCity_PokemonFanClub_EventScript_28C85C end @@ -61,17 +61,17 @@ SlateportCity_OceanicMuseum_1F_EventScript_Reporter:: @ 828C883 goto_if_set FLAG_OCEANIC_MUSEUM_MET_REPORTER, SlateportCity_OceanicMuseum_1F_EventScript_28C8C8 setflag FLAG_OCEANIC_MUSEUM_MET_REPORTER msgbox SlateportCity_OceanicMuseum_1F_Text_2811A0, MSGBOX_YESNO - compare VAR_RESULT, 1 + compare VAR_RESULT, YES goto_if_eq SlateportCity_OceanicMuseum_1F_EventScript_28C8E7 - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq SlateportCity_OceanicMuseum_1F_EventScript_28C91C end SlateportCity_OceanicMuseum_1F_EventScript_28C8C8:: @ 828C8C8 msgbox SlateportCity_OceanicMuseum_1F_Text_28126D, MSGBOX_YESNO - compare VAR_RESULT, 1 + compare VAR_RESULT, YES goto_if_eq SlateportCity_OceanicMuseum_1F_EventScript_28C8E7 - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq SlateportCity_OceanicMuseum_1F_EventScript_28C91C end @@ -117,9 +117,9 @@ SlateportCity_PokemonFanClub_EventScript_28C943:: @ 828C943 goto_if_eq SlateportCity_PokemonFanClub_EventScript_28CA4F copyvar VAR_0x8009, VAR_0x8006 msgbox SlateportCity_PokemonFanClub_Text_280270, MSGBOX_YESNO - compare VAR_RESULT, 1 + compare VAR_RESULT, YES goto_if_eq SlateportCity_PokemonFanClub_EventScript_28C98C - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq SlateportCity_PokemonFanClub_EventScript_28CA45 end @@ -190,9 +190,9 @@ LilycoveCity_ContestLobby_EventScript_28CA59:: @ 828CA59 goto_if_eq LilycoveCity_ContestLobby_EventScript_28CB21 copyvar VAR_0x8009, VAR_0x8006 msgbox LilycoveCity_ContestLobby_Text_27EF15, MSGBOX_YESNO - compare VAR_RESULT, 1 + compare VAR_RESULT, YES goto_if_eq LilycoveCity_ContestLobby_EventScript_28CA9B - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq LilycoveCity_ContestLobby_EventScript_28CAD0 end @@ -271,9 +271,9 @@ BattleFrontier_BattleTowerLobby_EventScript_28CB96:: @ 828CB96 goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_28CC7A copyvar VAR_0x8009, VAR_0x8006 msgbox BattleFrontier_BattleTowerLobby_Text_27F704, MSGBOX_YESNO - compare VAR_RESULT, 1 + compare VAR_RESULT, YES goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_28CBD8 - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_28CC2E end diff --git a/data/scripts/kecleon.inc b/data/scripts/kecleon.inc index ac0931fd81..659cd027b9 100644 --- a/data/scripts/kecleon.inc +++ b/data/scripts/kecleon.inc @@ -57,7 +57,7 @@ EventScript_Kecleon:: @ 8272336 EventScript_AskUseDevonScope:: @ 8272350 msgbox Kecleon_Text_WantToUseDevonScope, MSGBOX_YESNO - compare VAR_RESULT, 1 + compare VAR_RESULT, YES goto_if_eq EventScript_BattleKecleon release end diff --git a/data/scripts/lilycove_lady.inc b/data/scripts/lilycove_lady.inc index 5f6621fa3c..b7b9d514ab 100644 --- a/data/scripts/lilycove_lady.inc +++ b/data/scripts/lilycove_lady.inc @@ -56,9 +56,9 @@ LilycoveCity_PokemonCenter_1F_EventScript_PlayerGaveGreatThing:: @ 82A8427 LilycoveCity_PokemonCenter_1F_EventScript_RequestItem:: @ 82A8435 msgbox LilycoveCity_PokemonCenter_1F_Text_WillYouShareThing, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_DeclineFavor - compare VAR_RESULT, 1 + compare VAR_RESULT, YES goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_AcceptFavor end @@ -85,9 +85,9 @@ LilycoveCity_PokemonCenter_1F_EventScript_ChooseFavorItem:: @ 82A846C LilycoveCity_PokemonCenter_1F_EventScript_AskQuitChooseFavorItem:: @ 82A848E msgbox LilycoveCity_PokemonCenter_1F_Text_NotWillingToShare, MSGBOX_YESNO - compare VAR_RESULT, 1 + compare VAR_RESULT, YES goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_DeclineFavor - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_ChooseFavorItem end @@ -195,9 +195,9 @@ LilycoveCity_PokemonCenter_1F_EventScript_LadyQuizReady:: @ 82A85E0 LilycoveCity_PokemonCenter_1F_EventScript_AskTakeQuiz:: @ 82A85EE setvar VAR_0x8004, 0 msgbox LilycoveCity_PokemonCenter_1F_Text_TakeQuizChallenge, MSGBOX_YESNO - compare VAR_RESULT, 1 + compare VAR_RESULT, YES goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_TakeQuiz - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_DeclineQuiz end @@ -234,9 +234,9 @@ LilycoveCity_PokemonCenter_1F_EventScript_GetAnswer:: @ 82A8656 LilycoveCity_PokemonCenter_1F_EventScript_AskQuitQuiz:: @ 82A8660 msgbox LilycoveCity_PokemonCenter_1F_Text_YoureGoingToQuit, MSGBOX_YESNO - compare VAR_RESULT, 1 + compare VAR_RESULT, YES goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_QuitTakingQuiz - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_TakeQuiz end @@ -311,9 +311,9 @@ LilycoveCity_PokemonCenter_1F_EventScript_NoSpaceForQuizPrize:: @ 82A874C LilycoveCity_PokemonCenter_1F_EventScript_AskMakeQuiz:: @ 82A8759 msgbox LilycoveCity_PokemonCenter_1F_Text_MakeYourOwnQuiz, MSGBOX_YESNO - compare VAR_RESULT, 1 + compare VAR_RESULT, YES goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_MakeQuiz - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_DeclineMakeQuiz end @@ -338,9 +338,9 @@ LilycoveCity_PokemonCenter_1F_EventScript_PickPrize:: @ 82A878D LilycoveCity_PokemonCenter_1F_EventScript_AskQuitChoosingPrize:: @ 82A87AF msgbox LilycoveCity_PokemonCenter_1F_Text_QuitChoosingPrize, MSGBOX_YESNO - compare VAR_RESULT, 1 + compare VAR_RESULT, YES goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_DeclineMakeQuiz - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_PickPrize end @@ -360,9 +360,9 @@ LilycoveCity_PokemonCenter_1F_EventScript_WriteQuizQuestion:: @ 82A87E1 LilycoveCity_PokemonCenter_1F_EventScript_AskQuitWritingQuizQuestion:: @ 82A87F8 msgbox LilycoveCity_PokemonCenter_1F_Text_QuitWritingQuizQuestion, MSGBOX_YESNO - compare VAR_RESULT, 1 + compare VAR_RESULT, YES goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_DeclineMakeQuiz - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_WriteQuizQuestion end @@ -406,9 +406,9 @@ LilycoveCity_PokemonCenter_1F_EventScript_AskForPokeblock:: @ 82A8876 compare VAR_RESULT, FALSE goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_NoPokeblockCase msgbox LilycoveCity_PokemonCenter_1F_Text_AskingForOnePokeblock, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_DeclineGivePokeblock - compare VAR_RESULT, 1 + compare VAR_RESULT, YES goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_ChoosePokeblock end @@ -429,9 +429,9 @@ LilycoveCity_PokemonCenter_1F_EventScript_ChoosePokeblock:: @ 82A88BA LilycoveCity_PokemonCenter_1F_EventScript_AskQuitGivingPokeblock:: @ 82A88D7 msgbox LilycoveCity_PokemonCenter_1F_Text_ICantHaveOnePokeblock, MSGBOX_YESNO - compare VAR_RESULT, 1 + compare VAR_RESULT, YES goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_DeclineGivePokeblock - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_ChoosePokeblock end diff --git a/data/scripts/mauville_man.inc b/data/scripts/mauville_man.inc index deeec77215..34622775a4 100644 --- a/data/scripts/mauville_man.inc +++ b/data/scripts/mauville_man.inc @@ -13,9 +13,9 @@ MauvilleCity_PokemonCenter_1F_EventScript_Bard:: @ 828E0A6 lock faceplayer msgbox MauvilleCity_PokemonCenter_1F_Text_WouldYouLikeToHearMySong, MSGBOX_YESNO - compare VAR_RESULT, 1 + compare VAR_RESULT, YES goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_PlaySong - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_DeclineSong end @@ -37,9 +37,9 @@ MauvilleCity_PokemonCenter_1F_EventScript_DeclineSong:: @ 828E0EA MauvilleCity_PokemonCenter_1F_EventScript_AskToWriteLyrics:: @ 828E0F4 msgbox MauvilleCity_PokemonCenter_1F_Text_WouldYouLikeToWriteSomeLyrics, MSGBOX_YESNO - compare VAR_RESULT, 1 + compare VAR_RESULT, YES goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_WriteLyrics - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_DeclineWritingLyrics end @@ -55,7 +55,7 @@ MauvilleCity_PokemonCenter_1F_EventScript_WriteLyrics:: @ 828E113 special ScrSpecial_PlayBardSong delay 60 msgbox MauvilleCity_PokemonCenter_1F_Text_ThatHowYouWantedSongToGo, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_WriteLyrics special ScrSpecial_SaveBardSongLyrics msgbox MauvilleCity_PokemonCenter_1F_Text_IllSingThisSongForAWhile, MSGBOX_DEFAULT @@ -158,7 +158,7 @@ MauvilleCity_PokemonCenter_1F_EventScript_Trader:: @ 828E4D4 lock faceplayer msgbox MauvilleCity_PokemonCenter_1F_Text_WantToTradeDecor, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_DeclineTrade special ScrSpecial_GetTraderTradedFlag compare VAR_RESULT, TRUE @@ -186,7 +186,7 @@ MauvilleCity_PokemonCenter_1F_EventScript_PickDecorToReceive:: @ 828E517 compare VAR_0x8004, 0xFFFF goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_InvalidDecor msgbox MauvilleCity_PokemonCenter_1F_Text_OnceBelongedToPlayerDoYouWantIt, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_PickDifferentDecor special ScrSpecial_DoesPlayerHaveNoDecorations compare VAR_RESULT, TRUE @@ -228,7 +228,7 @@ MauvilleCity_PokemonCenter_1F_EventScript_PickDecorToGive:: @ 828E584 compare VAR_RESULT, TRUE goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_NoRoomForDecor msgbox MauvilleCity_PokemonCenter_1F_Text_SoWellTradeTheseDecor, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_PickDecorToGive special ScrSpecial_TraderDoDecorationTrade msgbox MauvilleCity_PokemonCenter_1F_Text_SendDecorToYourPC, MSGBOX_DEFAULT @@ -815,7 +815,7 @@ MauvilleCity_PokemonCenter_1F_EventScript_Storyteller:: @ 829014A setvar VAR_0x800A, 0 setvar VAR_0x800B, 0 msgbox MauvilleCity_PokemonCenter_1F_Text_WillYouHearMyTale, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_DeclineStoryteller specialvar VAR_RESULT, ScrSpecial_StorytellerGetFreeStorySlot compare VAR_RESULT, 0 @@ -850,7 +850,7 @@ MauvilleCity_PokemonCenter_1F_EventScript_KnowNoTales:: @ 82901DA msgbox MauvilleCity_PokemonCenter_1F_Text_IKnowNoTales, MSGBOX_DEFAULT MauvilleCity_PokemonCenter_1F_EventScript_DoYouHaveAnyTales:: @ 82901E2 msgbox MauvilleCity_PokemonCenter_1F_Text_HaveYouAnyLegendaryTales, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_DeclineStoryteller specialvar VAR_RESULT, ScrSpecial_StorytellerInitializeRandomStat compare VAR_RESULT, 1 @@ -901,9 +901,9 @@ MauvilleCity_PokemonCenter_1F_EventScript_Giddy:: @ 82902F6 lock faceplayer msgbox MauvilleCity_PokemonCenter_1F_Text_HearMyStory, MSGBOX_YESNO - compare VAR_RESULT, 1 + compare VAR_RESULT, YES goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_TryTellTale - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_DeclineGiddy end diff --git a/data/scripts/mevent.inc b/data/scripts/mevent.inc index 88f44e0025..7311543156 100644 --- a/data/scripts/mevent.inc +++ b/data/scripts/mevent.inc @@ -1,7 +1,7 @@ EventScript_Questionnaire:: @ 827381B lockall msgbox Mevent_Text_FillOutQuestionnaire, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq Mevent_EventScript_Release setvar VAR_0x8004, EASY_CHAT_TYPE_QUESTIONNAIRE call Common_ShowEasyChatScreen diff --git a/data/scripts/move_tutors.inc b/data/scripts/move_tutors.inc index 0d42440235..a7807ce51b 100644 --- a/data/scripts/move_tutors.inc +++ b/data/scripts/move_tutors.inc @@ -3,10 +3,10 @@ SlateportCity_PokemonFanClub_EventScript_SwaggerTutor:: @ 82C7F16 faceplayer goto_if_set FLAG_MOVE_TUTOR_TAUGHT_SWAGGER, MoveTutor_EventScript_SwaggerTaught msgbox MoveTutor_Text_SwaggerTeach, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq MoveTutor_EventScript_SwaggerDeclined call MoveTutor_EventScript_CanOnlyBeLearnedOnce - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq MoveTutor_EventScript_SwaggerDeclined msgbox MoveTutor_Text_SwaggerWhichMon, MSGBOX_DEFAULT setvar VAR_0x8005, TUTOR_MOVE_SWAGGER @@ -32,10 +32,10 @@ MauvilleCity_EventScript_RolloutTutor:: @ 82C7F7E faceplayer goto_if_set FLAG_MOVE_TUTOR_TAUGHT_ROLLOUT, MoveTutor_EventScript_RolloutTaught msgbox MoveTutor_Text_RolloutTeach, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq MoveTutor_EventScript_RolloutDeclined call MoveTutor_EventScript_CanOnlyBeLearnedOnce - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq MoveTutor_EventScript_RolloutDeclined msgbox MoveTutor_Text_RolloutWhichMon, MSGBOX_DEFAULT setvar VAR_0x8005, TUTOR_MOVE_ROLLOUT @@ -61,10 +61,10 @@ VerdanturfTown_PokemonCenter_1F_EventScript_FuryCutterTutor:: @ 82C7FE6 faceplayer goto_if_set FLAG_MOVE_TUTOR_TAUGHT_FURY_CUTTER, MoveTutor_EventScript_FuryCutterTaught msgbox MoveTutor_Text_FuryCutterTeach, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq MoveTutor_EventScript_FuryCutterDeclined call MoveTutor_EventScript_CanOnlyBeLearnedOnce - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq MoveTutor_EventScript_FuryCutterDeclined msgbox MoveTutor_Text_FuryCutterWhichMon, MSGBOX_DEFAULT setvar VAR_0x8005, TUTOR_MOVE_FURY_CUTTER @@ -90,10 +90,10 @@ LavaridgeTown_House_EventScript_MimicTutor:: @ 82C804E faceplayer goto_if_set FLAG_MOVE_TUTOR_TAUGHT_MIMIC, MoveTutor_EventScript_MimicTaught msgbox MoveTutor_MimicTeach, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq MoveTutor_EventScript_MimicDeclined call MoveTutor_EventScript_CanOnlyBeLearnedOnce - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq MoveTutor_EventScript_MimicDeclined msgbox MoveTutor_Text_MimicWhichMon, MSGBOX_DEFAULT setvar VAR_0x8005, TUTOR_MOVE_MIMIC @@ -119,10 +119,10 @@ FallarborTown_Mart_EventScript_MetronomeTutor:: @ 82C80B6 faceplayer goto_if_set FLAG_MOVE_TUTOR_TAUGHT_METRONOME, MoveTutor_EventScript_MetronomeTaught msgbox MoveTutor_Text_MetronomeTeach, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq MoveTutor_EventScript_MetronomeDeclined call MoveTutor_EventScript_CanOnlyBeLearnedOnce - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq MoveTutor_EventScript_MetronomeDeclined msgbox MoveTutor_Text_MetronomeWhichMon, MSGBOX_DEFAULT setvar VAR_0x8005, TUTOR_MOVE_METRONOME @@ -148,10 +148,10 @@ FortreeCity_House2_EventScript_SleepTalkTutor:: @ 82C811E faceplayer goto_if_set FLAG_MOVE_TUTOR_TAUGHT_SLEEP_TALK, MoveTutor_EventScript_SleepTalkTaught msgbox MoveTutor_Text_SleepTalkTeach, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq MoveTutor_EventScript_SleepTalkDeclined call MoveTutor_EventScript_CanOnlyBeLearnedOnce - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq MoveTutor_EventScript_SleepTalkDeclined msgbox MoveTutor_Text_SleepTalkWhichMon, MSGBOX_DEFAULT setvar VAR_0x8005, TUTOR_MOVE_SLEEP_TALK @@ -177,10 +177,10 @@ LilycoveCity_DepartmentStoreRooftop_EventScript_SubstituteTutor:: @ 82C8186 faceplayer goto_if_set FLAG_MOVE_TUTOR_TAUGHT_SUBSTITUTE, MoveTutor_EventScript_SubstituteTaught msgbox MoveTutor_Text_SubstituteTeach, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq MoveTutor_EventScript_SubstituteDeclined call MoveTutor_EventScript_CanOnlyBeLearnedOnce - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq MoveTutor_EventScript_SubstituteDeclined msgbox MoveTutor_Text_SubstituteWhichMon, MSGBOX_DEFAULT setvar VAR_0x8005, TUTOR_MOVE_SUBSTITUTE @@ -206,10 +206,10 @@ MossdeepCity_EventScript_DynamicPunchTutor:: @ 82C81EE faceplayer goto_if_set FLAG_MOVE_TUTOR_TAUGHT_DYNAMICPUNCH, MoveTutor_EventScript_DynamicPunchTaught msgbox MoveTutor_Text_DynamicPunchTeach, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq MoveTutor_EventScript_DynamicPunchDeclined call MoveTutor_EventScript_CanOnlyBeLearnedOnce - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq MoveTutor_EventScript_DynamicPunchDeclined msgbox MoveTutor_Text_DynamicPunchWhichMon, MSGBOX_DEFAULT setvar VAR_0x8005, TUTOR_MOVE_DYNAMIC_PUNCH @@ -235,10 +235,10 @@ SootopolisCity_PokemonCenter_1F_EventScript_DoubleEdgeTutor:: @ 82C8256 faceplayer goto_if_set FLAG_MOVE_TUTOR_TAUGHT_DOUBLE_EDGE, MoveTutor_EventScript_DoubleEdgeTaught msgbox MoveTutor_Text_DoubleEdgeTeach, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq MoveTutor_EventScript_DoubleEdgeDeclined call MoveTutor_EventScript_CanOnlyBeLearnedOnce - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq MoveTutor_EventScript_DoubleEdgeDeclined msgbox MoveTutor_Text_DoubleEdgeWhichMon, MSGBOX_DEFAULT setvar VAR_0x8005, TUTOR_MOVE_DOUBLE_EDGE @@ -264,10 +264,10 @@ PacifidlogTown_PokemonCenter_1F_EventScript_ExplosionTutor:: @ 82C82BE faceplayer goto_if_set FLAG_MOVE_TUTOR_TAUGHT_EXPLOSION, MoveTutor_EventScript_ExplosionTaught msgbox MoveTutor_Text_ExplosionTeach, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq MoveTutor_EventScript_ExplosionDeclined call MoveTutor_EventScript_CanOnlyBeLearnedOnce - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq MoveTutor_EventScript_ExplosionDeclined msgbox MoveTutor_Text_ExplosionWhichMon, MSGBOX_DEFAULT setvar VAR_0x8005, TUTOR_MOVE_EXPLOSION diff --git a/data/scripts/pkmn_center_nurse.inc b/data/scripts/pkmn_center_nurse.inc index 0d4be2c0db..18b203d61a 100644 --- a/data/scripts/pkmn_center_nurse.inc +++ b/data/scripts/pkmn_center_nurse.inc @@ -6,9 +6,9 @@ Common_EventScript_PkmnCenterNurse:: @ 827191E compare VAR_RESULT, 4 goto_if_eq EventScript_PkmnCenterNurse_GoldCard msgbox gText_WouldYouLikeToRestYourPkmn, MSGBOX_YESNO - compare VAR_RESULT, 1 + compare VAR_RESULT, YES goto_if_eq EventScript_PkmnCenterNurse_HealPkmn - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq EventScript_PkmnCenterNurse_Goodbye end @@ -112,14 +112,14 @@ EventScript_PkmnCenterNurse_GoldCard:: @ 8271A68 applymovement VAR_0x800B, Common_Movement_Delay48 waitmovement 0 msgbox gText_NoticesGoldCard, MSGBOX_YESNO - compare VAR_RESULT, 1 + compare VAR_RESULT, YES goto_if_eq EventScript_PkmnCenterNurse_GoldCardHealPkmn message gText_WeHopeToSeeYouAgain2 return EventScript_PkmnCenterNurse_AskForUsual:: @ 8271AAC msgbox gText_YouWantTheUsual, MSGBOX_YESNO - compare VAR_RESULT, 1 + compare VAR_RESULT, YES goto_if_eq EventScript_PkmnCenterNurse_GoldCardHealPkmn message gText_WeHopeToSeeYouAgain2 return diff --git a/data/scripts/pokeblocks.inc b/data/scripts/pokeblocks.inc index 9590f31401..c223bc1c72 100644 --- a/data/scripts/pokeblocks.inc +++ b/data/scripts/pokeblocks.inc @@ -252,7 +252,7 @@ EventScript_Pblock1_Ask:: @ 8293C3E applymovement 16, LilycoveCity_ContestLobby_Movement_294053 waitmovement 0 msgbox Text_Pblock1_Ask, MSGBOX_YESNO - compare VAR_RESULT, 1 + compare VAR_RESULT, YES goto_if_eq EventScript_Pblock1_Yes goto EventScript_Pblock1_No end @@ -283,7 +283,7 @@ LilycoveCity_ContestLobby_EventScript_293C9C: @ 8293C9C EventScript_Pblock1_KnowHow: @ 8293CB9 msgbox Text_Pblock1_KnowHow, MSGBOX_YESNO - compare VAR_RESULT, 1 + compare VAR_RESULT, YES goto_if_eq EventScript_Pblock1_Start goto EventScript_Pblock1_Explain end @@ -337,7 +337,7 @@ LilycoveCity_ContestLobby_EventScript_293D4D:: @ 8293D4D applymovement 3, LilycoveCity_ContestLobby_Movement_294053 waitmovement 0 msgbox LilycoveCity_ContestLobby_Text_293201, MSGBOX_YESNO - compare VAR_RESULT, 1 + compare VAR_RESULT, YES goto_if_eq LilycoveCity_ContestLobby_EventScript_293DC6 goto LilycoveCity_ContestLobby_EventScript_293D7D end @@ -354,7 +354,7 @@ LilycoveCity_ContestLobby_EventScript_293D87: @ 8293D87 LilycoveCity_ContestLobby_EventScript_293D91: @ 8293D91 msgbox LilycoveCity_ContestLobby_Text_29328C, MSGBOX_YESNO - compare VAR_RESULT, 1 + compare VAR_RESULT, YES goto_if_eq LilycoveCity_ContestLobby_EventScript_293DAA goto LilycoveCity_ContestLobby_EventScript_293DB8 end @@ -403,7 +403,7 @@ LilycoveCity_ContestLobby_EventScript_293E1E:: @ 8293E1E applymovement VAR_0x8008, LilycoveCity_ContestLobby_Movement_294053 waitmovement 0 msgbox LilycoveCity_ContestLobby_Text_293842, MSGBOX_YESNO - compare VAR_RESULT, 1 + compare VAR_RESULT, YES goto_if_eq LilycoveCity_ContestLobby_EventScript_293EA3 goto LilycoveCity_ContestLobby_EventScript_293E5A end @@ -420,7 +420,7 @@ LilycoveCity_ContestLobby_EventScript_293E64: @ 8293E64 LilycoveCity_ContestLobby_EventScript_293E6E: @ 8293E6E msgbox LilycoveCity_ContestLobby_Text_29357E, MSGBOX_YESNO - compare VAR_RESULT, 1 + compare VAR_RESULT, YES goto_if_eq LilycoveCity_ContestLobby_EventScript_293E87 goto LilycoveCity_ContestLobby_EventScript_293E95 end diff --git a/data/scripts/prof_birch.inc b/data/scripts/prof_birch.inc index 50284d5900..b89d2fbd05 100644 --- a/data/scripts/prof_birch.inc +++ b/data/scripts/prof_birch.inc @@ -49,7 +49,7 @@ ProfBirch_EventScript_RatePokedexOrRegister:: @ 8272141 ProfBirch_EventScript_AskRatePokedex:: @ 8272155 msgbox gBirchDexRatingText_AreYouCurious, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq ProfBirch_EventScript_DeclineRating call ProfBirch_EventScript_RatePokedex release diff --git a/data/scripts/record_mix.inc b/data/scripts/record_mix.inc index f70b7f83e8..23f224ae4f 100644 --- a/data/scripts/record_mix.inc +++ b/data/scripts/record_mix.inc @@ -3,9 +3,9 @@ EventScript_MixRecordsPrompt:: @ 8271D5E lock faceplayer msgbox Text_WouldYouLikeToMixRecords, MSGBOX_YESNO - compare VAR_RESULT, 1 + compare VAR_RESULT, YES goto_if_eq EventScript_MixRecords - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq EventScript_DeclineMixRecords goto EventScript_DeclineMixRecords diff --git a/data/scripts/safari_zone.inc b/data/scripts/safari_zone.inc index 83cf5d16dd..72d1d3c923 100644 --- a/data/scripts/safari_zone.inc +++ b/data/scripts/safari_zone.inc @@ -14,7 +14,7 @@ SafariZone_EventScript_Exit:: @ 82A4B5D SafariZone_EventScript_RetirePrompt:: @ 82A4B6F lockall msgbox SafariZone_Text_WouldYouLikeToExit, MSGBOX_YESNO - compare VAR_RESULT, 1 + compare VAR_RESULT, YES goto_if_eq SafariZone_EventScript_Retire releaseall end @@ -46,7 +46,7 @@ EventScript_PokeBlockFeeder:: @ 82A4BAC compare VAR_RESULT, 0xFFFF goto_if_ne SafariZone_EventScript_PokeblockPresent msgbox SafariZone_Text_PlacePokeblockOnFeeder, MSGBOX_YESNO - compare VAR_RESULT, 1 + compare VAR_RESULT, YES goto_if_eq SafariZone_EventScript_ChoosePokeblock releaseall end diff --git a/data/scripts/secret_base.inc b/data/scripts/secret_base.inc index f2a99cd368..04fab55981 100644 --- a/data/scripts/secret_base.inc +++ b/data/scripts/secret_base.inc @@ -52,7 +52,7 @@ SecretBase_EventScript_Cave:: @ 8275A50 goto_if_eq SecretBase_EventScript_CaveNoSecretPower bufferpartymonnick 0, VAR_RESULT msgbox SecretBase_Text_IndentUseSecretPower, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq SecretBase_EventScript_CancelOnEntrance msgbox Text_MonUsedFieldMove, MSGBOX_DEFAULT closemessage @@ -84,7 +84,7 @@ SecretBase_EventScript_Tree:: @ 8275AA9 goto_if_eq SecretBase_EventScript_TreeNoSecretPower bufferpartymonnick 0, VAR_RESULT msgbox SecretBase_Text_TreeUseSecretPower, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq SecretBase_EventScript_CancelOnEntrance msgbox Text_MonUsedFieldMove, MSGBOX_DEFAULT closemessage @@ -116,7 +116,7 @@ SecretBase_EventScript_Shrub:: @ 8275B02 goto_if_eq SecretBase_EventScript_ShrubNoSecretPower bufferpartymonnick 0, VAR_RESULT msgbox SecretBase_Text_ClumpUseSecretPower, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq SecretBase_EventScript_CancelOnEntrance msgbox Text_MonUsedFieldMove, MSGBOX_DEFAULT closemessage @@ -161,7 +161,7 @@ SecretBase_EventScript_FirstEntrance:: @ 8275B81 waitmovement 0 setvar VAR_INIT_SECRET_BASE, 1 msgbox SecretBase_Text_WantToMakeYourSecretBaseHere, MSGBOX_YESNO - compare VAR_RESULT, 1 + compare VAR_RESULT, YES goto_if_eq SecretBase_EventScript_SetAsBase closemessage playse SE_KAIDAN @@ -209,17 +209,17 @@ SecretBase_EventScript_AlreadyHasSecretBase:: @ 8275BE8 lockall special GetSecretBaseNearbyMapName msgbox SecretBase_Text_WouldYouLikeToMoveBases, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq SecretBase_EventScript_CancelOnEntrance msgbox SecretBase_Text_AllDecorationsWillBeReturned, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq SecretBase_EventScript_CancelOnEntrance fadescreenswapbuffers 1 special MoveOutOfSecretBaseFromOutside closemessage fadescreenswapbuffers 0 msgbox SecretBase_Text_MovingCompletedUseSecretPower, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq SecretBase_EventScript_CancelOnEntrance bufferpartymonnick 0, VAR_0x8004 buffermovename 1, MOVE_SECRET_POWER @@ -347,7 +347,7 @@ SecretBase_EventScript_Trainer0:: @ 8275DD6 compare VAR_RESULT, 1 goto_if_eq SecretBase_EventScript_Trainer0PostBattle msgbox SecretBase_Text_Trainer0PreBattle, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq SecretBase_EventScript_Trainer0DeclineBattle setvar VAR_RESULT, 1 special SetBattledOwnerFromResult @@ -384,7 +384,7 @@ SecretBase_EventScript_Trainer1:: @ 8275E4E compare VAR_RESULT, 1 goto_if_eq SecretBase_EventScript_Trainer1PostBattle msgbox SecretBase_Text_Trainer1PreBattle, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq SecretBase_EventScript_Trainer1DeclineBattle setvar VAR_RESULT, 1 special SetBattledOwnerFromResult @@ -421,7 +421,7 @@ SecretBase_EventScript_Trainer2:: @ 8275EC6 compare VAR_RESULT, 1 goto_if_eq SecretBase_EventScript_Trainer2PostBattle msgbox SecretBase_Text_Trainer2PreBattle, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq SecretBase_EventScript_Trainer2DeclineBattle setvar VAR_RESULT, 1 special SetBattledOwnerFromResult @@ -458,7 +458,7 @@ SecretBase_EventScript_Trainer3:: @ 8275F3E compare VAR_RESULT, 1 goto_if_eq SecretBase_EventScript_Trainer3PostBattle msgbox SecretBase_Text_Trainer3PreBattle, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq SecretBase_EventScript_Trainer3DeclineBattle setvar VAR_RESULT, 1 special SetBattledOwnerFromResult @@ -495,7 +495,7 @@ SecretBase_EventScript_Trainer4:: @ 8275FB6 compare VAR_RESULT, 1 goto_if_eq SecretBase_EventScript_Trainer4PostBattle msgbox SecretBase_Text_Trainer4PreBattle, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq SecretBase_EventScript_Trainer4DeclineBattle setvar VAR_RESULT, 1 special SetBattledOwnerFromResult @@ -532,7 +532,7 @@ SecretBase_EventScript_Trainer5:: @ 827602E compare VAR_RESULT, 1 goto_if_eq SecretBase_EventScript_Trainer5PostBattle msgbox SecretBase_Text_Trainer5PreBattle, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq SecretBase_EventScript_Trainer5DeclineBattle setvar VAR_RESULT, 1 special SetBattledOwnerFromResult @@ -569,7 +569,7 @@ SecretBase_EventScript_Trainer6:: @ 82760A6 compare VAR_RESULT, 1 goto_if_eq SecretBase_EventScript_Trainer6PostBattle msgbox SecretBase_Text_Trainer6PreBattle, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq SecretBase_EventScript_Trainer6DeclineBattle setvar VAR_RESULT, 1 special SetBattledOwnerFromResult @@ -606,7 +606,7 @@ SecretBase_EventScript_Trainer7:: @ 827611E compare VAR_RESULT, 1 goto_if_eq SecretBase_EventScript_Trainer7PostBattle msgbox SecretBase_Text_Trainer7PreBattle, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq SecretBase_EventScript_Trainer7DeclineBattle setvar VAR_RESULT, 1 special SetBattledOwnerFromResult @@ -643,7 +643,7 @@ SecretBase_EventScript_Trainer8:: @ 8276196 compare VAR_RESULT, 1 goto_if_eq SecretBase_EventScript_Trainer8PostBattle msgbox SecretBase_Text_Trainer8PreBattle, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq SecretBase_EventScript_Trainer8DeclineBattle setvar VAR_RESULT, 1 special SetBattledOwnerFromResult @@ -680,7 +680,7 @@ SecretBase_EventScript_Trainer9:: @ 827620E compare VAR_RESULT, 1 goto_if_eq SecretBase_EventScript_Trainer9PostBattle msgbox SecretBase_Text_Trainer9PreBattle, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq SecretBase_EventScript_Trainer9DeclineBattle setvar VAR_RESULT, 1 special SetBattledOwnerFromResult diff --git a/data/scripts/secret_power_tm.inc b/data/scripts/secret_power_tm.inc index 51a3271424..c89202dedc 100644 --- a/data/scripts/secret_power_tm.inc +++ b/data/scripts/secret_power_tm.inc @@ -37,7 +37,7 @@ Route111_EventScript_2765FF:: @ 82765FF lock faceplayer msgbox Route111_Text_2762C9, MSGBOX_YESNO - compare VAR_RESULT, 1 + compare VAR_RESULT, YES goto_if_eq Route111_EventScript_27661E msgbox Route111_Text_27655C, MSGBOX_DEFAULT release diff --git a/data/scripts/shared_secret_base.inc b/data/scripts/shared_secret_base.inc index 3f83e38b05..3a4c044a3f 100644 --- a/data/scripts/shared_secret_base.inc +++ b/data/scripts/shared_secret_base.inc @@ -68,7 +68,7 @@ SecretBase_EventScript_PCMainMenuWithoutRegister:: @ 823B531 SecretBase_EventScript_PCPackUp:: @ 823B568 msgbox SecretBase_Text_AllDecorationsWillBeReturned, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq SecretBase_EventScript_PCShowMainMenu closemessage special MoveOutOfSecretBase @@ -120,7 +120,7 @@ SecretBase_EventScript_PCRegister:: @ 823B5F0 goto_if_eq SecretBase_EventScript_CantRegisterTooManyBases special CopyCurSecretBaseOwnerName_StrVar1 msgbox SecretBase_Text_WantToRegisterSecretBase, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq SecretBase_EventScript_PCRegisterMenu msgbox SecretBase_Text_RegistrationCompleted, MSGBOX_SIGN special ToggleCurSecretBaseRegistry @@ -130,7 +130,7 @@ SecretBase_EventScript_PCRegister:: @ 823B5F0 SecretBase_EventScript_AlreadyRegistered:: @ 823B62F msgbox SecretBase_Text_AlreadyRegisteredDelete, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq SecretBase_EventScript_PCRegisterMenu msgbox SecretBase_Text_DataUnregistered, MSGBOX_SIGN special ToggleCurSecretBaseRegistry diff --git a/data/scripts/surf.inc b/data/scripts/surf.inc index 154cc53c23..af6cac1dad 100644 --- a/data/scripts/surf.inc +++ b/data/scripts/surf.inc @@ -6,7 +6,7 @@ EventScript_UseSurf:: @ 8271EA0 setfieldeffectargument 0, VAR_RESULT lockall msgbox gText_WantToUseSurf, MSGBOX_YESNO - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq EventScript_ReleaseUseSurf msgbox gText_PlayerUsedSurf, MSGBOX_DEFAULT dofieldeffect FLDEFF_USE_SURF