2020-06-21 07:56:57 +02:00
|
|
|
.set LOCALID_LATI, 2
|
|
|
|
|
2021-07-20 21:18:31 +02:00
|
|
|
SouthernIsland_Interior_MapScripts::
|
2019-10-31 22:00:37 +01:00
|
|
|
map_script MAP_SCRIPT_ON_RESUME, SouthernIsland_Interior_OnResume
|
2019-04-22 22:31:51 +02:00
|
|
|
map_script MAP_SCRIPT_ON_TRANSITION, SouthernIsland_Interior_OnTransition
|
2017-11-10 02:21:31 +01:00
|
|
|
.byte 0
|
|
|
|
|
2021-07-20 21:18:31 +02:00
|
|
|
SouthernIsland_Interior_OnResume:
|
2019-10-31 22:00:37 +01:00
|
|
|
call_if_set FLAG_SYS_CTRL_OBJ_DELETE, SouthernIsland_Interior_EventScript_TryRemoveLati
|
2017-11-10 02:21:31 +01:00
|
|
|
end
|
|
|
|
|
2021-07-20 21:18:31 +02:00
|
|
|
SouthernIsland_Interior_EventScript_TryRemoveLati::
|
2018-08-08 10:37:12 +02:00
|
|
|
specialvar VAR_RESULT, GetBattleOutcome
|
2021-11-19 05:06:30 +01:00
|
|
|
goto_if_ne VAR_RESULT, B_OUTCOME_CAUGHT, Common_EventScript_NopReturn
|
2020-06-21 07:56:57 +02:00
|
|
|
removeobject LOCALID_LATI
|
2017-11-10 02:21:31 +01:00
|
|
|
return
|
|
|
|
|
2021-07-20 21:18:31 +02:00
|
|
|
SouthernIsland_Interior_OnTransition:
|
2021-11-19 05:06:30 +01:00
|
|
|
call_if_eq VAR_ROAMER_POKEMON, 0, SouthernIsland_Interior_EventScript_SetUpLatios
|
|
|
|
call_if_ne VAR_ROAMER_POKEMON, 0, SouthernIsland_Interior_EventScript_SetUpLatias
|
2019-10-31 22:00:37 +01:00
|
|
|
call SouthernIsland_Interior_EventScript_SetUpPlayerGfx
|
2017-11-10 02:21:31 +01:00
|
|
|
end
|
|
|
|
|
2021-07-20 21:18:31 +02:00
|
|
|
SouthernIsland_Interior_EventScript_SetUpLatios::
|
2019-11-21 05:12:51 +01:00
|
|
|
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
|
|
|
|
|
2021-07-20 21:18:31 +02:00
|
|
|
SouthernIsland_Interior_EventScript_SetUpLatias::
|
2019-11-21 05:12:51 +01:00
|
|
|
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
|
|
|
|
|
2021-07-20 21:18:31 +02:00
|
|
|
SouthernIsland_Interior_EventScript_SetUpPlayerGfx::
|
2017-11-10 02:21:31 +01:00
|
|
|
checkplayergender
|
2021-11-19 05:06:30 +01:00
|
|
|
goto_if_eq VAR_RESULT, MALE, SouthernIsland_Interior_EventScript_SetBrendanGfx
|
|
|
|
goto_if_eq VAR_RESULT, FEMALE, SouthernIsland_Interior_EventScript_SetMayGfx
|
2017-11-10 02:21:31 +01:00
|
|
|
end
|
|
|
|
|
2021-07-20 21:18:31 +02:00
|
|
|
SouthernIsland_Interior_EventScript_SetBrendanGfx::
|
2019-11-21 05:12:51 +01:00
|
|
|
setvar VAR_OBJ_GFX_ID_0, OBJ_EVENT_GFX_RIVAL_BRENDAN_NORMAL
|
2017-11-10 02:21:31 +01:00
|
|
|
return
|
|
|
|
|
2021-07-20 21:18:31 +02:00
|
|
|
SouthernIsland_Interior_EventScript_SetMayGfx::
|
2019-11-21 05:12:51 +01:00
|
|
|
setvar VAR_OBJ_GFX_ID_0, OBJ_EVENT_GFX_RIVAL_MAY_NORMAL
|
2017-11-10 02:21:31 +01:00
|
|
|
return
|
|
|
|
|
2021-07-20 21:18:31 +02:00
|
|
|
SouthernIsland_Interior_EventScript_TryLatiEncounter::
|
2017-11-10 02:21:31 +01:00
|
|
|
lockall
|
2022-04-02 23:09:51 +02:00
|
|
|
setvar VAR_0x8008, 12 @ Player's Y coordinate. Not read
|
2019-10-31 22:00:37 +01:00
|
|
|
goto SouthernIsland_Interior_EventScript_Lati
|
2017-11-10 02:21:31 +01:00
|
|
|
end
|
|
|
|
|
2021-07-20 21:18:31 +02:00
|
|
|
SouthernIsland_Interior_EventScript_Lati::
|
2019-10-31 22:00:37 +01:00
|
|
|
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
|
2018-12-19 20:08:01 +01:00
|
|
|
special SpawnCameraObject
|
2019-11-21 05:12:51 +01:00
|
|
|
applymovement OBJ_EVENT_ID_CAMERA, SouthernIsland_Interior_Movement_CameraPanUp
|
2017-11-10 02:21:31 +01:00
|
|
|
waitmovement 0
|
|
|
|
delay 50
|
|
|
|
waitse
|
2021-11-07 18:58:11 +01:00
|
|
|
playmoncry VAR_TEMP_4, CRY_MODE_NORMAL
|
2017-11-10 02:21:31 +01:00
|
|
|
delay 30
|
|
|
|
waitmoncry
|
2020-06-21 07:56:57 +02:00
|
|
|
addobject LOCALID_LATI
|
2017-11-10 02:21:31 +01:00
|
|
|
delay 30
|
2019-11-21 05:12:51 +01:00
|
|
|
applymovement OBJ_EVENT_ID_CAMERA, SouthernIsland_Interior_Movement_CameraPanDown
|
2020-06-21 07:56:57 +02:00
|
|
|
applymovement LOCALID_LATI, SouthernIsland_Interior_Movement_LatiApproach
|
2017-11-10 02:21:31 +01:00
|
|
|
waitmovement 0
|
|
|
|
delay 50
|
2018-12-19 20:08:01 +01:00
|
|
|
special RemoveCameraObject
|
2020-06-21 07:56:57 +02:00
|
|
|
setvar VAR_LAST_TALKED, LOCALID_LATI
|
2021-11-19 05:06:30 +01:00
|
|
|
call_if_eq VAR_ROAMER_POKEMON, 0, SouthernIsland_Interior_EventScript_SetLatiosBattleVars
|
|
|
|
call_if_ne VAR_ROAMER_POKEMON, 0, 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
|
2018-08-08 10:37:12 +02:00
|
|
|
specialvar VAR_RESULT, GetBattleOutcome
|
2021-11-19 05:06:30 +01:00
|
|
|
goto_if_eq VAR_RESULT, B_OUTCOME_WON, SouthernIsland_Interior_EventScript_LatiDefeated
|
|
|
|
goto_if_eq VAR_RESULT, B_OUTCOME_RAN, SouthernIsland_Interior_EventScript_RanFromLati
|
|
|
|
goto_if_eq VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED, 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
|
|
|
|
|
2021-07-20 21:18:31 +02:00
|
|
|
SouthernIsland_Interior_EventScript_LatiDefeated::
|
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
|
|
|
|
|
2021-07-20 21:18:31 +02:00
|
|
|
SouthernIsland_Interior_EventScript_RanFromLati::
|
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
|
|
|
|
|
2021-07-20 21:18:31 +02:00
|
|
|
SouthernIsland_Interior_EventScript_Sign::
|
2019-09-19 23:26:25 +02:00
|
|
|
msgbox SouthernIsland_Interior_Text_Sign, MSGBOX_DEFAULT
|
2017-11-10 02:21:31 +01:00
|
|
|
releaseall
|
|
|
|
end
|
|
|
|
|
2021-07-20 21:18:31 +02:00
|
|
|
SouthernIsland_Interior_EventScript_SetLatiosBattleVars::
|
2022-04-02 23:09:51 +02:00
|
|
|
seteventmon SPECIES_LATIOS, 50, ITEM_SOUL_DEW
|
2017-11-10 02:21:31 +01:00
|
|
|
return
|
|
|
|
|
2021-07-20 21:18:31 +02:00
|
|
|
SouthernIsland_Interior_EventScript_SetLatiasBattleVars::
|
2022-04-02 23:09:51 +02:00
|
|
|
seteventmon SPECIES_LATIAS, 50, ITEM_SOUL_DEW
|
2017-11-10 02:21:31 +01:00
|
|
|
return
|
|
|
|
|
2021-07-20 21:18:31 +02:00
|
|
|
SouthernIsland_Interior_Movement_CameraPanUp:
|
2018-06-14 01:19:19 +02:00
|
|
|
walk_up
|
|
|
|
walk_up
|
|
|
|
walk_up
|
2017-11-10 02:21:31 +01:00
|
|
|
step_end
|
|
|
|
|
2021-07-20 21:18:31 +02:00
|
|
|
SouthernIsland_Interior_Movement_CameraPanDown:
|
2018-06-14 01:19:19 +02:00
|
|
|
delay_16
|
|
|
|
delay_16
|
|
|
|
delay_16
|
|
|
|
delay_16
|
|
|
|
delay_16
|
|
|
|
delay_16
|
|
|
|
delay_16
|
|
|
|
walk_down
|
|
|
|
walk_down
|
|
|
|
walk_down
|
2021-11-04 19:22:28 +01:00
|
|
|
walk_in_place_faster_up
|
2017-11-10 02:21:31 +01:00
|
|
|
step_end
|
|
|
|
|
2021-07-20 21:18:31 +02:00
|
|
|
SouthernIsland_Interior_Movement_LatiApproach:
|
2018-06-14 01:19:19 +02:00
|
|
|
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
|