predefs17_2.asm 328 B

12345678910111213141516
  1. ; updates the types of a party mon (pointed to in hl) to the ones of the mon specified in wd11e
  2. SetPartyMonTypes:
  3. call GetPredefRegisters
  4. ld bc, wPartyMon1Type - wPartyMon1 ; $5
  5. add hl, bc
  6. ld a, [wd11e]
  7. ld [wd0b5], a
  8. push hl
  9. call GetMonHeader
  10. pop hl
  11. ld a, [wMonHType1]
  12. ld [hli], a
  13. ld a, [wMonHType2]
  14. ld [hl], a
  15. ret