summaryrefslogtreecommitdiff
path: root/data/maps/SeafoamIslands_B4F/scripts.inc
diff options
context:
space:
mode:
Diffstat (limited to 'data/maps/SeafoamIslands_B4F/scripts.inc')
-rw-r--r--data/maps/SeafoamIslands_B4F/scripts.inc131
1 files changed, 66 insertions, 65 deletions
diff --git a/data/maps/SeafoamIslands_B4F/scripts.inc b/data/maps/SeafoamIslands_B4F/scripts.inc
index 1882fb3a3..c7343fcb6 100644
--- a/data/maps/SeafoamIslands_B4F/scripts.inc
+++ b/data/maps/SeafoamIslands_B4F/scripts.inc
@@ -1,3 +1,5 @@
+.equ NUM_BOULDERS_PRESENT, VAR_TEMP_2
+
SeafoamIslands_B4F_MapScripts:: @ 816302E
map_script MAP_SCRIPT_ON_TRANSITION, SeafoamIslands_B4F_OnTransition
map_script MAP_SCRIPT_ON_RESUME, SeafoamIslands_B4F_OnResume
@@ -7,10 +9,10 @@ SeafoamIslands_B4F_MapScripts:: @ 816302E
.byte 0
SeafoamIslands_B4F_OnResume:: @ 8163048
- call_if_set FLAG_SYS_SPECIAL_WILD_BATTLE, EventScript_163052
+ call_if_set FLAG_SYS_SPECIAL_WILD_BATTLE, SeafoamIslands_B4F_EventScript_TryRemoveArticuno
end
-EventScript_163052:: @ 8163052
+SeafoamIslands_B4F_EventScript_TryRemoveArticuno:: @ 8163052
specialvar VAR_RESULT, Special_GetBattleOutcome
compare VAR_RESULT, B_OUTCOME_CAUGHT
goto_if_ne EventScript_Return
@@ -18,109 +20,111 @@ EventScript_163052:: @ 8163052
return
SeafoamIslands_B4F_OnTransition:: @ 8163066
- call_if_unset FLAG_FOUGHT_ARTICUNO, EventScript_1630AD
- call_if_unset FLAG_STOPPED_SEAFOAM_B4F_CURRENT, EventScript_163082
- call_if_set FLAG_STOPPED_SEAFOAM_B4F_CURRENT, EventScript_1630A9
+ call_if_unset FLAG_FOUGHT_ARTICUNO, SeafoamIslands_B4F_EventScript_ShowArticuno
+ call_if_unset FLAG_STOPPED_SEAFOAM_B4F_CURRENT, SeafoamIslands_B4F_EventScript_CheckStoppedCurrent
+ call_if_set FLAG_STOPPED_SEAFOAM_B4F_CURRENT, SeafoamIslands_B4F_EventScript_SetNoCurrentLayout
end
-EventScript_163082:: @ 8163082
- setvar VAR_TEMP_2, 0
- call_if_unset FLAG_HIDE_SEAFOAM_B4F_BOULDER_1, EventScript_163169
- call_if_unset FLAG_HIDE_SEAFOAM_B4F_BOULDER_2, EventScript_163169
- compare VAR_TEMP_2, 2
- call_if_eq EventScript_1630A5
+SeafoamIslands_B4F_EventScript_CheckStoppedCurrent:: @ 8163082
+ setvar NUM_BOULDERS_PRESENT, 0
+ call_if_unset FLAG_HIDE_SEAFOAM_B4F_BOULDER_1, SeafoamIslands_B4F_EventScript_AddBoulderPresent
+ call_if_unset FLAG_HIDE_SEAFOAM_B4F_BOULDER_2, SeafoamIslands_B4F_EventScript_AddBoulderPresent
+ compare NUM_BOULDERS_PRESENT, 2
+ call_if_eq SeafoamIslands_B4F_EventScript_StoppedCurrent
return
-EventScript_1630A5:: @ 81630A5
+SeafoamIslands_B4F_EventScript_StoppedCurrent:: @ 81630A5
setflag FLAG_STOPPED_SEAFOAM_B4F_CURRENT
return
-EventScript_1630A9:: @ 81630A9
- setmaplayoutindex LAYOUT_UNUSED_LAYOUT_833BE30
+SeafoamIslands_B4F_EventScript_SetNoCurrentLayout:: @ 81630A9
+ setmaplayoutindex LAYOUT_SEAFOAM_ISLANDS_B4F_CURRENT_STOPPED
return
-EventScript_1630AD:: @ 81630AD
+SeafoamIslands_B4F_EventScript_ShowArticuno:: @ 81630AD
clearflag FLAG_HIDE_ARTICUNO
return
SeafoamIslands_B4F_OnLoad:: @ 81630B1
- setvar VAR_TEMP_2, 0
- call_if_unset FLAG_HIDE_SEAFOAM_B4F_BOULDER_1, EventScript_163169
- call_if_unset FLAG_HIDE_SEAFOAM_B4F_BOULDER_2, EventScript_163169
- compare VAR_TEMP_2, 2
- goto_if_eq EventScript_1630D4
+ setvar NUM_BOULDERS_PRESENT, 0
+ call_if_unset FLAG_HIDE_SEAFOAM_B4F_BOULDER_1, SeafoamIslands_B4F_EventScript_AddBoulderPresent
+ call_if_unset FLAG_HIDE_SEAFOAM_B4F_BOULDER_2, SeafoamIslands_B4F_EventScript_AddBoulderPresent
+ compare NUM_BOULDERS_PRESENT, 2
+ goto_if_eq SeafoamIslands_B4F_EventScript_SetCalmWaterNearStairs
end
-EventScript_1630D4:: @ 81630D4
- setmetatile 12, 14, 299, 0
- setmetatile 13, 14, 299, 0
+SeafoamIslands_B4F_EventScript_SetCalmWaterNearStairs:: @ 81630D4
+ setmetatile 12, 14, METATILE_General_CalmWater, 0
+ setmetatile 13, 14, METATILE_General_CalmWater, 0
end
SeafoamIslands_B4F_OnWarp:: @ 81630E7
- map_script_2 VAR_MAP_SCENE_SEAFOAM_ISLANDS_B4F, 1, EventScript_1630F1
+ map_script_2 VAR_MAP_SCENE_SEAFOAM_ISLANDS_B4F, 1, SeafoamIslands_B4F_EventScript_WarpInOnCurrent
.2byte 0
-EventScript_1630F1:: @ 81630F1
+SeafoamIslands_B4F_EventScript_WarpInOnCurrent:: @ 81630F1
turnobject OBJ_EVENT_ID_PLAYER, DIR_NORTH
special Special_ForcePlayerToStartSurfing
end
SeafoamIslands_B4F_OnFrame:: @ 81630F9
- map_script_2 VAR_MAP_SCENE_SEAFOAM_ISLANDS_B4F, 1, EventScript_16310B
- map_script_2 VAR_TEMP_1, 1, EventScript_163121
+ map_script_2 VAR_MAP_SCENE_SEAFOAM_ISLANDS_B4F, 1, SeafoamIslands_B4F_EventScript_EnterOnCurrent
+ map_script_2 VAR_TEMP_1, 1, SeafoamIslands_B4F_EventScript_EnterByFalling
.2byte 0
-EventScript_16310B:: @ 816310B
+@ The current the player is forced in on from B3F
+SeafoamIslands_B4F_EventScript_EnterOnCurrent:: @ 816310B
lockall
- applymovement OBJ_EVENT_ID_PLAYER, Movement_16311D
+ applymovement OBJ_EVENT_ID_PLAYER, SeafoamIslands_B4F_Movement_EnterOnCurrent
waitmovement 0
setvar VAR_MAP_SCENE_SEAFOAM_ISLANDS_B4F, 0
releaseall
end
-Movement_16311D:: @ 816311D
+SeafoamIslands_B4F_Movement_EnterOnCurrent:: @ 816311D
walk_fast_up
walk_fast_up
walk_fast_up
step_end
-EventScript_163121:: @ 8163121
+@ The current the player lands on when entering the map by falling
+SeafoamIslands_B4F_EventScript_EnterByFalling:: @ 8163121
lockall
- setvar VAR_TEMP_2, 0
- call_if_unset FLAG_HIDE_SEAFOAM_B4F_BOULDER_1, EventScript_163169
- call_if_unset FLAG_HIDE_SEAFOAM_B4F_BOULDER_2, EventScript_163169
- compare VAR_TEMP_2, 2
- goto_if_eq EventScript_163185
+ setvar NUM_BOULDERS_PRESENT, 0
+ call_if_unset FLAG_HIDE_SEAFOAM_B4F_BOULDER_1, SeafoamIslands_B4F_EventScript_AddBoulderPresent
+ call_if_unset FLAG_HIDE_SEAFOAM_B4F_BOULDER_2, SeafoamIslands_B4F_EventScript_AddBoulderPresent
+ compare NUM_BOULDERS_PRESENT, 2
+ goto_if_eq SeafoamIslands_B4F_EventScript_CurrentBlocked
getplayerxy VAR_0x8008, VAR_0x8009
compare VAR_0x8008, 9
- call_if_lt EventScript_16316F
+ call_if_lt SeafoamIslands_B4F_EventScript_RideCurrentFar
compare VAR_0x8008, 9
- call_if_ge EventScript_16317A
+ call_if_ge SeafoamIslands_B4F_EventScript_RideCurrentClose
special sub_805D1A8
setvar VAR_TEMP_1, 0
releaseall
end
-EventScript_163169:: @ 8163169
- addvar VAR_TEMP_2, 1
+SeafoamIslands_B4F_EventScript_AddBoulderPresent:: @ 8163169
+ addvar NUM_BOULDERS_PRESENT, 1
return
-EventScript_16316F:: @ 816316F
- applymovement OBJ_EVENT_ID_PLAYER, Movement_16318C
+SeafoamIslands_B4F_EventScript_RideCurrentFar:: @ 816316F
+ applymovement OBJ_EVENT_ID_PLAYER, SeafoamIslands_B4F_Movement_RideCurrentFar
waitmovement 0
return
-EventScript_16317A:: @ 816317A
- applymovement OBJ_EVENT_ID_PLAYER, Movement_163195
+SeafoamIslands_B4F_EventScript_RideCurrentClose:: @ 816317A
+ applymovement OBJ_EVENT_ID_PLAYER, SeafoamIslands_B4F_Movement_RideCurrentClose
waitmovement 0
return
-EventScript_163185:: @ 8163185
+SeafoamIslands_B4F_EventScript_CurrentBlocked:: @ 8163185
setvar VAR_TEMP_1, 0
releaseall
end
-Movement_16318C:: @ 816318C
+SeafoamIslands_B4F_Movement_RideCurrentFar:: @ 816318C
walk_up
walk_up
walk_up
@@ -131,7 +135,7 @@ Movement_16318C:: @ 816318C
walk_up
step_end
-Movement_163195:: @ 8163195
+SeafoamIslands_B4F_Movement_RideCurrentClose:: @ 8163195
walk_up
walk_up
walk_up
@@ -141,18 +145,19 @@ Movement_163195:: @ 8163195
walk_up
step_end
-SeafoamIslands_B4F_EventScript_16319D:: @ 816319D
+@ Triggers blocking re-entry to B3F
+SeafoamIslands_B4F_EventScript_UpwardCurrent:: @ 816319D
lockall
- applymovement OBJ_EVENT_ID_PLAYER, Movement_1631AA
+ applymovement OBJ_EVENT_ID_PLAYER, SeafoamIslands_B4F_Movement_WalkUp
waitmovement 0
releaseall
end
-Movement_1631AA:: @ 81631AA
+SeafoamIslands_B4F_Movement_WalkUp:: @ 81631AA
walk_up
step_end
-SeafoamIslands_B4F_EventScript_1631AC:: @ 81631AC
+SeafoamIslands_B4F_EventScript_Articuno:: @ 81631AC
goto_if_questlog EventScript_ReleaseEnd
special sub_8112364
lock
@@ -160,7 +165,7 @@ SeafoamIslands_B4F_EventScript_1631AC:: @ 81631AC
setwildbattle SPECIES_ARTICUNO, 50, ITEM_NONE
waitse
playmoncry SPECIES_ARTICUNO, 2
- message Text_1A6448
+ message Text_Gyaoo
waitmessage
waitmoncry
delay 10
@@ -172,33 +177,29 @@ SeafoamIslands_B4F_EventScript_1631AC:: @ 81631AC
clearflag FLAG_SYS_SPECIAL_WILD_BATTLE
specialvar VAR_RESULT, Special_GetBattleOutcome
compare VAR_RESULT, B_OUTCOME_WON
- goto_if_eq EventScript_16320F
+ goto_if_eq SeafoamIslands_B4F_EventScript_DefeatedArticuno
compare VAR_RESULT, B_OUTCOME_RAN
- goto_if_eq EventScript_163218
+ goto_if_eq SeafoamIslands_B4F_EventScript_RanFromArticuno
compare VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED
- goto_if_eq EventScript_163218
+ goto_if_eq SeafoamIslands_B4F_EventScript_RanFromArticuno
setflag FLAG_FOUGHT_ARTICUNO
release
end
-EventScript_16320F:: @ 816320F
+SeafoamIslands_B4F_EventScript_DefeatedArticuno:: @ 816320F
setflag FLAG_FOUGHT_ARTICUNO
goto EventScript_RemoveStaticMon
-
-EventScript_163217:: @ 8163217
end
-EventScript_163218:: @ 8163218
+SeafoamIslands_B4F_EventScript_RanFromArticuno:: @ 8163218
setvar VAR_0x8004, SPECIES_ARTICUNO
goto EventScript_MonFlewAway
-
-EventScript_163222:: @ 8163222
end
-SeafoamIslands_B4F_EventScript_163223:: @ 8163223
- msgbox gUnknown_8179B36, MSGBOX_SIGN
+SeafoamIslands_B4F_EventScript_BoulderHintSign:: @ 8163223
+ msgbox SeafoamIslands_B4F_Text_BouldersMightChangeWaterFlow, MSGBOX_SIGN
end
-SeafoamIslands_B4F_EventScript_16322C:: @ 816322C
- msgbox gUnknown_8179B65, MSGBOX_SIGN
+SeafoamIslands_B4F_EventScript_FastCurrentSign:: @ 816322C
+ msgbox SeafoamIslands_B4F_Text_DangerFastCurrent, MSGBOX_SIGN
end