[战斗]=========新将观音代码提交
parent
bb35a9839a
commit
ecb47b16e8
|
@ -2317,7 +2317,6 @@ local effectList = {
|
|||
if skill and skill:CheckTargetIsHit(target) then
|
||||
BattleUtil.RandomControl(pro1,ctrl, caster, target,r1)
|
||||
end
|
||||
caster.Event:RemoveEvent(BattleEventName.PassiveDamaging, OnPassiveDamaging)
|
||||
end)
|
||||
end,
|
||||
|
||||
|
@ -2354,7 +2353,41 @@ local effectList = {
|
|||
target:AddBuff(Buff.Create(caster, BuffName.PropertyChange, i1, BattlePropList[pro], f1, ct))
|
||||
end)
|
||||
end,
|
||||
|
||||
--造成[a]%的[b]伤害,目标数量大于等于[c],伤害[d]改变[e]%;目标数量小于[f],对其额外造成[g]属性[h]%的伤害(e,h填0 为魂印修改数值3)
|
||||
--a[float],b[伤害类型],c[int],d[int],e[float] f[int] g[int] h[float]
|
||||
[126] = function(caster, target, args, interval, skill)
|
||||
local f1 = args[1]
|
||||
local dt = args[2]
|
||||
local num = args[3]
|
||||
local ct = args[4]
|
||||
local f2 = args[5]
|
||||
local num2 =args[6]
|
||||
local p1 = args[7]
|
||||
local f3 = args[8]
|
||||
-- 改变值 = 技能最大目标数 - 当前目标数
|
||||
local maxNum = skill:GetMaxTargetNum()
|
||||
local curNum = #skill:GetDirectTargets()
|
||||
if curNum>=num and f2>0 then
|
||||
f1=BattleUtil.CountValue(f1,f2,ct)
|
||||
end
|
||||
BattleLogic.WaitForTrigger(interval, function ()
|
||||
BattleUtil.CalDamage(skill, caster, target, dt, f1)
|
||||
--伤害命中才会给目标上buff
|
||||
if skill and skill:CheckTargetIsHit(target) then
|
||||
if curNum<num2 then
|
||||
if f3 and f3==0 then
|
||||
return
|
||||
end
|
||||
local isBoss=BattleUtil.CheckIsBoss(target)
|
||||
if (p1==12 or p1==13) and isBoss then
|
||||
return
|
||||
end
|
||||
local damage = floor(BattleUtil.ErrorCorrection(f3 * target:GetRoleData(BattlePropList[p1])))
|
||||
BattleUtil.ApplyDamage(skill,caster, target,damage)
|
||||
end
|
||||
end
|
||||
end)
|
||||
end,
|
||||
}
|
||||
|
||||
return effectList
|
|
@ -45,12 +45,15 @@ end
|
|||
local passivityList = {
|
||||
--发动技能时,[a]的概率将[b]*[c]算作[d]计算
|
||||
--a[float],b[属性],c[float],d[属性]
|
||||
[1] = function(role, args)
|
||||
[1] = function(role, args,id,judge)
|
||||
local f1 = args[1]
|
||||
local pro1 = args[2]
|
||||
local f2 = args[3]
|
||||
local pro2 = args[4]
|
||||
local OnSkillCast = function(skill)
|
||||
if skill and not skill.isTriggerJudge and judge==1 then
|
||||
return
|
||||
end
|
||||
BattleUtil.RandomAction(f1, function ()
|
||||
local duration = 0
|
||||
for i=1, #skill.effectCaster.effectList do
|
||||
|
@ -64,12 +67,15 @@ local passivityList = {
|
|||
|
||||
--发动技能后,[a]的概率对敌方随机1名施加攻击*[c]的[d]伤害。
|
||||
--a[float],c[float],d[伤害类型]
|
||||
[2] = function(role, args)
|
||||
[2] = function(role, args,id,judge)
|
||||
local f1 = args[1]
|
||||
local f2 = args[2]
|
||||
local dt = args[3]
|
||||
|
||||
local OnSkillCastEnd = function(skill)
|
||||
if skill and not skill.isTriggerJudge and judge==1 then
|
||||
return
|
||||
end
|
||||
BattleUtil.RandomAction(f1, function ()
|
||||
local arr = BattleUtil.ChooseTarget(role, 20001)
|
||||
if arr[1] then
|
||||
|
@ -82,12 +88,15 @@ local passivityList = {
|
|||
|
||||
--发动技能后,[c]使仇恨目标受到治疗效果降低[a],持续[b]
|
||||
--a[float],b[int],c[float]
|
||||
[3] = function(role, args)
|
||||
[3] = function(role, args,id,judge)
|
||||
local f1 = args[1]
|
||||
local f2 = args[2]
|
||||
local f3 = args[3]
|
||||
|
||||
local OnSkillCastEnd = function(skill)
|
||||
if skill and not skill.isTriggerJudge and judge==1 then
|
||||
return
|
||||
end
|
||||
BattleUtil.RandomAction(f3, function ()
|
||||
local arr = BattleUtil.ChooseTarget(role, 40000)
|
||||
if arr[1] then
|
||||
|
@ -100,13 +109,16 @@ local passivityList = {
|
|||
|
||||
--发动技能后,[d]改变自身[a]属性[b],持续[c]秒
|
||||
--a[属性],b[float],c[int],d[改变类型]
|
||||
[4] = function(role, args)
|
||||
[4] = function(role, args,id,judge)
|
||||
local pro = args[1]
|
||||
local f1 = args[2]
|
||||
local f2 = args[3]
|
||||
local ct = args[4]
|
||||
|
||||
local OnSkillCastEnd = function(skill)
|
||||
if skill and not skill.isTriggerJudge and judge==1 then
|
||||
return
|
||||
end
|
||||
role:AddBuff(Buff.Create(role, BuffName.PropertyChange, f2, BattlePropList[pro], f1, ct))
|
||||
end
|
||||
role.Event:AddEvent(BattleEventName.SkillCastEnd, OnSkillCastEnd)
|
||||
|
@ -114,13 +126,16 @@ local passivityList = {
|
|||
|
||||
--发动技能后,[a]的概率回复攻击最高的1人的[b]*[c]血量,持续[d]秒。
|
||||
--a[float],b[属性],c[float],d[int]
|
||||
[5] = function(role, args)
|
||||
[5] = function(role, args,id,judge)
|
||||
local f1 = args[1]
|
||||
local pro = args[2]
|
||||
local f2 = args[3]
|
||||
local f3 = args[4]
|
||||
|
||||
local OnSkillCastEnd = function(skill)
|
||||
if skill and not skill.isTriggerJudge and judge==1 then
|
||||
return
|
||||
end
|
||||
BattleUtil.RandomAction(f1, function ()
|
||||
local arr = BattleUtil.ChooseTarget(role, 10321)
|
||||
if arr[1] then
|
||||
|
@ -134,7 +149,7 @@ local passivityList = {
|
|||
|
||||
--发动技能后,[a]的概率提升随机角色的[b]*[c]的[d],持续[e]秒。
|
||||
--a[float],b[属性],c[float],d[属性],e[int]
|
||||
[6] = function(role, args)
|
||||
[6] = function(role, args,id,judge)
|
||||
local f1 = args[1]
|
||||
local pro1 = args[2]
|
||||
local f2 = args[3]
|
||||
|
@ -142,6 +157,9 @@ local passivityList = {
|
|||
local f3 = args[5]
|
||||
|
||||
local OnSkillCastEnd = function(skill)
|
||||
if skill and not skill.isTriggerJudge and judge==1 then
|
||||
return
|
||||
end
|
||||
BattleUtil.RandomAction(f1, function ()
|
||||
local arr = BattleUtil.ChooseTarget(role, 10001)
|
||||
if arr[1] then
|
||||
|
@ -169,12 +187,15 @@ local passivityList = {
|
|||
|
||||
--受击后,[a]的概率,回复自身的[b]*[c]的血量
|
||||
--a[float],b[属性],c[float]
|
||||
[8] = function(role, args)
|
||||
[8] = function(role, args,id,judge)
|
||||
local f1 = args[1]
|
||||
local pro = args[2]
|
||||
local f2 = args[3]
|
||||
|
||||
local OnBeHit = function(treatingFunc)
|
||||
local OnBeHit = function(atkRole,damage, bCrit, finalDmg, damageType,skill)
|
||||
if skill and not skill.isTriggerJudge and judge==1 then
|
||||
return
|
||||
end
|
||||
BattleUtil.RandomAction(f1, function ()
|
||||
local val = floor(BattleUtil.FP_Mul(f2, role:GetRoleData(BattlePropList[pro])))
|
||||
BattleUtil.CalTreat(role, role, val)
|
||||
|
@ -185,13 +206,16 @@ local passivityList = {
|
|||
|
||||
--受击后,[a]对攻击者造成的攻击*[c]的持续伤害,持续[d]秒。
|
||||
--a[float],c[float],d[int]
|
||||
[9] = function(role, args)
|
||||
[9] = function(role, args,id,judge)
|
||||
local f1 = args[1]
|
||||
local f2 = args[2]
|
||||
local f3 = args[3]
|
||||
|
||||
local triggerUid = {}
|
||||
local OnBeHit = function(atkRole)
|
||||
local OnBeHit = function(atkRole,damage, bCrit, finalDmg, damageType,skill)
|
||||
if skill and not skill.isTriggerJudge and judge==1 then
|
||||
return
|
||||
end
|
||||
if atkRole.isTeam then
|
||||
return
|
||||
end
|
||||
|
@ -211,14 +235,17 @@ local passivityList = {
|
|||
|
||||
--受击时[e],[a]的概率将[b]*[c]算作[d]计算
|
||||
--a[float],b[属性],c[float],d[属性],e[伤害类型]
|
||||
[10] = function(role, args)
|
||||
[10] = function(role, args,id,judge)
|
||||
local f1 = args[1]
|
||||
local pro1 = args[2]
|
||||
local f2 = args[3]
|
||||
local pro2 = args[4]
|
||||
local dt = args[5]
|
||||
|
||||
local OnRoleBeDamagedBefore = function(atkRole, func, damageType)
|
||||
local OnRoleBeDamagedBefore = function(atkRole, factorFunc, damageType, skill)
|
||||
if skill and not skill.isTriggerJudge and judge==1 then
|
||||
return
|
||||
end
|
||||
if damageType == dt then
|
||||
BattleUtil.RandomAction(f1, function ()
|
||||
role:AddPropertyTransfer(BattlePropList[pro1], f2, BattlePropList[pro2], 2, BattleLogic.GameDeltaTime)
|
||||
|
@ -230,12 +257,15 @@ local passivityList = {
|
|||
|
||||
--受击时,有[a]的概率抵消[b]*[c]的攻击。
|
||||
--a[float],b[属性],c[float]
|
||||
[11] = function(role, args)
|
||||
[11] = function(role, args,id,judge)
|
||||
local f1 = args[1]
|
||||
local pro = args[2]
|
||||
local f2 = args[3]
|
||||
|
||||
local OnPassiveDamaging = function(damagingFunc, atkRole, damage)
|
||||
local OnPassiveDamaging = function(damagingFunc, atkRole, damage,skill)
|
||||
if skill and not skill.isTriggerJudge and judge==1 then
|
||||
return
|
||||
end
|
||||
BattleUtil.RandomAction(f1, function ()
|
||||
damagingFunc(floor(BattleUtil.FP_Mul(f2, role:GetRoleData(BattlePropList[pro]))))
|
||||
end)
|
||||
|
@ -245,13 +275,16 @@ local passivityList = {
|
|||
|
||||
--受击后,有[a]的概率对敌方全体造成攻击*[c]的[d]伤害
|
||||
--a[float],c[float],d[伤害类型]
|
||||
[12] = function(role, args)
|
||||
[12] = function(role, args,id,judge)
|
||||
local f1 = args[1]
|
||||
local f2 = args[2]
|
||||
local dt = args[3]
|
||||
|
||||
local lastTrigger = 0
|
||||
local OnBeHit = function(atkRole)
|
||||
local OnBeHit = function(atkRole,damage, aaa, finalDmg, bbb, skill)
|
||||
if skill and not skill.isTriggerJudge and judge==1 then
|
||||
return
|
||||
end
|
||||
if atkRole.isTeam then
|
||||
return
|
||||
end
|
||||
|
@ -272,13 +305,16 @@ local passivityList = {
|
|||
|
||||
--受击后,有[a]的概率对随机1人造成[b]*[c]的真实伤害。
|
||||
--a[float],b[属性],c[float]
|
||||
[13] = function(role, args)
|
||||
[13] = function(role, args,id,judge)
|
||||
local f1 = args[1]
|
||||
local pro = args[2]
|
||||
local f2 = args[3]
|
||||
|
||||
local lastTrigger = 0
|
||||
local OnBeHit = function(atkRole)
|
||||
local OnBeHit = function(atkRole,damage, bCrit, finalDmg, damageType,skill)
|
||||
if skill and not skill.isTriggerJudge and judge==1 then
|
||||
return
|
||||
end
|
||||
if atkRole.isTeam then
|
||||
return
|
||||
end
|
||||
|
@ -300,7 +336,7 @@ local passivityList = {
|
|||
|
||||
--受击后[f],[a]的概率将[b]*[c]算作[d]计算,持续[e]秒。
|
||||
--a[float],b[属性],c[float],d[属性],e[int],f[伤害类型]
|
||||
[14] = function(role, args)
|
||||
[14] = function(role, args,id,judge)
|
||||
local f1 = args[1]
|
||||
local pro1 = args[2]
|
||||
local f2 = args[3]
|
||||
|
@ -308,7 +344,10 @@ local passivityList = {
|
|||
local f3 = args[5]
|
||||
local dt = args[6]
|
||||
|
||||
local OnBeHit = function(atkRole, damage, bCrit, finalDmg, damageType)
|
||||
local OnBeHit = function(atkRole,damage, bCrit, finalDmg, damageType,skill)
|
||||
if skill and not skill.isTriggerJudge and judge==1 then
|
||||
return
|
||||
end
|
||||
if damageType == dt then
|
||||
BattleUtil.RandomAction(f1, function ()
|
||||
role:AddPropertyTransfer(BattlePropList[pro1], f2, BattlePropList[pro2], 2, f3)
|
||||
|
@ -456,13 +495,16 @@ local passivityList = {
|
|||
|
||||
--血量低于[a]时,[b]概率触发控制免疫,持续[c]秒。每场战斗只能触发1次。
|
||||
--a[float],b[float],c[int]
|
||||
[22] = function(role, args)
|
||||
[22] = function(role, args,id,judge)
|
||||
local f1 = args[1]
|
||||
local f2 = args[2]
|
||||
local f3 = args[3]
|
||||
|
||||
local triggerCount = 0
|
||||
local OnBeHit = function(atkRole)
|
||||
local OnBeHit = function(atkRole,damage, bCrit, finalDmg, damageType,skill)
|
||||
if skill and not skill.isTriggerJudge and judge==1 then
|
||||
return
|
||||
end
|
||||
if BattleUtil.GetHPPencent(role) < f1 then
|
||||
if triggerCount < 1 then
|
||||
BattleUtil.RandomAction(f2, function ()
|
||||
|
@ -746,11 +788,14 @@ local passivityList = {
|
|||
|
||||
--被指定[a]造成伤害时,回复[b]生命
|
||||
--a[职业],b[int]
|
||||
[40] = function(role, args)
|
||||
[40] = function(role, args,id,judge)
|
||||
local i1 = args[1]
|
||||
local f1 = args[2]
|
||||
|
||||
local OnBeHit = function(atkRole)
|
||||
local OnBeHit = function(atkRole,damage, bCrit, finalDmg, damageType,skill)
|
||||
if skill and not skill.isTriggerJudge and judge==1 then
|
||||
return
|
||||
end
|
||||
if atkRole.isTeam then
|
||||
return
|
||||
end
|
||||
|
@ -991,7 +1036,7 @@ local passivityList = {
|
|||
[54] = function(role, args)
|
||||
local f1 = args[1]
|
||||
local f2 = args[2]
|
||||
local OnBeHit = function(atkRole, damage, bCrit, finalDmg, damageType)
|
||||
local OnBeHit = function(atkRole, damage, bCrit, finalDmg, damageType,skill)
|
||||
if atkRole.isTeam then
|
||||
return
|
||||
end
|
||||
|
@ -1155,7 +1200,7 @@ local passivityList = {
|
|||
local f2 = args[2]
|
||||
local f3 = args[3]
|
||||
|
||||
local OnBeHit = function(atkRole, damage, bCrit, finalDmg, damageType)
|
||||
local OnBeHit = function(atkRole, damage, bCrit, finalDmg, damageType,skill)
|
||||
if not bCrit then
|
||||
local ar1 = BattleUtil.FP_Mul(role:GetRoleData(RoleDataName.Attack), f3)
|
||||
local ar2 = BattleUtil.FP_Mul(damage, f1)
|
||||
|
@ -1275,7 +1320,7 @@ local passivityList = {
|
|||
local f2 = args[3]
|
||||
local f3 = args[4]
|
||||
|
||||
local OnBeHit = function(atkRole, damage, bCrit, finalDmg, damageType)
|
||||
local OnBeHit = function(atkRole, damage, bCrit, finalDmg, damageType,skill)
|
||||
BattleUtil.RandomAction(f1, function ()
|
||||
local val = floor(BattleUtil.FP_Mul(role:GetRoleData(BattlePropList[pro1]), f2))
|
||||
role:AddBuff(Buff.Create(role, BuffName.Shield, f3, ShieldTypeName.NormalReduce, val, 0))
|
||||
|
@ -1333,7 +1378,7 @@ local passivityList = {
|
|||
local dt = args[3]
|
||||
|
||||
local lastTrigger = 0
|
||||
local OnBeHit = function(atkRole, damage, bCrit, finalDmg, damageType)
|
||||
local OnBeHit = function(atkRole, damage, bCrit, finalDmg, damageType,skill)
|
||||
if atkRole.isTeam then
|
||||
return
|
||||
end
|
||||
|
@ -1545,12 +1590,12 @@ local passivityList = {
|
|||
end
|
||||
end
|
||||
local OnSkillCast = function(skill)
|
||||
if skill.type == BattleSkillType.Special then
|
||||
if skill.type == BattleSkillType.Special or skill.type==BattleSkillType.Extra then
|
||||
role.Event:AddEvent(BattleEventName.PassiveDamaging, passivityDamaging)
|
||||
end
|
||||
end
|
||||
local OnSkillCastEnd = function(skill)
|
||||
if skill.type == BattleSkillType.Special then
|
||||
if skill.type == BattleSkillType.Special or skill.type==BattleSkillType.Extra then
|
||||
role.Event:RemoveEvent(BattleEventName.PassiveDamaging, passivityDamaging)
|
||||
end
|
||||
end
|
||||
|
@ -1848,7 +1893,7 @@ local passivityList = {
|
|||
local pro = args[2]
|
||||
local i1 = args[3]
|
||||
|
||||
local onBeHit = function(caster, damage)
|
||||
local onBeHit = function(caster,damage, bCrit, finalDmg, damageType,skill)
|
||||
local list = RoleManager.Query(function(v) return v.camp == role.camp end)
|
||||
list = BattleUtil.SortByProp(list, BattlePropList[pro], 1)
|
||||
for i = 1, i1 do
|
||||
|
@ -2142,7 +2187,7 @@ local passivityList = {
|
|||
[120] = function(role, args)
|
||||
local f1 = args[1]
|
||||
|
||||
local onBeHit = function(caster, damage)
|
||||
local onBeHit = function(caster,damage, bCrit, finalDmg, damageType,skill)
|
||||
local list = RoleManager.Query(function(v) return v.camp == role.camp end)
|
||||
for i = 1, #list do
|
||||
local r = list[i]
|
||||
|
@ -2807,7 +2852,7 @@ local passivityList = {
|
|||
local ct = args[4]
|
||||
|
||||
local attor = {}
|
||||
local onRoleBeHit = function(caster)
|
||||
local onRoleBeHit = function(caster,damage, bCrit, finalDmg, damageType,skill)
|
||||
if not attor[caster.position] then
|
||||
attor[caster.position] = 1
|
||||
end
|
||||
|
@ -6254,7 +6299,6 @@ local passivityList = {
|
|||
role.Event:AddEvent(BattleEventName.SkillCastEnd,onSkillCastEnd)
|
||||
end,
|
||||
|
||||
--
|
||||
--技能追加的额外技能额外造成目标[a][b]%的伤害。
|
||||
--a[int 属性id] b[float]
|
||||
[301]=function(role,args,id,judge)
|
||||
|
@ -6280,6 +6324,49 @@ local passivityList = {
|
|||
role.Event:AddEvent(BattleEventName.PassiveDamaging, onPassiveDamaging)
|
||||
end,
|
||||
|
||||
--魂印改变[a]伤害[b]% ,额外造成生命百分比伤害[c]改变[d]%(只作用于主动技能效果126)
|
||||
--a[改变类型]b[float] c[改变类型] d[int] e[改变类型] f[flaot]
|
||||
[302]=function(role, args,id,judge)
|
||||
local ct = args[1]
|
||||
local f1 = args[2]
|
||||
local ct2 = args[3]
|
||||
local f2 = args[4]
|
||||
local onSkillEffectBefore = function(skill, e, func)
|
||||
if skill.type == BattleSkillType.Special or skill.type==BattleSkillType.Extra then
|
||||
if e.type == 126 then -- 当前只对技能效果126生效
|
||||
local factor = BattleUtil.ErrorCorrection(BattleUtil.CountValue(e.args[5], f1, ct))
|
||||
e.args[5] = factor
|
||||
if ct2 and f2 then
|
||||
e.args[8] = BattleUtil.ErrorCorrection(BattleUtil.CountValue(e.args[8], f2, ct2))
|
||||
end
|
||||
if func then func(e) end
|
||||
end
|
||||
end
|
||||
end
|
||||
role.Event:AddEvent(BattleEventName.SkillEffectBefore, onSkillEffectBefore)
|
||||
end,
|
||||
-- 敌方死亡[a]人自身[b]就[c]改变[d]%
|
||||
-- a[int] b[int 属性id] c[int 改变类型] d[float]
|
||||
[303] = function(role,args)
|
||||
local i1 = args[1]
|
||||
local p1 = args[2]
|
||||
local ct = args[3]
|
||||
local v1 = args[4]
|
||||
local deadNum = 0
|
||||
-- 释放技能后
|
||||
local OnDead = function(deadRole,killRole,skill)
|
||||
if deadRole.camp == (role.camp + 1)%2 then
|
||||
deadNum = deadNum + 1
|
||||
if deadNum >= i1 then
|
||||
deadNum = 0
|
||||
local buff = Buff.Create(role, BuffName.PropertyChange, 0, BattlePropList[p1], v1,ct)
|
||||
role:AddBuff(buff)
|
||||
end
|
||||
end
|
||||
end
|
||||
BattleLogic.Event:AddEvent(BattleEventName.BattleRoleDead, OnDead)
|
||||
end,
|
||||
|
||||
|
||||
}
|
||||
return passivityList
|
|
@ -623,7 +623,7 @@ function BattleUtil.FinalDamage(skill, atkRole, defRole, damage, bCrit, damageTy
|
|||
defRole:SetDead()
|
||||
defRole.Event:DispatchEvent(BattleEventName.RoleDead, atkRole)
|
||||
atkRole.Event:DispatchEvent(BattleEventName.RoleKill, defRole)
|
||||
BattleLogic.Event:DispatchEvent(BattleEventName.BattleRoleDead, defRole, atkRole)
|
||||
BattleLogic.Event:DispatchEvent(BattleEventName.BattleRoleDead, defRole, atkRole,skill)
|
||||
end
|
||||
|
||||
atkRole.Event:DispatchEvent(BattleEventName.RoleDamage, defRole, damage, bCrit, finalDmg, damageType, dotType, skill)
|
||||
|
|
Loading…
Reference in New Issue