diff --git a/src/adv/AdvPassive.lua b/src/adv/AdvPassive.lua index a3fcc01..f6cd8c1 100644 --- a/src/adv/AdvPassive.lua +++ b/src/adv/AdvPassive.lua @@ -9,6 +9,7 @@ Filter.BUFF_BY_ID = 6 -- 指定id的buff Filter.CAMP = 7 -- 玩家是指定阵营 Filter.RANGE = 8 -- 筛选范围 (触发是地块) Filter.CLASSIFY = 9 -- 标签 +Filter.NO_BUFF_BY_ID = 10 -- 没有指定id的buff local FilterFactory = {} FilterFactory[Filter.HP_UP_WITH_EQUAL] = function (_Filter) @@ -47,7 +48,6 @@ FilterFactory[Filter.CAMP] = function (_Filter) return role:getHerosCamp(role:getProperty("advTeam").heros) == self.value end end - FilterFactory[Filter.RANGE] = function (_Filter) _Filter._execute = function (self, target, params) if params and self.owner.blockId and self.owner.roomId and params.blockId and params.roomId then @@ -57,13 +57,18 @@ FilterFactory[Filter.RANGE] = function (_Filter) return false end end - FilterFactory[Filter.CLASSIFY] = function (_Filter) _Filter._execute = function (self, target) return target.isClassify and target:isClassify(self.value) end end +FilterFactory[Filter.NO_BUFF_BY_ID] = function (_Filter) + _Filter._execute = function (self, target) + return not target:hadBuffById(self.value) + end +end + function Filter:ctor(params) self.owner = params.owner self.skill = params.skill @@ -87,6 +92,9 @@ function Filter:getTarget(params) if self.oType == 2 and params.releaser then target = params.releaser end + if self.oType == 3 then + target = self.owner.battle.player + end return target end -- libgit2 0.21.2