diff --git a/OpenRA.Mods.Common/Traits/SelfHealing.cs b/OpenRA.Mods.Common/Traits/SelfHealing.cs index ed39fcaa38..745455ed2f 100644 --- a/OpenRA.Mods.Common/Traits/SelfHealing.cs +++ b/OpenRA.Mods.Common/Traits/SelfHealing.cs @@ -9,6 +9,7 @@ */ #endregion +using System.Collections.Generic; using OpenRA.Traits; namespace OpenRA.Mods.Common.Traits @@ -30,6 +31,9 @@ namespace OpenRA.Mods.Common.Traits public readonly int DamageCooldown = 0; + [Desc("Apply the selfhealing using these damagetypes.")] + public readonly HashSet DamageTypes = new HashSet(); + public override object Create(ActorInitializer init) { return new SelfHealing(init.Self, this); } } @@ -63,7 +67,7 @@ namespace OpenRA.Mods.Common.Traits if (--ticks <= 0) { ticks = Info.Delay; - self.InflictDamage(self, new Damage(-(Info.Step + Info.PercentageStep * health.MaxHP / 100))); + self.InflictDamage(self, new Damage(-(Info.Step + Info.PercentageStep * health.MaxHP / 100), Info.DamageTypes)); } }