Fix probable bug in procurement

This commit is contained in:
Raffson 2024-08-04 02:37:43 +02:00
parent 9dba85e95b
commit 8796d629e8
No known key found for this signature in database
GPG Key ID: B0402B2C9B764D99

View File

@ -85,8 +85,8 @@ class ProcurementAi:
ground = 1 - air
weighted_investment = aircraft_investment * air + armor_investment * ground
if weighted_investment == 0:
# Turn 0 or all units were destroyed. Either way, split 30/70.
return ground
# Turn 0 or all units were destroyed.
return balance / 100.0
# the more planes we have, the more ground units we want and vice versa
ground_unit_share = aircraft_investment * air / weighted_investment