public static Character CreateNewCharacter(string name, int xp, Alignment alignment, Ability strength, Ability dexterity, Ability constitution, Ability intelligence, Ability wisdom, Ability charisma, ObservableCollection<CharacterClass> classes) { return new Character { _name = name, _xp = xp, _alignment = alignment, _str = strength, _dex = dexterity, _con = constitution, _int = intelligence, _wis = wisdom, _chr = charisma, _classes = classes }; }
public Character(string name) { _name = name; XP = 0; _str = new Ability("Strength"); _dex = new Ability("Dexterity"); _con = new Ability("Constitution"); _int = new Ability("Intelligence"); _wis = new Ability("Wisdom"); _chr = new Ability("Charisma"); Abilities = new ObservableCollection<Ability> { Str, Dex, Con, Int, Wis, Chr }; }
public Character() { _name = "Sarah Brown"; _classes = new ObservableCollection<CharacterClass> {new Bard(), new Barbarian()}; XP = 6500; _background = Background.Sage; _playerName = "Meghan"; _alignment = Alignment.LawfulGood; _class = new Bard(); _str = new Ability("Strength") {Value = 15}; _dex = new Ability("Dexterity") {Value = 14}; _con = new Ability("Constitution") { Value = 13 }; _int = new Ability("Intelligence") { Value = 12 }; _wis = new Ability("Wisdom") { Value = 10 }; _chr = new Ability("Charisma") { Value = 8 }; Abilities = new ObservableCollection<Ability> { Str, Dex, Con, Int, Wis, Chr }; //Race = Subraces.Human; Race = new Race { Name = "Human", RaceEnum = RaceEnum.Human, Darkvision = "No", Size = "Medium", Speed = 30 }; }
public AbilityViewModel(Ability a) { string name = a.Name; Name = name; PropertyChanged += abilityViewModelPropertyChanged; if (name == "Strength") { _skills = SkillProvider.GetSkills(SkillProficiency.Strength); //_skills = new ObservableCollection<SkillViewModel> //{ // new SkillViewModel(CharacterSkill.StrengthST), // new SkillViewModel(CharacterSkill.Athletics) //}; } else if (name == "Dexterity") { _skills = new ObservableCollection<SkillViewModel> { new SkillViewModel(SkillProficiency.DexterityST), new SkillViewModel(SkillProficiency.Acrobatics), new SkillViewModel(SkillProficiency.SleightofHand), new SkillViewModel(SkillProficiency.Stealth) }; } else if (name == "Constitution") { _skills = new ObservableCollection<SkillViewModel> { new SkillViewModel(SkillProficiency.ConstitutionST), }; } else if (name == "Intelligence") { _skills = new ObservableCollection<SkillViewModel> { new SkillViewModel(SkillProficiency.IntelligenceST), new SkillViewModel(SkillProficiency.Arcana), new SkillViewModel(SkillProficiency.History), new SkillViewModel(SkillProficiency.Investigation), new SkillViewModel(SkillProficiency.Nature), new SkillViewModel(SkillProficiency.Religion) }; } else if (name == "Wisdom") { _skills = new ObservableCollection<SkillViewModel> { new SkillViewModel(SkillProficiency.WisdomST), new SkillViewModel(SkillProficiency.AnimalHandling), new SkillViewModel(SkillProficiency.Insight), new SkillViewModel(SkillProficiency.Medicine), new SkillViewModel(SkillProficiency.Perception), new SkillViewModel(SkillProficiency.Survival) }; } else if (name == "Charisma") { _skills = new ObservableCollection<SkillViewModel> { new SkillViewModel(SkillProficiency.CharismaST), new SkillViewModel(SkillProficiency.Deception), new SkillViewModel(SkillProficiency.Intimidation), new SkillViewModel(SkillProficiency.Performance), new SkillViewModel(SkillProficiency.Persuasion), }; } Value = a.Value; SetBonus(); }