mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-13 17:28:57 +07:00
Pops defeat msg before AI founds any city.
This commit is contained in:

committed by
Yair Morgenstern

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)
|
||||
|
Reference in New Issue
Block a user