mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-24 20:31:51 -04:00
Resolved #12279 - Units that can withdraw before melee do not do so when escorting civilian units
This commit is contained in:
parent
edad6d794b
commit
d25a436391
@ -639,6 +639,7 @@ object Battle {
|
|||||||
private fun doWithdrawFromMeleeAbility(attacker: MapUnitCombatant, defender: MapUnitCombatant): Boolean {
|
private fun doWithdrawFromMeleeAbility(attacker: MapUnitCombatant, defender: MapUnitCombatant): Boolean {
|
||||||
if (defender.unit.isEmbarked()) return false
|
if (defender.unit.isEmbarked()) return false
|
||||||
if (defender.unit.cache.cannotMove) return false
|
if (defender.unit.cache.cannotMove) return false
|
||||||
|
if (defender.unit.isEscorting()) return false // running away and leaving the escorted unit defeats the purpose of escorting
|
||||||
|
|
||||||
// Promotions have no effect as per what I could find in available documentation
|
// Promotions have no effect as per what I could find in available documentation
|
||||||
val fromTile = defender.getTile()
|
val fromTile = defender.getTile()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user