So I'm using pug to generate the sheet code (because I have inherited the sheet and because it's honestly easier to code), now I have a problem with the roll template and I don't understand what happened. I've been asked to use a d100, the system is 1d100 roll below, and the critical/fumbles are matching numbers (01,11,22,33,44,55,...), for simplicity I just decided to do something like if dice==1
crit
if 2<=dice<=10
success
if dice==11
crit
if 12<=dice<=21
success
... The real code looks like this: {{#rollTotal() dice 1}}
<div class="sheet-template-row"><span class="inlinerollresult">Critical</span></div>
{{/rollTotal() dice 1}}
{{#rollBetween() dice 2 10}}
<div class="sheet-template-row"><span class="inlinerollresult">Success</span></div>
{{/rollBetween() dice 2 10}}
{{#rollTotal() dice 11}}
<div class="sheet-template-row"><span class="inlinerollresult">Critical</span></div>
{{/rollTotal() dice 11}}
{{#rollBetween() dice 12 21}}
<div class="sheet-template-row"><span class="inlinerollresult">Success</span></div>
{{/rollBetween() dice 12 21}} Now, what I don't understand is why the roll always get all the critical, but it fails to recognize all the roll between. Any idea what the problem could be?