diff --git a/game.asm b/game.asm index eebe72c..ef0f858 100644 --- a/game.asm +++ b/game.asm @@ -369,9 +369,10 @@ CheckNextTankAD jsr PutTankNameOnScreen ; jsr DisplayStatus ; There is no need anymore, it is always after PutTankNameOnScreen - bit MeteorsRound + lda MeteorsRound bmi @+ - mva #0 MeteorsFlag + ; A = 0 + sta MeteorsFlag @ lda SkillTable,x beq ManualShooting @@ -380,8 +381,8 @@ RoboTanks ; robotanks shoot here ; TankNr still in X jsr ArtificialIntelligence - ;pause 30 - ldx TankNr + ; after calliing AI we allways have TankNr in X + ;ldx TankNr jsr DisplayStatus ; to make visible AI selected defensive (and offensive :) ) jsr MoveBarrelToNewPosition lda kbcode @@ -451,9 +452,10 @@ ShootNow cmp #ind_Punch ; Punch beq WeponNoFlight ; but with explosion - bit MeteorsRound + lda MeteorsRound bmi @+ - mva #0 MeteorsFlag + ; A = 0 + sta MeteorsFlag @ jsr Shoot ; bullet flight mva #$ff MeteorsFlag @@ -681,13 +683,11 @@ NotShooter scc inc loseH,x ; Energy now, not less than 0 + sec lda Energy,x - cmp EnergyDecrease - bcc ldahashzero - ;sec sbc EnergyDecrease - bpl NotNegativeEnergy -ldahashzero + bcs NotNegativeEnergy + ; if less than 0 then 0 lda #0 NotNegativeEnergy sta Energy,x @@ -712,18 +712,16 @@ NotNegativeEnergy sty EnergyDecrease ldy #0 ; if Shield survive then no decrease tank anergy ; Energy cannot be less than 0 + sec lda ShieldEnergy,x - cmp EnergyDecrease - bcc UseAllShieldEnergy - ;sec sbc EnergyDecrease - bpl NotNegativeShieldEnergy ; jump allways -UseAllShieldEnergy + bcs NotNegativeShieldEnergy ; now calculate rest of energy for future tank energy decrease sec lda EnergyDecrease sbc ShieldEnergy,x tay + ; ShieldEnargy less than 0 then .. 0 lda #0 NotNegativeShieldEnergy sta ShieldEnergy,x @@ -764,8 +762,7 @@ NotNegativeShieldEnergy :4 aslw Wind ; decide the direction lda random - and #$01 - beq @+ + bmi @+ sec ; Wind = -Wind .rept 4 lda #$00 diff --git a/scorch.asm b/scorch.asm index 17232a0..6d4eda7 100644 --- a/scorch.asm +++ b/scorch.asm @@ -30,7 +30,7 @@ ;--------------------------------------------------- .macro build - dta d"1.41" ; number of this build (4 bytes) + dta d"1.42" ; number of this build (4 bytes) .endm .macro RMTSong diff --git a/scorch.bin b/scorch.bin index d161a2a..27fea0c 100644 Binary files a/scorch.bin and b/scorch.bin differ diff --git a/scorch.xex b/scorch.xex index 550ff3e..fe14e8b 100644 Binary files a/scorch.xex and b/scorch.xex differ diff --git a/scorch_cart.xex b/scorch_cart.xex index d8a5a9a..8dbece4 100644 Binary files a/scorch_cart.xex and b/scorch_cart.xex differ