本WIKI由hibiki申请于2020年08月10日创建,编辑权限开放,如遇Chrome浏览器登陆后无法编辑点这里 BWIKI反馈留言板
公测后,本WIKI会急速更新,请大家收藏并保持关注。

全站通知:

Widget:伤害计算器

来自机动战姬聚变WIKI_BWIKI_哔哩哔哩
跳到导航 跳到搜索
伤害计算器(1.1实验版)
角色攻击力<input class="" type="number" data-bind="value: B3" /> 角色暴击伤害%<input class="" type="number" data-bind="value: F3" />
角色技能系数%<input class="" type="number" data-bind="value: B4" /> 属性克制(10%)<input class="" type="number" data-bind="value: F4" />
攻击上升(50%)<input class="" type="number" data-bind="value: B5" /> 攻击大上升(75%)<input class="" type="number" data-bind="value: F5" />
爆伤增加(50%)<input class="" type="number" data-bind="value: B6" /> 爆伤大增加(70%)<input class="" type="number" data-bind="value: F6" />
增伤(实际%)<input class="" type="number" data-bind="value: B7" /> 单独伤害分区
目录参数
防御力<input class="" type="number" data-bind="value: B9" /> 防御加成(60%)<input class="" type="number" data-bind="value: F9" />
防御大加成(90%)<input class="" type="number" data-bind="value: B10" /> 防御减少(70%)<input class="" type="number" data-bind="value: F10" />
防御大减少(100%)<input class="" type="number" data-bind="value: B11" /> 标记(10%)<input class="" type="number" data-bind="value: F11" />
伤害分摊<input class="" type="number" data-bind="value: B12" /> 单独减伤分区%
伤害数值
暴击 普通
强击 偏斜

<script> /* 这个方法不用看! */ function setClassAttr(self, defaultData, data, mode) { data = Object.assign({}, defaultData, data); for (var i in data) { self[i] = mode ? ko.observable(data[i]) : data[i] } return self; }

var ViewModel = function (data) { var self = setClassAttr(this, defaultData = { B3: "0", B4: "0", B5: "0", B6: "0", B7: "0", B9: "0", B10: "0", B11: "0", B12: "0", F3: "0", F4: "0", F5: "0", F6: "0", F9: "0", F10: "0", F11: "0", }, data, true);

self.F7 = ko.computed(function () { return parseFloat(this.B3()) * ( 1 + parseFloat(this.B5()) / 100 ) * ( 1 + parseFloat(this.F5()) / 100 ) * ( parseFloat(this.B4()) / 100 ) * (parseFloat(this.F3()) / 100 + parseFloat(this.B6()) / 100 + parseFloat(this.F6()) / 100 ) * ( parseFloat(this.F4()) / 100 + 1 ) * ( 1 + parseFloat(this.B7()) / 100 ) * (parseFloat(this.F11()) / 100 + 1 ) }, this);

self.F12 = ko.computed(function () { return parseFloat(this.B9()) * ( parseFloat(this.F9()) / 100 + 1 ) * ( 1+ parseFloat(this.B10()) / 100 ) * ( 1 - parseFloat(this.F10()) / 100 ) * ( 1- parseFloat(this.B11()) / 100 ) / ( 320 + parseFloat(this.B9()) * ( parseFloat(this.F9()) / 100 + 1 ) * ( 1 + parseFloat(this.B10()) /100) * ( 1- parseFloat(this.F10()) / 100 ) * ( 1 - parseFloat(this.B11()) / 100 ) ) }, this);

self.暴击 = ko.computed(function () { return parseFloat(this.F7()) * ( 1 - parseFloat(this.F12()) ) * ( 1 - parseFloat(this.B12()) / 100 ) * 1.7755 }, this);

self.普通 = ko.computed(function () { return parseFloat(this.B3()) * ( 1 + parseFloat(this.B5() ) / 100 ) * ( 1 + parseFloat(this.F5() ) / 100 ) * ( parseFloat(this.B4()) / 100 ) * ( 1 + parseFloat(this.F4()) / 100 ) * ( parseFloat(this.B7() ) / 100 + 1 ) * ( 1 - parseFloat(this.F12()) ) * ( 1 - parseFloat(this.B12()) / 100 ) * 1.7755 }, this);

self.强击 = ko.computed(function () { return parseFloat(this.B3()) * ( 1 + parseFloat(this.B5()) / 100 ) * ( 1 + parseFloat(this.F5()) / 100 ) * ( parseFloat(this.B4()) / 100 ) * ( 1 + parseFloat(this.F4()) / 100 ) * ( parseFloat(this.B7()) / 100 + 1 ) * ( 1 - parseFloat(this.F12()) ) * ( 1 + 0.3 ) * ( 1 - parseFloat(this.B12()) / 100 ) * 1.7755 }, this);

self.偏斜 = ko.computed(function () { return parseFloat(this.B3()) * ( 1 + parseFloat(this.B5()) / 100 ) * ( 1 + parseFloat(this.F5()) / 100 ) * (parseFloat(this.B4()) / 100 ) * ( 1 + parseFloat(this.F4()) / 100 ) * ( parseFloat(this.B7()) / 100 + 1 ) * ( 1 - parseFloat(this.F12()) ) * ( 1 - parseFloat(this.B12()) / 100 ) * 0.75 * 1.7755 }, this); };

/* 这个加载方法也是固定的! */ var $ready = function () { $.getScript('https://wiki.biligame.com/ys/MediaWiki:Knockout.js?action=raw') .done(function() { ko.applyBindings(new ViewModel()); }) .fail(function() { console.log("ko加载失败") }); }; (function () {var t = function () {window.jQuery && window.mw ? $ready() : window.setTimeout(t, 100);};t();})();

</script>