From b8077f1d5db7e9a8e826af0432837a9d796a78d2 Mon Sep 17 00:00:00 2001 From: abcdefg30 Date: Sat, 7 Apr 2018 00:31:42 +0200 Subject: [PATCH] Fix the campaign AI defending captured buildings --- mods/d2k/bits/scripts/campaign-global.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mods/d2k/bits/scripts/campaign-global.lua b/mods/d2k/bits/scripts/campaign-global.lua index 72e3d3c435..4967c28e51 100644 --- a/mods/d2k/bits/scripts/campaign-global.lua +++ b/mods/d2k/bits/scripts/campaign-global.lua @@ -122,6 +122,9 @@ end DefendActor = function(unit, defendingPlayer, defenderCount) Trigger.OnDamaged(unit, function(self, attacker) + if unit.Owner ~= defendingPlayer then + return + end -- Don't try to attack spiceblooms if attacker and attacker.Type == "spicebloom" then