#============================================================================== # ++ アクティブタイムバトル & ActionEXエネミー行動回数 併用化パッチ ++ #  Script by パラ犬 #  http://2d6.parasite.jp/ #------------------------------------------------------------------------------ # スクリプトシェルフ様の「ActionEX エネミー行動回数」との併用時に # エネミーが無限に行動してしまう問題を修正します。 #------------------------------------------------------------------------------ #[設置上の注意] # アクティブタイムバトルver.2.60以降に対応しています。 # 上下関係は上から、「アクティブタイムバトル→併用化パッチ→ActionEX」 # の順で置いてください。 #============================================================================== class Scene_Battle #-------------------------------------------------------------------------- # ● フレーム更新 (メインフェーズ ステップ 6 : リフレッシュ) #-------------------------------------------------------------------------- def update_phase4_step6 @active_battler.countup = true if @active_battler.current_action.basic == 1 # 防御 declease_ct(@active_battler,100-PARA_CTB::ACT_GUARD_CT) else case @active_battler.current_action.kind # 攻撃 when 0 declease_ct(@active_battler,100-PARA_CTB::ACT_ATTACK_CT) # スキル when 1 declease_ct(@active_battler,100-PARA_CTB::ACT_SKILL_CT) # アイテム when 2 declease_ct(@active_battler,100-PARA_CTB::ACT_ITEM_CT) else clear_ct(@active_battler) end end # ターゲットが行動不能になったらCTを0に for target in @target_battlers if target.movable? == false and target.movable_backup == true clear_ct(target) @status_window.refresh_ct end end # アクション強制対象のバトラーをクリア $game_temp.forcing_battler = nil # コモンイベント ID が有効の場合 if @common_event_id > 0 # イベントをセットアップ common_event = $data_common_events[@common_event_id] $game_system.battle_interpreter.setup(common_event.list, 0) end # ステップ 1 に移行 @phase4_step = 1 # エネミー名リストを更新 @status_window2.refresh # (ActionEX)条件:エネミー、「行動回数」属性がランクB以上、 if @active_battler.is_a?(Game_Enemy) move_max = 1 er = $data_enemies[@active_battler.enemy_id].element_ranks for i in 1...er.xsize next unless $data_system.elements[i] =~ /#{XRXS37::MOVE_TIMES}([+-]?[0-9]+)?(%)?/ case er[i] when 1 move_max = $1.to_i when 2 move_max = 2 end end # エネミー行動実行回数が指定回数以上の場合 if @active_battler.current_action.turn_move_times >= move_max # アクションをクリア @active_battler.current_action.clear end else # アクションをクリア @active_battler.current_action.clear end end end