|
|
|
@ -9,9 +9,9 @@ Imported.SF_Objects = true;
|
|
|
|
|
var SF_Plugins = SF_Plugins || {};
|
|
|
|
|
//=============================================================================
|
|
|
|
|
/*:
|
|
|
|
|
* @plugindesc objects lib for salted fish plugins
|
|
|
|
|
* @author Salted Fish
|
|
|
|
|
*/
|
|
|
|
|
* @plugindesc objects lib for salted fish plugins
|
|
|
|
|
* @author Salted Fish
|
|
|
|
|
*/
|
|
|
|
|
//=============================================================================
|
|
|
|
|
|
|
|
|
|
(function () {
|
|
|
|
@ -31,22 +31,22 @@ var SF_Plugins = SF_Plugins || {};
|
|
|
|
|
|
|
|
|
|
Game_Action.prototype.attackHit = function (target) {
|
|
|
|
|
return this.subject().hit;
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
SF_Objects.Game_Action_apply = Game_Action.prototype.apply;
|
|
|
|
|
Game_Action.prototype.apply = function (target) {
|
|
|
|
|
if ((this.isAttack() || this.isSkill())) {
|
|
|
|
|
if (this.isAttack() || this.isSkill()) {
|
|
|
|
|
var result = target.result();
|
|
|
|
|
this.subject().clearResult();
|
|
|
|
|
result.clear();
|
|
|
|
|
result.used = this.testApply(target);
|
|
|
|
|
result.missed = false;
|
|
|
|
|
result.evaded = (!result.missed && Math.random() >= (this.attackHit(target) - this.itemEva(target)));
|
|
|
|
|
result.evaded = !result.missed && Math.random() >= this.attackHit(target) - this.itemEva(target);
|
|
|
|
|
result.physical = this.isPhysical();
|
|
|
|
|
result.drain = this.isDrain();
|
|
|
|
|
if (result.isHit()) {
|
|
|
|
|
if (this.item().damage.type > 0) {
|
|
|
|
|
result.critical = (Math.random() < (this.subject().cri - target.cev));
|
|
|
|
|
result.critical = Math.random() < this.subject().cri - target.cev;
|
|
|
|
|
var value = this.makeDamageValue(target, result.critical);
|
|
|
|
|
this.executeDamage(target, value);
|
|
|
|
|
}
|
|
|
|
@ -55,9 +55,8 @@ var SF_Plugins = SF_Plugins || {};
|
|
|
|
|
}, this);
|
|
|
|
|
this.applyItemUserEffect(target);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
SF_Objects.Game_Action_apply.applys(this, arguments);
|
|
|
|
|
} else {
|
|
|
|
|
SF_Objects.Game_Action_apply.apply(this, arguments);
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
})();
|
|
|
|
|
})();
|
|
|
|
|