mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2025-01-23 09:16:20 -08:00
Renamed `game` to `games` and `menu` to `menus`. Moved some functions from `engine/routines/` to their fitting subdirectories. Made two new subdirectories: * engine/rtc: Contains all RTC-related things. Menus, hardware, misc functions. * engine/items: Contains all item-related things. Pack, item effects, other item handlers.
21 lines
333 B
NASM
21 lines
333 B
NASM
LevelUpHappinessMod: ; 2709e
|
|
ld a, [wCurPartyMon]
|
|
ld hl, wPartyMon1CaughtLocation
|
|
call GetPartyLocation
|
|
ld a, [hl]
|
|
and $7f
|
|
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
|