summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--data/event_scripts.s7
-rw-r--r--data/maps/FortreeCity/scripts.inc2
-rw-r--r--data/maps/FortreeCity_Gym/map.json20
-rw-r--r--data/maps/FortreeCity_Gym/scripts.inc176
-rw-r--r--data/maps/GraniteCave_B1F/scripts.inc2
-rw-r--r--data/maps/InsideOfTruck/scripts.inc2
-rw-r--r--data/maps/JaggedPass/scripts.inc2
-rw-r--r--data/maps/MirageTower_2F/scripts.inc2
-rw-r--r--data/maps/MirageTower_3F/scripts.inc2
-rw-r--r--data/maps/MossdeepCity_Gym/map.json34
-rw-r--r--data/maps/MossdeepCity_Gym/scripts.inc208
-rw-r--r--data/maps/MtChimney/scripts.inc2
-rw-r--r--data/maps/MtPyre_2F/scripts.inc2
-rw-r--r--data/maps/PacifidlogTown/scripts.inc2
-rw-r--r--data/maps/PetalburgCity/scripts.inc4
-rw-r--r--data/maps/PetalburgCity_Gym/map.json46
-rw-r--r--data/maps/PetalburgCity_Gym/scripts.inc999
-rw-r--r--data/maps/Route113/scripts.inc2
-rw-r--r--data/maps/SkyPillar_2F/scripts.inc2
-rw-r--r--data/maps/SkyPillar_4F/scripts.inc2
-rw-r--r--data/maps/SootopolisCity_Gym_1F/map.json8
-rw-r--r--data/maps/SootopolisCity_Gym_1F/scripts.inc160
-rw-r--r--data/maps/SootopolisCity_Gym_B1F/map.json20
-rw-r--r--data/maps/SootopolisCity_Gym_B1F/scripts.inc120
-rw-r--r--data/mossdeep_gym.s8
-rw-r--r--data/scripts/shared_secret_base.inc2
-rw-r--r--data/specials.inc4
-rw-r--r--data/text/berries.inc2
-rw-r--r--include/constants/field_tasks.h13
-rw-r--r--include/constants/flags.h2
-rw-r--r--include/constants/metatile_labels.h2
-rw-r--r--include/constants/vars.h2
-rw-r--r--src/field_special_scene.c4
-rw-r--r--src/field_specials.c36
-rw-r--r--src/field_tasks.c17
-rw-r--r--src/mossdeep_gym.c80
-rw-r--r--src/overworld.c4
37 files changed, 1013 insertions, 989 deletions
diff --git a/data/event_scripts.s b/data/event_scripts.s
index 670450b54..09888cc37 100644
--- a/data/event_scripts.s
+++ b/data/event_scripts.s
@@ -11,6 +11,7 @@
#include "constants/event_object_movement_constants.h"
#include "constants/field_effects.h"
#include "constants/field_specials.h"
+#include "constants/field_tasks.h"
#include "constants/flags.h"
#include "constants/game_stat.h"
#include "constants/item.h"
@@ -1246,12 +1247,12 @@ EventScript_RegionMap:: @ 827208F
end
Common_EventScript_PlayBrineysBoatMusic:: @ 82720A0
- setflag FLAG_SPECIAL_FLAG_0x4001
+ setflag FLAG_DONT_TRANSITION_MUSIC
playbgm MUS_M_BOAT, 0
return
Common_EventScript_StopBrineysBoatMusic:: @ 82720A8
- clearflag FLAG_SPECIAL_FLAG_0x4001
+ clearflag FLAG_DONT_TRANSITION_MUSIC
fadedefaultbgm
return
@@ -1273,7 +1274,7 @@ Movement_FerryDepart: @ 82721F0
walk_right
step_end
-PetalburgCity_Gym_EventScript_2721F8:: @ 82721F8
+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
diff --git a/data/maps/FortreeCity/scripts.inc b/data/maps/FortreeCity/scripts.inc
index 30f617f78..c951d6030 100644
--- a/data/maps/FortreeCity/scripts.inc
+++ b/data/maps/FortreeCity/scripts.inc
@@ -8,7 +8,7 @@ FortreeCity_OnTransition: @ 81E25AF
end
FortreeCity_MapScript1_1E25B3: @ 81E25B3
- setstepcallback 2
+ setstepcallback STEP_CB_FORTREE_BRIDGE
end
FortreeCity_EventScript_1E25B6:: @ 81E25B6
diff --git a/data/maps/FortreeCity_Gym/map.json b/data/maps/FortreeCity_Gym/map.json
index f985b2ce4..7b17c58c0 100644
--- a/data/maps/FortreeCity_Gym/map.json
+++ b/data/maps/FortreeCity_Gym/map.json
@@ -24,7 +24,7 @@
"movement_range_y": 0,
"trainer_type": "0",
"trainer_sight_or_berry_tree_id": "0",
- "script": "FortreeCity_Gym_EventScript_2165C8",
+ "script": "FortreeCity_Gym_EventScript_Winona",
"flag": "0"
},
{
@@ -37,7 +37,7 @@
"movement_range_y": 0,
"trainer_type": "1",
"trainer_sight_or_berry_tree_id": "3",
- "script": "FortreeCity_Gym_EventScript_2166A8",
+ "script": "FortreeCity_Gym_EventScript_Jared",
"flag": "0"
},
{
@@ -50,7 +50,7 @@
"movement_range_y": 0,
"trainer_type": "1",
"trainer_sight_or_berry_tree_id": "2",
- "script": "FortreeCity_Gym_EventScript_2166D6",
+ "script": "FortreeCity_Gym_EventScript_Flint",
"flag": "0"
},
{
@@ -63,7 +63,7 @@
"movement_range_y": 0,
"trainer_type": "1",
"trainer_sight_or_berry_tree_id": "1",
- "script": "FortreeCity_Gym_EventScript_2166ED",
+ "script": "FortreeCity_Gym_EventScript_Ashley",
"flag": "0"
},
{
@@ -76,7 +76,7 @@
"movement_range_y": 0,
"trainer_type": "1",
"trainer_sight_or_berry_tree_id": "2",
- "script": "FortreeCity_Gym_EventScript_2166BF",
+ "script": "FortreeCity_Gym_EventScript_Edwardo",
"flag": "0"
},
{
@@ -89,7 +89,7 @@
"movement_range_y": 0,
"trainer_type": "0",
"trainer_sight_or_berry_tree_id": "0",
- "script": "FortreeCity_Gym_EventScript_216732",
+ "script": "FortreeCity_Gym_EventScript_GymGuide",
"flag": "0"
},
{
@@ -102,7 +102,7 @@
"movement_range_y": 1,
"trainer_type": "1",
"trainer_sight_or_berry_tree_id": "1",
- "script": "FortreeCity_Gym_EventScript_216704",
+ "script": "FortreeCity_Gym_EventScript_Humberto",
"flag": "0"
},
{
@@ -115,7 +115,7 @@
"movement_range_y": 1,
"trainer_type": "1",
"trainer_sight_or_berry_tree_id": "3",
- "script": "FortreeCity_Gym_EventScript_21671B",
+ "script": "FortreeCity_Gym_EventScript_Darius",
"flag": "0"
}
],
@@ -143,7 +143,7 @@
"y": 21,
"elevation": 0,
"player_facing_dir": "BG_EVENT_PLAYER_FACING_NORTH",
- "script": "FortreeCity_Gym_EventScript_216751"
+ "script": "FortreeCity_Gym_EventScript_LeftGymStatue"
},
{
"type": "sign",
@@ -151,7 +151,7 @@
"y": 21,
"elevation": 0,
"player_facing_dir": "BG_EVENT_PLAYER_FACING_NORTH",
- "script": "FortreeCity_Gym_EventScript_216761"
+ "script": "FortreeCity_Gym_EventScript_RightGymStatue"
}
]
} \ No newline at end of file
diff --git a/data/maps/FortreeCity_Gym/scripts.inc b/data/maps/FortreeCity_Gym/scripts.inc
index 59ca317a7..0b0008d53 100644
--- a/data/maps/FortreeCity_Gym/scripts.inc
+++ b/data/maps/FortreeCity_Gym/scripts.inc
@@ -1,44 +1,44 @@
FortreeCity_Gym_MapScripts:: @ 82165AB
map_script MAP_SCRIPT_ON_TRANSITION, FortreeCity_Gym_OnTransition
- map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, FortreeCity_Gym_MapScript2_2165BA
+ map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, FortreeCity_Gym_OnWarp
.byte 0
FortreeCity_Gym_OnTransition: @ 82165B6
special RotatingGate_InitPuzzle
end
-FortreeCity_Gym_MapScript2_2165BA: @ 82165BA
- map_script_2 VAR_TEMP_0, 16384, FortreeCity_Gym_EventScript_2165C4
+FortreeCity_Gym_OnWarp: @ 82165BA
+ map_script_2 VAR_TEMP_0, VAR_TEMP_0, FortreeCity_Gym_EventScript_InitRotatingGates
.2byte 0
-FortreeCity_Gym_EventScript_2165C4:: @ 82165C4
+FortreeCity_Gym_EventScript_InitRotatingGates:: @ 82165C4
special RotatingGate_InitPuzzleAndGraphics
end
-FortreeCity_Gym_EventScript_2165C8:: @ 82165C8
- trainerbattle_single TRAINER_WINONA_1, FortreeCity_Gym_Text_216D75, FortreeCity_Gym_Text_216E60, FortreeCity_Gym_EventScript_2165FD, NO_MUSIC
+FortreeCity_Gym_EventScript_Winona:: @ 82165C8
+ trainerbattle_single TRAINER_WINONA_1, FortreeCity_Gym_Text_WinonaPreBattle, FortreeCity_Gym_Text_WinonaDefeat, FortreeCity_Gym_EventScript_WinonaDefeated, NO_MUSIC
specialvar VAR_RESULT, ShouldTryRematchBattle
- compare VAR_RESULT, 1
- goto_if_eq FortreeCity_Gym_EventScript_21668D
- goto_if_unset FLAG_RECEIVED_TM40, FortreeCity_Gym_EventScript_216646
- msgbox FortreeCity_Gym_Text_217071, MSGBOX_DEFAULT
+ compare VAR_RESULT, TRUE
+ goto_if_eq FortreeCity_Gym_EventScript_WinonaRematch
+ goto_if_unset FLAG_RECEIVED_TM40, FortreeCity_Gym_EventScript_GiveAerialAce2
+ msgbox FortreeCity_Gym_Text_WinonaPostBattle, MSGBOX_DEFAULT
release
end
-FortreeCity_Gym_EventScript_2165FD:: @ 82165FD
- message FortreeCity_Gym_Text_216EEC
+FortreeCity_Gym_EventScript_WinonaDefeated:: @ 82165FD
+ message FortreeCity_Gym_Text_ReceivedFeatherBadge
waitmessage
call Common_EventScript_PlayGymBadgeFanfare
- msgbox FortreeCity_Gym_Text_216F17, MSGBOX_DEFAULT
+ msgbox FortreeCity_Gym_Text_ExplainFeatherBadgeTakeThis, MSGBOX_DEFAULT
setflag FLAG_DEFEATED_FORTREE_GYM
setflag FLAG_BADGE06_GET
setvar VAR_0x8008, 6
call Common_EventScript_SetGymTrainers
- call FortreeCity_Gym_EventScript_21666A
+ call FortreeCity_Gym_EventScript_GiveAerialAce
closemessage
delay 30
playfanfare MUS_ME_TORE_EYE
- msgbox FortreeCity_Gym_Text_217044, MSGBOX_DEFAULT
+ msgbox FortreeCity_Gym_Text_RegisteredWinona, MSGBOX_DEFAULT
waitfanfare
closemessage
delay 30
@@ -48,94 +48,94 @@ FortreeCity_Gym_EventScript_2165FD:: @ 82165FD
release
end
-FortreeCity_Gym_EventScript_216646:: @ 8216646
+FortreeCity_Gym_EventScript_GiveAerialAce2:: @ 8216646
giveitem_std ITEM_TM40
compare VAR_RESULT, 0
goto_if_eq Common_EventScript_ShowBagIsFull
- msgbox FortreeCity_Gym_Text_216FEC, MSGBOX_DEFAULT
+ msgbox FortreeCity_Gym_Text_ExplainAerialAce, MSGBOX_DEFAULT
setflag FLAG_RECEIVED_TM40
release
end
-FortreeCity_Gym_EventScript_21666A:: @ 821666A
+FortreeCity_Gym_EventScript_GiveAerialAce:: @ 821666A
giveitem_std ITEM_TM40
compare VAR_RESULT, 0
goto_if_eq Common_EventScript_BagIsFull
- msgbox FortreeCity_Gym_Text_216FEC, MSGBOX_DEFAULT
+ msgbox FortreeCity_Gym_Text_ExplainAerialAce, MSGBOX_DEFAULT
setflag FLAG_RECEIVED_TM40
return
-FortreeCity_Gym_EventScript_21668D:: @ 821668D
- trainerbattle_rematch_double TRAINER_WINONA_1, FortreeCity_Gym_Text_217100, FortreeCity_Gym_Text_2171E6, FortreeCity_Gym_Text_217292
- msgbox FortreeCity_Gym_Text_21720B, MSGBOX_AUTOCLOSE
+FortreeCity_Gym_EventScript_WinonaRematch:: @ 821668D
+ trainerbattle_rematch_double TRAINER_WINONA_1, FortreeCity_Gym_Text_WinonaPreRematch, FortreeCity_Gym_Text_WinonaRematchDefeat, FortreeCity_Gym_Text_WinonaRematchNeedTwoMons
+ msgbox FortreeCity_Gym_Text_WinonaPostRematch, MSGBOX_AUTOCLOSE
end
-FortreeCity_Gym_EventScript_2166A8:: @ 82166A8
- trainerbattle_single TRAINER_JARED, FortreeCity_Gym_Text_2168A2, FortreeCity_Gym_Text_2168D3
- msgbox FortreeCity_Gym_Text_2168E7, MSGBOX_AUTOCLOSE
+FortreeCity_Gym_EventScript_Jared:: @ 82166A8
+ trainerbattle_single TRAINER_JARED, FortreeCity_Gym_Text_JaredPreBattle, FortreeCity_Gym_Text_JaredDefeat
+ msgbox FortreeCity_Gym_Text_JaredPostBattle, MSGBOX_AUTOCLOSE
end
-FortreeCity_Gym_EventScript_2166BF:: @ 82166BF
- trainerbattle_single TRAINER_EDWARDO, FortreeCity_Gym_Text_21695A, FortreeCity_Gym_Text_2169C7
- msgbox FortreeCity_Gym_Text_2169F1, MSGBOX_AUTOCLOSE
+FortreeCity_Gym_EventScript_Edwardo:: @ 82166BF
+ trainerbattle_single TRAINER_EDWARDO, FortreeCity_Gym_Text_EdwardoPreBattle, FortreeCity_Gym_Text_EdwardoDefeat
+ msgbox FortreeCity_Gym_Text_EdwardoPostBattle, MSGBOX_AUTOCLOSE
end
-FortreeCity_Gym_EventScript_2166D6:: @ 82166D6
- trainerbattle_single TRAINER_FLINT, FortreeCity_Gym_Text_216A66, FortreeCity_Gym_Text_216AC4
- msgbox FortreeCity_Gym_Text_216AD7, MSGBOX_AUTOCLOSE
+FortreeCity_Gym_EventScript_Flint:: @ 82166D6
+ trainerbattle_single TRAINER_FLINT, FortreeCity_Gym_Text_FlintPreBattle, FortreeCity_Gym_Text_FlintDefeat
+ msgbox FortreeCity_Gym_Text_FlintPostBattle, MSGBOX_AUTOCLOSE
end
-FortreeCity_Gym_EventScript_2166ED:: @ 82166ED
- trainerbattle_single TRAINER_ASHLEY, FortreeCity_Gym_Text_216B1A, FortreeCity_Gym_Text_216B51
- msgbox FortreeCity_Gym_Text_216B5F, MSGBOX_AUTOCLOSE
+FortreeCity_Gym_EventScript_Ashley:: @ 82166ED
+ trainerbattle_single TRAINER_ASHLEY, FortreeCity_Gym_Text_AshleyPreBattle, FortreeCity_Gym_Text_AshleyDefeat
+ msgbox FortreeCity_Gym_Text_AshleyPostBattle, MSGBOX_AUTOCLOSE
end
-FortreeCity_Gym_EventScript_216704:: @ 8216704
- trainerbattle_single TRAINER_HUMBERTO, FortreeCity_Gym_Text_216B9E, FortreeCity_Gym_Text_216C18
- msgbox FortreeCity_Gym_Text_216C32, MSGBOX_AUTOCLOSE
+FortreeCity_Gym_EventScript_Humberto:: @ 8216704
+ trainerbattle_single TRAINER_HUMBERTO, FortreeCity_Gym_Text_HumbertoPreBattle, FortreeCity_Gym_Text_HumbertoDefeat
+ msgbox FortreeCity_Gym_Text_HumbertoPostBattle, MSGBOX_AUTOCLOSE
end
-FortreeCity_Gym_EventScript_21671B:: @ 821671B
- trainerbattle_single TRAINER_DARIUS, FortreeCity_Gym_Text_216C96, FortreeCity_Gym_Text_216CF2
- msgbox FortreeCity_Gym_Text_216D0F, MSGBOX_AUTOCLOSE
+FortreeCity_Gym_EventScript_Darius:: @ 821671B
+ trainerbattle_single TRAINER_DARIUS, FortreeCity_Gym_Text_DariusPreBattle, FortreeCity_Gym_Text_DariusDefeat
+ msgbox FortreeCity_Gym_Text_DariusPostBattle, MSGBOX_AUTOCLOSE
end
-FortreeCity_Gym_EventScript_216732:: @ 8216732
+FortreeCity_Gym_EventScript_GymGuide:: @ 8216732
lock
faceplayer
- goto_if_set FLAG_DEFEATED_FORTREE_GYM, FortreeCity_Gym_EventScript_216747
- msgbox FortreeCity_Gym_Text_216785, MSGBOX_DEFAULT
+ goto_if_set FLAG_DEFEATED_FORTREE_GYM, FortreeCity_Gym_EventScript_GymGuidePostVictory
+ msgbox FortreeCity_Gym_Text_GymGuideAdvice, MSGBOX_DEFAULT
release
end
-FortreeCity_Gym_EventScript_216747:: @ 8216747
- msgbox FortreeCity_Gym_Text_21687D, MSGBOX_DEFAULT
+FortreeCity_Gym_EventScript_GymGuidePostVictory:: @ 8216747
+ msgbox FortreeCity_Gym_Text_GymGuidePostVictory, MSGBOX_DEFAULT
release
end
-FortreeCity_Gym_EventScript_216751:: @ 8216751
+FortreeCity_Gym_EventScript_LeftGymStatue:: @ 8216751
lockall
- goto_if_set FLAG_BADGE06_GET, FortreeCity_Gym_EventScript_216771
- goto FortreeCity_Gym_EventScript_21677B
+ goto_if_set FLAG_BADGE06_GET, FortreeCity_Gym_EventScript_GymStatueCertified
+ goto FortreeCity_Gym_EventScript_GymStatue
end
-FortreeCity_Gym_EventScript_216761:: @ 8216761
+FortreeCity_Gym_EventScript_RightGymStatue:: @ 8216761
lockall
- goto_if_set FLAG_BADGE06_GET, FortreeCity_Gym_EventScript_216771
- goto FortreeCity_Gym_EventScript_21677B
+ goto_if_set FLAG_BADGE06_GET, FortreeCity_Gym_EventScript_GymStatueCertified
+ goto FortreeCity_Gym_EventScript_GymStatue
end
-FortreeCity_Gym_EventScript_216771:: @ 8216771
- msgbox FortreeCity_Gym_Text_2170C7, MSGBOX_DEFAULT
+FortreeCity_Gym_EventScript_GymStatueCertified:: @ 8216771
+ msgbox FortreeCity_Gym_Text_GymStatueCertified, MSGBOX_DEFAULT
releaseall
end
-FortreeCity_Gym_EventScript_21677B:: @ 821677B
- msgbox FortreeCity_Gym_Text_2170AE, MSGBOX_DEFAULT
+FortreeCity_Gym_EventScript_GymStatue:: @ 821677B
+ msgbox FortreeCity_Gym_Text_GymStatue, MSGBOX_DEFAULT
releaseall
end
-FortreeCity_Gym_Text_216785: @ 8216785
+FortreeCity_Gym_Text_GymGuideAdvice: @ 8216785
.string "Yo, how's it going, CHAMPION-\n"
.string "bound {PLAYER}?\p"
.string "FORTREE GYM LEADER WINONA is\n"
@@ -146,94 +146,94 @@ FortreeCity_Gym_Text_216785: @ 8216785
.string "who are trying to take wing!\p"
.string "Okay, go for it!$"
-FortreeCity_Gym_Text_21687D: @ 821687D
+FortreeCity_Gym_Text_GymGuidePostVictory: @ 821687D
.string "You did it!\n"
.string "You've achieved liftoff!$"
-FortreeCity_Gym_Text_2168A2: @ 82168A2
+FortreeCity_Gym_Text_JaredPreBattle: @ 82168A2
.string "Behold the elegant battle style of\n"
.string "BIRD POKéMON!$"
-FortreeCity_Gym_Text_2168D3: @ 82168D3
+FortreeCity_Gym_Text_JaredDefeat: @ 82168D3
.string "You…\n"
.string "You're strong…$"
-FortreeCity_Gym_Text_2168E7: @ 82168E7
+FortreeCity_Gym_Text_JaredPostBattle: @ 82168E7
.string "A TRAINER has to be smart to keep\n"
.string "up with unexpected turns of events.\p"
.string "Do you have the smarts to get to\n"
.string "our LEADER?$"
-FortreeCity_Gym_Text_21695A: @ 821695A
+FortreeCity_Gym_Text_EdwardoPreBattle: @ 821695A
.string "The lovers of BIRD POKéMON aspire\n"
.string "to join this GYM.\p"
.string "As a member of the FORTREE GYM,\n"
.string "I'm not allowed to lose!$"
-FortreeCity_Gym_Text_2169C7: @ 82169C7
+FortreeCity_Gym_Text_EdwardoDefeat: @ 82169C7
.string "It was too much of a load for me\n"
.string "to bear…$"
-FortreeCity_Gym_Text_2169F1: @ 82169F1
+FortreeCity_Gym_Text_EdwardoPostBattle: @ 82169F1
.string "The world is huge, and there are\n"
.string "countless tough TRAINERS.\p"
.string "I'm going to keep training and make\n"
.string "myself even stronger.$"
-FortreeCity_Gym_Text_216A66: @ 8216A66
+FortreeCity_Gym_Text_FlintPreBattle: @ 8216A66
.string "There's no need for WINONA, our GYM\n"
.string "LEADER, to deal with you!\p"
.string "I'm plenty good enough for you!$"
-FortreeCity_Gym_Text_216AC4: @ 8216AC4
+FortreeCity_Gym_Text_FlintDefeat: @ 8216AC4
.string "WINONA, I…\n"
.string "I lost!$"
-FortreeCity_Gym_Text_216AD7: @ 8216AD7
+FortreeCity_Gym_Text_FlintPostBattle: @ 8216AD7
.string "WINONA is cute and she's strong.\n"
.string "She's the ultimate LEADER!\p"
.string "Blush…$"
-FortreeCity_Gym_Text_216B1A: @ 8216B1A
+FortreeCity_Gym_Text_AshleyPreBattle: @ 8216B1A
.string "WINONA taught me personally!\n"
.string "You can't beat me easily!$"
-FortreeCity_Gym_Text_216B51: @ 8216B51
+FortreeCity_Gym_Text_AshleyDefeat: @ 8216B51
.string "I was beaten…$"
-FortreeCity_Gym_Text_216B5F: @ 8216B5F
+FortreeCity_Gym_Text_AshleyPostBattle: @ 8216B5F
.string "Thanks to WINONA, the people of\n"
.string "FORTREE can live without fear.$"
-FortreeCity_Gym_Text_216B9E: @ 8216B9E
+FortreeCity_Gym_Text_HumbertoPreBattle: @ 8216B9E
.string "When WINONA takes to battle, her face\n"
.string "shines with beautiful determination…\p"
.string "I'm not letting you witness that\n"
.string "lovely sight!$"
-FortreeCity_Gym_Text_216C18: @ 8216C18
+FortreeCity_Gym_Text_HumbertoDefeat: @ 8216C18
.string "Urk!\n"
.string "I couldn't stop you.$"
-FortreeCity_Gym_Text_216C32: @ 8216C32
+FortreeCity_Gym_Text_HumbertoPostBattle: @ 8216C32
.string "You'd better watch it!\n"
.string "Don't get distracted staring at WINONA\l"
.string "or you'll go crashing down in a heap!$"
-FortreeCity_Gym_Text_216C96: @ 8216C96
+FortreeCity_Gym_Text_DariusPreBattle: @ 8216C96
.string "You'd better know that there are all\n"
.string "sorts of FLYING-type POKéMON.\p"
.string "You do know that, right?$"
-FortreeCity_Gym_Text_216CF2: @ 8216CF2
+FortreeCity_Gym_Text_DariusDefeat: @ 8216CF2
.string "You seem to know your stuff!$"
-FortreeCity_Gym_Text_216D0F: @ 8216D0F
+FortreeCity_Gym_Text_DariusPostBattle: @ 8216D0F
.string "Sure, you beat me all right.\n"
.string "But you'd better watch it! Our LEADER\l"
.string "WINONA's POKéMON are all business.$"
-FortreeCity_Gym_Text_216D75: @ 8216D75
+FortreeCity_Gym_Text_WinonaPreBattle: @ 8216D75
.string "I am WINONA. I am the LEADER of\n"
.string "the FORTREE POKéMON GYM.\p"
.string "I have become one with BIRD POKéMON\n"
@@ -243,18 +243,18 @@ FortreeCity_Gym_Text_216D75: @ 8216D75
.string "Witness the elegant choreography\n"
.string "of BIRD POKéMON and I!$"
-FortreeCity_Gym_Text_216E60: @ 8216E60
+FortreeCity_Gym_Text_WinonaDefeat: @ 8216E60
.string "Never before have I seen a TRAINER\n"
.string "command POKéMON with more grace\l"
.string "than I…\p"
.string "In recognition of your prowess,\n"
.string "I present to you this GYM BADGE.$"
-FortreeCity_Gym_Text_216EEC: @ 8216EEC
+FortreeCity_Gym_Text_ReceivedFeatherBadge: @ 8216EEC
.string "{PLAYER} received the FEATHER BADGE\n"
.string "from WINONA.$"
-FortreeCity_Gym_Text_216F17: @ 8216F17
+FortreeCity_Gym_Text_ExplainFeatherBadgeTakeThis: @ 8216F17
.string "With the FEATHER BADGE, all POKéMON up\n"
.string "to LV 70, even those received through\l"
.string "trades, will obey your every command.\p"
@@ -263,29 +263,29 @@ FortreeCity_Gym_Text_216F17: @ 8216F17
.string "And this…\n"
.string "This is a gift from me.$"
-FortreeCity_Gym_Text_216FEC: @ 8216FEC
+FortreeCity_Gym_Text_ExplainAerialAce: @ 8216FEC
.string "TM40 contains AERIAL ACE.\p"
.string "Its speed…\n"
.string "No POKéMON should be able to avoid it.\p"
.string "… … … … … …$"
-FortreeCity_Gym_Text_217044: @ 8217044
+FortreeCity_Gym_Text_RegisteredWinona: @ 8217044
.string "Registered GYM LEADER WINONA\n"
.string "in the POKéNAV.$"
-FortreeCity_Gym_Text_217071: @ 8217071
+FortreeCity_Gym_Text_WinonaPostBattle: @ 8217071
.string "Though I fell to you, I will remain\n"
.string "devoted to BIRD POKéMON.$"
-FortreeCity_Gym_Text_2170AE: @ 82170AE
+FortreeCity_Gym_Text_GymStatue: @ 82170AE
.string "FORTREE CITY POKéMON GYM$"
-FortreeCity_Gym_Text_2170C7: @ 82170C7
+FortreeCity_Gym_Text_GymStatueCertified: @ 82170C7
.string "FORTREE CITY POKéMON GYM\p"
.string "WINONA'S CERTIFIED TRAINERS:\n"
.string "{PLAYER}$"
-FortreeCity_Gym_Text_217100: @ 8217100
+FortreeCity_Gym_Text_WinonaPreRematch: @ 8217100
.string "WINONA: We humans can never escape\n"
.string "gravity's pull on the ground.\p"
.string "But by striving for excellence,\n"
@@ -295,17 +295,17 @@ FortreeCity_Gym_Text_217100: @ 8217100
.string "Please, allow me to see your power\n"
.string "at full flight!$"
-FortreeCity_Gym_Text_2171E6: @ 82171E6
+FortreeCity_Gym_Text_WinonaRematchDefeat: @ 82171E6
.string "I failed to reach your height again…$"
-FortreeCity_Gym_Text_21720B: @ 821720B
+FortreeCity_Gym_Text_WinonaPostRematch: @ 821720B
.string "WINONA: Even though I have lost,\n"
.string "the wings of my heart remain unbroken.\p"
.string "I can rise and soar again and\n"
.string "yet again.\p"
.string "I am convinced of it!$"
-FortreeCity_Gym_Text_217292: @ 8217292
+FortreeCity_Gym_Text_WinonaRematchNeedTwoMons: @ 8217292
.string "WINONA: We humans can never escape\n"
.string "gravity's pull on the ground.\p"
.string "But by striving for excellence,\n"
diff --git a/data/maps/GraniteCave_B1F/scripts.inc b/data/maps/GraniteCave_B1F/scripts.inc
index 099e5a501..fafd05647 100644
--- a/data/maps/GraniteCave_B1F/scripts.inc
+++ b/data/maps/GraniteCave_B1F/scripts.inc
@@ -5,7 +5,7 @@ GraniteCave_B1F_MapScripts:: @ 822DC5E
.byte 0
GraniteCave_B1F_MapScript1_22DC6E: @ 822DC6E
- setstepcallback 7
+ setstepcallback STEP_CB_CRACKED_FLOOR
setholewarp MAP_GRANITE_CAVE_B2F, 255, 0, 0
end
diff --git a/data/maps/InsideOfTruck/scripts.inc b/data/maps/InsideOfTruck/scripts.inc
index 043c8a8d8..9573fe745 100644
--- a/data/maps/InsideOfTruck/scripts.inc
+++ b/data/maps/InsideOfTruck/scripts.inc
@@ -10,7 +10,7 @@ InsideOfTruck_MapScript1_23BEE5: @ 823BEE5
end
InsideOfTruck_MapScript1_23BF01: @ 823BF01
- setstepcallback 5
+ setstepcallback STEP_CB_TRUCK
end
InsideOfTruck_EventScript_23BF04:: @ 823BF04
diff --git a/data/maps/JaggedPass/scripts.inc b/data/maps/JaggedPass/scripts.inc
index 2a12ab5a2..62ef6e1a9 100644
--- a/data/maps/JaggedPass/scripts.inc
+++ b/data/maps/JaggedPass/scripts.inc
@@ -5,7 +5,7 @@ JaggedPass_MapScripts:: @ 8230656
.byte 0
JaggedPass_MapScript1_230666: @ 8230666
- setstepcallback 1
+ setstepcallback STEP_CB_ASH
compare VAR_JAGGED_PASS_STATE, 0
call_if_eq JaggedPass_EventScript_230674
end
diff --git a/data/maps/MirageTower_2F/scripts.inc b/data/maps/MirageTower_2F/scripts.inc
index d22a7c6ff..5b18092f7 100644
--- a/data/maps/MirageTower_2F/scripts.inc
+++ b/data/maps/MirageTower_2F/scripts.inc
@@ -5,7 +5,7 @@ MirageTower_2F_MapScripts:: @ 823AD11
.byte 0
MirageTower_2F_MapScript1_23AD21: @ 823AD21
- setstepcallback 7
+ setstepcallback STEP_CB_CRACKED_FLOOR
setholewarp MAP_MIRAGE_TOWER_1F, 255, 0, 0
end
diff --git a/data/maps/MirageTower_3F/scripts.inc b/data/maps/MirageTower_3F/scripts.inc
index f29f542fc..5f8a8ff5a 100644
--- a/data/maps/MirageTower_3F/scripts.inc
+++ b/data/maps/MirageTower_3F/scripts.inc
@@ -5,7 +5,7 @@ MirageTower_3F_MapScripts:: @ 823AD2C
.byte 0
MirageTower_3F_MapScript1_23AD3C: @ 823AD3C
- setstepcallback 7
+ setstepcallback STEP_CB_CRACKED_FLOOR
setholewarp MAP_MIRAGE_TOWER_2F, 255, 0, 0
end
diff --git a/data/maps/MossdeepCity_Gym/map.json b/data/maps/MossdeepCity_Gym/map.json
index 2d86ad9a8..23d64364b 100644
--- a/data/maps/MossdeepCity_Gym/map.json
+++ b/data/maps/MossdeepCity_Gym/map.json
@@ -24,7 +24,7 @@
"movement_range_y": 0,
"trainer_type": "0",
"trainer_sight_or_berry_tree_id": "0",
- "script": "MossdeepCity_Gym_EventScript_220898",
+ "script": "MossdeepCity_Gym_EventScript_TateAndLiza",
"flag": "0"
},
{
@@ -37,7 +37,7 @@
"movement_range_y": 0,
"trainer_type": "1",
"trainer_sight_or_berry_tree_id": "1",
- "script": "MossdeepCity_Gym_EventScript_220AFD",
+ "script": "MossdeepCity_Gym_EventScript_Preston",
"flag": "0"
},
{
@@ -50,7 +50,7 @@
"movement_range_y": 0,
"trainer_type": "1",
"trainer_sight_or_berry_tree_id": "1",
- "script": "MossdeepCity_Gym_EventScript_220B2B",
+ "script": "MossdeepCity_Gym_EventScript_Blake",
"flag": "0"
},
{
@@ -63,7 +63,7 @@
"movement_range_y": 0,
"trainer_type": "1",
"trainer_sight_or_berry_tree_id": "1",
- "script": "MossdeepCity_Gym_EventScript_220B70",
+ "script": "MossdeepCity_Gym_EventScript_Maura",
"flag": "0"
},
{
@@ -76,7 +76,7 @@
"movement_range_y": 0,
"trainer_type": "1",
"trainer_sight_or_berry_tree_id": "1",
- "script": "MossdeepCity_Gym_EventScript_220B59",
+ "script": "MossdeepCity_Gym_EventScript_Samantha",
"flag": "0"
},
{
@@ -89,7 +89,7 @@
"movement_range_y": 0,
"trainer_type": "1",
"trainer_sight_or_berry_tree_id": "1",
- "script": "MossdeepCity_Gym_EventScript_220B14",
+ "script": "MossdeepCity_Gym_EventScript_Virgil",
"flag": "0"
},
{
@@ -102,7 +102,7 @@
"movement_range_y": 0,
"trainer_type": "1",
"trainer_sight_or_berry_tree_id": "1",
- "script": "MossdeepCity_Gym_EventScript_220B42",
+ "script": "MossdeepCity_Gym_EventScript_Hannah",
"flag": "0"
},
{
@@ -115,7 +115,7 @@
"movement_range_y": 0,
"trainer_type": "0",
"trainer_sight_or_berry_tree_id": "0",
- "script": "MossdeepCity_Gym_EventScript_220C11",
+ "script": "MossdeepCity_Gym_EventScript_GymGuide",
"flag": "0"
},
{
@@ -128,7 +128,7 @@
"movement_range_y": 0,
"trainer_type": "0",
"trainer_sight_or_berry_tree_id": "0",
- "script": "MossdeepCity_Gym_EventScript_220898",
+ "script": "MossdeepCity_Gym_EventScript_TateAndLiza",
"flag": "0"
},
{
@@ -232,7 +232,7 @@
"movement_range_y": 1,
"trainer_type": "1",
"trainer_sight_or_berry_tree_id": "1",
- "script": "MossdeepCity_Gym_EventScript_220B9E",
+ "script": "MossdeepCity_Gym_EventScript_Nate",
"flag": "0"
},
{
@@ -245,7 +245,7 @@
"movement_range_y": 1,
"trainer_type": "1",
"trainer_sight_or_berry_tree_id": "1",
- "script": "MossdeepCity_Gym_EventScript_220B87",
+ "script": "MossdeepCity_Gym_EventScript_Sylvia",
"flag": "0"
},
{
@@ -336,7 +336,7 @@
"movement_range_y": 1,
"trainer_type": "1",
"trainer_sight_or_berry_tree_id": "1",
- "script": "MossdeepCity_Gym_EventScript_220BCC",
+ "script": "MossdeepCity_Gym_EventScript_Clifford",
"flag": "0"
},
{
@@ -362,7 +362,7 @@
"movement_range_y": 1,
"trainer_type": "1",
"trainer_sight_or_berry_tree_id": "1",
- "script": "MossdeepCity_Gym_EventScript_220BB5",
+ "script": "MossdeepCity_Gym_EventScript_Macey",
"flag": "0"
},
{
@@ -375,7 +375,7 @@
"movement_range_y": 1,
"trainer_type": "1",
"trainer_sight_or_berry_tree_id": "1",
- "script": "MossdeepCity_Gym_EventScript_220BFA",
+ "script": "MossdeepCity_Gym_EventScript_Kathleen",
"flag": "0"
},
{
@@ -427,7 +427,7 @@
"movement_range_y": 1,
"trainer_type": "1",
"trainer_sight_or_berry_tree_id": "1",
- "script": "MossdeepCity_Gym_EventScript_220BE3",
+ "script": "MossdeepCity_Gym_EventScript_Nicholas",
"flag": "0"
},
{
@@ -673,7 +673,7 @@
"y": 34,
"elevation": 0,
"player_facing_dir": "BG_EVENT_PLAYER_FACING_NORTH",
- "script": "MossdeepCity_Gym_EventScript_220C33"
+ "script": "MossdeepCity_Gym_EventScript_LeftGymStatue"
},
{
"type": "sign",
@@ -681,7 +681,7 @@
"y": 34,
"elevation": 0,
"player_facing_dir": "BG_EVENT_PLAYER_FACING_NORTH",
- "script": "MossdeepCity_Gym_EventScript_220C43"
+ "script": "MossdeepCity_Gym_EventScript_RightGymStatue"
}
]
} \ No newline at end of file
diff --git a/data/maps/MossdeepCity_Gym/scripts.inc b/data/maps/MossdeepCity_Gym/scripts.inc
index 0b0bed197..58972e75f 100644
--- a/data/maps/MossdeepCity_Gym/scripts.inc
+++ b/data/maps/MossdeepCity_Gym/scripts.inc
@@ -1,8 +1,8 @@
MossdeepCity_Gym_MapScripts:: @ 8220800
- map_script MAP_SCRIPT_ON_LOAD, MossdeepCity_Gym_MapScript1_220806
+ map_script MAP_SCRIPT_ON_LOAD, MossdeepCity_Gym_OnLoad
.byte 0
-MossdeepCity_Gym_MapScript1_220806: @ 8220806
+MossdeepCity_Gym_OnLoad: @ 8220806
goto_if_set FLAG_MOSSDEEP_GYM_SWITCH_1, MossdeepCity_Gym_EventScript_22083D
goto MossdeepCity_Gym_EventScript_220815
end
@@ -44,21 +44,21 @@ MossdeepCity_Gym_EventScript_220885:: @ 8220885
setmetatile 5, 24, METATILE_MossdeepGym_Empty1, 1
end
-MossdeepCity_Gym_EventScript_220898:: @ 8220898
- trainerbattle_double TRAINER_TATE_AND_LIZA_1, MossdeepCity_Gym_Text_221783, MossdeepCity_Gym_Text_2218EC, MossdeepCity_Gym_Text_221BCE, MossdeepCity_Gym_EventScript_2208D1, NO_MUSIC
+MossdeepCity_Gym_EventScript_TateAndLiza:: @ 8220898
+ trainerbattle_double TRAINER_TATE_AND_LIZA_1, MossdeepCity_Gym_Text_TateAndLizaPreBattle, MossdeepCity_Gym_Text_TateAndLizaDefeat, MossdeepCity_Gym_Text_TateAndLizaNeedTwoMons, MossdeepCity_Gym_EventScript_TateAndLizaDefeated, NO_MUSIC
specialvar VAR_RESULT, ShouldTryRematchBattle
- compare VAR_RESULT, 1
- goto_if_eq MossdeepCity_Gym_EventScript_22097E
- goto_if_unset FLAG_RECEIVED_TM04, MossdeepCity_Gym_EventScript_220937
- msgbox MossdeepCity_Gym_Text_221B1D, MSGBOX_DEFAULT
+ compare VAR_RESULT, TRUE
+ goto_if_eq MossdeepCity_Gym_EventScript_TateAndLizaRematch
+ goto_if_unset FLAG_RECEIVED_TM04, MossdeepCity_Gym_EventScript_GiveCalmMind2
+ msgbox MossdeepCity_Gym_Text_TateAndLizaPostBattle, MSGBOX_DEFAULT
release
end
-MossdeepCity_Gym_EventScript_2208D1:: @ 82208D1
- message MossdeepCity_Gym_Text_22196A
+MossdeepCity_Gym_EventScript_TateAndLizaDefeated:: @ 82208D1
+ message MossdeepCity_Gym_Text_ReceivedMindBadge
waitmessage
call Common_EventScript_PlayGymBadgeFanfare
- msgbox MossdeepCity_Gym_Text_221999, MSGBOX_DEFAULT
+ msgbox MossdeepCity_Gym_Text_ExplainMindBadgeTakeThis, MSGBOX_DEFAULT
setflag FLAG_DEFEATED_MOSSDEEP_GYM
setflag FLAG_BADGE07_GET
setflag FLAG_HIDE_AQUA_HIDEOUT_GRUNTS
@@ -74,11 +74,11 @@ MossdeepCity_Gym_EventScript_2208D1:: @ 82208D1
setvar VAR_MOSSDEEP_CITY_STATE, 1
setflag FLAG_HIDE_MOSSDEEP_CITY_SPACE_CENTER_1F_STEVEN
setvar VAR_MOSSDEEP_SPACE_CENTER_STATE_2, 1
- call MossdeepCity_Gym_EventScript_22095B
+ call MossdeepCity_Gym_EventScript_GiveCalmMind
closemessage
delay 30
playfanfare MUS_ME_TORE_EYE
- msgbox MossdeepCity_Gym_Text_221AEA, MSGBOX_DEFAULT
+ msgbox MossdeepCity_Gym_Text_RegisteredTateAndLiza, MSGBOX_DEFAULT
waitfanfare
closemessage
delay 30
@@ -86,7 +86,7 @@ MossdeepCity_Gym_EventScript_2208D1:: @ 82208D1
release
end
-MossdeepCity_Gym_EventScript_220937:: @ 8220937
+MossdeepCity_Gym_EventScript_GiveCalmMind2:: @ 8220937
giveitem_std ITEM_TM04
compare VAR_RESULT, 0
goto_if_eq Common_EventScript_ShowBagIsFull
@@ -95,7 +95,7 @@ MossdeepCity_Gym_EventScript_220937:: @ 8220937
release
end
-MossdeepCity_Gym_EventScript_22095B:: @ 822095B
+MossdeepCity_Gym_EventScript_GiveCalmMind:: @ 822095B
giveitem_std ITEM_TM04
compare VAR_RESULT, 0
goto_if_eq Common_EventScript_BagIsFull
@@ -103,23 +103,23 @@ MossdeepCity_Gym_EventScript_22095B:: @ 822095B
setflag FLAG_RECEIVED_TM04
return
-MossdeepCity_Gym_EventScript_22097E:: @ 822097E
- trainerbattle_rematch_double TRAINER_TATE_AND_LIZA_1, MossdeepCity_Gym_Text_221D0B, MossdeepCity_Gym_Text_221E05, MossdeepCity_Gym_Text_221EB8
- msgbox MossdeepCity_Gym_Text_221E45, MSGBOX_AUTOCLOSE
+MossdeepCity_Gym_EventScript_TateAndLizaRematch:: @ 822097E
+ trainerbattle_rematch_double TRAINER_TATE_AND_LIZA_1, MossdeepCity_Gym_Text_TateAndLizaPreRematch, MossdeepCity_Gym_Text_TateAndLizaRematchDefeat, MossdeepCity_Gym_Text_TateAndLizaRematchNeedTwoMons
+ msgbox MossdeepCity_Gym_Text_TateAndLizaPostRematch, MSGBOX_AUTOCLOSE
end
MossdeepCity_Gym_EventScript_220999:: @ 8220999
lockall
goto_if_set FLAG_MOSSDEEP_GYM_SWITCH_1, MossdeepCity_Gym_EventScript_2209D0
setflag FLAG_MOSSDEEP_GYM_SWITCH_1
- applymovement EVENT_OBJ_ID_PLAYER, MossdeepCity_Gym_Movement_220C30
+ applymovement EVENT_OBJ_ID_PLAYER, MossdeepCity_Gym_Movement_Delay32
waitmovement 0
setmetatile 5, 5, METATILE_MossdeepGym_Obelisk_Top, 0
setmetatile 2, 7, METATILE_MossdeepGym_Empty1, 1
- goto MossdeepCity_Gym_EventScript_2209C8
+ goto MossdeepCity_Gym_EventScript_DrawMapAfterSwitchUsed
end
-MossdeepCity_Gym_EventScript_2209C8:: @ 82209C8
+MossdeepCity_Gym_EventScript_DrawMapAfterSwitchUsed:: @ 82209C8
special DrawWholeMapView
playse SE_TK_KASYA
releaseall
@@ -127,71 +127,71 @@ MossdeepCity_Gym_EventScript_2209C8:: @ 82209C8
MossdeepCity_Gym_EventScript_2209D0:: @ 82209D0
clearflag FLAG_MOSSDEEP_GYM_SWITCH_1
- applymovement EVENT_OBJ_ID_PLAYER, MossdeepCity_Gym_Movement_220C30
+ applymovement EVENT_OBJ_ID_PLAYER, MossdeepCity_Gym_Movement_Delay32
waitmovement 0
setmetatile 5, 5, METATILE_MossdeepGym_Obelisk_Base, 0
setmetatile 2, 7, METATILE_MossdeepGym_Empty0, 1
- goto MossdeepCity_Gym_EventScript_2209C8
+ goto MossdeepCity_Gym_EventScript_DrawMapAfterSwitchUsed
end
MossdeepCity_Gym_EventScript_2209F5:: @ 82209F5
lockall
goto_if_set FLAG_MOSSDEEP_GYM_SWITCH_2, MossdeepCity_Gym_EventScript_220A24
setflag FLAG_MOSSDEEP_GYM_SWITCH_2
- applymovement EVENT_OBJ_ID_PLAYER, MossdeepCity_Gym_Movement_220C30
+ applymovement EVENT_OBJ_ID_PLAYER, MossdeepCity_Gym_Movement_Delay32
waitmovement 0
setmetatile 8, 14, METATILE_MossdeepGym_Obelisk_Top, 0
setmetatile 8, 10, METATILE_MossdeepGym_Empty1, 1
- goto MossdeepCity_Gym_EventScript_2209C8
+ goto MossdeepCity_Gym_EventScript_DrawMapAfterSwitchUsed
end
MossdeepCity_Gym_EventScript_220A24:: @ 8220A24
clearflag FLAG_MOSSDEEP_GYM_SWITCH_2
- applymovement EVENT_OBJ_ID_PLAYER, MossdeepCity_Gym_Movement_220C30
+ applymovement EVENT_OBJ_ID_PLAYER, MossdeepCity_Gym_Movement_Delay32
waitmovement 0
setmetatile 8, 14, METATILE_MossdeepGym_OuterWall_RightCorner, 0
setmetatile 8, 10, METATILE_MossdeepGym_Empty0, 1
- goto MossdeepCity_Gym_EventScript_2209C8
+ goto MossdeepCity_Gym_EventScript_DrawMapAfterSwitchUsed
end
MossdeepCity_Gym_EventScript_220A49:: @ 8220A49
lockall
goto_if_set FLAG_MOSSDEEP_GYM_SWITCH_3, MossdeepCity_Gym_EventScript_220A78
setflag FLAG_MOSSDEEP_GYM_SWITCH_3
- applymovement EVENT_OBJ_ID_PLAYER, MossdeepCity_Gym_Movement_220C30
+ applymovement EVENT_OBJ_ID_PLAYER, MossdeepCity_Gym_Movement_Delay32
waitmovement 0
setmetatile 15, 17, METATILE_MossdeepGym_Obelisk_Base, 0
setmetatile 17, 15, METATILE_MossdeepGym_Empty1, 1
- goto MossdeepCity_Gym_EventScript_2209C8
+ goto MossdeepCity_Gym_EventScript_DrawMapAfterSwitchUsed
end
MossdeepCity_Gym_EventScript_220A78:: @ 8220A78
clearflag FLAG_MOSSDEEP_GYM_SWITCH_3
- applymovement EVENT_OBJ_ID_PLAYER, MossdeepCity_Gym_Movement_220C30
+ applymovement EVENT_OBJ_ID_PLAYER, MossdeepCity_Gym_Movement_Delay32
waitmovement 0
setmetatile 15, 17, METATILE_MossdeepGym_Obelisk_Top, 0
setmetatile 17, 15, METATILE_MossdeepGym_Empty0, 1
- goto MossdeepCity_Gym_EventScript_2209C8
+ goto MossdeepCity_Gym_EventScript_DrawMapAfterSwitchUsed
end
MossdeepCity_Gym_EventScript_220A9D:: @ 8220A9D
lockall
goto_if_set FLAG_MOSSDEEP_GYM_SWITCH_4, MossdeepCity_Gym_EventScript_220ACC
setflag FLAG_MOSSDEEP_GYM_SWITCH_4
- applymovement EVENT_OBJ_ID_PLAYER, MossdeepCity_Gym_Movement_220C30
+ applymovement EVENT_OBJ_ID_PLAYER, MossdeepCity_Gym_Movement_Delay32
waitmovement 0
setmetatile 1, 23, METATILE_MossdeepGym_Wall_LeftCorner, 0
setmetatile 5, 24, METATILE_MossdeepGym_Empty1, 1
- goto MossdeepCity_Gym_EventScript_2209C8
+ goto MossdeepCity_Gym_EventScript_DrawMapAfterSwitchUsed
end
MossdeepCity_Gym_EventScript_220ACC:: @ 8220ACC
clearflag FLAG_MOSSDEEP_GYM_SWITCH_4
- applymovement EVENT_OBJ_ID_PLAYER, MossdeepCity_Gym_Movement_220C30
+ applymovement EVENT_OBJ_ID_PLAYER, MossdeepCity_Gym_Movement_Delay32
waitmovement 0
setmetatile 1, 23, METATILE_MossdeepGym_Obelisk_Top, 0
setmetatile 5, 24, METATILE_MossdeepGym_Empty0, 1
- goto MossdeepCity_Gym_EventScript_2209C8
+ goto MossdeepCity_Gym_EventScript_DrawMapAfterSwitchUsed
end
MossdeepCity_Gym_EventScript_220AF1:: @ 8220AF1
@@ -201,71 +201,71 @@ MossdeepCity_Gym_EventScript_220AF1:: @ 8220AF1
releaseall
end
-MossdeepCity_Gym_EventScript_220AFD:: @ 8220AFD
- trainerbattle_single TRAINER_PRESTON, MossdeepCity_Gym_Text_220E5C, MossdeepCity_Gym_Text_220EAC
- msgbox MossdeepCity_Gym_Text_220ED3, MSGBOX_AUTOCLOSE
+MossdeepCity_Gym_EventScript_Preston:: @ 8220AFD
+ trainerbattle_single TRAINER_PRESTON, MossdeepCity_Gym_Text_PrestonPreBattle, MossdeepCity_Gym_Text_PrestonDefeat
+ msgbox MossdeepCity_Gym_Text_PrestonPostBattle, MSGBOX_AUTOCLOSE
end
-MossdeepCity_Gym_EventScript_220B14:: @ 8220B14
- trainerbattle_single TRAINER_VIRGIL, MossdeepCity_Gym_Text_220F02, MossdeepCity_Gym_Text_220F1A
- msgbox MossdeepCity_Gym_Text_220F3A, MSGBOX_AUTOCLOSE
+MossdeepCity_Gym_EventScript_Virgil:: @ 8220B14
+ trainerbattle_single TRAINER_VIRGIL, MossdeepCity_Gym_Text_VirgilPreBattle, MossdeepCity_Gym_Text_VirgilDefeat
+ msgbox MossdeepCity_Gym_Text_VirgilPostBattle, MSGBOX_AUTOCLOSE
end
-MossdeepCity_Gym_EventScript_220B2B:: @ 8220B2B
- trainerbattle_single TRAINER_BLAKE, MossdeepCity_Gym_Text_220FB0, MossdeepCity_Gym_Text_221024
- msgbox MossdeepCity_Gym_Text_221055, MSGBOX_AUTOCLOSE
+MossdeepCity_Gym_EventScript_Blake:: @ 8220B2B
+ trainerbattle_single TRAINER_BLAKE, MossdeepCity_Gym_Text_BlakePreBattle, MossdeepCity_Gym_Text_BlakeDefeat
+ msgbox MossdeepCity_Gym_Text_BlakePostBattle, MSGBOX_AUTOCLOSE
end
-MossdeepCity_Gym_EventScript_220B42:: @ 8220B42
- trainerbattle_single TRAINER_HANNAH, MossdeepCity_Gym_Text_2210EE, MossdeepCity_Gym_Text_221152
- msgbox MossdeepCity_Gym_Text_22116A, MSGBOX_AUTOCLOSE
+MossdeepCity_Gym_EventScript_Hannah:: @ 8220B42
+ trainerbattle_single TRAINER_HANNAH, MossdeepCity_Gym_Text_HannahPreBattle, MossdeepCity_Gym_Text_HannahDefeat
+ msgbox MossdeepCity_Gym_Text_HannahPostBattle, MSGBOX_AUTOCLOSE
end
-MossdeepCity_Gym_EventScript_220B59:: @ 8220B59
- trainerbattle_single TRAINER_SAMANTHA, MossdeepCity_Gym_Text_2211E2, MossdeepCity_Gym_Text_221230
- msgbox MossdeepCity_Gym_Text_22123D, MSGBOX_AUTOCLOSE
+MossdeepCity_Gym_EventScript_Samantha:: @ 8220B59
+ trainerbattle_single TRAINER_SAMANTHA, MossdeepCity_Gym_Text_SamanthaPreBattle, MossdeepCity_Gym_Text_SamanthaDefeat
+ msgbox MossdeepCity_Gym_Text_SamanthaPostBattle, MSGBOX_AUTOCLOSE
end
-MossdeepCity_Gym_EventScript_220B70:: @ 8220B70
- trainerbattle_single TRAINER_MAURA, MossdeepCity_Gym_Text_2212A6, MossdeepCity_Gym_Text_221309
- msgbox MossdeepCity_Gym_Text_22132E, MSGBOX_AUTOCLOSE
+MossdeepCity_Gym_EventScript_Maura:: @ 8220B70
+ trainerbattle_single TRAINER_MAURA, MossdeepCity_Gym_Text_MauraPreBattle, MossdeepCity_Gym_Text_MauraDefeat
+ msgbox MossdeepCity_Gym_Text_MauraPostBattle, MSGBOX_AUTOCLOSE
end
-MossdeepCity_Gym_EventScript_220B87:: @ 8220B87
+MossdeepCity_Gym_EventScript_Sylvia:: @ 8220B87
trainerbattle_single TRAINER_SYLVIA, MossdeepCity_Gym_Text_2213C2, MossdeepCity_Gym_Text_2213F4
msgbox MossdeepCity_Gym_Text_221412, MSGBOX_AUTOCLOSE
end
-MossdeepCity_Gym_EventScript_220B9E:: @ 8220B9E
+MossdeepCity_Gym_EventScript_Nate:: @ 8220B9E
trainerbattle_single TRAINER_NATE, MossdeepCity_Gym_Text_221460, MossdeepCity_Gym_Text_2214A7
msgbox MossdeepCity_Gym_Text_2214D3, MSGBOX_AUTOCLOSE
end
-MossdeepCity_Gym_EventScript_220BB5:: @ 8220BB5
+MossdeepCity_Gym_EventScript_Macey:: @ 8220BB5
trainerbattle_single TRAINER_MACEY, MossdeepCity_Gym_Text_22161B, MossdeepCity_Gym_Text_221658
msgbox MossdeepCity_Gym_Text_221680, MSGBOX_AUTOCLOSE
end
-MossdeepCity_Gym_EventScript_220BCC:: @ 8220BCC
+MossdeepCity_Gym_EventScript_Clifford:: @ 8220BCC
trainerbattle_single TRAINER_CLIFFORD, MossdeepCity_Gym_Text_22157C, MossdeepCity_Gym_Text_2215B8
msgbox MossdeepCity_Gym_Text_2215E2, MSGBOX_AUTOCLOSE
end
-MossdeepCity_Gym_EventScript_220BE3:: @ 8220BE3
+MossdeepCity_Gym_EventScript_Nicholas:: @ 8220BE3
trainerbattle_single TRAINER_NICHOLAS, MossdeepCity_Gym_Text_2216EE, MossdeepCity_Gym_Text_22172D
msgbox MossdeepCity_Gym_Text_22173A, MSGBOX_AUTOCLOSE
end
-MossdeepCity_Gym_EventScript_220BFA:: @ 8220BFA
+MossdeepCity_Gym_EventScript_Kathleen:: @ 8220BFA
trainerbattle_single TRAINER_KATHLEEN, MossdeepCity_Gym_Text_221507, MossdeepCity_Gym_Text_22153B
msgbox MossdeepCity_Gym_Text_221545, MSGBOX_AUTOCLOSE
end
-MossdeepCity_Gym_EventScript_220C11:: @ 8220C11
+MossdeepCity_Gym_EventScript_GymGuide:: @ 8220C11
lock
faceplayer
goto_if_set FLAG_DEFEATED_MOSSDEEP_GYM, MossdeepCity_Gym_EventScript_220C26
- msgbox MossdeepCity_Gym_Text_220CD5, MSGBOX_DEFAULT
+ msgbox MossdeepCity_Gym_Text_GymGuideAdvice, MSGBOX_DEFAULT
release
end
@@ -274,30 +274,30 @@ MossdeepCity_Gym_EventScript_220C26:: @ 8220C26
release
end
-MossdeepCity_Gym_Movement_220C30: @ 8220C30
+MossdeepCity_Gym_Movement_Delay32: @ 8220C30
delay_16
delay_16
step_end
-MossdeepCity_Gym_EventScript_220C33:: @ 8220C33
+MossdeepCity_Gym_EventScript_LeftGymStatue:: @ 8220C33
lockall
- goto_if_set FLAG_BADGE07_GET, MossdeepCity_Gym_EventScript_220C53
- goto MossdeepCity_Gym_EventScript_220C5D
+ goto_if_set FLAG_BADGE07_GET, MossdeepCity_Gym_EventScript_GymStatueCertified
+ goto MossdeepCity_Gym_EventScript_GymStatue
end
-MossdeepCity_Gym_EventScript_220C43:: @ 8220C43
+MossdeepCity_Gym_EventScript_RightGymStatue:: @ 8220C43
lockall
- goto_if_set FLAG_BADGE07_GET, MossdeepCity_Gym_EventScript_220C53
- goto MossdeepCity_Gym_EventScript_220C5D
+ goto_if_set FLAG_BADGE07_GET, MossdeepCity_Gym_EventScript_GymStatueCertified
+ goto MossdeepCity_Gym_EventScript_GymStatue
end
-MossdeepCity_Gym_EventScript_220C53:: @ 8220C53
- msgbox MossdeepCity_Gym_Text_221CCA, MSGBOX_DEFAULT
+MossdeepCity_Gym_EventScript_GymStatueCertified:: @ 8220C53
+ msgbox MossdeepCity_Gym_Text_GymStatueCertified, MSGBOX_DEFAULT
releaseall
end
-MossdeepCity_Gym_EventScript_220C5D:: @ 8220C5D
- msgbox MossdeepCity_Gym_Text_221CB0, MSGBOX_DEFAULT
+MossdeepCity_Gym_EventScript_GymStatue:: @ 8220C5D
+ msgbox MossdeepCity_Gym_Text_GymStatue, MSGBOX_DEFAULT
releaseall
end
@@ -361,7 +361,7 @@ MossdeepCity_Gym_EventScript_220CBF:: @ 8220CBF
mossdeepgym4
end
-MossdeepCity_Gym_Text_220CD5: @ 8220CD5
+MossdeepCity_Gym_Text_GymGuideAdvice: @ 8220CD5
.string "Yo, how's it going, CHAMPION-bound\n"
.string "{PLAYER}?\p"
.string "The GYM LEADERS here use\n"
@@ -379,42 +379,42 @@ MossdeepCity_Gym_Text_220E2A: @ 8220E2A
.string "Wow, you're astounding!\n"
.string "You're one great TRAINER!$"
-MossdeepCity_Gym_Text_220E5C: @ 8220E5C
+MossdeepCity_Gym_Text_PrestonPreBattle: @ 8220E5C
.string "Battles hinge on the strength of your\n"
.string "spirit! The weak-spirited will never win!$"
-MossdeepCity_Gym_Text_220EAC: @ 8220EAC
+MossdeepCity_Gym_Text_PrestonDefeat: @ 8220EAC
.string "I lost!\n"
.string "I must temper my spirit again!$"
-MossdeepCity_Gym_Text_220ED3: @ 8220ED3
+MossdeepCity_Gym_Text_PrestonPostBattle: @ 8220ED3
.string "The indecisive lose.\n"
.string "That's my warning to you.$"
-MossdeepCity_Gym_Text_220F02: @ 8220F02
+MossdeepCity_Gym_Text_VirgilPreBattle: @ 8220F02
.string "Let me see your talent!$"
-MossdeepCity_Gym_Text_220F1A: @ 8220F1A
+MossdeepCity_Gym_Text_VirgilDefeat: @ 8220F1A
.string "You possess spectacular talent!$"
-MossdeepCity_Gym_Text_220F3A: @ 8220F3A
+MossdeepCity_Gym_Text_VirgilPostBattle: @ 8220F3A
.string "If there are prodigies in the world,\n"
.string "then our GYM LEADERS are them!\p"
.string "However, you may be even more talented\n"
.string "than them…$"
-MossdeepCity_Gym_Text_220FB0: @ 8220FB0
+MossdeepCity_Gym_Text_BlakePreBattle: @ 8220FB0
.string "Fufufufu… Watch me levitate a POKé\n"
.string "BALL telekinetically!\p"
.string "Wrooooooooaaaar!\n"
.string "… … … … … … …\p"
.string "Sometimes, I'm out of sync…$"
-MossdeepCity_Gym_Text_221024: @ 8221024
+MossdeepCity_Gym_Text_BlakeDefeat: @ 8221024
.string "My POKéMON battling skills are out\n"
.string "of sync, too!$"
-MossdeepCity_Gym_Text_221055: @ 8221055
+MossdeepCity_Gym_Text_BlakePostBattle: @ 8221055
.string "A POKé BALL was too heavy to lift\n"
.string "psychically. But this dust bunny…\p"
.string "Whoooooooooooooooh!\n"
@@ -422,46 +422,46 @@ MossdeepCity_Gym_Text_221055: @ 8221055
.string "No, I'm not cheating!\n"
.string "I didn't blow on it! Honestly!$"
-MossdeepCity_Gym_Text_2210EE: @ 82210EE
+MossdeepCity_Gym_Text_HannahPreBattle: @ 82210EE
.string "When you lose to me, don't be too hard\n"
.string "on yourself.\p"
.string "It's not that you're weak--I'm just\n"
.string "too strong!$"
-MossdeepCity_Gym_Text_221152: @ 8221152
+MossdeepCity_Gym_Text_HannahDefeat: @ 8221152
.string "You're just too strong!$"
-MossdeepCity_Gym_Text_22116A: @ 822116A
+MossdeepCity_Gym_Text_HannahPostBattle: @ 822116A
.string "I'm not going to get down on myself for\n"
.string "losing. I just need to train harder.\p"
.string "Positive thinking--that's my strong\n"
.string "point!$"
-MossdeepCity_Gym_Text_2211E2: @ 82211E2
+MossdeepCity_Gym_Text_SamanthaPreBattle: @ 82211E2
.string "I see it…\n"
.string "I see your future…\p"
.string "If you can beat me, I will tell you\n"
.string "your future!$"
-MossdeepCity_Gym_Text_221230: @ 8221230
+MossdeepCity_Gym_Text_SamanthaDefeat: @ 8221230
.string "I surrender!$"
-MossdeepCity_Gym_Text_22123D: @ 822123D
+MossdeepCity_Gym_Text_SamanthaPostBattle: @ 822123D
.string "You will wage a terrifically intense\n"
.string "battle with our GYM LEADERS…\p"
.string "The result…\n"
.string "You won't hear it from me!$"
-MossdeepCity_Gym_Text_2212A6: @ 82212A6
+MossdeepCity_Gym_Text_MauraPreBattle: @ 82212A6
.string "The roads you have traveled…\n"
.string "What you have experienced…\p"
.string "Come at me with everything you've\n"
.string "learned!$"
-MossdeepCity_Gym_Text_221309: @ 8221309
+MossdeepCity_Gym_Text_MauraDefeat: @ 8221309
.string "You've traveled a path of greatness!$"
-MossdeepCity_Gym_Text_22132E: @ 822132E
+MossdeepCity_Gym_Text_MauraPostBattle: @ 822132E
.string "A bright future awaits those who have\n"
.string "worked diligently.\p"
.string "For those who lazed idly, there is\n"
@@ -542,7 +542,7 @@ MossdeepCity_Gym_Text_22173A: @ 822173A
.string "All right! I think I'll develop a special\n"
.string "invincible POKéMON power next.$"
-MossdeepCity_Gym_Text_221783: @ 8221783
+MossdeepCity_Gym_Text_TateAndLizaPreBattle: @ 8221783
.string "TATE: Hehehe… Were you surprised?\p"
.string "LIZA: Fufufu… Were you surprised?\p"
.string "TATE: That there are two GYM LEADERS?\n"
@@ -556,17 +556,17 @@ MossdeepCity_Gym_Text_221783: @ 8221783
.string "TATE: This combination of ours…\n"
.string "LIZA: Can you beat it?$"
-MossdeepCity_Gym_Text_2218EC: @ 82218EC
+MossdeepCity_Gym_Text_TateAndLizaDefeat: @ 82218EC
.string "TATE: What?! Our combination…\n"
.string "LIZA: Was shattered!\p"
.string "TATE: It can't be helped. You've won…\n"
.string "LIZA: So, in recognition, take this.$"
-MossdeepCity_Gym_Text_22196A: @ 822196A
+MossdeepCity_Gym_Text_ReceivedMindBadge: @ 822196A
.string "{PLAYER} received the MIND BADGE\n"
.string "from TATE and LIZA.$"
-MossdeepCity_Gym_Text_221999: @ 8221999
+MossdeepCity_Gym_Text_ExplainMindBadgeTakeThis: @ 8221999
.string "TATE: The MIND BADGE enhances the\n"
.string "SP. ATK and SP. DEF of POKéMON.\p"
.string "LIZA: It also lets you use the HM move\n"
@@ -582,18 +582,18 @@ MossdeepCity_Gym_Text_221A40: @ 8221A40
.string "LIZA: For PSYCHIC POKéMON!\p"
.string "… … … … … …$"
-MossdeepCity_Gym_Text_221AEA: @ 8221AEA
+MossdeepCity_Gym_Text_RegisteredTateAndLiza: @ 8221AEA
.string "Registered GYM LEADERS TATE & LIZA\n"
.string "in the POKéNAV.$"
-MossdeepCity_Gym_Text_221B1D: @ 8221B1D
+MossdeepCity_Gym_Text_TateAndLizaPostBattle: @ 8221B1D
.string "TATE: Looks like the bond between you\n"
.string "and your POKéMON is far stronger than\l"
.string "the bond that we share as twins.\p"
.string "LIZA: You will become even stronger!\n"
.string "We've battled you, so we know.$"
-MossdeepCity_Gym_Text_221BCE: @ 8221BCE
+MossdeepCity_Gym_Text_TateAndLizaNeedTwoMons: @ 8221BCE
.string "TATE: Hehehe… Were you surprised?\p"
.string "LIZA: That there are two GYM LEADERS?\p"
.string "TATE: Oops, you have only one…\n"
@@ -602,15 +602,15 @@ MossdeepCity_Gym_Text_221BCE: @ 8221BCE
.string "LIZA: If you want to challenge us,\n"
.string "bring some more POKéMON.$"
-MossdeepCity_Gym_Text_221CB0: @ 8221CB0
+MossdeepCity_Gym_Text_GymStatue: @ 8221CB0
.string "MOSSDEEP CITY POKéMON GYM$"
-MossdeepCity_Gym_Text_221CCA: @ 8221CCA
+MossdeepCity_Gym_Text_GymStatueCertified: @ 8221CCA
.string "MOSSDEEP CITY POKéMON GYM\p"
.string "LIZA AND TATE'S CERTIFIED TRAINERS:\n"
.string "{PLAYER}$"
-MossdeepCity_Gym_Text_221D0B: @ 8221D0B
+MossdeepCity_Gym_Text_TateAndLizaPreRematch: @ 8221D0B
.string "TATE: POKéMON…\n"
.string "LIZA: POKéMON…\p"
.string "TATE: By changing the party's mix…\n"
@@ -622,17 +622,17 @@ MossdeepCity_Gym_Text_221D0B: @ 8221D0B
.string "TATE: Our combination…\n"
.string "LIZA: We'll show you again and again!$"
-MossdeepCity_Gym_Text_221E05: @ 8221E05
+MossdeepCity_Gym_Text_TateAndLizaRematchDefeat: @ 8221E05
.string "TATE: You and your POKéMON…\n"
.string "LIZA: It's as if you were siblings!$"
-MossdeepCity_Gym_Text_221E45: @ 8221E45
+MossdeepCity_Gym_Text_TateAndLizaPostRematch: @ 8221E45
.string "TATE: You can knock us down,\n"
.string "but we'll never stay down!\p"
.string "LIZA: Because the two of us,\n"
.string "we always support each other!$"
-MossdeepCity_Gym_Text_221EB8: @ 8221EB8
+MossdeepCity_Gym_Text_TateAndLizaRematchNeedTwoMons: @ 8221EB8
.string "TATE: You're back again…\n"
.string "LIZA: You're back again…\p"
.string "TATE: To give us a rematch.\n"
diff --git a/data/maps/MtChimney/scripts.inc b/data/maps/MtChimney/scripts.inc
index c646fc1cf..8d28ca715 100644
--- a/data/maps/MtChimney/scripts.inc
+++ b/data/maps/MtChimney/scripts.inc
@@ -8,7 +8,7 @@ MtChimney_OnTransition: @ 822EDCC
end
MtChimney_MapScript1_22EDD2: @ 822EDD2
- setstepcallback 1
+ setstepcallback STEP_CB_ASH
end
MtChimney_EventScript_22EDD5:: @ 822EDD5
diff --git a/data/maps/MtPyre_2F/scripts.inc b/data/maps/MtPyre_2F/scripts.inc
index 150c08df4..e402cb8fa 100644
--- a/data/maps/MtPyre_2F/scripts.inc
+++ b/data/maps/MtPyre_2F/scripts.inc
@@ -5,7 +5,7 @@ MtPyre_2F_MapScripts:: @ 82310FB
.byte 0
MtPyre_2F_MapScript1_23110B: @ 823110B
- setstepcallback 7
+ setstepcallback STEP_CB_CRACKED_FLOOR
setholewarp MAP_MT_PYRE_1F, 255, 0, 0
end
diff --git a/data/maps/PacifidlogTown/scripts.inc b/data/maps/PacifidlogTown/scripts.inc
index 1d1518c0a..26e9924ed 100644
--- a/data/maps/PacifidlogTown/scripts.inc
+++ b/data/maps/PacifidlogTown/scripts.inc
@@ -8,7 +8,7 @@ PacifidlogTown_OnTransition: @ 81EBABC
end
PacifidlogTown_MapScript1_1EBAC0: @ 81EBAC0
- setstepcallback 3
+ setstepcallback STEP_CB_PACIFIDLOG_BRIDGE
end
PacifidlogTown_EventScript_1EBAC3:: @ 81EBAC3
diff --git a/data/maps/PetalburgCity/scripts.inc b/data/maps/PetalburgCity/scripts.inc
index e95fc9d92..c9fabf5a2 100644
--- a/data/maps/PetalburgCity/scripts.inc
+++ b/data/maps/PetalburgCity/scripts.inc
@@ -51,7 +51,7 @@ PetalburgCity_EventScript_1DC32E:: @ 81DC32E
clearflag FLAG_HIDE_MAP_NAME_POPUP
setvar VAR_PETALBURG_CITY_STATE, 3
fadedefaultbgm
- clearflag FLAG_SPECIAL_FLAG_0x4001
+ clearflag FLAG_DONT_TRANSITION_MUSIC
special LoadPlayerParty
setvar VAR_PETALBURG_GYM_STATE, 1
warp MAP_PETALBURG_CITY_GYM, 255, 4, 108
@@ -78,7 +78,7 @@ PetalburgCity_EventScript_1DC390:: @ 81DC390
waitdooranim
clearflag FLAG_HIDE_MAP_NAME_POPUP
fadedefaultbgm
- clearflag FLAG_SPECIAL_FLAG_0x4001
+ clearflag FLAG_DONT_TRANSITION_MUSIC
warp MAP_PETALBURG_CITY_WALLYS_HOUSE, 255, 2, 4
waitstate
releaseall
diff --git a/data/maps/PetalburgCity_Gym/map.json b/data/maps/PetalburgCity_Gym/map.json
index ff317c943..30cb6e209 100644
--- a/data/maps/PetalburgCity_Gym/map.json
+++ b/data/maps/PetalburgCity_Gym/map.json
@@ -24,7 +24,7 @@
"movement_range_y": 0,
"trainer_type": "0",
"trainer_sight_or_berry_tree_id": "0",
- "script": "PetalburgCity_Gym_EventScript_2049F1",
+ "script": "PetalburgCity_Gym_EventScript_Norman",
"flag": "FLAG_HIDE_PETALBURG_GYM_NORMAN"
},
{
@@ -37,7 +37,7 @@
"movement_range_y": 0,
"trainer_type": "1",
"trainer_sight_or_berry_tree_id": "0",
- "script": "PetalburgCity_Gym_EventScript_2054AA",
+ "script": "PetalburgCity_Gym_EventScript_Mary",
"flag": "0"
},
{
@@ -50,7 +50,7 @@
"movement_range_y": 0,
"trainer_type": "1",
"trainer_sight_or_berry_tree_id": "0",
- "script": "PetalburgCity_Gym_EventScript_2053BA",
+ "script": "PetalburgCity_Gym_EventScript_Randall",
"flag": "0"
},
{
@@ -63,7 +63,7 @@
"movement_range_y": 0,
"trainer_type": "1",
"trainer_sight_or_berry_tree_id": "0",
- "script": "PetalburgCity_Gym_EventScript_2053F6",
+ "script": "PetalburgCity_Gym_EventScript_Parker",
"flag": "0"
},
{
@@ -76,7 +76,7 @@
"movement_range_y": 0,
"trainer_type": "1",
"trainer_sight_or_berry_tree_id": "0",
- "script": "PetalburgCity_Gym_EventScript_2054E6",
+ "script": "PetalburgCity_Gym_EventScript_Alexia",
"flag": "0"
},
{
@@ -89,7 +89,7 @@
"movement_range_y": 0,
"trainer_type": "1",
"trainer_sight_or_berry_tree_id": "0",
- "script": "PetalburgCity_Gym_EventScript_205432",
+ "script": "PetalburgCity_Gym_EventScript_George",
"flag": "0"
},
{
@@ -102,7 +102,7 @@
"movement_range_y": 0,
"trainer_type": "1",
"trainer_sight_or_berry_tree_id": "0",
- "script": "PetalburgCity_Gym_EventScript_205522",
+ "script": "PetalburgCity_Gym_EventScript_Jody",
"flag": "0"
},
{
@@ -115,7 +115,7 @@
"movement_range_y": 0,
"trainer_type": "1",
"trainer_sight_or_berry_tree_id": "0",
- "script": "PetalburgCity_Gym_EventScript_20546E",
+ "script": "PetalburgCity_Gym_EventScript_Berke",
"flag": "0"
},
{
@@ -128,7 +128,7 @@
"movement_range_y": 0,
"trainer_type": "0",
"trainer_sight_or_berry_tree_id": "0",
- "script": "PetalburgCity_Gym_EventScript_20574F",
+ "script": "PetalburgCity_Gym_EventScript_GymGuide",
"flag": "FLAG_HIDE_PETALBURG_GYM_GREETER"
},
{
@@ -434,7 +434,7 @@
"y": 105,
"elevation": 3,
"player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY",
- "script": "PetalburgCity_Gym_EventScript_205137"
+ "script": "PetalburgCity_Gym_EventScript_SpeedRoomDoor"
},
{
"type": "sign",
@@ -442,7 +442,7 @@
"y": 105,
"elevation": 3,
"player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY",
- "script": "PetalburgCity_Gym_EventScript_205187"
+ "script": "PetalburgCity_Gym_EventScript_AccuracyRoomDoor"
},
{
"type": "sign",
@@ -450,7 +450,7 @@
"y": 79,
"elevation": 3,
"player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY",
- "script": "PetalburgCity_Gym_EventScript_2051BC"
+ "script": "PetalburgCity_Gym_EventScript_ConfusionRoomDoor"
},
{
"type": "sign",
@@ -458,7 +458,7 @@
"y": 79,
"elevation": 3,
"player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY",
- "script": "PetalburgCity_Gym_EventScript_2051EF"
+ "script": "PetalburgCity_Gym_EventScript_LeftDefenseRoomDoor"
},
{
"type": "sign",
@@ -466,7 +466,7 @@
"y": 92,
"elevation": 3,
"player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY",
- "script": "PetalburgCity_Gym_EventScript_205222"
+ "script": "PetalburgCity_Gym_EventScript_RightDefenseRoomDoor"
},
{
"type": "sign",
@@ -474,7 +474,7 @@
"y": 92,
"elevation": 3,
"player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY",
- "script": "PetalburgCity_Gym_EventScript_205255"
+ "script": "PetalburgCity_Gym_EventScript_RecoveryRoomDoor"
},
{
"type": "sign",
@@ -482,7 +482,7 @@
"y": 40,
"elevation": 3,
"player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY",
- "script": "PetalburgCity_Gym_EventScript_205288"
+ "script": "PetalburgCity_Gym_EventScript_LeftStrengthRoomDoor"
},
{
"type": "sign",
@@ -490,7 +490,7 @@
"y": 53,
"elevation": 3,
"player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY",
- "script": "PetalburgCity_Gym_EventScript_2052BB"
+ "script": "PetalburgCity_Gym_EventScript_RightStrengthRoomDoor"
},
{
"type": "sign",
@@ -498,7 +498,7 @@
"y": 53,
"elevation": 3,
"player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY",
- "script": "PetalburgCity_Gym_EventScript_2052EE"
+ "script": "PetalburgCity_Gym_EventScript_LeftOHKORoomDoor"
},
{
"type": "sign",
@@ -506,7 +506,7 @@
"y": 66,
"elevation": 3,
"player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY",
- "script": "PetalburgCity_Gym_EventScript_205321"
+ "script": "PetalburgCity_Gym_EventScript_RightOHKORoomDoor"
},
{
"type": "sign",
@@ -514,7 +514,7 @@
"y": 14,
"elevation": 3,
"player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY",
- "script": "PetalburgCity_Gym_EventScript_205354"
+ "script": "PetalburgCity_Gym_EventScript_LeftGymLeadersRoomDoor"
},
{
"type": "sign",
@@ -522,7 +522,7 @@
"y": 27,
"elevation": 3,
"player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY",
- "script": "PetalburgCity_Gym_EventScript_205387"
+ "script": "PetalburgCity_Gym_EventScript_RightGymLeadersRoomDoor"
},
{
"type": "sign",
@@ -530,7 +530,7 @@
"y": 110,
"elevation": 3,
"player_facing_dir": "BG_EVENT_PLAYER_FACING_NORTH",
- "script": "PetalburgCity_Gym_EventScript_20576E"
+ "script": "PetalburgCity_Gym_EventScript_LeftGymStatue"
},
{
"type": "sign",
@@ -538,7 +538,7 @@
"y": 110,
"elevation": 3,
"player_facing_dir": "BG_EVENT_PLAYER_FACING_NORTH",
- "script": "PetalburgCity_Gym_EventScript_20577E"
+ "script": "PetalburgCity_Gym_EventScript_RightGymStatue"
}
]
} \ No newline at end of file
diff --git a/data/maps/PetalburgCity_Gym/scripts.inc b/data/maps/PetalburgCity_Gym/scripts.inc
index 6bc1426ae..35abd19ba 100644
--- a/data/maps/PetalburgCity_Gym/scripts.inc
+++ b/data/maps/PetalburgCity_Gym/scripts.inc
@@ -1,97 +1,98 @@
PetalburgCity_Gym_MapScripts:: @ 8204889
- map_script MAP_SCRIPT_ON_LOAD, PetalburgCity_Gym_OnTransition
- map_script MAP_SCRIPT_ON_TRANSITION, PetalburgCity_Gym_MapScript1_20492D
- map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, PetalburgCity_Gym_MapScript2_20498B
- map_script MAP_SCRIPT_ON_FRAME_TABLE, PetalburgCity_Gym_MapScript2_20499A
+ map_script MAP_SCRIPT_ON_LOAD, PetalburgCity_Gym_OnLoad
+ map_script MAP_SCRIPT_ON_TRANSITION, PetalburgCity_Gym_OnTransition
+ map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, PetalburgCity_Gym_OnWarp
+ map_script MAP_SCRIPT_ON_FRAME_TABLE, PetalburgCity_Gym_OnFrame
.byte 0
-PetalburgCity_Gym_OnTransition: @ 820489E
+PetalburgCity_Gym_OnLoad: @ 820489E
compare VAR_PETALBURG_GYM_STATE, 6
- goto_if_eq PetalburgCity_Gym_EventScript_2048B5
+ goto_if_eq PetalburgCity_Gym_EventScript_OpenUnlockedDoors
compare VAR_PETALBURG_GYM_STATE, 7
- call_if_ge PetalburgCity_Gym_EventScript_2048FF
+ call_if_ge PetalburgCity_Gym_EventScript_UnlockAllDoors
end
-PetalburgCity_Gym_EventScript_2048B5:: @ 82048B5
+@ NOTE: Strength and OHKO rooms are misleading. Both are more accurately Critical-Hit
+PetalburgCity_Gym_EventScript_OpenUnlockedDoors:: @ 82048B5
setvar VAR_0x8005, 1
- call PetalburgCity_Gym_EventScript_20555E
+ call PetalburgCity_Gym_EventScript_OpenGymEntranceDoors
checktrainerflag TRAINER_RANDALL
- call_if_eq PetalburgCity_Gym_EventScript_20557F
+ call_if_eq PetalburgCity_Gym_EventScript_OpenSpeedRoomDoors
checktrainerflag TRAINER_MARY
- call_if_eq PetalburgCity_Gym_EventScript_2055A0
+ call_if_eq PetalburgCity_Gym_EventScript_OpenAccuracyRoomDoors
checktrainerflag TRAINER_PARKER
- call_if_eq PetalburgCity_Gym_EventScript_2055C1
+ call_if_eq PetalburgCity_Gym_EventScript_OpenConfusionRoomDoors
checktrainerflag TRAINER_ALEXIA
- call_if_eq PetalburgCity_Gym_EventScript_2055E2
+ call_if_eq PetalburgCity_Gym_EventScript_OpenDefenseRoomDoors
checktrainerflag TRAINER_GEORGE
- call_if_eq PetalburgCity_Gym_EventScript_205603
+ call_if_eq PetalburgCity_Gym_EventScript_OpenRecoveryRoomDoors
checktrainerflag TRAINER_JODY
- call_if_eq PetalburgCity_Gym_EventScript_205624
+ call_if_eq PetalburgCity_Gym_EventScript_OpenStrengthRoomDoors
checktrainerflag TRAINER_BERKE
- call_if_eq PetalburgCity_Gym_EventScript_205645
+ call_if_eq PetalburgCity_Gym_EventScript_OpenOHKORoomDoors
end
-PetalburgCity_Gym_EventScript_2048FF:: @ 82048FF
+PetalburgCity_Gym_EventScript_UnlockAllDoors:: @ 82048FF
setvar VAR_0x8005, 1
- call PetalburgCity_Gym_EventScript_20555E
- call PetalburgCity_Gym_EventScript_20557F
- call PetalburgCity_Gym_EventScript_2055A0
- call PetalburgCity_Gym_EventScript_2055C1
- call PetalburgCity_Gym_EventScript_2055E2
- call PetalburgCity_Gym_EventScript_205603
- call PetalburgCity_Gym_EventScript_205624
- call PetalburgCity_Gym_EventScript_205645
+ call PetalburgCity_Gym_EventScript_OpenGymEntranceDoors
+ call PetalburgCity_Gym_EventScript_OpenSpeedRoomDoors
+ call PetalburgCity_Gym_EventScript_OpenAccuracyRoomDoors
+ call PetalburgCity_Gym_EventScript_OpenConfusionRoomDoors
+ call PetalburgCity_Gym_EventScript_OpenDefenseRoomDoors
+ call PetalburgCity_Gym_EventScript_OpenRecoveryRoomDoors
+ call PetalburgCity_Gym_EventScript_OpenStrengthRoomDoors
+ call PetalburgCity_Gym_EventScript_OpenOHKORoomDoors
return
-PetalburgCity_Gym_MapScript1_20492D: @ 820492D
+PetalburgCity_Gym_OnTransition: @ 820492D
compare VAR_PETALBURG_GYM_STATE, 1
- call_if_eq PetalburgCity_Gym_EventScript_20494D
+ call_if_eq PetalburgCity_Gym_EventScript_MoveWallyToEntrance
compare VAR_PETALBURG_GYM_STATE, 6
- call_if_lt PetalburgCity_Gym_EventScript_204955
- call_if_set FLAG_SYS_GAME_CLEAR, PetalburgCity_Gym_EventScript_20495D
+ call_if_lt PetalburgCity_Gym_EventScript_MoveNormanToEntrance
+ call_if_set FLAG_SYS_GAME_CLEAR, PetalburgCity_Gym_EventScript_CheckNormanForRematch
end
-PetalburgCity_Gym_EventScript_20494D:: @ 820494D
+PetalburgCity_Gym_EventScript_MoveWallyToEntrance:: @ 820494D
setobjectxyperm 10, 5, 108
return
-PetalburgCity_Gym_EventScript_204955:: @ 8204955
+PetalburgCity_Gym_EventScript_MoveNormanToEntrance:: @ 8204955
setobjectxyperm 1, 4, 107
return
-PetalburgCity_Gym_EventScript_20495D:: @ 820495D
- setorcopyvar VAR_TRAINER_BATTLE_OPPONENT_A, 269
+PetalburgCity_Gym_EventScript_CheckNormanForRematch:: @ 820495D
+ setorcopyvar VAR_TRAINER_BATTLE_OPPONENT_A, TRAINER_NORMAN_1
specialvar VAR_RESULT, IsTrainerReadyForRematch
- compare VAR_RESULT, 1
- goto_if_eq PetalburgCity_Gym_EventScript_204985
+ compare VAR_RESULT, TRUE
+ goto_if_eq PetalburgCity_Gym_EventScript_DontMoveNormanToFront
compare VAR_PETALBURG_GYM_STATE, 8
- goto_if_eq PetalburgCity_Gym_EventScript_204985
+ goto_if_eq PetalburgCity_Gym_EventScript_DontMoveNormanToFront
setobjectxyperm 1, 4, 107
return
-PetalburgCity_Gym_EventScript_204985:: @ 8204985
+PetalburgCity_Gym_EventScript_DontMoveNormanToFront:: @ 8204985
setvar VAR_PETALBURG_GYM_STATE, 8
end
-PetalburgCity_Gym_MapScript2_20498B: @ 820498B
- map_script_2 VAR_PETALBURG_GYM_STATE, 1, PetalburgCity_Gym_EventScript_204995
+PetalburgCity_Gym_OnWarp: @ 820498B
+ map_script_2 VAR_PETALBURG_GYM_STATE, 1, PetalburgCity_Gym_EventScript_TurnPlayerNorth
.2byte 0
-PetalburgCity_Gym_EventScript_204995:: @ 8204995
+PetalburgCity_Gym_EventScript_TurnPlayerNorth:: @ 8204995
turnobject EVENT_OBJ_ID_PLAYER, DIR_NORTH
end
-PetalburgCity_Gym_MapScript2_20499A: @ 820499A
- map_script_2 VAR_PETALBURG_GYM_STATE, 1, PetalburgCity_Gym_EventScript_2049A4
+PetalburgCity_Gym_OnFrame: @ 820499A
+ map_script_2 VAR_PETALBURG_GYM_STATE, 1, PetalburgCity_Gym_EventScript_ReturnFromWallyTutorial
.2byte 0
-PetalburgCity_Gym_EventScript_2049A4:: @ 82049A4
+PetalburgCity_Gym_EventScript_ReturnFromWallyTutorial:: @ 82049A4
lockall
- msgbox PetalburgCity_Gym_Text_205B32, MSGBOX_DEFAULT
- msgbox PetalburgCity_Gym_Text_205B4C, MSGBOX_DEFAULT
+ msgbox PetalburgCity_Gym_Text_DadSoDidItWorkOut, MSGBOX_DEFAULT
+ msgbox PetalburgCity_Gym_Text_WallyThankYouBye, MSGBOX_DEFAULT
closemessage
applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceDown
- applymovement 10, PetalburgCity_Gym_Movement_2049EC
+ applymovement 10, PetalburgCity_Gym_Movement_WallyExitGym
waitmovement 0
playse SE_KAIDAN
removeobject 10
@@ -99,121 +100,121 @@ PetalburgCity_Gym_EventScript_2049A4:: @ 82049A4
delay 30
applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceUp
waitmovement 0
- msgbox PetalburgCity_Gym_Text_205C40, MSGBOX_DEFAULT
+ msgbox PetalburgCity_Gym_Text_DadGoCollectBadges, MSGBOX_DEFAULT
setvar VAR_PETALBURG_GYM_STATE, 2
releaseall
end
-PetalburgCity_Gym_Movement_2049EC: @ 82049EC
+PetalburgCity_Gym_Movement_WallyExitGym: @ 82049EC
walk_down
walk_down
walk_down
delay_16
step_end
-PetalburgCity_Gym_EventScript_2049F1:: @ 82049F1
+PetalburgCity_Gym_EventScript_Norman:: @ 82049F1
lock
faceplayer
switch VAR_PETALBURG_GYM_STATE
- case 2, PetalburgCity_Gym_EventScript_204D4A
- case 3, PetalburgCity_Gym_EventScript_204D54
- case 4, PetalburgCity_Gym_EventScript_204D5E
- case 5, PetalburgCity_Gym_EventScript_204D68
- case 6, PetalburgCity_Gym_EventScript_204E3B
- case 7, PetalburgCity_Gym_EventScript_204D80
- case 8, PetalburgCity_Gym_EventScript_204DB3
- msgbox PetalburgCity_Gym_Text_2057A2, MSGBOX_DEFAULT
+ case 2, PetalburgCity_Gym_EventScript_NormanNoBadges
+ case 3, PetalburgCity_Gym_EventScript_NormanOneBadge
+ case 4, PetalburgCity_Gym_EventScript_NormanTwoBadges
+ case 5, PetalburgCity_Gym_EventScript_NormanThreeBadges
+ case 6, PetalburgCity_Gym_EventScript_NormanBattle
+ case 7, PetalburgCity_Gym_EventScript_NormanPostBattle
+ case 8, PetalburgCity_Gym_EventScript_NormanRematch
+ msgbox PetalburgCity_Gym_Text_DadYoureHereWithYourPokemon, MSGBOX_DEFAULT
closemessage
switch VAR_FACING
- case 1, PetalburgCity_Gym_EventScript_204A80
- case 2, PetalburgCity_Gym_EventScript_204A8B
- case 3, PetalburgCity_Gym_EventScript_204A96
- case 4, PetalburgCity_Gym_EventScript_204AA1
+ case DIR_SOUTH, PetalburgCity_Gym_EventScript_BeginWallyTutorialSouth
+ case DIR_NORTH, PetalburgCity_Gym_EventScript_BeginWallyTutorialNorth
+ case DIR_WEST, PetalburgCity_Gym_EventScript_BeginWallyTutorialWest
+ case DIR_EAST, PetalburgCity_Gym_EventScript_BeginWallyTutorialEast
end
-PetalburgCity_Gym_EventScript_204A80:: @ 8204A80
+PetalburgCity_Gym_EventScript_BeginWallyTutorialSouth:: @ 8204A80
setvar VAR_0x8008, 0
- goto PetalburgCity_Gym_EventScript_204AAC
+ goto PetalburgCity_Gym_EventScript_BeginWallyTutorial
end
-PetalburgCity_Gym_EventScript_204A8B:: @ 8204A8B
+PetalburgCity_Gym_EventScript_BeginWallyTutorialNorth:: @ 8204A8B
setvar VAR_0x8008, 1
- goto PetalburgCity_Gym_EventScript_204AAC
+ goto PetalburgCity_Gym_EventScript_BeginWallyTutorial
end
-PetalburgCity_Gym_EventScript_204A96:: @ 8204A96
+PetalburgCity_Gym_EventScript_BeginWallyTutorialWest:: @ 8204A96
setvar VAR_0x8008, 2
- goto PetalburgCity_Gym_EventScript_204AAC
+ goto PetalburgCity_Gym_EventScript_BeginWallyTutorial
end
-PetalburgCity_Gym_EventScript_204AA1:: @ 8204AA1
+PetalburgCity_Gym_EventScript_BeginWallyTutorialEast:: @ 8204AA1
setvar VAR_0x8008, 3
- goto PetalburgCity_Gym_EventScript_204AAC
+ goto PetalburgCity_Gym_EventScript_BeginWallyTutorial
end
-PetalburgCity_Gym_EventScript_204AAC:: @ 8204AAC
- addobject 10
+PetalburgCity_Gym_EventScript_BeginWallyTutorial:: @ 8204AAC
+ addobject 10 @ Wally
playse SE_DOOR
compare VAR_0x8008, 0
- call_if_eq PetalburgCity_Gym_EventScript_204C31
+ call_if_eq PetalburgCity_Gym_EventScript_WallyArriveSouth
compare VAR_0x8008, 1
- call_if_eq PetalburgCity_Gym_EventScript_204C43
+ call_if_eq PetalburgCity_Gym_EventScript_WallyArriveNorth
compare VAR_0x8008, 2
- call_if_eq PetalburgCity_Gym_EventScript_204C5F
+ call_if_eq PetalburgCity_Gym_EventScript_WallyArriveWestEast
compare VAR_0x8008, 3
- call_if_eq PetalburgCity_Gym_EventScript_204C5F
- msgbox PetalburgCity_Gym_Text_2058B1, MSGBOX_DEFAULT
- msgbox PetalburgCity_Gym_Text_2058DB, MSGBOX_DEFAULT
- msgbox PetalburgCity_Gym_Text_205910, MSGBOX_DEFAULT
- msgbox PetalburgCity_Gym_Text_2059D8, MSGBOX_DEFAULT
+ call_if_eq PetalburgCity_Gym_EventScript_WallyArriveWestEast
+ msgbox PetalburgCity_Gym_Text_WallyIdLikeAPokemon, MSGBOX_DEFAULT
+ msgbox PetalburgCity_Gym_Text_DadOhYoureWallyRight, MSGBOX_DEFAULT
+ msgbox PetalburgCity_Gym_Text_WallyIveNeverCaughtAPokemon, MSGBOX_DEFAULT
+ msgbox PetalburgCity_Gym_Text_DadHmISee, MSGBOX_DEFAULT
compare VAR_0x8008, 0
- call_if_eq PetalburgCity_Gym_EventScript_204CC7
+ call_if_eq PetalburgCity_Gym_EventScript_NormanAddressPlayerSouth
compare VAR_0x8008, 1
- call_if_eq PetalburgCity_Gym_EventScript_204CD2
+ call_if_eq PetalburgCity_Gym_EventScript_NormanAddressPlayerNorth
compare VAR_0x8008, 2
- call_if_eq PetalburgCity_Gym_EventScript_204CE4
+ call_if_eq PetalburgCity_Gym_EventScript_NormanAddressPlayerWest
compare VAR_0x8008, 3
- call_if_eq PetalburgCity_Gym_EventScript_204CF6
- msgbox PetalburgCity_Gym_Text_2059E8, MSGBOX_DEFAULT
+ call_if_eq PetalburgCity_Gym_EventScript_NormanAddressPlayerEast
+ msgbox PetalburgCity_Gym_Text_DadPlayerGoWithWally, MSGBOX_DEFAULT
compare VAR_0x8008, 0
- call_if_eq PetalburgCity_Gym_EventScript_204D08
+ call_if_eq PetalburgCity_Gym_EventScript_NormanAddressWallySouth
compare VAR_0x8008, 1
- call_if_eq PetalburgCity_Gym_EventScript_204D13
+ call_if_eq PetalburgCity_Gym_EventScript_NormanAddressWallyNorth
compare VAR_0x8008, 2
- call_if_eq PetalburgCity_Gym_EventScript_204D1E
+ call_if_eq PetalburgCity_Gym_EventScript_NormanAddressWallyWest
compare VAR_0x8008, 3
- call_if_eq PetalburgCity_Gym_EventScript_204D29
- msgbox PetalburgCity_Gym_Text_205A46, MSGBOX_DEFAULT
- msgbox PetalburgCity_Gym_Text_205A89, MSGBOX_DEFAULT
- msgbox PetalburgCity_Gym_Text_205AF4, MSGBOX_DEFAULT
+ call_if_eq PetalburgCity_Gym_EventScript_NormanAddressWallyEast
+ msgbox PetalburgCity_Gym_Text_IllLoanYouMyZigzagoon, MSGBOX_DEFAULT
+ msgbox PetalburgCity_Gym_Text_WallyThankYouAndDadGivesPokeBall, MSGBOX_DEFAULT
+ msgbox PetalburgCity_Gym_Text_WallyOhWowThankYou, MSGBOX_DEFAULT
compare VAR_0x8008, 0
- call_if_eq PetalburgCity_Gym_EventScript_204D72
+ call_if_eq PetalburgCity_Gym_EventScript_NormanFaceDoorSouth
compare VAR_0x8008, 1
- call_if_eq PetalburgCity_Gym_EventScript_204D73
+ call_if_eq PetalburgCity_Gym_EventScript_NormanFaceDoorNorth
compare VAR_0x8008, 2
- call_if_eq PetalburgCity_Gym_EventScript_204D7E
+ call_if_eq PetalburgCity_Gym_EventScript_NormanFaceDoorWest
compare VAR_0x8008, 3
- call_if_eq PetalburgCity_Gym_EventScript_204D7F
+ call_if_eq PetalburgCity_Gym_EventScript_NormanFaceDoorEast
compare VAR_0x8008, 0
- call_if_eq PetalburgCity_Gym_EventScript_204D34
+ call_if_eq PetalburgCity_Gym_EventScript_WallyFacePlayer
compare VAR_0x8008, 1
- call_if_eq PetalburgCity_Gym_EventScript_204D3F
+ call_if_eq PetalburgCity_Gym_EventScript_WallyFaceDown
compare VAR_0x8008, 2
- call_if_eq PetalburgCity_Gym_EventScript_204D34
+ call_if_eq PetalburgCity_Gym_EventScript_WallyFacePlayer
compare VAR_0x8008, 3
- call_if_eq PetalburgCity_Gym_EventScript_204D34
- msgbox PetalburgCity_Gym_Text_205B0F, MSGBOX_DEFAULT
+ call_if_eq PetalburgCity_Gym_EventScript_WallyFacePlayer
+ msgbox PetalburgCity_Gym_Text_WouldYouReallyComeWithMe, MSGBOX_DEFAULT
closemessage
- setflag FLAG_SPECIAL_FLAG_0x4001
+ setflag FLAG_DONT_TRANSITION_MUSIC
playbgm MUS_TSURETEK, 0
compare VAR_0x8008, 0
- call_if_eq PetalburgCity_Gym_EventScript_204C78
+ call_if_eq PetalburgCity_Gym_EventScript_ExitGymWithWallySouth
compare VAR_0x8008, 1
- call_if_eq PetalburgCity_Gym_EventScript_204C91
+ call_if_eq PetalburgCity_Gym_EventScript_ExitGymWithWallyNorth
compare VAR_0x8008, 2
- call_if_eq PetalburgCity_Gym_EventScript_204CA3
+ call_if_eq PetalburgCity_Gym_EventScript_ExitGymWithWallyWest
compare VAR_0x8008, 3
- call_if_eq PetalburgCity_Gym_EventScript_204CB5
+ call_if_eq PetalburgCity_Gym_EventScript_ExitGymWithWallyEast
removeobject 10
setflag FLAG_HIDE_PETALBURG_CITY_WALLYS_AUNT
setvar VAR_PETALBURG_GYM_STATE, 1
@@ -227,180 +228,181 @@ PetalburgCity_Gym_EventScript_204AAC:: @ 8204AAC
release
end
-PetalburgCity_Gym_EventScript_204C31:: @ 8204C31
+PetalburgCity_Gym_EventScript_WallyArriveSouth:: @ 8204C31
applymovement 1, Common_Movement_WalkInPlaceDown
- applymovement 10, PetalburgCity_Gym_Movement_2050EB
+ applymovement 10, PetalburgCity_Gym_Movement_WallyArrive
waitmovement 0
return
-PetalburgCity_Gym_EventScript_204C43:: @ 8204C43
- applymovement 10, PetalburgCity_Gym_Movement_2050E1
+PetalburgCity_Gym_EventScript_WallyArriveNorth:: @ 8204C43
+ applymovement 10, PetalburgCity_Gym_Movement_WallyArriveNorth
waitmovement 0
applymovement 1, Common_Movement_WalkInPlaceRight
applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceRight
waitmovement 0
return
-PetalburgCity_Gym_EventScript_204C5F:: @ 8204C5F
+PetalburgCity_Gym_EventScript_WallyArriveWestEast:: @ 8204C5F
applymovement 1, Common_Movement_WalkInPlaceDown
applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceDown
- applymovement 10, PetalburgCity_Gym_Movement_2050EB
+ applymovement 10, PetalburgCity_Gym_Movement_WallyArrive
waitmovement 0
return
-PetalburgCity_Gym_EventScript_204C78:: @ 8204C78
+PetalburgCity_Gym_EventScript_ExitGymWithWallySouth:: @ 8204C78
applymovement 1, Common_Movement_WalkInPlaceDown
- applymovement 10, PetalburgCity_Gym_Movement_205102
- applymovement EVENT_OBJ_ID_PLAYER, PetalburgCity_Gym_Movement_205111
+ applymovement 10, PetalburgCity_Gym_Movement_WallyExitSouthWest
+ applymovement EVENT_OBJ_ID_PLAYER, PetalburgCity_Gym_Movement_PlayerExitWithWallySouth
waitmovement 0
return
-PetalburgCity_Gym_EventScript_204C91:: @ 8204C91
- applymovement 10, PetalburgCity_Gym_Movement_2050F2
- applymovement EVENT_OBJ_ID_PLAYER, PetalburgCity_Gym_Movement_205109
+PetalburgCity_Gym_EventScript_ExitGymWithWallyNorth:: @ 8204C91
+ applymovement 10, PetalburgCity_Gym_Movement_WallyExitNorth
+ applymovement EVENT_OBJ_ID_PLAYER, PetalburgCity_Gym_Movement_PlayerExitWithWallyNorth
waitmovement 0
return
-PetalburgCity_Gym_EventScript_204CA3:: @ 8204CA3
- applymovement 10, PetalburgCity_Gym_Movement_205102
- applymovement EVENT_OBJ_ID_PLAYER, PetalburgCity_Gym_Movement_20511B
+PetalburgCity_Gym_EventScript_ExitGymWithWallyWest:: @ 8204CA3
+ applymovement 10, PetalburgCity_Gym_Movement_WallyExitSouthWest
+ applymovement EVENT_OBJ_ID_PLAYER, PetalburgCity_Gym_Movement_PlayerExitWithWallyWest
waitmovement 0
return
-PetalburgCity_Gym_EventScript_204CB5:: @ 8204CB5
- applymovement 10, PetalburgCity_Gym_Movement_2050FA
- applymovement EVENT_OBJ_ID_PLAYER, PetalburgCity_Gym_Movement_205123
+PetalburgCity_Gym_EventScript_ExitGymWithWallyEast:: @ 8204CB5
+ applymovement 10, PetalburgCity_Gym_Movement_WallyExitEast
+ applymovement EVENT_OBJ_ID_PLAYER, PetalburgCity_Gym_Movement_PlayerExitWithWallyEast
waitmovement 0
return
-PetalburgCity_Gym_EventScript_204CC7:: @ 8204CC7
+PetalburgCity_Gym_EventScript_NormanAddressPlayerSouth:: @ 8204CC7
applymovement 1, Common_Movement_WalkInPlaceUp
waitmovement 0
return
-PetalburgCity_Gym_EventScript_204CD2:: @ 8204CD2
+PetalburgCity_Gym_EventScript_NormanAddressPlayerNorth:: @ 8204CD2
applymovement 1, Common_Movement_WalkInPlaceDown
applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceUp
waitmovement 0
return
-PetalburgCity_Gym_EventScript_204CE4:: @ 8204CE4
+PetalburgCity_Gym_EventScript_NormanAddressPlayerWest:: @ 8204CE4
applymovement 1, Common_Movement_WalkInPlaceRight
applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceLeft
waitmovement 0
return
-PetalburgCity_Gym_EventScript_204CF6:: @ 8204CF6
+PetalburgCity_Gym_EventScript_NormanAddressPlayerEast:: @ 8204CF6
applymovement 1, Common_Movement_WalkInPlaceLeft
applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceRight
waitmovement 0
return
-PetalburgCity_Gym_EventScript_204D08:: @ 8204D08
+PetalburgCity_Gym_EventScript_NormanAddressWallySouth:: @ 8204D08
applymovement 1, Common_Movement_WalkInPlaceDown
waitmovement 0
return
-PetalburgCity_Gym_EventScript_204D13:: @ 8204D13
+PetalburgCity_Gym_EventScript_NormanAddressWallyNorth:: @ 8204D13
applymovement 1, Common_Movement_WalkInPlaceRight
waitmovement 0
return
-PetalburgCity_Gym_EventScript_204D1E:: @ 8204D1E
+PetalburgCity_Gym_EventScript_NormanAddressWallyWest:: @ 8204D1E
applymovement 1, Common_Movement_WalkInPlaceDown
waitmovement 0
return
-PetalburgCity_Gym_EventScript_204D29:: @ 8204D29
+PetalburgCity_Gym_EventScript_NormanAddressWallyEast:: @ 8204D29
applymovement 1, Common_Movement_WalkInPlaceDown
waitmovement 0
return
-PetalburgCity_Gym_EventScript_204D34:: @ 8204D34
+PetalburgCity_Gym_EventScript_WallyFacePlayer:: @ 8204D34
applymovement 10, Common_Movement_FacePlayer
waitmovement 0
return
-PetalburgCity_Gym_EventScript_204D3F:: @ 8204D3F
+PetalburgCity_Gym_EventScript_WallyFaceDown:: @ 8204D3F
applymovement 10, Common_Movement_WalkInPlaceDown
waitmovement 0
return
-PetalburgCity_Gym_EventScript_204D4A:: @ 8204D4A
- msgbox PetalburgCity_Gym_Text_205DB4, MSGBOX_DEFAULT
+PetalburgCity_Gym_EventScript_NormanNoBadges:: @ 8204D4A
+ msgbox PetalburgCity_Gym_Text_NormanGoToRustboro, MSGBOX_DEFAULT
release
end
-PetalburgCity_Gym_EventScript_204D54:: @ 8204D54
- msgbox PetalburgCity_Gym_Text_205EAE, MSGBOX_DEFAULT
+PetalburgCity_Gym_EventScript_NormanOneBadge:: @ 8204D54
+ msgbox PetalburgCity_Gym_Text_NormanGoToDewford, MSGBOX_DEFAULT
release
end
-PetalburgCity_Gym_EventScript_204D5E:: @ 8204D5E
- msgbox PetalburgCity_Gym_Text_205F87, MSGBOX_DEFAULT
+PetalburgCity_Gym_EventScript_NormanTwoBadges:: @ 8204D5E
+ msgbox PetalburgCity_Gym_Text_YouHaveGottenStronger, MSGBOX_DEFAULT
release
end
-PetalburgCity_Gym_EventScript_204D68:: @ 8204D68
- msgbox PetalburgCity_Gym_Text_205F87, MSGBOX_DEFAULT
+PetalburgCity_Gym_EventScript_NormanThreeBadges:: @ 8204D68
+ msgbox PetalburgCity_Gym_Text_YouHaveGottenStronger, MSGBOX_DEFAULT
release
end
-PetalburgCity_Gym_EventScript_204D72:: @ 8204D72
+PetalburgCity_Gym_EventScript_NormanFaceDoorSouth:: @ 8204D72
return
-PetalburgCity_Gym_EventScript_204D73:: @ 8204D73
+@ For all other NormanFaceDoorX, Norman is already facing the door from NormanAddressWallyX
+PetalburgCity_Gym_EventScript_NormanFaceDoorNorth:: @ 8204D73
applymovement 1, Common_Movement_WalkInPlaceDown
waitmovement 0
return
-PetalburgCity_Gym_EventScript_204D7E:: @ 8204D7E
+PetalburgCity_Gym_EventScript_NormanFaceDoorWest:: @ 8204D7E
return
-PetalburgCity_Gym_EventScript_204D7F:: @ 8204D7F
+PetalburgCity_Gym_EventScript_NormanFaceDoorEast:: @ 8204D7F
return
-PetalburgCity_Gym_EventScript_204D80:: @ 8204D80
- call PetalburgCity_Gym_EventScript_204DCE
- compare VAR_RESULT, 1
- goto_if_eq PetalburgCity_Gym_EventScript_204E1D
- goto_if_unset FLAG_RECEIVED_TM42, PetalburgCity_Gym_EventScript_204DAC
- goto_if_set FLAG_SYS_GAME_CLEAR, PetalburgCity_Gym_EventScript_20512D
- msgbox PetalburgCity_Gym_Text_206417, MSGBOX_DEFAULT
+PetalburgCity_Gym_EventScript_NormanPostBattle:: @ 8204D80
+ call PetalburgCity_Gym_EventScript_ShouldGiveEnigmaBerry
+ compare VAR_RESULT, TRUE
+ goto_if_eq PetalburgCity_Gym_EventScript_GiveEnigmaBerry
+ goto_if_unset FLAG_RECEIVED_TM42, PetalburgCity_Gym_EventScript_GiveFacade2
+ goto_if_set FLAG_SYS_GAME_CLEAR, PetalburgCity_Gym_EventScript_NoAmountOfTrainingIsEnough
+ msgbox PetalburgCity_Gym_Text_DadGoingToKeepTraining, MSGBOX_DEFAULT
release
end
-PetalburgCity_Gym_EventScript_204DAC:: @ 8204DAC
- call PetalburgCity_Gym_EventScript_204ED2
+PetalburgCity_Gym_EventScript_GiveFacade2:: @ 8204DAC
+ call PetalburgCity_Gym_EventScript_GiveFacade
release
end
-PetalburgCity_Gym_EventScript_204DB3:: @ 8204DB3
- trainerbattle_rematch_double TRAINER_NORMAN_1, PetalburgCity_Gym_Text_2074A2, PetalburgCity_Gym_Text_2075CE, PetalburgCity_Gym_Text_20764A
- msgbox PetalburgCity_Gym_Text_2075F7, MSGBOX_AUTOCLOSE
+PetalburgCity_Gym_EventScript_NormanRematch:: @ 8204DB3
+ trainerbattle_rematch_double TRAINER_NORMAN_1, PetalburgCity_Gym_Text_NormanPreRematch, PetalburgCity_Gym_Text_NormanRematchDefeat, PetalburgCity_Gym_Text_NormanRematchNeedTwoMons
+ msgbox PetalburgCity_Gym_Text_NormanPostRematch, MSGBOX_AUTOCLOSE
end
-PetalburgCity_Gym_EventScript_204DCE:: @ 8204DCE
+PetalburgCity_Gym_EventScript_ShouldGiveEnigmaBerry:: @ 8204DCE
specialvar VAR_RESULT, IsEnigmaBerryValid
- compare VAR_RESULT, 0
- goto_if_eq PetalburgCity_Gym_EventScript_204E17
+ compare VAR_RESULT, FALSE
+ goto_if_eq PetalburgCity_Gym_EventScript_DontGiveEnigmaBerry
checkitem ITEM_ENIGMA_BERRY, 1
- compare VAR_RESULT, 1
- goto_if_eq PetalburgCity_Gym_EventScript_204E17
+ compare VAR_RESULT, TRUE
+ goto_if_eq PetalburgCity_Gym_EventScript_DontGiveEnigmaBerry
checkpcitem ITEM_ENIGMA_BERRY, 1
- compare VAR_RESULT, 1
- goto_if_eq PetalburgCity_Gym_EventScript_204E17
+ compare VAR_RESULT, TRUE
+ goto_if_eq PetalburgCity_Gym_EventScript_DontGiveEnigmaBerry
compare VAR_ENIGMA_BERRY_AVAILABLE, 0
- goto_if_eq PetalburgCity_Gym_EventScript_204E17
- msgbox PetalburgCity_Gym_Text_2A6D3D, MSGBOX_DEFAULT
- setvar VAR_RESULT, 1
+ goto_if_eq PetalburgCity_Gym_EventScript_DontGiveEnigmaBerry
+ msgbox PetalburgCity_Gym_Text_GiveEnigmaBerry, MSGBOX_DEFAULT
+ setvar VAR_RESULT, TRUE
return
-PetalburgCity_Gym_EventScript_204E17:: @ 8204E17
- setvar VAR_RESULT, 0
+PetalburgCity_Gym_EventScript_DontGiveEnigmaBerry:: @ 8204E17
+ setvar VAR_RESULT, FALSE
return
-PetalburgCity_Gym_EventScript_204E1D:: @ 8204E1D
+PetalburgCity_Gym_EventScript_GiveEnigmaBerry:: @ 8204E1D
giveitem_std ITEM_ENIGMA_BERRY
compare VAR_RESULT, 0
goto_if_eq Common_EventScript_ShowBagIsFull
@@ -408,61 +410,61 @@ PetalburgCity_Gym_EventScript_204E1D:: @ 8204E1D
release
end
-PetalburgCity_Gym_EventScript_204E3B:: @ 8204E3B
- msgbox PetalburgCity_Gym_Text_205FE5, MSGBOX_DEFAULT
- trainerbattle_no_intro TRAINER_NORMAN_1, PetalburgCity_Gym_Text_206107
- message PetalburgCity_Gym_Text_206162
+PetalburgCity_Gym_EventScript_NormanBattle:: @ 8204E3B
+ msgbox PetalburgCity_Gym_Text_NormanPreBattle, MSGBOX_DEFAULT
+ trainerbattle_no_intro TRAINER_NORMAN_1, PetalburgCity_Gym_Text_NormanDefeat
+ message PetalburgCity_Gym_Text_ReceivedBalanceBadge
waitmessage
call Common_EventScript_PlayGymBadgeFanfare
- msgbox PetalburgCity_Gym_Text_20618A, MSGBOX_DEFAULT
+ msgbox PetalburgCity_Gym_Text_ExplainBalanceBadgeTakeThis, MSGBOX_DEFAULT
setflag FLAG_DEFEATED_PETALBURG_GYM
setvar VAR_PETALBURG_GYM_STATE, 7
setflag FLAG_BADGE05_GET
special ResetHealLocationFromDewford
- call PetalburgCity_Gym_EventScript_2721F8
+ call EventScript_HideMrBriney
setflag FLAG_HIDE_MAUVILLE_GYM_WATTSON
clearflag FLAG_HIDE_MAUVILLE_CITY_WATTSON
setvar VAR_0x8008, 5
call Common_EventScript_SetGymTrainers
clearflag FLAG_HIDE_DEWFORD_HALL_SLUDGE_BOMB_MAN
- call PetalburgCity_Gym_EventScript_2048FF
+ call PetalburgCity_Gym_EventScript_UnlockAllDoors
special DrawWholeMapView
- call PetalburgCity_Gym_EventScript_204ED2
+ call PetalburgCity_Gym_EventScript_GiveFacade
delay 30
- msgbox PetalburgCity_Gym_Text_2062FB, MSGBOX_DEFAULT
+ msgbox PetalburgCity_Gym_Text_DadHappyAndSad, MSGBOX_DEFAULT
closemessage
delay 40
playse SE_DOOR
delay 10
- addobject 11
+ addobject 11 @ Wallys Uncle
switch VAR_FACING
- case 2, PetalburgCity_Gym_EventScript_204EF5
- case 3, PetalburgCity_Gym_EventScript_204F09
- case 4, PetalburgCity_Gym_EventScript_204EFF
+ case DIR_NORTH, PetalburgCity_Gym_EventScript_WallysUncleArrivesNorth
+ case DIR_WEST, PetalburgCity_Gym_EventScript_WallysUncleArrivesWest
+ case DIR_EAST, PetalburgCity_Gym_EventScript_WallysUncleArrivesEast
end
-PetalburgCity_Gym_EventScript_204ED2:: @ 8204ED2
+PetalburgCity_Gym_EventScript_GiveFacade:: @ 8204ED2
giveitem_std ITEM_TM42
compare VAR_RESULT, 0
goto_if_eq Common_EventScript_BagIsFull
setflag FLAG_RECEIVED_TM42
- msgbox PetalburgCity_Gym_Text_206254, MSGBOX_DEFAULT
+ msgbox PetalburgCity_Gym_Text_ExplainFacade, MSGBOX_DEFAULT
return
-PetalburgCity_Gym_EventScript_204EF5:: @ 8204EF5
+PetalburgCity_Gym_EventScript_WallysUncleArrivesNorth:: @ 8204EF5
setvar VAR_0x8008, 1
- goto PetalburgCity_Gym_EventScript_204F13
+ goto PetalburgCity_Gym_EventScript_WallysUncleArrives
-PetalburgCity_Gym_EventScript_204EFF:: @ 8204EFF
+PetalburgCity_Gym_EventScript_WallysUncleArrivesEast:: @ 8204EFF
setvar VAR_0x8008, 2
- goto PetalburgCity_Gym_EventScript_204F13
+ goto PetalburgCity_Gym_EventScript_WallysUncleArrives
-PetalburgCity_Gym_EventScript_204F09:: @ 8204F09
+PetalburgCity_Gym_EventScript_WallysUncleArrivesWest:: @ 8204F09
setvar VAR_0x8008, 3
- goto PetalburgCity_Gym_EventScript_204F13
+ goto PetalburgCity_Gym_EventScript_WallysUncleArrives
-PetalburgCity_Gym_EventScript_204F13:: @ 8204F13
- applymovement 11, PetalburgCity_Gym_Movement_2050BB
+PetalburgCity_Gym_EventScript_WallysUncleArrives:: @ 8204F13
+ applymovement 11, PetalburgCity_Gym_Movement_WallysUncleEnterGym
waitmovement 0
playse SE_PIN
applymovement 11, Common_Movement_ExclamationMark
@@ -471,30 +473,30 @@ PetalburgCity_Gym_EventScript_204F13:: @ 8204F13
waitmovement 0
delay 10
compare VAR_0x8008, 1
- call_if_eq PetalburgCity_Gym_EventScript_204FED
+ call_if_eq PetalburgCity_Gym_EventScript_WallysUncleApproachPlayerNorth
compare VAR_0x8008, 2
- call_if_eq PetalburgCity_Gym_EventScript_205009
+ call_if_eq PetalburgCity_Gym_EventScript_WallysUncleApproachPlayerEast
compare VAR_0x8008, 3
- call_if_eq PetalburgCity_Gym_EventScript_205025
- msgbox PetalburgCity_Gym_Text_206377, MSGBOX_DEFAULT
+ call_if_eq PetalburgCity_Gym_EventScript_WallysUncleApproachPlayerWest
+ msgbox PetalburgCity_Gym_Text_PleaseComeWithMe, MSGBOX_DEFAULT
closemessage
delay 20
compare VAR_0x8008, 1
- call_if_eq PetalburgCity_Gym_EventScript_204FCC
+ call_if_eq PetalburgCity_Gym_EventScript_WallysUncleFaceNormanNorth
compare VAR_0x8008, 2
- call_if_eq PetalburgCity_Gym_EventScript_204FD7
+ call_if_eq PetalburgCity_Gym_EventScript_WallysUncleFaceNormanEast
compare VAR_0x8008, 3
- call_if_eq PetalburgCity_Gym_EventScript_204FE2
- msgbox PetalburgCity_Gym_Text_2063CA, MSGBOX_DEFAULT
+ call_if_eq PetalburgCity_Gym_EventScript_WallysUncleFaceNormanWest
+ msgbox PetalburgCity_Gym_Text_LetMeBorrowPlayer, MSGBOX_DEFAULT
closemessage
- setflag FLAG_SPECIAL_FLAG_0x4001
+ setflag FLAG_DONT_TRANSITION_MUSIC
playbgm MUS_TSURETEK, 0
compare VAR_0x8008, 1
- call_if_eq PetalburgCity_Gym_EventScript_205041
+ call_if_eq PetalburgCity_Gym_EventScript_ExitGymWithWallysUncleNorth
compare VAR_0x8008, 2
- call_if_eq PetalburgCity_Gym_EventScript_20505A
+ call_if_eq PetalburgCity_Gym_EventScript_ExitGymWithWallysUncleEast
compare VAR_0x8008, 3
- call_if_eq PetalburgCity_Gym_EventScript_20506C
+ call_if_eq PetalburgCity_Gym_EventScript_ExitGymWithWallysUncleWest
removeobject 11
setvar VAR_PETALBURG_CITY_STATE, 4
clearflag FLAG_HIDE_PETALBURG_CITY_WALLYS_UNCLE
@@ -503,65 +505,65 @@ PetalburgCity_Gym_EventScript_204F13:: @ 8204F13
release
end
-PetalburgCity_Gym_EventScript_204FCC:: @ 8204FCC
+PetalburgCity_Gym_EventScript_WallysUncleFaceNormanNorth:: @ 8204FCC
applymovement 11, Common_Movement_WalkInPlaceUp
waitmovement 0
return
-PetalburgCity_Gym_EventScript_204FD7:: @ 8204FD7
+PetalburgCity_Gym_EventScript_WallysUncleFaceNormanEast:: @ 8204FD7
applymovement 11, Common_Movement_WalkInPlaceRight
waitmovement 0
return
-PetalburgCity_Gym_EventScript_204FE2:: @ 8204FE2
+PetalburgCity_Gym_EventScript_WallysUncleFaceNormanWest:: @ 8204FE2
applymovement 11, Common_Movement_WalkInPlaceLeft
waitmovement 0
return
-PetalburgCity_Gym_EventScript_204FED:: @ 8204FED
- applymovement 11, PetalburgCity_Gym_Movement_2050C3
+PetalburgCity_Gym_EventScript_WallysUncleApproachPlayerNorth:: @ 8204FED
+ applymovement 11, PetalburgCity_Gym_Movement_WallysUncleApproachPlayerNorth
waitmovement 0
applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceLeft
applymovement 1, Common_Movement_WalkInPlaceLeft
waitmovement 0
return
-PetalburgCity_Gym_EventScript_205009:: @ 8205009
- applymovement 11, PetalburgCity_Gym_Movement_2050CA
+PetalburgCity_Gym_EventScript_WallysUncleApproachPlayerEast:: @ 8205009
+ applymovement 11, PetalburgCity_Gym_Movement_WallysUncleApproachPlayerEast
waitmovement 0
applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceDown
applymovement 1, Common_Movement_WalkInPlaceDown
waitmovement 0
return
-PetalburgCity_Gym_EventScript_205025:: @ 8205025
- applymovement 11, PetalburgCity_Gym_Movement_2050D0
+PetalburgCity_Gym_EventScript_WallysUncleApproachPlayerWest:: @ 8205025
+ applymovement 11, PetalburgCity_Gym_Movement_WallysUncleApproachPlayerWest
waitmovement 0
applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceDown
applymovement 1, Common_Movement_WalkInPlaceDown
waitmovement 0
return
-PetalburgCity_Gym_EventScript_205041:: @ 8205041
- applymovement 11, PetalburgCity_Gym_Movement_20507E
+PetalburgCity_Gym_EventScript_ExitGymWithWallysUncleNorth:: @ 8205041
+ applymovement 11, PetalburgCity_Gym_Movement_WallysUncleExitNorth
applymovement 1, Common_Movement_WalkInPlaceDown
- applymovement EVENT_OBJ_ID_PLAYER, PetalburgCity_Gym_Movement_2050A1
+ applymovement EVENT_OBJ_ID_PLAYER, PetalburgCity_Gym_Movement_PlayerExitWithWallysUncleNorth
waitmovement 0
return
-PetalburgCity_Gym_EventScript_20505A:: @ 820505A
- applymovement 11, PetalburgCity_Gym_Movement_205089
- applymovement EVENT_OBJ_ID_PLAYER, PetalburgCity_Gym_Movement_2050A9
+PetalburgCity_Gym_EventScript_ExitGymWithWallysUncleEast:: @ 820505A
+ applymovement 11, PetalburgCity_Gym_Movement_WallysUncleExitEast
+ applymovement EVENT_OBJ_ID_PLAYER, PetalburgCity_Gym_Movement_PlayerExitWithWallysUncleEast
waitmovement 0
return
-PetalburgCity_Gym_EventScript_20506C:: @ 820506C
- applymovement 11, PetalburgCity_Gym_Movement_205094
- applymovement EVENT_OBJ_ID_PLAYER, PetalburgCity_Gym_Movement_2050B1
+PetalburgCity_Gym_EventScript_ExitGymWithWallysUncleWest:: @ 820506C
+ applymovement 11, PetalburgCity_Gym_Movement_WallysUncleExitWest
+ applymovement EVENT_OBJ_ID_PLAYER, PetalburgCity_Gym_Movement_PlayerExitWithWallysUncleWest
waitmovement 0
return
-PetalburgCity_Gym_Movement_20507E: @ 820507E
+PetalburgCity_Gym_Movement_WallysUncleExitNorth: @ 820507E
walk_down
walk_down
walk_left
@@ -574,7 +576,7 @@ PetalburgCity_Gym_Movement_20507E: @ 820507E
set_invisible
step_end
-PetalburgCity_Gym_Movement_205089: @ 8205089
+PetalburgCity_Gym_Movement_WallysUncleExitEast: @ 8205089
walk_down
walk_down
walk_left
@@ -587,7 +589,7 @@ PetalburgCity_Gym_Movement_205089: @ 8205089
set_invisible
step_end
-PetalburgCity_Gym_Movement_205094: @ 8205094
+PetalburgCity_Gym_Movement_WallysUncleExitWest: @ 8205094
walk_down
walk_down
walk_left
@@ -602,7 +604,7 @@ PetalburgCity_Gym_Movement_205094: @ 8205094
set_invisible
step_end
-PetalburgCity_Gym_Movement_2050A1: @ 82050A1
+PetalburgCity_Gym_Movement_PlayerExitWithWallysUncleNorth: @ 82050A1
delay_16
walk_down
walk_down
@@ -612,7 +614,7 @@ PetalburgCity_Gym_Movement_2050A1: @ 82050A1
walk_down
step_end
-PetalburgCity_Gym_Movement_2050A9: @ 82050A9
+PetalburgCity_Gym_Movement_PlayerExitWithWallysUncleEast: @ 82050A9
delay_16
walk_down
walk_down
@@ -622,7 +624,7 @@ PetalburgCity_Gym_Movement_2050A9: @ 82050A9
walk_down
step_end
-PetalburgCity_Gym_Movement_2050B1: @ 82050B1
+PetalburgCity_Gym_Movement_PlayerExitWithWallysUncleWest: @ 82050B1
delay_16
walk_down
walk_down
@@ -634,7 +636,7 @@ PetalburgCity_Gym_Movement_2050B1: @ 82050B1
walk_down
step_end
-PetalburgCity_Gym_Movement_2050BB: @ 82050BB
+PetalburgCity_Gym_Movement_WallysUncleEnterGym: @ 82050BB
walk_up
delay_8
walk_in_place_fastest_right
@@ -644,7 +646,7 @@ PetalburgCity_Gym_Movement_2050BB: @ 82050BB
walk_in_place_fastest_up
step_end
-PetalburgCity_Gym_Movement_2050C3: @ 82050C3
+PetalburgCity_Gym_Movement_WallysUncleApproachPlayerNorth: @ 82050C3
walk_right
walk_right
walk_up
@@ -653,7 +655,7 @@ PetalburgCity_Gym_Movement_2050C3: @ 82050C3
walk_in_place_fastest_right
step_end
-PetalburgCity_Gym_Movement_2050CA: @ 82050CA
+PetalburgCity_Gym_Movement_WallysUncleApproachPlayerEast: @ 82050CA
walk_right
walk_right
walk_up
@@ -661,7 +663,7 @@ PetalburgCity_Gym_Movement_2050CA: @ 82050CA
walk_up
step_end
-PetalburgCity_Gym_Movement_2050D0: @ 82050D0
+PetalburgCity_Gym_Movement_WallysUncleApproachPlayerWest: @ 82050D0
walk_right
walk_right
walk_up
@@ -671,6 +673,7 @@ PetalburgCity_Gym_Movement_2050D0: @ 82050D0
walk_up
step_end
+@ Unused
PetalburgCity_Gym_Movement_2050D8: @ 82050D8
walk_in_place_fastest_up
delay_16
@@ -682,7 +685,7 @@ PetalburgCity_Gym_Movement_2050D8: @ 82050D8
walk_in_place_fastest_down
step_end
-PetalburgCity_Gym_Movement_2050E1: @ 82050E1
+PetalburgCity_Gym_Movement_WallyArriveNorth: @ 82050E1
delay_16
walk_up
delay_16
@@ -694,7 +697,7 @@ PetalburgCity_Gym_Movement_2050E1: @ 82050E1
walk_in_place_fastest_left
step_end
-PetalburgCity_Gym_Movement_2050EB: @ 82050EB
+PetalburgCity_Gym_Movement_WallyArrive: @ 82050EB
delay_16
walk_up
delay_16
@@ -703,7 +706,7 @@ PetalburgCity_Gym_Movement_2050EB: @ 82050EB
walk_up
step_end
-PetalburgCity_Gym_Movement_2050F2: @ 82050F2
+PetalburgCity_Gym_Movement_WallyExitNorth: @ 82050F2
walk_down
walk_down
walk_down
@@ -713,7 +716,7 @@ PetalburgCity_Gym_Movement_2050F2: @ 82050F2
walk_in_place_down
step_end
-PetalburgCity_Gym_Movement_2050FA: @ 82050FA
+PetalburgCity_Gym_Movement_WallyExitEast: @ 82050FA
walk_down
walk_down
walk_right
@@ -723,7 +726,7 @@ PetalburgCity_Gym_Movement_2050FA: @ 82050FA
walk_in_place_down
step_end
-PetalburgCity_Gym_Movement_205102: @ 8205102
+PetalburgCity_Gym_Movement_WallyExitSouthWest: @ 8205102
walk_down
walk_down
walk_down
@@ -732,7 +735,7 @@ PetalburgCity_Gym_Movement_205102: @ 8205102
walk_in_place_down
step_end
-PetalburgCity_Gym_Movement_205109: @ 8205109
+PetalburgCity_Gym_Movement_PlayerExitWithWallyNorth: @ 8205109
delay_16
delay_16
delay_16
@@ -742,7 +745,7 @@ PetalburgCity_Gym_Movement_205109: @ 8205109
delay_8
step_end
-PetalburgCity_Gym_Movement_205111: @ 8205111
+PetalburgCity_Gym_Movement_PlayerExitWithWallySouth: @ 8205111
delay_16
delay_16
walk_right
@@ -754,7 +757,7 @@ PetalburgCity_Gym_Movement_205111: @ 8205111
delay_8
step_end
-PetalburgCity_Gym_Movement_20511B: @ 820511B
+PetalburgCity_Gym_Movement_PlayerExitWithWallyWest: @ 820511B
delay_16
delay_16
walk_down
@@ -764,7 +767,7 @@ PetalburgCity_Gym_Movement_20511B: @ 820511B
delay_8
step_end
-PetalburgCity_Gym_Movement_205123: @ 8205123
+PetalburgCity_Gym_Movement_PlayerExitWithWallyEast: @ 8205123
walk_in_place_fastest_down
delay_16
delay_16
@@ -776,468 +779,471 @@ PetalburgCity_Gym_Movement_205123: @ 8205123
delay_8
step_end
-PetalburgCity_Gym_EventScript_20512D:: @ 820512D
- msgbox PetalburgCity_Gym_Text_2064C3, MSGBOX_DEFAULT
+PetalburgCity_Gym_EventScript_NoAmountOfTrainingIsEnough:: @ 820512D
+ msgbox PetalburgCity_Gym_Text_DadNoAmountOfTrainingIsEnough, MSGBOX_DEFAULT
release
end
-PetalburgCity_Gym_EventScript_205137:: @ 8205137
+PetalburgCity_Gym_EventScript_SpeedRoomDoor:: @ 8205137
lockall
compare VAR_PETALBURG_GYM_STATE, 6
- goto_if_lt PetalburgCity_Gym_EventScript_20517D
+ goto_if_lt PetalburgCity_Gym_EventScript_DoorLocked
setvar VAR_0x8008, 7
setvar VAR_0x8009, 85
- msgbox PetalburgCity_Gym_Text_20721E, MSGBOX_YESNO
+ msgbox PetalburgCity_Gym_Text_EnterSpeedRoom, MSGBOX_YESNO
compare VAR_RESULT, 1
- goto_if_eq PetalburgCity_Gym_EventScript_20516C
+ goto_if_eq PetalburgCity_Gym_EventScript_EnterRoom
compare VAR_RESULT, 0
- goto_if_eq PetalburgCity_Gym_EventScript_20517B
+ goto_if_eq PetalburgCity_Gym_EventScript_DontEnterRoom
end
-PetalburgCity_Gym_EventScript_20516C:: @ 820516C
+PetalburgCity_Gym_EventScript_EnterRoom:: @ 820516C
closemessage
delay 30
- warpdoor MAP_PETALBURG_CITY_GYM, 255, 32776, 32777
+ warpdoor MAP_PETALBURG_CITY_GYM, 255, VAR_0x8008, VAR_0x8009
waitstate
releaseall
end
-PetalburgCity_Gym_EventScript_20517B:: @ 820517B
+PetalburgCity_Gym_EventScript_DontEnterRoom:: @ 820517B
releaseall
end
-PetalburgCity_Gym_EventScript_20517D:: @ 820517D
- msgbox PetalburgCity_Gym_Text_2071F4, MSGBOX_DEFAULT
+PetalburgCity_Gym_EventScript_DoorLocked:: @ 820517D
+ msgbox PetalburgCity_Gym_Text_DoorAppearsLocked, MSGBOX_DEFAULT
releaseall
end
-PetalburgCity_Gym_EventScript_205187:: @ 8205187
+@ VAR_0x8008 and VAR_0x8009 below are the x and y coordinates of the warp
+PetalburgCity_Gym_EventScript_AccuracyRoomDoor:: @ 8205187
lockall
compare VAR_PETALBURG_GYM_STATE, 6
- goto_if_lt PetalburgCity_Gym_EventScript_20517D
+ goto_if_lt PetalburgCity_Gym_EventScript_DoorLocked
setvar VAR_0x8008, 1
setvar VAR_0x8009, 98
- msgbox PetalburgCity_Gym_Text_207280, MSGBOX_YESNO
+ msgbox PetalburgCity_Gym_Text_EnterAccuracyRoom, MSGBOX_YESNO
compare VAR_RESULT, 1
- goto_if_eq PetalburgCity_Gym_EventScript_20516C
+ goto_if_eq PetalburgCity_Gym_EventScript_EnterRoom
compare VAR_RESULT, 0
- goto_if_eq PetalburgCity_Gym_EventScript_20517B
+ goto_if_eq PetalburgCity_Gym_EventScript_DontEnterRoom
end
-PetalburgCity_Gym_EventScript_2051BC:: @ 82051BC
+PetalburgCity_Gym_EventScript_ConfusionRoomDoor:: @ 82051BC
lockall
checktrainerflag TRAINER_RANDALL
- goto_if_lt PetalburgCity_Gym_EventScript_20517D
+ goto_if_lt PetalburgCity_Gym_EventScript_DoorLocked
setvar VAR_0x8008, 7
setvar VAR_0x8009, 46
- msgbox PetalburgCity_Gym_Text_2072BB, MSGBOX_YESNO
+ msgbox PetalburgCity_Gym_Text_EnterConfusionRoom, MSGBOX_YESNO
compare VAR_RESULT, 1
- goto_if_eq PetalburgCity_Gym_EventScript_20516C
+ goto_if_eq PetalburgCity_Gym_EventScript_EnterRoom
compare VAR_RESULT, 0
- goto_if_eq PetalburgCity_Gym_EventScript_20517B
+ goto_if_eq PetalburgCity_Gym_EventScript_DontEnterRoom
end
-PetalburgCity_Gym_EventScript_2051EF:: @ 82051EF
+PetalburgCity_Gym_EventScript_LeftDefenseRoomDoor:: @ 82051EF
lockall
checktrainerflag TRAINER_RANDALL
- goto_if_lt PetalburgCity_Gym_EventScript_20517D
+ goto_if_lt PetalburgCity_Gym_EventScript_DoorLocked
setvar VAR_0x8008, 1
setvar VAR_0x8009, 59
- msgbox PetalburgCity_Gym_Text_2072F7, MSGBOX_YESNO
+ msgbox PetalburgCity_Gym_Text_EnterDefenseRoom, MSGBOX_YESNO
compare VAR_RESULT, 1
- goto_if_eq PetalburgCity_Gym_EventScript_20516C
+ goto_if_eq PetalburgCity_Gym_EventScript_EnterRoom
compare VAR_RESULT, 0
- goto_if_eq PetalburgCity_Gym_EventScript_20517B
+ goto_if_eq PetalburgCity_Gym_EventScript_DontEnterRoom
end
-PetalburgCity_Gym_EventScript_205222:: @ 8205222
+PetalburgCity_Gym_EventScript_RightDefenseRoomDoor:: @ 8205222
lockall
checktrainerflag TRAINER_MARY
- goto_if_lt PetalburgCity_Gym_EventScript_20517D
+ goto_if_lt PetalburgCity_Gym_EventScript_DoorLocked
setvar VAR_0x8008, 7
setvar VAR_0x8009, 59
- msgbox PetalburgCity_Gym_Text_2072F7, MSGBOX_YESNO
+ msgbox PetalburgCity_Gym_Text_EnterDefenseRoom, MSGBOX_YESNO
compare VAR_RESULT, 1
- goto_if_eq PetalburgCity_Gym_EventScript_20516C
+ goto_if_eq PetalburgCity_Gym_EventScript_EnterRoom
compare VAR_RESULT, 0
- goto_if_eq PetalburgCity_Gym_EventScript_20517B
+ goto_if_eq PetalburgCity_Gym_EventScript_DontEnterRoom
end
-PetalburgCity_Gym_EventScript_205255:: @ 8205255
+PetalburgCity_Gym_EventScript_RecoveryRoomDoor:: @ 8205255
lockall
checktrainerflag TRAINER_MARY
- goto_if_lt PetalburgCity_Gym_EventScript_20517D
+ goto_if_lt PetalburgCity_Gym_EventScript_DoorLocked
setvar VAR_0x8008, 1
setvar VAR_0x8009, 72
- msgbox PetalburgCity_Gym_Text_207331, MSGBOX_YESNO
+ msgbox PetalburgCity_Gym_Text_EnterRecoveryRoom, MSGBOX_YESNO
compare VAR_RESULT, 1
- goto_if_eq PetalburgCity_Gym_EventScript_20516C
+ goto_if_eq PetalburgCity_Gym_EventScript_EnterRoom
compare VAR_RESULT, 0
- goto_if_eq PetalburgCity_Gym_EventScript_20517B
+ goto_if_eq PetalburgCity_Gym_EventScript_DontEnterRoom
end
-PetalburgCity_Gym_EventScript_205288:: @ 8205288
+PetalburgCity_Gym_EventScript_LeftStrengthRoomDoor:: @ 8205288
lockall
checktrainerflag TRAINER_PARKER
- goto_if_lt PetalburgCity_Gym_EventScript_20517D
+ goto_if_lt PetalburgCity_Gym_EventScript_DoorLocked
setvar VAR_0x8008, 1
setvar VAR_0x8009, 20
- msgbox PetalburgCity_Gym_Text_20736C, MSGBOX_YESNO
+ msgbox PetalburgCity_Gym_Text_EnterStrengthRoom, MSGBOX_YESNO
compare VAR_RESULT, 1
- goto_if_eq PetalburgCity_Gym_EventScript_20516C
+ goto_if_eq PetalburgCity_Gym_EventScript_EnterRoom
compare VAR_RESULT, 0
- goto_if_eq PetalburgCity_Gym_EventScript_20517B
+ goto_if_eq PetalburgCity_Gym_EventScript_DontEnterRoom
end
-PetalburgCity_Gym_EventScript_2052BB:: @ 82052BB
+PetalburgCity_Gym_EventScript_RightStrengthRoomDoor:: @ 82052BB
lockall
checktrainerflag TRAINER_ALEXIA
- goto_if_lt PetalburgCity_Gym_EventScript_20517D
+ goto_if_lt PetalburgCity_Gym_EventScript_DoorLocked
setvar VAR_0x8008, 7
setvar VAR_0x8009, 20
- msgbox PetalburgCity_Gym_Text_20736C, MSGBOX_YESNO
+ msgbox PetalburgCity_Gym_Text_EnterStrengthRoom, MSGBOX_YESNO
compare VAR_RESULT, 1
- goto_if_eq PetalburgCity_Gym_EventScript_20516C
+ goto_if_eq PetalburgCity_Gym_EventScript_EnterRoom
compare VAR_RESULT, 0
- goto_if_eq PetalburgCity_Gym_EventScript_20517B
+ goto_if_eq PetalburgCity_Gym_EventScript_DontEnterRoom
end
-PetalburgCity_Gym_EventScript_2052EE:: @ 82052EE
+PetalburgCity_Gym_EventScript_LeftOHKORoomDoor:: @ 82052EE
lockall
checktrainerflag TRAINER_ALEXIA
- goto_if_lt PetalburgCity_Gym_EventScript_20517D
+ goto_if_lt PetalburgCity_Gym_EventScript_DoorLocked
setvar VAR_0x8008, 1
setvar VAR_0x8009, 33
- msgbox PetalburgCity_Gym_Text_2073A7, MSGBOX_YESNO
+ msgbox PetalburgCity_Gym_Text_EnterOHKORoom, MSGBOX_YESNO
compare VAR_RESULT, 1
- goto_if_eq PetalburgCity_Gym_EventScript_20516C
+ goto_if_eq PetalburgCity_Gym_EventScript_EnterRoom
compare VAR_RESULT, 0
- goto_if_eq PetalburgCity_Gym_EventScript_20517B
+ goto_if_eq PetalburgCity_Gym_EventScript_DontEnterRoom
end
-PetalburgCity_Gym_EventScript_205321:: @ 8205321
+PetalburgCity_Gym_EventScript_RightOHKORoomDoor:: @ 8205321
lockall
checktrainerflag TRAINER_GEORGE
- goto_if_lt PetalburgCity_Gym_EventScript_20517D
+ goto_if_lt PetalburgCity_Gym_EventScript_DoorLocked
setvar VAR_0x8008, 7
setvar VAR_0x8009, 33
- msgbox PetalburgCity_Gym_Text_2073A7, MSGBOX_YESNO
+ msgbox PetalburgCity_Gym_Text_EnterOHKORoom, MSGBOX_YESNO
compare VAR_RESULT, 1
- goto_if_eq PetalburgCity_Gym_EventScript_20516C
+ goto_if_eq PetalburgCity_Gym_EventScript_EnterRoom
compare VAR_RESULT, 0
- goto_if_eq PetalburgCity_Gym_EventScript_20517B
+ goto_if_eq PetalburgCity_Gym_EventScript_DontEnterRoom
end
-PetalburgCity_Gym_EventScript_205354:: @ 8205354
+PetalburgCity_Gym_EventScript_LeftGymLeadersRoomDoor:: @ 8205354
lockall
checktrainerflag TRAINER_JODY
- goto_if_lt PetalburgCity_Gym_EventScript_20517D
+ goto_if_lt PetalburgCity_Gym_EventScript_DoorLocked
setvar VAR_0x8008, 1
setvar VAR_0x8009, 7
- msgbox PetalburgCity_Gym_Text_2073E4, MSGBOX_YESNO
+ msgbox PetalburgCity_Gym_Text_EnterGymLeadersRoom, MSGBOX_YESNO
compare VAR_RESULT, 1
- goto_if_eq PetalburgCity_Gym_EventScript_20516C
+ goto_if_eq PetalburgCity_Gym_EventScript_EnterRoom
compare VAR_RESULT, 0
- goto_if_eq PetalburgCity_Gym_EventScript_20517B
+ goto_if_eq PetalburgCity_Gym_EventScript_DontEnterRoom
end
-PetalburgCity_Gym_EventScript_205387:: @ 8205387
+PetalburgCity_Gym_EventScript_RightGymLeadersRoomDoor:: @ 8205387
lockall
checktrainerflag TRAINER_BERKE
- goto_if_lt PetalburgCity_Gym_EventScript_20517D
+ goto_if_lt PetalburgCity_Gym_EventScript_DoorLocked
setvar VAR_0x8008, 7
setvar VAR_0x8009, 7
- msgbox PetalburgCity_Gym_Text_2073E4, MSGBOX_YESNO
+ msgbox PetalburgCity_Gym_Text_EnterGymLeadersRoom, MSGBOX_YESNO
compare VAR_RESULT, 1
- goto_if_eq PetalburgCity_Gym_EventScript_20516C
+ goto_if_eq PetalburgCity_Gym_EventScript_EnterRoom
compare VAR_RESULT, 0
- goto_if_eq PetalburgCity_Gym_EventScript_20517B
+ goto_if_eq PetalburgCity_Gym_EventScript_DontEnterRoom
end
-PetalburgCity_Gym_EventScript_2053BA:: @ 82053BA
- trainerbattle_single TRAINER_RANDALL, PetalburgCity_Gym_Text_20674F, PetalburgCity_Gym_Text_2067B9, PetalburgCity_Gym_EventScript_2053DE
- goto_if_set FLAG_DEFEATED_PETALBURG_GYM, PetalburgCity_Gym_EventScript_2053ED
- msgbox PetalburgCity_Gym_Text_2067D8, MSGBOX_AUTOCLOSE
+PetalburgCity_Gym_EventScript_Randall:: @ 82053BA
+ trainerbattle_single TRAINER_RANDALL, PetalburgCity_Gym_Text_RandallPreBattle, PetalburgCity_Gym_Text_RandallDefeat, PetalburgCity_Gym_EventScript_SlideOpenSpeedRoomDoors
+ goto_if_set FLAG_DEFEATED_PETALBURG_GYM, PetalburgCity_Gym_EventScript_RandallPostBadge
+ msgbox PetalburgCity_Gym_Text_RandallPostBattle, MSGBOX_AUTOCLOSE
end
-PetalburgCity_Gym_EventScript_2053DE:: @ 82053DE
+PetalburgCity_Gym_EventScript_SlideOpenSpeedRoomDoors:: @ 82053DE
setvar VAR_0x8005, 0
- call PetalburgCity_Gym_EventScript_20557F
+ call PetalburgCity_Gym_EventScript_OpenSpeedRoomDoors
special DrawWholeMapView
release
end
-PetalburgCity_Gym_EventScript_2053ED:: @ 82053ED
- msgbox PetalburgCity_Gym_Text_20685E, MSGBOX_NPC
+PetalburgCity_Gym_EventScript_RandallPostBadge:: @ 82053ED
+ msgbox PetalburgCity_Gym_Text_RandallPostBadge, MSGBOX_NPC
end
-PetalburgCity_Gym_EventScript_2053F6:: @ 82053F6
- trainerbattle_single TRAINER_PARKER, PetalburgCity_Gym_Text_2068FD, PetalburgCity_Gym_Text_20694F, PetalburgCity_Gym_EventScript_20541A
- goto_if_set FLAG_DEFEATED_PETALBURG_GYM, PetalburgCity_Gym_EventScript_205429
- msgbox PetalburgCity_Gym_Text_206996, MSGBOX_AUTOCLOSE
+PetalburgCity_Gym_EventScript_Parker:: @ 82053F6
+ trainerbattle_single TRAINER_PARKER, PetalburgCity_Gym_Text_ParkerPreBattle, PetalburgCity_Gym_Text_ParkerDefeat, PetalburgCity_Gym_EventScript_SlideOpenConfusionRoomDoors
+ goto_if_set FLAG_DEFEATED_PETALBURG_GYM, PetalburgCity_Gym_EventScript_ParkerPostBadge
+ msgbox PetalburgCity_Gym_Text_ParkerPostBattle, MSGBOX_AUTOCLOSE
end
-PetalburgCity_Gym_EventScript_20541A:: @ 820541A
+PetalburgCity_Gym_EventScript_SlideOpenConfusionRoomDoors:: @ 820541A
setvar VAR_0x8005, 0
- call PetalburgCity_Gym_EventScript_2055C1
+ call PetalburgCity_Gym_EventScript_OpenConfusionRoomDoors
special DrawWholeMapView
release
end
-PetalburgCity_Gym_EventScript_205429:: @ 8205429
- msgbox PetalburgCity_Gym_Text_2069D9, MSGBOX_NPC
+PetalburgCity_Gym_EventScript_ParkerPostBadge:: @ 8205429
+ msgbox PetalburgCity_Gym_Text_ParkerPostBadge, MSGBOX_NPC
end
-PetalburgCity_Gym_EventScript_205432:: @ 8205432
- trainerbattle_single TRAINER_GEORGE, PetalburgCity_Gym_Text_206A1B, PetalburgCity_Gym_Text_206AB8, PetalburgCity_Gym_EventScript_205456
- goto_if_set FLAG_DEFEATED_PETALBURG_GYM, PetalburgCity_Gym_EventScript_205465
- msgbox PetalburgCity_Gym_Text_206AE9, MSGBOX_AUTOCLOSE
+PetalburgCity_Gym_EventScript_George:: @ 8205432
+ trainerbattle_single TRAINER_GEORGE, PetalburgCity_Gym_Text_GeorgePreBattle, PetalburgCity_Gym_Text_GeorgeDefeat, PetalburgCity_Gym_EventScript_SlideOpenRecoveryRoomDoors
+ goto_if_set FLAG_DEFEATED_PETALBURG_GYM, PetalburgCity_Gym_EventScript_GeorgePostBadge
+ msgbox PetalburgCity_Gym_Text_GeorgePostBattle, MSGBOX_AUTOCLOSE
end
-PetalburgCity_Gym_EventScript_205456:: @ 8205456
+PetalburgCity_Gym_EventScript_SlideOpenRecoveryRoomDoors:: @ 8205456
setvar VAR_0x8005, 0
- call PetalburgCity_Gym_EventScript_205603
+ call PetalburgCity_Gym_EventScript_OpenRecoveryRoomDoors
special DrawWholeMapView
release
end
-PetalburgCity_Gym_EventScript_205465:: @ 8205465
- msgbox PetalburgCity_Gym_Text_206BB1, MSGBOX_NPC
+PetalburgCity_Gym_EventScript_GeorgePostBadge:: @ 8205465
+ msgbox PetalburgCity_Gym_Text_GeorgePostBadge, MSGBOX_NPC
end
-PetalburgCity_Gym_EventScript_20546E:: @ 820546E
- trainerbattle_single TRAINER_BERKE, PetalburgCity_Gym_Text_206BF4, PetalburgCity_Gym_Text_206C7D, PetalburgCity_Gym_EventScript_205492
- goto_if_set FLAG_DEFEATED_PETALBURG_GYM, PetalburgCity_Gym_EventScript_2054A1
- msgbox PetalburgCity_Gym_Text_206C9F, MSGBOX_AUTOCLOSE
+PetalburgCity_Gym_EventScript_Berke:: @ 820546E
+ trainerbattle_single TRAINER_BERKE, PetalburgCity_Gym_Text_BerkePreBattle, PetalburgCity_Gym_Text_BerkeDefeat, PetalburgCity_Gym_EventScript_SlideOpenOHKORoomDoors
+ goto_if_set FLAG_DEFEATED_PETALBURG_GYM, PetalburgCity_Gym_EventScript_BerkePostBadge
+ msgbox PetalburgCity_Gym_Text_BerkePostBattle, MSGBOX_AUTOCLOSE
end
-PetalburgCity_Gym_EventScript_205492:: @ 8205492
+PetalburgCity_Gym_EventScript_SlideOpenOHKORoomDoors:: @ 8205492
setvar VAR_0x8005, 0
- call PetalburgCity_Gym_EventScript_205645
+ call PetalburgCity_Gym_EventScript_OpenOHKORoomDoors
special DrawWholeMapView
release
end
-PetalburgCity_Gym_EventScript_2054A1:: @ 82054A1
- msgbox PetalburgCity_Gym_Text_206D56, MSGBOX_NPC
+PetalburgCity_Gym_EventScript_BerkePostBadge:: @ 82054A1
+ msgbox PetalburgCity_Gym_Text_BerkePostBadge, MSGBOX_NPC
end
-PetalburgCity_Gym_EventScript_2054AA:: @ 82054AA
- trainerbattle_single TRAINER_MARY, PetalburgCity_Gym_Text_206DB2, PetalburgCity_Gym_Text_206E0D, PetalburgCity_Gym_EventScript_2054CE
- goto_if_set FLAG_DEFEATED_PETALBURG_GYM, PetalburgCity_Gym_EventScript_2054DD
- msgbox PetalburgCity_Gym_Text_206E26, MSGBOX_AUTOCLOSE
+PetalburgCity_Gym_EventScript_Mary:: @ 82054AA
+ trainerbattle_single TRAINER_MARY, PetalburgCity_Gym_Text_MaryPreBattle, PetalburgCity_Gym_Text_MaryDefeat, PetalburgCity_Gym_EventScript_SlideOpenAccuracyRoomDoors
+ goto_if_set FLAG_DEFEATED_PETALBURG_GYM, PetalburgCity_Gym_EventScript_MaryPostBadge
+ msgbox PetalburgCity_Gym_Text_MaryPostBattle, MSGBOX_AUTOCLOSE
end
-PetalburgCity_Gym_EventScript_2054CE:: @ 82054CE
+PetalburgCity_Gym_EventScript_SlideOpenAccuracyRoomDoors:: @ 82054CE
setvar VAR_0x8005, 0
- call PetalburgCity_Gym_EventScript_2055A0
+ call PetalburgCity_Gym_EventScript_OpenAccuracyRoomDoors
special DrawWholeMapView
release
end
-PetalburgCity_Gym_EventScript_2054DD:: @ 82054DD
- msgbox PetalburgCity_Gym_Text_206ED8, MSGBOX_NPC
+PetalburgCity_Gym_EventScript_MaryPostBadge:: @ 82054DD
+ msgbox PetalburgCity_Gym_Text_MaryPostBadge, MSGBOX_NPC
end
-PetalburgCity_Gym_EventScript_2054E6:: @ 82054E6
- trainerbattle_single TRAINER_ALEXIA, PetalburgCity_Gym_Text_206F44, PetalburgCity_Gym_Text_206F82, PetalburgCity_Gym_EventScript_20550A
- goto_if_set FLAG_DEFEATED_PETALBURG_GYM, PetalburgCity_Gym_EventScript_205519
- msgbox PetalburgCity_Gym_Text_206F9F, MSGBOX_AUTOCLOSE
+PetalburgCity_Gym_EventScript_Alexia:: @ 82054E6
+ trainerbattle_single TRAINER_ALEXIA, PetalburgCity_Gym_Text_AlexiaPreBattle, PetalburgCity_Gym_Text_AlexiaDefeat, PetalburgCity_Gym_EventScript_SlideOpenDefenseRoomDoors
+ goto_if_set FLAG_DEFEATED_PETALBURG_GYM, PetalburgCity_Gym_EventScript_AlexiaPostBadge
+ msgbox PetalburgCity_Gym_Text_AlexiaPostBattle, MSGBOX_AUTOCLOSE
end
-PetalburgCity_Gym_EventScript_20550A:: @ 820550A
+PetalburgCity_Gym_EventScript_SlideOpenDefenseRoomDoors:: @ 820550A
setvar VAR_0x8005, 0
- call PetalburgCity_Gym_EventScript_2055E2
+ call PetalburgCity_Gym_EventScript_OpenDefenseRoomDoors
special DrawWholeMapView
release
end
-PetalburgCity_Gym_EventScript_205519:: @ 8205519
- msgbox PetalburgCity_Gym_Text_207069, MSGBOX_NPC
+PetalburgCity_Gym_EventScript_AlexiaPostBadge:: @ 8205519
+ msgbox PetalburgCity_Gym_Text_AlexiaPostBadge, MSGBOX_NPC
end
-PetalburgCity_Gym_EventScript_205522:: @ 8205522
- trainerbattle_single TRAINER_JODY, PetalburgCity_Gym_Text_207088, PetalburgCity_Gym_Text_2070E6, PetalburgCity_Gym_EventScript_205546
- goto_if_set FLAG_DEFEATED_PETALBURG_GYM, PetalburgCity_Gym_EventScript_205555
- msgbox PetalburgCity_Gym_Text_2070FB, MSGBOX_AUTOCLOSE
+PetalburgCity_Gym_EventScript_Jody:: @ 8205522
+ trainerbattle_single TRAINER_JODY, PetalburgCity_Gym_Text_JodyPreBattle, PetalburgCity_Gym_Text_JodyDefeat, PetalburgCity_Gym_EventScript_SlideOpenStrengthRoomDoors
+ goto_if_set FLAG_DEFEATED_PETALBURG_GYM, PetalburgCity_Gym_EventScript_JodyPostBadge
+ msgbox PetalburgCity_Gym_Text_JodyPostBattle, MSGBOX_AUTOCLOSE
end
-PetalburgCity_Gym_EventScript_205546:: @ 8205546
+PetalburgCity_Gym_EventScript_SlideOpenStrengthRoomDoors:: @ 8205546
setvar VAR_0x8005, 0
- call PetalburgCity_Gym_EventScript_205624
+ call PetalburgCity_Gym_EventScript_OpenStrengthRoomDoors
special DrawWholeMapView
release
end
-PetalburgCity_Gym_EventScript_205555:: @ 8205555
- msgbox PetalburgCity_Gym_Text_207170, MSGBOX_NPC
+PetalburgCity_Gym_EventScript_JodyPostBadge:: @ 8205555
+ msgbox PetalburgCity_Gym_Text_JodyPostBadge, MSGBOX_NPC
end
-PetalburgCity_Gym_EventScript_20555E:: @ 820555E
+@ VAR_0x8004 below is the room number
+@ VAR_0x8005 below is 0 when the door should be slid open and 1 when it should be unlocked immediately
+PetalburgCity_Gym_EventScript_OpenGymEntranceDoors:: @ 820555E
setvar VAR_0x8004, 1
compare VAR_0x8005, 0
- call_if_eq PetalburgCity_Gym_EventScript_205746
+ call_if_eq PetalburgCity_Gym_EventScript_SlideOpenRoomDoors
compare VAR_0x8005, 1
- call_if_eq PetalburgCity_Gym_EventScript_20574B
- call PetalburgCity_Gym_EventScript_205666
+ call_if_eq PetalburgCity_Gym_EventScript_UnlockRoomDoors
+ call PetalburgCity_Gym_EventScript_SetEntranceRoomDoorMetatiles
return
-PetalburgCity_Gym_EventScript_20557F:: @ 820557F
+PetalburgCity_Gym_EventScript_OpenSpeedRoomDoors:: @ 820557F
setvar VAR_0x8004, 2
compare VAR_0x8005, 0
- call_if_eq PetalburgCity_Gym_EventScript_205746
+ call_if_eq PetalburgCity_Gym_EventScript_SlideOpenRoomDoors
compare VAR_0x8005, 1
- call_if_eq PetalburgCity_Gym_EventScript_20574B
- call PetalburgCity_Gym_EventScript_20568B
+ call_if_eq PetalburgCity_Gym_EventScript_UnlockRoomDoors
+ call PetalburgCity_Gym_EventScript_SetSpeedRoomDoorMetatiles
return
-PetalburgCity_Gym_EventScript_2055A0:: @ 82055A0
+PetalburgCity_Gym_EventScript_OpenAccuracyRoomDoors:: @ 82055A0
setvar VAR_0x8004, 3
compare VAR_0x8005, 0
- call_if_eq PetalburgCity_Gym_EventScript_205746
+ call_if_eq PetalburgCity_Gym_EventScript_SlideOpenRoomDoors
compare VAR_0x8005, 1
- call_if_eq PetalburgCity_Gym_EventScript_20574B
- call PetalburgCity_Gym_EventScript_2056B0
+ call_if_eq PetalburgCity_Gym_EventScript_UnlockRoomDoors
+ call PetalburgCity_Gym_EventScript_SetAccuracyRoomDoorMetatiles
return
-PetalburgCity_Gym_EventScript_2055C1:: @ 82055C1
+PetalburgCity_Gym_EventScript_OpenConfusionRoomDoors:: @ 82055C1
setvar VAR_0x8004, 4
compare VAR_0x8005, 0
- call_if_eq PetalburgCity_Gym_EventScript_205746
+ call_if_eq PetalburgCity_Gym_EventScript_SlideOpenRoomDoors
compare VAR_0x8005, 1
- call_if_eq PetalburgCity_Gym_EventScript_20574B
- call PetalburgCity_Gym_EventScript_2056D5
+ call_if_eq PetalburgCity_Gym_EventScript_UnlockRoomDoors
+ call PetalburgCity_Gym_EventScript_SetConfusionRoomDoorMetatiles
return
-PetalburgCity_Gym_EventScript_2055E2:: @ 82055E2
+PetalburgCity_Gym_EventScript_OpenDefenseRoomDoors:: @ 82055E2
setvar VAR_0x8004, 5
compare VAR_0x8005, 0
- call_if_eq PetalburgCity_Gym_EventScript_205746
+ call_if_eq PetalburgCity_Gym_EventScript_SlideOpenRoomDoors
compare VAR_0x8005, 1
- call_if_eq PetalburgCity_Gym_EventScript_20574B
- call PetalburgCity_Gym_EventScript_2056E8
+ call_if_eq PetalburgCity_Gym_EventScript_UnlockRoomDoors
+ call PetalburgCity_Gym_EventScript_SetDefenseRoomDoorMetatiles
return
-PetalburgCity_Gym_EventScript_205603:: @ 8205603
+PetalburgCity_Gym_EventScript_OpenRecoveryRoomDoors:: @ 8205603
setvar VAR_0x8004, 6
compare VAR_0x8005, 0
- call_if_eq PetalburgCity_Gym_EventScript_205746
+ call_if_eq PetalburgCity_Gym_EventScript_SlideOpenRoomDoors
compare VAR_0x8005, 1
- call_if_eq PetalburgCity_Gym_EventScript_20574B
- call PetalburgCity_Gym_EventScript_20570D
+ call_if_eq PetalburgCity_Gym_EventScript_UnlockRoomDoors
+ call PetalburgCity_Gym_EventScript_SetRecoveryRoomDoorMetatiles
return
-PetalburgCity_Gym_EventScript_205624:: @ 8205624
+PetalburgCity_Gym_EventScript_OpenStrengthRoomDoors:: @ 8205624
setvar VAR_0x8004, 7
compare VAR_0x8005, 0
- call_if_eq PetalburgCity_Gym_EventScript_205746
+ call_if_eq PetalburgCity_Gym_EventScript_SlideOpenRoomDoors
compare VAR_0x8005, 1
- call_if_eq PetalburgCity_Gym_EventScript_20574B
- call PetalburgCity_Gym_EventScript_205720
+ call_if_eq PetalburgCity_Gym_EventScript_UnlockRoomDoors
+ call PetalburgCity_Gym_EventScript_SetStrengthRoomDoorMetatiles
return
-PetalburgCity_Gym_EventScript_205645:: @ 8205645
+PetalburgCity_Gym_EventScript_OpenOHKORoomDoors:: @ 8205645
setvar VAR_0x8004, 8
compare VAR_0x8005, 0
- call_if_eq PetalburgCity_Gym_EventScript_205746
+ call_if_eq PetalburgCity_Gym_EventScript_SlideOpenRoomDoors
compare VAR_0x8005, 1
- call_if_eq PetalburgCity_Gym_EventScript_20574B
- call PetalburgCity_Gym_EventScript_205733
+ call_if_eq PetalburgCity_Gym_EventScript_UnlockRoomDoors
+ call PetalburgCity_Gym_EventScript_SetOHKORoomDoorMetatiles
return
-PetalburgCity_Gym_EventScript_205666:: @ 8205666
+PetalburgCity_Gym_EventScript_SetEntranceRoomDoorMetatiles:: @ 8205666
setmetatile 6, 85, METATILE_PetalburgGym_RoomEntrance_Left, 0
setmetatile 7, 85, METATILE_PetalburgGym_RoomEntrance_Right, 0
setmetatile 1, 98, METATILE_PetalburgGym_RoomEntrance_Left, 0
setmetatile 2, 98, METATILE_PetalburgGym_RoomEntrance_Right, 0
return
-PetalburgCity_Gym_EventScript_20568B:: @ 820568B
+PetalburgCity_Gym_EventScript_SetSpeedRoomDoorMetatiles:: @ 820568B
setmetatile 6, 46, METATILE_PetalburgGym_RoomEntrance_Left, 0
setmetatile 7, 46, METATILE_PetalburgGym_RoomEntrance_Right, 0
setmetatile 1, 59, METATILE_PetalburgGym_RoomEntrance_Left, 0
setmetatile 2, 59, METATILE_PetalburgGym_RoomEntrance_Right, 0
return
-PetalburgCity_Gym_EventScript_2056B0:: @ 82056B0
+PetalburgCity_Gym_EventScript_SetAccuracyRoomDoorMetatiles:: @ 82056B0
setmetatile 6, 59, METATILE_PetalburgGym_RoomEntrance_Left, 0
setmetatile 7, 59, METATILE_PetalburgGym_RoomEntrance_Right, 0
setmetatile 1, 72, METATILE_PetalburgGym_RoomEntrance_Left, 0
setmetatile 2, 72, METATILE_PetalburgGym_RoomEntrance_Right, 0
return
-PetalburgCity_Gym_EventScript_2056D5:: @ 82056D5
+PetalburgCity_Gym_EventScript_SetConfusionRoomDoorMetatiles:: @ 82056D5
setmetatile 1, 20, METATILE_PetalburgGym_RoomEntrance_Left, 0
setmetatile 2, 20, METATILE_PetalburgGym_RoomEntrance_Right, 0
return
-PetalburgCity_Gym_EventScript_2056E8:: @ 82056E8
+PetalburgCity_Gym_EventScript_SetDefenseRoomDoorMetatiles:: @ 82056E8
setmetatile 6, 20, METATILE_PetalburgGym_RoomEntrance_Left, 0
setmetatile 7, 20, METATILE_PetalburgGym_RoomEntrance_Right, 0
setmetatile 1, 33, METATILE_PetalburgGym_RoomEntrance_Left, 0
setmetatile 2, 33, METATILE_PetalburgGym_RoomEntrance_Right, 0
return
-PetalburgCity_Gym_EventScript_20570D:: @ 820570D
+PetalburgCity_Gym_EventScript_SetRecoveryRoomDoorMetatiles:: @ 820570D
setmetatile 6, 33, METATILE_PetalburgGym_RoomEntrance_Left, 0
setmetatile 7, 33, METATILE_PetalburgGym_RoomEntrance_Right, 0
return
-PetalburgCity_Gym_EventScript_205720:: @ 8205720
+PetalburgCity_Gym_EventScript_SetStrengthRoomDoorMetatiles:: @ 8205720
setmetatile 1, 7, METATILE_PetalburgGym_RoomEntrance_Left, 0
setmetatile 2, 7, METATILE_PetalburgGym_RoomEntrance_Right, 0
return
-PetalburgCity_Gym_EventScript_205733:: @ 8205733
+PetalburgCity_Gym_EventScript_SetOHKORoomDoorMetatiles:: @ 8205733
setmetatile 6, 7, METATILE_PetalburgGym_RoomEntrance_Left, 0
setmetatile 7, 7, METATILE_PetalburgGym_RoomEntrance_Right, 0
return
-PetalburgCity_Gym_EventScript_205746:: @ 8205746
- special PetalburgGymSpecial1
+PetalburgCity_Gym_EventScript_SlideOpenRoomDoors:: @ 8205746
+ special PetalburgGymSlideOpenRoomDoors
waitstate
return
-PetalburgCity_Gym_EventScript_20574B:: @ 820574B
- special PetalburgGymSpecial2
+PetalburgCity_Gym_EventScript_UnlockRoomDoors:: @ 820574B
+ special PetalburgGymUnlockRoomDoors
return
-PetalburgCity_Gym_EventScript_20574F:: @ 820574F
+PetalburgCity_Gym_EventScript_GymGuide:: @ 820574F
lock
faceplayer
- goto_if_set FLAG_DEFEATED_PETALBURG_GYM, PetalburgCity_Gym_EventScript_205764
- msgbox PetalburgCity_Gym_Text_206542, MSGBOX_DEFAULT
+ goto_if_set FLAG_DEFEATED_PETALBURG_GYM, PetalburgCity_Gym_EventScript_GymGuidePostVictory
+ msgbox PetalburgCity_Gym_Text_GymGuideAdvice, MSGBOX_DEFAULT
release
end
-PetalburgCity_Gym_EventScript_205764:: @ 8205764
- msgbox PetalburgCity_Gym_Text_2066F3, MSGBOX_DEFAULT
+PetalburgCity_Gym_EventScript_GymGuidePostVictory:: @ 8205764
+ msgbox PetalburgCity_Gym_Text_GymGuidePostVictory, MSGBOX_DEFAULT
release
end
-PetalburgCity_Gym_EventScript_20576E:: @ 820576E
+PetalburgCity_Gym_EventScript_LeftGymStatue:: @ 820576E
lockall
- goto_if_set FLAG_BADGE05_GET, PetalburgCity_Gym_EventScript_20578E
- goto PetalburgCity_Gym_EventScript_205798
+ goto_if_set FLAG_BADGE05_GET, PetalburgCity_Gym_EventScript_GymStatueCertified
+ goto PetalburgCity_Gym_EventScript_GymStatue
end
-PetalburgCity_Gym_EventScript_20577E:: @ 820577E
+PetalburgCity_Gym_EventScript_RightGymStatue:: @ 820577E
lockall
- goto_if_set FLAG_BADGE05_GET, PetalburgCity_Gym_EventScript_20578E
- goto PetalburgCity_Gym_EventScript_205798
+ goto_if_set FLAG_BADGE05_GET, PetalburgCity_Gym_EventScript_GymStatueCertified
+ goto PetalburgCity_Gym_EventScript_GymStatue
end
-PetalburgCity_Gym_EventScript_20578E:: @ 820578E
- msgbox PetalburgCity_Gym_Text_207467, MSGBOX_DEFAULT
+PetalburgCity_Gym_EventScript_GymStatueCertified:: @ 820578E
+ msgbox PetalburgCity_Gym_Text_GymStatueCertified, MSGBOX_DEFAULT
releaseall
end
-PetalburgCity_Gym_EventScript_205798:: @ 8205798
- msgbox PetalburgCity_Gym_Text_20744C, MSGBOX_DEFAULT
+PetalburgCity_Gym_EventScript_GymStatue:: @ 8205798
+ msgbox PetalburgCity_Gym_Text_GymStatue, MSGBOX_DEFAULT
releaseall
end
-PetalburgCity_Gym_Text_2057A2: @ 82057A2
+PetalburgCity_Gym_Text_DadYoureHereWithYourPokemon: @ 82057A2
.string "DAD: Hm?\p"
.string "Well, if it isn't {PLAYER}!\n"
.string "So you're all finished moving in?\p"
@@ -1250,15 +1256,15 @@ PetalburgCity_Gym_Text_2057A2: @ 82057A2
.string "That's great news!\n"
.string "I'll be looking forward to it!$"
-PetalburgCity_Gym_Text_2058B1: @ 82058B1
+PetalburgCity_Gym_Text_WallyIdLikeAPokemon: @ 82058B1
.string "Um… I…\n"
.string "I'd like to get a POKéMON, please…$"
-PetalburgCity_Gym_Text_2058DB: @ 82058DB
+PetalburgCity_Gym_Text_DadOhYoureWallyRight: @ 82058DB
.string "DAD: Hm? You're… Uh… Oh, right.\n"
.string "You're WALLY, right?$"
-PetalburgCity_Gym_Text_205910: @ 8205910
+PetalburgCity_Gym_Text_WallyIveNeverCaughtAPokemon: @ 8205910
.string "WALLY: I'm going to go stay with my\n"
.string "relatives in VERDANTURF TOWN.\p"
.string "I thought I would be lonely by myself,\n"
@@ -1266,38 +1272,38 @@ PetalburgCity_Gym_Text_205910: @ 8205910
.string "But I've never caught a POKéMON before.\n"
.string "I don't know how…$"
-PetalburgCity_Gym_Text_2059D8: @ 82059D8
+PetalburgCity_Gym_Text_DadHmISee: @ 82059D8
.string "DAD: Hm. I see.$"
-PetalburgCity_Gym_Text_2059E8: @ 82059E8
+PetalburgCity_Gym_Text_DadPlayerGoWithWally: @ 82059E8
.string "DAD: {PLAYER}, you heard that,\n"
.string "right?\p"
.string "Go with WALLY and make sure that he\n"
.string "safely catches a POKéMON.$"
-PetalburgCity_Gym_Text_205A46: @ 8205A46
+PetalburgCity_Gym_Text_IllLoanYouMyZigzagoon: @ 8205A46
.string "WALLY, here, I'll loan you my POKéMON.\p"
.string "WALLY received a ZIGZAGOON!$"
-PetalburgCity_Gym_Text_205A89: @ 8205A89
+PetalburgCity_Gym_Text_WallyThankYouAndDadGivesPokeBall: @ 8205A89
.string "WALLY: Oh, wow!\n"
.string "A POKéMON!\p"
.string "DAD: Hm. I'll give you a POKé BALL, too.\n"
.string "Go for it!\p"
.string "WALLY received a POKé BALL!$"
-PetalburgCity_Gym_Text_205AF4: @ 8205AF4
+PetalburgCity_Gym_Text_WallyOhWowThankYou: @ 8205AF4
.string "WALLY: Oh, wow!\n"
.string "Thank you!$"
-PetalburgCity_Gym_Text_205B0F: @ 8205B0F
+PetalburgCity_Gym_Text_WouldYouReallyComeWithMe: @ 8205B0F
.string "{PLAYER}… Would you really come\n"
.string "with me?$"
-PetalburgCity_Gym_Text_205B32: @ 8205B32
+PetalburgCity_Gym_Text_DadSoDidItWorkOut: @ 8205B32
.string "DAD: So, did it work out?$"
-PetalburgCity_Gym_Text_205B4C: @ 8205B4C
+PetalburgCity_Gym_Text_WallyThankYouBye: @ 8205B4C
.string "WALLY: Thank you, yes, it did.\n"
.string "Here's your POKéMON back.\p"
.string "{PLAYER}, thank you for coming along\n"
@@ -1310,7 +1316,7 @@ PetalburgCity_Gym_Text_205B4C: @ 8205B4C
.string "so I have to go!\p"
.string "Bye, {PLAYER}!$"
-PetalburgCity_Gym_Text_205C40: @ 8205C40
+PetalburgCity_Gym_Text_DadGoCollectBadges: @ 8205C40
.string "DAD: Now…\p"
.string "{PLAYER}, if you want to become a\n"
.string "strong TRAINER, here's my advice.\p"
@@ -1327,7 +1333,7 @@ PetalburgCity_Gym_Text_205C40: @ 8205C40
.string "But that's only after you become\n"
.string "stronger.$"
-PetalburgCity_Gym_Text_205DB4: @ 8205DB4
+PetalburgCity_Gym_Text_NormanGoToRustboro: @ 8205DB4
.string "DAD: Hm? Aren't you going to the\n"
.string "POKéMON GYM in RUSTBORO CITY?\p"
.string "There's no challenge for me to\n"
@@ -1337,7 +1343,7 @@ PetalburgCity_Gym_Text_205DB4: @ 8205DB4
.string "I'll battle you, {PLAYER}, when you\n"
.string "can show me four GYM BADGES, okay?$"
-PetalburgCity_Gym_Text_205EAE: @ 8205EAE
+PetalburgCity_Gym_Text_NormanGoToDewford: @ 8205EAE
.string "DAD: I see… So, you've beaten\n"
.string "the GYM LEADER in RUSTBORO CITY.\p"
.string "But there are many more TRAINERS\n"
@@ -1346,13 +1352,13 @@ PetalburgCity_Gym_Text_205EAE: @ 8205EAE
.string "GYM LEADER named BRAWLY.\p"
.string "You should go challenge him.$"
-PetalburgCity_Gym_Text_205F87: @ 8205F87
+PetalburgCity_Gym_Text_YouHaveGottenStronger: @ 8205F87
.string "DAD: Hm… {PLAYER}, you have gotten\n"
.string "stronger.\p"
.string "I can tell by the number of BADGES\n"
.string "that you've earned.$"
-PetalburgCity_Gym_Text_205FE5: @ 8205FE5
+PetalburgCity_Gym_Text_NormanPreBattle: @ 8205FE5
.string "DAD: Hm…\n"
.string "So, you did get four GYM BADGES.\p"
.string "Fine, as I promised, we will have\n"
@@ -1366,7 +1372,7 @@ PetalburgCity_Gym_Text_205FE5: @ 8205FE5
.string "{PLAYER}, you'd better give it your\n"
.string "best shot, too!$"
-PetalburgCity_Gym_Text_206107: @ 8206107
+PetalburgCity_Gym_Text_NormanDefeat: @ 8206107
.string "…\p"
.string "I… I can't…\p"
.string "I can't believe it. {PLAYER}…\p"
@@ -1374,11 +1380,11 @@ PetalburgCity_Gym_Text_206107: @ 8206107
.string "But, rules are rules!\n"
.string "Here, take this.$"
-PetalburgCity_Gym_Text_206162: @ 8206162
+PetalburgCity_Gym_Text_ReceivedBalanceBadge: @ 8206162
.string "{PLAYER} received the BALANCE BADGE\n"
.string "from DAD!$"
-PetalburgCity_Gym_Text_20618A: @ 820618A
+PetalburgCity_Gym_Text_ExplainBalanceBadgeTakeThis: @ 820618A
.string "DAD: With that BADGE, the DEFENSE\n"
.string "of all your POKéMON will increase.\p"
.string "POKéMON that know the HM move SURF\n"
@@ -1386,7 +1392,7 @@ PetalburgCity_Gym_Text_20618A: @ 820618A
.string "This is my gift to you. {PLAYER}, I'm\n"
.string "sure you can use it correctly.$"
-PetalburgCity_Gym_Text_206254: @ 8206254
+PetalburgCity_Gym_Text_ExplainFacade: @ 8206254
.string "DAD: TM42 contains FACADE.\p"
.string "It doubles the power of moves if\n"
.string "the POKéMON is poisoned, paralyzed,\l"
@@ -1394,23 +1400,23 @@ PetalburgCity_Gym_Text_206254: @ 8206254
.string "It might be able to turn a bad\n"
.string "situation into an advantage.$"
-PetalburgCity_Gym_Text_2062FB: @ 82062FB
+PetalburgCity_Gym_Text_DadHappyAndSad: @ 82062FB
.string "DAD: As the GYM LEADER, I can't\n"
.string "express how upset I am…\p"
.string "But as a father, it makes me both\n"
.string "happy and a little sad. It's odd…$"
-PetalburgCity_Gym_Text_206377: @ 8206377
+PetalburgCity_Gym_Text_PleaseComeWithMe: @ 8206377
.string "Ah, there you are, {PLAYER}{KUN}!\p"
.string "Please come with me.\n"
.string "I have something I want you to have.$"
-PetalburgCity_Gym_Text_2063CA: @ 82063CA
+PetalburgCity_Gym_Text_LetMeBorrowPlayer: @ 82063CA
.string "NORMAN, you don't mind, do you?\p"
.string "Let me borrow your {PLAYER}{KUN} for\n"
.string "a minute or two.$"
-PetalburgCity_Gym_Text_206417: @ 8206417
+PetalburgCity_Gym_Text_DadGoingToKeepTraining: @ 8206417
.string "DAD: {PLAYER}, you should go visit\n"
.string "your mother every so often.\p"
.string "I'm going to stay here and redouble\n"
@@ -1418,13 +1424,13 @@ PetalburgCity_Gym_Text_206417: @ 8206417
.string "It would bother me as a TRAINER to\n"
.string "not avenge my loss to you, {PLAYER}!$"
-PetalburgCity_Gym_Text_2064C3: @ 82064C3
+PetalburgCity_Gym_Text_DadNoAmountOfTrainingIsEnough: @ 82064C3
.string "DAD: {PLAYER}, how are things going?\p"
.string "The world of POKéMON is deep.\p"
.string "I honestly think that no amount of\n"
.string "training would ever be enough.$"
-PetalburgCity_Gym_Text_206542: @ 8206542
+PetalburgCity_Gym_Text_GymGuideAdvice: @ 8206542
.string "Hey, how's it going, CHAMPION-\n"
.string "bound {PLAYER}?\p"
.string "The doors in this GYM open when you\n"
@@ -1442,53 +1448,53 @@ PetalburgCity_Gym_Text_206542: @ 8206542
.string "Once you've chosen the door…\n"
.string "Well, hey, go for it!$"
-PetalburgCity_Gym_Text_2066F3: @ 82066F3
+PetalburgCity_Gym_Text_GymGuidePostVictory: @ 82066F3
.string "{PLAYER}! Whoa! You've overcome even\n"
.string "your own father!\p"
.string "Like, whoa!\n"
.string "What a stunning turn of events!$"
-PetalburgCity_Gym_Text_20674F: @ 820674F
+PetalburgCity_Gym_Text_RandallPreBattle: @ 820674F
.string "The ability to attack before the\n"
.string "opponent…\p"
.string "Just that alone puts me at a great\n"
.string "advantage, don't you agree?$"
-PetalburgCity_Gym_Text_2067B9: @ 82067B9
+PetalburgCity_Gym_Text_RandallDefeat: @ 82067B9
.string "That was a magnificent battle!$"
-PetalburgCity_Gym_Text_2067D8: @ 82067D8
+PetalburgCity_Gym_Text_RandallPostBattle: @ 82067D8
.string "Go on to the next room where a new\n"
.string "challenge awaits you.\p"
.string "At the left is the CONFUSION ROOM.\p"
.string "The right door leads to the DEFENSE\n"
.string "ROOM.$"
-PetalburgCity_Gym_Text_20685E: @ 820685E
+PetalburgCity_Gym_Text_RandallPostBadge: @ 820685E
.string "Whomever you beat, and whomever you\n"
.string "may lose to, you never shirk from\l"
.string "training yourself and your POKéMON.\p"
.string "That's what I think being a\n"
.string "GYM LEADER is all about.$"
-PetalburgCity_Gym_Text_2068FD: @ 82068FD
+PetalburgCity_Gym_Text_ParkerPreBattle: @ 82068FD
.string "This is the CONFUSION ROOM.\p"
.string "Let me see how well bonded you are\n"
.string "with your POKéMON!$"
-PetalburgCity_Gym_Text_20694F: @ 820694F
+PetalburgCity_Gym_Text_ParkerDefeat: @ 820694F
.string "I couldn't confuse your team enough…\n"
.string "You share a strong bond together.$"
-PetalburgCity_Gym_Text_206996: @ 8206996
+PetalburgCity_Gym_Text_ParkerPostBattle: @ 8206996
.string "The next room is the STRENGTH ROOM.\n"
.string "Can you withstand brute force?$"
-PetalburgCity_Gym_Text_2069D9: @ 82069D9
+PetalburgCity_Gym_Text_ParkerPostBadge: @ 82069D9
.string "After you beat our LEADER, the\n"
.string "training has become a lot tougher.$"
-PetalburgCity_Gym_Text_206A1B: @ 8206A1B
+PetalburgCity_Gym_Text_GeorgePreBattle: @ 8206A1B
.string "Just when you think you're going to\n"
.string "win, your opponent restores HP…\p"
.string "Can you just imagine how awful that\n"
@@ -1496,11 +1502,11 @@ PetalburgCity_Gym_Text_206A1B: @ 8206A1B
.string "I'll show you exactly how awful it\n"
.string "feels!$"
-PetalburgCity_Gym_Text_206AB8: @ 8206AB8
+PetalburgCity_Gym_Text_GeorgeDefeat: @ 8206AB8
.string "I couldn't restore HP enough…\n"
.string "What ATTACK power…$"
-PetalburgCity_Gym_Text_206AE9: @ 8206AE9
+PetalburgCity_Gym_Text_GeorgePostBattle: @ 8206AE9
.string "I should have expected no less from\n"
.string "our LEADER's kid.\p"
.string "No, wait! A TRAINER's abilities are\n"
@@ -1509,21 +1515,21 @@ PetalburgCity_Gym_Text_206AE9: @ 8206AE9
.string "weren't enough.\p"
.string "Go on! The ONE-HIT KO ROOM is next.$"
-PetalburgCity_Gym_Text_206BB1: @ 8206BB1
+PetalburgCity_Gym_Text_GeorgePostBadge: @ 8206BB1
.string "I'm going to keep training at GYMS.\n"
.string "One day, I'll become a LEADER.$"
-PetalburgCity_Gym_Text_206BF4: @ 8206BF4
+PetalburgCity_Gym_Text_BerkePreBattle: @ 8206BF4
.string "I'm not going to take it easy just\n"
.string "because you're our LEADER's kid.\p"
.string "I'll show you how horrid it is for\n"
.string "a POKéMON to take a critical hit!$"
-PetalburgCity_Gym_Text_206C7D: @ 8206C7D
+PetalburgCity_Gym_Text_BerkeDefeat: @ 8206C7D
.string "Your power…\n"
.string "You're the real deal.$"
-PetalburgCity_Gym_Text_206C9F: @ 8206C9F
+PetalburgCity_Gym_Text_BerkePostBattle: @ 8206C9F
.string "Your father really is strong.\n"
.string "He's a TRAINER worth my respect.\p"
.string "And, I sense the same glow coming\n"
@@ -1531,21 +1537,21 @@ PetalburgCity_Gym_Text_206C9F: @ 8206C9F
.string "I hope that you'll stage a terrific\n"
.string "battle with your father!$"
-PetalburgCity_Gym_Text_206D56: @ 8206D56
+PetalburgCity_Gym_Text_BerkePostBadge: @ 8206D56
.string "Since your dad became the LEADER,\n"
.string "the TRAINERS of PETALBURG CITY have\l"
.string "become a lot tougher.$"
-PetalburgCity_Gym_Text_206DB2: @ 8206DB2
+PetalburgCity_Gym_Text_MaryPreBattle: @ 8206DB2
.string "Giggle…\n"
.string "This is the ACCURACY ROOM.\p"
.string "It's pretty nasty when every attack\n"
.string "lands without fail.$"
-PetalburgCity_Gym_Text_206E0D: @ 8206E0D
+PetalburgCity_Gym_Text_MaryDefeat: @ 8206E0D
.string "You were a cut above me…$"
-PetalburgCity_Gym_Text_206E26: @ 8206E26
+PetalburgCity_Gym_Text_MaryPostBattle: @ 8206E26
.string "There are some even stronger\n"
.string "TRAINERS waiting for you.\p"
.string "The left is the DEFENSE ROOM, and\n"
@@ -1553,20 +1559,20 @@ PetalburgCity_Gym_Text_206E26: @ 8206E26
.string "Your POKéMON's ATTACK power will be\n"
.string "on trial either way.$"
-PetalburgCity_Gym_Text_206ED8: @ 8206ED8
+PetalburgCity_Gym_Text_MaryPostBadge: @ 8206ED8
.string "Do you know what we're trying to\n"
.string "achieve as TRAINERS?\p"
.string "We're striving to become soul mates\n"
.string "with our POKéMON.$"
-PetalburgCity_Gym_Text_206F44: @ 8206F44
+PetalburgCity_Gym_Text_AlexiaPreBattle: @ 8206F44
.string "The higher the DEFENSE, the more\n"
.string "reckless I can be in attack.$"
-PetalburgCity_Gym_Text_206F82: @ 8206F82
+PetalburgCity_Gym_Text_AlexiaDefeat: @ 8206F82
.string "Our defenses weren't enough…$"
-PetalburgCity_Gym_Text_206F9F: @ 8206F9F
+PetalburgCity_Gym_Text_AlexiaPostBattle: @ 8206F9F
.string "I think you've taught me a valuable\n"
.string "lesson here.\p"
.string "Now, go on! The left door goes to\n"
@@ -1576,82 +1582,83 @@ PetalburgCity_Gym_Text_206F9F: @ 8206F9F
.string "Both of them have TRAINERS who are\n"
.string "skilled at offense.$"
-PetalburgCity_Gym_Text_207069: @ 8207069
+PetalburgCity_Gym_Text_AlexiaPostBadge: @ 8207069
.string "Hi! Have you tried using SURF?$"
-PetalburgCity_Gym_Text_207088: @ 8207088
+PetalburgCity_Gym_Text_JodyPreBattle: @ 8207088
.string "Our GYM LEADER told us to go all out\n"
.string "and beat you.\p"
.string "Even if you happen to be the\n"
.string "LEADER's kid!$"
-PetalburgCity_Gym_Text_2070E6: @ 82070E6
+PetalburgCity_Gym_Text_JodyDefeat: @ 82070E6
.string "But… I went all out!$"
-PetalburgCity_Gym_Text_2070FB: @ 82070FB
+PetalburgCity_Gym_Text_JodyPostBattle: @ 82070FB
.string "The way you use your POKéMON…\n"
.string "It's like your father's style.\p"
.string "Go on through! The GYM LEADER, your\n"
.string "father, is waiting!$"
-PetalburgCity_Gym_Text_207170: @ 8207170
+PetalburgCity_Gym_Text_JodyPostBadge: @ 8207170
.string "Sure, it's fine to make your POKéMON\n"
.string "stronger.\p"
.string "But what decides the winner?\p"
.string "Why, it's the feelings TRAINERS have\n"
.string "for their POKéMON.$"
-PetalburgCity_Gym_Text_2071F4: @ 82071F4
+PetalburgCity_Gym_Text_DoorAppearsLocked: @ 82071F4
.string "This door appears to be locked\n"
.string "right now…$"
-PetalburgCity_Gym_Text_20721E: @ 820721E
+PetalburgCity_Gym_Text_EnterSpeedRoom: @ 820721E
.string "“SPEED ROOM,” the sign says.\p"
.string "Do you want to go through?$"
-PetalburgCity_Gym_Text_207256: @ 8207256
+@ Unused
+PetalburgCity_Gym_Text_DoorAppearsLocked2: @ 8207256
.string "This door appears to be locked\n"
.string "right now…$"
-PetalburgCity_Gym_Text_207280: @ 8207280
+PetalburgCity_Gym_Text_EnterAccuracyRoom: @ 8207280
.string "“ACCURACY ROOM,” the sign says.\p"
.string "Do you want to go through?$"
-PetalburgCity_Gym_Text_2072BB: @ 82072BB
+PetalburgCity_Gym_Text_EnterConfusionRoom: @ 82072BB
.string "“CONFUSION ROOM,” the sign says.\p"
.string "Do you want to go through?$"
-PetalburgCity_Gym_Text_2072F7: @ 82072F7
+PetalburgCity_Gym_Text_EnterDefenseRoom: @ 82072F7
.string "“DEFENSE ROOM,” the sign says.\p"
.string "Do you want to go through?$"
-PetalburgCity_Gym_Text_207331: @ 8207331
+PetalburgCity_Gym_Text_EnterRecoveryRoom: @ 8207331
.string "“RECOVERY ROOM,” the sign says.\p"
.string "Do you want to go through?$"
-PetalburgCity_Gym_Text_20736C: @ 820736C
+PetalburgCity_Gym_Text_EnterStrengthRoom: @ 820736C
.string "“STRENGTH ROOM,” the sign says.\p"
.string "Do you want to go through?$"
-PetalburgCity_Gym_Text_2073A7: @ 82073A7
+PetalburgCity_Gym_Text_EnterOHKORoom: @ 82073A7
.string "“ONE-HIT KO ROOM,” the sign says.\p"
.string "Do you want to go through?$"
-PetalburgCity_Gym_Text_2073E4: @ 82073E4
+PetalburgCity_Gym_Text_EnterGymLeadersRoom: @ 82073E4
.string "“GYM LEADER'S ROOM\p"
.string "“See for yourself what POKéMON await\n"
.string "you!” the sign says.\p"
.string "Do you want to go through?$"
-PetalburgCity_Gym_Text_20744C: @ 820744C
+PetalburgCity_Gym_Text_GymStatue: @ 820744C
.string "PETALBURG CITY POKéMON GYM$"
-PetalburgCity_Gym_Text_207467: @ 8207467
+PetalburgCity_Gym_Text_GymStatueCertified: @ 8207467
.string "PETALBURG CITY POKéMON GYM\p"
.string "NORMAN'S CERTIFIED TRAINERS:\n"
.string "{PLAYER}$"
-PetalburgCity_Gym_Text_2074A2: @ 82074A2
+PetalburgCity_Gym_Text_NormanPreRematch: @ 82074A2
.string "DAD: {PLAYER}…\n"
.string "I had a feeling that you would come.\p"
.string "I would never refuse to accept\n"
@@ -1663,18 +1670,18 @@ PetalburgCity_Gym_Text_2074A2: @ 82074A2
.string "we owe it to each other to do the best\l"
.string "we can. Isn't that right, {PLAYER}?$"
-PetalburgCity_Gym_Text_2075CE: @ 82075CE
+PetalburgCity_Gym_Text_NormanRematchDefeat: @ 82075CE
.string "Uh… Haha…\n"
.string "Maybe that was going too hard…$"
-PetalburgCity_Gym_Text_2075F7: @ 82075F7
+PetalburgCity_Gym_Text_NormanPostRematch: @ 82075F7
.string "DAD: {PLAYER}…\n"
.string "What is your dream?\p"
.string "My dream…\n"
.string "Hahaha…\l"
.string "It has already come true, actually.$"
-PetalburgCity_Gym_Text_20764A: @ 820764A
+PetalburgCity_Gym_Text_NormanRematchNeedTwoMons: @ 820764A
.string "DAD: {PLAYER}…\n"
.string "I had a feeling that you would come.\p"
.string "I would never refuse to accept\n"
diff --git a/data/maps/Route113/scripts.inc b/data/maps/Route113/scripts.inc
index e8fb08ee4..3e1b1754f 100644
--- a/data/maps/Route113/scripts.inc
+++ b/data/maps/Route113/scripts.inc
@@ -4,7 +4,7 @@ Route113_MapScripts:: @ 81F2153
.byte 0
Route113_MapScript1_1F215E: @ 81F215E
- setstepcallback 1
+ setstepcallback STEP_CB_ASH
end
Route113_OnTransition: @ 81F2161
diff --git a/data/maps/SkyPillar_2F/scripts.inc b/data/maps/SkyPillar_2F/scripts.inc
index dcbff3642..27f985b16 100644
--- a/data/maps/SkyPillar_2F/scripts.inc
+++ b/data/maps/SkyPillar_2F/scripts.inc
@@ -15,7 +15,7 @@ SkyPillar_2F_EventScript_CleanFloor:: @ 823964C
return
SkyPillar_2F_MapScript1_239650: @ 8239650
- setstepcallback 7
+ setstepcallback STEP_CB_CRACKED_FLOOR
setholewarp MAP_SKY_PILLAR_1F, 255, 0, 0
end
diff --git a/data/maps/SkyPillar_4F/scripts.inc b/data/maps/SkyPillar_4F/scripts.inc
index 413f56521..0736dce36 100644
--- a/data/maps/SkyPillar_4F/scripts.inc
+++ b/data/maps/SkyPillar_4F/scripts.inc
@@ -15,7 +15,7 @@ SkyPillar_4F_EventScript_CleanFloor:: @ 8239692
return
SkyPillar_4F_MapScript1_239696: @ 8239696
- setstepcallback 7
+ setstepcallback STEP_CB_CRACKED_FLOOR
setholewarp MAP_SKY_PILLAR_3F, 255, 0, 0
end
diff --git a/data/maps/SootopolisCity_Gym_1F/map.json b/data/maps/SootopolisCity_Gym_1F/map.json
index 6b8cab149..9726e98aa 100644
--- a/data/maps/SootopolisCity_Gym_1F/map.json
+++ b/data/maps/SootopolisCity_Gym_1F/map.json
@@ -24,7 +24,7 @@
"movement_range_y": 0,
"trainer_type": "0",
"trainer_sight_or_berry_tree_id": "0",
- "script": "SootopolisCity_Gym_1F_EventScript_224F44",
+ "script": "SootopolisCity_Gym_1F_EventScript_Juan",
"flag": "0"
},
{
@@ -37,7 +37,7 @@
"movement_range_y": 0,
"trainer_type": "0",
"trainer_sight_or_berry_tree_id": "0",
- "script": "SootopolisCity_Gym_1F_EventScript_225040",
+ "script": "SootopolisCity_Gym_1F_EventScript_GymGuide",
"flag": "0"
}
],
@@ -72,7 +72,7 @@
"y": 24,
"elevation": 0,
"player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY",
- "script": "SootopolisCity_Gym_1F_EventScript_22505F"
+ "script": "SootopolisCity_Gym_1F_EventScript_LeftGymStatue"
},
{
"type": "sign",
@@ -80,7 +80,7 @@
"y": 24,
"elevation": 0,
"player_facing_dir": "BG_EVENT_PLAYER_FACING_NORTH",
- "script": "SootopolisCity_Gym_1F_EventScript_22506F"
+ "script": "SootopolisCity_Gym_1F_EventScript_RightGymStatue"
}
]
} \ No newline at end of file
diff --git a/data/maps/SootopolisCity_Gym_1F/scripts.inc b/data/maps/SootopolisCity_Gym_1F/scripts.inc
index fa69aadc2..51e35f1a4 100644
--- a/data/maps/SootopolisCity_Gym_1F/scripts.inc
+++ b/data/maps/SootopolisCity_Gym_1F/scripts.inc
@@ -1,7 +1,7 @@
SootopolisCity_Gym_1F_MapScripts:: @ 8224E4C
- map_script MAP_SCRIPT_ON_FRAME_TABLE, SootopolisCity_Gym_1F_MapScript2_224ECB
- map_script MAP_SCRIPT_ON_RESUME, SootopolisCity_Gym_1F_MapScript1_224E67
- map_script MAP_SCRIPT_ON_LOAD, SootopolisCity_Gym_1F_MapScript1_224E6A
+ map_script MAP_SCRIPT_ON_FRAME_TABLE, SootopolisCity_Gym_1F_OnFrame
+ map_script MAP_SCRIPT_ON_RESUME, SootopolisCity_Gym_1F_OnResume
+ map_script MAP_SCRIPT_ON_LOAD, SootopolisCity_Gym_1F_OnLoad
map_script MAP_SCRIPT_ON_TRANSITION, SootopolisCity_Gym_1F_OnTransition
.byte 0
@@ -9,71 +9,71 @@ SootopolisCity_Gym_1F_OnTransition: @ 8224E61
setvar VAR_ICE_STEP_COUNT, 1
end
-SootopolisCity_Gym_1F_MapScript1_224E67: @ 8224E67
- setstepcallback 4
+SootopolisCity_Gym_1F_OnResume: @ 8224E67
+ setstepcallback STEP_CB_SOOTOPOLIS_ICE
end
-SootopolisCity_Gym_1F_MapScript1_224E6A: @ 8224E6A
- call SootopolisCity_Gym_1F_EventScript_224E73
+SootopolisCity_Gym_1F_OnLoad: @ 8224E6A
+ call SootopolisCity_Gym_1F_EventScript_CheckSetStairMetatiles
special SetSootopolisGymCrackedIceMetatiles
end
-SootopolisCity_Gym_1F_EventScript_224E73:: @ 8224E73
+SootopolisCity_Gym_1F_EventScript_CheckSetStairMetatiles:: @ 8224E73
compare VAR_ICE_STEP_COUNT, 8
- goto_if_lt SootopolisCity_Gym_1F_EventScript_224ECA
+ goto_if_lt SootopolisCity_Gym_1F_EventScript_StopCheckingStairs @ All stairs ice
compare VAR_ICE_STEP_COUNT, 28
- goto_if_lt SootopolisCity_Gym_1F_EventScript_224EB8
+ goto_if_lt SootopolisCity_Gym_1F_EventScript_OpenFirstStairs
compare VAR_ICE_STEP_COUNT, 67
- goto_if_lt SootopolisCity_Gym_1F_EventScript_224EA6
+ goto_if_lt SootopolisCity_Gym_1F_EventScript_OpenFirstAndSecondStairs
setmetatile 8, 4, METATILE_SootopolisGym_Stairs, 0
setmetatile 8, 5, METATILE_SootopolisGym_Stairs, 0
-SootopolisCity_Gym_1F_EventScript_224EA6:: @ 8224EA6
+SootopolisCity_Gym_1F_EventScript_OpenFirstAndSecondStairs:: @ 8224EA6
setmetatile 8, 10, METATILE_SootopolisGym_Stairs, 0
setmetatile 8, 11, METATILE_SootopolisGym_Stairs, 0
-SootopolisCity_Gym_1F_EventScript_224EB8:: @ 8224EB8
+SootopolisCity_Gym_1F_EventScript_OpenFirstStairs:: @ 8224EB8
setmetatile 8, 15, METATILE_SootopolisGym_Stairs, 0
setmetatile 8, 16, METATILE_SootopolisGym_Stairs, 0
-SootopolisCity_Gym_1F_EventScript_224ECA:: @ 8224ECA
+SootopolisCity_Gym_1F_EventScript_StopCheckingStairs:: @ 8224ECA
return
-SootopolisCity_Gym_1F_MapScript2_224ECB: @ 8224ECB
- map_script_2 VAR_ICE_STEP_COUNT, 8, SootopolisCity_Gym_1F_EventScript_224EED
- map_script_2 VAR_ICE_STEP_COUNT, 28, SootopolisCity_Gym_1F_EventScript_224F01
- map_script_2 VAR_ICE_STEP_COUNT, 67, SootopolisCity_Gym_1F_EventScript_224F15
- map_script_2 VAR_ICE_STEP_COUNT, 0, SootopolisCity_Gym_1F_EventScript_224F29
+SootopolisCity_Gym_1F_OnFrame: @ 8224ECB
+ map_script_2 VAR_ICE_STEP_COUNT, 8, SootopolisCity_Gym_1F_EventScript_UnlockFirstStairs
+ map_script_2 VAR_ICE_STEP_COUNT, 28, SootopolisCity_Gym_1F_EventScript_UnlockSecondStairs
+ map_script_2 VAR_ICE_STEP_COUNT, 67, SootopolisCity_Gym_1F_EventScript_UnlockThirdStairs
+ map_script_2 VAR_ICE_STEP_COUNT, 0, SootopolisCity_Gym_1F_EventScript_FallThroughIce
.2byte 0
-SootopolisCity_Gym_1F_EventScript_224EED:: @ 8224EED
+SootopolisCity_Gym_1F_EventScript_UnlockFirstStairs:: @ 8224EED
addvar VAR_ICE_STEP_COUNT, 1
delay 40
playse SE_RU_GASHIN
- call SootopolisCity_Gym_1F_EventScript_224E73
+ call SootopolisCity_Gym_1F_EventScript_CheckSetStairMetatiles
special DrawWholeMapView
end
-SootopolisCity_Gym_1F_EventScript_224F01:: @ 8224F01
+SootopolisCity_Gym_1F_EventScript_UnlockSecondStairs:: @ 8224F01
addvar VAR_ICE_STEP_COUNT, 1
delay 40
playse SE_RU_GASHIN
- call SootopolisCity_Gym_1F_EventScript_224E73
+ call SootopolisCity_Gym_1F_EventScript_CheckSetStairMetatiles
special DrawWholeMapView
end
-SootopolisCity_Gym_1F_EventScript_224F15:: @ 8224F15
+SootopolisCity_Gym_1F_EventScript_UnlockThirdStairs:: @ 8224F15
addvar VAR_ICE_STEP_COUNT, 1
delay 40
playse SE_RU_GASHIN
- call SootopolisCity_Gym_1F_EventScript_224E73
+ call SootopolisCity_Gym_1F_EventScript_CheckSetStairMetatiles
special DrawWholeMapView
end
-SootopolisCity_Gym_1F_EventScript_224F29:: @ 8224F29
+SootopolisCity_Gym_1F_EventScript_FallThroughIce:: @ 8224F29
lockall
delay 20
- applymovement EVENT_OBJ_ID_PLAYER, SootopolisCity_Gym_1F_Movement_224F42
+ applymovement EVENT_OBJ_ID_PLAYER, SootopolisCity_Gym_1F_Movement_FallThroughIce
waitmovement 0
playse SE_RU_HYUU
delay 60
@@ -81,26 +81,26 @@ SootopolisCity_Gym_1F_EventScript_224F29:: @ 8224F29
waitstate
end
-SootopolisCity_Gym_1F_Movement_224F42: @ 8224F42
+SootopolisCity_Gym_1F_Movement_FallThroughIce: @ 8224F42
set_invisible
step_end
-SootopolisCity_Gym_1F_EventScript_224F44:: @ 8224F44
- trainerbattle_single TRAINER_JUAN_1, SootopolisCity_Gym_1F_Text_225268, SootopolisCity_Gym_1F_Text_225432, SootopolisCity_Gym_1F_EventScript_224F82, NO_MUSIC
+SootopolisCity_Gym_1F_EventScript_Juan:: @ 8224F44
+ trainerbattle_single TRAINER_JUAN_1, SootopolisCity_Gym_1F_Text_JuanPreBattle, SootopolisCity_Gym_1F_Text_JuanDefeat, SootopolisCity_Gym_1F_EventScript_JuanDefeated, NO_MUSIC
specialvar VAR_RESULT, ShouldTryRematchBattle
- compare VAR_RESULT, 1
- goto_if_eq SootopolisCity_Gym_1F_EventScript_225025
- goto_if_unset FLAG_RECEIVED_TM03, SootopolisCity_Gym_1F_EventScript_224FF7
- goto_if_unset FLAG_BADGE06_GET, SootopolisCity_Gym_1F_EventScript_22501B
- msgbox SootopolisCity_Gym_1F_Text_225778, MSGBOX_DEFAULT
+ compare VAR_RESULT, TRUE
+ goto_if_eq SootopolisCity_Gym_1F_EventScript_JuanRematch
+ goto_if_unset FLAG_RECEIVED_TM03, SootopolisCity_Gym_1F_EventScript_GiveWaterPulse2
+ goto_if_unset FLAG_BADGE06_GET, SootopolisCity_Gym_1F_EventScript_GoGetFortreeBadge
+ msgbox SootopolisCity_Gym_1F_Text_JuanPostBattle, MSGBOX_DEFAULT
release
end
-SootopolisCity_Gym_1F_EventScript_224F82:: @ 8224F82
- message SootopolisCity_Gym_1F_Text_225598
+SootopolisCity_Gym_1F_EventScript_JuanDefeated:: @ 8224F82
+ message SootopolisCity_Gym_1F_Text_ReceivedRainBadge
waitmessage
call Common_EventScript_PlayGymBadgeFanfare
- msgbox SootopolisCity_Gym_1F_Text_2255BE, MSGBOX_DEFAULT
+ msgbox SootopolisCity_Gym_1F_Text_ExplainRainBadgeTakeThis, MSGBOX_DEFAULT
setflag FLAG_DEFEATED_SOOTOPOLIS_GYM
setflag FLAG_BADGE08_GET
setflag FLAG_HIDE_SOOTOPOLIS_CITY_RESIDENTS
@@ -110,11 +110,11 @@ SootopolisCity_Gym_1F_EventScript_224F82:: @ 8224F82
clearflag FLAG_HIDE_SOOTOPOLIS_CITY_MAN_1
setvar VAR_0x8008, 8
call Common_EventScript_SetGymTrainers
- call SootopolisCity_Gym_1F_EventScript_224FD4
+ call SootopolisCity_Gym_1F_EventScript_GiveWaterPulse
closemessage
delay 30
playfanfare MUS_ME_TORE_EYE
- msgbox SootopolisCity_Gym_1F_Text_22574D, MSGBOX_DEFAULT
+ msgbox SootopolisCity_Gym_1F_Text_RegisteredJuan, MSGBOX_DEFAULT
waitfanfare
closemessage
delay 30
@@ -122,69 +122,69 @@ SootopolisCity_Gym_1F_EventScript_224F82:: @ 8224F82
release
end
-SootopolisCity_Gym_1F_EventScript_224FD4:: @ 8224FD4
+SootopolisCity_Gym_1F_EventScript_GiveWaterPulse:: @ 8224FD4
giveitem_std ITEM_TM03
compare VAR_RESULT, 0
goto_if_eq Common_EventScript_BagIsFull
- msgbox SootopolisCity_Gym_1F_Text_2256C1, MSGBOX_DEFAULT
+ msgbox SootopolisCity_Gym_1F_Text_ExplainWaterPulse, MSGBOX_DEFAULT
setflag FLAG_RECEIVED_TM03
return
-SootopolisCity_Gym_1F_EventScript_224FF7:: @ 8224FF7
+SootopolisCity_Gym_1F_EventScript_GiveWaterPulse2:: @ 8224FF7
giveitem_std ITEM_TM03
compare VAR_RESULT, 0
goto_if_eq Common_EventScript_ShowBagIsFull
- msgbox SootopolisCity_Gym_1F_Text_2256C1, MSGBOX_DEFAULT
+ msgbox SootopolisCity_Gym_1F_Text_ExplainWaterPulse, MSGBOX_DEFAULT
setflag FLAG_RECEIVED_TM03
release
end
-SootopolisCity_Gym_1F_EventScript_22501B:: @ 822501B
- msgbox SootopolisCity_Gym_1F_Text_225865, MSGBOX_DEFAULT
+SootopolisCity_Gym_1F_EventScript_GoGetFortreeBadge:: @ 822501B
+ msgbox SootopolisCity_Gym_1F_Text_GoGetFortreeBadge, MSGBOX_DEFAULT
release
end
-SootopolisCity_Gym_1F_EventScript_225025:: @ 8225025
- trainerbattle_rematch_double TRAINER_JUAN_1, SootopolisCity_Gym_1F_Text_225950, SootopolisCity_Gym_1F_Text_225A2E, SootopolisCity_Gym_1F_Text_225B48
- msgbox SootopolisCity_Gym_1F_Text_225A67, MSGBOX_AUTOCLOSE
+SootopolisCity_Gym_1F_EventScript_JuanRematch:: @ 8225025
+ trainerbattle_rematch_double TRAINER_JUAN_1, SootopolisCity_Gym_1F_Text_JuanPreRematch, SootopolisCity_Gym_1F_Text_JuanRematchDefeat, SootopolisCity_Gym_1F_Text_JuanRematchNeedTwoMons
+ msgbox SootopolisCity_Gym_1F_Text_JuanPostRematch, MSGBOX_AUTOCLOSE
end
-SootopolisCity_Gym_1F_EventScript_225040:: @ 8225040
+SootopolisCity_Gym_1F_EventScript_GymGuide:: @ 8225040
lock
faceplayer
- goto_if_set FLAG_DEFEATED_SOOTOPOLIS_GYM, SootopolisCity_Gym_1F_EventScript_225055
- msgbox SootopolisCity_Gym_1F_Text_225093, MSGBOX_DEFAULT
+ goto_if_set FLAG_DEFEATED_SOOTOPOLIS_GYM, SootopolisCity_Gym_1F_EventScript_GymGuidePostVictory
+ msgbox SootopolisCity_Gym_1F_Text_GymGuideAdvice, MSGBOX_DEFAULT
release
end
-SootopolisCity_Gym_1F_EventScript_225055:: @ 8225055
- msgbox SootopolisCity_Gym_1F_Text_2251AF, MSGBOX_DEFAULT
+SootopolisCity_Gym_1F_EventScript_GymGuidePostVictory:: @ 8225055
+ msgbox SootopolisCity_Gym_1F_Text_GymGuidePostVictory, MSGBOX_DEFAULT
release
end
-SootopolisCity_Gym_1F_EventScript_22505F:: @ 822505F
+SootopolisCity_Gym_1F_EventScript_LeftGymStatue:: @ 822505F
lockall
- goto_if_set FLAG_BADGE08_GET, SootopolisCity_Gym_1F_EventScript_22507F
- goto SootopolisCity_Gym_1F_EventScript_225089
+ goto_if_set FLAG_BADGE08_GET, SootopolisCity_Gym_1F_EventScript_GymStatueCertified
+ goto SootopolisCity_Gym_1F_EventScript_GymStatue
end
-SootopolisCity_Gym_1F_EventScript_22506F:: @ 822506F
+SootopolisCity_Gym_1F_EventScript_RightGymStatue:: @ 822506F
lockall
- goto_if_set FLAG_BADGE08_GET, SootopolisCity_Gym_1F_EventScript_22507F
- goto SootopolisCity_Gym_1F_EventScript_225089
+ goto_if_set FLAG_BADGE08_GET, SootopolisCity_Gym_1F_EventScript_GymStatueCertified
+ goto SootopolisCity_Gym_1F_EventScript_GymStatue
end
-SootopolisCity_Gym_1F_EventScript_22507F:: @ 822507F
- msgbox SootopolisCity_Gym_1F_Text_225916, MSGBOX_DEFAULT
+SootopolisCity_Gym_1F_EventScript_GymStatueCertified:: @ 822507F
+ msgbox SootopolisCity_Gym_1F_Text_GymStatueCertified, MSGBOX_DEFAULT
releaseall
end
-SootopolisCity_Gym_1F_EventScript_225089:: @ 8225089
- msgbox SootopolisCity_Gym_1F_Text_2258FA, MSGBOX_DEFAULT
+SootopolisCity_Gym_1F_EventScript_GymStatue:: @ 8225089
+ msgbox SootopolisCity_Gym_1F_Text_GymStatue, MSGBOX_DEFAULT
releaseall
end
-SootopolisCity_Gym_1F_Text_225093: @ 8225093
+SootopolisCity_Gym_1F_Text_GymGuideAdvice: @ 8225093
.string "Yo! How's it going, CHAMPION-\n"
.string "bound {PLAYER}?\p"
.string "SOOTOPOLIS's GYM LEADER JUAN is\n"
@@ -196,14 +196,14 @@ SootopolisCity_Gym_1F_Text_225093: @ 8225093
.string "The rest of the way, you have to\n"
.string "go for it yourself!$"
-SootopolisCity_Gym_1F_Text_2251AF: @ 82251AF
+SootopolisCity_Gym_1F_Text_GymGuidePostVictory: @ 82251AF
.string "Yow! You've beaten even JUAN, who\n"
.string "was supposedly the best in all HOENN!\p"
.string "Okay! Check out your TRAINER CARD.\p"
.string "If you've gotten all the BADGES, you're\n"
.string "set for the POKéMON LEAGUE challenge!$"
-SootopolisCity_Gym_1F_Text_225268: @ 8225268
+SootopolisCity_Gym_1F_Text_JuanPreBattle: @ 8225268
.string "Let me ask you.\n"
.string "Did you know?\l"
.string "Ah, I should not be so coy.\p"
@@ -226,7 +226,7 @@ SootopolisCity_Gym_1F_Text_225268: @ 8225268
@ the gDisplayedStringBattle buffer that it's put into, and it stomps all over the gBattleTextBuffs
@ after, as well as the otherwise unused array after that. One wonders if that's the reason for
@ the existence of that unused array of ints.
-SootopolisCity_Gym_1F_Text_225432: @ 8225432
+SootopolisCity_Gym_1F_Text_JuanDefeat: @ 8225432
.string "Ahahaha, excellent!\n"
.string "Very well, you are the winner.\p"
.string "From you, I sense the brilliant shine\n"
@@ -241,11 +241,11 @@ SootopolisCity_Gym_1F_Text_225432: @ 8225432
.string "Rather than my clothes, I shall reward\n"
.string "you with this, the RAIN BADGE!$"
-SootopolisCity_Gym_1F_Text_225598: @ 8225598
+SootopolisCity_Gym_1F_Text_ReceivedRainBadge: @ 8225598
.string "{PLAYER} received the RAIN BADGE\n"
.string "from JUAN.$"
-SootopolisCity_Gym_1F_Text_2255BE: @ 82255BE
+SootopolisCity_Gym_1F_Text_ExplainRainBadgeTakeThis: @ 82255BE
.string "Having the RAIN BADGE shall assure you\n"
.string "the full obedience of all your POKéMON\l"
.string "to your every command.\p"
@@ -255,18 +255,18 @@ SootopolisCity_Gym_1F_Text_2255BE: @ 82255BE
.string "And, so that you never forget the\n"
.string "battle we shared, take this…$"
-SootopolisCity_Gym_1F_Text_2256C1: @ 82256C1
+SootopolisCity_Gym_1F_Text_ExplainWaterPulse: @ 82256C1
.string "The TECHNICAL MACHINE I handed you\n"
.string "contains WATER PULSE.\p"
.string "In use, it will occasionally confuse\n"
.string "the target with ultrasonic waves.\p"
.string "… … … … … …$"
-SootopolisCity_Gym_1F_Text_22574D: @ 822574D
+SootopolisCity_Gym_1F_Text_RegisteredJuan: @ 822574D
.string "Registered GYM LEADER JUAN\n"
.string "in the POKéNAV.$"
-SootopolisCity_Gym_1F_Text_225778: @ 8225778
+SootopolisCity_Gym_1F_Text_JuanPostBattle: @ 8225778
.string "The TRAINERS who have gathered all\n"
.string "the GYM BADGES of HOENN should make\l"
.string "way to the ultimate destination.\p"
@@ -276,22 +276,22 @@ SootopolisCity_Gym_1F_Text_225778: @ 8225778
.string "There, you shall find the POKéMON\n"
.string "LEAGUE.$"
-SootopolisCity_Gym_1F_Text_225865: @ 8225865
+SootopolisCity_Gym_1F_Text_GoGetFortreeBadge: @ 8225865
.string "There remains but one BADGE to\n"
.string "obtain in HOENN.\p"
.string "If you wish to challenge the POKéMON\n"
.string "LEAGUE, you must obtain the last\l"
.string "BADGE from the GYM in FORTREE.$"
-SootopolisCity_Gym_1F_Text_2258FA: @ 82258FA
+SootopolisCity_Gym_1F_Text_GymStatue: @ 82258FA
.string "SOOTOPOLIS CITY POKéMON GYM$"
-SootopolisCity_Gym_1F_Text_225916: @ 8225916
+SootopolisCity_Gym_1F_Text_GymStatueCertified: @ 8225916
.string "SOOTOPOLIS CITY POKéMON GYM\p"
.string "JUAN'S CERTIFIED TRAINERS:\n"
.string "{PLAYER}$"
-SootopolisCity_Gym_1F_Text_225950: @ 8225950
+SootopolisCity_Gym_1F_Text_JuanPreRematch: @ 8225950
.string "JUAN: Ah, this GYM had returned to its\n"
.string "usual state of serenity…\p"
.string "But our young typhoon has returned\n"
@@ -300,11 +300,11 @@ SootopolisCity_Gym_1F_Text_225950: @ 8225950
.string "I shall be delighted to dance with you\n"
.string "as often as you wish!$"
-SootopolisCity_Gym_1F_Text_225A2E: @ 8225A2E
+SootopolisCity_Gym_1F_Text_JuanRematchDefeat: @ 8225A2E
.string "Ahahaha, you are the winner!\n"
.string "You have defeated me again!$"
-SootopolisCity_Gym_1F_Text_225A67: @ 8225A67
+SootopolisCity_Gym_1F_Text_JuanPostRematch: @ 8225A67
.string "JUAN: If I told you to become my\n"
.string "apprentice, you will refuse, I am sure.\p"
.string "I would like to make a gift of my coat\n"
@@ -314,7 +314,7 @@ SootopolisCity_Gym_1F_Text_225A67: @ 8225A67
.string "And that, my friend, is a certain sign\n"
.string "of nobility!$"
-SootopolisCity_Gym_1F_Text_225B48: @ 8225B48
+SootopolisCity_Gym_1F_Text_JuanRematchNeedTwoMons: @ 8225B48
.string "JUAN: Ah, this GYM had returned to its\n"
.string "usual state of serenity…\p"
.string "But our young typhoon has returned\n"
diff --git a/data/maps/SootopolisCity_Gym_B1F/map.json b/data/maps/SootopolisCity_Gym_B1F/map.json
index d378f84e2..0af53d062 100644
--- a/data/maps/SootopolisCity_Gym_B1F/map.json
+++ b/data/maps/SootopolisCity_Gym_B1F/map.json
@@ -24,7 +24,7 @@
"movement_range_y": 0,
"trainer_type": "1",
"trainer_sight_or_berry_tree_id": "1",
- "script": "SootopolisCity_Gym_B1F_EventScript_225C8B",
+ "script": "SootopolisCity_Gym_B1F_EventScript_Andrea",
"flag": "0"
},
{
@@ -37,7 +37,7 @@
"movement_range_y": 0,
"trainer_type": "1",
"trainer_sight_or_berry_tree_id": "1",
- "script": "SootopolisCity_Gym_B1F_EventScript_225CD0",
+ "script": "SootopolisCity_Gym_B1F_EventScript_Connie",
"flag": "0"
},
{
@@ -50,7 +50,7 @@
"movement_range_y": 0,
"trainer_type": "1",
"trainer_sight_or_berry_tree_id": "1",
- "script": "SootopolisCity_Gym_B1F_EventScript_225CB9",
+ "script": "SootopolisCity_Gym_B1F_EventScript_Brianna",
"flag": "0"
},
{
@@ -63,7 +63,7 @@
"movement_range_y": 0,
"trainer_type": "1",
"trainer_sight_or_berry_tree_id": "5",
- "script": "SootopolisCity_Gym_B1F_EventScript_225CE7",
+ "script": "SootopolisCity_Gym_B1F_EventScript_Bridget",
"flag": "0"
},
{
@@ -76,7 +76,7 @@
"movement_range_y": 0,
"trainer_type": "1",
"trainer_sight_or_berry_tree_id": "4",
- "script": "SootopolisCity_Gym_B1F_EventScript_225D15",
+ "script": "SootopolisCity_Gym_B1F_EventScript_Tiffany",
"flag": "0"
},
{
@@ -89,7 +89,7 @@
"movement_range_y": 0,
"trainer_type": "1",
"trainer_sight_or_berry_tree_id": "2",
- "script": "SootopolisCity_Gym_B1F_EventScript_225D2C",
+ "script": "SootopolisCity_Gym_B1F_EventScript_Bethany",
"flag": "0"
},
{
@@ -102,7 +102,7 @@
"movement_range_y": 0,
"trainer_type": "1",
"trainer_sight_or_berry_tree_id": "2",
- "script": "SootopolisCity_Gym_B1F_EventScript_225CA2",
+ "script": "SootopolisCity_Gym_B1F_EventScript_Crissy",
"flag": "0"
},
{
@@ -115,7 +115,7 @@
"movement_range_y": 0,
"trainer_type": "1",
"trainer_sight_or_berry_tree_id": "3",
- "script": "SootopolisCity_Gym_B1F_EventScript_225CFE",
+ "script": "SootopolisCity_Gym_B1F_EventScript_Olivia",
"flag": "0"
},
{
@@ -128,7 +128,7 @@
"movement_range_y": 1,
"trainer_type": "1",
"trainer_sight_or_berry_tree_id": "3",
- "script": "SootopolisCity_Gym_B1F_EventScript_225D5A",
+ "script": "SootopolisCity_Gym_B1F_EventScript_Daphne",
"flag": "0"
},
{
@@ -141,7 +141,7 @@
"movement_range_y": 1,
"trainer_type": "1",
"trainer_sight_or_berry_tree_id": "3",
- "script": "SootopolisCity_Gym_B1F_EventScript_225D43",
+ "script": "SootopolisCity_Gym_B1F_EventScript_Annika",
"flag": "0"
}
],
diff --git a/data/maps/SootopolisCity_Gym_B1F/scripts.inc b/data/maps/SootopolisCity_Gym_B1F/scripts.inc
index 0f402b930..fad5878fb 100644
--- a/data/maps/SootopolisCity_Gym_B1F/scripts.inc
+++ b/data/maps/SootopolisCity_Gym_B1F/scripts.inc
@@ -1,183 +1,183 @@
SootopolisCity_Gym_B1F_MapScripts:: @ 8225C8A
.byte 0
-SootopolisCity_Gym_B1F_EventScript_225C8B:: @ 8225C8B
- trainerbattle_single TRAINER_ANDREA, SootopolisCity_Gym_B1F_Text_225D71, SootopolisCity_Gym_B1F_Text_225DB6
- msgbox SootopolisCity_Gym_B1F_Text_225DCF, MSGBOX_AUTOCLOSE
+SootopolisCity_Gym_B1F_EventScript_Andrea:: @ 8225C8B
+ trainerbattle_single TRAINER_ANDREA, SootopolisCity_Gym_B1F_Text_AndreaPreBattle, SootopolisCity_Gym_B1F_Text_AndreaDefeat
+ msgbox SootopolisCity_Gym_B1F_Text_AndreaPostBattle, MSGBOX_AUTOCLOSE
end
-SootopolisCity_Gym_B1F_EventScript_225CA2:: @ 8225CA2
- trainerbattle_single TRAINER_CRISSY, SootopolisCity_Gym_B1F_Text_225E04, SootopolisCity_Gym_B1F_Text_225E60
- msgbox SootopolisCity_Gym_B1F_Text_225E90, MSGBOX_AUTOCLOSE
+SootopolisCity_Gym_B1F_EventScript_Crissy:: @ 8225CA2
+ trainerbattle_single TRAINER_CRISSY, SootopolisCity_Gym_B1F_Text_CrissyPreBattle, SootopolisCity_Gym_B1F_Text_CrissyDefeat
+ msgbox SootopolisCity_Gym_B1F_Text_CrissyPostBattle, MSGBOX_AUTOCLOSE
end
-SootopolisCity_Gym_B1F_EventScript_225CB9:: @ 8225CB9
- trainerbattle_single TRAINER_BRIANNA, SootopolisCity_Gym_B1F_Text_22646E, SootopolisCity_Gym_B1F_Text_226495
- msgbox SootopolisCity_Gym_B1F_Text_2264BC, MSGBOX_AUTOCLOSE
+SootopolisCity_Gym_B1F_EventScript_Brianna:: @ 8225CB9
+ trainerbattle_single TRAINER_BRIANNA, SootopolisCity_Gym_B1F_Text_BriannaPreBattle, SootopolisCity_Gym_B1F_Text_BriannaDefeat
+ msgbox SootopolisCity_Gym_B1F_Text_BriannaPostBattle, MSGBOX_AUTOCLOSE
end
-SootopolisCity_Gym_B1F_EventScript_225CD0:: @ 8225CD0
- trainerbattle_single TRAINER_CONNIE, SootopolisCity_Gym_B1F_Text_225FBE, SootopolisCity_Gym_B1F_Text_225FEB
- msgbox SootopolisCity_Gym_B1F_Text_225FFE, MSGBOX_AUTOCLOSE
+SootopolisCity_Gym_B1F_EventScript_Connie:: @ 8225CD0
+ trainerbattle_single TRAINER_CONNIE, SootopolisCity_Gym_B1F_Text_ConniePreBattle, SootopolisCity_Gym_B1F_Text_ConnieDefeat
+ msgbox SootopolisCity_Gym_B1F_Text_ConniePostBattle, MSGBOX_AUTOCLOSE
end
-SootopolisCity_Gym_B1F_EventScript_225CE7:: @ 8225CE7
- trainerbattle_single TRAINER_BRIDGET, SootopolisCity_Gym_B1F_Text_226061, SootopolisCity_Gym_B1F_Text_2260B6
- msgbox SootopolisCity_Gym_B1F_Text_2260D1, MSGBOX_AUTOCLOSE
+SootopolisCity_Gym_B1F_EventScript_Bridget:: @ 8225CE7
+ trainerbattle_single TRAINER_BRIDGET, SootopolisCity_Gym_B1F_Text_BridgetPreBattle, SootopolisCity_Gym_B1F_Text_BridgetDefeat
+ msgbox SootopolisCity_Gym_B1F_Text_BridgetPostBattle, MSGBOX_AUTOCLOSE
end
-SootopolisCity_Gym_B1F_EventScript_225CFE:: @ 8225CFE
- trainerbattle_single TRAINER_OLIVIA, SootopolisCity_Gym_B1F_Text_226164, SootopolisCity_Gym_B1F_Text_2261A7
- msgbox SootopolisCity_Gym_B1F_Text_2261B5, MSGBOX_AUTOCLOSE
+SootopolisCity_Gym_B1F_EventScript_Olivia:: @ 8225CFE
+ trainerbattle_single TRAINER_OLIVIA, SootopolisCity_Gym_B1F_Text_OliviaPreBattle, SootopolisCity_Gym_B1F_Text_OliviaDefeat
+ msgbox SootopolisCity_Gym_B1F_Text_OliviaPostBattle, MSGBOX_AUTOCLOSE
end
-SootopolisCity_Gym_B1F_EventScript_225D15:: @ 8225D15
- trainerbattle_single TRAINER_TIFFANY, SootopolisCity_Gym_B1F_Text_2261F7, SootopolisCity_Gym_B1F_Text_226274
- msgbox SootopolisCity_Gym_B1F_Text_226286, MSGBOX_AUTOCLOSE
+SootopolisCity_Gym_B1F_EventScript_Tiffany:: @ 8225D15
+ trainerbattle_single TRAINER_TIFFANY, SootopolisCity_Gym_B1F_Text_TiffanyPreBattle, SootopolisCity_Gym_B1F_Text_TiffanyDefeat
+ msgbox SootopolisCity_Gym_B1F_Text_TiffanyPostBattle, MSGBOX_AUTOCLOSE
end
-SootopolisCity_Gym_B1F_EventScript_225D2C:: @ 8225D2C
- trainerbattle_single TRAINER_BETHANY, SootopolisCity_Gym_B1F_Text_2262F3, SootopolisCity_Gym_B1F_Text_22633B
- msgbox SootopolisCity_Gym_B1F_Text_226341, MSGBOX_AUTOCLOSE
+SootopolisCity_Gym_B1F_EventScript_Bethany:: @ 8225D2C
+ trainerbattle_single TRAINER_BETHANY, SootopolisCity_Gym_B1F_Text_BethanyPreBattle, SootopolisCity_Gym_B1F_Text_BethanyDefeat
+ msgbox SootopolisCity_Gym_B1F_Text_BethanyPostBattle, MSGBOX_AUTOCLOSE
end
-SootopolisCity_Gym_B1F_EventScript_225D43:: @ 8225D43
- trainerbattle_single TRAINER_ANNIKA, SootopolisCity_Gym_B1F_Text_226388, SootopolisCity_Gym_B1F_Text_2263BD
- msgbox SootopolisCity_Gym_B1F_Text_2263F4, MSGBOX_AUTOCLOSE
+SootopolisCity_Gym_B1F_EventScript_Annika:: @ 8225D43
+ trainerbattle_single TRAINER_ANNIKA, SootopolisCity_Gym_B1F_Text_AnnikaPreBattle, SootopolisCity_Gym_B1F_Text_AnnikaDefeat
+ msgbox SootopolisCity_Gym_B1F_Text_AnnikaPostBattle, MSGBOX_AUTOCLOSE
end
-SootopolisCity_Gym_B1F_EventScript_225D5A:: @ 8225D5A
- trainerbattle_single TRAINER_DAPHNE, SootopolisCity_Gym_B1F_Text_225ED6, SootopolisCity_Gym_B1F_Text_225F35
- msgbox SootopolisCity_Gym_B1F_Text_225F67, MSGBOX_AUTOCLOSE
+SootopolisCity_Gym_B1F_EventScript_Daphne:: @ 8225D5A
+ trainerbattle_single TRAINER_DAPHNE, SootopolisCity_Gym_B1F_Text_DaphnePreBattle, SootopolisCity_Gym_B1F_Text_DaphneDefeat
+ msgbox SootopolisCity_Gym_B1F_Text_DaphnePostBattle, MSGBOX_AUTOCLOSE
end
-SootopolisCity_Gym_B1F_Text_225D71: @ 8225D71
+SootopolisCity_Gym_B1F_Text_AndreaPreBattle: @ 8225D71
.string "I'll show you the sublime techniques\n"
.string "I learned from our LEADER JUAN!$"
-SootopolisCity_Gym_B1F_Text_225DB6: @ 8225DB6
+SootopolisCity_Gym_B1F_Text_AndreaDefeat: @ 8225DB6
.string "Please forgive me, JUAN…$"
-SootopolisCity_Gym_B1F_Text_225DCF: @ 8225DCF
+SootopolisCity_Gym_B1F_Text_AndreaPostBattle: @ 8225DCF
.string "Watch what happens if you crack all\n"
.string "the floor tiles.$"
-SootopolisCity_Gym_B1F_Text_225E04: @ 8225E04
+SootopolisCity_Gym_B1F_Text_CrissyPreBattle: @ 8225E04
.string "You came all the way here, but you won't\n"
.string "get to see JUAN.\p"
.string "Not if you lose to me, you won't!$"
-SootopolisCity_Gym_B1F_Text_225E60: @ 8225E60
+SootopolisCity_Gym_B1F_Text_CrissyDefeat: @ 8225E60
.string "You're strong!\n"
.string "I was fooled by your cute looks!$"
-SootopolisCity_Gym_B1F_Text_225E90: @ 8225E90
+SootopolisCity_Gym_B1F_Text_CrissyPostBattle: @ 8225E90
.string "You might be good enough to avoid\n"
.string "being wiped out in one hit by JUAN.$"
-SootopolisCity_Gym_B1F_Text_225ED6: @ 8225ED6
+SootopolisCity_Gym_B1F_Text_DaphnePreBattle: @ 8225ED6
.string "The sight of JUAN conducting\n"
.string "a battle…\p"
.string "The very beauty of it compelled me to\n"
.string "become a TRAINER.$"
-SootopolisCity_Gym_B1F_Text_225F35: @ 8225F35
+SootopolisCity_Gym_B1F_Text_DaphneDefeat: @ 8225F35
.string "You battled with more beauty than\n"
.string "I could muster…$"
-SootopolisCity_Gym_B1F_Text_225F67: @ 8225F67
+SootopolisCity_Gym_B1F_Text_DaphnePostBattle: @ 8225F67
.string "The grace you bring to battle is\n"
.string "fabulous.\p"
.string "Oh… I'm so fortunate to have found\n"
.string "POKéMON.$"
-SootopolisCity_Gym_B1F_Text_225FBE: @ 8225FBE
+SootopolisCity_Gym_B1F_Text_ConniePreBattle: @ 8225FBE
.string "I should teach you how harsh battles\n"
.string "can be.$"
-SootopolisCity_Gym_B1F_Text_225FEB: @ 8225FEB
+SootopolisCity_Gym_B1F_Text_ConnieDefeat: @ 8225FEB
.string "Oh.\n"
.string "You're strong.$"
-SootopolisCity_Gym_B1F_Text_225FFE: @ 8225FFE
+SootopolisCity_Gym_B1F_Text_ConniePostBattle: @ 8225FFE
.string "I'll tell you something good.\p"
.string "If you want to reach JUAN, you\n"
.string "need to walk on each floor tile once.$"
-SootopolisCity_Gym_B1F_Text_226061: @ 8226061
+SootopolisCity_Gym_B1F_Text_BridgetPreBattle: @ 8226061
.string "The POKéMON GYM of the highest level\n"
.string "in the HOENN region…\p"
.string "That's the SOOTOPOLIS GYM.$"
-SootopolisCity_Gym_B1F_Text_2260B6: @ 82260B6
+SootopolisCity_Gym_B1F_Text_BridgetDefeat: @ 82260B6
.string "What a high level you are!$"
-SootopolisCity_Gym_B1F_Text_2260D1: @ 82260D1
+SootopolisCity_Gym_B1F_Text_BridgetPostBattle: @ 82260D1
.string "Rather than being satisfied by being\n"
.string "in a strong GYM, I imagine training in\l"
.string "other places will make you stronger.\l"
.string "But above all, it looks more fun.$"
-SootopolisCity_Gym_B1F_Text_226164: @ 8226164
+SootopolisCity_Gym_B1F_Text_OliviaPreBattle: @ 8226164
.string "I train my POKéMON together with\n"
.string "JUAN.\p"
.string "Don't think I'm a pushover.$"
-SootopolisCity_Gym_B1F_Text_2261A7: @ 82261A7
+SootopolisCity_Gym_B1F_Text_OliviaDefeat: @ 82261A7
.string "I was beaten…$"
-SootopolisCity_Gym_B1F_Text_2261B5: @ 82261B5
+SootopolisCity_Gym_B1F_Text_OliviaPostBattle: @ 82261B5
.string "I think you have potential.\n"
.string "Why don't you stay and train with us?$"
-SootopolisCity_Gym_B1F_Text_2261F7: @ 82261F7
+SootopolisCity_Gym_B1F_Text_TiffanyPreBattle: @ 82261F7
.string "A graceful glide across the ice while\n"
.string "crossing no lines…\p"
.string "A TRAINER putting on that performance\n"
.string "would be elegantly beautiful!$"
-SootopolisCity_Gym_B1F_Text_226274: @ 8226274
+SootopolisCity_Gym_B1F_Text_TiffanyDefeat: @ 8226274
.string "Well, excuse me?!$"
-SootopolisCity_Gym_B1F_Text_226286: @ 8226286
+SootopolisCity_Gym_B1F_Text_TiffanyPostBattle: @ 8226286
.string "This is really obvious, but how strong\n"
.string "you are as a TRAINER has nothing to do\l"
.string "with how young or old you are.$"
-SootopolisCity_Gym_B1F_Text_2262F3: @ 82262F3
+SootopolisCity_Gym_B1F_Text_BethanyPreBattle: @ 82262F3
.string "When I'm with my POKéMON, the time\n"
.string "flies by before you can say, “Oops!”$"
-SootopolisCity_Gym_B1F_Text_22633B: @ 822633B
+SootopolisCity_Gym_B1F_Text_BethanyDefeat: @ 822633B
.string "Oops!$"
-SootopolisCity_Gym_B1F_Text_226341: @ 8226341
+SootopolisCity_Gym_B1F_Text_BethanyPostBattle: @ 8226341
.string "I wish I could forget about lost causes\n"
.string "before I can manage an “Oops!”$"
-SootopolisCity_Gym_B1F_Text_226388: @ 8226388
+SootopolisCity_Gym_B1F_Text_AnnikaPreBattle: @ 8226388
.string "I can battle with really rare POKéMON\n"
.string "if you'd like.$"
-SootopolisCity_Gym_B1F_Text_2263BD: @ 82263BD
+SootopolisCity_Gym_B1F_Text_AnnikaDefeat: @ 82263BD
.string "Oh, there now! Did you have a good look\n"
.string "at my POKéMON?$"
-SootopolisCity_Gym_B1F_Text_2263F4: @ 82263F4
+SootopolisCity_Gym_B1F_Text_AnnikaPostBattle: @ 82263F4
.string "I came to this GYM because JUAN\n"
.string "praised me for my darling POKéMON.\p"
.string "Oh, if only I'd met JUAN years ago\n"
.string "when I was younger…$"
-SootopolisCity_Gym_B1F_Text_22646E: @ 822646E
+SootopolisCity_Gym_B1F_Text_BriannaPreBattle: @ 822646E
.string "Giggle…\n"
.string "Your grim look is so charming.$"
-SootopolisCity_Gym_B1F_Text_226495: @ 8226495
+SootopolisCity_Gym_B1F_Text_BriannaDefeat: @ 8226495
.string "Oh, dear.\n"
.string "I went much too easy on you.$"
-SootopolisCity_Gym_B1F_Text_2264BC: @ 82264BC
+SootopolisCity_Gym_B1F_Text_BriannaPostBattle: @ 82264BC
.string "You couldn't lay a finger on JUAN,\n"
.string "I'm sure. Giggle…$"
diff --git a/data/mossdeep_gym.s b/data/mossdeep_gym.s
index 01eb792b7..c7c5169e8 100644
--- a/data/mossdeep_gym.s
+++ b/data/mossdeep_gym.s
@@ -26,18 +26,18 @@ gUnknown_086126A4:: @ 86126A4
free_unlock_anim
step_end
-gUnknown_086126A8:: @ 86126A8
+MossdeepGym_Movement_FaceRight:: @ 86126A8
face_right
step_end
-gUnknown_086126AA:: @ 86126AA
+MossdeepGym_Movement_FaceDown:: @ 86126AA
face_down
step_end
-gUnknown_086126AC:: @ 86126AC
+MossdeepGym_Movement_FaceLeft:: @ 86126AC
face_left
step_end
-gUnknown_086126AE:: @ 86126AE
+MossdeepGym_Movement_FaceUp:: @ 86126AE
face_up
step_end
diff --git a/data/scripts/shared_secret_base.inc b/data/scripts/shared_secret_base.inc
index 933835a73..3f83e38b0 100644
--- a/data/scripts/shared_secret_base.inc
+++ b/data/scripts/shared_secret_base.inc
@@ -20,7 +20,7 @@ SecretBase_MapScript2_OnFrame: @ 823B4AE
.2byte 0
SecretBase_MapScript1_OnResume: @ 823B4B8
- setstepcallback 6
+ setstepcallback STEP_CB_SECRET_BASE
end
SecretBase_EventScript_PC:: @ 823B4BB
diff --git a/data/specials.inc b/data/specials.inc
index 6a328ca9e..4298d58c5 100644
--- a/data/specials.inc
+++ b/data/specials.inc
@@ -156,8 +156,8 @@ gSpecials:: @ 81DBA64
def_special DrawWholeMapView
def_special StorePlayerCoordsInVars
def_special MauvilleGymSpecial3
- def_special PetalburgGymSpecial1
- def_special PetalburgGymSpecial2
+ def_special PetalburgGymSlideOpenRoomDoors
+ def_special PetalburgGymUnlockRoomDoors
def_special GetPlayerTrainerIdOnesDigit
def_special GetPlayerBigGuyGirlString
def_special GetRivalSonDaughterString
diff --git a/data/text/berries.inc b/data/text/berries.inc
index 489acd4b6..ca9481f52 100644
--- a/data/text/berries.inc
+++ b/data/text/berries.inc
@@ -1,4 +1,4 @@
-PetalburgCity_Gym_Text_2A6D3D: @ 82A6D3D
+PetalburgCity_Gym_Text_GiveEnigmaBerry: @ 82A6D3D
.string "DAD: Hi, {PLAYER}!\p"
.string "I just received a very rare BERRY.\n"
.string "I'd like you to have it.$"
diff --git a/include/constants/field_tasks.h b/include/constants/field_tasks.h
new file mode 100644
index 000000000..7f773855d
--- /dev/null
+++ b/include/constants/field_tasks.h
@@ -0,0 +1,13 @@
+#ifndef GUARD_CONSTANTS_FIELD_TASKS_H
+#define GUARD_CONSTANTS_FIELD_TASKS_H
+
+#define STEP_CB_DUMMY 0
+#define STEP_CB_ASH 1
+#define STEP_CB_FORTREE_BRIDGE 2
+#define STEP_CB_PACIFIDLOG_BRIDGE 3
+#define STEP_CB_SOOTOPOLIS_ICE 4
+#define STEP_CB_TRUCK 5
+#define STEP_CB_SECRET_BASE 6
+#define STEP_CB_CRACKED_FLOOR 7
+
+#endif // GUARD_CONSTANTS_FIELD_TASKS_H
diff --git a/include/constants/flags.h b/include/constants/flags.h
index d90451ad7..f47b0dff6 100644
--- a/include/constants/flags.h
+++ b/include/constants/flags.h
@@ -1549,7 +1549,7 @@
// Special Flags (Unknown)
#define SPECIAL_FLAGS_START 0x4000
#define FLAG_HIDE_MAP_NAME_POPUP 0x4000
-#define FLAG_SPECIAL_FLAG_0x4001 0x4001
+#define FLAG_DONT_TRANSITION_MUSIC 0x4001
#define FLAG_SPECIAL_FLAG_0x4002 0x4002
#define FLAG_SPECIAL_FLAG_0x4003 0x4003
#define FLAG_SPECIAL_FLAG_0x4004 0x4004
diff --git a/include/constants/metatile_labels.h b/include/constants/metatile_labels.h
index 8fe95b464..ea54d04a8 100644
--- a/include/constants/metatile_labels.h
+++ b/include/constants/metatile_labels.h
@@ -75,6 +75,8 @@
#define METATILE_MossdeepGym_OuterWall_RightCorner 0x205
#define METATILE_MossdeepGym_Empty0 0x238
#define METATILE_MossdeepGym_Empty1 0x239
+#define METATILE_MossdeepGym_YellowRightArrow 0x250
+
// gTileset_BrendansMaysHouse
#define METATILE_BrendansMaysHouse_BrendanPC_Off 0x25A
diff --git a/include/constants/vars.h b/include/constants/vars.h
index 72b15654e..3af9e3b7c 100644
--- a/include/constants/vars.h
+++ b/include/constants/vars.h
@@ -147,7 +147,7 @@
#define VAR_LITTLEROOT_HOUSES_STATE 0x4082
#define VAR_UNUSED_0x4083 0x4083 // Unused Var
#define VAR_BIRCH_LAB_STATE 0x4084
-#define VAR_PETALBURG_GYM_STATE 0x4085
+#define VAR_PETALBURG_GYM_STATE 0x4085 // 0-1: Wally tutorial, 2-6: 0-4 badges, 7: Defeated Norman, 8: Rematch Norman
#define VAR_LINK_CONTEST_ROOM_STATE 0x4086
#define VAR_CABLE_CLUB_STATE 0x4087
#define VAR_CONTEST_LOCATION 0x4088
diff --git a/src/field_special_scene.c b/src/field_special_scene.c
index dbf68e1a2..231f4dd42 100644
--- a/src/field_special_scene.c
+++ b/src/field_special_scene.c
@@ -302,7 +302,7 @@ void Task_HandlePorthole(u8 taskId)
}
break;
case EXIT_PORTHOLE: // exit porthole.
- FlagClear(FLAG_SPECIAL_FLAG_0x4001);
+ FlagClear(FLAG_DONT_TRANSITION_MUSIC);
FlagClear(FLAG_HIDE_MAP_NAME_POPUP);
SetWarpDestinationToDynamicWarp(0);
DoDiveWarp();
@@ -339,7 +339,7 @@ void sub_80FB768(void)
void sub_80FB7A4(void)
{
FlagSet(FLAG_SYS_CRUISE_MODE);
- FlagSet(FLAG_SPECIAL_FLAG_0x4001);
+ FlagSet(FLAG_DONT_TRANSITION_MUSIC);
FlagSet(FLAG_HIDE_MAP_NAME_POPUP);
SetDynamicWarp(0, gSaveBlock1Ptr->location.mapGroup, gSaveBlock1Ptr->location.mapNum, -1);
sub_80FB59C();
diff --git a/src/field_specials.c b/src/field_specials.c
index 7a43eca67..31b3df62c 100644
--- a/src/field_specials.c
+++ b/src/field_specials.c
@@ -68,8 +68,8 @@
EWRAM_DATA bool8 gBikeCyclingChallenge = FALSE;
EWRAM_DATA u8 gBikeCollisions = 0;
static EWRAM_DATA u32 sBikeCyclingTimer = 0;
-static EWRAM_DATA u8 sUnknown_0203AB5C = 0;
-static EWRAM_DATA u8 sPetalburgGymSlidingDoorFrameCounter = 0;
+static EWRAM_DATA u8 sSlidingDoorNextFrameCounter = 0;
+static EWRAM_DATA u8 sSlidingDoorFrame = 0;
static EWRAM_DATA u8 sTutorMoveAndElevatorWindowId = 0;
static EWRAM_DATA u16 sLilycoveDeptStore_NeverRead = 0;
static EWRAM_DATA u16 sLilycoveDeptStore_DefaultFloorChoice = 0;
@@ -95,8 +95,8 @@ u16 GetNumMovedLilycoveFanClubMembers(void);
static void RecordCyclingRoadResults(u32, u8);
static void LoadLinkPartnerEventObjectSpritePalette(u8 graphicsId, u8 localEventId, u8 paletteNum);
-static void Task_PetalburgGym(u8);
-static void PetalburgGymFunc(u8, u16);
+static void Task_PetalburgGymSlideOpenRoomDoors(u8 taskId);
+static void PetalburgGymSetDoorMetatiles(u8 roomNumber, u16 metatileId);
static void Task_PCTurnOnEffect(u8);
static void PCTurnOnEffect_0(struct Task *);
static void PCTurnOnEffect_1(s16, s8, s8);
@@ -814,7 +814,7 @@ void MauvilleGymSpecial3(void)
}
}
-static const u8 gUnknown_085B2B78[] = {0, 1, 1, 1, 1};
+static const bool8 sSlidingDoorNextFrameDelay[] = {0, 1, 1, 1, 1};
static const u16 sPetalburgGymSlidingDoorMetatiles[] = {
METATILE_ID(PetalburgGym, SlidingDoor_Frame0),
@@ -824,21 +824,21 @@ static const u16 sPetalburgGymSlidingDoorMetatiles[] = {
METATILE_ID(PetalburgGym, SlidingDoor_Frame4),
};
-void PetalburgGymSpecial1(void)
+void PetalburgGymSlideOpenRoomDoors(void)
{
- sUnknown_0203AB5C = 0;
- sPetalburgGymSlidingDoorFrameCounter = 0;
+ sSlidingDoorNextFrameCounter = 0;
+ sSlidingDoorFrame = 0;
PlaySE(SE_KI_GASYAN);
- CreateTask(Task_PetalburgGym, 8);
+ CreateTask(Task_PetalburgGymSlideOpenRoomDoors, 8);
}
-static void Task_PetalburgGym(u8 taskId)
+static void Task_PetalburgGymSlideOpenRoomDoors(u8 taskId)
{
- if (gUnknown_085B2B78[sPetalburgGymSlidingDoorFrameCounter] == sUnknown_0203AB5C)
+ if (sSlidingDoorNextFrameDelay[sSlidingDoorFrame] == sSlidingDoorNextFrameCounter)
{
- PetalburgGymFunc(gSpecialVar_0x8004, sPetalburgGymSlidingDoorMetatiles[sPetalburgGymSlidingDoorFrameCounter]);
- sUnknown_0203AB5C = 0;
- if ((++sPetalburgGymSlidingDoorFrameCounter) == ARRAY_COUNT(sPetalburgGymSlidingDoorMetatiles))
+ PetalburgGymSetDoorMetatiles(gSpecialVar_0x8004, sPetalburgGymSlidingDoorMetatiles[sSlidingDoorFrame]);
+ sSlidingDoorNextFrameCounter = 0;
+ if ((++sSlidingDoorFrame) == ARRAY_COUNT(sPetalburgGymSlidingDoorMetatiles))
{
DestroyTask(taskId);
EnableBothScriptContexts();
@@ -846,11 +846,11 @@ static void Task_PetalburgGym(u8 taskId)
}
else
{
- sUnknown_0203AB5C++;
+ sSlidingDoorNextFrameCounter++;
}
}
-static void PetalburgGymFunc(u8 roomNumber, u16 metatileId)
+static void PetalburgGymSetDoorMetatiles(u8 roomNumber, u16 metatileId)
{
u16 doorCoordsX[4];
u16 doorCoordsY[4];
@@ -915,9 +915,9 @@ static void PetalburgGymFunc(u8 roomNumber, u16 metatileId)
DrawWholeMapView();
}
-void PetalburgGymSpecial2(void)
+void PetalburgGymUnlockRoomDoors(void)
{
- PetalburgGymFunc(gSpecialVar_0x8004, sPetalburgGymSlidingDoorMetatiles[4]);
+ PetalburgGymSetDoorMetatiles(gSpecialVar_0x8004, sPetalburgGymSlidingDoorMetatiles[4]);
}
void ShowFieldMessageStringVar4(void)
diff --git a/src/field_tasks.c b/src/field_tasks.c
index 63539e475..21b2732c3 100644
--- a/src/field_tasks.c
+++ b/src/field_tasks.c
@@ -16,6 +16,7 @@
#include "secret_base.h"
#include "sound.h"
#include "task.h"
+#include "constants/field_tasks.h"
#include "constants/items.h"
#include "constants/songs.h"
#include "constants/vars.h"
@@ -38,14 +39,14 @@ static void Task_MuddySlope(u8 taskId);
static const TaskFunc sPerStepCallbacks[] =
{
- DummyPerStepCallback,
- AshGrassPerStepCallback,
- FortreeBridgePerStepCallback,
- PacifidlogBridgePerStepCallback,
- SootopolisGymIcePerStepCallback,
- EndTruckSequence,
- SecretBasePerStepCallback,
- CrackedFloorPerStepCallback
+ [STEP_CB_DUMMY] = DummyPerStepCallback,
+ [STEP_CB_ASH] = AshGrassPerStepCallback,
+ [STEP_CB_FORTREE_BRIDGE] = FortreeBridgePerStepCallback,
+ [STEP_CB_PACIFIDLOG_BRIDGE] = PacifidlogBridgePerStepCallback,
+ [STEP_CB_SOOTOPOLIS_ICE] = SootopolisGymIcePerStepCallback,
+ [STEP_CB_TRUCK] = EndTruckSequence,
+ [STEP_CB_SECRET_BASE] = SecretBasePerStepCallback,
+ [STEP_CB_CRACKED_FLOOR] = CrackedFloorPerStepCallback
};
// they are in pairs but declared as 1D array
diff --git a/src/mossdeep_gym.c b/src/mossdeep_gym.c
index bc279334b..2dc641705 100644
--- a/src/mossdeep_gym.c
+++ b/src/mossdeep_gym.c
@@ -12,10 +12,10 @@ extern const u8 gUnknown_08612698[];
extern const u8 gUnknown_0861269C[];
extern const u8 gUnknown_086126A0[];
extern const u8 gUnknown_086126A4[];
-extern const u8 gUnknown_086126A8[];
-extern const u8 gUnknown_086126AA[];
-extern const u8 gUnknown_086126AC[];
-extern const u8 gUnknown_086126AE[];
+extern const u8 MossdeepGym_Movement_FaceRight[];
+extern const u8 MossdeepGym_Movement_FaceDown[];
+extern const u8 MossdeepGym_Movement_FaceLeft[];
+extern const u8 MossdeepGym_Movement_FaceUp[];
struct MossdeepSubStruct
{
@@ -35,23 +35,23 @@ static void AddEventObject(u8 eventTemplateId, u8 arg1);
static void sub_81A8D94(u8 eventTemplateId, u8 arg1);
// EWRAM vars
-EWRAM_DATA static struct MossdeepStruct *gUnknown_0203CE50 = NULL;
+EWRAM_DATA static struct MossdeepStruct *sMossdeepGym = NULL;
// code
void InitMossdeepGymTiles(bool8 arg0)
{
- if (gUnknown_0203CE50 == NULL)
- gUnknown_0203CE50 = AllocZeroed(sizeof(*gUnknown_0203CE50));
+ if (sMossdeepGym == NULL)
+ sMossdeepGym = AllocZeroed(sizeof(*sMossdeepGym));
- gUnknown_0203CE50->unk41 = arg0;
+ sMossdeepGym->unk41 = arg0;
}
void FinishMossdeepGymTiles(void)
{
u8 id;
- if (gUnknown_0203CE50 != NULL)
- FREE_AND_SET_NULL(gUnknown_0203CE50);
+ if (sMossdeepGym != NULL)
+ FREE_AND_SET_NULL(sMossdeepGym);
id = GetEventObjectIdByLocalIdAndMap(EVENT_OBJ_ID_PLAYER, 0, 0);
EventObjectClearHeldMovementIfFinished(&gEventObjects[id]);
@@ -72,7 +72,7 @@ u16 MossdeepGym_MoveEvents(u8 arg0)
s16 y = events[i].y + 7;
u16 metatile = MapGridGetMetatileIdAt(x, y);
- if (!gUnknown_0203CE50->unk41)
+ if (!sMossdeepGym->unk41)
var = 0x250;
else
var = 0x298;
@@ -138,26 +138,26 @@ void MossdeepGym_TurnEvents(void)
s32 var;
struct EventObjectTemplate *events;
- if (gUnknown_0203CE50 == NULL)
+ if (sMossdeepGym == NULL)
return;
- if (!gUnknown_0203CE50->unk41)
+ if (!sMossdeepGym->unk41)
var = 0x250;
else
var = 0x298;
events = gSaveBlock1Ptr->eventObjectTemplates;
- for (i = 0; i < gUnknown_0203CE50->count; i++)
+ for (i = 0; i < sMossdeepGym->count; i++)
{
s32 r6;
s8 r0;
u8 eventObjectId;
- s16 x = events[gUnknown_0203CE50->objects[i].eventTemplateId].x + 7;
- s16 y = events[gUnknown_0203CE50->objects[i].eventTemplateId].y + 7;
+ s16 x = events[sMossdeepGym->objects[i].eventTemplateId].x + 7;
+ s16 y = events[sMossdeepGym->objects[i].eventTemplateId].y + 7;
u16 metatile = MapGridGetMetatileIdAt(x, y);
r0 = (u8)((metatile - var) % 8);
- r0 -= (gUnknown_0203CE50->objects[i].unk0);
+ r0 -= (sMossdeepGym->objects[i].unk0);
if (r0 < 0 || r0 == 3)
{
if (r0 == -3)
@@ -173,7 +173,7 @@ void MossdeepGym_TurnEvents(void)
r6 = 2;
}
- eventObjectId = GetEventObjectIdByLocalIdAndMap(events[gUnknown_0203CE50->objects[i].eventTemplateId].localId, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup);
+ eventObjectId = GetEventObjectIdByLocalIdAndMap(events[sMossdeepGym->objects[i].eventTemplateId].localId, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup);
if (eventObjectId != EVENT_OBJECTS_COUNT)
{
const u8 *movementScript;
@@ -183,25 +183,25 @@ void MossdeepGym_TurnEvents(void)
switch (direction)
{
case DIR_EAST:
- movementScript = gUnknown_086126AE;
- events[gUnknown_0203CE50->objects[i].eventTemplateId].movementType = MOVEMENT_TYPE_FACE_UP;
+ movementScript = MossdeepGym_Movement_FaceUp;
+ events[sMossdeepGym->objects[i].eventTemplateId].movementType = MOVEMENT_TYPE_FACE_UP;
break;
case DIR_SOUTH:
- movementScript = gUnknown_086126A8;
- events[gUnknown_0203CE50->objects[i].eventTemplateId].movementType = MOVEMENT_TYPE_FACE_RIGHT;
+ movementScript = MossdeepGym_Movement_FaceRight;
+ events[sMossdeepGym->objects[i].eventTemplateId].movementType = MOVEMENT_TYPE_FACE_RIGHT;
break;
case DIR_WEST:
- movementScript = gUnknown_086126AA;
- events[gUnknown_0203CE50->objects[i].eventTemplateId].movementType = MOVEMENT_TYPE_FACE_DOWN;
+ movementScript = MossdeepGym_Movement_FaceDown;
+ events[sMossdeepGym->objects[i].eventTemplateId].movementType = MOVEMENT_TYPE_FACE_DOWN;
break;
case DIR_NORTH:
- movementScript = gUnknown_086126AC;
- events[gUnknown_0203CE50->objects[i].eventTemplateId].movementType = MOVEMENT_TYPE_FACE_LEFT;
+ movementScript = MossdeepGym_Movement_FaceLeft;
+ events[sMossdeepGym->objects[i].eventTemplateId].movementType = MOVEMENT_TYPE_FACE_LEFT;
break;
default:
continue;
}
- ScriptMovement_StartObjectMovementScript(events[gUnknown_0203CE50->objects[i].eventTemplateId].localId,
+ ScriptMovement_StartObjectMovementScript(events[sMossdeepGym->objects[i].eventTemplateId].localId,
gSaveBlock1Ptr->location.mapNum,
gSaveBlock1Ptr->location.mapGroup,
movementScript);
@@ -211,25 +211,25 @@ void MossdeepGym_TurnEvents(void)
switch (direction)
{
case DIR_EAST:
- movementScript = gUnknown_086126AA;
- events[gUnknown_0203CE50->objects[i].eventTemplateId].movementType = MOVEMENT_TYPE_FACE_DOWN;
+ movementScript = MossdeepGym_Movement_FaceDown;
+ events[sMossdeepGym->objects[i].eventTemplateId].movementType = MOVEMENT_TYPE_FACE_DOWN;
break;
case DIR_SOUTH:
- movementScript = gUnknown_086126AC;
- events[gUnknown_0203CE50->objects[i].eventTemplateId].movementType = MOVEMENT_TYPE_FACE_LEFT;
+ movementScript = MossdeepGym_Movement_FaceLeft;
+ events[sMossdeepGym->objects[i].eventTemplateId].movementType = MOVEMENT_TYPE_FACE_LEFT;
break;
case DIR_WEST:
- movementScript = gUnknown_086126AE;
- events[gUnknown_0203CE50->objects[i].eventTemplateId].movementType = MOVEMENT_TYPE_FACE_UP;
+ movementScript = MossdeepGym_Movement_FaceUp;
+ events[sMossdeepGym->objects[i].eventTemplateId].movementType = MOVEMENT_TYPE_FACE_UP;
break;
case DIR_NORTH:
- movementScript = gUnknown_086126A8;
- events[gUnknown_0203CE50->objects[i].eventTemplateId].movementType = MOVEMENT_TYPE_FACE_RIGHT;
+ movementScript = MossdeepGym_Movement_FaceRight;
+ events[sMossdeepGym->objects[i].eventTemplateId].movementType = MOVEMENT_TYPE_FACE_RIGHT;
break;
default:
continue;
}
- ScriptMovement_StartObjectMovementScript(events[gUnknown_0203CE50->objects[i].eventTemplateId].localId,
+ ScriptMovement_StartObjectMovementScript(events[sMossdeepGym->objects[i].eventTemplateId].localId,
gSaveBlock1Ptr->location.mapNum,
gSaveBlock1Ptr->location.mapGroup,
movementScript);
@@ -240,9 +240,9 @@ void MossdeepGym_TurnEvents(void)
static void AddEventObject(u8 eventTemplateId, u8 arg1)
{
- gUnknown_0203CE50->objects[gUnknown_0203CE50->count].eventTemplateId = eventTemplateId;
- gUnknown_0203CE50->objects[gUnknown_0203CE50->count].unk0 = arg1;
- gUnknown_0203CE50->count++;
+ sMossdeepGym->objects[sMossdeepGym->count].eventTemplateId = eventTemplateId;
+ sMossdeepGym->objects[sMossdeepGym->count].unk0 = arg1;
+ sMossdeepGym->count++;
}
static void sub_81A8D94(u8 eventTemplateId, u8 arg1)
@@ -256,7 +256,7 @@ static void sub_81A8D94(u8 eventTemplateId, u8 arg1)
s16 y = events[eventTemplateId].y + 7;
u16 metatile = MapGridGetMetatileIdAt(x, y);
- if (!gUnknown_0203CE50->unk41)
+ if (!sMossdeepGym->unk41)
var = 0x250;
else
var = 0x298;
diff --git a/src/overworld.c b/src/overworld.c
index e32024c77..855b2d64c 100644
--- a/src/overworld.c
+++ b/src/overworld.c
@@ -1183,7 +1183,7 @@ void Overworld_ClearSavedMusic(void)
static void sub_8085810(void)
{
- if (FlagGet(FLAG_SPECIAL_FLAG_0x4001) != TRUE)
+ if (FlagGet(FLAG_DONT_TRANSITION_MUSIC) != TRUE)
{
u16 newMusic = GetWarpDestinationMusic();
u16 currentMusic = GetCurrentMapMusic();
@@ -1231,7 +1231,7 @@ void TryFadeOutOldMapMusic(void)
{
u16 currentMusic = GetCurrentMapMusic();
u16 warpMusic = GetWarpDestinationMusic();
- if (FlagGet(FLAG_SPECIAL_FLAG_0x4001) != TRUE && warpMusic != GetCurrentMapMusic())
+ if (FlagGet(FLAG_DONT_TRANSITION_MUSIC) != TRUE && warpMusic != GetCurrentMapMusic())
{
if (currentMusic == MUS_NAMINORI
&& VarGet(VAR_SKY_PILLAR_STATE) == 2