-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSkill.cpp
39 lines (30 loc) · 900 Bytes
/
Skill.cpp
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
#include "Skill.h"
Skill::SingleSkill::SingleSkill(vector<pair<int,int>> modifySelfAttributes, vector<pair<int,int>> modifyMonsterAttributes)
{
this->modifySelfAttributes = modifySelfAttributes;
this->modifyMonsterAttributes = modifyMonsterAttributes;
}
void Skill::SingleSkill::AddAbility(int target, int attribute, int symbol, int amount)
{
pair<int,int> skillProperty(symbol,amount);
if (target)
this->modifyMonsterAttributes[attribute] = skillProperty;
else
this->modifySelfAttributes[attribute] = skillProperty;
}
Skill::Skill(vector<pair<string,SingleSkill>> setOfSkills)
{
for (pair<string,SingleSkill> currentSkill:setOfSkills)
{
this->AddSkill(currentSkill);
}
}
int Skill::AddSkill(pair<string,SingleSkill> oneSkill)
{
this->skillLibrary.push_back(oneSkill);
return this->skillLibrary.size()-1;
}
string Skill::toString() const
{
return "stub";
}