Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add DamageTypes to Capture Sabotage #15986

Merged
merged 1 commit into from
Jan 2, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion OpenRA.Mods.Common/Activities/CaptureActor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ void DoCapture(Actor self, Captures captures)
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();
Expand Down
3 changes: 3 additions & 0 deletions OpenRA.Mods.Common/Traits/Captures.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ public class CapturesInfo : ConditionalTraitInfo, Requires<CaptureManagerInfo>
[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;

Expand Down