#pragma once #include "item.h" #include "json.hpp" namespace entry { class Armor; 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"]) {} int getACBonus(void) const {return acBonus;} std::string getArmorType(void) const {return armorType;} int getStrRequirement(void) const {return strRequirement;} bool stealthDisadvantage(void) const {return stealthDis;} int getCost(void) const {return cost;} double getWeight(void) const {return weight;} virtual std::string getText() const override; virtual std::string getText(const creature::Creature& c) const override; private: const int acBonus; const std::string armorType; const int strRequirement; const bool stealthDis; const int cost; const double weight; }; }