@@ -368,7 +368,8 @@ function resultsHeader(resultProperties: ResultProperties): string {
resultsTitle += `<div>`
resultsTitle += `<div>`
+ bigTitle(`Asphodice Results
+ bigTitle(`Asphodice Results
<small class="h4 text-muted">
<small class="h4 text-muted">
(<var>d=${resultProperties.numDice}</var>)
(<var>d=${resultProperties.numDice}</var>,
<var>${resultProperties.diceVariant}</var>)
</small>`)
</small>`)
+ `</div>`;
+ `</div>`;
resultsTitle += `<div>
resultsTitle += `<div>
@@ -388,7 +389,7 @@ function resultsHeader(resultProperties: ResultProperties): string {
*/
*/
function resultsBody(resultProperties: ResultProperties): string {
function resultsBody(resultProperties: ResultProperties): string {
let resultsBodyId = `resultsBody-${resultProperties.numDice }`;
let resultsBodyId = `resultsBody-${resultProperties.itemId() }`;
let resultsBody = `<div id="${resultsBodyId}" class="show row resultsToggle ${resultProperties.variantClass()}">`;
let resultsBody = `<div id="${resultsBodyId}" class="show row resultsToggle ${resultProperties.variantClass()}">`;
resultsBody += describeRolls(resultProperties);
resultsBody += describeRolls(resultProperties);
resultsBody += rerollReport(resultProperties)
resultsBody += rerollReport(resultProperties)
@@ -457,19 +458,23 @@ function getResults():void {
$("#results").append(resultsControlCard);
$("#results").append(resultsControlCard);
let maxDice = 10;
let maxDice = 10;
for (let i = 1; i < maxDice; i++) {
let rsSetup = { numDice: i };
let rollstats = new RollStats(rsSetup);
let resultProperties = new ResultProperties({
rollstats: rollstats,
diceClass: "asphodice",
diceVariant: "c6",
numDice: i,
});
rollstats.doRolls();
addResults(resultProperties);
$("#resultsProgress").width(`${i/maxDice*100}%`);
$("#resultsProgress").text(`${i/maxDice*100}%`);
let cutoffStart = 6;
let cutoffMax = 9;
for (let cutoff = cutoffStart; cutoff <= cutoffMax; cutoff++) {
for (let i = 1; i < maxDice; i++) {
let rsSetup = { numDice: i, diceOptions: { successCutOff: cutoff } };
let rollstats = new RollStats(rsSetup);
let resultProperties = new ResultProperties({
rollstats: rollstats,
diceClass: "asphodice",
diceVariant: `c${cutoff}`,
numDice: i,
});
rollstats.doRolls();
addResults(resultProperties);
$("#resultsProgress").width(`${i/maxDice*100}%`);
$("#resultsProgress").text(`${i/maxDice*100}%`);
}
}
}
console.log("Results done!");
console.log("Results done!");
$("#resultsProgress").width("100%");
$("#resultsProgress").width("100%");