/
ClassFeatures.cs
93 lines (82 loc) · 3.71 KB
/
ClassFeatures.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
using System;
using System.Collections.Generic;
namespace Character
{
public class GenericCharacterClass
{
private List<Weapon> weaponList = new Equipment().ReturnWeaponList().weapon;
private List<Armor> armorList = new Equipment().ReturnArmorList().Armor;
private List<EquipmentPack> packList = new Equipment().EquipmentPacks().EquipmentPacks;
public List<Weapon> GetWeapons()
{
return weaponList;
}
public List<Armor> GetArmor()
{
return armorList;
}
public List<EquipmentPack> GetPacks()
{
return packList;
}
public string Name {get;set;}
public int ProficiencyBonus {get;set;}
public string HitDie { set; get;}
public Dictionary<string,List<string>> Proficiencies{get;set;}
public Armor Armor {get; set;} = new Armor();
public Shield Shield {get; set;}
public Weapon PrimaryWeapon {get; set;} = new Weapon();
public Weapon OffHandWeapon {get; set;} = new Weapon();
public List<Weapon> AdditionalWeapons { get; set; } = new List<Weapon>();
public List<Ammunition> Ammunition { get; set; } = new List<Ammunition>();
public List<MusicalInstrument> MusicalInstruments { get; set; } = new List<MusicalInstrument>();
public EquipmentPack EquipmentPack { get; set; }
public HolySymbol HolySymbol { get; set; }
public DruidicFocus DruidicFocus { get; set; }
public List<string> OtherEquipment { get; set; } = new List<string>();
public List<Spells> Cantrips { get; set; } = new List<Spells>();
public List<Spells> Level1Spells { get; set; } = new List<Spells>();
public List<Feature> Features { get; set; } = new List<Feature>();
public int SpellSlots = 0;
public string FightingStyle { get; set; }
public List<string> FavoredEnemy { get; set; } = new List<string>();
public string FavoredTerrain { get; set; }
public string SorcerousOrigin { get; set; }
public KeyValuePair<string, string> DraconicAncestry { get; set; }
public string WarlockPatron { get; set; }
public void SetName(string name){Name = name;}
public void SetProficiencyBonus(int pb){ProficiencyBonus = pb;}
public int GetProficiencyBonus(){return ProficiencyBonus;}
public void SetProficiencies(Dictionary<string,List<string>> profs)
{
Proficiencies = profs;
}
public Dictionary<string,List<string>> GetProficiencies()
{
return Proficiencies;
}
/// <summary>Add a specific instument to the equipment collection</summary>
/// <param name="instrument">the instrument to add as a string</param>
public void AddMusicalinstrumentToEquipment(MusicalInstrument instrument)
{
MusicalInstruments.Add(instrument);
}
/// <summary>Add a random instument to the equipment collection</summary>
public void AddRandomMusicalinstrumentToEquipment()
{
var instrumentList = new Equipment().MusicalInstrument().MusicalInstruments;
// Get random instrument from list above and add it to character sheet
Random r = new Random();
MusicalInstruments.Add(instrumentList[r.Next(0,instrumentList.Count)]);
}
public GenericCharacterClass ReturnClassFeatures(string characterClass)
{
switch (characterClass)
{
default: throw new Exception("Invalid character class provided");
case "Bard": return new Bard();
case "Barbarian": return new Barbarian();
}
}
}
}