【战斗力】公式参数走表,装备,法宝战斗力计算公式修改

dev_chengFeng
gaoxin 2021-11-17 15:55:37 +08:00
parent ce5042eb86
commit 12fe3eb3e4
3 changed files with 10 additions and 43 deletions

View File

@ -128,24 +128,8 @@ function this.CalculateWarForceBase(curTalismanConFigData,heroPos)
end
end
end
local heroPropertyScore={}
for i, v in ConfigPairs(propertyConfig) do
heroPropertyScore[i]=v.Score
end
local powerEndVal=0
for i, v in pairs(addAllProVal) do
if v > 0 then
local curProConfigData = ConfigManager.GetConfigData(ConfigName.PropertyConfig,i)
if curProConfigData then
if curProConfigData.Style == 1 then
powerEndVal=powerEndVal+v*heroPropertyScore[i]
else
powerEndVal=powerEndVal+v/100*heroPropertyScore[i]
end
end
end
end
return math.floor(powerEndVal)
local powerEndVal = HeroPowerManager.CalPower(addAllProVal)
return powerEndVal
end
end
function this.GetAllTalismanByCondition(curTalismanData,upStarConFigData)

View File

@ -29,20 +29,20 @@ local function CalculateWarForce2(powerVal)
if v > 0 and i < HeroProType.WarPower then
if propertyConfig[i].IfShow == 1 then
if propertyConfig[i].TargetPropertyId == 0 then
basePower = basePower + v * propertyConfig[i].Score
basePower = basePower + v*propertyConfig[i].Score
end
elseif propertyConfig[i].IfShow == 2 then
-- 这里百分比数要转换成小数,用于计算战斗力
HighPower = HighPower + v/100
HighPower = HighPower + v/100*propertyConfig[i].Score
end
elseif v > 0 and i >= HeroProType.WarPower then
elseif v > 0 and i == HeroProType.WarPower then
extPower = extPower + v
end
end
LogBlue_Prop("basePower: "..basePower)
LogBlue_Prop("HighPower: "..HighPower)
LogBlue_Prop("extPower: "..extPower)
powerEndVal = basePower * (1 + HighPower / 2) + extPower
powerEndVal = basePower * (1 + HighPower) + extPower
return math.floor(powerEndVal)
end
@ -89,8 +89,7 @@ function this.InitAllPower()
end
function this.CalPower(heroData, propList)
-- return CalculateWarForce(propList)
function this.CalPower(propList)
return CalculateWarForce2(propList)
end
@ -108,7 +107,7 @@ function this.GetHeroPower(dId, formationId, NoFuncProp)
-- 重新计算人物属性
local propList = HeroPropManager.GetHeroProp(dId, formationId, NoFuncProp)
-- 计算战斗力
local allPower = this.CalPower(heroData, propList)
local allPower = this.CalPower(propList)
-- 旧战斗力
if HeroPropManager.IsDebug() and not NoFuncProp then
-- local curHeroData = HeroManager.GetSingleHeroData(dId)

View File

@ -660,24 +660,8 @@ function this.CalculateWarForceBase(sId, lv, rlv, tlv,curTreasure)
end
end
end
local heroPropertyScore = {}
for i, v in ConfigPairs(ConfigManager.GetConfig(ConfigName.PropertyConfig)) do
heroPropertyScore[i] = v.Score
end
local powerEndVal = 0
for i, v in pairs(addAllProVal) do
if v > 0 then
local curProConfigData = ConfigManager.GetConfigData(ConfigName.PropertyConfig, i)
if curProConfigData then
if curProConfigData.Style == 1 then
powerEndVal = powerEndVal + v * heroPropertyScore[i]
else
powerEndVal = powerEndVal + v / 100 * heroPropertyScore[i]
end
end
end
end
return math.floor(powerEndVal)
local powerEndVal = HeroPowerManager.CalPower(addAllProVal)
return powerEndVal
end
end
--获取宝物升级消耗