MuniMuniMuniMuniMuni
This commit is contained in:
parent
8b4996521f
commit
c1a681eb7f
@ -139,7 +139,18 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function TryRehearsal() {
|
function TryMatchingRehearsal(tbonus) {
|
||||||
|
//document.getElementById("console").value+=(Math.round(tbonus*10))+10
|
||||||
|
if (end-start==(Math.round(tbonus*10))+10) {
|
||||||
|
var gain=(Math.round(tbonus*10))+10
|
||||||
|
start+=gain
|
||||||
|
document.getElementById("console").value+="Step "+(step++)+") Use Rehearsal w/"+Math.round(tbonus*100)+"% team. EP +"+gain+". Remaining:"+(end-start)+" EP \n"
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
function TryRehearsal(tbonus) {
|
||||||
if (end==start) {
|
if (end==start) {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
@ -147,10 +158,11 @@
|
|||||||
if ((end-start)%2!==0) {
|
if ((end-start)%2!==0) {
|
||||||
return undefined
|
return undefined
|
||||||
}
|
}
|
||||||
if (end-start>(10+Math.round(bonus*10))+10) {
|
|
||||||
var gain=(10+Math.round(bonus*10))
|
if (end-start>(10+Math.round(tbonus*10))+10) {
|
||||||
|
var gain=(10+Math.round(tbonus*10))
|
||||||
start+=gain
|
start+=gain
|
||||||
document.getElementById("console").value+="Step "+(step++)+") Use Rehearsal w/"+(bonus*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
|
return true
|
||||||
} else
|
} else
|
||||||
if (end-start>=20) {
|
if (end-start>=20) {
|
||||||
@ -239,9 +251,31 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
for (var j=bonus;j>=0;j-=0.2) {
|
||||||
|
result = TryMatchingRehearsal(j)
|
||||||
|
if (!result) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (result) {
|
||||||
|
for (var j=1.6;j>=0;j-=0.2) {
|
||||||
|
result = TryMatchingRehearsal(j)
|
||||||
|
if (!result) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (result) {
|
||||||
do {
|
do {
|
||||||
result = TryRehearsal()
|
if (flexible) {
|
||||||
|
for (var j=bonus;j>=0;j-=0.2) {
|
||||||
|
result = TryRehearsal(j)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
result = TryRehearsal(bonus)
|
||||||
|
}
|
||||||
} while (result);
|
} while (result);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if (flexible) {
|
if (flexible) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user