From d428ae1c5b3b0ec88c1b55c56317c3750502d5f4 Mon Sep 17 00:00:00 2001 From: Your Name Date: Tue, 30 May 2023 16:52:22 -0400 Subject: Fixed bug adding damage multiple times --- src/cmd/cmd_manipulate.cc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/cmd/cmd_manipulate.cc b/src/cmd/cmd_manipulate.cc index 18df098..904615b 100644 --- a/src/cmd/cmd_manipulate.cc +++ b/src/cmd/cmd_manipulate.cc @@ -101,8 +101,14 @@ namespace cmd { } auto dmg = entry::rollDmg(*w, wants2h); text << entry::formatDmg(*w, *c1, dmg) << std::endl; + bool isFirst = true; for(auto d : dmg) { - text << " " << healOrDamageProgrammatic(p2, false, d.rolled, d.dmg_type, {}); + int amnt = d.rolled; + if(isFirst) { + amnt += w->getDamageBonus(*c1); + isFirst = false; + } + text << " " << healOrDamageProgrammatic(p2, false, amnt, d.dmg_type, {}); } } else { text << " Miss (" << (rolled + bonus) << " to hit < " << ac << " ac)" << std::endl; -- cgit v1.2.3