Commit 9c08bf47c578a7e31fe60d9fa32cd7892e3bb1b8
1 parent
699f4a74
简化=潜行
Showing
2 changed files
with
4 additions
and
21 deletions
Show diff stats
src/adv/AdvBuff.lua
| ... | ... | @@ -374,23 +374,8 @@ local BuffFactory = { |
| 374 | 374 | end |
| 375 | 375 | end, |
| 376 | 376 | [Buff.SNEAK] = function(_Buff) |
| 377 | - _Buff._initDB = function(self, data) | |
| 378 | - self.sneak = data.sneak | |
| 379 | - end | |
| 380 | - | |
| 381 | - _Buff._getDB = function(self) | |
| 382 | - return {sneak = self.sneak} | |
| 383 | - end | |
| 384 | - -- 翻开怪 周围的格子 | |
| 385 | - _Buff.sneakBreak = function(self, enemyIds) | |
| 386 | - if self.isDel then return end | |
| 387 | - for _, enemyId in ipairs(enemyIds) do | |
| 388 | - self.sneak[enemyId] = (self.sneak[enemyId] or 0) + 1 | |
| 389 | - if self.sneak[enemyId] >= self.buffData.effectValue1 then -- 4格 就删掉玩家的buff | |
| 390 | - self.isDel = true | |
| 391 | - break | |
| 392 | - end | |
| 393 | - end | |
| 377 | + _Buff._init = function(self) | |
| 378 | + self.layer = self.buffData.effectValue1 | |
| 394 | 379 | end |
| 395 | 380 | end, |
| 396 | 381 | } | ... | ... |
src/adv/AdvMap.lua
| ... | ... | @@ -268,11 +268,9 @@ function Map:openBlock(roomId, blockId, isPlayer, ignoreBack) |
| 268 | 268 | local sneakBuff = self.adv.battle.player:hadBuff(Buff.SNEAK) |
| 269 | 269 | if sneakBuff then |
| 270 | 270 | local enemys = self:getEnemysBySize(roomId, blockId, 2) |
| 271 | - local ids = {} | |
| 272 | - for _, e in ipairs(enemys) do | |
| 273 | - table.insert(ids, e.id) | |
| 271 | + if #enemys > 0 then | |
| 272 | + sneakBuff:uncover() | |
| 274 | 273 | end |
| 275 | - sneakBuff:sneakBreak(ids) | |
| 276 | 274 | end |
| 277 | 275 | end |
| 278 | 276 | end | ... | ... |