2018-06-24 14:09:41 +00:00
|
|
|
LevelUpHappinessMod:
|
2018-01-23 22:39:09 +00:00
|
|
|
ld a, [wCurPartyMon]
|
|
|
|
ld hl, wPartyMon1CaughtLocation
|
2017-12-25 00:35:35 +00:00
|
|
|
call GetPartyLocation
|
|
|
|
ld a, [hl]
|
|
|
|
and $7f
|
|
|
|
ld d, a
|
2018-01-23 22:39:09 +00:00
|
|
|
ld a, [wMapGroup]
|
2017-12-25 00:35:35 +00:00
|
|
|
ld b, a
|
2018-01-23 22:39:09 +00:00
|
|
|
ld a, [wMapNumber]
|
2017-12-25 00:35:35 +00:00
|
|
|
ld c, a
|
|
|
|
call GetWorldMapLocation
|
|
|
|
cp d
|
|
|
|
ld c, HAPPINESS_GAINLEVEL
|
|
|
|
jr nz, .ok
|
|
|
|
ld c, HAPPINESS_GAINLEVELATHOME
|
|
|
|
|
|
|
|
.ok
|
|
|
|
callfar ChangeHappiness
|
|
|
|
ret
|