mirror of
https://github.com/pkali/scorch_src.git
synced 2026-05-20 22:34:21 +02:00
New offensive(defensive) weapon - "Buy me!" #97
This commit is contained in:
+12
-12
@@ -263,7 +263,7 @@ WeaponPriceH ; weapons prices (tables with prices of weapons)
|
||||
.by >price_Ton_of_Dirt____
|
||||
.by >price_Liquid_Dirt____
|
||||
.by >price_Dirt_Charge____
|
||||
.by >price_Earth_Disrupter
|
||||
.by >price_Buy_me_________
|
||||
.by >price_Plasma_Blast___
|
||||
.by >price_Laser__________
|
||||
.by >price______________33
|
||||
@@ -329,7 +329,7 @@ WeaponPriceL
|
||||
.by <price_Ton_of_Dirt____
|
||||
.by <price_Liquid_Dirt____
|
||||
.by <price_Dirt_Charge____
|
||||
.by <price_Earth_Disrupter
|
||||
.by <price_Buy_me_________
|
||||
.by <price_Plasma_Blast___
|
||||
.by <price_Laser__________
|
||||
.by <price______________33
|
||||
@@ -401,8 +401,8 @@ WeaponUnits
|
||||
.by 1 ;Ton_of_Dirt____
|
||||
.by 4 ;Liquid_Dirt____
|
||||
.by 2 ;Dirt_Charge____
|
||||
.by 10 ;Earth_Disrupter
|
||||
.by 5 ;Plasma_Blast___
|
||||
.by 1 ;Buy_me_________
|
||||
.by 0 ;Plasma_Blast___
|
||||
.by 5 ;Laser__________
|
||||
.by 0 ;_____________33
|
||||
.by 0 ;_____________34
|
||||
@@ -421,17 +421,17 @@ WeaponUnits
|
||||
.by 0 ;_____________47
|
||||
.by 1 ;White_Flag___48
|
||||
.by 3 ;Battery________
|
||||
.by 2 ;Bal_Guidance___
|
||||
.by 5 ;Horz_Guidance__
|
||||
.by 5 ;Vert_Guidance__
|
||||
.by 2 ;Lazy_Boy_______
|
||||
.by 0 ;Bal_Guidance___
|
||||
.by 0 ;Horz_Guidance__
|
||||
.by 0 ;Vert_Guidance__
|
||||
.by 0 ;Lazy_Boy_______
|
||||
.by 3 ;Parachute______
|
||||
.by 2 ;StrongParachute
|
||||
.by 2 ;Mag_Deflector__
|
||||
.by 3 ;Shield_________
|
||||
.by 2 ;Heavy_Shield___
|
||||
.by 3 ;Force_Shield___
|
||||
.by 2 ;Super_Mag______
|
||||
.by 0 ;Super_Mag______
|
||||
.by 1 ;Auto_Defense___
|
||||
.by 2 ;Long_Barrel____
|
||||
.by 1 ;Nuclear_Winter_
|
||||
@@ -448,7 +448,7 @@ PurchaseMeTable ;weapons good to be purchased by the robot
|
||||
; "Digger ","Heavy Digger ","Baby Sandhog ","Sandhog "
|
||||
.by %00000000
|
||||
; "Heavy Sandhog ","Dirt Clod ","Dirt Ball ","Ton of Dirt "
|
||||
; "Liquid Dirt ","Dirt Charge ","Earth Disrupter ","Plasma Blast "
|
||||
; "Liquid Dirt ","Dirt Charge ","Buy me! ","Plasma Blast "
|
||||
.by %00000000
|
||||
; "Laser "
|
||||
.by %00000000
|
||||
@@ -472,7 +472,7 @@ PurchaseMeTable2 ;weapons good to be purchased by the robot (Cyborg)
|
||||
; "Digger ","Heavy Digger ","Baby Sandhog ","Sandhog "
|
||||
.by %00000000
|
||||
; "Heavy Sandhog ","Dirt Clod ","Dirt Ball ","Ton of Dirt "
|
||||
; "Liquid Dirt ","Dirt Charge ","Earth Disrupter ","Plasma Blast "
|
||||
; "Liquid Dirt ","Dirt Charge ","Buy me! ","Plasma Blast "
|
||||
.by %00000000
|
||||
; "Laser "
|
||||
.by %00000000
|
||||
@@ -528,7 +528,7 @@ NamesOfWeapons ;the comment is an index in the tables
|
||||
dta d"Ton of Dirt " ; 27
|
||||
dta d"Liquid Dirt " ; 28
|
||||
dta d"Dirt Charge " ; 29
|
||||
dta d"Earth Disrupter " ; 30
|
||||
dta d"Buy me! " ; 30
|
||||
dta d"Plasma Blast " ; 31
|
||||
dta d"Laser " ; 32
|
||||
dta d"----------------" ; 33
|
||||
|
||||
+2
-2
@@ -65,7 +65,7 @@ price_Dirt_Ball______ = 130 ;_26
|
||||
price_Ton_of_Dirt____ = 171 ;_27
|
||||
price_Liquid_Dirt____ = 330 ;_28
|
||||
price_Dirt_Charge____ = 343 ;_29
|
||||
price_Earth_Disrupter = $ffff ;430 ;_30
|
||||
price_Buy_me_________ = 170 ;430 ;_30
|
||||
price_Plasma_Blast___ = $ffff ;274 ;_31
|
||||
price_Laser__________ = 277 ;_32
|
||||
price______________33 = 0
|
||||
@@ -130,7 +130,7 @@ ind_Dirt_Ball______ = 26
|
||||
ind_Ton_of_Dirt____ = 27
|
||||
ind_Liquid_Dirt____ = 28
|
||||
ind_Dirt_Charge____ = 29
|
||||
ind_Earth_Disrupter = 30
|
||||
ind_Buy_me_________ = 30
|
||||
ind_Plasma_Blast___ = 31
|
||||
ind_Laser__________ = 32
|
||||
ind______________33 = 0
|
||||
|
||||
BIN
Binary file not shown.
+27
-2
@@ -795,7 +795,34 @@ positiveMoney
|
||||
; now we have to get address of
|
||||
; the table of the weapon of the tank
|
||||
; and add appropriate number of shells
|
||||
|
||||
sty LastWeapon ; store last purchased weapon
|
||||
; because we must put screen pointer next to it
|
||||
|
||||
; but if we purchasing "Buy me!" then we must draw the winning weapon.
|
||||
|
||||
cpy #ind_Buy_me_________
|
||||
bne NoSuprise
|
||||
|
||||
Suprise ; get a random weapon
|
||||
lda random
|
||||
cmp #51 ; defensive weapons are less likely because they are more expensive - probability 255:51 (5:1)
|
||||
bcc GetRandomDefensive
|
||||
GetRandomOffensive
|
||||
randomize ind_Missile________ ind_Laser__________
|
||||
cmp #ind_Buy_me_________
|
||||
beq GetRandomOffensive
|
||||
tay
|
||||
lda WeaponUnits,y ; check if weapon exist
|
||||
beq GetRandomOffensive
|
||||
bne NoSuprise ; Y always <> 0
|
||||
GetRandomDefensive
|
||||
randomize ind_Battery________ ind_Nuclear_Winter_
|
||||
tay
|
||||
lda WeaponUnits,y ; check if weapon exist
|
||||
beq GetRandomDefensive
|
||||
|
||||
NoSuprise
|
||||
lda TanksWeaponsTableL,x
|
||||
sta weaponPointer
|
||||
lda TanksWeaponsTableH,x
|
||||
@@ -810,8 +837,6 @@ positiveMoney
|
||||
lda #99
|
||||
sta (weaponPointer),y
|
||||
LessThan100
|
||||
sty LastWeapon ; store last purchased weapon
|
||||
; because we must put screen pointer next to it
|
||||
|
||||
mva #0 PositionOnTheList ; to move the pointer to the top when no more monies
|
||||
jmp Purchase.AfterPurchase
|
||||
|
||||
Reference in New Issue
Block a user