pokeemerald/data/maps/SouthernIsland_Interior/scripts.inc

164 lines
4.7 KiB
PHP
Raw Normal View History

.set LOCALID_LATI, 2
2017-11-10 02:21:31 +01:00
SouthernIsland_Interior_MapScripts:: @ 8242A45
2019-10-31 22:00:37 +01:00
map_script MAP_SCRIPT_ON_RESUME, SouthernIsland_Interior_OnResume
map_script MAP_SCRIPT_ON_TRANSITION, SouthernIsland_Interior_OnTransition
2017-11-10 02:21:31 +01:00
.byte 0
2019-10-31 22:00:37 +01:00
SouthernIsland_Interior_OnResume: @ 8242A50
call_if_set FLAG_SYS_CTRL_OBJ_DELETE, SouthernIsland_Interior_EventScript_TryRemoveLati
2017-11-10 02:21:31 +01:00
end
2019-10-31 22:00:37 +01:00
SouthernIsland_Interior_EventScript_TryRemoveLati:: @ 8242A5A
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_LATI
2017-11-10 02:21:31 +01:00
return
SouthernIsland_Interior_OnTransition: @ 8242A6E
compare VAR_ROAMER_POKEMON, 0
2019-10-31 22:00:37 +01:00
call_if_eq SouthernIsland_Interior_EventScript_SetUpLatios
compare VAR_ROAMER_POKEMON, 0
2019-10-31 22:00:37 +01:00
call_if_ne SouthernIsland_Interior_EventScript_SetUpLatias
call SouthernIsland_Interior_EventScript_SetUpPlayerGfx
2017-11-10 02:21:31 +01:00
end
2019-10-31 22:00:37 +01:00
SouthernIsland_Interior_EventScript_SetUpLatios:: @ 8242A8A
setvar VAR_OBJ_GFX_ID_1, OBJ_EVENT_GFX_LATIOS
2019-08-15 05:38:42 +02:00
setvar VAR_TEMP_4, SPECIES_LATIOS
2017-11-10 02:21:31 +01:00
return
2019-10-31 22:00:37 +01:00
SouthernIsland_Interior_EventScript_SetUpLatias:: @ 8242A95
setvar VAR_OBJ_GFX_ID_1, OBJ_EVENT_GFX_LATIAS
2019-08-15 05:38:42 +02:00
setvar VAR_TEMP_4, SPECIES_LATIAS
2017-11-10 02:21:31 +01:00
return
2019-10-31 22:00:37 +01:00
SouthernIsland_Interior_EventScript_SetUpPlayerGfx:: @ 8242AA0
2017-11-10 02:21:31 +01:00
checkplayergender
compare VAR_RESULT, MALE
2019-10-31 22:00:37 +01:00
goto_if_eq SouthernIsland_Interior_EventScript_SetBrendanGfx
compare VAR_RESULT, FEMALE
2019-10-31 22:00:37 +01:00
goto_if_eq SouthernIsland_Interior_EventScript_SetMayGfx
2017-11-10 02:21:31 +01:00
end
2019-10-31 22:00:37 +01:00
SouthernIsland_Interior_EventScript_SetBrendanGfx:: @ 8242AB8
setvar VAR_OBJ_GFX_ID_0, OBJ_EVENT_GFX_RIVAL_BRENDAN_NORMAL
2017-11-10 02:21:31 +01:00
return
2019-10-31 22:00:37 +01:00
SouthernIsland_Interior_EventScript_SetMayGfx:: @ 8242ABE
setvar VAR_OBJ_GFX_ID_0, OBJ_EVENT_GFX_RIVAL_MAY_NORMAL
2017-11-10 02:21:31 +01:00
return
2019-10-31 22:00:37 +01:00
SouthernIsland_Interior_EventScript_TryLatiEncounter:: @ 8242AC4
2017-11-10 02:21:31 +01:00
lockall
setvar VAR_0x8008, 12
2019-10-31 22:00:37 +01:00
goto SouthernIsland_Interior_EventScript_Lati
2017-11-10 02:21:31 +01:00
end
2019-10-31 22:00:37 +01:00
SouthernIsland_Interior_EventScript_Lati:: @ 8242AD0
goto_if_set FLAG_TEMP_2, SouthernIsland_Interior_EventScript_Sign
goto_if_set FLAG_DEFEATED_LATIAS_OR_LATIOS, SouthernIsland_Interior_EventScript_Sign
goto_if_set FLAG_CAUGHT_LATIAS_OR_LATIOS, SouthernIsland_Interior_EventScript_Sign
2020-03-03 07:36:20 +01:00
goto_if_unset FLAG_ENABLE_SHIP_SOUTHERN_ISLAND, SouthernIsland_Interior_EventScript_Sign
2019-01-02 22:12:43 +01:00
setflag FLAG_ENCOUNTERED_LATIAS_OR_LATIOS
2018-10-17 18:25:12 +02:00
setflag FLAG_TEMP_2
special SpawnCameraObject
applymovement OBJ_EVENT_ID_CAMERA, SouthernIsland_Interior_Movement_CameraPanUp
2017-11-10 02:21:31 +01:00
waitmovement 0
delay 50
waitse
2018-05-19 18:02:43 +02:00
playmoncry VAR_TEMP_4, 0
2017-11-10 02:21:31 +01:00
delay 30
waitmoncry
addobject LOCALID_LATI
2017-11-10 02:21:31 +01:00
delay 30
applymovement OBJ_EVENT_ID_CAMERA, SouthernIsland_Interior_Movement_CameraPanDown
applymovement LOCALID_LATI, SouthernIsland_Interior_Movement_LatiApproach
2017-11-10 02:21:31 +01:00
waitmovement 0
delay 50
special RemoveCameraObject
setvar VAR_LAST_TALKED, LOCALID_LATI
compare VAR_ROAMER_POKEMON, 0
2019-10-31 22:00:37 +01:00
call_if_eq SouthernIsland_Interior_EventScript_SetLatiosBattleVars
compare VAR_ROAMER_POKEMON, 0
2019-10-31 22:00:37 +01:00
call_if_ne SouthernIsland_Interior_EventScript_SetLatiasBattleVars
2017-11-10 02:21:31 +01:00
setflag FLAG_SYS_CTRL_OBJ_DELETE
2017-11-28 23:02:09 +01:00
special BattleSetup_StartLatiBattle
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 SouthernIsland_Interior_EventScript_LatiDefeated
compare VAR_RESULT, B_OUTCOME_RAN
2019-10-31 22:00:37 +01:00
goto_if_eq SouthernIsland_Interior_EventScript_RanFromLati
compare VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED
2019-10-31 22:00:37 +01:00
goto_if_eq SouthernIsland_Interior_EventScript_RanFromLati
2019-01-02 22:12:43 +01:00
setflag FLAG_CAUGHT_LATIAS_OR_LATIOS
2017-11-10 02:21:31 +01:00
releaseall
end
2019-10-31 22:00:37 +01:00
SouthernIsland_Interior_EventScript_LatiDefeated:: @ 8242B81
2019-01-02 22:12:43 +01:00
setflag FLAG_DEFEATED_LATIAS_OR_LATIOS
2018-05-19 18:02:43 +02:00
copyvar VAR_0x8004, VAR_TEMP_4
2019-08-15 05:38:42 +02:00
goto Common_EventScript_LegendaryFlewAway
2017-11-10 02:21:31 +01:00
end
2019-10-31 22:00:37 +01:00
SouthernIsland_Interior_EventScript_RanFromLati:: @ 8242B8F
2018-05-19 18:02:43 +02:00
copyvar VAR_0x8004, VAR_TEMP_4
2019-08-15 05:38:42 +02:00
goto Common_EventScript_LegendaryFlewAway
2017-11-10 02:21:31 +01:00
end
2019-10-31 22:00:37 +01:00
SouthernIsland_Interior_EventScript_Sign:: @ 8242B9A
msgbox SouthernIsland_Interior_Text_Sign, MSGBOX_DEFAULT
2017-11-10 02:21:31 +01:00
releaseall
end
2019-10-31 22:00:37 +01:00
SouthernIsland_Interior_EventScript_SetLatiosBattleVars:: @ 8242BA4
2019-08-15 05:38:42 +02:00
setvar VAR_0x8004, SPECIES_LATIOS
2019-10-31 22:00:37 +01:00
setvar VAR_0x8005, 50 @ level
2019-08-15 05:38:42 +02:00
setvar VAR_0x8006, ITEM_SOUL_DEW
special CreateEventLegalEnemyMon
2017-11-10 02:21:31 +01:00
return
2019-10-31 22:00:37 +01:00
SouthernIsland_Interior_EventScript_SetLatiasBattleVars:: @ 8242BB7
2019-08-15 05:38:42 +02:00
setvar VAR_0x8004, SPECIES_LATIAS
2019-10-31 22:00:37 +01:00
setvar VAR_0x8005, 50 @ level
2019-08-15 05:38:42 +02:00
setvar VAR_0x8006, ITEM_SOUL_DEW
special CreateEventLegalEnemyMon
2017-11-10 02:21:31 +01:00
return
2019-10-31 22:00:37 +01:00
SouthernIsland_Interior_Movement_CameraPanUp: @ 8242BCA
walk_up
walk_up
walk_up
2017-11-10 02:21:31 +01:00
step_end
2019-10-31 22:00:37 +01:00
SouthernIsland_Interior_Movement_CameraPanDown: @ 8242BCE
delay_16
delay_16
delay_16
delay_16
delay_16
delay_16
delay_16
walk_down
walk_down
walk_down
walk_in_place_fastest_up
2017-11-10 02:21:31 +01:00
step_end
2019-10-31 22:00:37 +01:00
SouthernIsland_Interior_Movement_LatiApproach: @ 8242BDA
walk_down
walk_down
walk_down
walk_down
walk_down
delay_16
delay_16
walk_down
walk_down
walk_down
walk_down
2017-11-10 02:21:31 +01:00
step_end