diff --git a/.idea/modules.xml b/.idea/modules.xml index c32a91ea..b52058de 100644 --- a/.idea/modules.xml +++ b/.idea/modules.xml @@ -3,6 +3,7 @@ + \ No newline at end of file diff --git a/__init__.py b/__init__.py index 5b148ab4..ef534e58 100755 --- a/__init__.py +++ b/__init__.py @@ -48,7 +48,7 @@ if not game: game.settings.sams = sams 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) diff --git a/game/db.py b/game/db.py index 4ef52387..261764c6 100644 --- a/game/db.py +++ b/game/db.py @@ -337,6 +337,10 @@ PLANE_PAYLOAD_OVERRIDES = { 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: { "*": "12x9A4172, 40xS-8", }, diff --git a/game/event/intercept.py b/game/event/intercept.py index 6a6862a2..75d80a6b 100644 --- a/game/event/intercept.py +++ b/game/event/intercept.py @@ -77,6 +77,7 @@ class InterceptEvent(Event): self.operation = op 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) self.transport_unit = random.choice(db.find_unittype(Transport, self.defender_name)) diff --git a/game/game.py b/game/game.py index 7a26706c..1dae70a6 100644 --- a/game/game.py +++ b/game/game.py @@ -46,12 +46,12 @@ Events: * InfantryTransportEvent - helicopter infantry transport """ EVENT_PROBABILITIES = { - CaptureEvent: [100, 4], - InterceptEvent: [25, 5], - GroundInterceptEvent: [25, 5], - GroundAttackEvent: [0, 5], - NavalInterceptEvent: [25, 5], - AntiAAStrikeEvent: [25, 5], + CaptureEvent: [100, 6], + InterceptEvent: [25, 9], + GroundInterceptEvent: [25, 9], + GroundAttackEvent: [0, 9], + NavalInterceptEvent: [25, 9], + AntiAAStrikeEvent: [25, 9], InfantryTransportEvent: [25, 0], } diff --git a/gen/aircraft.py b/gen/aircraft.py index 044c3484..a727174f 100644 --- a/gen/aircraft.py +++ b/gen/aircraft.py @@ -107,14 +107,17 @@ class AircraftConflictGenerator: assert count > 0 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( country=side, name=name, aircraft_type=unit_type, airport=None, - position=at, - altitude=WARM_START_ALTITUDE, - speed=WARM_START_AIRSPEED, + position=pos, + altitude=alt, + speed=WARM_START_AIRSPEED + random.randint(500, 3000), maintask=None, start_type=StartType.Warm, group_size=count) diff --git a/gen/conflictgen.py b/gen/conflictgen.py index e1f3cb30..343c3b91 100644 --- a/gen/conflictgen.py +++ b/gen/conflictgen.py @@ -23,10 +23,9 @@ AIR_DISTANCE = 32000 INTERCEPT_ATTACKERS_HEADING = -45, 45 INTERCEPT_DEFENDERS_HEADING = -10, 10 -INTERCEPT_ATTACKERS_DISTANCE = 60000 -INTERCEPT_DEFENDERS_DISTANCE = 30000 -INTERCEPT_MAX_DISTANCE = 130000 -INTERCEPT_MIN_DISTANCE = 60000 +INTERCEPT_ATTACKERS_DISTANCE = 100000 +INTERCEPT_MAX_DISTANCE = 160000 +INTERCEPT_MIN_DISTANCE = 100000 NAVAL_INTERCEPT_DISTANCE_FACTOR = 0.4 NAVAL_INTERCEPT_DISTANCE_MAX = 40000 @@ -124,7 +123,7 @@ class Conflict: @classmethod 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) heading = _heading_sum(from_cp.position.heading_between_point(to_cp.position), random.choice([-1, 1]) * random.randint(60, 100)) diff --git a/gen/settingsgen.py b/gen/settingsgen.py index eaa5b786..a96e6fd5 100644 --- a/gen/settingsgen.py +++ b/gen/settingsgen.py @@ -15,7 +15,7 @@ from theater import * from gen import * ACTIVATION_TRIGGER_SIZE = 100000 -ACTIVATION_TRIGGER_MIN_DISTANCE = 20000 +ACTIVATION_TRIGGER_MIN_DISTANCE = 10000 PUSH_TRIGGER_SIZE = 3000 @@ -78,10 +78,7 @@ class SettingsGenerator: self.mission.weather.heavy_rain() self.mission.weather.enable_fog = False elif weather_type == 3: - self.mission.weather.clouds_iprecptns = 1 - - while self.mission.weather.clouds_iprecptns != 0: - self.mission.weather.random(self.mission.start_time, self.conflict.theater.terrain) + self.mission.weather.random(self.mission.start_time, self.conflict.theater.terrain) if self.mission.weather.clouds_density > 0: self.mission.weather.clouds_base = max(self.mission.weather.clouds_base, CLOUDS_BASE_MIN) diff --git a/theater/base.py b/theater/base.py index 4997728a..57fd0980 100644 --- a/theater/base.py +++ b/theater/base.py @@ -12,7 +12,7 @@ from dcs.task import * STRENGTH_AA_ASSEMBLE_MIN = 0.2 PLANES_SCRAMBLE_MIN_BASE = 4 PLANES_SCRAMBLE_MAX_BASE = 8 -PLANES_SCRAMBLE_FACTOR = 0.6 +PLANES_SCRAMBLE_FACTOR = 0.8 class Base: diff --git a/ui/basemenu.py b/ui/basemenu.py index 4c6b6d37..37b7a568 100644 --- a/ui/basemenu.py +++ b/ui/basemenu.py @@ -80,6 +80,8 @@ class BaseMenu(Menu): price = db.PRICES[unit_type] self.game.budget += price 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: price = db.PRICES[unit_type] self.game.budget += price