diff options
| author | Your Name <you@example.com> | 2021-04-16 11:23:27 -0400 | 
|---|---|---|
| committer | Your Name <you@example.com> | 2021-04-16 11:23:27 -0400 | 
| commit | 4618763c0e3a723bf4bb43c7b9edbce87240e0af (patch) | |
| tree | a18aa4bf7da05ac02b4e37b199aeeb82da977aea /src/spellcasting.h | |
| parent | dfce4d0398a8bafbb7ad7a31345af181c0269c09 (diff) | |
| download | dmtool-4618763c0e3a723bf4bb43c7b9edbce87240e0af.tar.gz dmtool-4618763c0e3a723bf4bb43c7b9edbce87240e0af.tar.bz2 dmtool-4618763c0e3a723bf4bb43c7b9edbce87240e0af.zip | |
Rebased feature/item on entry
Diffstat (limited to 'src/spellcasting.h')
| -rw-r--r-- | src/spellcasting.h | 7 | 
1 files changed, 5 insertions, 2 deletions
| diff --git a/src/spellcasting.h b/src/spellcasting.h index f996322..0ea235c 100644 --- a/src/spellcasting.h +++ b/src/spellcasting.h @@ -6,7 +6,7 @@  typedef nlohmann::json json; -namespace feature { +namespace entry {      struct SlotLevel : public Jsonable {          SlotLevel(const json& data) : numSlots(data["slots"]), spells(jsonList2vec<spell::Spell>("spellcasting", data["spells"])) {}          virtual ~SlotLevel() {} @@ -29,11 +29,12 @@ namespace feature {              bool isInnate(void) const {return innate;}              std::string getAbility(void) const {return ability;}              std::vector<SlotLevel> getSpellsBySlot(void) const {return spellsBySlot;} +            virtual std::string getText(const creature::Creature& c) const;              virtual json toJson(void) const {                  auto data = Feature::toJson();                  data["innate"] = innate; -                data["ability"] = ability; +                data["spellcasting_ability"] = ability;                  data["levels"] = spellsBySlot;                  return data;              } @@ -43,4 +44,6 @@ namespace feature {              const std::string ability;              const std::vector<SlotLevel> spellsBySlot;      }; + +    std::string genText(const Spellcasting& s, const creature::Creature& c);  } | 
