不需要target.item_id吧,直接这样不好吗
#-------------------------------------------------------------------------- # ● 發動反擊 #-------------------------------------------------------------------------- def invoke_counter_attack(target, item) @log_window.display_counter(target, item) item_id = item.id #這裡 attack_skill = $data_skills[item_id] #和這裡改了 @subject.item_apply(target, attack_skill) refresh_status @log_window.display_action_results(@subject, attack_skill) end
#--------------------------------------------------------------------------
# ● 發動反擊
#--------------------------------------------------------------------------
def invoke_counter_attack(target, item)
@log_window.display_counter(target, item)
item_id = item.id #這裡
attack_skill = $data_skills[item_id] #和這裡改了
@subject.item_apply(target, attack_skill)
refresh_status
@log_window.display_action_results(@subject, attack_skill)
end
未测试,楼主可以试一下 |