#============================================================================== # ■ RGSS3 簡易オートコマンド Ver1.00 by 星潟 #------------------------------------------------------------------------------ # パーティコマンドにオートを追加します。 # また、特定のスイッチをONにする事でオートコマンドを禁止する事も出来ます。 # 最低限の処理だけを実装しています。 #============================================================================== module AutoBattle #オートのコマンド名を指定。 Name = "オート" #オートコマンドを選択不能にする為のスイッチIDを指定。 #0の場合、選択不能にする機能自体を使用しない。 SSID = 0 end class Window_PartyCommand < Window_Command #-------------------------------------------------------------------------- # コマンドリストの作成 #-------------------------------------------------------------------------- alias make_command_list_auto_battle make_command_list def make_command_list make_command_list_auto_battle add_command(AutoBattle::Name,:auto_battle,!$game_switches[AutoBattle::SSID]) end end class Scene_Battle < Scene_Base #-------------------------------------------------------------------------- # パーティコマンドウィンドウの作成 #-------------------------------------------------------------------------- alias create_party_command_window_auto_battle create_party_command_window def create_party_command_window create_party_command_window_auto_battle @party_command_window.set_handler(:auto_battle,method(:command_auto_battle)) end #-------------------------------------------------------------------------- # 自動戦闘の実行 #-------------------------------------------------------------------------- def command_auto_battle $game_party.members.each {|m| m.make_auto_battle_actions if m.inputable?} turn_start end end