evolve_trade.asm 950 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. EvolveTradeMon:
  2. ; Verify the TradeMon's species name before
  3. ; attempting to initiate a trade evolution.
  4. ; The names of the trade evolutions in Blue (JP)
  5. ; are checked. In that version, TradeMons that
  6. ; can evolve are Graveler and Haunter.
  7. ; In localization, this check was translated
  8. ; before monster names were finalized.
  9. ; Then, Haunter's name was "Spectre".
  10. ; Since its name no longer starts with
  11. ; "SP", it is prevented from evolving.
  12. ; This may have been why Red/Green's trades
  13. ; were used instead, where none can evolve.
  14. ; This was fixed in Yellow.
  15. ld a, [wInGameTradeReceiveMonName]
  16. ; GRAVELER
  17. cp "G"
  18. jr z, .ok
  19. ; "SPECTRE" (HAUNTER)
  20. cp "S"
  21. ret nz
  22. ld a, [wInGameTradeReceiveMonName + 1]
  23. cp "P"
  24. ret nz
  25. .ok
  26. ld a, [wPartyCount]
  27. dec a
  28. ld [wWhichPokemon], a
  29. ld a, $1
  30. ld [wForceEvolution], a
  31. ld a, LINK_STATE_TRADING
  32. ld [wLinkState], a
  33. callab TryEvolvingMon
  34. xor a ; LINK_STATE_NONE
  35. ld [wLinkState], a
  36. jp PlayDefaultMusic