$xh ={}
$xh[103] =[256,100]
$xh[104] =[256,200]
$xh[140] =[256,200]
class Scene_Battle
def update_phase4_step5
# 隐藏帮助窗口
@help_window.visible = false
# 刷新状态窗口
@status_window.refresh
# 显示伤害
for target in @target_battlers
if target.damage != nil
target.damage_pop = true
end
end
# 条件分歧 开始 当角色使用吸收HP技能
if $xh.include?(@active_battler.current_action.skill_id)
# 条件分歧 开始 当原始伤害不为nil和大于1
if target.damage != nil and target.damage > 1
# 播放动画
@active_battler.animation_id =$xh[@active_battler.current_action.skill_id][0]
# 显示回血
@active_battler.damage = -(target.damage * $xh[@active_battler.current_action.skill_id][1] /100.0 ).truncate #额,好吧,弄成整数就行了.
@active_battler.damage_pop = true
# 恢复HP
@active_battler.hp += (target.damage * $xh[@active_battler.current_action.skill_id][1] /100.0 ).truncate #额,好吧,弄成整数就行了.
# 条件分歧 结束
end
# 条件分歧 结束
end
# 移至步骤 6
@phase4_step = 6
end
end
$xh ={}
$xh[103] =[256,100]
$xh[104] =[256,200]
$xh[140] =[256,200]
class Scene_Battle
def update_phase4_step5
# 隐藏帮助窗口
@help_window.visible = false
# 刷新状态窗口
@status_window.refresh
# 显示伤害
for target in @target_battlers
if target.damage != nil
target.damage_pop = true
end
end
# 条件分歧 开始 当角色使用吸收HP技能
if $xh.include?(@active_battler.current_action.skill_id)
# 条件分歧 开始 当原始伤害不为nil和大于1
if target.damage != nil and target.damage > 1
# 播放动画
@active_battler.animation_id =$xh[@active_battler.current_action.skill_id][0]
# 显示回血
@active_battler.damage = -(target.damage * $xh[@active_battler.current_action.skill_id][1] /100.0 ).truncate #额,好吧,弄成整数就行了.
@active_battler.damage_pop = true
# 恢复HP
@active_battler.hp += (target.damage * $xh[@active_battler.current_action.skill_id][1] /100.0 ).truncate #额,好吧,弄成整数就行了.
# 条件分歧 结束
end
# 条件分歧 结束
end
# 移至步骤 6
@phase4_step = 6
end
end