Commit 6d4b10bc4b68032ef449a6b2781cafa317a87253

Authored by liuzujun
2 parents 686d4fd6 58450dab

Merge branch 'develop' of 120.26.43.151:wasteland/server into develop

Showing 1 changed file with 10 additions and 2 deletions   Show diff stats
src/adv/AdvPassive.lua
... ... @@ -9,6 +9,7 @@ Filter.BUFF_BY_ID = 6 -- 指定id的buff
9 9 Filter.CAMP = 7 -- 玩家是指定阵营
10 10 Filter.RANGE = 8 -- 筛选范围 (触发是地块)
11 11 Filter.CLASSIFY = 9 -- 标签
  12 +Filter.NO_BUFF_BY_ID = 10 -- 没有指定id的buff
12 13  
13 14 local FilterFactory = {}
14 15 FilterFactory[Filter.HP_UP_WITH_EQUAL] = function (_Filter)
... ... @@ -47,7 +48,6 @@ FilterFactory[Filter.CAMP] = function (_Filter)
47 48 return role:getHerosCamp(role:getProperty("advTeam").heros) == self.value
48 49 end
49 50 end
50   -
51 51 FilterFactory[Filter.RANGE] = function (_Filter)
52 52 _Filter._execute = function (self, target, params)
53 53 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)
57 57 return false
58 58 end
59 59 end
60   -
61 60 FilterFactory[Filter.CLASSIFY] = function (_Filter)
62 61 _Filter._execute = function (self, target)
63 62 return target.isClassify and target:isClassify(self.value)
64 63 end
65 64 end
66 65  
  66 +FilterFactory[Filter.NO_BUFF_BY_ID] = function (_Filter)
  67 + _Filter._execute = function (self, target)
  68 + return not target:hadBuffById(self.value)
  69 + end
  70 +end
  71 +
67 72 function Filter:ctor(params)
68 73 self.owner = params.owner
69 74 self.skill = params.skill
... ... @@ -87,6 +92,9 @@ function Filter:getTarget(params)
87 92 if self.oType == 2 and params.releaser then
88 93 target = params.releaser
89 94 end
  95 + if self.oType == 3 then
  96 + target = self.owner.battle.player
  97 + end
90 98 return target
91 99 end
92 100  
... ...