Skip to content

Commit

Permalink
cortex prime: always display difficulty as pmf
Browse files Browse the repository at this point in the history
  • Loading branch information
HighDiceRoller committed Nov 13, 2023
1 parent 3f31816 commit 5c849d1
Showing 1 changed file with 21 additions and 5 deletions.
26 changes: 21 additions & 5 deletions apps/cortex_prime.html
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,6 @@ <h2>Hitches</h2>
label: 'Difficulty',
order: 5,
borderColor: 'rgba(15, 15, 15, 1.0)',
backgroundColor: 'rgba(15, 15, 15, 1.0)',
pointStyle: 'circle',
radius: 0,
data: [],
Expand All @@ -202,7 +201,18 @@ <h2>Hitches</h2>
beginAtZero: true,
title: {
display: true,
text: 'Chance (%)',
text: 'Chance total at least',
},
},
y1: {
display: true,
position: 'right',
title: {
display: true,
text: 'Chance difficulty exactly',
},
grid: {
drawOnChartArea: false, // only want the grid lines for one axis to show up
},
},
},
Expand Down Expand Up @@ -457,8 +467,11 @@ <h2>Hitches</h2>
}
totalChart.data.datasets[1].borderColor = 'rgba(220, 200, 0, 0.25)';
totalChart.data.datasets[2].borderColor = 'rgba(0, 200, 0, 0.125)';
totalChart.data.datasets[3].borderColor = 'rgba(0, 0, 240, 0.125)';;
totalChart.data.datasets[4].borderColor = 'rgba(220, 0, 240, 0.125)'
totalChart.data.datasets[3].borderColor = 'rgba(0, 0, 240, 0.125)';
totalChart.data.datasets[4].borderColor = 'rgba(220, 0, 240, 0.125)';
totalChart.options.scales.y.title.text = 'Chance total exactly';
totalChart.options.scales.y1.display = false;
totalChart.data.datasets[5].yAxisID = 'y';
} else {
for (let i = 0; i < 4; i++) {
totalChart.data.datasets[i].fill = '+1';
Expand All @@ -468,6 +481,9 @@ <h2>Hitches</h2>
totalChart.data.datasets[2].borderColor = 'rgba(0, 200, 0, 1.0)';
totalChart.data.datasets[3].borderColor = 'rgba(0, 0, 240, 1.0)';
totalChart.data.datasets[4].borderColor = 'rgba(220, 0, 240, 1.0)';
totalChart.options.scales.y.title.text = 'Chance total at least';
totalChart.options.scales.y1.display = true;
totalChart.data.datasets[5].yAxisID = 'y1';
}

let pyodide = await pyodideReadyPromise;
Expand Down Expand Up @@ -495,7 +511,7 @@ <h2>Hitches</h2>
js.totalChart.data.datasets[2].data = total_data(d8_effect, selected_dist)
js.totalChart.data.datasets[3].data = total_data(d10_effect, selected_dist)
js.totalChart.data.datasets[4].data = total_data(d12_effect, selected_dist)
js.totalChart.data.datasets[5].data = total_data(opposition, selected_dist)
js.totalChart.data.datasets[5].data = total_data(opposition, 'pmf')
player_die_sizes = sum(([die_size] * int(js.document.getElementById(f'p{die_size}').value) for die_size in possible_die_sizes), [])
for effect_die in [6, 8, 10, 12]:
Expand Down

0 comments on commit 5c849d1

Please sign in to comment.