aboutsummaryrefslogtreecommitdiff
path: root/src/rules.cc
blob: 15dcb34fc08a3af766b2a9a9664ec33f24f59df3 (plain)
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
#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"}
    };

    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;
    }
}