anti AA operations; number of minor fixes; added harrier

This commit is contained in:
Vasyl Horbachenko
2018-06-21 01:21:43 +03:00
parent e6ccc3ceea
commit 5e42ca08c2
18 changed files with 215 additions and 72 deletions

View File

@@ -3,3 +3,4 @@ from .groundintercept import *
from .intercept import *
from .capture import *
from .navalintercept import *
from .antiaastrike import *

View File

@@ -51,7 +51,7 @@ class AntiAAStrikeEvent(Event):
self.to_cp.base.affect_strength(-0.1)
def player_attacking(self, strikegroup: db.PlaneDict, clients: db.PlaneDict):
self.targets = self.to_cp.base.assemble_aa()
self.targets = self.to_cp.base.assemble_aa(count=self.to_cp.base.total_aa)
op = AntiAAStrikeOperation(game=self.game,
attacker_name=self.attacker_name,

View File

@@ -79,6 +79,7 @@ class CaptureEvent(Event):
self.operation = op
def player_attacking(self, cas: db.PlaneDict, escort: db.PlaneDict, armor: db.ArmorDict, clients: db.PlaneDict):
# TODO: also include CAS planes
interceptors = self.to_cp.base.scramble_sweep()
op = CaptureOperation(game=self.game,
@@ -93,6 +94,7 @@ class CaptureEvent(Event):
escort=escort,
attack=armor,
intercept=interceptors,
# TODO: should strength affect this?
defense=self.to_cp.base.armor,
aa=self.to_cp.base.assemble_aa())