I don't want to change the Chance, I want to add the target number.
Example for Multiplier x4, the Chance would be 24.75% and the Target would be > 75.24
I would like to show the target before Rolling the dice.
How can I implement this? I'm a bit lost here...
It is very important to explain exactly what you want. Do not expect people who are willing to take time to help you to just know what you are actually want.
If you want to display "Target" instead of "Chance"
Find the following code in app.js
return el.div(
{},
el.span(
{className: 'lead', style: { fontWeight: 'bold' }},
'Chance: '
),
innerNode
);
return el.div(
{},
el.span(
{className: 'lead', style: { fontWeight: 'bold' }},
'Target: '
),
innerNode
);
Then change the code to inverse the calculation
Find the following code in app.js
// Just show '--' if chance can't be calculated
var innerNode;
if (isError) {
innerNode = el.span(
{className: 'lead'},
' --'
);
} else {
innerNode = el.span(
{className: 'lead'},
' ' + (winProb * 100).toFixed(2).toString() + '%'
);
}
change it to
// Just show '--' if chance can't be calculated
var innerNode;
if (isError) {
innerNode = el.span(
{className: 'lead'},
' --'
);
} else {
innerNode = el.span(
{className: 'lead'},
' > ' + ((winProb * -100) + 100 ).toFixed(2).toString() + '%'
);
}
You site will display;
Target: > 75.24%as simple as that!
Enjoy.