属性伤害bug
This commit is contained in:
parent
962b6499c6
commit
c4f0fa9afa
@ -17,8 +17,9 @@ end
|
||||
BattleFormula.calculateFormula = {
|
||||
-- (攻击)*技能倍率*(1+(攻击者元素伤害增加+所有伤害增加)(攻击者)+(受到元素伤害增加+受到所有伤害增加(受击)-受到元素伤害降低-受到所有伤害降低(受击)*暴击伤害
|
||||
[1] = function(unitComp, buff, targetUnit)
|
||||
local matchType = unitComp.unitEntity:getMatchType()
|
||||
local result = unitComp.unitEntity:getAtk() * buff:getEffectNum() // DEFAULT_FACTOR *
|
||||
(DEFAULT_FACTOR + unitComp.unitEntity:getDmgAddition() + targetUnit.unitEntity:getWeakness() - targetUnit.unitEntity:getDmgDec()) // DEFAULT_FACTOR
|
||||
(DEFAULT_FACTOR + unitComp.unitEntity:getDmgAddition() + targetUnit.unitEntity:getWeakness(matchType) - targetUnit.unitEntity:getDmgDec(matchType)) // DEFAULT_FACTOR
|
||||
local hurtState = 0
|
||||
local crit = unitComp.unitEntity:getCrit()
|
||||
if crit > 0 then
|
||||
|
||||
@ -258,12 +258,12 @@ function BattleUnitEntity:getDmgAddition()
|
||||
return self.team:getDmgAddition(self.unitData.matchType)
|
||||
end
|
||||
|
||||
function BattleUnitEntity:getDmgDec()
|
||||
return self.team:getDmgDec(self.unitData.matchType)
|
||||
function BattleUnitEntity:getDmgDec(matchType)
|
||||
return self.team:getDmgDec(matchType)
|
||||
end
|
||||
|
||||
function BattleUnitEntity:getWeakness()
|
||||
return self.team:getWeakness(self.unitData.matchType)
|
||||
function BattleUnitEntity:getWeakness(matchType)
|
||||
return self.team:getWeakness(matchType)
|
||||
end
|
||||
|
||||
function BattleUnitEntity:getCrit()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user