【战斗】======御甲增加表现

dev_chengFeng
wangzhenxing 2021-11-19 11:18:15 +08:00
parent fc82b7bbc7
commit 9830c04a4b
4 changed files with 22 additions and 35 deletions

View File

@ -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

View File

@ -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

View File

@ -363,6 +363,7 @@ BattleArtFontType = {
Immune = 1, -- 免疫文字
Shield = 2, --破盾文字
clear = 3, --清除文字
Blood = 4, --禁甲文字
}

View File

@ -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