Commit 3ec5de90713c0d5ca09c893abbc8331568e4b30e
1 parent
400f1f91
光环 bug
Showing
1 changed file
with
18 additions
and
9 deletions
Show diff stats
src/adv/AdvBattle.lua
| ... | ... | @@ -316,8 +316,19 @@ function Battle:afterRound() |
| 316 | 316 | build:afterRound("buffAfter") |
| 317 | 317 | end |
| 318 | 318 | |
| 319 | + self.player:triggerPassive(Passive.AFTER_ROUND) | |
| 320 | + | |
| 321 | + self:checkAura() | |
| 319 | 322 | |
| 323 | + self:clearRound() | |
| 324 | + | |
| 325 | + if self.player.isDead then | |
| 326 | + self.adv:over(false, nil, -2) | |
| 327 | + end | |
| 328 | +end | |
| 320 | 329 | |
| 330 | +function Battle:clearRound() | |
| 331 | + local mapIdx = self.adv:getCurMapIdx() | |
| 321 | 332 | self.player:clearRound() |
| 322 | 333 | for _, enemy in ipairs(self.enemys[mapIdx]) do |
| 323 | 334 | enemy:clearRound() |
| ... | ... | @@ -347,14 +358,6 @@ function Battle:afterRound() |
| 347 | 358 | build:clear() |
| 348 | 359 | end |
| 349 | 360 | end |
| 350 | - | |
| 351 | - self.player:triggerPassive(Passive.AFTER_ROUND) | |
| 352 | - | |
| 353 | - self:checkAura() | |
| 354 | - | |
| 355 | - if self.player.isDead then | |
| 356 | - self.adv:over(false, nil, -2) | |
| 357 | - end | |
| 358 | 361 | end |
| 359 | 362 | |
| 360 | 363 | |
| ... | ... | @@ -450,12 +453,14 @@ function Battle:iLayerChange(oldMapIdx) |
| 450 | 453 | enemy:checkAuraBuff(enemyBuffs) |
| 451 | 454 | end |
| 452 | 455 | self:setMapAuras(auras) |
| 456 | + self:clearRound() | |
| 453 | 457 | end |
| 454 | 458 | |
| 455 | 459 | -- 新的 关卡 关闭旧的战斗模块 清理 玩家身上的光环效果 |
| 456 | 460 | function Battle:overBattle() |
| 457 | 461 | local buffs = self:checkDiffAuraBuff(self:getAurasByMap(), {}) |
| 458 | 462 | self.player:checkAuraBuff(buffs) |
| 463 | + self:clearRound() | |
| 459 | 464 | self.adv.owner:getProperty("advTeam").player = self.player:getDB() -- 临时缓存住 battle 的player |
| 460 | 465 | end |
| 461 | 466 | |
| ... | ... | @@ -463,6 +468,10 @@ end |
| 463 | 468 | function Battle:newBattle() |
| 464 | 469 | local auras = self:getActiveAuras() |
| 465 | 470 | local buffs = self:checkDiffAuraBuff({}, auras) |
| 471 | + self.player:checkAuraBuff(buffs) | |
| 472 | + for _, enemy in pairs(self.player:getTeam(2)) do | |
| 473 | + enemy:checkAuraBuff(buffs) | |
| 474 | + end | |
| 466 | 475 | self:setMapAuras(auras) |
| 467 | 476 | end |
| 468 | 477 | |
| ... | ... | @@ -490,7 +499,7 @@ function Battle:checkDiffAuraBuff(oldAuras, newAuras) |
| 490 | 499 | for aurasId , count in pairs(newAuras) do |
| 491 | 500 | auras[aurasId] = (auras[aurasId] or 0) + count |
| 492 | 501 | end |
| 493 | - | |
| 502 | + | |
| 494 | 503 | local buffs = {} |
| 495 | 504 | for aurasId , count in pairs(auras) do |
| 496 | 505 | local auraData = csvdb["adv_map_haloCsv"][aurasId] | ... | ... |