parent
bc32f15fc9
commit
7618fa2b3a
|
@ -12889,33 +12889,28 @@ local passivityList = {
|
|||
local type=args[1]
|
||||
local r1=args[2]
|
||||
--移除破甲
|
||||
local buffBeAdd=function(caster,target,buff)
|
||||
if caster==role and buff.type==BuffName.PropertyChange and buff.changeType==4 then
|
||||
--LogError("1111111111111111111111111111111111111111")
|
||||
-- local phy1=target:GetRoleData(RoleDataName.PhysicalDefence)
|
||||
-- local mag1=target:GetRoleData(RoleDataName.MagicDefence)
|
||||
-- BattleLogic.WaitForTrigger(1, function ()
|
||||
-- local phy2=target:GetRoleData(RoleDataName.PhysicalDefence)
|
||||
-- local mag2=target:GetRoleData(RoleDataName.MagicDefence)
|
||||
-- local list={}
|
||||
-- --LogError("phy2==="..phy2.." phy1==="..phy1)
|
||||
-- if type==1 then
|
||||
-- table.insert(list,role)
|
||||
-- else
|
||||
-- list=RoleManager.RoleManager.Query(function(v) return v.camp == role.camp end)
|
||||
-- end
|
||||
-- for i=1,#list do
|
||||
-- if mag1-mag2>0 then
|
||||
-- list[i]:AddBuff(Buff.Create(role, BuffName.PropertyChange, r1,RoleDataName.MagicDefence, mag1-mag2, 1))
|
||||
-- end
|
||||
-- if phy1-phy2>0 then
|
||||
-- list[i]:AddBuff(Buff.Create(role, BuffName.PropertyChange, r1,RoleDataName.PhysicalDefence, phy1-phy2, 1))
|
||||
-- end
|
||||
-- end
|
||||
-- end)
|
||||
local buffBeAdd=function(buff)
|
||||
if buff.caster==role and buff.type==BuffName.PropertyChange and buff.changeType==4 then
|
||||
local phy1=buff.target:GetRoleData(buff.propertyName)
|
||||
BattleLogic.WaitForTrigger(1, function ()
|
||||
local phy2=buff.target:GetRoleData(buff.propertyName)
|
||||
local list={}
|
||||
if type==1 then
|
||||
table.insert(list,role)
|
||||
else
|
||||
list=RoleManager.Query(function(v) return v.camp == role.camp end)
|
||||
end
|
||||
for i=1,#list do
|
||||
if phy1-phy2>0 then
|
||||
list[i]:AddBuff(Buff.Create(role, BuffName.PropertyChange, r1,buff.propertyName, phy1-phy2, 1))
|
||||
end
|
||||
end
|
||||
end)
|
||||
end
|
||||
end
|
||||
BattleLogic.Event:AddEvent(BattleEventName.RecordBuff, buffBeAdd,nil,nil,role)
|
||||
role.Event:AddEvent(BattleEventName.BuffCaster, buffBeAdd,nil,nil,role)
|
||||
|
||||
|
||||
end,
|
||||
}
|
||||
return passivityList
|
Loading…
Reference in New Issue