diff options
author | Rangi <35663410+Rangi42@users.noreply.github.com> | 2020-08-19 10:19:45 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-19 10:19:45 -0400 |
commit | 3a4ebf6e5fcb820e2b32cc6586c2ca8630803347 (patch) | |
tree | 6d44c02d6df90e2fa5a5fc2692bc59dc791db887 | |
parent | 34ad9498ea399405ddc68aea91af9dd64319417c (diff) | |
parent | c44da8221fc9292e96c74968dcaeab43fadc19a2 (diff) |
Merge pull request #61 from mid-kid/master
Linkcable and the Mystery of Mew
-rw-r--r-- | engine/link/link.asm | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/engine/link/link.asm b/engine/link/link.asm index 53f0e004..a0f67f40 100644 --- a/engine/link/link.asm +++ b/engine/link/link.asm @@ -1719,24 +1719,31 @@ LinkTrade: call LoadTradeScreenBorder call SetTradeRoomBGPals call 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 ld c, a cp MEW - jr z, .loop + jr z, .send_checkbyte ld a, [wCurPartySpecies] cp MEW - jr z, .loop - ld b, $2 + jr z, .send_checkbyte + ld b, 2 ld a, c cp CELEBI - jr z, .loop + jr z, .send_checkbyte ld a, [wCurPartySpecies] cp CELEBI - jr z, .loop - ld b, $0 + jr z, .send_checkbyte -.loop +; Send the byte in a loop until the desired byte has been received. + ld b, 0 +.send_checkbyte ld a, b ld [wPlayerLinkAction], a push bc @@ -1750,7 +1757,7 @@ LinkTrade: jr z, .save ld a, [wOtherPlayerLinkAction] cp b - jr nz, .loop + jr nz, .send_checkbyte .save farcall SaveAfterLinkTrade |