Add DamageTypes to Capture Sabotage

This commit is contained in:
Mustafa Alperen Seki
2019-01-01 18:42:49 +03:00
committed by reaperrr
parent baac3f3ee9
commit 4578ea09ba
2 changed files with 4 additions and 1 deletions

View File

@@ -84,7 +84,7 @@ namespace OpenRA.Mods.Common.Activities
if (100 * (long)health.HP > captures.Info.SabotageThreshold * (long)health.MaxHP)
{
var damage = (int)((long)health.MaxHP * captures.Info.SabotageHPRemoval / 100);
actor.InflictDamage(self, new Damage(damage));
actor.InflictDamage(self, new Damage(damage, captures.Info.SabotageDamageTypes));
if (captures.Info.ConsumedByCapture)
self.Dispose();

View File

@@ -32,6 +32,9 @@ namespace OpenRA.Mods.Common.Traits
[Desc("Sabotage damage expressed as a percentage of maximum target health.")]
public readonly int SabotageHPRemoval = 50;
[Desc("Damage types that applied with the sabotage damage.")]
public readonly BitSet<DamageType> SabotageDamageTypes = default(BitSet<DamageType>);
[Desc("Delay (in ticks) that to wait next to the target before initiating the capture.")]
public readonly int CaptureDelay = 0;