Attacking with a unit disables its "move" command

This commit is contained in:
Yair Morgenstern 2018-07-11 21:31:59 +03:00
parent 3215e0eea9
commit c05503bb86

View file

@ -95,6 +95,9 @@ class Battle(val gameInfo:GameInfo=UnCivGame.Current.gameInfo) {
if(attacker is MapUnitCombatant) attacker.unit.promotions.XP += 2
if(defender is MapUnitCombatant) defender.unit.promotions.XP += 2
}
if(attacker is MapUnitCombatant && attacker.unit.action!=null && attacker.unit.action!!.startsWith("moveTo"))
attacker.unit.action=null
}
private fun conquerCity(city: CityInfo, attacker: ICombatant) {