Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //==============================================================================
- // ** Escape Fix
- // by: Jeneeus Guruman
- //------------------------------------------------------------------------------
- var Imported = Imported || {};
- /*:
- * @plugindesc v1.0.1 Fixes the escape command to not remove the states if failed to escape.
- * @author Jeneeus Guruman
- *
- * @help Just put this above all plugins but directly below Yanfly Battle Core.
- *
- * Changelog:
- *
- * * v1.0.1: Now compatible with Yanfly Battle Core v1.07.
- */
- if (Imported.YEP_BattleEngineCore) {
- BattleManager.processEscape = function() {
- var success = this._preemptive ? true : (Math.random() < this._escapeRatio);
- if (success) {
- $gameParty.removeBattleStates();
- }
- $gameParty.performEscape();
- SoundManager.playEscape();
- if (success) {
- $gameParty.performEscapeSuccess();
- this.displayEscapeSuccessMessage();
- this._escaped = true;
- this.processAbort();
- } else {
- this.displayEscapeFailureMessage();
- this._escapeRatio += this._escapeFailBoost;
- $gameParty.clearActions();
- this.startTurn();
- }
- return success;
- };
- }
- else {
- BattleManager.processEscape = function() {
- var success = this._preemptive ? true : (Math.random() < this._escapeRatio);
- if (success) {
- $gameParty.removeBattleStates();
- }
- $gameParty.performEscape();
- SoundManager.playEscape();
- if (success) {
- this.displayEscapeSuccessMessage();
- this._escaped = true;
- this.processAbort();
- } else {
- this.displayEscapeFailureMessage();
- this._escapeRatio += 0.1;
- $gameParty.clearActions();
- this.startTurn();
- }
- return success;
- };
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement