Advertisement
PikalaxALT

FindMewInParty

Nov 1st, 2015
212
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. FindPokemonInParty:
  2.     ld b, a
  3.     ld hl, PartyCount
  4.     ld a, [hli]
  5.     and a
  6.     jr z, .done
  7.     ld c, a
  8. .loop
  9.     ld a, [hli]
  10.     cp b
  11.     jr z, .found
  12.     dec c
  13.     jr nz, .loop
  14. .done
  15.     xor a
  16.     ret
  17.  
  18. .found
  19.     ld a, [PartyCount]
  20.     sub c
  21.     scf
  22.     ret
  23.  
  24. FindMewInParty:
  25.     ld a, MEW
  26.     call FindPokemonInParty
  27.     ret
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement