Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
pret
GitHub Repository: pret/pokered
Path: blob/master/engine/debug/debug_party.asm
1271 views
1
SetDebugNewGameParty: ; unreferenced except in _DEBUG
2
ld de, DebugNewGameParty
3
.loop
4
ld a, [de]
5
cp -1
6
ret z
7
ld [wCurPartySpecies], a
8
inc de
9
ld a, [de]
10
ld [wCurEnemyLevel], a
11
inc de
12
call AddPartyMon
13
jr .loop
14
15
DebugNewGameParty: ; unreferenced except in _DEBUG
16
; Exeggutor is the only debug party member shared with Red, Green, and Japanese Blue.
17
; "Tsunekazu Ishihara: Exeggutor is my favorite. That's because I was
18
; always using this character while I was debugging the program."
19
; From https://web.archive.org/web/20000607152840/http://pocket.ign.com/news/14973.html
20
db EXEGGUTOR, 90
21
IF DEF(_DEBUG)
22
db MEW, 5
23
ELSE
24
db MEW, 20
25
ENDC
26
db JOLTEON, 56
27
db DUGTRIO, 56
28
db ARTICUNO, 57
29
IF DEF(_DEBUG)
30
db PIKACHU, 5
31
ENDC
32
db -1 ; end
33
34
PrepareNewGameDebug: ; dummy except in _DEBUG
35
IF DEF(_DEBUG)
36
xor a ; PLAYER_PARTY_DATA
37
ld [wMonDataLocation], a
38
39
; Fly anywhere.
40
dec a ; $ff (all bits)
41
ld [wTownVisitedFlag], a
42
ld [wTownVisitedFlag + 1], a
43
44
; Get all badges except Earth Badge.
45
ld a, ~(1 << BIT_EARTHBADGE)
46
ld [wObtainedBadges], a
47
48
call SetDebugNewGameParty
49
50
; Exeggutor gets four HM moves.
51
ld hl, wPartyMon1Moves
52
ld a, FLY
53
ld [hli], a
54
ld a, CUT
55
ld [hli], a
56
ld a, SURF
57
ld [hli], a
58
ld a, STRENGTH
59
ld [hl], a
60
ld hl, wPartyMon1PP
61
ld a, 15
62
ld [hli], a
63
ld a, 30
64
ld [hli], a
65
ld a, 15
66
ld [hli], a
67
ld [hl], a
68
69
; Jolteon gets Thunderbolt.
70
ld hl, wPartyMon3Moves + 3
71
ld a, THUNDERBOLT
72
ld [hl], a
73
ld hl, wPartyMon3PP + 3
74
ld a, 15
75
ld [hl], a
76
77
; Articuno gets Fly.
78
ld hl, wPartyMon5Moves
79
ld a, FLY
80
ld [hl], a
81
ld hl, wPartyMon5PP
82
ld a, 15
83
ld [hl], a
84
85
; Pikachu gets Surf.
86
ld hl, wPartyMon6Moves + 2
87
ld a, SURF
88
ld [hl], a
89
ld hl, wPartyMon6PP + 2
90
ld a, 15
91
ld [hl], a
92
93
; Get some debug items.
94
ld hl, wNumBagItems
95
ld de, DebugNewGameItemsList
96
.items_loop
97
ld a, [de]
98
cp -1
99
jr z, .items_end
100
ld [wCurItem], a
101
inc de
102
ld a, [de]
103
inc de
104
ld [wItemQuantity], a
105
call AddItemToInventory
106
jr .items_loop
107
.items_end
108
109
; Complete the Pokédex.
110
ld hl, wPokedexOwned
111
call DebugSetPokedexEntries
112
ld hl, wPokedexSeen
113
call DebugSetPokedexEntries
114
SetEvent EVENT_GOT_POKEDEX
115
116
; Rival chose Squirtle,
117
; Player chose Charmander.
118
ld hl, wRivalStarter
119
ASSERT wRivalStarter + 2 == wPlayerStarter
120
ld a, STARTER2
121
ld [hli], a
122
inc hl
123
ld a, STARTER1
124
ld [hl], a
125
126
ret
127
128
DebugSetPokedexEntries:
129
ld b, wPokedexOwnedEnd - wPokedexOwned - 1
130
ld a, %11111111
131
.loop
132
ld [hli], a
133
dec b
134
jr nz, .loop
135
ld [hl], %01111111
136
ret
137
138
DebugNewGameItemsList:
139
db BICYCLE, 1
140
db FULL_RESTORE, 99
141
db FULL_HEAL, 99
142
db ESCAPE_ROPE, 99
143
db RARE_CANDY, 99
144
db MASTER_BALL, 99
145
db TOWN_MAP, 1
146
db SECRET_KEY, 1
147
db CARD_KEY, 1
148
db S_S_TICKET, 1
149
db LIFT_KEY, 1
150
db -1 ; end
151
152
DebugUnusedList: ; unreferenced
153
db -1 ; end
154
ELSE
155
ret
156
ENDC
157
158