不过修复
This commit is contained in:
parent
a47f18db07
commit
bcb336d344
@ -249,7 +249,7 @@ function BattleBaseController:onLinkChange()
|
||||
local dmgSkillId
|
||||
for index, info in ipairs(sequence) do
|
||||
local entity = self.battleData:getGridEntity(info.posId)
|
||||
if not mainElementType then
|
||||
if not mainElementType or not dmgSkillId then
|
||||
local skillId = entity:getSkillId()
|
||||
if not skillId and not mainElementType then
|
||||
mainElementType = entity:getElementType()
|
||||
@ -3075,9 +3075,13 @@ function BattleBaseController:calExpectedInjury(mainElementType, count, skillId)
|
||||
return 0
|
||||
end
|
||||
local atkUnitComp = atkCompMap[mainElementType]
|
||||
if not atkUnitComp then
|
||||
if mainElementType and not atkUnitComp then
|
||||
return 0
|
||||
end
|
||||
if not mainElementType or not atkUnitComp then
|
||||
count = 0
|
||||
atkUnitComp = self:getCurActionTeam():getMainUnit()
|
||||
end
|
||||
local dmg = BattleFormula:getExpectedDamageResult(atkUnitComp, count, self:getCurOtherActionUnitComp(), skillId, atkCompMap)
|
||||
return dmg
|
||||
end
|
||||
|
||||
@ -30,7 +30,7 @@ function BattleFormula:getExpectedDamageResult(unitComp, count, targetUnitComp,
|
||||
local atk = atkCompMap[matchType].unitEntity:getAtk()
|
||||
local dmg = 0
|
||||
for _, effect in ipairs(skillConfig.effect) do
|
||||
local buffConfig = ConfigManager:getConfigWithOtherKey("buff", effect.type)
|
||||
local buffConfig = ConfigManager:getConfigWithOtherKey("buff", "name")[effect.type]
|
||||
if buffConfig and buffConfig.formula == 1 then -- 伤害公式
|
||||
dmg = dmg + effect.num * atk
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user