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