[战斗]======= 目标选择逻辑 生命百分比最低 不选有不灭的 显示层:死亡后怒气显示不清空 被动99 307 目标选择修改
parent
dec3a4d338
commit
3e36a537b3
|
@ -1741,7 +1741,7 @@ local passivityList = {
|
||||||
end
|
end
|
||||||
if skill.type == BattleSkillType.Special then
|
if skill.type == BattleSkillType.Special then
|
||||||
role.Event:RemoveEvent(BattleEventName.RoleHit, OnHit)
|
role.Event:RemoveEvent(BattleEventName.RoleHit, OnHit)
|
||||||
local arr = RoleManager.Query(function (r) return r.camp == role.camp and r.deadFilter end)
|
local arr = RoleManager.NoOrder(function (r) return r.camp == role.camp and r.deadFilter end)
|
||||||
BattleUtil.SortByHpFactor(arr, 1)
|
BattleUtil.SortByHpFactor(arr, 1)
|
||||||
-- 检测技能伤害<E4BCA4><E5AEB3><EFBFBD>疗加成
|
-- 检测技能伤害<E4BCA4><E5AEB3><EFBFBD>疗加成
|
||||||
local f = BattleUtil.CheckSkillDamageHeal(f1, role, arr[1])
|
local f = BattleUtil.CheckSkillDamageHeal(f1, role, arr[1])
|
||||||
|
@ -6998,7 +6998,7 @@ local passivityList = {
|
||||||
-- end
|
-- end
|
||||||
-- LogYellow("307 1")
|
-- LogYellow("307 1")
|
||||||
if skill and (skill.type==BattleSkillType.Special or skill.type== BattleSkillType.Extra or skill.type== BattleSkillType.Monster) then --技能造成的直接伤害
|
if skill and (skill.type==BattleSkillType.Special or skill.type== BattleSkillType.Extra or skill.type== BattleSkillType.Monster) then --技能造成的直接伤害
|
||||||
local list = RoleManager.Query(function(v) return v.camp == role.camp end)
|
local list = RoleManager.NoOrder(function(v) return v.camp == role.camp end)
|
||||||
BattleUtil.SortByHpFactor(list, 1)
|
BattleUtil.SortByHpFactor(list, 1)
|
||||||
-- LogYellow("307 2")
|
-- LogYellow("307 2")
|
||||||
if list[1] then
|
if list[1] then
|
||||||
|
|
|
@ -202,6 +202,16 @@ function BattleUtil.SortByHpFactorAndHp(arr, sort)
|
||||||
end)
|
end)
|
||||||
return arr
|
return arr
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--移除队列有不灭的单位
|
||||||
|
function BattleUtil.RemoveNoDeadRole(arr)
|
||||||
|
for i = 1, #arr do
|
||||||
|
local role=arr[i]
|
||||||
|
if BattleLogic.BuffMgr:HasBuff(role,BuffName.NoDead) then
|
||||||
|
table.removebyvalue(arr,role)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
--按怒气排序
|
--按怒气排序
|
||||||
function BattleUtil.SortByRage(arr, sort)
|
function BattleUtil.SortByRage(arr, sort)
|
||||||
BattleUtil.Sort(arr, function(a, b)
|
BattleUtil.Sort(arr, function(a, b)
|
||||||
|
@ -352,6 +362,8 @@ function BattleUtil.ChooseTarget(role, chooseId)
|
||||||
BattleUtil.SortByProp(arr, RoleDataName.Hp, sort)
|
BattleUtil.SortByProp(arr, RoleDataName.Hp, sort)
|
||||||
elseif chooseWeight == 2 then -- 血量百分比
|
elseif chooseWeight == 2 then -- 血量百分比
|
||||||
BattleUtil.SortByHpFactor(arr, sort)
|
BattleUtil.SortByHpFactor(arr, sort)
|
||||||
|
--选血量百分比最低的 不选择有不灭的,如果伤害要选有不灭的 需处理
|
||||||
|
BattleUtil.RemoveNoDeadRole(arr)
|
||||||
elseif chooseWeight == 3 then -- 攻击力
|
elseif chooseWeight == 3 then -- 攻击力
|
||||||
BattleUtil.SortByProp(arr, RoleDataName.Attack, sort)
|
BattleUtil.SortByProp(arr, RoleDataName.Attack, sort)
|
||||||
elseif chooseWeight == 4 then -- 防御
|
elseif chooseWeight == 4 then -- 防御
|
||||||
|
|
|
@ -521,7 +521,8 @@ function EnemyView:OnDead()
|
||||||
end
|
end
|
||||||
self.hpSlider.fillAmount = 0
|
self.hpSlider.fillAmount = 0
|
||||||
self.hpPassSlider.fillAmount = 0
|
self.hpPassSlider.fillAmount = 0
|
||||||
self.rageSlider.fillAmount = 0
|
--死亡后不把怒气条显示清空,处理触发不灭怒气不足四点 怒气条清空 2021/09/01
|
||||||
|
--self.rageSlider.fillAmount = 0
|
||||||
self.rageText.text = ""
|
self.rageText.text = ""
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -563,7 +563,8 @@ function PlayerView:OnDead()
|
||||||
end
|
end
|
||||||
self.hpSlider.fillAmount = 0
|
self.hpSlider.fillAmount = 0
|
||||||
self.hpPassSlider.fillAmount = 0
|
self.hpPassSlider.fillAmount = 0
|
||||||
self.rageSlider.fillAmount = 0
|
--死亡后不把怒气条显示清空,处理触发不灭怒气不足四点 怒气条清空 2021/09/01
|
||||||
|
--self.rageSlider.fillAmount = 0
|
||||||
self.rageText.text = ""
|
self.rageText.text = ""
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue