mirror of
https://github.com/Nighthawk42/roll20-character-sheets.git
synced 2026-08-30 03:40:32 +00:00
[TheWitcher] fix displayed value of fumble die
This commit is contained in:
@@ -3982,7 +3982,7 @@ function repeatingSum (destination, section, fieldsum, fieldmult, totalmult){
|
||||
}
|
||||
|
||||
on('clicked:roll', (event) => {
|
||||
startRoll(event.htmlAttributes.value + "{{fumble=[[1d10!+1]]}} {{fumble2=[[1d10!+1]]}}", (results) => {
|
||||
startRoll(event.htmlAttributes.value + "{{fumble=[[1d10!]]}} {{fumble2=[[1d10!]]}}", (results) => {
|
||||
var rollComputed = results.results.roll.result;
|
||||
var roll2Computed = 0;
|
||||
|
||||
@@ -3990,7 +3990,7 @@ on('clicked:roll', (event) => {
|
||||
|
||||
if(results.results.roll.dice[0] == 1) // We check if the first die is a fumble.
|
||||
{
|
||||
rollComputed = results.results.roll.result - results.results.fumble.result;
|
||||
rollComputed = results.results.roll.result - results.results.fumble.result-1;
|
||||
}
|
||||
|
||||
if(results.results.roll2 != null) {
|
||||
@@ -3999,7 +3999,7 @@ on('clicked:roll', (event) => {
|
||||
|
||||
if( results.results.roll2.dice[0] == 1) // We check if the first die is a fumble.
|
||||
{
|
||||
roll2Computed = results.results.roll2.result - results.results.fumble2.result;
|
||||
roll2Computed = results.results.roll2.result - results.results.fumble2.result-1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4022,12 +4022,12 @@ on('clicked:repeating_finearts:roll clicked:repeating_performance:roll clicked:r
|
||||
|
||||
let rollPart = event.htmlAttributes.value.replaceAll('prefix-', `${prefix}`);
|
||||
|
||||
startRoll(rollPart + "{{fumble=[[1d10!+1]]}}", (results) => {
|
||||
startRoll(rollPart + "{{fumble=[[1d10!]]}}", (results) => {
|
||||
var rollComputed = results.results.roll.result;
|
||||
|
||||
if(results.results.roll.dice[0] == 1) // We check if the first die is a fumble.
|
||||
{
|
||||
rollComputed = results.results.roll.result - results.results.fumble.result;
|
||||
rollComputed = results.results.roll.result - results.results.fumble.result-1;
|
||||
}
|
||||
|
||||
finishRoll(
|
||||
|
||||
Reference in New Issue
Block a user