Deactivate defensive weapon now possible.

If you activate previously activated White Flag, you deactivate defensive weapons.
This commit is contained in:
Pecusx
2022-06-20 14:07:53 +02:00
parent 9aaa4fec69
commit 537f88e4c6
3 changed files with 16 additions and 0 deletions
BIN
View File
Binary file not shown.
+11
View File
@@ -785,6 +785,16 @@ invSelectDef
lda IndexesOfWeaponsL2,y
tay
ldx tankNr
cmp #ind_White_Flag_____
bne NotWhiteFlag
cmp ActiveDefenceWeapon,x
bne NoDeactivateWhiteFlag
lda #$00 ; if try to activate activated White Flag then deactivate Defence
sta ActiveDefenceWeapon,x
sta ShieldEnergy,x
beq DefActivationEnd
NotWhiteFlag
NoDeactivateWhiteFlag
sta ActiveDefenceWeapon,x
; decrease number of defensives
lda TanksWeaponsTableL,x
@@ -798,6 +808,7 @@ invSelectDef
lda DefensiveEnergy,y
sta ShieldEnergy,x
DefActivationEnd
jmp WaitForKeyRelease ; rts
.endp
+5
View File
@@ -1046,6 +1046,11 @@ notpressed
cmp #$0d ; I
bne @+
callInventory
; Hide all tanks - after inventory they may have other shapes
mva #1 Erase
jsr DrawTanks
mva #0 Erase
;
mva #$ff isInventory
jsr Purchase
mva #0 escFlag