查看: 3749|回复: 27

[已经解决] MOG BOSS破限【已经解决】

[复制链接]
梦石
0
星屑
2457
在线时间
912 小时
注册时间
2014-10-14
回帖
1155

开拓者

发表于 2017-7-28 12:34:06 | 显示全部楼层 |阅读模式

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

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

×
本帖最后由 j296196585 于 2017-7-29 13:11 编辑

高额悬赏  找人修改插件

因为是葡萄牙语 看不懂坐标在哪里。。

他的最大显示数只有6位数 有没有 朋友给多填几个0 的  因为全是

微信 j296196585
QQ 296196585   
会的弟兄姐妹帮帮忙。。。



  1. //=============================================================================
  2. // MOG_Theatrhythm.js
  3. //=============================================================================

  4. /*:
  5. * @plugindesc (v1.4) 小游戏《最终幻想》的游戏节奏剧场。
  6. * @author 你大爷
  7. *
  8. * @param >> MAIN ===================
  9. * @desc
  10. * @default
  11. *
  12. * @param Points Variable ID
  13. * @desc Definição da variável que ficara guardada a quantidade de Pontos.
  14. * @default 5
  15. *
  16. * @param Result Switch ID
  17. * @desc Definição da switch que corresponde a vitória ou derrota do minigame.
  18. * @default 10
  19. *
  20. * @param Score Base
  21. * @desc Definição do valor basico dos pontos.
  22. * @default 10
  23. *
  24. * @param Chain Bonus
  25. * @desc Definição do valor dos pontos ganhos fazer combos.
  26. * @default 5
  27. *
  28. * @param Critical Bonus Percentage
  29. * @desc Definição da porcentagem ao fazer danos críticos.
  30. * @default 1.5  
  31. *
  32. * @param Max Chain Bonus Percentage
  33. * @desc Definição da porcentagem ganho no resultado final.
  34. * @default 0.01
  35. *
  36. * @param Miss Dmg Percentage
  37. * @desc Definição da porcentagem de dano ao errar ou deixar o botão passar.
  38. * @default 0
  39. *
  40. * @param BP Base Value
  41. * @desc Definição do valor base do Battle Power.
  42. * @default 50
  43. *
  44. * @param Enemy Atk Animation
  45. * @desc Definição da animação padrão do ataque inimigo.
  46. * @default 1
  47. *
  48. * @param >> POSITION ===================
  49. * @desc
  50. * @default
  51. *
  52. * @param Actor X-Axis
  53. * @desc Definição X-Axis personagem.
  54. * @default 700  
  55. *
  56. * @param Actor Y-Axis
  57. * @desc Definição Y-Axis personagem.
  58. * @default 320
  59. *
  60. * @param Actor Space Y
  61. * @desc Definição espaço entre os personagens.
  62. * @default 80
  63. *
  64. * @param Enemy X-Axis
  65. * @desc Definição da posição X-axis do inimigo.
  66. * @default 180  
  67. *
  68. * @param Enemy Y-Axis
  69. * @desc Definição da posição Y-axis do inimigo.
  70. * @default 340
  71. *
  72. * @param Button Layout X
  73. * @desc Definição X-Axis do layout dos botões.
  74. * @default -62
  75. *
  76. * @param Button Layout Y
  77. * @desc Definição Y-Axis do layout dos botões.
  78. * @default 5
  79. *
  80. * @param Button Flash X
  81. * @desc Definição X-Axis do flash.
  82. * @default -140
  83. *
  84. * @param Button Flash Y
  85. * @desc Definição Y-Axis do flash.
  86. * @default -1
  87. *
  88. * @param String X
  89. * @desc Definição X-Axis das palavras dos botões.
  90. * @default 130
  91. *
  92. * @param String Y
  93. * @desc Definição Y-Axis das palavras dos botões.
  94. * @default 0
  95. *
  96. * @param Face X
  97. * @desc Definição X-Axis da face do personagem.
  98. * @default 420
  99. *
  100. * @param Face Y
  101. * @desc Definição Y-Axis da face do personagem.
  102. * @default 5     
  103. *
  104. * @param Enemy HP Gauge X
  105. * @desc Definição X-Axis do HP inimigo.
  106. * @default 17           
  107. *
  108. * @param Enemy HP Gauge Y
  109. * @desc Definição Y-Axis do HP inimigo.
  110. * @default 600
  111. *
  112. * @param Enemy HP Number X
  113. * @desc Definição Y-Axis do HP inimigo.
  114. * @default 280
  115. *
  116. * @param Enemy HP Number Y
  117. * @desc Definição Y-Axis do HP inimigo.
  118. * @default 575
  119. *
  120. * @param Party HP Gauge X
  121. * @desc Definição X-Axis do HP do grupo.
  122. * @default 573
  123. *
  124. * @param Party HP Gauge Y
  125. * @desc Definição Y-Axis do HP do grupo.
  126. * @default 30
  127. *
  128. * @param Party HP Number X
  129. * @desc Definição X-Axis do HP do grupo.
  130. * @default 790
  131. *
  132. * @param Party HP Number Y
  133. * @desc Definição Y-Axis do HP do grupo.
  134. * @default 32
  135. *
  136. * @param Score X
  137. * @desc Definição X-Axis dos pontos.
  138. * @default 300
  139. *
  140. * @param Score Y
  141. * @desc Definição Y-Axis dos pontos.
  142. * @default 10
  143. *
  144. * @param Chain X
  145. * @desc Definição X-Axis do Combo.
  146. * @default 430
  147. *
  148. * @param Chain Y
  149. * @desc Definição Y-Axis do Combo.
  150. * @default 130
  151. *
  152. * @param Chain Number X
  153. * @desc Definição X-Axis do numero do Combo.
  154. * @default 0
  155. *
  156. * @param Chain Number Y
  157. * @desc Definição Y-Axis do numero do Combo.
  158. * @default 20  
  159. *
  160. * @param BP Party X
  161. * @desc Definição X-axis do BP.
  162. * @default 615
  163. *
  164. * @param BP Party Y
  165. * @desc Definição Y-axis do BP.
  166. * @default 95
  167. *
  168. * @param BP Enemy X
  169. * @desc Definição X-axis do BP.
  170. * @default -70
  171. *
  172. * @param BP Enemy Y
  173. * @desc Definição Y-axis do BP.
  174. * @default 515
  175. *
  176. * @param Phase X
  177. * @desc Definição X-axis da fase.
  178. * @default 0
  179. *
  180. * @param Phase Y
  181. * @desc Definição Y-axis da fase.
  182. * @default 192
  183. *
  184. * @param Result X
  185. * @desc Definição X-axis do resultado.
  186. * @default 520
  187. *
  188. * @param Result Y
  189. * @desc Definição Y-axis do resultado.
  190. * @default 240
  191. *
  192. * @param Result Font Size
  193. * @desc Definição do tamanho da fonte.
  194. * @default 28
  195. *
  196. * @param Total X
  197. * @desc Definição X-axis do total.
  198. * @default 200  
  199. *
  200. * @param Total Y
  201. * @desc Definição Y-axis do total.
  202. * @default 330
  203. *
  204. * @param Total Font Size
  205. * @desc Definição do tamanho da fonte.
  206. * @default 32
  207. *
  208. * @param E Name X
  209. * @desc Definição X-axis do nome do inimigo.
  210. * @default 300
  211. *
  212. * @param E Name Y
  213. * @desc Definição X-axis do nome do inimigo.
  214. * @default 575
  215. *
  216. * @param E Name Font Size
  217. * @desc Definição do tamanho da fonte.
  218. * @default 24
  219. *
  220. * @help  
  221. * =============================================================================
  222. * +++ MOG - Theatrhythm (v1.4) +++
  223. * By Moghunter
  224. * [url]https://atelierrgss.wordpress.com/[/url]
  225. * =============================================================================
  226. * Minigame baseado no jogo Final Fantasy Theatrhythm.
  227. * Os pontos ganhos ao final do mini game serão gravados em uma variável onde
  228. * poderão posteriormente ser usados durante o jogo.
  229. * =============================================================================
  230. * É necessário ter as imagens básicas do sistema gravas na pasta:
  231. *
  232. * /img/theatrhythm/
  233. *
  234. * =============================================================================
  235. * Para chamar a cena use o comando abaixo.
  236. *
  237. * theatrhythm : EnemyID : Speed
  238. *
  239. * Exemplo
  240. *
  241. * theatrhythm : 1 : 5
  242. *
  243. * =============================================================================
  244. * Para definir uma animação específica de ataque do inimigo use o comentário
  245. * abaixo na caixa de notas do inimigo.
  246. *
  247. * Theatrhythm Action Animation: X
  248. *
  249. * =============================================================================
  250. * HITSTÓRICO
  251. * =============================================================================
  252. * (v1.4) - Compatibilidade com Rpg Maker 1.3.3  
  253. * (v1.3) - Compatibilidade com o MOG Flash Damage.
  254. * (v1.2) - Correção do Crash relativo as Tags.
  255. * (v1.1) - Correção de prosseguir os comandos de eventos antes da cena do
  256. *          Theatrhythm terminar.
  257. *        - Adicionado a switch de resultado do minigame.
  258. *
  259. */

  260. //=============================================================================
  261. // ** PLUGIN PARAMETERS
  262. //=============================================================================
  263.   var Imported = Imported || {};
  264.   Imported.MOG_Theatrhythm = true;
  265.   var Moghunter = Moghunter || {};

  266.    Moghunter.parameters = PluginManager.parameters('MOG_Theatrhythm');  
  267.         Moghunter.theatrhythm_variable_id = Number(Moghunter.parameters['Points Variable ID'] || 5);
  268.         Moghunter.theatrhythm_base_score = Number(Moghunter.parameters['Score Base'] || 10);
  269.         Moghunter.theatrhythm_chain_bonus = Number(Moghunter.parameters['Chain Bonus'] || 5);       
  270.         Moghunter.theatrhythm_critical_bonus = Number(Moghunter.parameters['Critical Bonus Percentage'] || 1.5);
  271.         Moghunter.theatrhythm_result_chain_bonus = Number(Moghunter.parameters['Max Chain Bonus Percentage'] || 0.01);                   
  272.         Moghunter.theatrhythm_miss_dmg_per = Number(Moghunter.parameters['Miss Dmg Percentage'] || 0);
  273.         Moghunter.theatrhythm_bp_base_value = Number(Moghunter.parameters['BP Base Value'] || 50);
  274.         Moghunter.theatrhythm_enemy_atk_ani = Number(Moghunter.parameters['Enemy Atk Animation'] || 1);  
  275.     Moghunter.theatrhythm_actor_x = Number(Moghunter.parameters['Actor X-Axis'] || 700);
  276.         Moghunter.theatrhythm_actor_y = Number(Moghunter.parameters['Actor Y-Axis'] || 320);
  277.         Moghunter.theatrhythm_actor_spc_y = Number(Moghunter.parameters['Actor Space Y'] || 80);                       
  278.         Moghunter.theatrhythm_enemy_x = Number(Moghunter.parameters['Enemy X-Axis'] || 180);
  279.         Moghunter.theatrhythm_enemy_y = Number(Moghunter.parameters['Enemy Y-Axis'] || 340);                               
  280.         Moghunter.theatrhythm_button_layout_x = Number(Moghunter.parameters['Button Layout X'] || -62);
  281.         Moghunter.theatrhythm_button_layout_y = Number(Moghunter.parameters['Button Layout Y'] || 5);       
  282.     Moghunter.theatrhythm_button_flash_x = Number(Moghunter.parameters['Button Flash X'] || -140);
  283.     Moghunter.theatrhythm_button_flash_y = Number(Moghunter.parameters['Button Flash Y'] || -1);
  284.     Moghunter.theatrhythm_string_x = Number(Moghunter.parameters['String X'] || 130);
  285.         Moghunter.theatrhythm_string_y = Number(Moghunter.parameters['String Y'] || 0);
  286.     Moghunter.theatrhythm_face_x = Number(Moghunter.parameters['Face X'] || 420);
  287.         Moghunter.theatrhythm_face_y = Number(Moghunter.parameters['Face Y'] || 5);               
  288.         Moghunter.theatrhythm_time_meter_x = Number(Moghunter.parameters['Enemy HP Gauge X'] || 17);
  289.         Moghunter.theatrhythm_time_meter_y = Number(Moghunter.parameters['Enemy HP Gauge Y'] || 600);       
  290.         Moghunter.theatrhythm_enemy_hp_number_x = Number(Moghunter.parameters['Enemy HP Number X'] || 280);
  291.         Moghunter.theatrhythm_enemy_hp_number_y = Number(Moghunter.parameters['Enemy HP Number Y'] || 575);       
  292.         Moghunter.theatrhythm_hp_meter_x = Number(Moghunter.parameters['Party HP Gauge X'] || 573);
  293.         Moghunter.theatrhythm_hp_meter_y = Number(Moghunter.parameters['Party HP Gauge Y'] || 30);               
  294.         Moghunter.theatrhythm_actor_hp_number_x = Number(Moghunter.parameters['Party HP Number X'] || 790);
  295.         Moghunter.theatrhythm_actor_hp_number_y = Number(Moghunter.parameters['Party HP Number Y'] || 32);               
  296.         Moghunter.theatrhythm_score_x = Number(Moghunter.parameters['Score X'] || 300);
  297.         Moghunter.theatrhythm_score_y = Number(Moghunter.parameters['Score Y'] || 10);               
  298.         Moghunter.theatrhythm_chain_x = Number(Moghunter.parameters['Chain X'] || 430);
  299.         Moghunter.theatrhythm_chain_y = Number(Moghunter.parameters['Chain Y'] || 130);                       
  300.         Moghunter.theatrhythm_chain_number_x = Number(Moghunter.parameters['Chain Number X'] || 0);
  301.         Moghunter.theatrhythm_chain_number_y = Number(Moghunter.parameters['Chain Number Y'] || 20);       
  302.         Moghunter.theatrhythm_bp_visible = String(Moghunter.parameters['BP Visible'] || true);       
  303.         Moghunter.theatrhythm_bp_party_x = Number(Moghunter.parameters['BP Party X'] || 615);
  304.     Moghunter.theatrhythm_bp_party_y = Number(Moghunter.parameters['BP Party Y'] || 95);
  305.         Moghunter.theatrhythm_bp_enemy_x = Number(Moghunter.parameters['BP Enemy X'] || -70);
  306.     Moghunter.theatrhythm_bp_enemy_y = Number(Moghunter.parameters['BP Enemy Y'] || 515);               
  307.         Moghunter.theatrhythm_phase_x = Number(Moghunter.parameters['Phase X'] || 0);
  308.         Moghunter.theatrhythm_phase_y = Number(Moghunter.parameters['Phase Y'] || 192);               
  309.         Moghunter.theatrhythm_result_x = Number(Moghunter.parameters['Result X'] || 520);
  310.         Moghunter.theatrhythm_result_y = Number(Moghunter.parameters['Result Y'] || 240);
  311.         Moghunter.theatrhythm_result_font_size = Number(Moghunter.parameters['Result Font Size'] || 28);       
  312.         Moghunter.theatrhythm_result_total_x = Number(Moghunter.parameters['Total X'] || 200);
  313.         Moghunter.theatrhythm_result_total_y = Number(Moghunter.parameters['Total Y'] || 330);
  314.         Moghunter.theatrhythm_result_total_font_size = Number(Moghunter.parameters['Total Font Size'] || 32);
  315.         Moghunter.theatrhythm_name_x = Number(Moghunter.parameters['E Name X'] || 300);
  316.         Moghunter.theatrhythm_name_y = Number(Moghunter.parameters['E Name Y'] || 575);
  317.         Moghunter.theatrhythm_name_font_size = Number(Moghunter.parameters['E Name Font Size'] || 24);
  318.         Moghunter.theatrhythm_result_switch_id = Number(Moghunter.parameters['Result Switch ID'] || 10);
  319.        
  320. //=============================================================================
  321. // ** Load Theatrhythm
  322. //=============================================================================       
  323. ImageManager.loadTheatrhythm = function(filename) {
  324.     return this.loadBitmap('img/theatrhythm/', filename, 0, true);
  325. };

  326. //=============================================================================
  327. // ** Game_Interpreter
  328. //=============================================================================       

  329. //==============================
  330. // * PluginCommand
  331. //==============================
  332. var _alias_mog_Theatrhythm_pluginCommand = Game_Interpreter.prototype.pluginCommand
  333. Game_Interpreter.prototype.pluginCommand = function(command, args) {
  334.         _alias_mog_Theatrhythm_pluginCommand.call(this,command, args)
  335.         if (command === "theatrhythm")  {
  336.                  if (args.length >= 4) {               
  337.                  var enemy_id = Math.min(Math.max(args[1],1),$dataEnemies.length - 1);                 
  338.                      var speed = Math.min(Math.max(args[3],1),20);
  339.                      $gameSystem._theatrhythm_data = [enemy_id,speed];
  340.                          $gameSystem._theatrhythm_start = true;
  341.                          this.wait(10);
  342.             };
  343.     };       
  344.         return true;
  345. };

  346. //=============================================================================
  347. // ** Scene Map
  348. //=============================================================================       

  349. //==============================
  350. // * update
  351. //==============================
  352. var _alias_mog_theatrhythm_scmap_update = Scene_Map.prototype.update
  353. Scene_Map.prototype.update = function() {
  354.         _alias_mog_theatrhythm_scmap_update.call(this);
  355.         if ($gameSystem._theatrhythm_start) {this.execute_theatrhythm()};
  356. };

  357. //==============================
  358. // * execute theatrhythm
  359. //==============================
  360. Scene_Map.prototype.execute_theatrhythm = function() {
  361.                 $gameSystem._theatrhythm_start = false;
  362.                 this.startFadeOut(this.fadeSpeed());
  363.                 $gameSystem.theatrhythm();
  364. };

  365. //=============================================================================
  366. // ** Scene_System
  367. //=============================================================================       

  368. //==============================
  369. // * Theatrhythm
  370. //==============================
  371. var _alias_mog_theatrhythm_gsy_initialize = Game_System.prototype.initialize
  372. Game_System.prototype.initialize = function() {
  373.     _alias_mog_theatrhythm_gsy_initialize.call(this);       
  374.         this._theatrhythm = false;
  375.         this._theatrhythm_start = false;
  376.         this._theatrhythm_data = [1,1];
  377.         this._theatrhythm_phase = 0;
  378.         this._theatrhythm_miss_dmg = false;
  379.         this._theatrhythm_key_data = [null,0,0,0];
  380.         this._theatrhythm_chain_data = [0,0];
  381.         this._theatrhythm_score_data = [0,0];               
  382.         Input.keyMapper[65] = 'a';
  383.     Input.keyMapper[83] = 's';
  384. };

  385. //==============================
  386. // * Theatrhythm
  387. //==============================
  388. Game_System.prototype.theatrhythm = function() {
  389.         if ($gameParty.battleMembers().length === 0) {return};
  390.     SceneManager.push(Scene_Theatrhythm);
  391. };

  392. //=============================================================================
  393. // ** Game Battler
  394. //=============================================================================       

  395. //==============================
  396. // * Notetags
  397. //==============================
  398. Game_Battler.prototype.notetags = function() {
  399.         if (this.isEnemy()) {return this.enemy().note.split(/[\r\n]+/)};
  400.         if (this.isActor()) {return this.actor().note.split(/[\r\n]+/)};
  401. };

  402. //==============================
  403. // ** iniMembers
  404. //==============================
  405. var _alias_mog_theatrhythm_gbattler_initMembers = Game_Battler.prototype.initMembers;
  406. Game_Battler.prototype.initMembers = function() {
  407.         _alias_mog_theatrhythm_gbattler_initMembers.call(this);
  408.         this._motion_damage_duration = 0;
  409.         this._motion_damage_xy = [0,0];
  410.         this._theatrhythm_ani_id = Math.max(Moghunter.theatrhythm_enemy_atk_ani,1);
  411.         this.clear_action_data();
  412. };

  413. //==============================
  414. // ** Clear Action Data
  415. //==============================
  416. Game_Battler.prototype.clear_action_data = function() {
  417.         this._motion_action_data = [0,0,0,0];
  418.         this._motion_action_xy = [0,0];
  419.         this._motion_action_scale = [0,0];
  420.         this._motion_action_rotation = 0;
  421. };
  422. //==============================
  423. // ** Motion Shake
  424. //==============================
  425. Game_Battler.prototype.motion_shake = function() {
  426.         this._motion_damage_duration = 30;
  427. };

  428. //=============================================================================
  429. // ** Game Actor
  430. //=============================================================================       

  431. //==============================
  432. // * isSpriteVisible
  433. //==============================
  434. Game_Actor.prototype.isSpriteVisible = function() {
  435.         if ($gameSystem._theatrhythm) {return true};
  436.    return $gameSystem.isSideView();
  437. };

  438. //=============================================================================
  439. // ** Game Enemy
  440. //=============================================================================       

  441. //==============================
  442. // * Setup
  443. //==============================
  444. var _alias_mog_theatrhythm_setup = Game_Enemy.prototype.setup;
  445. Game_Enemy.prototype.setup = function(enemyId, x, y) {
  446.         _alias_mog_theatrhythm_setup.call(this,enemyId, x, y);
  447.     this.notetags().forEach(function(note) {
  448.          var note_data = note.split(': ')
  449.                  if (note_data[0].toLowerCase() == "theatrhythm action animation"){
  450.                          var par = note_data[1].split(':');
  451.                      this._theatrhythm_ani_id = Number(par[0]);
  452.                  };
  453.         },this);
  454. };

  455. //=============================================================================
  456. // ** Sprite Battler
  457. //=============================================================================       

  458. //==============================
  459. // * Update Position
  460. //==============================
  461. var _alias_mog_theatrhythm_sprbtr_updatePosition = Sprite_Battler.prototype.updatePosition;
  462. Sprite_Battler.prototype.updatePosition = function() {
  463.         _alias_mog_theatrhythm_sprbtr_updatePosition.call(this);
  464.         if ( $gameSystem._theatrhythm) {this.update_theatrhythm()};
  465. };

  466. //==============================
  467. // * Update Position
  468. //==============================
  469. Sprite_Battler.prototype.update_theatrhythm = function() {               
  470.         if (!Imported.MOG_BattlerMotion) {
  471.                 if (this._battler) {
  472.                         if (this._battler._motion_damage_duration > 0) {this.update_motion_damage()};
  473.                         if (this._battler._motion_action_data[0] === 7) {this.update_action_move_right();};
  474.                         this.x += this._battler._motion_action_xy[0];
  475.                         this.y += this._battler._motion_action_xy[1];
  476.             };
  477.         };
  478.         if (this._battler.isEnemy() && $gameSystem._theatrhythm_phase === 10) {this.opacity -= 5}
  479. };

  480. //==============================
  481. // * Update Motion Damage
  482. //==============================
  483. Sprite_Battler.prototype.update_motion_damage = function() {
  484.          if (Imported.MOG_FlashDamage && this._battler._flashDamage) {return};
  485.          this._battler._motion_damage_xy[0] = (Math.random() * 12) - 6;
  486.          this._battler._motion_damage_duration -= 1;
  487.          if (this._battler._motion_damage_duration <= 0) {this._battler._motion_damage_xy = [0,0]};
  488.          this.x += this._battler._motion_damage_xy[0];
  489. };

  490. //==============================
  491. // * Update Move Right
  492. //==============================
  493. Sprite_Battler.prototype.update_action_move_right = function() {
  494.       this._battler._motion_action_data[1] += 1
  495.           if (this._battler._motion_action_data[1] < 15) {
  496.                   this._battler._motion_action_xy[0] += 8;
  497.           }       
  498.           else if (this._battler._motion_action_data[1] < 30) {        
  499.                   this._battler._motion_action_xy[0] -= 8;
  500.           }
  501.           else {
  502.               this._battler.clear_action_data();
  503.       };
  504. };

  505. //=============================================================================
  506. // ** Scene_Theatrhythm
  507. //=============================================================================       
  508. function Scene_Theatrhythm() {
  509.     this.initialize.apply(this, arguments);
  510. }

  511. Scene_Theatrhythm.prototype = Object.create(Scene_Base.prototype);
  512. Scene_Theatrhythm.prototype.constructor = Scene_Theatrhythm;

  513. //==============================
  514. // * Initialize
  515. //==============================
  516. Scene_Theatrhythm.prototype.initialize = function() {
  517.     Scene_Base.prototype.initialize.call(this);       
  518.         $gameSystem._theatrhythm = true;
  519.         $gameSystem._theatrhythm_phase = 0;
  520.         $gameSystem._theatrhythm_miss_dmg = false;
  521.         $gameSystem._theatrhythm_key_data = [null,0,0,0];
  522.         $gameSystem._theatrhythm_chain_data[0] = 0;
  523.         $gameSystem._theatrhythm_score_data[0] = 0;
  524.         this._result_data = [0,0];
  525.         BattleManager.saveBgmAndBgs();
  526.         AudioManager.fadeOutBgm(2);
  527.         AudioManager.stopBgs();
  528.         $gameSwitches._data[Moghunter.theatrhythm_result_switch_id] = false;
  529.         if (!$gameVariables._data[Moghunter.theatrhythm_variable_id]) {
  530.              $gameVariables._data[Moghunter.theatrhythm_variable_id] = 0;
  531.         };
  532.         this._battlers = $gameParty.battleMembers()
  533.         for (var i = 0; i <  $gameParty.battleMembers().length; i++) {$gameParty.battleMembers()[i].recoverAll();};
  534.         this._time = [0,3000];
  535.         this._score = [-1,0,0];
  536.         this._chain_dt = [0,0];       
  537.         this._wait_time = 0;
  538.         this._phase = [0,0,0];
  539.         this._target_id = 0;
  540.         this._enemy_ref = false;
  541.     this.createDisplayObjects();
  542.         this.set_battler_parameters();
  543.         this.startFadeIn(60, false);
  544. };

  545. //==============================
  546. // * Set Battler Parameters
  547. //==============================
  548. Scene_Theatrhythm.prototype.set_battler_parameters = function() {
  549.         this._enemy_hp = [this._enemy.hp,this._enemy.hp]
  550.         this._enemy_atk = this._enemy.atk + this._enemy.mat;
  551.         this._enemy_def = (this._enemy.def + this._enemy.mdf) / 2;
  552.         this._enemy_bp = Math.floor(((this._enemy_hp[0] / 30) + this._enemy_atk + this._enemy_def) / 3)
  553.         this._enemy_bp *= Moghunter.theatrhythm_bp_base_value;
  554.         this._party_hp = [0,0];
  555.         this._party_atk = 0;
  556.         this._party_def = 0;
  557.         for (var i = 0; i < this._battlers.length; i++) {
  558.                  this._party_hp[0] += this._battlers[i].hp;
  559.                  this._party_hp[1] += this._battlers[i].mhp;
  560.                  this._party_atk += this._battlers[i].atk;
  561.                  this._party_atk += this._battlers[i].mat;
  562.                  this._party_def += this._battlers[i].def / 2;
  563.                  this._party_def += this._battlers[i].mdf / 2;
  564.         };
  565.         this._party_hp[0] /= this._battlers.length;
  566.         this._party_hp[1] /= this._battlers.length;
  567.         this._party_atk /= this._battlers.length;
  568.         this._party_def /= this._battlers.length;
  569.         this._party_bp = Math.floor(((this._party_hp[0] / 10) + this._party_atk + this._party_def) / 3)
  570.         this._party_bp *= Moghunter.theatrhythm_bp_base_value;
  571. };

  572. //==============================
  573. // * Load Images
  574. //==============================
  575. Scene_Theatrhythm.prototype.load_images = function() {
  576.          this._buttons_img = ImageManager.loadTheatrhythm("Theatrhythm_A");       
  577.          this._layout_buttons_img = ImageManager.loadTheatrhythm("Theatrhythm_B");
  578.      this._layout_buttons_img2 = ImageManager.loadTheatrhythm("Theatrhythm_C");
  579.          this._string_img = ImageManager.loadTheatrhythm("Theatrhythm_D");
  580.          this._layout_img = ImageManager.loadTheatrhythm("Theatrhythm_E");
  581.          this._time_meter_img = ImageManager.loadTheatrhythm("Theatrhythm_F");
  582.          this._hp_meter_img = ImageManager.loadTheatrhythm("Theatrhythm_G");
  583.          this._score_img = ImageManager.loadTheatrhythm("Theatrhythm_H");
  584.          this._chain_img = ImageManager.loadTheatrhythm("Theatrhythm_I");
  585.          this._chain_number_img = ImageManager.loadTheatrhythm("Theatrhythm_J");
  586.          this._hp_number_1_img = ImageManager.loadTheatrhythm("Theatrhythm_L");
  587.          this._phase_img = ImageManager.loadTheatrhythm("Theatrhythm_M");
  588.          this._damage_img = ImageManager.loadTheatrhythm("Theatrhythm_N");
  589. };

  590. //==============================
  591. // * CreateDisplayObjects
  592. //==============================
  593. Scene_Theatrhythm.prototype.createDisplayObjects = function() {
  594.         this.load_images();
  595.         this._spriteField = new Sprite();       
  596.         this.addChild(this._spriteField);
  597.         this._spriteHudBase = new Sprite();
  598.         this.addChild(this._spriteHudBase);
  599.     this.createScenario();
  600.         this.createActors();
  601.         this.createEnemy();
  602.         this.createLayoutBase();
  603.         this.createLayoutButtons();       
  604.         this.createLayout();
  605.         this.createFace();
  606.         this.createTimeMeter();
  607.         this.createEnemyHpNumber();
  608.         this.createHpMeter();
  609.         this.createActorHpNumber();
  610.         this.createEnemyName();
  611.         this.createScore();
  612.         this.createChain();
  613.         this.createBattlePower();
  614.         this.createDamage();
  615.         this.createPhaseSprite();
  616.         this.createText();
  617. };

  618. //==============================
  619. // * createLayout
  620. //==============================
  621. Scene_Theatrhythm.prototype.createLayout = function() {       
  622.      this._layout = new Sprite(this._layout_img);
  623.          this._spriteHudBase.addChild(this._layout);       
  624. };

  625. //==============================
  626. // * createPhaseSprite
  627. //==============================
  628. Scene_Theatrhythm.prototype.createPhaseSprite = function() {       
  629.      this._phase_sprite_data = [-1,-1]
  630.      this._phase_sprite = new Sprite(this._phase_img);
  631.          this._phase_sprite.x = Moghunter.theatrhythm_phase_x;
  632.          this._phase_sprite.y = Moghunter.theatrhythm_phase_y;
  633.          this._phase_sprite.anchor.x = 0.5;
  634.          this._phase_sprite.anchor.y = 0.5;
  635.          this._phase_sprite.opacity = 0;
  636.          this.refresh_phase_sprite(0);
  637.          this._spriteHudBase.addChild(this._phase_sprite);       
  638. };

  639. //==============================
  640. // * Refresh Phase Sprite
  641. //==============================
  642. Scene_Theatrhythm.prototype.refresh_phase_sprite = function(type) {
  643.          this._phase_sprite.opacity = 0;
  644.          this._phase_sprite.scale.x = 2;
  645.          this._phase_sprite.scale.y = 2;
  646.          this._phase_sprite.setFrame(0,type * this._phase_sprite_data[1],this._phase_sprite_data[0],this._phase_sprite_data[1]);
  647. };

  648. //==============================
  649. // * createText
  650. //==============================
  651. Scene_Theatrhythm.prototype.createText = function() {       
  652.      this._text_sprite = new Sprite(new Bitmap(200,160));
  653.          this._text_sprite.anchor.x = 0.5;
  654.          this._text_sprite.anchor.y = 0.5;
  655.          this._text_sprite.x = Moghunter.theatrhythm_result_x + 100;
  656.          this._text_sprite.y = Moghunter.theatrhythm_result_y + 50;
  657.          this._text_sprite.bitmap.fontSize = Moghunter.theatrhythm_result_font_size;
  658.          this._spriteHudBase.addChild(this._text_sprite);
  659.      this._text2_sprite = new Sprite(new Bitmap(200,100));
  660.          this._text2_sprite.anchor.x = 0.5;
  661.          this._text2_sprite.anchor.y = 0.5;
  662.          this._text2_sprite.x = Moghunter.theatrhythm_result_total_x + 100;
  663.          this._text2_sprite.y = Moghunter.theatrhythm_result_total_y + 50;
  664.          this._text2_sprite.bitmap.fontSize = Moghunter.theatrhythm_result_total_font_size;
  665.          this._spriteHudBase.addChild(this._text2_sprite);                 
  666. };

  667. //==============================
  668. // * createBattlePower
  669. //==============================
  670. Scene_Theatrhythm.prototype.createBattlePower = function() {       
  671.     this._bp_visible = false;
  672.     if (Moghunter.theatrhythm_bp_visible === "true") {this._bp_visible = true};
  673.     this._battlePower = [];
  674.         for (var i = 0; i < 2; i++) {
  675.                  this._battlePower[i] = new Sprite(new Bitmap(250,32));                 
  676.                  this._battlePower[i].bitmap.fontSize = 20;
  677.                  this._spriteHudBase.addChild(this._battlePower[i]);
  678.         };
  679.         this._battlePower[0].x = Moghunter.theatrhythm_bp_enemy_x;
  680.         this._battlePower[0].y = Moghunter.theatrhythm_bp_enemy_y;
  681.         this._battlePower[1].x = Moghunter.theatrhythm_bp_party_x;
  682.         this._battlePower[1].y = Moghunter.theatrhythm_bp_party_y;
  683. };

  684. //==============================
  685. // * createEnemyName
  686. //==============================
  687. Scene_Theatrhythm.prototype.createEnemyName = function() {       
  688.     this._enemyName = new Sprite(new Bitmap(200,32))
  689.         this._enemyName.x = Moghunter.theatrhythm_name_x;
  690.         this._enemyName.y = Moghunter.theatrhythm_name_y;
  691.         this._enemyName.bitmap.fontSize = Moghunter.theatrhythm_name_font_size;
  692.         this._enemyName.bitmap.drawText(this._enemySprite._enemy.name(),0,0,200,32,"left")
  693.         this._spriteHudBase.addChild(this._enemyName);
  694. };

  695. //==============================
  696. // * createScore
  697. //==============================
  698. Scene_Theatrhythm.prototype.createScore = function() {       
  699.      this._point = [];
  700.          this._point_data = [-1,-1];
  701.      for (var i = 0; i < 7; i++) {
  702.            this._point[i] = new Sprite(this._score_img);
  703.            this._point[i].visible = false;
  704.            this._point[i].y = Moghunter.theatrhythm_score_y;
  705.            this._spriteHudBase.addChild(this._point[i]);
  706.          };
  707. };

  708. //==============================
  709. // * Update Dif
  710. //==============================
  711. Scene_Theatrhythm.prototype.update_dif = function(value,real_value,speed) {
  712.         if (value == real_value) {return value};
  713.         var dnspeed = 1 + (Math.abs(value - real_value) / speed);
  714.         if (value > real_value) {value -= dnspeed;
  715.             if (value < real_value) {value = real_value};}
  716.     else if (value < real_value) {value  += dnspeed;
  717.             if (value  > real_value) {value  = real_value};               
  718.     };
  719.         return Math.floor(value);
  720. };

  721. //==============================
  722. // * Refresh Number
  723. //==============================
  724. Scene_Theatrhythm.prototype.refresh_number = function(sprites,value,img_data,x) {
  725.         if (value > 9999999999) {value = 9999999999};
  726.     numbers = Math.abs(value).toString().split("");  
  727.            for (var i = 0; i < sprites.length ; i++) {sprites[i].visible = false;
  728.            sprites[i].visible = true;
  729.            if (i < numbers.length) {
  730.                    var n = Number(numbers[i]);
  731.                    sprites[i].setFrame(n * img_data[0], 0, img_data[0], img_data[1]);
  732.                    var nx = -(img_data[0] * i) + (img_data[0] *  numbers.length);
  733.                    sprites[i].x = x - nx;
  734.            } else {
  735.                   var n = 0;
  736.                   sprites[i].setFrame(n * img_data[0], 0, img_data[0], img_data[1]);
  737.                   var nx = -(img_data[0] * i) + (img_data[0] *  (sprites.length + numbers.length));
  738.                   sprites[i].x = x - nx;
  739.            };
  740.     };
  741. };

  742. //==============================
  743. // * Update Score
  744. //==============================
  745. Scene_Theatrhythm.prototype.update_score = function() {       
  746.         var dif_number = this.update_dif(this._score[0],this._score[1],20)
  747.         if (this._score[0] != dif_number) {this._score[0] = dif_number;
  748.         this.refresh_number(this._point,this._score[0] ,this._point_data,this._point_data[2]);};
  749. };

  750. //==============================
  751. // * createEnemyHPNumber
  752. //==============================
  753. Scene_Theatrhythm.prototype.createEnemyHpNumber = function() {       
  754.      this._enemyHp_Old = 0;
  755.      this._enemyHpNumber = [];
  756.          this._enemyHpNumber_data = [-1,-1];
  757.      for (var i = 0; i < 6; i++) {
  758.            this._enemyHpNumber[i] = new Sprite(this._hp_number_1_img);
  759.            this._enemyHpNumber[i].visible = false;
  760.            this._enemyHpNumber[i].x = Moghunter.theatrhythm_enemy_hp_number_x;
  761.            this._enemyHpNumber[i].y = Moghunter.theatrhythm_enemy_hp_number_y;
  762.            this._spriteHudBase.addChild(this._enemyHpNumber[i]);
  763.          };
  764. };

  765. //==============================
  766. // * Update EnemyHpNumber
  767. //==============================
  768. Scene_Theatrhythm.prototype.update_enemyHpNumber = function() {       
  769.         var dif_number = this.update_dif(this._enemyHp_Old,this._enemy_hp[0],20)
  770.         if (this._enemyHp_Old != dif_number) {this._enemyHp_Old = dif_number;
  771.         this.refresh_number(this._enemyHpNumber,this._enemyHp_Old ,this._enemyHpNumber_data,this._enemyHpNumber_data[2]);};
  772. };

  773. //==============================
  774. // * createDamage
  775. //==============================
  776. Scene_Theatrhythm.prototype.createDamage = function() {
  777.      this._damages = [[],[]];
  778.          this._damage_data = [-1,-1];
  779.      for (var i = 0; i < 2; i++) {
  780.            for (var n = 0; n < 4; n++) {
  781.               this._damages[i][n] = new Sprite(this._damage_img);
  782.               this._damages[i][n].visible = false;       
  783.           this._spriteHudBase.addChild(this._damages[i][n]);
  784.            };
  785.          };
  786. };

  787. //==============================
  788. // * Refresh Damage
  789. //==============================
  790. Scene_Theatrhythm.prototype.refresh_damage = function(i,value) {
  791.         if (value > 9999999) {value = 9999999};
  792.         if (i === 1 && this._party_hp <= 0) {return};
  793.         if (i === 1 && !this._actorSprites[this._target_id]) {return};
  794.     numbers = Math.abs(value).toString().split("");         
  795.         for (var r = 0; r < this._damages[i].length; r++) {
  796.             this._damages[i][r].visible = false;
  797.             if (r >= numbers.length) {return};
  798.                 this._damages[i][r].visible = true;
  799.                 this._damages[i][r].opacity = 255;
  800.                 var n = Number(numbers[r]);
  801.                 this._damages[i][r].setFrame(n * this._damage_data[0], 0, this._damage_data[0], this._damage_data[1]);
  802.                 var nx = -(this._damage_data[0] * r) + ((this._damage_data[0]  / 2) *  numbers.length);
  803.                 if (i === 0) {
  804.                     this._damages[i][r].x = this._enemySprite.x - nx;               
  805.                     this._damages[i][r].y = this._enemySprite.y - (this._enemySprite.bitmap.height / 2);
  806.                 } else {       
  807.                         this._damages[i][r].x = this._actorSprites[this._target_id].x - nx;
  808.                         this._damages[i][r].y = this._actorSprites[this._target_id].y - 24;
  809.                 };
  810.         };
  811. };

  812. //==============================
  813. // * Update Damage
  814. //==============================
  815. Scene_Theatrhythm.prototype.update_damage = function(i,value) {
  816.          for (var i = 0; i < 2; i++) {
  817.            for (var n = 0; n < 4; n++) {
  818.               if (this._damages[i][n].opacity > 0) {
  819.                    this._damages[i][n].opacity -= 3;
  820.                       this._damages[i][n].y -= 2;
  821.                   };
  822.            };
  823.          };
  824. };

  825. //==============================
  826. // * createActorHPNumber
  827. //==============================
  828. Scene_Theatrhythm.prototype.createActorHpNumber = function() {       
  829.      this._actorHp_Old = 0;
  830.      this._actorHpNumber = [];
  831.          this._actorHpNumber_data = [-1,-1];
  832.      for (var i = 0; i < 5; i++) {
  833.            this._actorHpNumber[i] = new Sprite(this._hp_number_1_img);
  834.            this._enemyHpNumber[i].visible = false;
  835.            this._actorHpNumber[i].x = Moghunter.theatrhythm_actor_hp_number_x;
  836.            this._actorHpNumber[i].y = Moghunter.theatrhythm_actor_hp_number_y;
  837.            this._spriteHudBase.addChild(this._actorHpNumber[i]);
  838.          };
  839. };

  840. //==============================
  841. // * Update ActorHpNumber
  842. //==============================
  843. Scene_Theatrhythm.prototype.update_actorHpNumber = function() {
  844.         var dif_number = this.update_dif(this._actorHp_Old,this._party_hp[0],20)
  845.         if (this._actorHp_Old != dif_number) {this._actorHp_Old = dif_number;
  846.         this.refresh_number(this._actorHpNumber,this._actorHp_Old ,this._actorHpNumber_data,this._actorHpNumber_data[2]);};
  847. };

  848. //==============================
  849. // * createLayout
  850. //==============================
  851. Scene_Theatrhythm.prototype.createChain = function() {       
  852.      this._chain = new Sprite(this._chain_img);
  853.          this._chain_data = [-1,-1];
  854.          this._chain.x = Moghunter.theatrhythm_chain_x;
  855.          this._chain.y = Moghunter.theatrhythm_chain_y;
  856.          this._chain.anchor.x = 0.5;
  857.          this._chain.anchor.y = 0.5;
  858.          this._chain.opacity = 0;
  859.          this._spriteHudBase.addChild(this._chain);
  860.          this._chain_number = [];
  861.          this._chain_number_data = [-1,-1];
  862.          for (var i = 0; i < 3; i++) {
  863.                   this._chain_number[i] = new Sprite(this._chain_number_img);
  864.                   this._chain_number[i].anchor.x = 0.5;
  865.                   this._chain_number[i].anchor.y = 0.5;                 
  866.                   this._chain_number[i].opacity = 0;
  867.                   this._spriteHudBase.addChild(this._chain_number[i]);
  868.          };
  869. };

  870. //==============================
  871. // * Refresh Chain
  872. //==============================
  873. Scene_Theatrhythm.prototype.refresh_chain = function(sprites,value,img_data,x) {
  874.         if (value > 99999999) {value = 99999999};
  875.         this._chain_dt[0] = value;
  876.         if (this._chain_dt[0] > this._chain_dt[1]) {this._chain_dt[1] = this._chain_dt[0]};
  877.     numbers = Math.abs(value).toString().split("");  
  878.            for (var i = 0; i < sprites.length ; i++) {sprites[i].visible = false;
  879.            if (i < numbers.length) {
  880.                    sprites[i].visible = true;
  881.                    sprites[i].opacity = 255;
  882.                    var n = Number(numbers[i]);
  883.                    sprites[i].setFrame(n * img_data[0], 0, img_data[0], img_data[1]);
  884.                    var nx = -(img_data[0] * i) + (img_data[0] *  numbers.length);
  885.                    sprites[i].x = (x - nx)
  886.            };
  887.     };
  888. };

  889. //==============================
  890. // * Update Chain
  891. //==============================
  892. Scene_Theatrhythm.prototype.update_chain = function() {
  893.          if (this._chain_dt[0]  != $gameSystem._theatrhythm_chain_data[0])        {
  894.                  this._chain_dt[0] = $gameSystem._theatrhythm_chain_data[0];
  895.                  if (this._chain_dt[0] > 0) {
  896.                          this._chain.scale.x = 2.0;
  897.                          this._chain.scale.y = this._chain.scale.x;
  898.                          this._chain.opacity = 255;
  899.              this.refresh_chain(this._chain_number,this._chain_dt[0],this._chain_number_data,this._chain_number_data[2]);
  900.                  };
  901.          };
  902.           if (this._chain_dt[0] === 0 || $gameSystem._theatrhythm_phase != 1) {this._chain.opacity -= 15};
  903.           if (this._chain.scale.x > 1.00) {this._chain.scale.x -= 0.1};         
  904.           this._chain.scale.y = this._chain.scale.x;
  905.       for (var i = 0; i < this._chain_number.length ; i++) {
  906.              this._chain_number[i].opacity = this._chain.opacity;
  907.                  this._chain_number[i].scale.x = this._chain.scale.x;
  908.                  this._chain_number[i].scale.y = this._chain_number[i].scale.x;
  909.           };
  910. };

  911. //==============================
  912. // * createTimeMeter
  913. //==============================
  914. Scene_Theatrhythm.prototype.createHpMeter = function() {       
  915.      this._hp_meter = new Sprite(this._hp_meter_img);
  916.          this._hp_meter_data = [-1,-1,0,0];
  917.          this._hp_meter.x = Moghunter.theatrhythm_hp_meter_x;
  918.          this._hp_meter.y = Moghunter.theatrhythm_hp_meter_y;
  919.          this._hp_meter.visible = false;
  920.          this._spriteHudBase.addChild(this._hp_meter);       
  921. };

  922. //==============================
  923. // * createTimeMeter
  924. //==============================
  925. Scene_Theatrhythm.prototype.update_hp_meter = function() {
  926.         this._hp_meter_data[2] += 3;
  927.         if (this._hp_meter_data[2]  > this._hp_meter_data[3]) {this._hp_meter_data[2] = 0};
  928.     var meter_rate = this._hp_meter_data[0] * this._party_hp[0] / this._party_hp[1];
  929.         this._hp_meter.setFrame(this._hp_meter_data[2],0, meter_rate, this._hp_meter_data[1]);
  930. };

  931. //==============================
  932. // * createTimeMeter
  933. //==============================
  934. Scene_Theatrhythm.prototype.createTimeMeter = function() {       
  935.      this._meter = new Sprite(this._time_meter_img);
  936.          this._meter_data = [-1,-1,0,0];
  937.          this._meter.x = Moghunter.theatrhythm_time_meter_x;
  938.          this._meter.y = Moghunter.theatrhythm_time_meter_y;
  939.          this._meter.visible = false;
  940.          this._spriteHudBase.addChild(this._meter);       
  941. };

  942. //==============================
  943. // * createTimeMeter
  944. //==============================
  945. Scene_Theatrhythm.prototype.update_time_meter = function() {
  946.         this._meter_data[2] += 15;
  947.         if (this._meter_data[2]  > this._meter_data[3]) {this._meter_data[2] = 0};
  948.     var meter_rate = this._meter_data[0] * this._enemy_hp[0] / this._enemy_hp[1];
  949.         this._meter.setFrame(this._meter_data[2],0, meter_rate, this._meter_data[1]);
  950. };
  951.        
  952. //==============================
  953. // * createFace
  954. //==============================
  955. Scene_Theatrhythm.prototype.createFace = function() {       
  956.      this._face_img = ImageManager.loadFace(this._battlers[0].faceName())
  957.      this._face = new Sprite(this._face_img);
  958.          this._face.x = Moghunter.theatrhythm_face_x;
  959.          this._face.y = Moghunter.theatrhythm_face_y;
  960.      var pw = Window_Base._faceWidth;
  961.      var ph = Window_Base._faceHeight;       
  962.      var sx = this._battlers[0].faceIndex() % 4 * pw;
  963.      var sy = Math.floor(this._battlers[0].faceIndex() / 4) * ph;         
  964.          this._face.setFrame(sx,sy,pw,ph);
  965.          this._face.scale.x = 64 / Window_Base._faceWidth;
  966.          this._face.scale.y = this._face.scale.x;
  967.          this._spriteHudBase.addChild(this._face);
  968. };

  969. //==============================
  970. // * createStrings
  971. //==============================
  972. Scene_Theatrhythm.prototype.createStrings = function() {                 
  973.          this._strings = [];
  974.          this._strings_data =  [this._string_img.width,this._string_img.height / 3];
  975.          for (var i = 0; i < this._layout_buttons2.length; i++) {
  976.                   this._strings[i] = new Sprite(this._string_img);
  977.                   this._strings[i].x = this._layout_buttons2[i].x + Moghunter.theatrhythm_string_x;
  978.                   this._strings[i].y = this._layout_buttons2[i].y + Moghunter.theatrhythm_string_y;
  979.                   this._strings[i].anchor.x = 0.5;
  980.                   this._strings[i].anchor.y = 0.5;
  981.                   this._spriteHudBase.addChild(this._strings[i]);       
  982.                   this.refresh_string(i,-1);
  983.          };
  984. };
  985.          
  986. //==============================
  987. // * refresh String
  988. //==============================
  989. Scene_Theatrhythm.prototype.refresh_string = function(i,type) {       
  990.        this._strings[i].opacity = 255;
  991.            this._strings[i].scale.x = 1.00;
  992.            this._strings[i].scale.y = 1.00;
  993.        this._strings[i].setFrame(0,this._strings_data[1] * type,this._strings_data[0],this._strings_data[1])
  994. };
  995.          
  996. //==============================
  997. // * createLayoutBase
  998. //==============================
  999. Scene_Theatrhythm.prototype.createLayoutBase = function() {
  1000.      this._layoutBase = new Sprite();
  1001.          this._spriteHudBase.addChild(this._layoutBase);
  1002. };

  1003. //==============================
  1004. // * createLayoutButtons
  1005. //==============================
  1006. Scene_Theatrhythm.prototype.createLayoutButtons = function() {
  1007.          this._buttons_position = [[],[],[],[]];
  1008.      this._layout_buttons = [];
  1009.          this._layout_buttons2 = [];
  1010.          this._layout_buttons_data = [-1,-1,-1,-1]
  1011.      for (var i = 0; i < this._actorSprites.length; i++) {
  1012.          this._layout_buttons[i] = new Sprite(this._layout_buttons_img2);
  1013.                  this._layout_buttons[i].anchor.x = 0.5;
  1014.                  this._layout_buttons[i].anchor.y = 0.5;
  1015.                  this._layout_buttons[i].blendMode = 1;
  1016.                  this._layout_buttons[i].opacity = 0;
  1017.                  this._layout_buttons[i].visible = false;
  1018.              this._spriteHudBase.addChild(this._layout_buttons[i]);
  1019.          this._layout_buttons2[i] = new Sprite(this._layout_buttons_img);
  1020.                  this._layout_buttons2[i].anchor.x = 0.5;
  1021.                  this._layout_buttons2[i].anchor.y = 0.5;
  1022.                  this._layout_buttons2[i].opacity = 0;
  1023.                  this._layout_buttons2[i].visible = false;
  1024.              this._spriteHudBase.addChild(this._layout_buttons2[i]);                 
  1025.          };
  1026. };

  1027. //==============================
  1028. // * createLayoutButtons
  1029. //==============================
  1030. Scene_Theatrhythm.prototype.update_layout_buttons = function() {
  1031.     for (var i = 0; i < this._layout_buttons.length; i++) {
  1032.        if ($gameSystem._theatrhythm_phase != 1) {this._layout_buttons2[i].opacity -= 10;
  1033.            } else {this._layout_buttons2[i].opacity += 10};
  1034.         };
  1035. };

  1036. //==============================
  1037. // * createLayoutButtons
  1038. //==============================
  1039. Scene_Theatrhythm.prototype.createButtons = function() {
  1040.      this._sprite_buttons = new Sprite_TKeys(this._buttons_img,this._buttons_position);
  1041.          this._spriteHudBase.addChild(this._sprite_buttons);
  1042. };

  1043. //==============================
  1044. // * getSpriteData
  1045. //==============================
  1046. Scene_Theatrhythm.prototype.getSpriteData = function() {
  1047.           this._layout_buttons_data[0] = this._layout_buttons_img.width / 2;
  1048.           this._layout_buttons_data[1] = this._layout_buttons_img.height / 2;
  1049.           this._layout_buttons_data[2] = Moghunter.theatrhythm_actor_x + Moghunter.theatrhythm_button_layout_x - this._layout_buttons_data[0];
  1050.           this._layout_buttons_data[3] = Moghunter.theatrhythm_actor_y + Moghunter.theatrhythm_button_layout_y - this._layout_buttons_data[1];
  1051.           for (var i = 0; i < this._layout_buttons.length; i++) {
  1052.              this._layout_buttons[i].x = this._layout_buttons_data[2] + Moghunter.theatrhythm_button_flash_x;
  1053.              this._layout_buttons[i].y = this._layout_buttons_data[3]  + (Moghunter.theatrhythm_actor_spc_y * i) + Moghunter.theatrhythm_button_flash_y;
  1054.                  this._layout_buttons[i].visible = true;
  1055.              this._layout_buttons2[i].x = this._layout_buttons_data[2];
  1056.              this._layout_buttons2[i].y = this._layout_buttons_data[3]  + (Moghunter.theatrhythm_actor_spc_y * i);
  1057.                  this._layout_buttons2[i].visible = true;                 
  1058.                  
  1059.                  this._buttons_position[i] = [this._layout_buttons2[i].x,this._layout_buttons2[i].y]
  1060.           };
  1061.       this._meter_data = [this._meter.bitmap.width / 3,this._meter.bitmap.height,0,(this._meter.bitmap.width / 3) * 2];
  1062.           this._meter.visible = true;
  1063.       this._hp_meter_data = [this._hp_meter.bitmap.width / 3,this._hp_meter.bitmap.height,0,(this._hp_meter.bitmap.width / 3) * 2];
  1064.           this._hp_meter.visible = true;
  1065.       this._point_data = [this._score_img.width / 10,this._score_img.height,Moghunter.theatrhythm_score_x];
  1066.           this._enemyHpNumber_data = [this._hp_number_1_img.width / 10,this._hp_number_1_img.height,Moghunter.theatrhythm_enemy_hp_number_x];
  1067.           this._actorHpNumber_data = [this._hp_number_1_img.width / 10,this._hp_number_1_img.height,Moghunter.theatrhythm_actor_hp_number_x];
  1068.           this._chain_data = [this._chain_img.width,this._chain_img.height];          
  1069.           this._chain.x = Moghunter.theatrhythm_chain_x + this._chain_data[0] / 2;
  1070.           this._chain.y = Moghunter.theatrhythm_chain_y + this._chain_data[1] / 2;
  1071.       this._chain_number_data = [this._chain_number_img.width / 10, this._chain_number_img.height,
  1072.       Moghunter.theatrhythm_chain_x + Moghunter.theatrhythm_chain_number_x,Moghunter.theatrhythm_chain_y + Moghunter.theatrhythm_chain_number_y];          
  1073.           for (var i = 0; i < this._chain_number.length; i++) {
  1074.                    this._chain_number[i].x = this._chain_number_data[2];
  1075.                   this._chain_number[i].y = this._chain_number_data[3];
  1076.             };         
  1077.           if (this._bp_visible) {
  1078.           this._battlePower[0].bitmap.drawText(this._enemy_bp,0,0,250,32,"center");
  1079.               this._battlePower[1].bitmap.drawText(this._party_bp,0,0,250,32,"center")        ;
  1080.           };
  1081.       this._phase_sprite_data = [this._phase_img.width,this._phase_img.height / 4]
  1082.           this._phase_sprite.x += this._phase_sprite_data[0] / 2;
  1083.           this._phase_sprite.y += this._phase_sprite_data[1] / 2;
  1084.           this._damage_data = [this._damage_img.width / 10,this._damage_img.height];
  1085.           this.createButtons();
  1086.           this.createStrings();
  1087. };

  1088. //==============================
  1089. // * createSpriteset
  1090. //==============================
  1091. Scene_Theatrhythm.prototype.createScenario = function() {
  1092.     this._back1Sprite = new TilingSprite();
  1093.         this._back1Sprite.move(0, 0, Graphics.boxWidth, Graphics.boxHeight);
  1094.         this._back1Sprite.anchor.x = 0.5;
  1095.         this._back1Sprite.anchor.y = 0.5;
  1096.         this._spriteField.addChild(this._back1Sprite);       
  1097.     this._back2Sprite = new TilingSprite();
  1098.         this._back2Sprite.anchor.x = 0.5;
  1099.         this._back2Sprite.anchor.y = 0.5;       
  1100.         this._spriteField.addChild(this._back2Sprite);
  1101.     this._back2Sprite.move(0, 0, Graphics.boxWidth, Graphics.boxHeight);
  1102.         this.refresh_background();
  1103. };

  1104. //==============================
  1105. // * RefreshBackground
  1106. //==============================
  1107. Scene_Theatrhythm.prototype.refresh_background = function() {
  1108.         this._back1Sprite.bitmap = ImageManager.loadBattleback1($gameMap.battleback1Name());
  1109.         this._back2Sprite.bitmap = ImageManager.loadBattleback2($gameMap.battleback2Name());
  1110.         this._back1Sprite.x = Graphics.boxWidth / 2;
  1111.         this._back1Sprite.y = Graphics.boxHeight / 2;
  1112.         this._back1Sprite.origin.x = Graphics.boxWidth / 2;
  1113.         this._back1Sprite.origin.y = Graphics.boxHeight / 2;
  1114.         this._back2Sprite.x = Graphics.boxWidth / 2;
  1115.         this._back2Sprite.y = Graphics.boxHeight / 2;       
  1116.         this._back2Sprite.origin.x = Graphics.boxWidth / 2;
  1117.         this._back2Sprite.origin.y = Graphics.boxHeight / 2;       
  1118. };

  1119. //==============================
  1120. // * Create Actors
  1121. //==============================
  1122. Scene_Theatrhythm.prototype.createActors = function() {
  1123.     this._actorSprites = [];
  1124.         this._actorSprites_Data = [-1,-1,-1,-1]
  1125.     for (var i = 0; i < this._battlers.length; i++) {
  1126.         this._actorSprites[i] = new Sprite_Actor();
  1127.         this._spriteField.addChild(this._actorSprites[i]);
  1128.     };
  1129. };

  1130. //==============================
  1131. // * Create Enemy
  1132. //==============================
  1133. Scene_Theatrhythm.prototype.createEnemy = function() {
  1134.         if (Imported.MOG_BattlerMotion) {
  1135.             this._sprite_shadow = new SpriteBattlerShadow();       
  1136.             this._spriteField.addChild(this._sprite_shadow);
  1137.         };
  1138.     this._enemy = new Game_Enemy($gameSystem._theatrhythm_data[0],Moghunter.theatrhythm_enemy_x, Moghunter.theatrhythm_enemy_y);               
  1139.     this._enemySprite = new Sprite_Enemy(this._enemy);
  1140.         this._spriteField.addChild(this._enemySprite);
  1141.         if (Imported.MOG_BattlerMotion) {           
  1142.             this._enemySprite.add_shadow(this._sprite_shadow);
  1143.         };
  1144. };
  1145.        
  1146. //==============================
  1147. // * Update Actors
  1148. //==============================
  1149. Scene_Theatrhythm.prototype.updateActors = function() {
  1150.     for (var i = 0; i < this._actorSprites.length; i++) {               
  1151.         this._actorSprites[i].setBattler(this._battlers[i]);                       
  1152.     };
  1153. };

  1154. //==============================
  1155. // * Update Actors
  1156. //==============================
  1157. Scene_Theatrhythm.prototype.update_commands = function() {
  1158.         if (Input.isTriggered("a")) {this.check_key(0)}
  1159.         else if (Input.isTriggered("s")) {this.check_key(1)}
  1160.         else if (Input.isTriggered("ok")) {this.check_key(2)}
  1161.         else if (Input.isTriggered("cancel")) {this.check_key(3)}
  1162.         else if (Input.isTriggered("up")) {this.check_key(4)}
  1163.         else if (Input.isTriggered("right")) {this.check_key(5)}
  1164.         else if (Input.isTriggered("left")) {this.check_key(6)}
  1165.         else if (Input.isTriggered("down")) {this.check_key(7)};
  1166. };

  1167. //==============================
  1168. // * Check Key
  1169. //==============================
  1170. Scene_Theatrhythm.prototype.check_key = function(key) {
  1171.         SoundManager.playCursor();
  1172.         this._sprite_buttons.keyisValid(key);
  1173.         if ($gameSystem._theatrhythm_key_data[0] != null) {this.refresh_effect();};
  1174. };

  1175. //==============================
  1176. // * Refresh Effect
  1177. //==============================
  1178. Scene_Theatrhythm.prototype.refresh_effect = function() {
  1179.          var pos_id = $gameSystem._theatrhythm_key_data[0];
  1180.          var string_id = $gameSystem._theatrhythm_key_data[1];
  1181.          if (!this._layout_buttons[pos_id]) {
  1182.                  $gameSystem._theatrhythm_key_data[0] = null;
  1183.                  $gameSystem._theatrhythm_key_data[1] = 0;                 
  1184.                  return;
  1185.          };
  1186.      this._layout_buttons[pos_id].opacity = 255;
  1187.          this.refresh_string(pos_id, string_id);         
  1188.          if (string_id != 0) {this.execute_hit_enemy(pos_id, string_id)}
  1189.          else {this.execute_missed()};
  1190.          $gameSystem._theatrhythm_key_data[0] = null;
  1191.      $gameSystem._theatrhythm_key_data[1] = 0;
  1192. };

  1193. //==============================
  1194. // * Execute Hit Enemy
  1195. //==============================
  1196. Scene_Theatrhythm.prototype.execute_hit_enemy = function(pos_id, string_id) {
  1197.          var ani_id = this._battlers[pos_id].attackAnimationId1();
  1198.          this._enemySprite._enemy.startAnimation(ani_id, false, 0);
  1199.          this._enemySprite._enemy.motion_shake();
  1200.          $gameSystem._theatrhythm_chain_data[0] += 1;
  1201.          if ($gameSystem._theatrhythm_chain_data[1] < $gameSystem._theatrhythm_chain_data[0]) {
  1202.                  $gameSystem._theatrhythm_chain_data[1] = $gameSystem._theatrhythm_chain_data[0]};
  1203.          if (this._result_data[0] < $gameSystem._theatrhythm_chain_data[0]) {this._result_data[0] = $gameSystem._theatrhythm_chain_data[0]};         
  1204.          this.add_score();
  1205.          this.execute_damage(0);
  1206. };

  1207. //==============================
  1208. // * Execute Hit Actor
  1209. //==============================
  1210. Scene_Theatrhythm.prototype.execute_hit_actor = function(pos_id, string_id) {       
  1211.          if (this._enemySprite._enemy._motion_action_data[0] != 0) { return };
  1212.      this._enemySprite._enemy.clear_action_data();
  1213.      this._enemySprite._enemy._motion_action_data[0] = 7;         
  1214.          if (this._party_hp[0] > 0) {
  1215.              this._target_id = Math.randomInt(this._battlers.length);
  1216.        this._battlers[this._target_id].startAnimation(this._enemySprite._enemy._theatrhythm_ani_id, false, 0);
  1217.          this._battlers[this._target_id].motion_shake();
  1218.       } else {
  1219.                   for (var i = 0; i < this._battlers.length; i++) {
  1220.             this._battlers[i].startAnimation(this._enemySprite._enemy._theatrhythm_ani_id, false, 0);
  1221.               this._battlers[i].motion_shake();                          
  1222.                   };
  1223.           };
  1224.           this.execute_damage(1);
  1225. };

  1226. //==============================
  1227. // * Execute Missed
  1228. //==============================
  1229. Scene_Theatrhythm.prototype.execute_missed = function(pos_id, string_id) {
  1230.          $gameSystem._theatrhythm_chain_data[0] = 0;
  1231.      this.execute_miss_damage();
  1232. };

  1233. //==============================
  1234. // * Execute Miss Damage
  1235. //==============================
  1236. Scene_Theatrhythm.prototype.execute_miss_damage = function(pos_id, string_id) {
  1237.          if ($gameSystem._theatrhythm_phase != 1) {return};
  1238.          $gameSystem._theatrhythm_miss_dmg = false;
  1239.          var dmg = this._party_hp[1] * Math.abs(Moghunter.theatrhythm_miss_dmg_per) / 100
  1240.          this._party_hp[0] -= dmg;
  1241.          this.execute_hit_actor()
  1242.          if (this._party_hp[0] <= 0) {this._party_hp[0] = 0;this.battle_end(11)};
  1243. };

  1244. //==============================
  1245. // * Execute Damage
  1246. //==============================
  1247. Scene_Theatrhythm.prototype.execute_damage = function(target) {
  1248.         if ($gameSystem._theatrhythm_phase != 1) {return};
  1249.     if (target === 0) {
  1250.                 var dmg = Math.max((this._party_atk - this._enemy_def),1);
  1251.                 if ($gameSystem._theatrhythm_key_data[1] == 2) {dmg *= Moghunter.theatrhythm_critical_bonus};
  1252.                 this._enemy_hp[0] -= Math.floor(dmg);
  1253.                 if (this._enemy_hp[0] <= 0) {this._enemy_hp[0] = 0; this._enemySprite._enemy.performCollapse();this.battle_end(10)};
  1254.         } else {
  1255.                 var dmg = Math.max((this._enemy_atk - this._party_def),1);
  1256.                 this._party_hp[0] -= Math.floor(dmg);
  1257.                 if (this._party_hp[0] <= 0) {this._party_hp[0] = 0;this.battle_end(11)};
  1258.         };
  1259.         this.refresh_damage(target,Math.floor(dmg));
  1260. };

  1261. //==============================
  1262. // * Battle_End
  1263. //==============================
  1264. Scene_Theatrhythm.prototype.battle_end = function(type) {
  1265.         if ($gameSystem._theatrhythm_phase != 1) {return};
  1266.         if (type === 10) {
  1267.              $gameSwitches._data[Moghunter.theatrhythm_result_switch_id] = true;
  1268.         } else {
  1269.                 $gameSwitches._data[Moghunter.theatrhythm_result_switch_id] = false;
  1270.         };               
  1271.         $gameSystem._theatrhythm_phase = type;
  1272.         if (type === 10) {
  1273.                 for (var i = 0; i < this._battlers.length; i++) {               
  1274.                 this._battlers[i].performVictory();}
  1275.         } else {
  1276.                 $gameParty.requestMotionRefresh();
  1277.         };
  1278. };

  1279. //==============================
  1280. // * Add Score
  1281. //==============================
  1282. Scene_Theatrhythm.prototype.add_score = function() {
  1283.         var value = Moghunter.theatrhythm_base_score + (Moghunter.theatrhythm_chain_bonus * $gameSystem._theatrhythm_chain_data[0])
  1284.         if ($gameSystem._theatrhythm_key_data[1] == 2) {value *= Moghunter.theatrhythm_critical_bonus};
  1285.     this._score[1] += Math.floor(value);
  1286.         if ($gameSystem._theatrhythm_score_data[1] < this.score()) {$gameSystem._theatrhythm_score_data[1] = this.score()};
  1287. };

  1288. //==============================
  1289. // * Chain Bonus
  1290. //==============================
  1291. Scene_Theatrhythm.prototype.chainBonus = function() {
  1292.          return Math.floor((this._result_data[0] * Moghunter.theatrhythm_result_chain_bonus) * this.score())
  1293. };

  1294. //==============================
  1295. // * Score
  1296. //==============================
  1297. Scene_Theatrhythm.prototype.score = function() {
  1298.         return Math.floor(this._score[1])
  1299. };

  1300. //==============================
  1301. // * Set Total
  1302. //==============================
  1303. Scene_Theatrhythm.prototype.set_total = function() {
  1304.         var n = this.score() + this._enemy_bp + this.chainBonus();
  1305.         return Math.floor(n);
  1306. };

  1307. //==============================
  1308. // * Update Phase
  1309. //==============================
  1310. Scene_Theatrhythm.prototype.update_phase = function() {
  1311.     switch ($gameSystem._theatrhythm_phase) {
  1312.                 case 0:
  1313.             this.update_start_phase();
  1314.             break;
  1315.                 case 10:
  1316.             this.update_victory_phase();
  1317.             break;
  1318.                 case 11:
  1319.             this.update_defeat_phase();
  1320.             break;       
  1321.    };   
  1322.    this._phase_sprite.scale.y = this._phase_sprite.scale.x;
  1323. };

  1324. //==============================
  1325. // * Update Start Phase
  1326. //==============================
  1327. Scene_Theatrhythm.prototype.update_start_phase = function() {
  1328.     switch (this._phase[0]) {
  1329.                 case 0:
  1330.                 this.refresh_phase_sprite(0);
  1331.                         this._phase[0] = 1;
  1332.                  break;
  1333.                 case 1:
  1334.                 this._phase_sprite.opacity += 3;
  1335.                         if (this._phase_sprite.scale.x > 1.00) {this._phase_sprite.scale.x -= 0.02};
  1336.                     if (this._phase_sprite.opacity >= 255) {this._phase[0] = 2};
  1337.                 break;
  1338.                 case 2:
  1339.                     if (Input.isTriggered("ok") || Input.isTriggered("cancel") || TouchInput.isTriggered()) {
  1340.                                 SoundManager.playCursor();this._phase[0] = 3;BattleManager.playBattleBgm()};
  1341.                     break;        
  1342.                 case 3:
  1343.                         this._phase_sprite.opacity -= 3;
  1344.                         this._phase_sprite.scale.x += 0.02;
  1345.                         if (this._phase_sprite.opacity <= 0) {$gameSystem._theatrhythm_phase = 1;this._phase[0] = 4};
  1346.                     break;                                
  1347.         };
  1348. };

  1349. //==============================
  1350. // * Update Victory Phase
  1351. //==============================
  1352. Scene_Theatrhythm.prototype.update_victory_phase = function() {
  1353.    switch (this._phase[1]) {
  1354.                 case 0:
  1355.                 this.refresh_phase_sprite(1);
  1356.                         this._phase[1] = 1;
  1357.                         AudioManager.fadeOutBgm(1);
  1358.                  break;
  1359.                 case 1:
  1360.                 this._phase_sprite.opacity += 3;
  1361.                         if (this._phase_sprite.scale.x > 1.00) {this._phase_sprite.scale.x -= 0.02}
  1362.                     if (this._phase_sprite.opacity >= 255) {this._phase[1] = 3;BattleManager.playVictoryMe()};
  1363.                 break;
  1364.                 case 2:
  1365.                     if (Input.isTriggered("ok") || Input.isTriggered("cancel") || TouchInput.isTriggered()) {
  1366.                                 SoundManager.playCursor();this._phase[1] = 3};
  1367.                     break;        
  1368.                 case 3:
  1369.                     this._phase_sprite.opacity -= 3;
  1370.                         this._phase_sprite.scale.x += 0.02;       
  1371.                         if (this._phase_sprite.opacity <= 0) {this.display_result()};       
  1372.                         break;                       
  1373.                 case 4:
  1374.                 this._phase_sprite.opacity += 3;                       
  1375.                         if (this._phase_sprite.scale.x > 1.00) {this._phase_sprite.scale.x -= 0.02}
  1376.                     if (this._phase_sprite.opacity >= 255) {this._phase[1] = 5};
  1377.                 break;                       
  1378.                 case 5:
  1379.                     if (Input.isTriggered("ok") || Input.isTriggered("cancel") || TouchInput.isTriggered()) {
  1380.                                 SoundManager.playCursor();this._phase[1] = 6};
  1381.                     break;                       
  1382.                 case 6:       
  1383.                         this._phase_sprite.opacity -= 3;                       
  1384.                         if (this._phase_sprite.opacity <= 0) {this.fadeOutAll();$gameSystem._theatrhythm_phase = 12;this._phase[1] = 7;SceneManager.pop()};
  1385.                     break;                                
  1386.         };
  1387.         this._text_sprite.opacity = this._phase_sprite.opacity;       
  1388.         this._text_sprite.scale.x = this._phase_sprite.scale.x;
  1389.         this._text_sprite.scale.y = this._phase_sprite.scale.y;
  1390.         this._text2_sprite.opacity = this._phase_sprite.opacity;
  1391.         this._text2_sprite.scale.x = this._phase_sprite.scale.x;
  1392.         this._text2_sprite.scale.y = this._phase_sprite.scale.y;               
  1393. };

  1394. //==============================
  1395. // * Display Result
  1396. //==============================
  1397. Scene_Theatrhythm.prototype.display_result = function() {
  1398.         this._phase[1] = 4;
  1399.         this.refresh_phase_sprite(3);
  1400.         this.gain_rewards();
  1401.     this.draw_result();
  1402. };

  1403. //==============================
  1404. // * Gain Rewards
  1405. //==============================
  1406. Scene_Theatrhythm.prototype.gain_rewards = function() {
  1407.    $gameVariables._data[Moghunter.theatrhythm_variable_id] += this.set_total();
  1408. };

  1409. //==============================
  1410. // * Draw Result
  1411. //==============================
  1412. Scene_Theatrhythm.prototype.draw_result = function() {
  1413.         this._text_sprite.bitmap.drawText(this.score(),0,0,200,32,"right");
  1414.         this._text_sprite.bitmap.drawText("(" + String(this._result_data[0]) + ") " + String(this.chainBonus()),0,32,200,32,"right");
  1415.         this._text_sprite.bitmap.drawText(this._enemy_bp,0,64,200,32,"right");
  1416.         this._text_sprite.bitmap.drawText(this.set_total(),0,96,200,32,"right");
  1417.         this._text2_sprite.bitmap.drawText($gameVariables._data[Moghunter.theatrhythm_variable_id],0,0,200,100,"left");
  1418. };

  1419. //==============================
  1420. // * Update Defeat Phase
  1421. //==============================
  1422. Scene_Theatrhythm.prototype.update_defeat_phase = function() {
  1423.     switch (this._phase[2]) {
  1424.                 case 0:
  1425.                 this.refresh_phase_sprite(2);
  1426.                         this._phase[2] = 1;
  1427.                         AudioManager.fadeOutBgm(2);
  1428.                  break;
  1429.                 case 1:
  1430.                 this._phase_sprite.opacity += 3;
  1431.                         if (this._phase_sprite.scale.x > 1.00) {this._phase_sprite.scale.x -= 0.02};
  1432.                     if (this._phase_sprite.opacity >= 255) {this._phase[2] = 2};
  1433.                 break;
  1434.                 case 2:
  1435.                     if (Input.isTriggered("ok") || Input.isTriggered("cancel") || TouchInput.isTriggered()) {
  1436.                                 SoundManager.playCursor();this._phase[2] = 3};
  1437.                     break;        
  1438.                 case 3:
  1439.                         this._phase_sprite.opacity -= 3;
  1440.                         this._phase_sprite.scale.x += 0.02;
  1441.                         if (this._phase_sprite.opacity <= 0) {this.fadeOutAll();$gameSystem._theatrhythm_phase = 12;this._phase[2] = 4;SceneManager.pop();}
  1442.                     break;                                
  1443.         };
  1444. };

  1445. //==============================
  1446. // * Refresh Enemy Position
  1447. //==============================
  1448. Scene_Theatrhythm.prototype.refresh_enemy_position = function() {
  1449.       this._enemySprite._homeY += this._enemySprite.bitmap.height / 2;
  1450.           this._enemy_ref = true;
  1451. };

  1452. //==============================
  1453. // * Terminate
  1454. //==============================
  1455. Scene_Theatrhythm.prototype.terminate = function() {
  1456.         Scene_Base.prototype.terminate.call(this);
  1457.         BattleManager.replayBgmAndBgs();
  1458.         $gameSystem._theatrhythm = false;
  1459. };

  1460. //==============================
  1461. // * Update
  1462. //==============================
  1463. Scene_Theatrhythm.prototype.update = function() {
  1464.     Scene_Base.prototype.update.call(this);
  1465.     this.updateActors();       
  1466.         if (this._layout_buttons_data[0] === -1) {
  1467.                 if (this._layout_buttons_img.isReady()) {this.getSpriteData()};
  1468.                 return;
  1469.         };
  1470.         this.update_layout_buttons();
  1471.         for (var i = 0; i < this._layout_buttons.length; i++) {
  1472.                 this._layout_buttons[i].opacity -= 5;
  1473.                 this._strings[i].opacity -= 10;
  1474.                 if (this._strings[i].opacity > 0) {this._strings[i].scale.x += 0.05}
  1475.                 this._strings[i].scale.y = this._strings[i].scale.x;
  1476.         };
  1477.          if (!this._enemy_ref && this._enemySprite.bitmap.isReady()) {this.refresh_enemy_position()};
  1478.         if (this._meter_data[0] != -1) {this.update_time_meter()};
  1479.         if (this._hp_meter_data[0] != -1) {this.update_hp_meter()};
  1480.         if (this._point_data[0] != -1) {this.update_score();};
  1481.         if (this._enemyHpNumber_data[0] != -1) {this.update_enemyHpNumber()};
  1482.         if (this._actorHpNumber_data[0] != -1) {this.update_actorHpNumber()};
  1483.         if (this._chain_data[0] != -1) {this.update_chain();};
  1484.         if (this._damage_data[0] != -1) {this.update_damage()};
  1485.         if ($gameSystem._theatrhythm_phase === 1) {this.update_commands();};
  1486.         if ($gameSystem._theatrhythm_miss_dmg) {this.execute_miss_damage();};
  1487.         this.update_phase();
  1488. };

  1489. //=============================================================================
  1490. // ** Sprite TKeys
  1491. //=============================================================================       
  1492. function Sprite_TKeys() {
  1493.     this.initialize.apply(this, arguments);
  1494. }

  1495. Sprite_TKeys.prototype = Object.create(Sprite_Base.prototype);
  1496. Sprite_TKeys.prototype.constructor = Sprite_TKeys;

  1497. //==============================
  1498. // * Initialize
  1499. //==============================
  1500. Sprite_TKeys.prototype.initialize = function(img,pos) {
  1501.     Sprite_Base.prototype.initialize.call(this);
  1502.         this._image = img;
  1503.         this._cw = this._image.width  / 8;
  1504.         this._ch =  this._image.height;
  1505.         this._positions = pos;
  1506.         this._keys_speed = $gameSystem._theatrhythm_data[1];
  1507.         this._button_ok= null;
  1508.         this._batlers = $gameParty.battleMembers();
  1509.         this._limit = [this._positions[0][0] + this._cw + (this._cw / 4),
  1510.                        this._positions[0][0] + (this._cw * 3),
  1511.                                    this._positions[0][0] + this._cw + (this._cw),
  1512.                                    this._positions[0][0] + (this._cw * 2) + (this._cw / 3),
  1513.                                    Graphics.boxWidth + this._cw,
  1514.                                    ];
  1515.         this.create_keys();
  1516. };

  1517. //==============================
  1518. // * Create Keys
  1519. //==============================
  1520. Sprite_TKeys.prototype.create_keys = function() {
  1521.    this._keys = [];   
  1522.    this._keys_c = [];
  1523.    this._keys_f = [];
  1524.    this._keys_i = [];
  1525.    this._keys_h = [];
  1526.    this._keys_r = [];
  1527.    this._keys_s = [];
  1528.    for (var i = 0; i < 6; i++) {
  1529.              this._keys_c[i] = 0;
  1530.                  this._keys_f[i] = false;
  1531.                  this._keys_h[i] = 0;
  1532.                  this._keys_i[i] = this.key_space(i);
  1533.                  this._keys_r[i] = false;
  1534.                  this._keys_s[i] = false;
  1535.              this._keys[i] = new Sprite(this._image)
  1536.                  this._keys[i].x = this._limit[4];
  1537.                  this._keys[i].anchor.x = 0.5;
  1538.                  this._keys[i].anchor.y = 0.5;
  1539.                  this._keys[i].opacity = 0;
  1540.                  this.addChild(this._keys[i]);                 
  1541.    };
  1542. };

  1543. //==============================
  1544. // * Key Space
  1545. //==============================
  1546. Sprite_TKeys.prototype.key_space = function(i) {
  1547.          return ((this._cw +  Graphics.boxWidth / 4) / this._keys_speed) * i;
  1548. };

  1549. //==============================
  1550. // * Refresh Keys
  1551. //==============================
  1552. Sprite_TKeys.prototype.refresh_keys = function(i) {
  1553.         this._keysX = [];
  1554.         for (var e = 0; e < this._keys.length; e++) {this._keysX.push(this._keys[e].x);};
  1555.         this._keysX.sort(function(a, b){return a-b});
  1556.         var difX = (this._keys[i].x - this._limit[4]);
  1557.         this._keys_f[i] = false;
  1558.         this._keys_c[i] = Math.randomInt(8);
  1559.         this._keys_h[i] = Math.randomInt(this._batlers.length);
  1560.         this._keys_r[i] = true;
  1561.         this._keys_s[i] = false;
  1562.         var h = this._positions[this._keys_h[i]][1];
  1563.         this._keys[i].setFrame(this._cw * this._keys_c[i],0,this._cw,this._ch)
  1564.         this._keys[i].x = -(this._cw + this._keys_i[i] - difX);
  1565.         this._keys[i].y = h;
  1566.         this._keys[i].scale.x = 1.00;
  1567.         this._keys[i].scale.y = 1.00;
  1568.         this._keys[i].opacity = 0;
  1569.         if (this._keys[i].x > (this._keysX[0] - (this._cw +  Graphics.boxWidth / 6)) ) {this._keys[i].x = (this._keysX[0] - (this._cw +  Graphics.boxWidth / 6))};
  1570. };

  1571. //==============================
  1572. // * KeysisValid
  1573. //==============================
  1574. Sprite_TKeys.prototype.keyisValid = function(key) {
  1575.         for (var i = 0; i < this._keys.length; i++) {
  1576.              if (this.checkKey(key,i,0)) {this.execute_ok(i,key)};
  1577.         };
  1578.         if ($gameSystem._theatrhythm_key_data[0] == null) {
  1579.                 for (var i = 0; i < this._keys.length; i++) {
  1580.                    this.execute_miss(key,i);
  1581.                 };
  1582.     };
  1583. };

  1584. //==============================
  1585. // * Execute Miss
  1586. //==============================
  1587. Sprite_TKeys.prototype.execute_miss = function(key,i) {
  1588.         if ($gameSystem._theatrhythm_key_data[0] != null) {return};
  1589.         var keys_temp = [];
  1590.         for (var e = 0; e < this._keys.length; e++) {
  1591.                 if (this._keys[e].x <= this._limit[1]) {keys_temp.push([this._keys[e].x,this._keys_h[e]]);};
  1592.         };
  1593.         keys_temp.sort(function(a, b){return b[0]-a[0]});
  1594.         $gameSystem._theatrhythm_key_data[0] = keys_temp[0][1];
  1595.         $gameSystem._theatrhythm_key_data[1] = 0;
  1596. };

  1597. //==============================
  1598. // * Execute OK
  1599. //==============================
  1600. Sprite_TKeys.prototype.execute_ok = function(i,key) {
  1601.         if (!this._batlers[this._keys_h[i]]) {return};
  1602.     this._batlers[this._keys_h[i]].performAttack();
  1603.         $gameSystem._theatrhythm_key_data[0] = this._keys_h[i];
  1604.          if (this.checkKey(key,i,1)) {$gameSystem._theatrhythm_key_data[1] = 2}
  1605.          else {$gameSystem._theatrhythm_key_data[1] = 1};
  1606.          this._keys_f[i] = true;
  1607. };

  1608. //==============================
  1609. // * checkKey
  1610. //==============================
  1611. Sprite_TKeys.prototype.checkKey = function(key,i,type) {
  1612.         if (this._keys_f[i]) {return false};
  1613.         if (key != this._keys_c[i]) {return false};
  1614.         if (type === 0) {
  1615.             if (this._keys[i].x < this._limit[0]) {return false};
  1616.             if (this._keys[i].x > this._limit[1]) {return false};
  1617.         } else {
  1618.             if (this._keys[i].x < this._limit[2]) {return false};
  1619.             if (this._keys[i].x > this._limit[3]) {return false};        
  1620.         };
  1621.     return true;
  1622. };

  1623. //==============================
  1624. // * Update
  1625. //==============================
  1626. Sprite_TKeys.prototype.update = function(i) {
  1627.     Sprite_Base.prototype.update.call(this);
  1628.         for (var i = 0; i < this._keys.length; i++) {this.update_keys(i)};
  1629. };

  1630. //==============================
  1631. // * Update Keys
  1632. //==============================
  1633. Sprite_TKeys.prototype.update_keys = function(i) {
  1634.         if (this._keys_i[i] > 0) {this._keys_i[i] -= 1;return};
  1635.         if ($gameSystem._theatrhythm_phase != 1) {this._keys[i].opacity -= 10; return;};
  1636.         if (this._keys_f[i]) {this.update_fade(i);}
  1637.         else {this.update_position(i)                  
  1638.         };
  1639.         if (this.need_reset_key(i)) {this.refresh_keys(i)};       
  1640. };       

  1641. //==============================
  1642. // * Update Keys
  1643. //==============================
  1644. Sprite_TKeys.prototype.update_position = function(i) {
  1645.         this._keys[i].x += this._keys_speed;
  1646.         if (this._keys[i].x > this._limit[1] && this._keys[i].opacity > 0) {this._keys[i].opacity -= 7;
  1647.              if (!this._keys_s[i] && this._keys_r[i]) {this.slow_pressed(i);}
  1648.         }
  1649.         else {
  1650.              this._keys[i].opacity += 25;
  1651.         };
  1652. };
  1653.        
  1654. //==============================
  1655. // * Update Keys
  1656. //==============================
  1657. Sprite_TKeys.prototype.update_fade = function(i) {
  1658.         this._keys[i].scale.x += 0.05;
  1659.         this._keys[i].scale.y = this._keys[i].scale.x;
  1660.         this._keys[i].opacity -= 25;
  1661. };
  1662.        
  1663. //==============================
  1664. // * Slow Pressed
  1665. //==============================
  1666. Sprite_TKeys.prototype.slow_pressed = function(i) {       
  1667.    this._keys_s[i] = true;
  1668.    $gameSystem._theatrhythm_chain_data[0] = 0;
  1669.    $gameSystem._theatrhythm_miss_dmg = true;
  1670. };
  1671.        
  1672. //==============================
  1673. // * Update Keys
  1674. //==============================
  1675. Sprite_TKeys.prototype.need_reset_key = function(i) {
  1676.         if (this._keys[i].x > this._limit[4]) {return true};
  1677.         if (this._keys[i].opacity === 0) {return true};
  1678.         return false;
  1679. };

  1680. //=============================================================================
  1681. // ** Sprite Actor
  1682. //=============================================================================       
  1683. var _alias_mog_Theatrhythm_updateTargetPosition = Sprite_Actor.prototype.updateTargetPosition;
  1684. Sprite_Actor.prototype.updateTargetPosition = function() {
  1685.         if ($gameSystem._theatrhythm) {return};
  1686.         _alias_mog_Theatrhythm_updateTargetPosition.call(this);
  1687. };

  1688. //==============================
  1689. // * setActorHome
  1690. //==============================
  1691. var _alias_mog_Theatrhythm_setActorHome = Sprite_Actor.prototype.setActorHome;
  1692. Sprite_Actor.prototype.setActorHome = function(index) {
  1693.     if ($gameSystem._theatrhythm) {this.setHome(Moghunter.theatrhythm_actor_x, Moghunter.theatrhythm_actor_y + index * Moghunter.theatrhythm_actor_spc_y);return};
  1694.         _alias_mog_Theatrhythm_setActorHome.call(this,index);
  1695. };

  1696. //==============================
  1697. // * refreshMotion
  1698. //==============================
  1699. var _alias_mog_Theatrhythm_refreshMotion = Sprite_Actor.prototype.refreshMotion;
  1700. Sprite_Actor.prototype.refreshMotion = function() {
  1701.         if ($gameSystem._theatrhythm) {this.refreshMotion_Theatrhythm();return};
  1702.         _alias_mog_Theatrhythm_refreshMotion.call(this);
  1703. };
  1704.        
  1705. //==============================
  1706. // * refreshMotion_Theatrhythm
  1707. //==============================
  1708. Sprite_Actor.prototype.refreshMotion_Theatrhythm = function() {       
  1709.     var actor = this._actor;
  1710.     if (actor) {
  1711.                  if ($gameSystem._theatrhythm_phase === 11) {
  1712.             this.startMotion('dead');
  1713.          } else {
  1714.             this.startMotion('walk');
  1715.          };
  1716.     };
  1717. };
复制代码
360截图20170728123705930.jpg
360截图20170728123716814.jpg
------落尽红樱君不见,轻绘梨花泪沾衣。~~~
梦石
0
星屑
39336
在线时间
11161 小时
注册时间
2009-3-15
回帖
4768
发表于 2017-7-28 14:15:13 | 显示全部楼层
@param Party HP Number X

点评

不好意思 也许我没有表达清楚  发表于 2017-7-28 14:29
我需要的是添加更多的显示数字不是移动坐标,。。。  发表于 2017-7-28 14:29
回复

使用道具 举报

梦石
0
星屑
2457
在线时间
912 小时
注册时间
2014-10-14
回帖
1155

开拓者

 楼主| 发表于 2017-7-28 14:31:02 | 显示全部楼层
soulsaga 发表于 2017-7-28 14:15
@param Party HP Number X

比方说最大限度 只能显示90万
能不能显示900万 或者9000万的
------落尽红樱君不见,轻绘梨花泪沾衣。~~~
回复

使用道具 举报

梦石
0
星屑
39336
在线时间
11161 小时
注册时间
2009-3-15
回帖
4768
发表于 2017-7-28 15:39:38 | 显示全部楼层
this._enemyHpNumber_data = [this._hp_number_1_img.width / 10,this._hp_number_1_img.height,Moghunter.theatrhythm_enemy_hp_number_x];

1125行应该是你要找的..你再自己研究看看..

点评

MOG_BossHP 还有这个 也不能破限。。。  发表于 2017-7-28 17:14
是MOG整合里面的  发表于 2017-7-28 16:31
你给一下这插件地址..似乎还有图像?  发表于 2017-7-28 16:29
不会修改。。我还有2个跟这个一模一样的问题知道位置 不会改。。。  发表于 2017-7-28 16:25
回复

使用道具 举报

梦石
0
星屑
2457
在线时间
912 小时
注册时间
2014-10-14
回帖
1155

开拓者

 楼主| 发表于 2017-7-28 16:30:12 | 显示全部楼层
soulsaga 发表于 2017-7-28 15:39
this._enemyHpNumber_data = [this._hp_number_1_img.width / 10,this._hp_number_1_img.height,Moghunter. ...


链接: http://pan.baidu.com/s/1skAJNnZ 密码: ixwc
点评

VA 我也是叫人帮忙修改的 MV跟VA 不同。。

  1.   #--------------------------------------------------------------------------
  2.   # ● Create HP Number
  3.   #--------------------------------------------------------------------------   
  4.   def create_hp_number
  5.       @hp2 = $game_system.boss_hp_meter[4]
  6.       @hp3 = @hp2
  7.       @hp_old2 = @hp2
  8.       @hp_ref = @hp_old2
  9.       @hp_refresh = false   
  10.       @hp_number_image = $game_temp.cache_boss_hp[2]
  11.       @hp_cw = @hp_number_image.width / 10
  12.       @hp_ch = @hp_number_image.height / 2
  13.       @hp_ch2 = 0
  14.       @hp_ch_range = HP_NUMBER_WAVE_EFFECT == true ? @hp_ch / 3 : 0
  15.       @hp_number_sprite = Sprite.new
  16.       @hp_number_sprite.bitmap = Bitmap.new(@hp_number_image.width+300, @hp_ch * 2) 这里可以修改  之后可以破限 MV不知道在哪里改
  17.       @hp_number_sprite.z = @layout.z
  18.       @hp_number_sprite.x = @layout.x + HP_NUMBER_POSITION[0]
  19.       @hp_number_sprite.y = @layout.y + HP_NUMBER_POSITION[1]
  20.       @hp_number_sprite.viewport = @hp_vieport
  21.       @hp_number_sprite.visible = $game_system.boss_hp_meter[9]
  22.       refresh_hp_number
  23.   end
  24.   
复制代码

点评

。。。。所以请人帮忙解决。。。。  发表于 2017-7-28 18:34
破限了还是不能输入超过6位啊  发表于 2017-7-28 18:13
我的错重新给你发过来了  发表于 2017-7-28 18:07
你是不是给错了插件了?这个YEP只有伤害破限..  发表于 2017-7-28 17:59
我知道了..  发表于 2017-7-28 17:57
------落尽红樱君不见,轻绘梨花泪沾衣。~~~
回复

使用道具 举报

梦石
0
星屑
2457
在线时间
912 小时
注册时间
2014-10-14
回帖
1155

开拓者

 楼主| 发表于 2017-7-28 17:58:22 | 显示全部楼层
j296196585 发表于 2017-7-28 16:30
链接: http://pan.baidu.com/s/1skAJNnZ 密码: ixwc
点评

打开开关
找到以下地址 全部。。999999999
360截图20170728175914119.jpg
360截图20170728175930072.jpg
------落尽红樱君不见,轻绘梨花泪沾衣。~~~
回复

使用道具 举报

梦石
0
星屑
2457
在线时间
912 小时
注册时间
2014-10-14
回帖
1155

开拓者

 楼主| 发表于 2017-7-28 18:36:50 | 显示全部楼层
j296196585 发表于 2017-7-28 16:30
链接: http://pan.baidu.com/s/1skAJNnZ 密码: ixwc
点评

<hp: 9000000>  你还要在敌人那注释
------落尽红樱君不见,轻绘梨花泪沾衣。~~~
回复

使用道具 举报

梦石
0
星屑
39336
在线时间
11161 小时
注册时间
2009-3-15
回帖
4768
发表于 2017-7-28 20:07:33 | 显示全部楼层
本帖最后由 soulsaga 于 2017-7-28 20:13 编辑
j296196585 发表于 2017-7-28 18:36
你还要在敌人那注释


结果如下..
MOG_BossHP.js插件里搜
for (var i = 0; i < 6
把所有搜到的6都改成你想改的HP位数就行..
QQQ.png

评分

参与人数 1星屑 +20 收起 理由
j296196585 + 20 认可答案

查看全部评分

回复

使用道具 举报

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

本版积分规则

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

在本版发帖返回顶部