diff --git a/OpenRA.Mods.Common/Warheads/DamageWarhead.cs b/OpenRA.Mods.Common/Warheads/DamageWarhead.cs index b9d6f3e169..460d019f52 100644 --- a/OpenRA.Mods.Common/Warheads/DamageWarhead.cs +++ b/OpenRA.Mods.Common/Warheads/DamageWarhead.cs @@ -47,17 +47,6 @@ namespace OpenRA.Mods.Common.Warheads return 100; } - // TODO: This can be removed after the legacy and redundant 0% = not targetable - // assumption has been removed from the yaml definitions - public override bool CanTargetActor(ActorInfo victim, Actor firedBy) - { - var health = victim.Traits.GetOrDefault(); - if (health == null) - return false; - - return DamageVersus(victim) > 0; - } - public override void DoImpact(Target target, Actor firedBy, IEnumerable damageModifiers) { // Used by traits that damage a single actor, rather than a position diff --git a/OpenRA.Mods.Common/Warheads/GrantUpgradeWarhead.cs b/OpenRA.Mods.Common/Warheads/GrantUpgradeWarhead.cs index 324339ef41..4ea45972e7 100644 --- a/OpenRA.Mods.Common/Warheads/GrantUpgradeWarhead.cs +++ b/OpenRA.Mods.Common/Warheads/GrantUpgradeWarhead.cs @@ -29,10 +29,6 @@ namespace OpenRA.Mods.Common.Warheads public readonly WDist Range = WDist.FromCells(1); - // TODO: This can be removed after the legacy and redundant 0% = not targetable - // assumption has been removed from the yaml definitions - public override bool CanTargetActor(ActorInfo victim, Actor firedBy) { return true; } - public override void DoImpact(Target target, Actor firedBy, IEnumerable damageModifiers) { var actors = target.Type == TargetType.Actor ? new[] { target.Actor } : diff --git a/OpenRA.Mods.Common/Warheads/Warhead.cs b/OpenRA.Mods.Common/Warheads/Warhead.cs index 7eb3bc0652..42cbe57661 100644 --- a/OpenRA.Mods.Common/Warheads/Warhead.cs +++ b/OpenRA.Mods.Common/Warheads/Warhead.cs @@ -47,16 +47,9 @@ namespace OpenRA.Mods.Common.Warheads /// Applies the warhead's effect against the target. public abstract void DoImpact(Target target, Actor firedBy, IEnumerable damageModifiers); - // TODO: This can be removed after the legacy and redundant 0% = not targetable - // assumption has been removed from the yaml definitions - public virtual bool CanTargetActor(ActorInfo victim, Actor firedBy) { return false; } - /// Checks if the warhead is valid against (can do something to) the actor. public bool IsValidAgainst(Actor victim, Actor firedBy) { - if (!CanTargetActor(victim.Info, firedBy)) - return false; - if (!AffectsParent && victim == firedBy) return false; @@ -75,9 +68,6 @@ namespace OpenRA.Mods.Common.Warheads /// Checks if the warhead is valid against (can do something to) the frozen actor. public bool IsValidAgainst(FrozenActor victim, Actor firedBy) { - if (!CanTargetActor(victim.Info, firedBy)) - return false; - // AffectsParent checks do not make sense for FrozenActors, so skip to stance checks var stance = firedBy.Owner.Stances[victim.Owner]; if (!ValidStances.HasStance(stance))