伤害公式
This commit is contained in:
parent
a69305960b
commit
b1dd325b05
@ -30,7 +30,7 @@ BattleFormula.calculateFormula = {
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local result = unitComp.unitEntity:getAtk() * buff:getEffectNum() -- 基础值(攻击 * 技能倍率)
|
local result = unitComp.unitEntity:getAtk() * buff:getEffectNum() // DEFAULT_FACTOR -- 基础值(攻击 * 技能倍率)
|
||||||
result = result * (DEFAULT_FACTOR
|
result = result * (DEFAULT_FACTOR
|
||||||
+ unitComp.unitEntity:getDmgAddition() -- (攻击者元素伤害增加 + 所有伤害增加)
|
+ unitComp.unitEntity:getDmgAddition() -- (攻击者元素伤害增加 + 所有伤害增加)
|
||||||
- unitComp.unitEntity:getDmgDec() -- (攻击者元素伤害降低 + 所有伤害降低)
|
- unitComp.unitEntity:getDmgDec() -- (攻击者元素伤害降低 + 所有伤害降低)
|
||||||
|
|||||||
@ -688,6 +688,12 @@ function BattleBaseData:initHeroData(formation)
|
|||||||
---- 攻击力
|
---- 攻击力
|
||||||
for matchType, attrName in pairs(GConst.MATCH_ATTACK_NAME) do
|
for matchType, attrName in pairs(GConst.MATCH_ATTACK_NAME) do
|
||||||
unitData.attr[attrName] = heroEntity:getAttrValue(attrName)
|
unitData.attr[attrName] = heroEntity:getAttrValue(attrName)
|
||||||
|
local atkAddName = GConst.MATCH_ATTACK_ADD_NAME[matchType]
|
||||||
|
if atkAddName then
|
||||||
|
unitData.attr[attrName] = unitData.attr[attrName] + heroEntity:getAttrValue(atkAddName)
|
||||||
|
end
|
||||||
|
|
||||||
|
unitData.attr[attrName] = unitData.attr[attrName] // DEFAULT_FACTOR
|
||||||
end
|
end
|
||||||
|
|
||||||
---- 暴击率
|
---- 暴击率
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user