protected List <Unit> ExecutePull(Pull pull) { List <Unit> result = new List <Unit>(); foreach (var mod in pull.Modifiers) { var rates = this.GetModifiedRates(mod.Modifications); for (int i = 0; i < mod.UnitCount; i++) { result.Add(this.PullUnit(i == 0, rates)); } } return(result); }
public override List <Unit> Pull(params Pull[] pulls) { if (this.Steps.Count == 0) { throw new Exception($"Step-Up {this.Name} has no steps"); } if (this.CurrentStep == null) { this.CurrentStep = this.Steps.First(); } var result = this.ExecutePull(this.CurrentStep); int nextIndex = (Steps.IndexOf(this.CurrentStep) + 1) % this.Steps.Count; this.CurrentStep = this.Steps[nextIndex]; return(result); }