数据库里应该不行吧。
找到脚本里计算伤害的地方、if (result.idear()) { if (this.item().damage.type > 0) { //true为暴击 result.critical = (Math.random() < this.itemCri(target)); //伤害值计算 var value = this.makeDamageValue(target, result.critical); //执行伤害 this.executeDamage(target, value); } this.item().effects.forEach(function(effect) { this.applyItemEffect(target, effect); }, this); this.applyItemUserEffect(target); } }
if (result.idear()) {
if (this.item().damage.type > 0) {
//true为暴击
result.critical = (Math.random() < this.itemCri(target));
//伤害值计算
var value = this.makeDamageValue(target, result.critical);
//执行伤害
this.executeDamage(target, value);
}
this.item().effects.forEach(function(effect) {
this.applyItemEffect(target, effect);
}, this);
this.applyItemUserEffect(target);
}
}
这一段就是数据库里面的技能伤害部分
Game_Action.prototype.evalDamageFormula = function(target) { try { var item = this.item(); var a = this.subject(); var b = target; var a_level = a._level var b_level = b._level var v = $gameVariables._data; var sign = ([3, 4].contains(item.damage.type) ? -1 : 1); var value = Math.max(eval(item.damage.formula), 0) * sign; if (isNaN(value)) value = 0; return value; } catch (e) { return 0; } };
Game_Action.prototype.evalDamageFormula = function(target) {
try {
var item = this.item();
var a = this.subject();
var b = target;
var a_level = a._level
var b_level = b._level
var v = $gameVariables._data;
var sign = ([3, 4].contains(item.damage.type) ? -1 : 1);
var value = Math.max(eval(item.damage.formula), 0) * sign;
if (isNaN(value)) value = 0;
return value;
} catch (e) {
return 0;
}
};
这个被我修改过一部分了,所以和原版的有点区别
|