diff options
author | Your Name <you@example.com> | 2021-05-09 13:56:46 -0400 |
---|---|---|
committer | Your Name <you@example.com> | 2021-05-09 13:56:46 -0400 |
commit | d13358b71ec15085f2638fd9c3fc634df62dfc94 (patch) | |
tree | 467c643a068bf2d83da3632823a6434244ae004e /src/armor.h | |
parent | e3aaa68a2ea1a403256150121c57a0287014162f (diff) | |
download | dmtool-d13358b71ec15085f2638fd9c3fc634df62dfc94.tar.gz dmtool-d13358b71ec15085f2638fd9c3fc634df62dfc94.tar.bz2 dmtool-d13358b71ec15085f2638fd9c3fc634df62dfc94.zip |
Reduced dependency on json-related hacks
Diffstat (limited to 'src/armor.h')
-rw-r--r-- | src/armor.h | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/src/armor.h b/src/armor.h index 0d148b7..c059093 100644 --- a/src/armor.h +++ b/src/armor.h @@ -5,8 +5,6 @@ namespace entry { class Armor; - std::string genText(const Armor& a, const creature::Creature& c); - class Armor : public Item , public Substantial { public: Armor(const nlohmann::json& data, const nlohmann::json& base) : Item(base), acBonus(data["ac"]), armorType(data["armor_type"]), strRequirement(data["strength"]), stealthDis(data["disadvantage"]), cost(data["cost"]), weight(data["weight"]) {} @@ -19,18 +17,7 @@ namespace entry { double getWeight(void) const {return weight;} virtual std::string getText() const override; - virtual std::string getText(const creature::Creature& c) const override {return genText(*this, c);} - - /*virtual nlohmann::json toJson(void) const { - auto data = Item::toJson(); - data["ac"] = acBonus; - data["type"] = armorType; - data["strength"] = strRequirement; - data["disadvantage"] = stealthDis; - data["cost"] = cost; - data["weight"] = weight; - return data; - }*/ + virtual std::string getText(const creature::Creature& c) const override; private: const int acBonus; |