Commit 810c6151eec81ba65a0ff55691e42a27fd4841ca
1 parent
6dc482bb
增加buff 效果31 地图被动刷新不出来怪物
Showing
2 changed files
with
16 additions
and
0 deletions
Show diff stats
src/adv/AdvBuff.lua
... | ... | @@ -30,6 +30,7 @@ Buff.CHANGE_DROP_TO_CLICK = 27 --掉落转换为click |
30 | 30 | Buff.SP_MAX_CHANGE = 28 -- 魔法上限 |
31 | 31 | Buff.ITEM_GET_UP = 29 -- 获得道具数量增加 |
32 | 32 | Buff.Buff_EFFECT_CHANGE = 30 -- 改变 buff 效果 |
33 | +Buff.Buff_NO_PASSIVE_MONSTER = 31 -- 地图被动刷新不出来怪物 | |
33 | 34 | |
34 | 35 | --角色一些属性的变化 |
35 | 36 | local function commonAttr(_Buff, attrName) |
... | ... | @@ -360,6 +361,13 @@ local BuffFactory = { |
360 | 361 | self:_init() |
361 | 362 | end |
362 | 363 | end, |
364 | + | |
365 | + [Buff.Buff_NO_PASSIVE_MONSTER] = function(_Buff) | |
366 | + _Buff._effectValue = function(self) | |
367 | + return self.buffData.effectValue1 | |
368 | + end | |
369 | + end, | |
370 | + | |
363 | 371 | } |
364 | 372 | |
365 | 373 | -- 同样的返回 effectValue1, effectValue2 * self.layer 类型的buff | ... | ... |
src/adv/AdvPassive.lua
... | ... | @@ -412,6 +412,14 @@ end |
412 | 412 | |
413 | 413 | --5=召唤怪物 |
414 | 414 | function Passive:effect5(monsterId) |
415 | + for _, buff in ipairs(self.owner.battle.player.buffs) do | |
416 | + if not buff.isDel and buff:getType() == buff.Buff_NO_PASSIVE_MONSTER then | |
417 | + local effect = buff:effect() | |
418 | + if effect == 0 or effect == monsterId then | |
419 | + return | |
420 | + end | |
421 | + end | |
422 | + end | |
415 | 423 | self.owner.battle.adv:getCurMap():addNewMonsterRand(monsterId) |
416 | 424 | end |
417 | 425 | ... | ... |