From 5937d893da5656be3f486c863ae54e08bbe66579 Mon Sep 17 00:00:00 2001 From: Your Name Date: Tue, 9 Aug 2022 16:57:53 -0400 Subject: Added generic items, worked on features --- src/weapon.cc | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'src/weapon.cc') diff --git a/src/weapon.cc b/src/weapon.cc index e5f04f2..4c47d8b 100644 --- a/src/weapon.cc +++ b/src/weapon.cc @@ -16,14 +16,12 @@ namespace entry { std::string weapon_type; std::pair range; int reach; - int cost; - double weight; std::optional toHitOverride; std::optional dmgBonusOverride; std::optional abilityOverride; }; - NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE(weaponImpl, damage, properties, weapon_type, range, reach, cost, weight, toHitOverride, dmgBonusOverride, abilityOverride); + NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE(weaponImpl, damage, properties, weapon_type, range, reach, toHitOverride, dmgBonusOverride, abilityOverride); NLOHMANN_FRIEND_DEFS(Item, Weapon, data); @@ -34,8 +32,6 @@ namespace entry { std::string Weapon::getWeaponType(void) const {return data->weapon_type;} std::pair Weapon::getRange(void) const {return data->range;} int Weapon::getReach(void) const {return data->reach;} - int Weapon::getCost(void) const {return data->cost;} - double Weapon::getWeight(void) const {return data->weight;} string getTextHelper(const Weapon& w, string toHitBonus, string damageBonus) { stringstream text; @@ -99,8 +95,8 @@ namespace entry { if(! props.empty()) { text << " Additional properties: " << utils::join(props, ", ") << "."; } - if(! w.Substantial::getText().empty()) { - text << " " << w.Substantial::getText(); + if(! w.getCostWeightText().empty()) { + text << " " << w.getCostWeightText(); } return text.str(); } -- cgit v1.2.3