Ticket #3484: capture.diff

File capture.diff, 657 bytes (added by fatherbushido, 7 years ago)
  • binaries/data/mods/public/simulation/components/Attack.js

     
    553553            return;
    554554
    555555        let strength = this.GetAttackStrengths("Capture").value * multiplier;
    556         if (cmpCapturable.Reduce(strength, attackerOwner))
     556        if (cmpCapturable.Reduce(strength, attackerOwner) && IsOwnedByEnemyOfPlayer(attackerOwner, target))
    557557            Engine.PostMessage(target, MT_Attacked, {
    558558                "attacker": this.entity,
    559559                "target": target,