Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*============================================================================
- * ## Plugin Info
- *----------------------------------------------------------------------------
- * # Plugin Name
- * DoubleX RMMV Minimalized ATB
- *----------------------------------------------------------------------------
- * # Terms Of Use
- * You shall keep this plugin's Plugin Info part's contents intact
- * You shalln't claim that this plugin's written by anyone other than
- * DoubleX or his aliases
- * None of the above applies to DoubleX or his aliases
- *----------------------------------------------------------------------------
- * # Prerequisites
- * Abilities:
- * 1. Little Javascript coding proficiency to fully utilize this plugin
- *----------------------------------------------------------------------------
- * # Links
- * This plugin:
- * 1. http://pastebin.com/znV2ZQmi
- * Video:
- * 1. https://www.youtube.com/watch?v=zkrXZTQnjFc
- * Mentioned Patreon Supporters:
- * https://www.patreon.com/posts/71738797
- *----------------------------------------------------------------------------
- * # Author
- * DoubleX
- *----------------------------------------------------------------------------
- * # Changelog
- * v1.00a(GMT 1400 22-1-2015):
- * 1. 1st completed version of this plugin finished
- * v0.00a(GMT 1200 9-12-2015):
- * 1. 1st testing version of this plugin finished
- *============================================================================*/
- /*:
- * @plugindesc To be the easiest, smallest and simplest atb system plugin ever
- * @author DoubleX
- *
- * @param maxTurnUnit
- * @desc Sets the maximum battle turn clock unit as maxTurnUnit
- * maxTurnUnit must return a Number and should return a positive one
- * @default 5
- *
- * @param actorNameW
- * @desc Sets the maximum width allocated for actor name display on the status
- * window as actorNameW
- * actorNameW must return a positive Number
- * @default 123
- *
- * @param actorIconOx
- * @desc Sets the actor icon display area x offset relative to the actor name
- * display area on the status window as actorIconOx
- * actorIconOx must return a positive Number
- * @default 6
- *
- * @param hpBarOx
- * @desc Sets the actor hp bar display area x offset relative to the actor icon
- * display area on the status window as hpBarOx
- * hpBarOx must return a positive Number
- * @default 6
- *
- * @param hpBarW
- * @desc Sets the maximum width allocated for actor hp bar display on the status
- * window as hpBarW
- * hpBarW must return a positive Number
- * @default 87
- *
- * @param mpBarOx
- * @desc Sets the actor mp bar display area x offset relative to the actor hp
- * bar display area on the status window as mpBarOx
- * mpBarOx must return a positive Number
- * @default 6
- *
- * @param mpBarW
- * @desc Sets the maximum width allocated for actor mp bar display on the status
- * window as mpBarW
- * mpBarW must return a positive Number
- * @default 87
- *
- * @param tpBarOx
- * @desc Sets the actor tp bar display area x offset relative to the actor mp
- * bar display area on the status window as tpBarOx
- * tpBarOx must return a positive Number
- * @default 6
- *
- * @param tpBarW
- * @desc Sets the maximum width allocated for actor tp bar display on the status
- * window as tpBarW
- * tpBarW must return a positive Number
- * @default 87
- *
- * @param atbBarOx
- * @desc Sets the actor atb bar display area x offset relative to the actor
- * mp/tp bar display area on the status window as atbBarOx
- * atbBarOx must return a positive Number
- * @default 6
- *
- * @param atbBarW
- * @desc Sets the maximum width allocated for actor atb bar display on the
- * status window as atbBarW
- * atbBarW must return a positive Number
- * @default 87
- *
- * @param atbC1
- * @desc Sets the 1st atb bar color as text color atbC1
- * atbC1 must return a valid text color code
- * atbC1 should return the same value during the same battle to ensure
- * proper atb bar color displays
- * @default 7
- *
- * @param atbC2
- * @desc Sets the 2nd atb bar color as text color atbC2
- * atbC2 must return a valid text color code
- * atbC2 should return the same value during the same battle to ensure
- * proper atb bar color displays
- * @default 8
- *
- * @help
- * The plugin file name must be the same as DoubleX_RMMV.MATB_File, which must
- * be edited by editing this plugin js file directly
- * The default value of DoubleX_RMMV.MATB_File is
- * DoubleX RMMV Minimalized ATB v100a
- *============================================================================
- * ## Plugin Call Info
- *----------------------------------------------------------------------------
- * # Configuration manipulations
- * 1. $gameSystem._matb.param
- * - Returns the value of param listed in the plugin manager
- * 2. $gameSystem._matb.param = val
- * - Sets the value of param listed in the plugin manager as val
- * - All $gameSystem._matb.param changes will be saved
- * # Battle manipulations
- * 1. _matbTurnClock
- * Returns the number of frames the turn clock has run in a turn
- * 2. _matbTurnClock = frame
- * Sets the number of frames the turn clock has run in a turn as frame
- * # Battler manipulations
- * 1. _matbVal
- * - Returns the battler's atb value
- * 2. _matbVal = val
- * - Sets the battler's atb value as val which ranges from 0 to 100
- * 3. _matbValChange
- * - Returns whether the battler's atb value has just changed
- * 4. _matbValChange = true
- * - Marks that the battler's atb value has just changed
- * It must be used when any configuration other than maxTurnUnit
- * changes during battles
- * 4. resetMatb()
- * - Clears all battler's actions and resets the battler's atb value
- *============================================================================
- */
- 'use strict';
- var DoubleX_RMMV = DoubleX_RMMV || {};
- DoubleX_RMMV['MATB'] = 'v0.00a';
- // The plugin file name must be the same as DoubleX_RMMV.MATB_File
- DoubleX_RMMV.MATB_File = 'DoubleX RMMV Minimalized ATB v100a';
- /*============================================================================
- * ## Plugin Implementations
- * You need not edit this part as it's about how this plugin works
- *----------------------------------------------------------------------------
- * # Plugin Support Info:
- * 1. Prerequisites
- * - Basic knowledge of this plugin on the user level, the default
- * battle system implementations and the atb system concepts
- * - Some Javascript coding proficiency to fully comprehend this
- * plugin
- * 2. Function documentation
- * - The 1st part describes why this function's rewritten/extended for
- * rewritten/extended functions or what the function does for new
- * functions
- * - The 2nd part describes what the arguments of the function are
- * - The 3rd part informs which version rewritten, extended or created
- * this function
- * - The 4th part informs whether the function's rewritten or new
- * - The 5th part informs whether the function's a real or potential
- * hotspot
- * - The 6th part describes how this function works for new functions
- * only, and describes the parts added, removed or rewritten for
- * rewritten or extended functions only
- * Example:
- * /*----------------------------------------------------------------------
- * * Why rewrite/extended/What this function does
- * *----------------------------------------------------------------------*/
- /* // arguments: What these arguments are
- * functionName = function(arguments) { // Version X+; Rewrite/New; Hotspot
- * // Added/Removed/Rewritten to do something/How this function works
- * functionNameCode;
- * //
- * } // functionName
- *----------------------------------------------------------------------------*/
- /*----------------------------------------------------------------------------
- * # Edit class: BattleManager
- * - Reimplements the the whole battle flow to run the atb system
- *----------------------------------------------------------------------------*/
- /*----------------------------------------------------------------------------
- * New private instance variable
- *----------------------------------------------------------------------------*/
- // _matbTurnClock: The battle turn atb clock
- /*----------------------------------------------------------------------------
- * Keeps the appropriate input window opened if there are inputable actors
- *----------------------------------------------------------------------------*/
- BattleManager.isInputting = function() { // Rewrite; Hotspot
- return $gameParty.canInput(); // Rewritten
- }; // BattleManager.isInputting
- BattleManager.startTurn = function() {}; // Rewrite
- BattleManager.initMembersMatb = BattleManager.initMembers;
- BattleManager.initMembers = function() {
- this.initMembersMatb();
- this._matbTurnClock = 0; // Added
- }; // BattleManager.initMembers
- BattleManager.startBattleMatb = BattleManager.startBattle;
- BattleManager.startBattle = function() {
- this.startBattleMatb();
- this.startMatbBattle(); // Added
- }; // BattleManager.startBattle
- BattleManager.selectNextCommandMatb = BattleManager.selectNextCommand;
- BattleManager.selectNextCommand = function() {
- this.actor().confirmMatbAct(); // Added
- this.selectNextCommandMatb();
- }; // BattleManager.selectNextCommand
- BattleManager.startMatbBattle = function() { // New
- this._phase = 'turn';
- var s = this._preemptive ? 'preempt' : this._surprise ? 'surprise' : 'norm';
- this.allBattleMembers().forEach(function(mem) { mem.setStartMatbVal(s); });
- }; // BattleManager.startMatbBattle
- BattleManager.canUpdateMatb = function() { // New; Hotspot
- return this._phase && this._phase !== 'init';
- }; // BattleManager.canUpdateMatb
- BattleManager.updateMatb = function() { // New; Hotspot
- $gameParty.movableMembers().forEach(function(mem) { mem.updateMatb(); });
- $gameTroop.movableMembers().forEach(function(mem) { mem.updateMatb(); });
- this.processMatbTurn();
- this.updateMatbTurn();
- }; // BattleManager.updateMatb
- BattleManager.processMatbTurn = function() { // New; Hotspot
- this._subject = this._subject || this._actionBattlers[0];
- if (this._subject) this.processTurn();
- }; // BattleManager.processMatbTurn
- BattleManager.updateMatbTurn = function() { // New; Hotspot
- // The fps is assumed to be always 60
- if ((this._matbTurnClock += 1) < $gameSystem._matb.maxTurnUnit * 60) return;
- this._matbTurnClock = 0;
- this.endMatbTurn();
- //
- }; // BattleManager.updateMatbTurn
- BattleManager.endMatbTurn = function() { // New
- this.allBattleMembers().forEach(function(mem) {
- mem.onTurnEnd();
- this.refreshStatus();
- this._logWindow.displayAutoAffectedStatus(mem);
- this._logWindow.displayRegeneration(mem);
- }, this);
- $gameTroop.increaseTurn();
- }; // BattleManager.endMatbTurn
- // battler: The battler to become eligible to be the action execution subject
- BattleManager.addMatbActionBattler = function(battler) { // New
- if (this._actionBattlers.indexOf(battler) >= 0) return;
- this._actionBattlers.push(battler);
- }; // BattleManager.addMatbActionBattler
- // battler: The battler to have its atb value reset
- BattleManager.resetMatb = function(battler) { // New
- var index = this._actionBattlers.indexOf(battler);
- if (index >= 0) this._actionBattlers.splice(index, 1);
- if (this.actor() === battler) this.clearActor();
- }; // BattleManager.resetMatb
- /*----------------------------------------------------------------------------
- * # Edit class: Game_System
- *----------------------------------------------------------------------------*/
- /*----------------------------------------------------------------------------
- * New private instance variable
- *----------------------------------------------------------------------------*/
- // _matb: The container of all configuration values
- Game_System.prototype.initializeMatb = Game_System.prototype.initialize;
- Game_System.prototype.initialize = function() {
- this.initializeMatb();
- this.initMatbParams(); // Added
- }; // Game_System.prototype.initialize
- Game_System.prototype.initMatbParams = function() { // New
- var val, params = PluginManager.parameters(DoubleX_RMMV.MATB_File);
- this._matb = {};
- Object.keys(params).forEach(function(param) {
- val = +params[param];
- this._matb[param] = isNaN(val) ? params[param] : val;
- }, this);
- }; // Game_System.prototype.initMatbParams
- /*----------------------------------------------------------------------------
- * # Edit class: Game_BattlerBase
- *----------------------------------------------------------------------------*/
- /*----------------------------------------------------------------------------
- * Updates state turns with different removal timings at different timings
- *----------------------------------------------------------------------------*/
- Game_BattlerBase.prototype.updateStateTurns = function() { // Rewrite
- this.updateMatbStateTurns(2); // Rewritten
- }; // Game_BattlerBase.prototype.updateStateTurns
- Game_BattlerBase.prototype.hideMatb = Game_BattlerBase.prototype.hide;
- Game_BattlerBase.prototype.hide = function() {
- this.hideMatb();
- this.resetMatb(); // Added
- }; // Game_BattlerBase.prototype.hide
- // start: The battle start type
- Game_BattlerBase.prototype.setStartMatbVal = function(start) { // New
- if (!this.canMove()) return this._matbVal = 0;
- if (start === 'preempt' && this.isActor()) return this._matbVal = 100;
- if (start === 'surprise' && this.isEnemy()) return this._matbVal = 100;
- this._matbVal = 0;
- }; // Game_BattlerBase.prototype.setStartMatbVal
- /*----------------------------------------------------------------------------
- * # Edit class: Game_Battler
- * - Implements the battler's atb actions, clock, control flow and logics
- *----------------------------------------------------------------------------*/
- /*----------------------------------------------------------------------------
- * New private instance variables
- *----------------------------------------------------------------------------*/
- // _matbVal: The atb value
- // _matbValChange: The atb value change flag
- Game_Battler.prototype.initMembersMatb = Game_Battler.prototype.initMembers;
- Game_Battler.prototype.initMembers = function() {
- Game_Battler.prototype.initMembersMatb.call(this); // Prevents name clashes
- this._matbVal = 0, this._matbValChange = true; // Added
- }; // Game_Battler.prototype.initMembers
- Game_Battler.prototype.onRestrictMatb = Game_Battler.prototype.onRestrict;
- Game_Battler.prototype.onRestrict = function() {
- this.onRestrictMatb();
- // Added to fix nil action battlers bugs and edge cases as well
- if (BattleManager._actionBattlers) this.resetMatb();
- //
- }; // Game_Battler.prototype.onRestrict
- Game_Battler.prototype.onAllActionsEndMatb =
- Game_Battler.prototype.onAllActionsEnd;
- Game_Battler.prototype.onAllActionsEnd = function() {
- this.onAllActionsEndMatb();
- // Added
- this.updateMatbStateTurns(1);
- this.resetMatb();
- //
- }; // Game_Battler.prototype.onAllActionsEnd
- Game_Battler.prototype.onTurnEndMatb = Game_Battler.prototype.onTurnEnd;
- Game_Battler.prototype.onTurnEnd = function() {
- this.onTurnEndMatb();
- this.removeBuffsAuto(); // Added
- }; // Game_Battler.prototype.onTurnEnd
- /*----------------------------------------------------------------------------
- * Ensures battlers added after the battle starts won't carry statuses over
- *----------------------------------------------------------------------------*/
- Game_Battler.prototype.onBattleEndMatb = Game_Battler.prototype.onBattleEnd;
- Game_Battler.prototype.onBattleEnd = function() {
- this.onBattleEndMatb();
- this.resetMatb(); // Added
- }; // Game_Battler.prototype.onBattleEnd
- // start: The battle start type
- Game_Battler.prototype.setStartMatbVal = function(start) { // New
- this._matbVal = 0, this._matbValChange = true;
- Game_BattlerBase.prototype.setStartMatbVal.call(this, start);
- if (this._matbVal >= 100) this.makeActions();
- }; // Game_Battler.prototype.setStartMatbVal
- Game_Battler.prototype.updateMatb = function() { // New; Hotspot
- if (this._matbVal >= 100) return;
- this._matbValChange = this._matbVal !== (this._matbVal += this.agi / 100);
- if (this._matbVal < 100) return;
- this._matbVal = 100;
- this.makeActions();
- }; // Game_Battler.prototype.updateMatb
- Game_Battler.prototype.resetMatb = function() { // New
- this._matbVal = 0, this._matbValChange = true;
- this.clearActions();
- BattleManager.resetMatb(this);
- }; // Game_Battler.prototype.resetMatb
- // timing: The state auto removal timing
- Game_Battler.prototype.updateMatbStateTurns = function(timing) { // New
- this.states().forEach(function(s) {
- if (s.autoRemovalTiming === timing && this._stateTurns[s.id] > 0) {
- this._stateTurns[s.id] -= 1;
- }
- }, this);
- }; // Game_Battler.prototype.updateMatbStateTurns
- /*----------------------------------------------------------------------------
- * # Edit class: Game_Actor
- *----------------------------------------------------------------------------*/
- /*----------------------------------------------------------------------------
- * New private instance variables
- *----------------------------------------------------------------------------*/
- // _matbReserve: The actor added during battles flag
- /*----------------------------------------------------------------------------
- * Ensures actors added during battles are properly initialized as well
- *----------------------------------------------------------------------------*/
- Game_Actor.prototype.initMembersMatb = Game_Actor.prototype.initMembers;
- Game_Actor.prototype.initMembers = function() {
- this.initMembersMatb();
- this._matbReserve = true; // Added
- }; // Game_Actor.prototype.initMembers
- Game_Actor.prototype.makeAutoBattleActionsMatb =
- Game_Actor.prototype.makeAutoBattleActions;
- Game_Actor.prototype.makeAutoBattleActions = function() {
- this.makeAutoBattleActionsMatb();
- BattleManager.addMatbActionBattler(this); // Added
- }; // Game_Actor.prototype.makeAutoBattleActions
- Game_Actor.prototype.makeConfusionActionsMatb =
- Game_Actor.prototype.makeConfusionActions;
- Game_Actor.prototype.makeConfusionActions = function() {
- this.makeConfusionActionsMatb();
- BattleManager.addMatbActionBattler(this); // Added
- }; // Game_Actor.prototype.makeConfusionActions
- Game_Actor.prototype.canInput = function() { // New; Hotspot
- if (!Game_BattlerBase.prototype.canInput.call(this)) return false;
- if (this.numActions() <= 0) return false;
- if (this._actionInputIndex >= this.numActions() - 1) return false;
- return BattleManager._actionBattlers.indexOf(this) < 0;
- }; // Game_Actor.prototype.canInput
- /*----------------------------------------------------------------------------
- * Ensures actors added during battles are properly initialized as well
- *----------------------------------------------------------------------------*/
- Game_Actor.prototype.onBattleEnd = function() { // New
- Game_Battler.prototype.onBattleEnd.call(this);
- this._matbReserve = true; // Added
- }; // Game_Actor.prototype.onBattleEnd
- /*----------------------------------------------------------------------------
- * Ensures actors added during battles are properly initialized as well
- *----------------------------------------------------------------------------*/
- // start: The battle start type
- Game_Actor.prototype.setStartMatbVal = function(start) { // New
- Game_Battler.prototype.setStartMatbVal.call(this, start);
- this._matbReserve = false; // Added
- }; // Game_Actor.prototype.setStartMatbVal
- /*----------------------------------------------------------------------------
- * Ensures actors added during battles are properly initialized as well
- *----------------------------------------------------------------------------*/
- Game_Actor.prototype.updateMatb = function() { // New; Hotspot
- // Added
- if (this._matbReserve) {
- this._matbVal = 0, this._matbValChange = true;
- this._matbReserve = false;
- }
- //
- Game_Battler.prototype.updateMatb.call(this);
- }; // Game_Actor.prototype.updateMatb
- Game_Actor.prototype.confirmMatbAct = function() { // New
- if (this._actionInputIndex < this.numActions() - 1) return;
- BattleManager.addMatbActionBattler(this); // Added
- }; // Game_Actor.prototype.confirmMatbAct
- /*----------------------------------------------------------------------------
- * # Edit class: Game_Enemy
- *----------------------------------------------------------------------------*/
- Game_Enemy.prototype.makeActionsMatb = Game_Enemy.prototype.makeActions;
- Game_Enemy.prototype.makeActions = function() {
- this.makeActionsMatb();
- BattleManager.addMatbActionBattler(this); // Added
- }; // Game_Enemy.prototype.makeActions
- /*----------------------------------------------------------------------------
- * # Edit class: Game_Party
- *----------------------------------------------------------------------------*/
- Game_Party.prototype.clearActions = function() { // New
- Game_Unit.prototype.clearActions.call(this);
- // Added to reset all party members' atb values upon failed party escapes
- this.aliveMembers().forEach(function(mem) { mem.resetMatb(); });
- //
- }; // Game_Party.prototype.clearActions
- Game_Party.prototype.matbInputableMemIndices = function() {
- return this.members().filter(function(mem) {
- return mem.canInput();
- }).map(function(mem) { return mem.index(); });
- }; // Game_Party.prototype.matbInputableMemIndices
- /*----------------------------------------------------------------------------
- * # Edit class: Window_BattleStatus
- *----------------------------------------------------------------------------*/
- Window_BattleStatus.prototype.basicAreaRect = function(index) { // Rewrite
- // Rewritten to reallocate spaces to draw the atb bars
- var rect = this.itemRectForText(index);
- rect.width -= this.gaugeAreaWidth() + $gameSystem._matb.hpBarOx;
- return rect;
- //
- }; // Window_BattleStatus.prototype.basicAreaRect
- Window_BattleStatus.prototype.gaugeAreaWidth = function() { // Rewrite; Hotspot
- // Rewritten to reallocate spaces to draw the atb bars
- var m = $gameSystem._matb, w = m.hpBarW + m.mpBarOx + m.mpBarW;
- if ($dataSystem.optDisplayTp) w += m.tpBarOx + m.tpBarW;
- return w + m.atbBarOx + m.atbBarW;
- //
- }; // Window_BattleStatus.prototype.gaugeAreaWidth
- Window_BattleStatus.prototype.drawBasicArea = function(rect, actor) { // Rewrite
- // Rewritten to reallocate spaces to draw the atb bars
- var w = $gameSystem._matb.actorNameW;
- this.drawActorName(actor, rect.x, rect.y, w);
- var ox = w + $gameSystem._matb.actorIconOx;
- this.drawActorIcons(actor, rect.x + ox, rect.y, rect.width - w);
- //
- }; // Window_BattleStatus.prototype.drawBasicArea
- Window_BattleStatus.prototype.drawGaugeAreaWithTp = function(rect, actor) {
- // Rewrite
- // Rewritten to reallocate spaces to draw the atb bars
- var matb = $gameSystem._matb;
- this.drawActorHp(actor, rect.x, rect.y, matb.hpBarW);
- var ox = matb.hpBarW + matb.mpBarOx;
- this.drawActorMp(actor, rect.x + ox, rect.y, matb.mpBarW);
- ox += matb.mpBarW + matb.tpBarOx;
- this.drawActorTp(actor, rect.x + ox, rect.y, matb.tpBarW);
- ox += matb.tpBarW + matb.atbBarOx;
- this.drawActorMatb(actor._matbVal / 100, rect.x + ox, rect.y);
- //
- }; // Window_BattleStatus.prototype.drawGaugeAreaWithTp
- Window_BattleStatus.prototype.drawGaugeAreaWithoutTp = function(rect, actor) {
- // Rewrite
- // Rewritten to reallocate spaces to draw the atb bars
- var matb = $gameSystem._matb;
- this.drawActorHp(actor, rect.x, rect.y, matb.hpBarW);
- var ox = matb.hpBarW + matb.mpBarOx;
- this.drawActorMp(actor, rect.x + ox, rect.y, matb.mpBarW);
- ox += matb.mpBarW + matb.atbBarOx;
- this.drawActorMatb(actor._matbVal / 100, rect.x + ox, rect.y);
- //
- }; // Window_BattleStatus.prototype.drawGaugeAreaWithoutTp
- Window_BattleStatus.prototype.refreshMatbBars = function() { // New; Hotspot
- var matb = $gameSystem._matb, actor, rect;
- var ox = matb.hpBarW + matb.mpBarOx + matb.mpBarW + matb.atbBarOx;
- if ($dataSystem.optDisplayTp) ox += matb.tpBarOx + matb.tpBarW;
- for (var index = 0, max = this.maxItems(); index < max; index++) {
- actor = $gameParty.battleMembers()[index];
- if (!actor || !actor._matbValChange) continue;
- rect = this.gaugeAreaRect(index);
- this.drawActorMatb(actor._matbVal / 100, rect.x + ox, rect.y);
- actor._matbValChange = false;
- }
- }; // Window_BattleStatus.prototype.refreshMatbBars
- /* actor: The actor using the atb bar
- * x: The atb bar x position
- * y: The atb bar y position
- */
- Window_BattleStatus.prototype.drawActorMatb = function(matbRate, x, y) {
- // New; Hotspot
- var matb = $gameSystem._matb, w = matb.atbBarW;
- var c0 = this.textColor(matb.atbC1), c1 = this.textColor(matb.atbC2);
- this.drawGauge(x, y, w, matbRate, c0, c1);
- this.changeTextColor(this.systemColor());
- this.drawText('AP', x, y, this.textWidth('AP'));
- }; // Window_BattleStatus.prototype.drawActorMatb
- /*----------------------------------------------------------------------------
- * # Edit class: Scene_Battle
- *----------------------------------------------------------------------------*/
- Scene_Battle.prototype.updateBattleProcess = function() { // Rewrite; Hotspot
- // Rewritten to reconstruct the action input and execution flows for atb
- if (BattleManager.isAborting() || BattleManager.isBattleEnd()) {
- return BattleManager.update();
- }
- if (BattleManager.isBusy() || BattleManager.updateEvent()) return;
- if (BattleManager._phase === 'action') return BattleManager.updateAction();
- if (BattleManager.canUpdateMatb() && !this.isAnyInputWindowActive()) {
- this.updateMatb();
- }
- //
- }; // Scene_Battle.prototype.updateBattleProcess
- Scene_Battle.prototype.updateWindowPositionsMatb =
- Scene_Battle.prototype.updateWindowPositions;
- Scene_Battle.prototype.updateWindowPositions = function() { // Hotspot
- this.updateWindowPositionsMatb();
- // Added to ensure the actor window will complete cover the status window
- if (this._actorWindow.active) this._actorWindow.x = this._statusWindow.x;
- //
- }; // Scene_Battle.prototype.updateWindowPositions
- Scene_Battle.prototype.commandEscapeMatb = Scene_Battle.prototype.commandEscape;
- Scene_Battle.prototype.commandEscape = function() { // v1.00a+
- // Rewritten to ensure party escape attempt won't trigger when battle's busy
- if (BattleManager._phase !== 'action') return this.commandEscapeMatb();
- this.startPartyCommandSelection();
- //
- }; // Scene_Battle.prototype.commandEscape
- Scene_Battle.prototype.updateMatb = function() { // New; Hotspot
- BattleManager.updateMatb();
- this.updateMatbActorSelection();
- this._statusWindow.refreshMatbBars();
- }; // Scene_Battle.prototype.updateMatb
- Scene_Battle.prototype.updateMatbActorSelection = function() {
- // New; Hotspot
- var actor_indices = $gameParty.matbInputableMemIndices();
- if (actor_indices.indexOf(this._statusWindow.index()) >= 0) return;
- if (this._statusWindow.index() > 0) this._statusWindow.deselect();
- if (actor_indices.length <= 0) return;
- BattleManager._actorIndex = actor_indices[0];
- this.startActorCommandSelection();
- }; // Scene_Battle.prototype.updateMatbActorSelection
- /*============================================================================*/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement