summaryrefslogtreecommitdiff
path: root/engine/buena_phone_scripts.asm
blob: 858ce55407f85342b71c7057b3bc7122cf2fbf93 (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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
BuenaPhoneScript1:
	checkflag ENGINE_ROCKETS_IN_RADIO_TOWER
	iftrue BuenaPhoneScript_Rocket
	checkcode VAR_HOUR
	if_greater_than 17, BuenaPhoneScript_AfterMidnight1
	scall BuenaPhoneScript_CheckTimeOfDay1
	jump BuenaPhoneScript_Random1

BuenaPhoneScript2:
	checkflag ENGINE_ROCKETS_IN_RADIO_TOWER
	iftrue BuenaPhoneScript_Rocket
	scall BuenaPhoneScript_CheckTimeOfDay2
	jump BuenaPhoneScript_Random2

BuenaPhoneScript_CheckTimeOfDay1:
	checkmorn
	iftrue .morn
	checkday
	iftrue .day
	writetext UnknownText_0xa0d42
	buttonsound
	end

.morn
	writetext UnknownText_0xa0c28
	buttonsound
	end

.day
	writetext UnknownText_0xa0c72
	buttonsound
	end

BuenaPhoneScript_AfterMidnight1:
	writetext UnknownText_0xa0caf
	end

BuenaPhoneScript_CheckTimeOfDay2:
	checkcode VAR_HOUR
	if_greater_than 17, BuenaPhoneScript_AfterMidnight2
	checkmorn
	iftrue .morn
	checkday
	iftrue .day
	writetext UnknownText_0xa0e29
	buttonsound
	end

.morn
	writetext UnknownText_0xa0d96
	buttonsound
	end

.day
	writetext UnknownText_0xa0dcf
	buttonsound
	end

BuenaPhoneScript_AfterMidnight2:
	writetext UnknownText_0xa0e01
	buttonsound
	end

BuenaPhoneScript_Rocket:
	writetext UnknownText_0xa0e5e
	end

BuenaPhoneScript_Random2:
	checkevent EVENT_BEAT_ELITE_FOUR
	iftrue .PostE4
	random 11
	jump .Jumptable

.PostE4:
	random 14

.Jumptable:
	if_equal 0, .zero
	if_equal 1, .one
	if_equal 2, .two
	if_equal 3, .three
	if_equal 4, .four
	if_equal 5, .five
	if_equal 6, .six
	if_equal 7, .seven
	if_equal 8, .eight
	if_equal 9, .nine
	if_equal 10, .ten
	if_equal 11, .eleven
	if_equal 12, .twelve
	if_equal 13, .thirteen

.zero
	writetext UnknownText_0xa0efb
	jump .finish

.one
	writetext UnknownText_0xa0fcf
	jump .finish

.two
	writetext UnknownText_0xa109d
	jump .finish

.three
	writetext UnknownText_0xa1143
	jump .finish

.four
	writetext UnknownText_0xa1244
	jump .finish

.five
	writetext UnknownText_0xa1318
	jump .finish

.six
	writetext UnknownText_0xa13d8
	jump .finish

.seven
	writetext UnknownText_0xa1488
	jump .finish

.eight
	writetext UnknownText_0xa15de
	jump .finish

.nine
	writetext UnknownText_0xa1717
	jump .finish

.ten
	writetext UnknownText_0xa183d
	jump .finish

.eleven
	writetext UnknownText_0xa19b1
	jump .finish

.twelve
	writetext UnknownText_0xa1ac0
	jump .finish

.thirteen
	writetext UnknownText_0xa1bed

.finish
	end

BuenaPhoneScript_Random1:
	random 3
	if_equal 0, .zero
	if_equal 1, .one
	if_equal 2, .two

.zero
	writetext UnknownText_0xa1c88
	end

.one
	writetext UnknownText_0xa1d5f
	end

.two
	writetext UnknownText_0xa1e2f
	end
; a0c28

INCLUDE "text/phone/buena.asm"