mirror of
https://github.com/Pecusx/scorch_src.git
synced 2026-05-20 22:33:43 +02:00
Mag Deflector added
Only for test. Now all players has active Mag Deflector with energy (99) before game.
This commit is contained in:
+4
-4
@@ -868,14 +868,14 @@ NamesOfWeapons ;the comment is an index in the tables
|
||||
dta d"Horz Guidance " ; 50
|
||||
dta d"Vert Guidance " ; 51
|
||||
dta d"Lazy Boy " ; 52
|
||||
dta d"Parachute " ; 53
|
||||
dta d"Parachute " ; 53 - no energy
|
||||
dta d"Battery " ; 54
|
||||
dta d"Mag Deflector " ; 55
|
||||
dta d"Shield " ; 56 - shield for one shot
|
||||
dta d"Mag Deflector " ; 55 - witch shield and energy
|
||||
dta d"Shield " ; 56 - shield for one shot - no energy
|
||||
dta d"Force Shield " ; 57 - shield with energy and parachute
|
||||
dta d"Heavy Shield " ; 58 - shield with energy
|
||||
dta d"Super Mag " ; 59
|
||||
dta d"Auto Defense " ; 60
|
||||
dta d"Auto Defense " ; 60 - witch shield and energy
|
||||
dta d"Fuel Tank " ; 61
|
||||
dta d"Contact Trigger " ; 62
|
||||
dta d"White Flag " ; 63
|
||||
|
||||
@@ -702,6 +702,8 @@ NoPlayerMissile
|
||||
beq ShieldDraw
|
||||
cmp #60 ; Auto Defence
|
||||
beq DrawTankShieldWihHorns
|
||||
cmp #55 ; Mag Deflector
|
||||
beq DrawTankShieldWihHorns
|
||||
bne NoShieldDraw
|
||||
ShieldDraw
|
||||
jsr DrawTankShield.DrawInPosition
|
||||
|
||||
+3
-3
@@ -129,15 +129,15 @@ START
|
||||
jsr RandomizeSequence
|
||||
; for the round #1 shooting sequence is random
|
||||
|
||||
; activate shield with energy and parachute for all players (test)
|
||||
; activate mag deflector for all players (test)
|
||||
ldx numberOfPlayers
|
||||
dex
|
||||
@
|
||||
mva #60 ActiveDefenceWeapon,x
|
||||
mva #55 ActiveDefenceWeapon,x
|
||||
mva #99 ShieldEnergy,x ; set energy of shield
|
||||
dex
|
||||
bpl @-
|
||||
; shield activated! (test)
|
||||
; mag deflector activated! (test)
|
||||
MainGameLoop
|
||||
VDLI DLIinterruptText ; jsr SetDLI for text (purchase) screen
|
||||
|
||||
|
||||
BIN
Binary file not shown.
+39
-7
@@ -675,6 +675,8 @@ DistanceCheckLoop
|
||||
beq UseShieldWithEnergy
|
||||
cmp #60 ; Auto Defence (it works only if hit ground next to tank. Tank hit is handled in Flight proc)
|
||||
beq UseShieldWithEnergy
|
||||
cmp #55 ; Mag deflector (it works only if hit ground next to tank. Tank hit is handled in Flight proc)
|
||||
beq UseShieldWithEnergy
|
||||
jsr DecreaseEnergyX
|
||||
jmp EndOfDistanceCheckLoop
|
||||
UseShieldWithEnergy
|
||||
@@ -695,7 +697,7 @@ UseShield
|
||||
TankIsNotWithinTheRange
|
||||
EndOfDistanceCheckLoop
|
||||
txa
|
||||
bne DistanceCheckLoop
|
||||
jne DistanceCheckLoop
|
||||
mva #sfx_silencer sfx_effect
|
||||
rts
|
||||
.endp
|
||||
@@ -1834,14 +1836,48 @@ EndOfFlight2
|
||||
|
||||
; and now check for defensive-aggressive weapon
|
||||
lda HitFlag
|
||||
beq NoHitAtEndOfFight
|
||||
bmi NoTankHitAtEndOfFight
|
||||
jeq NoHitAtEndOfFight ; RTS only !!!
|
||||
jmi NoTankHitAtEndOfFight
|
||||
; tank hit - check defensive weapon of this tank
|
||||
tax
|
||||
dex ; index of tank in X
|
||||
lda ActiveDefenceWeapon,x
|
||||
cmp #60 ; Auto Defence
|
||||
beq AutoDefence
|
||||
cmp #55 ; Mag Deflector
|
||||
bne NoDefence
|
||||
MagDeflector
|
||||
; now run defensive-aggressive weapon - Mag Deflector!
|
||||
; get tank position
|
||||
clc
|
||||
lda xtankstableL,x
|
||||
adc #$04 ; almost in tak center :)
|
||||
sta XHit
|
||||
lda xtankstableH,x
|
||||
adc #$00
|
||||
sta XHit+1
|
||||
lda #$ff ; change to ground hit (we hope)
|
||||
sta HitFlag
|
||||
bit random ; left or right deflection ?
|
||||
bpl RightDeflection
|
||||
LeftDeflection
|
||||
sbw XHit #18 ; 18 pixels to right and explode...
|
||||
bit XHit+1 ; if off-screen ...
|
||||
bpl EndOfMagDeflector ; hit of course but we need RTS
|
||||
adw XHit #36 ; change to right :)
|
||||
jmp EndOfMagDeflector
|
||||
RightDeflection
|
||||
adw XHit #18 ; 18 pixels to right and explode...
|
||||
cpw XHit screenwidth ; if off-screen ...
|
||||
bcs EndOfMagDeflector ; hit of course but we need RTS
|
||||
sbw XHit #36 ; change to left
|
||||
EndOfMagDeflector
|
||||
mwa XHit xdraw ; why? !!!
|
||||
NoTankHitAtEndOfFight
|
||||
NoHitAtEndOfFight
|
||||
NoDefence
|
||||
rts ; END !!!
|
||||
AutoDefence
|
||||
; now run defensive-aggressive weapon - Auto Defence!
|
||||
sbb #255 LeapFrogAngle Angle ; swap angle (LeapFrogAngle - because we have strored angle in this variable)
|
||||
lsrw Force ; Force = Force / 2 - becouse earlier we multiplied by 2
|
||||
@@ -1862,10 +1898,6 @@ EndOfFlight2
|
||||
sbw YHit #5 ytraj+1
|
||||
mva #1 color
|
||||
jmp RepeatFlight ; and repeat Fight
|
||||
NoTankHitAtEndOfFight
|
||||
NoHitAtEndOfFight
|
||||
NoDefence
|
||||
rts
|
||||
.endp
|
||||
|
||||
.proc SecondFlight
|
||||
|
||||
Reference in New Issue
Block a user