Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
pret
GitHub Repository: pret/pokered
Path: blob/master/engine/events/evolve_trade.asm
1271 views
1
InGameTrade_CheckForTradeEvo:
2
; In Japanese Blue, TradeMons include a Graveler and a Haunter,
3
; both of which have Japanese names that start with "ゴ",
4
; which is what this routine originally checked in that game.
5
; For English Red and Blue, this routine was adjusted for
6
; Graveler's English name and Haunter's early English name "Spectre".
7
; The final release replaced Graveler and Haunter in TradeMons.
8
ld a, [wInGameTradeReceiveMonName]
9
cp "G" ; GRAVELER
10
jr z, .nameMatched
11
; "SPECTRE" (HAUNTER)
12
cp "S"
13
ret nz
14
ld a, [wInGameTradeReceiveMonName + 1]
15
cp "P"
16
ret nz
17
.nameMatched
18
ld a, [wPartyCount]
19
dec a
20
ld [wWhichPokemon], a
21
ld a, TRUE
22
ld [wForceEvolution], a
23
ld a, LINK_STATE_TRADING
24
ld [wLinkState], a
25
callfar TryEvolvingMon
26
xor a ; LINK_STATE_NONE
27
ld [wLinkState], a
28
jp PlayDefaultMusic
29
30