protected virtual void SkilledBombardierTemplate(List <ManeuverTemplate> availableTemplates, GenericUpgrade upgrade) { List <ManeuverTemplate> AddedTemplates = new List <ManeuverTemplate>(); foreach (ManeuverTemplate availableTemplate in availableTemplates) { ManeuverSpeed reducedSpeed = availableTemplate.Speed - 1; ManeuverTemplate reducedSpeedTemplate = new ManeuverTemplate(availableTemplate.Bearing, availableTemplate.Direction, reducedSpeed, isBombTemplate: true); if (reducedSpeedTemplate.ValidTemplate() && !availableTemplates.Any(t => t.Name == reducedSpeedTemplate.Name) && !AddedTemplates.Any(t => t.Name == reducedSpeedTemplate.Name) ) { AddedTemplates.Add(reducedSpeedTemplate); } ManeuverSpeed increasedSpeed = availableTemplate.Speed + 1; ManeuverTemplate increasedSpeedTemplate = new ManeuverTemplate(availableTemplate.Bearing, availableTemplate.Direction, increasedSpeed, isBombTemplate: true); if (increasedSpeedTemplate.ValidTemplate() && !availableTemplates.Any(t => t.Name == increasedSpeedTemplate.Name) && !AddedTemplates.Any(t => t.Name == increasedSpeedTemplate.Name) ) { AddedTemplates.Add(increasedSpeedTemplate); } } availableTemplates.AddRange(AddedTemplates); }