class Scene_Battle < Scene_Base #-------------------------------------------------------------------------- # alias method: process_action #-------------------------------------------------------------------------- alias catb_process_action process_action def process_action if BattleManager.btype?

catb) process_catb perform_catb_action(@subject, true) if BattleManager.action_forced? end catb_process_action unless BattleManager.btype?

catb) end #-------------------------------------------------------------------------- # new method: catb_pause? #-------------------------------------------------------------------------- def catb_pause? return true if BattleManager.action_forced? return YSA::CATB:

AUSE_WHEN_ACTIVE_PARTY_COMMAND if @party_command_window.active return true if $imported["YEA-CombatLogDisplay"] && @combatlog_window && @combatlog_window.visible return false if $game_system.catb_wait_type == :full return true if $game_system.catb_wait_type == :wait && (@actor_command_window.active || @skill_window.active || @item_window.active || @actor_window.active || @enemy_window.active) return true if $game_system.catb_wait_type == :quarter && (@skill_window.active || @item_window.active || @actor_window.active || @enemy_window.active) return true if $game_system.catb_wait_type == :semi && (@actor_window.active || @enemy_window.active) end #-------------------------------------------------------------------------- # new method: process_catb #-------------------------------------------------------------------------- def process_catb if @status_window.index >= 0 && ($game_party.members[@status_window.index].dead? || !BattleManager.action_list

actor).include?($game_party.members[@status_window.index])) $game_party.members[@status_window.index].clear_catb if @skill_window.visible || @item_window.visible @status_window.open @status_window.show @status_aid_window.hide end @actor_window.hide.deactivate @enemy_window.hide.deactivate @actor_command_window.deactivate @actor_command_window.close @skill_window.hide.deactivate @item_window.hide.deactivate @status_window.unselect end return unless SceneManager.scene_is?(Scene_Battle) return if scene_changing? return unless BattleManager.btype?

catb) return if catb_pause? battler_hash = $game_party.members + $game_troop.members battler_hash.each { |a| a.make_catb_update a.make_catb_action a.make_ct_catb_update } #--- Update Tick Turn if $game_system.catb_turn_type == :tick @tick_clock = 0 if !@tick_clock @tick_clock += 1 if @tick_clock >= $game_system.catb_tick_count @tick_clock = 0 all_battle_members.each { |battler| battler.on_turn_end } @status_window.refresh $game_troop.increase_turn end end #--- Fix make action BattleManager.action_list

actor).each { |battler| battler.make_actions if (battler.actor? && !battler.input) } #--- @status_window.refresh_catb #--- Setup Actor @f_actor_index = 0 if !@f_actor_index || @f_actor_index < 0 || @f_actor_index + 1 > BattleManager.action_list

actor).size f_actor = BattleManager.action_list

actor)[@f_actor_index] @f_actor_index += 1 if (@f_actor_index + 1) < BattleManager.action_list

actor).size && f_actor && f_actor.input && f_actor.input.item && f_actor.input.confirm f_actor = BattleManager.action_list

actor)[@f_actor_index] if f_actor && f_actor.input && !f_actor.input.confirm && (!BattleManager.actor || @status_window.index != BattleManager.actor.index) && !@actor_command_window.active && !@party_command_window.active BattleManager.set_actor(f_actor.index) @status_window.select(BattleManager.actor.index) @actor_command_window.setup(BattleManager.actor) @actor_command_window.show end BattleManager.action_list.each { |battler| battler.make_actions if battler.enemy? perform_catb_action(battler) if !@subject } end