战斗力修改

onepiece_bt hotfix/tcx_haizeiBT/cdn_haizeiTest_ios/1.1.8
wangzhenxing 2024-07-18 15:14:23 +08:00
parent d0327cf3fd
commit 38f36fabbb
3 changed files with 136 additions and 12 deletions

View File

@ -106,9 +106,9 @@ function this.GetAllUpListNoBless(_id)
end
table.sort(list,function(a,b)
if a.lv==b.lv then
return a.staticId < b.staticId
else
return a.lv < b.lv
return a.lv > b.lv
else
return a.staticId > b.staticId
end
end)
@ -253,6 +253,51 @@ function this.GetEquipAddPropByDid(_did)
return addProp
end
function this.GetEquipAddSkill(_did)
if not this.allEquipData[_did] then
return {}
end
local staticId=this.allEquipData[_did].staticId
local lvList=ConfigManager.TryGetAllConfigsDataByKey(ConfigName.EquipTalismana,"TalismanaId",staticId)
local lv=this.allEquipData[_did].lv
local skillList={}
local curHeroData=nil
if this.allEquipData[_did].belongHero then
curHeroData=HeroManager.GetSingleHeroData(this.allEquipData[_did].belongHero)
end
local curStar=0
for i=1,#lvList do
if lvList[i].ShowSkill and #lvList[i].ShowSkill>0 and tonumber(lvList[i].ShowSkill[1])~=nil then
local type=lvList[i].ShowSkill[1]
if type==0 then
if lv>=lvList[i].Level then
table.insert(skillList,lvList[i].ShowSkill[3])
end
elseif type==1 then
if lv>=lvList[i].Level and curHeroData and curHeroData.heroConfig.Profession==lvList[i].ShowSkill[2] then
table.insert(skillList,lvList[i].ShowSkill[3])
end
elseif type==2 then
--LogError("lv=========="..lv.." lvList[i].Level=="..lvList[i].Level.." self.curHeroData.staticId=="..self.curHeroData.staticId.." lvList[i].ShowSkill[2]=="..lvList[i].ShowSkill[2])
if lv>=lvList[i].Level and curHeroData and curHeroData.heroConfig.Id==lvList[i].ShowSkill[2] then
table.insert(skillList,lvList[i].ShowSkill[3])
end
end
end
end
return skillList
end
function this.SetEquipBelongHero(_did,_heroId)

View File

@ -260,7 +260,32 @@ function this.SetHeroTraining(dyn,data)
heroDatas[dyn].HeroTraining=data
end
end
function this.GetHeroTrainPassiveSkill(_idDyn)
if heroDatas[_idDyn] then
local hero=heroDatas[_idDyn]
local trainLv=hero.HeroTraining.trainingLv
if trainLv>0 then
local list=ConfigManager.TryGetAllConfigsDataByKey(ConfigName.Train,"HeroID",hero.heroConfig.Id)
local skillId={}
if list then
local unlockList=hero.HeroTraining.unlockIds
for k, v in pairs(list) do
if CheckListIsContainValue1(unlockList,v.Id) and trainLv>=v.Level and v.PassiveSkill and #v.PassiveSkill>=1 and type(v.PassiveSkill[1])~="userdata" then
for i=1,#v.PassiveSkill do
table.insert(skillId,v.PassiveSkill[i])
end
end
end
return skillId
-- for i, v in ConfigPairs(list) do
-- end
end
end
end
return {}
end
function this.SetPotentialData(msg,dyn)

View File

@ -451,7 +451,33 @@ Hero_Prop_Func = {
[Hero_Prop_Type.Talisman] = function(_heroData)
local addAllProVal = {}
--LogError("get 法灵添加的属性========================================")
addAllProVal = FaLingManager.GetEquipAddPropByDid(_heroData.baublesId)
local allAddPro={}
local propList, conPropList, teamPropList, conTeamPropList, dePropList
--LogError("计算英雄法相 属性 被动属性")
allAddPro=FaLingManager.GetEquipAddPropByDid(_heroData.baublesId)
local skills=FaLingManager.GetEquipAddSkill(_heroData.baublesId)
-- for i=1,#skills do
-- LogError("法宝 skillid============================================="..skills[i])
-- end
--被动技能计算
if skills and #skills > 0 then --talismanConFig.OpenSkillRules and #talismanConFig.OpenSkillRules > 0 then
--单体加成 --单体等级限制加成 --团体加成 --减乘
propList, conPropList, teamPropList, conTeamPropList, dePropList = PassiveListToPropList(skills)
end
if propList and LengthOfTable(propList) > 0 then
for i,v in pairs(propList) do
if allAddPro[i] then
allAddPro[i] = allAddPro[i] + v
else
allAddPro[i] = v
end
end
end
return allAddPro, conPropList, teamPropList, conTeamPropList, dePropList
-- local propList, conPropList, teamPropList, conTeamPropList, dePropList
-- local star = _heroData.star
-- local profession = heroConfig[_heroData.tId].Profession
@ -515,7 +541,7 @@ Hero_Prop_Func = {
-- for k, v in pairs(addAllProVal) do
-- LogError("法宝 k==================="..k.." v==="..v)
-- end
return addAllProVal--, conPropList, teamPropList, conTeamPropList, dePropList
--return addAllProVal--, conPropList, teamPropList, conTeamPropList, dePropList
end,
-- 魂印
@ -733,13 +759,41 @@ Hero_Prop_Func = {
return allAddPro, conPropList, teamPropList, conTeamPropList, dePropList
end,
[Hero_Prop_Type.Training] = function(_heroData)
local addPro=HeroManager.GetHeroTrainingAddPro(_heroData.dId)
if addPro==nil or #addPro==0 then
return nil
-- local addPro=HeroManager.GetHeroTrainingAddPro(_heroData.dId)
-- if addPro==nil or #addPro==0 then
-- return nil
-- end
-- local data=HeroManager.GetSingleHeroData(_heroData.dId)
-- local skillList=HeroManager.GetHeroTrainPassiveSkill(_heroData.dId)
-- for key, value in pairs(addPro) do
-- LogError("Training key==="..key.." value=="..value.." _heroData.h"..data.heroConfig.ReadingName)
-- end
--return {}
local allAddPro={}
local propList, conPropList, teamPropList, conTeamPropList, dePropList
--LogError("计算英雄法相 属性 被动属性")
allAddPro=HeroManager.GetHeroTrainingAddPro(_heroData.dId)
local skills=HeroManager.GetHeroTrainPassiveSkill(_heroData.dId)
-- for i=1,#skills do
-- LogError("train skillid============================================="..skills[i])
-- end
--被动技能计算
if skills and #skills > 0 then --talismanConFig.OpenSkillRules and #talismanConFig.OpenSkillRules > 0 then
--单体加成 --单体等级限制加成 --团体加成 --减乘
propList, conPropList, teamPropList, conTeamPropList, dePropList = PassiveListToPropList(skills)
end
for key, value in pairs(addPro) do
-- LogError("Training key==="..key.." value=="..value)
if propList and LengthOfTable(propList) > 0 then
for i,v in pairs(propList) do
if allAddPro[i] then
allAddPro[i] = allAddPro[i] + v
else
allAddPro[i] = v
end
end
end
return addPro
return allAddPro, conPropList, teamPropList, conTeamPropList, dePropList
end,
}