Merge remote-tracking branch 'origin/master'

This commit is contained in:
yairm210 2022-01-15 23:16:42 +02:00
commit f8e9b6912e

View File

@ -398,6 +398,11 @@ object Battle {
private fun reduceAttackerMovementPointsAndAttacks(attacker: ICombatant, defender: ICombatant) {
if (attacker is MapUnitCombatant) {
val unit = attacker.unit
// If captured this civilian, doesn't count as attack
// And we've used a movement already
if(defender.isCivilian() && attacker.getTile() == defender.getTile()){
return
}
unit.attacksThisTurn += 1
if (unit.hasUnique(UniqueType.CanMoveAfterAttacking) || unit.maxAttacksPerTurn() > unit.attacksThisTurn) {
// if it was a melee attack and we won, then the unit ALREADY got movement points deducted,