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 +=
return true
"Step " +
}
step++ +
}
") Using " +
}
voltage +
return false
" 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) {
function TrySmallerGain(voltage, tbonus) {
for (var i = maxscore; i >= maxscore * 0.8; i -= interval) {
for (var i = maxscore; i >= maxscore * 0.8; i -= interval) {
if (start + EPCalc(voltage, i, tbonus) <end-10){
if (start + EPCalc(voltage, i, tbonus) <end-10){
//document.getElementById("console").value+="Ending value needs to be "+EvenOdd(end-10)+"\n"
//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"
document.getElementById("console").value +=
return true
"Step " +
}
step++ +
}
") Using " +
}
voltage +
return false
" 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) {
function TrySmolGain(voltage, tbonus) {
for (var i = maxscore; i >= 0; i -= interval) {
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"
//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"
document.getElementById("console").value +=
return true
"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) {
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+="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 +=
return true
"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) {
/*for (var i=maxscore;i>=0;i-=interval) {
@ -108,83 +214,157 @@
}
}
}*/
}*/
for (var i = maxscore; i >= 0; i -= interval) {
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+="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"
document.getElementById("console").value +=
return true
"Step " +
} else
step++ +
if (end-start>=20) {
") Use Rehearsal w/" +
var gain=end-start-10
tbonus * 100 +
start+=gain
"% team. EP +" +
document.getElementById("console").value+="Step "+(step++)+") Use Rehearsal w/"+((gain-10)*10)+"% team. EP +"+gain+". Remaining:"+(end-start)+" EP \n"
gain +
return true
". Remaining:" +
} else
(end - start) +
if ((end-start)%10==0) {
" EP \n";
var gain=10
return true;
start+=gain
} else if (end - start >= 20) {
document.getElementById("console").value+="Step "+(step++)+") Use Rehearsal w/0% team. EP +"+gain+". Remaining:"+(end-start)+" EP \n"
var gain = end - start - 10;
return false
start += gain;
} else
document.getElementById("console").value +=
{
"Step " +
var gain=end-start
step++ +
start+=gain
") Use Rehearsal w/" +
document.getElementById("console").value+="Step "+(step++)+") Use Rehearsal w/"+((gain-10)*10)+"% team. EP +"+(gain)+". Remaining:"+(end-start)+" EP \n"
(gain - 10) * 10 +
return false
"% 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";
return false;
}
}
return false
return false;
/*var voltage=0
/*var voltage=0
if (end-start>36) {
if (end-start>36) {
start+=26
start+=26
@ -214,11 +394,11 @@
return true*/
return true*/
}
}
if ((end-start)>1000000) {
if (end - start > 1000000) {
document.getElementById("console").value="Get closer to target score before using parking calculator!"
document.getElementById("console").value =
}
"Get closer to target score before using parking calculator!";
document.getElementById("console").value="Impossible to park using this team!"
document.getElementById("console").value =
"Impossible to park using this team!";
} else {
} 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>