diff options
author | Your Name <you@example.com> | 2021-04-20 12:40:37 -0400 |
---|---|---|
committer | Your Name <you@example.com> | 2021-04-20 12:40:37 -0400 |
commit | cd57ad6e208728bafcbc8c7d7b85d88603706978 (patch) | |
tree | 7cb0fc9511a0e8124e497d53edbe38d646dd8299 /src/armor.cc | |
parent | 2cae1aa33f80ce0844fb54a84ce103146a7fe7ad (diff) | |
download | dmtool-cd57ad6e208728bafcbc8c7d7b85d88603706978.tar.gz dmtool-cd57ad6e208728bafcbc8c7d7b85d88603706978.tar.bz2 dmtool-cd57ad6e208728bafcbc8c7d7b85d88603706978.zip |
Updated natural armor and skills
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) { |