var Nore; (function (Nore) { Game_Action.prototype.apply = function (target) { var result = target.result(); this.subject().clearResult(); result.clear(); result.used = this.testApply(target); result.missed = false; //result.used && Math.random() >= this.itemHit(target); result.evaded = false; // !result.missed && Math.random() < 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.itemCri(target); var value = this.makeDamageValue(target, result.critical); this.executeDamage(target, value); } for (var _i = 0, _a = this.item().effects; _i < _a.length; _i++) { var effect = _a[_i]; this.applyItemEffect(target, effect); } this.applyItemUserEffect(target); } this.updateLastTarget(target); }; Game_Action.prototype.speed = function () { var agi = this.subject().agi; var speed = agi; if (this.item()) { speed += this.item().speed; } if (this.isAttack()) { speed += this.subject().attackSpeed(); } return speed; }; })(Nore || (Nore = {}));