summaryrefslogtreecommitdiff
path: root/engine/evolve_trade.asm
blob: d3a0ee63bf2278a67cf7f46c7b467b4206b029f0 (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
EvolveTradeMon:
; Verify the TradeMon's species name before
; attempting to initiate a trade evolution.

; The names of the trade evolutions in Blue (JP)
; are checked. In that version, TradeMons that
; can evolve are Graveler and Haunter.

; In localization, this check was translated
; before monster names were finalized.
; Then, Haunter's name was "Spectre".
; Since its name no longer starts with
; "SP", it is prevented from evolving.

; This may have been why Red/Green's trades
; were used instead, where none can evolve.

; This was fixed in Yellow.

	;ld a, [wInGameTradeReceiveMonName]

	; GRAVELER
	;cp "G"
	;jr z, .ok

	; "SPECTRE" (HAUNTER)
	;cp "S"
	;ret nz
	;ld a, [wInGameTradeReceiveMonName + 1]
	;cp "P"
	;ret nz
	ret

.ok
	ld a, [wPartyCount]
	dec a
	ld [wWhichPokemon], a
	ld a, $1
	ld [wForceEvolution], a
	ld a, LINK_STATE_TRADING
	ld [wLinkState], a
	callab TryEvolvingMon
	xor a ; LINK_STATE_NONE
	ld [wLinkState], a
	jp PlayDefaultMusic