mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-10 15:59:33 +07:00
When attacking a tile that has both a military and civilian unit, and defeating the militaryunit, the civilian unit is now destroyed
This commit is contained in:
@ -164,8 +164,10 @@ class Battle(val gameInfo:GameInfo=UnCivGame.Current.gameInfo) {
|
|||||||
conquerCity((defender as CityCombatant).city, attacker)
|
conquerCity((defender as CityCombatant).city, attacker)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (defender.isDefeated() && attacker.isMelee())
|
if (defender.isDefeated() && attacker.isMelee()) {
|
||||||
|
attackedTile.civilianUnit = null // Maybe we defeated the military unit (so it's now removed) but the civilian unit is still there
|
||||||
(attacker as MapUnitCombatant).unit.moveToTile(attackedTile)
|
(attacker as MapUnitCombatant).unit.moveToTile(attackedTile)
|
||||||
|
}
|
||||||
|
|
||||||
if(attacker is MapUnitCombatant) {
|
if(attacker is MapUnitCombatant) {
|
||||||
if (attacker.unit.hasUnique("Can move after attacking"))
|
if (attacker.unit.hasUnique("Can move after attacking"))
|
||||||
|
Reference in New Issue
Block a user