Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CompareTwoDiceRolls:
- push de
- call .RollDice
- pop de
- push bc
- call .RollDice
- ld a, c
- pop bc
- cp c
- ret
- .RollDice
- .loop
- call Random
- cp e
- jr nc, .loop
- cp 3
- jr c, .skip
- inc c
- .skip
- dec d
- jr nz, .loop
- ret
- DeadinskyVsPuppyRolloff:
- lb de, 5, 6
- call CompareTwoDiceRolls
- jr c, .DeadinskyWins
- jr nz, .PuppiesWin
- ; Tie
- ld a, 4
- jr .proceed
- .DeadinskyWins
- xor a
- jr .proceed
- .PuppiesWin
- ld a, 2
- .proceed
- ld c, a
- ld b, 0
- ld a, [wPuppyKickingText]
- sla a
- ld e, a
- ld d, 0
- ld hl, PuppyResultTexts
- add hl, de
- add hl, de
- add hl, de
- add hl, bc
- ld a, [hli]
- ld h, [hl]
- ld l, a
- jp PrintText
- PuppyResultTexts:
- INCLUDE "data/result_text.asm"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement