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/armor.cc | 33 --------------------------------- 1 file changed, 33 deletions(-) delete mode 100644 src/armor.cc (limited to 'src/armor.cc') diff --git a/src/armor.cc b/src/armor.cc deleted file mode 100644 index 00e1b05..0000000 --- a/src/armor.cc +++ /dev/null @@ -1,33 +0,0 @@ -#include "json.hpp" -#include "armor.h" - -using namespace std; - -namespace item { - Armor::Armor(const nlohmann::json& data) : Item(data), acBonus(data["ac"]), armorType(data["type"]), strRequirement(data["strength"]), stealthDis(data["disadvantage"]) {} - - int Armor::getACBonus() const { - return acBonus; - } - - string Armor::getArmorType() const { - return armorType; - } - - int Armor::getStrRequirement() const { - return strRequirement; - } - - bool Armor::stealthDisadvantage() const { - return stealthDis; - } - - nlohmann::json Armor::toJson() const { - auto data = Item::toJson(); - data["ac"] = acBonus; - data["type"] = armorType; - data["strength"] = strRequirement; - data["disadvantage"] = stealthDis; - return data; - } -} -- cgit v1.2.3