summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhuderlem <huderlem@gmail.com>2019-10-19 08:05:11 -0500
committerGitHub <noreply@github.com>2019-10-19 08:05:11 -0500
commitcb9f89925f35e2b0e7f13644a8bda90cd6c387bf (patch)
tree22242b9f9d9a22096de6d5a0e7190b7b07a23a68
parent8b1df92aca6c9d0eb3bcd932be7795eda879c2a0 (diff)
parentb4a9298205ee9355fadd4455a9b8f692dcd3e787 (diff)
Merge pull request #841 from GriffinRichards/document-gyms2
Document Petalburg, Fortree, Mossdeep, and Sootopolis Gyms
-rw-r--r--asm/macros/event.inc25
-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.json52
-rw-r--r--data/maps/MossdeepCity_Gym/scripts.inc448
-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/Route110_TrickHousePuzzle7/scripts.inc40
-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.inc163
-rw-r--r--data/maps/SootopolisCity_Gym_B1F/map.json20
-rw-r--r--data/maps/SootopolisCity_Gym_B1F/scripts.inc120
-rw-r--r--data/rotating_tile_puzzle.s (renamed from data/mossdeep_gym.s)16
-rw-r--r--data/script_cmd_table.inc10
-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.h10
-rw-r--r--include/constants/metatile_labels.h18
-rw-r--r--include/constants/vars.h2
-rw-r--r--include/field_screen_effect.h2
-rw-r--r--include/mossdeep_gym.h9
-rw-r--r--include/rotating_tile_puzzle.h9
-rw-r--r--ld_script.txt6
-rw-r--r--src/field_control_avatar.c2
-rw-r--r--src/field_screen_effect.c2
-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.c314
-rw-r--r--src/overworld.c4
-rw-r--r--src/rotating_tile_puzzle.c338
-rw-r--r--src/scrcmd.c26
-rw-r--r--sym_ewram.txt2
49 files changed, 1528 insertions, 1472 deletions
diff --git a/asm/macros/event.inc b/asm/macros/event.inc
index 57bb504bd..39510c207 100644
--- a/asm/macros/event.inc
+++ b/asm/macros/event.inc
@@ -1468,31 +1468,34 @@
.byte \location
.endm
- .macro mossdeepgym1 unknown:req
+ @ For the rotating tile puzzles in Mossdeep Gym/Trick House Room 7. Moves the objects on the colored puzzle specified by puzzleNumber one rotation
+ .macro moverotatingtileobjects puzzleNumber:req
.byte 0xd3
- .2byte \unknown
+ .2byte \puzzleNumber
.endm
- .macro mossdeepgym2
+ @ For the rotating tile puzzles in Mossdeep Gym/Trick House Room 7. Updates the facing direction of all objects on the puzzle tiles
+ .macro turnrotatingtileobjects
.byte 0xd4
.endm
- @ In FireRed, this command is a nop.
- .macro mossdeepgym3 var:req
+ @ For the rotating tile puzzles in Mossdeep Gym/Trick House Room 7. Allocates memory for the puzzle objects. isTrickHouse is needed to determine which of the two maps the puzzle is on, in order to know where in the tileset the puzzle tiles start. In FireRed, this command is a nop.
+ .macro initrotatingtilepuzzle isTrickHouse:req
.byte 0xd5
- .2byte \var
+ .2byte \isTrickHouse
.endm
- .macro mossdeepgym4
+ @ For the rotating tile puzzles in Mossdeep Gym/Trick House Room 7. Frees the memory allocated for the puzzle objects.
+ .macro freerotatingtilepuzzle
.byte 0xd6
.endm
- .macro warp7 map:req, byte:req, word1:req, word2:req
+ .macro warpmossdeepgym map:req, warpId:req, x:req, y:req
.byte 0xd7
map \map
- .byte \byte
- .2byte \word1
- .2byte \word2
+ .byte \warpId
+ .2byte \x
+ .2byte \y
.endm
.macro cmdD8
diff --git a/data/event_scripts.s b/data/event_scripts.s
index a8ab73968..62489d1fb 100644
--- a/data/event_scripts.s
+++ b/data/event_scripts.s
@@ -15,6 +15,7 @@
#include "constants/field_effects.h"
#include "constants/field_poison.h"
#include "constants/field_specials.h"
+#include "constants/field_tasks.h"
#include "constants/flags.h"
#include "constants/game_stat.h"
#include "constants/item.h"
@@ -1250,12 +1251,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
@@ -1277,7 +1278,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 a36031664..34853336d 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 afd77cf10..f465b0694 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_SetHoleWarp: @ 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 2ccf628c0..888288633 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_SetHoleWarp: @ 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 854619f1c..a54b2ccca 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_SetHoleWarp: @ 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..33bd1d434 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"
},
{
@@ -591,7 +591,7 @@
"elevation": 3,
"var": "VAR_TEMP_1",
"var_value": "0",
- "script": "MossdeepCity_Gym_EventScript_220C67"
+ "script": "MossdeepCity_Gym_EventScript_YellowFloorSwitch"
},
{
"type": "trigger",
@@ -600,7 +600,7 @@
"elevation": 3,
"var": "VAR_TEMP_1",
"var_value": "0",
- "script": "MossdeepCity_Gym_EventScript_220C7D"
+ "script": "MossdeepCity_Gym_EventScript_BlueFloorSwitch"
},
{
"type": "trigger",
@@ -609,7 +609,7 @@
"elevation": 3,
"var": "VAR_TEMP_1",
"var_value": "0",
- "script": "MossdeepCity_Gym_EventScript_220C7D"
+ "script": "MossdeepCity_Gym_EventScript_BlueFloorSwitch"
},
{
"type": "trigger",
@@ -618,7 +618,7 @@
"elevation": 3,
"var": "VAR_TEMP_1",
"var_value": "0",
- "script": "MossdeepCity_Gym_EventScript_220C93"
+ "script": "MossdeepCity_Gym_EventScript_GreenFloorSwitch"
},
{
"type": "trigger",
@@ -627,7 +627,7 @@
"elevation": 3,
"var": "VAR_TEMP_1",
"var_value": "0",
- "script": "MossdeepCity_Gym_EventScript_220CA9"
+ "script": "MossdeepCity_Gym_EventScript_PurpleFloorSwitch"
},
{
"type": "trigger",
@@ -636,7 +636,7 @@
"elevation": 3,
"var": "VAR_TEMP_1",
"var_value": "0",
- "script": "MossdeepCity_Gym_EventScript_220CA9"
+ "script": "MossdeepCity_Gym_EventScript_PurpleFloorSwitch"
},
{
"type": "trigger",
@@ -645,7 +645,7 @@
"elevation": 3,
"var": "VAR_TEMP_1",
"var_value": "0",
- "script": "MossdeepCity_Gym_EventScript_220CBF"
+ "script": "MossdeepCity_Gym_EventScript_RedFloorSwitch"
},
{
"type": "trigger",
@@ -654,7 +654,7 @@
"elevation": 0,
"var": "VAR_TEMP_1",
"var_value": "0",
- "script": "MossdeepCity_Gym_EventScript_220AF1"
+ "script": "MossdeepCity_Gym_EventScript_WarpToEntrance"
},
{
"type": "trigger",
@@ -663,7 +663,7 @@
"elevation": 3,
"var": "VAR_TEMP_1",
"var_value": "0",
- "script": "MossdeepCity_Gym_EventScript_220C67"
+ "script": "MossdeepCity_Gym_EventScript_YellowFloorSwitch"
}
],
"bg_events": [
@@ -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..fc6a45d84 100644
--- a/data/maps/MossdeepCity_Gym/scripts.inc
+++ b/data/maps/MossdeepCity_Gym/scripts.inc
@@ -1,64 +1,68 @@
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
- goto_if_set FLAG_MOSSDEEP_GYM_SWITCH_1, MossdeepCity_Gym_EventScript_22083D
- goto MossdeepCity_Gym_EventScript_220815
+@ NOTE: Mossdeep Gym was redesigned between R/S and E. Leftover (and now functionally unused) scripts are commented below
+
+@ All the below checks are leftover from RS. FLAG_MOSSDEEP_GYM_SWITCH_X is never set
+MossdeepCity_Gym_OnLoad: @ 8220806
+ goto_if_set FLAG_MOSSDEEP_GYM_SWITCH_1, MossdeepCity_Gym_EventScript_SetSwitch1Metatiles
+ goto MossdeepCity_Gym_EventScript_CheckSwitch2
end
-MossdeepCity_Gym_EventScript_220815:: @ 8220815
- goto_if_set FLAG_MOSSDEEP_GYM_SWITCH_2, MossdeepCity_Gym_EventScript_220855
- goto MossdeepCity_Gym_EventScript_220824
+MossdeepCity_Gym_EventScript_CheckSwitch2:: @ 8220815
+ goto_if_set FLAG_MOSSDEEP_GYM_SWITCH_2, MossdeepCity_Gym_EventScript_SetSwitch2Metatiles
+ goto MossdeepCity_Gym_EventScript_CheckSwitch3
end
-MossdeepCity_Gym_EventScript_220824:: @ 8220824
- goto_if_set FLAG_MOSSDEEP_GYM_SWITCH_3, MossdeepCity_Gym_EventScript_22086D
- goto MossdeepCity_Gym_EventScript_220833
+MossdeepCity_Gym_EventScript_CheckSwitch3:: @ 8220824
+ goto_if_set FLAG_MOSSDEEP_GYM_SWITCH_3, MossdeepCity_Gym_EventScript_SetSwitch3Metatiles
+ goto MossdeepCity_Gym_EventScript_CheckSwitch4
end
-MossdeepCity_Gym_EventScript_220833:: @ 8220833
- goto_if_set FLAG_MOSSDEEP_GYM_SWITCH_4, MossdeepCity_Gym_EventScript_220885
+MossdeepCity_Gym_EventScript_CheckSwitch4:: @ 8220833
+ goto_if_set FLAG_MOSSDEEP_GYM_SWITCH_4, MossdeepCity_Gym_EventScript_SetSwitch4Metatiles
end
-MossdeepCity_Gym_EventScript_22083D:: @ 822083D
- setmetatile 5, 5, METATILE_MossdeepGym_Obelisk_Top, 0
- setmetatile 2, 7, METATILE_MossdeepGym_Empty1, 1
- goto MossdeepCity_Gym_EventScript_220815
+@ All the below set metatile scripts are leftover from RS and are functionally unused
+MossdeepCity_Gym_EventScript_SetSwitch1Metatiles:: @ 822083D
+ setmetatile 5, 5, METATILE_RS_MossdeepGym_RedArrow_Right, 0
+ setmetatile 2, 7, METATILE_RS_MossdeepGym_Switch_Down, 1
+ goto MossdeepCity_Gym_EventScript_CheckSwitch2
end
-MossdeepCity_Gym_EventScript_220855:: @ 8220855
- setmetatile 8, 14, METATILE_MossdeepGym_Obelisk_Top, 0
- setmetatile 8, 10, METATILE_MossdeepGym_Empty1, 1
- goto MossdeepCity_Gym_EventScript_220824
+MossdeepCity_Gym_EventScript_SetSwitch2Metatiles:: @ 8220855
+ setmetatile 8, 14, METATILE_RS_MossdeepGym_RedArrow_Right, 0
+ setmetatile 8, 10, METATILE_RS_MossdeepGym_Switch_Down, 1
+ goto MossdeepCity_Gym_EventScript_CheckSwitch3
end
-MossdeepCity_Gym_EventScript_22086D:: @ 822086D
- setmetatile 15, 17, METATILE_MossdeepGym_Obelisk_Base, 0
- setmetatile 17, 15, METATILE_MossdeepGym_Empty1, 1
- goto MossdeepCity_Gym_EventScript_220833
+MossdeepCity_Gym_EventScript_SetSwitch3Metatiles:: @ 822086D
+ setmetatile 15, 17, METATILE_RS_MossdeepGym_RedArrow_Left, 0
+ setmetatile 17, 15, METATILE_RS_MossdeepGym_Switch_Down, 1
+ goto MossdeepCity_Gym_EventScript_CheckSwitch4
end
-MossdeepCity_Gym_EventScript_220885:: @ 8220885
- setmetatile 1, 23, METATILE_MossdeepGym_Wall_LeftCorner, 0
- setmetatile 5, 24, METATILE_MossdeepGym_Empty1, 1
+MossdeepCity_Gym_EventScript_SetSwitch4Metatiles:: @ 8220885
+ setmetatile 1, 23, METATILE_RS_MossdeepGym_RedArrow_Up, 0
+ setmetatile 5, 24, METATILE_RS_MossdeepGym_Switch_Down, 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 +78,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,282 +90,284 @@ 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
- msgbox MossdeepCity_Gym_Text_221A40, MSGBOX_DEFAULT
+ msgbox MossdeepCity_Gym_Text_ExplainCalmMind, MSGBOX_DEFAULT
setflag FLAG_RECEIVED_TM04
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
- msgbox MossdeepCity_Gym_Text_221A40, MSGBOX_DEFAULT
+ msgbox MossdeepCity_Gym_Text_ExplainCalmMind, MSGBOX_DEFAULT
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
+@ All the below switch scripts are leftover from RS and are functionally unused
+MossdeepCity_Gym_EventScript_Switch1:: @ 8220999
lockall
- goto_if_set FLAG_MOSSDEEP_GYM_SWITCH_1, MossdeepCity_Gym_EventScript_2209D0
+ goto_if_set FLAG_MOSSDEEP_GYM_SWITCH_1, MossdeepCity_Gym_EventScript_ClearSwitch1
setflag FLAG_MOSSDEEP_GYM_SWITCH_1
- applymovement EVENT_OBJ_ID_PLAYER, MossdeepCity_Gym_Movement_220C30
+ applymovement EVENT_OBJ_ID_PLAYER, MossdeepCity_Gym_Movement_WaitAfterSwitchUse
waitmovement 0
- setmetatile 5, 5, METATILE_MossdeepGym_Obelisk_Top, 0
- setmetatile 2, 7, METATILE_MossdeepGym_Empty1, 1
- goto MossdeepCity_Gym_EventScript_2209C8
+ setmetatile 5, 5, METATILE_RS_MossdeepGym_RedArrow_Right, 0
+ setmetatile 2, 7, METATILE_RS_MossdeepGym_Switch_Down, 1
+ goto MossdeepCity_Gym_EventScript_DrawMapAfterSwitchUsed
end
-MossdeepCity_Gym_EventScript_2209C8:: @ 82209C8
+MossdeepCity_Gym_EventScript_DrawMapAfterSwitchUsed:: @ 82209C8
special DrawWholeMapView
playse SE_TK_KASYA
releaseall
end
-MossdeepCity_Gym_EventScript_2209D0:: @ 82209D0
+MossdeepCity_Gym_EventScript_ClearSwitch1:: @ 82209D0
clearflag FLAG_MOSSDEEP_GYM_SWITCH_1
- applymovement EVENT_OBJ_ID_PLAYER, MossdeepCity_Gym_Movement_220C30
+ applymovement EVENT_OBJ_ID_PLAYER, MossdeepCity_Gym_Movement_WaitAfterSwitchUse
waitmovement 0
- setmetatile 5, 5, METATILE_MossdeepGym_Obelisk_Base, 0
- setmetatile 2, 7, METATILE_MossdeepGym_Empty0, 1
- goto MossdeepCity_Gym_EventScript_2209C8
+ setmetatile 5, 5, METATILE_RS_MossdeepGym_RedArrow_Left, 0
+ setmetatile 2, 7, METATILE_RS_MossdeepGym_Switch_Up, 1
+ goto MossdeepCity_Gym_EventScript_DrawMapAfterSwitchUsed
end
-MossdeepCity_Gym_EventScript_2209F5:: @ 82209F5
+MossdeepCity_Gym_EventScript_Switch2:: @ 82209F5
lockall
- goto_if_set FLAG_MOSSDEEP_GYM_SWITCH_2, MossdeepCity_Gym_EventScript_220A24
+ goto_if_set FLAG_MOSSDEEP_GYM_SWITCH_2, MossdeepCity_Gym_EventScript_ClearSwitch2
setflag FLAG_MOSSDEEP_GYM_SWITCH_2
- applymovement EVENT_OBJ_ID_PLAYER, MossdeepCity_Gym_Movement_220C30
+ applymovement EVENT_OBJ_ID_PLAYER, MossdeepCity_Gym_Movement_WaitAfterSwitchUse
waitmovement 0
- setmetatile 8, 14, METATILE_MossdeepGym_Obelisk_Top, 0
- setmetatile 8, 10, METATILE_MossdeepGym_Empty1, 1
- goto MossdeepCity_Gym_EventScript_2209C8
+ setmetatile 8, 14, METATILE_RS_MossdeepGym_RedArrow_Right, 0
+ setmetatile 8, 10, METATILE_RS_MossdeepGym_Switch_Down, 1
+ goto MossdeepCity_Gym_EventScript_DrawMapAfterSwitchUsed
end
-MossdeepCity_Gym_EventScript_220A24:: @ 8220A24
+MossdeepCity_Gym_EventScript_ClearSwitch2:: @ 8220A24
clearflag FLAG_MOSSDEEP_GYM_SWITCH_2
- applymovement EVENT_OBJ_ID_PLAYER, MossdeepCity_Gym_Movement_220C30
+ applymovement EVENT_OBJ_ID_PLAYER, MossdeepCity_Gym_Movement_WaitAfterSwitchUse
waitmovement 0
- setmetatile 8, 14, METATILE_MossdeepGym_OuterWall_RightCorner, 0
- setmetatile 8, 10, METATILE_MossdeepGym_Empty0, 1
- goto MossdeepCity_Gym_EventScript_2209C8
+ setmetatile 8, 14, METATILE_RS_MossdeepGym_RedArrow_Down, 0
+ setmetatile 8, 10, METATILE_RS_MossdeepGym_Switch_Up, 1
+ goto MossdeepCity_Gym_EventScript_DrawMapAfterSwitchUsed
end
-MossdeepCity_Gym_EventScript_220A49:: @ 8220A49
+MossdeepCity_Gym_EventScript_Switch3:: @ 8220A49
lockall
- goto_if_set FLAG_MOSSDEEP_GYM_SWITCH_3, MossdeepCity_Gym_EventScript_220A78
+ goto_if_set FLAG_MOSSDEEP_GYM_SWITCH_3, MossdeepCity_Gym_EventScript_ClearSwitch3
setflag FLAG_MOSSDEEP_GYM_SWITCH_3
- applymovement EVENT_OBJ_ID_PLAYER, MossdeepCity_Gym_Movement_220C30
+ applymovement EVENT_OBJ_ID_PLAYER, MossdeepCity_Gym_Movement_WaitAfterSwitchUse
waitmovement 0
- setmetatile 15, 17, METATILE_MossdeepGym_Obelisk_Base, 0
- setmetatile 17, 15, METATILE_MossdeepGym_Empty1, 1
- goto MossdeepCity_Gym_EventScript_2209C8
+ setmetatile 15, 17, METATILE_RS_MossdeepGym_RedArrow_Left, 0
+ setmetatile 17, 15, METATILE_RS_MossdeepGym_Switch_Down, 1
+ goto MossdeepCity_Gym_EventScript_DrawMapAfterSwitchUsed
end
-MossdeepCity_Gym_EventScript_220A78:: @ 8220A78
+MossdeepCity_Gym_EventScript_ClearSwitch3:: @ 8220A78
clearflag FLAG_MOSSDEEP_GYM_SWITCH_3
- applymovement EVENT_OBJ_ID_PLAYER, MossdeepCity_Gym_Movement_220C30
+ applymovement EVENT_OBJ_ID_PLAYER, MossdeepCity_Gym_Movement_WaitAfterSwitchUse
waitmovement 0
- setmetatile 15, 17, METATILE_MossdeepGym_Obelisk_Top, 0
- setmetatile 17, 15, METATILE_MossdeepGym_Empty0, 1
- goto MossdeepCity_Gym_EventScript_2209C8
+ setmetatile 15, 17, METATILE_RS_MossdeepGym_RedArrow_Right, 0
+ setmetatile 17, 15, METATILE_RS_MossdeepGym_Switch_Up, 1
+ goto MossdeepCity_Gym_EventScript_DrawMapAfterSwitchUsed
end
-MossdeepCity_Gym_EventScript_220A9D:: @ 8220A9D
+MossdeepCity_Gym_EventScript_Switch4:: @ 8220A9D
lockall
- goto_if_set FLAG_MOSSDEEP_GYM_SWITCH_4, MossdeepCity_Gym_EventScript_220ACC
+ goto_if_set FLAG_MOSSDEEP_GYM_SWITCH_4, MossdeepCity_Gym_EventScript_ClearSwitch4
setflag FLAG_MOSSDEEP_GYM_SWITCH_4
- applymovement EVENT_OBJ_ID_PLAYER, MossdeepCity_Gym_Movement_220C30
+ applymovement EVENT_OBJ_ID_PLAYER, MossdeepCity_Gym_Movement_WaitAfterSwitchUse
waitmovement 0
- setmetatile 1, 23, METATILE_MossdeepGym_Wall_LeftCorner, 0
- setmetatile 5, 24, METATILE_MossdeepGym_Empty1, 1
- goto MossdeepCity_Gym_EventScript_2209C8
+ setmetatile 1, 23, METATILE_RS_MossdeepGym_RedArrow_Up, 0
+ setmetatile 5, 24, METATILE_RS_MossdeepGym_Switch_Down, 1
+ goto MossdeepCity_Gym_EventScript_DrawMapAfterSwitchUsed
end
-MossdeepCity_Gym_EventScript_220ACC:: @ 8220ACC
+MossdeepCity_Gym_EventScript_ClearSwitch4:: @ 8220ACC
clearflag FLAG_MOSSDEEP_GYM_SWITCH_4
- applymovement EVENT_OBJ_ID_PLAYER, MossdeepCity_Gym_Movement_220C30
+ applymovement EVENT_OBJ_ID_PLAYER, MossdeepCity_Gym_Movement_WaitAfterSwitchUse
waitmovement 0
- setmetatile 1, 23, METATILE_MossdeepGym_Obelisk_Top, 0
- setmetatile 5, 24, METATILE_MossdeepGym_Empty0, 1
- goto MossdeepCity_Gym_EventScript_2209C8
+ setmetatile 1, 23, METATILE_RS_MossdeepGym_RedArrow_Right, 0
+ setmetatile 5, 24, METATILE_RS_MossdeepGym_Switch_Up, 1
+ goto MossdeepCity_Gym_EventScript_DrawMapAfterSwitchUsed
end
-MossdeepCity_Gym_EventScript_220AF1:: @ 8220AF1
+MossdeepCity_Gym_EventScript_WarpToEntrance:: @ 8220AF1
lockall
- warp7 MAP_MOSSDEEP_CITY_GYM, 255, 7, 30
+ warpmossdeepgym MAP_MOSSDEEP_CITY_GYM, 255, 7, 30
waitstate
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
- trainerbattle_single TRAINER_SYLVIA, MossdeepCity_Gym_Text_2213C2, MossdeepCity_Gym_Text_2213F4
- msgbox MossdeepCity_Gym_Text_221412, MSGBOX_AUTOCLOSE
+MossdeepCity_Gym_EventScript_Sylvia:: @ 8220B87
+ trainerbattle_single TRAINER_SYLVIA, MossdeepCity_Gym_Text_SylviaPreBattle, MossdeepCity_Gym_Text_SylviaDefeat
+ msgbox MossdeepCity_Gym_Text_SylviaPostBattle, MSGBOX_AUTOCLOSE
end
-MossdeepCity_Gym_EventScript_220B9E:: @ 8220B9E
- trainerbattle_single TRAINER_NATE, MossdeepCity_Gym_Text_221460, MossdeepCity_Gym_Text_2214A7
- msgbox MossdeepCity_Gym_Text_2214D3, MSGBOX_AUTOCLOSE
+MossdeepCity_Gym_EventScript_Nate:: @ 8220B9E
+ trainerbattle_single TRAINER_NATE, MossdeepCity_Gym_Text_NatePreBattle, MossdeepCity_Gym_Text_NateDefeat
+ msgbox MossdeepCity_Gym_Text_NatePostBattle, MSGBOX_AUTOCLOSE
end
-MossdeepCity_Gym_EventScript_220BB5:: @ 8220BB5
- trainerbattle_single TRAINER_MACEY, MossdeepCity_Gym_Text_22161B, MossdeepCity_Gym_Text_221658
- msgbox MossdeepCity_Gym_Text_221680, MSGBOX_AUTOCLOSE
+MossdeepCity_Gym_EventScript_Macey:: @ 8220BB5
+ trainerbattle_single TRAINER_MACEY, MossdeepCity_Gym_Text_MaceyPreBattle, MossdeepCity_Gym_Text_MaceyDefeat
+ msgbox MossdeepCity_Gym_Text_MaceyPostBattle, MSGBOX_AUTOCLOSE
end
-MossdeepCity_Gym_EventScript_220BCC:: @ 8220BCC
- trainerbattle_single TRAINER_CLIFFORD, MossdeepCity_Gym_Text_22157C, MossdeepCity_Gym_Text_2215B8
- msgbox MossdeepCity_Gym_Text_2215E2, MSGBOX_AUTOCLOSE
+MossdeepCity_Gym_EventScript_Clifford:: @ 8220BCC
+ trainerbattle_single TRAINER_CLIFFORD, MossdeepCity_Gym_Text_CliffordPreBattle, MossdeepCity_Gym_Text_CliffordDefeat
+ msgbox MossdeepCity_Gym_Text_CliffordPostBattle, MSGBOX_AUTOCLOSE
end
-MossdeepCity_Gym_EventScript_220BE3:: @ 8220BE3
- trainerbattle_single TRAINER_NICHOLAS, MossdeepCity_Gym_Text_2216EE, MossdeepCity_Gym_Text_22172D
- msgbox MossdeepCity_Gym_Text_22173A, MSGBOX_AUTOCLOSE
+MossdeepCity_Gym_EventScript_Nicholas:: @ 8220BE3
+ trainerbattle_single TRAINER_NICHOLAS, MossdeepCity_Gym_Text_NicholasPreBattle, MossdeepCity_Gym_Text_NicholasDefeat
+ msgbox MossdeepCity_Gym_Text_NicholasPostBattle, MSGBOX_AUTOCLOSE
end
-MossdeepCity_Gym_EventScript_220BFA:: @ 8220BFA
- trainerbattle_single TRAINER_KATHLEEN, MossdeepCity_Gym_Text_221507, MossdeepCity_Gym_Text_22153B
- msgbox MossdeepCity_Gym_Text_221545, MSGBOX_AUTOCLOSE
+MossdeepCity_Gym_EventScript_Kathleen:: @ 8220BFA
+ trainerbattle_single TRAINER_KATHLEEN, MossdeepCity_Gym_Text_KathleenPreBattle, MossdeepCity_Gym_Text_KathleenDefeat
+ msgbox MossdeepCity_Gym_Text_KathleenPostBattle, 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
+ goto_if_set FLAG_DEFEATED_MOSSDEEP_GYM, MossdeepCity_Gym_EventScript_GymGuidePostVictory
+ msgbox MossdeepCity_Gym_Text_GymGuideAdvice, MSGBOX_DEFAULT
release
end
-MossdeepCity_Gym_EventScript_220C26:: @ 8220C26
- msgbox MossdeepCity_Gym_Text_220E2A, MSGBOX_DEFAULT
+MossdeepCity_Gym_EventScript_GymGuidePostVictory:: @ 8220C26
+ msgbox MossdeepCity_Gym_Text_GymGuidePostVictory, MSGBOX_DEFAULT
release
end
-MossdeepCity_Gym_Movement_220C30: @ 8220C30
+@ Leftover from RS, functionally unused
+MossdeepCity_Gym_Movement_WaitAfterSwitchUse: @ 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
-MossdeepCity_Gym_EventScript_220C67:: @ 8220C67
+MossdeepCity_Gym_EventScript_YellowFloorSwitch:: @ 8220C67
playse SE_MU_PACHI
waitse
playse SE_TU_SAA
- mossdeepgym3 0
- mossdeepgym1 0
+ initrotatingtilepuzzle FALSE
+ moverotatingtileobjects 0
waitmovement 0
- mossdeepgym2
+ turnrotatingtileobjects
waitmovement 0
- mossdeepgym4
+ freerotatingtilepuzzle
end
-MossdeepCity_Gym_EventScript_220C7D:: @ 8220C7D
+MossdeepCity_Gym_EventScript_BlueFloorSwitch:: @ 8220C7D
playse SE_MU_PACHI
waitse
playse SE_TU_SAA
- mossdeepgym3 0
- mossdeepgym1 1
+ initrotatingtilepuzzle FALSE
+ moverotatingtileobjects 1
waitmovement 0
- mossdeepgym2
+ turnrotatingtileobjects
waitmovement 0
- mossdeepgym4
+ freerotatingtilepuzzle
end
-MossdeepCity_Gym_EventScript_220C93:: @ 8220C93
+MossdeepCity_Gym_EventScript_GreenFloorSwitch:: @ 8220C93
playse SE_MU_PACHI
waitse
playse SE_TU_SAA
- mossdeepgym3 0
- mossdeepgym1 2
+ initrotatingtilepuzzle FALSE
+ moverotatingtileobjects 2
waitmovement 0
- mossdeepgym2
+ turnrotatingtileobjects
waitmovement 0
- mossdeepgym4
+ freerotatingtilepuzzle
end
-MossdeepCity_Gym_EventScript_220CA9:: @ 8220CA9
+MossdeepCity_Gym_EventScript_PurpleFloorSwitch:: @ 8220CA9
playse SE_MU_PACHI
waitse
playse SE_TU_SAA
- mossdeepgym3 0
- mossdeepgym1 3
+ initrotatingtilepuzzle FALSE
+ moverotatingtileobjects 3
waitmovement 0
- mossdeepgym2
+ turnrotatingtileobjects
waitmovement 0
- mossdeepgym4
+ freerotatingtilepuzzle
end
-MossdeepCity_Gym_EventScript_220CBF:: @ 8220CBF
+MossdeepCity_Gym_EventScript_RedFloorSwitch:: @ 8220CBF
playse SE_MU_PACHI
waitse
playse SE_TU_SAA
- mossdeepgym3 0
- mossdeepgym1 4
+ initrotatingtilepuzzle FALSE
+ moverotatingtileobjects 4
waitmovement 0
- mossdeepgym2
+ turnrotatingtileobjects
waitmovement 0
- mossdeepgym4
+ freerotatingtilepuzzle
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"
@@ -375,46 +381,46 @@ MossdeepCity_Gym_Text_220CD5: @ 8220CD5
.string "them how tight you are with your\l"
.string "POKéMON. Go for it!$"
-MossdeepCity_Gym_Text_220E2A: @ 8220E2A
+MossdeepCity_Gym_Text_GymGuidePostVictory: @ 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,127 +428,127 @@ 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"
.string "only despair at the end.\p"
.string "What goes around comes around…$"
-MossdeepCity_Gym_Text_2213C2: @ 82213C2
+MossdeepCity_Gym_Text_SylviaPreBattle: @ 82213C2
.string "Even at the risk of life, I will win\n"
.string "this battle!$"
-MossdeepCity_Gym_Text_2213F4: @ 82213F4
+MossdeepCity_Gym_Text_SylviaDefeat: @ 82213F4
.string "What you do…\n"
.string "It horrifies me…$"
-MossdeepCity_Gym_Text_221412: @ 8221412
+MossdeepCity_Gym_Text_SylviaPostBattle: @ 8221412
.string "How dare you beat me…\p"
.string "It won't be my fault if something\n"
.string "horrible befalls you…$"
-MossdeepCity_Gym_Text_221460: @ 8221460
+MossdeepCity_Gym_Text_NatePreBattle: @ 8221460
.string "Hohoho.\p"
.string "You need me to show you how tenacious\n"
.string "the PSYCHIC type can be.$"
-MossdeepCity_Gym_Text_2214A7: @ 82214A7
+MossdeepCity_Gym_Text_NateDefeat: @ 82214A7
.string "Oh! My, my!\n"
.string "Your battle style is fantastic!$"
-MossdeepCity_Gym_Text_2214D3: @ 82214D3
+MossdeepCity_Gym_Text_NatePostBattle: @ 82214D3
.string "I… I don't let defeat rattle m-me,\n"
.string "however b-badly.$"
-MossdeepCity_Gym_Text_221507: @ 8221507
+MossdeepCity_Gym_Text_KathleenPreBattle: @ 8221507
.string "Let me show you a perfectly awful,\n"
.string "horrifying time!$"
-MossdeepCity_Gym_Text_22153B: @ 822153B
+MossdeepCity_Gym_Text_KathleenDefeat: @ 822153B
.string "N-nooooo!$"
-MossdeepCity_Gym_Text_221545: @ 8221545
+MossdeepCity_Gym_Text_KathleenPostBattle: @ 8221545
.string "Your vitality is contagious!\n"
.string "Get away from me quickly!$"
-MossdeepCity_Gym_Text_22157C: @ 822157C
+MossdeepCity_Gym_Text_CliffordPreBattle: @ 822157C
.string "I may be past my prime, but I suggest\n"
.string "you not patronize me.$"
-MossdeepCity_Gym_Text_2215B8: @ 82215B8
+MossdeepCity_Gym_Text_CliffordDefeat: @ 82215B8
.string "Ah, you overflow with the power\n"
.string "of youth!$"
-MossdeepCity_Gym_Text_2215E2: @ 82215E2
+MossdeepCity_Gym_Text_CliffordPostBattle: @ 82215E2
.string "It seems that I could not overcome\n"
.string "your youthful energy.$"
-MossdeepCity_Gym_Text_22161B: @ 822161B
+MossdeepCity_Gym_Text_MaceyPreBattle: @ 822161B
.string "You're not getting through to the end!\n"
.string "Not if I can help it!$"
-MossdeepCity_Gym_Text_221658: @ 8221658
+MossdeepCity_Gym_Text_MaceyDefeat: @ 8221658
.string "How could you be so ludicrously\n"
.string "strong?$"
-MossdeepCity_Gym_Text_221680: @ 8221680
+MossdeepCity_Gym_Text_MaceyPostBattle: @ 8221680
.string "Humph! You may be strong, but you're\n"
.string "not suitable for the PSYCHIC type!\p"
.string "The way you battle is somehow brutal!$"
-MossdeepCity_Gym_Text_2216EE: @ 82216EE
+MossdeepCity_Gym_Text_NicholasPreBattle: @ 82216EE
.string "Wroooar! Have a taste of my super\n"
.string "POKéMON hard-battling power!$"
-MossdeepCity_Gym_Text_22172D: @ 822172D
+MossdeepCity_Gym_Text_NicholasDefeat: @ 822172D
.string "Oh!\n"
.string "Done in!$"
-MossdeepCity_Gym_Text_22173A: @ 822173A
+MossdeepCity_Gym_Text_NicholasPostBattle: @ 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,24 +562,24 @@ 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"
.string "DIVE outside of battle.\p"
.string "TATE: You should also take this, too.$"
-MossdeepCity_Gym_Text_221A40: @ 8221A40
+MossdeepCity_Gym_Text_ExplainCalmMind: @ 8221A40
.string "TATE: That TM04 contains…\n"
.string "LIZA: CALM MIND!\p"
.string "TATE: It raises SP. ATK and…\n"
@@ -582,18 +588,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 +608,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 +628,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 c4a013108..11e9b5c9f 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 f8efe996e..be98ac8e7 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_SetHoleWarp: @ 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 c20b3fa30..d16430069 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 4da701395..f6a21b0b8 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_WalkInPlaceFastestDown
- 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_WalkInPlaceFastestUp
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 DIR_SOUTH, PetalburgCity_Gym_EventScript_204A80
- case DIR_NORTH, PetalburgCity_Gym_EventScript_204A8B
- case DIR_WEST, PetalburgCity_Gym_EventScript_204A96
- case DIR_EAST, 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_WalkInPlaceFastestDown
- 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_WalkInPlaceFastestRight
applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceFastestRight
waitmovement 0
return
-PetalburgCity_Gym_EventScript_204C5F:: @ 8204C5F
+PetalburgCity_Gym_EventScript_WallyArriveWestEast:: @ 8204C5F
applymovement 1, Common_Movement_WalkInPlaceFastestDown
applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceFastestDown
- 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_WalkInPlaceFastestDown
- 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_WalkInPlaceFastestUp
waitmovement 0
return
-PetalburgCity_Gym_EventScript_204CD2:: @ 8204CD2
+PetalburgCity_Gym_EventScript_NormanAddressPlayerNorth:: @ 8204CD2
applymovement 1, Common_Movement_WalkInPlaceFastestDown
applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceFastestUp
waitmovement 0
return
-PetalburgCity_Gym_EventScript_204CE4:: @ 8204CE4
+PetalburgCity_Gym_EventScript_NormanAddressPlayerWest:: @ 8204CE4
applymovement 1, Common_Movement_WalkInPlaceFastestRight
applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceFastestLeft
waitmovement 0
return
-PetalburgCity_Gym_EventScript_204CF6:: @ 8204CF6
+PetalburgCity_Gym_EventScript_NormanAddressPlayerEast:: @ 8204CF6
applymovement 1, Common_Movement_WalkInPlaceFastestLeft
applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceFastestRight
waitmovement 0
return
-PetalburgCity_Gym_EventScript_204D08:: @ 8204D08
+PetalburgCity_Gym_EventScript_NormanAddressWallySouth:: @ 8204D08
applymovement 1, Common_Movement_WalkInPlaceFastestDown
waitmovement 0
return
-PetalburgCity_Gym_EventScript_204D13:: @ 8204D13
+PetalburgCity_Gym_EventScript_NormanAddressWallyNorth:: @ 8204D13
applymovement 1, Common_Movement_WalkInPlaceFastestRight
waitmovement 0
return
-PetalburgCity_Gym_EventScript_204D1E:: @ 8204D1E
+PetalburgCity_Gym_EventScript_NormanAddressWallyWest:: @ 8204D1E
applymovement 1, Common_Movement_WalkInPlaceFastestDown
waitmovement 0
return
-PetalburgCity_Gym_EventScript_204D29:: @ 8204D29
+PetalburgCity_Gym_EventScript_NormanAddressWallyEast:: @ 8204D29
applymovement 1, Common_Movement_WalkInPlaceFastestDown
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_WalkInPlaceFastestDown
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_WalkInPlaceFastestDown
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 DIR_NORTH, PetalburgCity_Gym_EventScript_204EF5
- case DIR_WEST, PetalburgCity_Gym_EventScript_204F09
- case DIR_EAST, 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_WalkInPlaceFastestUp
waitmovement 0
return
-PetalburgCity_Gym_EventScript_204FD7:: @ 8204FD7
+PetalburgCity_Gym_EventScript_WallysUncleFaceNormanEast:: @ 8204FD7
applymovement 11, Common_Movement_WalkInPlaceFastestRight
waitmovement 0
return
-PetalburgCity_Gym_EventScript_204FE2:: @ 8204FE2
+PetalburgCity_Gym_EventScript_WallysUncleFaceNormanWest:: @ 8204FE2
applymovement 11, Common_Movement_WalkInPlaceFastestLeft
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_WalkInPlaceFastestLeft
applymovement 1, Common_Movement_WalkInPlaceFastestLeft
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_WalkInPlaceFastestDown
applymovement 1, Common_Movement_WalkInPlaceFastestDown
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_WalkInPlaceFastestDown
applymovement 1, Common_Movement_WalkInPlaceFastestDown
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_WalkInPlaceFastestDown
- 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/Route110_TrickHousePuzzle7/scripts.inc b/data/maps/Route110_TrickHousePuzzle7/scripts.inc
index db651d8ce..b5303bc24 100644
--- a/data/maps/Route110_TrickHousePuzzle7/scripts.inc
+++ b/data/maps/Route110_TrickHousePuzzle7/scripts.inc
@@ -222,60 +222,60 @@ Route110_TrickHousePuzzle7_EventScript_26E31B:: @ 826E31B
playse SE_MU_PACHI
waitse
playse SE_TU_SAA
- mossdeepgym3 1
- mossdeepgym1 0
+ initrotatingtilepuzzle TRUE
+ moverotatingtileobjects 0
waitmovement 0
- mossdeepgym2
+ turnrotatingtileobjects
waitmovement 0
- mossdeepgym4
+ freerotatingtilepuzzle
end
Route110_TrickHousePuzzle7_EventScript_26E331:: @ 826E331
playse SE_MU_PACHI
waitse
playse SE_TU_SAA
- mossdeepgym3 1
- mossdeepgym1 1
+ initrotatingtilepuzzle TRUE
+ moverotatingtileobjects 1
waitmovement 0
- mossdeepgym2
+ turnrotatingtileobjects
waitmovement 0
- mossdeepgym4
+ freerotatingtilepuzzle
end
Route110_TrickHousePuzzle7_EventScript_26E347:: @ 826E347
playse SE_MU_PACHI
waitse
playse SE_TU_SAA
- mossdeepgym3 1
- mossdeepgym1 2
+ initrotatingtilepuzzle TRUE
+ moverotatingtileobjects 2
waitmovement 0
- mossdeepgym2
+ turnrotatingtileobjects
waitmovement 0
- mossdeepgym4
+ freerotatingtilepuzzle
end
Route110_TrickHousePuzzle7_EventScript_26E35D:: @ 826E35D
playse SE_MU_PACHI
waitse
playse SE_TU_SAA
- mossdeepgym3 1
- mossdeepgym1 3
+ initrotatingtilepuzzle TRUE
+ moverotatingtileobjects 3
waitmovement 0
- mossdeepgym2
+ turnrotatingtileobjects
waitmovement 0
- mossdeepgym4
+ freerotatingtilepuzzle
end
Route110_TrickHousePuzzle7_EventScript_26E373:: @ 826E373
playse SE_MU_PACHI
waitse
playse SE_TU_SAA
- mossdeepgym3 1
- mossdeepgym1 4
+ initrotatingtilepuzzle TRUE
+ moverotatingtileobjects 4
waitmovement 0
- mossdeepgym2
+ turnrotatingtileobjects
waitmovement 0
- mossdeepgym4
+ freerotatingtilepuzzle
end
Route110_TrickHousePuzzle7_EventScript_26E389:: @ 826E389
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 6dd71f51b..8a02974ea 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_SetHoleWarp: @ 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 009a1a567..af54deaff 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_SetHoleWarp: @ 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..c45509225 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,68 @@ 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 +78,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 +107,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 +119,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 +193,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 +223,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 +238,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 +252,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 +273,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 +297,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 +311,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/rotating_tile_puzzle.s
index 01eb792b7..f9cf208db 100644
--- a/data/mossdeep_gym.s
+++ b/data/rotating_tile_puzzle.s
@@ -2,42 +2,42 @@
.section .rodata
-gUnknown_08612698:: @ 8612698
+RotatingTilePuzzle_Movement_ShiftRight:: @ 8612698
store_lock_anim
walk_right
free_unlock_anim
step_end
-gUnknown_0861269C:: @ 861269C
+RotatingTilePuzzle_Movement_ShiftDown:: @ 861269C
store_lock_anim
walk_down
free_unlock_anim
step_end
-gUnknown_086126A0:: @ 86126A0
+RotatingTilePuzzle_Movement_ShiftLeft:: @ 86126A0
store_lock_anim
walk_left
free_unlock_anim
step_end
-gUnknown_086126A4:: @ 86126A4
+RotatingTilePuzzle_Movement_ShiftUp:: @ 86126A4
store_lock_anim
walk_up
free_unlock_anim
step_end
-gUnknown_086126A8:: @ 86126A8
+RotatingTilePuzzle_Movement_FaceRight:: @ 86126A8
face_right
step_end
-gUnknown_086126AA:: @ 86126AA
+RotatingTilePuzzle_Movement_FaceDown:: @ 86126AA
face_down
step_end
-gUnknown_086126AC:: @ 86126AC
+RotatingTilePuzzle_Movement_FaceLeft:: @ 86126AC
face_left
step_end
-gUnknown_086126AE:: @ 86126AE
+RotatingTilePuzzle_Movement_FaceUp:: @ 86126AE
face_up
step_end
diff --git a/data/script_cmd_table.inc b/data/script_cmd_table.inc
index 910227a92..5a6a1e613 100644
--- a/data/script_cmd_table.inc
+++ b/data/script_cmd_table.inc
@@ -211,11 +211,11 @@ gScriptCmdTable:: @ 81DB67C
.4byte ScrCmd_nop1
.4byte ScrCmd_warpD1
.4byte ScrCmd_setmonmetlocation
- .4byte ScrCmd_mossdeepgym1
- .4byte ScrCmd_mossdeepgym2
- .4byte ScrCmd_mossdeepgym3
- .4byte ScrCmd_mossdeepgym4
- .4byte ScrCmd_warpD7
+ .4byte ScrCmd_moverotatingtileobjects
+ .4byte ScrCmd_turnrotatingtileobjects
+ .4byte ScrCmd_initrotatingtilepuzzle
+ .4byte ScrCmd_freerotatingtilepuzzle
+ .4byte ScrCmd_warpmossdeepgym
.4byte ScrCmd_cmdD8
.4byte ScrCmd_cmdD9
.4byte ScrCmd_cmdDA
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 69aa91c88..fe5d4bf0b 100644
--- a/data/specials.inc
+++ b/data/specials.inc
@@ -156,8 +156,8 @@ gSpecials:: @ 81DBA64
def_special DrawWholeMapView
def_special StorePlayerCoordsInVars
def_special MauvilleGymDeactivatePuzzle
- 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 750990697..e9f9aa770 100644
--- a/include/constants/flags.h
+++ b/include/constants/flags.h
@@ -109,10 +109,10 @@
#define FLAG_MET_TEAM_AQUA_HARBOR 0x61
#define FLAG_TV_EXPLAINED 0x62
#define FLAG_MAUVILLE_GYM_BARRIERS_STATE 0x63
-#define FLAG_MOSSDEEP_GYM_SWITCH_1 0x64
-#define FLAG_MOSSDEEP_GYM_SWITCH_2 0x65
-#define FLAG_MOSSDEEP_GYM_SWITCH_3 0x66
-#define FLAG_MOSSDEEP_GYM_SWITCH_4 0x67
+#define FLAG_MOSSDEEP_GYM_SWITCH_1 0x64 // Leftover from the RS version of Mossdeep Gym, functionally unused
+#define FLAG_MOSSDEEP_GYM_SWITCH_2 0x65 //
+#define FLAG_MOSSDEEP_GYM_SWITCH_3 0x66 //
+#define FLAG_MOSSDEEP_GYM_SWITCH_4 0x67 //
#define FLAG_UNUSED_0x068 0x68 // Unused Flag
@@ -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..2f3ce5f71 100644
--- a/include/constants/metatile_labels.h
+++ b/include/constants/metatile_labels.h
@@ -68,13 +68,16 @@
#define METATILE_PetalburgGym_SlidingDoor_Frame3 0x21B
#define METATILE_PetalburgGym_SlidingDoor_Frame4 0x21C
-// gTileset_MossdeepGym
-#define METATILE_MossdeepGym_Obelisk_Top 0x204
-#define METATILE_MossdeepGym_Obelisk_Base 0x20C
-#define METATILE_MossdeepGym_Wall_LeftCorner 0x20D
-#define METATILE_MossdeepGym_OuterWall_RightCorner 0x205
-#define METATILE_MossdeepGym_Empty0 0x238
-#define METATILE_MossdeepGym_Empty1 0x239
+// gTileset_MossdeepGym from R/S
+#define METATILE_RS_MossdeepGym_RedArrow_Right 0x204
+#define METATILE_RS_MossdeepGym_RedArrow_Left 0x20C
+#define METATILE_RS_MossdeepGym_RedArrow_Up 0x20D
+#define METATILE_RS_MossdeepGym_RedArrow_Down 0x205
+#define METATILE_RS_MossdeepGym_Switch_Up 0x238
+#define METATILE_RS_MossdeepGym_Switch_Down 0x239
+
+// gTileset_MossdeepGym from Emerald
+#define METATILE_MossdeepGym_YellowArrow_Right 0x250
// gTileset_BrendansMaysHouse
#define METATILE_BrendansMaysHouse_BrendanPC_Off 0x25A
@@ -376,6 +379,7 @@
#define METATILE_TrickHousePuzzle_Arrow_RedOnBlack_Down 0x263
#define METATILE_TrickHousePuzzle_Arrow_RedOnBlack_Left_Alt 0x27B
#define METATILE_TrickHousePuzzle_Arrow_RedOnBlack_Right_Alt 0x27C
+#define METATILE_TrickHousePuzzle_Arrow_YellowOnWhite_Right 0x298
// gTileset_BikeShop
#define METATILE_BikeShop_Barrier_Hidden_Top 0x269
diff --git a/include/constants/vars.h b/include/constants/vars.h
index 3030581c6..f9bfb2ad5 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/include/field_screen_effect.h b/include/field_screen_effect.h
index 0b01c81e9..af594611e 100644
--- a/include/field_screen_effect.h
+++ b/include/field_screen_effect.h
@@ -28,7 +28,7 @@ void sub_80AF80C(u8 metatileBehavior);
void sub_80AF828(void);
void sub_80AF838(void);
void sub_80AF848(void);
-void sub_80AF87C(void);
+void DoMossdeepGymWarp(void);
void sub_80AF8B8(void);
void sub_80AF948(void);
void sub_80AF9F8(void);
diff --git a/include/mossdeep_gym.h b/include/mossdeep_gym.h
deleted file mode 100644
index c16730094..000000000
--- a/include/mossdeep_gym.h
+++ /dev/null
@@ -1,9 +0,0 @@
-#ifndef GUARD_MOSSDEEP_GYM_H
-#define GUARD_MOSSDEEP_GYM_H
-
-void InitMossdeepGymTiles(bool8 arg0);
-void FinishMossdeepGymTiles(void);
-u16 MossdeepGym_MoveEvents(u8 arg0);
-void MossdeepGym_TurnEvents(void);
-
-#endif // GUARD_MOSSDEEP_GYM_H
diff --git a/include/rotating_tile_puzzle.h b/include/rotating_tile_puzzle.h
new file mode 100644
index 000000000..8c6ab7944
--- /dev/null
+++ b/include/rotating_tile_puzzle.h
@@ -0,0 +1,9 @@
+#ifndef GUARD_ROTATING_TILE_PUZZLE_H
+#define GUARD_ROTATING_TILE_PUZZLE_H
+
+void InitRotatingTilePuzzle(bool8 isTrickHouse);
+void FreeRotatingTilePuzzle(void);
+u16 MoveRotatingTileObjects(u8 puzzleNumber);
+void TurnRotatingTileObjects(void);
+
+#endif // GUARD_ROTATING_TILE_PUZZLE_H
diff --git a/ld_script.txt b/ld_script.txt
index d37cd595f..92aafebde 100644
--- a/ld_script.txt
+++ b/ld_script.txt
@@ -287,7 +287,7 @@ SECTIONS {
src/battle_arena.o(.text);
src/battle_factory.o(.text);
src/battle_pike.o(.text);
- src/mossdeep_gym.o(.text);
+ src/rotating_tile_puzzle.o(.text);
src/battle_pyramid.o(.text);
src/item_menu.o(.text);
src/list_menu.o(.text);
@@ -644,8 +644,8 @@ SECTIONS {
src/battle_arena.o(.rodata);
src/battle_factory.o(.rodata);
src/battle_pike.o(.rodata);
- src/mossdeep_gym.o(.rodata);
- data/mossdeep_gym.o(.rodata);
+ src/rotating_tile_puzzle.o(.rodata);
+ data/rotating_tile_puzzle.o(.rodata);
src/battle_pyramid.o(.rodata);
src/item_menu.o(.rodata);
src/list_menu.o(.rodata);
diff --git a/src/field_control_avatar.c b/src/field_control_avatar.c
index 9a0388ae0..47246d75a 100644
--- a/src/field_control_avatar.c
+++ b/src/field_control_avatar.c
@@ -738,7 +738,7 @@ static bool8 TryStartWarpEventScript(struct MapPosition *position, u16 metatileB
}
if (MetatileBehavior_IsMossdeepGymWarp(metatileBehavior) == TRUE)
{
- sub_80AF87C();
+ DoMossdeepGymWarp();
return TRUE;
}
DoWarp();
diff --git a/src/field_screen_effect.c b/src/field_screen_effect.c
index 18faf0e60..505315539 100644
--- a/src/field_screen_effect.c
+++ b/src/field_screen_effect.c
@@ -556,7 +556,7 @@ void sub_80AF848(void)
gFieldCallback = sub_80AF3E8;
}
-void sub_80AF87C(void)
+void DoMossdeepGymWarp(void)
{
sub_8085540(1);
ScriptContext2_Enable();
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 4057cf299..b92e956d4 100644
--- a/src/field_specials.c
+++ b/src/field_specials.c
@@ -69,8 +69,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;
@@ -96,8 +96,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);
@@ -810,7 +810,7 @@ void MauvilleGymDeactivatePuzzle(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),
@@ -820,21 +820,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();
@@ -842,11 +842,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];
@@ -911,9 +911,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
deleted file mode 100644
index bc279334b..000000000
--- a/src/mossdeep_gym.c
+++ /dev/null
@@ -1,314 +0,0 @@
-#include "global.h"
-#include "event_object_movement.h"
-#include "fieldmap.h"
-#include "malloc.h"
-#include "mossdeep_gym.h"
-#include "script_movement.h"
-#include "constants/event_object_movement_constants.h"
-#include "constants/event_objects.h"
-
-// Movement scripts.
-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[];
-
-struct MossdeepSubStruct
-{
- u8 unk0;
- u8 eventTemplateId;
-};
-
-struct MossdeepStruct
-{
- struct MossdeepSubStruct objects[EVENT_OBJECTS_COUNT];
- u8 count;
- bool8 unk41;
-};
-
-// This file's functions.
-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;
-
-// code
-void InitMossdeepGymTiles(bool8 arg0)
-{
- if (gUnknown_0203CE50 == NULL)
- gUnknown_0203CE50 = AllocZeroed(sizeof(*gUnknown_0203CE50));
-
- gUnknown_0203CE50->unk41 = arg0;
-}
-
-void FinishMossdeepGymTiles(void)
-{
- u8 id;
-
- if (gUnknown_0203CE50 != NULL)
- FREE_AND_SET_NULL(gUnknown_0203CE50);
-
- id = GetEventObjectIdByLocalIdAndMap(EVENT_OBJ_ID_PLAYER, 0, 0);
- EventObjectClearHeldMovementIfFinished(&gEventObjects[id]);
- ScriptMovement_UnfreezeEventObjects();
-}
-
-u16 MossdeepGym_MoveEvents(u8 arg0)
-{
- u8 i;
- struct EventObjectTemplate *events = gSaveBlock1Ptr->eventObjectTemplates;
- u16 localId = 0;
-
- for (i = 0; i < EVENT_OBJECT_TEMPLATES_COUNT; i++)
- {
- s32 var;
- u8 r5;
- s16 x = events[i].x + 7;
- s16 y = events[i].y + 7;
- u16 metatile = MapGridGetMetatileIdAt(x, y);
-
- if (!gUnknown_0203CE50->unk41)
- var = 0x250;
- else
- var = 0x298;
-
- if (metatile < 0x250)
- continue;
-
- if ((u8)((metatile - var) / 8) >= 5)
- continue;
- if ((u8)((metatile - var) / 8) != arg0)
- continue;
-
- r5 = (u8)((metatile - var) % 8);
- if (r5 < 4)
- {
- s8 x = 0;
- s8 y = 0;
- const u8 *movementScript;
-
- switch (r5)
- {
- case 0:
- movementScript = gUnknown_08612698;
- x = 1;
- break;
- case 1:
- movementScript = gUnknown_0861269C;
- y = 1;
- break;
- case 2:
- movementScript = gUnknown_086126A0;
- x = -1;
- break;
- case 3:
- movementScript = gUnknown_086126A4;
- y = -1;
- break;
- default:
- continue;
- }
-
- events[i].x += x;
- events[i].y += y;
- if (GetEventObjectIdByLocalIdAndMap(events[i].localId, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup) != EVENT_OBJECTS_COUNT)
- {
- AddEventObject(i, r5);
- localId = events[i].localId;
- ScriptMovement_StartObjectMovementScript(localId, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, movementScript);
- }
- else
- {
- sub_81A8D94(i, r5);
- }
- }
- }
-
- return localId;
-}
-
-void MossdeepGym_TurnEvents(void)
-{
- u8 i;
- s32 var;
- struct EventObjectTemplate *events;
-
- if (gUnknown_0203CE50 == NULL)
- return;
-
- if (!gUnknown_0203CE50->unk41)
- var = 0x250;
- else
- var = 0x298;
-
- events = gSaveBlock1Ptr->eventObjectTemplates;
- for (i = 0; i < gUnknown_0203CE50->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;
- u16 metatile = MapGridGetMetatileIdAt(x, y);
-
- r0 = (u8)((metatile - var) % 8);
- r0 -= (gUnknown_0203CE50->objects[i].unk0);
- if (r0 < 0 || r0 == 3)
- {
- if (r0 == -3)
- r6 = 1;
- else
- r6 = 0;
- }
- else
- {
- if (r0 > 0)
- r6 = 1;
- else
- r6 = 2;
- }
-
- eventObjectId = GetEventObjectIdByLocalIdAndMap(events[gUnknown_0203CE50->objects[i].eventTemplateId].localId, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup);
- if (eventObjectId != EVENT_OBJECTS_COUNT)
- {
- const u8 *movementScript;
- u8 direction = gEventObjects[eventObjectId].facingDirection;
- if (r6 == 0)
- {
- switch (direction)
- {
- case DIR_EAST:
- movementScript = gUnknown_086126AE;
- events[gUnknown_0203CE50->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;
- break;
- case DIR_WEST:
- movementScript = gUnknown_086126AA;
- events[gUnknown_0203CE50->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;
- break;
- default:
- continue;
- }
- ScriptMovement_StartObjectMovementScript(events[gUnknown_0203CE50->objects[i].eventTemplateId].localId,
- gSaveBlock1Ptr->location.mapNum,
- gSaveBlock1Ptr->location.mapGroup,
- movementScript);
- }
- else if (r6 == 1)
- {
- switch (direction)
- {
- case DIR_EAST:
- movementScript = gUnknown_086126AA;
- events[gUnknown_0203CE50->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;
- break;
- case DIR_WEST:
- movementScript = gUnknown_086126AE;
- events[gUnknown_0203CE50->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;
- break;
- default:
- continue;
- }
- ScriptMovement_StartObjectMovementScript(events[gUnknown_0203CE50->objects[i].eventTemplateId].localId,
- gSaveBlock1Ptr->location.mapNum,
- gSaveBlock1Ptr->location.mapGroup,
- movementScript);
- }
- }
- }
-}
-
-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++;
-}
-
-static void sub_81A8D94(u8 eventTemplateId, u8 arg1)
-{
- s8 r0;
- s32 r6;
- s32 var;
- u16 movementType;
- struct EventObjectTemplate *events = gSaveBlock1Ptr->eventObjectTemplates;
- s16 x = events[eventTemplateId].x + 7;
- s16 y = events[eventTemplateId].y + 7;
- u16 metatile = MapGridGetMetatileIdAt(x, y);
-
- if (!gUnknown_0203CE50->unk41)
- var = 0x250;
- else
- var = 0x298;
-
- r0 = (u8)((metatile - var) % 8);
- r0 -= arg1;
- if (r0 < 0 || r0 == 3)
- r6 = 0;
- else if (r0 > 0 || r0 == -3)
- r6 = 1;
- else
- r6 = 2;
-
- movementType = events[eventTemplateId].movementType;
- if (r6 == 0)
- {
- switch (movementType)
- {
- case MOVEMENT_TYPE_FACE_RIGHT:
- events[eventTemplateId].movementType = MOVEMENT_TYPE_FACE_UP;
- break;
- case MOVEMENT_TYPE_FACE_DOWN:
- events[eventTemplateId].movementType = MOVEMENT_TYPE_FACE_RIGHT;
- break;
- case MOVEMENT_TYPE_FACE_LEFT:
- events[eventTemplateId].movementType = MOVEMENT_TYPE_FACE_DOWN;
- break;
- case MOVEMENT_TYPE_FACE_UP:
- events[eventTemplateId].movementType = MOVEMENT_TYPE_FACE_LEFT;
- break;
- default:
- break;
- }
- }
- else if (r6 == 1)
- {
- switch (movementType)
- {
- case MOVEMENT_TYPE_FACE_RIGHT:
- events[eventTemplateId].movementType = MOVEMENT_TYPE_FACE_DOWN;
- break;
- case MOVEMENT_TYPE_FACE_DOWN:
- events[eventTemplateId].movementType = MOVEMENT_TYPE_FACE_LEFT;
- break;
- case MOVEMENT_TYPE_FACE_LEFT:
- events[eventTemplateId].movementType = MOVEMENT_TYPE_FACE_UP;
- break;
- case MOVEMENT_TYPE_FACE_UP:
- events[eventTemplateId].movementType = MOVEMENT_TYPE_FACE_RIGHT;
- break;
- default:
- break;
- }
- }
-}
diff --git a/src/overworld.c b/src/overworld.c
index d796a670f..55afe2fcf 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
diff --git a/src/rotating_tile_puzzle.c b/src/rotating_tile_puzzle.c
new file mode 100644
index 000000000..7238ec751
--- /dev/null
+++ b/src/rotating_tile_puzzle.c
@@ -0,0 +1,338 @@
+#include "global.h"
+#include "event_object_movement.h"
+#include "fieldmap.h"
+#include "malloc.h"
+#include "rotating_tile_puzzle.h"
+#include "script_movement.h"
+#include "constants/event_object_movement_constants.h"
+#include "constants/event_objects.h"
+#include "constants/metatile_labels.h"
+
+extern const u8 RotatingTilePuzzle_Movement_ShiftRight[];
+extern const u8 RotatingTilePuzzle_Movement_ShiftDown[];
+extern const u8 RotatingTilePuzzle_Movement_ShiftLeft[];
+extern const u8 RotatingTilePuzzle_Movement_ShiftUp[];
+extern const u8 RotatingTilePuzzle_Movement_FaceRight[];
+extern const u8 RotatingTilePuzzle_Movement_FaceDown[];
+extern const u8 RotatingTilePuzzle_Movement_FaceLeft[];
+extern const u8 RotatingTilePuzzle_Movement_FaceUp[];
+
+#define ROTATE_COUNTERCLOCKWISE 0
+#define ROTATE_CLOCKWISE 1
+#define ROTATE_NONE 2
+
+struct RotatingTileObject
+{
+ u8 prevPuzzleTileNum;
+ u8 eventTemplateId;
+};
+
+struct RotatingTilePuzzle
+{
+ struct RotatingTileObject objects[EVENT_OBJECTS_COUNT];
+ u8 numObjects;
+ bool8 isTrickHouse;
+};
+
+// This file's functions.
+static void SaveRotatingTileObject(u8 eventTemplateId, u8 arg1);
+static void TurnUnsavedRotatingTileObject(u8 eventTemplateId, u8 arg1);
+
+// EWRAM vars
+EWRAM_DATA static struct RotatingTilePuzzle *sRotatingTilePuzzle = NULL;
+
+// code
+void InitRotatingTilePuzzle(bool8 isTrickHouse)
+{
+ if (sRotatingTilePuzzle == NULL)
+ sRotatingTilePuzzle = AllocZeroed(sizeof(*sRotatingTilePuzzle));
+
+ sRotatingTilePuzzle->isTrickHouse = isTrickHouse;
+}
+
+void FreeRotatingTilePuzzle(void)
+{
+ u8 id;
+
+ if (sRotatingTilePuzzle != NULL)
+ FREE_AND_SET_NULL(sRotatingTilePuzzle);
+
+ id = GetEventObjectIdByLocalIdAndMap(EVENT_OBJ_ID_PLAYER, 0, 0);
+ EventObjectClearHeldMovementIfFinished(&gEventObjects[id]);
+ ScriptMovement_UnfreezeEventObjects();
+}
+
+u16 MoveRotatingTileObjects(u8 puzzleNumber)
+{
+ u8 i;
+ struct EventObjectTemplate *eventObjects = gSaveBlock1Ptr->eventObjectTemplates;
+ u16 localId = 0;
+
+ for (i = 0; i < EVENT_OBJECT_TEMPLATES_COUNT; i++)
+ {
+ s32 puzzleTileStart;
+ u8 puzzleTileNum;
+ s16 x = eventObjects[i].x + 7;
+ s16 y = eventObjects[i].y + 7;
+ u16 metatile = MapGridGetMetatileIdAt(x, y);
+
+ if (!sRotatingTilePuzzle->isTrickHouse)
+ puzzleTileStart = METATILE_MossdeepGym_YellowArrow_Right;
+ else
+ puzzleTileStart = METATILE_TrickHousePuzzle_Arrow_YellowOnWhite_Right;
+
+ // Object is on a metatile before the puzzle tile section
+ // UB: Because this is not if (metatile < puzzleTileStart), for the trick house (metatile - puzzleTileStart) below can result in casting a negative value to u8
+ if (metatile < METATILE_MossdeepGym_YellowArrow_Right)
+ continue;
+
+ // Object is on a metatile after the puzzle tile section (never occurs, in both cases the puzzle tiles are last)
+ if ((u8)((metatile - puzzleTileStart) / 8) >= 5)
+ continue;
+
+ // Object is on a metatile in puzzle tile section, but not one of the currently rotating color
+ if ((u8)((metatile - puzzleTileStart) / 8) != puzzleNumber)
+ continue;
+
+ puzzleTileNum = (u8)((metatile - puzzleTileStart) % 8);
+
+ // First 4 puzzle tiles are the colored arrows
+ if (puzzleTileNum < 4)
+ {
+ s8 x = 0;
+ s8 y = 0;
+ const u8 *movementScript;
+
+ switch (puzzleTileNum)
+ {
+ case 0: // Right Arrow
+ movementScript = RotatingTilePuzzle_Movement_ShiftRight;
+ x = 1;
+ break;
+ case 1: // Down Arrow
+ movementScript = RotatingTilePuzzle_Movement_ShiftDown;
+ y = 1;
+ break;
+ case 2: // Left Arrow
+ movementScript = RotatingTilePuzzle_Movement_ShiftLeft;
+ x = -1;
+ break;
+ case 3: // Up Arrow
+ movementScript = RotatingTilePuzzle_Movement_ShiftUp;
+ y = -1;
+ break;
+ default:
+ continue;
+ }
+
+ eventObjects[i].x += x;
+ eventObjects[i].y += y;
+ if (GetEventObjectIdByLocalIdAndMap(eventObjects[i].localId, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup) != EVENT_OBJECTS_COUNT)
+ {
+ SaveRotatingTileObject(i, puzzleTileNum);
+ localId = eventObjects[i].localId;
+ ScriptMovement_StartObjectMovementScript(localId, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, movementScript);
+ }
+ // Never reached in normal gameplay
+ else
+ {
+ TurnUnsavedRotatingTileObject(i, puzzleTileNum);
+ }
+ }
+ }
+
+ return localId;
+}
+
+void TurnRotatingTileObjects(void)
+{
+ u8 i;
+ s32 puzzleTileStart;
+ struct EventObjectTemplate *eventObjects;
+
+ if (sRotatingTilePuzzle == NULL)
+ return;
+
+ if (!sRotatingTilePuzzle->isTrickHouse)
+ puzzleTileStart = METATILE_MossdeepGym_YellowArrow_Right;
+ else
+ puzzleTileStart = METATILE_TrickHousePuzzle_Arrow_YellowOnWhite_Right;
+
+ eventObjects = gSaveBlock1Ptr->eventObjectTemplates;
+ for (i = 0; i < sRotatingTilePuzzle->numObjects; i++)
+ {
+ s32 rotation;
+ s8 tileDifference;
+ u8 eventObjectId;
+ s16 x = eventObjects[sRotatingTilePuzzle->objects[i].eventTemplateId].x + 7;
+ s16 y = eventObjects[sRotatingTilePuzzle->objects[i].eventTemplateId].y + 7;
+ u16 metatile = MapGridGetMetatileIdAt(x, y);
+
+ // NOTE: The following 2 assignments and if else could all be replaced with rotation = ROTATE_COUNTERCLOCKWISE
+ // For an object to be saved in sRotatingTilePuzzle->objects, it must have been on a colored arrow tile
+ // After the first assignment, tileDifference will always be a number [0-3] representing which arrow tile the object is on now (0: right, 1: down, 2: left, 3: up)
+ // prevPuzzleTileNum will similarly be a number [0-3] representing the arrow tile the object just moved from
+ // All the puzzles are oriented counter-clockwise and can only move 1 step at a time, so the difference between the current tile and the previous tile will always either be -1 or 3 (0-1, 1-2, 2-3, 3-0)
+ // Which means tileDifference will always either be -1 or 3 after the below subtraction, and rotation will always be ROTATE_COUNTERCLOCKWISE after the following conditionals
+ tileDifference = (u8)((metatile - puzzleTileStart) % 8);
+ tileDifference -= (sRotatingTilePuzzle->objects[i].prevPuzzleTileNum);
+
+ // Always true, see above
+ if (tileDifference < 0 || tileDifference == 3)
+ {
+ // Always false, see above
+ if (tileDifference == -3)
+ rotation = ROTATE_CLOCKWISE;
+ else
+ rotation = ROTATE_COUNTERCLOCKWISE;
+ }
+ else
+ {
+ if (tileDifference > 0)
+ rotation = ROTATE_CLOCKWISE;
+ else
+ rotation = ROTATE_NONE;
+ }
+
+ eventObjectId = GetEventObjectIdByLocalIdAndMap(eventObjects[sRotatingTilePuzzle->objects[i].eventTemplateId].localId, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup);
+ if (eventObjectId != EVENT_OBJECTS_COUNT)
+ {
+ const u8 *movementScript;
+ u8 direction = gEventObjects[eventObjectId].facingDirection;
+ if (rotation == ROTATE_COUNTERCLOCKWISE)
+ {
+ switch (direction)
+ {
+ case DIR_EAST:
+ movementScript = RotatingTilePuzzle_Movement_FaceUp;
+ eventObjects[sRotatingTilePuzzle->objects[i].eventTemplateId].movementType = MOVEMENT_TYPE_FACE_UP;
+ break;
+ case DIR_SOUTH:
+ movementScript = RotatingTilePuzzle_Movement_FaceRight;
+ eventObjects[sRotatingTilePuzzle->objects[i].eventTemplateId].movementType = MOVEMENT_TYPE_FACE_RIGHT;
+ break;
+ case DIR_WEST:
+ movementScript = RotatingTilePuzzle_Movement_FaceDown;
+ eventObjects[sRotatingTilePuzzle->objects[i].eventTemplateId].movementType = MOVEMENT_TYPE_FACE_DOWN;
+ break;
+ case DIR_NORTH:
+ movementScript = RotatingTilePuzzle_Movement_FaceLeft;
+ eventObjects[sRotatingTilePuzzle->objects[i].eventTemplateId].movementType = MOVEMENT_TYPE_FACE_LEFT;
+ break;
+ default:
+ continue;
+ }
+ ScriptMovement_StartObjectMovementScript(eventObjects[sRotatingTilePuzzle->objects[i].eventTemplateId].localId,
+ gSaveBlock1Ptr->location.mapNum,
+ gSaveBlock1Ptr->location.mapGroup,
+ movementScript);
+ }
+ // Never reached
+ else if (rotation == ROTATE_CLOCKWISE)
+ {
+ switch (direction)
+ {
+ case DIR_EAST:
+ movementScript = RotatingTilePuzzle_Movement_FaceDown;
+ eventObjects[sRotatingTilePuzzle->objects[i].eventTemplateId].movementType = MOVEMENT_TYPE_FACE_DOWN;
+ break;
+ case DIR_SOUTH:
+ movementScript = RotatingTilePuzzle_Movement_FaceLeft;
+ eventObjects[sRotatingTilePuzzle->objects[i].eventTemplateId].movementType = MOVEMENT_TYPE_FACE_LEFT;
+ break;
+ case DIR_WEST:
+ movementScript = RotatingTilePuzzle_Movement_FaceUp;
+ eventObjects[sRotatingTilePuzzle->objects[i].eventTemplateId].movementType = MOVEMENT_TYPE_FACE_UP;
+ break;
+ case DIR_NORTH:
+ movementScript = RotatingTilePuzzle_Movement_FaceRight;
+ eventObjects[sRotatingTilePuzzle->objects[i].eventTemplateId].movementType = MOVEMENT_TYPE_FACE_RIGHT;
+ break;
+ default:
+ continue;
+ }
+ ScriptMovement_StartObjectMovementScript(eventObjects[sRotatingTilePuzzle->objects[i].eventTemplateId].localId,
+ gSaveBlock1Ptr->location.mapNum,
+ gSaveBlock1Ptr->location.mapGroup,
+ movementScript);
+ }
+ }
+ }
+}
+
+static void SaveRotatingTileObject(u8 eventTemplateId, u8 puzzleTileNum)
+{
+ sRotatingTilePuzzle->objects[sRotatingTilePuzzle->numObjects].eventTemplateId = eventTemplateId;
+ sRotatingTilePuzzle->objects[sRotatingTilePuzzle->numObjects].prevPuzzleTileNum = puzzleTileNum;
+ sRotatingTilePuzzle->numObjects++;
+}
+
+// Functionally unused
+static void TurnUnsavedRotatingTileObject(u8 eventTemplateId, u8 puzzleTileNum)
+{
+ s8 tileDifference;
+ s32 rotation;
+ s32 puzzleTileStart;
+ u16 movementType;
+ struct EventObjectTemplate *eventObjects = gSaveBlock1Ptr->eventObjectTemplates;
+ s16 x = eventObjects[eventTemplateId].x + 7;
+ s16 y = eventObjects[eventTemplateId].y + 7;
+ u16 metatile = MapGridGetMetatileIdAt(x, y);
+
+ if (!sRotatingTilePuzzle->isTrickHouse)
+ puzzleTileStart = METATILE_MossdeepGym_YellowArrow_Right;
+ else
+ puzzleTileStart = METATILE_TrickHousePuzzle_Arrow_YellowOnWhite_Right;
+
+ tileDifference = (u8)((metatile - puzzleTileStart) % 8);
+ tileDifference -= puzzleTileNum;
+
+ if (tileDifference < 0 || tileDifference == 3)
+ rotation = ROTATE_COUNTERCLOCKWISE;
+ else if (tileDifference > 0 || tileDifference == -3)
+ rotation = ROTATE_CLOCKWISE;
+ else
+ rotation = ROTATE_NONE;
+
+ movementType = eventObjects[eventTemplateId].movementType;
+ if (rotation == ROTATE_COUNTERCLOCKWISE)
+ {
+ switch (movementType)
+ {
+ case MOVEMENT_TYPE_FACE_RIGHT:
+ eventObjects[eventTemplateId].movementType = MOVEMENT_TYPE_FACE_UP;
+ break;
+ case MOVEMENT_TYPE_FACE_DOWN:
+ eventObjects[eventTemplateId].movementType = MOVEMENT_TYPE_FACE_RIGHT;
+ break;
+ case MOVEMENT_TYPE_FACE_LEFT:
+ eventObjects[eventTemplateId].movementType = MOVEMENT_TYPE_FACE_DOWN;
+ break;
+ case MOVEMENT_TYPE_FACE_UP:
+ eventObjects[eventTemplateId].movementType = MOVEMENT_TYPE_FACE_LEFT;
+ break;
+ default:
+ break;
+ }
+ }
+ else if (rotation == ROTATE_CLOCKWISE)
+ {
+ switch (movementType)
+ {
+ case MOVEMENT_TYPE_FACE_RIGHT:
+ eventObjects[eventTemplateId].movementType = MOVEMENT_TYPE_FACE_DOWN;
+ break;
+ case MOVEMENT_TYPE_FACE_DOWN:
+ eventObjects[eventTemplateId].movementType = MOVEMENT_TYPE_FACE_LEFT;
+ break;
+ case MOVEMENT_TYPE_FACE_LEFT:
+ eventObjects[eventTemplateId].movementType = MOVEMENT_TYPE_FACE_UP;
+ break;
+ case MOVEMENT_TYPE_FACE_UP:
+ eventObjects[eventTemplateId].movementType = MOVEMENT_TYPE_FACE_RIGHT;
+ break;
+ default:
+ break;
+ }
+ }
+}
diff --git a/src/scrcmd.c b/src/scrcmd.c
index bdeee0524..d97e3de47 100644
--- a/src/scrcmd.c
+++ b/src/scrcmd.c
@@ -27,13 +27,13 @@
#include "event_obj_lock.h"
#include "menu.h"
#include "money.h"
-#include "mossdeep_gym.h"
#include "mystery_event_script.h"
#include "palette.h"
#include "party_menu.h"
#include "pokemon_storage_system.h"
#include "random.h"
#include "overworld.h"
+#include "rotating_tile_puzzle.h"
#include "rtc.h"
#include "script.h"
#include "script_menu.h"
@@ -815,7 +815,7 @@ bool8 ScrCmd_warpteleport(struct ScriptContext *ctx)
return TRUE;
}
-bool8 ScrCmd_warpD7(struct ScriptContext *ctx)
+bool8 ScrCmd_warpmossdeepgym(struct ScriptContext *ctx)
{
u8 mapGroup = ScriptReadByte(ctx);
u8 mapNum = ScriptReadByte(ctx);
@@ -824,7 +824,7 @@ bool8 ScrCmd_warpD7(struct ScriptContext *ctx)
u16 y = VarGet(ScriptReadHalfword(ctx));
SetWarpDestination(mapGroup, mapNum, warpId, x, y);
- sub_80AF87C();
+ DoMossdeepGymWarp();
ResetInitialPlayerAvatarState();
return TRUE;
}
@@ -2149,31 +2149,31 @@ bool8 ScrCmd_takecoins(struct ScriptContext *ctx)
return FALSE;
}
-bool8 ScrCmd_mossdeepgym1(struct ScriptContext *ctx)
+bool8 ScrCmd_moverotatingtileobjects(struct ScriptContext *ctx)
{
- u16 v1 = VarGet(ScriptReadHalfword(ctx));
+ u16 puzzleNumber = VarGet(ScriptReadHalfword(ctx));
- sMovingNpcId = MossdeepGym_MoveEvents(v1);
+ sMovingNpcId = MoveRotatingTileObjects(puzzleNumber);
return FALSE;
}
-bool8 ScrCmd_mossdeepgym2(struct ScriptContext *ctx)
+bool8 ScrCmd_turnrotatingtileobjects(struct ScriptContext *ctx)
{
- MossdeepGym_TurnEvents();
+ TurnRotatingTileObjects();
return FALSE;
}
-bool8 ScrCmd_mossdeepgym3(struct ScriptContext *ctx)
+bool8 ScrCmd_initrotatingtilepuzzle(struct ScriptContext *ctx)
{
- u16 v1 = VarGet(ScriptReadHalfword(ctx));
+ u16 isTrickHouse = VarGet(ScriptReadHalfword(ctx));
- InitMossdeepGymTiles(v1);
+ InitRotatingTilePuzzle(isTrickHouse);
return FALSE;
}
-bool8 ScrCmd_mossdeepgym4(struct ScriptContext *ctx)
+bool8 ScrCmd_freerotatingtilepuzzle(struct ScriptContext *ctx)
{
- FinishMossdeepGymTiles();
+ FreeRotatingTilePuzzle();
return FALSE;
}
diff --git a/sym_ewram.txt b/sym_ewram.txt
index bdbb85d37..79e89fc9b 100644
--- a/sym_ewram.txt
+++ b/sym_ewram.txt
@@ -129,7 +129,7 @@
.include "src/match_call.o"
.include "src/menu.o"
.include "src/battle_factory_screen.o"
- .include "src/mossdeep_gym.o"
+ .include "src/rotating_tile_puzzle.o"
.include "src/item_menu.o"
.include "src/list_menu.o"
.include "src/dynamic_placeholder_text_util.o"