加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员  
 
x
 
 本帖最后由 负零 于 2016-2-21 16:13 编辑  
 
代码如下,红字部分是新加的,基础文件为rpg_objects.js,报错为
 
,报错时间为敌人攻击的时候(我方攻击也是伤害为0),初步认定为没有定义敌人的isLearnedSkill()部分,请大神指点指点。 
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; }; 
 
 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;  
};  
 
  |