diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Effect.lua b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Effect.lua index 0a6268f360..70c3c11706 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Effect.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Effect.lua @@ -2374,7 +2374,7 @@ local effectList = { end local damage = floor(BattleUtil.ErrorCorrection(f3 * target:GetRoleData(BattlePropList[p1]))) damage=BattleUtil.CalAllReduceShield(caster,target,damage) - BattleUtil.FinalDamage(skill,caster, target,damage) + BattleUtil.FinalDamage(nil,caster, target,damage) end end end) @@ -2865,9 +2865,12 @@ local effectList = { BattleUtil.FinalDamageCountShield(nil,caster, target,damage) end) end, + --复活目标,并恢复血量[a]% + --a[float] [147]=function(caster, target, args, interval, skill) + local pro=args[1] target.isRealDead=true - target:SetRelive(1, caster) + target:SetRelive(pro, caster) end, diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Passivity.lua b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Passivity.lua index cae27c0d13..1ff07fbe3d 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Passivity.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Passivity.lua @@ -4228,14 +4228,29 @@ local passivityList = { -- a[float] [197] = function(role, args,id,judge) local f1 = args[1] - local onRoleHit = function(target, damage, bCrit, finalDmg, damageType, skill) - if skill and (skill.type == BattleSkillType.Special or skill.type==BattleSkillType.Extra) and target:IsDead() and not BattleUtil.CheckIsNoDead(target) then - BattleUtil.RandomAction(f1, function() - BattleUtil.CalRage(role, role, target.Rage, CountTypeName.Add) - end) + -- local onRoleHit = function(target, damage, bCrit, finalDmg, damageType, skill) + -- if skill and (skill.type == BattleSkillType.Special or skill.type==BattleSkillType.Extra) and target:IsDead() and not BattleUtil.CheckIsNoDead(target) then + -- BattleUtil.RandomAction(f1, function() + -- LogError("1111111111111") + -- BattleUtil.CalRage(role, role, target.Rage, CountTypeName.Add) + -- end) + -- end + -- end + -- role.Event:AddEvent(BattleEventName.RoleHit, onRoleHit,nil,nil,role) + local onSkillEnd=function(skill) + local list=skill:GetDirectTargetsNoMiss() + if not list then + return + end + for i = 1, #list do + if list[i]:IsDead() and not BattleUtil.CheckIsNoDead(list[i]) then + BattleUtil.RandomAction(f1, function() + BattleUtil.CalRage(role, role, list[i].deadRage, CountTypeName.Add) + end) + end end end - role.Event:AddEvent(BattleEventName.RoleHit, onRoleHit,nil,nil,role) + role.Event:AddEvent(BattleEventName.SkillCastEnd,onSkillEnd,nil,nil,role) end, -- 受到的[a]效果伤害降低[b]%(与减伤盾原理相同)[c]改变 diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Monster/MonsterSkill/MTrigger.lua b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Monster/MonsterSkill/MTrigger.lua index f37437e13e..c444afeb54 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Monster/MonsterSkill/MTrigger.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Monster/MonsterSkill/MTrigger.lua @@ -188,7 +188,7 @@ local _TriggerConfig = { [15]=function(skill, ...) local args={...} local role=RoleManager.GetDeadRole(skill.owner.camp) - if role and role:IsRealDead() then + if role and role:IsRealDead() and not BattleUtil.CheckIsNoDead(role) then return true end return false diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Role/RoleLogic.lua b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Role/RoleLogic.lua index 580d2a09ac..45c793a4fc 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Role/RoleLogic.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Role/RoleLogic.lua @@ -29,6 +29,7 @@ function RoleLogic:Init(uid, data, position) self.isDead = self:GetRoleData(RoleDataName.Hp) <= 0 self.isRealDead = self.isDead self.killDamage = 0 --致死伤害 + self.deadRage = 0 self.teamDamage = data.teamDamage --最高战斗力 self.superSkillDamage = 0 --技能伤害 self.killRole=nil --击杀英雄 @@ -651,6 +652,7 @@ end function RoleLogic:SetDead(damage) self.isDead = true self.killDamage=damage + self.deadRage=self.Rage RoleManager.AddDeadRole(self) end -- 判断是否死亡