2018-06-24 14:09:41 +00:00
|
|
|
BugContest_SetCaughtContestMon:
|
2017-12-16 02:22:26 +00:00
|
|
|
ld a, [wContestMon]
|
|
|
|
and a
|
|
|
|
jr z, .firstcatch
|
2018-07-28 23:27:34 +00:00
|
|
|
ld [wNamedObjectIndexBuffer], a
|
2017-12-24 17:47:30 +00:00
|
|
|
farcall DisplayAlreadyCaughtText
|
|
|
|
farcall DisplayCaughtContestMonStats
|
2017-12-16 02:22:26 +00:00
|
|
|
lb bc, 14, 7
|
|
|
|
call PlaceYesNoBox
|
|
|
|
ret c
|
|
|
|
|
|
|
|
.firstcatch
|
|
|
|
call .generatestats
|
2018-01-23 22:39:09 +00:00
|
|
|
ld a, [wTempEnemyMonSpecies]
|
2018-07-28 23:27:34 +00:00
|
|
|
ld [wNamedObjectIndexBuffer], a
|
2017-12-16 02:22:26 +00:00
|
|
|
call GetPokemonName
|
2019-10-20 22:24:17 +00:00
|
|
|
ld hl, .ContestCaughtMonText
|
2017-12-16 02:22:26 +00:00
|
|
|
call PrintText
|
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
.generatestats
|
2018-01-23 22:39:09 +00:00
|
|
|
ld a, [wTempEnemyMonSpecies]
|
|
|
|
ld [wCurSpecies], a
|
|
|
|
ld [wCurPartySpecies], a
|
2017-12-16 02:22:26 +00:00
|
|
|
call GetBaseData
|
|
|
|
xor a
|
|
|
|
ld bc, PARTYMON_STRUCT_LENGTH
|
|
|
|
ld hl, wContestMon
|
|
|
|
call ByteFill
|
|
|
|
xor a
|
2018-01-23 22:39:09 +00:00
|
|
|
ld [wMonType], a
|
2017-12-16 02:22:26 +00:00
|
|
|
ld hl, wContestMon
|
|
|
|
jp GeneratePartyMonStats
|
|
|
|
|
2019-10-20 22:24:17 +00:00
|
|
|
.ContestCaughtMonText:
|
|
|
|
text_far _ContestCaughtMonText
|
2018-11-17 18:33:03 +00:00
|
|
|
text_end
|