New funky defensive weapon - Long Barrel

This commit is contained in:
Pecusx
2022-08-11 10:46:23 +02:00
parent 22785ecdd5
commit 950d6922b4
7 changed files with 39 additions and 17 deletions
+8 -8
View File
@@ -292,7 +292,7 @@ WeaponPriceH ; weapons prices (tables with prices of weapons)
.by >price_Force_Shield___
.by >price_Super_Mag______
.by >price_Bouncy_Castle__
.by >price_Fuel_Tank______
.by >price_Long_Barrel____
.by >price_Nuclear_Winter_
WeaponPriceL
@@ -358,7 +358,7 @@ WeaponPriceL
.by <price_Force_Shield___
.by <price_Super_Mag______
.by <price_Bouncy_Castle__
.by <price_Fuel_Tank______
.by <price_Long_Barrel____
.by <price_Nuclear_Winter_
;-------------------------------------------------
@@ -430,7 +430,7 @@ WeaponUnits
.by 3 ;Force_Shield___
.by 2 ;Super_Mag______
.by 1 ;Auto_Defense___
.by 10 ;Fuel_Tank______
.by 1 ;Long_Barrel____
.by 1 ;Nuclear_Winter_
PurchaseMeTable ;weapons good to be purchased by the robot
@@ -454,7 +454,7 @@ PurchaseMeTable ;weapons good to be purchased by the robot
; "Vert Guidance ","Lazy Boy ","Parachute ","Strong Parachute"
.by %01000011
; "Mag Deflector ","Shield ","Heavy Shield ","Force Shield "
; "Super Mag ","Bouncy Castle ","Fuel Tank ","Nuclear Winter "
; "Super Mag ","Bouncy Castle ","Long Barrel ","Nuclear Winter "
.by %11110100
PurchaseMeTable2 ;weapons good to be purchased by the robot (Cyborg)
@@ -478,7 +478,7 @@ PurchaseMeTable2 ;weapons good to be purchased by the robot (Cyborg)
; "Vert Guidance ","Lazy Boy ","Parachute ","Strong Parachute"
.by %01000001
; "Mag Deflector ","Shield ","Heavy Shield ","Force Shield "
; "Super Mag ","Bouncy Castle ","Fuel Tank ","Nuclear Winter "
; "Super Mag ","Bouncy Castle ","Long Barrel ","Nuclear Winter "
.by %10110100
;-------------------------------------------------
@@ -491,7 +491,7 @@ WeaponSymbols
.by $20,$00,$00,$00,$00,$00,$00,$00
.by $00,$00,$00,$00,$00,$00,$00,$00
.by $5f,$1c,$03,$06,$1d,$0a,$1b,$1b ; defensives
.by $1e,$3b,$3d,$3c,$3e,$3f,$5e,$7d
.by $1e,$3b,$3d,$3c,$3e,$3f,$1d,$7d
; Names of weapons (16 chars long)
NamesOfWeapons ;the comment is an index in the tables
@@ -558,7 +558,7 @@ NamesOfWeapons ;the comment is an index in the tables
dta d"Force Shield " ; 59 - shield with energy and parachute
dta d"Super Mag " ; 60
dta d"Bouncy Castle " ; 61 - with shield and energy
dta d"Fuel Tank " ; 62
dta d"Long Barrel " ; 62
dta d"Nuclear Winter " ; 63
DefensiveEnergy = * - 48
.by 00 ; White Flag
@@ -575,7 +575,7 @@ DefensiveEnergy = * - 48
.by 99 ; Force Shield
.by 00 ; Super Mag
.by 99 ; Bouncy Castle
.by 00 ; Fuel Tank
.by 00 ; Long Barrel
.by 00 ; Nuclear Winter
weaponsOfDeath
dta 1,2,3,7,17,18,19,20,21,22,23,24,25,26,27
+4 -2
View File
@@ -15,6 +15,8 @@ maxOptions = 8 ;number of all options
PMOffsetX = $2C ; P/M to graphics offset
PMOffsetY = $23 ; P/M to graphics offset
napalmRadius = 10
StandardBarrel = 6 ; standard tank barrel length
LongBarrel = 20 ; long barrel length
TextBackgroundColor = $02 ; REAL constans - use: LDA #TextBackgroundColor
TextForegroundColor = $0A
@@ -95,7 +97,7 @@ price_Heavy_Shield___ = 628 ;_58
price_Force_Shield___ = 1100 ;_59
price_Super_Mag______ = $ffff ;_60
price_Bouncy_Castle__ = 512 ;_61
price_Fuel_Tank______ = $ffff ;_62
price_Long_Barrel____ = 920 ;_62
price_Nuclear_Winter_ = 1000 ;_63
;Weapon indexes (numbers)
ind_Baby_Missile___ = 0
@@ -160,7 +162,7 @@ ind_Heavy_Shield___ = 58
ind_Force_Shield___ = 59
ind_Super_Mag______ = 60
ind_Bouncy_Castle__ = 61
ind_Fuel_Tank______ = 62
ind_Long_Barrel____ = 62
ind_Nuclear_Winter_ = 63
;--------------------------------
; names of RMT instruments (sfx)
+4 -2
View File
@@ -1938,6 +1938,8 @@ X lda XtanksTableL,x
; mva #1 color
ldx TankNr
jsr SetupXYdraw
lda BarrelLength,x
sta yc ; current tank barrel length
lda angleTable,x
sta Angle
jsr DrawBarrelTech
@@ -2002,7 +2004,7 @@ YangleUnder90
; 2. add vx and vy to 3 byte variables xdraw.fx, ydraw.fy
; 3 check length, if shorter, go to 1.
mva #6 yc ; barrel length
; mva #6 yc ; barrel length
barrelLoop
lda goleft
@@ -2042,7 +2044,7 @@ ybarrel
sbc #0
sta ydraw+1
jsr plot.MakePlot
jsr plot ;.MakePlot
dec yc
bne barrelLoop
+14 -3
View File
@@ -358,6 +358,8 @@ SettingEnergies
sta Energy,x
sta eXistenZ,x
sta LASTeXistenZ,x
lda #StandardBarrel ; standard barrel length
sta BarrelLength,x
; anything in eXistenZ table means that this tank exist
; in the given round
lda #<1000
@@ -959,14 +961,14 @@ deletePtr = temp
inw deletePtr
cpw deletePtr #variablesEnd
bne @-
mwa #1024 RandBoundaryHigh
mva #$ff LastWeapon
sta HowMuchToFall
mva #1 color
jsr WeaponCleanup
jsr SetStandardBarrels
jsr WeaponCleanup
mva #>WeaponFont chbas
@@ -1023,6 +1025,15 @@ MakeTanksVisible
rts
.endp
;--------------------------------------------------
.proc SetStandardBarrels
ldx #maxPlayers-1
lda #StandardBarrel ; standard barrel length
@ sta BarrelLength,x
dex
bpl @-
rts
.endp
;--------------------------------------------------
.proc SetPMWidth
lda #$00
sta sizep0 ; P0-P3 widths
BIN
View File
Binary file not shown.
+7
View File
@@ -837,6 +837,12 @@ invSelectDef
mva #99 Energy,x
bne DecreaseDefensive ; bypass activation
NotBattery
cmp #ind_Long_Barrel____
bne NotBarrel
; if activate long barrel, we do it differently too
mva #LongBarrel BarrelLength,x
bne DecreaseDefensive ; bypass activation
NotBarrel
cmp #ind_White_Flag_____
bne NotWhiteFlag
cmp ActiveDefenceWeapon,x
@@ -1959,6 +1965,7 @@ MakeAllTanksVisible
sta ActiveDefenceWeapon,x
dex
bpl MakeAllTanksVisible
jsr SetStandardBarrels
; start music and animations
lda #song_ending_looped
+2 -2
View File
@@ -109,8 +109,8 @@ MaxForceTableL ;Energy of the tank during the round
MaxForceTableH
.DS [MaxPlayers]
;----------------------------------------------------
BarrelLength ;length of the tank barrel - dont forget to set it to 6 at round start!
.DS [MaxPlayers]
ActiveWeapon ;number of the selected weapon
.DS [MaxPlayers]
ActiveDefenceWeapon ;number of the activated defence weapon - 0