reformats results & fixes command parsing
All checks were successful
CI / deploy (push) Successful in 4m20s
CI / deploy (pull_request) Successful in 4m13s

This commit is contained in:
Arindy
2025-02-10 00:26:30 +01:00
parent 77f392ed77
commit 001a35165a
3 changed files with 3 additions and 3 deletions

View File

@@ -27,7 +27,7 @@
result.rolls.forEach(roll => {
values.push(roll.value);
})
resultText += ' (' + values.join(' + ') + (result.modifier > 0 ? ' <a style="text-decoration: underline">+' + result.modifier + '</a>': result.modifier < 0 ? ' <a style="text-decoration: underline">' + result.modifier + '</a>': '') + ' = <strong style="font-size: x-large">' + result.value + '</strong>) '
resultText += '<br/>&ensp; D' + result.sides + ': [' + values.map(value => value === 1 ? '<strong style="color: red">' + value + '</strong>' : value === result.sides ? '<strong style="color: green">' + value + '</strong>' : value).join(' + ') + (result.modifier > 0 ? ' <a style="text-decoration: underline">+' + result.modifier + '</a>': result.modifier < 0 ? ' <a style="text-decoration: underline">' + result.modifier + '</a>': '') + '] = <strong style="font-size: x-large">' + result.value + '</strong> '
})
}
node.innerHTML = '<strong>' + data.name + ':</strong> &#127922; ' + resultText