mirror of
https://github.com/Pecusx/scorch_src.git
synced 2026-05-20 22:33:43 +02:00
Another new weapon! - Lazy Darwin :)
This commit is contained in:
+28
-10
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user