new weather, strike objectives placement fixes & tarawa for av8b

This commit is contained in:
Vasyl Horbachenko
2018-10-13 22:28:30 +03:00
parent 6d0f488672
commit e2306ba0f3
16 changed files with 119 additions and 63 deletions

View File

@@ -10,9 +10,9 @@ from dcs.task import *
from game import db
STRENGTH_AA_ASSEMBLE_MIN = 0.2
PLANES_SCRAMBLE_MIN_BASE = 4
PLANES_SCRAMBLE_MIN_BASE = 2
PLANES_SCRAMBLE_MAX_BASE = 8
PLANES_SCRAMBLE_FACTOR = 0.6
PLANES_SCRAMBLE_FACTOR = 0.3
BASE_MAX_STRENGTH = 1
BASE_MIN_STRENGTH = 0

View File

@@ -72,8 +72,8 @@ class PersianGulfTheater(ConflictTheater):
self.add_controlpoint(self.havadarya, connected_to=[self.lar, self.qeshm, self.bandar_abbas])
self.add_controlpoint(self.bandar_abbas, connected_to=[self.havadarya])
self.add_controlpoint(self.east_carrier)
self.add_controlpoint(self.west_carrier)
self.add_controlpoint(self.east_carrier)
self.west_carrier.captured = True
self.east_carrier.captured = True

View File

@@ -2,6 +2,7 @@ import math
import pickle
import random
import typing
import logging
from theater.base import *
from theater.conflicttheater import *
@@ -72,8 +73,8 @@ def generate_groundobjects(theater: ConflictTheater):
group_id = 0
for cp in theater.enemy_points():
for _ in range(0, random.randrange(3, 6)):
available_categories = list(tpls) + ["aa", "aa", "aa"]
for _ in range(0, random.randrange(2, 4)):
available_categories = list(tpls) + ["aa", "aa"]
tpl_category = random.choice(available_categories)
tpl = random.choice(list(tpls[tpl_category].values()))
@@ -84,14 +85,17 @@ def generate_groundobjects(theater: ConflictTheater):
print("Couldn't find point for {}".format(cp))
continue
dist = point.distance_to_point(cp.position)
"""
dist = point.distance_to_point(cp.position) - 15000
for another_cp in theater.enemy_points():
if another_cp.position.distance_to_point(point) < dist:
cp = another_cp
"""
group_id += 1
object_id = 0
logging.info("generated {} for {}".format(tpl_category, cp))
for object in tpl:
object_id += 1