pokered-rematch/engine/evolve_trade.asm

45 lines
950 B
NASM
Raw Normal View History

2016-06-12 00:24:04 +00:00
EvolveTradeMon:
2014-05-22 22:13:20 +00:00
; 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.
2015-02-07 10:43:08 +00:00
ld a, [wInGameTradeReceiveMonName]
2014-05-22 22:13:20 +00:00
; GRAVELER
cp "G"
jr z, .ok
; "SPECTRE" (HAUNTER)
cp "S"
ret nz
2015-02-07 10:43:08 +00:00
ld a, [wInGameTradeReceiveMonName + 1]
2014-05-22 22:13:20 +00:00
cp "P"
ret nz
.ok
ld a, [wPartyCount]
2014-05-22 22:13:20 +00:00
dec a
ld [wWhichPokemon], a
2014-05-22 22:13:20 +00:00
ld a, $1
ld [wForceEvolution], a
2015-02-07 10:43:08 +00:00
ld a, LINK_STATE_TRADING
ld [wLinkState], a
2014-08-09 05:39:13 +00:00
callab TryEvolvingMon
2015-02-07 10:43:08 +00:00
xor a ; LINK_STATE_NONE
ld [wLinkState], a
jp PlayDefaultMusic