number of fixes

This commit is contained in:
Vasyl Horbachenko
2018-10-22 02:13:38 +03:00
parent 933e064079
commit 8f4094ee98
7 changed files with 19 additions and 8 deletions

View File

@@ -20,6 +20,8 @@ FRONTLINE_CAS_FIGHTS_COUNT = 4, 8
FRONTLINE_CAS_GROUP_MIN = 1, 2
FRONTLINE_CAS_PADDING = 12000
FIGHT_DISTANCE = 1500
class ArmorConflictGenerator:
def __init__(self, mission: Mission, conflict: Conflict):
@@ -56,8 +58,8 @@ class ArmorConflictGenerator:
def _generate_fight_at(self, attackers: db.ArmorDict, defenders: db.ArmorDict, position: Point):
if attackers:
attack_pos = position.point_from_heading(self.conflict.heading - 90, 8000)
attack_dest = position.point_from_heading(self.conflict.heading + 90, 25000)
attack_pos = position.point_from_heading(self.conflict.heading - 90, FIGHT_DISTANCE)
attack_dest = position.point_from_heading(self.conflict.heading + 90, FIGHT_DISTANCE * 2)
for type, count in attackers.items():
self._generate_group(
side=self.conflict.attackers_side,
@@ -68,8 +70,8 @@ class ArmorConflictGenerator:
)
if defenders:
def_pos = position.point_from_heading(self.conflict.heading + 90, 4000)
def_dest = position.point_from_heading(self.conflict.heading - 90, 25000)
def_pos = position.point_from_heading(self.conflict.heading + 90, FIGHT_DISTANCE)
def_dest = position.point_from_heading(self.conflict.heading - 90, FIGHT_DISTANCE * 2)
for type, count in defenders.items():
self._generate_group(
side=self.conflict.defenders_side,