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 | 119 | Passive.GET_BUFF = 28 --获得指定buff |
| 120 | 120 | Passive.OPEN_BLOCK = 29 --翻开格子 |
| 121 | 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 | 181 | end |
| 181 | 182 | end |
| 182 | 183 | end |
| 184 | +PassiveCondFactory[Passive.PLAYER_BUFF] = PassiveCondFactory[Passive.GET_BUFF] | |
| 183 | 185 | |
| 184 | 186 | |
| 185 | 187 | PassiveCondFactory[Passive.BORN_ONCE] = function(_Passive) |
| ... | ... | @@ -304,7 +306,8 @@ function Passive:canEffect(effType, effValue) |
| 304 | 306 | end |
| 305 | 307 | --禁用被动技 |
| 306 | 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 | 311 | return |
| 309 | 312 | end |
| 310 | 313 | return true | ... | ... |
src/adv/AdvPlayer.lua
| ... | ... | @@ -115,10 +115,13 @@ end |
| 115 | 115 | function BaseObject:getPassiveIdx(passive) |
| 116 | 116 | for idx, passive_ in ipairs(self.passives) do |
| 117 | 117 | if passive_ == passive then |
| 118 | - return idx | |
| 118 | + if passive.passiveData.dispel ~= 1 then | |
| 119 | + return idx | |
| 120 | + end | |
| 121 | + return | |
| 119 | 122 | end |
| 120 | 123 | end |
| 121 | - return 999 | |
| 124 | + return | |
| 122 | 125 | end |
| 123 | 126 | |
| 124 | 127 | function BaseObject:getDisablePassiveCount() |
| ... | ... | @@ -667,6 +670,7 @@ function Player:effectBattleBuff() |
| 667 | 670 | for _, buff in ipairs(self.buffs) do |
| 668 | 671 | if not buff:isHide() and (buff:getType() == Buff.BATTLE_BUFF or buff:getType() == Buff.BATTLE_PASSIVE) then |
| 669 | 672 | buff:effect() |
| 673 | + buff:uncover() | |
| 670 | 674 | end |
| 671 | 675 | end |
| 672 | 676 | end |
| ... | ... | @@ -692,6 +696,7 @@ function Player:addBuff(buffId, releaser) |
| 692 | 696 | self.battle.player:attrChangeCondBuffCheck(2, buffId) |
| 693 | 697 | self.battle.adv:checkAchievement(self.battle.adv.AchievType.GetBuff, 1, buffId) |
| 694 | 698 | self.battle.adv:pushBackEvent(AdvBackEventType.Buff, {buffId = buffId}) |
| 699 | + self.battle:triggerPassive(Passive.PLAYER_BUFF, {buffId = buffId}) | |
| 695 | 700 | end |
| 696 | 701 | return status |
| 697 | 702 | end | ... | ... |
-
mentioned in commit 52f8c5f05d0a531232a7dd7887becd2a77986aa1
-
mentioned in commit 52f8c5f05d0a531232a7dd7887becd2a77986aa1
-
mentioned in commit ba6d85edc65900830c7e168102d70671881b5808
-
mentioned in commit ba6d85edc65900830c7e168102d70671881b5808