Merge branch 'china/dev' of http://60.1.1.230/gaoxin/JL_Client into china/dev

dev_chengFeng
jiaoyangna 2021-12-10 16:09:49 +08:00
commit 6f34492c24
6 changed files with 31 additions and 18 deletions

View File

@ -2822,7 +2822,7 @@ local effectList = {
local round = args[3] local round = args[3]
BattleLogic.WaitForTrigger(interval, function () BattleLogic.WaitForTrigger(interval, function ()
local damage=floor(target:GetRoleData(p1)*v1) local damage=floor(target:GetRoleData(BattlePropList[p1])*v1)
local buff=Buff.Create(caster,BuffName.HOT,round,1,damage) local buff=Buff.Create(caster,BuffName.HOT,round,1,damage)
buff.hotType=2 buff.hotType=2
target:AddBuff(buff) target:AddBuff(buff)
@ -2858,7 +2858,7 @@ local effectList = {
local lessNum = max(maxNum - curNum, 0) local lessNum = max(maxNum - curNum, 0)
local level = math.floor(lessNum/i1) local level = math.floor(lessNum/i1)
local extra = BattleUtil.ErrorCorrection(level * v2) local extra = BattleUtil.ErrorCorrection(level * v2)
local damage=floor(target:GetRoleData(pro)*(v1+extra)) local damage=floor(target:GetRoleData(BattlePropList[pro])*(v1+extra))
BattleUtil.FinalDamageCountShield(nil,caster, target,damage) BattleUtil.FinalDamageCountShield(nil,caster, target,damage)
end) end)
end, end,

View File

@ -1,8 +1,7 @@
Shield = Buff:New() Shield = Buff:New()
-- 无敌吸血盾的免疫状态 -- 无敌吸血盾的免疫状态
local immune0 = function(buff) local immune0 = nil
return buff.type == BuffName.Control or buff.isDeBuff or buff.type == BuffName.DOT or buff.caster.camp~=buff.target.camp local onRoleBeHit=nil
end
--初始化Buff通过传入一些自定义参数控制成长相关的数值 --初始化Buff通过传入一些自定义参数控制成长相关的数值
function Shield:SetData(...) function Shield:SetData(...)
@ -16,26 +15,30 @@ function Shield:SetData(...)
self.cover = self.shieldType ~= ShieldTypeName.NormalReduce -- 除固定减伤盾外都不能叠加 self.cover = self.shieldType ~= ShieldTypeName.NormalReduce -- 除固定减伤盾外都不能叠加
-- 刷新排序等级 -- 刷新排序等级
self.sort = 4 self.sort = 4
end immune0=function(buff)
return buff.type == BuffName.Control or buff.isDeBuff or buff.type == BuffName.DOT or buff.caster.camp~=self.target.camp
local onRoleBeHit=function(atkRole, damage, bCrit, finalDmg, damageType, skill)
--damagetype为3 是 舍身济世分摊伤害
if damageType==3 then
return
end end
if skill then --技能造成的直接伤害 onRoleBeHit=function(atkRole, damage, bCrit, finalDmg, damageType, skill)
local rDamage = math.floor(damage*self.shieldValue) --damagetype为3 是 舍身济世分摊伤害
if rDamage ~= 0 then if damageType==3 then
BattleUtil.ApplyDamage(nil,self.target,atkRole, rDamage) return
end
if skill then --技能造成的直接伤害
LogError("damage=="..damage.." shiledv=="..self.shieldValue.." type=="..self.shieldType)
local rDamage = math.floor(damage*self.shieldValue)
if rDamage ~= 0 then
BattleUtil.ApplyDamage(nil,self.target,atkRole, rDamage)
end
end end
end end
end end
--初始化后调用一次 --初始化后调用一次
function Shield:OnStart() function Shield:OnStart()
self.target.shield:Add(self) self.target.shield:Add(self)
if self.shieldType == ShieldTypeName.AllReduce then if self.shieldType == ShieldTypeName.AllReduce then
self.target.buffFilter:Add(immune0) self.target.buffFilter:Add(immune0)
-- 清除所有负面buff -- 清除所有负面buff
@ -96,6 +99,8 @@ function Shield:CountShield(damage, atkRole,skill)
local treatValue = math.floor(BattleUtil.ErrorCorrection(damage * self.shieldValue)) local treatValue = math.floor(BattleUtil.ErrorCorrection(damage * self.shieldValue))
BattleUtil.ApplyTreat(self.target, self.target, treatValue) BattleUtil.ApplyTreat(self.target, self.target, treatValue)
end end
elseif self.shieldType == ShieldTypeName.ThornsReduce then
finalDamage=damage
end end
-- --
@ -140,6 +145,8 @@ function Shield:PreCountShield(damage)
elseif self.shieldType == ShieldTypeName.AllReduce then elseif self.shieldType == ShieldTypeName.AllReduce then
finalDamage = 0 finalDamage = 0
elseif self.shieldType == ShieldTypeName.ThornsReduce then
finalDamage=damage
end end
return finalDamage return finalDamage
end end

View File

@ -192,7 +192,7 @@ BattleEventName = {
ImmuneDebuffSuccess = indexAdd(),--免疫debuff成功 ImmuneDebuffSuccess = indexAdd(),--免疫debuff成功
ChangeRoleRage = indexAdd(),--改变角色怒气 ChangeRoleRage = indexAdd(),--改变角色怒气
PassiveChangeIgnoreDef = indexAdd(),--被动改变无视防御比例 PassiveChangeIgnoreDef = indexAdd(),--被动改变无视防御比例
PassiveChangeDefDMGReFac = indexAdd(),--被动改变伤比例 PassiveChangeDefDMGReFac = indexAdd(),--被动改变防御方减伤比例
PassiveChangeRoleHit = indexAdd(),--被动改变角色命中 PassiveChangeRoleHit = indexAdd(),--被动改变角色命中
} }

View File

@ -434,6 +434,8 @@ function EnemyView:OnShieldTrigger(shield,isImmuneAllReduceShield)
if atkRole and not isImmuneAllReduceShield then if atkRole and not isImmuneAllReduceShield then
self.Floater:ImageBuffFloating("z_zhandou_wudizi_zh") self.Floater:ImageBuffFloating("z_zhandou_wudizi_zh")
end end
elseif shield.shieldType == ShieldTypeName.ThornsReduce then
-- body
else else
self.Floater:ImageBuffFloating("z_zhandou_jianshang_zh") self.Floater:ImageBuffFloating("z_zhandou_jianshang_zh")
end end

View File

@ -493,7 +493,9 @@ function PlayerView:OnShieldTrigger(shield,isImmuneAllReduceShield)
if shield.shieldType == ShieldTypeName.AllReduce then if shield.shieldType == ShieldTypeName.AllReduce then
if atkRole and not isImmuneAllReduceShield then if atkRole and not isImmuneAllReduceShield then
self.Floater:ImageBuffFloating("z_zhandou_wudizi_zh") self.Floater:ImageBuffFloating("z_zhandou_wudizi_zh")
end end
elseif shield.shieldType == ShieldTypeName.ThornsReduce then
else else
self.Floater:ImageBuffFloating("z_zhandou_jianshang_zh") self.Floater:ImageBuffFloating("z_zhandou_jianshang_zh")
end end

View File

@ -447,6 +447,8 @@ function RoleView:OnShieldTrigger(shield,isImmuneAllReduceShield)
if atkRole and not isImmuneAllReduceShield then if atkRole and not isImmuneAllReduceShield then
self.Floater:ImageBuffFloating("z_zhandou_wudizi_zh") self.Floater:ImageBuffFloating("z_zhandou_wudizi_zh")
end end
elseif shield.shieldType == ShieldTypeName.ThornsReduce then
else else
self.Floater:ImageBuffFloating("z_zhandou_jianshang_zh") self.Floater:ImageBuffFloating("z_zhandou_jianshang_zh")
end end