Commit a5c44c41a4a373aa17ce78a175bfe8d7830ee163
Merge branch 'develop' of 120.26.43.151:wasteland/server into develop
Showing
2 changed files
with
11 additions
and
3 deletions
Show diff stats
src/adv/AdvPassive.lua
| @@ -119,6 +119,7 @@ Passive.AFTER_ROUND = 27 --经过 x回合时 | @@ -119,6 +119,7 @@ Passive.AFTER_ROUND = 27 --经过 x回合时 | ||
| 119 | Passive.GET_BUFF = 28 --获得指定buff | 119 | Passive.GET_BUFF = 28 --获得指定buff |
| 120 | Passive.OPEN_BLOCK = 29 --翻开格子 | 120 | Passive.OPEN_BLOCK = 29 --翻开格子 |
| 121 | Passive.OPEN_MONSTER = 30 --翻开怪物 | 121 | Passive.OPEN_MONSTER = 30 --翻开怪物 |
| 122 | +Passive.PLAYER_BUFF = 31 --玩家获得buff | ||
| 122 | 123 | ||
| 123 | 124 | ||
| 124 | -- 不同的开启条件 | 125 | -- 不同的开启条件 |
| @@ -180,6 +181,7 @@ PassiveCondFactory[Passive.GET_BUFF] = function(_Passive) | @@ -180,6 +181,7 @@ PassiveCondFactory[Passive.GET_BUFF] = function(_Passive) | ||
| 180 | end | 181 | end |
| 181 | end | 182 | end |
| 182 | end | 183 | end |
| 184 | +PassiveCondFactory[Passive.PLAYER_BUFF] = PassiveCondFactory[Passive.GET_BUFF] | ||
| 183 | 185 | ||
| 184 | 186 | ||
| 185 | PassiveCondFactory[Passive.BORN_ONCE] = function(_Passive) | 187 | PassiveCondFactory[Passive.BORN_ONCE] = function(_Passive) |
| @@ -304,7 +306,8 @@ function Passive:canEffect(effType, effValue) | @@ -304,7 +306,8 @@ function Passive:canEffect(effType, effValue) | ||
| 304 | end | 306 | end |
| 305 | --禁用被动技 | 307 | --禁用被动技 |
| 306 | local count = self.owner:getDisablePassiveCount() | 308 | local count = self.owner:getDisablePassiveCount() |
| 307 | - if count and (count == 0 or self.owner:getPassiveIdx(self) <= count) then | 309 | + local idx = self.owner:getPassiveIdx(self) |
| 310 | + if count and idx and (count == 0 or idx <= count) then | ||
| 308 | return | 311 | return |
| 309 | end | 312 | end |
| 310 | return true | 313 | return true |
src/adv/AdvPlayer.lua
| @@ -115,10 +115,13 @@ end | @@ -115,10 +115,13 @@ end | ||
| 115 | function BaseObject:getPassiveIdx(passive) | 115 | function BaseObject:getPassiveIdx(passive) |
| 116 | for idx, passive_ in ipairs(self.passives) do | 116 | for idx, passive_ in ipairs(self.passives) do |
| 117 | if passive_ == passive then | 117 | if passive_ == passive then |
| 118 | - return idx | 118 | + if passive.passiveData.dispel ~= 1 then |
| 119 | + return idx | ||
| 120 | + end | ||
| 121 | + return | ||
| 119 | end | 122 | end |
| 120 | end | 123 | end |
| 121 | - return 999 | 124 | + return |
| 122 | end | 125 | end |
| 123 | 126 | ||
| 124 | function BaseObject:getDisablePassiveCount() | 127 | function BaseObject:getDisablePassiveCount() |
| @@ -667,6 +670,7 @@ function Player:effectBattleBuff() | @@ -667,6 +670,7 @@ function Player:effectBattleBuff() | ||
| 667 | for _, buff in ipairs(self.buffs) do | 670 | for _, buff in ipairs(self.buffs) do |
| 668 | if not buff:isHide() and (buff:getType() == Buff.BATTLE_BUFF or buff:getType() == Buff.BATTLE_PASSIVE) then | 671 | if not buff:isHide() and (buff:getType() == Buff.BATTLE_BUFF or buff:getType() == Buff.BATTLE_PASSIVE) then |
| 669 | buff:effect() | 672 | buff:effect() |
| 673 | + buff:uncover() | ||
| 670 | end | 674 | end |
| 671 | end | 675 | end |
| 672 | end | 676 | end |
| @@ -692,6 +696,7 @@ function Player:addBuff(buffId, releaser) | @@ -692,6 +696,7 @@ function Player:addBuff(buffId, releaser) | ||
| 692 | self.battle.player:attrChangeCondBuffCheck(2, buffId) | 696 | self.battle.player:attrChangeCondBuffCheck(2, buffId) |
| 693 | self.battle.adv:checkAchievement(self.battle.adv.AchievType.GetBuff, 1, buffId) | 697 | self.battle.adv:checkAchievement(self.battle.adv.AchievType.GetBuff, 1, buffId) |
| 694 | self.battle.adv:pushBackEvent(AdvBackEventType.Buff, {buffId = buffId}) | 698 | self.battle.adv:pushBackEvent(AdvBackEventType.Buff, {buffId = buffId}) |
| 699 | + self.battle:triggerPassive(Passive.PLAYER_BUFF, {buffId = buffId}) | ||
| 695 | end | 700 | end |
| 696 | return status | 701 | return status |
| 697 | end | 702 | end |
-
mentioned in commit 52f8c5f05d0a531232a7dd7887becd2a77986aa1
-
mentioned in commit 52f8c5f05d0a531232a7dd7887becd2a77986aa1
-
mentioned in commit ba6d85edc65900830c7e168102d70671881b5808
-
mentioned in commit ba6d85edc65900830c7e168102d70671881b5808