ootw: re-init slugs when restart level

This commit is contained in:
Vince Weaver 2019-01-18 15:16:37 -05:00
parent d0fd308971
commit 8d8899ec70
3 changed files with 74 additions and 24 deletions

View File

@ -28,6 +28,30 @@ ootw:
lda #40
sta BOULDER_Y
;=======================
; Initialize the slugs
;=======================
lda #1
sta slugg0_out
lda #0
sta slugg0_attack
sta slugg0_dieing
lda #$ff
sta slugg0_dir
jsr random16
and #$f
clc
adc #16
sta slugg0_x
jsr random16
and #$3
sta slugg0_gait
jsr ootw_pool
;===========================

View File

@ -394,6 +394,7 @@ no_keypress_c:
slugg0_out: .byte 1
slugg0_attack: .byte 0
slugg0_dieing: .byte 0
slugg0_x: .byte 30
slugg0_dir: .byte $ff
slugg0_gait: .byte 0
@ -474,11 +475,36 @@ slug_no_move:
;===============================
;===============================
;==============
; if exploding
;==============
lda slugg0_dieing
beq check_draw_attacking
slug_exploding:
lda slug_die_progression,X
sta INL
lda slug_die_progression+1,X
sta INH
lda FRAMEL
and #$1f
bne no_progress
dec slugg0_dieing
dec slugg0_dieing
bpl no_progress
jmp remove_slug
no_progress:
jmp slug_selected
;==============
; if attacking
;==============
check_draw_attacking:
lda slugg0_attack
beq slug_normal
slug_attacking:

View File

@ -302,10 +302,10 @@ slug2:
.byte $0a,$a0,$0a,$aa
slug_die_progression:
.word slug_die1
.word slug_die2
.word slug_die3
.word slug_die4
.word slug_die3
.word slug_die2
.word slug_die1
slug_die1:
.byte $4,$4
@ -343,9 +343,9 @@ slug_attack_progression:
.word slug_attack2
.word slug_attack3
.word slug_attack4
.word slug_attack5
.word slug_attack6
.word slug_attack7
.word slug_attack1
.word slug_attack2
.word slug_attack3
slug_attack0:
.byte $4,$4
@ -382,26 +382,26 @@ slug_attack4:
.byte $00,$aa,$aa,$aa
.byte $00,$aa,$aa,$aa
slug_attack5:
.byte $4,$4
.byte $aa,$aa,$aa,$aa
.byte $00,$aa,$aa,$aa
.byte $aa,$00,$aa,$aa
.byte $aa,$aa,$00,$aa
;slug_attack5:
; .byte $4,$4
; .byte $aa,$aa,$aa,$aa
; .byte $00,$aa,$aa,$aa
; .byte $aa,$00,$aa,$aa
; .byte $aa,$aa,$00,$aa
slug_attack6:
.byte $4,$4
.byte $aa,$aa,$aa,$aa
.byte $aa,$aa,$aa,$aa
.byte $aa,$aa,$aa,$aa
.byte $00,$00,$00,$aa
;slug_attack6:
; .byte $4,$4
; .byte $aa,$aa,$aa,$aa
; .byte $aa,$aa,$aa,$aa
; .byte $aa,$aa,$aa,$aa
; .byte $00,$00,$00,$aa
slug_attack7:
.byte $4,$4
.byte $aa,$aa,$aa,$aa
.byte $00,$aa,$00,$aa
.byte $aa,$00,$aa,$aa
.byte $00,$aa,$aa,$aa
;slug_attack7:
; .byte $4,$4
; .byte $aa,$aa,$aa,$aa
; .byte $aa,$aa,$00,$aa
; .byte $aa,$00,$aa,$aa
; .byte $00,$aa,$aa,$aa