# ● 扣除技能的使用消耗
#--------------------------------------------------------------------------
alias :old_pay_skill_cost :pay_skill_cost
def pay_skill_cost(skill)
old_pay_skill_cost(skill)
###########
case skill.id
when 1
@cp -= CP_COST_BASIC_ATTACK
when 2
@cp -= CP_COST_BASIC_GUARD
when 3...999 # 可自订不同消耗的技能
@cp -= CP_COST_SKILL_ITEM_ACTION
else
@cp = 0
end
###########
end
end
#--------------------------------------------------------
#--------------------------------------------------------------------------
# ● 重定义:处理战斗行动
#--------------------------------------------------------------------------
def process_action
@cp_thread.stop = true
return if scene_changing?
if !@subject || !@subject.current_action
@subject = BattleManager.next_subject
end
return turn_end unless @subject
if @subject.current_action
@subject.current_action.prepare
if @subject.current_action.valid?
@status_window.open
execute_action
end
@subject.remove_current_action
end
process_event
process_action_end unless @subject.current_action
end