#===========================================================================42=
#尊重作者辛苦...
#使用时请保留此信息...
#yayapipi~
#以下是脚本,勿改!
#==============================================================================
##### START OF CODE #####
puts "MITCHI Auto Battle when Idle loaded"
class Scene_Battle < Scene_Base
alias idle_auto_start start
alias idle_auto_update update
alias idle_auto_turn_end turn_end
def start
idle_auto_start
@idle_counter = 0
end
def idle_auto_key_trigger?
if (Input.trigger?(:DOWN) or Input.trigger?(:UP))
return true
elsif (Input.trigger?(:C) or Input.trigger?(:B))
return true
end
return false
end
def idle_manual_key_press?
if (Input.trigger?(IDLE_AUTO_KEY))
return true
end
return false
end
def update
idle_auto_update
if !$game_switches[DISABLE_IDLE_SWITCH]
if @party_command_window.active or @actor_command_window.active
@idle_counter = 0 if idle_auto_key_trigger?
@idle_counter += 1
@idle_counter = MAB_IDLE_FRAMES if idle_manual_key_press?
if @idle_counter == (MAB_IDLE_FRAMES)
puts "Auto Battle Idle mode enabled!"
for i in 0..$game_party.members.size-1
actor_set_auto = $game_party.members.id
$game_actors[actor_set_auto].make_auto_battle_actions
end
Sound.play_ok
@party_command_window.deactivate if @party_command_window.active
@actor_command_window.deactivate if @actor_command_window.active
turn_start
end
end
end
end
def turn_end
@idle_counter = 0
idle_auto_turn_end
end