【无尽副本】偶现卡死尝试修改
parent
dfafed683d
commit
74cec8e7b4
|
@ -599,24 +599,26 @@ function this.RefreshFormationProListVal(proId, changeType, _val)
|
|||
-- 获取当前值
|
||||
local value = this.formationList[i].allProVal[_proType]
|
||||
--- 加血需要特殊处理
|
||||
if _proType == 2 then
|
||||
-- 判断人物是否死亡,死亡不再加血
|
||||
if value > 0 then
|
||||
local maxHp = this.formationList[i].allProVal[GetProIndexByProId(1)]
|
||||
if proId == 67 then -- 最大生命值百分比加血
|
||||
value = value + (_val / 10000 * maxHp) * changeType
|
||||
elseif proId == 68 then -- 当前剩余血量百分比加血
|
||||
value = value + (_val / 10000 * value) * changeType
|
||||
else
|
||||
value = value + _val * changeType
|
||||
if value then
|
||||
if _proType == 2 then
|
||||
-- 判断人物是否死亡,死亡不再加血
|
||||
if value > 0 then
|
||||
local maxHp = this.formationList[i].allProVal[GetProIndexByProId(1)]
|
||||
if proId == 67 then -- 最大生命值百分比加血
|
||||
value = value + (_val / 10000 * maxHp) * changeType
|
||||
elseif proId == 68 then -- 当前剩余血量百分比加血
|
||||
value = value + (_val / 10000 * value) * changeType
|
||||
else
|
||||
value = value + _val * changeType
|
||||
end
|
||||
-- 不能超出最大值
|
||||
value = value >= maxHp and maxHp or value
|
||||
-- 不能一下子就死掉了
|
||||
--value = value <= 0 and 1 or value
|
||||
end
|
||||
-- 不能超出最大值
|
||||
value = value >= maxHp and maxHp or value
|
||||
-- 不能一下子就死掉了
|
||||
--value = value <= 0 and 1 or value
|
||||
else
|
||||
value = value + _val * changeType
|
||||
end
|
||||
else
|
||||
value = value + _val * changeType
|
||||
end
|
||||
-- 人物属性不能小于0
|
||||
value = value < 0 and 0 or value
|
||||
|
|
Loading…
Reference in New Issue