Skip to content

Commit 7162011

Browse files
committed
Resolves yairm210#10599 - Cities you haven't bombarded with will auto-bombard at turn end
1 parent e872f5a commit 7162011

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

core/src/com/unciv/logic/automation/civilization/NextTurnAutomation.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ object NextTurnAutomation {
352352
}
353353
}
354354

355-
private fun automateCityBombardment(civInfo: Civilization) {
355+
fun automateCityBombardment(civInfo: Civilization) {
356356
for (city in civInfo.cities) UnitAutomation.tryBombardEnemy(city)
357357
}
358358

core/src/com/unciv/logic/civilization/managers/TurnManager.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class TurnManager(val civInfo: Civilization) {
3131

3232
fun startTurn(progressBar: NextTurnProgress? = null) {
3333
if (civInfo.isSpectator()) return
34-
34+
3535
civInfo.threatManager.clear()
3636
if (civInfo.isMajorCiv() && civInfo.isAlive()) {
3737
civInfo.statsHistory.recordRankingStats(civInfo)
@@ -225,6 +225,8 @@ class TurnManager(val civInfo: Civilization) {
225225

226226

227227
fun endTurn(progressBar: NextTurnProgress? = null) {
228+
NextTurnAutomation.automateCityBombardment(civInfo) // Bombard with all cities that haven't, maybe you missed one
229+
228230
val notificationsLog = civInfo.notificationsLog
229231
val notificationsThisTurn = Civilization.NotificationsLog(civInfo.gameInfo.turns)
230232
notificationsThisTurn.notifications.addAll(civInfo.notifications)

0 commit comments

Comments
 (0)