2020-06-21 07:56:57 +02:00
|
|
|
.set LOCALID_RAYQUAZA_SLEEPING, 1
|
|
|
|
|
2021-07-20 21:18:31 +02:00
|
|
|
SkyPillar_Top_MapScripts::
|
2019-10-31 22:00:37 +01:00
|
|
|
map_script MAP_SCRIPT_ON_RESUME, SkyPillar_Top_OnResume
|
2019-04-22 22:31:51 +02:00
|
|
|
map_script MAP_SCRIPT_ON_TRANSITION, SkyPillar_Top_OnTransition
|
2019-10-31 22:00:37 +01:00
|
|
|
map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, SkyPillar_Top_OnWarp
|
2017-11-10 02:21:31 +01:00
|
|
|
.byte 0
|
|
|
|
|
2021-07-20 21:18:31 +02:00
|
|
|
SkyPillar_Top_OnResume:
|
2019-10-31 22:00:37 +01:00
|
|
|
call_if_set FLAG_SYS_CTRL_OBJ_DELETE, SkyPillar_Top_EventScript_TryRemoveRayquaza
|
2017-11-10 02:21:31 +01:00
|
|
|
end
|
|
|
|
|
2021-07-20 21:18:31 +02:00
|
|
|
SkyPillar_Top_EventScript_TryRemoveRayquaza::
|
2018-08-08 10:37:12 +02:00
|
|
|
specialvar VAR_RESULT, GetBattleOutcome
|
2021-11-19 05:06:30 +01:00
|
|
|
goto_if_ne VAR_RESULT, B_OUTCOME_CAUGHT, Common_EventScript_NopReturn
|
2017-11-10 02:21:31 +01:00
|
|
|
removeobject VAR_LAST_TALKED
|
|
|
|
return
|
|
|
|
|
2021-07-20 21:18:31 +02:00
|
|
|
SkyPillar_Top_OnTransition:
|
2021-11-19 05:06:30 +01:00
|
|
|
call_if_lt VAR_SKY_PILLAR_STATE, 2, SkyPillar_Top_EventScript_SetCleanLayout
|
|
|
|
call_if_ge VAR_SKY_PILLAR_STATE, 2, SkyPillar_Top_EventScript_TryShowRayquaza
|
2017-11-10 02:21:31 +01:00
|
|
|
end
|
|
|
|
|
2021-07-20 21:18:31 +02:00
|
|
|
SkyPillar_Top_EventScript_SetCleanLayout::
|
2019-02-09 16:57:30 +01:00
|
|
|
setmaplayoutindex LAYOUT_SKY_PILLAR_TOP_CLEAN
|
2020-06-21 07:56:57 +02:00
|
|
|
setobjectmovementtype LOCALID_RAYQUAZA_SLEEPING, MOVEMENT_TYPE_FACE_DOWN
|
2017-11-10 02:21:31 +01:00
|
|
|
return
|
|
|
|
|
2021-07-20 21:18:31 +02:00
|
|
|
SkyPillar_Top_EventScript_TryShowRayquaza::
|
2019-10-31 22:00:37 +01:00
|
|
|
call_if_unset FLAG_DEFEATED_RAYQUAZA, SkyPillar_Top_EventScript_ShowRayquaza
|
2017-11-10 02:21:31 +01:00
|
|
|
return
|
|
|
|
|
2021-07-20 21:18:31 +02:00
|
|
|
SkyPillar_Top_EventScript_ShowRayquaza::
|
2021-04-06 08:38:15 +02:00
|
|
|
clearflag FLAG_HIDE_SKY_PILLAR_TOP_RAYQUAZA_STILL
|
2017-11-10 02:21:31 +01:00
|
|
|
return
|
|
|
|
|
2021-07-20 21:18:31 +02:00
|
|
|
SkyPillar_Top_OnWarp:
|
2019-10-31 22:00:37 +01:00
|
|
|
map_script_2 VAR_SKY_PILLAR_STATE, 0, SkyPillar_Top_EventScript_RayquazaFaceDown
|
2017-11-10 02:21:31 +01:00
|
|
|
.2byte 0
|
|
|
|
|
2021-07-20 21:18:31 +02:00
|
|
|
SkyPillar_Top_EventScript_RayquazaFaceDown::
|
2020-06-21 07:56:57 +02:00
|
|
|
turnobject LOCALID_RAYQUAZA_SLEEPING, DIR_SOUTH
|
2017-11-10 02:21:31 +01:00
|
|
|
end
|
|
|
|
|
2021-07-20 21:18:31 +02:00
|
|
|
SkyPillar_Top_EventScript_Rayquaza::
|
2017-11-10 02:21:31 +01:00
|
|
|
lockall
|
|
|
|
waitse
|
2021-11-07 18:58:11 +01:00
|
|
|
playmoncry SPECIES_RAYQUAZA, CRY_MODE_ENCOUNTER
|
2017-11-10 02:21:31 +01:00
|
|
|
delay 40
|
|
|
|
waitmoncry
|
|
|
|
setwildbattle SPECIES_RAYQUAZA, 70, ITEM_NONE
|
|
|
|
setflag FLAG_SYS_CTRL_OBJ_DELETE
|
2017-11-28 23:02:09 +01:00
|
|
|
special BattleSetup_StartLegendaryBattle
|
2017-11-10 02:21:31 +01:00
|
|
|
waitstate
|
|
|
|
clearflag FLAG_SYS_CTRL_OBJ_DELETE
|
2018-08-08 10:37:12 +02:00
|
|
|
specialvar VAR_RESULT, GetBattleOutcome
|
2021-11-19 05:06:30 +01:00
|
|
|
goto_if_eq VAR_RESULT, B_OUTCOME_WON, SkyPillar_Top_EventScript_DefeatedRayquaza
|
|
|
|
goto_if_eq VAR_RESULT, B_OUTCOME_RAN, SkyPillar_Top_EventScript_RanFromRayquaza
|
|
|
|
goto_if_eq VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED, SkyPillar_Top_EventScript_RanFromRayquaza
|
2019-01-02 22:12:43 +01:00
|
|
|
setflag FLAG_DEFEATED_RAYQUAZA
|
2017-11-10 02:21:31 +01:00
|
|
|
releaseall
|
|
|
|
end
|
|
|
|
|
2021-07-20 21:18:31 +02:00
|
|
|
SkyPillar_Top_EventScript_DefeatedRayquaza::
|
2019-01-02 22:12:43 +01:00
|
|
|
setflag FLAG_DEFEATED_RAYQUAZA
|
2019-10-31 22:00:37 +01:00
|
|
|
goto SkyPillar_Top_EventScript_DefeatedRayquaza2
|
2017-11-10 02:21:31 +01:00
|
|
|
end
|
|
|
|
|
2021-07-20 21:18:31 +02:00
|
|
|
SkyPillar_Top_EventScript_RanFromRayquaza::
|
2019-09-16 05:47:07 +02:00
|
|
|
setvar VAR_0x8004, SPECIES_RAYQUAZA
|
2019-10-31 22:00:37 +01:00
|
|
|
goto SkyPillar_Top_EventScript_RanFromRayquaza2
|
2017-11-10 02:21:31 +01:00
|
|
|
end
|
|
|
|
|
2021-07-20 21:18:31 +02:00
|
|
|
SkyPillar_Top_EventScript_DefeatedRayquaza2::
|
2019-12-15 17:42:50 +01:00
|
|
|
fadescreenswapbuffers FADE_TO_BLACK
|
2017-11-10 02:21:31 +01:00
|
|
|
removeobject VAR_LAST_TALKED
|
2019-12-15 17:42:50 +01:00
|
|
|
fadescreenswapbuffers FADE_FROM_BLACK
|
2017-11-10 02:21:31 +01:00
|
|
|
releaseall
|
|
|
|
end
|
|
|
|
|
2021-07-20 21:18:31 +02:00
|
|
|
SkyPillar_Top_EventScript_RanFromRayquaza2::
|
2019-12-15 17:42:50 +01:00
|
|
|
fadescreenswapbuffers FADE_TO_BLACK
|
2017-11-10 02:21:31 +01:00
|
|
|
removeobject VAR_LAST_TALKED
|
2019-12-15 17:42:50 +01:00
|
|
|
fadescreenswapbuffers FADE_FROM_BLACK
|
2021-11-18 04:00:44 +01:00
|
|
|
bufferspeciesname STR_VAR_1, VAR_0x8004
|
2019-03-22 03:10:56 +01:00
|
|
|
msgbox gText_LegendaryFlewAway, MSGBOX_DEFAULT
|
2017-11-10 02:21:31 +01:00
|
|
|
releaseall
|
|
|
|
end
|
|
|
|
|
2021-07-20 21:18:31 +02:00
|
|
|
SkyPillar_Top_EventScript_AwakenRayquaza::
|
2017-11-10 02:21:31 +01:00
|
|
|
lockall
|
|
|
|
fadeoutbgm 1
|
2019-11-21 05:12:51 +01:00
|
|
|
applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_FaceUp
|
2017-11-10 02:21:31 +01:00
|
|
|
waitmovement 0
|
2018-12-19 20:08:01 +01:00
|
|
|
special SpawnCameraObject
|
2019-11-21 05:12:51 +01:00
|
|
|
applymovement OBJ_EVENT_ID_CAMERA, SkyPillar_Top_Movement_CameraPanUp
|
2017-11-10 02:21:31 +01:00
|
|
|
waitmovement 0
|
2018-12-19 20:08:01 +01:00
|
|
|
special RemoveCameraObject
|
2020-06-21 07:56:57 +02:00
|
|
|
applymovement LOCALID_RAYQUAZA_SLEEPING, SkyPillar_Top_Movement_RayquazaStir
|
2017-11-10 02:21:31 +01:00
|
|
|
waitmovement 0
|
|
|
|
waitse
|
2021-11-07 18:58:11 +01:00
|
|
|
playmoncry SPECIES_RAYQUAZA, CRY_MODE_ENCOUNTER
|
2019-09-30 07:42:52 +02:00
|
|
|
setvar VAR_0x8004, 1 @ vertical pan
|
|
|
|
setvar VAR_0x8005, 1 @ horizontal pan
|
|
|
|
setvar VAR_0x8006, 8 @ num shakes
|
|
|
|
setvar VAR_0x8007, 3 @ shake delay
|
|
|
|
special ShakeCamera
|
2017-11-10 02:21:31 +01:00
|
|
|
waitstate
|
|
|
|
waitse
|
2021-11-07 18:58:11 +01:00
|
|
|
playmoncry SPECIES_RAYQUAZA, CRY_MODE_ENCOUNTER
|
2019-09-30 07:42:52 +02:00
|
|
|
setvar VAR_0x8004, 1 @ vertical pan
|
|
|
|
setvar VAR_0x8005, 2 @ horizontal pan
|
|
|
|
setvar VAR_0x8006, 8 @ num shakes
|
|
|
|
setvar VAR_0x8007, 5 @ shake delay
|
|
|
|
special ShakeCamera
|
2017-11-10 02:21:31 +01:00
|
|
|
waitstate
|
|
|
|
waitmoncry
|
2020-06-21 07:56:57 +02:00
|
|
|
applymovement LOCALID_RAYQUAZA_SLEEPING, SkyPillar_Top_Movement_RayquazaFlyOff
|
2017-11-10 02:21:31 +01:00
|
|
|
waitmovement 0
|
2020-06-21 07:56:57 +02:00
|
|
|
removeobject LOCALID_RAYQUAZA_SLEEPING
|
2019-10-31 22:00:37 +01:00
|
|
|
msgbox SkyPillar_Top_Text_RayquazaFlewOff, MSGBOX_DEFAULT
|
2017-11-10 02:21:31 +01:00
|
|
|
closemessage
|
|
|
|
delay 20
|
|
|
|
fadeinbgm 1
|
2018-12-19 20:08:01 +01:00
|
|
|
special SpawnCameraObject
|
2019-11-21 05:12:51 +01:00
|
|
|
applymovement OBJ_EVENT_ID_CAMERA, SkyPillar_Top_Movement_CameraPanDown
|
2017-11-10 02:21:31 +01:00
|
|
|
waitmovement 0
|
2018-12-19 20:08:01 +01:00
|
|
|
special RemoveCameraObject
|
2019-08-05 17:23:45 +02:00
|
|
|
setvar VAR_SOOTOPOLIS_CITY_STATE, 5
|
2019-02-28 02:25:09 +01:00
|
|
|
setvar VAR_SKY_PILLAR_STATE, 1
|
2019-02-28 05:54:51 +01:00
|
|
|
setvar VAR_SKY_PILLAR_RAQUAZA_CRY_DONE, 1
|
2017-11-10 02:21:31 +01:00
|
|
|
releaseall
|
|
|
|
end
|
|
|
|
|
2021-04-06 08:38:15 +02:00
|
|
|
@ Rayquaza has unusual movement frames
|
|
|
|
@ See comments, or sAnimTable_Rayquaza
|
2021-07-20 21:18:31 +02:00
|
|
|
SkyPillar_Top_Movement_RayquazaStir:
|
2018-06-14 01:19:19 +02:00
|
|
|
delay_16
|
2021-04-06 08:38:15 +02:00
|
|
|
walk_in_place_fast_left @ Coiled, awake
|
2018-06-14 01:19:19 +02:00
|
|
|
delay_16
|
|
|
|
delay_16
|
|
|
|
delay_16
|
|
|
|
delay_16
|
|
|
|
delay_16
|
2021-04-06 08:38:15 +02:00
|
|
|
walk_in_place_left @ Coiled, mouth open
|
2018-06-14 01:19:19 +02:00
|
|
|
delay_16
|
2021-04-06 08:38:15 +02:00
|
|
|
walk_in_place_right @ Normal, awake
|
2018-06-14 01:19:19 +02:00
|
|
|
delay_16
|
|
|
|
delay_16
|
|
|
|
delay_16
|
|
|
|
delay_16
|
|
|
|
delay_16
|
|
|
|
delay_16
|
2017-11-10 02:21:31 +01:00
|
|
|
step_end
|
|
|
|
|
2021-07-20 21:18:31 +02:00
|
|
|
SkyPillar_Top_Movement_RayquazaFlyOff:
|
2018-06-14 01:19:19 +02:00
|
|
|
delay_16
|
2021-04-06 08:38:15 +02:00
|
|
|
walk_in_place_down @ Coiled, asleep
|
2018-06-14 01:19:19 +02:00
|
|
|
delay_8
|
2021-04-06 08:38:15 +02:00
|
|
|
walk_in_place_right @ Normal, awake
|
2018-06-14 01:19:19 +02:00
|
|
|
delay_8
|
2021-11-04 19:22:28 +01:00
|
|
|
walk_faster_up @ Fly up
|
2018-06-14 01:19:19 +02:00
|
|
|
slide_up
|
|
|
|
slide_up
|
|
|
|
slide_up
|
|
|
|
slide_up
|
|
|
|
slide_up
|
|
|
|
slide_up
|
2017-11-10 02:21:31 +01:00
|
|
|
step_end
|
|
|
|
|
2021-07-20 21:18:31 +02:00
|
|
|
SkyPillar_Top_Movement_CameraPanUp:
|
2018-06-14 01:19:19 +02:00
|
|
|
walk_slow_up
|
|
|
|
walk_slow_up
|
|
|
|
walk_slow_up
|
2017-11-10 02:21:31 +01:00
|
|
|
step_end
|
|
|
|
|
2021-07-20 21:18:31 +02:00
|
|
|
SkyPillar_Top_Movement_CameraPanDown:
|
2018-06-14 01:19:19 +02:00
|
|
|
walk_slow_down
|
|
|
|
walk_slow_down
|
|
|
|
walk_slow_down
|
2017-11-10 02:21:31 +01:00
|
|
|
step_end
|
|
|
|
|
2021-07-20 21:18:31 +02:00
|
|
|
SkyPillar_Top_Text_RayquazaFlewOff:
|
2017-11-10 02:21:31 +01:00
|
|
|
.string "The awakened RAYQUAZA flew off…$"
|
|
|
|
|