diff --git a/lua/app/module/battle/helper/battle_formula.lua b/lua/app/module/battle/helper/battle_formula.lua index aa03b2c6..d26bdd4a 100644 --- a/lua/app/module/battle/helper/battle_formula.lua +++ b/lua/app/module/battle/helper/battle_formula.lua @@ -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 diff --git a/lua/app/userdata/battle/team/battle_unit_entity.lua b/lua/app/userdata/battle/team/battle_unit_entity.lua index bfa9cba9..e4a872f7 100644 --- a/lua/app/userdata/battle/team/battle_unit_entity.lua +++ b/lua/app/userdata/battle/team/battle_unit_entity.lua @@ -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()