summaryrefslogtreecommitdiff
path: root/data/maps/Route16/scripts.inc
diff options
context:
space:
mode:
Diffstat (limited to 'data/maps/Route16/scripts.inc')
-rw-r--r--data/maps/Route16/scripts.inc48
1 files changed, 23 insertions, 25 deletions
diff --git a/data/maps/Route16/scripts.inc b/data/maps/Route16/scripts.inc
index 0bc8d6c8a..eb866388b 100644
--- a/data/maps/Route16/scripts.inc
+++ b/data/maps/Route16/scripts.inc
@@ -1,28 +1,27 @@
Route16_MapScripts:: @ 81680E5
- map_script 5, Route16_MapScript1_1680F5
- map_script 3, Route16_MapScript2_168103
- map_script 4, Route16_MapScript3_168113
+ map_script MAP_SCRIPT_ON_RESUME, Route16_OnResume
+ map_script MAP_SCRIPT_ON_TRANSITION, Route16_OnTransition
+ map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, Route16_OnWarp
.byte 0
-Route16_MapScript1_1680F5:: @ 81680F5
- checkflag FLAG_SYS_SPECIAL_WILD_BATTLE
- call_if TRUE, EventScript_1680FF
+Route16_OnResume:: @ 81680F5
+ call_if_set FLAG_SYS_SPECIAL_WILD_BATTLE, EventScript_1680FF
end
EventScript_1680FF:: @ 81680FF
removeobject VAR_LAST_TALKED
return
-Route16_MapScript2_168103:: @ 8168103
- compare_var_to_value VAR_MAP_SCENE_ROUTE16, 1
- call_if eq, EventScript_16810F
+Route16_OnTransition:: @ 8168103
+ compare VAR_MAP_SCENE_ROUTE16, 1
+ call_if_eq EventScript_16810F
end
EventScript_16810F:: @ 816810F
setflag FLAG_SYS_ON_CYCLING_ROAD
return
-Route16_MapScript3_168113:: @ 8168113
+Route16_OnWarp:: @ 8168113
map_script_2 VAR_MAP_SCENE_ROUTE16, 1, EventScript_16811D
.2byte 0
@@ -33,16 +32,15 @@ EventScript_16811D:: @ 816811D
Route16_EventScript_168121:: @ 8168121
lock
faceplayer
- checkflag FLAG_GOT_POKE_FLUTE
- goto_if FALSE, EventScript_1681A3
+ goto_if_unset FLAG_GOT_POKE_FLUTE, EventScript_1681A3
special sub_8110AB4
- compare_var_to_value VAR_RESULT, 2
- goto_if eq, EventScript_1A7AE0
+ compare VAR_RESULT, 2
+ goto_if_eq EventScript_1A7AE0
special sub_8112364
msgbox gUnknown_81853CC, MSGBOX_YESNO
- compare_var_to_value VAR_RESULT, 0
- goto_if eq, EventScript_168197
- call EventScript_1A924B
+ compare VAR_RESULT, NO
+ goto_if_eq EventScript_168197
+ call EventScript_AwakenSnorlax
setwildbattle SPECIES_SNORLAX, 30, ITEM_NONE
waitse
playmoncry SPECIES_SNORLAX, 2
@@ -53,12 +51,12 @@ Route16_EventScript_168121:: @ 8168121
dowildbattle
clearflag FLAG_SYS_SPECIAL_WILD_BATTLE
specialvar VAR_RESULT, Special_GetBattleOutcome
- compare_var_to_value VAR_RESULT, B_OUTCOME_WON
- goto_if eq, EventScript_168199
- compare_var_to_value VAR_RESULT, B_OUTCOME_RAN
- goto_if eq, EventScript_168199
- compare_var_to_value VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED
- goto_if eq, EventScript_168199
+ compare VAR_RESULT, B_OUTCOME_WON
+ goto_if_eq EventScript_168199
+ compare VAR_RESULT, B_OUTCOME_RAN
+ goto_if_eq EventScript_168199
+ compare VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED
+ goto_if_eq EventScript_168199
release
end
@@ -77,9 +75,9 @@ EventScript_1681A3:: @ 81681A3
end
Route16_EventScript_1681AD:: @ 81681AD
- msgbox gUnknown_8186F7A, 3
+ msgbox gUnknown_8186F7A, MSGBOX_SIGN
end
Route16_EventScript_1681B6:: @ 81681B6
- msgbox gUnknown_8186F98, 3
+ msgbox gUnknown_8186F98, MSGBOX_SIGN
end