summaryrefslogtreecommitdiff
path: root/data/maps/Route12/scripts.inc
diff options
context:
space:
mode:
Diffstat (limited to 'data/maps/Route12/scripts.inc')
-rw-r--r--data/maps/Route12/scripts.inc36
1 files changed, 17 insertions, 19 deletions
diff --git a/data/maps/Route12/scripts.inc b/data/maps/Route12/scripts.inc
index 446d9047d..80a037a65 100644
--- a/data/maps/Route12/scripts.inc
+++ b/data/maps/Route12/scripts.inc
@@ -1,10 +1,9 @@
Route12_MapScripts:: @ 8168000
- map_script 5, Route12_MapScript1_168006
+ map_script MAP_SCRIPT_ON_RESUME, Route12_OnResume
.byte 0
-Route12_MapScript1_168006:: @ 8168006
- checkflag FLAG_SYS_SPECIAL_WILD_BATTLE
- call_if TRUE, EventScript_168010
+Route12_OnResume:: @ 8168006
+ call_if_set FLAG_SYS_SPECIAL_WILD_BATTLE, EventScript_168010
end
EventScript_168010:: @ 8168010
@@ -14,16 +13,15 @@ EventScript_168010:: @ 8168010
Route12_EventScript_168014:: @ 8168014
lock
faceplayer
- checkflag FLAG_GOT_POKE_FLUTE
- goto_if FALSE, EventScript_168099
+ goto_if_unset FLAG_GOT_POKE_FLUTE, EventScript_168099
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_16808D
- call EventScript_1A924B
+ compare VAR_RESULT, NO
+ goto_if_eq EventScript_16808D
+ call EventScript_AwakenSnorlax
setwildbattle SPECIES_SNORLAX, 30, ITEM_NONE
waitse
playmoncry SPECIES_SNORLAX, 2
@@ -35,12 +33,12 @@ Route12_EventScript_168014:: @ 8168014
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_16808F
- compare_var_to_value VAR_RESULT, B_OUTCOME_RAN
- goto_if eq, EventScript_16808F
- compare_var_to_value VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED
- goto_if eq, EventScript_16808F
+ compare VAR_RESULT, B_OUTCOME_WON
+ goto_if_eq EventScript_16808F
+ compare VAR_RESULT, B_OUTCOME_RAN
+ goto_if_eq EventScript_16808F
+ compare VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED
+ goto_if_eq EventScript_16808F
release
end
@@ -59,9 +57,9 @@ EventScript_168099:: @ 8168099
end
Route12_EventScript_1680A3:: @ 81680A3
- msgbox gUnknown_8185797, 3
+ msgbox gUnknown_8185797, MSGBOX_SIGN
end
Route12_EventScript_1680AC:: @ 81680AC
- msgbox gUnknown_81857B3, 3
+ msgbox gUnknown_81857B3, MSGBOX_SIGN
end