pokecrystal-board/engine/pokemon/level_up_happiness.asm

21 lines
342 B
NASM
Raw Normal View History

2018-06-24 16:09:41 +02:00
LevelUpHappinessMod:
2018-01-23 17:39:09 -05:00
ld a, [wCurPartyMon]
ld hl, wPartyMon1CaughtLocation
call GetPartyLocation
ld a, [hl]
2020-11-03 10:13:06 -05:00
and CAUGHT_LOCATION_MASK
ld d, a
2018-01-23 17:39:09 -05:00
ld a, [wMapGroup]
ld b, a
2018-01-23 17:39:09 -05:00
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