代码如下,红字部分是新加的,基础文件为rpg_objects.js,报错为
,报错时间为敌人攻击的时候(我方攻击也是伤害为0),初步认定为没有定义敌人的isLearnedSkill()部分,请大神指点指点。
[pre lang="javascript"]Game_Action.prototype.makeDamageValue = function(target, critical) {
var a = this.subject();
var b = target;
var v = $gameVariables._data;
var item = this.item();
var baseValue = this.evalDamageFormula(target);
var value = baseValue * this.calcElementRate(target);
if (this.isPhysical()) {
if (a.isLearnedSkill(3)){value+=a.atk;}
value *= target.pdr;
}
if (this.isMagical()) {
value *= target.mdr;
}
if (baseValue < 0) {
value *= target.rec;
}
if (critical) {
value = this.applyCritical(value);
}
value = this.applyVariance(value, item.damage.variance);
value = this.applyGuard(value, target);
value = Math.round(value);
return value;
};[/pre]