diff options
Diffstat (limited to 'src/cmd.cc')
-rw-r--r-- | src/cmd.cc | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -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(); + } } |