aboutsummaryrefslogtreecommitdiff
path: root/src/weapon.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/weapon.cc')
-rw-r--r--src/weapon.cc10
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();
}