mirror of
https://github.com/Pecusx/scorch_src.git
synced 2026-05-21 06:39:40 +02:00
LimitForce added #70
This commit is contained in:
@@ -33,7 +33,7 @@ loop
|
||||
ArtificialIntelligence .proc ;
|
||||
; A - skill of the TankNr
|
||||
; returns shoot energy and angle in
|
||||
; EnergyTable/L/H and AngleTable
|
||||
; ForceTable/L/H and AngleTable
|
||||
;----------------------------------------------
|
||||
asl
|
||||
tax
|
||||
@@ -77,24 +77,19 @@ Shooter .proc
|
||||
lda PreviousAngle,x
|
||||
clc
|
||||
adc #5
|
||||
bmi leftQuadrant
|
||||
bmi @+
|
||||
cmp #90
|
||||
bcc continue
|
||||
bcc @+
|
||||
lda #(-90)
|
||||
bne continue
|
||||
leftQuadrant
|
||||
|
||||
|
||||
|
||||
continue
|
||||
@
|
||||
sta NewAngle
|
||||
|
||||
lda PreviousEnergyL,x
|
||||
sta EnergyTableL,x
|
||||
sta ForceTableL,x
|
||||
lda PreviousEnergyH,x
|
||||
sta EnergyTableH,x
|
||||
|
||||
sta ForceTableH,x
|
||||
jmp endo
|
||||
|
||||
firstShoot
|
||||
; compare the x position with the middle of the screen
|
||||
lda xTanksTableL,x
|
||||
@@ -108,7 +103,6 @@ firstShoot
|
||||
and #$1F
|
||||
clc
|
||||
adc #5
|
||||
;lda #45
|
||||
|
||||
sta NewAngle
|
||||
jmp forceNow
|
||||
@@ -128,11 +122,12 @@ forceNow
|
||||
|
||||
endo
|
||||
ldx TankNr ;this is possibly not necessary
|
||||
jsr RandomizeForce.LimitForce
|
||||
lda NewAngle
|
||||
sta PreviousAngle,x
|
||||
lda EnergyTableL,x
|
||||
lda ForceTableL,x
|
||||
sta PreviousEnergyL,x
|
||||
lda EnergyTableH,x
|
||||
lda ForceTableH,x
|
||||
sta PreviousEnergyH,x
|
||||
|
||||
; choose the best weapon
|
||||
|
||||
Reference in New Issue
Block a user