diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/BattleManager.lua b/Assets/ManagedResources/~Lua/Modules/Battle/BattleManager.lua index 155151c37b..ad00846b42 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/BattleManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/BattleManager.lua @@ -1070,6 +1070,8 @@ function this.GetArtFontConfig(_ArtFontType) return "z_zhandou_podun_zh" elseif _ArtFontType == BattleArtFontType.clear then return "z_zhandou_qingchu_zh" + elseif _ArtFontType == BattleArtFontType.Blood then + return "z_zhandou_jinjia_zh" end end diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Passivity.lua b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Passivity.lua index 158c5ed2e3..b937d17892 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Passivity.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Passivity.lua @@ -8072,13 +8072,8 @@ local passivityList = { end local rDamage =floor(f1 * damage) - if not role.isBanBlood then - if role.bloodShield then - role.bloodShield:AddValue(rDamage) - else - role:AddBuff(Buff.Create(role, BuffName.Blood,0, rDamage)) - end - end + BattleUtil.AddBlood(role,rDamage) + end role.Event:AddEvent(BattleEventName.RoleBeHit, onBeHit,nil,nil,role) end, @@ -8428,13 +8423,7 @@ local passivityList = { local onRoundChange=function(curRound) local val = floor(BattleUtil.FP_Mul(v1, role:GetRoleData(BattlePropList[pro]))) --如果身上有御甲就添加御甲的值 - if not role.isBanBlood then - if role.bloodShield then - role.bloodShield:AddValue(val) - else--没有就上御甲buff - role:AddBuff(Buff.Create(role, BuffName.Blood,0, val)) - end - end + BattleUtil.AddBlood(role,val) end role.Event:AddEvent(BattleEventName.RoleTurnStart, onRoundChange,nil,nil,role) @@ -8532,13 +8521,7 @@ local passivityList = { end local val = floor(BattleUtil.FP_Mul(v1, role:GetRoleData(BattlePropList[pro]))) --如果身上有御甲就添加御甲的值 - if not role.isBanBlood then - if role.bloodShield then - role.bloodShield:AddValue(val) - else--没有就上御甲buff - role:AddBuff(Buff.Create(role, BuffName.Blood,0, val)) - end - end + BattleUtil.AddBlood(role,val) time=time+1 end BattleLogic.Event:AddEvent(BattleEventName.BattleRoundStart,onRoundStart,nil,nil,role) @@ -8826,13 +8809,7 @@ local passivityList = { if list then local tv = floor(BattleUtil.ErrorCorrection(role:GetRoleData(BattlePropList[pro]) * f1)) for _, r in ipairs(list) do - if not r.isBanBlood then - if r.bloodShield then - r.bloodShield:AddValue(tv) - else - r:AddBuff(Buff.Create(role, BuffName.Blood,0,tv)) - end - end + BattleUtil.AddBlood(r,tv) end end end @@ -9172,13 +9149,7 @@ local passivityList = { if skill.type == BattleSkillType.Special then role.Event:RemoveEvent(BattleEventName.RoleHit, OnHit) local value=floor(BattleUtil.ErrorCorrection(allDamage*f1)) - if not role.isBanBlood then - if role.bloodShield then - role.bloodShield:AddValue(value) - else - role:AddBuff(Buff.Create(role, BuffName.Blood,0,value)) - end - end + BattleUtil.AddBlood(role,value) -- 清空伤害记录 allDamage = 0 end diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Misc/BattleDefine.lua b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Misc/BattleDefine.lua index 507b2e3d61..998eda5b2c 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Misc/BattleDefine.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Misc/BattleDefine.lua @@ -363,6 +363,7 @@ BattleArtFontType = { Immune = 1, -- 免疫文字 Shield = 2, --破盾文字 clear = 3, --清除文字 + Blood = 4, --禁甲文字 } diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Misc/BattleUtil.lua b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Misc/BattleUtil.lua index 88f1941739..d47deb06a3 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Misc/BattleUtil.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Misc/BattleUtil.lua @@ -1175,6 +1175,19 @@ function BattleUtil.CheckIsHit(atkRole, defRole,skill) end +function BattleUtil.AddBlood(target,value) + if not target.isBanBlood then + if target.bloodShield then + target.bloodShield:AddValue(value) + else + target:AddBuff(Buff.Create(target, BuffName.Blood,0,value)) + end + else + target.Event:DispatchEvent(BattleEventName.ShowHintText, BattleArtFontType.Blood) + end +end + + --获取table的长度 function BattleUtil.LengthOfTable(table) if not table then