Set a max cap on unit maintenance - does not increase past the base turn limit

This commit is contained in:
Yair Morgenstern
2021-01-01 13:01:06 +02:00
parent 7ff5fe4650
commit e9f1c38c8b

View File

@ -39,7 +39,7 @@ class CivInfoStats(val civInfo: CivilizationInfo){
}
val turnLimit = BASE_GAME_DURATION_TURNS * civInfo.gameInfo.gameParameters.gameSpeed.modifier
val gameProgress = civInfo.gameInfo.turns / turnLimit // as game progresses Maintenance cost rises
val gameProgress = min(civInfo.gameInfo.turns / turnLimit, 1f) // as game progresses Maintenance cost rises
var cost = baseUnitCost * numberOfUnitsToPayFor * (1 + gameProgress)
cost = cost.pow(1 + gameProgress / 3) // Why 3? To spread 1 to 1.33
if (!civInfo.isPlayerCivilization())