From 7162011d2678d3730dbaafd340f1a74eb0053790 Mon Sep 17 00:00:00 2001 From: Yair Morgenstern Date: Tue, 28 Nov 2023 14:31:43 +0200 Subject: [PATCH] Resolves #10599 - Cities you haven't bombarded with will auto-bombard at turn end --- .../unciv/logic/automation/civilization/NextTurnAutomation.kt | 2 +- core/src/com/unciv/logic/civilization/managers/TurnManager.kt | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/core/src/com/unciv/logic/automation/civilization/NextTurnAutomation.kt b/core/src/com/unciv/logic/automation/civilization/NextTurnAutomation.kt index c214703721..4eedbb46ce 100644 --- a/core/src/com/unciv/logic/automation/civilization/NextTurnAutomation.kt +++ b/core/src/com/unciv/logic/automation/civilization/NextTurnAutomation.kt @@ -352,7 +352,7 @@ object NextTurnAutomation { } } - private fun automateCityBombardment(civInfo: Civilization) { + fun automateCityBombardment(civInfo: Civilization) { for (city in civInfo.cities) UnitAutomation.tryBombardEnemy(city) } diff --git a/core/src/com/unciv/logic/civilization/managers/TurnManager.kt b/core/src/com/unciv/logic/civilization/managers/TurnManager.kt index 1954884abc..2ee519f86a 100644 --- a/core/src/com/unciv/logic/civilization/managers/TurnManager.kt +++ b/core/src/com/unciv/logic/civilization/managers/TurnManager.kt @@ -31,7 +31,7 @@ class TurnManager(val civInfo: Civilization) { fun startTurn(progressBar: NextTurnProgress? = null) { if (civInfo.isSpectator()) return - + civInfo.threatManager.clear() if (civInfo.isMajorCiv() && civInfo.isAlive()) { civInfo.statsHistory.recordRankingStats(civInfo) @@ -225,6 +225,8 @@ class TurnManager(val civInfo: Civilization) { fun endTurn(progressBar: NextTurnProgress? = null) { + NextTurnAutomation.automateCityBombardment(civInfo) // Bombard with all cities that haven't, maybe you missed one + val notificationsLog = civInfo.notificationsLog val notificationsThisTurn = Civilization.NotificationsLog(civInfo.gameInfo.turns) notificationsThisTurn.notifications.addAll(civInfo.notifications)