Commit 26e6dd8b4f0483249bbc82aa2c107ef56c1f1815
1 parent
4f72322e
修改被动效果2
Showing
1 changed file
with
12 additions
and
8 deletions
Show diff stats
src/adv/AdvPassive.lua
@@ -389,20 +389,24 @@ function Passive:effect1(value) | @@ -389,20 +389,24 @@ function Passive:effect1(value) | ||
389 | end | 389 | end |
390 | --2=触发目标获得buff | 390 | --2=触发目标获得buff |
391 | function Passive:effect2(value, triggerPms) | 391 | function Passive:effect2(value, triggerPms) |
392 | - if triggerPms.trigger then | ||
393 | - triggerPms.trigger:addBuff(value, self.owner) | 392 | + local aim = triggerPms.trigger or self.owner.battle.player |
393 | + if aim then | ||
394 | + aim:addBuff(value, self.owner) | ||
394 | end | 395 | end |
395 | end | 396 | end |
396 | --3=翻开自己所在格子 | 397 | --3=翻开自己所在格子 |
398 | + | ||
399 | +-- 胡博文 : 目前还不会配一定范围 先不处理把。我想不出来自己开一定范围的应用环境 | ||
400 | +-- 如果打开注释 需要注意 自动开放不能点击的处理 | ||
397 | function Passive:effect3(value) | 401 | function Passive:effect3(value) |
398 | if value == 0 then | 402 | if value == 0 then |
399 | self.owner.battle.adv:getCurMap():openBlock(self.owner.roomId, self.owner.blockId) | 403 | self.owner.battle.adv:getCurMap():openBlock(self.owner.roomId, self.owner.blockId) |
400 | - elseif value > 0 then | ||
401 | - self.owner.battle.adv:getCurMap():openBlocksBySize(self.owner.roomId, self.owner.blockId, value) | ||
402 | - elseif value == -1 then -- 当前房间 | ||
403 | - self.owner.battle.adv:getCurMap():openBlocksByRoom(self.owner.roomId) | ||
404 | - elseif value == -2 then -- 当前层 | ||
405 | - self.owner.battle.adv:getCurMap():openAllBlocks(not self.owner.monsterId) | 404 | + -- elseif value > 0 then |
405 | + -- self.owner.battle.adv:getCurMap():openBlocksBySize(self.owner.roomId, self.owner.blockId, value) | ||
406 | + -- elseif value == -1 then -- 当前房间 | ||
407 | + -- self.owner.battle.adv:getCurMap():openBlocksByRoom(self.owner.roomId) | ||
408 | + -- elseif value == -2 then -- 当前层 | ||
409 | + -- self.owner.battle.adv:getCurMap():openAllBlocks(not self.owner.monsterId) | ||
406 | end | 410 | end |
407 | end | 411 | end |
408 | --4=逃跑 | 412 | --4=逃跑 |