[战斗]======= 目标选择逻辑 生命百分比最低 不选有不灭的 显示层:死亡后怒气显示不清空 被动99 307 目标选择修改
parent
dec3a4d338
commit
3e36a537b3
|
@ -1741,7 +1741,7 @@ local passivityList = {
|
|||
end
|
||||
if skill.type == BattleSkillType.Special then
|
||||
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)
|
||||
-- 检测技能伤害<E4BCA4><E5AEB3><EFBFBD>疗加成
|
||||
local f = BattleUtil.CheckSkillDamageHeal(f1, role, arr[1])
|
||||
|
@ -6998,7 +6998,7 @@ local passivityList = {
|
|||
-- end
|
||||
-- LogYellow("307 1")
|
||||
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)
|
||||
-- LogYellow("307 2")
|
||||
if list[1] then
|
||||
|
|
|
@ -202,6 +202,16 @@ function BattleUtil.SortByHpFactorAndHp(arr, sort)
|
|||
end)
|
||||
return arr
|
||||
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)
|
||||
BattleUtil.Sort(arr, function(a, b)
|
||||
|
@ -352,6 +362,8 @@ function BattleUtil.ChooseTarget(role, chooseId)
|
|||
BattleUtil.SortByProp(arr, RoleDataName.Hp, sort)
|
||||
elseif chooseWeight == 2 then -- 血量百分比
|
||||
BattleUtil.SortByHpFactor(arr, sort)
|
||||
--选血量百分比最低的 不选择有不灭的,如果伤害要选有不灭的 需处理
|
||||
BattleUtil.RemoveNoDeadRole(arr)
|
||||
elseif chooseWeight == 3 then -- 攻击力
|
||||
BattleUtil.SortByProp(arr, RoleDataName.Attack, sort)
|
||||
elseif chooseWeight == 4 then -- 防御
|
||||
|
|
|
@ -521,7 +521,8 @@ function EnemyView:OnDead()
|
|||
end
|
||||
self.hpSlider.fillAmount = 0
|
||||
self.hpPassSlider.fillAmount = 0
|
||||
self.rageSlider.fillAmount = 0
|
||||
--死亡后不把怒气条显示清空,处理触发不灭怒气不足四点 怒气条清空 2021/09/01
|
||||
--self.rageSlider.fillAmount = 0
|
||||
self.rageText.text = ""
|
||||
end
|
||||
|
||||
|
|
|
@ -563,7 +563,8 @@ function PlayerView:OnDead()
|
|||
end
|
||||
self.hpSlider.fillAmount = 0
|
||||
self.hpPassSlider.fillAmount = 0
|
||||
self.rageSlider.fillAmount = 0
|
||||
--死亡后不把怒气条显示清空,处理触发不灭怒气不足四点 怒气条清空 2021/09/01
|
||||
--self.rageSlider.fillAmount = 0
|
||||
self.rageText.text = ""
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue