Merge branch 'china/dev' of http://60.1.1.230/gaoxin/JL_Client into china/dev

dev_chengFeng
张彪 2022-02-18 16:28:02 +08:00
commit 05b9c3afa5
3 changed files with 55 additions and 15 deletions

View File

@ -5979,11 +5979,12 @@ local passivityList = {
end
role.Event:AddEvent(BattleEventName.FinalBeDamage,onFinalBeDamage,nil,nil,role)
end,
--攻击时伤害增加(我方每个存活的其他[a]元素武将伤害增加[b]%
--a[int] b[float]
--攻击时伤害增加(我方每个存活的其他[a]元素武将伤害增加[b]%,是否包含自身[c]
--a[int 10:与自身相同阵营],b[float],c[int 1:包含 ]
[266] = function(role,args,id,judge)
local ele=args[1]
local v1=args[2]
local type=args[3]
local passiveBeBeDamage=function(damagingFunc, defRole, damage, skill)
if skill and not skill.isTriggerJudge and judge==1 then
return
@ -5994,15 +5995,15 @@ local passivityList = {
local list = RoleManager.QueryIncludeExile(function(v) return role.camp == v.camp end)
local num=0
for _, r in pairs(list) do
if r~=role and r.element==ele and not r:IsDead() then
if (r~=role or (type and type==1) ) and (r.element==ele or (ele==10 and r.element==role.element) )and not r:IsDead() then
num=num+1
end
end
if damagingFunc then
local dd = BattleUtil.CountValue(damage,v1*num,2)-damage
damagingFunc(-floor(BattleUtil.ErrorCorrection(dd)))
end
if damagingFunc then
local dd = BattleUtil.CountValue(damage,v1*num,2)-damage
damagingFunc(-floor(BattleUtil.ErrorCorrection(dd)))
end
end
@ -10870,7 +10871,43 @@ local passivityList = {
end
role.Event:AddEvent(BattleEventName.PassiveDamaging, onPassiveDamaging,nil,nil,role)
end,
--每回合结束时,自身增加[a]类型[b]效果,持续[c]回合,参数1[d],参数2[e],参数3[f],buff是否可被清除[g]
--a[int],b[int],c[int],d[int/float],e[int/float],f[int/float],g[int 0可被清除 1不可清除 ]
[423]=function(role,args,id,judge)
local t1=args[1]
local t2=args[2]
local r1=args[3]
local v1=args[4]
local v2=args[5]
local v3=args[6]
local type=args[7]
local onRoundChange=function(round)
if round==0 then
return
end
if t1==BuffName.PropertyChange then
local buff=Buff.Create(role,BuffName.PropertyChange, r1, BattlePropList[t2], v1,v2)
if type and type==1 then
buff.clear=false
else
buff.clear=true
end
role:AddBuff(buff)
end
end
BattleLogic.Event:AddEvent(BattleEventName.BattleRoundEnd, onRoundChange,nil,nil,role)
end,
--造成直接伤害,无视对方[a]%的伤害减免
-- a[float]
[424]=function(role,args,id,judge)
local v1=args[1]
local addDMGFac=function(func)
if func then
func(v1,CountTypeName.Sub)
end
end
role.Event:AddEvent(BattleEventName.PassiveChangeDefDMGReFac,addDMGFac,nil,nil,role)
end,
}
return passivityList

View File

@ -1032,6 +1032,9 @@ function BattleUtil.CalDamage(skill, atkRole, defRole, damageType, baseFactor, i
defDMGRef=BattleUtil.CountValue(defDMGRef,v1,ct)
end
atkRole.Event:DispatchEvent(BattleEventName.PassiveChangeDefDMGReFac,changeDefDMGFac)
if defDMGRef<0 then
defDMGRef=0
end
-- 基础伤害增加系数
local addDamageFactor = 1 + atkRole:GetRoleData(RoleDataName.DamageBocusFactor) - defDMGRef

View File

@ -219,21 +219,21 @@ function this.SortHeroDatas(_heroDatas)
if a.lockState == b.lockState then
if a.isHarmonyGongMing == b.isHarmonyGongMing then
if a.heroConfig.Natural ==b.heroConfig.Natural then
local aGodLv = GodSoulManager.GetGodSoulLv(a.dynamicId)
local bGodLv = GodSoulManager.GetGodSoulLv(b.dynamicId)
if aGodLv == bGodLv then
if a.star == b.star then
if a.star == b.star then
local aGodLv = GodSoulManager.GetGodSoulLv(a.dynamicId)
local bGodLv = GodSoulManager.GetGodSoulLv(b.dynamicId)
if aGodLv == bGodLv then
if a.lv == b.lv then
return a.heroConfig.Id > b.heroConfig.Id
else
return a.lv < b.lv
end
else
return a.star < b.star
return aGodLv < bGodLv
end
else
return aGodLv > bGodLv
end
return a.star < b.star
end
else
return a.heroConfig.Natural < b.heroConfig.Natural
end