public static List<Hero> GetHeroes(List<Skill> skills, List<CharacteristicType> characteristicTypes, List<StateType> stateTypes) { var baseSkills = skills.Where(x => x.School.Name == SchoolBaseSkillName).ToList(); var freeman = new Hero { Name = "Freeman", Race = Race.Человек, Sex = Sex.Муж, Characteristics = GenerateStat(characteristicTypes, 1), Background = "Сын физика ядерщика", Skills = new List<Skill>() }; freeman.Skills.AddRange(baseSkills); freeman.Skills.Add(skills[0]); freeman.Skills.Add(skills[1]); freeman.SetDefaultState(stateTypes); var shani = new Hero { Name = "Шани", Race = Race.Эльф, Sex = Sex.Жен, Characteristics = GenerateStat(characteristicTypes, 2), Background = "Дочь проститутки", Skills = new List<Skill>() }; shani.Skills.AddRange(baseSkills); shani.Skills.Add(skills[3]); shani.Skills.Add(skills[4]); shani.SetDefaultState(stateTypes); var ogrimar = new Hero { Name = "Огримар", Race = Race.Орк, Sex = Sex.Скрывает, Characteristics = GenerateStat(characteristicTypes, 3), Background = "В свои 14 трижды убивал", Skills = new List<Skill>() }; ogrimar.Skills.AddRange(baseSkills); ogrimar.SetDefaultState(stateTypes); var result = new List<Hero> { freeman, shani, ogrimar }; return result; }
public static Hero GetDefaultHero(List<StateType> stateTypes, List<CharacteristicType> characteristicTypes, List<Skill> skills) { var hero = new Hero(); hero.State = stateTypes.Select(x => new State { Number = 1, StateType = x }).ToList(); hero.Characteristics = characteristicTypes.Select(x => new Characteristic { Number = 1, CharacteristicType = x }).ToList(); hero.Skills = skills; return hero; }