Commit ead2c938c23e2a7a3c74f2afae9badd2aa823a23

Authored by zhouhaihai
1 parent bdd3a194

被动新

Showing 2 changed files with 3 additions and 0 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)
... ...
src/adv/AdvPlayer.lua
... ... @@ -696,6 +696,7 @@ function Player:addBuff(buffId, releaser)
696 696 self.battle.player:attrChangeCondBuffCheck(2, buffId)
697 697 self.battle.adv:checkAchievement(self.battle.adv.AchievType.GetBuff, 1, buffId)
698 698 self.battle.adv:pushBackEvent(AdvBackEventType.Buff, {buffId = buffId})
  699 + self.battle:triggerPassive(Passive.PLAYER_BUFF, {buffId = buffId})
699 700 end
700 701 return status
701 702 end
... ...