2018-06-24 07:09:41 -07:00
|
|
|
BillsGrandfather:
|
2018-04-04 13:26:07 -07:00
|
|
|
farcall SelectMonFromParty
|
|
|
|
jr c, .cancel
|
|
|
|
ld a, [wCurPartySpecies]
|
|
|
|
ld [wScriptVar], a
|
2020-12-23 13:29:30 -08:00
|
|
|
ld [wNamedObjectIndex], a
|
2018-04-04 13:26:07 -07:00
|
|
|
call GetPokemonName
|
|
|
|
jp CopyPokemonName_Buffer1_Buffer3
|
|
|
|
|
|
|
|
.cancel
|
|
|
|
xor a
|
|
|
|
ld [wScriptVar], a
|
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
OlderHaircutBrother:
|
2018-04-04 13:26:07 -07:00
|
|
|
ld hl, HappinessData_OlderHaircutBrother
|
|
|
|
jr HaircutOrGrooming
|
|
|
|
|
2019-05-18 10:27:32 -07:00
|
|
|
YoungerHaircutBrother:
|
|
|
|
ld hl, HappinessData_YoungerHaircutBrother
|
|
|
|
jr HaircutOrGrooming
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
DaisysGrooming:
|
2018-04-04 13:26:07 -07:00
|
|
|
ld hl, HappinessData_DaisysGrooming
|
|
|
|
; fallthrough
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
HaircutOrGrooming:
|
2018-04-04 13:26:07 -07:00
|
|
|
push hl
|
|
|
|
farcall SelectMonFromParty
|
|
|
|
pop hl
|
|
|
|
jr c, .nope
|
|
|
|
ld a, [wCurPartySpecies]
|
|
|
|
cp EGG
|
|
|
|
jr z, .egg
|
|
|
|
push hl
|
2021-03-17 13:16:02 -07:00
|
|
|
call GetCurNickname
|
2018-04-04 13:26:07 -07:00
|
|
|
call CopyPokemonName_Buffer1_Buffer3
|
|
|
|
pop hl
|
|
|
|
call Random
|
|
|
|
.loop
|
|
|
|
sub [hl]
|
|
|
|
jr c, .ok
|
|
|
|
inc hl
|
|
|
|
inc hl
|
|
|
|
inc hl
|
|
|
|
jr .loop
|
|
|
|
|
|
|
|
.ok
|
|
|
|
inc hl
|
|
|
|
ld a, [hli]
|
|
|
|
ld [wScriptVar], a
|
|
|
|
ld c, [hl]
|
|
|
|
call ChangeHappiness
|
|
|
|
ret
|
|
|
|
|
|
|
|
.nope
|
|
|
|
xor a
|
|
|
|
ld [wScriptVar], a
|
|
|
|
ret
|
|
|
|
|
|
|
|
.egg
|
|
|
|
ld a, 1
|
|
|
|
ld [wScriptVar], a
|
|
|
|
ret
|
|
|
|
|
|
|
|
INCLUDE "data/events/happiness_probabilities.asm"
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
CopyPokemonName_Buffer1_Buffer3:
|
2018-04-04 13:26:07 -07:00
|
|
|
ld hl, wStringBuffer1
|
|
|
|
ld de, wStringBuffer3
|
|
|
|
ld bc, MON_NAME_LENGTH
|
|
|
|
jp CopyBytes
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
DummyPredef1:
|
2018-04-04 13:26:07 -07:00
|
|
|
ret
|