Advertisement
Maliki79

Mal_Elly_ATB_escape_edit

Jan 29th, 2016
389
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var Elly_ATB_processEscape = BattleManager.processEscape;
  2. BattleManager.processEscape = function() {
  3.     $gameParty.performEscape();
  4.     SoundManager.playEscape();
  5.     var success = this._preemptive ? true : (Math.random() < this._escapeRatio);
  6.     if (success) {
  7.         $gameParty.removeBattleStates();
  8.         $gameParty.performEscapeSuccess();
  9.         this.displayEscapeSuccessMessage();
  10.         this._escaped = true;
  11.         this.processAbort();
  12.     } else {
  13.         this.displayEscapeFailureMessage();
  14.         this._escapeRatio += this._escapeFailBoost;
  15.         this._phase = 'atb';
  16.         this.startTurn();
  17.         $gameParty.clearActions();
  18.         this.allBattleMembers().forEach(function(battler)
  19.         {
  20.         if (battler.isActor()) {
  21.         battler.atb /= 10;
  22.         }
  23.         }, this);
  24.     }
  25.     return success;
  26. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement