public override void Run(Unit Attacker, Unit Target, TargettingData TD, ref int Cost) { if (!Attacker.HasStatus("Placed this turn")) { Cost += Attacker.GetAttackCost(); } }
public override void Run(Unit Attacker, Unit Target, TargettingData TD, ref int Cost) { if (TD.AttackType.Short == true && Parent.GetCurrentRange() == Range.Short) { TD.CanBlock.ShortOnLong = true; } }
public void CheckTargetStatus(Unit Attacker, TargettingData TD, ref int Cost) { foreach (BeingTargetedModule BTM in BeingTargetedModules) { BTM.Run(Attacker, this, TD, ref Cost); } }
public override void Run(Unit Spare, Unit Target, TargettingData TD, ref int Cost) { TD.CanBypass.ShortOnShort |= mCanBypass.ShortOnShort; TD.CanBypass.ShortOnLong |= mCanBypass.ShortOnLong; TD.CanBypass.LongOnShort |= mCanBypass.LongOnShort; TD.CanBypass.LongOnLong |= mCanBypass.LongOnLong; }
public override void Run(Unit Unit1, Unit Unit2, TargettingData TD, ref int Cost) { if (Parent.HasStatus("Attacked")) { TD.CanTarget.Short = false; TD.CanTarget.Long = false; } }
public override void Run(Unit Attacker, Unit Target, TargettingData TD, ref int Cost) { if (Attacker.GetCurrentRange() == Range.Short & !Target.HasStatus("Defending") & Parent.HasStatus("Defending")) { TD.CanBlock.ShortOnLong = true; TD.CanBlock.ShortOnShort = true; } }
public override void Run(Unit Spare, Unit Target, TargettingData TD, ref int Cost) { if (Parent.HasStatus("Needs reloading") || Parent.HasStatus("Reloading")) { TD.CanTarget.Short = false; TD.CanTarget.Long = false; } }
public void CheckBlockStatus(Unit Attacker, Unit Target, TargettingData TD) { int dummy = 0; //target parameter in TM is 'this' so blocking must only depend on attacker and blocker, not actual target unit foreach (BlockingModule TM in BlockingModules) { TM.Run(Attacker, Target, TD, ref dummy); } }
/// <summary> /// Returns the CP cost for Runner to attack Target if possible /// or -1 if this attack is not possible. /// </summary> public int Run(Entities.Unit Runner, Entities.Unit Target) { int Cost = 0; TargettingData TD = new TargettingData(); foreach (TargettingModule TM in TargetModules) { TM.Run(Runner, Target, TD, ref Cost); } Target.CheckTargetStatus(Runner, TD, ref Cost); if (Cost < 0) { Cost = 0; } if (!TD.Result()) { return(-1); } else { return(Cost); } }
public override void Run(Unit Unused, Unit Target, TargettingData TD, ref int Cost) { if (Parent.HasStatus("Was Deployed") || Parent.HasStatus("Deployed")) { TD.CanTarget.Short = false; TD.CanTarget.Long = false; } if (Parent.GetCurrentRange() == Range.Long) { TD.AttackType.Long = true; } else if (Parent.GetCurrentRange() == Range.Short) { TD.AttackType.Short = true; } if (Target.GetCurrentRange() == Range.Long) { TD.TargetType.Long = true; } else if (Target.GetCurrentRange() == Range.Short) { TD.TargetType.Short = true; } }
public override void Run(Unit Unit1, Unit Unit2, TargettingData TD, ref int Cost) { TD.CanBeTargeted.Long = false; TD.CanBeTargeted.Short = false; }
public override void Run(Unit Attacker, Unit Target, TargettingData TD, ref int Cost) { Parent.Owner.CheckBlocks(Attacker, Parent, TD); }
public abstract void Run(Entities.Unit Unit1, Entities.Unit Unit2, TargettingData TD, ref int Cost);