fixes and improvements for fronline CAP

This commit is contained in:
Vasyl Horbachenko
2018-07-17 05:22:41 +03:00
committed by Vasyl Horbachenko
parent 932bec2f84
commit f40f83bb09
8 changed files with 44 additions and 26 deletions

View File

@@ -15,7 +15,7 @@ class FrontlineAttackEvent(Event):
TARGET_AMOUNT_FACTOR = 0.5
ATTACKER_AMOUNT_FACTOR = 0.4
ATTACKER_DEFENDER_FACTOR = 0.7
STRENGTH_INFLUENCE = 0.3
STRENGTH_INFLUENCE = 0.2
SUCCESS_TARGETS_HIT_PERCENTAGE = 0.25
defenders = None # type: db.ArmorDict
@@ -58,7 +58,7 @@ class FrontlineAttackEvent(Event):
self.to_cp.base.affect_strength(-0.1)
def player_attacking(self, armor: db.ArmorDict, strikegroup: db.PlaneDict, clients: db.PlaneDict):
self.defenders = self.to_cp.base.assemble_cap()
self.defenders = self.to_cp.base.assemble_attack()
op = FrontlineAttackOperation(game=self.game,
attacker_name=self.attacker_name,

View File

@@ -12,8 +12,8 @@ from userdata.debriefing import Debriefing
class FrontlinePatrolEvent(Event):
ESCORT_FACTOR = 0.5
STRENGTH_INFLUENCE = 0.3
SUCCESS_TARGETS_HIT_PERCENTAGE = 0.6
STRENGTH_INFLUENCE = 0.2
SUCCESS_TARGETS_HIT_PERCENTAGE = 0.33
cas = None # type: db.PlaneDict
escort = None # type: db.PlaneDict
@@ -61,12 +61,14 @@ class FrontlinePatrolEvent(Event):
op = FrontlinePatrolOperation(game=self.game,
attacker_name=self.attacker_name,
defender_name=self.defender_name,
attacker_clients={},
defender_clients=clients,
attacker_clients=clients,
defender_clients={},
from_cp=self.from_cp,
to_cp=self.to_cp)
op.setup(cas=self.cas,
escort=self.escort,
interceptors=interceptors)
interceptors=interceptors,
armor_attackers=self.from_cp.base.assemble_attack(),
armor_defenders=self.to_cp.base.assemble_attack())
self.operation = op