2018-01-17 04:47:45 +00:00
|
|
|
; PrintDayCareText.TextTable indexes
|
2015-12-19 01:07:09 +00:00
|
|
|
const_def
|
2015-12-25 03:58:42 +00:00
|
|
|
const DAYCARETEXT_MAN_INTRO
|
2020-06-16 23:32:36 +00:00
|
|
|
const DAYCARETEXT_MAN_ODD_EGG
|
2015-12-25 03:58:42 +00:00
|
|
|
const DAYCARETEXT_LADY_INTRO
|
2020-06-16 23:32:36 +00:00
|
|
|
const DAYCARETEXT_LADY_ODD_EGG
|
2015-12-25 03:58:42 +00:00
|
|
|
const DAYCARETEXT_WHICH_ONE
|
|
|
|
const DAYCARETEXT_DEPOSIT
|
|
|
|
const DAYCARETEXT_CANT_BREED_EGG
|
|
|
|
const DAYCARETEXT_LAST_MON
|
|
|
|
const DAYCARETEXT_LAST_ALIVE_MON
|
|
|
|
const DAYCARETEXT_COME_BACK_LATER
|
|
|
|
const DAYCARETEXT_REMOVE_MAIL
|
|
|
|
const DAYCARETEXT_GENIUSES
|
|
|
|
const DAYCARETEXT_ASK_WITHDRAW
|
|
|
|
const DAYCARETEXT_WITHDRAW
|
2018-01-17 04:47:45 +00:00
|
|
|
const DAYCARETEXT_GOT_BACK
|
2015-12-25 03:58:42 +00:00
|
|
|
const DAYCARETEXT_TOO_SOON
|
|
|
|
const DAYCARETEXT_PARTY_FULL
|
|
|
|
const DAYCARETEXT_NOT_ENOUGH_MONEY
|
|
|
|
const DAYCARETEXT_OH_FINE
|
|
|
|
const DAYCARETEXT_COME_AGAIN
|
2015-12-19 01:07:09 +00:00
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
DayCareMan:
|
2017-12-10 18:37:15 +00:00
|
|
|
ld hl, wDayCareMan
|
2018-01-22 18:18:23 +00:00
|
|
|
bit DAYCAREMAN_HAS_MON_F, [hl]
|
2015-12-19 01:07:09 +00:00
|
|
|
jr nz, .AskWithdrawMon
|
2017-12-10 18:37:15 +00:00
|
|
|
ld hl, wDayCareMan
|
2015-12-25 03:58:42 +00:00
|
|
|
ld a, DAYCARETEXT_MAN_INTRO
|
2015-12-19 01:07:09 +00:00
|
|
|
call DayCareManIntroText
|
|
|
|
jr c, .cancel
|
|
|
|
call DayCareAskDepositPokemon
|
|
|
|
jr c, .print_text
|
2017-12-24 17:47:30 +00:00
|
|
|
farcall DepositMonWithDayCareMan
|
2017-12-10 18:37:15 +00:00
|
|
|
ld hl, wDayCareMan
|
2018-01-22 18:18:23 +00:00
|
|
|
set DAYCAREMAN_HAS_MON_F, [hl]
|
2015-12-19 01:07:09 +00:00
|
|
|
call DayCare_DepositPokemonText
|
|
|
|
call DayCare_InitBreeding
|
2015-11-17 02:46:36 +00:00
|
|
|
ret
|
|
|
|
|
2016-04-10 18:42:14 +00:00
|
|
|
.AskWithdrawMon:
|
2017-12-24 17:47:30 +00:00
|
|
|
farcall GetBreedMon1LevelGrowth
|
2015-11-17 02:46:36 +00:00
|
|
|
ld hl, wBreedMon1Nick
|
2015-12-25 03:58:42 +00:00
|
|
|
call GetPriceToRetrieveBreedmon
|
|
|
|
call DayCare_AskWithdrawBreedMon
|
2015-12-19 01:07:09 +00:00
|
|
|
jr c, .print_text
|
2018-02-14 10:51:47 +00:00
|
|
|
farcall RetrieveMonFromDayCareMan
|
2018-01-17 04:47:45 +00:00
|
|
|
call DayCare_GetBackMonForMoney
|
2017-12-10 18:37:15 +00:00
|
|
|
ld hl, wDayCareMan
|
2018-01-22 18:18:23 +00:00
|
|
|
res DAYCAREMAN_HAS_MON_F, [hl]
|
|
|
|
res DAYCAREMAN_MONS_COMPATIBLE_F, [hl]
|
2015-12-19 01:07:09 +00:00
|
|
|
jr .cancel
|
2015-11-17 02:46:36 +00:00
|
|
|
|
2015-12-19 01:07:09 +00:00
|
|
|
.print_text
|
|
|
|
call PrintDayCareText
|
2015-11-17 02:46:36 +00:00
|
|
|
|
2015-12-19 01:07:09 +00:00
|
|
|
.cancel
|
2018-01-17 04:47:45 +00:00
|
|
|
ld a, DAYCARETEXT_COME_AGAIN
|
2015-12-19 01:07:09 +00:00
|
|
|
call PrintDayCareText
|
2015-11-17 02:46:36 +00:00
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
DayCareLady:
|
2017-12-10 18:37:15 +00:00
|
|
|
ld hl, wDayCareLady
|
2018-01-22 18:18:23 +00:00
|
|
|
bit DAYCARELADY_HAS_MON_F, [hl]
|
2015-12-19 01:07:09 +00:00
|
|
|
jr nz, .AskWithdrawMon
|
2017-12-10 18:37:15 +00:00
|
|
|
ld hl, wDayCareLady
|
2015-12-25 03:58:42 +00:00
|
|
|
ld a, DAYCARETEXT_LADY_INTRO
|
2015-12-19 01:07:09 +00:00
|
|
|
call DayCareLadyIntroText
|
|
|
|
jr c, .cancel
|
|
|
|
call DayCareAskDepositPokemon
|
|
|
|
jr c, .print_text
|
2017-12-24 17:47:30 +00:00
|
|
|
farcall DepositMonWithDayCareLady
|
2017-12-10 18:37:15 +00:00
|
|
|
ld hl, wDayCareLady
|
2018-01-22 18:18:23 +00:00
|
|
|
set DAYCARELADY_HAS_MON_F, [hl]
|
2015-12-19 01:07:09 +00:00
|
|
|
call DayCare_DepositPokemonText
|
|
|
|
call DayCare_InitBreeding
|
2015-11-17 02:46:36 +00:00
|
|
|
ret
|
|
|
|
|
2016-04-10 18:42:14 +00:00
|
|
|
.AskWithdrawMon:
|
2017-12-24 17:47:30 +00:00
|
|
|
farcall GetBreedMon2LevelGrowth
|
2015-11-17 02:46:36 +00:00
|
|
|
ld hl, wBreedMon2Nick
|
2015-12-25 03:58:42 +00:00
|
|
|
call GetPriceToRetrieveBreedmon
|
|
|
|
call DayCare_AskWithdrawBreedMon
|
2015-12-19 01:07:09 +00:00
|
|
|
jr c, .print_text
|
2018-02-14 10:51:47 +00:00
|
|
|
farcall RetrieveMonFromDayCareLady
|
2018-01-17 04:47:45 +00:00
|
|
|
call DayCare_GetBackMonForMoney
|
2017-12-10 18:37:15 +00:00
|
|
|
ld hl, wDayCareLady
|
2018-01-22 18:18:23 +00:00
|
|
|
res DAYCARELADY_HAS_MON_F, [hl]
|
2017-12-10 18:37:15 +00:00
|
|
|
ld hl, wDayCareMan
|
2018-01-22 18:18:23 +00:00
|
|
|
res DAYCAREMAN_MONS_COMPATIBLE_F, [hl]
|
2015-12-19 01:07:09 +00:00
|
|
|
jr .cancel
|
2015-11-17 02:46:36 +00:00
|
|
|
|
2015-12-19 01:07:09 +00:00
|
|
|
.print_text
|
|
|
|
call PrintDayCareText
|
2015-11-17 02:46:36 +00:00
|
|
|
|
2015-12-19 01:07:09 +00:00
|
|
|
.cancel
|
2018-01-17 04:47:45 +00:00
|
|
|
ld a, DAYCARETEXT_COME_AGAIN
|
2015-12-19 01:07:09 +00:00
|
|
|
call PrintDayCareText
|
2015-11-17 02:46:36 +00:00
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
DayCareLadyIntroText:
|
2018-01-22 18:18:23 +00:00
|
|
|
bit DAYCARELADY_ACTIVE_F, [hl]
|
2015-12-19 01:07:09 +00:00
|
|
|
jr nz, .okay
|
2018-01-22 18:18:23 +00:00
|
|
|
set DAYCARELADY_ACTIVE_F, [hl]
|
2015-11-17 02:46:36 +00:00
|
|
|
inc a
|
2015-12-19 01:07:09 +00:00
|
|
|
.okay
|
|
|
|
call PrintDayCareText
|
2015-11-17 02:46:36 +00:00
|
|
|
call YesNoBox
|
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
DayCareManIntroText:
|
2018-01-22 18:18:23 +00:00
|
|
|
set DAYCAREMAN_ACTIVE_F, [hl]
|
2015-12-19 01:07:09 +00:00
|
|
|
call PrintDayCareText
|
2015-11-17 02:46:36 +00:00
|
|
|
call YesNoBox
|
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
DayCareAskDepositPokemon:
|
2018-01-23 22:39:09 +00:00
|
|
|
ld a, [wPartyCount]
|
2015-11-17 02:46:36 +00:00
|
|
|
cp 2
|
2015-12-19 01:07:09 +00:00
|
|
|
jr c, .OnlyOneMon
|
2015-12-25 03:58:42 +00:00
|
|
|
ld a, DAYCARETEXT_WHICH_ONE
|
2015-12-19 01:07:09 +00:00
|
|
|
call PrintDayCareText
|
2017-11-30 19:27:25 +00:00
|
|
|
ld b, PARTYMENUACTION_GIVE_MON
|
2017-12-24 17:47:30 +00:00
|
|
|
farcall SelectTradeOrDayCareMon
|
2015-12-19 01:07:09 +00:00
|
|
|
jr c, .Declined
|
2018-01-23 22:39:09 +00:00
|
|
|
ld a, [wCurPartySpecies]
|
2015-11-17 02:46:36 +00:00
|
|
|
cp EGG
|
2015-12-19 01:07:09 +00:00
|
|
|
jr z, .Egg
|
2017-12-24 17:47:30 +00:00
|
|
|
farcall CheckCurPartyMonFainted
|
2015-12-19 01:07:09 +00:00
|
|
|
jr c, .OutOfUsableMons
|
2018-01-23 22:39:09 +00:00
|
|
|
ld hl, wPartyMon1Item
|
2015-11-17 02:46:36 +00:00
|
|
|
ld bc, PARTYMON_STRUCT_LENGTH
|
2018-01-23 22:39:09 +00:00
|
|
|
ld a, [wCurPartyMon]
|
2015-11-17 02:46:36 +00:00
|
|
|
call AddNTimes
|
|
|
|
ld d, [hl]
|
2017-12-24 17:47:30 +00:00
|
|
|
farcall ItemIsMail
|
2015-12-19 01:07:09 +00:00
|
|
|
jr c, .HoldingMail
|
2018-01-23 22:39:09 +00:00
|
|
|
ld hl, wPartyMonNicknames
|
|
|
|
ld a, [wCurPartyMon]
|
2015-11-17 02:46:36 +00:00
|
|
|
call GetNick
|
|
|
|
and a
|
|
|
|
ret
|
|
|
|
|
2016-04-10 18:42:14 +00:00
|
|
|
.Declined:
|
2018-01-17 04:47:45 +00:00
|
|
|
ld a, DAYCARETEXT_OH_FINE
|
2015-11-17 02:46:36 +00:00
|
|
|
scf
|
|
|
|
ret
|
|
|
|
|
2016-04-10 18:42:14 +00:00
|
|
|
.Egg:
|
2015-12-25 03:58:42 +00:00
|
|
|
ld a, DAYCARETEXT_CANT_BREED_EGG
|
2015-11-17 02:46:36 +00:00
|
|
|
scf
|
|
|
|
ret
|
|
|
|
|
2016-04-10 18:42:14 +00:00
|
|
|
.OnlyOneMon:
|
2015-12-25 03:58:42 +00:00
|
|
|
ld a, DAYCARETEXT_LAST_MON
|
2015-11-17 02:46:36 +00:00
|
|
|
scf
|
|
|
|
ret
|
|
|
|
|
2016-04-10 18:42:14 +00:00
|
|
|
.OutOfUsableMons:
|
2015-12-25 03:58:42 +00:00
|
|
|
ld a, DAYCARETEXT_LAST_ALIVE_MON
|
2015-11-17 02:46:36 +00:00
|
|
|
scf
|
|
|
|
ret
|
|
|
|
|
2016-04-10 18:42:14 +00:00
|
|
|
.HoldingMail:
|
2015-12-25 03:58:42 +00:00
|
|
|
ld a, DAYCARETEXT_REMOVE_MAIL
|
2015-11-17 02:46:36 +00:00
|
|
|
scf
|
|
|
|
ret
|
|
|
|
|
2019-10-20 22:24:17 +00:00
|
|
|
.DaycareDummyText:
|
2019-03-11 00:43:34 +00:00
|
|
|
text_far _DaycareDummyText
|
2018-11-17 18:33:03 +00:00
|
|
|
text_end
|
2015-11-17 02:46:36 +00:00
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
DayCare_DepositPokemonText:
|
2015-12-25 03:58:42 +00:00
|
|
|
ld a, DAYCARETEXT_DEPOSIT
|
2015-12-19 01:07:09 +00:00
|
|
|
call PrintDayCareText
|
2018-01-23 22:39:09 +00:00
|
|
|
ld a, [wCurPartySpecies]
|
2018-01-17 04:47:45 +00:00
|
|
|
call PlayMonCry
|
2015-12-25 03:58:42 +00:00
|
|
|
ld a, DAYCARETEXT_COME_BACK_LATER
|
2015-12-19 01:07:09 +00:00
|
|
|
call PrintDayCareText
|
2015-11-17 02:46:36 +00:00
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
DayCare_AskWithdrawBreedMon:
|
2018-01-23 22:39:09 +00:00
|
|
|
ld a, [wStringBuffer2 + 1]
|
2015-11-17 02:46:36 +00:00
|
|
|
and a
|
2015-12-25 03:58:42 +00:00
|
|
|
jr nz, .grew_at_least_one_level
|
2018-01-17 04:47:45 +00:00
|
|
|
ld a, DAYCARETEXT_TOO_SOON
|
2015-12-19 01:07:09 +00:00
|
|
|
call PrintDayCareText
|
2015-11-17 02:46:36 +00:00
|
|
|
call YesNoBox
|
2015-12-25 03:58:42 +00:00
|
|
|
jr c, .refused
|
|
|
|
jr .check_money
|
2015-11-17 02:46:36 +00:00
|
|
|
|
2015-12-25 03:58:42 +00:00
|
|
|
.grew_at_least_one_level
|
|
|
|
ld a, DAYCARETEXT_GENIUSES
|
2015-12-19 01:07:09 +00:00
|
|
|
call PrintDayCareText
|
2015-11-17 02:46:36 +00:00
|
|
|
call YesNoBox
|
2015-12-25 03:58:42 +00:00
|
|
|
jr c, .refused
|
|
|
|
ld a, DAYCARETEXT_ASK_WITHDRAW
|
2015-12-19 01:07:09 +00:00
|
|
|
call PrintDayCareText
|
2015-11-17 02:46:36 +00:00
|
|
|
call YesNoBox
|
2015-12-25 03:58:42 +00:00
|
|
|
jr c, .refused
|
2015-11-17 02:46:36 +00:00
|
|
|
|
2015-12-25 03:58:42 +00:00
|
|
|
.check_money
|
2018-01-23 22:39:09 +00:00
|
|
|
ld de, wMoney
|
|
|
|
ld bc, wStringBuffer2 + 2
|
2017-12-24 17:47:30 +00:00
|
|
|
farcall CompareMoney
|
2015-12-25 03:58:42 +00:00
|
|
|
jr c, .not_enough_money
|
2018-01-23 22:39:09 +00:00
|
|
|
ld a, [wPartyCount]
|
2015-12-25 03:58:42 +00:00
|
|
|
cp PARTY_LENGTH
|
2019-10-20 22:24:17 +00:00
|
|
|
jr nc, .party_full
|
2015-11-17 02:46:36 +00:00
|
|
|
and a
|
|
|
|
ret
|
|
|
|
|
2015-12-25 03:58:42 +00:00
|
|
|
.refused
|
2018-01-17 04:47:45 +00:00
|
|
|
ld a, DAYCARETEXT_OH_FINE
|
2015-11-17 02:46:36 +00:00
|
|
|
scf
|
|
|
|
ret
|
|
|
|
|
2015-12-25 03:58:42 +00:00
|
|
|
.not_enough_money
|
2018-01-17 04:47:45 +00:00
|
|
|
ld a, DAYCARETEXT_NOT_ENOUGH_MONEY
|
2015-11-17 02:46:36 +00:00
|
|
|
scf
|
|
|
|
ret
|
|
|
|
|
2019-10-20 22:24:17 +00:00
|
|
|
.party_full
|
2018-01-17 04:47:45 +00:00
|
|
|
ld a, DAYCARETEXT_PARTY_FULL
|
2015-11-17 02:46:36 +00:00
|
|
|
scf
|
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
DayCare_GetBackMonForMoney:
|
2018-01-23 22:39:09 +00:00
|
|
|
ld bc, wStringBuffer2 + 2
|
|
|
|
ld de, wMoney
|
2017-12-24 17:47:30 +00:00
|
|
|
farcall TakeMoney
|
2015-12-25 03:58:42 +00:00
|
|
|
ld a, DAYCARETEXT_WITHDRAW
|
2015-12-19 01:07:09 +00:00
|
|
|
call PrintDayCareText
|
2018-01-23 22:39:09 +00:00
|
|
|
ld a, [wCurPartySpecies]
|
2018-01-17 04:47:45 +00:00
|
|
|
call PlayMonCry
|
|
|
|
ld a, DAYCARETEXT_GOT_BACK
|
2015-12-19 01:07:09 +00:00
|
|
|
call PrintDayCareText
|
2015-11-17 02:46:36 +00:00
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
GetPriceToRetrieveBreedmon:
|
2015-11-17 02:46:36 +00:00
|
|
|
ld a, b
|
2018-01-23 22:39:09 +00:00
|
|
|
ld [wStringBuffer2], a
|
2015-11-17 02:46:36 +00:00
|
|
|
ld a, d
|
2018-01-23 22:39:09 +00:00
|
|
|
ld [wStringBuffer2 + 1], a
|
|
|
|
ld de, wStringBuffer1
|
2015-11-17 02:46:36 +00:00
|
|
|
ld bc, NAME_LENGTH
|
|
|
|
call CopyBytes
|
|
|
|
ld hl, 0
|
2015-12-25 03:58:42 +00:00
|
|
|
ld bc, 100
|
2018-01-23 22:39:09 +00:00
|
|
|
ld a, [wStringBuffer2 + 1]
|
2015-11-17 02:46:36 +00:00
|
|
|
call AddNTimes
|
2015-12-25 03:58:42 +00:00
|
|
|
ld de, 100
|
2015-11-17 02:46:36 +00:00
|
|
|
add hl, de
|
|
|
|
xor a
|
2018-01-23 22:39:09 +00:00
|
|
|
ld [wStringBuffer2 + 2], a
|
2015-11-17 02:46:36 +00:00
|
|
|
ld a, h
|
2018-01-23 22:39:09 +00:00
|
|
|
ld [wStringBuffer2 + 3], a
|
2015-11-17 02:46:36 +00:00
|
|
|
ld a, l
|
2018-01-23 22:39:09 +00:00
|
|
|
ld [wStringBuffer2 + 4], a
|
2015-11-17 02:46:36 +00:00
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
PrintDayCareText:
|
2015-11-17 02:46:36 +00:00
|
|
|
ld e, a
|
|
|
|
ld d, 0
|
2015-12-25 03:58:42 +00:00
|
|
|
ld hl, .TextTable
|
2015-11-17 02:46:36 +00:00
|
|
|
add hl, de
|
2015-12-27 02:59:03 +00:00
|
|
|
add hl, de
|
2015-11-17 02:46:36 +00:00
|
|
|
ld a, [hli]
|
|
|
|
ld h, [hl]
|
|
|
|
ld l, a
|
|
|
|
call PrintText
|
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
.TextTable:
|
2018-01-17 04:47:45 +00:00
|
|
|
; entries correspond to DAYCARETEXT_* constants
|
2019-10-20 22:24:17 +00:00
|
|
|
dw .DayCareManIntroText ; 00
|
|
|
|
dw .DayCareManOddEggText ; 01
|
|
|
|
dw .DayCareLadyIntroText ; 02
|
|
|
|
dw .DayCareLadyOddEggText ; 03
|
|
|
|
dw .WhatShouldIRaiseText ; 04
|
|
|
|
dw .IllRaiseYourMonText ; 05
|
|
|
|
dw .CantAcceptEggText ; 06
|
|
|
|
dw .OnlyOneMonText ; 07
|
|
|
|
dw .LastHealthyMonText ; 08
|
|
|
|
dw .ComeBackLaterText ; 09
|
|
|
|
dw .RemoveMailText ; 0a
|
|
|
|
dw .AreWeGeniusesText ; 0b
|
|
|
|
dw .YourMonHasGrownText ; 0c
|
|
|
|
dw .PerfectHeresYourMonText ; 0d
|
|
|
|
dw .GotBackMonText ; 0e
|
|
|
|
dw .BackAlreadyText ; 0f
|
|
|
|
dw .HaveNoRoomText ; 10
|
|
|
|
dw .NotEnoughMoneyText ; 11
|
|
|
|
dw .OhFineThenText ; 12
|
|
|
|
dw .ComeAgainText ; 13
|
|
|
|
|
|
|
|
.DayCareManIntroText:
|
2019-03-11 00:43:34 +00:00
|
|
|
text_far _DayCareManIntroText
|
2018-11-17 18:33:03 +00:00
|
|
|
text_end
|
2015-11-17 02:46:36 +00:00
|
|
|
|
2019-10-20 22:24:17 +00:00
|
|
|
.DayCareManOddEggText:
|
2019-03-11 00:43:34 +00:00
|
|
|
text_far _DayCareManOddEggText
|
2018-11-17 18:33:03 +00:00
|
|
|
text_end
|
2015-11-17 02:46:36 +00:00
|
|
|
|
2019-10-20 22:24:17 +00:00
|
|
|
.DayCareLadyIntroText:
|
2019-03-11 00:43:34 +00:00
|
|
|
text_far _DayCareLadyIntroText
|
2018-11-17 18:33:03 +00:00
|
|
|
text_end
|
2015-11-17 02:46:36 +00:00
|
|
|
|
2019-10-20 22:24:17 +00:00
|
|
|
.DayCareLadyOddEggText:
|
2019-03-11 00:43:34 +00:00
|
|
|
text_far _DayCareLadyOddEggText
|
2018-11-17 18:33:03 +00:00
|
|
|
text_end
|
2015-11-17 02:46:36 +00:00
|
|
|
|
2019-10-20 22:24:17 +00:00
|
|
|
.WhatShouldIRaiseText:
|
2019-03-11 00:43:34 +00:00
|
|
|
text_far _WhatShouldIRaiseText
|
2018-11-17 18:33:03 +00:00
|
|
|
text_end
|
2015-11-17 02:46:36 +00:00
|
|
|
|
2019-10-20 22:24:17 +00:00
|
|
|
.OnlyOneMonText:
|
2019-03-11 00:43:34 +00:00
|
|
|
text_far _OnlyOneMonText
|
2018-11-17 18:33:03 +00:00
|
|
|
text_end
|
2015-11-17 02:46:36 +00:00
|
|
|
|
2019-10-20 22:24:17 +00:00
|
|
|
.CantAcceptEggText:
|
|
|
|
text_far _CantAcceptEggText
|
2018-11-17 18:33:03 +00:00
|
|
|
text_end
|
2015-11-17 02:46:36 +00:00
|
|
|
|
2019-10-20 22:24:17 +00:00
|
|
|
.RemoveMailText:
|
2019-03-11 00:43:34 +00:00
|
|
|
text_far _RemoveMailText
|
2018-11-17 18:33:03 +00:00
|
|
|
text_end
|
2015-11-17 02:46:36 +00:00
|
|
|
|
2019-10-20 22:24:17 +00:00
|
|
|
.LastHealthyMonText:
|
2019-03-11 00:43:34 +00:00
|
|
|
text_far _LastHealthyMonText
|
2018-11-17 18:33:03 +00:00
|
|
|
text_end
|
2015-11-17 02:46:36 +00:00
|
|
|
|
2019-10-20 22:24:17 +00:00
|
|
|
.IllRaiseYourMonText:
|
2019-03-11 00:43:34 +00:00
|
|
|
text_far _IllRaiseYourMonText
|
2018-11-17 18:33:03 +00:00
|
|
|
text_end
|
2015-11-17 02:46:36 +00:00
|
|
|
|
2019-10-20 22:24:17 +00:00
|
|
|
.ComeBackLaterText:
|
2019-03-11 00:43:34 +00:00
|
|
|
text_far _ComeBackLaterText
|
2018-11-17 18:33:03 +00:00
|
|
|
text_end
|
2015-11-17 02:46:36 +00:00
|
|
|
|
2019-10-20 22:24:17 +00:00
|
|
|
.AreWeGeniusesText:
|
2019-03-11 00:43:34 +00:00
|
|
|
text_far _AreWeGeniusesText
|
2018-11-17 18:33:03 +00:00
|
|
|
text_end
|
2015-11-17 02:46:36 +00:00
|
|
|
|
2019-10-20 22:24:17 +00:00
|
|
|
.YourMonHasGrownText:
|
2019-03-11 00:43:34 +00:00
|
|
|
text_far _YourMonHasGrownText
|
2018-11-17 18:33:03 +00:00
|
|
|
text_end
|
2015-11-17 02:46:36 +00:00
|
|
|
|
2019-10-20 22:24:17 +00:00
|
|
|
.PerfectHeresYourMonText:
|
2019-03-11 00:43:34 +00:00
|
|
|
text_far _PerfectHeresYourMonText
|
2018-11-17 18:33:03 +00:00
|
|
|
text_end
|
2015-11-17 02:46:36 +00:00
|
|
|
|
2019-10-20 22:24:17 +00:00
|
|
|
.GotBackMonText:
|
2019-03-11 00:43:34 +00:00
|
|
|
text_far _GotBackMonText
|
2018-11-17 18:33:03 +00:00
|
|
|
text_end
|
2015-11-17 02:46:36 +00:00
|
|
|
|
2019-10-20 22:24:17 +00:00
|
|
|
.BackAlreadyText:
|
2019-03-11 00:43:34 +00:00
|
|
|
text_far _BackAlreadyText
|
2018-11-17 18:33:03 +00:00
|
|
|
text_end
|
2015-11-17 02:46:36 +00:00
|
|
|
|
2019-10-20 22:24:17 +00:00
|
|
|
.HaveNoRoomText:
|
2019-03-11 00:43:34 +00:00
|
|
|
text_far _HaveNoRoomText
|
2018-11-17 18:33:03 +00:00
|
|
|
text_end
|
2015-11-17 02:46:36 +00:00
|
|
|
|
2019-10-20 22:24:17 +00:00
|
|
|
.NotEnoughMoneyText:
|
|
|
|
text_far _NotEnoughMoneyText
|
2018-11-17 18:33:03 +00:00
|
|
|
text_end
|
2015-11-17 02:46:36 +00:00
|
|
|
|
2019-10-20 22:24:17 +00:00
|
|
|
.OhFineThenText:
|
2019-03-11 00:43:34 +00:00
|
|
|
text_far _OhFineThenText
|
2018-11-17 18:33:03 +00:00
|
|
|
text_end
|
2015-11-17 02:46:36 +00:00
|
|
|
|
2019-10-20 22:24:17 +00:00
|
|
|
.ComeAgainText:
|
2019-03-11 00:43:34 +00:00
|
|
|
text_far _ComeAgainText
|
2018-11-17 18:33:03 +00:00
|
|
|
text_end
|
2015-11-17 02:46:36 +00:00
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
DayCareManOutside:
|
2017-12-10 18:37:15 +00:00
|
|
|
ld hl, wDayCareMan
|
2018-01-22 18:18:23 +00:00
|
|
|
bit DAYCAREMAN_HAS_EGG_F, [hl]
|
2015-12-19 01:07:09 +00:00
|
|
|
jr nz, .AskGiveEgg
|
2019-10-20 22:24:17 +00:00
|
|
|
ld hl, .NotYetText
|
2015-11-17 02:46:36 +00:00
|
|
|
call PrintText
|
|
|
|
ret
|
|
|
|
|
2019-10-20 22:24:17 +00:00
|
|
|
.NotYetText:
|
2019-03-11 00:43:34 +00:00
|
|
|
text_far _NotYetText
|
2018-11-17 18:33:03 +00:00
|
|
|
text_end
|
2015-11-17 02:46:36 +00:00
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
.AskGiveEgg:
|
2019-10-20 22:24:17 +00:00
|
|
|
ld hl, .FoundAnEggText
|
2015-11-17 02:46:36 +00:00
|
|
|
call PrintText
|
|
|
|
call YesNoBox
|
2015-12-19 01:07:09 +00:00
|
|
|
jr c, .Declined
|
2018-01-23 22:39:09 +00:00
|
|
|
ld a, [wPartyCount]
|
2015-11-17 02:46:36 +00:00
|
|
|
cp PARTY_LENGTH
|
2015-12-19 01:07:09 +00:00
|
|
|
jr nc, .PartyFull
|
|
|
|
call DayCare_GiveEgg
|
2017-12-10 18:37:15 +00:00
|
|
|
ld hl, wDayCareMan
|
2018-01-22 18:18:23 +00:00
|
|
|
res DAYCAREMAN_HAS_EGG_F, [hl]
|
2015-12-19 01:07:09 +00:00
|
|
|
call DayCare_InitBreeding
|
2019-10-20 22:24:17 +00:00
|
|
|
ld hl, .ReceivedEggText
|
2015-11-17 02:46:36 +00:00
|
|
|
call PrintText
|
2019-09-23 17:03:19 +00:00
|
|
|
ld de, SFX_GET_EGG
|
2015-11-17 02:46:36 +00:00
|
|
|
call PlaySFX
|
|
|
|
ld c, 120
|
|
|
|
call DelayFrames
|
2019-10-20 22:24:17 +00:00
|
|
|
ld hl, .TakeGoodCareOfEggText
|
2015-12-19 01:07:09 +00:00
|
|
|
jr .Load0
|
2015-11-17 02:46:36 +00:00
|
|
|
|
2016-04-10 18:42:14 +00:00
|
|
|
.Declined:
|
2015-12-19 01:07:09 +00:00
|
|
|
ld hl, .IllKeepItThanksText
|
2015-11-17 02:46:36 +00:00
|
|
|
|
2016-04-10 18:42:14 +00:00
|
|
|
.Load0:
|
2015-11-17 02:46:36 +00:00
|
|
|
call PrintText
|
2018-01-12 06:40:20 +00:00
|
|
|
xor a ; FALSE
|
2018-01-23 22:39:09 +00:00
|
|
|
ld [wScriptVar], a
|
2015-11-17 02:46:36 +00:00
|
|
|
ret
|
|
|
|
|
2016-04-10 18:42:14 +00:00
|
|
|
.PartyFull:
|
2019-10-20 22:24:17 +00:00
|
|
|
ld hl, .NoRoomForEggText
|
2015-11-17 02:46:36 +00:00
|
|
|
call PrintText
|
2018-01-12 06:40:20 +00:00
|
|
|
ld a, TRUE
|
2018-01-23 22:39:09 +00:00
|
|
|
ld [wScriptVar], a
|
2015-11-17 02:46:36 +00:00
|
|
|
ret
|
|
|
|
|
2019-10-20 22:24:17 +00:00
|
|
|
.FoundAnEggText:
|
2019-03-11 00:43:34 +00:00
|
|
|
text_far _FoundAnEggText
|
2018-11-17 18:33:03 +00:00
|
|
|
text_end
|
2015-11-17 02:46:36 +00:00
|
|
|
|
2019-10-20 22:24:17 +00:00
|
|
|
.ReceivedEggText:
|
2019-03-11 00:43:34 +00:00
|
|
|
text_far _ReceivedEggText
|
2018-11-17 18:33:03 +00:00
|
|
|
text_end
|
2015-11-17 02:46:36 +00:00
|
|
|
|
2019-10-20 22:24:17 +00:00
|
|
|
.TakeGoodCareOfEggText:
|
2019-03-11 00:43:34 +00:00
|
|
|
text_far _TakeGoodCareOfEggText
|
2018-11-17 18:33:03 +00:00
|
|
|
text_end
|
2015-11-17 02:46:36 +00:00
|
|
|
|
2018-06-25 00:10:37 +00:00
|
|
|
.IllKeepItThanksText:
|
2019-10-20 22:24:17 +00:00
|
|
|
text_far _IllKeepItThanksText
|
2018-11-17 18:33:03 +00:00
|
|
|
text_end
|
2015-11-17 02:46:36 +00:00
|
|
|
|
2019-10-20 22:24:17 +00:00
|
|
|
.NoRoomForEggText:
|
2019-03-11 00:43:34 +00:00
|
|
|
text_far _NoRoomForEggText
|
2018-11-17 18:33:03 +00:00
|
|
|
text_end
|
2015-11-17 02:46:36 +00:00
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
DayCare_GiveEgg:
|
2015-11-17 02:46:36 +00:00
|
|
|
ld a, [wEggMonLevel]
|
2018-01-23 22:39:09 +00:00
|
|
|
ld [wCurPartyLevel], a
|
|
|
|
ld hl, wPartyCount
|
2015-11-17 02:46:36 +00:00
|
|
|
ld a, [hl]
|
|
|
|
cp PARTY_LENGTH
|
2015-12-19 01:07:09 +00:00
|
|
|
jr nc, .PartyFull
|
2015-11-17 02:46:36 +00:00
|
|
|
inc a
|
|
|
|
ld [hl], a
|
2015-12-19 01:07:09 +00:00
|
|
|
|
2015-11-17 02:46:36 +00:00
|
|
|
ld c, a
|
|
|
|
ld b, 0
|
|
|
|
add hl, bc
|
|
|
|
ld a, EGG
|
|
|
|
ld [hli], a
|
|
|
|
ld a, [wEggMonSpecies]
|
2018-01-23 22:39:09 +00:00
|
|
|
ld [wCurSpecies], a
|
|
|
|
ld [wCurPartySpecies], a
|
2015-12-19 01:07:09 +00:00
|
|
|
ld a, -1
|
2015-11-17 02:46:36 +00:00
|
|
|
ld [hl], a
|
2015-12-19 01:07:09 +00:00
|
|
|
|
2018-01-23 22:39:09 +00:00
|
|
|
ld hl, wPartyMonNicknames
|
2018-01-20 17:25:55 +00:00
|
|
|
ld bc, MON_NAME_LENGTH
|
2015-12-19 01:07:09 +00:00
|
|
|
call DayCare_GetCurrentPartyMember
|
2015-11-17 02:46:36 +00:00
|
|
|
ld hl, wEggNick
|
|
|
|
call CopyBytes
|
2015-12-19 01:07:09 +00:00
|
|
|
|
2018-01-23 22:39:09 +00:00
|
|
|
ld hl, wPartyMonOT
|
2015-11-17 02:46:36 +00:00
|
|
|
ld bc, NAME_LENGTH
|
2015-12-19 01:07:09 +00:00
|
|
|
call DayCare_GetCurrentPartyMember
|
2015-11-17 02:46:36 +00:00
|
|
|
ld hl, wEggOT
|
|
|
|
call CopyBytes
|
2015-12-19 01:07:09 +00:00
|
|
|
|
2018-01-23 22:39:09 +00:00
|
|
|
ld hl, wPartyMon1
|
2015-11-17 02:46:36 +00:00
|
|
|
ld bc, PARTYMON_STRUCT_LENGTH
|
2015-12-19 01:07:09 +00:00
|
|
|
call DayCare_GetCurrentPartyMember
|
2015-11-17 02:46:36 +00:00
|
|
|
ld hl, wEggMon
|
2020-06-29 16:25:58 +00:00
|
|
|
ld bc, BOXMON_STRUCT_LENGTH
|
2015-11-17 02:46:36 +00:00
|
|
|
call CopyBytes
|
2015-12-19 01:07:09 +00:00
|
|
|
|
2015-11-17 02:46:36 +00:00
|
|
|
call GetBaseData
|
2018-01-23 22:39:09 +00:00
|
|
|
ld a, [wPartyCount]
|
2015-11-17 02:46:36 +00:00
|
|
|
dec a
|
2018-01-23 22:39:09 +00:00
|
|
|
ld hl, wPartyMon1
|
2015-11-17 02:46:36 +00:00
|
|
|
ld bc, PARTYMON_STRUCT_LENGTH
|
|
|
|
call AddNTimes
|
|
|
|
ld b, h
|
|
|
|
ld c, l
|
|
|
|
ld hl, MON_ID + 1
|
|
|
|
add hl, bc
|
|
|
|
push hl
|
|
|
|
ld hl, MON_MAXHP
|
|
|
|
add hl, bc
|
|
|
|
ld d, h
|
|
|
|
ld e, l
|
|
|
|
pop hl
|
|
|
|
push bc
|
2018-02-22 17:12:43 +00:00
|
|
|
ld b, FALSE
|
2018-02-22 16:13:29 +00:00
|
|
|
predef CalcMonStats
|
2015-11-17 02:46:36 +00:00
|
|
|
pop bc
|
|
|
|
ld hl, MON_HP
|
|
|
|
add hl, bc
|
|
|
|
xor a
|
|
|
|
ld [hli], a
|
|
|
|
ld [hl], a
|
|
|
|
and a
|
|
|
|
ret
|
|
|
|
|
2016-04-10 18:42:14 +00:00
|
|
|
.PartyFull:
|
2015-11-17 02:46:36 +00:00
|
|
|
scf
|
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
DayCare_GetCurrentPartyMember:
|
2018-01-23 22:39:09 +00:00
|
|
|
ld a, [wPartyCount]
|
2015-11-17 02:46:36 +00:00
|
|
|
dec a
|
|
|
|
call AddNTimes
|
|
|
|
ld d, h
|
|
|
|
ld e, l
|
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
DayCare_InitBreeding:
|
2017-12-10 18:37:15 +00:00
|
|
|
ld a, [wDayCareLady]
|
2018-01-22 18:18:23 +00:00
|
|
|
bit DAYCARELADY_HAS_MON_F, a
|
2015-11-17 02:46:36 +00:00
|
|
|
ret z
|
2017-12-10 18:37:15 +00:00
|
|
|
ld a, [wDayCareMan]
|
2018-01-22 18:18:23 +00:00
|
|
|
bit DAYCAREMAN_HAS_MON_F, a
|
2015-11-17 02:46:36 +00:00
|
|
|
ret z
|
2017-12-24 17:47:30 +00:00
|
|
|
callfar CheckBreedmonCompatibility
|
2018-07-28 23:27:34 +00:00
|
|
|
ld a, [wBreedingCompatibility]
|
2015-11-17 02:46:36 +00:00
|
|
|
and a
|
|
|
|
ret z
|
|
|
|
inc a
|
|
|
|
ret z
|
2017-12-10 18:37:15 +00:00
|
|
|
ld hl, wDayCareMan
|
2018-01-22 18:18:23 +00:00
|
|
|
set DAYCAREMAN_MONS_COMPATIBLE_F, [hl]
|
2015-12-19 01:07:09 +00:00
|
|
|
.loop
|
2015-11-17 02:46:36 +00:00
|
|
|
call Random
|
|
|
|
cp 150
|
2015-12-19 01:07:09 +00:00
|
|
|
jr c, .loop
|
2015-11-17 02:46:36 +00:00
|
|
|
ld [wStepsToEgg], a
|
2015-12-19 01:07:09 +00:00
|
|
|
jp .UselessJump
|
2015-11-17 02:46:36 +00:00
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
.UselessJump:
|
2015-11-17 02:46:36 +00:00
|
|
|
xor a
|
|
|
|
ld hl, wEggMon
|
2020-06-29 16:25:58 +00:00
|
|
|
ld bc, BOXMON_STRUCT_LENGTH
|
2015-11-17 02:46:36 +00:00
|
|
|
call ByteFill
|
|
|
|
ld hl, wEggNick
|
2018-01-20 17:25:55 +00:00
|
|
|
ld bc, MON_NAME_LENGTH
|
2015-11-17 02:46:36 +00:00
|
|
|
call ByteFill
|
|
|
|
ld hl, wEggOT
|
|
|
|
ld bc, NAME_LENGTH
|
|
|
|
call ByteFill
|
|
|
|
ld a, [wBreedMon1DVs]
|
2018-01-23 22:39:09 +00:00
|
|
|
ld [wTempMonDVs], a
|
2015-11-17 02:46:36 +00:00
|
|
|
ld a, [wBreedMon1DVs + 1]
|
2018-01-23 22:39:09 +00:00
|
|
|
ld [wTempMonDVs + 1], a
|
2015-11-17 02:46:36 +00:00
|
|
|
ld a, [wBreedMon1Species]
|
2018-01-23 22:39:09 +00:00
|
|
|
ld [wCurPartySpecies], a
|
2015-11-17 02:46:36 +00:00
|
|
|
ld a, $3
|
2018-01-23 22:39:09 +00:00
|
|
|
ld [wMonType], a
|
2015-11-17 02:46:36 +00:00
|
|
|
ld a, [wBreedMon1Species]
|
|
|
|
cp DITTO
|
|
|
|
ld a, $1
|
2015-12-19 01:07:09 +00:00
|
|
|
jr z, .LoadWhichBreedmonIsTheMother
|
2015-11-17 02:46:36 +00:00
|
|
|
ld a, [wBreedMon2Species]
|
|
|
|
cp DITTO
|
|
|
|
ld a, $0
|
2015-12-19 01:07:09 +00:00
|
|
|
jr z, .LoadWhichBreedmonIsTheMother
|
2018-01-16 19:30:10 +00:00
|
|
|
farcall GetGender
|
2015-11-17 02:46:36 +00:00
|
|
|
ld a, $0
|
2015-12-19 01:07:09 +00:00
|
|
|
jr z, .LoadWhichBreedmonIsTheMother
|
2015-11-17 02:46:36 +00:00
|
|
|
inc a
|
|
|
|
|
2016-04-10 18:42:14 +00:00
|
|
|
.LoadWhichBreedmonIsTheMother:
|
2015-12-19 01:07:09 +00:00
|
|
|
ld [wBreedMotherOrNonDitto], a
|
2015-11-17 02:46:36 +00:00
|
|
|
and a
|
|
|
|
ld a, [wBreedMon1Species]
|
2015-12-19 01:07:09 +00:00
|
|
|
jr z, .GotMother
|
2015-11-17 02:46:36 +00:00
|
|
|
ld a, [wBreedMon2Species]
|
|
|
|
|
2016-04-10 18:42:14 +00:00
|
|
|
.GotMother:
|
2018-01-23 22:39:09 +00:00
|
|
|
ld [wCurPartySpecies], a
|
2017-12-24 17:47:30 +00:00
|
|
|
callfar GetPreEvolution
|
|
|
|
callfar GetPreEvolution
|
2015-11-17 02:46:36 +00:00
|
|
|
ld a, EGG_LEVEL
|
2018-01-23 22:39:09 +00:00
|
|
|
ld [wCurPartyLevel], a
|
2015-11-17 02:46:36 +00:00
|
|
|
|
2018-01-22 18:18:23 +00:00
|
|
|
; Nidoran♀ can give birth to either gender of Nidoran
|
2018-01-23 22:39:09 +00:00
|
|
|
ld a, [wCurPartySpecies]
|
2015-11-17 02:46:36 +00:00
|
|
|
cp NIDORAN_F
|
2015-12-19 01:07:09 +00:00
|
|
|
jr nz, .GotEggSpecies
|
2015-11-17 02:46:36 +00:00
|
|
|
call Random
|
2018-02-05 02:21:34 +00:00
|
|
|
cp 50 percent + 1
|
2015-11-17 02:46:36 +00:00
|
|
|
ld a, NIDORAN_F
|
2015-12-19 01:07:09 +00:00
|
|
|
jr c, .GotEggSpecies
|
2015-11-17 02:46:36 +00:00
|
|
|
ld a, NIDORAN_M
|
2016-04-10 18:42:14 +00:00
|
|
|
.GotEggSpecies:
|
2018-01-23 22:39:09 +00:00
|
|
|
ld [wCurPartySpecies], a
|
|
|
|
ld [wCurSpecies], a
|
2015-11-17 02:46:36 +00:00
|
|
|
ld [wEggMonSpecies], a
|
|
|
|
|
|
|
|
call GetBaseData
|
|
|
|
ld hl, wEggNick
|
2015-12-19 01:07:09 +00:00
|
|
|
ld de, .String_EGG
|
2015-11-17 02:46:36 +00:00
|
|
|
call CopyName2
|
2018-01-23 22:39:09 +00:00
|
|
|
ld hl, wPlayerName
|
2015-11-17 02:46:36 +00:00
|
|
|
ld de, wEggOT
|
|
|
|
ld bc, NAME_LENGTH
|
|
|
|
call CopyBytes
|
|
|
|
xor a
|
|
|
|
ld [wEggMonItem], a
|
|
|
|
ld de, wEggMonMoves
|
|
|
|
xor a
|
2018-01-23 22:39:09 +00:00
|
|
|
ld [wBuffer1], a
|
2018-01-16 19:30:10 +00:00
|
|
|
predef FillMoves
|
2017-12-24 17:47:30 +00:00
|
|
|
farcall InitEggMoves
|
2015-11-17 02:46:36 +00:00
|
|
|
ld hl, wEggMonID
|
2018-01-23 22:39:09 +00:00
|
|
|
ld a, [wPlayerID]
|
2015-11-17 02:46:36 +00:00
|
|
|
ld [hli], a
|
2018-01-23 22:39:09 +00:00
|
|
|
ld a, [wPlayerID + 1]
|
2015-11-17 02:46:36 +00:00
|
|
|
ld [hl], a
|
2018-01-23 22:39:09 +00:00
|
|
|
ld a, [wCurPartyLevel]
|
2015-11-17 02:46:36 +00:00
|
|
|
ld d, a
|
2017-12-24 17:47:30 +00:00
|
|
|
callfar CalcExpAtLevel
|
2015-11-17 02:46:36 +00:00
|
|
|
ld hl, wEggMonExp
|
2018-08-25 18:28:22 +00:00
|
|
|
ldh a, [hMultiplicand]
|
2015-11-17 02:46:36 +00:00
|
|
|
ld [hli], a
|
2018-08-25 18:28:22 +00:00
|
|
|
ldh a, [hMultiplicand + 1]
|
2015-11-17 02:46:36 +00:00
|
|
|
ld [hli], a
|
2018-08-25 18:28:22 +00:00
|
|
|
ldh a, [hMultiplicand + 2]
|
2015-11-17 02:46:36 +00:00
|
|
|
ld [hl], a
|
|
|
|
xor a
|
2015-12-19 01:07:09 +00:00
|
|
|
ld b, wEggMonDVs - wEggMonStatExp
|
2015-11-17 02:46:36 +00:00
|
|
|
ld hl, wEggMonStatExp
|
2015-12-19 01:07:09 +00:00
|
|
|
.loop2
|
2015-11-17 02:46:36 +00:00
|
|
|
ld [hli], a
|
|
|
|
dec b
|
2015-12-19 01:07:09 +00:00
|
|
|
jr nz, .loop2
|
2015-11-17 02:46:36 +00:00
|
|
|
ld hl, wEggMonDVs
|
|
|
|
call Random
|
|
|
|
ld [hli], a
|
2018-01-23 22:39:09 +00:00
|
|
|
ld [wTempMonDVs], a
|
2015-11-17 02:46:36 +00:00
|
|
|
call Random
|
|
|
|
ld [hld], a
|
2018-01-23 22:39:09 +00:00
|
|
|
ld [wTempMonDVs + 1], a
|
2015-11-17 02:46:36 +00:00
|
|
|
ld de, wBreedMon1DVs
|
|
|
|
ld a, [wBreedMon1Species]
|
|
|
|
cp DITTO
|
2015-12-19 01:07:09 +00:00
|
|
|
jr z, .GotDVs
|
2015-11-17 02:46:36 +00:00
|
|
|
ld de, wBreedMon2DVs
|
|
|
|
ld a, [wBreedMon2Species]
|
|
|
|
cp DITTO
|
2015-12-19 01:07:09 +00:00
|
|
|
jr z, .GotDVs
|
2016-05-11 21:16:03 +00:00
|
|
|
ld a, TEMPMON
|
2018-01-23 22:39:09 +00:00
|
|
|
ld [wMonType], a
|
2015-11-17 02:46:36 +00:00
|
|
|
push hl
|
2018-01-16 19:30:10 +00:00
|
|
|
farcall GetGender
|
2015-11-17 02:46:36 +00:00
|
|
|
pop hl
|
|
|
|
ld de, wBreedMon1DVs
|
|
|
|
ld bc, wBreedMon2DVs
|
2015-12-19 01:07:09 +00:00
|
|
|
jr c, .SkipDVs
|
|
|
|
jr z, .ParentCheck2
|
|
|
|
ld a, [wBreedMotherOrNonDitto]
|
2015-11-17 02:46:36 +00:00
|
|
|
and a
|
2015-12-19 01:07:09 +00:00
|
|
|
jr z, .GotDVs
|
2015-11-17 02:46:36 +00:00
|
|
|
ld d, b
|
|
|
|
ld e, c
|
2015-12-19 01:07:09 +00:00
|
|
|
jr .GotDVs
|
2015-11-17 02:46:36 +00:00
|
|
|
|
2016-04-10 18:42:14 +00:00
|
|
|
.ParentCheck2:
|
2015-12-19 01:07:09 +00:00
|
|
|
ld a, [wBreedMotherOrNonDitto]
|
2015-11-17 02:46:36 +00:00
|
|
|
and a
|
2015-12-19 01:07:09 +00:00
|
|
|
jr nz, .GotDVs
|
2015-11-17 02:46:36 +00:00
|
|
|
ld d, b
|
|
|
|
ld e, c
|
|
|
|
|
2016-04-10 18:42:14 +00:00
|
|
|
.GotDVs:
|
2015-11-17 02:46:36 +00:00
|
|
|
ld a, [de]
|
|
|
|
inc de
|
|
|
|
and $f
|
|
|
|
ld b, a
|
|
|
|
ld a, [hl]
|
|
|
|
and $f0
|
|
|
|
add b
|
|
|
|
ld [hli], a
|
|
|
|
ld a, [de]
|
|
|
|
and $7
|
|
|
|
ld b, a
|
|
|
|
ld a, [hl]
|
|
|
|
and $f8
|
|
|
|
add b
|
|
|
|
ld [hl], a
|
|
|
|
|
2016-04-10 18:42:14 +00:00
|
|
|
.SkipDVs:
|
2018-01-23 22:39:09 +00:00
|
|
|
ld hl, wStringBuffer1
|
2015-12-19 01:07:09 +00:00
|
|
|
ld de, wMonOrItemNameBuffer
|
2015-11-17 02:46:36 +00:00
|
|
|
ld bc, NAME_LENGTH
|
|
|
|
call CopyBytes
|
|
|
|
ld hl, wEggMonMoves
|
|
|
|
ld de, wEggMonPP
|
2018-01-16 19:30:10 +00:00
|
|
|
predef FillPP
|
2015-12-19 01:07:09 +00:00
|
|
|
ld hl, wMonOrItemNameBuffer
|
2018-01-23 22:39:09 +00:00
|
|
|
ld de, wStringBuffer1
|
2015-11-17 02:46:36 +00:00
|
|
|
ld bc, NAME_LENGTH
|
|
|
|
call CopyBytes
|
2018-01-23 22:39:09 +00:00
|
|
|
ld a, [wBaseEggSteps]
|
2015-11-17 02:46:36 +00:00
|
|
|
ld hl, wEggMonHappiness
|
|
|
|
ld [hli], a
|
|
|
|
xor a
|
|
|
|
ld [hli], a
|
2015-12-27 02:59:03 +00:00
|
|
|
ld [hli], a
|
2015-11-17 02:46:36 +00:00
|
|
|
ld [hl], a
|
2018-01-23 22:39:09 +00:00
|
|
|
ld a, [wCurPartyLevel]
|
2015-11-17 02:46:36 +00:00
|
|
|
ld [wEggMonLevel], a
|
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
.String_EGG:
|
2015-11-17 02:46:36 +00:00
|
|
|
db "EGG@"
|