diff options
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); } |