getNakedStatus
This commit is contained in:
parent
1c2110827c
commit
31d01ef140
@ -2057,6 +2057,22 @@ control.prototype.getRealStatusOrDefault = function (status, name) {
|
||||
return Math.floor(this.getStatusOrDefault(status, name) * this.getBuff(name));
|
||||
}
|
||||
|
||||
////// 获得勇士原始属性(无装备和衰弱影响) //////
|
||||
control.prototype.getNakedStatus = function (name) {
|
||||
var value = this.getStatus(name);
|
||||
if (value == null) return value;
|
||||
// 装备增幅
|
||||
core.status.hero.equipment.forEach(function (v) {
|
||||
if (!v || !(core.material.items[v] || {}).equip) return;
|
||||
value -= core.material.items[v].equip.value[name] || 0;
|
||||
});
|
||||
// 衰弱扣除
|
||||
if (core.hasFlag('weak') && core.values.weakValue >= 1 && (name == 'atk' || name == 'def')) {
|
||||
value += core.values.weakValue;
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
////// 设置某个属性的增幅值 //////
|
||||
control.prototype.setBuff = function (name, value) {
|
||||
// 仅保留三位有效buff值
|
||||
|
||||
@ -391,14 +391,3 @@ items.prototype.quickLoadEquip = function (index) {
|
||||
|
||||
core.drawTip("成功换上" + index + "号套装");
|
||||
}
|
||||
|
||||
////// 获得装备直接增加的属性数据 //////
|
||||
items.prototype.getEquippedStatus = function (name) {
|
||||
var value = 0;
|
||||
core.status.hero.equipment.forEach(function (v) {
|
||||
if (!v || !(core.material.items[v] || {}).equip) return;
|
||||
if (core.material.items[v].equip.percentage) return;
|
||||
value += core.material.items[v].equip[name] || 0;
|
||||
});
|
||||
return value;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user