diff options
Diffstat (limited to 'src/armor.h')
-rw-r--r-- | src/armor.h | 25 |
1 files changed, 10 insertions, 15 deletions
diff --git a/src/armor.h b/src/armor.h index 4351a24..c8bdb87 100644 --- a/src/armor.h +++ b/src/armor.h @@ -3,28 +3,23 @@ #include <nlohmann/json.hpp> namespace entry { - class Armor; + struct armorImpl; class Armor : public Item , public Substantial { public: - int getACBonus(void) const {return ac;} - std::string getArmorType(void) const {return armor_type;} - int getStrRequirement(void) const {return strength;} - bool stealthDisadvantage(void) const {return disadvantage;} - int getCost(void) const {return cost;} - double getWeight(void) const {return weight;} + Armor(); + int getACBonus(void) const; + std::string getArmorType(void) const; + int getStrRequirement(void) const; + bool stealthDisadvantage(void) const; + int getCost(void) const; + double getWeight(void) const; virtual std::string getText() const override; virtual std::string getText(const creature::Creature& c) const override; - NLOHMANN_DEFINE_DERIVED_TYPE_INTRUSIVE(Item, Armor, ac, armor_type, strength, disadvantage, cost, weight); - + NLOHMANN_FRIEND_DECLARES(Armor); private: - int ac; - std::string armor_type; - int strength; - bool disadvantage; - int cost; - double weight; + std::shared_ptr<armorImpl> data; }; } |