/
Skill.cs
45 lines (41 loc) · 1.16 KB
/
Skill.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
using System.Collections.Generic;
namespace MHWSS
{
public class Skill
{
public int Id { get; set; }
public string Name { get; set; }
public string Description { get; set; }
public bool SetBonus { get; set; }
public int MaxLevel { get; set; }
public List<ActiveSkill> ActiveSkills { get; set; }
public Skill(int id, string name, string description, bool setBonus, int maxLevel)
{
Id = id;
Name = name;
Description = description;
SetBonus = setBonus;
MaxLevel = maxLevel;
ActiveSkills = new List<ActiveSkill>();
FormActiveSkillList();
}
private void FormActiveSkillList()
{
if (SetBonus)
{
ActiveSkills.Add(new ActiveSkill(MaxLevel, this));
}
else
{
for (int i = 0; i < MaxLevel; ++i)
{
ActiveSkills.Add(new ActiveSkill(i + 1, this));
}
}
}
public override string ToString()
{
return Name;
}
}
}