document.getElementById("console").value+="Step "+(step++)+") Using "+voltage+" voltage w/"+Math.round(tbonus*100)+"% team, score between "+i+"~"+(i+interval-1)+" pts. EP +"+EPCalc(voltage,i,tbonus)+". Remaining:"+(end-start)+" EP \n"
return true
}
}
}
return false
start += EPCalc(voltage, i, tbonus);
flameCount += voltage;
document.getElementById("console").value +=
"Step " +
step++ +
") Using " +
voltage +
" voltage w/" +
Math.round(tbonus * 100) +
"% team, score between " +
i +
"~" +
(i + interval - 1) +
" pts. EP +" +
EPCalc(voltage, i, tbonus) +
". Remaining:" +
(end - start) +
" EP \n";
return true;
}
}
}
return false;
}
function TrySmallerGain(voltage, tbonus) {
for (var i = maxscore; i >= maxscore * 0.8; i -= interval) {
if (start + EPCalc(voltage, i, tbonus) <end-10){
//document.getElementById("console").value+="Ending value needs to be "+EvenOdd(end-10)+"\n"
if (EvenOdd(start+EPCalc(voltage,i,tbonus))==EvenOdd(end-10)) {
if (
EvenOdd(start + EPCalc(voltage, i, tbonus)) == EvenOdd(end - 10)
document.getElementById("console").value+="Step "+(step++)+") Using "+voltage+" voltage w/"+Math.round(tbonus*100)+"% team, score between "+i+"~"+(i+interval-1)+" pts. EP +"+EPCalc(voltage,i,tbonus)+". Remaining:"+(end-start)+" EP \n"
return true
}
}
}
return false
start += EPCalc(voltage, i, tbonus);
flameCount += voltage;
document.getElementById("console").value +=
"Step " +
step++ +
") Using " +
voltage +
" voltage w/" +
Math.round(tbonus * 100) +
"% team, score between " +
i +
"~" +
(i + interval - 1) +
" pts. EP +" +
EPCalc(voltage, i, tbonus) +
". Remaining:" +
(end - start) +
" EP \n";
return true;
}
}
}
return false;
}
function TrySmolGain(voltage, tbonus) {
for (var i = maxscore; i >= 0; i -= interval) {
if (EPCalc(voltage,i,tbonus)>=(10+Math.round(bonus*10))&&(start+EPCalc(voltage,i,tbonus)<=end-(10+Math.round(bonus*10)))) {
if (
EPCalc(voltage, i, tbonus) >= 10 + Math.round(bonus * 10) &&
start + EPCalc(voltage, i, tbonus) <=
end - (10 + Math.round(bonus * 10))
) {
//document.getElementById("console").value+="Ending value needs to be "+EvenOdd(end-10)+"\n"
if (EvenOdd(start+EPCalc(voltage,i,tbonus))==EvenOdd(end-10)) {
if (
EvenOdd(start + EPCalc(voltage, i, tbonus)) == EvenOdd(end - 10)
document.getElementById("console").value+="Step "+(step++)+") Using "+voltage+" voltage w/"+Math.round(tbonus*100)+"% team, score between "+i+"~"+(i+interval-1)+" pts. EP +"+EPCalc(voltage,i,tbonus)+". Remaining:"+(end-start)+" EP \n"
return true
start += EPCalc(voltage, i, tbonus);
flameCount += voltage;
document.getElementById("console").value +=
"Step " +
step++ +
") Using " +
voltage +
" voltage w/" +
Math.round(tbonus * 100) +
"% team, score between " +
i +
"~" +
(i + interval - 1) +
" pts. EP +" +
EPCalc(voltage, i, tbonus) +
". Remaining:" +
(end - start) +
" EP \n";
return true;
}
}
}
for (var i = maxscore; i >= 0; i -= interval) {
if (EvenOdd(start+EPCalc(voltage,i,tbonus))!=EvenOdd(end-10)&&(start+EPCalc(voltage,i,tbonus))==end) {
if (
EvenOdd(start + EPCalc(voltage, i, tbonus)) !=
EvenOdd(end - 10) &&
start + EPCalc(voltage, i, tbonus) == end
) {
//document.getElementById("console").value+="Ending value needs to be "+EvenOdd(end-10)+"\n"
document.getElementById("console").value+="Step "+(step++)+") Using "+voltage+" voltage w/"+Math.round(tbonus*100)+"% team, score between "+i+"~"+(i+interval-1)+" pts. EP +"+EPCalc(voltage,i,tbonus)+". Remaining:"+(end-start)+" EP \n"
return true
start += EPCalc(voltage, i, tbonus);
flameCount += voltage;
document.getElementById("console").value +=
"Step " +
step++ +
") Using " +
voltage +
" voltage w/" +
Math.round(tbonus * 100) +
"% team, score between " +
i +
"~" +
(i + interval - 1) +
" pts. EP +" +
EPCalc(voltage, i, tbonus) +
". Remaining:" +
(end - start) +
" EP \n";
return true;
}
}
/*for (var i=maxscore;i>=0;i-=interval) {
@ -108,83 +214,157 @@
}
}*/
for (var i = maxscore; i >= 0; i -= interval) {
if (EvenOdd(start+EPCalc(voltage,i,tbonus))!=EvenOdd(end-10)&&(start+EPCalc(voltage,i,tbonus))==end) {
if (
EvenOdd(start + EPCalc(voltage, i, tbonus)) !=
EvenOdd(end - 10) &&
start + EPCalc(voltage, i, tbonus) == end
) {
//document.getElementById("console").value+="Ending value needs to be "+EvenOdd(end-10)+"\n"
document.getElementById("console").value+="Step "+(step++)+") Using "+voltage+" voltage w/"+Math.round(tbonus*100)+"% team, score between "+i+"~"+(i+interval-1)+" pts. EP +"+EPCalc(voltage,i,tbonus)+". Remaining:"+(end-start)+" EP \n"
document.getElementById("console").value+="Step "+(step++)+") Using "+voltage+" voltage w/"+Math.round(tbonus*100)+"% team, score between "+i+"~"+(i+interval-1)+" pts. EP +"+EPCalc(voltage,i,tbonus)+". Remaining:"+(end-start)+" EP \n"
document.getElementById("console").value+="Step "+(step++)+") Use Rehearsal w/"+Math.round(tbonus*100)+"% team. EP +"+gain+". Remaining:"+(end-start)+" EP \n"
document.getElementById("console").value+="Step "+(step++)+") Use Rehearsal w/"+(tbonus*100)+"% team. EP +"+gain+". Remaining:"+(end-start)+" EP \n"
return true
} else
if (end-start>=20) {
var gain=end-start-10
start+=gain
document.getElementById("console").value+="Step "+(step++)+") Use Rehearsal w/"+((gain-10)*10)+"% team. EP +"+gain+". Remaining:"+(end-start)+" EP \n"
return true
} else
if ((end-start)%10==0) {
var gain=10
start+=gain
document.getElementById("console").value+="Step "+(step++)+") Use Rehearsal w/0% team. EP +"+gain+". Remaining:"+(end-start)+" EP \n"
return false
} else
{
var gain=end-start
start+=gain
document.getElementById("console").value+="Step "+(step++)+") Use Rehearsal w/"+((gain-10)*10)+"% team. EP +"+(gain)+". Remaining:"+(end-start)+" EP \n"
document.getElementById("console").value="Impossible to park using this team!"
document.getElementById("console").value =
"Impossible to park using this team!";
} else {
document.getElementById("console").value="Calculating from "+originalTarget+" to "+end+" for event type "+type+"...\n\t(All games are done in Free Live)\n\nFound a park! "+(step-1)+" steps and "+flameCount+" voltage required!\n\n"+document.getElementById("console").value
document.getElementById("console").value =
"Calculating from " +
originalTarget +
" to " +
end +
" for event type " +
type +
"...\n\t(All games are done in Free Live)\n\nFound a park! " +
<labelfor="flexible"alt="Yes"><b>Flexible Team?</b></label><inputid="flexible"type="checkbox"><i>If turned on, calculates scoring options using lower % teams also.</i>
<br>
<br>
<labelfor="maxscore"><b>Max Free Live Score: </b></label><inputid="maxscore"min=0type="number"value="650000">