New weapon (I promise - last one :) ) - Spy Hard!

This commit is contained in:
Pecusx
2022-11-11 13:27:20 +01:00
parent ac1c501fa4
commit 50cc7f16df
9 changed files with 76 additions and 10 deletions
Binary file not shown.
+8 -2
View File
@@ -277,6 +277,7 @@ WeaponPriceH ; weapons prices (tables with prices of weapons)
.by >price_Lazy_Boy_______
.by >price_Lazy_Darwin____
.by >price_Auto_Defense___
.by >price_Spy_Hard_______
WeaponPriceL
.by <price_Baby_Missile___
.by <price_Missile________
@@ -325,6 +326,7 @@ WeaponPriceL
.by <price_Lazy_Boy_______
.by <price_Lazy_Darwin____
.by <price_Auto_Defense___
.by <price_Spy_Hard_______
;-------------------------------------------------
; how many units (bulletd) of a given weapon we get for a given price
@@ -380,6 +382,7 @@ WeaponUnits
.by 2 ;Lazy_Boy_______;_44
.by 2 ;Lazy_Darwin____;_45
.by 2 ;Auto_Defense___;_46
.by 4 ;Spy_Hard_______;_47
PurchaseMeTable ;weapons good to be purchased by the robot
;the comment is an index in the tables
@@ -399,7 +402,7 @@ PurchaseMeTable ;weapons good to be purchased by the robot
; "Strong Parachute","Mag Deflector ","Shield ","Heavy Shield "
.by %01011111
; "Force Shield ","Bouncy Castle ","Long Barrel ","Nuclear Winter "
; "Lazy Boy ","Lazy Darwin ","Auto Defense "
; "Lazy Boy ","Lazy Darwin ","Auto Defense ","Spy Hard "
.by %11000000
PurchaseMeTable2 ;weapons good to be purchased by the robot (Cyborg)
@@ -420,7 +423,7 @@ PurchaseMeTable2 ;weapons good to be purchased by the robot (Cyborg)
; "Strong Parachute","Mag Deflector ","Shield ","Heavy Shield "
.by %01001101
; "Force Shield ","Bouncy Castle ","Long Barrel ","Nuclear Winter "
; "Lazy Boy ","Lazy Darwin ","Auto Defense "
; "Lazy Boy ","Lazy Darwin ","Auto Defense ","Spy Hard "
.by %11000000
;-------------------------------------------------
@@ -473,6 +476,7 @@ WeaponSymbols
.by $02 ;ind_Lazy_Boy_______ ;_44
.by $03 ;ind_Lazy_Darwin____ ;_45
.by $5e ;ind_Auto_Defense___ ;_46
.by $7c ;ind_Spy_Hard_______ ;_47
; Names of weapons (16 chars long)
NamesOfWeapons ;the comment is an index in the tables
@@ -524,6 +528,7 @@ NamesOfWeapons ;the comment is an index in the tables
dta d"Lazy Boy " ; 44
dta d"Lazy Darwin " ; 45
dta d"Auto Defense " ; 46
dta d"Spy Hard " ; 47
DefensiveEnergy = *-(last_offensive_____ - first_offensive____ +1) ; to fake the table for ALL weapons
.by 00 ; White Flag
@@ -541,6 +546,7 @@ DefensiveEnergy = *-(last_offensive_____ - first_offensive____ +1) ; to fake th
.by 00 ; Lazy Boy
.by 00 ; Lazy Darwin
.by 00 ; Auto Defense
.by 00 ; Spy Hard
weaponsOfDeath ; weapons used in tank death animations
dta 1,2,3,7,17,18,19,20,21,22,23,24,25,26,27
weaponsOfDeathEnd
+3 -1
View File
@@ -87,6 +87,7 @@ price_Nuclear_Winter_ = 1000 ;_43
price_Lazy_Boy_______ = 500 ;_44
price_Lazy_Darwin____ = 500 ;_45
price_Auto_Defense___ = 250 ;_46
price_Spy_Hard_______ = 83 ;_47
;Weapon indexes (numbers)
ind_Baby_Missile___ = 0
first_offensive____ = ind_Baby_Missile___
@@ -138,7 +139,8 @@ ind_Nuclear_Winter_ = 43
ind_Lazy_Boy_______ = 44
ind_Lazy_Darwin____ = 45
ind_Auto_Defense___ = 46
last_defensive_____ = ind_Auto_Defense___
ind_Spy_Hard_______ = 47
last_defensive_____ = ind_Spy_Hard_______
last_real_defensive = ind_Bouncy_Castle__
number_of_offensives = last_offensive_____ - first_offensive____+1
number_of_defensives = (last_defensive_____ - first_defensive____+1)
+5 -4
View File
@@ -328,6 +328,7 @@ MainGameLoop
jsr SetStandardBarrels
jsr CallPurchaseForEveryTank
mva #0 SpyHardFlag
; issue #72 (glitches when switches)
jsr MakeDarkScreen
@@ -1681,7 +1682,7 @@ SetRandomWalls
and #$3f ;CTRL and SHIFT ellimination
cmp #@kbcode._esc ; 28 ; ESC
bne getkeyend
mvx #$80 escFlag
mvy #$80 escFlag
bne getkeyend
checkJoyGetKey
@@ -1703,9 +1704,9 @@ notpressedJoyGetKey
lda #@kbcode._ret ;Return key
getkeyend
ldx #0
stx ATRACT ; reset atract mode
mvx #sfx_keyclick sfx_effect
ldy #0
sty ATRACT ; reset atract mode
mvy #sfx_keyclick sfx_effect
rts
.endp
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
+6 -1
View File
@@ -875,8 +875,13 @@ NoLazyBoy
jsr FindBestTarget3 ; find target with lowest energy
jsr LazyAim
ply
jmp DecreaseDefensive ; bypass activation
jmp DecreaseDefensive ; bypass activation
NoLazyDarwin
cmp #ind_Spy_Hard_______
bne NotSpy
mva #$ff SpyHardFlag
jmp DecreaseDefensive ; bypass activation
NotSpy
cmp #ind_Long_Barrel____
bne NotBarrel
; if activate long barrel, we do it differently too
+2
View File
@@ -164,6 +164,8 @@ TargetTankNr ; Target tank index (for AI routines)
.DS 1
SecondTryFlag ; For precise AI aiming
.DS 1
SpyHardFlag ; >$7f - run SpyHard after inventory
.DS 1
;----------------------------------------------------
;Erase .DS 1 ; if 1 only mask of the character is printed
; on the graphics screen. if 0 character is printed normally
+52 -2
View File
@@ -1163,12 +1163,16 @@ callInventory
jsr Purchase
afterInventory
jsr MakeDarkScreen
RmtSong song_ingame
mva #0 escFlag
jsr DisplayStatus
jsr SetMainScreen
jsr WaitOneFrame
jsr DrawTanks
bit SpyHardFlag
bpl NoSpyHard
jsr SpyHard
NoSpyHard
RmtSong song_ingame
mva #0 escFlag
jsr WaitForKeyRelease
jmp BeforeFire
@
@@ -2429,6 +2433,52 @@ InverseScreenByte
rts
.endp
; -------------------------------------------------
.proc SpyHard
; -------------------------------------------------
mvx TankNr TargetTankNr ; save
RepeatSpy
mvx #0 TankNr
CheckNextTankSH
cpx TargetTankNr
beq ThisTankItsMe
lda Energy,x ; only active players
beq ThisTankIsDead
; run SpyHard for tank in X
jsr DisplaySpyInfo
jsr FlashTank
@ jsr GetKey
bit escFlag
bmi SpyHardEnd
cmp #@kbcode._space ; $21 ; Space
beq SpyHardEnd
cmp #@kbcode._ret ; Return key (5200 - fire)
beq SpyHardEnd
cmp #@kbcode._left ; $6
beq SelectNextTank
cmp #@kbcode._right ; $07 ; cursor right
bne @-
ThisTankIsDead
ThisTankItsMe
SelectNextTank
inc TankNr
ldx TankNr
cpx NumberOfPlayers
bne CheckNextTankSH
beq RepeatSpy
SpyHardEnd
mvx TargetTankNr TankNr ; restore
jsr DisplaySpyInfo
mva #0 SpyHardFlag
rts
.endp
.proc DisplaySpyInfo
lda TankStatusColoursTable,x
sta COLOR2 ; set color of status line
jsr PutTankNameOnScreen
jsr DisplayStatus
rts
.endp
; -------------------------------------------------
.proc TankFlying
; -------------------------------------------------
; This routine is run from inside of the main loop