aboutsummaryrefslogtreecommitdiff
path: root/src/cmd.cc
diff options
context:
space:
mode:
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();
+ }
}