mirror of
https://github.com/yairm210/Unciv.git
synced 2025-02-22 04:29:17 +07:00
Pops defeat msg before AI founds any city.
This commit is contained in:
parent
292297e02d
commit
28cc905bb5
@ -219,6 +219,12 @@ class Battle(val gameInfo:GameInfo) {
|
||||
defender.takeDamage(100)
|
||||
return
|
||||
} // barbarians don't capture civilians!
|
||||
|
||||
if (defender.getCivInfo().isDefeated()) {//Last settler captured
|
||||
defender.getCivInfo().destroy()
|
||||
attacker.getCivInfo().popupAlerts.add(PopupAlert(AlertType.Defeated,defender.getCivInfo().civName))
|
||||
}
|
||||
|
||||
val capturedUnit = (defender as MapUnitCombatant).unit
|
||||
capturedUnit.civInfo.addNotification("An enemy ["+attacker.getName()+"] has captured our ["+defender.getName()+"]",
|
||||
defender.getTile().position, Color.RED)
|
||||
@ -226,4 +232,4 @@ class Battle(val gameInfo:GameInfo) {
|
||||
capturedUnit.civInfo.removeUnit(capturedUnit)
|
||||
capturedUnit.assignOwner(attacker.getCivInfo())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user