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/weapon.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/weapon.cc')
-rw-r--r-- | src/weapon.cc | 10 |
1 files changed, 3 insertions, 7 deletions
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<int, int> range; int reach; - int cost; - double weight; std::optional<int> toHitOverride; std::optional<int> dmgBonusOverride; std::optional<rules::Ability> 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<int, int> 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(); } |