=begin ★サイドビュー戦闘用 アクター位置追従パッチ [順番] サイドビュー戦闘 リッチアクターコマンド このパッチ =end if defined?(SideView) and defined?(RICH_ACTCMD) class Scene_Battle #-------------------------------------------------------------------------- # ● メイン処理 [再定義] #-------------------------------------------------------------------------- def main # 戦闘用の各種一時データを初期化 $game_temp.in_battle = true $game_temp.battle_turn = 0 $game_temp.battle_event_flags.clear $game_temp.battle_abort = false $game_temp.battle_main_phase = false $game_temp.battleback_name = $game_map.battleback_name $game_temp.forcing_battler = nil # バトルイベント用インタプリタを初期化 $game_system.battle_interpreter.setup(nil, 0) # トループを準備 @troop_id = $game_temp.battle_troop_id $game_troop.setup(@troop_id) # トループウィンドウを作成 @troop_window = Window_EnemyList.new # アクターコマンドウィンドウを作成 @actor_command_window = WindowBattleActorCmd.new =begin s1 = $data_system.words.attack s2 = $data_system.words.skill s3 = $data_system.words.guard s4 = $data_system.words.item @actor_command_window = Window_Command.new(160, [s1, s2, s3, s4]) @actor_command_window.y = 160 @actor_command_window.back_opacity = 160 =end @actor_command_window.active = false @actor_command_window.visible = false # その他のウィンドウを作成 @party_command_window = Window_PartyCommand.new @help_window = Window_Help.new @help_window.back_opacity = 160 @help_window.visible = false @status_window = Window_BattleStatus.new @message_window = Window_Message.new # スプライトセットを作成 @spriteset = Spriteset_Battle.new # ウェイトカウントを初期化 @wait_count = 0 # トランジション実行 if $data_system.battle_transition == "" Graphics.transition(20) else Graphics.transition(40, "Graphics/Transitions/" + $data_system.battle_transition) end # プレバトルフェーズ開始 start_phase1 # メインループ loop do # ゲーム画面を更新 Graphics.update # 入力情報を更新 Input.update # フレーム更新 update # 画面が切り替わったらループを中断 if $scene != self break end end # マップをリフレッシュ $game_map.refresh # トランジション準備 Graphics.freeze # ウィンドウを解放 @troop_window.dispose @actor_command_window.dispose @party_command_window.dispose @help_window.dispose @status_window.dispose @message_window.dispose if @skill_window != nil @skill_window.dispose end if @item_window != nil @item_window.dispose end if @result_window != nil @result_window.dispose end # スプライトセットを解放 @spriteset.dispose # タイトル画面に切り替え中の場合 if $scene.is_a?(Scene_Title) # 画面をフェードアウト Graphics.transition Graphics.freeze end # 戦闘テストからゲームオーバー画面以外に切り替え中の場合 if $BTEST and not $scene.is_a?(Scene_Gameover) $scene = nil end end #-------------------------------------------------------------------------- # ● アクターコマンドウィンドウのセットアップ #-------------------------------------------------------------------------- alias phase3_setup_command_window_sdv_rich phase3_setup_command_window def phase3_setup_command_window phase3_setup_command_window_sdv_rich # アクターコマンドウィンドウの位置を設定 @actor_command_window.x = @active_battler.screen_x - (RICH_ACTCMD::W / 2) @actor_command_window.y = @active_battler.screen_y - (RICH_ACTCMD::H * 4) end end end # defined?(SideView) and defined?(RICH_ACTCMD)