#pragma once #include "item.h" #include "json.hpp" #include namespace creature { class Creature; } namespace item { class Weapon : public Item { public: Weapon(const nlohmann::json& data); std::string getDamageType(void) const; int getDamageDieCount(void) const; int getDamageDieSides(bool versatile=false) const; std::set getProperties(void) const; std::string getWeaponType(void) const; std::pair getRange(void) const; int getReach(void) const; virtual nlohmann::json toJson(void) const; private: const std::string damageType; const int damageDieCount; const int damageDieSides; const std::set properties; const std::string weaponType; const std::pair range; const int reach; }; std::string genActionText(const Weapon& w, const creature::Creature& c); }