aboutsummaryrefslogtreecommitdiff
path: root/src/spell.h
blob: 1a560f2ee07109ec8007f91263ba90353122e1e3 (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
#pragma once
#include "entry.h"
#include <nlohmann/json.hpp>

namespace entry {
    class Spell : public Entry {
        public:
            Spell() {}
            virtual ~Spell() {}

            int getLevel(void) const {return level;}
            std::string getSchool(void) const {return getType();}
            std::vector<std::string> getClasses(void) const {return classes;}
            std::string getCastingTime(void) const {return casting_time;}
            std::string getRange(void) const {return range;}
            std::string getComponents(void) const {return components;}
            std::string getDuration(void) const {return duration;}

            std::string getText(void) const override;

            NLOHMANN_DEFINE_DERIVED_TYPE_INTRUSIVE(Entry, Spell, level, classes, casting_time, range, components, duration);

        private:
            int level;
            std::vector<std::string> classes;
            std::string casting_time;
            std::string range;
            std::string components;
            std::string duration;
    };
}