mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-20 20:59:18 +07:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
@ -398,6 +398,11 @@ object Battle {
|
|||||||
private fun reduceAttackerMovementPointsAndAttacks(attacker: ICombatant, defender: ICombatant) {
|
private fun reduceAttackerMovementPointsAndAttacks(attacker: ICombatant, defender: ICombatant) {
|
||||||
if (attacker is MapUnitCombatant) {
|
if (attacker is MapUnitCombatant) {
|
||||||
val unit = attacker.unit
|
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
|
unit.attacksThisTurn += 1
|
||||||
if (unit.hasUnique(UniqueType.CanMoveAfterAttacking) || unit.maxAttacksPerTurn() > unit.attacksThisTurn) {
|
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,
|
// if it was a melee attack and we won, then the unit ALREADY got movement points deducted,
|
||||||
|
Reference in New Issue
Block a user