mirror of
https://github.com/yairm210/Unciv.git
synced 2025-02-10 02:47:24 +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:
parent
0fb3c2256e
commit
6d059fb6ed
@ -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"))
|
||||
|
Loading…
Reference in New Issue
Block a user