KDLPro

find level check xD

Mar 6th, 2021 (edited)
265
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. .got_it
  2. ld c, [hl]
  3. ld b, 0
  4. pop hl
  5. add hl, bc ; this selects our mon
  6. ld a, [hli]
  7. ld b, a
  8. ; If the Pokemon is encountered by surfing, we need to give the levels some variety.
  9. call CheckOnWater
  10. jr nz, .ok
  11. ; Check if we buff the wild mon, and by how much.
  12. call Random
  13. cp 35 percent
  14. jr c, .ok
  15. inc b
  16. cp 65 percent
  17. jr c, .ok
  18. inc b
  19. cp 85 percent
  20. jr c, .ok
  21. inc b
  22. cp 95 percent
  23. jr c, .ok
  24. inc b
  25. ; Store the level
  26. .ok
  27. ld a, b
  28. ld [wCurPartyLevel], a
  29. ld b, [hl]
  30. ; ld a, b
  31. call ValidateTempWildMonSpecies
  32. jr c, .nowildbattle
  33.  
  34. ld a, b ; This is in the wrong place.
  35. cp UNOWN
  36. jr nz, .done
  37.  
  38. ld a, [wUnlockedUnowns]
  39. and a
  40. jr z, .nowildbattle
Add Comment
Please, Sign In to add comment