Another new weapon! - Lazy Darwin :)

This commit is contained in:
Pecusx
2022-11-08 19:31:12 +01:00
parent b3b8633574
commit a7493e1dcb
7 changed files with 45 additions and 16 deletions
+2 -1
View File
@@ -169,7 +169,8 @@ Only these points determine the order in the summary
* **Mag Deflector** - the second passive-aggressive weapon :) . In case of a direct hit on a tank (and shield), it causes the hit point to move randomly to the left or right side of the protected tank, but not very far, so you can get "shrapnel" with stronger weapons. As in the case of **Bouncy Castle**, it is also a shield that corresponds to the action of **Heavy Shield** and has 99 units at the start (probably here we will have also to rethink this value and give a smaller one).
* **Nuclear Winter** - adds nothing, takes nothing away :) - in fact, it is not so much a defensive weapon as a double-edged one. It floods the area with "radioactive" fallout, which is ordinary soil. If you do not have at hand any weapon that digs up the terrain, and for that a shield (preferably disposable), then after such "fallout" you will have to shoot yourself - because being underground is otherwise impossible. Alternatively, **White Flag** always remains.
* **Long Schlong** - a special weapon :) - Costs a lot, doesn't really help with anything (except possibly digging yourself out but only when slightly buried but it has a cool name and looks cool :) - It can be activated independently of other defensive weapons and remains active until the end of the round (it cannot be deactivated).
* **Lazy Boy** - it is not actually a defensive weapon. It is an aiming aid. When it is activated, the tank tries to aim at the nearest enemy and automatically adjusts the power of the shot and angle. If it has too little energy, it can sometimes aim wrong (it uses a method like **Cyborg** to aim). Like **Battery**, it does not deactivate other defensive weapons when used.
* **Lazy Boy** - it is not actually a defensive weapon. It is an aiming aid. When it is activated, the tank tries to aim at the nearest enemy and automatically adjusts the power of the shot and angle. If it has too little energy, it can sometimes aim wrong (it uses a method like **Cyborg** to aim). Like **Battery**, it does not deactivate other defensive weapons when used. Note: There is no point in activating this weapon before the round, targeting will not take place because there is nothing to target yet.
* **Lazy Darwin** - works exactly like **Lazy Boy** but targets the weakest opponent.
Due to the different operations of **MIRV**, defensive weapons **Bouncy Castle** and **Mag Deflector** only use the shielding function when hit by these weapons. In addition, **MIRV** heads do not bounce or fly through sidewalls during descent!
+2 -1
View File
@@ -169,7 +169,8 @@ Tylko te punkty decydują o kolejności w podsumowaniu
* **Mag Deflector** - druga broń agresywna :) . W przypadku bezpośredniego trafienia w czołg (i osłonę) powoduje przesunięcie punktu trafienia losowo w lewo lub prawą stronę chronionego czołgu, ale niezbyt daleko, więc można dostać "odłamkiem" przy silniejszej broni. Tak jak w przypadku Bouncy Castle jest także osłoną odpowiadającą działaniu Heavy Shield i ma na starcie 99 jednostek (prawdopodobnie i tutaj trzeba będzie przemyśleć tę wartość i dać mniejszą).
* **Nuclear Winter** - nic nie dodaje, nic nie zabiera :) - w zasadzie to broń nie tyle defensywna co obosieczna. Zasypuje teren opadem "radioaktywnym", który jest zwyczajną glebą. Jeśli nie mamy pod ręką żadnej broni odkopującej teren i do tego osłony (najlepiej jednorazowej), to po takim "opadzie" będzie trzeba strzelić do siebie - bo będąc pod ziemią inaczej się nie da. Ewentualnie pozostaje zawsze White Flag.
* **Long Schlong** - broń specjalna :) - kosztuje dużo, nie bardzo w czymkolwiek pomaga (poza ewentualnym odkopaniem się ale tylko przy niewielkim przysypaniu ale fajnie się nazywa i wygląda :) - Można ją aktywować niezależnie od innych broni defensywnych i pozostaje aktywna do końca rundy (nie da się jej dezaktywować).
* **Lazy Boy** - nie jest to właściwie broń defensywna. Jest to wspomaganie celowania. Po jej aktywacji czołg stara się wycelować w najbliższego wroga i automatycznie ustawia siłę strzału oraz kąt. W przypadku posiadania zbyt małej ilości energii może czasem wycelować źle (do celowania stosuje metodę taką jak **Cyborg**). Tak jak **Battery** nie dezaktywuje innych broni defensywnych w przypadku jej użycia.
* **Lazy Boy** - nie jest to właściwie broń defensywna. Jest to wspomaganie celowania. Po jej aktywacji czołg stara się wycelować w najbliższego przeciwnika i automatycznie ustawia siłę strzału oraz kąt. W przypadku posiadania zbyt małej ilości energii może czasem wycelować źle (do celowania stosuje metodę taką jak **Cyborg**). Tak jak **Battery** nie dezaktywuje innych broni defensywnych w przypadku jej użycia. Uwaga! Nie ma sensu aktywacja tej broni przed rundą, celowanie nie odbędzie się bo nie ma jeszcze do czego celować.
* **Lazy Darwin** - działa dokładnie jak **Lazy Boy** ale celuje w najsłabszego przeciwnika.
W związku z odmiennym działaniem broni **MIRV**, bronie defensywne **Bouncy Castle** i **Mag Deflector** wykorzystują tylko funkcję osłony przy trafieniu tą bronią. Dodatkowo głowice **MIRV** w czasie opadania nie odbijają się i nie przelatują przez ściany boczne!
+10 -3
View File
@@ -275,6 +275,7 @@ WeaponPriceH ; weapons prices (tables with prices of weapons)
.by >price_Long_Barrel____
.by >price_Nuclear_Winter_
.by >price_Lazy_Boy_______
.by >price_Lazy_Darwin____
WeaponPriceL
.by <price_Baby_Missile___
.by <price_Missile________
@@ -321,6 +322,7 @@ WeaponPriceL
.by <price_Long_Barrel____
.by <price_Nuclear_Winter_
.by <price_Lazy_Boy_______
.by <price_Lazy_Darwin____
;-------------------------------------------------
; how many units (bulletd) of a given weapon we get for a given price
@@ -374,6 +376,7 @@ WeaponUnits
.by 2 ;Long_Barrel____;_42
.by 1 ;Nuclear_Winter_;_43
.by 2 ;Lazy_Boy_______;_44
.by 2 ;Lazy_Darwin____;_45
PurchaseMeTable ;weapons good to be purchased by the robot
;the comment is an index in the tables
@@ -393,7 +396,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 Boy ","Lazy Darwin "
.by %11000000
PurchaseMeTable2 ;weapons good to be purchased by the robot (Cyborg)
@@ -414,7 +417,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 Boy ","Lazy Darwin "
.by %11000000
;-------------------------------------------------
@@ -464,7 +467,8 @@ WeaponSymbols
.by $3f ;ind_Bouncy_Castle__ ;_41
.by $1d ;ind_Long_Barrel____ ;_42
.by $7d ;ind_Nuclear_Winter_ ;_43
.by $03 ;ind_Lazy_Boy_______ ;_44
.by $02 ;ind_Lazy_Boy_______ ;_44
.by $03 ;ind_Lazy_Darwin____ ;_45
; Names of weapons (16 chars long)
NamesOfWeapons ;the comment is an index in the tables
@@ -514,6 +518,8 @@ NamesOfWeapons ;the comment is an index in the tables
dta d"Long Schlong " ; 42
dta d"Nuclear Winter " ; 43
dta d"Lazy Boy " ; 44
dta d"Lazy Darwin " ; 45
DefensiveEnergy = *-(last_offensive_____ - first_offensive____ +1) ; to fake the table for ALL weapons
.by 00 ; White Flag
.by 00 ; Heat Guidance
@@ -528,6 +534,7 @@ DefensiveEnergy = *-(last_offensive_____ - first_offensive____ +1) ; to fake th
.by 00 ; Long Barrel
.by 00 ; Nuclear Winter
.by 00 ; Lazy Boy
.by 00 ; Lazy Darwin
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
@@ -85,6 +85,7 @@ price_Bouncy_Castle__ = 512 ;_41
price_Long_Barrel____ = 2100 ;_42
price_Nuclear_Winter_ = 1000 ;_43
price_Lazy_Boy_______ = 500 ;_44
price_Lazy_Darwin____ = 500 ;_45
;Weapon indexes (numbers)
ind_Baby_Missile___ = 0
first_offensive____ = ind_Baby_Missile___
@@ -134,7 +135,8 @@ ind_Bouncy_Castle__ = 41
ind_Long_Barrel____ = 42
ind_Nuclear_Winter_ = 43
ind_Lazy_Boy_______ = 44
last_defensive_____ = ind_Lazy_Boy_______
ind_Lazy_Darwin____ = 45
last_defensive_____ = ind_Lazy_Darwin____
number_of_offensives = last_offensive_____ - first_offensive____+1
number_of_defensives = (last_defensive_____ - first_defensive____+1)
;--------------------------------
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
+28 -10
View File
@@ -854,20 +854,22 @@ NotBattery
mva #sfx_smoke_cloud sfx_effect
phy
jsr PrepareAIShoot
;jsr FindBestTarget3 ; find target with lowest energy
jsr FindBestTarget2 ; find nearest tank neighbour
sty TargetTankNr
; aiming
jsr TakeAim ; direction still in A (0 - left, >0 - right)
lda Force
sta ForceTableL,x
lda Force+1
sta ForceTableH,x
lda NewAngle
sta AngleTable,x
jsr LazyAim
ply
jmp DecreaseDefensive ; bypass activation
NoLazyBoy
cmp #ind_Lazy_Darwin____
bne NoLazyDarwin
; Lazy Darwin - do it like battery
mva #sfx_smoke_cloud sfx_effect
phy
jsr PrepareAIShoot
jsr FindBestTarget3 ; find target with lowest energy
jsr LazyAim
ply
jmp DecreaseDefensive ; bypass activation
NoLazyDarwin
cmp #ind_Long_Barrel____
bne NotBarrel
; if activate long barrel, we do it differently too
@@ -906,6 +908,22 @@ DefActivationEnd
jmp WaitForKeyRelease ; rts
.endp
.proc LazyAim
; aiming proc for Lazy ... weapons
; as proc for memory optimisation
; Y - target tan nr
; A - target direction
sty TargetTankNr
; aiming
jsr TakeAim ; direction still in A (0 - left, >0 - right)
lda Force
sta ForceTableL,x
lda Force+1
sta ForceTableH,x
lda NewAngle
sta AngleTable,x
rts
.endp
; -----------------------------------------------------
.proc calcPosDefensive
; calculate positionOnTheList from the activeWeapon (defensives)