Add in parameter bonus to bingo formula

main
Joshua Sigona 4 years ago
parent fd2d238c01
commit f80464ea94
  1. 3
      muni.js
  2. BIN
      parameterbonus_instructions_small.png
  3. 5
      parkingcalc.html

@ -45,6 +45,7 @@ const MAXSTEPS= 10000
var start = Math.abs(Math.max(0,Number(document.getElementById("starting").value))) var start = Math.abs(Math.max(0,Number(document.getElementById("starting").value)))
var end = Math.abs(Math.max(0,Number(document.getElementById("ending").value))) var end = Math.abs(Math.max(0,Number(document.getElementById("ending").value)))
var bonus = Number(document.getElementById("team").value) var bonus = Number(document.getElementById("team").value)
var parameter = Math.abs(Math.max(0,Number(document.getElementById("parameter").value)))
var type = (document.getElementById("Bingo").checked?"Bingo": var type = (document.getElementById("Bingo").checked?"Bingo":
document.getElementById("Poker").checked?"Poker/Raid": document.getElementById("Poker").checked?"Poker/Raid":
"Medley") "Medley")
@ -63,7 +64,7 @@ const MAXSTEPS= 10000
if (voltage>0) { if (voltage>0) {
switch (type) { switch (type) {
case "Bingo":{ case "Bingo":{
return voltage * Math.floor((1 + bonus)*Math.max(10,Math.floor(score/interval))) return voltage * Math.floor((1 + bonus)*Math.max(10,Math.floor(score/interval))+Math.floor((1 + bonus)*Math.floor(parameter/600)))
}break; }break;
case "Medley":{ case "Medley":{
return voltage * Math.floor((1 + bonus)*(10+Math.floor(score/interval))) return voltage * Math.floor((1 + bonus)*(10+Math.floor(score/interval)))

Binary file not shown.

After

Width:  |  Height:  |  Size: 792 KiB

@ -45,9 +45,12 @@
<br /> <br />
<br /> <br />
<span class="tooltip"><label for="maxscore"><b>Max Free Live Score: </b></label <span class="tooltip"><label for="maxscore"><b>Max Free Live Score: </b></label
><input id="maxscore" min="0" type="number" value="650000" /> <span class="tooltiptext"> ><input id="maxscore" min="0" type="number" value="620000" /> <span class="tooltiptext translate22">
The maximum score you can get from playing a song using <font color="aqua">Free Live</font>.<br> The maximum score you can get from playing a song using <font color="aqua">Free Live</font>.<br>
<sub>(Use 0 for Rehearsals Only)</sub></span></span> <sub>(Use 0 for Rehearsals Only)</sub></span></span>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<label for="parameter"><b>Parameter: </b></label
><input id="parameter" min="0" type="number" value="62000" /> <span class="tooltiptext translate23">
<i><a href="parameterbonus_instructions_small.png" target="_blank">How to find Parameter value???</a></i></span>
<hr /> <hr />
<label for="starting"><b>Starting EP: </b></label <label for="starting"><b>Starting EP: </b></label
><input id="starting" min="0" type="number" value="100000" /> ><input id="starting" min="0" type="number" value="100000" />

Loading…
Cancel
Save