加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员
x
本帖最后由 chen12311 于 2024-7-12 17:09 编辑
module Text TEXT="弱点击破" SKILL_ID=27 SRECH_ID=2#ID判断是否为进攻 end #获得技能ID class Game_Action def rout? if Text::SRECH_ID==2 p '空' else item == $data_skills[subject.rout_skill_id] end end def set_rout set_skill(subject.rout_skill_id) self end end class Game_BattlerBase def rout_skill_id return Text::SKILL_ID end #判定技能使用 def rout_usable? usable?($data_skills[rout_skill_id]) end end class Window_ActorCommand < Window_Command def add_rout_command add_command(Vocab::rout, :rout, @actor.rout_usable?) end end class Scene_Battle < Scene_Base def command_rout if Text::SRECH_ID==2 BattleManager.actor.input.set_rout next_command else BattleManager.actor.input.set_rout select_enemy_selection end end end #以上为技能选项的前台,不能显示选项 class Game_Temp attr_accessor :battle_rout alias initialize_battle_rout initialize def initialize initialize_battle_rout @battle_equip = false end end class Window_ActorCommand < Window_Command def add_rout_command add_command([Text::TEXT, nil], :rout, true) end alias make_command_list_rout make_command_list def make_command_list make_command_list_rout add_rout_command end def set_up(a) @actor=a clear_command_list make_command_list refresh select(0) activate open end end class Scene_Battle < Scene_Base alias create_all_windows_rout create_all_windows def create_all_windows create_all_windows_rout end alias create_actor_command_window_rout create_actor_command_window def create_actor_command_window create_actor_command_window_rout @actor_command_window.set_handler(:rout, method(:command_rout)) end def on_enemy_ok BattleManager.actor.input.target_index = @enemy_window.enemy.index @enemy_window.hide @skill_window.hide @item_window.hide next_command end #-------------------------------------------------------------------------- # ● 敌人“取消” #-------------------------------------------------------------------------- alias rout_on_enemy_cancel on_enemy_cancel def on_enemy_cancel case @actor_command_window.current_symbol when :rout @actor_command_window.activate end rout_on_enemy_cancel end end
module Text
TEXT="弱点击破"
SKILL_ID=27
SRECH_ID=2#ID判断是否为进攻
end
#获得技能ID
class Game_Action
def rout?
if Text::SRECH_ID==2
p '空'
else
item == $data_skills[subject.rout_skill_id]
end
end
def set_rout
set_skill(subject.rout_skill_id)
self
end
end
class Game_BattlerBase
def rout_skill_id
return Text::SKILL_ID
end
#判定技能使用
def rout_usable?
usable?($data_skills[rout_skill_id])
end
end
class Window_ActorCommand < Window_Command
def add_rout_command
add_command(Vocab::rout, :rout, @actor.rout_usable?)
end
end
class Scene_Battle < Scene_Base
def command_rout
if Text::SRECH_ID==2
BattleManager.actor.input.set_rout
next_command
else
BattleManager.actor.input.set_rout
select_enemy_selection
end
end
end
#以上为技能选项的前台,不能显示选项
class Game_Temp
attr_accessor :battle_rout
alias initialize_battle_rout initialize
def initialize
initialize_battle_rout
@battle_equip = false
end
end
class Window_ActorCommand < Window_Command
def add_rout_command
add_command([Text::TEXT, nil], :rout, true)
end
alias make_command_list_rout make_command_list
def make_command_list
make_command_list_rout
add_rout_command
end
def set_up(a)
@actor=a
clear_command_list
make_command_list
refresh
select(0)
activate
open
end
end
class Scene_Battle < Scene_Base
alias create_all_windows_rout create_all_windows
def create_all_windows
create_all_windows_rout
end
alias create_actor_command_window_rout create_actor_command_window
def create_actor_command_window
create_actor_command_window_rout
@actor_command_window.set_handler(:rout, method(:command_rout))
end
def on_enemy_ok
BattleManager.actor.input.target_index = @enemy_window.enemy.index
@enemy_window.hide
@skill_window.hide
@item_window.hide
next_command
end
#--------------------------------------------------------------------------
# ● 敌人“取消”
#--------------------------------------------------------------------------
alias rout_on_enemy_cancel on_enemy_cancel
def on_enemy_cancel
case @actor_command_window.current_symbol
when :rout
@actor_command_window.activate
end
rout_on_enemy_cancel
end
end
|