inventory offensive weapons selection #26

This commit is contained in:
2022-06-12 00:39:19 -04:00
parent c47a22a833
commit e2c85c98c2
5 changed files with 64 additions and 51 deletions
+21 -21
View File
@@ -595,6 +595,7 @@ WeaponPriceH ; weapons prices (tables with prices of weapons)
.by >price______________45
.by >price______________46
.by >price______________47
.by >price_White_Flag_____
.by >price_Heat_Guidance__
.by >price_Bal_Guidance___
.by >price_Horz_Guidance__
@@ -610,7 +611,6 @@ WeaponPriceH ; weapons prices (tables with prices of weapons)
.by >price_Auto_Defense___
.by >price_Fuel_Tank______
.by >price_Contact_Trigger
.by >price_White_Flag_____
WeaponPriceL
.by <price_Baby_Missile___
@@ -661,6 +661,7 @@ WeaponPriceL
.by <price______________45
.by <price______________46
.by <price______________47
.by <price_White_Flag_____
.by <price_Heat_Guidance__
.by <price_Bal_Guidance___
.by <price_Horz_Guidance__
@@ -676,7 +677,6 @@ WeaponPriceL
.by <price_Auto_Defense___
.by <price_Fuel_Tank______
.by <price_Contact_Trigger
.by <price_White_Flag_____
;-------------------------------------------------
; how many units (bulletd) of a given weapon we get for a given price
@@ -733,6 +733,7 @@ WeaponUnits
.by 0 ;_____________45
.by 0 ;_____________46
.by 0 ;_____________47
.by 1 ;White_Flag___48
.by 6 ;Heat_Guidance__
.by 2 ;Bal_Guidance___
.by 5 ;Horz_Guidance__
@@ -748,7 +749,6 @@ WeaponUnits
.by 1 ;Auto_Defense___
.by 10 ;Fuel_Tank______
.by 25 ;Contact_Trigger
.by 1 ;_____________63
PurchaseMeTable ;weapons good to be purchased by the robot
;the comment is an index in the tables
@@ -811,8 +811,8 @@ WeaponSymbols
.by $58,$59,$5a,$5b,$60,$7b,$7c,$7d
.by $20,$00,$00,$00,$00,$00,$00,$00
.by $00,$00,$00,$00,$00,$00,$00,$00
.by $02,$03,$06,$1d,$0a,$1b,$1c,$1e
.by $3b,$3c,$3d,$3e,$3f,$5e,$5f,$00
.by $00,$02,$03,$06,$1d,$0a,$1b,$1c ; defensives
.by $1e,$3b,$3c,$3d,$3e,$3f,$5e,$5f
; Names of weapons (16 chars long)
NamesOfWeapons ;the comment is an index in the tables
@@ -865,22 +865,22 @@ NamesOfWeapons ;the comment is an index in the tables
dta d"----------------" ; 46
dta d" " ; 47 ; special (no weapon) name to simplify display
dta d"Heat Guidance " ; 48 ($30)
dta d"Bal Guidance " ; 49
dta d"Horz Guidance " ; 50
dta d"Vert Guidance " ; 51
dta d"Lazy Boy " ; 52
dta d"Parachute " ; 53 - no energy
dta d"Battery " ; 54
dta d"Mag Deflector " ; 55 - witch shield and energy
dta d"Shield " ; 56 - shield for one shot - no energy
dta d"Force Shield " ; 57 - shield with energy and parachute
dta d"Heavy Shield " ; 58 - shield with energy
dta d"Super Mag " ; 59
dta d"Auto Defense " ; 60 - witch shield and energy
dta d"Fuel Tank " ; 61
dta d"Contact Trigger " ; 62
dta d"White Flag " ; 63
dta d"White Flag " ; 48 ($30)
dta d"Heat Guidance " ; 49
dta d"Bal Guidance " ; 50
dta d"Horz Guidance " ; 51
dta d"Vert Guidance " ; 52
dta d"Lazy Boy " ; 53 - no energy
dta d"Parachute " ; 54
dta d"Battery " ; 55 - witch shield and energy
dta d"Mag Deflector " ; 56 - shield for one shot - no energy
dta d"Shield " ; 57 - shield with energy and parachute
dta d"Force Shield " ; 58 - shield with energy
dta d"Heavy Shield " ; 59
dta d"Super Mag " ; 60 - witch shield and energy
dta d"Auto Defense " ; 61
dta d"Fuel Tank " ; 62
dta d"Contact Trigger " ; 63
weaponsOfDeath
dta 1,2,3,7,15,16,17,18,19,20,21,22,23,24,25,26,27
weaponsOfDeathEnd
+16 -16
View File
@@ -59,22 +59,22 @@ price______________44 = 0
price______________45 = 0
price______________46 = 0
price______________47 = 0
price_Heat_Guidance__ = $ffff ;_48_($30)
price_Bal_Guidance___ = $ffff ;_49
price_Horz_Guidance__ = $ffff ;_50
price_Vert_Guidance__ = $ffff ;_51
price_Lazy_Boy_______ = $ffff ;_52
price_Parachute______ = 80 ;_53
price_Battery________ = $ffff ;_54
price_Mag_Deflector__ = 120 ;_55
price_Shield_________ = 50 ;_56
price_Force_Shield___ = 210 ;_57
price_Heavy_Shield___ = $ffff ;_58
price_Super_Mag______ = 160 ;_59
price_Auto_Defense___ = 300 ;_60
price_Fuel_Tank______ = $ffff ;_61
price_Contact_Trigger = $ffff ;_62
price_White_Flag_____ = $0 ;_63
price_White_Flag_____ = $0 ;_48_($30)
price_Heat_Guidance__ = $ffff ;_49
price_Bal_Guidance___ = $ffff ;_50
price_Horz_Guidance__ = $ffff ;_51
price_Vert_Guidance__ = $ffff ;_52
price_Lazy_Boy_______ = $ffff ;_53
price_Parachute______ = 80 ;_54
price_Battery________ = $ffff ;_55
price_Mag_Deflector__ = 120 ;_56
price_Shield_________ = 50 ;_57
price_Force_Shield___ = 210 ;_58
price_Heavy_Shield___ = $ffff ;_59
price_Super_Mag______ = 160 ;_60
price_Auto_Defense___ = 300 ;_61
price_Fuel_Tank______ = $ffff ;_62
price_Contact_Trigger = $ffff ;_63
;--------------------------------
; names of RMT instruments (sfx)
;--------------------------------
+12 -7
View File
@@ -774,21 +774,26 @@ PMoutofScreen .proc
;--------------------------------------------------
.proc WeaponCleanup;
; cleaning of the weapon possesion tables
; (99 of Baby Missles, all other weapons=0)
; 99 of Baby Missles(index==0), all other weapons=0)
;--------------------------------------------------
ldx #$3f
lda #$0
@
sta TanksWeapon1,x
ldx #$3f ; TODO: maxweapons
@ lda #$0
cpx #48 ; White Flag
bne @+
lda #99
@ sta TanksWeapon1,x
sta TanksWeapon2,x
sta TanksWeapon3,x
sta TanksWeapon4,x
sta TanksWeapon5,x
sta TanksWeapon6,x
dex
sne:lda #99
bpl @-
beq setBmissile
bpl @-1
rts
setBmissile
lda #99
bne @-
.endp
;--------------------------------------------------
BIN
View File
Binary file not shown.
+15 -7
View File
@@ -670,7 +670,7 @@ SecondSelected
weaponPtr = temp
isPriceZero = tempXRoller
bit isInventory
bmi @+
bmi inventorySelect
lda WhichList
bne PurchaseDeffensive
@@ -726,13 +726,21 @@ LessThan100
; additional check for unfinished game
; if weapon was free (price == $0)
; then have nothing...
lda isPriceZero
bne @+
lda #0
sta (weaponPtr),y
@
mva #0 PositionOnTheList ; to move the pointer to the top when no more monies
; lda isPriceZero
; bne @+
; lda #0
; sta (weaponPtr),y
@ mva #0 PositionOnTheList ; to move the pointer to the top when no more monies
jmp Purchase.AfterPurchase
inventorySelect
ldy PositionOnTheList
lda IndexesOfWeaponsL1,y
ldx tankNr
sta activeWeapon,x
rts
.endp
.proc PutLitteChar