aboutsummaryrefslogtreecommitdiff
path: root/src/armor.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/armor.cc')
-rw-r--r--src/armor.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/armor.cc b/src/armor.cc
index 85c5bc2..ecf8c1e 100644
--- a/src/armor.cc
+++ b/src/armor.cc
@@ -31,13 +31,13 @@ namespace entry{
}
- string genText(const Armor& a, const creature::Creature& c) {
+ string Armor::getText(const creature::Creature& c) const {
stringstream text;
- text << genText(static_cast<const Item&>(a), c);
+ text << getName() << " (" << getType() << "): ";
int dex = c.getBonus(rules::Ability::Dex());
- string dexBonusLight = " (i.e., " + to_string(a.getACBonus() + dex) + ")";
- string dexBonusMedium = " (i.e., " + to_string(a.getACBonus() + ((dex > 2)? 2 : dex)) + ")";
- text << ": " << getTextHelper(a, dexBonusLight, dexBonusMedium);
+ string dexBonusLight = " (i.e., " + to_string(getACBonus() + dex) + ")";
+ string dexBonusMedium = " (i.e., " + to_string(getACBonus() + ((dex > 2)? 2 : dex)) + ")";
+ text << getTextHelper(*this, dexBonusLight, dexBonusMedium);
return text.str();
}
}