jep-hack/engine/pokemon/level_up_happiness.asm
Zeta_Null 2f8a41f833 First Commit
Upload literally everything from the pokecrystal16 expand-move-ID branch
2023-09-10 12:35:35 -04:00

21 lines
342 B
NASM

LevelUpHappinessMod:
ld a, [wCurPartyMon]
ld hl, wPartyMon1CaughtLocation
call GetPartyLocation
ld a, [hl]
and CAUGHT_LOCATION_MASK
ld d, a
ld a, [wMapGroup]
ld b, a
ld a, [wMapNumber]
ld c, a
call GetWorldMapLocation
cp d
ld c, HAPPINESS_GAINLEVEL
jr nz, .ok
ld c, HAPPINESS_GAINLEVELATHOME
.ok
callfar ChangeHappiness
ret