protected IPromise UnitAttack(ICombatant attacker, ICombatTeam defendingTeam) { // Get the highest threat enemy unit and attack it. var defender = defendingTeam.GetTank(); // TODO look into breaking out of the group of attacks early if possible. // Return an autoresolved promise if no defender is found. if (defender == null) { return(Promise.Resolved()); } attacker.Attack(defender); return(PromiseTimerHelper.Instance.WaitFor(delayPerUnitFight)); }