;;; monster objects drop at random.
LDA otherCenterX
SBC #$08
STA temp
LDA otherCenterY
SBC #$08
STA temp1
LDA Object_scroll,x
SBC #$00
STA temp3
LDA temp2
CMP #20
BEQ bossEnd
JMP pickUp
bossEnd:
CreateObject temp, temp1, #$06, #$00, temp3
JMP donePickup
pickUp:
JSR GetRandomNumber
AND #%0000011 ;; now, we have a number between 0 and 7
BNE notPickup0 ;;
;; zero case here;
;;; here, we'll create health
CreateObject temp, temp1, #$04, #$00, temp3
JMP donePickup
notPickup0:
LDA temp2
CMP #$01
BNE notPickup1
;; one case here;
;;; here, we'll create currency
CreateObject temp, temp1, #$07, #$00, temp3
JMP donePickup
notPickup1:
LDA temp2
CMP #$02
BNE notPickup2
;; two case here;
;;; here, we'll create currency
CreateObject temp, temp1, #$07, #$00, temp3
JMP donePickup
notPickup2:
;;;; do the same for each case.
;;;; blank cases will simply return 'nothing'.
CreateObject temp, temp1, #$07, #$00, temp3
donePickup:
;;; ALL cases create a "pow"
CreateObject temp, temp1, #OBJ_MONSTER_DEATH, #$00, currentNametable