Merge branch 'china/dev' of http://60.1.1.230/gaoxin/JL_Client into china/dev
commit
4a9463fe5b
|
|
@ -1,7 +1,12 @@
|
|||
Shield = Buff:New()
|
||||
-- 无敌吸血盾的免疫状态
|
||||
local immune0 = nil
|
||||
local onRoleBeHit=nil
|
||||
--local immune0 = nil
|
||||
--local onRoleBeHit=nil
|
||||
|
||||
|
||||
-- function Shield:immune0(buff)
|
||||
-- return buff.type == BuffName.Control or buff.isDeBuff or buff.type == BuffName.DOT or (buff.caster~=nil and buff.caster.camp~=self.target.camp and buff.type~= BuffName.Exile)
|
||||
-- end
|
||||
--初始化Buff,通过传入一些自定义参数控制成长相关的数值
|
||||
function Shield:SetData(...)
|
||||
|
||||
|
|
@ -15,11 +20,8 @@ function Shield:SetData(...)
|
|||
self.cover = self.shieldType ~= ShieldTypeName.NormalReduce -- 除固定减伤盾外都不能叠加
|
||||
-- 刷新排序等级
|
||||
self.sort = 4
|
||||
immune0=function(buff)
|
||||
return buff.type == BuffName.Control or buff.isDeBuff or buff.type == BuffName.DOT or (buff.caster.camp~=self.target.camp and buff.type~= BuffName.Exile
|
||||
)
|
||||
end
|
||||
onRoleBeHit=function(atkRole, damage, bCrit, finalDmg, damageType, skill)
|
||||
|
||||
self.onRoleBeHit=function(atkRole, damage, bCrit, finalDmg, damageType, skill)
|
||||
--damagetype为3 是 舍身济世分摊伤害
|
||||
if damageType==3 then
|
||||
return
|
||||
|
|
@ -31,6 +33,10 @@ function Shield:SetData(...)
|
|||
end
|
||||
end
|
||||
end
|
||||
|
||||
self.immune0=function(buff)
|
||||
return buff.type == BuffName.Control or buff.isDeBuff or buff.type == BuffName.DOT or (buff.caster.camp~=self.target.camp and buff.type~= BuffName.Exile)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
|
@ -40,13 +46,13 @@ function Shield:OnStart()
|
|||
self.target.shield:Add(self)
|
||||
|
||||
if self.shieldType == ShieldTypeName.AllReduce then
|
||||
self.target.buffFilter:Add(immune0)
|
||||
self.target.buffFilter:Add(self.immune0)
|
||||
-- 清除所有负面buff
|
||||
BattleLogic.BuffMgr:ClearBuff(self.target, function (buff)
|
||||
return buff.type == BuffName.Control or buff.type == BuffName.DOT or buff.caster.camp~=self.target.camp
|
||||
end)
|
||||
elseif self.shieldType == ShieldTypeName.ThornsReduce then
|
||||
self.target.Event:AddEvent(BattleEventName.RoleBeHit,onRoleBeHit,nil,nil,self.target)
|
||||
self.target.Event:AddEvent(BattleEventName.RoleBeHit,self.onRoleBeHit,nil,nil,self.target)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
@ -189,22 +195,23 @@ function Shield:OnEnd()
|
|||
end
|
||||
|
||||
elseif self.shieldType == ShieldTypeName.AllReduce then
|
||||
-- 移除免疫效果
|
||||
for i = 1, self.target.buffFilter.size do
|
||||
if self.target.buffFilter.buffer[i] == self.immune0 then
|
||||
self.target.buffFilter:Remove(i)
|
||||
break
|
||||
end
|
||||
end
|
||||
for i = 1, self.target.shield.size do
|
||||
if self.target.shield.buffer[i] == self then
|
||||
self.target.shield:Remove(i)
|
||||
break
|
||||
end
|
||||
end
|
||||
-- 移除免疫效果
|
||||
for i = 1, self.target.buffFilter.size do
|
||||
if self.target.buffFilter.buffer[i] == immune0 then
|
||||
self.target.buffFilter:Remove(i)
|
||||
break
|
||||
end
|
||||
end
|
||||
|
||||
elseif self.shieldType == ShieldTypeName.ThornsReduce then
|
||||
|
||||
self.target.Event:RemoveEvent(BattleEventName.RoleBeHit,onRoleBeHit,nil,nil,self.target)
|
||||
self.target.Event:RemoveEvent(BattleEventName.RoleBeHit,self.onRoleBeHit,nil,nil,self.target)
|
||||
|
||||
for i = 1, self.target.shield.size do
|
||||
if self.target.shield.buffer[i] == self then
|
||||
|
|
|
|||
|
|
@ -12,12 +12,12 @@ local artResourcesConfig=ConfigManager.GetConfig(ConfigName.ArtResourcesConfig)
|
|||
local pool=ConfigManager.GetConfig(ConfigName.WishActivityPool)
|
||||
function this:InitComponent(gameObject)
|
||||
this.title = Util.GetGameObject(gameObject,"title"):GetComponent("Text")
|
||||
this.tip = Util.GetGameObject(gameObject,"tip"):GetComponent("Text")
|
||||
this.itemGrid=Util.GetGameObject(gameObject,"panel/itemGrid")
|
||||
this.LookDetailBtn=Util.GetGameObject(gameObject,"panel/Image3/updetail")
|
||||
this.LookDetailBtn:SetActive(false)
|
||||
this.content=Util.GetGameObject(gameObject,"panel/content/grid/Text"):GetComponent("Text")
|
||||
this.time=Util.GetGameObject(gameObject,"tip"):GetComponent("Text")
|
||||
this.time:SetActive(false)
|
||||
this.grid = Util.GetGameObject(gameObject,"panel/rate/grid")
|
||||
this.pre = Util.GetGameObject(gameObject,"panel/rate/rateprefab")
|
||||
this.secondTitle=Util.GetGameObject(gameObject,"panel/Image1/Text"):GetComponent("Text")
|
||||
|
|
@ -54,7 +54,6 @@ function this:OnShow(_parent,_Data)
|
|||
|
||||
activityType = args[2]
|
||||
local str2 = ActivityGiftManager.GetTimeStartToEnd(activityType)
|
||||
this.time.text="概率有效期:"..str2
|
||||
|
||||
local poolUpType = args[3] or 0
|
||||
local poolType = args[4] or 0
|
||||
|
|
|
|||
Loading…
Reference in New Issue