欢迎来到猴子VS气球的史诗级冒险!
除特殊说明外,本站内容采用CC BY-NC-SA 4.0协议。
本站编辑权限开放,欢迎各位直接动手或者到留言板留言。
欢迎有合作意向者加入QQ群:950568164
欢迎来到气球塔防6 BWIKI!
除特殊说明外,本站内容采用CC BY-NC-SA 4.0协议。
欢迎各位到留言板留言或者加入QQ群:950568164
Widget:ParagonStatCalculator
实现详见模范计算器
<table class="wikitable">
<tr><th colspan="3">输入数值</th><th>计算结果</th></tr>
<tr><th colspan="2">模范度</th><td><input id="degreeinput" type="range" min="1" max="100" step="1" value="1"></td><td id="degreeoutput">1</td></tr>
<tr><th colspan="2">攻击间隔/技能冷却</th><td><input min="0" value="0.5" id="rateinput"></input></td><td id="rateoutput">0.5</td></tr>
<tr><th colspan="2">穿透</th><td><input min="0" value="200" id="pierceinput"></input></td><td id="pierceoutput">200</td></tr>
<tr><th colspan="2">基础伤害</th><td><input min="0" value="15" id="damageinput"></input></td><td id="damageoutput">15</td></tr>
<tr><th rowspan="5">额外伤害</th><th>飞艇</th><td><input min="0" value="0" id="mdinput"></input></td><td id="mdoutput">0</td></tr>
<tr><th>BOSS</th><td><input min="0" value="0" id="bdinput"></input></td><td id="bdoutput">0</td></tr>
<tr><th rowspan="3">其他</th><td><input min="0" value="0" class="otherdamageinput"></input></td><td class="otherdamageoutput">0</td></tr>
<tr><td><input min="0" value="0" class="otherdamageinput"></input></td><td class="otherdamageoutput">0</td></tr>
<tr><td><input min="0" value="0" class="otherdamageinput"></input></td><td class="otherdamageoutput">0</td></tr>
<tr><th colspan="3">BOSS总伤害</th><td id="normalbosstotal">15</td></tr>
<tr><th colspan="3">精英BOSS总伤害</th><td id="elitebosstotal">15</td></tr></table>
<script>
const round = function(num, decimal = 0) {
return Math.round(num * 10 ** decimal) / 10 ** decimal;
}
const calc = function () {
degree = Number(document.getElementById('degreeinput').value)
document.getElementById('degreeoutput').innerHTML = degree
// 中间变量
attackCooldownReductionPercent = round(Math.sqrt(50 * (degree - 1)), 1)
percentPierceUp = degree - 1 + (degree === 100 ? 1 : 0)
additionalPierceUp = (degree - 1 + (degree === 100 ? 1 : 0)) * 0.1
percentDamageUp = degree - 1 + (degree === 100 ? 1 : 0)
additionalDamageUp = Math.floor((degree - 1) / 10) + (degree === 100 ? 1 : 0)
bonusBossDamagePercent = Math.floor(degree / 20) * 0.25
rate = Number(document.getElementById('rateinput').value) / (1 + attackCooldownReductionPercent * 0.01)
pierce = Math.floor(Number(document.getElementById('pierceinput').value) * (1 + percentPierceUp * 0.01)) + additionalPierceUp
damage = Number(document.getElementById('damageinput').value) * (1 + percentDamageUp * 0.01) + additionalDamageUp
md = Number(document.getElementById('mdinput').value) * (1 + percentDamageUp * 0.01)
bd = Number(document.getElementById('bdinput').value) * (1 + percentDamageUp * 0.01)
document.getElementById('rateoutput').innerHTML = round(rate, 4)
document.getElementById('pierceoutput').innerHTML = round(pierce, 1)
document.getElementById('damageoutput').innerHTML = round(damage, 2)
document.getElementById('mdoutput').innerHTML = round(md, 2)
document.getElementById('bdoutput').innerHTML = round(bd, 2)
try {
// 懒得校验了
for (let i = 0; i < document.getElementsByClassName('otherdamageinput').length; i++) {
document.getElementsByClassName('otherdamageoutput')[i].innerHTML = round(Number(document.getElementsByClassName('otherdamageinput')[i].value) * (1 + percentDamageUp * 0.01), 2)
}
} catch (e) {
// 忽略
}
bdtotal = damage + md + bd
for (let i = 0; i < document.getElementsByClassName('otherdamageoutput').length; i++) {
bdtotal += Number(document.getElementsByClassName('otherdamageoutput')[i].innerHTML)
}
bdtotal *= (1 + bonusBossDamagePercent)
bdtotal = round(bdtotal, 4)
document.getElementById('normalbosstotal').innerHTML = bdtotal
document.getElementById('elitebosstotal').innerHTML = 2 * bdtotal
}
document.getElementById('degreeinput').oninput = calc
document.getElementById('rateinput').oninput = calc
document.getElementById('pierceinput').oninput = calc
document.getElementById('damageinput').oninput = calc
document.getElementById('mdinput').oninput = calc
document.getElementById('bdinput').oninput = calc
for (let i = 0; i < document.getElementsByClassName('otherdamageinput').length; i++) {
document.getElementsByClassName('otherdamageinput')[i].oninput = calc
}
</script>