Advertisement
Maliki79

MV_Unmissable_Skills

Jun 16th, 2016
763
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //Make sure to tag skills with <hit> to make them unmissable!
  2. //Also note that this should be placed above all other plugins to reduce the chance for compatibility issues.
  3.  
  4. Game_Action.prototype.apply = function(target) {
  5.     var result = target.result();
  6.     this.subject().clearResult();
  7.     result.clear();
  8.     result.used = this.testApply(target);
  9.     if (!this.item().meta.hit) {
  10.     result.missed = (result.used && Math.random() >= this.itemHit(target));
  11.     result.evaded = (!result.missed && Math.random() < this.itemEva(target));
  12.     }
  13.     result.physical = this.isPhysical();
  14.     result.drain = this.isDrain();
  15.     if (result.isHit()) {
  16.         if (this.item().damage.type > 0) {
  17.             result.critical = (Math.random() < this.itemCri(target));
  18.             var value = this.makeDamageValue(target, result.critical);
  19.             this.executeDamage(target, value);
  20.         }
  21.         this.item().effects.forEach(function(effect) {
  22.             this.applyItemEffect(target, effect);
  23.         }, this);
  24.         this.applyItemUserEffect(target);
  25.     }
  26. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement