summaryrefslogtreecommitdiff
path: root/data/scripts/maps/SouthernIsland_Interior.inc
blob: cbc451a18222cadc35cc2181a1a73e4661b803d0 (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
111
112
113
SouthernIsland_Interior_MapScripts:: @ 8160B53
	map_script 5, SouthernIsland_Interior_MapScript1_160B5E
	map_script 3, SouthernIsland_Interior_MapScript1_160B6C
	.byte 0

SouthernIsland_Interior_MapScript1_160B5E:: @ 8160B5E
	checkflag FLAG_SYS_CTRL_OBJ_DELETE
	call_if 1, 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, MAP_OBJ_GFX_LATIOS
	.else
	setvar VAR_OBJ_GFX_ID_1, MAP_OBJ_GFX_LATIAS
	.endif
	call SouthernIsland_Interior_EventScript_160B77
	end

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

SouthernIsland_Interior_EventScript_160B8F:: @ 8160B8F
	setvar VAR_OBJ_GFX_ID_0, MAP_OBJ_GFX_RIVAL_BRENDAN_NORMAL
	return

SouthernIsland_Interior_EventScript_160B95:: @ 8160B95
	setvar VAR_OBJ_GFX_ID_0, MAP_OBJ_GFX_RIVAL_MAY_NORMAL
	return

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

SouthernIsland_Interior_EventScript_160BA7:: @ 8160BA7
	checkflag FLAG_ECOUNTERED_LATIAS_OR_LATIOS
	goto_if_eq SouthernIsland_Interior_EventScript_160C08
	checkflag FLAG_SYS_HAS_EON_TICKET
	goto_if 0, SouthernIsland_Interior_EventScript_160C08
	setflag FLAG_ECOUNTERED_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, 4
	releaseall
	end

SouthernIsland_Interior_Movement_160C12:: @ 8160C12
	step_up
	step_up
	step_up
	step_end

SouthernIsland_Interior_Movement_160C16:: @ 8160C16
	step_14
	step_14
	step_14
	step_14
	step_14
	step_14
	step_14
	step_down
	step_down
	step_down
	step_26
	step_end

SouthernIsland_Interior_Movement_160C22:: @ 8160C22
	step_down
	step_down
	step_down
	step_down
	step_down
	step_14
	step_14
	step_down
	step_down
	step_down
	step_down
	step_end