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
+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