180 lines
7.0 KiB
JavaScript
180 lines
7.0 KiB
JavaScript
|
function Poly(x) {
|
|||
|
var xp = new Array()
|
|||
|
for (let y = 0; y < 1034; y++) {
|
|||
|
var l = 44
|
|||
|
var i = 0, p = 0, q = 0, r = 0
|
|||
|
var j = y
|
|||
|
for (let k = 0; k < 45; k++) {
|
|||
|
i++;
|
|||
|
if (i > 2) p++;
|
|||
|
q = j;
|
|||
|
j = j - l + p;
|
|||
|
if (j < 0) break;
|
|||
|
}
|
|||
|
if (i == 1) r = x[q]
|
|||
|
if (i > 1) {
|
|||
|
r = x[p] * x[p + q]
|
|||
|
}
|
|||
|
xp[y] = r
|
|||
|
}
|
|||
|
return xp
|
|||
|
}
|
|||
|
function onStart() {
|
|||
|
var tmp1 = document.getElementById("input").value.trim()
|
|||
|
var names = Array.prototype.slice.call(tmp1.split('\n'));
|
|||
|
|
|||
|
var output = document.getElementById("output")
|
|||
|
var dis = document.getElementById("dis")
|
|||
|
output.value=''
|
|||
|
|
|||
|
var tmpsize = parseInt(document.getElementById("tmpsize").value.trim())
|
|||
|
var lim = parseInt(document.getElementById("lim").value.trim())
|
|||
|
if(isNaN(lim))lim=0
|
|||
|
var lim2 = parseInt(document.getElementById("lim2").value.trim())
|
|||
|
if(isNaN(lim2) || lim2==0 )lim2=10000 //如果没设,就调到极大,只筛qp
|
|||
|
|
|||
|
var x = new Array(43)
|
|||
|
var name = new Name()
|
|||
|
var s = 0,tmp2=0,tmp3=''
|
|||
|
var length = names.length
|
|||
|
var Loop = setInterval(function(){
|
|||
|
tmp3=''
|
|||
|
for(let ii=0;ii<tmpsize;ii++){
|
|||
|
s=tmp2+ii
|
|||
|
var nametmp = Array.prototype.slice.call(names[s].split('@'));
|
|||
|
if(nametmp.length<2)nametmp[1]=nametmp[0]
|
|||
|
name.load_team(nametmp[1])
|
|||
|
name.load_name(nametmp[0])
|
|||
|
if(nametmp[1]=="!")name.TV()
|
|||
|
var props = name.calc_props()
|
|||
|
name.calc_skills()
|
|||
|
for (let j = 0; j < 7; j++)props[j] += 36;
|
|||
|
x = new Array(44)
|
|||
|
|
|||
|
x[0] = props[7]
|
|||
|
for (let i = 0; i < 7; i++) {
|
|||
|
x[i + 1] = props[i]
|
|||
|
}
|
|||
|
for (let i = 0; i < 35; i++) {
|
|||
|
var cf = 0;
|
|||
|
for (let k = 0; k < 16; k++) {
|
|||
|
if (name.skill[k] == i) {
|
|||
|
x[i + 8] = name.freq[k]
|
|||
|
cf = 1;
|
|||
|
}
|
|||
|
}
|
|||
|
if (cf == 0) {
|
|||
|
x[i + 8] = 0
|
|||
|
}
|
|||
|
}
|
|||
|
if (x[32]>0){//x[32]>48
|
|||
|
name.load_name(nametmp[0]+'?shadow')
|
|||
|
props = name.calc_props()
|
|||
|
var shadow_sum = props[7]/3
|
|||
|
for (let j = 0; j < 7; j++)shadow_sum += props[j]
|
|||
|
|
|||
|
//更新部分
|
|||
|
shadow_sum -= props[6]*3
|
|||
|
var shadowi = shadow_sum-210
|
|||
|
|
|||
|
//更新部分
|
|||
|
shadowi = shadowi * x[32] / 100
|
|||
|
x[43]=shadowi.toFixed(3)
|
|||
|
}else{
|
|||
|
x[43]=0
|
|||
|
}
|
|||
|
if (x[42]>0)x[42]+=20
|
|||
|
|
|||
|
var xp = Poly(x)
|
|||
|
var score = model[0]
|
|||
|
var scoreQD = modelQD[0]
|
|||
|
for (let i = 0; i < 1034; i++) {
|
|||
|
score += xp[i] * model[i + 1]
|
|||
|
}
|
|||
|
for (let i = 0; i < 1034; i++) {
|
|||
|
scoreQD += xp[i] * modelQD[i + 1]
|
|||
|
}
|
|||
|
/*if(score>=lim || scoreQD>=lim2){
|
|||
|
if(x[32]>48){
|
|||
|
tmp3 += names[s] + '|' + parseInt(score) + '|' + parseInt(scoreQD)+'|幻术\n'
|
|||
|
}else if(x[26]>48){
|
|||
|
tmp3 += names[s] + '|' + parseInt(score) + '|' + parseInt(scoreQD)+'|铁壁\n'
|
|||
|
}else if(x[29]>48){
|
|||
|
tmp3 += names[s] + '|' + parseInt(score) + '|' + parseInt(scoreQD)+'|背刺\n'
|
|||
|
}else if(x[11]>48){
|
|||
|
tmp3 += names[s] + '|' + parseInt(score) + '|' + parseInt(scoreQD)+'|地裂\n'
|
|||
|
}else if(x[20]>48){
|
|||
|
tmp3 += names[s] + '|' + parseInt(score) + '|' + parseInt(scoreQD)+'|加速\n'
|
|||
|
}else{tmp3 += names[s] + '|' + parseInt(score) + '|' + parseInt(scoreQD)+'\n'}
|
|||
|
}*/
|
|||
|
if(lim==1){//qp mode
|
|||
|
if (score>=5400)
|
|||
|
{
|
|||
|
tmp3+=names[s]+'|'+parseInt(score) + '|' + parseInt(scoreQD) ;
|
|||
|
if (x[26]>=30) tmp3+="|铁壁"
|
|||
|
if (x[37]>=50) tmp3+="|护盾"
|
|||
|
if (x[26]>=30 && x[37]>=1 && x[37]<=49) tmp3+="|有盾"
|
|||
|
if (x[32]>=50) tmp3+="|幻术"
|
|||
|
if (x[29]>=60) tmp3+="|背刺"
|
|||
|
if (x[25]>=60) tmp3+="|净化"
|
|||
|
if (x[11]>=50) tmp3+="|地裂"
|
|||
|
if (x[20]>=60) tmp3+="|加速"
|
|||
|
if (x[19]>=50) tmp3+="|魅惑"
|
|||
|
if (x[36]>=30) tmp3+="|护符"
|
|||
|
if (x[22]>=60) tmp3+="|诅咒"
|
|||
|
if (x[16]>=60) tmp3+="|瘟疫"
|
|||
|
if (x[31]>=20) tmp3+="|分身"
|
|||
|
if (x[39]>=30) tmp3+="|吞噬"
|
|||
|
if (x[28]>=50) tmp3+="|聚气"
|
|||
|
if (x[8]>=50) tmp3+="|火球"
|
|||
|
if (x[11]<50 && x[26]<30 && x[11]+x[26]>=60) tmp3+='|地铁'
|
|||
|
tmp3+="\n";
|
|||
|
}
|
|||
|
}else if(lim2==1){//qd mode
|
|||
|
if (scoreQD>=5700 && score>=4000)
|
|||
|
{
|
|||
|
if ((x[25]<60 && x[29]<60) || scoreQD>=6300)//非刺非净化的直过,刺净要6300以上xd
|
|||
|
{
|
|||
|
tmp3+=names[s]+'|'+parseInt(score) + '|' + parseInt(scoreQD) ;
|
|||
|
if (x[26]>=30) tmp3+="|铁壁"
|
|||
|
if (x[37]>=50) tmp3+="|护盾"
|
|||
|
if (x[26]>=30 && x[37]>=1 && x[37]<=49) tmp3+="|有盾"
|
|||
|
if (x[32]>=50) tmp3+="|幻术"
|
|||
|
if (x[29]>=60) tmp3+="|背刺"
|
|||
|
if (x[25]>=60) tmp3+="|净化"
|
|||
|
if (x[11]>=50) tmp3+="|地裂"
|
|||
|
if (x[20]>=60) tmp3+="|加速"
|
|||
|
if (x[19]>=50) tmp3+="|魅惑"
|
|||
|
if (x[36]>=30) tmp3+="|护符"
|
|||
|
if (x[22]>=60) tmp3+="|诅咒"
|
|||
|
if (x[16]>=60) tmp3+="|瘟疫"
|
|||
|
if (x[31]>=20) tmp3+="|分身"
|
|||
|
if (x[39]>=30) tmp3+="|吞噬"
|
|||
|
if (x[28]>=50) tmp3+="|聚气"
|
|||
|
if (x[8]>=50) tmp3+="|火球"
|
|||
|
if (x[11]<50 && x[26]<30 && x[11]+x[26]>=60) tmp3+='|地铁'
|
|||
|
tmp3+="\n";
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
names[s]=null
|
|||
|
s++
|
|||
|
if(ii==tmpsize-1 || s==length){
|
|||
|
dis.innerText = (s)+' / '+length
|
|||
|
output.value += tmp3
|
|||
|
}
|
|||
|
if(s==length){
|
|||
|
dis.innerText = "测试完成"
|
|||
|
clearInterval(Loop)
|
|||
|
break
|
|||
|
}
|
|||
|
}
|
|||
|
tmp2+=tmpsize
|
|||
|
},0)
|
|||
|
}
|
|||
|
function LoadVersion(){
|
|||
|
var dis = document.getElementById("dis")
|
|||
|
dis.innerText = "模型版本: "+version
|
|||
|
}
|