fix formatting of dice mnemonics

This commit is contained in:
Greg Gauthier 2024-07-03 11:30:41 +01:00
parent a9d8564d62
commit 327651ee6e

View File

@ -57,7 +57,7 @@ document.getElementById('terrainForm').addEventListener('submit', function (even
function formatDiceMnemonic(data) {
return Array.isArray(data) ?
data[0] + "d" + data[1] + (data[2] === 0 ? "" : "+" + data[2]) :
data[0] + "d" + data[1] + (data[2] === 0 ? "" : (data[2] > 0 ? "+" : "") + data[2]) :
data.toString();
}