【战斗】 角色查找逻辑添加 排除拥有不灭的单位 和 没有不灭的无序列表 103效果改成治疗随机多个单位 276被动 改为给随机英雄加
parent
ce8c206717
commit
30f953f6de
|
@ -1976,15 +1976,16 @@ local effectList = {
|
|||
caster.Event:DispatchEvent(BattleEventName.RoleViewBullet, skill, target)
|
||||
BattleLogic.WaitForTrigger(interval, function ()
|
||||
local OnBeHit = function(atkRole, damage, bCrit, finalDmg, damageType)
|
||||
local arr = RoleManager.Query(function (r) return r.camp == caster.camp end)
|
||||
local arr = RoleManager.NoOrder(function (r) return r.camp == caster.camp end,false,true)
|
||||
BattleUtil.SortByHpFactor(arr, 1)
|
||||
-- 检测技能伤害治疗加成
|
||||
f2 = BattleUtil.CheckSkillDamageHeal(f2, caster, arr[1])
|
||||
-- 检测技能伤害治疗加成
|
||||
-- 治疗血量最低队友实际伤害的f2%
|
||||
--之前是finaldag 改成 damage
|
||||
for i = 1, LengthOfTable(arr) do
|
||||
if i<=num then
|
||||
f2 = BattleUtil.CheckSkillDamageHeal(f2, caster, arr[i])
|
||||
BattleUtil.ApplyTreat(caster, arr[i], floor(damage*f2))
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -5638,7 +5638,7 @@ local passivityList = {
|
|||
-- 释放技能后
|
||||
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)
|
||||
local list= RoleManager.NoOrder(function(v) return v.camp == role.camp and v.element==ele end,true)
|
||||
if not list or LengthOfTable(list)==0 then
|
||||
return
|
||||
end
|
||||
|
|
|
@ -154,7 +154,38 @@ function RoleManager.Query(func, inCludeDeadRole)
|
|||
end)
|
||||
return list
|
||||
end
|
||||
|
||||
-- 查找角色(不包含死亡和拥有不灭的) 2020/11/28 王振兴
|
||||
function RoleManager.QueryNoDead(func)
|
||||
local list = {}
|
||||
local index = 1
|
||||
if func then
|
||||
for pos, v in pairs(PosList) do
|
||||
if func(v) and not v:IsRealDead() and v.deadFilter then
|
||||
list[index] = v
|
||||
index = index + 1
|
||||
end
|
||||
end
|
||||
end
|
||||
table.sort(list, function(a, b)
|
||||
return a.position < b.position
|
||||
end)
|
||||
return list
|
||||
end
|
||||
-- 查找角色(无排序,无死亡单位,无不灭) 2020/11/28 王振兴
|
||||
function RoleManager.NoOrder(func)
|
||||
local list = {}
|
||||
local index = 1
|
||||
if func then
|
||||
for pos, v in pairs(PosList) do
|
||||
if func(v) and not v:IsRealDead() and v.deadFilter then
|
||||
list[index] = v
|
||||
index = index + 1
|
||||
end
|
||||
end
|
||||
end
|
||||
BattleUtil.RandomList(list)
|
||||
return list
|
||||
end
|
||||
|
||||
--对位规则: 1敌方相同对位 2若死亡或不存在,选取相邻阵位最近且阵位索引最小的
|
||||
function this.GetAggro(role)
|
||||
|
|
Loading…
Reference in New Issue