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
|
#include "rules.h"
namespace rules {
const std::map<std::string, std::string> Ability::abilities {
{"str", "Strength"},
{"dex", "Dexterity"},
{"con", "Constitution"},
{"int", "Intelligence"},
{"wis", "Wisdom"},
{"cha", "Charisma"}
};
const std::map<std::string, std::string> Skill::skill2ability {
{"Athletics", "str"},
{"Acrobatics", "dex"},
{"Sleight of Hand", "dex"},
{"Stealth", "dex"},
{"Arcana", "int"},
{"History", "int"},
{"Investigation", "int"},
{"Nature", "int"},
{"Religion", "int"},
{"Animal Handling", "wis"},
{"Insight", "wis"},
{"Medicine", "wis"},
{"Perception", "wis"},
{"Survival", "wis"},
{"Deception", "cha"},
{"Intimidation", "cha"},
{"Performance", "cha"},
{"Persuasion", "cha"}
};
const std::map<std::string, std::string> Qualifier::negative2positive {
{"nonmagical", "magical"},
{"non-silvered", "silvered"},
{"non-adamantine", "adamantine"}
};
const std::set<std::string> Condition::conditions {"blinded", "charmed", "deafened", "frightened", "grappled", "incapacitated", "invisible", "paralyzed", "petrified", "poisoned", "prone", "restrained", "stunned", "unconscious", "exhausted1", "exhausted2", "exhausted3", "exhausted4", "exhausted5", "exhausted6"};
std::ostream& operator<<(std::ostream& os, const Ability& a) {
os << std::string(a);
return os;
}
std::ostream& operator<<(std::ostream& os, const Skill& s) {
os << std::string(s);
return os;
}
std::ostream& operator<<(std::ostream& os, const Qualifier& q) {
os << std::string(q);
return os;
}
std::ostream& operator<<(std::ostream& os, const Condition& c) {
os << std::string(c);
return os;
}
}
|