bigger ranger for interceptions; bigger triggers in CPs in close proximity; a10c fixes; same spawn position for aircraft fixed

This commit is contained in:
Vasyl Horbachenko 2018-06-28 05:40:12 +03:00
parent 2222c6a14c
commit 2323f481c5
10 changed files with 28 additions and 21 deletions

1
.idea/modules.xml generated
View File

@ -3,6 +3,7 @@
<component name="ProjectModuleManager"> <component name="ProjectModuleManager">
<modules> <modules>
<module fileurl="file://$PROJECT_DIR$/.idea/dcs_pmcliberation.iml" filepath="$PROJECT_DIR$/.idea/dcs_pmcliberation.iml" /> <module fileurl="file://$PROJECT_DIR$/.idea/dcs_pmcliberation.iml" filepath="$PROJECT_DIR$/.idea/dcs_pmcliberation.iml" />
<module fileurl="file://$PROJECT_DIR$/.idea/dcs_pmcliberation.iml" filepath="$PROJECT_DIR$/.idea/dcs_pmcliberation.iml" />
</modules> </modules>
</component> </component>
</project> </project>

View File

@ -48,7 +48,7 @@ if not game:
game.settings.sams = sams game.settings.sams = sams
if midgame: if midgame:
game.budget = game.budget * 6 * len(list(conflicttheater.conflicts())) game.budget = game.budget * 4 * len(list(conflicttheater.conflicts()))
proceed_to_main_menu(game) proceed_to_main_menu(game)

View File

@ -337,6 +337,10 @@ PLANE_PAYLOAD_OVERRIDES = {
CAS: "AS 2", CAS: "AS 2",
}, },
A_10C: {
CAS: "AGM-65D*2,AGM-65H*2,GBU-12*2,GBU-38*2,AIM-9*2,TGP,ECM,MK151*7",
},
Ka_50: { Ka_50: {
"*": "12x9A4172, 40xS-8", "*": "12x9A4172, 40xS-8",
}, },

View File

@ -77,6 +77,7 @@ class InterceptEvent(Event):
self.operation = op self.operation = op
def player_defending(self, escort: db.PlaneDict, clients: db.PlaneDict): def player_defending(self, escort: db.PlaneDict, clients: db.PlaneDict):
# TODO: even not quick mission is too quick
interceptors = self.from_cp.base.scramble_interceptors(self.game.settings.multiplier) interceptors = self.from_cp.base.scramble_interceptors(self.game.settings.multiplier)
self.transport_unit = random.choice(db.find_unittype(Transport, self.defender_name)) self.transport_unit = random.choice(db.find_unittype(Transport, self.defender_name))

View File

@ -46,12 +46,12 @@ Events:
* InfantryTransportEvent - helicopter infantry transport * InfantryTransportEvent - helicopter infantry transport
""" """
EVENT_PROBABILITIES = { EVENT_PROBABILITIES = {
CaptureEvent: [100, 4], CaptureEvent: [100, 6],
InterceptEvent: [25, 5], InterceptEvent: [25, 9],
GroundInterceptEvent: [25, 5], GroundInterceptEvent: [25, 9],
GroundAttackEvent: [0, 5], GroundAttackEvent: [0, 9],
NavalInterceptEvent: [25, 5], NavalInterceptEvent: [25, 9],
AntiAAStrikeEvent: [25, 5], AntiAAStrikeEvent: [25, 9],
InfantryTransportEvent: [25, 0], InfantryTransportEvent: [25, 0],
} }

View File

@ -107,14 +107,17 @@ class AircraftConflictGenerator:
assert count > 0 assert count > 0
assert unit is not None assert unit is not None
alt = WARM_START_ALTITUDE + random.randint(500, 3000)
pos = Point(at.x + random.randint(100, 200), at.y + random.randint(100, 200))
return self.m.flight_group( return self.m.flight_group(
country=side, country=side,
name=name, name=name,
aircraft_type=unit_type, aircraft_type=unit_type,
airport=None, airport=None,
position=at, position=pos,
altitude=WARM_START_ALTITUDE, altitude=alt,
speed=WARM_START_AIRSPEED, speed=WARM_START_AIRSPEED + random.randint(500, 3000),
maintask=None, maintask=None,
start_type=StartType.Warm, start_type=StartType.Warm,
group_size=count) group_size=count)

View File

@ -23,10 +23,9 @@ AIR_DISTANCE = 32000
INTERCEPT_ATTACKERS_HEADING = -45, 45 INTERCEPT_ATTACKERS_HEADING = -45, 45
INTERCEPT_DEFENDERS_HEADING = -10, 10 INTERCEPT_DEFENDERS_HEADING = -10, 10
INTERCEPT_ATTACKERS_DISTANCE = 60000 INTERCEPT_ATTACKERS_DISTANCE = 100000
INTERCEPT_DEFENDERS_DISTANCE = 30000 INTERCEPT_MAX_DISTANCE = 160000
INTERCEPT_MAX_DISTANCE = 130000 INTERCEPT_MIN_DISTANCE = 100000
INTERCEPT_MIN_DISTANCE = 60000
NAVAL_INTERCEPT_DISTANCE_FACTOR = 0.4 NAVAL_INTERCEPT_DISTANCE_FACTOR = 0.4
NAVAL_INTERCEPT_DISTANCE_MAX = 40000 NAVAL_INTERCEPT_DISTANCE_MAX = 40000
@ -124,7 +123,7 @@ class Conflict:
@classmethod @classmethod
def intercept_conflict(cls, attacker: Country, defender: Country, from_cp: ControlPoint, to_cp: ControlPoint, theater: ConflictTheater): def intercept_conflict(cls, attacker: Country, defender: Country, from_cp: ControlPoint, to_cp: ControlPoint, theater: ConflictTheater):
raw_distance = from_cp.position.distance_to_point(to_cp.position) * 0.6 raw_distance = from_cp.position.distance_to_point(to_cp.position) * 1.5
distance = max(min(raw_distance, INTERCEPT_MAX_DISTANCE), INTERCEPT_MIN_DISTANCE) distance = max(min(raw_distance, INTERCEPT_MAX_DISTANCE), INTERCEPT_MIN_DISTANCE)
heading = _heading_sum(from_cp.position.heading_between_point(to_cp.position), random.choice([-1, 1]) * random.randint(60, 100)) heading = _heading_sum(from_cp.position.heading_between_point(to_cp.position), random.choice([-1, 1]) * random.randint(60, 100))

View File

@ -15,7 +15,7 @@ from theater import *
from gen import * from gen import *
ACTIVATION_TRIGGER_SIZE = 100000 ACTIVATION_TRIGGER_SIZE = 100000
ACTIVATION_TRIGGER_MIN_DISTANCE = 20000 ACTIVATION_TRIGGER_MIN_DISTANCE = 10000
PUSH_TRIGGER_SIZE = 3000 PUSH_TRIGGER_SIZE = 3000
@ -78,10 +78,7 @@ class SettingsGenerator:
self.mission.weather.heavy_rain() self.mission.weather.heavy_rain()
self.mission.weather.enable_fog = False self.mission.weather.enable_fog = False
elif weather_type == 3: elif weather_type == 3:
self.mission.weather.clouds_iprecptns = 1 self.mission.weather.random(self.mission.start_time, self.conflict.theater.terrain)
while self.mission.weather.clouds_iprecptns != 0:
self.mission.weather.random(self.mission.start_time, self.conflict.theater.terrain)
if self.mission.weather.clouds_density > 0: if self.mission.weather.clouds_density > 0:
self.mission.weather.clouds_base = max(self.mission.weather.clouds_base, CLOUDS_BASE_MIN) self.mission.weather.clouds_base = max(self.mission.weather.clouds_base, CLOUDS_BASE_MIN)

View File

@ -12,7 +12,7 @@ from dcs.task import *
STRENGTH_AA_ASSEMBLE_MIN = 0.2 STRENGTH_AA_ASSEMBLE_MIN = 0.2
PLANES_SCRAMBLE_MIN_BASE = 4 PLANES_SCRAMBLE_MIN_BASE = 4
PLANES_SCRAMBLE_MAX_BASE = 8 PLANES_SCRAMBLE_MAX_BASE = 8
PLANES_SCRAMBLE_FACTOR = 0.6 PLANES_SCRAMBLE_FACTOR = 0.8
class Base: class Base:

View File

@ -80,6 +80,8 @@ class BaseMenu(Menu):
price = db.PRICES[unit_type] price = db.PRICES[unit_type]
self.game.budget += price self.game.budget += price
self.event.units[unit_type] = self.event.units[unit_type] - 1 self.event.units[unit_type] = self.event.units[unit_type] - 1
if self.event.units[unit_type] == 0:
del self.event.units[unit_type]
elif self.base.total_units_of_type(unit_type) > 0: elif self.base.total_units_of_type(unit_type) > 0:
price = db.PRICES[unit_type] price = db.PRICES[unit_type]
self.game.budget += price self.game.budget += price