pokeemerald/data/maps/NavelRock_Bottom/scripts.inc

86 lines
2.3 KiB
PHP
Raw Normal View History

.set LOCALID_LUGIA, 1
2021-07-20 21:18:31 +02:00
NavelRock_Bottom_MapScripts::
map_script MAP_SCRIPT_ON_TRANSITION, NavelRock_Bottom_OnTransition
2019-10-31 22:00:37 +01:00
map_script MAP_SCRIPT_ON_RESUME, NavelRock_Bottom_OnResume
2017-11-10 02:21:31 +01:00
.byte 0
2021-07-20 21:18:31 +02:00
NavelRock_Bottom_OnTransition:
2019-10-31 22:00:37 +01:00
call_if_set FLAG_CAUGHT_LUGIA, NavelRock_Bottom_EventScript_HideLugia
call_if_unset FLAG_CAUGHT_LUGIA, NavelRock_Bottom_EventScript_TryShowLugia
2017-11-10 02:21:31 +01:00
end
2021-07-20 21:18:31 +02:00
NavelRock_Bottom_EventScript_HideLugia::
2018-10-18 21:28:59 +02:00
setflag FLAG_HIDE_LUGIA
2017-11-10 02:21:31 +01:00
return
2021-07-20 21:18:31 +02:00
NavelRock_Bottom_EventScript_TryShowLugia::
2019-02-23 02:21:26 +01:00
goto_if_set FLAG_DEFEATED_LUGIA, Common_EventScript_NopReturn
2018-10-18 21:28:59 +02:00
clearflag FLAG_HIDE_LUGIA
2017-11-10 02:21:31 +01:00
return
2021-07-20 21:18:31 +02:00
NavelRock_Bottom_OnResume:
2019-10-31 22:00:37 +01:00
call_if_set FLAG_SYS_CTRL_OBJ_DELETE, NavelRock_Bottom_EventScript_TryRemoveLugia
2017-11-10 02:21:31 +01:00
end
2021-07-20 21:18:31 +02:00
NavelRock_Bottom_EventScript_TryRemoveLugia::
specialvar VAR_RESULT, GetBattleOutcome
compare VAR_RESULT, B_OUTCOME_CAUGHT
2019-02-23 02:21:26 +01:00
goto_if_ne Common_EventScript_NopReturn
removeobject LOCALID_LUGIA
2017-11-10 02:21:31 +01:00
return
2021-07-20 21:18:31 +02:00
NavelRock_Bottom_EventScript_Lugia::
2017-11-10 02:21:31 +01:00
lock
faceplayer
waitse
delay 20
2020-08-21 00:02:00 +02:00
playse SE_THUNDERSTORM_STOP
2019-09-30 07:42:52 +02:00
setvar VAR_0x8004, 0 @ vertical pan
setvar VAR_0x8005, 3 @ horizontal pan
setvar VAR_0x8006, 4 @ num shakes
setvar VAR_0x8007, 2 @ shake delay
special ShakeCamera
2017-11-10 02:21:31 +01:00
delay 30
2020-08-21 00:02:00 +02:00
playse SE_THUNDERSTORM_STOP
2019-09-30 07:42:52 +02:00
setvar VAR_0x8004, 0 @ vertical pan
setvar VAR_0x8005, 3 @ horizontal pan
setvar VAR_0x8006, 4 @ num shakes
setvar VAR_0x8007, 2 @ shake delay
special ShakeCamera
2017-11-10 02:21:31 +01:00
delay 30
delay 50
waitse
2021-11-07 18:58:11 +01:00
playmoncry SPECIES_LUGIA, CRY_MODE_ENCOUNTER
2017-11-10 02:21:31 +01:00
waitmoncry
delay 20
2019-08-15 05:38:42 +02:00
setvar VAR_0x8004, SPECIES_LUGIA
2019-10-31 22:00:37 +01:00
setvar VAR_0x8005, 70 @ level
2019-08-15 05:38:42 +02:00
setvar VAR_0x8006, ITEM_NONE
special CreateEventLegalEnemyMon
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
specialvar VAR_RESULT, GetBattleOutcome
compare VAR_RESULT, B_OUTCOME_WON
2019-10-31 22:00:37 +01:00
goto_if_eq NavelRock_Bottom_EventScript_DefeatedLugia
compare VAR_RESULT, B_OUTCOME_RAN
2019-10-31 22:00:37 +01:00
goto_if_eq NavelRock_Bottom_EventScript_RanFromLugia
compare VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED
2019-10-31 22:00:37 +01:00
goto_if_eq NavelRock_Bottom_EventScript_RanFromLugia
2019-01-02 22:12:43 +01:00
setflag FLAG_CAUGHT_LUGIA
2017-11-10 02:21:31 +01:00
release
end
2021-07-20 21:18:31 +02:00
NavelRock_Bottom_EventScript_DefeatedLugia::
2019-01-02 22:12:43 +01:00
setflag FLAG_DEFEATED_LUGIA
2019-08-15 05:38:42 +02:00
setvar VAR_0x8004, SPECIES_LUGIA
goto Common_EventScript_LegendaryFlewAway
2017-11-10 02:21:31 +01:00
end
2021-07-20 21:18:31 +02:00
NavelRock_Bottom_EventScript_RanFromLugia::
2019-08-15 05:38:42 +02:00
setvar VAR_0x8004, SPECIES_LUGIA
goto Common_EventScript_LegendaryFlewAway
2017-11-10 02:21:31 +01:00
end