aboutsummaryrefslogtreecommitdiff
path: root/src/cmd.cc
diff options
context:
space:
mode:
authorYour Name <you@example.com>2021-12-25 16:52:34 -0500
committerYour Name <you@example.com>2021-12-25 16:52:34 -0500
commit52b91a1aca6640b1797a63afc8a9e9a778b0964a (patch)
tree0cfb8ebe6a0a511607b3acc6c67228b796cd9c90 /src/cmd.cc
parentd8d1056af0383f0ef67c6d70d1594bcb430d7281 (diff)
downloaddmtool-52b91a1aca6640b1797a63afc8a9e9a778b0964a.tar.gz
dmtool-52b91a1aca6640b1797a63afc8a9e9a778b0964a.tar.bz2
dmtool-52b91a1aca6640b1797a63afc8a9e9a778b0964a.zip
Added capability to cause two npcs to attack each other
Diffstat (limited to 'src/cmd.cc')
-rw-r--r--src/cmd.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/cmd.cc b/src/cmd.cc
index 7be5e01..7029f0c 100644
--- a/src/cmd.cc
+++ b/src/cmd.cc
@@ -30,4 +30,10 @@ namespace cmd {
if(std::filesystem::directory_entry(p.string() + ".json").is_regular_file()) return p.string() + ".json";
return p;
}
+
+ std::string formatRoll(std::string name, std::string type, int rolled, int bonus) {
+ std::stringstream text;
+ text << name << " " << type << ": " << rolled << " (d20) + " << bonus << " (" << name << " " << type << " bonus) = " << rolled + bonus << std::endl;
+ return text.str();
+ }
}