Skip to content

Commit f09c93d

Browse files
PeecheyLocalIdentity
andauthored
Add support for Solus Ipse's Lineage Support mod (PathOfBuildingCommunity#1864)
* add support for solus ipse's additional lineage support mod * test cleanup --------- Co-authored-by: LocalIdentity <localidentity2@gmail.com>
1 parent 9891b9c commit f09c93d

5 files changed

Lines changed: 28 additions & 5 deletions

File tree

spec/System/TestItemMods_spec.lua

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -375,4 +375,24 @@ describe("TetsItemMods", function()
375375
assert.True(build.calcsTab.calcsOutput.EnergyShieldRecoupRecoveryAvg > 0)
376376
assert.True(build.calcsTab.calcsOutput.LifeRecoupRecoveryAvg == build.calcsTab.calcsOutput.EnergyShieldRecoupRecoveryAvg)
377377
end)
378+
379+
it("solus ipse, max lineage count", function()
380+
build.configTab.input.customMods = [[
381+
You can Socket 2 additional copies of each Lineage Support Gem, in different Skills
382+
]]
383+
build.configTab:BuildModList()
384+
runCallback("OnFrame")
385+
build.skillsTab:PasteSocketGroup("Arc 20/0 1 \nZarokh's Refrain 1/0 1")
386+
build.skillsTab:PasteSocketGroup("Ice Nova 20/0 1 \nZarokh's Refrain 1/0 1")
387+
build.skillsTab:PasteSocketGroup("Fireball 20/0 1 \nZarokh's Refrain 1/0 1")
388+
runCallback("OnFrame")
389+
390+
assert.are.equals(2, #build.controls.warnings.lines)
391+
392+
build.skillsTab:PasteSocketGroup("Comet 20/0 1 \nZarokh's Refrain 1/0 1")
393+
runCallback("OnFrame")
394+
395+
assert.are.equals(3, #build.controls.warnings.lines)
396+
assert.True(build.controls.warnings.lines[3]:match("lineage support gems allocated") ~= nil)
397+
end)
378398
end)

src/Data/ModCache.lua

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6152,9 +6152,8 @@ c["You are Blind"]={{[1]={[1]={neg=true,type="Condition",var="CannotBeBlinded"},
61526152
c["You are Immune to Bleeding"]={{[1]={flags=0,keywordFlags=0,name="BleedImmune",type="FLAG",value=true}},nil}
61536153
c["You are considered on Low Life while at 75% of maximum Life or below instead"]={{[1]={flags=0,keywordFlags=0,name="LowLifePercentage",type="BASE",value=0.75}},nil}
61546154
c["You can Break Enemy Armour to below 0"]={{[1]={[1]={effectName="ImplodingImpacts",effectType="Buff",type="GlobalEffect"},flags=0,keywordFlags=0,name="Condition:CanArmourBreakBelowZero",type="FLAG",value=true}},nil}
6155-
c["You can Socket 2 additional copies of each Lineage Support Gem, in different Skills"]={nil,"You can Socket 2 additional copies of each Lineage Support Gem, in different Skills "}
6156-
c["You can Socket an additional copy of each Lineage Support Gem, in different Skills"]={nil,"You can Socket an additional copy of each Lineage Support Gem, in different Skills "}
6157-
c["You can Socket an additional copy of each Lineage Support Gem, in different Skills You can Socket 2 additional copies of each Lineage Support Gem, in different Skills"]={nil,"You can Socket an additional copy of each Lineage Support Gem, in different Skills You can Socket 2 additional copies of each Lineage Support Gem, in different Skills "}
6155+
c["You can Socket 2 additional copies of each Lineage Support Gem, in different Skills"]={{[1]={flags=0,keywordFlags=0,name="MaxLineageCount",type="BASE",value=2}},nil}
6156+
c["You can Socket an additional copy of each Lineage Support Gem, in different Skills"]={{[1]={flags=0,keywordFlags=0,name="MaxLineageCount",type="BASE",value=1}},nil}
61586157
c["You can apply an additional Curse"]={{[1]={flags=0,keywordFlags=0,name="EnemyCurseLimit",type="BASE",value=1}},nil}
61596158
c["You can equip a Focus while wielding a Staff"]={{[1]={flags=0,keywordFlags=0,name="InstrumentsOfPower",type="FLAG",value=true}},nil}
61606159
c["You can equip a non-Unique Sceptre while wielding a Talisman"]={{[1]={flags=0,keywordFlags=0,name="LordOfTheWilds",type="FLAG",value=true}},nil}

src/Modules/CalcPerform.lua

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3266,9 +3266,10 @@ function calcs.perform(env, skipEHP)
32663266
t_insert(env.itemWarnings.gemGroupCountWarning, { allowedGemGroups, gemInfo })
32673267
end
32683268
else
3269-
if gemInfo.support and gemInfo.lineage and gemInfo.count > 1 then
3269+
local maxLineageCount = modDB:Sum("BASE", nil, "MaxLineageCount")
3270+
if gemInfo.support and gemInfo.lineage and gemInfo.count > maxLineageCount then
32703271
env.itemWarnings.lineageSupportGemLimitWarning = env.itemWarnings.lineageSupportGemLimitWarning or { }
3271-
t_insert(env.itemWarnings.lineageSupportGemLimitWarning, { gemName, 1, gemInfo.groups })
3272+
t_insert(env.itemWarnings.lineageSupportGemLimitWarning, { gemName, maxLineageCount, gemInfo.groups })
32723273
end
32733274
end
32743275
end

src/Modules/CalcSetup.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -662,6 +662,7 @@ function calcs.initEnv(build, mode, override, specEnv)
662662
modDB:NewMod("DeflectEffect", "INC", 1, "Base", { type = "Multiplier", var = "Tailwind", limit = 10 })
663663
modDB:NewMod("Evasion", "INC", 10, "Base", { type = "Multiplier", var = "Tailwind", limit = 10 })
664664
modDB:NewMod("SkillSlots", "BASE", 9, "Base")
665+
modDB:NewMod("MaxLineageCount", "BASE", 1, "Base")
665666

666667
-- Initialise enemy modifier database
667668
calcs.initModDB(env, enemyDB)

src/Modules/ModParser.lua

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6001,6 +6001,8 @@ local specialModList = {
60016001
["nearby allies have (%d+)%% chance to block attack damage per (%d+) strength you have"] = function(block, _, str) return {
60026002
mod("ExtraAura", "LIST", { onlyAllies = true, mod = mod("BlockChance", "BASE", block) }, { type = "PerStat", stat = "Str", div = tonumber(str) }),
60036003
} end,
6004+
["you can socket an additional copy of each lineage support gem, in different skills"] = { mod("MaxLineageCount", "BASE", 1) },
6005+
["you can socket (%d+) additional copies of each lineage support gem, in different skills"] = function(num) return { mod("MaxLineageCount", "BASE", num) } end,
60046006
}
60056007
for _, name in pairs(data.keystones) do
60066008
specialModList[name:lower()] = { mod("Keystone", "LIST", name) }

0 commit comments

Comments
 (0)