Revert "【战斗】=======被动199"

This reverts commit c8603f010f.
dev_chengFeng
wangzhenxing 2021-10-16 18:07:30 +08:00
parent c1cf0e4a79
commit 267598d53b
3 changed files with 6 additions and 28 deletions

View File

@ -4242,21 +4242,14 @@ local passivityList = {
end,
--每回合最多受到自身生命上限[a]%的伤害(该伤害为来自武将的直接伤害血量最多扣到50%
--每回合最多受到自身生命上限[a]%的伤害(该伤害为来自武将的直接伤害
--a[float]
[199] = function(role, args)
local f1 = args[1]
local curDamage = 0
local maxPro=0
local function onRoundChange()
curDamage = 0
--本回合最多能扣到多少比例的血条
maxPro=(role:GetRoleData(RoleDataName.Hp)/role:GetRoleData(RoleDataName.MaxHp))-f1
if maxPro<0 then
maxPro=0
end
--LogError("本回合最多能扣到的比例=="..maxPro)
end
BattleLogic.Event:AddEvent(BattleEventName.BattleRoundChange, onRoundChange,nil,nil,role)
@ -4267,12 +4260,8 @@ local passivityList = {
return
end
--
--local maxDamage = role:GetRoleData(RoleDataName.MaxHp) * f1
--curDamage = curDamage + damage
--判断伤害是否能超出能扣除的最大伤害
local maxDamage =floor(role:GetRoleData(RoleDataName.Hp)-(role:GetRoleData(RoleDataName.MaxHp) * maxPro))
--LogError("本次能扣的最大伤害=="..maxDamage.." 本次伤害=="..damage)
curDamage=damage
local maxDamage = role:GetRoleData(RoleDataName.MaxHp) * f1
curDamage = curDamage + damage
if curDamage > maxDamage then
-- 计算免除的伤害值
local md = curDamage - maxDamage
@ -4283,7 +4272,7 @@ local passivityList = {
end
end
role.Event:AddEvent(BattleEventName.CheckLiZhanZhiQu, onFinalBeDamage,nil,nil,role)
role.Event:AddEvent(BattleEventName.FinalBeDamageEnd, onFinalBeDamage,nil,nil,role)
end,
@ -8180,9 +8169,7 @@ local passivityList = {
if not buff or buff.caster~=role or buff.type~=BuffName.Control then
return
end
if buff.target then
buff.target:AddBuff(Buff.Create(role, BuffName.PropertyChange, round, BattlePropList[pro],v1, ct))
end
buff.target:AddBuff(Buff.Create(role, BuffName.PropertyChange, round, BattlePropList[pro],v1, ct))
end
local OnSkillCast=function(skill)

View File

@ -77,7 +77,6 @@ BattleEventName = {
FinalDamage = indexAdd(),
FinalBeDamage = indexAdd(),
FinalBeDamageEnd = indexAdd(), --最后被攻击结束
CheckLiZhanZhiQu = indexAdd(),--检测历战之躯
HitMiss = indexAdd(),
BeHitMiss = indexAdd(),

View File

@ -750,14 +750,6 @@ function BattleUtil.FinalDamage(skill, atkRole, defRole, damage, bCrit, damageTy
realDamage=math.abs(defRole.bloodShield:CountBloodValue(damage))
-- damage=realDamage
end
--检测历战之躯
-- 造成的最终伤害
local damagingFunc = function(dmgDeduction)
realDamage = realDamage - dmgDeduction
damage=realDamage
end
defRole.Event:DispatchEvent(BattleEventName.CheckLiZhanZhiQu, damagingFunc, atkRole, realDamage, skill, dotType, bCrit, damageType,isDirect)
--LogError("最后扣除伤害=="..realDamage)
--御甲过滤后的伤害只会处理扣血 by: wangzhenxing shihongyi 2021/09/27
local finalDmg = defRole.data:SubValue(RoleDataName.Hp,realDamage)
if finalDmg >= 0 then