diff options
author | Your Name <you@example.com> | 2021-04-15 15:23:23 -0400 |
---|---|---|
committer | Your Name <you@example.com> | 2021-04-15 15:23:23 -0400 |
commit | dfce4d0398a8bafbb7ad7a31345af181c0269c09 (patch) | |
tree | 695162ff8cc25e146f52d9e26fe19ffa9934b3d6 /src/armor.cc | |
parent | 9034c3d2533177f7cb7a7ce939ec53f7fa63f60e (diff) | |
download | dmtool-dfce4d0398a8bafbb7ad7a31345af181c0269c09.tar.gz dmtool-dfce4d0398a8bafbb7ad7a31345af181c0269c09.tar.bz2 dmtool-dfce4d0398a8bafbb7ad7a31345af181c0269c09.zip |
Added spells
Diffstat (limited to 'src/armor.cc')
-rw-r--r-- | src/armor.cc | 33 |
1 files changed, 0 insertions, 33 deletions
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; - } -} |