From 4618763c0e3a723bf4bb43c7b9edbce87240e0af Mon Sep 17 00:00:00 2001 From: Your Name Date: Fri, 16 Apr 2021 11:23:27 -0400 Subject: Rebased feature/item on entry --- src/armor.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/armor.h') 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); } -- cgit v1.2.3