Add support for capture delays and conditions.

CaptureDelay is defined per-trait, and the shortest
delay will be used if multiple traits are enabled.

CapturingCondition and BeingCapturedCondition are
global, and are granted when any capture is in progress.

The capture period is defined from when the unit reaches
the cell next to the target, and either starts to wait
or enter the target through to when the capture succeeds
or fails.
This commit is contained in:
Paul Chote
2018-10-06 21:37:47 +00:00
committed by abcdefg30
parent a53ef6e503
commit bab34252dd
4 changed files with 119 additions and 2 deletions

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("Delay (in ticks) that to wait next to the target before initiating the capture.")]
public readonly int CaptureDelay = 0;
[Desc("Experience granted to the capturing player.")]
public readonly int PlayerExperience = 0;