From dfce4d0398a8bafbb7ad7a31345af181c0269c09 Mon Sep 17 00:00:00 2001 From: Your Name Date: Thu, 15 Apr 2021 15:23:23 -0400 Subject: Added spells --- src/weapon.cc | 39 --------------------------------------- 1 file changed, 39 deletions(-) (limited to 'src/weapon.cc') 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 Weapon::getProperties() const { - return properties; - } - - string Weapon::getWeaponType() const { - return weaponType; - } - - pair 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 -- cgit v1.2.3