mirror of
https://github.com/Pecusx/scorch_src.git
synced 2026-05-20 22:33:43 +02:00
Opty. Now we have 19bytes :)
This commit is contained in:
@@ -369,9 +369,10 @@ CheckNextTankAD
|
|||||||
jsr PutTankNameOnScreen
|
jsr PutTankNameOnScreen
|
||||||
; jsr DisplayStatus ; There is no need anymore, it is always after PutTankNameOnScreen
|
; jsr DisplayStatus ; There is no need anymore, it is always after PutTankNameOnScreen
|
||||||
|
|
||||||
bit MeteorsRound
|
lda MeteorsRound
|
||||||
bmi @+
|
bmi @+
|
||||||
mva #0 MeteorsFlag
|
; A = 0
|
||||||
|
sta MeteorsFlag
|
||||||
@
|
@
|
||||||
lda SkillTable,x
|
lda SkillTable,x
|
||||||
beq ManualShooting
|
beq ManualShooting
|
||||||
@@ -380,8 +381,8 @@ RoboTanks
|
|||||||
; robotanks shoot here
|
; robotanks shoot here
|
||||||
; TankNr still in X
|
; TankNr still in X
|
||||||
jsr ArtificialIntelligence
|
jsr ArtificialIntelligence
|
||||||
;pause 30
|
; after calliing AI we allways have TankNr in X
|
||||||
ldx TankNr
|
;ldx TankNr
|
||||||
jsr DisplayStatus ; to make visible AI selected defensive (and offensive :) )
|
jsr DisplayStatus ; to make visible AI selected defensive (and offensive :) )
|
||||||
jsr MoveBarrelToNewPosition
|
jsr MoveBarrelToNewPosition
|
||||||
lda kbcode
|
lda kbcode
|
||||||
@@ -451,9 +452,10 @@ ShootNow
|
|||||||
cmp #ind_Punch ; Punch
|
cmp #ind_Punch ; Punch
|
||||||
beq WeponNoFlight ; but with explosion
|
beq WeponNoFlight ; but with explosion
|
||||||
|
|
||||||
bit MeteorsRound
|
lda MeteorsRound
|
||||||
bmi @+
|
bmi @+
|
||||||
mva #0 MeteorsFlag
|
; A = 0
|
||||||
|
sta MeteorsFlag
|
||||||
@
|
@
|
||||||
jsr Shoot ; bullet flight
|
jsr Shoot ; bullet flight
|
||||||
mva #$ff MeteorsFlag
|
mva #$ff MeteorsFlag
|
||||||
@@ -681,13 +683,11 @@ NotShooter
|
|||||||
scc
|
scc
|
||||||
inc loseH,x
|
inc loseH,x
|
||||||
; Energy now, not less than 0
|
; Energy now, not less than 0
|
||||||
|
sec
|
||||||
lda Energy,x
|
lda Energy,x
|
||||||
cmp EnergyDecrease
|
|
||||||
bcc ldahashzero
|
|
||||||
;sec
|
|
||||||
sbc EnergyDecrease
|
sbc EnergyDecrease
|
||||||
bpl NotNegativeEnergy
|
bcs NotNegativeEnergy
|
||||||
ldahashzero
|
; if less than 0 then 0
|
||||||
lda #0
|
lda #0
|
||||||
NotNegativeEnergy
|
NotNegativeEnergy
|
||||||
sta Energy,x
|
sta Energy,x
|
||||||
@@ -712,18 +712,16 @@ NotNegativeEnergy
|
|||||||
sty EnergyDecrease
|
sty EnergyDecrease
|
||||||
ldy #0 ; if Shield survive then no decrease tank anergy
|
ldy #0 ; if Shield survive then no decrease tank anergy
|
||||||
; Energy cannot be less than 0
|
; Energy cannot be less than 0
|
||||||
|
sec
|
||||||
lda ShieldEnergy,x
|
lda ShieldEnergy,x
|
||||||
cmp EnergyDecrease
|
|
||||||
bcc UseAllShieldEnergy
|
|
||||||
;sec
|
|
||||||
sbc EnergyDecrease
|
sbc EnergyDecrease
|
||||||
bpl NotNegativeShieldEnergy ; jump allways
|
bcs NotNegativeShieldEnergy
|
||||||
UseAllShieldEnergy
|
|
||||||
; now calculate rest of energy for future tank energy decrease
|
; now calculate rest of energy for future tank energy decrease
|
||||||
sec
|
sec
|
||||||
lda EnergyDecrease
|
lda EnergyDecrease
|
||||||
sbc ShieldEnergy,x
|
sbc ShieldEnergy,x
|
||||||
tay
|
tay
|
||||||
|
; ShieldEnargy less than 0 then .. 0
|
||||||
lda #0
|
lda #0
|
||||||
NotNegativeShieldEnergy
|
NotNegativeShieldEnergy
|
||||||
sta ShieldEnergy,x
|
sta ShieldEnergy,x
|
||||||
@@ -764,8 +762,7 @@ NotNegativeShieldEnergy
|
|||||||
:4 aslw Wind
|
:4 aslw Wind
|
||||||
; decide the direction
|
; decide the direction
|
||||||
lda random
|
lda random
|
||||||
and #$01
|
bmi @+
|
||||||
beq @+
|
|
||||||
sec ; Wind = -Wind
|
sec ; Wind = -Wind
|
||||||
.rept 4
|
.rept 4
|
||||||
lda #$00
|
lda #$00
|
||||||
|
|||||||
+1
-1
@@ -30,7 +30,7 @@
|
|||||||
|
|
||||||
;---------------------------------------------------
|
;---------------------------------------------------
|
||||||
.macro build
|
.macro build
|
||||||
dta d"1.41" ; number of this build (4 bytes)
|
dta d"1.42" ; number of this build (4 bytes)
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro RMTSong
|
.macro RMTSong
|
||||||
|
|||||||
BIN
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user