mirror of https://github.com/pret/pokecrystal.git
Merge pull request #761 from mid-kid/master
Linkcable and the Mystery of Mew
This commit is contained in:
commit
7dad9fd1d8
|
@ -1882,24 +1882,31 @@ LinkTrade:
|
||||||
call LoadTradeScreenBorder
|
call LoadTradeScreenBorder
|
||||||
call SetTradeRoomBGPals
|
call SetTradeRoomBGPals
|
||||||
farcall Link_WaitBGMap
|
farcall Link_WaitBGMap
|
||||||
ld b, $1
|
|
||||||
|
; Check if either of the Pokémon sent was a Mew or Celebi, and send a different
|
||||||
|
; byte depending on that. Presumably this would've been some prevention against
|
||||||
|
; illicit trade machines, but it doesn't seem like a very effective one.
|
||||||
|
; Removing this code breaks link compatibility with the vanilla gen2 games, but
|
||||||
|
; has otherwise no consequence.
|
||||||
|
ld b, 1
|
||||||
pop af
|
pop af
|
||||||
ld c, a
|
ld c, a
|
||||||
cp MEW
|
cp MEW
|
||||||
jr z, .loop
|
jr z, .send_checkbyte
|
||||||
ld a, [wCurPartySpecies]
|
ld a, [wCurPartySpecies]
|
||||||
cp MEW
|
cp MEW
|
||||||
jr z, .loop
|
jr z, .send_checkbyte
|
||||||
ld b, $2
|
ld b, 2
|
||||||
ld a, c
|
ld a, c
|
||||||
cp CELEBI
|
cp CELEBI
|
||||||
jr z, .loop
|
jr z, .send_checkbyte
|
||||||
ld a, [wCurPartySpecies]
|
ld a, [wCurPartySpecies]
|
||||||
cp CELEBI
|
cp CELEBI
|
||||||
jr z, .loop
|
jr z, .send_checkbyte
|
||||||
ld b, $0
|
|
||||||
|
|
||||||
.loop
|
; Send the byte in a loop until the desired byte has been received.
|
||||||
|
ld b, 0
|
||||||
|
.send_checkbyte
|
||||||
ld a, b
|
ld a, b
|
||||||
ld [wPlayerLinkAction], a
|
ld [wPlayerLinkAction], a
|
||||||
push bc
|
push bc
|
||||||
|
@ -1913,7 +1920,7 @@ LinkTrade:
|
||||||
jr z, .save
|
jr z, .save
|
||||||
ld a, [wOtherPlayerLinkAction]
|
ld a, [wOtherPlayerLinkAction]
|
||||||
cp b
|
cp b
|
||||||
jr nz, .loop
|
jr nz, .send_checkbyte
|
||||||
|
|
||||||
.save
|
.save
|
||||||
farcall SaveAfterLinkTrade
|
farcall SaveAfterLinkTrade
|
||||||
|
|
Loading…
Reference in New Issue