因为之前测试反射和反击的时候发现自己弄得一些东西没效果了所以又看了下Scene_Battle结果发现问题是这段脚本里面判定反射反击的那部分没有让使用者触发技能效果(没让使用者触发自然没效果,技能冷却也废了···),加了2句后可以了···然后——问题来了,要不要保留?VA原来的反击反射机制呢?如果保留是从target里面做手脚还是从item里面做手脚呢?
这是改动前
#-------------------------------------------------------------------------- # ● 发动技能/物品 #-------------------------------------------------------------------------- def invoke_item(target, item) if rand < target.item_cnt(@subject, item) invoke_counter_attack(target, item) elsif rand < target.item_mrf(@subject, item) invoke_magic_reflection(target, item) else apply_item_effects(apply_substitute(target, item), item) end @subject.last_target_index = target.index end
#--------------------------------------------------------------------------
# ● 发动技能/物品
#--------------------------------------------------------------------------
def invoke_item(target, item)
if rand < target.item_cnt(@subject, item)
invoke_counter_attack(target, item)
elsif rand < target.item_mrf(@subject, item)
invoke_magic_reflection(target, item)
else
apply_item_effects(apply_substitute(target, item), item)
end
@subject.last_target_index = target.index
end
改动后
#-------------------------------------------------------------------------- # ● 发动技能/物品 #-------------------------------------------------------------------------- def invoke_item(target, item) p target p item if rand < target.item_cnt(@subject, item) apply_item_effects(apply_substitute(target, item), item) invoke_counter_attack(target, item) elsif rand < target.item_mrf(@subject, item) apply_item_effects(apply_substitute(target, item), item) invoke_magic_reflection(target, item) else apply_item_effects(apply_substitute(target, item), item) end @subject.last_target_index = target.index end
#--------------------------------------------------------------------------
# ● 发动技能/物品
#--------------------------------------------------------------------------
def invoke_item(target, item)
p target
p item
if rand < target.item_cnt(@subject, item)
apply_item_effects(apply_substitute(target, item), item)
invoke_counter_attack(target, item)
elsif rand < target.item_mrf(@subject, item)
apply_item_effects(apply_substitute(target, item), item)
invoke_magic_reflection(target, item)
else
apply_item_effects(apply_substitute(target, item), item)
end
@subject.last_target_index = target.index
end
顺便带上小伙伴0v0为了防止@失败换行@吧···
@神秘影子
@莉德露
@美丽晨露
@弗雷德
@上贺茂润
@hys111111
@RyanBern
@︶ㄣ牛排ぶ
@myownroc
@铃仙·优昙
@华院·因幡
@Luciffer
@丿梁丶小柒
@熊喵酱
@taroxd
@VIPArcher
@喵呜喵5
@三途亚梦 |