pokecrystal-board/engine/events/bug_contest/caught_mon.asm

38 lines
707 B
NASM
Raw Normal View History

2018-06-24 07:09:41 -07:00
BugContest_SetCaughtContestMon:
ld a, [wContestMon]
and a
jr z, .firstcatch
ld [wNamedObjectIndex], a
2017-12-24 09:47:30 -08:00
farcall DisplayAlreadyCaughtText
farcall DisplayCaughtContestMonStats
lb bc, 14, 7
call PlaceYesNoBox
ret c
.firstcatch
call .generatestats
2018-01-23 14:39:09 -08:00
ld a, [wTempEnemyMonSpecies]
ld [wNamedObjectIndex], a
call GetPokemonName
ld hl, .ContestCaughtMonText
call PrintText1bpp
ret
2018-06-24 07:09:41 -07:00
.generatestats
2018-01-23 14:39:09 -08:00
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
2018-01-23 14:39:09 -08:00
ld [wMonType], a
ld hl, wContestMon
jp GeneratePartyMonStats
.ContestCaughtMonText:
text_far _ContestCaughtMonText
text_end