bug
parent
ffeb61578f
commit
a874e8623d
|
@ -0,0 +1,56 @@
|
|||
require("Modules/Battle/Logic/Base/Buff")
|
||||
Immune = Buff:New()
|
||||
|
||||
local immune1 = function(buff)
|
||||
return buff.type == BuffName.Control
|
||||
end
|
||||
local immune2 = function(buff)
|
||||
return buff.type == BuffName.DOT
|
||||
end
|
||||
|
||||
--初始化Buff,通过传入一些自定义参数控制成长相关的数值
|
||||
function Immune:SetData(...)
|
||||
--log("Immune:SetData")
|
||||
self.immuneType = ...
|
||||
end
|
||||
|
||||
--初始化后调用一次
|
||||
function Immune:OnStart()
|
||||
--log("Immune:OnStart")
|
||||
if self.immuneType == 1 then --免疫控制状态
|
||||
self.target.buffFilter:Add(immune1)
|
||||
elseif self.immuneType == 2 then --免疫dot
|
||||
self.target.buffFilter:Add(immune2)
|
||||
end
|
||||
end
|
||||
|
||||
--间隔N帧触发,返回true时表示继续触发,返回false立刻触发OnEnd
|
||||
function Immune:OnTrigger()
|
||||
--log("Immune:OnTrigger")
|
||||
return true
|
||||
end
|
||||
|
||||
--效果结束时调用一次
|
||||
function Immune:OnEnd()
|
||||
--log("Immune:OnEnd")
|
||||
local immune
|
||||
if self.immuneType == 1 then --免疫控制状态
|
||||
immune = immune1
|
||||
elseif self.immuneType == 2 then --免疫dot
|
||||
immune = immune2
|
||||
end
|
||||
for i = 1, self.target.buffFilter.size do
|
||||
if self.target.buffFilter.buffer[i] == immune then
|
||||
self.target.buffFilter:Remove(i)
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--只有当cover字段为true时触发,返回true则被新效果覆盖
|
||||
function Immune:OnCover(newBuff)
|
||||
--log("Immune:OnCover")
|
||||
return true
|
||||
end
|
||||
|
||||
return Immune
|
|
@ -181,7 +181,7 @@ public class CBean2Proto {
|
|||
|
||||
if (sMonsterConfig.getSkillList()!=null){
|
||||
for (Integer i : sMonsterConfig.getSkillList()){
|
||||
monsterSkillList.append(i);
|
||||
monsterSkillList.append(i).append("#");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue