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]
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)
buff.hotType=2
target:AddBuff(buff)
@ -2858,7 +2858,7 @@ local effectList = {
local lessNum = max(maxNum - curNum, 0)
local level = math.floor(lessNum/i1)
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)
end)
end,

View File

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

View File

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

View File

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

View File

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

View File

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