The first attempt at handling defensive weapons

Only for test.
Now all players has active Parachute berore round.
This commit is contained in:
Pecusx
2022-06-07 10:25:23 +02:00
parent 031416b8e6
commit 186cacf5ba
4 changed files with 17 additions and 8 deletions
+10 -1
View File
@@ -128,7 +128,16 @@ START
jsr RandomizeSequence
; for the round #1 shooting sequence is random
; activate parachutes for all players (test)
lda #$35
ldx numberOfPlayers
dex
@
sta ActiveDefenceWeapon,x
dex
bpl @-
; parachutes activated! (test)
MainGameLoop
VDLI DLIinterruptText ; jsr SetDLI for text (purchase) screen
BIN
View File
Binary file not shown.
+2
View File
@@ -95,6 +95,8 @@ NewAngle .DS 1
ActiveWeapon ;number of the selected weapon
.DS [MaxPlayers]
ActiveDefenceWeapon ;number of the activated defence weapon - 0
.DS [MaxPlayers]
WeaponDepleted .DS 1 ; if 0 deactivate the weapon and switch to Baby Missile
;----------------------------------------------------
+5 -7
View File
@@ -1298,9 +1298,10 @@ ShotUnderGround
sta Parachute
; let's check if the given tank has got the parachute
lda #$35 ; parachute
jsr HowManyBullets
beq TankFallsX
ldx TankNr
lda ActiveDefenceWeapon,x
cmp #$35 ; parachute
bne TankFallsX
inc Parachute
TankFallsX
; coordinates of the first pixel under the tank
@@ -1502,6 +1503,7 @@ EndOfFall
; first we clear parachute on the screen
mva #1 Erase
ldx TankNr
mva #0 ActiveDefenceWeapon,x ; deactivate defence weapon (parachute)
lda #$34
sta CharCode
lda Ytankstable,x
@@ -1514,10 +1516,6 @@ EndOfFall
sta xdraw+1
jsr TypeChar
mva #0 Erase
; now we can deduct one parachute from the list of weapons
lda #$35 ; parachute
jsr DecreaseWeapon
ThereWasNoParachute
mva #sfx_silencer sfx_effect
rts