This repository has been archived by the owner on Aug 26, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
pokemontower5.asm
176 lines (149 loc) · 3.93 KB
/
pokemontower5.asm
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
171
172
173
174
175
176
PokemonTower5Script:
call EnableAutoTextBoxDrawing
ld hl, PokemonTower5TrainerHeader0
ld de, PokemonTower5ScriptPointers
ld a, [wPokemonTower5CurScript]
call ExecuteCurMapScriptInTable
ld [wPokemonTower5CurScript], a
ret
PokemonTower5ScriptPointers:
dw PokemonTower5Script0
dw DisplayEnemyTrainerTextAndStartBattle
dw EndTrainerBattle
PokemonTower5Script0:
ld hl, CoordsData_60992
call ArePlayerCoordsInArray
jr c, .asm_60960
ld hl, wd72e
res 4, [hl]
ResetEvent EVENT_IN_PURIFIED_ZONE
jp CheckFightingMapTrainers
.asm_60960
CheckAndSetEvent EVENT_IN_PURIFIED_ZONE
ret nz
xor a
ld [hJoyHeld], a
ld a, $f0
ld [wJoyIgnore], a
ld hl, wd72e
set 4, [hl]
predef HealParty
call GBFadeOutToWhite
call Delay3
call Delay3
call GBFadeInFromWhite
ld a, $7
ld [hSpriteIndexOrTextID], a
call DisplayTextID
xor a
ld [wJoyIgnore], a
ret
CoordsData_60992:
db $08,$0A
db $08,$0B
db $09,$0A
db $09,$0B
db $FF
PokemonTower5TextPointers:
dw PokemonTower5Text1
dw PokemonTower5Text2
dw PokemonTower5Text3
dw PokemonTower5Text4
dw PokemonTower5Text5
dw PickUpItemText
dw PokemonTower5Text7
PokemonTower5TrainerHeader0:
dbEventFlagBit EVENT_BEAT_POKEMONTOWER_5_TRAINER_0
db ($2 << 4) ; trainer's view range
dwEventFlagAddress EVENT_BEAT_POKEMONTOWER_5_TRAINER_0
dw PokemonTower5BattleText1 ; TextBeforeBattle
dw PokemonTower5AfterBattleText1 ; TextAfterBattle
dw PokemonTower5EndBattleText1 ; TextEndBattle
dw PokemonTower5EndBattleText1 ; TextEndBattle
PokemonTower5TrainerHeader1:
dbEventFlagBit EVENT_BEAT_POKEMONTOWER_5_TRAINER_1
db ($3 << 4) ; trainer's view range
dwEventFlagAddress EVENT_BEAT_POKEMONTOWER_5_TRAINER_1
dw PokemonTower5BattleText2 ; TextBeforeBattle
dw PokemonTower5AfterBattleText2 ; TextAfterBattle
dw PokemonTower5EndBattleText2 ; TextEndBattle
dw PokemonTower5EndBattleText2 ; TextEndBattle
PokemonTower5TrainerHeader2:
dbEventFlagBit EVENT_BEAT_POKEMONTOWER_5_TRAINER_2
db ($2 << 4) ; trainer's view range
dwEventFlagAddress EVENT_BEAT_POKEMONTOWER_5_TRAINER_2
dw PokemonTower5BattleText3 ; TextBeforeBattle
dw PokemonTower5AfterBattleText3 ; TextAfterBattle
dw PokemonTower5EndBattleText3 ; TextEndBattle
dw PokemonTower5EndBattleText3 ; TextEndBattle
PokemonTower5TrainerHeader3:
dbEventFlagBit EVENT_BEAT_POKEMONTOWER_5_TRAINER_3
db ($2 << 4) ; trainer's view range
dwEventFlagAddress EVENT_BEAT_POKEMONTOWER_5_TRAINER_3
dw PokemonTower5BattleText4 ; TextBeforeBattle
dw PokemonTower5AfterBattleText4 ; TextAfterBattle
dw PokemonTower5EndBattleText4 ; TextEndBattle
dw PokemonTower5EndBattleText4 ; TextEndBattle
db $ff
PokemonTower5Text1:
TX_FAR _PokemonTower5Text1
db "@"
PokemonTower5Text2:
TX_ASM
ld hl, PokemonTower5TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
PokemonTower5BattleText1:
TX_FAR _PokemonTower5BattleText1
db "@"
PokemonTower5EndBattleText1:
TX_FAR _PokemonTower5EndBattleText1
db "@"
PokemonTower5AfterBattleText1:
TX_FAR _PokemonTower5AfterBattleText1
db "@"
PokemonTower5Text3:
TX_ASM
ld hl, PokemonTower5TrainerHeader1
call TalkToTrainer
jp TextScriptEnd
PokemonTower5BattleText2:
TX_FAR _PokemonTower5BattleText2
db "@"
PokemonTower5EndBattleText2:
TX_FAR _PokemonTower5EndBattleText2
db "@"
PokemonTower5AfterBattleText2:
TX_FAR _PokemonTower5AfterBattleText2
db "@"
PokemonTower5Text4:
TX_ASM
ld hl, PokemonTower5TrainerHeader2
call TalkToTrainer
jp TextScriptEnd
PokemonTower5BattleText3:
TX_FAR _PokemonTower5BattleText3
db "@"
PokemonTower5EndBattleText3:
TX_FAR _PokemonTower5EndBattleText3
db "@"
PokemonTower5AfterBattleText3:
TX_FAR _PokemonTower5AfterBattleText3
db "@"
PokemonTower5Text5:
TX_ASM
ld hl, PokemonTower5TrainerHeader3
call TalkToTrainer
jp TextScriptEnd
PokemonTower5BattleText4:
TX_FAR _PokemonTower5BattleText4
db "@"
PokemonTower5EndBattleText4:
TX_FAR _PokemonTower5EndBattleText4
db "@"
PokemonTower5AfterBattleText4:
TX_FAR _PokemonTower5AfterBattleText4
db "@"
PokemonTower5Text7:
TX_FAR _PokemonTower5Text7
db "@"