【战斗】============被动285修改

dev_chengFeng
wangzhenxing 2021-11-08 15:28:04 +08:00
parent 3f7dd0db96
commit d30fc43d9f
2 changed files with 48 additions and 23 deletions

View File

@ -343,7 +343,7 @@ function this.GetBattleServerData(msg, isFightPlayer)
if #skills > 2 then
local passivityList = {}
for j = 3, #skills do
--LogError("pass id=="..tostring(skills[i]))
--LogError("pass id=="..tostring(skills[j]))
table.insert(passivityList, tonumber(skills[j]))
end
role.passivity = this.GetPassivityData(passivityList)
@ -357,6 +357,7 @@ function this.GetBattleServerData(msg, isFightPlayer)
local teamSkills = string.split(data.teamSkillList, "|") --异妖位置1#技能id1|异妖位置2#技能id2|..
for i = 1, #teamSkills do
local s = string.split(teamSkills[i], "#")
--LogError("team skill id=="..tostring(s[2]))
fightData.playerData.teamSkill[i] = this.GetSkillData(tonumber(s[2]))
end
@ -366,6 +367,7 @@ function this.GetBattleServerData(msg, isFightPlayer)
local s = string.split(teamPassives[i], "#")
local teamPassiveList = {}
for j = 1, #s do
--LogError("team pass id=="..tostring(s[j]))
teamPassiveList[j] = tonumber(s[j])
end
fightData.playerData.teamPassive[i] = this.GetPassivityData(teamPassiveList)
@ -401,7 +403,7 @@ function this.GetBattleServerData(msg, isFightPlayer)
local position = tonumber(data2.fightUnitList[j].position)
local star = tonumber(data2.fightUnitList[j].star)
local skin=tonumber(data2.fightUnitList[j].skinId)
local _godSoulLv=tonumber(data2.fightUnitList[i].godSoulLv)
local _godSoulLv=tonumber(data2.fightUnitList[j].godSoulLv)
skills = string.split(data2.fightUnitList[j].unitSkillIds, "#")
propertys = string.split(data2.fightUnitList[j].property, "#")
role = {
@ -426,6 +428,7 @@ function this.GetBattleServerData(msg, isFightPlayer)
local position = tonumber(data2.fightUnitList[j].position)
local star = tonumber(data2.fightUnitList[j].star)
local skin=tonumber(data2.fightUnitList[j].skinId)
local _godSoulLv=tonumber(data2.fightUnitList[j].godSoulLv)
skills = string.split(data2.fightUnitList[j].unitSkillIds, "#")
propertys = string.split(data2.fightUnitList[j].property, "#")
-- 如果找不到去怪物里面找
@ -444,6 +447,7 @@ function this.GetBattleServerData(msg, isFightPlayer)
camp = 1,
type = 1,
quality = 0,
godSoulLv=_godSoulLv,
element = HeroConfig[rid].PropertyName,
professionId = HeroConfig[rid].Profession,
passivity = { },
@ -459,6 +463,7 @@ function this.GetBattleServerData(msg, isFightPlayer)
if #skills > 2 then
local passivityList = {}
for k = 3, #skills do
-- LogError("em pass id=="..tostring(skills[k]))
table.insert(passivityList, tonumber(skills[k]))
end
role.passivity = this.GetPassivityData(passivityList)

View File

@ -2787,7 +2787,7 @@ local passivityList = {
end,nil,nil,role)
end,
-- 受到[a]状态敌人攻击时受到伤害[b]改变[c]%
-- 受到[a]状态敌人攻击时受到伤害[b]改变[c]%,伤害类型为[d]
-- a[持续伤害状态]b[改变类型]c[float],d[int 1:直接伤害 ](d 不填/0不区别是否为直接伤害)
[140] = function(role, args)
local dot = args[1]
@ -6476,31 +6476,51 @@ local passivityList = {
return
end
if skill and skill.type == BattleSkillType.Normal and skill.isAdd and skill.owner==role then
dt=BattleUtil.CountValue(dt,v1*num,1)
local val = -floor(BattleUtil.FP_Mul(dt, defRole:GetRoleData(BattlePropList[f1])))
if func then
func(val)
end
local aaa=BattleUtil.CountValue(dt,v1*num,1)
local val = floor(BattleUtil.FP_Mul(aaa, defRole:GetRoleData(BattlePropList[f1])))
BattleUtil.FinalDamageCountShield(skill,role,defRole,val)
end
end
role.Event:AddEvent(BattleEventName.PassiveDamaging, onPassiveDamaging,nil,nil,role)
--记录技能混乱敌人的数量
local OnRoleHit = function(skill)
if skill and skill.owner==role and skill.type==BattleSkillType.Special then
local list=skill:GetDirectTargetsNoMiss()
if not list then
num=0
local onBuffAdd=function(buff)
if not buff or buff.caster~=role then
return
end
for key, value in pairs(list) do
local isHave=BattleLogic.BuffMgr:HasBuff(value, BuffName.Control, function(buff) return buff.ctrlType == ctrl and buff.caster==role and buff.startRound == BattleLogic.GetCurRound() end)
if isHave then
num=num+1
end
end
end
end
role.Event:AddEvent(BattleEventName.SkillCastEnd, OnRoleHit,nil,nil,role)
if buff.type~=BuffName.Control or buff.ctrlType~=ctrl then
return
end
num=num+1
end
local OnSkillCast=function(skill)
if not skill then
return
end
if skill and not skill.isTriggerJudge and judge==1 then
return
end
--技能释放前清除上一次技能记录的个数
if skill.type==BattleSkillType.Special then
num=0
role.Event:AddEvent(BattleEventName.BuffCaster,onBuffAdd,nil,nil,role)
end
end
role.Event:AddEvent(BattleEventName.SkillCast,OnSkillCast,nil,nil,role)
local OnSkillCastEnd=function(skill)
if not skill then
return
end
if skill and not skill.isTriggerJudge and judge==1 then
return
end
if skill.type==BattleSkillType.Special then
role.Event:RemoveEvent(BattleEventName.BuffCaster,onBuffAdd,nil,nil,role)
end
end
role.Event:AddEvent(BattleEventName.SkillCastEnd, OnSkillCastEnd,nil,nil,role)
end,
--必定暴击