Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- StepHappiness::
- ; Raise the party's happiness by 1 point every other step cycle.
- ld hl, wHappinessStepCount
- ld a, [hl]
- inc a
- and 1
- ld [hl], a
- ret nz
- ld de, wPartyCount
- ld a, [de]
- and a
- ret z
- ld c, a
- ld hl, wPartyMon1Happiness
- .loop
- inc de
- ld a, [de]
- cp EGG
- jr z, .next
- inc [hl] ; increase wPartyMon1Happiness
- jr nz, .doIncrement
- ld [hl], $ff
- .doIncrement
- push hl
- ld hl, wPartyMon1Item
- ld a, [wPartyCount]
- sub c
- jr z, .skipIncrement
- push bc
- ld bc, PARTYMON_STRUCT_LENGTH
- call AddNTimes
- pop bc
- .skipIncrement
- ld a, [hl]
- pop hl
- cp SOOTHE_BELL
- jr nz, .skipSoothe
- inc [hl]
- .skipSoothe
- jr nz, .next
- ld [hl], $ff
- .next
- push de
- ld de, PARTYMON_STRUCT_LENGTH
- add hl, de
- pop de
- dec c
- jr nz, .loop
- ret
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement