public Character5E(bool createDefaultData = false) { if (createDefaultData) { AbilityScores = new Dictionary <MainStatType, int> { { MainStatType.Strength, 10 }, { MainStatType.Dexterity, 10 }, { MainStatType.Constitution, 10 }, { MainStatType.Intelligence, 10 }, { MainStatType.Wisdom, 10 }, { MainStatType.Charisma, 10 }, }; AbilityScoreProficiencies = new Dictionary <MainStatType, bool> { { MainStatType.Strength, false }, { MainStatType.Dexterity, false }, { MainStatType.Constitution, false }, { MainStatType.Intelligence, false }, { MainStatType.Wisdom, false }, { MainStatType.Charisma, false }, }; CalculateAbilityModifiers(); Skills = new List <Skill> { new Skill("Acrobatics", AbilityModifiers[MainStatType.Dexterity], ProficiencyBonus, MainStatType.Dexterity, false), new Skill("Animal Handling", AbilityModifiers[MainStatType.Wisdom], ProficiencyBonus, MainStatType.Wisdom, false), new Skill("Arcana", AbilityModifiers[MainStatType.Intelligence], ProficiencyBonus, MainStatType.Intelligence, false), new Skill("Athletics", AbilityModifiers[MainStatType.Strength], ProficiencyBonus, MainStatType.Strength, false), new Skill("Deception", AbilityModifiers[MainStatType.Charisma], ProficiencyBonus, MainStatType.Charisma, false), new Skill("History", AbilityModifiers[MainStatType.Intelligence], ProficiencyBonus, MainStatType.Intelligence, false), new Skill("Insight", AbilityModifiers[MainStatType.Wisdom], ProficiencyBonus, MainStatType.Wisdom, false), new Skill("Intimidation", AbilityModifiers[MainStatType.Charisma], ProficiencyBonus, MainStatType.Charisma, false), new Skill("Investigation", AbilityModifiers[MainStatType.Intelligence], ProficiencyBonus, MainStatType.Intelligence, false), new Skill("Medicine", AbilityModifiers[MainStatType.Wisdom], ProficiencyBonus, MainStatType.Wisdom, false), new Skill("Nature", AbilityModifiers[MainStatType.Intelligence], ProficiencyBonus, MainStatType.Intelligence, false), new Skill("Perception", AbilityModifiers[MainStatType.Wisdom], ProficiencyBonus, MainStatType.Wisdom, false), new Skill("Performance", AbilityModifiers[MainStatType.Charisma], ProficiencyBonus, MainStatType.Charisma, false), new Skill("Persuasion", AbilityModifiers[MainStatType.Charisma], ProficiencyBonus, MainStatType.Charisma, false), new Skill("Religion", AbilityModifiers[MainStatType.Intelligence], ProficiencyBonus, MainStatType.Intelligence, false), new Skill("Sleight of Hand", AbilityModifiers[MainStatType.Dexterity], ProficiencyBonus, MainStatType.Dexterity, false), new Skill("Stealth", AbilityModifiers[MainStatType.Dexterity], ProficiencyBonus, MainStatType.Dexterity, false), new Skill("Survival", AbilityModifiers[MainStatType.Wisdom], ProficiencyBonus, MainStatType.Wisdom, false), }; CalculateSkillBonuses(); for (int i = 0; i < 9; i++) { SpellSlots.Add(new Pair <int, int>(0, 0)); } } }
} = true; //The value of this should be pulled from the spellcasting class //Public Methods public static void AddSpellcasterLevel(SpellcasterClass spellcaster) { switch (spellcaster) { case SpellcasterClass.PRIMARY: _spellcasterLevel++; break; case SpellcasterClass.SECONDARY: _spellcasterLevel += 0.5; break; case SpellcasterClass.TERTIARY: _spellcasterLevel += (1.0 / 3.0); break; case SpellcasterClass.NONE: break; } switch (SpellcasterLevel) { case 1: SpellSlots.Add(new SpellSlot() { SpellLevel = 1, TotalSlots = 2 }); break; case 2: SpellSlots.Where(l => l.SpellLevel == 1).FirstOrDefault().TotalSlots++; break; case 3: SpellSlots.Where(l => l.SpellLevel == 1).FirstOrDefault().TotalSlots++; SpellSlots.Add(new SpellSlot() { SpellLevel = 2, TotalSlots = 2 }); break; case 4: SpellSlots.Where(l => l.SpellLevel == 2).FirstOrDefault().TotalSlots++; break; case 5: SpellSlots.Add(new SpellSlot() { SpellLevel = 3, TotalSlots = 2 }); break; case 6: SpellSlots.Where(l => l.SpellLevel == 3).FirstOrDefault().TotalSlots++; break; case 7: SpellSlots.Add(new SpellSlot() { SpellLevel = 4, TotalSlots = 1 }); break; case 8: SpellSlots.Where(l => l.SpellLevel == 4).FirstOrDefault().TotalSlots++; break; case 9: SpellSlots.Add(new SpellSlot() { SpellLevel = 5, TotalSlots = 1 }); break; case 10: SpellSlots.Where(l => l.SpellLevel == 5).FirstOrDefault().TotalSlots++; break; case 11: SpellSlots.Add(new SpellSlot() { SpellLevel = 6, TotalSlots = 1 }); break; case 13: SpellSlots.Add(new SpellSlot() { SpellLevel = 7, TotalSlots = 1 }); break; case 15: SpellSlots.Add(new SpellSlot() { SpellLevel = 8, TotalSlots = 1 }); break; case 17: SpellSlots.Add(new SpellSlot() { SpellLevel = 9, TotalSlots = 1 }); break; case 18: SpellSlots.Where(l => l.SpellLevel == 5).FirstOrDefault().TotalSlots++; break; case 19: SpellSlots.Where(l => l.SpellLevel == 6).FirstOrDefault().TotalSlots++; break; case 20: SpellSlots.Where(l => l.SpellLevel == 7).FirstOrDefault().TotalSlots++; break; default: break; } }