cypher: slightly better display of output with no difficulty or mods

Signed-off-by: Brian S. Stephan <bss@incorporeal.org>
This commit is contained in:
2025-02-08 23:30:59 -06:00
parent cc9b110531
commit fa4815153a
2 changed files with 18 additions and 4 deletions

View File

@@ -76,7 +76,7 @@ class Dice(Plugin):
# show the adjusted difficulty
detail_str = f"14(d20={result} vs. diff. {difficulty}{mods})"
else:
detail_str = f"14(d20={result} with {mods} levels)"
detail_str = f"14(d20={result}{f' with {mods} levels' if mods else ''})"
if comment:
return self.bot.reply(event, f"{nick}: {comment} {result_str} {detail_str}")