#============================================================================== # ■ RGSS3 簡易オート攻撃コマンド Ver1.00 by 星潟 #------------------------------------------------------------------------------ # パーティコマンドにオート攻撃用コマンドを追加します。 # オート攻撃を選択すると、パーティメンバー全員で通常攻撃を行います。 # (操作不能なパーティメンバーは独自に攻撃します) # # また、特定のスイッチをONにする事でオート攻撃コマンドを禁止する事も出来ます。 # 最低限の処理だけを実装しています。 #============================================================================== module AutoAttack #オート攻撃のコマンド名を指定。 Name = "オート攻撃" #オート攻撃コマンドを選択不能にする為のスイッチIDを指定。 #0の場合、選択不能にする機能自体を使用しない。 SSID = 0 end class Game_Actor < Game_Battler #-------------------------------------------------------------------------- # オート攻撃時の戦闘行動を作成 #-------------------------------------------------------------------------- def make_auto_attack_actions @actions.size.times do |i| @actions[i] = Game_Action.new(self).set_attack.evaluate end end end class Window_PartyCommand < Window_Command #-------------------------------------------------------------------------- # コマンドリストの作成 #-------------------------------------------------------------------------- alias make_command_list_auto_attack make_command_list def make_command_list make_command_list_auto_attack add_command(AutoAttack::Name,:auto_attack,!$game_switches[AutoAttack::SSID]) end end class Scene_Battle < Scene_Base #-------------------------------------------------------------------------- # パーティコマンドウィンドウの作成 #-------------------------------------------------------------------------- alias create_party_command_window_auto_attack create_party_command_window def create_party_command_window create_party_command_window_auto_attack @party_command_window.set_handler(:auto_attack,method(:command_auto_attack)) end #-------------------------------------------------------------------------- # 自動戦闘の実行 #-------------------------------------------------------------------------- def command_auto_attack $game_party.members.each {|m| m.make_auto_attack_actions if m.inputable?} turn_start end end