mirror of
https://github.com/yairm210/Unciv.git
synced 2025-02-10 19:09:06 +07:00
Added "conquer defeated city with melee unit" tutorial
This commit is contained in:
parent
97bb4e05b9
commit
b79b682376
@ -235,4 +235,13 @@
|
||||
]
|
||||
]
|
||||
|
||||
EnemyCityNeedsConqueringWithMeleeUnit: [
|
||||
[
|
||||
"The city can no longer put up any resistance!",
|
||||
"However, to conquer it, you must enter the city with a melee unit"
|
||||
]
|
||||
]
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
@ -8,6 +8,7 @@ import com.badlogic.gdx.scenes.scene2d.ui.TextButton
|
||||
import com.unciv.UnCivGame
|
||||
import com.unciv.logic.GameSaver
|
||||
import com.unciv.logic.civilization.CivilizationInfo
|
||||
import com.unciv.logic.civilization.DiplomaticStatus
|
||||
import com.unciv.models.gamebasics.tile.ResourceType
|
||||
import com.unciv.ui.pickerscreens.GreatPersonPickerScreen
|
||||
import com.unciv.ui.pickerscreens.PolicyPickerScreen
|
||||
@ -88,6 +89,15 @@ class WorldScreen : CameraStageBaseScreen() {
|
||||
displayTutorials("AfterCityEntered")
|
||||
}
|
||||
|
||||
if(!UnCivGame.Current.settings.tutorialsShown.contains("EnemyCityNeedsConqueringWithMeleeUnit")) {
|
||||
for (enemyCity in civInfo.diplomacy.values.filter { it.diplomaticStatus == DiplomaticStatus.War }
|
||||
.map { it.otherCiv() }.flatMap { it.cities }) {
|
||||
if (enemyCity.health == 1 && enemyCity.getCenterTile().getTilesInDistance(2)
|
||||
.any { it.getUnits().any { unit -> unit.civInfo == civInfo } })
|
||||
displayTutorials("EnemyCityNeedsConqueringWithMeleeUnit")
|
||||
}
|
||||
}
|
||||
|
||||
updateTechButton()
|
||||
updateDiplomacyButton()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user