pokeemerald/data/maps/NavelRock_Top/scripts.inc

118 lines
2.9 KiB
PHP
Raw Normal View History

.set LOCALID_HO_OH, 1
2021-07-20 21:18:31 +02:00
NavelRock_Top_MapScripts::
map_script MAP_SCRIPT_ON_TRANSITION, NavelRock_Top_OnTransition
2019-10-31 22:00:37 +01:00
map_script MAP_SCRIPT_ON_RESUME, NavelRock_Top_OnResume
2017-11-10 02:21:31 +01:00
.byte 0
2021-07-20 21:18:31 +02:00
NavelRock_Top_OnTransition:
2019-10-31 22:00:37 +01:00
call_if_set FLAG_CAUGHT_HO_OH, NavelRock_Top_EventScript_HideHoOh
call_if_unset FLAG_CAUGHT_HO_OH, NavelRock_Top_EventScript_TryShowHoOh
2017-11-10 02:21:31 +01:00
end
2021-07-20 21:18:31 +02:00
NavelRock_Top_EventScript_HideHoOh::
2018-05-19 18:02:43 +02:00
setvar VAR_TEMP_1, 1
2019-01-02 22:12:43 +01:00
setflag FLAG_HIDE_HO_OH
2017-11-10 02:21:31 +01:00
return
2021-07-20 21:18:31 +02:00
NavelRock_Top_EventScript_TryShowHoOh::
2018-05-19 18:02:43 +02:00
setvar VAR_TEMP_1, 1
2019-02-23 02:21:26 +01:00
goto_if_set FLAG_DEFEATED_HO_OH, Common_EventScript_NopReturn
2018-05-19 18:02:43 +02:00
setvar VAR_TEMP_1, 0
2019-01-02 22:12:43 +01:00
clearflag FLAG_HIDE_HO_OH
2017-11-10 02:21:31 +01:00
return
2021-07-20 21:18:31 +02:00
NavelRock_Top_OnResume:
2019-10-31 22:00:37 +01:00
call_if_set FLAG_SYS_CTRL_OBJ_DELETE, NavelRock_Top_EventScript_TryRemoveHoOh
2017-11-10 02:21:31 +01:00
end
2021-07-20 21:18:31 +02:00
NavelRock_Top_EventScript_TryRemoveHoOh::
specialvar VAR_RESULT, GetBattleOutcome
goto_if_ne VAR_RESULT, B_OUTCOME_CAUGHT, Common_EventScript_NopReturn
removeobject LOCALID_HO_OH
2017-11-10 02:21:31 +01:00
return
2021-07-20 21:18:31 +02:00
NavelRock_Top_EventScript_HoOh::
2017-11-10 02:21:31 +01:00
lockall
2018-05-19 18:02:43 +02:00
setvar VAR_TEMP_1, 1
special SpawnCameraObject
2019-09-30 07:42:52 +02:00
setvar VAR_0x8004, 3 @ num loops
setvar VAR_0x8005, 35 @ delay
special LoopWingFlapSE
applymovement LOCALID_HO_OH, NavelRock_Top_Movement_HoOhAppear
applymovement OBJ_EVENT_ID_CAMERA, NavelRock_Top_Movement_CameraPanUp
2017-11-10 02:21:31 +01:00
waitmovement 0
delay 50
2018-12-24 22:23:58 +01:00
setweather WEATHER_NONE
2017-11-10 02:21:31 +01:00
doweather
waitse
2021-11-07 18:58:11 +01:00
playmoncry SPECIES_HO_OH, CRY_MODE_ENCOUNTER
2017-11-10 02:21:31 +01:00
delay 30
waitmoncry
delay 60
2019-09-30 07:42:52 +02:00
setvar VAR_0x8004, 3 @ num loops
setvar VAR_0x8005, 35 @ delay
special LoopWingFlapSE
applymovement OBJ_EVENT_ID_CAMERA, NavelRock_Top_Movement_CameraPanDown
applymovement LOCALID_HO_OH, NavelRock_Top_Movement_HoOhApproach
2017-11-10 02:21:31 +01:00
waitmovement 0
special RemoveCameraObject
seteventmon SPECIES_HO_OH, 70
2017-11-10 02:21:31 +01:00
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
setvar VAR_LAST_TALKED, LOCALID_HO_OH
specialvar VAR_RESULT, GetBattleOutcome
goto_if_eq VAR_RESULT, B_OUTCOME_WON, NavelRock_Top_EventScript_DefeatedHoOh
goto_if_eq VAR_RESULT, B_OUTCOME_RAN, NavelRock_Top_EventScript_RanFromHoOh
goto_if_eq VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED, NavelRock_Top_EventScript_RanFromHoOh
2019-01-02 22:12:43 +01:00
setflag FLAG_CAUGHT_HO_OH
2017-11-10 02:21:31 +01:00
releaseall
end
2021-07-20 21:18:31 +02:00
NavelRock_Top_EventScript_DefeatedHoOh::
2019-01-02 22:12:43 +01:00
setflag FLAG_DEFEATED_HO_OH
2019-08-15 05:38:42 +02:00
setvar VAR_0x8004, SPECIES_HO_OH
goto Common_EventScript_LegendaryFlewAway
2017-11-10 02:21:31 +01:00
end
2021-07-20 21:18:31 +02:00
NavelRock_Top_EventScript_RanFromHoOh::
2019-08-15 05:38:42 +02:00
setvar VAR_0x8004, SPECIES_HO_OH
goto Common_EventScript_LegendaryFlewAway
2017-11-10 02:21:31 +01:00
end
2021-07-20 21:18:31 +02:00
NavelRock_Top_Movement_CameraPanUp:
walk_up
walk_up
walk_up
2017-11-10 02:21:31 +01:00
step_end
2021-07-20 21:18:31 +02:00
NavelRock_Top_Movement_CameraPanDown:
delay_16
delay_16
walk_down
walk_down
walk_down
2017-11-10 02:21:31 +01:00
step_end
2021-07-20 21:18:31 +02:00
NavelRock_Top_Movement_HoOhApproach:
walk_down
walk_down
walk_down
walk_down
walk_down
walk_in_place_down
delay_16
delay_16
2017-11-10 02:21:31 +01:00
step_end
2021-07-20 21:18:31 +02:00
NavelRock_Top_Movement_HoOhAppear:
delay_16
delay_16
walk_in_place_down
walk_in_place_down
walk_in_place_down
walk_in_place_down
2017-11-10 02:21:31 +01:00
step_end