mirror of
https://github.com/thornAvery/jep-hack.git
synced 2026-02-07 16:45:24 +13:00
First Commit
Upload literally everything from the pokecrystal16 expand-move-ID branch
This commit is contained in:
commit
2f8a41f833
4618 changed files with 480386 additions and 0 deletions
75
engine/events/haircut.asm
Normal file
75
engine/events/haircut.asm
Normal file
|
|
@ -0,0 +1,75 @@
|
|||
BillsGrandfather:
|
||||
farcall SelectMonFromParty
|
||||
jr c, .cancel
|
||||
ld a, [wCurPartySpecies]
|
||||
ld [wScriptVar], a
|
||||
ld [wNamedObjectIndex], a
|
||||
call GetPokemonName
|
||||
jp CopyPokemonName_Buffer1_Buffer3
|
||||
|
||||
.cancel
|
||||
xor a
|
||||
ld [wScriptVar], a
|
||||
ret
|
||||
|
||||
OlderHaircutBrother:
|
||||
ld hl, HappinessData_OlderHaircutBrother
|
||||
jr HaircutOrGrooming
|
||||
|
||||
YoungerHaircutBrother:
|
||||
ld hl, HappinessData_YoungerHaircutBrother
|
||||
jr HaircutOrGrooming
|
||||
|
||||
DaisysGrooming:
|
||||
ld hl, HappinessData_DaisysGrooming
|
||||
; fallthrough
|
||||
|
||||
HaircutOrGrooming:
|
||||
push hl
|
||||
farcall SelectMonFromParty
|
||||
pop hl
|
||||
jr c, .nope
|
||||
ld a, [wCurPartySpecies]
|
||||
cp EGG
|
||||
jr z, .egg
|
||||
push hl
|
||||
call GetCurNickname
|
||||
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"
|
||||
|
||||
CopyPokemonName_Buffer1_Buffer3:
|
||||
ld hl, wStringBuffer1
|
||||
ld de, wStringBuffer3
|
||||
ld bc, MON_NAME_LENGTH
|
||||
jp CopyBytes
|
||||
|
||||
DummyPredef1:
|
||||
ret
|
||||
Loading…
Add table
Add a link
Reference in a new issue