diff options
author | Your Name <you@example.com> | 2021-04-20 12:40:37 -0400 |
---|---|---|
committer | Your Name <you@example.com> | 2021-04-20 12:40:37 -0400 |
commit | cd57ad6e208728bafcbc8c7d7b85d88603706978 (patch) | |
tree | 7cb0fc9511a0e8124e497d53edbe38d646dd8299 /src/spellcasting.h | |
parent | 2cae1aa33f80ce0844fb54a84ce103146a7fe7ad (diff) | |
download | dmtool-cd57ad6e208728bafcbc8c7d7b85d88603706978.tar.gz dmtool-cd57ad6e208728bafcbc8c7d7b85d88603706978.tar.bz2 dmtool-cd57ad6e208728bafcbc8c7d7b85d88603706978.zip |
Updated natural armor and skills
Diffstat (limited to 'src/spellcasting.h')
-rw-r--r-- | src/spellcasting.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/spellcasting.h b/src/spellcasting.h index 0ea235c..654a386 100644 --- a/src/spellcasting.h +++ b/src/spellcasting.h @@ -3,6 +3,7 @@ #include "json.hpp" #include "spell.h" #include "jsonable.h" +#include "rules.h" typedef nlohmann::json json; @@ -23,11 +24,11 @@ namespace entry { class Spellcasting : public Feature { public: - Spellcasting(const json& data, const json& base) : Feature(base), innate(data["innate"]), ability(data["spellcasting_ability"]), spellsBySlot(json2vec<SlotLevel>(data["levels"])) {} + Spellcasting(const json& data, const json& base) : Feature(base), innate(data["innate"]), ability(rules::Ability(data["spellcasting_ability"])), spellsBySlot(json2vec<SlotLevel>(data["levels"])) {} virtual ~Spellcasting() {} bool isInnate(void) const {return innate;} - std::string getAbility(void) const {return ability;} + rules::Ability getAbility(void) const {return ability;} std::vector<SlotLevel> getSpellsBySlot(void) const {return spellsBySlot;} virtual std::string getText(const creature::Creature& c) const; @@ -41,7 +42,7 @@ namespace entry { private: const bool innate; - const std::string ability; + const rules::Ability ability; const std::vector<SlotLevel> spellsBySlot; }; |