Files
pokecrystal-board/engine/events/bug_contest/caught_mon.asm
mid-kid 940256569b text_jump → text_far
The previous name for this was rather misleading. It isn't an actual
jump like you'd expect the `jp` instruction to behave as. Instead, it
behaves more like a `farcall`.
This also makes it consistent with its current command ID name of
`TX_FAR`.
2018-11-05 22:26:18 +01:00

39 lines
705 B
NASM

BugContest_SetCaughtContestMon:
ld a, [wContestMon]
and a
jr z, .firstcatch
ld [wNamedObjectIndexBuffer], a
farcall DisplayAlreadyCaughtText
farcall DisplayCaughtContestMonStats
lb bc, 14, 7
call PlaceYesNoBox
ret c
.firstcatch
call .generatestats
ld a, [wTempEnemyMonSpecies]
ld [wNamedObjectIndexBuffer], a
call GetPokemonName
ld hl, .caughttext
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
.caughttext
; Caught @ !
text_far UnknownText_0x1c10c0
db "@"