【战前属性】====战前属性增加新类型 413计算
parent
72400429f3
commit
c318dea91a
|
@ -249,7 +249,7 @@ function this.GetHeroProp(dId, formationId, NoFuncProp)
|
||||||
DoubleTableCompound(allPropList, basePropList)
|
DoubleTableCompound(allPropList, basePropList)
|
||||||
|
|
||||||
-- 自身条件属性加成
|
-- 自身条件属性加成
|
||||||
local conPropList = this.GetConditionProp(dId)
|
local conPropList = this.GetConditionProp(dId,formationId)
|
||||||
Log_Prop("自身条件属性")
|
Log_Prop("自身条件属性")
|
||||||
LogGreenTable_Prop(conPropList)
|
LogGreenTable_Prop(conPropList)
|
||||||
DoubleTableCompound(allPropList, conPropList)
|
DoubleTableCompound(allPropList, conPropList)
|
||||||
|
@ -286,7 +286,7 @@ function this.GetHeroProp(dId, formationId, NoFuncProp)
|
||||||
DoubleTableCompound(allPropList, teamProp)
|
DoubleTableCompound(allPropList, teamProp)
|
||||||
-- 团队条件属性加成
|
-- 团队条件属性加成
|
||||||
Log_Prop("团队条件属性")
|
Log_Prop("团队条件属性")
|
||||||
local conTeamProp = this.GetConditionTeamData(heroId, dId)
|
local conTeamProp = this.GetConditionTeamData(heroId, dId,formationId)
|
||||||
LogGreenTable_Prop(conTeamProp)
|
LogGreenTable_Prop(conTeamProp)
|
||||||
DoubleTableCompound(allPropList, conTeamProp)
|
DoubleTableCompound(allPropList, conTeamProp)
|
||||||
end
|
end
|
||||||
|
@ -488,7 +488,7 @@ function this.GetConditionPropByType(dId, powerType)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- 获取自身的条件属性
|
-- 获取自身的条件属性
|
||||||
function this.GetConditionProp(dId)
|
function this.GetConditionProp(dId,teamId)
|
||||||
-- 判空
|
-- 判空
|
||||||
if not this.IsConPropDirty[dId] then
|
if not this.IsConPropDirty[dId] then
|
||||||
this.IsConPropDirty[dId] = {}
|
this.IsConPropDirty[dId] = {}
|
||||||
|
@ -496,6 +496,7 @@ function this.GetConditionProp(dId)
|
||||||
if this.IsConPropDirty[dId].isDirty ~= false then
|
if this.IsConPropDirty[dId].isDirty ~= false then
|
||||||
-- 创建计算属性的数据
|
-- 创建计算属性的数据
|
||||||
local list = {}
|
local list = {}
|
||||||
|
local formationList = FormationManager.GetFormationByID(teamId)
|
||||||
local cData = this.CreateHeroCountData(dId)
|
local cData = this.CreateHeroCountData(dId)
|
||||||
for _, powerType in pairs(Hero_Prop_Type) do
|
for _, powerType in pairs(Hero_Prop_Type) do
|
||||||
if this.IsConPropDirty[dId][powerType] ~= false then
|
if this.IsConPropDirty[dId][powerType] ~= false then
|
||||||
|
@ -503,7 +504,7 @@ function this.GetConditionProp(dId)
|
||||||
if this.ConList[dId] and this.ConList[dId][powerType] then
|
if this.ConList[dId] and this.ConList[dId][powerType] then
|
||||||
for _, cond in ipairs(this.ConList[dId][powerType]) do
|
for _, cond in ipairs(this.ConList[dId][powerType]) do
|
||||||
if Condition_Prop_Func[cond.type] then
|
if Condition_Prop_Func[cond.type] then
|
||||||
local propList = Condition_Prop_Func[cond.type](cData, cData, cond.propList, cond.args)
|
local propList = Condition_Prop_Func[cond.type](cData, cData, cond.propList, cond.args,formationList)
|
||||||
DoubleTableCompound(condProp, propList)
|
DoubleTableCompound(condProp, propList)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -591,15 +592,16 @@ function this.SetConditionTeamData(dId, powerType, condList)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- 获取团队条件数据(动态计算,不缓存属性)
|
-- 获取团队条件数据(动态计算,不缓存属性)
|
||||||
function this.GetConditionTeamData(dId, tdId)
|
function this.GetConditionTeamData(dId, tdId,teamId)
|
||||||
local list = {}
|
local list = {}
|
||||||
|
local formationList = FormationManager.GetFormationByID(teamId)
|
||||||
if this.ConTeamList[dId] then
|
if this.ConTeamList[dId] then
|
||||||
local dData = this.CreateHeroCountData(dId)
|
local dData = this.CreateHeroCountData(dId)
|
||||||
local tdData = this.CreateHeroCountData(tdId)
|
local tdData = this.CreateHeroCountData(tdId)
|
||||||
for powerType, conds in pairs(this.ConTeamList[dId]) do
|
for powerType, conds in pairs(this.ConTeamList[dId]) do
|
||||||
for _, cond in ipairs(conds) do
|
for _, cond in ipairs(conds) do
|
||||||
if Condition_Prop_Func[cond.type] then
|
if Condition_Prop_Func[cond.type] then
|
||||||
local propList = Condition_Prop_Func[cond.type](dData, tdData, cond.propList, cond.args)
|
local propList = Condition_Prop_Func[cond.type](dData, tdData, cond.propList, cond.args,formationList)
|
||||||
DoubleTableCompound(list, propList)
|
DoubleTableCompound(list, propList)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -5,6 +5,7 @@ local heroConfig = ConfigManager.GetConfig(ConfigName.HeroConfig)
|
||||||
Condition_Prop_Type = {
|
Condition_Prop_Type = {
|
||||||
LV_100 = 1, -- 100级生效的属性
|
LV_100 = 1, -- 100级生效的属性
|
||||||
ELE_TEAM_ADD = 2, -- 元素属性
|
ELE_TEAM_ADD = 2, -- 元素属性
|
||||||
|
TEAM_ELE_NUM = 3,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -30,7 +31,24 @@ Condition_Prop_Func = {
|
||||||
if config and args and config.PropertyName == tonumber(args[1]) then
|
if config and args and config.PropertyName == tonumber(args[1]) then
|
||||||
return propList
|
return propList
|
||||||
end
|
end
|
||||||
|
end,
|
||||||
|
[Condition_Prop_Type.TEAM_ELE_NUM] = function(ower, target, propList, args,teamInfo)
|
||||||
|
if teamInfo and teamInfo.teamHeroInfos and #teamInfo.teamHeroInfos > 0 then
|
||||||
|
local num=0
|
||||||
|
for _, hero in ipairs(teamInfo.teamHeroInfos) do
|
||||||
|
local heroData=HeroManager.GetSingleHeroData(hero.heroId)
|
||||||
|
if heroData and heroData.heroConfig.PropertyName==args[1] then
|
||||||
|
num=num+1
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
local newProList={}
|
||||||
|
for key, value in pairs(propList) do
|
||||||
|
newProList[key]=value*num
|
||||||
|
end
|
||||||
|
return newProList
|
||||||
|
end
|
||||||
|
|
||||||
|
end,
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
|
@ -75,7 +75,7 @@ local function PassiveListToPropList(skillids)
|
||||||
if curSkillData.EffectiveRange > 1 then
|
if curSkillData.EffectiveRange > 1 then
|
||||||
local args = curSkillData.Value
|
local args = curSkillData.Value
|
||||||
-- 计算
|
-- 计算
|
||||||
local pId, v, ct
|
local pId, v, ct,ele
|
||||||
if curSkillData.Type == 90 then -- [a]增加[b],[c]改变 || a[属性]b[float]c[改变类型]
|
if curSkillData.Type == 90 then -- [a]增加[b],[c]改变 || a[属性]b[float]c[改变类型]
|
||||||
pId, v, ct = args[1], args[2], args[3]
|
pId, v, ct = args[1], args[2], args[3]
|
||||||
elseif curSkillData.Type == 94 then -- 全体上阵武将增加[a]%[b],[c]改变 || a[float]b[属性]c[改变类型]
|
elseif curSkillData.Type == 94 then -- 全体上阵武将增加[a]%[b],[c]改变 || a[float]b[属性]c[改变类型]
|
||||||
|
@ -84,6 +84,8 @@ local function PassiveListToPropList(skillids)
|
||||||
pId, v, ct = args[1], args[2], args[3]
|
pId, v, ct = args[1], args[2], args[3]
|
||||||
elseif curSkillData.Type == 129 then -- 全体上阵[a]元素角色增加[b]%[c],[d]改变 || a[元素]b[float]c[属性]d[改变类型]
|
elseif curSkillData.Type == 129 then -- 全体上阵[a]元素角色增加[b]%[c],[d]改变 || a[元素]b[float]c[属性]d[改变类型]
|
||||||
pId, v, ct = args[3], args[2], args[4]
|
pId, v, ct = args[3], args[2], args[4]
|
||||||
|
elseif curSkillData.Type ==413 then
|
||||||
|
pId, v, ct,ele = args[3],args[2],args[4],args[1] --a[int],b[float],c[属性],d[int]
|
||||||
end
|
end
|
||||||
|
|
||||||
-- 获取UI属性
|
-- 获取UI属性
|
||||||
|
@ -110,6 +112,10 @@ local function PassiveListToPropList(skillids)
|
||||||
local propList = {}
|
local propList = {}
|
||||||
propList[propId] = value
|
propList[propId] = value
|
||||||
table.insert(conTeamPropList, {type = Condition_Prop_Type.ELE_TEAM_ADD, propList = propList, args = args})
|
table.insert(conTeamPropList, {type = Condition_Prop_Type.ELE_TEAM_ADD, propList = propList, args = args})
|
||||||
|
elseif curSkillData.Type == 413 then
|
||||||
|
local propList = {}
|
||||||
|
propList[propId] = value
|
||||||
|
table.insert(conTeamPropList, {type = Condition_Prop_Type.TEAM_ELE_NUM, propList = propList, args = args})
|
||||||
else
|
else
|
||||||
if not teamPropList[propId] then
|
if not teamPropList[propId] then
|
||||||
teamPropList[propId] = 0
|
teamPropList[propId] = 0
|
||||||
|
|
Loading…
Reference in New Issue