Project1
标题:
反伤被敌人到0血,空血仍然能进行战斗
[打印本页]
作者:
契约师Vi
时间:
2023-1-1 10:03
标题:
反伤被敌人到0血,空血仍然能进行战斗
[pre lang="ruby"]#--------------------------------------------------------------------------
# ● 刷新画面 (主回合步骤 5 : 显示伤害)
#--------------------------------------------------------------------------
def update_phase4_step5
# 隐藏帮助窗口
@help_window.visible = false
# 刷新状态窗口
@status_window.refresh
# 显示伤害
for target in @target_battlers
if target.damage != nil
target.damage_pop = true
#反伤甲,荆棘铠甲
if target.is_a?(Game_Actor) && target.state?(17)
if @active_battler.is_a?(Game_Enemy) && target.damage <=0
@active_battler.animation_id = @animation2_id
@active_battler.animation_hit = (target.damage != "Miss")
@active_battler.hp-= 1000
# else
# if target.damage > 0
# target.remove_state(17)
end
end
#解释下上面的意思:角色在17号状态下被敌人使用技能击打的时候如果伤害<=0
#则行动者会受到自己的动画反弹并且掉去10000的血量
#如果伤害》0的话 那么被击打的对象就会失去17号状态 切伤害正常化
#我测试过有用啊 是你自己没有在事件里面设定吧
#17号状态是否勾去战后解除 还是不解除你要检查一下
#我测试过没问题的啊
end
end
# 移至步骤 6
@phase4_step = 6
end[/pre]
[pre lang="ruby"] #反伤
#if self.state?(17)
#attacker.hp -= self.damage/3
#end[/pre]
Scene_Battle 4 600行
Game_Battler 3 60行
两种方法反伤 都在被打死的 情况下扔可以继续战斗
作者:
enghao_lim
时间:
2023-1-3 23:37
你可以检查以下确认角色或者敌人死亡在第几个step,很可能你的反伤在确认死亡的步骤之后。
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X5.0