Commit e6dc06ccda26cecf9e2d98875bf59d96f4ea65e1
1 parent
e910c2dd
拾荒bug 增加bug log
Showing
3 changed files
with
20 additions
and
0 deletions
Show diff stats
src/GlobalVar.lua
src/adv/AdvBuff.lua
... | ... | @@ -490,6 +490,7 @@ function Buff:createAfter(layer) |
490 | 490 | self:_init() |
491 | 491 | end |
492 | 492 | self:pushBackEffect(1) |
493 | + buglog("Buff", "who: %s create buffId: %s", self.owner.monsterId, self.id) | |
493 | 494 | end |
494 | 495 | |
495 | 496 | function Buff:initByDB(data) |
... | ... | @@ -632,6 +633,7 @@ function Buff:pushBackEffect(etype) |
632 | 633 | end |
633 | 634 | |
634 | 635 | function Buff:effect() |
636 | + buglog("Buff", "who: %s effect buffId: %s", self.owner.monsterId, self.id) | |
635 | 637 | self:decCount() |
636 | 638 | self:pushBackEffect(2) |
637 | 639 | if self._effectValue then |
... | ... | @@ -655,6 +657,7 @@ function Buff:endBuff() |
655 | 657 | if self._endBuff then |
656 | 658 | self:_endBuff() |
657 | 659 | end |
660 | + buglog("Buff", "who: %s endBuff buffId: %s", self.owner.monsterId, self.id) | |
658 | 661 | end |
659 | 662 | |
660 | 663 | function Buff:getType() |
... | ... | @@ -709,6 +712,7 @@ function Buff:overlay(releaser, data, layer) |
709 | 712 | end |
710 | 713 | |
711 | 714 | self:pushBackEffect(1) |
715 | + buglog("Buff", "who: %s overlay buffId: %s", self.owner.monsterId, self.id) | |
712 | 716 | end |
713 | 717 | end |
714 | 718 | ... | ... |
src/adv/AdvPassive.lua
... | ... | @@ -354,6 +354,7 @@ function Passive:effect(triggerPms) |
354 | 354 | end |
355 | 355 | if hadEffect then |
356 | 356 | self.owner.battle.adv:pushBackEvent(AdvBackEventType.PassiveEffect, {id = self.id, level = self.level, roomId = self.owner.roomId, blockId = self.owner.blockId}) |
357 | + buglog("Passive", "who: %s effect id: %s", self.owner.monsterId, self.id) | |
357 | 358 | end |
358 | 359 | if self.count > 0 then |
359 | 360 | self.count = self.count < 999 and self.count - 1 or self.count |
... | ... | @@ -404,6 +405,8 @@ function Passive:trigger(condType, params) --触发检查 |
404 | 405 | params = params or {} |
405 | 406 | if self.isDel or self.owner.isDead then return end |
406 | 407 | if self:getCondType() ~= condType then return end |
408 | + | |
409 | + buglog("Passive", "who: %s trigger id: %s", self.owner.monsterId, self.id) | |
407 | 410 | if not self:canTrigger() then return end |
408 | 411 | if self._trigger then |
409 | 412 | if not self:_trigger(params) then return end --检查 |
... | ... | @@ -600,5 +603,9 @@ function Passive:effect16(value, triggerPms, changeType) |
600 | 603 | self.owner.battle.adv:blockDropChange(changeType, blocks) |
601 | 604 | end |
602 | 605 | |
606 | +--17=玩家获得buff | |
607 | +function Passive:effect17(value, triggerPms) | |
608 | + self.owner.battle.player:addBuff(value, self.owner) | |
609 | +end | |
603 | 610 | |
604 | 611 | return Passive |
605 | 612 | \ No newline at end of file | ... | ... |