查看: 4285|回复: 3

[已经解决] 请问YEP的ATB能否设置成全实时,或者是否有其他的ATB系统?

[复制链接]
梦石
0
星屑
50
在线时间
45 小时
注册时间
2012-11-16
回帖
16
发表于 2016-5-7 00:43:27 | 显示全部楼层 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有账号?注册会员

×
本帖最后由 vanwongsss 于 2016-5-6 19:48 编辑

全实时是指当其中一人的行动条蓄满而弹出指令菜单时,游戏不会暂停,敌人的行动条还是会涨,并且还是会行动。
YEP_X_BattleSysATB中有一个叫做Lock Status Window的参数,我设置成true或false都没有看出区别来,不清楚是否为了实现这个功能而预留的。

梦石
0
星屑
50
在线时间
75 小时
注册时间
2006-11-22
回帖
45
发表于 2016-5-7 09:27:22 | 显示全部楼层
其他ATB腳本是有的
http://makermv.gq/post/1d6fa74e_8baef28
這裡面的腳本是全英文的,但我沒有實測過
搜尋RMMV ATB 就可以找到適合你的ATB腳本了

点评

好的,谢谢:)  发表于 2016-5-8 15:13
回复

使用道具 举报

梦石
0
星屑
165
在线时间
85 小时
注册时间
2016-4-26
回帖
14
发表于 2016-5-7 10:18:11 | 显示全部楼层
本帖最后由 DoubleX 于 2016-5-7 10:20 编辑

不知道你有没有尝试过这个ATB系统?
DoubleX RMMV Popularized ATB(搜寻DoubleX RMMV Popularized ATB的话应该能找到)
由于我还没有发放url的权限,我把所有该系统的插件打了包:

PATB.rar

122.71 KB, 下载次数: 104

txt + js

点评

这个我在网上找到过,不过当时下不来,因为需要翻墙 谢谢你的分享  发表于 2016-5-8 15:13
回复

使用道具 举报

梦石
0
星屑
22879
在线时间
8598 小时
注册时间
2011-12-31
回帖
3270
发表于 2016-5-7 13:11:09 | 显示全部楼层
本帖最后由 tseyik 于 2016-5-7 13:26 编辑

需翻牆
http://woodpenguin.web.fc2.com/MV_Plugin/ActiveTimeBattle.htm
『アクティブ』『ウェイト』『ストップ』
範例
http://woodpenguin.web.fc2.com/MV_Plugin/SmpleProject.html
Copyright (c) 2015 Mokusei Penguin
Released under the MIT license
MPP_ActiveTimeBattle.js
  1. //=============================================================================
  2. // MPP_ActiveTimeBattle.js
  3. //=============================================================================
  4. // Copyright (c) 2015 Mokusei Penguin
  5. // Released under the MIT license
  6. // [url]http://opensource.org/licenses/mit-license.php[/url]
  7. //=============================================================================

  8. /*:
  9. * @plugindesc 【MPP ver.1.2】戦闘システムをアクティブタイムバトルに変更します。
  10. * @author 木星ペンギン
  11. *
  12. * @help ●パーティコマンド
  13. * アクターコマンド選択中か、誰もコマンド入力を行っていない状態で
  14. * キャンセルキーを押すとパーティコマンドを開くことができます。
  15. *
  16. * パーティコマンドを開いている間は、どの戦闘モードでも時間が止まります。
  17. * 一時停止の代わりです。
  18. *
  19. * ●バトルイベントの実行
  20. * イベント実行中にも時間は止まります。
  21. *
  22. * ●戦闘モード(0:アクティブ, 1:ウェイト, 2:ストップ)
  23. *  アクティブ:常に時間が流れます。
  24. *  ウェイト :スキルやアイテム、対象選択中は時間が止まります。
  25. *        アクターコマンド入力中は時間が流れます。
  26. *  ストップ :コマンド入力中は常に時間が止まります。
  27. *        アクターコマンド入力中に加速ボタンを押すと時間が流れます。
  28. * ※どのモードでもパーティコマンド選択中、イベント実行中は時間が止まります。
  29. *
  30. * ●ATゲージ
  31. * ATゲージの最大値は
  32. *  1.パーティメンバーの敏捷性の平均値(敵は含まない)
  33. *  2.オプションによるプレイヤーの設定
  34. *  3.プラグインコマンドで設定した基準値
  35. * によって決定されます。
  36. *
  37. * ATゲージの増加量は
  38. *  キャラクターの敏捷性 + 増加値
  39. * です。
  40. * プラグインコマンドで設定できる『増加値』が大きいほど、
  41. * 敏捷性の影響が小さくなります。
  42. *
  43. * ●加速ボタン
  44. * ゲームパッドではXボタン、キーボードではShift、
  45. * マウスではステータスウィンドウより上をクリックし続けることで加速します。
  46. * ただし、メッセージウィンドウが表示されている場合は加速しません。
  47. *
  48. * ●コマンド入力を行うアクターの切り替え
  49. * ゲームパッドではLB/RBボタン、キーボードではQ、Page up/W、Page down、
  50. * マウスではステータスウィンドウを左クリックすることで
  51. * クリックした対象に切り替えることができます。
  52. * (正確には左クリックを離した際に切り替わります)
  53. *
  54. * ●ステータスウィンドウのスクロール
  55. * マウスで左クリックしたままウィンドウの上下にマウスを動かすと
  56. * スクロールさせることができます。
  57. * パーティメンバーがステータスウィンドウに収まらない場合の処置です。
  58. *
  59. * ●逃走
  60. * 戦闘可能なキャラ全員が逃走に必要なATをためると逃走判定を行います。
  61. * 逃走に失敗しても逃走状態は解除されません。
  62. * パーティコマンドで戦うを選択すると解除されます。
  63. *
  64. * 『逃走状態で逃走モーションを行うかどうか』でtrueを設定した場合、
  65. * 逃走状態にある間アクターは逃走モーションを行います。
  66. * デフォルトでは後ろ向きに走るモーションがないので注意してください。
  67. *
  68. * ●スキルの詠唱時間
  69. * アイテムやスキルの速度補正をマイナスにすることで、詠唱時間が発生します。
  70. * 速度補正を-1するごとに約0.5秒の詠唱時間となります。
  71. * 詠唱が終わった時点で、行動順リストに入ります。
  72. *
  73. * 詠唱時間はオプションの戦闘速度の設定によって上下します。
  74. * 戦闘速度の基準値を変えても変化しません。
  75. *
  76. * ●複数回行動
  77. * 特徴の行動回数追加によって2回以上の行動が可能になった際の動作は保証しません。
  78. * 1回行動になるようにしてください。
  79. *
  80. * ================================
  81. * 制作 : 木星ペンギン
  82. * URL : [url]http://woodpenguin.blog.fc2.com/[/url]
  83. *
  84. * @param === Option ===
  85. *
  86. * @param ATB Mode Default
  87. * @desc 戦闘モードのデフォルト値
  88. * (0:アクティブ, 1:ウェイト, 2:ストップ)
  89. * @default 1
  90. *
  91. * @param ATB Mode Name
  92. * @desc オプションで表示する戦闘モードの項目名
  93. * 空の場合オプションには追加されません
  94. * @default 戦闘モード
  95. *
  96. * @param ATB Mode Status
  97. * @desc オプションで表示する戦闘モードのステータス名
  98. * (カンマで区切ってください)
  99. * @default アクティブ,ウェイト
  100. *
  101. * @param ATB Speed Default
  102. * @desc 戦闘速度のデフォルト値(0~4)
  103. * @default 2
  104. *
  105. * @param ATB Speed Name
  106. * @desc オプションで表示する戦闘速度の項目名
  107. * 空の場合オプションには追加されません
  108. * @default 戦闘速度
  109. *
  110. * @param ATB Speed Status
  111. * @desc オプションで表示する戦闘速度のステータス名
  112. * (カンマで区切ってください)
  113. * @default 1,2,3,4,5
  114. *
  115. * @param === Battle ===
  116. *
  117. * @param ATB Speed Base
  118. * @desc 戦闘速度の基準値
  119. * ゲーム内での変更はできない制作者側の設定
  120. * @default 6
  121. *
  122. * @param AT Increment
  123. * @desc ATゲージの増加値
  124. * @default 10
  125. *
  126. * @param Need Escape At
  127. * @desc 逃走に必要なATゲージの割合(0~100)
  128. * @default 100
  129. *
  130. * @param Escape AT Cost
  131. * @desc 逃走失敗時に消費されるATゲージの割合(0~100)
  132. * @default 75
  133. *
  134. * @param Escape Anime?
  135. * @desc 逃走状態で逃走モーションを行うかどうか (true/false)
  136. * @default false
  137. *
  138. * @param Input Step Forward?
  139. * @desc コマンド入力中に前進するかどうか (true/false)
  140. * @default false
  141. *
  142. * @param ATB Fast Eneble?
  143. * @desc 加速ボタンの有効/無効 (true/false)
  144. * @default true
  145. *
  146. * @param ATB Fast Rate
  147. * @desc 加速ボタンを押したときの加速度
  148. * @default 3
  149. *
  150. * @param Fast Log Eneble?
  151. * @desc 戦闘ログ早送りの有効/無効 (true/false)
  152. * 戦闘ログ早送りはツクールデフォルトの機能です
  153. * @default true
  154. *
  155. * @param === HelpWindow ===
  156. *
  157. * @param Help Window Pos
  158. * @desc ヘルプウィンドウの位置(-1:非表示, 0:上, 1:ステータスの上)
  159. * @default 1
  160. *
  161. * @param Help Window Row
  162. * @desc ヘルプウィンドウの行数
  163. * @default 1
  164. *
  165. * @param === StatusWindow ===
  166. *
  167. * @param Status Window Pos
  168. * @desc ステータスウィンドウの位置(0:左寄せ, 1:中央, 2:右寄せ)
  169. * @default 2
  170. *
  171. * @param === AT Gauge ===
  172. *
  173. * @param AT Gauge Name
  174. * @desc ATゲージ名
  175. *
  176. * @param AT Gauge Width
  177. * @desc ATゲージの幅
  178. * @default 60
  179. *
  180. * @param AT Gauge Height
  181. * @desc ATゲージの高さ
  182. * @default 12
  183. *
  184. * @param AT Charge Color1
  185. * @desc ATゲージ増加中の色1(RGBで指定)
  186. * @default 192,192,192
  187. *
  188. * @param AT Charge Color2
  189. * @desc ATゲージ増加中の色2(RGBで指定)
  190. * @default 255,255,255
  191. *
  192. * @param AT Max Color1
  193. * @desc ATゲージMaxの色1(RGBで指定)
  194. * @default 192,192,192
  195. *
  196. * @param AT Max Color2
  197. * @desc ATゲージMaxの色2(RGBで指定)
  198. * @default 255,255,192
  199. *
  200. * @param Chanting View?
  201. * @desc 詠唱ゲージを表示するかどうか
  202. * @default true
  203. *
  204. * @param AT Chanting Color1
  205. * @desc 詠唱ゲージの色1(RGBで指定)
  206. * @default 128,32,0
  207. *
  208. * @param AT Chanting Color2
  209. * @desc 詠唱ゲージの色2(RGBで指定)
  210. * @default 255,64,0
  211. *
  212. */

  213. function Window_AtbSkillStatus() {
  214.     this.initialize.apply(this, arguments);
  215. }

  216. (function() {

  217. var parameters = PluginManager.parameters('MPP_ActiveTimeBattle');
  218. var MPPlugin = {
  219.     BtStWiA_Plugin:$plugins.some(function(plugin) {
  220.         return (plugin.name === 'MPP_BtStWindowEX_TypeA' && plugin.status);
  221.     }),

  222.     //=== Option ===
  223.     atbMode:Number(parameters['ATB Mode Default'] || 0).clamp(0, 2),
  224.     atbModeName:(parameters['ATB Mode Name']),
  225.     atbModeStatus:(parameters['ATB Mode Status'] || 'アクティブ,ウェイト').split(","),
  226.     atbSpeed:Number(parameters['ATB Speed Default'] || 2).clamp(0, 4),
  227.     atbSpeedName:(parameters['ATB Speed Name']),
  228.     atbSpeedStatus:(parameters['ATB Speed Status'] || '1,2,3,4,5').split(","),

  229.     //=== Battle ===
  230.     atbSpeedBase:Number(parameters['ATB Speed Base'] || 6),
  231.     atIncrement:Number(parameters['AT Increment'] || 10),
  232.     needEscapeAt:Number(parameters['Need Escape At'] || 100).clamp(0, 100),
  233.     escapeAtCost:Number(parameters['Escape At Cost'] || 75).clamp(0, 100),
  234.     escapeAnime:parameters['Escape Anime?'] === 'true',
  235.     inputStepForward:parameters['Input Step Forward?'] === 'true',
  236.     atbFastEneble:parameters['ATB Fast Eneble?'] === 'true',
  237.     atbFastRate:Number(parameters['ATB Fast Rate'] || 3).clamp(0, 10),
  238.     fastLogEneble:parameters['Fast Log Eneble?'] === 'true',

  239.     //=== HelpWindow ===
  240.     helpWindowPos:Number(parameters['Help Window Pos'] || 1).clamp(-1, 1),
  241.     helpWindowRow:Number(parameters['Help Window Row'] || 1).clamp(0, 2),

  242.     //=== StatusWindow ===
  243.     stWindowPos:Number(parameters['Status Window Pos'] || 1).clamp(0, 2),

  244.     //=== AT Gauge ===
  245.     atGaugeName:parameters['AT Gauge Name'] || '',
  246.     atGaugeWidth:Number(parameters['AT Gauge Width'] || 84),
  247.     atGaugeHeight:Number(parameters['AT Gauge Height'] || 12),
  248.     atChargeColor1:'rgb(%1)'.format(parameters['AT Charge Color1'] || '192,192,192'),
  249.     atChargeColor2:'rgb(%1)'.format(parameters['AT Charge Color2'] || '255,255,255'),
  250.     atMaxColor1:'rgb(%1)'.format(parameters['AT Max Color1'] || '192,192,192'),
  251.     atMaxColor2:'rgb(%1)'.format(parameters['AT Max Color2'] || '255,255,192'),
  252.     chantingView:parameters['Chanting View?'] === 'true',
  253.     atChantingColor1:'rgb(%1)'.format(parameters['Chanting Gauge Color1'] || '128,32,0'),
  254.     atChantingColor2:'rgb(%1)'.format(parameters['Chanting Gauge Color2'] || '255,64,0')

  255. };

  256. var Alias = {};

  257. //=============================================================================
  258. // Option
  259. //=============================================================================

  260. //-----------------------------------------------------------------------------
  261. // ConfigManager

  262. ConfigManager.atbMode = MPPlugin.atbMode;
  263. ConfigManager.atbSpeed = MPPlugin.atbSpeed;

  264. //521
  265. Alias.CoMa_mp01_makeData = ConfigManager.makeData;
  266. ConfigManager.makeData = function() {
  267.     var config = Alias.CoMa_mp01_makeData.call(this);
  268.     config.atbMode = this.atbMode;
  269.     config.atbSpeed = this.atbSpeed;
  270.     return config;
  271. };

  272. //532
  273. Alias.CoMa_applyData = ConfigManager.applyData;
  274. ConfigManager.applyData = function(config) {
  275.     Alias.CoMa_applyData.call(this, config);
  276.     this.atbMode = this.readAtbValue(config, 'atbMode', 0);
  277.     this.atbSpeed = this.readAtbValue(config, 'atbSpeed', 2);
  278. };

  279. ConfigManager.readAtbValue = function(config, name, def) {
  280.     return (config[name] || def);
  281. };

  282. //-----------------------------------------------------------------------------
  283. // Window_Options

  284. //36
  285. Alias.WiOp_addGeneralOptions = Window_Options.prototype.addGeneralOptions;
  286. Window_Options.prototype.addGeneralOptions = function() {
  287.     Alias.WiOp_addGeneralOptions.call(this);
  288.     if (MPPlugin.atbModeName) {
  289.         this.addCommand(MPPlugin.atbModeName, 'atbMode');
  290.     }
  291.     if (MPPlugin.atbSpeedName) {
  292.         this.addCommand(MPPlugin.atbSpeedName, 'atbSpeed');
  293.     }
  294. };

  295. //62
  296. Alias.WiOp_statusText = Window_Options.prototype.statusText;
  297. Window_Options.prototype.statusText = function(index) {
  298.     var symbol = this.commandSymbol(index);
  299.     var value = this.getConfigValue(symbol);
  300.     switch (symbol) {
  301.         case 'atbMode':
  302.             return MPPlugin.atbModeStatus[value];
  303.         case 'atbSpeed':
  304.             return MPPlugin.atbSpeedStatus[value];
  305.         default:
  306.             return Alias.WiOp_statusText.call(this, index);
  307.     }
  308. };

  309. //84
  310. Alias.WiOp_processOk = Window_Options.prototype.processOk;
  311. Window_Options.prototype.processOk = function() {
  312.     var index = this.index();
  313.     var symbol = this.commandSymbol(index);
  314.     var value = this.getConfigValue(symbol);
  315.     switch (symbol) {
  316.     case 'atbMode':
  317.         value++;
  318.         if (value >= MPPlugin.atbModeStatus.length) {
  319.             value = 0;
  320.         }
  321.         value = value.clamp(0, MPPlugin.atbModeStatus.length - 1);
  322.         this.changeValue(symbol, value);
  323.         break;
  324.     case 'atbSpeed':
  325.         value++;
  326.         if (value >= MPPlugin.atbSpeedStatus.length) {
  327.             value = 0;
  328.         }
  329.         value = value.clamp(0, MPPlugin.atbSpeedStatus.length - 1);
  330.         this.changeValue(symbol, value);
  331.         break;
  332.     default:
  333.         Alias.WiOp_processOk.call(this);
  334.         break;
  335.     }
  336. };

  337. //100
  338. Alias.WiOp_cursorRight = Window_Options.prototype.cursorRight;
  339. Window_Options.prototype.cursorRight = function(wrap) {
  340.     var index = this.index();
  341.     var symbol = this.commandSymbol(index);
  342.     var value = this.getConfigValue(symbol);
  343.     switch (symbol) {
  344.     case 'atbMode':
  345.         value++;
  346.         value = value.clamp(0, MPPlugin.atbModeStatus.length - 1);
  347.         this.changeValue(symbol, value);
  348.         break;
  349.     case 'atbSpeed':
  350.         value++;
  351.         value = value.clamp(0, MPPlugin.atbSpeedStatus.length - 1);
  352.         this.changeValue(symbol, value);
  353.         break;
  354.     default:
  355.         Alias.WiOp_cursorRight.call(this, wrap);
  356.         break;
  357.     }
  358. };

  359. //113
  360. Alias.WiOp_cursorLeft = Window_Options.prototype.cursorLeft;
  361. Window_Options.prototype.cursorLeft = function(wrap) {
  362.     var index = this.index();
  363.     var symbol = this.commandSymbol(index);
  364.     var value = this.getConfigValue(symbol);
  365.     switch (symbol) {
  366.     case 'atbMode':
  367.         value--;
  368.         value = value.clamp(0, MPPlugin.atbModeStatus.length - 1);
  369.         this.changeValue(symbol, value);
  370.         break;
  371.     case 'atbSpeed':
  372.         value--;
  373.         value = value.clamp(0, MPPlugin.atbSpeedStatus.length - 1);
  374.         this.changeValue(symbol, value);
  375.         break;
  376.     default:
  377.         Alias.WiOp_cursorLeft.call(this, wrap);
  378.         break;
  379.     }
  380. };

  381. //=============================================================================
  382. // Battle
  383. //=============================================================================

  384. //-----------------------------------------------------------------------------
  385. // BattleManager

  386. //10
  387. Alias.BaMa_setup = BattleManager.setup;
  388. BattleManager.setup = function(troopId, canEscape, canLose) {
  389.     Alias.BaMa_setup.call(this, troopId, canEscape, canLose);
  390.     var rate = (7 - ConfigManager.atbSpeed) * MPPlugin.atbSpeedBase * 16;
  391.     this._maxAt = Math.max(Math.round($gameParty.agility() * rate), 10);
  392.     this._refreshHandler = null;
  393.     this._waitHandler = null;
  394.     this._escaping = false;
  395. };

  396. BattleManager.setRefreshHandler = function(method) {
  397.     this._refreshHandler = method;
  398. };

  399. BattleManager.setWaitHandler = function(method) {
  400.     this._waitHandler = method;
  401. };

  402. BattleManager.maxAt = function() {
  403.     return this._maxAt;
  404. };

  405. BattleManager.setEscaping = function(escaping) {
  406.     this._escaping = escaping;
  407.     $gameParty.requestMotionRefresh();
  408. };

  409. BattleManager.isEscaping = function() {
  410.     return this._escaping;
  411. };

  412. BattleManager.needEscapeAt = function() {
  413.     return MPPlugin.needEscapeAt / 100;
  414. };

  415. BattleManager.escapeAtCost = function() {
  416.     return MPPlugin.escapeAtCost / 100;
  417. };

  418. //113
  419. Alias.BaMa_update = BattleManager.update;
  420. BattleManager.update = function() {
  421.     this.updateATB();
  422.     this.updateCmdActor();
  423.     Alias.BaMa_update.call(this);
  424. };

  425. BattleManager.updateATB = function() {
  426.     if (Graphics.frameCount % 2 === 0 && !this.isAtbWait()) {
  427.         var rate = this.isFastForward() ? MPPlugin.atbFastRate : 1;
  428.         this.allBattleMembers().forEach(function(battler) {
  429.             battler.updateATB(rate);
  430.             if (battler.isMadeAction()) {
  431.                 this.addActionBattler(battler);
  432.             }
  433.         }, this);
  434.     }
  435. };

  436. BattleManager.updateCmdActor = function() {
  437.     if (this.isEvantWait() || this.isBattleEnd()) {
  438.         return this.clearActor();
  439.     }
  440.     if (!this.isAtbWait() && !this.actor()) {
  441.         var members = $gameParty.battleMembers();
  442.         for (var i = 0; i < members.length; i++) {
  443.             if (members[i].isStandby()) {
  444.                 return this.changeActor(i);
  445.             }
  446.         }
  447.     } else if (this.actor() && !this.actor().isStandby()) {
  448.         this.clearActor();
  449.     }
  450. };

  451. BattleManager.addActionBattler = function(battler) {
  452.     this._actionBattlers.push(battler);
  453.     battler.setDecided(2);
  454. };

  455. BattleManager.deleteDeactiveBattler = function() {
  456.     this._actionBattlers = this._actionBattlers.filter(function(battler) {
  457.         if (battler.atRate() === 1) {
  458.             return true;
  459.         } else {
  460.             battler.setDecided(0);
  461.             return false;
  462.         }
  463.     });
  464.     if (this.actor() && !this.actor().isStandby()) {
  465.         this.clearActor();
  466.     }
  467. };

  468. BattleManager.isFastForward = function() {
  469.     if (!MPPlugin.atbFastEneble || this.isEvantWait()) {
  470.         return false;
  471.     } else if (Input.isPressed('shift')) {
  472.         return true;
  473.     } else {
  474.         return TouchInput.y < this._statusWindow.y && TouchInput.isPressed();
  475.     }
  476. };

  477. BattleManager.isEvantWait = function() {
  478.     return $gameTroop.isEventRunning();
  479. };

  480. BattleManager.isAtbWait = function() {
  481.     return (this.isEvantWait() || this._waitHandler());
  482. };

  483. //1989
  484. Alias.BaMa_startBattle = BattleManager.startBattle;
  485. BattleManager.startBattle = function() {
  486.     Alias.BaMa_startBattle.call(this);
  487.     this.setupAllBattlerAt();
  488.     this.startTurn();
  489. };

  490. BattleManager.setupAllBattlerAt = function() {
  491.     if (this._preemptive) {
  492.         $gameParty.members().forEach(function(member) {
  493.             member.setAt(1);
  494.         });
  495.     } else if (this._surprise) {
  496.         $gameTroop.members().forEach(function(member) {
  497.             member.setAt(1);
  498.         });
  499.     } else {
  500.         $gameParty.members().forEach(function(member) {
  501.             member.setAt(0.8 * Math.random());
  502.         });
  503.         $gameTroop.members().forEach(function(member) {
  504.             member.setAt(0.8 * Math.random());
  505.         });
  506.     }
  507.     this.refreshStatus();
  508. };

  509. //253
  510. BattleManager.selectNextCommand = function() {
  511.     var members = $gameParty.battleMembers();
  512.     if (this.actor() && this.actor().isStandby()) {
  513.         var actionState = 'undecided';
  514.     } else {
  515.         var actionState = 'waiting';
  516.     }
  517.     for (var i = 1; i < members.length; i++) {
  518.         var n = (this._actorIndex + i).mod(members.length);
  519.         if (members[n].isStandby() && members[n].canInput()) {
  520.             return this.changeActor(n, actionState);
  521.         }
  522.     }
  523.     return this.changeActor(-1, actionState);
  524. };

  525. //265
  526. BattleManager.selectPreviousCommand = function() {
  527.     var members = $gameParty.battleMembers();
  528.     if (this.actor() && this.actor().isStandby()) {
  529.         var actionState = 'undecided';
  530.     } else {
  531.         var actionState = 'waiting';
  532.     }
  533.     for (var i = 1; i < members.length; i++) {
  534.         var n = (this._actorIndex - i).mod(members.length);
  535.         if (members[n].isStandby() && members[n].canInput()) {
  536.             return this.changeActor(n, actionState);
  537.         }
  538.     }
  539.     return this.changeActor(-1, actionState);
  540. };

  541. //276
  542. BattleManager.refreshStatus = function() {
  543.     this._refreshHandler();
  544. };

  545. //280
  546. BattleManager.startTurn = function() {
  547.     this._phase = 'turn';
  548.     //this.clearActor();
  549.     //$gameTroop.increaseTurn();
  550.     //this.makeActionOrders();
  551.     $gameParty.requestMotionRefresh();
  552.     this._logWindow.startTurn();
  553. };

  554. //289
  555. BattleManager.updateTurn = function() {
  556.     $gameParty.requestMotionRefresh();
  557.     if (!this._subject) {
  558.         this._subject = this.getNextSubject();
  559.         if (this._subject) {
  560.             this._subject.onTurnEnd();
  561.             this.refreshStatus();
  562.             this._logWindow.displayAutoAffectedStatus(this._subject);
  563.             this._logWindow.displayRegeneration(this._subject);
  564.             return;
  565.         }
  566.     }
  567.     if (this._subject) {
  568.         this.processTurn();
  569.     } else {
  570.         this.endTurn();
  571.     }
  572. };

  573. //301
  574. BattleManager.processTurn = function() {
  575.     var subject = this._subject;
  576.     var action = subject.currentAction();
  577.     if (action) {
  578.         action.prepare();
  579.         if (action.isValid()) {
  580.             this.startAction();
  581.         }
  582.         subject.removeCurrentAction();
  583.     } else {
  584.         $gameTroop.increaseTurn();
  585.         subject.onAllActionsEnd();
  586.         subject.setAt(0);
  587.         this.refreshStatus();
  588.         this._logWindow.displayAutoAffectedStatus(subject);
  589.         this._logWindow.displayCurrentState(subject);
  590.         this._logWindow.displayRegeneration(subject);
  591.         this.endTurn();
  592.     }
  593. };

  594. //320
  595. BattleManager.endTurn = function() {
  596.     this._phase = 'turnEnd';
  597.     this._subject = null;
  598. };

  599. //332
  600. BattleManager.updateTurnEnd = function() {
  601.     if (!this._escaping || !$gameParty.canEscape() || !this.processEscape()) {
  602.         this.startTurn();
  603.     }
  604. };

  605. //336
  606. Alias.BaMa_getNextSubject = BattleManager.getNextSubject;
  607. BattleManager.getNextSubject = function() {
  608.     if (this.isAtbWait()) {
  609.         return null;
  610.     }
  611.     return Alias.BaMa_getNextSubject.call(this);
  612. };

  613. //505
  614. BattleManager.processEscape = function() {
  615.     //$gameParty.removeBattleStates();
  616.     $gameParty.performEscape();
  617.     SoundManager.playEscape();
  618.     var success = this._preemptive ? true : (Math.random() < this._escapeRatio);
  619.     if (success) {
  620.         this.displayEscapeSuccessMessage();
  621.         this._escaped = true;
  622.         this.processAbort();
  623.     } else {
  624.         this.displayEscapeFailureMessage();
  625.         this._escapeRatio += 0.1;
  626.         //$gameParty.clearActions();
  627.         //this.startTurn();
  628.         $gameParty.escapeFailure();
  629.     }
  630.     return success;
  631. };

  632. //523
  633. Alias.BaMa_processAbort = BattleManager.processAbort;
  634. BattleManager.processAbort = function() {
  635.     this.clearActor();
  636.     Alias.BaMa_processAbort.call(this);
  637. };

  638. //-----------------------------------------------------------------------------
  639. // Game_BattlerBase

  640. //2849
  641. Alias.GaBa_initMembers = Game_BattlerBase.prototype.initMembers;
  642. Game_BattlerBase.prototype.initMembers = function() {
  643.     Alias.GaBa_initMembers.call(this);
  644.     this._at = 0;
  645.     this._ct = 0;
  646.     this._maxCt = 0;
  647.     this._turnCount = 0;
  648.     this._decided = 0;
  649. };

  650. //2307
  651. Alias.GaBa_die = Game_BattlerBase.prototype.die;
  652. Game_BattlerBase.prototype.die = function() {
  653.     Alias.GaBa_die.call(this);
  654.     this._at = 0;
  655.     this._ct = 0;
  656.     this._maxCt = 0;
  657.     this._decided = 0;
  658. };

  659. Game_BattlerBase.prototype.onMadeAction = function() {
  660.     this.setDecided(1);
  661.     var action = this.currentAction();
  662.     if (action) {
  663.         var item = action.item();
  664.         if (item) {
  665.             this._maxCt = Math.max(item.speed * (ConfigManager.atbSpeed - 7) * 3, 0);
  666.         }
  667.     }
  668. };

  669. Game_BattlerBase.prototype.setDecided = function(decided) {
  670.     this._decided = decided;
  671. };

  672. Game_BattlerBase.prototype.setAt = function(rate) {
  673.     this._at = Math.floor(BattleManager.maxAt() * rate);
  674.     this._at = this._at.clamp(0, BattleManager.maxAt() - 1);
  675. };

  676. Game_BattlerBase.prototype.atRate = function() {
  677.     return BattleManager.maxAt() > 0 ? this._at / BattleManager.maxAt() : 0;
  678. };

  679. Game_BattlerBase.prototype.castRate = function() {
  680.     if (this._maxCt > 0) {
  681.         return this._ct / this._maxCt;
  682.     } else {
  683.         return -1;
  684.     }
  685. };

  686. Game_BattlerBase.prototype.isStandby = function() {
  687.     return this._decided === 0 && this.atRate() === 1;
  688. };

  689. Game_BattlerBase.prototype.decided = function() {
  690.     return this._decided;
  691. };

  692. Game_BattlerBase.prototype.isMadeAction = function() {
  693.     return this._decided === 1 && this._ct === this._maxCt;
  694. };

  695. //-----------------------------------------------------------------------------
  696. // Game_Battler

  697. //2975
  698. Alias.GaBa_clearActions = Game_Battler.prototype.clearActions;
  699. Game_Battler.prototype.clearActions = function() {
  700.     Alias.GaBa_clearActions.call(this);
  701.     this._ct = 0;
  702.     this._maxCt = 0;
  703. };

  704. //3250
  705. Alias.GaBa_onBattleStart = Game_Battler.prototype.onBattleStart;
  706. Game_Battler.prototype.onBattleStart = function() {
  707.     Alias.GaBa_onBattleStart.call(this);
  708.     this._ct = 0;
  709.     this._maxCt = 0;
  710.     this._turnCount = 0;
  711.     this._decided = 0;
  712. };

  713. //3258
  714. Alias.GaBa_onAllActionsEnd = Game_Battler.prototype.onAllActionsEnd;
  715. Game_Battler.prototype.onAllActionsEnd = function() {
  716.     Alias.GaBa_onAllActionsEnd.call(this);
  717.     this._turnCount++;
  718.     this._ct = 0;
  719.     this._maxCt = 0;
  720.     this.setDecided(0);
  721.     this.setActionState('undecided');
  722. };

  723. Game_Battler.prototype.canEscape = function() {
  724.     return this.atRate() >= BattleManager.needEscapeAt();
  725. };

  726. Game_Battler.prototype.escapeFailure = function() {
  727.     if (this.atRate() === 1 && BattleManager.escapeAtCost() > 0) {
  728.         this.clearActions();
  729.     }
  730.     this.setAt(this.atRate() - BattleManager.escapeAtCost());
  731. };

  732. Game_Battler.prototype.updateATB = function(rate) {
  733.     if (!this.isAlive()) {
  734.         return;
  735.     }
  736.     if (this._at < BattleManager.maxAt()) {
  737.         this._at += (this.agi + MPPlugin.atIncrement) * rate;
  738.         if(this._at >= BattleManager.maxAt()) {
  739.             this._at = BattleManager.maxAt();
  740.             this.makeActions();
  741.         }
  742.     } else if (this._ct < this._maxCt) {
  743.         this._ct = Math.min(this._ct + rate, this._maxCt);
  744.     }
  745. };

  746. Game_Battler.prototype.atGaugeRate = function() {
  747.     if (MPPlugin.chantingView && this.castRate() >= 0) {
  748.         return this.castRate();
  749.     } else {
  750.         return this.atRate();
  751.     }
  752. };

  753. Game_Battler.prototype.atGaugeColor1 = function() {
  754.     if (MPPlugin.chantingView && this.castRate() >= 0) {
  755.         return MPPlugin.atChantingColor1;
  756.     } else if (this.atRate() < 1) {
  757.         return MPPlugin.atChargeColor1;
  758.     } else {
  759.         return MPPlugin.atMaxColor1;
  760.     }
  761. };

  762. Game_Battler.prototype.atGaugeColor2 = function() {
  763.     if (MPPlugin.chantingView && this.castRate() >= 0) {
  764.         return MPPlugin.atChantingColor2;
  765.     } else if (this.atRate() < 1) {
  766.         return MPPlugin.atChargeColor2;
  767.     } else {
  768.         return MPPlugin.atMaxColor2;
  769.     }
  770. };

  771. //-----------------------------------------------------------------------------
  772. // Game_Actor

  773. Game_Actor.prototype.onRestrict = function() {
  774.     Game_Battler.prototype.onRestrict.call(this);
  775.     if ($gameParty.inBattle() && !this._active && this.isAlive() &&
  776.             this._at === BattleManager.maxAt()) {
  777.         this.makeActions();
  778.     }
  779. };

  780. //710
  781. Alias.GaAc_makeAutoBattleActions = Game_Actor.prototype.makeAutoBattleActions;
  782. Game_Actor.prototype.makeAutoBattleActions = function() {
  783.     Alias.GaAc_makeAutoBattleActions.call(this);
  784.     this.onMadeAction();
  785. };

  786. //725
  787. Alias.GaAc_makeConfusionActions = Game_Actor.prototype.makeConfusionActions;
  788. Game_Actor.prototype.makeConfusionActions = function() {
  789.     Alias.GaAc_makeConfusionActions.call(this);
  790.     this.onMadeAction();
  791. };

  792. //732
  793. Alias.GaAc_makeActions = Game_Actor.prototype.makeActions;
  794. Game_Actor.prototype.makeActions = function() {
  795.     Alias.GaAc_makeActions.call(this);
  796.     if (!this.canInput()) {
  797.         this.onMadeAction();
  798.     }
  799. };

  800. //-----------------------------------------------------------------------------
  801. // Game_Enemy

  802. //4463
  803. Game_Enemy.prototype.meetsTurnCondition = function(param1, param2) {
  804.     var n = this._turnCount;
  805.     if (param2 === 0) {
  806.         return n === param1;
  807.     } else {
  808.         return n >= param1 && n % param2 === param1 % param2;
  809.     }
  810. };

  811. //4527
  812. Alias.GaEn_makeActions = Game_Enemy.prototype.makeActions;
  813. Game_Enemy.prototype.makeActions = function() {
  814.     Alias.GaEn_makeActions.call(this);
  815.     this.onMadeAction();
  816. };

  817. //-----------------------------------------------------------------------------
  818. // Game_Unit

  819. Game_Unit.prototype.selectAll = function() {
  820.     this.members().forEach(function(member) {
  821.         member.select();
  822.     });
  823. };

  824. Game_Unit.prototype.select = function(activeMember) {
  825.     this.members().forEach(function(member) {
  826.         if (member === activeMember) {
  827.             member.select();
  828.         } else {
  829.             member.deselect();
  830.         }
  831.     });
  832. };


  833. //-----------------------------------------------------------------------------
  834. // Game_Party

  835. Game_Party.prototype.canEscape = function() {
  836.     return this.aliveMembers().every(function(member) {
  837.         return member.canEscape();
  838.     });
  839. };

  840. Game_Party.prototype.escapeFailure = function() {
  841.     this.aliveMembers().forEach(function(member) {
  842.         member.escapeFailure();
  843.     });
  844.     BattleManager.deleteDeactiveBattler();
  845. };

  846. //-----------------------------------------------------------------------------
  847. // Window_BattleLog

  848. //4840
  849. Alias.WiBaLo_isFastForward = Window_BattleLog.prototype.isFastForward;
  850. Window_BattleLog.prototype.isFastForward = function() {
  851.     return (MPPlugin.fastLogEneble && Alias.WiBaLo_isFastForward.call(this));
  852. };

  853. //-----------------------------------------------------------------------------
  854. // Window_BattleStatus

  855. Window_BattleStatus.prototype.setActorCmdWindow = function(actorCmdWindow) {
  856.     this._actorCmdWindow = actorCmdWindow;
  857. };

  858. Window_BattleStatus.prototype.processTouch = function() {
  859.     if (this.isOpen() && this.isActorCmdEnabled()) {
  860.         if (TouchInput.isTriggered() && this.isTouchedInsideFrame()) {
  861.             this._touching = true;
  862.         }
  863.         if (this._touching) {
  864.             if (TouchInput.isPressed()) {
  865.                 this.onTouch(false);
  866.             } else {
  867.                 if (this.isTouchedInsideFrame()) {
  868.                     this.onTouch(true);
  869.                 }
  870.                 this._touching = false;
  871.             }
  872.         }
  873.     }
  874. };

  875. Window_BattleStatus.prototype.onTouch = function(triggered) {
  876.     var lastTopRow = this.topRow();
  877.     var x = this.canvasToLocalX(TouchInput.x);
  878.     var y = this.canvasToLocalY(TouchInput.y);
  879.     var hitIndex = this.hitTest(x, y);
  880.     if (hitIndex >= 0) {
  881.         if (triggered && this.isTouchOkEnabled()) {
  882.             var actor = $gameParty.battleMembers()[hitIndex];
  883.             if (actor && actor.isStandby()) {
  884.                 this.select(hitIndex);
  885.                 this.processOk();
  886.             }
  887.         }
  888.     } else if (this._stayCount >= 10) {
  889.         if (y < this.padding) {
  890.             this.scrollUp();
  891.         } else if (y >= this.height - this.padding) {
  892.             this.scrollDown();
  893.         }
  894.     }
  895.     if (this.topRow() !== lastTopRow) {
  896.         SoundManager.playCursor();
  897.     }
  898. };

  899. Window_BattleStatus.prototype.isActorCmdEnabled = function() {
  900.     return this._actorCmdWindow &&
  901.             (this._actorCmdWindow.active || !this._actorCmdWindow.isOpen());
  902. };

  903. Window_BattleStatus.prototype.processOk = function() {
  904.     this.updateInputData();
  905.     this.deactivate();
  906.     this.callOkHandler();
  907. };

  908. Window_BattleStatus.prototype.isCursorMovable = function() {
  909.     return false;
  910. };

  911. if (!MPPlugin.BtStWiA_Plugin) {

  912. Window_BattleStatus.prototype.update = function() {
  913.     Window_Selectable.prototype.update.call(this);
  914.     this.updateAtGauge();
  915. };

  916. Window_BattleStatus.prototype.updateAtGauge = function() {
  917.     if (this.isOpen() && this.isDrawAt() && Graphics.frameCount % 2 === 0) {
  918.         var topIndex = this.topIndex();
  919.         var width = MPPlugin.atGaugeWidth;
  920.         var height = this.lineHeight();
  921.         for (var i = 0; i < this.maxPageItems(); i++) {
  922.             var index = topIndex + i;
  923.             if (index < this.maxItems()) {
  924.                 var rect = this.gaugeAreaRect(index);
  925.                 var actor = $gameParty.battleMembers()[index];
  926.                 this.contents.clearRect(rect.x + 234, rect.y, width, height);
  927.                 this.drawActorAt(actor, rect.x + 234, rect.y, width);
  928.             }
  929.         }
  930.     }
  931. };

  932. } //if (!MPPlugin.BtStWiA_Plugin)

  933. Window_BattleStatus.prototype.isDrawAt = function() {
  934.     return MPPlugin.atGaugeWidth > 0;
  935. };

  936. //5500
  937. Alias.WiBaSt_gaugeAreaWidth = Window_BattleStatus.prototype.gaugeAreaWidth;
  938. Window_BattleStatus.prototype.gaugeAreaWidth = function() {
  939.     if (this.isDrawAt()) {
  940.         return 234 + MPPlugin.atGaugeWidth;
  941.     } else {
  942.         return Alias.WiBaSt_gaugeAreaWidth.call(this);
  943.     }
  944. };

  945. //5517
  946. Alias.WiBaSt_drawGaugeAreaWithTp = Window_BattleStatus.prototype.drawGaugeAreaWithTp;
  947. Window_BattleStatus.prototype.drawGaugeAreaWithTp = function(rect, actor) {
  948.     if (this.isDrawAt()) {
  949.         this.drawActorHp(actor, rect.x + 0, rect.y, 108);
  950.         this.drawActorMpTp(actor, rect.x + 123, rect.y, 96);
  951.         this.drawActorAt(actor, rect.x + 234, rect.y, MPPlugin.atGaugeWidth);
  952.     } else {
  953.         Alias.WiBaSt_drawGaugeAreaWithTp.call(this, rect, actor);
  954.     }
  955. };

  956. //5523
  957. Alias.WiBaSt_drawGaugeAreaWithoutTp = Window_BattleStatus.prototype.drawGaugeAreaWithoutTp;
  958. Window_BattleStatus.prototype.drawGaugeAreaWithoutTp = function(rect, actor) {
  959.     if (this.isDrawAt()) {
  960.         this.drawActorHp(actor, rect.x + 0, rect.y, 108);
  961.         this.drawActorMp(actor, rect.x + 123, rect.y, 96);
  962.         this.drawActorAt(actor, rect.x + 234, rect.y, MPPlugin.atGaugeWidth);
  963.     } else {
  964.         Alias.WiBaSt_drawGaugeAreaWithoutTp.call(this, rect, actor);
  965.     }
  966. };

  967. Window_BattleStatus.prototype.drawActorMpTp = function(actor, x, y, width) {
  968.     width = (width || 186) - 10;
  969.     this.drawGauge(x + 10, y, width, actor.tpRate(),
  970.                    this.tpGaugeColor1(), this.tpGaugeColor2());
  971.     this.drawGauge(x, y - 8, width, actor.mpRate(),
  972.                    this.mpGaugeColor1(), this.mpGaugeColor2());
  973.     this.contents.fontSize = 24;
  974.     this.changeTextColor(this.systemColor());
  975.     this.contents.drawText(TextManager.mpA, x, y + 1, 32, 24);
  976.     this.contents.drawText(TextManager.tpA, x + 22, y + 10, 32, 24);
  977.     this.contents.fontSize = this.standardFontSize();
  978. };

  979. Window_BattleStatus.prototype.drawActorAt = function(actor, x, y, width) {
  980.     width = width || 60;
  981.     var color1 = actor.atGaugeColor1();
  982.     var color2 = actor.atGaugeColor2();
  983.     this.drawAtGauge(x, y, width, actor.atGaugeRate(), color1, color2);
  984.     this.changeTextColor(this.systemColor());
  985.     this.drawText(MPPlugin.atGaugeName, x, y, 44);
  986. };

  987. Window_BattleStatus.prototype.drawAtGauge = function(x, y, width, rate, color1, color2) {
  988.     var height = MPPlugin.atGaugeHeight;
  989.     var fillW = Math.floor(width * rate);
  990.     var gaugeY = y + this.lineHeight() - height - 2;
  991.     this.contents.fillRect(x, gaugeY, width, height, this.gaugeBackColor());
  992.     this.contents.gradientFillRect(x, gaugeY, fillW, height, color1, color2);
  993.     this.contents.paintOpacity = 255 * (width * rate % 1);
  994.     this.contents.fillRect(x + fillW, gaugeY, 1, height, color2);
  995.     this.contents.paintOpacity = 255;
  996. };

  997. //-----------------------------------------------------------------------------
  998. // Window_BattleActor

  999. Window_BattleActor.prototype.processTouch = function() {
  1000.     Window_Selectable.prototype.processTouch.call(this);
  1001. };

  1002. Window_BattleActor.prototype.onTouch = function(triggered) {
  1003.     Window_Selectable.prototype.onTouch.call(this, triggered);
  1004. };

  1005. Window_BattleActor.prototype.processOk = function() {
  1006.     Window_Selectable.prototype.processOk.call(this);
  1007. };

  1008. Window_BattleActor.prototype.isCursorMovable = function() {
  1009.     return Window_Selectable.prototype.isCursorMovable.call(this);
  1010. };

  1011. Window_BattleActor.prototype.isDrawAt = function() {
  1012.     return false;
  1013. };

  1014. Window_BattleActor.prototype.selectForItem = function() {
  1015.     var actor = BattleManager.actor();
  1016.     var action = actor.inputtingAction();
  1017.     this.setCursorFixed(false);
  1018.     this.setCursorAll(false);
  1019.     if (action.isForUser()) {
  1020.         this.setCursorFixed(true);
  1021.         this.select(actor.index());
  1022.     } else if (action.isForAll()) {
  1023.         this.setCursorAll(true);
  1024.         this.select(0);
  1025.     } else {
  1026.         this.select(actor.index());
  1027.     }
  1028. };

  1029. //5558
  1030. Alias.WiBaAc_select = Window_BattleActor.prototype.select;
  1031. Window_BattleActor.prototype.select = function(index) {
  1032.     Alias.WiBaAc_select.call(this, index);
  1033.     if (this._cursorAll) {
  1034.         $gameParty.selectAll();
  1035.     }
  1036. };

  1037. //-----------------------------------------------------------------------------
  1038. // Window_BattleEnemy

  1039. Window_BattleEnemy.prototype.isCurrentItemEnabled = function() {
  1040.     return !!this.enemy();
  1041. };

  1042. //58
  1043. Window_BattleEnemy.prototype.show = function() {
  1044.     //this.refresh();
  1045.     //this.select(0);
  1046.     Window_Selectable.prototype.show.call(this);
  1047. };

  1048. Window_BattleEnemy.prototype.selectForItem = function() {
  1049.     var actor = BattleManager.actor();
  1050.     var action = actor.inputtingAction();
  1051.     this.setCursorAll(false);
  1052.     if (action.isForAll()) {
  1053.         this.setCursorAll(true);
  1054.     }
  1055.     this.select(0);
  1056. };

  1057. //69
  1058. Alias.WiBaEn_refresh = Window_BattleEnemy.prototype.refresh;
  1059. Window_BattleEnemy.prototype.refresh = function() {
  1060.     Alias.WiBaEn_refresh.call(this);
  1061.     if (this.index() >= 0) {
  1062.         this.select(this._index.clamp(0, this.maxItems() - 1));
  1063.     }
  1064. };

  1065. //74
  1066. Alias.WiBaEn_select = Window_BattleEnemy.prototype.select;
  1067. Window_BattleEnemy.prototype.select = function(index) {
  1068.     Alias.WiBaEn_select.call(this, index);
  1069.     if (this._cursorAll) {
  1070.         $gameTroop.selectAll();
  1071.     }
  1072. };


  1073. //-----------------------------------------------------------------------------
  1074. // Window_BattleSkill

  1075. Window_BattleSkill.prototype.setStatusWindow = function(statusWindow) {
  1076.     this._statusWindow = statusWindow;
  1077. };

  1078. Window_BattleSkill.prototype.setActor = function(actor) {
  1079.     Window_SkillList.prototype.setActor.call(this, actor);
  1080.     if (this._statusWindow) {
  1081.         this._statusWindow.setActor(actor);
  1082.     }
  1083. };

  1084. //5662
  1085. Alias.WiBaSk_show = Window_BattleSkill.prototype.show;
  1086. Window_BattleSkill.prototype.show = function() {
  1087.     if (this._statusWindow) {
  1088.         this._statusWindow.show();
  1089.     }
  1090.     Alias.WiBaSk_show.call(this);
  1091. };

  1092. //5668
  1093. Alias.WiBaSk_hide = Window_BattleSkill.prototype.hide;
  1094. Window_BattleSkill.prototype.hide = function() {
  1095.     if (this._statusWindow) {
  1096.         this._statusWindow.hide();
  1097.     }
  1098.     Alias.WiBaSk_hide.call(this);
  1099. };

  1100. //-----------------------------------------------------------------------------
  1101. // Window_AtbSkillStatus

  1102. Window_AtbSkillStatus.prototype = Object.create(Window_Base.prototype);
  1103. Window_AtbSkillStatus.prototype.constructor = Window_AtbSkillStatus;

  1104. Window_AtbSkillStatus.prototype.initialize = function(x, y, width, height) {
  1105.     Window_Base.prototype.initialize.call(this, x, y, width, height);
  1106.     this.hide();
  1107. };

  1108. Window_AtbSkillStatus.prototype.setActor = function(actor) {
  1109.     if (this._actor !== actor) {
  1110.         this._actor = actor;
  1111.         this.refresh();
  1112.     }
  1113. };

  1114. Window_AtbSkillStatus.prototype.refresh = function() {
  1115.     this.contents.clear();
  1116.     if (this._actor) {
  1117.         if ($dataSystem.optDisplayTp) {
  1118.             this.drawActorMp(this._actor, 0, 0, this.contentsWidth());
  1119.             this.drawActorTp(this._actor, 0, this.lineHeight(), this.contentsWidth());
  1120.         } else {
  1121.             this.drawActorMp(this._actor, 0, 0, this.contentsWidth());
  1122.         }
  1123.     }
  1124. };

  1125. //-----------------------------------------------------------------------------
  1126. // Sprite_Actor

  1127. //777
  1128. Alias.SpAc_updateTargetPosition = Sprite_Actor.prototype.updateTargetPosition;
  1129. Sprite_Actor.prototype.updateTargetPosition = function() {
  1130.     if (MPPlugin.inputStepForward || !this._actor.isInputting()) {
  1131.         Alias.SpAc_updateTargetPosition.call(this);
  1132.     }
  1133. };

  1134. //844
  1135. Alias.SpAc_refreshMotion = Sprite_Actor.prototype.refreshMotion;
  1136. Sprite_Actor.prototype.refreshMotion = function() {
  1137.     var actor = this._actor;
  1138.     if (MPPlugin.escapeAnime && actor) {
  1139.         var stateMotion = actor.stateMotionIndex();
  1140.         if (actor.isActing()) {
  1141.         } else if (stateMotion === 3) {
  1142.         } else if (stateMotion === 2) {
  1143.         } else if (BattleManager.isEscaping()) {
  1144.             return this.startMotion('escape');
  1145.         }
  1146.     }
  1147.     Alias.SpAc_refreshMotion.call(this);
  1148. };

  1149. //-----------------------------------------------------------------------------
  1150. // Scene_Battle

  1151. //2028
  1152. Alias.ScBa_start = Scene_Battle.prototype.start;
  1153. Scene_Battle.prototype.start = function() {
  1154.     BattleManager.setRefreshHandler(this.refreshStatus.bind(this));
  1155.     BattleManager.setWaitHandler(this.isAtbWait.bind(this));
  1156.     Alias.ScBa_start.call(this);
  1157. };

  1158. Scene_Battle.prototype.isAtbWait = function() {
  1159.     if (!this._partyCommandWindow.isClosed()) {
  1160.         return true;
  1161.     }
  1162.     if (ConfigManager.atbMode > 0) {
  1163.         if (this._skillWindow.visible || this._itemWindow.visible ||
  1164.                 this._actorWindow.visible || this._enemyWindow.visible) {
  1165.             return true;
  1166.         }
  1167.     }
  1168.     if (ConfigManager.atbMode > 1) {
  1169.         if (!this._actorCommandWindow.isClosed() && !BattleManager.isFastForward()) {
  1170.             return true;
  1171.         }
  1172.     }
  1173.     return false;
  1174. };

  1175. //2047
  1176. Scene_Battle.prototype.updateBattleProcess = function() {
  1177.     //if (!this.isAnyInputWindowActive() || BattleManager.isAborting() ||
  1178.     //        BattleManager.isBattleEnd()) {
  1179.         BattleManager.update();
  1180.         this.changeInputWindow();
  1181.     //}
  1182. };

  1183. //2064
  1184. Scene_Battle.prototype.changeInputWindow = function() {
  1185.     if (!this._partyCommandWindow.isClosed() || this._actorCommandWindow.isClosing()) {
  1186.         return;
  1187.     } else if (this._actor !== BattleManager.actor()) {
  1188.         this._actor = BattleManager.actor();
  1189.         if (this._actor) {
  1190.             this._actorCommandWindow.openness = 0;
  1191.             this.startActorCommandSelection();
  1192.         } else {
  1193.             this.endCommandSelection();
  1194.         }
  1195.     } else if (!this._actor) {
  1196.         if (Input.isTriggered('cancel') || TouchInput.isCancelled()) {
  1197.             SoundManager.playCancel();
  1198.             this.startPartyCommandSelection();
  1199.         }
  1200.     }
  1201. };

  1202. //2110
  1203. Scene_Battle.prototype.updateWindowPositions = function() {
  1204.     var statusX = 0;
  1205.     if (!this._partyCommandWindow.isClosed() || !this._actorCommandWindow.isClosed()) {
  1206.         statusX = this._partyCommandWindow.width;
  1207.     } else {
  1208.         statusX = this._partyCommandWindow.width * MPPlugin.stWindowPos / 2;
  1209.     }
  1210.     if (this._statusWindow.x < statusX) {
  1211.         this._statusWindow.x += 16;
  1212.         if (this._statusWindow.x > statusX) {
  1213.             this._statusWindow.x = statusX;
  1214.         }
  1215.     }
  1216.     if (this._statusWindow.x > statusX) {
  1217.         this._statusWindow.x -= 16;
  1218.         if (this._statusWindow.x < statusX) {
  1219.             this._statusWindow.x = statusX;
  1220.         }
  1221.     }
  1222. };

  1223. //2165
  1224. Alias.ScBa_createStatusWindow = Scene_Battle.prototype.createStatusWindow;
  1225. Scene_Battle.prototype.createStatusWindow = function() {
  1226.     Alias.ScBa_createStatusWindow.call(this);
  1227.     this._statusWindow.setHandler('ok',  this.onStatusOk.bind(this));
  1228. };

  1229. //2178
  1230. Alias.ScBa_createActorCommandWindow = Scene_Battle.prototype.createActorCommandWindow;
  1231. Scene_Battle.prototype.createActorCommandWindow = function() {
  1232.     Alias.ScBa_createActorCommandWindow.call(this);
  1233.     this._actorCommandWindow.setHandler('cancel', this.startPartyCommandSelection.bind(this));
  1234.     this._actorCommandWindow.setHandler('pageup', this.selectPreviousCommand.bind(this));
  1235.     this._actorCommandWindow.setHandler('pagedown', this.selectNextCommand.bind(this));
  1236.     this._statusWindow.setActorCmdWindow(this._actorCommandWindow);
  1237. };

  1238. //2188
  1239. Scene_Battle.prototype.createHelpWindow = function() {
  1240.     if (MPPlugin.helpWindowPos >= 0) {
  1241.         this._helpWindow = new Window_Help(MPPlugin.helpWindowRow);
  1242.         this._helpWindow.visible = false;
  1243.         if (MPPlugin.helpWindowPos === 1) {
  1244.             this._helpWindow.y = this._statusWindow.y - this._helpWindow.height;
  1245.         }
  1246.         this.addWindow(this._helpWindow);
  1247.     }
  1248. };

  1249. //2194
  1250. Scene_Battle.prototype.createSkillWindow = function() {
  1251.     var wy = this._statusWindow.y;
  1252.     var ww = Graphics.boxWidth - 144
  1253.     var wh = this._statusWindow.height;
  1254.     this._skillWindow = new Window_BattleSkill(0, wy, ww, wh);
  1255.     this._skillWindow.setHelpWindow(this._helpWindow);
  1256.     this._skillWindow.setHandler('ok',     this.onSkillOk.bind(this));
  1257.     this._skillWindow.setHandler('cancel', this.onSkillCancel.bind(this));
  1258.     this.addWindow(this._skillWindow);

  1259.     this._skillStatusWindow = new Window_AtbSkillStatus(ww, wy, 144, wh);
  1260.     this.addWindow(this._skillStatusWindow);
  1261.     this._skillWindow.setStatusWindow(this._skillStatusWindow);
  1262. };

  1263. //2204
  1264. Scene_Battle.prototype.createItemWindow = function() {
  1265.     var wy = this._statusWindow.y;
  1266.     var wh = this._statusWindow.height;
  1267.     this._itemWindow = new Window_BattleItem(0, wy, Graphics.boxWidth, wh);
  1268.     this._itemWindow.setHelpWindow(this._helpWindow);
  1269.     this._itemWindow.setHandler('ok',     this.onItemOk.bind(this));
  1270.     this._itemWindow.setHandler('cancel', this.onItemCancel.bind(this));
  1271.     this.addWindow(this._itemWindow);
  1272. };

  1273. //2214
  1274. Alias.ScBa_createActorWindow = Scene_Battle.prototype.createActorWindow;
  1275. Scene_Battle.prototype.createActorWindow = function() {
  1276.     Alias.ScBa_createActorWindow.call(this);
  1277.     this._actorWindow.x = Graphics.boxWidth - this._actorWindow.width;
  1278. };

  1279. //2246
  1280. Alias.ScBa_refreshStatus = Scene_Battle.prototype.refreshStatus;
  1281. Scene_Battle.prototype.refreshStatus = function() {
  1282.     Alias.ScBa_refreshStatus.call(this);
  1283.     this._actorCommandWindow.refresh();
  1284.     if (this._skillWindow.visible) {
  1285.         this._skillWindow.refresh();
  1286.     }
  1287.     if (this._itemWindow.visible) {
  1288.         this._itemWindow.refresh();
  1289.     }
  1290.     if (this._actorWindow.visible) {
  1291.         this._actorWindow.refresh();
  1292.     }
  1293.     if (this._enemyWindow.visible) {
  1294.         this._enemyWindow.refresh();
  1295.     }
  1296. };

  1297. //2246
  1298. Alias.ScBa_startPartyCommandSelection = Scene_Battle.prototype.startPartyCommandSelection;
  1299. Scene_Battle.prototype.startPartyCommandSelection = function() {
  1300.     Alias.ScBa_startPartyCommandSelection.call(this);
  1301.     this._actor = null;
  1302. };

  1303. //2254
  1304. Scene_Battle.prototype.commandFight = function() {
  1305.     BattleManager.setEscaping(false);
  1306.     this._partyCommandWindow.close();
  1307. };

  1308. //2258
  1309. Scene_Battle.prototype.commandEscape = function() {
  1310.     BattleManager.setEscaping(true);
  1311.     this._partyCommandWindow.close();
  1312. };

  1313. //2263
  1314. Alias.ScBa_startActorCommandSelection = Scene_Battle.prototype.startActorCommandSelection;
  1315. Scene_Battle.prototype.startActorCommandSelection = function() {
  1316.     SoundManager.playOk();
  1317.     Alias.ScBa_startActorCommandSelection.call(this);
  1318.     this._skillWindow.deactivate();
  1319.     this._skillWindow.hide();
  1320.     this._itemWindow.deactivate();
  1321.     this._itemWindow.hide();
  1322.     this._actorWindow.deactivate();
  1323.     this._actorWindow.hide();
  1324.     this._enemyWindow.deactivate();
  1325.     this._enemyWindow.hide();
  1326. };

  1327. //2282
  1328. Alias.ScBa_commandGuard = Scene_Battle.prototype.commandGuard;
  1329. Scene_Battle.prototype.commandGuard = function() {
  1330.     BattleManager.inputtingAction().setGuard();
  1331.     BattleManager.actor().onMadeAction();
  1332.     Alias.ScBa_commandGuard.call(this);
  1333. };

  1334. Scene_Battle.prototype.onStatusOk = function() {
  1335.     BattleManager.changeActor(this._statusWindow.index(), 'undecided');
  1336.     this.changeInputWindow();
  1337. };

  1338. //2303
  1339. Alias.ScBa_selectActorSelection = Scene_Battle.prototype.selectActorSelection;
  1340. Scene_Battle.prototype.selectActorSelection = function() {
  1341.     Alias.ScBa_selectActorSelection.call(this);
  1342.     this._actorWindow.selectForItem();
  1343. };

  1344. //2309
  1345. Alias.ScBa_onActorOk = Scene_Battle.prototype.onActorOk;
  1346. Scene_Battle.prototype.onActorOk = function() {
  1347.     BattleManager.actor().onMadeAction();
  1348.     Alias.ScBa_onActorOk.call(this);
  1349. };

  1350. //2332
  1351. Alias.ScBa_selectEnemySelection = Scene_Battle.prototype.selectEnemySelection;
  1352. Scene_Battle.prototype.selectEnemySelection = function() {
  1353.     Alias.ScBa_selectEnemySelection.call(this);
  1354.     this._enemyWindow.selectForItem();
  1355. };

  1356. //2339
  1357. Alias.ScBa_onEnemyOk = Scene_Battle.prototype.onEnemyOk;
  1358. Scene_Battle.prototype.onEnemyOk = function() {
  1359.     BattleManager.actor().onMadeAction();
  1360.     Alias.ScBa_onEnemyOk.call(this);
  1361. };

  1362. //2391
  1363. Scene_Battle.prototype.onSelectAction = function() {
  1364.     var action = BattleManager.inputtingAction();
  1365.     //this._skillWindow.hide();
  1366.     //this._itemWindow.hide();
  1367.     if (action.isForOpponent()) {
  1368.         this.selectEnemySelection();
  1369.     } else {
  1370.         this.selectActorSelection();
  1371.     }
  1372. };

  1373. //2404
  1374. Alias.ScBa_endCommandSelection = Scene_Battle.prototype.endCommandSelection;
  1375. Scene_Battle.prototype.endCommandSelection = function() {
  1376.     this._actor = null;
  1377.     Alias.ScBa_endCommandSelection.call(this);
  1378.     this._skillWindow.deactivate();
  1379.     this._skillWindow.hide();
  1380.     this._itemWindow.deactivate();
  1381.     this._itemWindow.hide();
  1382.     this._actorWindow.deactivate();
  1383.     this._actorWindow.hide();
  1384.     this._enemyWindow.deactivate();
  1385.     this._enemyWindow.hide();
  1386. };

  1387. })();
复制代码

点评

好的,谢谢,我先查看一下:)  发表于 2016-5-8 15:14
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.

在本版发帖返回顶部