请插到Main之前class Scene_Battle ST_SEAL_ATTACK = 17 # 不能使用攻击的状态ID ST_SEAL_SKILL = 18 # 不能使用特技的状态ID ST_SEAL_DEFEND = 19 # 不能使用防御的状态ID ST_SEAL_ITEM = 20 # 不能使用道具的状态ID ST_SEAL = [ST_SEAL_ATTACK, ST_SEAL_SKILL, ST_SEAL_DEFEND, ST_SEAL_ITEM] unless method_defined? :sailcat_phase3_setup_command_window alias sailcat_phase3_setup_command_window phase3_setup_command_window alias sailcat_update_phase3_basic_command update_phase3_basic_command end def phase3_setup_command_window sailcat_phase3_setup_command_window 4.times do |i| if @active_battler.state?(ST_SEAL[i]) @actor_command_window.disable_item(i) else normal_color = @actor_command_window.normal_color @actor_command_window.draw_item(i, normal_color) end end end def update_phase3_basic_command if Input.trigger?(Input::C) and @active_battler.state?(ST_SEAL[@actor_command_window.index]) $game_system.se_play($data_system.buzzer_se) return end sailcat_update_phase3_basic_command end end
class Scene_Battle
ST_SEAL_ATTACK = 17 # 不能使用攻击的状态ID
ST_SEAL_SKILL = 18 # 不能使用特技的状态ID
ST_SEAL_DEFEND = 19 # 不能使用防御的状态ID
ST_SEAL_ITEM = 20 # 不能使用道具的状态ID
ST_SEAL = [ST_SEAL_ATTACK, ST_SEAL_SKILL, ST_SEAL_DEFEND, ST_SEAL_ITEM]
unless method_defined? :sailcat_phase3_setup_command_window
alias sailcat_phase3_setup_command_window phase3_setup_command_window
alias sailcat_update_phase3_basic_command update_phase3_basic_command
end
def phase3_setup_command_window
sailcat_phase3_setup_command_window
4.times do |i|
if @active_battler.state?(ST_SEAL[i])
@actor_command_window.disable_item(i)
else
normal_color = @actor_command_window.normal_color
@actor_command_window.draw_item(i, normal_color)
end
end
end
def update_phase3_basic_command
if Input.trigger?(Input::C) and @active_battler.state?(ST_SEAL[@actor_command_window.index])
$game_system.se_play($data_system.buzzer_se)
return
end
sailcat_update_phase3_basic_command
end
end
|