打开主菜单

少前百科GFwiki β

更改

Widget:战术人形属性

添加18字节2023年3月26日 (日) 14:43
无编辑摘要
<includeonly><template id="attr-tpl">
<table><caption>生命</caption><colgroup><col><col><col><col><col></colgroup><tr><th>×1</th><th>×2</th><th>×3</th><th>×4</th><th>×5</th></tr><tr id="hp-tr"><td></td><td></td><td></td><td></td><td></td></tr></table>
<table id="growing2"><tr><th id="growth" colspan="5">成长</th></tr><tr><td id="grow-td" colspan="5"></td></tr><tr><th id="pow">伤害</th><th id="hit">命中</th><th id="dodge">回避</th><th id="rate">射速</th><th id="armor">护甲</th></tr><tr><td id="pow-td"></td><td id="hit-td"></td><td id="dodge-td"></td><td id="rate-td"></td><td id="armor-td">0</td></tr></table>
</template><script>
$('#attr-tpl').remove();
$('#attr-table').prepend(tables);
const hpTable = $('#attr-table>table:first-of-type');
const hpRow = $('#hp-tr')[0];
const [lvInput, modToggle] = $('#lv-input, #mod-toggle');
function updateAttrs() {
const lv = lvInput.value, mod = +(modToggle.checked);
if (lv > 89) hpRowhpTable.className = ''; else if (lv > 69) hpRowhpTable.className = 'form4'; else if (lv > 29) hpRowhpTable.className = 'form3'; else if (lv > 9) hpRowhpTable.className = 'form2'; else hpRowhpTable.className = 'form1';
const hp1 = calcLifeArmor(lv, mod, 0);
[...hpRow.children].forEach(function(e, i) {