sovereignx/data/maps/MarineCave_End/scripts.inc

75 lines
2 KiB
PHP
Raw Normal View History

.set LOCALID_KYOGRE, 1
2021-07-20 20:18:31 +01:00
MarineCave_End_MapScripts::
2019-10-31 21:00:37 +00:00
map_script MAP_SCRIPT_ON_RESUME, MarineCave_End_OnResume
map_script MAP_SCRIPT_ON_TRANSITION, MarineCave_End_OnTransition
2017-11-10 01:21:31 +00:00
.byte 0
2021-07-20 20:18:31 +01:00
MarineCave_End_OnResume:
2019-10-31 21:00:37 +00:00
call_if_set FLAG_SYS_CTRL_OBJ_DELETE, MarineCave_End_EventScript_TryRemoveKyogre
2017-11-10 01:21:31 +00:00
end
2021-07-20 20:18:31 +01:00
MarineCave_End_EventScript_TryRemoveKyogre::
specialvar VAR_RESULT, GetBattleOutcome
goto_if_ne VAR_RESULT, B_OUTCOME_CAUGHT, Common_EventScript_NopReturn
removeobject LOCALID_KYOGRE
2017-11-10 01:21:31 +00:00
return
2021-07-20 20:18:31 +01:00
MarineCave_End_OnTransition:
2019-10-31 21:00:37 +00:00
call_if_unset FLAG_DEFEATED_KYOGRE, MarineCave_End_EventScript_ShowKyogre
2017-11-10 01:21:31 +00:00
end
2021-07-20 20:18:31 +01:00
MarineCave_End_EventScript_ShowKyogre::
2018-10-18 20:28:59 +01:00
clearflag FLAG_HIDE_MARINE_CAVE_KYOGRE
2018-05-19 17:02:43 +01:00
setvar VAR_TEMP_1, 1
2017-11-10 01:21:31 +00:00
return
2021-07-20 20:18:31 +01:00
MarineCave_End_EventScript_Kyogre::
2017-11-10 01:21:31 +00:00
lockall
applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_FaceUp
2017-11-10 01:21:31 +00:00
waitmovement 0
applymovement LOCALID_KYOGRE, MarineCave_End_Movement_KyogreApproach
2017-11-10 01:21:31 +00:00
waitmovement 0
waitse
2021-11-07 17:58:11 +00:00
playmoncry SPECIES_KYOGRE, CRY_MODE_ENCOUNTER
2017-11-10 01:21:31 +00:00
delay 40
waitmoncry
setvar VAR_LAST_TALKED, LOCALID_KYOGRE
setwildbattle SPECIES_KYOGRE, 70
2017-11-10 01:21:31 +00:00
setflag FLAG_SYS_CTRL_OBJ_DELETE
2017-11-28 22:02:09 +00:00
special BattleSetup_StartLegendaryBattle
2017-11-10 01:21:31 +00:00
waitstate
clearflag FLAG_SYS_CTRL_OBJ_DELETE
2018-05-19 17:02:43 +01:00
setvar VAR_TEMP_1, 0
specialvar VAR_RESULT, GetBattleOutcome
goto_if_eq VAR_RESULT, B_OUTCOME_WON, MarineCave_End_EventScript_DefeatedKyogre
goto_if_eq VAR_RESULT, B_OUTCOME_RAN, MarineCave_End_EventScript_RanFromKyogre
goto_if_eq VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED, MarineCave_End_EventScript_RanFromKyogre
2019-12-02 00:19:47 +00:00
setvar VAR_SHOULD_END_ABNORMAL_WEATHER, 1
2019-01-02 21:12:43 +00:00
setflag FLAG_DEFEATED_KYOGRE
2017-11-10 01:21:31 +00:00
releaseall
end
2021-07-20 20:18:31 +01:00
MarineCave_End_EventScript_DefeatedKyogre::
2019-12-02 00:19:47 +00:00
setvar VAR_SHOULD_END_ABNORMAL_WEATHER, 1
2019-01-02 21:12:43 +00:00
setflag FLAG_DEFEATED_KYOGRE
2019-08-15 04:38:42 +01:00
goto Common_EventScript_RemoveStaticPokemon
2017-11-10 01:21:31 +00:00
end
2021-07-20 20:18:31 +01:00
MarineCave_End_EventScript_RanFromKyogre::
2019-08-15 04:38:42 +01:00
setvar VAR_0x8004, SPECIES_KYOGRE
goto Common_EventScript_LegendaryFlewAway
2017-11-10 01:21:31 +00:00
end
2021-07-20 20:18:31 +01:00
MarineCave_End_Movement_KyogreApproach:
init_affine_anim
walk_down_start_affine
delay_16
delay_16
walk_down_affine
delay_16
delay_16
walk_down_affine
2017-11-10 01:21:31 +00:00
step_end