|
|
@@ -7,6 +7,8 @@ local CombatDefine = require("combat.CombatDefine")
|
|
|
local RoleDefine = require("role.RoleDefine")
|
|
|
local CombatBuff = require("combat.CombatBuff")
|
|
|
local SkillExcel = require("excel.skill").skill
|
|
|
+
|
|
|
+
|
|
|
local targets = {}
|
|
|
local handler = {} --选择策略
|
|
|
--对象选择器begin
|
|
|
@@ -364,8 +366,14 @@ local function handler7(attacker,targetMode)
|
|
|
end
|
|
|
end
|
|
|
table.sort(targetList,function(a,b)
|
|
|
+
|
|
|
local a_attr = CombatObj.getValue(a,attrID)
|
|
|
- local b_attr = CombatObj.getValue(b,attrID)
|
|
|
+ local b_attr = CombatObj.getValue(b,attrID)
|
|
|
+ -- 血量计算比较特殊, HPLimit * HPPercent
|
|
|
+ if attrID == RoleDefine then
|
|
|
+ a_attr = CombatObj.getHpMax(a)
|
|
|
+ b_attr = CombatObj.getHpMax(b)
|
|
|
+ end
|
|
|
local ret = a_attr < b_attr
|
|
|
if order ~= 0 then
|
|
|
ret = a_attr > b_attr
|