诅咒回血被腐败影响
This commit is contained in:
parent
7babd6aaec
commit
1bb5bb0fb3
@ -3,6 +3,7 @@ local BattleHelper = require "app/module/battle/helper/battle_helper"
|
||||
local BattleBuffHandle = require "app/module/battle/helper/battle_buff_handle"
|
||||
local BATTLE_BOARD_SKILL_HANDLE = require "app/module/battle/skill/battle_board_skill_handle"
|
||||
local BATTLE_SKILL_CONDITION_HANDLE = require "app/module/battle/helper/battle_skill_condition_handle"
|
||||
local BattleFormula = require "app/module/battle/helper/battle_formula"
|
||||
local BattlePassive = require "app/module/battle/helper/battle_passive"
|
||||
|
||||
local BattleUnitComp = class("BattleUnitComp", LuaComponent)
|
||||
@ -1630,6 +1631,7 @@ function BattleUnitComp:takeDamageOrCure(atker, num, effectType, effectStatus, d
|
||||
end
|
||||
if num < 0 and atker.unitEntity:getBeDmgToHeal() > 0 then
|
||||
num = -num * atker.unitEntity:getBeDmgToHeal() // DEFAULT_FACTOR
|
||||
num = BattleFormula:getAffectedHeal(num, self)
|
||||
end
|
||||
atker.unitEntity:addDamageCount(num)
|
||||
local showHurtCombo = atker:getHurtComboTag()
|
||||
|
||||
@ -14,6 +14,10 @@ function BattleFormula:getDamageOrCureResult(unitComp, buff, targetUnitComp)
|
||||
return 0
|
||||
end
|
||||
|
||||
function BattleFormula:getAffectedHeal(num, target)
|
||||
return BattleFormula.calculateFormula[5](num, target)
|
||||
end
|
||||
|
||||
function BattleFormula:getExpectedDamageResult(unitComp, count, targetUnitComp, skillId, atkCompMap)
|
||||
-- (元素个数*攻击者攻击力+链接技能的伤害) * 受击者伤害减免
|
||||
-- 普攻
|
||||
@ -101,6 +105,11 @@ BattleFormula.calculateFormula = {
|
||||
(DEFAULT_FACTOR + unitComp.unitEntity:getDmgAddition() - unitComp.unitEntity:getDmgDec() + targetUnit.unitEntity:getWeakness(atkMatchType) - targetUnit.unitEntity:getDecDmg(atkMatchType)) // DEFAULT_FACTOR
|
||||
return result, 0
|
||||
end,
|
||||
-- 治疗量 * (治疗效果增减效果)
|
||||
[5] = function(num, target)
|
||||
local result = num * (target.unitEntity:getCureAddition() - target.unitEntity:getCureDec() + DEFAULT_FACTOR) // DEFAULT_FACTOR
|
||||
return result, 0
|
||||
end
|
||||
}
|
||||
|
||||
return BattleFormula
|
||||
Loading…
x
Reference in New Issue
Block a user