查看: 4015|回复: 1

[已经过期] 关于MV技能公式的使用及设定问题(文件内/代码设定)

[复制链接]
梦石
0
星屑
723
在线时间
530 小时
注册时间
2010-6-9
回帖
668
发表于 2016-2-21 16:12:22 | 显示全部楼层 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有账号?注册会员

×
本帖最后由 负零 于 2016-2-21 16:13 编辑

代码如下,红字部分是新加的,基础文件为rpg_objects.js,报错为 QQ截图20160221160834.png ,报错时间为敌人攻击的时候(我方攻击也是伤害为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]
梦石
0
星屑
50
在线时间
81 小时
注册时间
2016-1-6
回帖
145
发表于 2016-2-22 13:40:57 | 显示全部楼层
isLearnedSkill()是不是应该改为attackSkillId()
我不知道你最终需要的效果是如何,所以不知道我说的对不对

点评

isLearnedSkill()是如果学会了这个技能,则伤害增加。  发表于 2016-2-22 15:21
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.

在本版发帖返回顶部