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/armor.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/armor.h')
-rw-r--r-- | src/armor.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/armor.h b/src/armor.h index 2df1fff..57402cb 100644 --- a/src/armor.h +++ b/src/armor.h @@ -2,8 +2,8 @@ #include "item.h" #include "json.hpp" -namespace item { - class Armor : public Item { +namespace entry { + class Armor : public Item , public Substantial { public: Armor(const nlohmann::json& data, const nlohmann::json& base) : Item(base), acBonus(data["ac"]), armorType(data["type"]), strRequirement(data["strength"]), stealthDis(data["disadvantage"]), cost(data["cost"]), weight(data["weight"]) {} @@ -14,6 +14,8 @@ namespace item { int getCost(void) const {return cost;} double getWeight(void) const {return weight;} + virtual std::string getText(const creature::Creature& c) const; + /*virtual nlohmann::json toJson(void) const { auto data = Item::toJson(); data["ac"] = acBonus; @@ -33,4 +35,6 @@ namespace item { const int cost; const double weight; }; + + std::string genText(const Armor& a, const creature::Creature& c); } |