【战斗】v1.0.57

1、尝试修复孙悟空大招不会增加伤害的问题
 2、添加用于debug的log
dev_chengFeng
gaoxin 2021-09-07 15:14:10 +08:00
parent 79832f3232
commit 0bd0137a2b
3 changed files with 37 additions and 1 deletions

View File

@ -59,6 +59,9 @@ function Buff.Create(caster, type, duration, ...)
buff.roundPass = 0
buff.startRound = BattleLogic.GetCurRound()
-- 重置buff状态
buff.isBuff = nil
buff.isDeBuff = nil
buff:SetData(...)
return buff
@ -323,6 +326,13 @@ function BuffManager:Update()
-- end
buffList:Add(buff)
buff:OnStart()
BattleLogManager.Log(
"Add Buff",
"camp", buff.caster.camp,
"position", buff.caster.position,
"id", buff.id,
"type", buff.type)
buff.target.Event:DispatchEvent(BattleEventName.BuffStart, buff)
BattleLogic.Event:DispatchEvent(BattleEventName.BuffStart, buff)
end

View File

@ -29,6 +29,14 @@ function EffectCaster:Init(skill, effects, targets)
effect.args[k-1] = v[j][k]
end
effectGroup.effects[j-1] = effect
BattleLogManager.Log(
"Init Effect",
"camp", skill.owner.camp,
"position", skill.owner.position,
"skillId", tostring(skill.id),
"effectType", tostring(effect.type)
)
end
table.insert(self.effectList, effectGroup)
end
@ -51,6 +59,15 @@ function EffectCaster:DoEffect(caster, target, eff, duration, skill)
caster.Event:DispatchEvent(BattleEventName.SkillEffectBefore, skill, e, _PassiveCheck,target,eff)
target.Event:DispatchEvent(BattleEventName.BeSkillEffectBefore, skill, e, _PassiveCheck)
BattleLogManager.Log(
"Do Effect",
"camp", caster.camp,
"position", caster.position,
"tcamp", target.camp,
"tposition", target.position,
"skillId", tostring(skill.id),
"effectType", tostring(e.type)
)
--
if Effect[e.type] then
Effect[e.type](caster, target, e.args, duration, skill)

View File

@ -298,10 +298,19 @@ function RoleLogic:AddBuff(buff)
BattleLogic.Event:DispatchEvent(BattleEventName.RoleAddBuffMiss, _CallBack, self, buff)
missF = BattleUtil.CountChangeList(missF, cl)
BattleLogManager.Log(
"Add Buff random",
"missF", missF)
-- 如果概率为0 或者没有miss
if missF == 0 or not BattleUtil.RandomAction(missF, function() BattleLogic.BuffMgr:PutBuff(buff) end) then
for i=1, self.buffFilter.size do
if self.buffFilter.buffer[i](buff,self) then
BattleLogManager.Log(
"Buff Filter",
"camp", buff.caster.camp,
"position", buff.caster.position,
"id", buff.id,
"type", buff.type)
BattleLogic.BuffMgr:PutBuff(buff)
BattleLogic.Event:DispatchEvent(BattleEventName.RoleAddBuffFail,buff,self)
return
@ -310,7 +319,7 @@ function RoleLogic:AddBuff(buff)
BattleLogic.BuffMgr:AddBuff(self, buff)
end
end
function RoleLogic:Dispose()
end