More options for better control over procurement

This commit is contained in:
Raffson 2023-02-19 14:14:33 +01:00
parent a4f5c290b5
commit 602f88dab9
No known key found for this signature in database
GPG Key ID: B0402B2C9B764D99
2 changed files with 25 additions and 4 deletions

View File

@ -16,8 +16,6 @@ if TYPE_CHECKING:
from game.factions.faction import Faction
from game.squadrons import Squadron
FRONTLINE_RESERVES_FACTOR = 1.3
@dataclass(frozen=True)
class AircraftProcurementRequest:
@ -258,7 +256,8 @@ class ProcurementAi:
# No source of ground units, so can't buy anything.
continue
purchase_target = cp.frontline_unit_count_limit * FRONTLINE_RESERVES_FACTOR
fr_factor = self.game.settings.frontline_reserves_factor / 100.0
purchase_target = cp.frontline_unit_count_limit * fr_factor
allocated = cp.allocated_ground_units(
self.game.coalition_for(self.is_player).transfers
)

View File

@ -286,7 +286,29 @@ class Settings:
"spend its budget."
),
)
reserves_procurement_target: int = 10
frontline_reserves_factor: int = bounded_int_option(
"AI ground unit front-line reserves factor (%)",
CAMPAIGN_MANAGEMENT_PAGE,
HQ_AUTOMATION_SECTION,
min=0,
max=1000,
default=130,
detail=(
"Factor to be multiplied with the control point's unit count limit "
"to calculate the procurement target for reserve troops at front-lines."
),
)
reserves_procurement_target: int = bounded_int_option(
"AI ground unit reserves procurement target",
CAMPAIGN_MANAGEMENT_PAGE,
HQ_AUTOMATION_SECTION,
min=0,
max=1000,
default=10,
detail=(
"The number of units that will be bought as reserves for applicable control points"
),
)
# Mission Generator
# Gameplay