diff --git a/OpenRA.Mods.Common/Activities/Attack.cs b/OpenRA.Mods.Common/Activities/Attack.cs index 79c2b695a8..41cdff5ffc 100644 --- a/OpenRA.Mods.Common/Activities/Attack.cs +++ b/OpenRA.Mods.Common/Activities/Attack.cs @@ -61,7 +61,7 @@ namespace OpenRA.Mods.Common.Activities // HACK: This would otherwise break targeting frozen actors // The problem is that Shroud.IsTargetable returns false (as it should) for // frozen actors, but we do want to explicitly target the underlying actor here. - if (type == TargetType.Actor && !Target.Actor.HasTrait() && !self.Owner.Shroud.IsTargetable(Target.Actor)) + if (!attack.Info.IgnoresVisibility && type == TargetType.Actor && !Target.Actor.HasTrait() && !self.Owner.Shroud.IsTargetable(Target.Actor)) return NextActivity; // Try to move within range diff --git a/OpenRA.Mods.Common/Traits/Attack/AttackBase.cs b/OpenRA.Mods.Common/Traits/Attack/AttackBase.cs index 78de7d499d..6f53c583ad 100644 --- a/OpenRA.Mods.Common/Traits/Attack/AttackBase.cs +++ b/OpenRA.Mods.Common/Traits/Attack/AttackBase.cs @@ -14,7 +14,6 @@ using System.Drawing; using System.Linq; using OpenRA.Activities; using OpenRA.GameRules; -using OpenRA.Mods.Common; using OpenRA.Traits; namespace OpenRA.Mods.Common.Traits @@ -30,6 +29,9 @@ namespace OpenRA.Mods.Common.Traits [Desc("Does the attack type require the attacker to enter the target's cell?")] public readonly bool AttackRequiresEnteringCell = false; + [Desc("Does not care about shroud or fog. Enables the actor to launch an attack against a target even if he has no visibility of it.")] + public readonly bool IgnoresVisibility = false; + public abstract object Create(ActorInitializer init); }