mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-27 22:06:05 -04:00
Units that can move after attacking (horseman, knight) no longer get deducted movement points for BOTH the movement to the enemy tile AND the attack
This commit is contained in:
parent
02c74ad8ba
commit
9aa41d3d13
@ -170,8 +170,10 @@ class Battle(val gameInfo:GameInfo=UnCivGame.Current.gameInfo) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(attacker is MapUnitCombatant) {
|
if(attacker is MapUnitCombatant) {
|
||||||
if (attacker.unit.hasUnique("Can move after attacking"))
|
if (attacker.unit.hasUnique("Can move after attacking")){
|
||||||
attacker.unit.currentMovement = max(0f, attacker.unit.currentMovement - 1)
|
if(!attacker.getUnitType().isMelee() || !defender.isDefeated()) // if it was a melee attack and we won, then the unit ALREADY got movement points deducted, for the movement to the enemie's tile!
|
||||||
|
attacker.unit.currentMovement = max(0f, attacker.unit.currentMovement - 1)
|
||||||
|
}
|
||||||
else attacker.unit.currentMovement = 0f
|
else attacker.unit.currentMovement = 0f
|
||||||
attacker.unit.attacksThisTurn+=1
|
attacker.unit.attacksThisTurn+=1
|
||||||
attacker.unit.action=null // for instance, if it was fortified
|
attacker.unit.action=null // for instance, if it was fortified
|
||||||
|
Loading…
x
Reference in New Issue
Block a user