pokecrystal-board/engine/events/bug_contest/caught_mon.asm
Rangi 99e66c2557 Rename some labels
- Remove "Buffer" suffix from some byte and word quantities
- Change "Ptr" to "Pointer"

Fixes #789
2020-12-23 16:29:30 -05:00

38 lines
703 B
NASM

BugContest_SetCaughtContestMon:
ld a, [wContestMon]
and a
jr z, .firstcatch
ld [wNamedObjectIndex], a
farcall DisplayAlreadyCaughtText
farcall DisplayCaughtContestMonStats
lb bc, 14, 7
call PlaceYesNoBox
ret c
.firstcatch
call .generatestats
ld a, [wTempEnemyMonSpecies]
ld [wNamedObjectIndex], a
call GetPokemonName
ld hl, .ContestCaughtMonText
call PrintText
ret
.generatestats
ld a, [wTempEnemyMonSpecies]
ld [wCurSpecies], a
ld [wCurPartySpecies], a
call GetBaseData
xor a
ld bc, PARTYMON_STRUCT_LENGTH
ld hl, wContestMon
call ByteFill
xor a
ld [wMonType], a
ld hl, wContestMon
jp GeneratePartyMonStats
.ContestCaughtMonText:
text_far _ContestCaughtMonText
text_end