【战斗】回滚27号版本不需要的内容

dev_chengFeng
gaoxin 2021-01-22 16:19:13 +08:00
parent f44dcc20b7
commit 5dcf4d8040
5 changed files with 68 additions and 318 deletions

View File

@ -2353,41 +2353,7 @@ 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.FinalDamage(skill,caster, target,damage)
end
end
end)
end,
}
return effectList

View File

@ -45,15 +45,12 @@ end
local passivityList = {
--发动技能时,[a]的概率将[b]*[c]算作[d]计算
--a[float],b[属性],c[float],d[属性]
[1] = function(role, args,id,judge)
[1] = function(role, args)
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
@ -67,15 +64,12 @@ local passivityList = {
--发动技能后,[a]的概率对敌方随机1名施加攻击*[c]的[d]伤害。
--a[float],c[float],d[伤害类型]
[2] = function(role, args,id,judge)
[2] = function(role, args)
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
@ -88,15 +82,12 @@ local passivityList = {
--发动技能后,[c]使仇恨目标受到治疗效果降低[a],持续[b]
--a[float],b[int],c[float]
[3] = function(role, args,id,judge)
[3] = function(role, args)
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
@ -109,16 +100,13 @@ local passivityList = {
--发动技能后,[d]改变自身[a]属性[b],持续[c]秒
--a[属性],b[float],c[int],d[改变类型]
[4] = function(role, args,id,judge)
[4] = function(role, args)
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)
@ -126,16 +114,13 @@ local passivityList = {
--发动技能后,[a]的概率回复攻击最高的1人的[b]*[c]血量,持续[d]秒。
--a[float],b[属性],c[float],d[int]
[5] = function(role, args,id,judge)
[5] = function(role, args)
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
@ -149,7 +134,7 @@ local passivityList = {
--发动技能后,[a]的概率提升随机角色的[b]*[c]的[d],持续[e]秒。
--a[float],b[属性],c[float],d[属性],e[int]
[6] = function(role, args,id,judge)
[6] = function(role, args)
local f1 = args[1]
local pro1 = args[2]
local f2 = args[3]
@ -157,9 +142,6 @@ 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
@ -187,15 +169,12 @@ local passivityList = {
--受击后,[a]的概率,回复自身的[b]*[c]的血量
--a[float],b[属性],c[float]
[8] = function(role, args,id,judge)
[8] = function(role, args)
local f1 = args[1]
local pro = args[2]
local f2 = args[3]
local OnBeHit = function(atkRole,damage, bCrit, finalDmg, damageType,skill)
if skill and not skill.isTriggerJudge and judge==1 then
return
end
local OnBeHit = function(treatingFunc)
BattleUtil.RandomAction(f1, function ()
local val = floor(BattleUtil.FP_Mul(f2, role:GetRoleData(BattlePropList[pro])))
BattleUtil.CalTreat(role, role, val)
@ -206,16 +185,13 @@ local passivityList = {
--受击后,[a]对攻击者造成的攻击*[c]的持续伤害,持续[d]秒。
--a[float],c[float],d[int]
[9] = function(role, args,id,judge)
[9] = function(role, args)
local f1 = args[1]
local f2 = args[2]
local f3 = args[3]
local triggerUid = {}
local OnBeHit = function(atkRole,damage, bCrit, finalDmg, damageType,skill)
if skill and not skill.isTriggerJudge and judge==1 then
return
end
local OnBeHit = function(atkRole)
if atkRole.isTeam then
return
end
@ -235,17 +211,14 @@ local passivityList = {
--受击时[e][a]的概率将[b]*[c]算作[d]计算
--a[float],b[属性],c[float],d[属性],e[伤害类型]
[10] = function(role, args,id,judge)
[10] = function(role, args)
local f1 = args[1]
local pro1 = args[2]
local f2 = args[3]
local pro2 = args[4]
local dt = args[5]
local OnRoleBeDamagedBefore = function(atkRole, factorFunc, damageType, skill)
if skill and not skill.isTriggerJudge and judge==1 then
return
end
local OnRoleBeDamagedBefore = function(atkRole, func, damageType)
if damageType == dt then
BattleUtil.RandomAction(f1, function ()
role:AddPropertyTransfer(BattlePropList[pro1], f2, BattlePropList[pro2], 2, BattleLogic.GameDeltaTime)
@ -257,15 +230,12 @@ local passivityList = {
--受击时,有[a]的概率抵消[b]*[c]的攻击。
--a[float],b[属性],c[float]
[11] = function(role, args,id,judge)
[11] = function(role, args)
local f1 = args[1]
local pro = args[2]
local f2 = args[3]
local OnPassiveDamaging = function(damagingFunc, atkRole, damage,skill)
if skill and not skill.isTriggerJudge and judge==1 then
return
end
local OnPassiveDamaging = function(damagingFunc, atkRole, damage)
BattleUtil.RandomAction(f1, function ()
damagingFunc(floor(BattleUtil.FP_Mul(f2, role:GetRoleData(BattlePropList[pro]))))
end)
@ -275,16 +245,13 @@ local passivityList = {
--受击后,有[a]的概率对敌方全体造成攻击*[c]的[d]伤害
--a[float],c[float],d[伤害类型]
[12] = function(role, args,id,judge)
[12] = function(role, args)
local f1 = args[1]
local f2 = args[2]
local dt = args[3]
local lastTrigger = 0
local OnBeHit = function(atkRole,damage, aaa, finalDmg, bbb, skill)
if skill and not skill.isTriggerJudge and judge==1 then
return
end
local OnBeHit = function(atkRole)
if atkRole.isTeam then
return
end
@ -305,16 +272,13 @@ local passivityList = {
--受击后,有[a]的概率对随机1人造成[b]*[c]的真实伤害。
--a[float],b[属性],c[float]
[13] = function(role, args,id,judge)
[13] = function(role, args)
local f1 = args[1]
local pro = args[2]
local f2 = args[3]
local lastTrigger = 0
local OnBeHit = function(atkRole,damage, bCrit, finalDmg, damageType,skill)
if skill and not skill.isTriggerJudge and judge==1 then
return
end
local OnBeHit = function(atkRole)
if atkRole.isTeam then
return
end
@ -336,7 +300,7 @@ local passivityList = {
--受击后[f][a]的概率将[b]*[c]算作[d]计算,持续[e]秒。
--a[float],b[属性],c[float],d[属性],e[int],f[伤害类型]
[14] = function(role, args,id,judge)
[14] = function(role, args)
local f1 = args[1]
local pro1 = args[2]
local f2 = args[3]
@ -344,10 +308,7 @@ local passivityList = {
local f3 = args[5]
local dt = args[6]
local OnBeHit = function(atkRole,damage, bCrit, finalDmg, damageType,skill)
if skill and not skill.isTriggerJudge and judge==1 then
return
end
local OnBeHit = function(atkRole, damage, bCrit, finalDmg, damageType)
if damageType == dt then
BattleUtil.RandomAction(f1, function ()
role:AddPropertyTransfer(BattlePropList[pro1], f2, BattlePropList[pro2], 2, f3)
@ -495,16 +456,13 @@ local passivityList = {
--血量低于[a]时,[b]概率触发控制免疫,持续[c]秒。每场战斗只能触发1次。
--a[float],b[float],c[int]
[22] = function(role, args,id,judge)
[22] = function(role, args)
local f1 = args[1]
local f2 = args[2]
local f3 = args[3]
local triggerCount = 0
local OnBeHit = function(atkRole,damage, bCrit, finalDmg, damageType,skill)
if skill and not skill.isTriggerJudge and judge==1 then
return
end
local OnBeHit = function(atkRole)
if BattleUtil.GetHPPencent(role) < f1 then
if triggerCount < 1 then
BattleUtil.RandomAction(f2, function ()
@ -788,14 +746,11 @@ local passivityList = {
--被指定[a]造成伤害时,回复[b]生命
--a[职业],b[int]
[40] = function(role, args,id,judge)
[40] = function(role, args)
local i1 = args[1]
local f1 = args[2]
local OnBeHit = function(atkRole,damage, bCrit, finalDmg, damageType,skill)
if skill and not skill.isTriggerJudge and judge==1 then
return
end
local OnBeHit = function(atkRole)
if atkRole.isTeam then
return
end
@ -1033,13 +988,10 @@ local passivityList = {
end,
--受击后,有[a]的概率对攻击者造成眩晕,持续[b]秒。
--a[float],b[int]
[54] = function(role, args,id,judge)
[54] = function(role, args)
local f1 = args[1]
local f2 = args[2]
local OnBeHit = function(atkRole, damage, bCrit, finalDmg, damageType,skill)
if skill and not skill.isTriggerJudge and judge==1 then
return
end
local OnBeHit = function(atkRole, damage, bCrit, finalDmg, damageType)
if atkRole.isTeam then
return
end
@ -1203,7 +1155,7 @@ local passivityList = {
local f2 = args[2]
local f3 = args[3]
local OnBeHit = function(atkRole, damage, bCrit, finalDmg, damageType,skill)
local OnBeHit = function(atkRole, damage, bCrit, finalDmg, damageType)
if not bCrit then
local ar1 = BattleUtil.FP_Mul(role:GetRoleData(RoleDataName.Attack), f3)
local ar2 = BattleUtil.FP_Mul(damage, f1)
@ -1323,7 +1275,7 @@ local passivityList = {
local f2 = args[3]
local f3 = args[4]
local OnBeHit = function(atkRole, damage, bCrit, finalDmg, damageType,skill)
local OnBeHit = function(atkRole, damage, bCrit, finalDmg, damageType)
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))
@ -1381,7 +1333,7 @@ local passivityList = {
local dt = args[3]
local lastTrigger = 0
local OnBeHit = function(atkRole, damage, bCrit, finalDmg, damageType,skill)
local OnBeHit = function(atkRole, damage, bCrit, finalDmg, damageType)
if atkRole.isTeam then
return
end
@ -1593,12 +1545,12 @@ local passivityList = {
end
end
local OnSkillCast = function(skill)
if skill.type == BattleSkillType.Special or skill.type==BattleSkillType.Extra then
if skill.type == BattleSkillType.Special then
role.Event:AddEvent(BattleEventName.PassiveDamaging, passivityDamaging)
end
end
local OnSkillCastEnd = function(skill)
if skill.type == BattleSkillType.Special or skill.type==BattleSkillType.Extra then
if skill.type == BattleSkillType.Special then
role.Event:RemoveEvent(BattleEventName.PassiveDamaging, passivityDamaging)
end
end
@ -1896,7 +1848,7 @@ local passivityList = {
local pro = args[2]
local i1 = args[3]
local onBeHit = function(caster,damage, bCrit, finalDmg, damageType,skill)
local onBeHit = function(caster, damage)
local list = RoleManager.Query(function(v) return v.camp == role.camp end)
list = BattleUtil.SortByProp(list, BattlePropList[pro], 1)
for i = 1, i1 do
@ -2190,7 +2142,7 @@ local passivityList = {
[120] = function(role, args)
local f1 = args[1]
local onBeHit = function(caster,damage, bCrit, finalDmg, damageType,skill)
local onBeHit = function(caster, damage)
local list = RoleManager.Query(function(v) return v.camp == role.camp end)
for i = 1, #list do
local r = list[i]
@ -2855,7 +2807,7 @@ local passivityList = {
local ct = args[4]
local attor = {}
local onRoleBeHit = function(caster,damage, bCrit, finalDmg, damageType,skill)
local onRoleBeHit = function(caster)
if not attor[caster.position] then
attor[caster.position] = 1
end
@ -3465,12 +3417,12 @@ local passivityList = {
end
local function onSkillCast(skill)
if skill.type == BattleSkillType.Special or skill.type==BattleSkillType.DeadSkill then
if skill.type == BattleSkillType.Special then
role.Event:AddEvent(BattleEventName.PassiveTreatingFactor, onPassiveTreatingFactor)
end
end
local function onSkillCastEnd(skill)
if skill.type == BattleSkillType.Special or skill.type==BattleSkillType.DeadSkill then
if skill.type == BattleSkillType.Special then
role.Event:RemoveEvent(BattleEventName.PassiveTreatingFactor, onPassiveTreatingFactor)
-- 对每个目标附加减伤盾
local targets = skill:GetDirectTargets()
@ -5250,9 +5202,6 @@ local passivityList = {
if skill and skill.type== BattleSkillType.ChaosNormal and judge==1 then
return
end
if not skill and judge==1 then
return
end
if target:IsDead() and not BattleUtil.CheckIsNoDead(target) and not role:IsDead() then
-- local target = RoleManager.GetAliveAggro(role)
--BattleUtil.CalDamage(nil, role, target, 1, f1)
@ -5377,7 +5326,7 @@ local passivityList = {
end
role.Event:AddEvent(BattleEventName.SkillCastEnd, OnRoleHit)
end,
-- 每释放[a]次技能,[b]增加[c]%,可叠加[d]次(d 填0为可叠加无数次)
-- 每释放[a]次技能,[b]增加[c]%,可叠加[d]次
-- a[int] b[int] c[float] d[int]
[262] = function(role, args)
local num = args[1]
@ -5391,7 +5340,7 @@ local passivityList = {
if skill and skill.owner==role and (skill.type == BattleSkillType.Special or skill.type == BattleSkillType.Extra ) then
releaseNum=releaseNum+1
--如果能被限制次数整除 and 小于最大叠加次数
if releaseNum>0 and releaseNum%num==0 and (addNum<time or time==0 )then
if releaseNum>0 and releaseNum%num==0 and addNum<time then
role.data:AddValue(BattlePropList[pro],val)
addNum=addNum+1
end
@ -5949,7 +5898,34 @@ local passivityList = {
end
role.Event:AddEvent(BattleEventName.RoleBeHit,onRoleBeHit)
end,
-- 直接伤害击杀目标释放对[a][b]%[c]技能伤害 神女庇佑魂印效果 播放佩戴者的技能动作和特效
-- a[int 目标选择系数] b[flaot] c[int 伤害类型]
[292] = function(role, args,id,judge)
local targets = args[1]
local f1 = args[2]
local f2=args[3]
local onRoleHit = function(target, damage, bCrit, finalDmg, damageType, skill)
--如果是技能并且这个被动已经被触发过 return
if skill and BattleUtil.ChecklistIsContainValue(skill.triggerPassivityId,id) then
return
end
--处理伏虎觉醒十星附加的额外技能,额外技能不触发这个特性 2020/11/17 wangzhenxing
if skill and skill.type== BattleSkillType.Extra and skill.owner.roleId==10015 and judge==1 then
return
end
if target:IsDead() and not BattleUtil.CheckIsNoDead(target) and not role:IsDead() then
--role:InsertExtraSkill(f1,f2)
local effectData={role.superSkill[1],role.superSkill[2],role.superSkill[3],role.superSkill[4],{targets,{1,f1,f2}}}
SkillManager.InsertSkill(role, effectData,BattleSkillType.Extra, nil, true, false)
if skill then
table.insert(skill.triggerPassivityId,id)
end
end
end
role.Event:AddEvent(BattleEventName.RoleHit, onRoleHit)
end,
--技能追加的普攻额外造成目标[a][b]%的伤害。技能每成功[c]1个目标额外造成[d]%生命上限的伤害
--a[int 属性id] b[float] c[控制状态] d[flaot]
[285]=function(role,args)
@ -6302,91 +6278,6 @@ local passivityList = {
role.Event:AddEvent(BattleEventName.SkillCastEnd,onSkillCastEnd)
end,
--技能追加的额外技能额外造成目标[a][b]%的伤害。
--a[int 属性id] b[float]
[301]=function(role,args,id,judge)
local f1 = args[1]
local dt = args[2]
-- 直接伤害后
local onPassiveDamaging = function(func, defRole, damage,skill)
if skill and not skill.isTriggerJudge and judge==1 then
return
end
--如果是boss 并且额外伤害是根据最大生命则返回
local isBoss=BattleUtil.CheckIsBoss(defRole)
if isBoss and (f1==12 or f1==13) then
return
end
--观音,这个被动只有额外技能才能触发 by王振兴 2021/1/21 17:48
if skill and skill.type == BattleSkillType.Extra then
local val = -floor(BattleUtil.FP_Mul(dt, defRole:GetRoleData(BattlePropList[f1])))
if func then
func(val)
end
end
end
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,
-- 战斗第[a]回合,改变[b] 自身属性[c] [d]%,持续[e]回合
-- a[int] b[int 改变类型] c[int 属性id] d[float/int] d[int]
[304] = function(role, args,id,judge)
local i1 = args[1]
local ct = args[2]
local p1 = args[3]
local v1 = args[4]
local round = args[5]
BattleLogic.Event:AddEvent(BattleEventName.BattleRoundChange, function(curRound)
-- 第i1回合开始
if curRound == i1 then
role:AddBuff(Buff.Create(role, BuffName.PropertyChange,round, BattlePropList[p1],v1, ct))
end
end)
end,
}
return passivityList

View File

@ -275,7 +275,6 @@ skill2={1132051,0.8,0,1,{200212,{1,0.89,2}}},
skill3={1151111,0.05,0,1,{220000,{1,0.86,2}}},
skill4={10000351,0.3,0.5,4,{400000,{1,1.75,1}}},
skill5={12011001,0.3,0.5,4,{400000,{1,2.2,1}}},
skill6={100923,0.15,1.5,1,{260004,{126,0.48,1,4,1,0,4,12,0}}},
}

View File

@ -69,98 +69,6 @@ function BattleUtil.ChooseCol(arr, col)
end)
return tempArr
end
-- 选择两列
function BattleUtil.ChooseTowCol(arr)
local teamArr={}
--第一列
local oneArr = {}
for _, role in ipairs(arr) do
if role.position % 3 == 1 then
table.insert(oneArr, role)
end
end
local one=#oneArr
--第二列
local twoArr = {}
for _, role in ipairs(arr) do
if role.position % 3 == 2 then
table.insert(twoArr, role)
end
end
local two=#twoArr
--第三列
local threeArr = {}
for _, role in ipairs(arr) do
if role.position % 3 == 0 then
table.insert(threeArr, role)
end
end
local three=#threeArr
--如果每列人数相同,就选前两列
if one==two and two==three then
for key, value in pairs(oneArr) do
table.insert(teamArr,value)
end
for key, value in pairs(twoArr) do
table.insert(teamArr,value)
end
else
--如果第一列数量>第二列数量就把第一列选入
if one>two then
if one>0 then
for key, value in pairs(oneArr) do
table.insert(teamArr,value)
end
end
--如果第二列数量>第三列数量就把第二列选入
if two>three then
if two>0 then
for key, value in pairs(twoArr) do
table.insert(teamArr,value)
end
end
else
--如果第三列数量>第二列数量就把第三列选入
if three>0 then
for key, value in pairs(threeArr) do
table.insert(teamArr,value)
end
end
end
else
--如果第二列数量>第一列数量就把第二列选入
if two>0 then
for key, value in pairs(twoArr) do
table.insert(teamArr,value)
end
end
--如果第一列数量>第三列数量就把第一列选入
if one>=three then
if one>0 then
for key, value in pairs(oneArr) do
table.insert(teamArr,value)
end
end
else
--如果第三列数量>第一列数量就把第三列选入
if three>0 then
for key, value in pairs(threeArr) do
table.insert(teamArr,value)
end
end
end
end
end
table.sort(teamArr, function(a, b)
return a.position < b.position
end)
return teamArr
end
-- 根据属性排序
function BattleUtil.SortByProp(arr, prop, sort)
BattleUtil.Sort(arr, function(a, b)
@ -339,9 +247,6 @@ function BattleUtil.ChooseTarget(role, chooseId)
end
end
arr = tempArr
elseif chooseLimit == 6 then --两纵排单位
local tempArr=BattleUtil.ChooseTowCol(arr)
arr=tempArr
end
-- 选择条件
@ -611,8 +516,6 @@ function BattleUtil.GetExtraSkillbyId(id)
return ExtraReleaseSkill.skill4
elseif id==5 then
return ExtraReleaseSkill.skill5
elseif id==6 then
return ExtraReleaseSkill.skill6
end
end
@ -628,7 +531,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,skill)
BattleLogic.Event:DispatchEvent(BattleEventName.BattleRoleDead, defRole, atkRole)
end
atkRole.Event:DispatchEvent(BattleEventName.RoleDamage, defRole, damage, bCrit, finalDmg, damageType, dotType, skill)

View File

@ -557,15 +557,6 @@ function RoleLogic:SetRelive(hpf, caster)
self.reliveHPF = hpf or 1
self.reliveCaster = caster
RoleManager.AddReliveRole(self)
-- local maxHp = self.data:GetData(RoleDataName.MaxHp)
-- local reHp = floor(self.reliveHPF * maxHp)
-- self.data:SetValue(RoleDataName.Hp, reHp)
-- -- 发送复活事件
-- --self.Event:DispatchEvent(BattleEventName.RoleRelive, self)
-- --BattleLogic.Event:DispatchEvent(BattleEventName.RoleRelive, self)
-- -- 复活的血量算做加血
-- BattleLogic.Event:DispatchEvent(BattleEventName.RecordTreat, self.reliveCaster or self, self, reHp)
-- return true
end
return false
end