From cd57ad6e208728bafcbc8c7d7b85d88603706978 Mon Sep 17 00:00:00 2001 From: Your Name Date: Tue, 20 Apr 2021 12:40:37 -0400 Subject: Updated natural armor and skills --- src/spellcasting.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/spellcasting.h') 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(data["levels"])) {} + Spellcasting(const json& data, const json& base) : Feature(base), innate(data["innate"]), ability(rules::Ability(data["spellcasting_ability"])), spellsBySlot(json2vec(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 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 spellsBySlot; }; -- cgit v1.2.3