fixes to convoy strikes; UI updates; don't generate helis for enemy

This commit is contained in:
Vasyl Horbachenko
2018-11-06 04:06:59 +02:00
parent 7842c69ebb
commit fbbe56f954
7 changed files with 67 additions and 131 deletions

View File

@@ -486,6 +486,7 @@ def task_name(task) -> str:
def choose_units(for_task: Task, factor: float, count: int, country: str) -> typing.Collection[UnitType]:
suitable_unittypes = find_unittype(for_task, country)
suitable_unittypes = [x for x in suitable_unittypes if x not in helicopter_map.values()]
suitable_unittypes.sort(key=lambda x: PRICES[x])
idx = int(len(suitable_unittypes) * factor)

View File

@@ -15,7 +15,7 @@ DEFENDERS_AMOUNT_FACTOR = 4
class ConvoyStrikeEvent(Event):
SUCCESS_FACTOR = 0.7
SUCCESS_FACTOR = 0.6
STRENGTH_INFLUENCE = 0.25
targets = None # type: db.ArmorDict

View File

@@ -8,7 +8,7 @@ class StrikeEvent(Event):
SINGLE_OBJECT_STRENGTH_INFLUENCE = 0.05
def __str__(self):
return "Strike"
return "Strike / SEAD"
def is_successfull(self, debriefing: Debriefing):
return True