mirror of
https://github.com/yairm210/Unciv.git
synced 2025-02-20 19:56:51 +01:00
parent
f865cf68a9
commit
49d92f0806
|
|
@ -169,12 +169,14 @@ class Spy private constructor() : IsPartOfGameInfoSerialization {
|
|||
val stealableTechs = espionageManager.getTechsToSteal(getCity().civ)
|
||||
if (stealableTechs.isEmpty()) return -1
|
||||
|
||||
val techStealCost = stealableTechs.maxOfOrNull { civInfo.gameInfo.ruleset.technologies[it]!!.cost }!!
|
||||
var techStealCost = stealableTechs.maxOfOrNull { civInfo.gameInfo.ruleset.technologies[it]!!.cost }!!.toFloat()
|
||||
val techSpeedModifier = civInfo.gameInfo.speed.scienceCostModifier //Modify steal cost according to game speed
|
||||
techStealCost *= techSpeedModifier * 1.25f //Multiply by 1.25f, according to Civ5 GlobalDefines.XML
|
||||
var progressThisTurn = getCity().cityStats.currentCityStats.science
|
||||
if (progressThisTurn <= 0f) return -2 // The city has no science
|
||||
|
||||
// 33% spy bonus for each level
|
||||
progressThisTurn *= (rank + 2f) / 3f
|
||||
// 25% spy bonus for each level
|
||||
progressThisTurn *= (rank + 3f) / 4f
|
||||
progressThisTurn *= getEfficiencyModifier().toFloat()
|
||||
progressTowardsStealingTech += progressThisTurn.toInt()
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user