diff options
Diffstat (limited to 'src/armor.cc')
-rw-r--r-- | src/armor.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/armor.cc b/src/armor.cc index e7ed323..54284c7 100644 --- a/src/armor.cc +++ b/src/armor.cc @@ -1,6 +1,7 @@ #include "armor.h" #include "creature.h" #include "entry.h" +#include "rules.h" #include <string> #include <sstream> @@ -16,10 +17,11 @@ namespace entry{ text << genText(static_cast<const Item&>(a), c); text << ": AC: " << a.getACBonus(); if(a.getArmorType() == "light") { - text << " + dex (i.e., " << (a.getACBonus() + c.getBonus("dex")) << ")"; + text << " + dex (i.e., " << (a.getACBonus() + c.getBonus(rules::Ability::Dex())) << ")"; } else if(a.getArmorType() == "medium") { int actualBonus = a.getACBonus(); - actualBonus += (c.getBonus("dex") > 2)? 2 : c.getBonus("dex"); + int dex = c.getBonus(rules::Ability::Dex()); + actualBonus += (dex > 2)? 2 : dex; text << " + dex max 2 (i.e., " << actualBonus << ")"; } if(a.getStrRequirement() > 0) { |