aboutsummaryrefslogtreecommitdiff
path: root/src/cmd_query.cc
diff options
context:
space:
mode:
authorYour Name <you@example.com>2021-12-23 20:43:29 -0500
committerYour Name <you@example.com>2021-12-23 20:43:29 -0500
commitd8d1056af0383f0ef67c6d70d1594bcb430d7281 (patch)
tree2a57e74603af6da70d0df2f4b91d68ac7830f482 /src/cmd_query.cc
parent3632c99f94b762da6c069da10f830f63017dd1c8 (diff)
downloaddmtool-d8d1056af0383f0ef67c6d70d1594bcb430d7281.tar.gz
dmtool-d8d1056af0383f0ef67c6d70d1594bcb430d7281.tar.bz2
dmtool-d8d1056af0383f0ef67c6d70d1594bcb430d7281.zip
Fixed handling of ability override
Diffstat (limited to 'src/cmd_query.cc')
-rw-r--r--src/cmd_query.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/cmd_query.cc b/src/cmd_query.cc
index deff049..5172cda 100644
--- a/src/cmd_query.cc
+++ b/src/cmd_query.cc
@@ -39,8 +39,7 @@ namespace cmd {
for(auto w : creature::getAttacks(*c)) {
if(w->getName() == rollName) {
text << w->getText(*c) << std::endl;
- int abilityBonus = c->getBonus(creature::getBestAbility(getAbilityOptions(*w), *c));
- int bonus = abilityBonus + c->getProficiency();
+ int bonus = w->getToHitBonus(*c);
printResults(w->getName(), "attack", rolled, bonus);
text << " on hit: " << entry::formatDmg(*w, *c) << std::endl;
break;