summaryrefslogtreecommitdiff
path: root/data/maps
diff options
context:
space:
mode:
authorgarak <garakmon@gmail.com>2018-09-24 08:40:33 -0400
committergarak <garakmon@gmail.com>2018-09-24 08:40:33 -0400
commit72f9afcbf4a81909019f21acad0484b72ed217f6 (patch)
treebc7e9a48b8056e28403e251dab7ac64f649ad9e4 /data/maps
parent3964dbd4822f1b22bbc696add7e56ff0c5b2caea (diff)
parent7ceabffc842dfdf127fd594055f895a0803f54f6 (diff)
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'data/maps')
-rw-r--r--data/maps/AbandonedShip_HiddenFloorRooms/scripts.inc8
-rw-r--r--data/maps/AncientTomb/scripts.inc4
-rw-r--r--data/maps/AquaHideout_B1F/scripts.inc6
-rw-r--r--data/maps/BattleFrontier_BattleArenaLobby/scripts.inc2
-rw-r--r--data/maps/BattleFrontier_BattleDomeBattleRoom/scripts.inc32
-rw-r--r--data/maps/BattleFrontier_BattleDomeLobby/scripts.inc66
-rw-r--r--data/maps/BattleFrontier_BattleDomePreBattleRoom/scripts.inc16
-rw-r--r--data/maps/BattleFrontier_BattleFactoryBattleRoom/scripts.inc2
-rw-r--r--data/maps/BattleFrontier_BattleFactoryLobby/scripts.inc20
-rw-r--r--data/maps/BattleFrontier_BattlePalaceBattleRoom/scripts.inc2
-rw-r--r--data/maps/BattleFrontier_BattlePalaceLobby/scripts.inc26
-rw-r--r--data/maps/BattleFrontier_BattlePikeLobby/scripts.inc2
-rw-r--r--data/maps/BattleFrontier_BattlePyramidLobby/scripts.inc2
-rw-r--r--data/maps/BattleFrontier_BattleTowerBattleRoom/scripts.inc4
-rw-r--r--data/maps/BattleFrontier_BattleTowerBattleRoom2/scripts.inc14
-rw-r--r--data/maps/BattleFrontier_BattleTowerCorridor2/scripts.inc12
-rw-r--r--data/maps/BattleFrontier_BattleTowerElevator/scripts.inc10
-rw-r--r--data/maps/BattleFrontier_BattleTowerLobby/scripts.inc50
-rw-r--r--data/maps/BattleFrontier_OutsideEast/scripts.inc4
-rw-r--r--data/maps/BattleFrontier_PokemonCenter_1F/scripts.inc2
-rw-r--r--data/maps/BattleFrontier_ScottsHouse/scripts.inc4
-rw-r--r--data/maps/BirthIsland_Exterior/scripts.inc4
-rw-r--r--data/maps/DesertRuins/scripts.inc4
-rw-r--r--data/maps/DewfordTown_PokemonCenter_1F/scripts.inc2
-rw-r--r--data/maps/EverGrandeCity_HallOfFame/scripts.inc4
-rw-r--r--data/maps/EverGrandeCity_PokemonCenter_1F/scripts.inc2
-rw-r--r--data/maps/EverGrandeCity_PokemonLeague_1F/scripts.inc2
-rw-r--r--data/maps/FallarborTown_BattleTentLobby/scripts.inc2
-rw-r--r--data/maps/FallarborTown_House2/scripts.inc2
-rw-r--r--data/maps/FallarborTown_PokemonCenter_1F/scripts.inc2
-rw-r--r--data/maps/FarawayIsland_Interior/scripts.inc6
-rw-r--r--data/maps/FortreeCity_PokemonCenter_1F/scripts.inc2
-rw-r--r--data/maps/InsideOfTruck/scripts.inc4
-rw-r--r--data/maps/IslandCave/scripts.inc4
-rw-r--r--data/maps/LavaridgeTown_PokemonCenter_1F/scripts.inc2
-rw-r--r--data/maps/LilycoveCity/scripts.inc4
-rw-r--r--data/maps/LilycoveCity_DepartmentStoreElevator/scripts.inc4
-rw-r--r--data/maps/LilycoveCity_DepartmentStore_1F/scripts.inc2
-rw-r--r--data/maps/LilycoveCity_Harbor/scripts.inc4
-rw-r--r--data/maps/LilycoveCity_PokemonCenter_1F/scripts.inc2
-rw-r--r--data/maps/LilycoveCity_PokemonTrainerFanClub/scripts.inc132
-rw-r--r--data/maps/MarineCave_End/scripts.inc4
-rw-r--r--data/maps/MauvilleCity_GameCorner/scripts.inc26
-rw-r--r--data/maps/MauvilleCity_PokemonCenter_1F/scripts.inc2
-rw-r--r--data/maps/MossdeepCity_PokemonCenter_1F/scripts.inc2
-rw-r--r--data/maps/NavelRock_Bottom/scripts.inc4
-rw-r--r--data/maps/NavelRock_Top/scripts.inc4
-rw-r--r--data/maps/NewMauville_Inside/scripts.inc8
-rw-r--r--data/maps/OldaleTown_PokemonCenter_1F/scripts.inc2
-rw-r--r--data/maps/PacifidlogTown_House2/scripts.inc8
-rw-r--r--data/maps/PacifidlogTown_PokemonCenter_1F/scripts.inc2
-rw-r--r--data/maps/PetalburgCity_PokemonCenter_1F/scripts.inc8
-rw-r--r--data/maps/Route103/scripts.inc4
-rw-r--r--data/maps/Route104/scripts.inc4
-rw-r--r--data/maps/Route110/events.inc4
-rw-r--r--data/maps/Route110/scripts.inc14
-rw-r--r--data/maps/Route110_SeasideCyclingRoadSouthEntrance/scripts.inc10
-rw-r--r--data/maps/Route116/scripts.inc4
-rw-r--r--data/maps/Route116_TunnelersRestHouse/scripts.inc2
-rw-r--r--data/maps/Route119/scripts.inc6
-rw-r--r--data/maps/Route120/scripts.inc6
-rw-r--r--data/maps/RustboroCity/scripts.inc6
-rw-r--r--data/maps/RustboroCity_PokemonCenter_1F/scripts.inc2
-rw-r--r--data/maps/RusturfTunnel/events.inc4
-rw-r--r--data/maps/RusturfTunnel/scripts.inc8
-rw-r--r--data/maps/SSTidalCorridor/scripts.inc40
-rw-r--r--data/maps/SkyPillar_Top/scripts.inc4
-rw-r--r--data/maps/SlateportCity_BattleTentLobby/scripts.inc2
-rw-r--r--data/maps/SlateportCity_Harbor/scripts.inc2
-rw-r--r--data/maps/SlateportCity_House1/scripts.inc2
-rw-r--r--data/maps/SlateportCity_PokemonCenter_1F/scripts.inc2
-rw-r--r--data/maps/SootopolisCity_MysteryEventsHouse_1F/scripts.inc2
-rw-r--r--data/maps/SootopolisCity_PokemonCenter_1F/scripts.inc2
-rw-r--r--data/maps/SouthernIsland_Interior/scripts.inc4
-rw-r--r--data/maps/TerraCave_End/scripts.inc4
-rw-r--r--data/maps/TrainerHill_Elevator/scripts.inc2
-rw-r--r--data/maps/VerdanturfTown/scripts.inc4
-rw-r--r--data/maps/VerdanturfTown_BattleTentLobby/scripts.inc2
-rw-r--r--data/maps/VerdanturfTown_PokemonCenter_1F/scripts.inc2
-rw-r--r--data/maps/VerdanturfTown_WandasHouse/scripts.inc2
80 files changed, 349 insertions, 349 deletions
diff --git a/data/maps/AbandonedShip_HiddenFloorRooms/scripts.inc b/data/maps/AbandonedShip_HiddenFloorRooms/scripts.inc
index 701b79fbf..628c9cece 100644
--- a/data/maps/AbandonedShip_HiddenFloorRooms/scripts.inc
+++ b/data/maps/AbandonedShip_HiddenFloorRooms/scripts.inc
@@ -43,7 +43,7 @@ AbandonedShip_HiddenFloorRooms_EventScript_238CE3:: @ 8238CE3
setfieldeffectargument 1, 10
setfieldeffectargument 2, 0
dofieldeffect 54
- specialvar VAR_RESULT, sub_81392F8
+ specialvar VAR_RESULT, FoundAbandonedShipRoom4Key
compare VAR_RESULT, 0
call_if 1, AbandonedShip_HiddenFloorRooms_EventScript_238DD3
waitfieldeffect 54
@@ -54,7 +54,7 @@ AbandonedShip_HiddenFloorRooms_EventScript_238D0C:: @ 8238D0C
end
AbandonedShip_HiddenFloorRooms_EventScript_238D0D:: @ 8238D0D
- specialvar VAR_RESULT, sub_81392AC
+ specialvar VAR_RESULT, FoundAbandonedShipRoom1Key
compare VAR_RESULT, 1
goto_eq AbandonedShip_HiddenFloorRooms_EventScript_238D32
delay 20
@@ -77,7 +77,7 @@ AbandonedShip_HiddenFloorRooms_EventScript_238D33:: @ 8238D33
setfieldeffectargument 1, 3
setfieldeffectargument 2, 0
dofieldeffect 54
- specialvar VAR_RESULT, sub_8139320
+ specialvar VAR_RESULT, FoundAbandonedShipRoom6Key
compare VAR_RESULT, 0
call_if 1, AbandonedShip_HiddenFloorRooms_EventScript_238DE3
waitfieldeffect 54
@@ -98,7 +98,7 @@ AbandonedShip_HiddenFloorRooms_EventScript_238D6B:: @ 8238D6B
setfieldeffectargument 1, 6
setfieldeffectargument 2, 0
dofieldeffect 54
- specialvar VAR_RESULT, sub_81392D4
+ specialvar VAR_RESULT, FoundAbandonedShipRoom2Key
compare VAR_RESULT, 0
call_if 1, AbandonedShip_HiddenFloorRooms_EventScript_238DC3
waitfieldeffect 54
diff --git a/data/maps/AncientTomb/scripts.inc b/data/maps/AncientTomb/scripts.inc
index 3cd0b9eff..9dbacfe8e 100644
--- a/data/maps/AncientTomb/scripts.inc
+++ b/data/maps/AncientTomb/scripts.inc
@@ -10,7 +10,7 @@ AncientTomb_MapScript1_238FC3: @ 8238FC3
end
AncientTomb_EventScript_238FCD:: @ 8238FCD
- specialvar VAR_RESULT, sub_8138B80
+ specialvar VAR_RESULT, GetBattleOutcome
compare VAR_RESULT, 7
goto_if 5, AncientTomb_EventScript_27374E
removeobject VAR_LAST_TALKED
@@ -75,7 +75,7 @@ AncientTomb_EventScript_23905A:: @ 823905A
special StartRegiBattle
waitstate
clearflag FLAG_SYS_CTRL_OBJ_DELETE
- specialvar VAR_RESULT, sub_8138B80
+ specialvar VAR_RESULT, GetBattleOutcome
compare VAR_RESULT, 1
goto_eq AncientTomb_EventScript_2390A1
compare VAR_RESULT, 4
diff --git a/data/maps/AquaHideout_B1F/scripts.inc b/data/maps/AquaHideout_B1F/scripts.inc
index cf59bdacc..12c25faac 100644
--- a/data/maps/AquaHideout_B1F/scripts.inc
+++ b/data/maps/AquaHideout_B1F/scripts.inc
@@ -9,7 +9,7 @@ AquaHideout_B1F_MapScript1_2339B2: @ 82339B2
end
AquaHideout_B1F_EventScript_2339BC:: @ 82339BC
- specialvar VAR_RESULT, sub_8138B80
+ specialvar VAR_RESULT, GetBattleOutcome
compare VAR_RESULT, 7
goto_if 5, AquaHideout_B1F_EventScript_27374E
removeobject VAR_LAST_TALKED
@@ -41,7 +41,7 @@ AquaHideout_B1F_EventScript_2339EB:: @ 82339EB
setflag FLAG_SYS_CTRL_OBJ_DELETE
dowildbattle
clearflag FLAG_SYS_CTRL_OBJ_DELETE
- specialvar VAR_RESULT, sub_8138B80
+ specialvar VAR_RESULT, GetBattleOutcome
compare VAR_RESULT, 1
goto_eq AquaHideout_B1F_EventScript_233A2F
compare VAR_RESULT, 4
@@ -68,7 +68,7 @@ AquaHideout_B1F_EventScript_233A38:: @ 8233A38
setflag FLAG_SYS_CTRL_OBJ_DELETE
dowildbattle
clearflag FLAG_SYS_CTRL_OBJ_DELETE
- specialvar VAR_RESULT, sub_8138B80
+ specialvar VAR_RESULT, GetBattleOutcome
compare VAR_RESULT, 1
goto_eq AquaHideout_B1F_EventScript_233A7C
compare VAR_RESULT, 4
diff --git a/data/maps/BattleFrontier_BattleArenaLobby/scripts.inc b/data/maps/BattleFrontier_BattleArenaLobby/scripts.inc
index a376bfe22..9ef9a2812 100644
--- a/data/maps/BattleFrontier_BattleArenaLobby/scripts.inc
+++ b/data/maps/BattleFrontier_BattleArenaLobby/scripts.inc
@@ -133,7 +133,7 @@ BattleFrontier_BattleArenaLobby_EventScript_255DF4:: @ 8255DF4
lock
faceplayer
setvar VAR_FRONTIER_FACILITY, 3
- setvar VAR_0x40CE, 0
+ setvar VAR_FRONTIER_BATTLE_MODE, 0
special SavePlayerParty
msgbox BattleFrontier_BattleArenaLobby_Text_256166, 4
diff --git a/data/maps/BattleFrontier_BattleDomeBattleRoom/scripts.inc b/data/maps/BattleFrontier_BattleDomeBattleRoom/scripts.inc
index e853afda0..3d5704dba 100644
--- a/data/maps/BattleFrontier_BattleDomeBattleRoom/scripts.inc
+++ b/data/maps/BattleFrontier_BattleDomeBattleRoom/scripts.inc
@@ -7,7 +7,7 @@ BattleFrontier_BattleDomeBattleRoom_MapScripts:: @ 824BC9C
BattleFrontier_BattleDomeBattleRoom_MapScript1_24BCB1: @ 824BCB1
setvar VAR_0x8004, 10
- special sub_818E9AC
+ special CallBattleDomeFunction
setvar VAR_0x8004, 1
setvar VAR_0x8005, 2
special sub_81A1780
@@ -72,7 +72,7 @@ BattleFrontier_BattleDomeBattleRoom_EventScript_24BD61:: @ 824BD61
BattleFrontier_BattleDomeBattleRoom_EventScript_24BD82:: @ 824BD82
setvar VAR_0x8004, 4
- special sub_818E9AC
+ special CallBattleDomeFunction
msgbox BattleFrontier_BattleDomeBattleRoom_Text_24C990, 4
closemessage
applymovement 13, BattleFrontier_BattleDomeBattleRoom_Movement_24C77B
@@ -84,7 +84,7 @@ BattleFrontier_BattleDomeBattleRoom_EventScript_24BD82:: @ 824BD82
msgbox 0x2021fc4, 4
closemessage
setvar VAR_0x8004, 5
- special sub_818E9AC
+ special CallBattleDomeFunction
call BattleFrontier_BattleDomeBattleRoom_EventScript_24C440
setvar VAR_TEMP_2, 0
switch VAR_RESULT
@@ -109,7 +109,7 @@ BattleFrontier_BattleDomeBattleRoom_EventScript_24BDF7:: @ 824BDF7
compare VAR_TEMP_2, 2
goto_eq BattleFrontier_BattleDomeBattleRoom_EventScript_24BE4F
setvar VAR_0x8004, 19
- special sub_818E9AC
+ special CallBattleDomeFunction
switch VAR_RESULT
case 1, BattleFrontier_BattleDomeBattleRoom_EventScript_24BEE0
@@ -117,7 +117,7 @@ BattleFrontier_BattleDomeBattleRoom_EventScript_24BE4F:: @ 824BE4F
applymovement 1, BattleFrontier_BattleDomeBattleRoom_Movement_2725B4
waitmovement 0
setvar VAR_0x8004, 4
- special sub_818E9AC
+ special CallBattleDomeFunction
compare VAR_TEMP_2, 0
call_if 1, BattleFrontier_BattleDomeBattleRoom_EventScript_24BEB1
compare VAR_TEMP_2, 1
@@ -131,7 +131,7 @@ BattleFrontier_BattleDomeBattleRoom_EventScript_24BE4F:: @ 824BE4F
BattleFrontier_BattleDomeBattleRoom_EventScript_24BE8D:: @ 824BE8D
setvar VAR_0x8004, 12
setvar VAR_0x8005, 2
- special sub_818E9AC
+ special CallBattleDomeFunction
BattleFrontier_BattleDomePreBattleRoom_EventScript_24BE9A:: @ 824BE9A
setvar VAR_0x8004, 2
@@ -173,10 +173,10 @@ BattleFrontier_BattleDomeBattleRoom_EventScript_24BEE0:: @ 824BEE0
call BattleFrontier_BattleDomeBattleRoom_EventScript_24C82E
delay 60
setvar VAR_0x8004, 3
- special sub_818E9AC
+ special CallBattleDomeFunction
setvar VAR_0x8004, 12
setvar VAR_0x8005, 1
- special sub_818E9AC
+ special CallBattleDomeFunction
setvar VAR_0x8004, 1
setvar VAR_0x8005, 2
special sub_81A1780
@@ -227,17 +227,17 @@ BattleFrontier_BattleDomeBattleRoom_EventScript_24BFCC:: @ 824BFCC
BattleFrontier_BattleDomeBattleRoom_EventScript_24BFD5:: @ 824BFD5
setvar VAR_0x8004, 1
setvar VAR_0x8005, 6
- special sub_818E9AC
+ special CallBattleDomeFunction
compare VAR_RESULT, 0
goto_eq BattleFrontier_BattleDomeBattleRoom_EventScript_24C023
setvar VAR_0x8004, 1
setvar VAR_0x8005, 7
- special sub_818E9AC
+ special CallBattleDomeFunction
compare VAR_RESULT, 0
goto_eq BattleFrontier_BattleDomeBattleRoom_EventScript_24C076
setvar VAR_0x8004, 1
setvar VAR_0x8005, 1
- special sub_818E9AC
+ special CallBattleDomeFunction
compare VAR_RESULT, 0
goto_eq BattleFrontier_BattleDomeBattleRoom_EventScript_24C16A
goto BattleFrontier_BattleDomeBattleRoom_EventScript_24C0C9
@@ -446,7 +446,7 @@ BattleFrontier_BattleDomeBattleRoom_EventScript_24C2B9:: @ 824C2B9
msgbox BattleFrontier_BattleDomeBattleRoom_Text_24D0F6, 4
setvar VAR_0x8004, 12
setvar VAR_0x8005, 1
- special sub_818E9AC
+ special CallBattleDomeFunction
setvar VAR_0x8004, 12
special sub_81A1780
compare VAR_RESULT, 0
@@ -485,7 +485,7 @@ BattleFrontier_BattleDomeBattleRoom_EventScript_24C373:: @ 824C373
msgbox BattleFrontier_BattleDomeBattleRoom_Text_24D0F6, 4
setvar VAR_0x8004, 12
setvar VAR_0x8005, 1
- special sub_818E9AC
+ special CallBattleDomeFunction
setvar VAR_0x8004, 12
special sub_81A1780
compare VAR_RESULT, 2
@@ -536,10 +536,10 @@ BattleFrontier_BattleDomeBattleRoom_EventScript_24C440:: @ 824C440
waitstate
setvar VAR_TEMP_9, 0
setvar VAR_0x8004, 17
- special sub_818E9AC
+ special CallBattleDomeFunction
special HealPlayerParty
setvar VAR_0x8004, 16
- special sub_818E9AC
+ special CallBattleDomeFunction
return
BattleFrontier_BattleDomeBattleRoom_MapScript2_24C481: @ 824C481
@@ -950,7 +950,7 @@ BattleFrontier_BattleDomeBattleRoom_EventScript_24C82E:: @ 824C82E
BattleFrontier_BattleDomeBattleRoom_EventScript_24C8F5:: @ 824C8F5
BattleFrontier_BattleDomePreBattleRoom_EventScript_24C8F5:: @ 824C8F5
- copyvar VAR_RESULT, VAR_0x40CE
+ copyvar VAR_RESULT, VAR_FRONTIER_BATTLE_MODE
compare VAR_RESULT, 1
goto_eq BattleFrontier_BattleDomePreBattleRoom_EventScript_24C90F
warp MAP_BATTLE_FRONTIER_BATTLE_DOME_LOBBY, 255, 5, 11
diff --git a/data/maps/BattleFrontier_BattleDomeLobby/scripts.inc b/data/maps/BattleFrontier_BattleDomeLobby/scripts.inc
index 1e50357bc..6a879df16 100644
--- a/data/maps/BattleFrontier_BattleDomeLobby/scripts.inc
+++ b/data/maps/BattleFrontier_BattleDomeLobby/scripts.inc
@@ -6,7 +6,7 @@ BattleFrontier_BattleDomeLobby_MapScripts:: @ 82497E2
BattleFrontier_BattleDomeLobby_MapScript1_2497F2: @ 82497F2
setvar VAR_0x8004, 21
- special sub_818E9AC
+ special CallBattleDomeFunction
end
BattleFrontier_BattleDomeLobby_MapScript2_2497FB: @ 82497FB
@@ -39,15 +39,15 @@ BattleFrontier_BattleDomeLobby_EventScript_249842:: @ 8249842
setvar VAR_0x8004, 2
setvar VAR_0x8005, 0
setvar VAR_0x8006, 0
- special sub_818E9AC
+ special CallBattleDomeFunction
setvar VAR_0x8004, 2
setvar VAR_0x8005, 1
setvar VAR_0x8006, 0
- special sub_818E9AC
+ special CallBattleDomeFunction
setvar VAR_0x8004, 2
setvar VAR_0x8005, 6
setvar VAR_0x8006, 1
- special sub_818E9AC
+ special CallBattleDomeFunction
setvar VAR_0x8004, 2
setvar VAR_0x8005, 0
setvar VAR_0x8006, 0
@@ -85,15 +85,15 @@ BattleFrontier_BattleDomeLobby_EventScript_2498C9:: @ 82498C9
setvar VAR_0x8004, 2
setvar VAR_0x8005, 6
setvar VAR_0x8006, 1
- special sub_818E9AC
+ special CallBattleDomeFunction
setvar VAR_0x8004, 2
setvar VAR_0x8005, 7
setvar VAR_0x8006, 1
- special sub_818E9AC
+ special CallBattleDomeFunction
setvar VAR_0x8004, 2
setvar VAR_0x8005, 1
setvar VAR_0x8006, 1
- special sub_818E9AC
+ special CallBattleDomeFunction
special LoadPlayerParty
special HealPlayerParty
goto BattleFrontier_BattleDomeLobby_EventScript_249991
@@ -112,18 +112,18 @@ BattleFrontier_BattleDomeLobby_EventScript_249940:: @ 8249940
setvar VAR_0x8004, 2
setvar VAR_0x8005, 1
setvar VAR_0x8006, 0
- special sub_818E9AC
+ special CallBattleDomeFunction
setvar VAR_0x8004, 2
setvar VAR_0x8005, 6
setvar VAR_0x8006, 1
- special sub_818E9AC
+ special CallBattleDomeFunction
special LoadPlayerParty
special HealPlayerParty
BattleFrontier_BattleDomeLobby_EventScript_249991:: @ 8249991
setvar VAR_0x8004, 13
setvar VAR_0x8005, 0
- special sub_818E9AC
+ special CallBattleDomeFunction
playse SE_SAVE
waitse
call BattleFrontier_BattleDomeLobby_EventScript_23E8E0
@@ -154,7 +154,7 @@ BattleFrontier_BattleDomeLobby_EventScript_2499F9:: @ 82499F9
waitmessage
setvar VAR_0x8004, 13
setvar VAR_0x8005, 1
- special sub_818E9AC
+ special CallBattleDomeFunction
playse SE_SAVE
waitse
setvar VAR_0x8004, 2
@@ -168,7 +168,7 @@ BattleFrontier_BattleDomeLobby_EventScript_249A35:: @ 8249A35
lock
faceplayer
setvar VAR_FRONTIER_FACILITY, 1
- setvar VAR_0x40CE, 0
+ setvar VAR_FRONTIER_BATTLE_MODE, 0
goto BattleFrontier_BattleDomeLobby_EventScript_249A59
end
@@ -176,21 +176,21 @@ BattleFrontier_BattleDomeLobby_EventScript_249A47:: @ 8249A47
lock
faceplayer
setvar VAR_FRONTIER_FACILITY, 1
- setvar VAR_0x40CE, 1
+ setvar VAR_FRONTIER_BATTLE_MODE, 1
goto BattleFrontier_BattleDomeLobby_EventScript_249A59
end
BattleFrontier_BattleDomeLobby_EventScript_249A59:: @ 8249A59
special SavePlayerParty
- compare VAR_0x40CE, 0
+ compare VAR_FRONTIER_BATTLE_MODE, 0
call_if 1, BattleFrontier_BattleDomeLobby_EventScript_249CFD
- compare VAR_0x40CE, 1
+ compare VAR_FRONTIER_BATTLE_MODE, 1
call_if 1, BattleFrontier_BattleDomeLobby_EventScript_249D06
BattleFrontier_BattleDomeLobby_EventScript_249A72:: @ 8249A72
- compare VAR_0x40CE, 0
+ compare VAR_FRONTIER_BATTLE_MODE, 0
call_if 1, BattleFrontier_BattleDomeLobby_EventScript_249D0F
- compare VAR_0x40CE, 1
+ compare VAR_FRONTIER_BATTLE_MODE, 1
call_if 1, BattleFrontier_BattleDomeLobby_EventScript_249D15
waitmessage
multichoice 17, 6, 23, 0
@@ -236,7 +236,7 @@ BattleFrontier_BattleDomeLobby_EventScript_249B60:: @ 8249B60
setvar VAR_0x8005, 4
special sub_81A1780
setvar VAR_0x8004, 0
- special sub_818E9AC
+ special CallBattleDomeFunction
setvar VAR_0x8004, 2
setvar VAR_0x8005, 0
setvar VAR_0x8006, 1
@@ -253,7 +253,7 @@ BattleFrontier_BattleDomeLobby_EventScript_249B60:: @ 8249B60
compare VAR_RESULT, 0
goto_eq BattleFrontier_BattleDomeLobby_EventScript_249C4A
setvar VAR_0x8004, 22
- special sub_818E9AC
+ special CallBattleDomeFunction
BattleFrontier_BattleDomeLobby_EventScript_249BC2:: @ 8249BC2
special SavePlayerParty
@@ -261,7 +261,7 @@ BattleFrontier_BattleDomeLobby_EventScript_249BC2:: @ 8249BC2
setvar VAR_0x8005, 3
special sub_81A1780
setvar VAR_0x8004, 15
- special sub_818E9AC
+ special CallBattleDomeFunction
msgbox BattleFrontier_BattleDomeLobby_Text_24A437, 4
closemessage
call BattleFrontier_BattleDomeLobby_EventScript_249C6E
@@ -272,9 +272,9 @@ BattleFrontier_BattleDomeLobby_EventScript_249BC2:: @ 8249BC2
end
BattleFrontier_BattleDomeLobby_EventScript_249BFA:: @ 8249BFA
- compare VAR_0x40CE, 0
+ compare VAR_FRONTIER_BATTLE_MODE, 0
call_if 1, BattleFrontier_BattleDomeLobby_EventScript_249D1B
- compare VAR_0x40CE, 1
+ compare VAR_FRONTIER_BATTLE_MODE, 1
call_if 1, BattleFrontier_BattleDomeLobby_EventScript_249D24
goto BattleFrontier_BattleDomeLobby_EventScript_249A72
@@ -309,26 +309,26 @@ BattleFrontier_BattleDomeLobby_EventScript_249C6C:: @ 8249C6C
end
BattleFrontier_BattleDomeLobby_EventScript_249C6E:: @ 8249C6E
- compare VAR_0x40CE, 0
+ compare VAR_FRONTIER_BATTLE_MODE, 0
call_if 1, BattleFrontier_BattleDomeLobby_EventScript_249CDD
- compare VAR_0x40CE, 1
+ compare VAR_FRONTIER_BATTLE_MODE, 1
call_if 1, BattleFrontier_BattleDomeLobby_EventScript_249CE5
applymovement 255, BattleFrontier_BattleDomeLobby_Movement_249D45
waitmovement 0
- compare VAR_0x40CE, 0
+ compare VAR_FRONTIER_BATTLE_MODE, 0
call_if 1, BattleFrontier_BattleDomeLobby_EventScript_249D2D
- compare VAR_0x40CE, 1
+ compare VAR_FRONTIER_BATTLE_MODE, 1
call_if 1, BattleFrontier_BattleDomeLobby_EventScript_249D33
waitdooranim
- compare VAR_0x40CE, 0
+ compare VAR_FRONTIER_BATTLE_MODE, 0
call_if 1, BattleFrontier_BattleDomeLobby_EventScript_249CED
- compare VAR_0x40CE, 1
+ compare VAR_FRONTIER_BATTLE_MODE, 1
call_if 1, BattleFrontier_BattleDomeLobby_EventScript_249CF5
applymovement 255, BattleFrontier_BattleDomeLobby_Movement_249D4E
waitmovement 0
- compare VAR_0x40CE, 0
+ compare VAR_FRONTIER_BATTLE_MODE, 0
call_if 1, BattleFrontier_BattleDomeLobby_EventScript_249D39
- compare VAR_0x40CE, 1
+ compare VAR_FRONTIER_BATTLE_MODE, 1
call_if 1, BattleFrontier_BattleDomeLobby_EventScript_249D3F
waitdooranim
return
@@ -433,7 +433,7 @@ BattleFrontier_BattleDomeLobby_EventScript_249D6B:: @ 8249D6B
BattleFrontier_BattleDomeLobby_EventScript_249D84:: @ 8249D84
setvar VAR_0x8004, 1
setvar VAR_0x8005, 9
- special sub_818E9AC
+ special CallBattleDomeFunction
compare VAR_RESULT, 0
call_if 1, BattleFrontier_BattleDomeLobby_EventScript_249DC9
compare VAR_RESULT, 1
@@ -444,7 +444,7 @@ BattleFrontier_BattleDomeLobby_EventScript_249D84:: @ 8249D84
call_if 1, BattleFrontier_BattleDomeLobby_EventScript_249DE4
fadescreen 1
setvar VAR_0x8004, 8
- special sub_818E9AC
+ special CallBattleDomeFunction
waitstate
end
@@ -466,7 +466,7 @@ BattleFrontier_BattleDomeLobby_EventScript_249DE4:: @ 8249DE4
BattleFrontier_BattleDomeLobby_EventScript_249DED:: @ 8249DED
setvar VAR_0x8004, 20
- special sub_818E9AC
+ special CallBattleDomeFunction
msgbox BattleFrontier_BattleDomeLobby_Text_24AA76, 2
end
diff --git a/data/maps/BattleFrontier_BattleDomePreBattleRoom/scripts.inc b/data/maps/BattleFrontier_BattleDomePreBattleRoom/scripts.inc
index 024162cee..e004eafac 100644
--- a/data/maps/BattleFrontier_BattleDomePreBattleRoom/scripts.inc
+++ b/data/maps/BattleFrontier_BattleDomePreBattleRoom/scripts.inc
@@ -87,7 +87,7 @@ BattleFrontier_BattleDomePreBattleRoom_EventScript_24B377:: @ 824B377
BattleFrontier_BattleDomePreBattleRoom_EventScript_24B3A9:: @ 824B3A9
setvar VAR_0x8004, 12
setvar VAR_0x8005, 9
- special sub_818E9AC
+ special CallBattleDomeFunction
goto BattleFrontier_BattleDomePreBattleRoom_EventScript_24BE9A
BattleFrontier_BattleDomePreBattleRoom_EventScript_24B3BB:: @ 824B3BB
@@ -95,7 +95,7 @@ BattleFrontier_BattleDomePreBattleRoom_EventScript_24B3BB:: @ 824B3BB
waitmessage
setvar VAR_0x8004, 13
setvar VAR_0x8005, 2
- special sub_818E9AC
+ special CallBattleDomeFunction
playse SE_SAVE
waitse
fadescreen 1
@@ -107,7 +107,7 @@ BattleFrontier_BattleDomePreBattleRoom_EventScript_24B3DD:: @ 824B3DD
msgbox BattleFrontier_BattleDomePreBattleRoom_Text_24B9B5, 4
fadescreen 1
setvar VAR_0x8004, 6
- special sub_818E9AC
+ special CallBattleDomeFunction
waitstate
goto BattleFrontier_BattleDomePreBattleRoom_EventScript_24B24F
@@ -115,7 +115,7 @@ BattleFrontier_BattleDomePreBattleRoom_EventScript_24B3F5:: @ 824B3F5
call BattleFrontier_BattleDomePreBattleRoom_EventScript_24B40A
fadescreen 1
setvar VAR_0x8004, 7
- special sub_818E9AC
+ special CallBattleDomeFunction
waitstate
goto BattleFrontier_BattleDomePreBattleRoom_EventScript_24B24F
@@ -162,11 +162,11 @@ BattleFrontier_BattleDomePreBattleRoom_EventScript_24B46D:: @ 824B46D
goto_eq BattleFrontier_BattleDomePreBattleRoom_EventScript_24B24F
setvar VAR_0x8004, 2
setvar VAR_0x8005, 8
- special sub_818E9AC
+ special CallBattleDomeFunction
setvar VAR_0x8004, 18
- special sub_818E9AC
+ special CallBattleDomeFunction
setvar VAR_0x8004, 9
- special sub_818E9AC
+ special CallBattleDomeFunction
msgbox BattleFrontier_BattleDomePreBattleRoom_Text_24B748, 4
closemessage
applymovement 1, BattleFrontier_BattleDomePreBattleRoom_Movement_24B64F
@@ -253,7 +253,7 @@ BattleFrontier_BattleDomePreBattleRoom_EventScript_24B5C7:: @ 824B5C7
call BattleFrontier_BattleDomePreBattleRoom_EventScript_24B600
fadescreen 1
setvar VAR_0x8004, 11
- special sub_818E9AC
+ special CallBattleDomeFunction
waitstate
goto BattleFrontier_BattleDomePreBattleRoom_EventScript_24B24F
diff --git a/data/maps/BattleFrontier_BattleFactoryBattleRoom/scripts.inc b/data/maps/BattleFrontier_BattleFactoryBattleRoom/scripts.inc
index 5b6a674fb..2968e2c0f 100644
--- a/data/maps/BattleFrontier_BattleFactoryBattleRoom/scripts.inc
+++ b/data/maps/BattleFrontier_BattleFactoryBattleRoom/scripts.inc
@@ -291,7 +291,7 @@ BattleFrontier_BattleFactoryBattleRoom_Movement_25B18B: @ 825B18B
BattleFrontier_BattleFactoryBattleRoom_EventScript_25B190:: @ 825B190
BattleFrontier_BattleFactoryPreBattleRoom_EventScript_25B190:: @ 825B190
- copyvar VAR_RESULT, VAR_0x40CE
+ copyvar VAR_RESULT, VAR_FRONTIER_BATTLE_MODE
compare VAR_RESULT, 1
goto_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_25B1AA
warp MAP_BATTLE_FRONTIER_BATTLE_FACTORY_LOBBY, 255, 4, 8
diff --git a/data/maps/BattleFrontier_BattleFactoryLobby/scripts.inc b/data/maps/BattleFrontier_BattleFactoryLobby/scripts.inc
index ec2483390..7846da874 100644
--- a/data/maps/BattleFrontier_BattleFactoryLobby/scripts.inc
+++ b/data/maps/BattleFrontier_BattleFactoryLobby/scripts.inc
@@ -143,27 +143,27 @@ BattleFrontier_BattleFactoryLobby_EventScript_2585CB:: @ 82585CB
lock
faceplayer
setvar VAR_FRONTIER_FACILITY, 4
- setvar VAR_0x40CE, 0
+ setvar VAR_FRONTIER_BATTLE_MODE, 0
goto BattleFrontier_BattleFactoryLobby_EventScript_2585ED
end
BattleFrontier_BattleFactoryLobby_EventScript_2585DD:: @ 82585DD
setvar VAR_FRONTIER_FACILITY, 4
- setvar VAR_0x40CE, 1
+ setvar VAR_FRONTIER_BATTLE_MODE, 1
goto BattleFrontier_BattleFactoryLobby_EventScript_2585ED
end
BattleFrontier_BattleFactoryLobby_EventScript_2585ED:: @ 82585ED
special SavePlayerParty
- compare VAR_0x40CE, 0
+ compare VAR_FRONTIER_BATTLE_MODE, 0
call_if 1, BattleFrontier_BattleFactoryLobby_EventScript_2587B1
- compare VAR_0x40CE, 1
+ compare VAR_FRONTIER_BATTLE_MODE, 1
call_if 1, BattleFrontier_BattleFactoryLobby_EventScript_2587BA
BattleFrontier_BattleFactoryLobby_EventScript_258606:: @ 8258606
- compare VAR_0x40CE, 0
+ compare VAR_FRONTIER_BATTLE_MODE, 0
call_if 1, BattleFrontier_BattleFactoryLobby_EventScript_2587C3
- compare VAR_0x40CE, 1
+ compare VAR_FRONTIER_BATTLE_MODE, 1
call_if 1, BattleFrontier_BattleFactoryLobby_EventScript_2587C9
waitmessage
multichoice 17, 6, 23, 0
@@ -218,9 +218,9 @@ BattleFrontier_BattleFactoryLobby_EventScript_25871A:: @ 825871A
special SavePlayerParty
msgbox BattleFrontier_BattleFactoryLobby_Text_258CB1, 4
closemessage
- compare VAR_0x40CE, 0
+ compare VAR_FRONTIER_BATTLE_MODE, 0
call_if 1, BattleFrontier_BattleFactoryLobby_EventScript_25875C
- compare VAR_0x40CE, 1
+ compare VAR_FRONTIER_BATTLE_MODE, 1
call_if 1, BattleFrontier_BattleFactoryLobby_EventScript_258762
applymovement VAR_LAST_TALKED, BattleFrontier_BattleFactoryLobby_Movement_2587A7
applymovement 255, BattleFrontier_BattleFactoryLobby_Movement_2587AC
@@ -239,9 +239,9 @@ BattleFrontier_BattleFactoryLobby_EventScript_258762:: @ 8258762
return
BattleFrontier_BattleFactoryLobby_EventScript_258768:: @ 8258768
- compare VAR_0x40CE, 0
+ compare VAR_FRONTIER_BATTLE_MODE, 0
call_if 1, BattleFrontier_BattleFactoryLobby_EventScript_2587CF
- compare VAR_0x40CE, 1
+ compare VAR_FRONTIER_BATTLE_MODE, 1
call_if 1, BattleFrontier_BattleFactoryLobby_EventScript_2587D8
goto BattleFrontier_BattleFactoryLobby_EventScript_258606
diff --git a/data/maps/BattleFrontier_BattlePalaceBattleRoom/scripts.inc b/data/maps/BattleFrontier_BattlePalaceBattleRoom/scripts.inc
index 2ae154927..372b5da76 100644
--- a/data/maps/BattleFrontier_BattlePalaceBattleRoom/scripts.inc
+++ b/data/maps/BattleFrontier_BattlePalaceBattleRoom/scripts.inc
@@ -459,7 +459,7 @@ BattleFrontier_BattlePalaceBattleRoom_Movement_24FEB6: @ 824FEB6
step_end
BattleFrontier_BattlePalaceBattleRoom_EventScript_24FEBB:: @ 824FEBB
- copyvar VAR_RESULT, VAR_0x40CE
+ copyvar VAR_RESULT, VAR_FRONTIER_BATTLE_MODE
compare VAR_RESULT, 1
goto_eq BattleFrontier_BattlePalaceBattleRoom_EventScript_24FED5
warp MAP_BATTLE_FRONTIER_BATTLE_PALACE_LOBBY, 255, 5, 7
diff --git a/data/maps/BattleFrontier_BattlePalaceLobby/scripts.inc b/data/maps/BattleFrontier_BattlePalaceLobby/scripts.inc
index 91c1abd0f..b86ffa2fb 100644
--- a/data/maps/BattleFrontier_BattlePalaceLobby/scripts.inc
+++ b/data/maps/BattleFrontier_BattlePalaceLobby/scripts.inc
@@ -134,7 +134,7 @@ BattleFrontier_BattlePalaceLobby_EventScript_24D944:: @ 824D944
lock
faceplayer
setvar VAR_FRONTIER_FACILITY, 2
- setvar VAR_0x40CE, 0
+ setvar VAR_FRONTIER_BATTLE_MODE, 0
goto BattleFrontier_BattlePalaceLobby_EventScript_24D968
end
@@ -142,7 +142,7 @@ BattleFrontier_BattlePalaceLobby_EventScript_24D956:: @ 824D956
lock
faceplayer
setvar VAR_FRONTIER_FACILITY, 2
- setvar VAR_0x40CE, 1
+ setvar VAR_FRONTIER_BATTLE_MODE, 1
goto BattleFrontier_BattlePalaceLobby_EventScript_24D968
end
@@ -153,15 +153,15 @@ BattleFrontier_BattlePalaceLobby_EventScript_24D968:: @ 824D968
compare VAR_RESULT, 0
goto_if 5, BattleFrontier_BattlePalaceLobby_EventScript_24D817
special SavePlayerParty
- compare VAR_0x40CE, 0
+ compare VAR_FRONTIER_BATTLE_MODE, 0
call_if 1, BattleFrontier_BattlePalaceLobby_EventScript_24DB9E
- compare VAR_0x40CE, 1
+ compare VAR_FRONTIER_BATTLE_MODE, 1
call_if 1, BattleFrontier_BattlePalaceLobby_EventScript_24DBA7
BattleFrontier_BattlePalaceLobby_EventScript_24D999:: @ 824D999
- compare VAR_0x40CE, 0
+ compare VAR_FRONTIER_BATTLE_MODE, 0
call_if 1, BattleFrontier_BattlePalaceLobby_EventScript_24DBB0
- compare VAR_0x40CE, 1
+ compare VAR_FRONTIER_BATTLE_MODE, 1
call_if 1, BattleFrontier_BattlePalaceLobby_EventScript_24DBB6
waitmessage
multichoice 17, 6, 23, 0
@@ -242,7 +242,7 @@ BattleFrontier_BattlePalaceLobby_EventScript_24DAF3:: @ 824DAF3
end
BattleFrontier_BattlePalaceLobby_EventScript_24DB20:: @ 824DB20
- compare VAR_0x40CE, 1
+ compare VAR_FRONTIER_BATTLE_MODE, 1
goto_eq BattleFrontier_BattlePalaceLobby_EventScript_24DB38
msgbox BattleFrontier_BattlePalaceLobby_Text_24DE17, 4
goto BattleFrontier_BattlePalaceLobby_EventScript_24D999
@@ -298,24 +298,24 @@ BattleFrontier_BattlePalaceLobby_EventScript_24DBB6:: @ 824DBB6
return
BattleFrontier_BattlePalaceLobby_EventScript_24DBBC:: @ 824DBBC
- compare VAR_0x40CE, 0
+ compare VAR_FRONTIER_BATTLE_MODE, 0
call_if 1, BattleFrontier_BattlePalaceLobby_EventScript_24DC23
- compare VAR_0x40CE, 1
+ compare VAR_FRONTIER_BATTLE_MODE, 1
call_if 1, BattleFrontier_BattlePalaceLobby_EventScript_24DC29
applymovement VAR_LAST_TALKED, BattleFrontier_BattlePalaceLobby_Movement_24DC47
applymovement 255, BattleFrontier_BattlePalaceLobby_Movement_24DC47
waitmovement 0
- compare VAR_0x40CE, 0
+ compare VAR_FRONTIER_BATTLE_MODE, 0
call_if 1, BattleFrontier_BattlePalaceLobby_EventScript_24DC2F
- compare VAR_0x40CE, 1
+ compare VAR_FRONTIER_BATTLE_MODE, 1
call_if 1, BattleFrontier_BattlePalaceLobby_EventScript_24DC35
waitdooranim
applymovement VAR_LAST_TALKED, BattleFrontier_BattlePalaceLobby_Movement_24DC49
applymovement 255, BattleFrontier_BattlePalaceLobby_Movement_24DC4C
waitmovement 0
- compare VAR_0x40CE, 0
+ compare VAR_FRONTIER_BATTLE_MODE, 0
call_if 1, BattleFrontier_BattlePalaceLobby_EventScript_24DC3B
- compare VAR_0x40CE, 1
+ compare VAR_FRONTIER_BATTLE_MODE, 1
call_if 1, BattleFrontier_BattlePalaceLobby_EventScript_24DC41
waitdooranim
return
diff --git a/data/maps/BattleFrontier_BattlePikeLobby/scripts.inc b/data/maps/BattleFrontier_BattlePikeLobby/scripts.inc
index 5323c4a6b..0b356792f 100644
--- a/data/maps/BattleFrontier_BattlePikeLobby/scripts.inc
+++ b/data/maps/BattleFrontier_BattlePikeLobby/scripts.inc
@@ -126,7 +126,7 @@ BattleFrontier_BattlePikeLobby_EventScript_25B868:: @ 825B868
lock
faceplayer
setvar VAR_FRONTIER_FACILITY, 5
- setvar VAR_0x40CE, 0
+ setvar VAR_FRONTIER_BATTLE_MODE, 0
special SavePlayerParty
msgbox BattleFrontier_BattlePikeLobby_Text_25BB52, 4
diff --git a/data/maps/BattleFrontier_BattlePyramidLobby/scripts.inc b/data/maps/BattleFrontier_BattlePyramidLobby/scripts.inc
index 07b9fee47..ccc7b1032 100644
--- a/data/maps/BattleFrontier_BattlePyramidLobby/scripts.inc
+++ b/data/maps/BattleFrontier_BattlePyramidLobby/scripts.inc
@@ -130,7 +130,7 @@ BattleFrontier_BattlePyramidLobby_EventScript_2508B1:: @ 82508B1
lock
faceplayer
setvar VAR_FRONTIER_FACILITY, 6
- setvar VAR_0x40CE, 0
+ setvar VAR_FRONTIER_BATTLE_MODE, 0
special SavePlayerParty
msgbox BattleFrontier_BattlePyramidLobby_Text_250F31, 4
diff --git a/data/maps/BattleFrontier_BattleTowerBattleRoom/scripts.inc b/data/maps/BattleFrontier_BattleTowerBattleRoom/scripts.inc
index f684e215d..d687f83dd 100644
--- a/data/maps/BattleFrontier_BattleTowerBattleRoom/scripts.inc
+++ b/data/maps/BattleFrontier_BattleTowerBattleRoom/scripts.inc
@@ -366,7 +366,7 @@ BattleFrontier_BattleTowerBattleRoom_EventScript_24210E:: @ 824210E
setvar VAR_0x8005, 0
special sub_8163AC4
waitstate
- copyvar VAR_0x8004, VAR_0x40CE
+ copyvar VAR_0x8004, VAR_FRONTIER_BATTLE_MODE
compare VAR_0x8004, 3
goto_eq BattleFrontier_BattleTowerBattleRoom_EventScript_24215A
setvar VAR_0x8004, 18
@@ -484,7 +484,7 @@ BattleFrontier_BattleTowerBattleRoom_Movement_2421B2: @ 82421B2
BattleFrontier_BattleTowerBattleRoom2_EventScript_2421B8:: @ 82421B8
BattleFrontier_BattleTowerBattleRoom_EventScript_2421B8:: @ 82421B8
- copyvar VAR_RESULT, VAR_0x40CE
+ copyvar VAR_RESULT, VAR_FRONTIER_BATTLE_MODE
compare VAR_RESULT, 1
goto_eq BattleFrontier_BattleTowerBattleRoom_EventScript_2421E8
compare VAR_RESULT, 2
diff --git a/data/maps/BattleFrontier_BattleTowerBattleRoom2/scripts.inc b/data/maps/BattleFrontier_BattleTowerBattleRoom2/scripts.inc
index d1b07451c..556d4499a 100644
--- a/data/maps/BattleFrontier_BattleTowerBattleRoom2/scripts.inc
+++ b/data/maps/BattleFrontier_BattleTowerBattleRoom2/scripts.inc
@@ -5,9 +5,9 @@ BattleFrontier_BattleTowerBattleRoom2_MapScripts:: @ 8248EE8
.byte 0
BattleFrontier_BattleTowerBattleRoom2_MapScript1_248EF8: @ 8248EF8
- compare VAR_0x40CE, 2
+ compare VAR_FRONTIER_BATTLE_MODE, 2
call_if 1, BattleFrontier_BattleTowerBattleRoom2_EventScript_248F0F
- compare VAR_0x40CE, 3
+ compare VAR_FRONTIER_BATTLE_MODE, 3
call_if 1, BattleFrontier_BattleTowerBattleRoom2_EventScript_248F2F
end
@@ -70,7 +70,7 @@ BattleFrontier_BattleTowerBattleRoom2_EventScript_248FB4:: @ 8248FB4
applymovement 1, BattleFrontier_BattleTowerBattleRoom2_Movement_249528
applymovement 4, BattleFrontier_BattleTowerBattleRoom2_Movement_24952E
waitmovement 0
- compare VAR_0x40CE, 3
+ compare VAR_FRONTIER_BATTLE_MODE, 3
goto_eq BattleFrontier_BattleTowerBattleRoom2_EventScript_249026
setvar VAR_0x8004, 7
setvar VAR_0x8005, 0
@@ -142,7 +142,7 @@ BattleFrontier_BattleTowerBattleRoom2_EventScript_2490AA:: @ 82490AA
applymovement 5, BattleFrontier_BattleTowerBattleRoom2_Movement_249524
applymovement 6, BattleFrontier_BattleTowerBattleRoom2_Movement_249524
waitmovement 0
- compare VAR_0x40CE, 3
+ compare VAR_FRONTIER_BATTLE_MODE, 3
goto_eq BattleFrontier_BattleTowerBattleRoom2_EventScript_249118
msgbox BattleFrontier_BattleTowerBattleRoom2_Text_242217, 4
goto BattleFrontier_BattleTowerBattleRoom2_EventScript_249121
@@ -157,7 +157,7 @@ BattleFrontier_BattleTowerBattleRoom2_EventScript_249121:: @ 8249121
setvar VAR_0x8004, 3
setvar VAR_0x8005, 2
special sub_81A1780
- compare VAR_0x40CE, 3
+ compare VAR_FRONTIER_BATTLE_MODE, 3
call_if 1, BattleFrontier_BattleTowerBattleRoom2_EventScript_249514
playfanfare MUS_ME_ASA
waitfanfare
@@ -168,7 +168,7 @@ BattleFrontier_BattleTowerBattleRoom2_EventScript_249143:: @ 8249143
setvar VAR_0x8005, 2
special sub_81A1780
call BattleFrontier_BattleTowerBattleRoom2_EventScript_2492FD
- compare VAR_0x40CE, 3
+ compare VAR_FRONTIER_BATTLE_MODE, 3
goto_eq BattleFrontier_BattleTowerBattleRoom2_EventScript_249283
call BattleFrontier_BattleTowerBattleRoom2_EventScript_23E8E0
compare VAR_RESULT, 1
@@ -256,7 +256,7 @@ BattleFrontier_BattleTowerBattleRoom2_EventScript_2492DB:: @ 82492DB
end
BattleFrontier_BattleTowerBattleRoom2_EventScript_2492FD:: @ 82492FD
- compare VAR_0x40CE, 3
+ compare VAR_FRONTIER_BATTLE_MODE, 3
goto_eq BattleFrontier_BattleTowerBattleRoom2_EventScript_24937E
copyvar VAR_TEMP_F, VAR_RESULT
switch VAR_TEMP_F
diff --git a/data/maps/BattleFrontier_BattleTowerCorridor2/scripts.inc b/data/maps/BattleFrontier_BattleTowerCorridor2/scripts.inc
index 36cf93ada..d28fa105d 100644
--- a/data/maps/BattleFrontier_BattleTowerCorridor2/scripts.inc
+++ b/data/maps/BattleFrontier_BattleTowerCorridor2/scripts.inc
@@ -5,9 +5,9 @@ BattleFrontier_BattleTowerCorridor2_MapScripts:: @ 8248D4A
.byte 0
BattleFrontier_BattleTowerCorridor2_MapScript1_248D5A: @ 8248D5A
- compare VAR_0x40CE, 2
+ compare VAR_FRONTIER_BATTLE_MODE, 2
call_if 1, BattleFrontier_BattleTowerCorridor2_EventScript_248D71
- compare VAR_0x40CE, 3
+ compare VAR_FRONTIER_BATTLE_MODE, 3
call_if 1, BattleFrontier_BattleTowerCorridor2_EventScript_248D91
end
@@ -87,13 +87,13 @@ BattleFrontier_BattleTowerCorridor2_EventScript_248DBC:: @ 8248DBC
end
BattleFrontier_BattleTowerCorridor2_EventScript_248E71:: @ 8248E71
- compare VAR_0x40CE, 0
+ compare VAR_FRONTIER_BATTLE_MODE, 0
call_if 1, BattleFrontier_BattleTowerCorridor2_EventScript_248E9E
- compare VAR_0x40CE, 1
+ compare VAR_FRONTIER_BATTLE_MODE, 1
call_if 1, BattleFrontier_BattleTowerCorridor2_EventScript_248E9E
- compare VAR_0x40CE, 2
+ compare VAR_FRONTIER_BATTLE_MODE, 2
call_if 1, BattleFrontier_BattleTowerCorridor2_EventScript_248EA8
- compare VAR_0x40CE, 3
+ compare VAR_FRONTIER_BATTLE_MODE, 3
call_if 1, BattleFrontier_BattleTowerCorridor2_EventScript_248EB2
return
diff --git a/data/maps/BattleFrontier_BattleTowerElevator/scripts.inc b/data/maps/BattleFrontier_BattleTowerElevator/scripts.inc
index 248c1f9ca..968d45772 100644
--- a/data/maps/BattleFrontier_BattleTowerElevator/scripts.inc
+++ b/data/maps/BattleFrontier_BattleTowerElevator/scripts.inc
@@ -14,7 +14,7 @@ BattleFrontier_BattleTowerElevator_EventScript_2419F0:: @ 82419F0
waitmovement 0
special sub_813A080
waitse
- special sub_8139A78
+ special ShakeScreenInElevator
waitstate
delay 48
applymovement 1, BattleFrontier_BattleTowerElevator_Movement_241A8E
@@ -24,13 +24,13 @@ BattleFrontier_BattleTowerElevator_EventScript_2419F0:: @ 82419F0
end
BattleFrontier_BattleTowerElevator_EventScript_241A28:: @ 8241A28
- compare VAR_0x40CE, 0
+ compare VAR_FRONTIER_BATTLE_MODE, 0
call_if 1, BattleFrontier_BattleTowerElevator_EventScript_241A55
- compare VAR_0x40CE, 1
+ compare VAR_FRONTIER_BATTLE_MODE, 1
call_if 1, BattleFrontier_BattleTowerElevator_EventScript_241A55
- compare VAR_0x40CE, 2
+ compare VAR_FRONTIER_BATTLE_MODE, 2
call_if 1, BattleFrontier_BattleTowerElevator_EventScript_241A5F
- compare VAR_0x40CE, 3
+ compare VAR_FRONTIER_BATTLE_MODE, 3
call_if 1, BattleFrontier_BattleTowerElevator_EventScript_241A72
return
diff --git a/data/maps/BattleFrontier_BattleTowerLobby/scripts.inc b/data/maps/BattleFrontier_BattleTowerLobby/scripts.inc
index 1cd2ff74a..2b07b7ea4 100644
--- a/data/maps/BattleFrontier_BattleTowerLobby/scripts.inc
+++ b/data/maps/BattleFrontier_BattleTowerLobby/scripts.inc
@@ -119,7 +119,7 @@ BattleFrontier_BattleTowerLobby_EventScript_23E7E2:: @ 823E7E2
end
BattleFrontier_BattleTowerLobby_EventScript_23E7F2:: @ 823E7F2
- compare VAR_0x40CE, 2
+ compare VAR_FRONTIER_BATTLE_MODE, 2
goto_if 5, BattleFrontier_BattleTowerLobby_EventScript_23E81E
checkflag FLAG_0x152
goto_eq BattleFrontier_BattleTowerLobby_EventScript_23E81E
@@ -214,7 +214,7 @@ BattleFrontier_BattleTowerLobby_EventScript_23E8E0:: @ 823E8E0
BattleFrontier_BattleTowerLobby_EventScript_23E8EE:: @ 823E8EE
lock
faceplayer
- compare VAR_0x40CE, 0
+ compare VAR_FRONTIER_BATTLE_MODE, 0
call_if 1, BattleFrontier_BattleTowerLobby_EventScript_23E930
message BattleFrontier_BattleTowerLobby_Text_23F737
waitmessage
@@ -254,7 +254,7 @@ BattleFrontier_BattleTowerLobby_EventScript_23E948:: @ 823E948
case 127, BattleFrontier_BattleTowerLobby_EventScript_23F0E6
BattleFrontier_BattleTowerLobby_EventScript_23E984:: @ 823E984
- setvar VAR_0x40CE, 0
+ setvar VAR_FRONTIER_BATTLE_MODE, 0
message BattleFrontier_BattleTowerLobby_Text_23FD3B
waitmessage
multichoice 17, 6, 24, 0
@@ -334,7 +334,7 @@ BattleFrontier_BattleTowerLobby_EventScript_23EAB1:: @ 823EAB1
case 127, BattleFrontier_BattleTowerLobby_EventScript_23F0E6
BattleFrontier_BattleTowerLobby_EventScript_23EAED:: @ 823EAED
- setvar VAR_0x40CE, 1
+ setvar VAR_FRONTIER_BATTLE_MODE, 1
message BattleFrontier_BattleTowerLobby_Text_23FD3B
waitmessage
multichoice 17, 6, 24, 0
@@ -415,7 +415,7 @@ BattleFrontier_BattleTowerLobby_EventScript_23EC1D:: @ 823EC1D
case 127, BattleFrontier_BattleTowerLobby_EventScript_23F0E6
BattleFrontier_BattleTowerLobby_EventScript_23EC59:: @ 823EC59
- setvar VAR_0x40CE, 2
+ setvar VAR_FRONTIER_BATTLE_MODE, 2
message BattleFrontier_BattleTowerLobby_Text_23FD3B
waitmessage
multichoice 17, 6, 24, 0
@@ -495,7 +495,7 @@ BattleFrontier_BattleTowerLobby_EventScript_23ED86:: @ 823ED86
case 127, BattleFrontier_BattleTowerLobby_EventScript_23F0E6
BattleFrontier_BattleTowerLobby_EventScript_23EDC2:: @ 823EDC2
- setvar VAR_0x40CE, 3
+ setvar VAR_FRONTIER_BATTLE_MODE, 3
message BattleFrontier_BattleTowerLobby_Text_23FD3B
waitmessage
multichoice 17, 6, 24, 0
@@ -679,7 +679,7 @@ BattleFrontier_BattleTowerLobby_EventScript_23F02B:: @ 823F02B
case 1, BattleFrontier_BattleTowerLobby_EventScript_23F08B
BattleFrontier_BattleTowerLobby_EventScript_23F046:: @ 823F046
- switch VAR_0x40CE
+ switch VAR_FRONTIER_BATTLE_MODE
case 0, BattleFrontier_BattleTowerLobby_EventScript_23F06F
case 1, BattleFrontier_BattleTowerLobby_EventScript_23F07D
msgbox BattleFrontier_BattleTowerLobby_Text_24038B, 4
@@ -697,7 +697,7 @@ BattleFrontier_BattleTowerLobby_EventScript_23F07D:: @ 823F07D
end
BattleFrontier_BattleTowerLobby_EventScript_23F08B:: @ 823F08B
- switch VAR_0x40CE
+ switch VAR_FRONTIER_BATTLE_MODE
case 0, BattleFrontier_BattleTowerLobby_EventScript_23F0B4
case 1, BattleFrontier_BattleTowerLobby_EventScript_23F0C2
msgbox BattleFrontier_BattleTowerLobby_Text_24046B, 4
@@ -754,7 +754,7 @@ BattleFrontier_BattleTowerLobby_EventScript_23F108:: @ 823F108
BattleFrontier_BattleTowerLobby_EventScript_23F135:: @ 823F135
call BattleFrontier_BattleTowerLobby_EventScript_23F1A7
- compare VAR_0x40CE, 3
+ compare VAR_FRONTIER_BATTLE_MODE, 3
goto_eq BattleFrontier_BattleTowerLobby_EventScript_23F152
msgbox BattleFrontier_BattleTowerLobby_Text_23FE11, 4
goto BattleFrontier_BattleTowerLobby_EventScript_23F15B
@@ -807,13 +807,13 @@ BattleFrontier_BattleTowerLobby_Movement_23F1A0: @ 823F1A0
step_end
BattleFrontier_BattleTowerLobby_EventScript_23F1A7:: @ 823F1A7
- compare VAR_0x40CE, 0
+ compare VAR_FRONTIER_BATTLE_MODE, 0
call_if 1, BattleFrontier_BattleTowerLobby_EventScript_23F1D4
- compare VAR_0x40CE, 1
+ compare VAR_FRONTIER_BATTLE_MODE, 1
call_if 1, BattleFrontier_BattleTowerLobby_EventScript_23F1D9
- compare VAR_0x40CE, 2
+ compare VAR_FRONTIER_BATTLE_MODE, 2
call_if 1, BattleFrontier_BattleTowerLobby_EventScript_23F1DE
- compare VAR_0x40CE, 3
+ compare VAR_FRONTIER_BATTLE_MODE, 3
call_if 1, BattleFrontier_BattleTowerLobby_EventScript_23F1E3
return
@@ -834,13 +834,13 @@ BattleFrontier_BattleTowerLobby_EventScript_23F1E3:: @ 823F1E3
return
BattleFrontier_BattleTowerLobby_EventScript_23F1E8:: @ 823F1E8
- compare VAR_0x40CE, 0
+ compare VAR_FRONTIER_BATTLE_MODE, 0
call_if 1, BattleFrontier_BattleTowerLobby_EventScript_23F215
- compare VAR_0x40CE, 1
+ compare VAR_FRONTIER_BATTLE_MODE, 1
call_if 1, BattleFrontier_BattleTowerLobby_EventScript_23F21B
- compare VAR_0x40CE, 2
+ compare VAR_FRONTIER_BATTLE_MODE, 2
call_if 1, BattleFrontier_BattleTowerLobby_EventScript_23F221
- compare VAR_0x40CE, 3
+ compare VAR_FRONTIER_BATTLE_MODE, 3
call_if 1, BattleFrontier_BattleTowerLobby_EventScript_23F227
return
@@ -861,13 +861,13 @@ BattleFrontier_BattleTowerLobby_EventScript_23F227:: @ 823F227
return
BattleFrontier_BattleTowerLobby_EventScript_23F22D:: @ 823F22D
- compare VAR_0x40CE, 0
+ compare VAR_FRONTIER_BATTLE_MODE, 0
call_if 1, BattleFrontier_BattleTowerLobby_EventScript_23F25A
- compare VAR_0x40CE, 1
+ compare VAR_FRONTIER_BATTLE_MODE, 1
call_if 1, BattleFrontier_BattleTowerLobby_EventScript_23F260
- compare VAR_0x40CE, 2
+ compare VAR_FRONTIER_BATTLE_MODE, 2
call_if 1, BattleFrontier_BattleTowerLobby_EventScript_23F266
- compare VAR_0x40CE, 3
+ compare VAR_FRONTIER_BATTLE_MODE, 3
call_if 1, BattleFrontier_BattleTowerLobby_EventScript_23F26C
return
@@ -888,13 +888,13 @@ BattleFrontier_BattleTowerLobby_EventScript_23F26C:: @ 823F26C
return
BattleFrontier_BattleTowerLobby_EventScript_23F272:: @ 823F272
- compare VAR_0x40CE, 0
+ compare VAR_FRONTIER_BATTLE_MODE, 0
call_if 1, BattleFrontier_BattleTowerLobby_EventScript_23F29F
- compare VAR_0x40CE, 1
+ compare VAR_FRONTIER_BATTLE_MODE, 1
call_if 1, BattleFrontier_BattleTowerLobby_EventScript_23F2A5
- compare VAR_0x40CE, 2
+ compare VAR_FRONTIER_BATTLE_MODE, 2
call_if 1, BattleFrontier_BattleTowerLobby_EventScript_23F2AB
- compare VAR_0x40CE, 3
+ compare VAR_FRONTIER_BATTLE_MODE, 3
call_if 1, BattleFrontier_BattleTowerLobby_EventScript_23F2B1
return
diff --git a/data/maps/BattleFrontier_OutsideEast/scripts.inc b/data/maps/BattleFrontier_OutsideEast/scripts.inc
index dff56322a..0a3723acc 100644
--- a/data/maps/BattleFrontier_OutsideEast/scripts.inc
+++ b/data/maps/BattleFrontier_OutsideEast/scripts.inc
@@ -9,7 +9,7 @@ BattleFrontier_OutsideEast_MapScript1_242C0F: @ 8242C0F
end
BattleFrontier_OutsideEast_EventScript_242C19:: @ 8242C19
- specialvar VAR_RESULT, sub_8138B80
+ specialvar VAR_RESULT, GetBattleOutcome
compare VAR_RESULT, 7
goto_if 5, BattleFrontier_OutsideEast_EventScript_27374E
removeobject VAR_LAST_TALKED
@@ -134,7 +134,7 @@ BattleFrontier_OutsideEast_EventScript_242CFC:: @ 8242CFC
setflag FLAG_SYS_CTRL_OBJ_DELETE
dowildbattle
clearflag FLAG_SYS_CTRL_OBJ_DELETE
- specialvar VAR_RESULT, sub_8138B80
+ specialvar VAR_RESULT, GetBattleOutcome
compare VAR_RESULT, 1
goto_eq BattleFrontier_OutsideEast_EventScript_242D60
compare VAR_RESULT, 4
diff --git a/data/maps/BattleFrontier_PokemonCenter_1F/scripts.inc b/data/maps/BattleFrontier_PokemonCenter_1F/scripts.inc
index 23818d64c..3dff67a93 100644
--- a/data/maps/BattleFrontier_PokemonCenter_1F/scripts.inc
+++ b/data/maps/BattleFrontier_PokemonCenter_1F/scripts.inc
@@ -4,7 +4,7 @@ BattleFrontier_PokemonCenter_1F_MapScripts:: @ 82678F9
.byte 0
BattleFrontier_PokemonCenter_1F_MapScript1_267904: @ 8267904
- setrespawn 22
+ setrespawn HEAL_LOCATION_BATTLE_FRONTIER_OUTSIDE_EAST
end
BattleFrontier_PokemonCenter_1F_EventScript_267908:: @ 8267908
diff --git a/data/maps/BattleFrontier_ScottsHouse/scripts.inc b/data/maps/BattleFrontier_ScottsHouse/scripts.inc
index 5be72b9b5..da73da354 100644
--- a/data/maps/BattleFrontier_ScottsHouse/scripts.inc
+++ b/data/maps/BattleFrontier_ScottsHouse/scripts.inc
@@ -110,7 +110,7 @@ BattleFrontier_ScottsHouse_EventScript_263811:: @ 8263811
end
BattleFrontier_ScottsHouse_EventScript_26381B:: @ 826381B
- setvar VAR_0x40CE, 0
+ setvar VAR_FRONTIER_BATTLE_MODE, 0
setvar VAR_0x8004, 2
setvar VAR_0x8005, 1
setvar VAR_0x8006, 0
@@ -153,7 +153,7 @@ BattleFrontier_ScottsHouse_EventScript_2638AA:: @ 82638AA
end
BattleFrontier_ScottsHouse_EventScript_2638B4:: @ 82638B4
- setvar VAR_0x40CE, 0
+ setvar VAR_FRONTIER_BATTLE_MODE, 0
setvar VAR_0x8004, 2
setvar VAR_0x8005, 1
setvar VAR_0x8006, 0
diff --git a/data/maps/BirthIsland_Exterior/scripts.inc b/data/maps/BirthIsland_Exterior/scripts.inc
index b2427e95d..787230c60 100644
--- a/data/maps/BirthIsland_Exterior/scripts.inc
+++ b/data/maps/BirthIsland_Exterior/scripts.inc
@@ -37,7 +37,7 @@ BirthIsland_Exterior_MapScript1_267F65: @ 8267F65
end
BirthIsland_Exterior_EventScript_267F6F:: @ 8267F6F
- specialvar VAR_RESULT, sub_8138B80
+ specialvar VAR_RESULT, GetBattleOutcome
compare VAR_RESULT, 7
goto_if 5, BirthIsland_Exterior_EventScript_27374E
removeobject 2
@@ -91,7 +91,7 @@ BirthIsland_Exterior_EventScript_267FC1:: @ 8267FC1
special BattleSetup_StartLegendaryBattle
waitstate
clearflag FLAG_SYS_CTRL_OBJ_DELETE
- specialvar VAR_RESULT, sub_8138B80
+ specialvar VAR_RESULT, GetBattleOutcome
compare VAR_RESULT, 1
goto_eq BirthIsland_Exterior_EventScript_26803B
compare VAR_RESULT, 4
diff --git a/data/maps/DesertRuins/scripts.inc b/data/maps/DesertRuins/scripts.inc
index 9137902f2..45d192c80 100644
--- a/data/maps/DesertRuins/scripts.inc
+++ b/data/maps/DesertRuins/scripts.inc
@@ -10,7 +10,7 @@ DesertRuins_MapScript1_22D96B: @ 822D96B
end
DesertRuins_EventScript_22D975:: @ 822D975
- specialvar VAR_RESULT, sub_8138B80
+ specialvar VAR_RESULT, GetBattleOutcome
compare VAR_RESULT, 7
goto_if 5, DesertRuins_EventScript_27374E
removeobject VAR_LAST_TALKED
@@ -75,7 +75,7 @@ DesertRuins_EventScript_22DA02:: @ 822DA02
special StartRegiBattle
waitstate
clearflag FLAG_SYS_CTRL_OBJ_DELETE
- specialvar VAR_RESULT, sub_8138B80
+ specialvar VAR_RESULT, GetBattleOutcome
compare VAR_RESULT, 1
goto_eq DesertRuins_EventScript_22DA49
compare VAR_RESULT, 4
diff --git a/data/maps/DewfordTown_PokemonCenter_1F/scripts.inc b/data/maps/DewfordTown_PokemonCenter_1F/scripts.inc
index 15a1c81b9..a9ce59bc1 100644
--- a/data/maps/DewfordTown_PokemonCenter_1F/scripts.inc
+++ b/data/maps/DewfordTown_PokemonCenter_1F/scripts.inc
@@ -4,7 +4,7 @@ DewfordTown_PokemonCenter_1F_MapScripts:: @ 81FC523
.byte 0
DewfordTown_PokemonCenter_1F_MapScript1_1FC52E: @ 81FC52E
- setrespawn 15
+ setrespawn HEAL_LOCATION_DEWFORD_TOWN
call DewfordTown_PokemonCenter_1F_EventScript_2718DE
end
diff --git a/data/maps/EverGrandeCity_HallOfFame/scripts.inc b/data/maps/EverGrandeCity_HallOfFame/scripts.inc
index 60f0dd1ad..763d2ebb1 100644
--- a/data/maps/EverGrandeCity_HallOfFame/scripts.inc
+++ b/data/maps/EverGrandeCity_HallOfFame/scripts.inc
@@ -51,7 +51,7 @@ EverGrandeCity_HallOfFame_EventScript_229850:: @ 8229850
end
EverGrandeCity_HallOfFame_EventScript_2298E9:: @ 82298E9
- setrespawn 1
+ setrespawn HEAL_LOCATION_LITTLEROOT_TOWN_BRENDANS_HOUSE_2F
fadescreenspeed 1, 24
special GameClear
waitstate
@@ -59,7 +59,7 @@ EverGrandeCity_HallOfFame_EventScript_2298E9:: @ 82298E9
end
EverGrandeCity_HallOfFame_EventScript_2298F5:: @ 82298F5
- setrespawn 2
+ setrespawn HEAL_LOCATION_LITTLEROOT_TOWN_MAYS_HOUSE_2F
fadescreenspeed 1, 24
special GameClear
waitstate
diff --git a/data/maps/EverGrandeCity_PokemonCenter_1F/scripts.inc b/data/maps/EverGrandeCity_PokemonCenter_1F/scripts.inc
index ed6e6a497..16b82a592 100644
--- a/data/maps/EverGrandeCity_PokemonCenter_1F/scripts.inc
+++ b/data/maps/EverGrandeCity_PokemonCenter_1F/scripts.inc
@@ -4,7 +4,7 @@ EverGrandeCity_PokemonCenter_1F_MapScripts:: @ 8229A34
.byte 0
EverGrandeCity_PokemonCenter_1F_MapScript1_229A3F: @ 8229A3F
- setrespawn 11
+ setrespawn HEAL_LOCATION_EVER_GRANDE_CITY_1
checkflag FLAG_0x1CF
call_if 0, EverGrandeCity_PokemonCenter_1F_EventScript_229A4C
end
diff --git a/data/maps/EverGrandeCity_PokemonLeague_1F/scripts.inc b/data/maps/EverGrandeCity_PokemonLeague_1F/scripts.inc
index f1a6ce17f..b4046d022 100644
--- a/data/maps/EverGrandeCity_PokemonLeague_1F/scripts.inc
+++ b/data/maps/EverGrandeCity_PokemonLeague_1F/scripts.inc
@@ -4,7 +4,7 @@ EverGrandeCity_PokemonLeague_1F_MapScripts:: @ 82295D2
.byte 0
EverGrandeCity_PokemonLeague_1F_MapScript1_2295DD: @ 82295DD
- setrespawn 20
+ setrespawn HEAL_LOCATION_EVER_GRANDE_CITY_2
setflag FLAG_LANDMARK_POKEMON_LEAGUE
checkflag FLAG_0x107
call_if 0, EverGrandeCity_PokemonLeague_1F_EventScript_2295ED
diff --git a/data/maps/FallarborTown_BattleTentLobby/scripts.inc b/data/maps/FallarborTown_BattleTentLobby/scripts.inc
index 00efa5394..daf76cba2 100644
--- a/data/maps/FallarborTown_BattleTentLobby/scripts.inc
+++ b/data/maps/FallarborTown_BattleTentLobby/scripts.inc
@@ -149,7 +149,7 @@ FallarborTown_BattleTentLobby_EventScript_200021:: @ 8200021
FallarborTown_BattleTentLobby_EventScript_20005D:: @ 820005D
setvar VAR_FRONTIER_FACILITY, 3
- setvar VAR_0x40CE, 0
+ setvar VAR_FRONTIER_BATTLE_MODE, 0
setvar VAR_RESULT, 2
setvar VAR_0x8004, 15
special sub_81A1780
diff --git a/data/maps/FallarborTown_House2/scripts.inc b/data/maps/FallarborTown_House2/scripts.inc
index b78756e0a..7ab0666e8 100644
--- a/data/maps/FallarborTown_House2/scripts.inc
+++ b/data/maps/FallarborTown_House2/scripts.inc
@@ -38,7 +38,7 @@ FallarborTown_House2_EventScript_2013D6:: @ 82013D6
FallarborTown_House2_EventScript_20140C:: @ 820140C
msgbox FallarborTown_House2_Text_2015C3, 4
- special sub_8160638
+ special TeachMoveTutorMove
waitstate
compare VAR_0x8004, 0
goto_eq FallarborTown_House2_EventScript_2013D6
diff --git a/data/maps/FallarborTown_PokemonCenter_1F/scripts.inc b/data/maps/FallarborTown_PokemonCenter_1F/scripts.inc
index 15f5d2b9e..d11caa86f 100644
--- a/data/maps/FallarborTown_PokemonCenter_1F/scripts.inc
+++ b/data/maps/FallarborTown_PokemonCenter_1F/scripts.inc
@@ -4,7 +4,7 @@ FallarborTown_PokemonCenter_1F_MapScripts:: @ 8200BCD
.byte 0
FallarborTown_PokemonCenter_1F_MapScript1_200BD8: @ 8200BD8
- setrespawn 17
+ setrespawn HEAL_LOCATION_FALLARBOR_TOWN
call FallarborTown_PokemonCenter_1F_EventScript_2718DE
end
diff --git a/data/maps/FarawayIsland_Interior/scripts.inc b/data/maps/FarawayIsland_Interior/scripts.inc
index e7d67431d..70e41b42d 100644
--- a/data/maps/FarawayIsland_Interior/scripts.inc
+++ b/data/maps/FarawayIsland_Interior/scripts.inc
@@ -11,7 +11,7 @@ FarawayIsland_Interior_MapScript1_267D0F: @ 8267D0F
end
FarawayIsland_Interior_EventScript_267D19:: @ 8267D19
- specialvar VAR_RESULT, sub_8138B80
+ specialvar VAR_RESULT, GetBattleOutcome
compare VAR_RESULT, 1
goto_eq FarawayIsland_Interior_EventScript_267D4B
compare VAR_RESULT, 4
@@ -33,7 +33,7 @@ FarawayIsland_Interior_MapScript1_267D54: @ 8267D54
end
FarawayIsland_Interior_EventScript_267D5E:: @ 8267D5E
- specialvar VAR_RESULT, sub_8138B80
+ specialvar VAR_RESULT, GetBattleOutcome
compare VAR_RESULT, 7
goto_if 5, FarawayIsland_Interior_EventScript_27374E
removeobject VAR_LAST_TALKED
@@ -148,7 +148,7 @@ FarawayIsland_Interior_EventScript_267DF2:: @ 8267DF2
special BattleSetup_StartLegendaryBattle
waitstate
clearflag FLAG_SYS_CTRL_OBJ_DELETE
- specialvar VAR_RESULT, sub_8138B80
+ specialvar VAR_RESULT, GetBattleOutcome
compare VAR_RESULT, 1
goto_eq FarawayIsland_Interior_EventScript_267E96
compare VAR_RESULT, 4
diff --git a/data/maps/FortreeCity_PokemonCenter_1F/scripts.inc b/data/maps/FortreeCity_PokemonCenter_1F/scripts.inc
index e119a0f29..4885c7f15 100644
--- a/data/maps/FortreeCity_PokemonCenter_1F/scripts.inc
+++ b/data/maps/FortreeCity_PokemonCenter_1F/scripts.inc
@@ -4,7 +4,7 @@ FortreeCity_PokemonCenter_1F_MapScripts:: @ 82173D8
.byte 0
FortreeCity_PokemonCenter_1F_MapScript1_2173E3: @ 82173E3
- setrespawn 7
+ setrespawn HEAL_LOCATION_FORTREE_CITY
end
FortreeCity_PokemonCenter_1F_EventScript_2173E7:: @ 82173E7
diff --git a/data/maps/InsideOfTruck/scripts.inc b/data/maps/InsideOfTruck/scripts.inc
index 963dd196d..24fe954a8 100644
--- a/data/maps/InsideOfTruck/scripts.inc
+++ b/data/maps/InsideOfTruck/scripts.inc
@@ -24,7 +24,7 @@ InsideOfTruck_EventScript_23BF04:: @ 823BF04
end
InsideOfTruck_EventScript_23BF20:: @ 823BF20
- setrespawn 1
+ setrespawn HEAL_LOCATION_LITTLEROOT_TOWN_BRENDANS_HOUSE_2F
setvar VAR_0x4092, 1
setflag FLAG_0x2F7
setflag FLAG_0x2FA
@@ -37,7 +37,7 @@ InsideOfTruck_EventScript_23BF20:: @ 823BF20
end
InsideOfTruck_EventScript_23BF46:: @ 823BF46
- setrespawn 2
+ setrespawn HEAL_LOCATION_LITTLEROOT_TOWN_MAYS_HOUSE_2F
setvar VAR_0x4092, 2
setflag FLAG_0x2F6
setflag FLAG_0x2F9
diff --git a/data/maps/IslandCave/scripts.inc b/data/maps/IslandCave/scripts.inc
index a96d13902..b00b41d40 100644
--- a/data/maps/IslandCave/scripts.inc
+++ b/data/maps/IslandCave/scripts.inc
@@ -10,7 +10,7 @@ IslandCave_MapScript1_238E3A: @ 8238E3A
end
IslandCave_EventScript_238E44:: @ 8238E44
- specialvar VAR_RESULT, sub_8138B80
+ specialvar VAR_RESULT, GetBattleOutcome
compare VAR_RESULT, 7
goto_if 5, IslandCave_EventScript_27374E
removeobject VAR_LAST_TALKED
@@ -107,7 +107,7 @@ IslandCave_EventScript_238F58:: @ 8238F58
special StartRegiBattle
waitstate
clearflag FLAG_SYS_CTRL_OBJ_DELETE
- specialvar VAR_RESULT, sub_8138B80
+ specialvar VAR_RESULT, GetBattleOutcome
compare VAR_RESULT, 1
goto_eq IslandCave_EventScript_238F9F
compare VAR_RESULT, 4
diff --git a/data/maps/LavaridgeTown_PokemonCenter_1F/scripts.inc b/data/maps/LavaridgeTown_PokemonCenter_1F/scripts.inc
index 24f19b1d0..c7db56a0d 100644
--- a/data/maps/LavaridgeTown_PokemonCenter_1F/scripts.inc
+++ b/data/maps/LavaridgeTown_PokemonCenter_1F/scripts.inc
@@ -4,7 +4,7 @@ LavaridgeTown_PokemonCenter_1F_MapScripts:: @ 81FFAFA
.byte 0
LavaridgeTown_PokemonCenter_1F_MapScript1_1FFB05: @ 81FFB05
- setrespawn 16
+ setrespawn HEAL_LOCATION_LAVARIDGE_TOWN
call LavaridgeTown_PokemonCenter_1F_EventScript_2718DE
end
diff --git a/data/maps/LilycoveCity/scripts.inc b/data/maps/LilycoveCity/scripts.inc
index 87a129620..70018b229 100644
--- a/data/maps/LilycoveCity/scripts.inc
+++ b/data/maps/LilycoveCity/scripts.inc
@@ -255,7 +255,7 @@ LilycoveCity_EventScript_1E2DF8:: @ 81E2DF8
compare VAR_RESULT, 0
goto_eq LilycoveCity_EventScript_1E2E5A
msgbox LilycoveCity_Text_1E3234, 4
- switch VAR_FIRST_POKE
+ switch VAR_STARTER_MON
case 0, LilycoveCity_EventScript_1E2EDE
case 1, LilycoveCity_EventScript_1E2EEE
case 2, LilycoveCity_EventScript_1E2EFE
@@ -286,7 +286,7 @@ LilycoveCity_EventScript_1E2E6B:: @ 81E2E6B
compare VAR_RESULT, 0
goto_eq LilycoveCity_EventScript_1E2ECD
msgbox LilycoveCity_Text_1E373C, 4
- switch VAR_FIRST_POKE
+ switch VAR_STARTER_MON
case 0, LilycoveCity_EventScript_1E2F0E
case 1, LilycoveCity_EventScript_1E2F1E
case 2, LilycoveCity_EventScript_1E2F2E
diff --git a/data/maps/LilycoveCity_DepartmentStoreElevator/scripts.inc b/data/maps/LilycoveCity_DepartmentStoreElevator/scripts.inc
index 234751910..372d16dae 100644
--- a/data/maps/LilycoveCity_DepartmentStoreElevator/scripts.inc
+++ b/data/maps/LilycoveCity_DepartmentStoreElevator/scripts.inc
@@ -118,12 +118,12 @@ LilycoveCity_DepartmentStoreElevator_EventScript_2207E5:: @ 82207E5
applymovement VAR_LAST_TALKED, LilycoveCity_DepartmentStoreElevator_Movement_2725AA
waitmovement 0
waitse
- special sub_8139A78
+ special ShakeScreenInElevator
waitstate
setflag FLAG_0x002
return
LilycoveCity_DepartmentStoreElevator_EventScript_2207FC:: @ 82207FC
- special sub_8139994
+ special SetDepartmentStoreFloorVar
return
diff --git a/data/maps/LilycoveCity_DepartmentStore_1F/scripts.inc b/data/maps/LilycoveCity_DepartmentStore_1F/scripts.inc
index 8de2d5d6f..4a375cf5e 100644
--- a/data/maps/LilycoveCity_DepartmentStore_1F/scripts.inc
+++ b/data/maps/LilycoveCity_DepartmentStore_1F/scripts.inc
@@ -21,7 +21,7 @@ LilycoveCity_DepartmentStore_1F_EventScript_21F69C:: @ 821F69C
waitmessage
special RetrieveLotteryNumber
copyvar VAR_0x8008, VAR_RESULT
- special sub_81397C4
+ special BufferLottoTicketNumber
msgbox LilycoveCity_DepartmentStore_1F_Text_2A650B, 4
applymovement 2, LilycoveCity_DepartmentStore_1F_Movement_2725A8
waitmovement 0
diff --git a/data/maps/LilycoveCity_Harbor/scripts.inc b/data/maps/LilycoveCity_Harbor/scripts.inc
index 1dfd9c29a..99ad20280 100644
--- a/data/maps/LilycoveCity_Harbor/scripts.inc
+++ b/data/maps/LilycoveCity_Harbor/scripts.inc
@@ -89,7 +89,7 @@ LilycoveCity_Harbor_EventScript_21E149:: @ 821E149
msgbox LilycoveCity_Harbor_Text_21E864, 5
compare VAR_RESULT, 0
goto_eq LilycoveCity_Harbor_EventScript_21E5C0
- setvar VAR_PORTHOLE, 5
+ setvar VAR_PORTHOLE_STATE, 5
call LilycoveCity_Harbor_EventScript_21E5CC
warp MAP_SS_TIDAL_CORRIDOR, 255, 1, 10
waitstate
@@ -398,7 +398,7 @@ LilycoveCity_Harbor_EventScript_21E575:: @ 821E575
msgbox LilycoveCity_Harbor_Text_21E864, 5
compare VAR_RESULT, 0
goto_eq LilycoveCity_Harbor_EventScript_21E5C0
- setvar VAR_PORTHOLE, 5
+ setvar VAR_PORTHOLE_STATE, 5
call LilycoveCity_Harbor_EventScript_21E5CC
warp MAP_SS_TIDAL_CORRIDOR, 255, 1, 10
waitstate
diff --git a/data/maps/LilycoveCity_PokemonCenter_1F/scripts.inc b/data/maps/LilycoveCity_PokemonCenter_1F/scripts.inc
index b6ca09906..934f666ad 100644
--- a/data/maps/LilycoveCity_PokemonCenter_1F/scripts.inc
+++ b/data/maps/LilycoveCity_PokemonCenter_1F/scripts.inc
@@ -4,7 +4,7 @@ LilycoveCity_PokemonCenter_1F_MapScripts:: @ 821C5B2
.byte 0
LilycoveCity_PokemonCenter_1F_MapScript1_21C5BD: @ 821C5BD
- setrespawn 8
+ setrespawn HEAL_LOCATION_LILYCOVE_CITY
goto LilycoveCity_PokemonCenter_1F_EventScript_21C5C6
end
diff --git a/data/maps/LilycoveCity_PokemonTrainerFanClub/scripts.inc b/data/maps/LilycoveCity_PokemonTrainerFanClub/scripts.inc
index 74146fc7e..9587bcae3 100644
--- a/data/maps/LilycoveCity_PokemonTrainerFanClub/scripts.inc
+++ b/data/maps/LilycoveCity_PokemonTrainerFanClub/scripts.inc
@@ -4,7 +4,7 @@ LilycoveCity_PokemonTrainerFanClub_MapScripts:: @ 821C785
.byte 0
LilycoveCity_PokemonTrainerFanClub_MapScript2_21C790: @ 821C790
- map_script_2 VAR_0x4095, 1, LilycoveCity_PokemonTrainerFanClub_EventScript_21C79A
+ map_script_2 VAR_LILYCOVE_FAN_CLUB_STATE, 1, LilycoveCity_PokemonTrainerFanClub_EventScript_21C79A
.2byte 0
LilycoveCity_PokemonTrainerFanClub_EventScript_21C79A:: @ 821C79A
@@ -24,7 +24,7 @@ LilycoveCity_PokemonTrainerFanClub_EventScript_21C79A:: @ 821C79A
waitmovement 0
applymovement 4, LilycoveCity_PokemonTrainerFanClub_Movement_21C807
waitmovement 0
- setvar VAR_0x4095, 2
+ setvar VAR_LILYCOVE_FAN_CLUB_STATE, 2
releaseall
end
@@ -62,45 +62,45 @@ LilycoveCity_PokemonTrainerFanClub_Movement_21C807: @ 821C807
LilycoveCity_PokemonTrainerFanClub_MapScript1_21C80D: @ 821C80D
call LilycoveCity_PokemonTrainerFanClub_EventScript_21C8DA
- compare VAR_0x4095, 1
+ compare VAR_LILYCOVE_FAN_CLUB_STATE, 1
goto_eq LilycoveCity_PokemonTrainerFanClub_EventScript_21C9F8
- compare VAR_0x4095, 2
+ compare VAR_LILYCOVE_FAN_CLUB_STATE, 2
goto_eq LilycoveCity_PokemonTrainerFanClub_EventScript_21C829
end
LilycoveCity_PokemonTrainerFanClub_EventScript_21C829:: @ 821C829
- special sub_813BCE8
+ special UpdateMovedLilycoveFanClubMembers
call LilycoveCity_PokemonTrainerFanClub_EventScript_21C8F5
setvar VAR_0x8004, 8
- specialvar VAR_RESULT, sub_813BD60
+ specialvar VAR_RESULT, ShouldMoveLilycoveFanClubMember
compare VAR_RESULT, 0
call_if 1, LilycoveCity_PokemonTrainerFanClub_EventScript_21C9B8
setvar VAR_0x8004, 9
- specialvar VAR_RESULT, sub_813BD60
+ specialvar VAR_RESULT, ShouldMoveLilycoveFanClubMember
compare VAR_RESULT, 0
call_if 1, LilycoveCity_PokemonTrainerFanClub_EventScript_21C9C0
setvar VAR_0x8004, 10
- specialvar VAR_RESULT, sub_813BD60
+ specialvar VAR_RESULT, ShouldMoveLilycoveFanClubMember
compare VAR_RESULT, 0
call_if 1, LilycoveCity_PokemonTrainerFanClub_EventScript_21C9C8
setvar VAR_0x8004, 11
- specialvar VAR_RESULT, sub_813BD60
+ specialvar VAR_RESULT, ShouldMoveLilycoveFanClubMember
compare VAR_RESULT, 0
call_if 1, LilycoveCity_PokemonTrainerFanClub_EventScript_21C9D0
setvar VAR_0x8004, 12
- specialvar VAR_RESULT, sub_813BD60
+ specialvar VAR_RESULT, ShouldMoveLilycoveFanClubMember
compare VAR_RESULT, 0
call_if 1, LilycoveCity_PokemonTrainerFanClub_EventScript_21C9D8
setvar VAR_0x8004, 13
- specialvar VAR_RESULT, sub_813BD60
+ specialvar VAR_RESULT, ShouldMoveLilycoveFanClubMember
compare VAR_RESULT, 0
call_if 1, LilycoveCity_PokemonTrainerFanClub_EventScript_21C9E0
setvar VAR_0x8004, 14
- specialvar VAR_RESULT, sub_813BD60
+ specialvar VAR_RESULT, ShouldMoveLilycoveFanClubMember
compare VAR_RESULT, 0
call_if 1, LilycoveCity_PokemonTrainerFanClub_EventScript_21C9E8
setvar VAR_0x8004, 15
- specialvar VAR_RESULT, sub_813BD60
+ specialvar VAR_RESULT, ShouldMoveLilycoveFanClubMember
compare VAR_RESULT, 0
call_if 1, LilycoveCity_PokemonTrainerFanClub_EventScript_21C9F0
end
@@ -120,35 +120,35 @@ LilycoveCity_PokemonTrainerFanClub_EventScript_21C8F1:: @ 821C8F1
LilycoveCity_PokemonTrainerFanClub_EventScript_21C8F5:: @ 821C8F5
setvar VAR_0x8005, 8
setvar VAR_0x8004, 8
- specialvar VAR_RESULT, sub_813BD60
+ specialvar VAR_RESULT, ShouldMoveLilycoveFanClubMember
compare VAR_RESULT, 0
call_if 1, LilycoveCity_PokemonTrainerFanClub_EventScript_21C9AE
setvar VAR_0x8004, 9
- specialvar VAR_RESULT, sub_813BD60
+ specialvar VAR_RESULT, ShouldMoveLilycoveFanClubMember
compare VAR_RESULT, 0
call_if 1, LilycoveCity_PokemonTrainerFanClub_EventScript_21C9AE
setvar VAR_0x8004, 10
- specialvar VAR_RESULT, sub_813BD60
+ specialvar VAR_RESULT, ShouldMoveLilycoveFanClubMember
compare VAR_RESULT, 0
call_if 1, LilycoveCity_PokemonTrainerFanClub_EventScript_21C9AE
setvar VAR_0x8004, 11
- specialvar VAR_RESULT, sub_813BD60
+ specialvar VAR_RESULT, ShouldMoveLilycoveFanClubMember
compare VAR_RESULT, 0
call_if 1, LilycoveCity_PokemonTrainerFanClub_EventScript_21C9AE
setvar VAR_0x8004, 12
- specialvar VAR_RESULT, sub_813BD60
+ specialvar VAR_RESULT, ShouldMoveLilycoveFanClubMember
compare VAR_RESULT, 0
call_if 1, LilycoveCity_PokemonTrainerFanClub_EventScript_21C9AE
setvar VAR_0x8004, 13
- specialvar VAR_RESULT, sub_813BD60
+ specialvar VAR_RESULT, ShouldMoveLilycoveFanClubMember
compare VAR_RESULT, 0
call_if 1, LilycoveCity_PokemonTrainerFanClub_EventScript_21C9AE
setvar VAR_0x8004, 14
- specialvar VAR_RESULT, sub_813BD60
+ specialvar VAR_RESULT, ShouldMoveLilycoveFanClubMember
compare VAR_RESULT, 0
call_if 1, LilycoveCity_PokemonTrainerFanClub_EventScript_21C9AE
setvar VAR_0x8004, 15
- specialvar VAR_RESULT, sub_813BD60
+ specialvar VAR_RESULT, ShouldMoveLilycoveFanClubMember
compare VAR_RESULT, 0
call_if 1, LilycoveCity_PokemonTrainerFanClub_EventScript_21C9AE
compare VAR_0x8005, 5
@@ -208,13 +208,13 @@ LilycoveCity_PokemonTrainerFanClub_EventScript_21CA17:: @ 821CA17
lock
faceplayer
setvar VAR_0x8004, 13
- special sub_813BDB4
- compare VAR_0x4095, 0
+ special BufferStreakTrainerText
+ compare VAR_LILYCOVE_FAN_CLUB_STATE, 0
goto_eq LilycoveCity_PokemonTrainerFanClub_EventScript_21CA84
- specialvar VAR_RESULT, sub_813BD60
+ specialvar VAR_RESULT, ShouldMoveLilycoveFanClubMember
compare VAR_RESULT, 1
goto_eq LilycoveCity_PokemonTrainerFanClub_EventScript_21CA56
- specialvar VAR_RESULT, sub_813BCA8
+ specialvar VAR_RESULT, GetNumMovedLilycoveFanClubMembers
compare VAR_RESULT, 7
goto_eq LilycoveCity_PokemonTrainerFanClub_EventScript_21CA7A
msgbox LilycoveCity_PokemonTrainerFanClub_Text_21D12A, 4
@@ -222,7 +222,7 @@ LilycoveCity_PokemonTrainerFanClub_EventScript_21CA17:: @ 821CA17
end
LilycoveCity_PokemonTrainerFanClub_EventScript_21CA56:: @ 821CA56
- specialvar VAR_RESULT, sub_813BCA8
+ specialvar VAR_RESULT, GetNumMovedLilycoveFanClubMembers
compare VAR_RESULT, 1
goto_eq LilycoveCity_PokemonTrainerFanClub_EventScript_21CA70
msgbox LilycoveCity_PokemonTrainerFanClub_Text_21D094, 4
@@ -248,13 +248,13 @@ LilycoveCity_PokemonTrainerFanClub_EventScript_21CA8E:: @ 821CA8E
lock
faceplayer
setvar VAR_0x8004, 8
- special sub_813BDB4
- compare VAR_0x4095, 0
+ special BufferStreakTrainerText
+ compare VAR_LILYCOVE_FAN_CLUB_STATE, 0
goto_eq LilycoveCity_PokemonTrainerFanClub_EventScript_21CAFB
- specialvar VAR_RESULT, sub_813BD60
+ specialvar VAR_RESULT, ShouldMoveLilycoveFanClubMember
compare VAR_RESULT, 1
goto_eq LilycoveCity_PokemonTrainerFanClub_EventScript_21CACD
- specialvar VAR_RESULT, sub_813BCA8
+ specialvar VAR_RESULT, GetNumMovedLilycoveFanClubMembers
compare VAR_RESULT, 7
goto_eq LilycoveCity_PokemonTrainerFanClub_EventScript_21CAF1
msgbox LilycoveCity_PokemonTrainerFanClub_Text_21D347, 4
@@ -262,7 +262,7 @@ LilycoveCity_PokemonTrainerFanClub_EventScript_21CA8E:: @ 821CA8E
end
LilycoveCity_PokemonTrainerFanClub_EventScript_21CACD:: @ 821CACD
- specialvar VAR_RESULT, sub_813BCA8
+ specialvar VAR_RESULT, GetNumMovedLilycoveFanClubMembers
compare VAR_RESULT, 1
goto_eq LilycoveCity_PokemonTrainerFanClub_EventScript_21CAE7
msgbox LilycoveCity_PokemonTrainerFanClub_Text_21D2A6, 4
@@ -288,13 +288,13 @@ LilycoveCity_PokemonTrainerFanClub_EventScript_21CB05:: @ 821CB05
lock
faceplayer
setvar VAR_0x8004, 9
- special sub_813BDB4
- compare VAR_0x4095, 0
+ special BufferStreakTrainerText
+ compare VAR_LILYCOVE_FAN_CLUB_STATE, 0
goto_eq LilycoveCity_PokemonTrainerFanClub_EventScript_21CB72
- specialvar VAR_RESULT, sub_813BD60
+ specialvar VAR_RESULT, ShouldMoveLilycoveFanClubMember
compare VAR_RESULT, 1
goto_eq LilycoveCity_PokemonTrainerFanClub_EventScript_21CB44
- specialvar VAR_RESULT, sub_813BCA8
+ specialvar VAR_RESULT, GetNumMovedLilycoveFanClubMembers
compare VAR_RESULT, 7
goto_eq LilycoveCity_PokemonTrainerFanClub_EventScript_21CB68
msgbox LilycoveCity_PokemonTrainerFanClub_Text_21D52E, 4
@@ -302,7 +302,7 @@ LilycoveCity_PokemonTrainerFanClub_EventScript_21CB05:: @ 821CB05
end
LilycoveCity_PokemonTrainerFanClub_EventScript_21CB44:: @ 821CB44
- specialvar VAR_RESULT, sub_813BCA8
+ specialvar VAR_RESULT, GetNumMovedLilycoveFanClubMembers
compare VAR_RESULT, 1
goto_eq LilycoveCity_PokemonTrainerFanClub_EventScript_21CB5E
msgbox LilycoveCity_PokemonTrainerFanClub_Text_21D438, 4
@@ -328,13 +328,13 @@ LilycoveCity_PokemonTrainerFanClub_EventScript_21CB7C:: @ 821CB7C
lock
faceplayer
setvar VAR_0x8004, 10
- special sub_813BDB4
- compare VAR_0x4095, 0
+ special BufferStreakTrainerText
+ compare VAR_LILYCOVE_FAN_CLUB_STATE, 0
goto_eq LilycoveCity_PokemonTrainerFanClub_EventScript_21CBE9
- specialvar VAR_RESULT, sub_813BD60
+ specialvar VAR_RESULT, ShouldMoveLilycoveFanClubMember
compare VAR_RESULT, 1
goto_eq LilycoveCity_PokemonTrainerFanClub_EventScript_21CBBB
- specialvar VAR_RESULT, sub_813BCA8
+ specialvar VAR_RESULT, GetNumMovedLilycoveFanClubMembers
compare VAR_RESULT, 7
goto_eq LilycoveCity_PokemonTrainerFanClub_EventScript_21CBDF
msgbox LilycoveCity_PokemonTrainerFanClub_Text_21D822, 4
@@ -342,7 +342,7 @@ LilycoveCity_PokemonTrainerFanClub_EventScript_21CB7C:: @ 821CB7C
end
LilycoveCity_PokemonTrainerFanClub_EventScript_21CBBB:: @ 821CBBB
- specialvar VAR_RESULT, sub_813BCA8
+ specialvar VAR_RESULT, GetNumMovedLilycoveFanClubMembers
compare VAR_RESULT, 1
goto_eq LilycoveCity_PokemonTrainerFanClub_EventScript_21CBD5
msgbox LilycoveCity_PokemonTrainerFanClub_Text_21D751, 4
@@ -368,11 +368,11 @@ LilycoveCity_PokemonTrainerFanClub_EventScript_21CBF3:: @ 821CBF3
lock
faceplayer
setvar VAR_0x8004, 11
- special sub_813BDB4
- specialvar VAR_RESULT, sub_813BD60
+ special BufferStreakTrainerText
+ specialvar VAR_RESULT, ShouldMoveLilycoveFanClubMember
compare VAR_RESULT, 1
goto_eq LilycoveCity_PokemonTrainerFanClub_EventScript_21CC27
- specialvar VAR_RESULT, sub_813BCA8
+ specialvar VAR_RESULT, GetNumMovedLilycoveFanClubMembers
compare VAR_RESULT, 7
goto_eq LilycoveCity_PokemonTrainerFanClub_EventScript_21CC4B
msgbox LilycoveCity_PokemonTrainerFanClub_Text_21D9D1, 4
@@ -380,7 +380,7 @@ LilycoveCity_PokemonTrainerFanClub_EventScript_21CBF3:: @ 821CBF3
end
LilycoveCity_PokemonTrainerFanClub_EventScript_21CC27:: @ 821CC27
- specialvar VAR_RESULT, sub_813BCA8
+ specialvar VAR_RESULT, GetNumMovedLilycoveFanClubMembers
compare VAR_RESULT, 1
goto_eq LilycoveCity_PokemonTrainerFanClub_EventScript_21CC41
msgbox LilycoveCity_PokemonTrainerFanClub_Text_21D921, 4
@@ -401,11 +401,11 @@ LilycoveCity_PokemonTrainerFanClub_EventScript_21CC55:: @ 821CC55
lock
faceplayer
setvar VAR_0x8004, 12
- special sub_813BDB4
- specialvar VAR_RESULT, sub_813BD60
+ special BufferStreakTrainerText
+ specialvar VAR_RESULT, ShouldMoveLilycoveFanClubMember
compare VAR_RESULT, 1
goto_eq LilycoveCity_PokemonTrainerFanClub_EventScript_21CC89
- specialvar VAR_RESULT, sub_813BCA8
+ specialvar VAR_RESULT, GetNumMovedLilycoveFanClubMembers
compare VAR_RESULT, 7
goto_eq LilycoveCity_PokemonTrainerFanClub_EventScript_21CCAD
msgbox LilycoveCity_PokemonTrainerFanClub_Text_21DB69, 4
@@ -413,7 +413,7 @@ LilycoveCity_PokemonTrainerFanClub_EventScript_21CC55:: @ 821CC55
end
LilycoveCity_PokemonTrainerFanClub_EventScript_21CC89:: @ 821CC89
- specialvar VAR_RESULT, sub_813BCA8
+ specialvar VAR_RESULT, GetNumMovedLilycoveFanClubMembers
compare VAR_RESULT, 1
goto_eq LilycoveCity_PokemonTrainerFanClub_EventScript_21CCA3
msgbox LilycoveCity_PokemonTrainerFanClub_Text_21DA73, 4
@@ -434,11 +434,11 @@ LilycoveCity_PokemonTrainerFanClub_EventScript_21CCB7:: @ 821CCB7
lock
faceplayer
setvar VAR_0x8004, 14
- special sub_813BDB4
- specialvar VAR_RESULT, sub_813BD60
+ special BufferStreakTrainerText
+ specialvar VAR_RESULT, ShouldMoveLilycoveFanClubMember
compare VAR_RESULT, 1
goto_eq LilycoveCity_PokemonTrainerFanClub_EventScript_21CCEB
- specialvar VAR_RESULT, sub_813BCA8
+ specialvar VAR_RESULT, GetNumMovedLilycoveFanClubMembers
compare VAR_RESULT, 7
goto_eq LilycoveCity_PokemonTrainerFanClub_EventScript_21CD0F
msgbox LilycoveCity_PokemonTrainerFanClub_Text_21DD36, 4
@@ -446,7 +446,7 @@ LilycoveCity_PokemonTrainerFanClub_EventScript_21CCB7:: @ 821CCB7
end
LilycoveCity_PokemonTrainerFanClub_EventScript_21CCEB:: @ 821CCEB
- specialvar VAR_RESULT, sub_813BCA8
+ specialvar VAR_RESULT, GetNumMovedLilycoveFanClubMembers
compare VAR_RESULT, 1
goto_eq LilycoveCity_PokemonTrainerFanClub_EventScript_21CD05
msgbox LilycoveCity_PokemonTrainerFanClub_Text_21DC68, 4
@@ -467,11 +467,11 @@ LilycoveCity_PokemonTrainerFanClub_EventScript_21CD19:: @ 821CD19
lock
faceplayer
setvar VAR_0x8004, 15
- special sub_813BDB4
- specialvar VAR_RESULT, sub_813BD60
+ special BufferStreakTrainerText
+ specialvar VAR_RESULT, ShouldMoveLilycoveFanClubMember
compare VAR_RESULT, 1
goto_eq LilycoveCity_PokemonTrainerFanClub_EventScript_21CD4D
- specialvar VAR_RESULT, sub_813BCA8
+ specialvar VAR_RESULT, GetNumMovedLilycoveFanClubMembers
compare VAR_RESULT, 7
goto_eq LilycoveCity_PokemonTrainerFanClub_EventScript_21CD71
msgbox LilycoveCity_PokemonTrainerFanClub_Text_21DEFF, 4
@@ -479,7 +479,7 @@ LilycoveCity_PokemonTrainerFanClub_EventScript_21CD19:: @ 821CD19
end
LilycoveCity_PokemonTrainerFanClub_EventScript_21CD4D:: @ 821CD4D
- specialvar VAR_RESULT, sub_813BCA8
+ specialvar VAR_RESULT, GetNumMovedLilycoveFanClubMembers
compare VAR_RESULT, 1
goto_eq LilycoveCity_PokemonTrainerFanClub_EventScript_21CD67
msgbox LilycoveCity_PokemonTrainerFanClub_Text_21DE72, 4
@@ -512,7 +512,7 @@ LilycoveCity_PokemonTrainerFanClub_EventScript_21CD90:: @ 821CD90
goto_eq LilycoveCity_PokemonTrainerFanClub_EventScript_21CEFF
copyvar VAR_0x800A, VAR_0x8006
setvar VAR_0x8004, 8
- special sub_813BDB4
+ special BufferStreakTrainerText
msgbox LilycoveCity_PokemonTrainerFanClub_Text_281BCB, 4
setvar VAR_0x8004, 14
copyvar VAR_0x8005, VAR_0x800A
@@ -532,7 +532,7 @@ LilycoveCity_PokemonTrainerFanClub_EventScript_21CDE0:: @ 821CDE0
LilycoveCity_PokemonTrainerFanClub_EventScript_21CDEE:: @ 821CDEE
setvar VAR_0x8004, 8
- special sub_813BDB4
+ special BufferStreakTrainerText
msgbox LilycoveCity_PokemonTrainerFanClub_Text_281C3D, 5
compare VAR_RESULT, 1
goto_eq LilycoveCity_PokemonTrainerFanClub_EventScript_21CEC6
@@ -542,7 +542,7 @@ LilycoveCity_PokemonTrainerFanClub_EventScript_21CDEE:: @ 821CDEE
LilycoveCity_PokemonTrainerFanClub_EventScript_21CE15:: @ 821CE15
setvar VAR_0x8004, 8
- special sub_813BDB4
+ special BufferStreakTrainerText
msgbox LilycoveCity_PokemonTrainerFanClub_Text_281C65, 4
setvar VAR_0x8004, 14
copyvar VAR_0x8005, VAR_0x800A
@@ -557,7 +557,7 @@ LilycoveCity_PokemonTrainerFanClub_EventScript_21CE15:: @ 821CE15
LilycoveCity_PokemonTrainerFanClub_EventScript_21CE4D:: @ 821CE4D
setvar VAR_0x8004, 8
- special sub_813BDB4
+ special BufferStreakTrainerText
message LilycoveCity_PokemonTrainerFanClub_Text_281C95
waitmessage
setvar VAR_0x8004, 2
@@ -568,7 +568,7 @@ LilycoveCity_PokemonTrainerFanClub_EventScript_21CE4D:: @ 821CE4D
case 11, LilycoveCity_PokemonTrainerFanClub_EventScript_21CE9F
case 127, LilycoveCity_PokemonTrainerFanClub_EventScript_21CE9F
setvar VAR_0x8004, 8
- special sub_813BDB4
+ special BufferStreakTrainerText
copyvar VAR_0x8006, VAR_0x800A
copyvar VAR_0x8005, VAR_RESULT
special PutFanClubSpecialOnTheAir
@@ -577,7 +577,7 @@ LilycoveCity_PokemonTrainerFanClub_EventScript_21CE4D:: @ 821CE4D
LilycoveCity_PokemonTrainerFanClub_EventScript_21CE9F:: @ 821CE9F
setvar VAR_0x8004, 8
- special sub_813BDB4
+ special BufferStreakTrainerText
msgbox LilycoveCity_PokemonTrainerFanClub_Text_281CCD, 5
compare VAR_RESULT, 1
goto_eq LilycoveCity_PokemonTrainerFanClub_EventScript_21CEC6
@@ -587,14 +587,14 @@ LilycoveCity_PokemonTrainerFanClub_EventScript_21CE9F:: @ 821CE9F
LilycoveCity_PokemonTrainerFanClub_EventScript_21CEC6:: @ 821CEC6
setvar VAR_0x8004, 8
- special sub_813BDB4
+ special BufferStreakTrainerText
msgbox LilycoveCity_PokemonTrainerFanClub_Text_281CF5, 4
release
end
LilycoveCity_PokemonTrainerFanClub_EventScript_21CED8:: @ 821CED8
setvar VAR_0x8004, 8
- special sub_813BDB4
+ special BufferStreakTrainerText
msgbox LilycoveCity_PokemonTrainerFanClub_Text_281D40, 4
setflag FLAG_0x0D2
release
@@ -602,7 +602,7 @@ LilycoveCity_PokemonTrainerFanClub_EventScript_21CED8:: @ 821CED8
LilycoveCity_PokemonTrainerFanClub_EventScript_21CEED:: @ 821CEED
setvar VAR_0x8004, 8
- special sub_813BDB4
+ special BufferStreakTrainerText
msgbox LilycoveCity_PokemonTrainerFanClub_Text_281DB4, 4
release
end
diff --git a/data/maps/MarineCave_End/scripts.inc b/data/maps/MarineCave_End/scripts.inc
index 9c821e14f..d6b4bbd8d 100644
--- a/data/maps/MarineCave_End/scripts.inc
+++ b/data/maps/MarineCave_End/scripts.inc
@@ -9,7 +9,7 @@ MarineCave_End_MapScript1_23AFEA: @ 823AFEA
end
MarineCave_End_EventScript_23AFF4:: @ 823AFF4
- specialvar VAR_RESULT, sub_8138B80
+ specialvar VAR_RESULT, GetBattleOutcome
compare VAR_RESULT, 7
goto_if 5, MarineCave_End_EventScript_27374E
removeobject 1
@@ -42,7 +42,7 @@ MarineCave_End_EventScript_23B01B:: @ 823B01B
waitstate
clearflag FLAG_SYS_CTRL_OBJ_DELETE
setvar VAR_TEMP_1, 0
- specialvar VAR_RESULT, sub_8138B80
+ specialvar VAR_RESULT, GetBattleOutcome
compare VAR_RESULT, 1
goto_eq MarineCave_End_EventScript_23B084
compare VAR_RESULT, 4
diff --git a/data/maps/MauvilleCity_GameCorner/scripts.inc b/data/maps/MauvilleCity_GameCorner/scripts.inc
index 400a24c24..733581b74 100644
--- a/data/maps/MauvilleCity_GameCorner/scripts.inc
+++ b/data/maps/MauvilleCity_GameCorner/scripts.inc
@@ -409,7 +409,7 @@ MauvilleCity_GameCorner_EventScript_210137:: @ 8210137
msgbox MauvilleCity_GameCorner_Text_210750, 5
compare VAR_RESULT, 0
goto_eq MauvilleCity_GameCorner_EventScript_210209
- switch VAR_FIRST_POKE
+ switch VAR_STARTER_MON
case 0, MauvilleCity_GameCorner_EventScript_21017C
case 1, MauvilleCity_GameCorner_EventScript_2101A6
case 2, MauvilleCity_GameCorner_EventScript_2101D0
@@ -540,7 +540,7 @@ MauvilleCity_GameCorner_EventScript_2102D6:: @ 82102D6
compare VAR_RESULT, 0
goto_eq MauvilleCity_GameCorner_EventScript_210456
setvar VAR_0x8004, 0
- specialvar VAR_RESULT, sub_8139248
+ specialvar VAR_RESULT, GetSlotMachineId
playslotmachine VAR_RESULT
releaseall
end
@@ -551,7 +551,7 @@ MauvilleCity_GameCorner_EventScript_2102F6:: @ 82102F6
compare VAR_RESULT, 0
goto_eq MauvilleCity_GameCorner_EventScript_210456
setvar VAR_0x8004, 1
- specialvar VAR_RESULT, sub_8139248
+ specialvar VAR_RESULT, GetSlotMachineId
playslotmachine VAR_RESULT
releaseall
end
@@ -562,7 +562,7 @@ MauvilleCity_GameCorner_EventScript_210316:: @ 8210316
compare VAR_RESULT, 0
goto_eq MauvilleCity_GameCorner_EventScript_210456
setvar VAR_0x8004, 2
- specialvar VAR_RESULT, sub_8139248
+ specialvar VAR_RESULT, GetSlotMachineId
playslotmachine VAR_RESULT
releaseall
end
@@ -573,7 +573,7 @@ MauvilleCity_GameCorner_EventScript_210336:: @ 8210336
compare VAR_RESULT, 0
goto_eq MauvilleCity_GameCorner_EventScript_210456
setvar VAR_0x8004, 3
- specialvar VAR_RESULT, sub_8139248
+ specialvar VAR_RESULT, GetSlotMachineId
playslotmachine VAR_RESULT
releaseall
end
@@ -584,7 +584,7 @@ MauvilleCity_GameCorner_EventScript_210356:: @ 8210356
compare VAR_RESULT, 0
goto_eq MauvilleCity_GameCorner_EventScript_210456
setvar VAR_0x8004, 4
- specialvar VAR_RESULT, sub_8139248
+ specialvar VAR_RESULT, GetSlotMachineId
playslotmachine VAR_RESULT
releaseall
end
@@ -595,7 +595,7 @@ MauvilleCity_GameCorner_EventScript_210376:: @ 8210376
compare VAR_RESULT, 0
goto_eq MauvilleCity_GameCorner_EventScript_210456
setvar VAR_0x8004, 5
- specialvar VAR_RESULT, sub_8139248
+ specialvar VAR_RESULT, GetSlotMachineId
playslotmachine VAR_RESULT
releaseall
end
@@ -606,7 +606,7 @@ MauvilleCity_GameCorner_EventScript_210396:: @ 8210396
compare VAR_RESULT, 0
goto_eq MauvilleCity_GameCorner_EventScript_210456
setvar VAR_0x8004, 6
- specialvar VAR_RESULT, sub_8139248
+ specialvar VAR_RESULT, GetSlotMachineId
playslotmachine VAR_RESULT
releaseall
end
@@ -617,7 +617,7 @@ MauvilleCity_GameCorner_EventScript_2103B6:: @ 82103B6
compare VAR_RESULT, 0
goto_eq MauvilleCity_GameCorner_EventScript_210456
setvar VAR_0x8004, 7
- specialvar VAR_RESULT, sub_8139248
+ specialvar VAR_RESULT, GetSlotMachineId
playslotmachine VAR_RESULT
releaseall
end
@@ -628,7 +628,7 @@ MauvilleCity_GameCorner_EventScript_2103D6:: @ 82103D6
compare VAR_RESULT, 0
goto_eq MauvilleCity_GameCorner_EventScript_210456
setvar VAR_0x8004, 8
- specialvar VAR_RESULT, sub_8139248
+ specialvar VAR_RESULT, GetSlotMachineId
playslotmachine VAR_RESULT
releaseall
end
@@ -639,7 +639,7 @@ MauvilleCity_GameCorner_EventScript_2103F6:: @ 82103F6
compare VAR_RESULT, 0
goto_eq MauvilleCity_GameCorner_EventScript_210456
setvar VAR_0x8004, 9
- specialvar VAR_RESULT, sub_8139248
+ specialvar VAR_RESULT, GetSlotMachineId
playslotmachine VAR_RESULT
releaseall
end
@@ -650,7 +650,7 @@ MauvilleCity_GameCorner_EventScript_210416:: @ 8210416
compare VAR_RESULT, 0
goto_eq MauvilleCity_GameCorner_EventScript_210456
setvar VAR_0x8004, 10
- specialvar VAR_RESULT, sub_8139248
+ specialvar VAR_RESULT, GetSlotMachineId
playslotmachine VAR_RESULT
releaseall
end
@@ -661,7 +661,7 @@ MauvilleCity_GameCorner_EventScript_210436:: @ 8210436
compare VAR_RESULT, 0
goto_eq MauvilleCity_GameCorner_EventScript_210456
setvar VAR_0x8004, 11
- specialvar VAR_RESULT, sub_8139248
+ specialvar VAR_RESULT, GetSlotMachineId
playslotmachine VAR_RESULT
releaseall
end
diff --git a/data/maps/MauvilleCity_PokemonCenter_1F/scripts.inc b/data/maps/MauvilleCity_PokemonCenter_1F/scripts.inc
index fb76a5fc7..b2267122b 100644
--- a/data/maps/MauvilleCity_PokemonCenter_1F/scripts.inc
+++ b/data/maps/MauvilleCity_PokemonCenter_1F/scripts.inc
@@ -4,7 +4,7 @@ MauvilleCity_PokemonCenter_1F_MapScripts:: @ 8210E5B
.byte 0
MauvilleCity_PokemonCenter_1F_MapScript1_210E66: @ 8210E66
- setrespawn 5
+ setrespawn HEAL_LOCATION_MAUVILLE_CITY
call MauvilleCity_PokemonCenter_1F_EventScript_2718DE
goto MauvilleCity_PokemonCenter_1F_EventScript_210E74
end
diff --git a/data/maps/MossdeepCity_PokemonCenter_1F/scripts.inc b/data/maps/MossdeepCity_PokemonCenter_1F/scripts.inc
index 7fd2e61a0..2ff03b7f3 100644
--- a/data/maps/MossdeepCity_PokemonCenter_1F/scripts.inc
+++ b/data/maps/MossdeepCity_PokemonCenter_1F/scripts.inc
@@ -4,7 +4,7 @@ MossdeepCity_PokemonCenter_1F_MapScripts:: @ 822223F
.byte 0
MossdeepCity_PokemonCenter_1F_MapScript1_22224A: @ 822224A
- setrespawn 9
+ setrespawn HEAL_LOCATION_MOSSDEEP_CITY
end
MossdeepCity_PokemonCenter_1F_EventScript_22224E:: @ 822224E
diff --git a/data/maps/NavelRock_Bottom/scripts.inc b/data/maps/NavelRock_Bottom/scripts.inc
index cce93e624..febe106bf 100644
--- a/data/maps/NavelRock_Bottom/scripts.inc
+++ b/data/maps/NavelRock_Bottom/scripts.inc
@@ -26,7 +26,7 @@ NavelRock_Bottom_MapScript1_269284: @ 8269284
end
NavelRock_Bottom_EventScript_26928E:: @ 826928E
- specialvar VAR_RESULT, sub_8138B80
+ specialvar VAR_RESULT, GetBattleOutcome
compare VAR_RESULT, 7
goto_if 5, NavelRock_Bottom_EventScript_27374E
removeobject 1
@@ -64,7 +64,7 @@ NavelRock_Bottom_EventScript_2692A2:: @ 82692A2
special BattleSetup_StartLegendaryBattle
waitstate
clearflag FLAG_SYS_CTRL_OBJ_DELETE
- specialvar VAR_RESULT, sub_8138B80
+ specialvar VAR_RESULT, GetBattleOutcome
compare VAR_RESULT, 1
goto_eq NavelRock_Bottom_EventScript_269336
compare VAR_RESULT, 4
diff --git a/data/maps/NavelRock_Top/scripts.inc b/data/maps/NavelRock_Top/scripts.inc
index 67ddbc373..4310529dd 100644
--- a/data/maps/NavelRock_Top/scripts.inc
+++ b/data/maps/NavelRock_Top/scripts.inc
@@ -29,7 +29,7 @@ NavelRock_Top_MapScript1_269151: @ 8269151
end
NavelRock_Top_EventScript_26915B:: @ 826915B
- specialvar VAR_RESULT, sub_8138B80
+ specialvar VAR_RESULT, GetBattleOutcome
compare VAR_RESULT, 7
goto_if 5, NavelRock_Top_EventScript_27374E
removeobject 1
@@ -69,7 +69,7 @@ NavelRock_Top_EventScript_26916F:: @ 826916F
waitstate
clearflag FLAG_SYS_CTRL_OBJ_DELETE
setvar VAR_LAST_TALKED, 1
- specialvar VAR_RESULT, sub_8138B80
+ specialvar VAR_RESULT, GetBattleOutcome
compare VAR_RESULT, 1
goto_eq NavelRock_Top_EventScript_269217
compare VAR_RESULT, 4
diff --git a/data/maps/NewMauville_Inside/scripts.inc b/data/maps/NewMauville_Inside/scripts.inc
index 81b21287d..e6d80c33d 100644
--- a/data/maps/NewMauville_Inside/scripts.inc
+++ b/data/maps/NewMauville_Inside/scripts.inc
@@ -14,7 +14,7 @@ NewMauville_Inside_MapScript1_2373E7: @ 82373E7
end
NewMauville_Inside_EventScript_237407:: @ 8237407
- specialvar VAR_RESULT, sub_8138B80
+ specialvar VAR_RESULT, GetBattleOutcome
compare VAR_RESULT, 7
goto_if 5, NewMauville_Inside_EventScript_27374E
removeobject VAR_LAST_TALKED
@@ -193,7 +193,7 @@ NewMauville_Inside_EventScript_2377AF:: @ 82377AF
setflag FLAG_SYS_CTRL_OBJ_DELETE
dowildbattle
clearflag FLAG_SYS_CTRL_OBJ_DELETE
- specialvar VAR_RESULT, sub_8138B80
+ specialvar VAR_RESULT, GetBattleOutcome
compare VAR_RESULT, 1
goto_eq NewMauville_Inside_EventScript_2377F3
compare VAR_RESULT, 4
@@ -220,7 +220,7 @@ NewMauville_Inside_EventScript_2377FC:: @ 82377FC
setflag FLAG_SYS_CTRL_OBJ_DELETE
dowildbattle
clearflag FLAG_SYS_CTRL_OBJ_DELETE
- specialvar VAR_RESULT, sub_8138B80
+ specialvar VAR_RESULT, GetBattleOutcome
compare VAR_RESULT, 1
goto_eq NewMauville_Inside_EventScript_237840
compare VAR_RESULT, 4
@@ -247,7 +247,7 @@ NewMauville_Inside_EventScript_237849:: @ 8237849
setflag FLAG_SYS_CTRL_OBJ_DELETE
dowildbattle
clearflag FLAG_SYS_CTRL_OBJ_DELETE
- specialvar VAR_RESULT, sub_8138B80
+ specialvar VAR_RESULT, GetBattleOutcome
compare VAR_RESULT, 1
goto_eq NewMauville_Inside_EventScript_23788D
compare VAR_RESULT, 4
diff --git a/data/maps/OldaleTown_PokemonCenter_1F/scripts.inc b/data/maps/OldaleTown_PokemonCenter_1F/scripts.inc
index ece540e70..e99e628a6 100644
--- a/data/maps/OldaleTown_PokemonCenter_1F/scripts.inc
+++ b/data/maps/OldaleTown_PokemonCenter_1F/scripts.inc
@@ -4,7 +4,7 @@ OldaleTown_PokemonCenter_1F_MapScripts:: @ 81FC006
.byte 0
OldaleTown_PokemonCenter_1F_MapScript1_1FC011: @ 81FC011
- setrespawn 14
+ setrespawn HEAL_LOCATION_OLDALE_TOWN
call OldaleTown_PokemonCenter_1F_EventScript_2718DE
end
diff --git a/data/maps/PacifidlogTown_House2/scripts.inc b/data/maps/PacifidlogTown_House2/scripts.inc
index 0e87677e6..21345242d 100644
--- a/data/maps/PacifidlogTown_House2/scripts.inc
+++ b/data/maps/PacifidlogTown_House2/scripts.inc
@@ -25,7 +25,7 @@ PacifidlogTown_House2_EventScript_203792:: @ 8203792
PacifidlogTown_House2_EventScript_2037DE:: @ 82037DE
checkflag FLAG_0x12B
goto_if 0, PacifidlogTown_House2_EventScript_27374E
- specialvar VAR_RESULT, sub_813970C
+ specialvar VAR_RESULT, GetDaysUntilPacifidlogTMAvailable
compare VAR_RESULT, 0
call_if 1, PacifidlogTown_House2_EventScript_203812
return
@@ -49,7 +49,7 @@ PacifidlogTown_House2_EventScript_203816:: @ 8203816
compare VAR_RESULT, 0
goto_eq PacifidlogTown_House2_EventScript_272054
setflag FLAG_0x12B
- special sub_8139754
+ special SetPacifidlogTMReceivedDay
msgbox PacifidlogTown_House2_Text_203A85, 4
release
end
@@ -65,13 +65,13 @@ PacifidlogTown_House2_EventScript_20384F:: @ 820384F
compare VAR_RESULT, 0
goto_eq PacifidlogTown_House2_EventScript_272054
setflag FLAG_0x12B
- special sub_8139754
+ special SetPacifidlogTMReceivedDay
msgbox PacifidlogTown_House2_Text_203A85, 4
release
end
PacifidlogTown_House2_EventScript_20387E:: @ 820387E
- specialvar VAR_RESULT, sub_813970C
+ specialvar VAR_RESULT, GetDaysUntilPacifidlogTMAvailable
buffernumberstring 0, VAR_RESULT
msgbox PacifidlogTown_House2_Text_203AF4, 4
release
diff --git a/data/maps/PacifidlogTown_PokemonCenter_1F/scripts.inc b/data/maps/PacifidlogTown_PokemonCenter_1F/scripts.inc
index fd34cd2aa..65af1cdc7 100644
--- a/data/maps/PacifidlogTown_PokemonCenter_1F/scripts.inc
+++ b/data/maps/PacifidlogTown_PokemonCenter_1F/scripts.inc
@@ -4,7 +4,7 @@ PacifidlogTown_PokemonCenter_1F_MapScripts:: @ 82034A7
.byte 0
PacifidlogTown_PokemonCenter_1F_MapScript1_2034B2: @ 82034B2
- setrespawn 19
+ setrespawn HEAL_LOCATION_PACIFIDLOG_TOWN
end
PacifidlogTown_PokemonCenter_1F_EventScript_2034B6:: @ 82034B6
diff --git a/data/maps/PetalburgCity_PokemonCenter_1F/scripts.inc b/data/maps/PetalburgCity_PokemonCenter_1F/scripts.inc
index f4a31854e..130a43de9 100644
--- a/data/maps/PetalburgCity_PokemonCenter_1F/scripts.inc
+++ b/data/maps/PetalburgCity_PokemonCenter_1F/scripts.inc
@@ -4,7 +4,7 @@ PetalburgCity_PokemonCenter_1F_MapScripts:: @ 82079E8
.byte 0
PetalburgCity_PokemonCenter_1F_MapScript1_2079F3: @ 82079F3
- setrespawn 3
+ setrespawn HEAL_LOCATION_PETALBURG_CITY
call PetalburgCity_PokemonCenter_1F_EventScript_2718DE
end
@@ -35,11 +35,11 @@ PetalburgCity_PokemonCenter_1F_EventScript_207A1C:: @ 8207A1C
end
PetalburgCity_PokemonCenter_1F_EventScript_207A38:: @ 8207A38
- compare VAR_FIRST_POKE, 0
+ compare VAR_STARTER_MON, 0
call_if 1, PetalburgCity_PokemonCenter_1F_EventScript_207A5B
- compare VAR_FIRST_POKE, 1
+ compare VAR_STARTER_MON, 1
call_if 1, PetalburgCity_PokemonCenter_1F_EventScript_207A64
- compare VAR_FIRST_POKE, 2
+ compare VAR_STARTER_MON, 2
call_if 1, PetalburgCity_PokemonCenter_1F_EventScript_207A6D
release
end
diff --git a/data/maps/Route103/scripts.inc b/data/maps/Route103/scripts.inc
index 14e119cd6..6674662f7 100644
--- a/data/maps/Route103/scripts.inc
+++ b/data/maps/Route103/scripts.inc
@@ -38,7 +38,7 @@ Route103_EventScript_1EC3DA:: @ 81EC3DA
applymovement 2, Route103_Movement_27259A
waitmovement 0
msgbox Route103_Text_1EC7DE, 4
- switch VAR_FIRST_POKE
+ switch VAR_STARTER_MON
case 0, Route103_EventScript_1EC48E
case 1, Route103_EventScript_1EC49E
case 2, Route103_EventScript_1EC4AE
@@ -55,7 +55,7 @@ Route103_EventScript_1EC434:: @ 81EC434
applymovement 2, Route103_Movement_27259A
waitmovement 0
msgbox Route103_Text_1EC9CE, 4
- switch VAR_FIRST_POKE
+ switch VAR_STARTER_MON
case 0, Route103_EventScript_1EC4BE
case 1, Route103_EventScript_1EC4CE
case 2, Route103_EventScript_1EC4DE
diff --git a/data/maps/Route104/scripts.inc b/data/maps/Route104/scripts.inc
index 4755494b6..9b45844f0 100644
--- a/data/maps/Route104/scripts.inc
+++ b/data/maps/Route104/scripts.inc
@@ -153,7 +153,7 @@ Route104_EventScript_1ECDD0:: @ 81ECDD0
Route104_EventScript_1ECDED:: @ 81ECDED
msgbox Route104_Text_1EDDDB, 4
- switch VAR_FIRST_POKE
+ switch VAR_STARTER_MON
case 0, Route104_EventScript_1ECE36
case 1, Route104_EventScript_1ECE49
case 2, Route104_EventScript_1ECE5C
@@ -230,7 +230,7 @@ Route104_EventScript_1ECEEC:: @ 81ECEEC
Route104_EventScript_1ECF09:: @ 81ECF09
msgbox Route104_Text_1EE0C7, 4
- switch VAR_FIRST_POKE
+ switch VAR_STARTER_MON
case 0, Route104_EventScript_1ECF4D
case 1, Route104_EventScript_1ECF60
case 2, Route104_EventScript_1ECF73
diff --git a/data/maps/Route110/events.inc b/data/maps/Route110/events.inc
index 6e6d17d9a..f4875cc6c 100644
--- a/data/maps/Route110/events.inc
+++ b/data/maps/Route110/events.inc
@@ -45,8 +45,8 @@ Route110_MapWarps: @ 8529050
warp_def 19, 88, 0, 2, MAP_ROUTE110_SEASIDE_CYCLING_ROAD_NORTH_ENTRANCE
Route110_MapCoordEvents: @ 8529080
- coord_event 28, 92, 3, VAR_0x40A9, 2, Route110_EventScript_1EF661
- coord_event 29, 92, 3, VAR_0x40A9, 2, Route110_EventScript_1EF661
+ coord_event 28, 92, 3, VAR_CYCLING_CHALLENGE_STATE, 2, Route110_EventScript_1EF661
+ coord_event 29, 92, 3, VAR_CYCLING_CHALLENGE_STATE, 2, Route110_EventScript_1EF661
coord_event 33, 56, 3, VAR_0x4069, 0, Route110_EventScript_1EF74D
coord_event 34, 56, 3, VAR_0x4069, 0, Route110_EventScript_1EF758
coord_event 35, 56, 3, VAR_0x4069, 0, Route110_EventScript_1EF763
diff --git a/data/maps/Route110/scripts.inc b/data/maps/Route110/scripts.inc
index 84d50b454..fe07de8dc 100644
--- a/data/maps/Route110/scripts.inc
+++ b/data/maps/Route110/scripts.inc
@@ -11,7 +11,7 @@ Route110_MapScript1_1EF279: @ 81EF279
Route110_MapScript1_1EF27D: @ 81EF27D
call Route110_EventScript_271ED7
call Route110_EventScript_271EFB
- compare VAR_0x40A9, 1
+ compare VAR_CYCLING_CHALLENGE_STATE, 1
call_if 1, Route110_EventScript_1EF293
end
@@ -20,12 +20,12 @@ Route110_EventScript_1EF293:: @ 81EF293
return
Route110_MapScript2_1EF297: @ 81EF297
- map_script_2 VAR_0x40A9, 1, Route110_EventScript_1EF2A1
+ map_script_2 VAR_CYCLING_CHALLENGE_STATE, 1, Route110_EventScript_1EF2A1
.2byte 0
Route110_EventScript_1EF2A1:: @ 81EF2A1
special Special_BeginCyclingRoadChallenge
- setvar VAR_0x40A9, 2
+ setvar VAR_CYCLING_CHALLENGE_STATE, 2
return
Route110_EventScript_1EF2AA:: @ 81EF2AA
@@ -148,7 +148,7 @@ Route110_EventScript_1EF3B7:: @ 81EF3B7
specialvar VAR_RESULT, GetPlayerAvatarBike
compare VAR_RESULT, 1
goto_eq Route110_EventScript_1EF3E8
- compare VAR_0x40A9, 0
+ compare VAR_CYCLING_CHALLENGE_STATE, 0
goto_eq Route110_EventScript_1EF3DE
msgbox Route110_Text_1F06FB, 4
release
@@ -368,7 +368,7 @@ Route110_EventScript_1EF735:: @ 81EF735
end
Route110_EventScript_1EF743:: @ 81EF743
- setvar VAR_0x40A9, 3
+ setvar VAR_CYCLING_CHALLENGE_STATE, 3
savebgm MUS_DUMMY
fadedefaultbgm
return
@@ -426,7 +426,7 @@ Route110_EventScript_1EF7E6:: @ 81EF7E6
Route110_EventScript_1EF7EB:: @ 81EF7EB
msgbox Route110_Text_1EFC48, 4
- switch VAR_FIRST_POKE
+ switch VAR_STARTER_MON
case 0, Route110_EventScript_1EF81A
case 1, Route110_EventScript_1EF82A
case 2, Route110_EventScript_1EF83A
@@ -456,7 +456,7 @@ Route110_EventScript_1EF84A:: @ 81EF84A
Route110_EventScript_1EF865:: @ 81EF865
msgbox Route110_Text_1EFE3F, 4
- switch VAR_FIRST_POKE
+ switch VAR_STARTER_MON
case 0, Route110_EventScript_1EF894
case 1, Route110_EventScript_1EF8A4
case 2, Route110_EventScript_1EF8B4
diff --git a/data/maps/Route110_SeasideCyclingRoadSouthEntrance/scripts.inc b/data/maps/Route110_SeasideCyclingRoadSouthEntrance/scripts.inc
index 9f99cf44f..b38bbf896 100644
--- a/data/maps/Route110_SeasideCyclingRoadSouthEntrance/scripts.inc
+++ b/data/maps/Route110_SeasideCyclingRoadSouthEntrance/scripts.inc
@@ -3,14 +3,14 @@ Route110_SeasideCyclingRoadSouthEntrance_MapScripts:: @ 826EBA1
.byte 0
Route110_SeasideCyclingRoadSouthEntrance_MapScript1_26EBA7: @ 826EBA7
- compare VAR_0x40A9, 3
+ compare VAR_CYCLING_CHALLENGE_STATE, 3
call_if 1, Route110_SeasideCyclingRoadSouthEntrance_EventScript_26EBBE
- compare VAR_0x40A9, 2
+ compare VAR_CYCLING_CHALLENGE_STATE, 2
call_if 1, Route110_SeasideCyclingRoadSouthEntrance_EventScript_26EBBE
end
Route110_SeasideCyclingRoadSouthEntrance_EventScript_26EBBE:: @ 826EBBE
- setvar VAR_0x40A9, 1
+ setvar VAR_CYCLING_CHALLENGE_STATE, 1
return
Route110_SeasideCyclingRoadSouthEntrance_EventScript_26EBC4:: @ 826EBC4
@@ -33,7 +33,7 @@ Route110_SeasideCyclingRoadSouthEntrance_EventScript_26EBD0:: @ 826EBD0
end
Route110_SeasideCyclingRoadSouthEntrance_EventScript_26EBF6:: @ 826EBF6
- setvar VAR_0x40A9, 1
+ setvar VAR_CYCLING_CHALLENGE_STATE, 1
return
Route110_SeasideCyclingRoadSouthEntrance_EventScript_26EBFC:: @ 826EBFC
@@ -50,7 +50,7 @@ Route110_SeasideCyclingRoadSouthEntrance_Movement_26EC11: @ 826EC11
Route110_SeasideCyclingRoadSouthEntrance_EventScript_26EC13:: @ 826EC13
lockall
- setvar VAR_0x40A9, 0
+ setvar VAR_CYCLING_CHALLENGE_STATE, 0
clearflag FLAG_SYS_CYCLING_ROAD
setvar VAR_TEMP_1, 0
releaseall
diff --git a/data/maps/Route116/scripts.inc b/data/maps/Route116/scripts.inc
index 854411ac1..769d254a5 100644
--- a/data/maps/Route116/scripts.inc
+++ b/data/maps/Route116/scripts.inc
@@ -169,7 +169,7 @@ Route116_EventScript_1F2DB6:: @ 81F2DB6
checkitem ITEM_BLACK_GLASSES, 1
compare VAR_RESULT, 1
goto_eq Route116_EventScript_1F2DF1
- specialvar VAR_RESULT, sub_8139634
+ specialvar VAR_RESULT, FoundBlackGlasses
compare VAR_RESULT, 1
goto_eq Route116_EventScript_1F2DE2
msgbox Route116_Text_1F3657, 4
@@ -185,7 +185,7 @@ Route116_EventScript_1F2DE2:: @ 81F2DE2
Route116_EventScript_1F2DF1:: @ 81F2DF1
msgbox Route116_Text_1F3657, 4
msgbox Route116_Text_1F3688, 4
- specialvar VAR_RESULT, sub_8139634
+ specialvar VAR_RESULT, FoundBlackGlasses
compare VAR_RESULT, 1
goto_eq Route116_EventScript_1F2E1B
msgbox Route116_Text_1F375E, 4
diff --git a/data/maps/Route116_TunnelersRestHouse/scripts.inc b/data/maps/Route116_TunnelersRestHouse/scripts.inc
index f9dbbd3f2..b2c009337 100644
--- a/data/maps/Route116_TunnelersRestHouse/scripts.inc
+++ b/data/maps/Route116_TunnelersRestHouse/scripts.inc
@@ -17,7 +17,7 @@ Route116_TunnelersRestHouse_EventScript_22B863:: @ 822B863
Route116_TunnelersRestHouse_EventScript_22B86C:: @ 822B86C
lock
faceplayer
- checkflag FLAG_0x0C7
+ checkflag FLAG_RUSTURF_TUNNEL_OPENED
goto_eq Route116_TunnelersRestHouse_EventScript_22B881
msgbox Route116_TunnelersRestHouse_Text_22BAAF, 4
release
diff --git a/data/maps/Route119/scripts.inc b/data/maps/Route119/scripts.inc
index 778d925e6..f2e52d50c 100644
--- a/data/maps/Route119/scripts.inc
+++ b/data/maps/Route119/scripts.inc
@@ -9,7 +9,7 @@ Route119_MapScript1_1F442F: @ 81F442F
end
Route119_EventScript_1F4439:: @ 81F4439
- specialvar VAR_RESULT, sub_8138B80
+ specialvar VAR_RESULT, GetBattleOutcome
compare VAR_RESULT, 7
goto_if 5, Route119_EventScript_27374E
removeobject VAR_LAST_TALKED
@@ -80,7 +80,7 @@ Route119_EventScript_1F4506:: @ 81F4506
Route119_EventScript_1F450B:: @ 81F450B
msgbox Route119_Text_1F49FD, 4
- switch VAR_FIRST_POKE
+ switch VAR_STARTER_MON
case 0, Route119_EventScript_1F453A
case 1, Route119_EventScript_1F454A
case 2, Route119_EventScript_1F455A
@@ -110,7 +110,7 @@ Route119_EventScript_1F456A:: @ 81F456A
Route119_EventScript_1F4585:: @ 81F4585
msgbox Route119_Text_1F4C9A, 4
- switch VAR_FIRST_POKE
+ switch VAR_STARTER_MON
case 0, Route119_EventScript_1F45B4
case 1, Route119_EventScript_1F45C4
case 2, Route119_EventScript_1F45D4
diff --git a/data/maps/Route120/scripts.inc b/data/maps/Route120/scripts.inc
index 50e5742d1..0bcff1a93 100644
--- a/data/maps/Route120/scripts.inc
+++ b/data/maps/Route120/scripts.inc
@@ -25,7 +25,7 @@ Route120_EventScript_1F5406:: @ 81F5406
return
Route120_EventScript_1F5449:: @ 81F5449
- specialvar VAR_RESULT, sub_8138B80
+ specialvar VAR_RESULT, GetBattleOutcome
compare VAR_RESULT, 7
goto_if 5, Route120_EventScript_27374E
removeobject 30
@@ -33,7 +33,7 @@ Route120_EventScript_1F5449:: @ 81F5449
return
Route120_EventScript_1F5460:: @ 81F5460
- specialvar VAR_RESULT, sub_8138B80
+ specialvar VAR_RESULT, GetBattleOutcome
compare VAR_RESULT, 7
goto_if 5, Route120_EventScript_27374E
removeobject VAR_LAST_TALKED
@@ -220,7 +220,7 @@ Route120_EventScript_1F568B:: @ 81F568B
setflag FLAG_SYS_CTRL_OBJ_DELETE
dowildbattle
clearflag FLAG_SYS_CTRL_OBJ_DELETE
- specialvar VAR_RESULT, sub_8138B80
+ specialvar VAR_RESULT, GetBattleOutcome
compare VAR_RESULT, 1
goto_eq Route120_EventScript_1F571C
compare VAR_RESULT, 4
diff --git a/data/maps/RustboroCity/scripts.inc b/data/maps/RustboroCity/scripts.inc
index 6eb8d48bc..f4c8d5434 100644
--- a/data/maps/RustboroCity/scripts.inc
+++ b/data/maps/RustboroCity/scripts.inc
@@ -306,7 +306,7 @@ RustboroCity_EventScript_1E09CD:: @ 81E09CD
clearflag FLAG_0x2DC
setflag FLAG_0x08E
setvar VAR_0x405A, 2
- setvar VAR_0x409A, 2
+ setvar VAR_RUSTURF_TUNNEL_STATE, 2
setvar VAR_0x406F, 1
clearflag FLAG_0x37B
clearflag FLAG_0x370
@@ -869,7 +869,7 @@ RustboroCity_EventScript_1E1070:: @ 81E1070
RustboroCity_EventScript_1E1092:: @ 81E1092
msgbox RustboroCity_Text_1E1C84, 4
- switch VAR_FIRST_POKE
+ switch VAR_STARTER_MON
case 0, RustboroCity_EventScript_1E10DB
case 1, RustboroCity_EventScript_1E10EE
case 2, RustboroCity_EventScript_1E1101
@@ -940,7 +940,7 @@ RustboroCity_EventScript_1E1174:: @ 81E1174
RustboroCity_EventScript_1E1191:: @ 81E1191
msgbox RustboroCity_Text_1E1FA9, 4
- switch VAR_FIRST_POKE
+ switch VAR_STARTER_MON
case 0, RustboroCity_EventScript_1E11D5
case 1, RustboroCity_EventScript_1E11E8
case 2, RustboroCity_EventScript_1E11FB
diff --git a/data/maps/RustboroCity_PokemonCenter_1F/scripts.inc b/data/maps/RustboroCity_PokemonCenter_1F/scripts.inc
index a9156d5aa..acf33e647 100644
--- a/data/maps/RustboroCity_PokemonCenter_1F/scripts.inc
+++ b/data/maps/RustboroCity_PokemonCenter_1F/scripts.inc
@@ -4,7 +4,7 @@ RustboroCity_PokemonCenter_1F_MapScripts:: @ 8214D62
.byte 0
RustboroCity_PokemonCenter_1F_MapScript1_214D6D: @ 8214D6D
- setrespawn 6
+ setrespawn HEAL_LOCATION_RUSTBORO_CITY
call RustboroCity_PokemonCenter_1F_EventScript_2718DE
end
diff --git a/data/maps/RusturfTunnel/events.inc b/data/maps/RusturfTunnel/events.inc
index d0d56e6fa..77b6f7a61 100644
--- a/data/maps/RusturfTunnel/events.inc
+++ b/data/maps/RusturfTunnel/events.inc
@@ -17,8 +17,8 @@ RusturfTunnel_MapWarps: @ 85342B4
RusturfTunnel_MapCoordEvents: @ 85342CC
coord_event 23, 4, 3, 0, 0, RusturfTunnel_EventScript_22D071
- coord_event 9, 4, 3, VAR_0x409A, 2, RusturfTunnel_EventScript_22D083
- coord_event 9, 5, 3, VAR_0x409A, 2, RusturfTunnel_EventScript_22D083
+ coord_event 9, 4, 3, VAR_RUSTURF_TUNNEL_STATE, 2, RusturfTunnel_EventScript_22D083
+ coord_event 9, 5, 3, VAR_RUSTURF_TUNNEL_STATE, 2, RusturfTunnel_EventScript_22D083
coord_event 25, 4, 3, 0, 0, RusturfTunnel_EventScript_22D077
coord_event 25, 5, 3, 0, 0, RusturfTunnel_EventScript_22D07D
diff --git a/data/maps/RusturfTunnel/scripts.inc b/data/maps/RusturfTunnel/scripts.inc
index 5e42be78d..33e87bda5 100644
--- a/data/maps/RusturfTunnel/scripts.inc
+++ b/data/maps/RusturfTunnel/scripts.inc
@@ -4,12 +4,12 @@ RusturfTunnel_MapScripts:: @ 822CE27
.byte 0
RusturfTunnel_MapScript2_22CE32: @ 822CE32
- map_script_2 VAR_0x409A, 4, RusturfTunnel_EventScript_22CEAE
- map_script_2 VAR_0x409A, 5, RusturfTunnel_EventScript_22CEAE
+ map_script_2 VAR_RUSTURF_TUNNEL_STATE, 4, RusturfTunnel_EventScript_22CEAE
+ map_script_2 VAR_RUSTURF_TUNNEL_STATE, 5, RusturfTunnel_EventScript_22CEAE
.2byte 0
RusturfTunnel_MapScript1_22CE44: @ 822CE44
- compare VAR_0x409A, 2
+ compare VAR_RUSTURF_TUNNEL_STATE, 2
call_if 1, RusturfTunnel_EventScript_22CE50
end
@@ -288,7 +288,7 @@ RusturfTunnel_EventScript_22D083:: @ 822D083
waitmovement 0
moveobjectoffscreen 6
moveobjectoffscreen 7
- setvar VAR_0x409A, 3
+ setvar VAR_RUSTURF_TUNNEL_STATE, 3
releaseall
end
diff --git a/data/maps/SSTidalCorridor/scripts.inc b/data/maps/SSTidalCorridor/scripts.inc
index 2e1b4cfa4..8fcd6e59b 100644
--- a/data/maps/SSTidalCorridor/scripts.inc
+++ b/data/maps/SSTidalCorridor/scripts.inc
@@ -4,15 +4,15 @@ SSTidalCorridor_MapScripts:: @ 823BFCF
SSTidalCorridor_MapScript2_23BFD5: @ 823BFD5
map_script_2 VAR_0x40D4, 0, SSTidalCorridor_EventScript_23C219
- map_script_2 VAR_PORTHOLE, 1, SSTidalCorridor_EventScript_23BFFF
- map_script_2 VAR_PORTHOLE, 5, SSTidalCorridor_EventScript_23C015
- map_script_2 VAR_PORTHOLE, 9, SSTidalCorridor_EventScript_23C067
- map_script_2 VAR_PORTHOLE, 10, SSTidalCorridor_EventScript_23C07D
+ map_script_2 VAR_PORTHOLE_STATE, 1, SSTidalCorridor_EventScript_23BFFF
+ map_script_2 VAR_PORTHOLE_STATE, 5, SSTidalCorridor_EventScript_23C015
+ map_script_2 VAR_PORTHOLE_STATE, 9, SSTidalCorridor_EventScript_23C067
+ map_script_2 VAR_PORTHOLE_STATE, 10, SSTidalCorridor_EventScript_23C07D
.2byte 0
SSTidalCorridor_EventScript_23BFFF:: @ 823BFFF
special SetSSTidalFlag
- setvar VAR_PORTHOLE, 2
+ setvar VAR_PORTHOLE_STATE, 2
lockall
playse SE_PINPON
msgbox SSTidalCorridor_Text_23C462, 4
@@ -20,7 +20,7 @@ SSTidalCorridor_EventScript_23BFFF:: @ 823BFFF
end
SSTidalCorridor_EventScript_23C015:: @ 823C015
- setvar VAR_PORTHOLE, 6
+ setvar VAR_PORTHOLE_STATE, 6
lockall
playse SE_PINPON
msgbox SSTidalCorridor_Text_23C4E3, 4
@@ -29,28 +29,28 @@ SSTidalCorridor_EventScript_23C015:: @ 823C015
SSTidalRooms_EventScript_23C028:: @ 823C028
special SetSSTidalFlag
- setvar VAR_PORTHOLE, 7
+ setvar VAR_PORTHOLE_STATE, 7
playse SE_PINPON
msgbox SSTidalRooms_Text_23C462, 4
return
SSTidalRooms_EventScript_23C03C:: @ 823C03C
special ResetSSTidalFlag
- setvar VAR_PORTHOLE, 4
+ setvar VAR_PORTHOLE_STATE, 4
playse SE_PINPON
msgbox SSTidalRooms_Text_23C553, 4
return
SSTidalCorridor_EventScript_23C050:: @ 823C050
- compare VAR_PORTHOLE, 2
+ compare VAR_PORTHOLE_STATE, 2
goto_eq SSTidalCorridor_EventScript_23C067
- compare VAR_PORTHOLE, 7
+ compare VAR_PORTHOLE_STATE, 7
goto_eq SSTidalCorridor_EventScript_23C07D
end
SSTidalCorridor_EventScript_23C067:: @ 823C067
special ResetSSTidalFlag
- setvar VAR_PORTHOLE, 3
+ setvar VAR_PORTHOLE_STATE, 3
lockall
playse SE_PINPON
msgbox SSTidalCorridor_Text_23C4E3, 4
@@ -59,7 +59,7 @@ SSTidalCorridor_EventScript_23C067:: @ 823C067
SSTidalCorridor_EventScript_23C07D:: @ 823C07D
special ResetSSTidalFlag
- setvar VAR_PORTHOLE, 8
+ setvar VAR_PORTHOLE_STATE, 8
lockall
playse SE_PINPON
msgbox SSTidalCorridor_Text_23C50F, 4
@@ -68,13 +68,13 @@ SSTidalCorridor_EventScript_23C07D:: @ 823C07D
SSTidalRooms_EventScript_23C093:: @ 823C093
special ResetSSTidalFlag
- setvar VAR_PORTHOLE, 8
+ setvar VAR_PORTHOLE_STATE, 8
playse SE_PINPON
msgbox SSTidalRooms_Text_23C50F, 4
return
SSTidalRooms_EventScript_23C0A7:: @ 823C0A7
- switch VAR_PORTHOLE
+ switch VAR_PORTHOLE_STATE
case 2, SSTidalRooms_EventScript_23C03C
case 3, SSTidalRooms_EventScript_23C03C
case 6, SSTidalRooms_EventScript_23C028
@@ -114,16 +114,16 @@ SSTidalCorridor_EventScript_23C110:: @ 823C110
SSTidalCorridor_EventScript_23C119:: @ 823C119
lock
faceplayer
- compare VAR_PORTHOLE, 4
+ compare VAR_PORTHOLE_STATE, 4
goto_eq SSTidalCorridor_EventScript_23C13B
- compare VAR_PORTHOLE, 8
+ compare VAR_PORTHOLE_STATE, 8
goto_eq SSTidalCorridor_EventScript_23C15A
msgbox SSTidalCorridor_Text_23C596, 4
release
end
SSTidalCorridor_EventScript_23C13B:: @ 823C13B
- setrespawn 8
+ setrespawn HEAL_LOCATION_LILYCOVE_CITY
msgbox SSTidalCorridor_Text_23C64F, 4
checkflag FLAG_0x104
call_if 1, SSTidalCorridor_EventScript_23C179
@@ -133,7 +133,7 @@ SSTidalCorridor_EventScript_23C13B:: @ 823C13B
end
SSTidalCorridor_EventScript_23C15A:: @ 823C15A
- setrespawn 4
+ setrespawn HEAL_LOCATION_SLATEPORT_CITY
msgbox SSTidalCorridor_Text_23C64F, 4
checkflag FLAG_0x104
call_if 1, SSTidalCorridor_EventScript_23C179
@@ -148,9 +148,9 @@ SSTidalCorridor_EventScript_23C179:: @ 823C179
SSTidalCorridor_EventScript_23C17D:: @ 823C17D
lockall
- compare VAR_PORTHOLE, 2
+ compare VAR_PORTHOLE_STATE, 2
goto_eq SSTidalCorridor_EventScript_23C19E
- compare VAR_PORTHOLE, 7
+ compare VAR_PORTHOLE_STATE, 7
goto_eq SSTidalCorridor_EventScript_23C19E
msgbox SSTidalCorridor_Text_23C6C3, 4
releaseall
diff --git a/data/maps/SkyPillar_Top/scripts.inc b/data/maps/SkyPillar_Top/scripts.inc
index 334acc8ac..690464698 100644
--- a/data/maps/SkyPillar_Top/scripts.inc
+++ b/data/maps/SkyPillar_Top/scripts.inc
@@ -10,7 +10,7 @@ SkyPillar_Top_MapScript1_2396C8: @ 82396C8
end
SkyPillar_Top_EventScript_2396D2:: @ 82396D2
- specialvar VAR_RESULT, sub_8138B80
+ specialvar VAR_RESULT, GetBattleOutcome
compare VAR_RESULT, 7
goto_if 5, SkyPillar_Top_EventScript_27374E
removeobject VAR_LAST_TALKED
@@ -56,7 +56,7 @@ SkyPillar_Top_EventScript_239722:: @ 8239722
special BattleSetup_StartLegendaryBattle
waitstate
clearflag FLAG_SYS_CTRL_OBJ_DELETE
- specialvar VAR_RESULT, sub_8138B80
+ specialvar VAR_RESULT, GetBattleOutcome
compare VAR_RESULT, 1
goto_eq SkyPillar_Top_EventScript_239768
compare VAR_RESULT, 4
diff --git a/data/maps/SlateportCity_BattleTentLobby/scripts.inc b/data/maps/SlateportCity_BattleTentLobby/scripts.inc
index fc66d7387..76b12e31e 100644
--- a/data/maps/SlateportCity_BattleTentLobby/scripts.inc
+++ b/data/maps/SlateportCity_BattleTentLobby/scripts.inc
@@ -137,7 +137,7 @@ SlateportCity_BattleTentLobby_EventScript_2088CA:: @ 82088CA
SlateportCity_BattleTentLobby_EventScript_208906:: @ 8208906
setvar VAR_FRONTIER_FACILITY, 4
- setvar VAR_0x40CE, 0
+ setvar VAR_FRONTIER_BATTLE_MODE, 0
setvar VAR_0x8004, 2
setvar VAR_0x8005, 1
setvar VAR_0x8006, 2
diff --git a/data/maps/SlateportCity_Harbor/scripts.inc b/data/maps/SlateportCity_Harbor/scripts.inc
index e1f373bb2..58c318d37 100644
--- a/data/maps/SlateportCity_Harbor/scripts.inc
+++ b/data/maps/SlateportCity_Harbor/scripts.inc
@@ -203,7 +203,7 @@ SlateportCity_Harbor_EventScript_20CB92:: @ 820CB92
msgbox SlateportCity_Harbor_Text_20CF93, 5
compare VAR_RESULT, 0
goto_eq SlateportCity_Harbor_EventScript_20CBDD
- setvar VAR_PORTHOLE, 1
+ setvar VAR_PORTHOLE_STATE, 1
call SlateportCity_Harbor_EventScript_20CBE9
warp MAP_SS_TIDAL_CORRIDOR, 255, 1, 10
waitstate
diff --git a/data/maps/SlateportCity_House1/scripts.inc b/data/maps/SlateportCity_House1/scripts.inc
index 8ecc859f7..745cc6627 100644
--- a/data/maps/SlateportCity_House1/scripts.inc
+++ b/data/maps/SlateportCity_House1/scripts.inc
@@ -34,7 +34,7 @@ SlateportCity_House1_EventScript_209AF3:: @ 8209AF3
special TV_CheckMonOTIDEqualsPlayerID
compare VAR_RESULT, 1
goto_eq SlateportCity_House1_EventScript_209B50
- specialvar VAR_RESULT, sub_8139770
+ specialvar VAR_RESULT, MonOTNameMatchesPlayer
special TV_CopyNicknameToStringVar1AndEnsureTerminated
compare VAR_RESULT, 1
goto_eq SlateportCity_House1_EventScript_209B50
diff --git a/data/maps/SlateportCity_PokemonCenter_1F/scripts.inc b/data/maps/SlateportCity_PokemonCenter_1F/scripts.inc
index 404804c57..dd62280bb 100644
--- a/data/maps/SlateportCity_PokemonCenter_1F/scripts.inc
+++ b/data/maps/SlateportCity_PokemonCenter_1F/scripts.inc
@@ -4,7 +4,7 @@ SlateportCity_PokemonCenter_1F_MapScripts:: @ 820DABF
.byte 0
SlateportCity_PokemonCenter_1F_MapScript1_20DACA: @ 820DACA
- setrespawn 4
+ setrespawn HEAL_LOCATION_SLATEPORT_CITY
call SlateportCity_PokemonCenter_1F_EventScript_2718DE
end
diff --git a/data/maps/SootopolisCity_MysteryEventsHouse_1F/scripts.inc b/data/maps/SootopolisCity_MysteryEventsHouse_1F/scripts.inc
index cdcf5866c..652ac791a 100644
--- a/data/maps/SootopolisCity_MysteryEventsHouse_1F/scripts.inc
+++ b/data/maps/SootopolisCity_MysteryEventsHouse_1F/scripts.inc
@@ -91,7 +91,7 @@ SootopolisCity_MysteryEventsHouse_1F_EventScript_227A4E:: @ 8227A4E
SootopolisCity_MysteryEventsHouse_1F_EventScript_227A58:: @ 8227A58
special SavePlayerParty
- special sub_8139238
+ special BufferEReaderTrainerName
msgbox SootopolisCity_MysteryEventsHouse_1F_Text_227BFC, 5
compare VAR_RESULT, 0
goto_eq SootopolisCity_MysteryEventsHouse_1F_EventScript_227AE2
diff --git a/data/maps/SootopolisCity_PokemonCenter_1F/scripts.inc b/data/maps/SootopolisCity_PokemonCenter_1F/scripts.inc
index fcb1b5863..46dccd97e 100644
--- a/data/maps/SootopolisCity_PokemonCenter_1F/scripts.inc
+++ b/data/maps/SootopolisCity_PokemonCenter_1F/scripts.inc
@@ -4,7 +4,7 @@ SootopolisCity_PokemonCenter_1F_MapScripts:: @ 82264F1
.byte 0
SootopolisCity_PokemonCenter_1F_MapScript1_2264FC: @ 82264FC
- setrespawn 10
+ setrespawn HEAL_LOCATION_SOOTOPOLIS_CITY
end
SootopolisCity_PokemonCenter_1F_EventScript_226500:: @ 8226500
diff --git a/data/maps/SouthernIsland_Interior/scripts.inc b/data/maps/SouthernIsland_Interior/scripts.inc
index 432667cc9..3005e32d7 100644
--- a/data/maps/SouthernIsland_Interior/scripts.inc
+++ b/data/maps/SouthernIsland_Interior/scripts.inc
@@ -9,7 +9,7 @@ SouthernIsland_Interior_MapScript1_242A50: @ 8242A50
end
SouthernIsland_Interior_EventScript_242A5A:: @ 8242A5A
- specialvar VAR_RESULT, sub_8138B80
+ specialvar VAR_RESULT, GetBattleOutcome
compare VAR_RESULT, 7
goto_if 5, SouthernIsland_Interior_EventScript_27374E
removeobject 2
@@ -90,7 +90,7 @@ SouthernIsland_Interior_EventScript_242AD0:: @ 8242AD0
special BattleSetup_StartLatiBattle
waitstate
clearflag FLAG_SYS_CTRL_OBJ_DELETE
- specialvar VAR_RESULT, sub_8138B80
+ specialvar VAR_RESULT, GetBattleOutcome
compare VAR_RESULT, 1
goto_eq SouthernIsland_Interior_EventScript_242B81
compare VAR_RESULT, 4
diff --git a/data/maps/TerraCave_End/scripts.inc b/data/maps/TerraCave_End/scripts.inc
index 5152f85cf..d603f2274 100644
--- a/data/maps/TerraCave_End/scripts.inc
+++ b/data/maps/TerraCave_End/scripts.inc
@@ -9,7 +9,7 @@ TerraCave_End_MapScript1_23B0BB: @ 823B0BB
end
TerraCave_End_EventScript_23B0C5:: @ 823B0C5
- specialvar VAR_RESULT, sub_8138B80
+ specialvar VAR_RESULT, GetBattleOutcome
compare VAR_RESULT, 7
goto_if 5, TerraCave_End_EventScript_27374E
removeobject 1
@@ -42,7 +42,7 @@ TerraCave_End_EventScript_23B0EC:: @ 823B0EC
waitstate
clearflag FLAG_SYS_CTRL_OBJ_DELETE
setvar VAR_TEMP_1, 0
- specialvar VAR_RESULT, sub_8138B80
+ specialvar VAR_RESULT, GetBattleOutcome
compare VAR_RESULT, 1
goto_eq TerraCave_End_EventScript_23B155
compare VAR_RESULT, 4
diff --git a/data/maps/TrainerHill_Elevator/scripts.inc b/data/maps/TrainerHill_Elevator/scripts.inc
index ac2d5c8a7..ff731393b 100644
--- a/data/maps/TrainerHill_Elevator/scripts.inc
+++ b/data/maps/TrainerHill_Elevator/scripts.inc
@@ -50,7 +50,7 @@ TrainerHill_Elevator_EventScript_2693D4:: @ 82693D4
TrainerHill_Elevator_EventScript_2693D9:: @ 82693D9
waitse
- special sub_8139A78
+ special ShakeScreenInElevator
waitstate
return
diff --git a/data/maps/VerdanturfTown/scripts.inc b/data/maps/VerdanturfTown/scripts.inc
index 2987a9a59..8cc8f6f4d 100644
--- a/data/maps/VerdanturfTown/scripts.inc
+++ b/data/maps/VerdanturfTown/scripts.inc
@@ -10,7 +10,7 @@ VerdanturfTown_MapScript1_1EB56C: @ 81EB56C
VerdanturfTown_EventScript_1EB575:: @ 81EB575
lock
faceplayer
- checkflag FLAG_0x0C7
+ checkflag FLAG_RUSTURF_TUNNEL_OPENED
goto_eq VerdanturfTown_EventScript_1EB594
msgbox VerdanturfTown_Text_1EB5FD, 4
applymovement 2, VerdanturfTown_Movement_2725A2
@@ -36,7 +36,7 @@ VerdanturfTown_EventScript_1EB5B1:: @ 81EB5B1
VerdanturfTown_EventScript_1EB5BA:: @ 81EB5BA
lock
faceplayer
- checkflag FLAG_0x0C7
+ checkflag FLAG_RUSTURF_TUNNEL_OPENED
goto_eq VerdanturfTown_EventScript_1EB5CF
msgbox VerdanturfTown_Text_1EB854, 4
release
diff --git a/data/maps/VerdanturfTown_BattleTentLobby/scripts.inc b/data/maps/VerdanturfTown_BattleTentLobby/scripts.inc
index 26f0680a0..a4cfc20c2 100644
--- a/data/maps/VerdanturfTown_BattleTentLobby/scripts.inc
+++ b/data/maps/VerdanturfTown_BattleTentLobby/scripts.inc
@@ -150,7 +150,7 @@ VerdanturfTown_BattleTentLobby_EventScript_201893:: @ 8201893
VerdanturfTown_BattleTentLobby_EventScript_2018CF:: @ 82018CF
setvar VAR_FRONTIER_FACILITY, 2
- setvar VAR_0x40CE, 0
+ setvar VAR_FRONTIER_BATTLE_MODE, 0
setvar VAR_RESULT, 2
setvar VAR_0x8004, 15
special sub_81A1780
diff --git a/data/maps/VerdanturfTown_PokemonCenter_1F/scripts.inc b/data/maps/VerdanturfTown_PokemonCenter_1F/scripts.inc
index 73c7fe1f3..131df00f7 100644
--- a/data/maps/VerdanturfTown_PokemonCenter_1F/scripts.inc
+++ b/data/maps/VerdanturfTown_PokemonCenter_1F/scripts.inc
@@ -4,7 +4,7 @@ VerdanturfTown_PokemonCenter_1F_MapScripts:: @ 8202726
.byte 0
VerdanturfTown_PokemonCenter_1F_MapScript1_202731: @ 8202731
- setrespawn 18
+ setrespawn HEAL_LOCATION_VERDANTURF_TOWN
call VerdanturfTown_PokemonCenter_1F_EventScript_2718DE
end
diff --git a/data/maps/VerdanturfTown_WandasHouse/scripts.inc b/data/maps/VerdanturfTown_WandasHouse/scripts.inc
index fabff6420..8184f4c21 100644
--- a/data/maps/VerdanturfTown_WandasHouse/scripts.inc
+++ b/data/maps/VerdanturfTown_WandasHouse/scripts.inc
@@ -69,7 +69,7 @@ VerdanturfTown_WandasHouse_EventScript_20294E:: @ 820294E
goto_eq VerdanturfTown_WandasHouse_EventScript_202989
checkflag FLAG_0x4F3
goto_eq VerdanturfTown_WandasHouse_EventScript_20297F
- checkflag FLAG_0x0C7
+ checkflag FLAG_RUSTURF_TUNNEL_OPENED
goto_eq VerdanturfTown_WandasHouse_EventScript_202975
msgbox VerdanturfTown_WandasHouse_Text_202E47, 4
release