如题,想做一个抓捕怪物的脚本。作者: 任小雪 时间: 2021-10-3 19:05
赋予状态,
判断谁有状态则捕捉谁(本方法若存在复活技能等可针对死者的技能会有bug)作者: 天浩 时间: 2021-10-3 23:26
Game_Action.prototype.makeDamageValue = function(target, critical) {
var item = this.item();
var baseValue = this.evalDamageFormula(target);
var value = baseValue * this.calcElementRate(target);
$gameVariables.setValue(1,target._actorId);//1号变量代入目标ID
if (this.isPhysical()) {
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;
};