[战斗] 245-256被动修改,修改英雄身上如果有两个相同类型被动只能触发一个的问题
parent
3bcc15d21d
commit
e3e609c87e
|
@ -153,9 +153,11 @@ function this.GetPassivityData(passivityList)
|
||||||
-- 没有被覆盖,数据加入
|
-- 没有被覆盖,数据加入
|
||||||
local pass = {}
|
local pass = {}
|
||||||
if cfg and cfg.Type ~= 0 then
|
if cfg and cfg.Type ~= 0 then
|
||||||
pass[1] = cfg.Type
|
pass[1]=passiveId
|
||||||
|
pass[2]=cfg.Judge
|
||||||
|
pass[3] = cfg.Type
|
||||||
for j = 1, #cfg.Value do
|
for j = 1, #cfg.Value do
|
||||||
pass[j + 1] = cfg.Value[j]
|
pass[j + 3] = cfg.Value[j]
|
||||||
end
|
end
|
||||||
orderList[passiveId] = pass
|
orderList[passiveId] = pass
|
||||||
end
|
end
|
||||||
|
|
|
@ -2749,16 +2749,23 @@ local passivityList = {
|
||||||
role.Event:AddEvent(BattleEventName.SkillCastEnd, onSkillCastEnd)
|
role.Event:AddEvent(BattleEventName.SkillCastEnd, onSkillCastEnd)
|
||||||
end,
|
end,
|
||||||
|
|
||||||
-- 受到攻击有[a]%概率使攻击者[b](每回合造成被击者自身20%攻击力的伤害)持续[c]回合
|
-- 受到[a]攻击有[b]%概率使攻击者[c](每回合造成被击者自身20%攻击力的伤害)持续[d]回合
|
||||||
-- a[float]b[持续伤害状态]c[int]
|
-- a[int 攻击类型] b[float]c[持续伤害状态]d[int] a:0 所有攻击 1:只限制技能伤害
|
||||||
[147] = function(role, args)
|
[147] = function(role, args)
|
||||||
local f1 = args[1]
|
local type=args[1]
|
||||||
local dot = args[2]
|
local f1 = args[2]
|
||||||
local i1 = args[3]
|
local dot = args[3]
|
||||||
|
local i1 = args[4]
|
||||||
-- 技能后后
|
-- 技能后后
|
||||||
local onRoleBeHit = function(caster)
|
local onRoleBeHit = function(caster,damage, bCrit, finalDmg, damageType, skill)
|
||||||
|
--屏蔽相同阵营
|
||||||
|
if caster.camp==role.camp then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
--检测技能
|
||||||
|
if type==1 and (not skill or skill.type==BattleSkillType.Normal)then
|
||||||
|
return
|
||||||
|
end
|
||||||
local attack = role:GetRoleData(RoleDataName.Attack)
|
local attack = role:GetRoleData(RoleDataName.Attack)
|
||||||
local damage = floor(BattleUtil.ErrorCorrection(attack * 0.2))
|
local damage = floor(BattleUtil.ErrorCorrection(attack * 0.2))
|
||||||
BattleUtil.RandomDot(f1, dot, role, caster, i1, 1, damage)
|
BattleUtil.RandomDot(f1, dot, role, caster, i1, 1, damage)
|
||||||
|
@ -4055,17 +4062,21 @@ local passivityList = {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
--技能治疗系数[a]改变[b]%(作用于主动技能效果103)
|
--技能治疗系数[a]改变[b]% ,技能目标改变[c] [d]名(作用于主动技能效果103)
|
||||||
--a[改变类型]b[float]
|
--a[改变类型]b[float] c[改变类型] d[int]
|
||||||
[206] = function(role, args)
|
[206] = function(role, args)
|
||||||
local ct = args[1]
|
local ct = args[1]
|
||||||
local f1 = args[2]
|
local f1 = args[2]
|
||||||
|
local ct2 = args[3]
|
||||||
|
local f2 = args[4]
|
||||||
local onSkillEffectBefore = function(skill, e, func)
|
local onSkillEffectBefore = function(skill, e, func)
|
||||||
if skill.type == BattleSkillType.Special then
|
if skill.type == BattleSkillType.Special then
|
||||||
if e.type == 103 then -- 当前只对技能效果103生效
|
if e.type == 103 then -- 当前只对技能效果103生效
|
||||||
local factor = BattleUtil.ErrorCorrection(BattleUtil.CountValue(e.args[3], f1, ct))
|
local factor = BattleUtil.ErrorCorrection(BattleUtil.CountValue(e.args[3], f1, ct))
|
||||||
e.args[3] = factor
|
e.args[3] = factor
|
||||||
|
if ct2 and f2 then
|
||||||
|
e.args[4] = BattleUtil.ErrorCorrection(BattleUtil.CountValue(e.args[4], f2, ct2))
|
||||||
|
end
|
||||||
if func then func(e) end
|
if func then func(e) end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -4837,18 +4848,18 @@ local passivityList = {
|
||||||
end,
|
end,
|
||||||
-- (直接伤害(目前没有明确定义直接伤害))直接伤害击杀目标自身增加[a]点怒气 重写92被动效果 每次释放技能只触发一次
|
-- (直接伤害(目前没有明确定义直接伤害))直接伤害击杀目标自身增加[a]点怒气 重写92被动效果 每次释放技能只触发一次
|
||||||
-- a[int]
|
-- a[int]
|
||||||
[245] = function(role, args)
|
[245] = function(role, args,id)
|
||||||
local i1 = args[1]
|
local i1 = args[1]
|
||||||
local OnRoleHit = function(defRole, damage, bCrit, finalDmg, damageType, skill)
|
local OnRoleHit = function(defRole, damage, bCrit, finalDmg, damageType, skill)
|
||||||
--如果是技能并且这个被动已经被触发过 return
|
--如果是技能并且这个被动已经被触发过 return
|
||||||
if skill and BattleUtil.ChecklistIsContainValue(skill.triggerPassivityId,245) then
|
if skill and BattleUtil.ChecklistIsContainValue(skill.triggerPassivityId,id) then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
if skill and not skill.isAdd and defRole:IsDead() and not BattleUtil.CheckIsNoDead(defRole) then
|
if skill and not skill.isAdd and defRole:IsDead() and not BattleUtil.CheckIsNoDead(defRole) then
|
||||||
role:AddRage(i1, CountTypeName.Add)
|
role:AddRage(i1, CountTypeName.Add)
|
||||||
if skill then
|
if skill then
|
||||||
-- skill.isTriggePassivity=true
|
-- skill.isTriggePassivity=true
|
||||||
table.insert(skill.triggerPassivityId,245)
|
table.insert(skill.triggerPassivityId,id)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -4857,14 +4868,14 @@ local passivityList = {
|
||||||
|
|
||||||
-- 直接伤害每次击杀目标增加[a]%的[b]可叠加持续至战斗结束[c]改变 重写103效果 每次释放技能只触发一次
|
-- 直接伤害每次击杀目标增加[a]%的[b]可叠加持续至战斗结束[c]改变 重写103效果 每次释放技能只触发一次
|
||||||
-- a[float]b[属性]c[改变类型]
|
-- a[float]b[属性]c[改变类型]
|
||||||
[246] = function(role, args)
|
[246] = function(role, args,id)
|
||||||
local f1 = args[1]
|
local f1 = args[1]
|
||||||
local pro = args[2]
|
local pro = args[2]
|
||||||
local ct = args[3]
|
local ct = args[3]
|
||||||
-- 释放技能后
|
-- 释放技能后
|
||||||
local onRoleHit = function(defRole, damage, bCrit, finalDmg, damageType, skill)
|
local onRoleHit = function(defRole, damage, bCrit, finalDmg, damageType, skill)
|
||||||
--如果是技能并且这个被动已经被触发过 return
|
--如果是技能并且这个被动已经被触发过 return
|
||||||
if skill and BattleUtil.ChecklistIsContainValue(skill.triggerPassivityId,246) then
|
if skill and BattleUtil.ChecklistIsContainValue(skill.triggerPassivityId,id) then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
if defRole:IsDead() and not BattleUtil.CheckIsNoDead(defRole) then
|
if defRole:IsDead() and not BattleUtil.CheckIsNoDead(defRole) then
|
||||||
|
@ -4873,7 +4884,7 @@ local passivityList = {
|
||||||
role:AddBuff(buff)
|
role:AddBuff(buff)
|
||||||
if skill then
|
if skill then
|
||||||
--skill.isTriggePassivity=true
|
--skill.isTriggePassivity=true
|
||||||
table.insert(skill.triggerPassivityId,246)
|
table.insert(skill.triggerPassivityId,id)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -4881,12 +4892,12 @@ local passivityList = {
|
||||||
end,
|
end,
|
||||||
-- 直接伤害击杀目标后追加[a]次普攻 重写114 一次技能只触发一次被动
|
-- 直接伤害击杀目标后追加[a]次普攻 重写114 一次技能只触发一次被动
|
||||||
-- a[int]
|
-- a[int]
|
||||||
[247] = function(role, args)
|
[247] = function(role, args,id)
|
||||||
local i1 = args[1]
|
local i1 = args[1]
|
||||||
-- 释放技能后
|
-- 释放技能后
|
||||||
local onRoleHit = function(target,damage, bCrit, finalDmg, damageType, skill)
|
local onRoleHit = function(target,damage, bCrit, finalDmg, damageType, skill)
|
||||||
--如果是技能并且这个被动已经被触发过 return
|
--如果是技能并且这个被动已经被触发过 return
|
||||||
if skill and BattleUtil.ChecklistIsContainValue(skill.triggerPassivityId,247) then
|
if skill and BattleUtil.ChecklistIsContainValue(skill.triggerPassivityId,id) then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
if target:IsDead() and not BattleUtil.CheckIsNoDead(target) then
|
if target:IsDead() and not BattleUtil.CheckIsNoDead(target) then
|
||||||
|
@ -4895,7 +4906,7 @@ local passivityList = {
|
||||||
end
|
end
|
||||||
if skill then
|
if skill then
|
||||||
-- skill.isTriggePassivity=true
|
-- skill.isTriggePassivity=true
|
||||||
table.insert(skill.triggerPassivityId,247)
|
table.insert(skill.triggerPassivityId,id)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -4904,12 +4915,12 @@ local passivityList = {
|
||||||
|
|
||||||
-- 直接伤害击杀目标回复自身[a]%的[b] 重写116 一次技能只触发一次被动
|
-- 直接伤害击杀目标回复自身[a]%的[b] 重写116 一次技能只触发一次被动
|
||||||
-- a[float]
|
-- a[float]
|
||||||
[248] = function(role, args)
|
[248] = function(role, args,id)
|
||||||
local f1 = args[1]
|
local f1 = args[1]
|
||||||
-- 释放技能后
|
-- 释放技能后
|
||||||
local onRoleHit = function(target,damage, bCrit, finalDmg, damageType, skill)
|
local onRoleHit = function(target,damage, bCrit, finalDmg, damageType, skill)
|
||||||
--如果是技能并且这个被动已经被触发过 return
|
--如果是技能并且这个被动已经被触发过 return
|
||||||
if skill and BattleUtil.ChecklistIsContainValue(skill.triggerPassivityId,248) then
|
if skill and BattleUtil.ChecklistIsContainValue(skill.triggerPassivityId,id) then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
if target:IsDead() and not BattleUtil.CheckIsNoDead(target) then
|
if target:IsDead() and not BattleUtil.CheckIsNoDead(target) then
|
||||||
|
@ -4917,7 +4928,7 @@ local passivityList = {
|
||||||
BattleUtil.CalTreat(role, role, treat)
|
BattleUtil.CalTreat(role, role, treat)
|
||||||
if skill then
|
if skill then
|
||||||
-- skill.isTriggePassivity=true
|
-- skill.isTriggePassivity=true
|
||||||
table.insert(skill.triggerPassivityId,248)
|
table.insert(skill.triggerPassivityId,id)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -4926,12 +4937,12 @@ local passivityList = {
|
||||||
|
|
||||||
-- 直接伤害击杀目标下回合攻击[a]%暴击(TODO:目前为增加[a]%) 重写125 一次技能只触发一次被动
|
-- 直接伤害击杀目标下回合攻击[a]%暴击(TODO:目前为增加[a]%) 重写125 一次技能只触发一次被动
|
||||||
-- a[float]
|
-- a[float]
|
||||||
[249] = function(role, args)
|
[249] = function(role, args,id)
|
||||||
local f1 = args[1]
|
local f1 = args[1]
|
||||||
-- 释放技能后
|
-- 释放技能后
|
||||||
local onRoleHit = function(target,damage, bCrit, finalDmg, damageType, skill)
|
local onRoleHit = function(target,damage, bCrit, finalDmg, damageType, skill)
|
||||||
--如果是技能并且这个被动已经被触发过 return
|
--如果是技能并且这个被动已经被触发过 return
|
||||||
if skill and BattleUtil.ChecklistIsContainValue(skill.triggerPassivityId,249) then
|
if skill and BattleUtil.ChecklistIsContainValue(skill.triggerPassivityId,id) then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
if target:IsDead() and not BattleUtil.CheckIsNoDead(target) then
|
if target:IsDead() and not BattleUtil.CheckIsNoDead(target) then
|
||||||
|
@ -4939,7 +4950,7 @@ local passivityList = {
|
||||||
role:AddBuff(buff)
|
role:AddBuff(buff)
|
||||||
if skill then
|
if skill then
|
||||||
--skill.isTriggePassivity=true
|
--skill.isTriggePassivity=true
|
||||||
table.insert(skill.triggerPassivityId,249)
|
table.insert(skill.triggerPassivityId,id)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -4948,7 +4959,7 @@ local passivityList = {
|
||||||
|
|
||||||
-- 直接伤害每次击杀目标增加自身伤害[a]%,[b]改变,可叠加持续至战斗结束 重写132 一次技能只触发一次被动
|
-- 直接伤害每次击杀目标增加自身伤害[a]%,[b]改变,可叠加持续至战斗结束 重写132 一次技能只触发一次被动
|
||||||
-- a[float]b[改变类型]
|
-- a[float]b[改变类型]
|
||||||
[250] = function(role, args)
|
[250] = function(role, args,id)
|
||||||
local f1 = args[1]
|
local f1 = args[1]
|
||||||
local ct = args[2]
|
local ct = args[2]
|
||||||
|
|
||||||
|
@ -4958,14 +4969,14 @@ local passivityList = {
|
||||||
-- 击杀数量累加
|
-- 击杀数量累加
|
||||||
local OnRoleHit = function(defRole, damage, bCrit, finalDmg, damageType, skill)
|
local OnRoleHit = function(defRole, damage, bCrit, finalDmg, damageType, skill)
|
||||||
--如果是技能并且这个被动已经被触发过 return
|
--如果是技能并且这个被动已经被触发过 return
|
||||||
if skill and BattleUtil.ChecklistIsContainValue(skill.triggerPassivityId,250) then
|
if skill and BattleUtil.ChecklistIsContainValue(skill.triggerPassivityId,id) then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
if skill and defRole:IsDead() and not BattleUtil.CheckIsNoDead(defRole) then
|
if skill and defRole:IsDead() and not BattleUtil.CheckIsNoDead(defRole) then
|
||||||
killNum = killNum + 1
|
killNum = killNum + 1
|
||||||
if skill then
|
if skill then
|
||||||
--skill.isTriggePassivity=true
|
--skill.isTriggePassivity=true
|
||||||
table.insert(skill.triggerPassivityId,250)
|
table.insert(skill.triggerPassivityId,id)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -4994,12 +5005,12 @@ local passivityList = {
|
||||||
|
|
||||||
-- 直接伤害击杀[a]目标回复[b]%的最大生命 重写148 一次技能只触发一次被动
|
-- 直接伤害击杀[a]目标回复[b]%的最大生命 重写148 一次技能只触发一次被动
|
||||||
-- a[持续伤害状态]b[float]
|
-- a[持续伤害状态]b[float]
|
||||||
[251] = function(role, args)
|
[251] = function(role, args,id)
|
||||||
local dot = args[1]
|
local dot = args[1]
|
||||||
local f1 = args[2]
|
local f1 = args[2]
|
||||||
local function onHit(target, damage, bCrit, finalDmg, damageType, skill)
|
local function onHit(target, damage, bCrit, finalDmg, damageType, skill)
|
||||||
--如果是技能并且这个被动已经被触发过 return
|
--如果是技能并且这个被动已经被触发过 return
|
||||||
if skill and BattleUtil.ChecklistIsContainValue(skill.triggerPassivityId,251) then
|
if skill and BattleUtil.ChecklistIsContainValue(skill.triggerPassivityId,id) then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
if target:IsDead() and not BattleUtil.CheckIsNoDead(target) then
|
if target:IsDead() and not BattleUtil.CheckIsNoDead(target) then
|
||||||
|
@ -5008,7 +5019,7 @@ local passivityList = {
|
||||||
BattleUtil.ApplyTreat(role, role, value)
|
BattleUtil.ApplyTreat(role, role, value)
|
||||||
if skill then
|
if skill then
|
||||||
--skill.isTriggePassivity=true
|
--skill.isTriggePassivity=true
|
||||||
table.insert(skill.triggerPassivityId,251)
|
table.insert(skill.triggerPassivityId,id)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
role.Event:RemoveEvent(BattleEventName.RoleHit, onHit)
|
role.Event:RemoveEvent(BattleEventName.RoleHit, onHit)
|
||||||
|
@ -5023,18 +5034,18 @@ local passivityList = {
|
||||||
|
|
||||||
-- 直接伤害击杀目标回复自身[a]点怒气 重写153 一次技能只触发一次被动
|
-- 直接伤害击杀目标回复自身[a]点怒气 重写153 一次技能只触发一次被动
|
||||||
-- a[int]
|
-- a[int]
|
||||||
[252] = function(role, args)
|
[252] = function(role, args,id)
|
||||||
local i1 = args[1]
|
local i1 = args[1]
|
||||||
local onHit = function(target, damage, bCrit, finalDmg,damageType,skill)
|
local onHit = function(target, damage, bCrit, finalDmg,damageType,skill)
|
||||||
--如果是技能并且这个被动已经被触发过 return
|
--如果是技能并且这个被动已经被触发过 return
|
||||||
if skill and BattleUtil.ChecklistIsContainValue(skill.triggerPassivityId,252) then
|
if skill and BattleUtil.ChecklistIsContainValue(skill.triggerPassivityId,id) then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
if target:IsDead() and not BattleUtil.CheckIsNoDead(target) then
|
if target:IsDead() and not BattleUtil.CheckIsNoDead(target) then
|
||||||
role:AddRage(i1, CountTypeName.Add)
|
role:AddRage(i1, CountTypeName.Add)
|
||||||
if skill then
|
if skill then
|
||||||
--skill.isTriggePassivity=true
|
--skill.isTriggePassivity=true
|
||||||
table.insert(skill.triggerPassivityId,252)
|
table.insert(skill.triggerPassivityId,id)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -5043,13 +5054,13 @@ local passivityList = {
|
||||||
|
|
||||||
-- 击杀目标后对敌方血量百分比最低两名角色造成[a]%[b]伤害 重写170 一次技能只触发一次被动
|
-- 击杀目标后对敌方血量百分比最低两名角色造成[a]%[b]伤害 重写170 一次技能只触发一次被动
|
||||||
-- a[float]b[伤害类型]
|
-- a[float]b[伤害类型]
|
||||||
[253] = function(role, args)
|
[253] = function(role, args,id)
|
||||||
local f1 = args[1]
|
local f1 = args[1]
|
||||||
local dt = args[2]
|
local dt = args[2]
|
||||||
-- 直接伤害后
|
-- 直接伤害后
|
||||||
local onRoleHit = function(target, damage, bCrit, finalDmg, damageType, skill)
|
local onRoleHit = function(target, damage, bCrit, finalDmg, damageType, skill)
|
||||||
--如果是技能并且这个被动已经被触发<E8A7A6><E58F91><EFBFBD><EFBFBD><EFBFBD> return
|
--如果是技能并且这个被动已经被触发<E8A7A6><E58F91><EFBFBD><EFBFBD><EFBFBD> return
|
||||||
if skill and BattleUtil.ChecklistIsContainValue(skill.triggerPassivityId,253) then
|
if skill and BattleUtil.ChecklistIsContainValue(skill.triggerPassivityId,id) then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
if skill and not skill.isAdd and target:IsDead() and not BattleUtil.CheckIsNoDead(target) then
|
if skill and not skill.isAdd and target:IsDead() and not BattleUtil.CheckIsNoDead(target) then
|
||||||
|
@ -5064,7 +5075,7 @@ local passivityList = {
|
||||||
end
|
end
|
||||||
if skill then
|
if skill then
|
||||||
--skill.isTriggePassivity=true
|
--skill.isTriggePassivity=true
|
||||||
table.insert(skill.triggerPassivityId,253)
|
table.insert(skill.triggerPassivityId,id)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -5073,11 +5084,11 @@ local passivityList = {
|
||||||
|
|
||||||
-- 直接伤害击杀目标对仇恨目标造成[a]%物理伤害 重写185 一次技能只触发一次被动
|
-- 直接伤害击杀目标对仇恨目标造成[a]%物理伤害 重写185 一次技能只触发一次被动
|
||||||
-- a[float]
|
-- a[float]
|
||||||
[254] = function(role, args)
|
[254] = function(role, args,id)
|
||||||
local f1 = args[1]
|
local f1 = args[1]
|
||||||
local onRoleHit = function(target,damage, bCrit, finalDmg, damageType, skill)
|
local onRoleHit = function(target,damage, bCrit, finalDmg, damageType, skill)
|
||||||
--如果是技能并且这个被动已经被触发过 return
|
--如果是技能并且这个被动已经被触发过 return
|
||||||
if skill and BattleUtil.ChecklistIsContainValue(skill.triggerPassivityId,254) then
|
if skill and BattleUtil.ChecklistIsContainValue(skill.triggerPassivityId,id) then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
if target:IsDead() and not BattleUtil.CheckIsNoDead(target) then
|
if target:IsDead() and not BattleUtil.CheckIsNoDead(target) then
|
||||||
|
@ -5085,7 +5096,7 @@ local passivityList = {
|
||||||
BattleUtil.CalDamage(nil, role, target, 1, f1)
|
BattleUtil.CalDamage(nil, role, target, 1, f1)
|
||||||
if skill then
|
if skill then
|
||||||
--skill.isTriggePassivity=true
|
--skill.isTriggePassivity=true
|
||||||
table.insert(skill.triggerPassivityId,254)
|
table.insert(skill.triggerPassivityId,id)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -5094,11 +5105,11 @@ local passivityList = {
|
||||||
|
|
||||||
-- 技能直接击杀敌方目标时有[a]%概率获得目标剩余所有怒气(输出武将佩戴)重写197 一次技能只触发一次被动
|
-- 技能直接击杀敌方目标时有[a]%概率获得目标剩余所有怒气(输出武将佩戴)重写197 一次技能只触发一次被动
|
||||||
-- a[float]
|
-- a[float]
|
||||||
[255] = function(role, args)
|
[255] = function(role, args,id)
|
||||||
local f1 = args[1]
|
local f1 = args[1]
|
||||||
local onRoleHit = function(target, damage, bCrit, finalDmg, damageType, skill)
|
local onRoleHit = function(target, damage, bCrit, finalDmg, damageType, skill)
|
||||||
--如果是技能并且这个被动已经被触发过 return
|
--如果是技能并且这个被动已经被触发过 return
|
||||||
if skill and BattleUtil.ChecklistIsContainValue(skill.triggerPassivityId,255) then
|
if skill and BattleUtil.ChecklistIsContainValue(skill.triggerPassivityId,id) then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
if skill and skill.type == BattleSkillType.Special and target:IsDead() and not BattleUtil.CheckIsNoDead(target) then
|
if skill and skill.type == BattleSkillType.Special and target:IsDead() and not BattleUtil.CheckIsNoDead(target) then
|
||||||
|
@ -5106,7 +5117,7 @@ local passivityList = {
|
||||||
role:AddRage(target.Rage, CountTypeName.Add)
|
role:AddRage(target.Rage, CountTypeName.Add)
|
||||||
if skill then
|
if skill then
|
||||||
--skill.isTriggePassivity=true
|
--skill.isTriggePassivity=true
|
||||||
table.insert(skill.triggerPassivityId,255)
|
table.insert(skill.triggerPassivityId,id)
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
@ -5116,12 +5127,12 @@ local passivityList = {
|
||||||
|
|
||||||
-- 直接伤害击杀目标释放[a]技能。 重新243 一次技能只触发一次被动
|
-- 直接伤害击杀目标释放[a]技能。 重新243 一次技能只触发一次被动
|
||||||
-- a[float]
|
-- a[float]
|
||||||
[256] = function(role, args)
|
[256] = function(role, args,id,judge)
|
||||||
local f1 = args[1]
|
local f1 = args[1]
|
||||||
local f2=args[2]
|
local f2=args[2]
|
||||||
local onRoleHit = function(target, damage, bCrit, finalDmg, damageType, skill)
|
local onRoleHit = function(target, damage, bCrit, finalDmg, damageType, skill)
|
||||||
--如果是技能并且这个被动已经被触发过 return
|
--如果是技能并且这个被动已经被触发过 return
|
||||||
if skill and BattleUtil.ChecklistIsContainValue(skill.triggerPassivityId,256) then
|
if skill and BattleUtil.ChecklistIsContainValue(skill.triggerPassivityId,id) then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
--处理伏虎觉醒十星附加的额外技能,额外技能不触发这个特性 2020/11/17 wangzhenxing
|
--处理伏虎觉醒十星附加的额外技能,额外技能不触发这个特性 2020/11/17 wangzhenxing
|
||||||
|
@ -5135,7 +5146,7 @@ local passivityList = {
|
||||||
role:InsertExtraSkill(f1,f2)
|
role:InsertExtraSkill(f1,f2)
|
||||||
if skill then
|
if skill then
|
||||||
--skill.isTriggePassivity=true
|
--skill.isTriggePassivity=true
|
||||||
table.insert(skill.triggerPassivityId,256)
|
table.insert(skill.triggerPassivityId,id)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -5471,7 +5482,248 @@ local passivityList = {
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
role.Event:AddEvent(BattleEventName.RoleHit, onRoleHit)
|
role.Event:AddEvent(BattleEventName.RoleHit, onRoleHit)
|
||||||
end
|
end,
|
||||||
|
-- 受到[a]状态敌人攻击时受到伤害[b]改变[c]怒气
|
||||||
|
-- a[持续伤害状态]b[改变类型]c[int]
|
||||||
|
[271] = function(role, args)
|
||||||
|
local dot = args[1]
|
||||||
|
local ct = args[2]
|
||||||
|
local f1 = args[3]
|
||||||
|
local onPassiveBeDamaging = function(func, caster, damage)
|
||||||
|
if BattleLogic.BuffMgr:HasBuff(caster, BuffName.DOT, function(buff) return buff.damageType == dot end) then
|
||||||
|
role:AddRage(f1,ct)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
role.Event:AddEvent(BattleEventName.PassiveBeDamaging, onPassiveBeDamaging)
|
||||||
|
end,
|
||||||
|
-- 战斗第回合概率无敌,回合数每增加1,概率是之前的[a]
|
||||||
|
-- a[float]
|
||||||
|
[272] = function(role, args)
|
||||||
|
local i1 = args[1]
|
||||||
|
local buff=nil
|
||||||
|
local isTrigger=true
|
||||||
|
BattleLogic.Event:AddEvent(BattleEventName.BattleRoundChange, function(curRound)
|
||||||
|
local pro=0
|
||||||
|
if curRound>0 then
|
||||||
|
pro=i1^(curRound-1)
|
||||||
|
LogError("cur round pro "..pro)
|
||||||
|
end
|
||||||
|
if isTrigger then
|
||||||
|
local isAdd=BattleUtil.RandomAction(pro, function ()
|
||||||
|
buff = Buff.Create(role, BuffName.Shield, 1, ShieldTypeName.AllReduce, 0, 0)
|
||||||
|
buff.clear = false
|
||||||
|
role:AddBuff(buff)
|
||||||
|
end)
|
||||||
|
isTrigger=isAdd
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
end,
|
||||||
|
-- 释放技能时如目标处于[a]状态,解除周围人系神将的异常状态
|
||||||
|
-- a[持续伤害状态]b[float]
|
||||||
|
[273] = function(role, args)
|
||||||
|
local dot = args[1]
|
||||||
|
local f1 = args[2]
|
||||||
|
local onHit = function(target, damage, bCrit, finalDmg)
|
||||||
|
--屏蔽相同阵应
|
||||||
|
if target and target.camp==role.camp then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
if BattleLogic.BuffMgr:HasBuff(target, BuffName.DOT, function(buff) return buff.damageType == dot end) then
|
||||||
|
local list = RoleManager.GetNeighbor(role, 1)
|
||||||
|
if list then
|
||||||
|
for key, value in pairs(list) do
|
||||||
|
if value and value~=role and value.element==role.element then
|
||||||
|
-- 清除所有负面buff
|
||||||
|
BattleLogic.BuffMgr:ClearBuff(self.target, function (buff)
|
||||||
|
return buff.type == BuffName.Control or buff.type == BuffName.DOT
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
local onSkillCast = function(skill)
|
||||||
|
if skill.type == BattleSkillType.Special or skill.type == BattleSkillType.Extra then
|
||||||
|
role.Event:AddEvent(BattleEventName.RoleHit, onHit)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
-- 技能后后
|
||||||
|
local onSkillCastEnd = function(skill)
|
||||||
|
if skill.type == BattleSkillType.Special or skill.type == BattleSkillType.Extra then
|
||||||
|
role.Event:RemoveEvent(BattleEventName.RoleHit, onHit)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
role.Event:AddEvent(BattleEventName.SkillCast, onSkillCast)
|
||||||
|
role.Event:AddEvent(BattleEventName.SkillCastEnd, onSkillCastEnd)
|
||||||
|
end,
|
||||||
|
|
||||||
|
--受到[a]目标攻击时,自身免疫控制和减怒
|
||||||
|
--a[int 持续伤害类型] b,c[int 持续伤害类型]
|
||||||
|
[274] = function(role,args)
|
||||||
|
local sta1=args[1]
|
||||||
|
local sta2=args[2]
|
||||||
|
local sta3=args[3]
|
||||||
|
local skiller=nil
|
||||||
|
local immune = function(buff)
|
||||||
|
return buff.type == BuffName.Control
|
||||||
|
end
|
||||||
|
local curBuff=nil
|
||||||
|
local immuneState=false
|
||||||
|
local onRoleDamageBefore=function(atkRole, factorFunc, damageType, skill)
|
||||||
|
if atkRole.camp~= role.camp and BattleLogic.BuffMgr:HasBuff(skill.owner, BuffName.DOT, function (buff) return buff.damageType == sta1 end) then
|
||||||
|
--curBuff=Buff.Create(role, BuffName.Immune, 1,4,immune)
|
||||||
|
-- role:AddBuff(curBuff)
|
||||||
|
role.buffFilter:Add(immune)
|
||||||
|
immuneState=role.isImmuneReduceRage
|
||||||
|
if not immuneState then
|
||||||
|
role.isImmuneReduceRage=true
|
||||||
|
end
|
||||||
|
skiller=atkRole
|
||||||
|
end
|
||||||
|
end
|
||||||
|
role.Event:AddEvent(BattleEventName.RoleBeDamagedBefore,onRoleDamageBefore)
|
||||||
|
|
||||||
|
-- 释放技能后
|
||||||
|
local onSkillEnd = function(skill)
|
||||||
|
if skill and skill.owner==skiller then
|
||||||
|
--if curBuff then
|
||||||
|
-- BattleLogic.BuffMgr:ClearBuff(role, function (buff)
|
||||||
|
-- return buff==curBuff
|
||||||
|
-- end)
|
||||||
|
for i = 1, role.buffFilter.size do
|
||||||
|
if role.buffFilter.buffer[i] == immune then
|
||||||
|
role.buffFilter:Remove(i)
|
||||||
|
break
|
||||||
|
end
|
||||||
|
end
|
||||||
|
role.isImmuneReduceRage=immuneState
|
||||||
|
-- end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
BattleLogic.Event:AddEvent(BattleEventName.SkillCastEnd, onSkillEnd)
|
||||||
|
end,
|
||||||
|
|
||||||
|
|
||||||
|
-- 释放技能后[a]方 [b]最高[c]阵营 友方改变[d][e]点怒气
|
||||||
|
-- a[int,敌我方] 0:我方 1:敌方,b[int 属性类型], c[int 阵营id], d[int 改变类型], e[int]
|
||||||
|
[275] = function(role, args)
|
||||||
|
local camp = args[1]
|
||||||
|
local pro=args[2]
|
||||||
|
local ele=args[3]
|
||||||
|
local ct=args[4]
|
||||||
|
local num=args[5]
|
||||||
|
-- 释放技能后
|
||||||
|
local onSkillEnd = function(skill)
|
||||||
|
if skill.type == BattleSkillType.Special or skill.type==BattleSkillType.Extra then
|
||||||
|
local list=nil
|
||||||
|
if camp==0 then
|
||||||
|
list= RoleManager.Query(function(v) return v.camp == role.camp and v.element==ele end)
|
||||||
|
elseif camp==1 then
|
||||||
|
list= RoleManager.Query(function(v) return v.camp ~= role.camp and v.element==ele end)
|
||||||
|
end
|
||||||
|
if not list or LengthOfTable(list)==0 then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
list = BattleUtil.SortByProp(list, BattlePropList[pro],0)
|
||||||
|
if not list[1]:IsDead() then
|
||||||
|
list[1]:AddRage(num,ct)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
role.Event:AddEvent(BattleEventName.SkillCastEnd, onSkillEnd)
|
||||||
|
end,
|
||||||
|
|
||||||
|
-- 释放技能后 生命百分比最少[a]名[b]阵营,附加免疫控制效果,持续[c]回合
|
||||||
|
-- a[int],b[int 阵营id],c[int]
|
||||||
|
[276] = function(role, args)
|
||||||
|
local num = args[1]
|
||||||
|
local ele=args[2]
|
||||||
|
local round=args[3]
|
||||||
|
-- 释放技能后
|
||||||
|
local onSkillEnd = function(skill)
|
||||||
|
if skill.type == BattleSkillType.Special or skill.type==BattleSkillType.Extra then
|
||||||
|
local list= RoleManager.Query(function(v) return v.camp == role.camp and v.element==ele end)
|
||||||
|
if not list or LengthOfTable(list)==0 then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
list =BattleUtil.SortByHpFactor(list,1)
|
||||||
|
for i = 1,LengthOfTable(list) do
|
||||||
|
if i<=num then
|
||||||
|
if not list[i]:IsDead() then
|
||||||
|
local buff=Buff.Create(role, BuffName.Immune,round,1)
|
||||||
|
list[i]:AddBuff(buff)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
role.Event:AddEvent(BattleEventName.SkillCastEnd, onSkillEnd)
|
||||||
|
end,
|
||||||
|
-- 减伤改为[a] 持续回合改为[b](技能效果104专属被动)
|
||||||
|
-- a[float]b[int]
|
||||||
|
[277] = function(role, args)
|
||||||
|
local dot = args[1]
|
||||||
|
local round=args[2]
|
||||||
|
local onSkillEffectBefore = function(skill, e, func)
|
||||||
|
if skill.type == BattleSkillType.Special then
|
||||||
|
if e.type == 104 then -- 当前只对技能效果104生效
|
||||||
|
e.args[1]=dot
|
||||||
|
e.args[2]=round
|
||||||
|
if func then func(e) end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
role.Event:AddEvent(BattleEventName.SkillEffectBefore, onSkillEffectBefore)
|
||||||
|
end,
|
||||||
|
--为己方神将附加的护盾消失后,回复被保护的神将[a][b]%的血量
|
||||||
|
[278]=function(role,args)
|
||||||
|
local pro=args[1]
|
||||||
|
local v1=args[2]
|
||||||
|
local OnBuffEnd=function(buff)
|
||||||
|
if buff and buff.caster==role and buff.type==BuffName.Shield then
|
||||||
|
local val = floor(BattleUtil.FP_Mul(v1, role:GetRoleData(BattlePropList[pro])))
|
||||||
|
BattleUtil.CalTreat(role,buff.target, val)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
role.Event:AddEvent(BattleEventName.BuffEnd, OnBuffEnd)
|
||||||
|
end,
|
||||||
|
--发动技能后,[a]概率给我方[b]最高[c]名[d]阵营 [e]属性[f]改变[g],持续[h]回合
|
||||||
|
--a[float],b[int 属性],c[int], d[int],e[int 属性],f[int 改变类型],g[float] h[int]
|
||||||
|
[279] = function(role, args)
|
||||||
|
local p1=args[1]
|
||||||
|
local p2=args[2]
|
||||||
|
local num=args[3]
|
||||||
|
local ele=args[4]
|
||||||
|
local p3=args[5]
|
||||||
|
local ct=args[6]
|
||||||
|
local v1=args[7]
|
||||||
|
local r1=args[8]
|
||||||
|
|
||||||
|
local OnSkillCastEnd = function(skill)
|
||||||
|
if skill and (skill.type==BattleSkillType.Special or skill.type==BattleSkillType.Extra) then
|
||||||
|
BattleUtil.RandomAction(p1, function ()
|
||||||
|
local list= RoleManager.Query(function(v) return v.camp == role.camp and v.element==ele end)
|
||||||
|
if not list or LengthOfTable(list)==0 then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
list =BattleUtil.SortByProp(list,BattlePropList[p2],0)
|
||||||
|
for i = 1,LengthOfTable(list) do
|
||||||
|
if i<=num then
|
||||||
|
if not list[i]:IsDead() then
|
||||||
|
local buff=Buff.Create(role, BuffName.PropertyChange,r1,BattlePropList[p3],v1,ct )
|
||||||
|
list[i]:AddBuff(buff)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
role.Event:AddEvent(BattleEventName.SkillCastEnd, OnSkillCastEnd)
|
||||||
|
end,
|
||||||
|
--免疫减怒
|
||||||
|
[280]=function(role,args)
|
||||||
|
role.isImmuneReduceRage=true
|
||||||
|
LogError("角色免疫减怒")
|
||||||
|
end,
|
||||||
}
|
}
|
||||||
return passivityList
|
return passivityList
|
|
@ -58,17 +58,20 @@ function RoleLogic:Init(uid, data, position)
|
||||||
self.NoRageRate = 0 -- 不消耗怒气值的概率
|
self.NoRageRate = 0 -- 不消耗怒气值的概率
|
||||||
|
|
||||||
--
|
--
|
||||||
|
self.isImmuneReduceRage=false --是否免疫减怒
|
||||||
self.passiveList = {}
|
self.passiveList = {}
|
||||||
if data.passivity and #data.passivity > 0 then
|
if data.passivity and #data.passivity > 0 then
|
||||||
for i = 1, #data.passivity do
|
for i = 1, #data.passivity do
|
||||||
local v = data.passivity[i]
|
local v = data.passivity[i]
|
||||||
local id = v[1]
|
local passivityId=v[1]
|
||||||
|
local judge=v[2]
|
||||||
|
local id = v[3]
|
||||||
local args = {}
|
local args = {}
|
||||||
for j = 2, #v do
|
for j = 4, #v do
|
||||||
args[j-1] = v[j]
|
args[j-3] = v[j]
|
||||||
end
|
end
|
||||||
if BattleUtil.Passivity[id] then
|
if BattleUtil.Passivity[id] then
|
||||||
BattleUtil.Passivity[id](self, args)
|
BattleUtil.Passivity[id](self, args,passivityId,judge)
|
||||||
-- 加入被动列表
|
-- 加入被动列表
|
||||||
table.insert(self.passiveList, {id, args})
|
table.insert(self.passiveList, {id, args})
|
||||||
end
|
end
|
||||||
|
@ -156,7 +159,7 @@ end
|
||||||
-- 改变怒气值
|
-- 改变怒气值
|
||||||
function RoleLogic:AddRage(value, type)
|
function RoleLogic:AddRage(value, type)
|
||||||
-- 角色身上有无敌盾,不扣除怒气 by:wangzhenxing 2020/08/10 14:56
|
-- 角色身上有无敌盾,不扣除怒气 by:wangzhenxing 2020/08/10 14:56
|
||||||
if (type==3 or type==4) and BattleLogic.BuffMgr:HasBuff(self, BuffName.Shield, function (buff) return buff.shieldType and buff.shieldType == ShieldTypeName.AllReduce end) then
|
if (type==3 or type==4) and (self.isImmuneReduceRage or BattleLogic.BuffMgr:HasBuff(self, BuffName.Shield, function (buff) return buff.shieldType and buff.shieldType == ShieldTypeName.AllReduce end)) then
|
||||||
LogBattle("角色身上有无敌盾,不扣除怒气")
|
LogBattle("角色身上有无敌盾,不扣除怒气")
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue