本帖最后由 taroxd 于 2014-5-1 17:18 编辑
未经仔细测试,很可能有奇怪的bug
class Scene_Battle < Scene_Base #-------------------------------------------------------------------------- # ● 使用技能/物品 #-------------------------------------------------------------------------- def use_item item = @subject.current_action.item @log_window.display_use_item(@subject, item) @subject.use_item(item) refresh_status targets = @subject.current_action.make_targets.compact show_animation(targets, item.animation_id) return unless (last_target = targets.pop) @log_window.method_wait = @log_window.method_wait_for_effect = nil targets.each {|target| item.repeats.times { invoke_item(target, item) } } @log_window.method_wait = method(:wait) @log_window.method_wait_for_effect = method(:wait_for_effect) item.repeats.times { invoke_item(last_target, item) } end end class Window_BattleLog < Window_Selectable #-------------------------------------------------------------------------- # ● 显示行动结果 #-------------------------------------------------------------------------- def display_action_results(target, item) if target.result.used last_line_number = line_number display_critical(target, item) display_damage(target, item) display_affected_status(target, item) display_failure(target, item) wait if line_number > last_line_number end end end
class Scene_Battle < Scene_Base
#--------------------------------------------------------------------------
# ● 使用技能/物品
#--------------------------------------------------------------------------
def use_item
item = @subject.current_action.item
@log_window.display_use_item(@subject, item)
@subject.use_item(item)
refresh_status
targets = @subject.current_action.make_targets.compact
show_animation(targets, item.animation_id)
return unless (last_target = targets.pop)
@log_window.method_wait = @log_window.method_wait_for_effect = nil
targets.each {|target| item.repeats.times { invoke_item(target, item) } }
@log_window.method_wait = method(:wait)
@log_window.method_wait_for_effect = method(:wait_for_effect)
item.repeats.times { invoke_item(last_target, item) }
end
end
class Window_BattleLog < Window_Selectable
#--------------------------------------------------------------------------
# ● 显示行动结果
#--------------------------------------------------------------------------
def display_action_results(target, item)
if target.result.used
last_line_number = line_number
display_critical(target, item)
display_damage(target, item)
display_affected_status(target, item)
display_failure(target, item)
wait if line_number > last_line_number
end
end
end
|