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:
Yair Morgenstern 2018-06-04 10:15:41 +03:00
parent 0fb3c2256e
commit 6d059fb6ed

View File

@ -164,8 +164,10 @@ class Battle(val gameInfo:GameInfo=UnCivGame.Current.gameInfo) {
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)
}
if(attacker is MapUnitCombatant) {
if (attacker.unit.hasUnique("Can move after attacking"))