Skip to content

Support Spectres and Companions, and overhaul Spectre Library #936

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 78 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
78 commits
Select commit Hold shift + click to select a range
df938e2
initial spectres
Blitz54 Apr 3, 2025
f4b8290
Merge branch 'PathOfBuildingCommunity:dev' into spectres
Blitz54 Apr 7, 2025
ba09ac3
library shows up, and some spectres+skills added
Blitz54 Apr 8, 2025
f709c73
Tarnished Scarab
Blitz54 Apr 9, 2025
17d302d
Merge branch 'PathOfBuildingCommunity:dev' into spectres
Blitz54 Apr 9, 2025
ceab80c
Two more spectres and some skill changes
Blitz54 Apr 10, 2025
16a1d13
Blood Priest and Priestess
Blitz54 Apr 11, 2025
238780a
Drudge Osseodon
Blitz54 Apr 12, 2025
0ba7bed
Merge branch 'PathOfBuildingCommunity:dev' into spectres
Blitz54 Apr 17, 2025
626d1d7
Diretusk Boar
Blitz54 Apr 17, 2025
46673db
Terracotta Soldier
Blitz54 Apr 17, 2025
0feb757
Fettered Monstrosity
Blitz54 Apr 17, 2025
f5c264f
Filthy First-born
Blitz54 Apr 18, 2025
04467bc
experienceMultiplier for Spectre Reservation
Blitz54 Apr 20, 2025
a10c459
Faridun Spearwoman
Blitz54 Apr 21, 2025
6a63272
Better Reservation calcs for spectre
Blitz54 Apr 25, 2025
e5af2ac
Crabs
Blitz54 Apr 28, 2025
acaf8c6
Export Monster Type
Blitz54 Apr 28, 2025
f201da3
Show Spirit Cost in the spectre library window
Blitz54 Apr 29, 2025
d5048aa
Add monster type to library
Blitz54 Apr 29, 2025
c69e0b0
Serpent Shaman and enable spectre curses
Blitz54 Apr 30, 2025
c6a00e2
Initial support for Companion and small calc change for reservedFlat
Blitz54 May 1, 2025
c5916b3
Merge branch 'dev' into spectres
Blitz54 May 1, 2025
0b606eb
Add separate beast library
Blitz54 May 4, 2025
19b59b2
tooltip shows companion reservation now
Blitz54 May 4, 2025
2b69649
Initial import of Companion/Spectre gems
Blitz54 May 7, 2025
9bbe995
Put reservation calcs into exporter
Blitz54 May 7, 2025
28d2a3c
Imports spectres to spectre list
Blitz54 May 7, 2025
c625bf4
import changes and sets current minion to imported one
Blitz54 May 8, 2025
2d026f8
Update Spectre/Companion tooltip reservations, and dynamically update…
Blitz54 May 9, 2025
c5eebf7
Update gem names according to selected spectre - mostly
Blitz54 May 10, 2025
d90afa8
Merge branch 'PathOfBuildingCommunity:dev' into spectres
Blitz54 May 10, 2025
f2e7150
Moved spectre skills to Spectre.lua
Blitz54 May 10, 2025
62885d8
Sync minion dropdown between calc tab and left bar
Blitz54 May 10, 2025
74fcfcd
Gem name updates, and dropdowns for minion are in sync
Blitz54 May 10, 2025
ef7e9bb
Companion uses beast list now
Blitz54 May 10, 2025
59fc4bb
Prowling Shade and potential crash fix
Blitz54 May 10, 2025
002246e
Replace sub prefix check with match
Blitz54 May 10, 2025
a100df5
Clean up gem tooltip code + fix display issue
May 11, 2025
b7ab927
Tooltip fix for companion
Blitz54 May 12, 2025
3ead7e9
Cultist Archer, Witch, Daggerdancer
Blitz54 May 12, 2025
0223b3c
Spectre life fix and "Show minion stats" refixed
Blitz54 May 12, 2025
a222c97
Fix minion ES and life calcs
Blitz54 May 12, 2025
fe03923
Merge branch 'dev' into spectres
May 13, 2025
2907b07
Add Tons of Spectres for import, no skills yet
Blitz54 May 13, 2025
5a143a9
Export list of spectres with unique names
May 14, 2025
ad6b2e5
Remove a few spectres and update exporter
Blitz54 May 14, 2025
8d909de
Initial Spectre Library UI Update
Blitz54 May 14, 2025
b65084c
Export monster category images
May 15, 2025
467e157
Show Monster Images on checkboxes in Spectre Library
Blitz54 May 15, 2025
8aed1df
removed test mob
Blitz54 May 15, 2025
8494f60
Spec stuff for Spawn Locations
Blitz54 May 15, 2025
dd3be9e
Most Spectre Spawn Locations shown in tooltip
Blitz54 May 16, 2025
a754b7a
Prettied up library and actually committed tooltip this time
Blitz54 May 16, 2025
ff91849
Preparation for popular spectre list, and some small fixes
Blitz54 May 17, 2025
0f5bb08
Fix bug on importing build with broken greyed gem
Blitz54 May 17, 2025
e00320e
Recommended Spectres/Beasts button, and removed some spectres
Blitz54 May 18, 2025
43bdfe5
fix UI more
Blitz54 May 19, 2025
77954c9
sorting name change, forgot
Blitz54 May 19, 2025
d3290f0
Spectre build list also shows minion stats if selected
Blitz54 May 19, 2025
5bde94a
Fix space indentation
Blitz54 May 19, 2025
237ffc2
Some skills and fixes/revert
Blitz54 May 26, 2025
a026952
Add skillName partialMatch to fix config for spectre curses
Blitz54 May 27, 2025
85a94d0
More skills, basic imports as spectre skills are BUUUSTED on db
Blitz54 May 27, 2025
e5e1c06
More skills, and export minion movement speed for library
Blitz54 May 28, 2025
f95a87a
Merge branch 'PathOfBuildingCommunity:dev' into spectres
Blitz54 May 28, 2025
e105567
Many skills, spectreList changes, code cleanup, and spectre removals
Blitz54 May 29, 2025
4d7dea5
Every monster has at least 1 skill now, lots of broken skills to stil…
Blitz54 May 29, 2025
8f89e33
More Spec stuff, which lets us grab which Maps some monsters spawn in
Blitz54 May 30, 2025
1a2c849
Spawn Locations shown in library, and world Areas imported
Blitz54 May 30, 2025
64c901b
Spec stuff and fixes/cleanup
Blitz54 May 30, 2025
877a2ce
Tooltip stuff and sort spawn locations
Blitz54 May 31, 2025
75a6f4d
Spawn location changes and small fixes
Blitz54 Jun 3, 2025
e25a78d
more worldarea stuff, and random spec.lua
Blitz54 Jun 6, 2025
6a33a2c
Merge branch 'dev' into spectres
Blitz54 Jun 7, 2025
bf66d8a
Tiny fix and spectre change from 0.2.1
Blitz54 Jun 7, 2025
1af16e4
Merge branch 'PathOfBuildingCommunity:dev' into spectres
Blitz54 Jun 17, 2025
d15d86f
fix comment on top of exporter file
Blitz54 Jun 26, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion src/Classes/CalcsTab.lua
Original file line number Diff line number Diff line change
Expand Up @@ -104,18 +104,36 @@ local CalcsTabClass = newClass("CalcsTab", "UndoHandler", "ControlHost", "Contro
control = new("DropDownControl", nil, {0, 0, 160, 16}, nil, function(index, value)
local mainSocketGroup = self.build.skillsTab.socketGroupList[self.input.skill_number]
local srcInstance = mainSocketGroup.displaySkillListCalcs[mainSocketGroup.mainActiveSkillCalcs].activeEffect.srcInstance
-- Synchronize DropDownControl between CalcActiveSkill and skillMinionCalcs
if value.itemSetId then
srcInstance.skillMinionItemSetCalcs = value.itemSetId
srcInstance.skillMinionItemSet = value.itemSetId
if srcInstance.nameSpec:match("^Spectre:") then
srcInstance.nameSpec = "Spectre: ".. value.label
elseif srcInstance.nameSpec:match("^Companion:") then
srcInstance.nameSpec = "Companion: ".. value.label
end
else
srcInstance.skillMinionCalcs = value.minionId
srcInstance.skillMinion = value.minionId
if srcInstance.nameSpec:match("^Spectre:") then
srcInstance.nameSpec = "Spectre: ".. value.label
elseif srcInstance.nameSpec:match("^Companion:") then
srcInstance.nameSpec = "Companion: ".. value.label
end
end
self:AddUndoState()
self.build.buildFlag = true
end)
} },
{ label = "Spectre Library", flag = "spectre", { controlName = "mainSkillMinionLibrary",
control = new("ButtonControl", nil, {0, 0, 100, 16}, "Manage Spectres...", function()
self.build:OpenSpectreLibrary()
self.build:OpenSpectreLibrary("spectre")
end)
} },
{ label = "Beast Library", flag = "summonBeast", { controlName = "mainSkillBeastLibrary",
control = new("ButtonControl", nil, {0, 0, 100, 16}, "Manage Beasts...", function()
self.build:OpenSpectreLibrary("beast")
end)
} },
{ label = "Minion Skill", flag = "haveMinion", { controlName = "mainSkillMinionSkill",
Expand Down
16 changes: 15 additions & 1 deletion src/Classes/GemSelectControl.lua
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,11 @@ function GemSelectClass:AddGemTooltip(gemInstance)
local grantedEffect = gemInstance.gemData.grantedEffect
local additionalEffects = gemInstance.gemData.additionalGrantedEffects

self.tooltip:AddLine(20, colorCodes.GEM .. grantedEffect.name)
if grantedEffect.name:match("^Spectre:") or grantedEffect.name:match("^Companion:") then
self.tooltip:AddLine(20, colorCodes.GEM .. (gemInstance.displayEffect and gemInstance.displayEffect.nameSpec or gemInstance.gemData.name))
else
self.tooltip:AddLine(20, colorCodes.GEM .. grantedEffect.name)
end
self.tooltip:AddSeparator(10)
self.tooltip:AddLine(18, colorCodes.NORMAL .. gemInstance.gemData.gemType)
if gemInstance.gemData.tagString ~= "" then
Expand Down Expand Up @@ -592,9 +596,19 @@ function GemSelectClass:AddGrantedEffectInfo(gemInstance, grantedEffect, addReq)
self.tooltip:AddLine(16, string)
end
else
if gemInstance.skillMinion then
if gemInstance.nameSpec:match("^Spectre:") then
grantedEffectLevel.spiritReservationFlat = data.spectres[gemInstance.skillMinion].spectreReservation
elseif gemInstance.nameSpec:match("^Companion:") then
grantedEffectLevel.spiritReservationPercent = data.spectres[gemInstance.skillMinion].companionReservation
end
end
if grantedEffectLevel.spiritReservationFlat then
self.tooltip:AddLine(16, string.format("^x7F7F7FReservation: ^7%d Spirit", grantedEffectLevel.spiritReservationFlat))
end
if grantedEffectLevel.spiritReservationPercent then
self.tooltip:AddLine(16, string.format("^x7F7F7FReservation: ^7%.1f%% Spirit", grantedEffectLevel.spiritReservationPercent))
end
local cost
for _, res in ipairs(self.costs) do
if grantedEffectLevel.cost and grantedEffectLevel.cost[res.Resource] then
Expand Down
37 changes: 36 additions & 1 deletion src/Classes/ImportTab.lua
Original file line number Diff line number Diff line change
Expand Up @@ -691,12 +691,47 @@ function ImportTabClass:ImportItemsAndSkills(charData)
local funcGetGemInstance = function(skillData)
local typeLine = sanitiseText(skillData.typeLine) .. (skillData.support and " Support" or "")
local gemId = self.build.data.gemForBaseName[typeLine:lower()]

if typeLine:match("^Spectre:") then
gemId = "Metadata/Items/Gems/SkillGemSummonSpectre"
end
if typeLine:match("^Companion:") then
gemId = "Metadata/Items/Gems/SkillGemSummonBeast"
end

if gemId then
local gemInstance = { level = 20, quality = 0, enabled = true, enableGlobal1 = true, enableGlobal2 = true, count = 1, gemId = gemId }
gemInstance.nameSpec = self.build.data.gems[gemId].name
gemInstance.support = skillData.support

local spectreList = data.spectres
if typeLine:sub(1, 8) == "Spectre:" then
local spectreName = typeLine:sub(10) -- gets monster name after "Spectre: "
for id, spectre in pairs(spectreList) do
if spectre.name == spectreName then
if not isValueInArray(self.build.spectreList, id) then
t_insert(self.build.spectreList, id)
end
gemInstance.skillMinion = id -- Sets imported minion in dropdown on left
gemInstance.skillMinionCalcs = id-- Sets imported minion in dropdown in calcs tab
break
end
end
end
if typeLine:sub(1, 10) == "Companion:" then
local companionName = typeLine:sub(12)
for id, spectre in pairs(spectreList) do
if spectre.name == companionName then
if not isValueInArray(self.build.beastList, id) then
t_insert(self.build.beastList, id)
end
gemInstance.skillMinion = id
gemInstance.skillMinionCalcs = id
break
end
end
end

gemInstance.nameSpec = self.build.data.gems[gemId].name
for _, property in pairs(skillData.properties) do
if property.name == "Level" then
gemInstance.level = tonumber(property.values[1][1]:match("%d+"))
Expand Down
93 changes: 88 additions & 5 deletions src/Classes/MinionListControl.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,23 @@ local ipairs = ipairs
local t_insert = table.insert
local t_remove = table.remove
local s_format = string.format
local m_max = math.max

local MinionListClass = newClass("MinionListControl", "ListControl", function(self, anchor, rect, data, list, dest)
local MinionListClass = newClass("MinionListControl", "ListControl", function(self, anchor, rect, data, list, dest, label)
self.ListControl(anchor, rect, 16, "VERTICAL", not dest, list)
self.data = data
self.dest = dest
if dest then
self.dragTargetList = { dest }
self.label = "^7Available Spectres:"
self.label = label or "^7Available Spectres:"
self.controls.add = new("ButtonControl", {"BOTTOMRIGHT",self,"TOPRIGHT"}, {0, -2, 60, 18}, "Add", function()
self:AddSel()
end)
self.controls.add.enabled = function()
return self.selValue ~= nil and not isValueInArray(dest.list, self.selValue)
end
else
self.label = "^7Spectres in Build:"
self.label = label or "^7Spectres in Build:"
self.controls.delete = new("ButtonControl", {"BOTTOMRIGHT",self,"TOPRIGHT"}, {0, -2, 60, 18}, "Remove", function()
self:OnSelDelete(self.selIndex, self.selValue)
end)
Expand All @@ -49,6 +50,10 @@ function MinionListClass:AddValueTooltip(tooltip, index, minionId)
if tooltip:CheckForUpdate(minionId) then
local minion = self.data.minions[minionId]
tooltip:AddLine(18, "^7"..minion.name)
tooltip:AddSeparator(10)
tooltip:AddLine(14, s_format("^7Spectre Reservation: %s%d", colorCodes.SPIRIT, tostring(minion.spectreReservation)))
tooltip:AddLine(14, s_format("^7Companion Reservation: %s%s%%", colorCodes.SPIRIT, tostring(minion.companionReservation)))
tooltip:AddLine(14, "^7Category: "..minion.monsterCategory)
tooltip:AddLine(14, s_format("^7Life Multiplier: x%.2f", minion.life))
if minion.energyShield then
tooltip:AddLine(14, s_format("^7Energy Shield: %d%% of base Life", minion.energyShield * 100))
Expand All @@ -59,20 +64,35 @@ function MinionListClass:AddValueTooltip(tooltip, index, minionId)
if minion.evasion then
tooltip:AddLine(14, s_format("^7Evasion Multiplier: x%.2f", 1 + minion.evasion))
end
tooltip:AddLine(14, s_format("^7Resistances: %s%d^7/%s%d^7/%s%d^7/%s%d",
tooltip:AddLine(14, s_format("^7Resistances: %s%d ^7/ %s%d ^7/ %s%d ^7/ %s%d",
colorCodes.FIRE, minion.fireResist,
colorCodes.COLD, minion.coldResist,
colorCodes.LIGHTNING, minion.lightningResist,
colorCodes.CHAOS, minion.chaosResist
))
tooltip:AddLine(14, s_format("^7Base Damage: x%.2f", minion.damage))
tooltip:AddLine(14, s_format("^7Base Attack Speed: %.2f", 1 / minion.attackTime))

tooltip:AddLine(14, s_format("^7Base Movement Speed: %.2f", minion.baseMovementSpeed / 10))
for _, skillId in ipairs(minion.skillList) do
if self.data.skills[skillId] then
tooltip:AddLine(14, "^7Skill: "..self.data.skills[skillId].name)
end
end
tooltip:AddSeparator(10)
if #minion.spawnLocation > 0 then
local coloredLocations = {}
for _, location in ipairs(minion.spawnLocation) do -- Print (Map) or (Act 7) in white, and map name in green.
local mainText, bracket = location:match("^(.-)%s*(%b())%s*$")
table.insert(coloredLocations, bracket and (colorCodes.RELIC .. mainText .. " " .. "^7" .. bracket) or (colorCodes.RELIC .. location))
end
for i, spawn in ipairs(coloredLocations) do
if i == 1 then
tooltip:AddLine(14, s_format("^7Spawn: %s", spawn))
else
tooltip:AddLine(14, s_format("^7%s%s", " ", spawn)) -- Indented so all locations line up vertically in tooltip
end
end
end
end
end

Expand Down Expand Up @@ -101,3 +121,66 @@ function MinionListClass:OnSelDelete(index, minionId)
self.selValue = nil
end
end

local SpawnListClass = newClass("SpawnListControl", "ListControl", function(self, anchor, rect, data, list, label)
self.ListControl(anchor, rect, 16, "VERTICAL", false)
self.data = data
self.label = label or "^7Available Items:"
end)

function SpawnListClass:GetRowValue(column, index, spawnLocation)
return spawnLocation
end
function SpawnListClass:AddValueTooltip(tooltip, index, value)
if tooltip:CheckForUpdate(value) then
local foundArea = nil
for _, area in pairs(data.worldAreas) do
if area.name == value and #area .monsterVarieties > 0 then
foundArea = area
break
end
end
if foundArea then
tooltip:AddLine(18, foundArea.name)
if foundArea.description and foundArea.description ~= "" then
tooltip:AddLine(14, colorCodes.CURRENCY .. '"' .. foundArea.description .. '"')
end
if foundArea.bossVarieties and #foundArea.bossVarieties > 0 then
tooltip:AddLine(14, colorCodes.UNIQUE.. "Bosses: ^7" .. table.concat(foundArea.bossVarieties, ", "))
end
tooltip:AddLine(14, "^7Area Level: "..foundArea.level)
local biomeNameMap = {
water_biome = "Water",
mountain_biome = "Mountain",
grass_biome = "Grass",
forest_biome = "Forest",
swamp_biome = "Swamp",
desert_biome = "Desert",
faridun_city = "Faridun City",
ezomyte_city = "Ezomyte City",
vaal_city = "Vaal City",
}
if #foundArea.tags > 0 then
local biomeNameList = {}
for _, tag in ipairs(foundArea.tags) do
local biomeName = biomeNameMap[tag]
if biomeName then
table.insert(biomeNameList, biomeName)
end
end
if #biomeNameList > 0 then
tooltip:AddLine(14, "^7Biome: " .. table.concat(biomeNameList, ", "))
end
end
tooltip:AddSeparator(10)
tooltip:AddLine(14, "^7Spectres:")
for _, monsterName in ipairs(foundArea.monsterVarieties) do
tooltip:AddLine(14, " - " .. monsterName)
end
elseif value == "Found in Maps" then
-- no tooltip
else
tooltip:AddLine(18, "^7World area not found: " .. tostring(value))
end
end
end
82 changes: 76 additions & 6 deletions src/Classes/MinionSearchListControl.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,44 @@ local t_insert = table.insert
local t_remove = table.remove
local s_format = string.format

local MinionSearchListClass = newClass("MinionSearchListControl", "MinionListControl", function(self, anchor, rect, data, list, dest)
self.MinionListControl(anchor, rect, data, list, dest)
local MinionSearchListClass = newClass("MinionSearchListControl", "MinionListControl", function(self, anchor, rect, data, list, dest, label)
self.MinionListControl(anchor, rect, data, list, dest, label)
self:sortSourceList()
self.unfilteredList = copyTable(list)
self.isMutable = false

self.controls.searchText = new("EditControl", {"BOTTOMLEFT",self,"TOPLEFT"}, {0, -2, 128, 18}, "", "Search", "%c", 100, function(buf)
self.controls.searchText = new("EditControl", {"BOTTOMLEFT",self,"TOPLEFT"}, {0, -2, 148, 18}, "", "Search", "%c", 100, function(buf)
self:ListFilterChanged(buf, self.controls.searchModeDropDown.selIndex)
self:sortSourceList()
end, nil, nil, true)

self.controls.searchModeDropDown = new("DropDownControl", {"LEFT",self.controls.searchText,"RIGHT"}, {2, 0, 60, 18}, { "Names", "Skills", "Both"}, function(index, value)
self:ListFilterChanged(self.controls.searchText.buf, index)
self:sortSourceList()
end)
self.controls.sortModeDropDown = new("DropDownControl", {"BOTTOMRIGHT", self.controls.searchModeDropDown, "TOPRIGHT"}, {0, -2, self.width, 18}, {
"Sort by Names",
"Sort by Life + ES",
"Sort by Life",
"Sort by Energy Shield",
"Sort by Attack Speed",
"Sort by Companion Reservation",
"Sort by Spectre Reservation",
"Sort by Fire Resistance",
"Sort by Cold Resistance",
"Sort by Lightning Resistance",
"Sort by Chaos Resistance",
"Sort by Total Resistance",
"Sort by Movement Speed",
}, function(index, value)
self:sortSourceList()
end)

self.labelPositionOffset = {0, -20}
self.labelPositionOffset = {0, -40}
if dest then
self.controls.add.y = self.controls.add.y - 20
self.controls.add.y = self.controls.add.y - 40
else
self.controls.delete.y = self.controls.add.y - 20
self.controls.delete.y = self.controls.add.y - 40
end

end)
Expand Down Expand Up @@ -65,3 +85,53 @@ function MinionSearchListClass:ListFilterChanged(buf, filterMode)
self.list = self.unfilteredList
end
end

function MinionSearchListClass:sortSourceList()
local sortFields = {
[1] = { field = "name", asc = true },
[2] = { field = "totalHitPoints", asc = false },
[3] = { field = "life", asc = false },
[4] = { field = "energyShield", asc = false },
[5] = { field = "attackTime", asc = true },
[6] = { field = "companionReservation", asc = true },
[7] = { field = "spectreReservation", asc = true },
[8] = { field = "fireResist", asc = false },
[9] = { field = "coldResist", asc = false },
[10] = { field = "lightningResist", asc = false },
[11] = { field = "chaosResist", asc = false },
[12] = { field = "totalResist", asc = false },
[13] = { field = "baseMovementSpeed", asc = false },
}
local sortModeIndex = self.controls.sortModeDropDown and self.controls.sortModeDropDown.selIndex or 1
local sortOption = sortFields[sortModeIndex]
if sortOption then
table.sort(self.list, function(a, b)
local minionA = self.data.minions[a]
local minionB = self.data.minions[b]
local valueA = minionA[sortOption.field]
local valueB = minionB[sortOption.field]
if sortOption.field == "life" then
valueA = minionA.life * (1 - (minionA.energyShield or 0))
valueB = minionB.life * (1 - (minionB.energyShield or 0))
elseif sortOption.field == "totalHitPoints" then
valueA = minionA.life
valueB = minionB.life
elseif sortOption.field == "energyShield" then
valueA = (minionA.energyShield or 0) * minionA.life
valueB = (minionB.energyShield or 0) * minionB.life
elseif sortOption.field == "totalResist" then
valueA = (minionA.fireResist or 0) + (minionA.coldResist or 0) + (minionA.lightningResist or 0) + (minionA.chaosResist or 0)
valueB = (minionB.fireResist or 0) + (minionB.coldResist or 0) + (minionB.lightningResist or 0) + (minionB.chaosResist or 0)
end
if valueA == valueB then
return minionA.name < minionB.name
else
if sortOption.asc then
return valueA < valueB
else
return valueA > valueB
end
end
end)
end
end
5 changes: 3 additions & 2 deletions src/Classes/ModStore.lua
Original file line number Diff line number Diff line change
Expand Up @@ -698,13 +698,14 @@ function ModStoreClass:EvalMod(mod, cfg)
matchName = matchName:lower()
if tag.skillNameList then
for _, name in pairs(tag.skillNameList) do
if name:lower() == matchName then
local nameLower = name:lower()
if (tag.partialMatch and matchName:find(nameLower, 1, true)) or (not tag.partialMatch and nameLower == matchName) then
match = true
break
end
end
else
match = (tag.skillName and tag.skillName:lower() == matchName)
match = (tag.partialMatch and matchName:find(tag.skillName:lower(), 1, true) ~= nil) or (tag.skillName:lower() == matchName)
end
end
if tag.neg then
Expand Down
Loading