namespace CharacterGenerator
int globalLevel = Convert.ToInt32(Console.ReadLine());
Random rnd = new Random();
public Attribute(string attributeName)
int targetLevel = globalLevel;
int levelRange = (int)(targetLevel*0.5);
level = rnd.Next(targetLevel-levelRange,targetLevel+levelRange);
int attributeModifier = Convert.ToInt32((level-10)/2);
modifier = attributeModifier;
static void attributeConstructor(string attributeName)
Attribute attributePrintName = new Attribute(attributeName);
Console.WriteLine("Attribute: " + attributePrintName.name + " Level: " + attributePrintName.level + " Modifier: " + attributePrintName.modifier);
static void Main(string[] args)
Console.WriteLine("Please enter a desired target level");
attributeConstructor("Charisma");
attributeConstructor("Strength");
attributeConstructor("Perception");
attributeConstructor("Intelligence");
attributeConstructor("Movement");
attributeConstructor("Finesse");
attributeConstructor("Willpower");
attributeConstructor("Constitution");