查看: 982|回复: 0

[已经过期] 聲音插件 存檔沒辦法用

[复制链接]
梦石
0
星屑
497
在线时间
266 小时
注册时间
2015-12-8
回帖
729
发表于 2016-2-18 21:51:15 | 显示全部楼层 |阅读模式

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

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

×
必須新建工程才能用,用舊的遊戲存檔沒辦法使用~是甚麼原因?



  1. //=============================================================================
  2. // MOG_BattleCry.js
  3. //=============================================================================

  4. /*:
  5. * @plugindesc (v1.0) Adiciona vozes na batalha.
  6. * @author Moghunter
  7. *
  8. * @param Volume
  9. * @desc Definição do volume.
  10. * @default 120
  11. *
  12. * @help  
  13. * =============================================================================
  14. * +++ MOG - Battle Cry (v1.0) +++
  15. * By Moghunter
  16. * [url]https://atelierrgss.wordpress.com/[/url]
  17. * =============================================================================
  18. * Adiciona vozes na batalha (ação, dano, vitória,etc...)
  19. * Para definir as vozes é necessário editar o plugin manualmente.
  20. * A edição do plugin deve ser feita a partir da linha 70.
  21. *
  22. */

  23. //=============================================================================
  24. // ** PLUGIN PARAMETERS
  25. //=============================================================================

  26.     // Não modifique essa parte.
  27.     // ☢CAUTION!!☢ Don't Touch.^_^ ----------------------------------------
  28.   var Imported = Imported || {};
  29.   Imported.MOG_BattleCry = true;
  30.   var Moghunter = Moghunter || {};        
  31.         Moghunter.parameters = PluginManager.parameters('MOG_BattleCry');
  32.         Moghunter.v_volume = Number(Moghunter.parameters['Volume'] || 100);
  33.     Moghunter.v_actor_start = [];
  34.         Moghunter.v_actor_turn = [];
  35.         Moghunter.v_actor_default_action = [];
  36.         Moghunter.v_actor_skill = [];
  37.         Moghunter.v_actor_item = [];
  38.         Moghunter.v_actor_damage = [];
  39.         Moghunter.v_actor_evaded = [];
  40.         Moghunter.v_actor_dead = [];
  41.     Moghunter.v_actor_recover = [];
  42.         Moghunter.v_actor_counter = [];
  43.         Moghunter.v_actor_reflection = [];
  44.         Moghunter.v_actor_victory = [];
  45.         Moghunter.v_actor_escape = [];
  46.         Moghunter.v_enemy_default_action = [];
  47.         Moghunter.v_enemy_damage = [];
  48.         Moghunter.v_enemy_evaded = [];
  49.         Moghunter.v_enemy_counter = [];
  50.         Moghunter.v_enemy_reflection = [];       
  51.         Moghunter.v_enemy_dead = [];
  52.     Moghunter.v_enemy_recover = [];
  53.         Moghunter.v_enemy_skill = [];
  54.     // ☢CAUTION!!☢ Don't Touch.^_^ ----------------------------------------
  55.        
  56.        
  57.        
  58.        
  59.         // SETUP ----------------------------------------------------------------
  60.         // Exemplo de configuração geral, o modo de configurar é igual para todas
  61.         // ações.
  62.         //
  63.         // Moghunter.v_actor_start[A] = [B,B,B,B...]
  64.         //
  65.         // A - Actor ID
  66.         // B - File Name
  67.         //
  68.         // -----------------------------------------------------------------------
  69.        
  70.         // -----------------------------------------------------------------------
  71.         // ACTOR - BATTLE START
  72.         // -----------------------------------------------------------------------
  73.         Moghunter.v_actor_start[1] = ["P1_Start_01","P1_Start_02"];
  74.         Moghunter.v_actor_start[2] = ["P2_Start_01","P2_Start_02"];
  75.         Moghunter.v_actor_start[3] = ["P3_Start_01","P3_Start_02"];
  76.         Moghunter.v_actor_start[4] = ["P4_Start_01","P4_Start_02"];
  77.         // -----------------------------------------------------------------------
  78.         // ACTOR - BATTLE TURN
  79.         // -----------------------------------------------------------------------               
  80.         Moghunter.v_actor_turn[1] = ["P1_Turn_01","P1_Turn_02"];
  81.         Moghunter.v_actor_turn[2] = ["P2_Turn_01","P2_Turn_02","P2_Turn_03"];
  82.         Moghunter.v_actor_turn[3] = ["P3_Turn_01","P3_Turn_02"];
  83.         Moghunter.v_actor_turn[4] = ["P4_Turn_01","P4_Turn_02","P4_Turn_03"];
  84.         // -----------------------------------------------------------------------
  85.         // ACTOR - DEFAULT ACTION (Skill/ITEM)
  86.         // -----------------------------------------------------------------------               
  87.         Moghunter.v_actor_default_action[1] = ["P1_Action_01","P1_Action_02","P1_Action_03"];
  88.         Moghunter.v_actor_default_action[2] = ["P2_Action_01","P2_Action_02","P2_Action_03"];
  89.         Moghunter.v_actor_default_action[3] = ["P3_Action_01","P3_Action_02","P3_Action_03"];
  90.         Moghunter.v_actor_default_action[4] = ["P4_Action_01","P4_Action_02","P4_Action_03"];
  91.         // -----------------------------------------------------------------------
  92.         // ACTOR - SKILL
  93.         // -----------------------------------------------------------------------       
  94.         // Moghunter.v_actor_skill[A] = {B:[C,C,C,C,...] }
  95.         //
  96.         // A - Actor ID
  97.         // B - Skill ID
  98.         // C - File Name
  99.         // -----------------------------------------------------------------------       
  100.     Moghunter.v_actor_skill[1] = {
  101.                  9:["P1_Action_04","P1_Action_05","P1_Action_06"], // Fire
  102.              10:["P1_Action_07","P1_Action_08","P1_Action_09"] // Spark
  103.         };
  104.         Moghunter.v_actor_skill[2] = {
  105.                  8:["P2_Action_06","P2_Turn_03"], // Heal
  106.                  9:["P2_Action_04","P2_Action_08","P2_Action_09"], // Fire
  107.                  17:["P2_Action_06","P2_Turn_03"] // Heal All
  108.     };
  109.         Moghunter.v_actor_skill[3] = {
  110.                  3:["P3_Action_06","P3_Action_07","P3_Action_08"] // Dual Attack
  111.         };
  112.         Moghunter.v_actor_skill[4] = {
  113.                  10:["P4_Action_04","P4_Action_05","P4_Action_06","P4_Action_07","P4_Action_08"] // Spark
  114.         };
  115.         // -----------------------------------------------------------------------
  116.         // ACTOR - ITEM
  117.         // -----------------------------------------------------------------------       
  118.     Moghunter.v_actor_item[1] = {
  119.                 1:["P1_Action_01","P1_Action_02","P1_Action_03"],  // Potion
  120.             3:["P1_Action_01","P1_Action_02","P1_Action_03"]}; // Full Potion
  121.         Moghunter.v_actor_item[2] = {1:["P2_Action_01","P2_Action_02","P2_Action_03"]};
  122.         Moghunter.v_actor_item[3] = {1:["P3_Action_01","P3_Action_02","P3_Action_03"]};
  123.         Moghunter.v_actor_item[4] = {1:["P4_Action_01","P4_Action_02","P4_Action_03"]};       
  124.         // -----------------------------------------------------------------------
  125.         // ACTOR - DAMAGE
  126.         // -----------------------------------------------------------------------               
  127.         Moghunter.v_actor_damage[1] = ["P1_Damage_01","P1_Damage_02","P1_Damage_03"];
  128.         Moghunter.v_actor_damage[2] = ["P2_Damage_01","P2_Damage_02","P2_Damage_03"];
  129.         Moghunter.v_actor_damage[3] = ["P3_Damage_01","P3_Damage_02","P3_Damage_03"];
  130.         Moghunter.v_actor_damage[4] = ["P4_Damage_01","P4_Damage_02","P4_Damage_03"];
  131.         // -----------------------------------------------------------------------
  132.         // ACTOR - EVADED  &   MISS
  133.         // -----------------------------------------------------------------------               
  134.         Moghunter.v_actor_evaded[1] = ["P1_Evade_01"];
  135.         Moghunter.v_actor_evaded[2] = ["P2_Evade_01"];
  136.         Moghunter.v_actor_evaded[3] = ["P3_Evade_01"];
  137.         Moghunter.v_actor_evaded[4] = ["P4_Evade_01"];       
  138.         // -----------------------------------------------------------------------
  139.         // ACTOR - COUNTER
  140.         // -----------------------------------------------------------------------               
  141.         Moghunter.v_actor_counter[1] = ["P1_Counter_01"];
  142.         Moghunter.v_actor_counter[2] = ["P2_Counter_01"];
  143.         Moghunter.v_actor_counter[3] = ["P3_Counter_01"];
  144.         Moghunter.v_actor_counter[4] = ["P4_Counter_01"];       
  145.         // -----------------------------------------------------------------------
  146.         // ACTOR - REFLECTION
  147.         // -----------------------------------------------------------------------               
  148.         Moghunter.v_actor_reflection[1] = ["P1_Reflection_01"];
  149.         Moghunter.v_actor_reflection[2] = ["P2_Reflection_01"];
  150.         Moghunter.v_actor_reflection[3] = ["P3_Reflection_01"];
  151.         Moghunter.v_actor_reflection[4] = ["P4_Reflection_01"];                       
  152.         // -----------------------------------------------------------------------
  153.         // ACTOR - RECOVER
  154.         // -----------------------------------------------------------------------               
  155.         Moghunter.v_actor_recover[1] = ["P1_Recover_01","P1_Recover_02"];
  156.         Moghunter.v_actor_recover[2] = ["P2_Recover_01","P2_Recover_02"];
  157.         Moghunter.v_actor_recover[3] = ["P3_Recover_01","P3_Recover_02"];
  158.         Moghunter.v_actor_recover[4] = ["P4_Recover_01"];
  159.         // -----------------------------------------------------------------------
  160.         // ACTOR - DEAD
  161.         // -----------------------------------------------------------------------               
  162.         Moghunter.v_actor_dead[1] = ["P1_Dead_01","P1_Dead_02"];
  163.         Moghunter.v_actor_dead[2] = ["P2_Dead_01"];
  164.         Moghunter.v_actor_dead[3] = ["P3_Dead_01","P3_Dead_02"];
  165.         Moghunter.v_actor_dead[4] = ["P4_Dead_01"];
  166.         // -----------------------------------------------------------------------
  167.         // ACTOR - ESCAPE
  168.         // -----------------------------------------------------------------------               
  169.         Moghunter.v_actor_escape[1] = ["P1_Escape_01"];
  170.         Moghunter.v_actor_escape[2] = ["P2_Escape_01"];
  171.         Moghunter.v_actor_escape[3] = ["P3_Escape_01"];
  172.         Moghunter.v_actor_escape[4] = ["P4_Escape_01"];
  173.         // -----------------------------------------------------------------------
  174.         // ACTOR - VICTORY
  175.         // -----------------------------------------------------------------------               
  176.         Moghunter.v_actor_victory[1] = ["P1_Victory_01","P1_Victory_02","P1_Victory_03","P1_Victory_04"];
  177.         Moghunter.v_actor_victory[2] = ["P2_Victory_01","P2_Victory_02"];
  178.         Moghunter.v_actor_victory[3] = ["P3_Victory_01","P3_Victory_02"];
  179.         Moghunter.v_actor_victory[4] = ["P4_Victory_01","P4_Victory_02"];
  180.        
  181.        
  182.        
  183.         // -----------------------------------------------------------------------
  184.         // ENEMY - DEFAULT ACTION
  185.         // -----------------------------------------------------------------------               
  186.         Moghunter.v_enemy_default_action[900] = ["P1_Action_01","P1_Action_02","P1_Action_03"];
  187.         Moghunter.v_enemy_default_action[901] = ["P2_Action_01","P2_Action_02","P2_Action_03"];
  188.         // -----------------------------------------------------------------------
  189.         // ENEMY - SKILL
  190.         // -----------------------------------------------------------------------       
  191.     Moghunter.v_enemy_skill[900] = {
  192.                  1:["P1_Action_04","P1_Action_05","P1_Action_06"],
  193.              8:["P1_Action_07","P1_Action_08","P1_Action_09"]
  194.         };
  195.         Moghunter.v_enemy_skill[901] = {1:["P2_Action_04","P2_Action_05","P2_Action_06"]};       
  196.         // -----------------------------------------------------------------------
  197.         // ENEMY - DAMAGE
  198.         // -----------------------------------------------------------------------               
  199.         Moghunter.v_enemy_damage[900] = ["P1_Damage_01","P1_Damage_02","P1_Damage_03"];
  200.         Moghunter.v_enemy_damage[901] = ["P2_Damage_01","P2_Damage_02","P2_Damage_03"];
  201.         // -----------------------------------------------------------------------
  202.         // ENEMY - EVADED  &   MISS
  203.         // -----------------------------------------------------------------------               
  204.         Moghunter.v_enemy_evaded[900] = ["P1_Evade_01"];       
  205.         Moghunter.v_enemy_evaded[901] = ["P1_Evade_01"];
  206.         // -----------------------------------------------------------------------
  207.         // ENEMY - COUNTER
  208.         // -----------------------------------------------------------------------               
  209.         Moghunter.v_enemy_counter[900] = ["P1_Counter_01"];
  210.         Moghunter.v_enemy_counter[901] = ["P2_Counter_01"];
  211.         // -----------------------------------------------------------------------
  212.         // ENEMY - REFLECTION
  213.         // -----------------------------------------------------------------------               
  214.         Moghunter.v_enemy_reflection[900] = ["P1_Reflection_01"];
  215.         Moghunter.v_enemy_reflection[901] = ["P2_Reflection_01"];
  216.         // -----------------------------------------------------------------------
  217.         // ENEMY - RECOVER
  218.         // -----------------------------------------------------------------------               
  219.         Moghunter.v_enemy_recover[900] = ["P1_Recover_01","P1_Recover_02"];
  220.         Moghunter.v_enemy_recover[901] = ["P2_Recover_01","P2_Recover_02"];
  221.         // -----------------------------------------------------------------------
  222.         // ENEMY - DEAD
  223.         // -----------------------------------------------------------------------               
  224.         Moghunter.v_enemy_dead[900] = ["P1_Dead_01","P1_Dead_02"];
  225.         Moghunter.v_enemy_dead[901] = ["P2_Dead_01"];       
  226.   
  227.   
  228.   
  229.   
  230.   
  231. //=============================================================================
  232. // ** Sound Manager
  233. //=============================================================================       

  234. //==============================
  235. // * select Voice
  236. //==============================
  237. SoundManager.selectVoice = function(voices){
  238.    if (!voices) {return};
  239.    if (voices.length === 0) {return};
  240.    var voiceIndex = Math.randomInt(voices.length);
  241.    var fileName = voices[voiceIndex];
  242.    this.playVoice(fileName);
  243. };

  244. //==============================
  245. // * Play Voice
  246. //==============================
  247. SoundManager.playVoice = function(fileName){
  248.    var se = {};
  249.    se.name = fileName;
  250.    se.pitch = 100;
  251.    se.volume = Moghunter.v_volume;
  252.    AudioManager.playSe(se);
  253. };   
  254.   
  255. //=============================================================================
  256. // ** BattleManager
  257. //=============================================================================       

  258. //================================
  259. // ** Random Actor
  260. //================================
  261. BattleManager.randomActor = function() {
  262.     var actorIndex = Math.randomInt($gameParty.aliveMembers().length);
  263.     return $gameParty.aliveMembers()[actorIndex];
  264. };

  265. //==================================
  266. // ** Start Battle
  267. //==================================
  268. var _alias_mog_bmngr_startBattle = BattleManager.startBattle;
  269. BattleManager.startBattle = function() {
  270.      _alias_mog_bmngr_startBattle.call(this);
  271.          var actor = this.randomActor();
  272.      if (actor) {SoundManager.selectVoice(actor._v_start)};
  273. };

  274. //==================================
  275. // ** Process Victory
  276. //==================================
  277. var _alias_mog_bcry_processVictory = BattleManager.processVictory;
  278. BattleManager.processVictory = function() {
  279.          var actor = this.randomActor();
  280.      if (actor) {SoundManager.selectVoice(actor._v_victory)};       
  281.      _alias_mog_bcry_processVictory.call(this);         
  282. };

  283. //==================================
  284. // ** Process Escape
  285. //==================================
  286. var _alias_mog_bcry_processEscape = BattleManager.processEscape;
  287. BattleManager.processEscape = function() {
  288.          var actor = this.randomActor();
  289.      if (actor) {SoundManager.selectVoice(actor._v_escape)};               
  290.          _alias_mog_bcry_processEscape.call(this);         
  291. };

  292. //=============================================================================
  293. // ** Game Battler
  294. //=============================================================================

  295. //==============================
  296. // * InitMembers
  297. //==============================
  298. var _alias_mog_batcry_gbattler_initMembers = Game_Battler.prototype.initMembers;
  299. Game_Battler.prototype.initMembers = function() {
  300.     _alias_mog_batcry_gbattler_initMembers.call(this);
  301.     this.battleCrySetup();
  302. };

  303. //==============================
  304. // * Battle Cry Setup
  305. //==============================
  306. Game_Battler.prototype.battleCrySetup = function() {
  307.         this._v_start = [];
  308.         this._v_turn = [];
  309.         this._v_default_action = [];
  310.         this._v_damage = [];
  311.         this._v_evaded = [];
  312.         this._v_counter = [];
  313.         this._v_reflection = [];
  314.         this._v_dead = [];
  315.         this._v_recover = [];
  316.         this._v_escape = [];
  317.         this._v_victory = [];
  318. };

  319. //==============================
  320. // * Battle Cry Setup Actor
  321. //==============================
  322. Game_Battler.prototype.battleCrySetupActor = function() {
  323.         if (Moghunter.v_actor_start[this._actorId]) {this._v_start = Moghunter.v_actor_start[this._actorId]};
  324.         if (Moghunter.v_actor_turn[this._actorId]) {this._v_turn = Moghunter.v_actor_turn[this._actorId]};
  325.         if (Moghunter.v_actor_default_action[this._actorId]) {
  326.                 this._v_default_action = Moghunter.v_actor_default_action[this._actorId]};
  327.         if (Moghunter.v_actor_damage[this._actorId]) {this._v_damage = Moghunter.v_actor_damage[this._actorId]};
  328.         if (Moghunter.v_actor_evaded[this._actorId]) {this._v_evaded = Moghunter.v_actor_evaded[this._actorId]};
  329.         if (Moghunter.v_actor_counter[this._actorId]) {this._v_counter = Moghunter.v_actor_counter[this._actorId]};
  330.         if (Moghunter.v_actor_reflection[this._actorId]) {this._v_reflection = Moghunter.v_actor_reflection[this._actorId]};
  331.         if (Moghunter.v_actor_dead[this._actorId]) {this._v_dead = Moghunter.v_actor_dead[this._actorId]};
  332.         if (Moghunter.v_actor_recover[this._actorId]) {this._v_recover = Moghunter.v_actor_recover[this._actorId]};
  333.         if (Moghunter.v_actor_escape[this._actorId]) {this._v_escape = Moghunter.v_actor_escape[this._actorId]};
  334.         if (Moghunter.v_actor_victory[this._actorId]) {this._v_victory = Moghunter.v_actor_victory[this._actorId]};
  335. };

  336. //==============================
  337. // * Battle Cry Setup Enemy
  338. //==============================
  339. Game_Battler.prototype.battleCrySetupEnemy = function() {
  340.         if (Moghunter.v_enemy_default_action[this._enemyId]) {
  341.                 this._v_default_action = Moghunter.v_enemy_default_action[this._enemyId]};
  342.         if (Moghunter.v_enemy_damage[this._enemyId]) {this._v_damage = Moghunter.v_enemy_damage[this._enemyId]};
  343.         if (Moghunter.v_enemy_evaded[this._enemyId]) {this._v_evaded = Moghunter.v_enemy_evaded[this._enemyId]};
  344.         if (Moghunter.v_enemy_counter[this._enemyId]) {this._v_counter = Moghunter.v_enemy_counter[this._enemyId]};
  345.         if (Moghunter.v_enemy_reflection[this._enemyId]) {this._v_reflection = Moghunter.v_enemy_reflection[this._enemyId]};
  346.         if (Moghunter.v_enemy_dead[this._enemyId]) {this._v_dead = Moghunter.v_enemy_dead[this._enemyId]};
  347.         if (Moghunter.v_enemy_recover[this._enemyId]) {this._v_recover = Moghunter.v_enemy_recover[this._enemyId]};
  348. };

  349. //===============================
  350. // ** PerfotmAction
  351. //===============================
  352. var _alias_mog_bcry_performActionStart = Game_Battler.prototype.performAction;
  353. Game_Battler.prototype.performActionStart = function(action) {
  354.    _alias_mog_bcry_performActionStart.call(this, action);
  355.    if (action) {this.playVoiceAction(action)};
  356. };

  357. //===============================
  358. // ** play Voice Action
  359. //===============================
  360. Game_Battler.prototype.playVoiceAction = function(action) {
  361.      var actionID = action.item().id
  362.          if (this.isActor()) {
  363.                  if (action.isSkill() && Moghunter.v_actor_skill[this._actorId] &&
  364.                      Moghunter.v_actor_skill[this._actorId][actionID]) {
  365.                      SoundManager.selectVoice(Moghunter.v_actor_skill[this._actorId][actionID]);
  366.                          return;
  367.                  } else if (action.isItem() && Moghunter.v_actor_item[this._actorId] &&
  368.                      Moghunter.v_actor_item[this._actorId][actionID]) {
  369.                          SoundManager.selectVoice(Moghunter.v_actor_item[this._actorId][actionID]);
  370.                          return;
  371.                  };
  372.          } else if (this.isEnemy()) {
  373.                  if (Moghunter.v_enemy_skill[this._enemyId] && Moghunter.v_enemy_skill[this._enemyId][actionID]) {
  374.                      SoundManager.selectVoice(Moghunter.v_enemy_skill[this._enemyId][actionID]);
  375.                          return;
  376.                  };                 
  377.          };
  378.           SoundManager.selectVoice(this._v_default_action);
  379. };

  380. //==============================
  381. // ** perform Counter
  382. //==============================
  383. var _mog_btcry_gbat_performCounter = Game_Battler.prototype.performCounter;
  384. Game_Battler.prototype.performCounter = function() {
  385.     _mog_btcry_gbat_performCounter.call(this);
  386.     SoundManager.selectVoice(this._v_counter);       
  387. };


  388. //==============================
  389. // ** perform Reflection
  390. //==============================
  391. var _mog_btcry_gbat_performReflection = Game_Battler.prototype.performReflection;
  392. Game_Battler.prototype.performReflection = function() {
  393.         _mog_btcry_gbat_performReflection.call(this);
  394.     SoundManager.selectVoice(this._v_reflection);
  395. };

  396. //=============================================================================
  397. // ** Game Actor
  398. //=============================================================================       

  399. //==============================
  400. // * Setup
  401. //==============================
  402. var _mog_bcry_gact_setup = Game_Actor.prototype.setup;
  403. Game_Actor.prototype.setup = function(actorId) {
  404.         _mog_bcry_gact_setup.call(this,actorId);
  405.         this.battleCrySetupActor();
  406. };

  407. //=============================================================================
  408. // ** Game Enemy
  409. //=============================================================================       

  410. //==============================
  411. // * Setup
  412. //==============================
  413. var _mog_bcry_gemy_setup = Game_Enemy.prototype.setup;
  414. Game_Enemy.prototype.setup = function(enemyId, x, y) {
  415.         _mog_bcry_gemy_setup.call(this,enemyId, x, y);
  416.         this.battleCrySetupEnemy();
  417. };

  418. //=============================================================================
  419. // ** Scene Battle
  420. //=============================================================================       

  421. //==============================
  422. // * select Voice
  423. //==============================
  424. var _alias_mog_bcry_scbat_start = Scene_Battle.prototype.start;
  425. Scene_Battle.prototype.start = function() {
  426.         _alias_mog_bcry_scbat_start.call(this);
  427.         this._actorvoice = null;  
  428. };

  429. //==============================
  430. // * Update Battle Process
  431. //==============================
  432. var _alias_mog_bcry_updateBattleProcess = Scene_Battle.prototype.updateBattleProcess;
  433. Scene_Battle.prototype.updateBattleProcess = function() {
  434.         if (this._actorvoice != BattleManager.actor()) {this.playActorTurn()};
  435.         _alias_mog_bcry_updateBattleProcess.call(this);       
  436. };

  437. //==============================
  438. // * Play Actor Turn
  439. //==============================
  440. Scene_Battle.prototype.playActorTurn = function() {
  441.          this._actorvoice = BattleManager.actor();         
  442.      if (this._actorvoice) {AudioManager.stopSe();
  443.                  SoundManager.selectVoice(this._actorvoice._v_turn)};
  444. };

  445. //=============================================================================
  446. // ** Game Action
  447. //=============================================================================

  448. //==============================
  449. // * Apply
  450. //==============================
  451. var _alias_mog_bcry_gaction_apply = Game_Action.prototype.apply;
  452. Game_Action.prototype.apply = function(target) {
  453.          var old_hp = target.hp
  454.          _alias_mog_bcry_gaction_apply.call(this,target);
  455.      if (old_hp != target.hp || this.item().damage.type === 3) {this.playVoiceHP(old_hp,target.hp,target)};
  456.          if (target.result().missed || target.result().evaded) {SoundManager.selectVoice(target._v_evaded)};
  457. };

  458. //==============================
  459. // * Play Voice HP
  460. //==============================
  461. Game_Action.prototype.playVoiceHP = function(old_hp,now_hp,target) {
  462.    if (target.isDead()) {
  463.        SoundManager.selectVoice(target._v_dead);
  464.    } else if (old_hp < now_hp || this.item().damage.type === 3) {
  465.            SoundManager.selectVoice(target._v_recover);
  466.    } else if (old_hp > now_hp) {
  467.        SoundManager.selectVoice(target._v_damage);
  468.    };
  469. };

  470. //==============================
  471. // * Item Effect Recover HP
  472. //==============================
  473. var _alias_mog_btcry_gact_itemEffectRecoverHp = Game_Action.prototype.itemEffectRecoverHp;
  474. Game_Action.prototype.itemEffectRecoverHp = function(target, effect) {
  475.         var old_hp = target.hp;
  476.         _alias_mog_btcry_gact_itemEffectRecoverHp.call(this,target, effect)
  477.         if (old_hp <= target.hp) {SoundManager.selectVoice(target._v_recover)};
  478. };
复制代码
您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

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

在本版发帖返回顶部