From d8d1056af0383f0ef67c6d70d1594bcb430d7281 Mon Sep 17 00:00:00 2001 From: Your Name Date: Thu, 23 Dec 2021 20:43:29 -0500 Subject: Fixed handling of ability override --- src/cmd_query.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/cmd_query.cc') 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; -- cgit v1.2.3