设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索
查看: 737|回复: 0
打印 上一主题 下一主题

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

[复制链接]

Lv2.观梦者

梦石
0
星屑
497
在线时间
266 小时
注册时间
2015-12-8
帖子
873
跳转到指定楼层
1
发表于 2016-2-18 21:51:15 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

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

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

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



JAVASCRIPT 代码复制
  1. //=============================================================================
  2. // MOG_BattleCry.js
  3. //=============================================================================
  4.  
  5. /*:
  6.  * @plugindesc (v1.0) Adiciona vozes na batalha.
  7.  * @author Moghunter
  8.  *
  9.  * @param Volume
  10.  * @desc Definição do volume.
  11.  * @default 120
  12.  *
  13.  * @help  
  14.  * =============================================================================
  15.  * +++ MOG - Battle Cry (v1.0) +++
  16.  * By Moghunter
  17.  * [url]https://atelierrgss.wordpress.com/[/url]
  18.  * =============================================================================
  19.  * Adiciona vozes na batalha (ação, dano, vitória,etc...)
  20.  * Para definir as vozes é necessário editar o plugin manualmente.
  21.  * A edição do plugin deve ser feita a partir da linha 70.
  22.  *
  23.  */
  24.  
  25. //=============================================================================
  26. // ** PLUGIN PARAMETERS
  27. //=============================================================================
  28.  
  29.     // Não modifique essa parte.
  30.     // ☢CAUTION!!☢ Don't Touch.^_^ ----------------------------------------
  31.   var Imported = Imported || {};
  32.   Imported.MOG_BattleCry = true;
  33.   var Moghunter = Moghunter || {};        
  34.         Moghunter.parameters = PluginManager.parameters('MOG_BattleCry');
  35.         Moghunter.v_volume = Number(Moghunter.parameters['Volume'] || 100);
  36.     Moghunter.v_actor_start = [];
  37.         Moghunter.v_actor_turn = [];
  38.         Moghunter.v_actor_default_action = [];
  39.         Moghunter.v_actor_skill = [];
  40.         Moghunter.v_actor_item = [];
  41.         Moghunter.v_actor_damage = [];
  42.         Moghunter.v_actor_evaded = [];
  43.         Moghunter.v_actor_dead = [];
  44.     Moghunter.v_actor_recover = [];
  45.         Moghunter.v_actor_counter = [];
  46.         Moghunter.v_actor_reflection = [];
  47.         Moghunter.v_actor_victory = [];
  48.         Moghunter.v_actor_escape = [];
  49.         Moghunter.v_enemy_default_action = [];
  50.         Moghunter.v_enemy_damage = [];
  51.         Moghunter.v_enemy_evaded = [];
  52.         Moghunter.v_enemy_counter = [];
  53.         Moghunter.v_enemy_reflection = [];       
  54.         Moghunter.v_enemy_dead = [];
  55.     Moghunter.v_enemy_recover = [];
  56.         Moghunter.v_enemy_skill = [];
  57.     // ☢CAUTION!!☢ Don't Touch.^_^ ----------------------------------------
  58.  
  59.  
  60.  
  61.  
  62.         // SETUP ----------------------------------------------------------------
  63.         // Exemplo de configuração geral, o modo de configurar é igual para todas
  64.         // ações.
  65.         //
  66.         // Moghunter.v_actor_start[A] = [B,B,B,B...]
  67.         //
  68.         // A - Actor ID
  69.         // B - File Name
  70.         //
  71.         // -----------------------------------------------------------------------
  72.  
  73.         // -----------------------------------------------------------------------
  74.         // ACTOR - BATTLE START
  75.         // -----------------------------------------------------------------------
  76.         Moghunter.v_actor_start[1] = ["P1_Start_01","P1_Start_02"];
  77.         Moghunter.v_actor_start[2] = ["P2_Start_01","P2_Start_02"];
  78.         Moghunter.v_actor_start[3] = ["P3_Start_01","P3_Start_02"];
  79.         Moghunter.v_actor_start[4] = ["P4_Start_01","P4_Start_02"];
  80.         // -----------------------------------------------------------------------
  81.         // ACTOR - BATTLE TURN
  82.         // -----------------------------------------------------------------------               
  83.         Moghunter.v_actor_turn[1] = ["P1_Turn_01","P1_Turn_02"];
  84.         Moghunter.v_actor_turn[2] = ["P2_Turn_01","P2_Turn_02","P2_Turn_03"];
  85.         Moghunter.v_actor_turn[3] = ["P3_Turn_01","P3_Turn_02"];
  86.         Moghunter.v_actor_turn[4] = ["P4_Turn_01","P4_Turn_02","P4_Turn_03"];
  87.         // -----------------------------------------------------------------------
  88.         // ACTOR - DEFAULT ACTION (Skill/ITEM)
  89.         // -----------------------------------------------------------------------               
  90.         Moghunter.v_actor_default_action[1] = ["P1_Action_01","P1_Action_02","P1_Action_03"];
  91.         Moghunter.v_actor_default_action[2] = ["P2_Action_01","P2_Action_02","P2_Action_03"];
  92.         Moghunter.v_actor_default_action[3] = ["P3_Action_01","P3_Action_02","P3_Action_03"];
  93.         Moghunter.v_actor_default_action[4] = ["P4_Action_01","P4_Action_02","P4_Action_03"];
  94.         // -----------------------------------------------------------------------
  95.         // ACTOR - SKILL
  96.         // -----------------------------------------------------------------------       
  97.         // Moghunter.v_actor_skill[A] = {B:[C,C,C,C,...] }
  98.         //
  99.         // A - Actor ID
  100.         // B - Skill ID
  101.         // C - File Name
  102.         // -----------------------------------------------------------------------       
  103.     Moghunter.v_actor_skill[1] = {
  104.                  9:["P1_Action_04","P1_Action_05","P1_Action_06"], // Fire
  105.              10:["P1_Action_07","P1_Action_08","P1_Action_09"] // Spark
  106.         };
  107.         Moghunter.v_actor_skill[2] = {
  108.                  8:["P2_Action_06","P2_Turn_03"], // Heal
  109.                  9:["P2_Action_04","P2_Action_08","P2_Action_09"], // Fire
  110.                  17:["P2_Action_06","P2_Turn_03"] // Heal All
  111.     };
  112.         Moghunter.v_actor_skill[3] = {
  113.                  3:["P3_Action_06","P3_Action_07","P3_Action_08"] // Dual Attack
  114.         };
  115.         Moghunter.v_actor_skill[4] = {
  116.                  10:["P4_Action_04","P4_Action_05","P4_Action_06","P4_Action_07","P4_Action_08"] // Spark
  117.         };
  118.         // -----------------------------------------------------------------------
  119.         // ACTOR - ITEM
  120.         // -----------------------------------------------------------------------       
  121.     Moghunter.v_actor_item[1] = {
  122.                 1:["P1_Action_01","P1_Action_02","P1_Action_03"],  // Potion
  123.             3:["P1_Action_01","P1_Action_02","P1_Action_03"]}; // Full Potion
  124.         Moghunter.v_actor_item[2] = {1:["P2_Action_01","P2_Action_02","P2_Action_03"]};
  125.         Moghunter.v_actor_item[3] = {1:["P3_Action_01","P3_Action_02","P3_Action_03"]};
  126.         Moghunter.v_actor_item[4] = {1:["P4_Action_01","P4_Action_02","P4_Action_03"]};       
  127.         // -----------------------------------------------------------------------
  128.         // ACTOR - DAMAGE
  129.         // -----------------------------------------------------------------------               
  130.         Moghunter.v_actor_damage[1] = ["P1_Damage_01","P1_Damage_02","P1_Damage_03"];
  131.         Moghunter.v_actor_damage[2] = ["P2_Damage_01","P2_Damage_02","P2_Damage_03"];
  132.         Moghunter.v_actor_damage[3] = ["P3_Damage_01","P3_Damage_02","P3_Damage_03"];
  133.         Moghunter.v_actor_damage[4] = ["P4_Damage_01","P4_Damage_02","P4_Damage_03"];
  134.         // -----------------------------------------------------------------------
  135.         // ACTOR - EVADED  &   MISS
  136.         // -----------------------------------------------------------------------               
  137.         Moghunter.v_actor_evaded[1] = ["P1_Evade_01"];
  138.         Moghunter.v_actor_evaded[2] = ["P2_Evade_01"];
  139.         Moghunter.v_actor_evaded[3] = ["P3_Evade_01"];
  140.         Moghunter.v_actor_evaded[4] = ["P4_Evade_01"];       
  141.         // -----------------------------------------------------------------------
  142.         // ACTOR - COUNTER
  143.         // -----------------------------------------------------------------------               
  144.         Moghunter.v_actor_counter[1] = ["P1_Counter_01"];
  145.         Moghunter.v_actor_counter[2] = ["P2_Counter_01"];
  146.         Moghunter.v_actor_counter[3] = ["P3_Counter_01"];
  147.         Moghunter.v_actor_counter[4] = ["P4_Counter_01"];       
  148.         // -----------------------------------------------------------------------
  149.         // ACTOR - REFLECTION
  150.         // -----------------------------------------------------------------------               
  151.         Moghunter.v_actor_reflection[1] = ["P1_Reflection_01"];
  152.         Moghunter.v_actor_reflection[2] = ["P2_Reflection_01"];
  153.         Moghunter.v_actor_reflection[3] = ["P3_Reflection_01"];
  154.         Moghunter.v_actor_reflection[4] = ["P4_Reflection_01"];                       
  155.         // -----------------------------------------------------------------------
  156.         // ACTOR - RECOVER
  157.         // -----------------------------------------------------------------------               
  158.         Moghunter.v_actor_recover[1] = ["P1_Recover_01","P1_Recover_02"];
  159.         Moghunter.v_actor_recover[2] = ["P2_Recover_01","P2_Recover_02"];
  160.         Moghunter.v_actor_recover[3] = ["P3_Recover_01","P3_Recover_02"];
  161.         Moghunter.v_actor_recover[4] = ["P4_Recover_01"];
  162.         // -----------------------------------------------------------------------
  163.         // ACTOR - DEAD
  164.         // -----------------------------------------------------------------------               
  165.         Moghunter.v_actor_dead[1] = ["P1_Dead_01","P1_Dead_02"];
  166.         Moghunter.v_actor_dead[2] = ["P2_Dead_01"];
  167.         Moghunter.v_actor_dead[3] = ["P3_Dead_01","P3_Dead_02"];
  168.         Moghunter.v_actor_dead[4] = ["P4_Dead_01"];
  169.         // -----------------------------------------------------------------------
  170.         // ACTOR - ESCAPE
  171.         // -----------------------------------------------------------------------               
  172.         Moghunter.v_actor_escape[1] = ["P1_Escape_01"];
  173.         Moghunter.v_actor_escape[2] = ["P2_Escape_01"];
  174.         Moghunter.v_actor_escape[3] = ["P3_Escape_01"];
  175.         Moghunter.v_actor_escape[4] = ["P4_Escape_01"];
  176.         // -----------------------------------------------------------------------
  177.         // ACTOR - VICTORY
  178.         // -----------------------------------------------------------------------               
  179.         Moghunter.v_actor_victory[1] = ["P1_Victory_01","P1_Victory_02","P1_Victory_03","P1_Victory_04"];
  180.         Moghunter.v_actor_victory[2] = ["P2_Victory_01","P2_Victory_02"];
  181.         Moghunter.v_actor_victory[3] = ["P3_Victory_01","P3_Victory_02"];
  182.         Moghunter.v_actor_victory[4] = ["P4_Victory_01","P4_Victory_02"];
  183.  
  184.  
  185.  
  186.         // -----------------------------------------------------------------------
  187.         // ENEMY - DEFAULT ACTION
  188.         // -----------------------------------------------------------------------               
  189.         Moghunter.v_enemy_default_action[900] = ["P1_Action_01","P1_Action_02","P1_Action_03"];
  190.         Moghunter.v_enemy_default_action[901] = ["P2_Action_01","P2_Action_02","P2_Action_03"];
  191.         // -----------------------------------------------------------------------
  192.         // ENEMY - SKILL
  193.         // -----------------------------------------------------------------------       
  194.     Moghunter.v_enemy_skill[900] = {
  195.                  1:["P1_Action_04","P1_Action_05","P1_Action_06"],
  196.              8:["P1_Action_07","P1_Action_08","P1_Action_09"]
  197.         };
  198.         Moghunter.v_enemy_skill[901] = {1:["P2_Action_04","P2_Action_05","P2_Action_06"]};       
  199.         // -----------------------------------------------------------------------
  200.         // ENEMY - DAMAGE
  201.         // -----------------------------------------------------------------------               
  202.         Moghunter.v_enemy_damage[900] = ["P1_Damage_01","P1_Damage_02","P1_Damage_03"];
  203.         Moghunter.v_enemy_damage[901] = ["P2_Damage_01","P2_Damage_02","P2_Damage_03"];
  204.         // -----------------------------------------------------------------------
  205.         // ENEMY - EVADED  &   MISS
  206.         // -----------------------------------------------------------------------               
  207.         Moghunter.v_enemy_evaded[900] = ["P1_Evade_01"];       
  208.         Moghunter.v_enemy_evaded[901] = ["P1_Evade_01"];
  209.         // -----------------------------------------------------------------------
  210.         // ENEMY - COUNTER
  211.         // -----------------------------------------------------------------------               
  212.         Moghunter.v_enemy_counter[900] = ["P1_Counter_01"];
  213.         Moghunter.v_enemy_counter[901] = ["P2_Counter_01"];
  214.         // -----------------------------------------------------------------------
  215.         // ENEMY - REFLECTION
  216.         // -----------------------------------------------------------------------               
  217.         Moghunter.v_enemy_reflection[900] = ["P1_Reflection_01"];
  218.         Moghunter.v_enemy_reflection[901] = ["P2_Reflection_01"];
  219.         // -----------------------------------------------------------------------
  220.         // ENEMY - RECOVER
  221.         // -----------------------------------------------------------------------               
  222.         Moghunter.v_enemy_recover[900] = ["P1_Recover_01","P1_Recover_02"];
  223.         Moghunter.v_enemy_recover[901] = ["P2_Recover_01","P2_Recover_02"];
  224.         // -----------------------------------------------------------------------
  225.         // ENEMY - DEAD
  226.         // -----------------------------------------------------------------------               
  227.         Moghunter.v_enemy_dead[900] = ["P1_Dead_01","P1_Dead_02"];
  228.         Moghunter.v_enemy_dead[901] = ["P2_Dead_01"];       
  229.  
  230.  
  231.  
  232.  
  233.  
  234. //=============================================================================
  235. // ** Sound Manager
  236. //=============================================================================       
  237.  
  238. //==============================
  239. // * select Voice
  240. //==============================
  241. SoundManager.selectVoice = function(voices){
  242.    if (!voices) {return};
  243.    if (voices.length === 0) {return};
  244.    var voiceIndex = Math.randomInt(voices.length);
  245.    var fileName = voices[voiceIndex];
  246.    this.playVoice(fileName);
  247. };
  248.  
  249. //==============================
  250. // * Play Voice
  251. //==============================
  252. SoundManager.playVoice = function(fileName){
  253.    var se = {};
  254.    se.name = fileName;
  255.    se.pitch = 100;
  256.    se.volume = Moghunter.v_volume;
  257.    AudioManager.playSe(se);
  258. };   
  259.  
  260. //=============================================================================
  261. // ** BattleManager
  262. //=============================================================================       
  263.  
  264. //================================
  265. // ** Random Actor
  266. //================================
  267. BattleManager.randomActor = function() {
  268.     var actorIndex = Math.randomInt($gameParty.aliveMembers().length);
  269.     return $gameParty.aliveMembers()[actorIndex];
  270. };
  271.  
  272. //==================================
  273. // ** Start Battle
  274. //==================================
  275. var _alias_mog_bmngr_startBattle = BattleManager.startBattle;
  276. BattleManager.startBattle = function() {
  277.      _alias_mog_bmngr_startBattle.call(this);
  278.          var actor = this.randomActor();
  279.      if (actor) {SoundManager.selectVoice(actor._v_start)};
  280. };
  281.  
  282. //==================================
  283. // ** Process Victory
  284. //==================================
  285. var _alias_mog_bcry_processVictory = BattleManager.processVictory;
  286. BattleManager.processVictory = function() {
  287.          var actor = this.randomActor();
  288.      if (actor) {SoundManager.selectVoice(actor._v_victory)};       
  289.      _alias_mog_bcry_processVictory.call(this);         
  290. };
  291.  
  292. //==================================
  293. // ** Process Escape
  294. //==================================
  295. var _alias_mog_bcry_processEscape = BattleManager.processEscape;
  296. BattleManager.processEscape = function() {
  297.          var actor = this.randomActor();
  298.      if (actor) {SoundManager.selectVoice(actor._v_escape)};               
  299.          _alias_mog_bcry_processEscape.call(this);         
  300. };
  301.  
  302. //=============================================================================
  303. // ** Game Battler
  304. //=============================================================================
  305.  
  306. //==============================
  307. // * InitMembers
  308. //==============================
  309. var _alias_mog_batcry_gbattler_initMembers = Game_Battler.prototype.initMembers;
  310. Game_Battler.prototype.initMembers = function() {
  311.     _alias_mog_batcry_gbattler_initMembers.call(this);
  312.     this.battleCrySetup();
  313. };
  314.  
  315. //==============================
  316. // * Battle Cry Setup
  317. //==============================
  318. Game_Battler.prototype.battleCrySetup = function() {
  319.         this._v_start = [];
  320.         this._v_turn = [];
  321.         this._v_default_action = [];
  322.         this._v_damage = [];
  323.         this._v_evaded = [];
  324.         this._v_counter = [];
  325.         this._v_reflection = [];
  326.         this._v_dead = [];
  327.         this._v_recover = [];
  328.         this._v_escape = [];
  329.         this._v_victory = [];
  330. };
  331.  
  332. //==============================
  333. // * Battle Cry Setup Actor
  334. //==============================
  335. Game_Battler.prototype.battleCrySetupActor = function() {
  336.         if (Moghunter.v_actor_start[this._actorId]) {this._v_start = Moghunter.v_actor_start[this._actorId]};
  337.         if (Moghunter.v_actor_turn[this._actorId]) {this._v_turn = Moghunter.v_actor_turn[this._actorId]};
  338.         if (Moghunter.v_actor_default_action[this._actorId]) {
  339.                 this._v_default_action = Moghunter.v_actor_default_action[this._actorId]};
  340.         if (Moghunter.v_actor_damage[this._actorId]) {this._v_damage = Moghunter.v_actor_damage[this._actorId]};
  341.         if (Moghunter.v_actor_evaded[this._actorId]) {this._v_evaded = Moghunter.v_actor_evaded[this._actorId]};
  342.         if (Moghunter.v_actor_counter[this._actorId]) {this._v_counter = Moghunter.v_actor_counter[this._actorId]};
  343.         if (Moghunter.v_actor_reflection[this._actorId]) {this._v_reflection = Moghunter.v_actor_reflection[this._actorId]};
  344.         if (Moghunter.v_actor_dead[this._actorId]) {this._v_dead = Moghunter.v_actor_dead[this._actorId]};
  345.         if (Moghunter.v_actor_recover[this._actorId]) {this._v_recover = Moghunter.v_actor_recover[this._actorId]};
  346.         if (Moghunter.v_actor_escape[this._actorId]) {this._v_escape = Moghunter.v_actor_escape[this._actorId]};
  347.         if (Moghunter.v_actor_victory[this._actorId]) {this._v_victory = Moghunter.v_actor_victory[this._actorId]};
  348. };
  349.  
  350. //==============================
  351. // * Battle Cry Setup Enemy
  352. //==============================
  353. Game_Battler.prototype.battleCrySetupEnemy = function() {
  354.         if (Moghunter.v_enemy_default_action[this._enemyId]) {
  355.                 this._v_default_action = Moghunter.v_enemy_default_action[this._enemyId]};
  356.         if (Moghunter.v_enemy_damage[this._enemyId]) {this._v_damage = Moghunter.v_enemy_damage[this._enemyId]};
  357.         if (Moghunter.v_enemy_evaded[this._enemyId]) {this._v_evaded = Moghunter.v_enemy_evaded[this._enemyId]};
  358.         if (Moghunter.v_enemy_counter[this._enemyId]) {this._v_counter = Moghunter.v_enemy_counter[this._enemyId]};
  359.         if (Moghunter.v_enemy_reflection[this._enemyId]) {this._v_reflection = Moghunter.v_enemy_reflection[this._enemyId]};
  360.         if (Moghunter.v_enemy_dead[this._enemyId]) {this._v_dead = Moghunter.v_enemy_dead[this._enemyId]};
  361.         if (Moghunter.v_enemy_recover[this._enemyId]) {this._v_recover = Moghunter.v_enemy_recover[this._enemyId]};
  362. };
  363.  
  364. //===============================
  365. // ** PerfotmAction
  366. //===============================
  367. var _alias_mog_bcry_performActionStart = Game_Battler.prototype.performAction;
  368. Game_Battler.prototype.performActionStart = function(action) {
  369.    _alias_mog_bcry_performActionStart.call(this, action);
  370.    if (action) {this.playVoiceAction(action)};
  371. };
  372.  
  373. //===============================
  374. // ** play Voice Action
  375. //===============================
  376. Game_Battler.prototype.playVoiceAction = function(action) {
  377.      var actionID = action.item().id
  378.          if (this.isActor()) {
  379.                  if (action.isSkill() && Moghunter.v_actor_skill[this._actorId] &&
  380.                      Moghunter.v_actor_skill[this._actorId][actionID]) {
  381.                      SoundManager.selectVoice(Moghunter.v_actor_skill[this._actorId][actionID]);
  382.                          return;
  383.                  } else if (action.isItem() && Moghunter.v_actor_item[this._actorId] &&
  384.                      Moghunter.v_actor_item[this._actorId][actionID]) {
  385.                          SoundManager.selectVoice(Moghunter.v_actor_item[this._actorId][actionID]);
  386.                          return;
  387.                  };
  388.          } else if (this.isEnemy()) {
  389.                  if (Moghunter.v_enemy_skill[this._enemyId] && Moghunter.v_enemy_skill[this._enemyId][actionID]) {
  390.                      SoundManager.selectVoice(Moghunter.v_enemy_skill[this._enemyId][actionID]);
  391.                          return;
  392.                  };                 
  393.          };
  394.           SoundManager.selectVoice(this._v_default_action);
  395. };
  396.  
  397. //==============================
  398. // ** perform Counter
  399. //==============================
  400. var _mog_btcry_gbat_performCounter = Game_Battler.prototype.performCounter;
  401. Game_Battler.prototype.performCounter = function() {
  402.     _mog_btcry_gbat_performCounter.call(this);
  403.     SoundManager.selectVoice(this._v_counter);       
  404. };
  405.  
  406.  
  407. //==============================
  408. // ** perform Reflection
  409. //==============================
  410. var _mog_btcry_gbat_performReflection = Game_Battler.prototype.performReflection;
  411. Game_Battler.prototype.performReflection = function() {
  412.         _mog_btcry_gbat_performReflection.call(this);
  413.     SoundManager.selectVoice(this._v_reflection);
  414. };
  415.  
  416. //=============================================================================
  417. // ** Game Actor
  418. //=============================================================================       
  419.  
  420. //==============================
  421. // * Setup
  422. //==============================
  423. var _mog_bcry_gact_setup = Game_Actor.prototype.setup;
  424. Game_Actor.prototype.setup = function(actorId) {
  425.         _mog_bcry_gact_setup.call(this,actorId);
  426.         this.battleCrySetupActor();
  427. };
  428.  
  429. //=============================================================================
  430. // ** Game Enemy
  431. //=============================================================================       
  432.  
  433. //==============================
  434. // * Setup
  435. //==============================
  436. var _mog_bcry_gemy_setup = Game_Enemy.prototype.setup;
  437. Game_Enemy.prototype.setup = function(enemyId, x, y) {
  438.         _mog_bcry_gemy_setup.call(this,enemyId, x, y);
  439.         this.battleCrySetupEnemy();
  440. };
  441.  
  442. //=============================================================================
  443. // ** Scene Battle
  444. //=============================================================================       
  445.  
  446. //==============================
  447. // * select Voice
  448. //==============================
  449. var _alias_mog_bcry_scbat_start = Scene_Battle.prototype.start;
  450. Scene_Battle.prototype.start = function() {
  451.         _alias_mog_bcry_scbat_start.call(this);
  452.         this._actorvoice = null;  
  453. };
  454.  
  455. //==============================
  456. // * Update Battle Process
  457. //==============================
  458. var _alias_mog_bcry_updateBattleProcess = Scene_Battle.prototype.updateBattleProcess;
  459. Scene_Battle.prototype.updateBattleProcess = function() {
  460.         if (this._actorvoice != BattleManager.actor()) {this.playActorTurn()};
  461.         _alias_mog_bcry_updateBattleProcess.call(this);       
  462. };
  463.  
  464. //==============================
  465. // * Play Actor Turn
  466. //==============================
  467. Scene_Battle.prototype.playActorTurn = function() {
  468.          this._actorvoice = BattleManager.actor();         
  469.      if (this._actorvoice) {AudioManager.stopSe();
  470.                  SoundManager.selectVoice(this._actorvoice._v_turn)};
  471. };
  472.  
  473. //=============================================================================
  474. // ** Game Action
  475. //=============================================================================
  476.  
  477. //==============================
  478. // * Apply
  479. //==============================
  480. var _alias_mog_bcry_gaction_apply = Game_Action.prototype.apply;
  481. Game_Action.prototype.apply = function(target) {
  482.          var old_hp = target.hp
  483.          _alias_mog_bcry_gaction_apply.call(this,target);
  484.      if (old_hp != target.hp || this.item().damage.type === 3) {this.playVoiceHP(old_hp,target.hp,target)};
  485.          if (target.result().missed || target.result().evaded) {SoundManager.selectVoice(target._v_evaded)};
  486. };
  487.  
  488. //==============================
  489. // * Play Voice HP
  490. //==============================
  491. Game_Action.prototype.playVoiceHP = function(old_hp,now_hp,target) {
  492.    if (target.isDead()) {
  493.        SoundManager.selectVoice(target._v_dead);
  494.    } else if (old_hp < now_hp || this.item().damage.type === 3) {
  495.            SoundManager.selectVoice(target._v_recover);
  496.    } else if (old_hp > now_hp) {
  497.        SoundManager.selectVoice(target._v_damage);
  498.    };
  499. };
  500.  
  501. //==============================
  502. // * Item Effect Recover HP
  503. //==============================
  504. var _alias_mog_btcry_gact_itemEffectRecoverHp = Game_Action.prototype.itemEffectRecoverHp;
  505. Game_Action.prototype.itemEffectRecoverHp = function(target, effect) {
  506.         var old_hp = target.hp;
  507.         _alias_mog_btcry_gact_itemEffectRecoverHp.call(this,target, effect)
  508.         if (old_hp <= target.hp) {SoundManager.selectVoice(target._v_recover)};
  509. };
您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2024-12-23 23:43

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表