pokeemerald/data/maps/SkyPillar_Top/scripts.inc

188 lines
4.7 KiB
PHP
Raw Normal View History

2017-11-10 02:21:31 +01:00
SkyPillar_Top_MapScripts:: @ 82396B8
2019-10-31 22:00:37 +01:00
map_script MAP_SCRIPT_ON_RESUME, SkyPillar_Top_OnResume
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
2019-10-31 22:00:37 +01:00
SkyPillar_Top_OnResume: @ 82396C8
call_if_set FLAG_SYS_CTRL_OBJ_DELETE, SkyPillar_Top_EventScript_TryRemoveRayquaza
2017-11-10 02:21:31 +01:00
end
2019-10-31 22:00:37 +01:00
SkyPillar_Top_EventScript_TryRemoveRayquaza:: @ 82396D2
specialvar VAR_RESULT, GetBattleOutcome
compare VAR_RESULT, B_OUTCOME_CAUGHT
2019-02-23 02:21:26 +01:00
goto_if_ne Common_EventScript_NopReturn
2017-11-10 02:21:31 +01:00
removeobject VAR_LAST_TALKED
return
SkyPillar_Top_OnTransition: @ 82396E6
compare VAR_SKY_PILLAR_STATE, 2
2019-10-31 22:00:37 +01:00
call_if_lt SkyPillar_Top_EventScript_SetCleanLayout
compare VAR_SKY_PILLAR_STATE, 2
2019-10-31 22:00:37 +01:00
call_if_ge SkyPillar_Top_EventScript_TryShowRayquaza
2017-11-10 02:21:31 +01:00
end
2019-10-31 22:00:37 +01:00
SkyPillar_Top_EventScript_SetCleanLayout:: @ 82396FD
setmaplayoutindex LAYOUT_SKY_PILLAR_TOP_CLEAN
setobjectmovementtype 1, MOVEMENT_TYPE_FACE_DOWN
2017-11-10 02:21:31 +01:00
return
2019-10-31 22:00:37 +01:00
SkyPillar_Top_EventScript_TryShowRayquaza:: @ 8239705
call_if_unset FLAG_DEFEATED_RAYQUAZA, SkyPillar_Top_EventScript_ShowRayquaza
2017-11-10 02:21:31 +01:00
return
2019-10-31 22:00:37 +01:00
SkyPillar_Top_EventScript_ShowRayquaza:: @ 823970F
clearflag FLAG_HIDE_RAYQUAZA_SKY_TOWER_SUMMIT
2017-11-10 02:21:31 +01:00
return
2019-10-31 22:00:37 +01:00
SkyPillar_Top_OnWarp: @ 8239713
map_script_2 VAR_SKY_PILLAR_STATE, 0, SkyPillar_Top_EventScript_RayquazaFaceDown
2017-11-10 02:21:31 +01:00
.2byte 0
2019-10-31 22:00:37 +01:00
SkyPillar_Top_EventScript_RayquazaFaceDown:: @ 823971D
2019-09-16 05:47:07 +02:00
turnobject 1, DIR_SOUTH
2017-11-10 02:21:31 +01:00
end
2019-10-31 22:00:37 +01:00
SkyPillar_Top_EventScript_Rayquaza:: @ 8239722
2017-11-10 02:21:31 +01:00
lockall
waitse
playmoncry SPECIES_RAYQUAZA, 2
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
specialvar VAR_RESULT, GetBattleOutcome
compare VAR_RESULT, B_OUTCOME_WON
2019-10-31 22:00:37 +01:00
goto_if_eq SkyPillar_Top_EventScript_DefeatedRayquaza
compare VAR_RESULT, B_OUTCOME_RAN
2019-10-31 22:00:37 +01:00
goto_if_eq SkyPillar_Top_EventScript_RanFromRayquaza
compare VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED
2019-10-31 22:00:37 +01:00
goto_if_eq 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
2019-10-31 22:00:37 +01:00
SkyPillar_Top_EventScript_DefeatedRayquaza:: @ 8239768
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
2019-10-31 22:00:37 +01:00
SkyPillar_Top_EventScript_RanFromRayquaza:: @ 8239771
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
2019-10-31 22:00:37 +01:00
SkyPillar_Top_EventScript_DefeatedRayquaza2:: @ 823977C
2017-11-10 02:21:31 +01:00
fadescreenswapbuffers 1
removeobject VAR_LAST_TALKED
fadescreenswapbuffers 0
releaseall
end
2019-10-31 22:00:37 +01:00
SkyPillar_Top_EventScript_RanFromRayquaza2:: @ 8239785
2017-11-10 02:21:31 +01:00
fadescreenswapbuffers 1
removeobject VAR_LAST_TALKED
fadescreenswapbuffers 0
bufferspeciesname 0, VAR_0x8004
msgbox gText_LegendaryFlewAway, MSGBOX_DEFAULT
2017-11-10 02:21:31 +01:00
releaseall
end
2019-10-31 22:00:37 +01:00
SkyPillar_Top_EventScript_AwakenRayquaza:: @ 823979A
2017-11-10 02:21:31 +01:00
lockall
fadeoutbgm 1
applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_FaceUp
2017-11-10 02:21:31 +01:00
waitmovement 0
special SpawnCameraObject
2019-10-31 22:00:37 +01:00
applymovement EVENT_OBJ_ID_CAMERA, SkyPillar_Top_Movement_CameraPanUp
2017-11-10 02:21:31 +01:00
waitmovement 0
special RemoveCameraObject
2019-10-31 22:00:37 +01:00
applymovement 1, SkyPillar_Top_Movement_RayquazaStir
2017-11-10 02:21:31 +01:00
waitmovement 0
waitse
playmoncry SPECIES_RAYQUAZA, 2
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
playmoncry SPECIES_RAYQUAZA, 2
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
2019-10-31 22:00:37 +01:00
applymovement 1, SkyPillar_Top_Movement_RayquazaFlyOff
2017-11-10 02:21:31 +01:00
waitmovement 0
removeobject 1
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
special SpawnCameraObject
2019-10-31 22:00:37 +01:00
applymovement EVENT_OBJ_ID_CAMERA, SkyPillar_Top_Movement_CameraPanDown
2017-11-10 02:21:31 +01:00
waitmovement 0
special RemoveCameraObject
2019-08-05 17:23:45 +02:00
setvar VAR_SOOTOPOLIS_CITY_STATE, 5
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
2019-10-31 22:00:37 +01:00
SkyPillar_Top_Movement_RayquazaStir: @ 823983A
delay_16
walk_in_place_fast_left
delay_16
delay_16
delay_16
delay_16
delay_16
walk_in_place_left
delay_16
walk_in_place_right
delay_16
delay_16
delay_16
delay_16
delay_16
delay_16
2017-11-10 02:21:31 +01:00
step_end
2019-10-31 22:00:37 +01:00
SkyPillar_Top_Movement_RayquazaFlyOff: @ 823984B
delay_16
walk_in_place_down
delay_8
walk_in_place_right
delay_8
walk_fastest_up
slide_up
slide_up
slide_up
slide_up
slide_up
slide_up
2017-11-10 02:21:31 +01:00
step_end
2019-10-31 22:00:37 +01:00
SkyPillar_Top_Movement_CameraPanUp: @ 8239858
walk_slow_up
walk_slow_up
walk_slow_up
2017-11-10 02:21:31 +01:00
step_end
2019-10-31 22:00:37 +01:00
SkyPillar_Top_Movement_CameraPanDown: @ 823985C
walk_slow_down
walk_slow_down
walk_slow_down
2017-11-10 02:21:31 +01:00
step_end
2019-10-31 22:00:37 +01:00
SkyPillar_Top_Text_RayquazaFlewOff: @ 8239860
2017-11-10 02:21:31 +01:00
.string "The awakened RAYQUAZA flew off…$"