#============================================================================== # ■ XP-RGSS-6 追加アニメ [Ver.3.0.0] by Claimh #------------------------------------------------------------------------------ # ・通常攻撃、スキル攻撃、アイテム攻撃時のアニメーションパターンを増やせます。 # ・表示する対象側アニメーションの発動順序も制御します。 #============================================================================== module AddAnimation #============================================================================== # □ カスタマイズSTART #============================================================================== # [前提] # アニメーションIDに0を指定すると # データベースで設定したアニメーションになります。 # 通常攻撃用設定 N_A_ADD = { # 武器ID => [アニメID1, アニメID2…] 1 => [0, 27, 31, 25], 5 => [0, 0, 51], 25 => [0, 31], 29 => [0, 0] } # スキル攻撃用設定 S_A_ADD = { # スキルID => [アニメID1、アニメID2・・・] 7 => [28], 57 => [27, 31, 25, 0], 61 => [53, 25, 27] } # アイテム用設定 I_A_ADD = { # アイテムID=> [アニメID1、アニメID2・・・] 1 => [0, 25] } #============================================================================== # □ カスタマイズEND #============================================================================== module_function #-------------------------------------------------------------------------- # ● 追加アニメ有効判定 #-------------------------------------------------------------------------- def judge_add_anime(battler, skill, item) animation_id = nil # アクションの種別で分岐 case battler.current_action.kind when 0 # 基本 # 行動:通常攻撃 if battler.current_action.basic == 0 # 追加アニメあり? unless N_A_ADD[battler.weapon_id].nil? animation_id = N_A_ADD[battler.weapon_id] end end when 1 # スキル # 追加アニメあり? unless S_A_ADD[skill.id].nil? animation_id = S_A_ADD[skill.id] end when 2 # アイテム # 追加アニメあり? unless I_A_ADD[item.id].nil? animation_id = I_A_ADD[item.id] end end return animation_id end #-------------------------------------------------------------------------- # ● データベース上のアニメーションID取得 #-------------------------------------------------------------------------- def data_base_anime(battler, skill, item) # アクションの種別で分岐 case battler.current_action.kind when 0 # 基本 # 行動:通常攻撃 if battler.current_action.basic == 0 return battler.animation2_id end when 1 # スキル return skill.animation2_id when 2 # アイテム return item.animation2_id end return 0 end end class Scene_Battle #-------------------------------------------------------------------------- # ● フレーム更新 (メインフェーズ ステップ 2 : アクション開始) #-------------------------------------------------------------------------- alias update_phase4_step2_add_animation update_phase4_step2 def update_phase4_step2 @anime_counter = 0 update_phase4_step2_add_animation # 原形 end #-------------------------------------------------------------------------- # ● フレーム更新 (メインフェーズ ステップ 4 : 対象側アニメーション) #-------------------------------------------------------------------------- alias update_phase4_step4_add_animation update_phase4_step4 def update_phase4_step4 # 追加アニメ判定 add_anime = AddAnimation.judge_add_anime(@active_battler, @skill, @item) # 追加アニメあり unless add_anime.nil? animation_id = add_anime[@anime_counter] if animation_id == 0 animation_id = AddAnimation.data_base_anime(@active_battler, @skill, @item) end @animation2_id = animation_id @anime_counter += 1 end update_phase4_step4_add_animation # 追加アニメあり unless add_anime.nil? # 終了? if @anime_counter < add_anime.size # 継続 @phase4_step = 4 else # 終了 @anime_counter = 0 end end end end