#==============================================================================
# ■ 自定义技能反击 by Calendar99
#------------------------------------------------------------------------------
# 略。
#==============================================================================
module CLD99
module SpecialInvoke
# 反击表
#
# 格式:
# 英雄编号 => 反击技能编号
#
LIST = {
1 => 80,
2 => 1
}
end
end
class Scene_Battle
#--------------------------------------------------------------------------
# ● [别名修改]发动技能/物品
#--------------------------------------------------------------------------
alias invoke_item_for_special invoke_item
def invoke_item(target, item)
invoke_item_for_special(target, item) # 原方法
if @subject.enemy? && target.actor?
if skill_id = CLD99::SpecialInvoke::LIST[target.actor.id]
invoke_special_attack(target, skill_id)
end
end
end
#--------------------------------------------------------------------------
# ● [追加]特殊反击
#--------------------------------------------------------------------------
def invoke_special_attack(target, skill_id)
counter_skill = $data_skills[skill_id]
@log_window.display_counter_special(target, counter_skill)
@subject.item_apply(target, counter_skill)
refresh_status
@log_window.display_action_results(@subject, counter_skill)
end
end
class Window_BattleLog
#--------------------------------------------------------------------------
# ● 显示反击
#--------------------------------------------------------------------------
def display_counter_special(target, item)
back_one
Sound.play_evasion
add_text(sprintf("%s使用%s进行反击!", target.name, item.name))
wait
end
end