public void Root(Unit target, Unit source)
 {
     if (target.GetHealth() > 0 && GetAreaOfEffect(source.GetMapPosition(), startingDirection).Contains(target.GetMapPosition()))
     {
         source.Immobilize(1);
         NewDelayedEffectEvent.Invoke(new DelayedEffect(Root, source.globalPositionalData, 1, UnitType.EnemyUnit, false, new List <Unit> {
             source
         }, source));
     }
 }
 public void AbductTarget(Unit target, Unit source)
 {
     if (source.GetHealth() > 0 && GetAreaOfEffect(source.GetMapPosition(), startingDirection).Contains(target.GetMapPosition()))
     {
         target.Disable(1);
         NewDelayedEffectEvent.Invoke(new DelayedEffect(AbductTarget, source.globalPositionalData, 1, UnitType.AlliedUnit, false, new List <Unit> {
             target
         }, source));
     }
 }
Beispiel #3
0
    public override void DealEffects(Unit target, Unit source)
    {
        DelayedEffect delayedEffect = new DelayedEffect((Unit targ, Unit sour) => target.ChangeHealth((GetDamage() * (-1)), source, this), source.globalPositionalData, 1, UnitType.EnemyUnit, true, GetAreaOfEffect(source.GetMapPosition(), source.GetDirection()), source);

        NewDelayedEffectEvent.Invoke(delayedEffect);
        delayedEffect = new DelayedEffect((Unit targ, Unit sour) => source.Disable(1), source.globalPositionalData, 0, UnitType.EnemyUnit, true, new List <Unit> {
            source
        }, source);
        NewDelayedEffectEvent.Invoke(delayedEffect);
    }
 public override void DealEffects(Unit target, Unit source)
 {
     target.ChangeHealth(GetDamage() * (-1), source, this);
     target.Disable(1);
     NewDelayedEffectEvent.Invoke(new DelayedEffect(AbductTarget, source.globalPositionalData, 0, UnitType.AlliedUnit, false, new List <Unit> {
         target
     }, source));
     NewDelayedEffectEvent.Invoke(new DelayedEffect(Root, source.globalPositionalData, 0, UnitType.EnemyUnit, false, new List <Unit> {
         source
     }, source));
 }