[战斗]=====变身卡复活机制提交

dev_chengFeng
wangzhenxing 2021-12-13 14:52:57 +08:00
parent 58d08c65cc
commit 23467d0ff6
3 changed files with 16 additions and 0 deletions

View File

@ -194,6 +194,7 @@ BattleEventName = {
PassiveChangeIgnoreDef = indexAdd(),--被动改变无视防御比例
PassiveChangeDefDMGReFac = indexAdd(),--被动改变防御方减伤比例
PassiveChangeRoleHit = indexAdd(),--被动改变角色命中
RoleIsVanish = indexAdd(), -- 角色已经从显示层消失
}

View File

@ -184,6 +184,16 @@ local _TriggerConfig = {
end,
},
[BattleEventName.RoleIsVanish]={
[15]=function(skill, ...)
local args={...}
local role=RoleManager.GetDeadRole(skill.owner.camp)
if role and role:IsRealDead() then
return true
end
return false
end,
},
}
function MTrigger.Init()

View File

@ -116,6 +116,9 @@ function this.CheckDead()
end
for _, pos in ipairs(removePos) do
table.insert(RealDeadList,_DeadRoleList[pos])
BattleLogic.WaitForTrigger(1,function()
BattleLogic.Event:DispatchEvent(BattleEventName.RoleIsVanish,RealDeadList)
end)
_DeadRoleList[pos] = nil
end
@ -132,11 +135,13 @@ function this.CheckRelive()
local removePos = {}
for pos, role in pairs(_ReliveRoleList) do
if role:Relive() then
table.removebyvalue(RealDeadList,role)
isReliveFrame = true
table.insert(removePos, pos)
end
end
for _, pos in ipairs(removePos) do
_ReliveRoleList[pos] = nil
end
return isReliveFrame