diff --git a/android/assets/jsons/Buildings.json b/android/assets/jsons/Buildings.json index 631b7b077d..098cfcfc05 100644 --- a/android/assets/jsons/Buildings.json +++ b/android/assets/jsons/Buildings.json @@ -356,7 +356,7 @@ "isNationalWonder": true, "percentStatBonus": {"science": 50}, "requiredBuildingInAllCities": "Library", - "requiredTech": "Civil Service" + "requiredTech": "Philosophy" }, { "name": "Manhattan Project", diff --git a/android/assets/jsons/Policies.json b/android/assets/jsons/Policies.json index 1bcfed0de6..4a41909812 100644 --- a/android/assets/jsons/Policies.json +++ b/android/assets/jsons/Policies.json @@ -416,7 +416,7 @@ }, { "name": "Police State", - "description": "Captured cities retain their previous borders", + "description": "+3 Happiness from every Courthouse. Build Courthouses in half the usual time.", "requires": ["Militarism"], "row": 2, "column": 5 @@ -430,7 +430,7 @@ }, { "name": "Autocracy Complete", - "description": "+1 happiness from each Walls, Castle and Arsenal" + "description": "+20% attack bonus to all Military Units for 30 turns" } ] } diff --git a/android/assets/jsons/translationsByLanguage/Russian.properties b/android/assets/jsons/translationsByLanguage/Russian.properties index 4a86d8b6bd..895f9d1771 100644 --- a/android/assets/jsons/translationsByLanguage/Russian.properties +++ b/android/assets/jsons/translationsByLanguage/Russian.properties @@ -1203,11 +1203,11 @@ Gold cost of purchasing units -33% = Стоимость покупки юнит Fascism = Фашизм Quantity of strategic resources produced by the empire increased by 100% = Количество стратегических ресурсов обрабатываемых империей, удваивается Police State = Полицейский участок -Captured cities retain their previous borders = Захваченные города сохраняют свои прежние границы ++3 Happiness from every Courthouse. Build Courthouses in half the usual time. = +3 счастья за каждый Суд. Суды строятся в 2 раза быстрее. Total War = Тотальная война +15% production when building military units and new military units start with 15 Experience = +15% К производству военных юнитов, Военные юниты создаются с 15 опыта Autocracy Complete = Автократия Завершена -+1 happiness from each Walls, Castle and Arsenal = +1 счастье за каждую стену, замок и арсенал ++20% attack bonus to all Military Units for 30 turns = +20% к силе атаки для всех военных подразделений на 30 ходов # Technologies diff --git a/android/assets/jsons/translationsByLanguage/Ukrainian.properties b/android/assets/jsons/translationsByLanguage/Ukrainian.properties index 195a7bb9a6..58b36032ae 100644 --- a/android/assets/jsons/translationsByLanguage/Ukrainian.properties +++ b/android/assets/jsons/translationsByLanguage/Ukrainian.properties @@ -1224,11 +1224,11 @@ Gold cost of purchasing units -33% = Ціна купівлі підрозділ Fascism = Фашизм Quantity of strategic resources produced by the empire increased by 100% = Кількість вироблених імперією стратегічних ресурсів зростає на 100% Police State = Поліційна держава -Captured cities retain their previous borders = Захоплені міста зберігають свої попередні кордони ++3 Happiness from every Courthouse. Build Courthouses in half the usual time. = +3 щастя від кожного Суду. Суди будуються вдвійчі швидше. Total War = Тотальна війна +15% production when building military units and new military units start with 15 Experience = +15 виробництва при будівництві військових підрозділів і нові військові підрозділи розпочинають з 15-ма од. досвіду Autocracy Complete = Автократія завершена -+1 happiness from each Walls, Castle and Arsenal = +1 щастя за кожні мури, замок та арсенал ++20% attack bonus to all Military Units for 30 turns = +20% до сили атаки для всіх військових підрозділів на 30 ходів # Technologies diff --git a/android/assets/jsons/translationsByLanguage/template.properties b/android/assets/jsons/translationsByLanguage/template.properties index da7ae5a7db..3ea7996acc 100644 --- a/android/assets/jsons/translationsByLanguage/template.properties +++ b/android/assets/jsons/translationsByLanguage/template.properties @@ -1203,11 +1203,11 @@ Gold cost of purchasing units -33% = Fascism = Quantity of strategic resources produced by the empire increased by 100% = Police State = -Captured cities retain their previous borders = ++3 Happiness from every Courthouse. Build Courthouses in half the usual time. = Total War = +15% production when building military units and new military units start with 15 Experience = Autocracy Complete = -+1 happiness from each Walls, Castle and Arsenal = ++20% attack bonus to all Military Units for 30 turns = # Technologies diff --git a/core/src/com/unciv/logic/battle/BattleDamage.kt b/core/src/com/unciv/logic/battle/BattleDamage.kt index 67fcc88ff9..efe7acb47d 100644 --- a/core/src/com/unciv/logic/battle/BattleDamage.kt +++ b/core/src/com/unciv/logic/battle/BattleDamage.kt @@ -107,6 +107,7 @@ class BattleDamage{ fun getAttackModifiers(attacker: ICombatant, defender: ICombatant): HashMap { val modifiers = getGeneralModifiers(attacker, defender) + val policies = attacker.getCivInfo().policies if(attacker is MapUnitCombatant) { modifiers.putAll(getTileSpecificModifiers(attacker,defender.getTile())) @@ -132,10 +133,13 @@ class BattleDamage{ if (numberOfAttackersSurroundingDefender > 1) modifiers["Flanking"] = 0.1f * (numberOfAttackersSurroundingDefender-1) //https://www.carlsguides.com/strategy/civilization5/war/combatbonuses.php } + + if (policies.isAdopted("Autocracy Complete") && (policies.autocracyCompletedTurns > 0)) + modifiers["Autocracy Complete"] = 0.2f } else if (attacker is CityCombatant) { - if (attacker.getCivInfo().policies.isAdopted("Oligarchy") && attacker.city.getCenterTile().militaryUnit != null) + if (policies.isAdopted("Oligarchy") && attacker.city.getCenterTile().militaryUnit != null) modifiers["Oligarchy"] = 0.5f } diff --git a/core/src/com/unciv/logic/city/CityInfo.kt b/core/src/com/unciv/logic/city/CityInfo.kt index 513c7717a8..92fa70f2fe 100644 --- a/core/src/com/unciv/logic/city/CityInfo.kt +++ b/core/src/com/unciv/logic/city/CityInfo.kt @@ -360,16 +360,10 @@ class CityInfo { } fun annexCity() { - if(!civInfo.policies.isAdopted("Police State")) { - expansion.cultureStored = 0 - expansion.reset() - reassignWorkers() - } - - isPuppet=false + isPuppet = false cityConstructions.inProgressConstructions.clear() // undo all progress of the previous civ on units etc. cityStats.update() - UncivGame.Current.worldScreen.shouldUpdate=true + UncivGame.Current.worldScreen.shouldUpdate = true } /** This happens when we either puppet OR annex, basically whenever we conquer a city and don't liberate it */ diff --git a/core/src/com/unciv/logic/civilization/PolicyManager.kt b/core/src/com/unciv/logic/civilization/PolicyManager.kt index d4bfadf076..c834a66fb6 100644 --- a/core/src/com/unciv/logic/civilization/PolicyManager.kt +++ b/core/src/com/unciv/logic/civilization/PolicyManager.kt @@ -19,6 +19,7 @@ class PolicyManager { var shouldOpenPolicyPicker = false get() = field && canAdoptPolicy() var legalismState = HashMap() + var autocracyCompletedTurns = 0 fun clone(): PolicyManager { val toReturn = PolicyManager() @@ -28,6 +29,7 @@ class PolicyManager { toReturn.shouldOpenPolicyPicker = shouldOpenPolicyPicker toReturn.storedCulture = storedCulture toReturn.legalismState.putAll(legalismState) + toReturn.autocracyCompletedTurns = autocracyCompletedTurns return toReturn } @@ -41,6 +43,8 @@ class PolicyManager { storedCulture += culture if (!couldAdoptPolicyBefore && canAdoptPolicy()) shouldOpenPolicyPicker = true + if (autocracyCompletedTurns > 0) + autocracyCompletedTurns -= 1 } // from https://forums.civfanatics.com/threads/the-number-crunching-thread.389702/ @@ -125,6 +129,7 @@ class PolicyManager { civInfo.addGreatPerson(greatPerson) } } + "Autocracy Complete" -> autocracyCompletedTurns = 30 } // This ALSO has the side-effect of updating the CivInfo statForNextTurn so we don't need to call it explicitly diff --git a/core/src/com/unciv/models/ruleset/Building.kt b/core/src/com/unciv/models/ruleset/Building.kt index 7342ff01c4..2c36055091 100644 --- a/core/src/com/unciv/models/ruleset/Building.kt +++ b/core/src/com/unciv/models/ruleset/Building.kt @@ -153,15 +153,16 @@ class Building : NamedStats(), IConstruction{ if (adoptedPolicies.contains("Constitution") && isWonder) stats.culture += 2f - if (adoptedPolicies.contains("Autocracy Complete") && cityStrength > 0) - stats.happiness += 1 - if (baseBuildingName == "Castle" && civInfo.containsBuildingUnique("+1 happiness, +2 culture and +3 gold from every Castle")){ stats.happiness+=1 stats.culture+=2 stats.gold+=3 } + + if (adoptedPolicies.contains("Police State") && baseBuildingName == "Courthouse") + stats.happiness += 3 + } return stats } @@ -192,19 +193,23 @@ class Building : NamedStats(), IConstruction{ override fun getProductionCost(civInfo: CivilizationInfo): Int { var productionCost = cost.toFloat() + if (!isWonder && culture != 0f && civInfo.policies.isAdopted("Piety")) productionCost *= 0.85f + + if (name == "Courthouse" && civInfo.policies.isAdopted("Police State")) + productionCost *= 0.5f + if (civInfo.isPlayerCivilization()) { - if(!isWonder) { + if (!isWonder) productionCost *= civInfo.getDifficulty().buildingCostModifier - } } else { - if(isWonder) { - productionCost *= civInfo.gameInfo.getDifficulty().aiWonderCostModifier - } else { - productionCost *= civInfo.gameInfo.getDifficulty().aiBuildingCostModifier - } + productionCost *= if(isWonder) + civInfo.gameInfo.getDifficulty().aiWonderCostModifier + else + civInfo.gameInfo.getDifficulty().aiBuildingCostModifier } + productionCost *= civInfo.gameInfo.gameParameters.gameSpeed.modifier return productionCost.toInt() } diff --git a/core/src/com/unciv/ui/worldscreen/WorldScreen.kt b/core/src/com/unciv/ui/worldscreen/WorldScreen.kt index 705ac84c35..b831cc2b2a 100644 --- a/core/src/com/unciv/ui/worldscreen/WorldScreen.kt +++ b/core/src/com/unciv/ui/worldscreen/WorldScreen.kt @@ -38,25 +38,25 @@ import kotlin.concurrent.thread class WorldScreen(val viewingCiv:CivilizationInfo) : CameraStageBaseScreen() { val gameInfo = game.gameInfo var isPlayersTurn = viewingCiv == gameInfo.currentPlayerCiv // todo this should be updated when passing turns - var waitingForAutosave = false + private var waitingForAutosave = false val mapHolder = WorldMapHolder(this, gameInfo.tileMap) - val minimapWrapper = MinimapHolder(mapHolder) + private val minimapWrapper = MinimapHolder(mapHolder) private val topBar = WorldScreenTopBar(this) val bottomUnitTable = UnitTable(this) - val bottomTileInfoTable = TileInfoTable(viewingCiv) - val battleTable = BattleTable(this) - val unitActionsTable = UnitActionsTable(this) + private val bottomTileInfoTable = TileInfoTable(viewingCiv) + private val battleTable = BattleTable(this) + private val unitActionsTable = UnitActionsTable(this) private val techPolicyAndVictoryHolder = Table() private val techButtonHolder = Table() private val diplomacyButtonWrapper = Table() private val nextTurnButton = createNextTurnButton() - private val tutorialTaskTable=Table().apply { background=ImageGetter.getBackground(ImageGetter.getBlue().lerp(Color.BLACK, 0.5f)) } + private val tutorialTaskTable = Table().apply { background=ImageGetter.getBackground(ImageGetter.getBlue().lerp(Color.BLACK, 0.5f)) } private val notificationsScroll: NotificationsScroll - var shouldUpdate=false + var shouldUpdate = false private var backButtonListener : InputListener