class Scene_Battle < Scene_Base
def command_item
if $game_switches[10]==true
@item_window.refresh
@item_window.show.activate
else
Audio.se_play("Audio/SE/Buzzer1")
@actor_command_window.activate
end
end
def command_escape
if $game_switches[10]==true
turn_start unless BattleManager.process_escape
else
Audio.se_play("Audio/SE/Buzzer1")
@actor_command_window.activate
end
end
end
class Scene_Battle < Scene_Base
def command_item
if $game_switches[10]==true
@item_window.refresh
@item_window.show.activate
else
Audio.se_play("Audio/SE/Buzzer1")
@actor_command_window.activate
end
end
def command_escape
if $game_switches[10]==true
turn_start unless BattleManager.process_escape
else
Audio.se_play("Audio/SE/Buzzer1")
@actor_command_window.activate
end
end
end
module BattleManager
class <<self; alias can_escape_old can_escape?; end
def self.can_escape?
!$game_party.battle_members.any? {|actor| actor.state?(2)} &&
can_escape_old
end
end
class Window_ActorCommand
def add_item_command
add_command(Vocab::item, :item, !@actor.state?(2))
end
end
module BattleManager
class <<self; alias can_escape_old can_escape?; end
def self.can_escape?
!$game_party.battle_members.any? {|actor| actor.state?(2)} &&
can_escape_old
end
end
class Window_ActorCommand
def add_item_command
add_command(Vocab::item, :item, !@actor.state?(2))
end
end