diff options
Diffstat (limited to 'src/weapon.cc')
-rw-r--r-- | src/weapon.cc | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/src/weapon.cc b/src/weapon.cc index b12c2cb..314b1be 100644 --- a/src/weapon.cc +++ b/src/weapon.cc @@ -8,17 +8,6 @@ using namespace std; namespace item { - Weapon::Weapon(const nlohmann::json& data) - : Item(data), damageType(data["damage"]["dmg_type"]), damageDieCount(data["damage"]["dmg_die_count"]), damageDieSides(data["damage"]["dmg_die_sides"]), properties(data["properties"]), weaponType(data["type"]), range(data["range"][0], data["range"][1]), reach(data["reach"]) {} - - string Weapon::getDamageType() const { - return damageType; - } - - int Weapon::getDamageDieCount() const { - return damageDieCount; - } - int Weapon::getDamageDieSides(bool versatile) const { if(versatile && getProperties().count("versatile")) { return damageDieSides + 2; @@ -26,34 +15,6 @@ namespace item { return damageDieSides; } - set<string> Weapon::getProperties() const { - return properties; - } - - string Weapon::getWeaponType() const { - return weaponType; - } - - pair<int, int> Weapon::getRange() const { - return range; - } - - int Weapon::getReach() const { - return reach; - } - - nlohmann::json Weapon::toJson() const { - auto data = Item::toJson(); - data["damage"]["dmg_type"] = damageType; - data["damage"]["dmg_die_count"] = damageDieCount; - data["damage"]["dmg_die_sides"] = damageDieSides; - data["properties"] = properties; - data["type"] = weaponType; - data["range"] = range; - data["reach"] = reach; - return data; - } - std::string genActionText(const Weapon& w, const creature::Creature& c) { stringstream text; // Determine best ability bonus |