ootw: collapse after slug attack, then game over

This commit is contained in:
Vince Weaver 2019-01-18 12:13:34 -05:00
parent e7f99c2d05
commit e38d5ff00c
3 changed files with 51 additions and 3 deletions

View File

@ -142,6 +142,42 @@ done_shake:
lda SLUGDEATH
beq still_alive
collapsing:
lda SLUGDEATH_PROGRESS
cmp #18
bmi still_collapsing
really_dead:
lda #$ff
sta GAME_OVER
jmp just_slugs
still_collapsing:
tax
lda collapse_progression,X
sta INL
lda collapse_progression+1,X
sta INH
lda PHYSICIST_X
sta XPOS
lda PHYSICIST_Y
sec
sbc EARTH_OFFSET
sta YPOS
jsr put_sprite
lda FRAMEL
and #$1f
bne no_collapse_progress
inc SLUGDEATH_PROGRESS
inc SLUGDEATH_PROGRESS
no_collapse_progress:
jmp just_slugs
@ -368,6 +404,7 @@ draw_slugs:
; see if attack
lda PHYSICIST_X
sec
sbc slugg0_x ; -2 to +2
@ -376,9 +413,16 @@ draw_slugs:
and #$fc
bne no_attack
attack:
; FIXME: make slug stand up if in range
lda SLUGDEATH ; don't re-attack if already dead
bne no_attack
lda #$1
sta SLUGDEATH
; FIXME: make slug stand up
lda #0
sta SLUGDEATH_PROGRESS
no_attack:
inc slugg0_gait ; increment slug gait counter

View File

@ -109,8 +109,10 @@ collapse_progression:
.word collapse3
.word collapse4
.word collapse5
.word collapse5
.word collapse5
.word collapse5 ; 6
.word collapse5 ; 7
.word collapse5 ; 8
.word collapse5 ; 9
collapse1:
.byte $4,$8

View File

@ -165,7 +165,9 @@ DIRECTION = $F5
GAIT = $F6
TENTACLE_X = $F7
TENTACLE_PROGRESS = $F8
SLUGDEATH_PROGRESS = $F8
TENTACLE_GRAB = $F9
SLUGDEATH = $F9
TEMP = $FA
TEMPY = $FB
INL = $FC