mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-11 00:08:58 +07:00
revert some changes
This commit is contained in:
@ -469,9 +469,7 @@ object UnitAutomation {
|
||||
// this can be sped up if we check each layer separately
|
||||
val unitDistanceToTiles = unit.movement.getDistanceToTilesAtPosition(
|
||||
unit.getTile().position,
|
||||
unit.getMaxMovement() * CLOSE_ENEMY_TURNS_AWAY_LIMIT,
|
||||
// Consider ZoC is expensive - we just want to find the closest, not the exact movement we'll need to get there
|
||||
false,
|
||||
unit.getMaxMovement() * CLOSE_ENEMY_TURNS_AWAY_LIMIT
|
||||
)
|
||||
var closeEnemies = TargetHelper.getAttackableEnemies(
|
||||
unit,
|
||||
|
@ -98,11 +98,11 @@ class TechManager : IsPartOfGameInfoSerialization {
|
||||
}
|
||||
|
||||
private fun getScienceModifier(techName: String): Float { // https://forums.civfanatics.com/threads/the-mechanics-of-overflow-inflation.517970/
|
||||
val techsResearchedKnownCivs = civInfo.getKnownCivs()
|
||||
val numberOfCivsResearchedThisTech = civInfo.getKnownCivs()
|
||||
.count { it.isMajorCiv() && it.tech.isResearched(techName) }
|
||||
val undefeatedCivs = civInfo.gameInfo.civilizations
|
||||
val numberOfCivsRemaining = civInfo.gameInfo.civilizations
|
||||
.count { it.isMajorCiv() && !it.isDefeated() }
|
||||
return 1 + techsResearchedKnownCivs / undefeatedCivs.toFloat() * 0.3f
|
||||
return 1 + numberOfCivsResearchedThisTech / numberOfCivsRemaining.toFloat() * 0.3f
|
||||
}
|
||||
|
||||
private fun getRuleset() = civInfo.gameInfo.ruleset
|
||||
@ -264,6 +264,7 @@ class TechManager : IsPartOfGameInfoSerialization {
|
||||
val scienceSpent = researchOfTech(currentTechnology) + realOverflow
|
||||
if (scienceSpent >= costOfTech(currentTechnology)) {
|
||||
overflowScience = 0
|
||||
if (realOverflow != 0)
|
||||
addScience(realOverflow)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user