summaryrefslogtreecommitdiff
path: root/data/maps/SouthernIsland_Interior/scripts.inc
blob: 5da21e585522f244ae27511dce07cfe3435de715 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
SouthernIsland_Interior_MapScripts:: @ 8160B53
	map_script MAP_SCRIPT_ON_RESUME, SouthernIsland_Interior_MapScript1_160B5E
	map_script MAP_SCRIPT_ON_TRANSITION, SouthernIsland_Interior_MapScript1_160B6C
	.byte 0

SouthernIsland_Interior_MapScript1_160B5E:: @ 8160B5E
	call_if_set FLAG_SYS_CTRL_OBJ_DELETE, SouthernIsland_Interior_EventScript_160B68
	end

SouthernIsland_Interior_EventScript_160B68:: @ 8160B68
	removeobject 2
	return

SouthernIsland_Interior_MapScript1_160B6C:: @ 8160B6C
	.ifdef SAPPHIRE
	setvar VAR_OBJ_GFX_ID_1, OBJ_EVENT_GFX_LATIOS
	.else
	setvar VAR_OBJ_GFX_ID_1, OBJ_EVENT_GFX_LATIAS
	.endif
	call SouthernIsland_Interior_EventScript_160B77
	end

SouthernIsland_Interior_EventScript_160B77:: @ 8160B77
	checkplayergender
	compare VAR_RESULT, 0
	goto_if_eq SouthernIsland_Interior_EventScript_160B8F
	compare VAR_RESULT, 1
	goto_if_eq SouthernIsland_Interior_EventScript_160B95
	end

SouthernIsland_Interior_EventScript_160B8F:: @ 8160B8F
	setvar VAR_OBJ_GFX_ID_0, OBJ_EVENT_GFX_RIVAL_BRENDAN_NORMAL
	return

SouthernIsland_Interior_EventScript_160B95:: @ 8160B95
	setvar VAR_OBJ_GFX_ID_0, OBJ_EVENT_GFX_RIVAL_MAY_NORMAL
	return

SouthernIsland_Interior_EventScript_160B9B:: @ 8160B9B
	lockall
	setvar VAR_0x8008, 12
	goto SouthernIsland_Interior_EventScript_160BA7
	end

SouthernIsland_Interior_EventScript_160BA7:: @ 8160BA7
	goto_if_set FLAG_ENCOUNTERED_LATIAS_OR_LATIOS, SouthernIsland_Interior_EventScript_160C08
	goto_if_unset FLAG_SYS_HAS_EON_TICKET, SouthernIsland_Interior_EventScript_160C08
	setflag FLAG_ENCOUNTERED_LATIAS_OR_LATIOS
	special SpawnCameraDummy
	applymovement 127, SouthernIsland_Interior_Movement_160C12
	waitmovement 0
	delay 50
	waitse
	playmoncry SPECIES_LATIAS_OR_LATIOS, 0
	delay 30
	waitmoncry
	addobject 2
	delay 30
	applymovement 127, SouthernIsland_Interior_Movement_160C16
	applymovement 2, SouthernIsland_Interior_Movement_160C22
	waitmovement 0
	delay 50
	special RemoveCameraDummy
	setwildbattle SPECIES_LATIAS_OR_LATIOS, 50, ITEM_SOUL_DEW
	setflag FLAG_HIDE_LATIOS_OR_LATIAS_STATIONARY
	setflag FLAG_SYS_CTRL_OBJ_DELETE
	special ScrSpecial_StartSouthernIslandBattle
	waitstate
	clearflag FLAG_SYS_CTRL_OBJ_DELETE
	releaseall
	end

SouthernIsland_Interior_EventScript_160C08:: @ 8160C08
	msgbox SouthernIsland_Interior_Text_1C52C5, MSGBOX_DEFAULT
	releaseall
	end

SouthernIsland_Interior_Movement_160C12:: @ 8160C12
	walk_up
	walk_up
	walk_up
	step_end

SouthernIsland_Interior_Movement_160C16:: @ 8160C16
	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
	step_end

SouthernIsland_Interior_Movement_160C22:: @ 8160C22
	walk_down
	walk_down
	walk_down
	walk_down
	walk_down
	delay_16
	delay_16
	walk_down
	walk_down
	walk_down
	walk_down
	step_end