diff options
author | Your Name <you@example.com> | 2022-08-09 16:57:53 -0400 |
---|---|---|
committer | Your Name <you@example.com> | 2022-08-09 16:57:53 -0400 |
commit | 5937d893da5656be3f486c863ae54e08bbe66579 (patch) | |
tree | 15aedaf0753fcf73fe85e90e88a7d0af33036eca /src/armor.cc | |
parent | 947d83c59ea86615e3a81a2ec122d843b5eceee9 (diff) | |
download | dmtool-5937d893da5656be3f486c863ae54e08bbe66579.tar.gz dmtool-5937d893da5656be3f486c863ae54e08bbe66579.tar.bz2 dmtool-5937d893da5656be3f486c863ae54e08bbe66579.zip |
Added generic items, worked on features
Diffstat (limited to 'src/armor.cc')
-rw-r--r-- | src/armor.cc | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/armor.cc b/src/armor.cc index 3a429b3..cb73cb1 100644 --- a/src/armor.cc +++ b/src/armor.cc @@ -13,10 +13,8 @@ namespace entry{ std::string armor_type; int strength; bool disadvantage; - int cost; - double weight; }; - NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE(armorImpl, ac, armor_type, strength, disadvantage, cost, weight); + NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE(armorImpl, ac, armor_type, strength, disadvantage); NLOHMANN_FRIEND_DEFS(Item, Armor, data); @@ -26,8 +24,6 @@ namespace entry{ std::string Armor::getArmorType(void) const {return data->armor_type;} int Armor::getStrRequirement(void) const {return data->strength;} bool Armor::stealthDisadvantage(void) const {return data->disadvantage;} - int Armor::getCost(void) const {return data->cost;} - double Armor::getWeight(void) const {return data->weight;} string getTextHelper(const Armor& a, string dexBonusLight, string dexBonusMedium) { stringstream text; @@ -43,7 +39,7 @@ namespace entry{ if(a.stealthDisadvantage()) { text << ", Imposes stealth disadvantage"; } - text << ". " << a.Substantial::getText(); + text << ". " << a.getCostWeightText(); return text.str(); } |