using System.Collections.Generic;
double lowerLimit = Math.Min(0.75 * (spec - 1) / (level + 1) + 0.25, 1.0);
double upperLimit = Math.Min(Math.Max(1.25 + (3.0 * (spec - 1) / (level+ 1) - 2) * 0.25, 1.25), 1.50);
Console.WriteLine("Lower: " + lowerLimit);
Console.WriteLine("Upper: " + upperLimit);