嘛小紅不是都说了是用技能了吗
技能效果里可以执行公共事件的说
顺便修改小许脚本来让纯事件技能的效果不那麽奇怪好了
class Window_BattleLog < Window_Selectable #-------------------------------------------------------------------------- # ● 使用技能時跳過空白信息 #-------------------------------------------------------------------------- def display_use_item(subject, item) if item.is_a?(RPG::Skill) unless item.message1.empty? add_text(subject.name + item.message1) end unless item.message2.empty? wait add_text(item.message2) end else add_text(sprintf(Vocab::UseItem, subject.name, item.name)) end end end class Scene_Battle < Scene_Base #-------------------------------------------------------------------------- # ● 取消行動前閃爍效果 #-------------------------------------------------------------------------- def execute_action use_item @log_window.wait_and_clear end #-------------------------------------------------------------------------- # ● 技能訊息為空白時不顯示閃爍效果 #-------------------------------------------------------------------------- def use_item item = @subject.current_action.item if item.is_a?(RPG::Skill) unless item.message1.empty? @subject.sprite_effect_type = :whiten end end @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) targets.each {|target| item.repeats.times { invoke_item(target, item) } } end #-------------------------------------------------------------------------- # ● 技能訊息為空白時不顯示訊息 #-------------------------------------------------------------------------- def apply_item_effects(target, item) target.item_apply(@subject, item) refresh_status if item.is_a?(RPG::Skill) unless item.message1.empty? @log_window.display_action_results(target, item) end end end end
class Window_BattleLog < Window_Selectable
#--------------------------------------------------------------------------
# ● 使用技能時跳過空白信息
#--------------------------------------------------------------------------
def display_use_item(subject, item)
if item.is_a?(RPG::Skill)
unless item.message1.empty?
add_text(subject.name + item.message1)
end
unless item.message2.empty?
wait
add_text(item.message2)
end
else
add_text(sprintf(Vocab::UseItem, subject.name, item.name))
end
end
end
class Scene_Battle < Scene_Base
#--------------------------------------------------------------------------
# ● 取消行動前閃爍效果
#--------------------------------------------------------------------------
def execute_action
use_item
@log_window.wait_and_clear
end
#--------------------------------------------------------------------------
# ● 技能訊息為空白時不顯示閃爍效果
#--------------------------------------------------------------------------
def use_item
item = @subject.current_action.item
if item.is_a?(RPG::Skill)
unless item.message1.empty?
@subject.sprite_effect_type = :whiten
end
end
@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)
targets.each {|target| item.repeats.times { invoke_item(target, item) } }
end
#--------------------------------------------------------------------------
# ● 技能訊息為空白時不顯示訊息
#--------------------------------------------------------------------------
def apply_item_effects(target, item)
target.item_apply(@subject, item)
refresh_status
if item.is_a?(RPG::Skill)
unless item.message1.empty?
@log_window.display_action_results(target, item)
end
end
end
end
Project1.zip
(1.54 MB, 下载次数: 53)
|