加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员
x
#============================================================================== # ■ 简单自爆脚本 # 作者:Ruigi #============================================================================== class Scene_Battle < Scene_Base #-------------------------------------------------------------------------- # ● 使用技能(别名方法) #-------------------------------------------------------------------------- alias kill_use_item use_item def use_item item = @subject.current_action.item is_kill_skill = item.is_a?(RPG::Skill) && item.note.include?("<Kill>") kill_use_item if is_kill_skill # 在技能效果应用后执行死亡 @subject.hp = 0 # 等待一帧确保所有效果都已完成 call_later(:apply_kill_effect) end end #-------------------------------------------------------------------------- # ● 应用自爆效果(延迟执行) #-------------------------------------------------------------------------- def apply_kill_effect return unless @subject && @subject.hp == 0 @subject.perform_collapse_effect if @subject.dead? refresh_status end #-------------------------------------------------------------------------- # ● 延迟调用方法 #-------------------------------------------------------------------------- def call_later(method_name) send(method_name) end end
#==============================================================================
# ■ 简单自爆脚本
# 作者:Ruigi
#==============================================================================
class Scene_Battle < Scene_Base
#--------------------------------------------------------------------------
# ● 使用技能(别名方法)
#--------------------------------------------------------------------------
alias kill_use_item use_item
def use_item
item = @subject.current_action.item
is_kill_skill = item.is_a?(RPG::Skill) && item.note.include?("<Kill>")
kill_use_item
if is_kill_skill
# 在技能效果应用后执行死亡
@subject.hp = 0
# 等待一帧确保所有效果都已完成
call_later(:apply_kill_effect)
end
end
#--------------------------------------------------------------------------
# ● 应用自爆效果(延迟执行)
#--------------------------------------------------------------------------
def apply_kill_effect
return unless @subject && @subject.hp == 0
@subject.perform_collapse_effect if @subject.dead?
refresh_status
end
#--------------------------------------------------------------------------
# ● 延迟调用方法
#--------------------------------------------------------------------------
def call_later(method_name)
send(method_name)
end
end
|