Skip to content
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

Spectre Affliction Support Enhance #7135

Merged
merged 5 commits into from
Jan 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 5 additions & 0 deletions src/Classes/CalcBreakdownControl.lua
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,10 @@ function CalcBreakdownClass:AddModSection(sectionData, modList)
row.sourceName = build.data.skills[row.mod.source:match("Skill:(.+)")].name
elseif sourceType == "Pantheon" then
row.sourceName = row.mod.source:match("Pantheon:(.+)")
elseif sourceType == "Spectre" then
row.sourceName = row.mod.source:match("Spectre:(.+)")
end

if row.mod.flags ~= 0 or row.mod.keywordFlags ~= 0 then
-- Combine, sort and format modifier flags
local flagNames = { }
Expand Down Expand Up @@ -455,6 +458,8 @@ function CalcBreakdownClass:AddModSection(sectionData, modList)
desc = self:FormatModName(tag.effectType)
elseif tag.type == "Limit" then
desc = "Limited to "..(tag.limitVar and self:FormatModName(tag.limitVar) or self:FormatModBase(row.mod, tag.limit))
elseif tag.type == "MonsterCategory" then
desc = "Monster Category: "..(tag.monsterCategoryList and table.concat(tag.monsterCategoryList, "/") or tag.monsterCategory)
else
desc = self:FormatModName(tag.type)
end
Expand Down
14 changes: 10 additions & 4 deletions src/Classes/MinionListControl.lua
Original file line number Diff line number Diff line change
Expand Up @@ -49,21 +49,27 @@ function MinionListClass:AddValueTooltip(tooltip, index, minionId)
if tooltip:CheckForUpdate(minionId) then
local minion = self.data.minions[minionId]
tooltip:AddLine(18, "^7"..minion.name)
tooltip:AddLine(14, s_format("^7Life multiplier: x%.2f", minion.life))

if minion.monsterCategory then
tooltip:AddLine(14, "^7Monster Category: "..minion.monsterCategory)
end

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))
end
if minion.armour then
tooltip:AddLine(14, s_format("^7Armour multiplier: x%.2f", minion.armour))
tooltip:AddLine(14, s_format("^7Armour Multiplier: x%.2f", minion.armour))
end
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 Damage: x%.2f", minion.damage))
tooltip:AddLine(14, s_format("^7Base Attack Speed: %.2f", 1 / minion.attackTime))

for _, skillId in ipairs(minion.skillList) do
if self.data.skills[skillId] then
tooltip:AddLine(14, "^7Skill: "..self.data.skills[skillId].name)
Expand Down
27 changes: 27 additions & 0 deletions src/Classes/ModStore.lua
Original file line number Diff line number Diff line change
Expand Up @@ -751,6 +751,33 @@ function ModStoreClass:EvalMod(mod, cfg)
if band(cfg.keywordFlags, tag.keywordFlags) ~= tag.keywordFlags then
return
end
elseif tag.type == "MonsterCategory" then
-- actor should be a minion to apply
if not self.actor or not self.actor.minionData or not self.actor.minionData.monsterCategory then
return
end

local match = false

-- validate for actor and minionData
local matchName = self.actor.minionData.monsterCategory
matchName = matchName:lower()
if tag.monsterCategoryList then
for _, name in pairs(tag.monsterCategoryList) do
if name:lower() == matchName then
match = true
break
end
end
else
match = (tag.monsterCategory and tag.monsterCategory:lower() == matchName)
end
if tag.neg then
match = not match
end
if not match then
return
end
end
end
return value
Expand Down
39 changes: 39 additions & 0 deletions src/Data/Minions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ local minions, mod = ...

minions["RaisedZombie"] = {
name = "Raised Zombie",
monsterCategory = "Undead",
life = 3.75,
armour = 0.7,
fireResist = 40,
Expand All @@ -33,6 +34,7 @@ minions["RaisedZombie"] = {

minions["SummonedChaosGolem"] = {
name = "Chaos Golem",
monsterCategory = "Construct",
life = 6.9,
energyShield = 0.2,
fireResist = 40,
Expand All @@ -59,6 +61,7 @@ minions["SummonedChaosGolem"] = {

minions["SummonedFlameGolem"] = {
name = "Flame Golem",
monsterCategory = "Construct",
life = 5.82,
energyShield = 0.4,
fireResist = 70,
Expand Down Expand Up @@ -87,6 +90,7 @@ minions["SummonedFlameGolem"] = {

minions["SummonedIceGolem"] = {
name = "Ice Golem",
monsterCategory = "Construct",
life = 5.82,
energyShield = 0.4,
fireResist = 40,
Expand Down Expand Up @@ -114,6 +118,7 @@ minions["SummonedIceGolem"] = {

minions["SummonedLightningGolem"] = {
name = "Lightning Golem",
monsterCategory = "Construct",
life = 5.82,
energyShield = 0.2,
fireResist = 40,
Expand Down Expand Up @@ -141,6 +146,7 @@ minions["SummonedLightningGolem"] = {

minions["SummonedStoneGolem"] = {
name = "Stone Golem",
monsterCategory = "Construct",
life = 7.25,
armour = 0.6,
fireResist = 40,
Expand All @@ -166,6 +172,7 @@ minions["SummonedStoneGolem"] = {

minions["SummonedRagingSpirit"] = {
name = "Raging Spirit",
monsterCategory = "Construct",
life = 2.16,
fireResist = 40,
coldResist = 40,
Expand All @@ -191,6 +198,7 @@ minions["SummonedRagingSpirit"] = {

minions["SummonedEssenceSpirit"] = {
name = "Essence Spirit",
monsterCategory = "Construct",
life = 2.25,
fireResist = 40,
coldResist = 40,
Expand All @@ -213,6 +221,7 @@ minions["SummonedEssenceSpirit"] = {

minions["SummonedSpectralWolf"] = {
name = "Spectral Wolf Companion",
monsterCategory = "Beast",
life = 4.5,
fireResist = 40,
coldResist = 40,
Expand All @@ -234,6 +243,7 @@ minions["SummonedSpectralWolf"] = {

minions["RaisedSkeleton"] = {
name = "Summoned Skeleton",
monsterCategory = "Humanoid",
life = 1.05,
fireResist = 40,
coldResist = 40,
Expand All @@ -260,6 +270,7 @@ minions["RaisedSkeleton"] = {

minions["RaisedSkeletonCaster"] = {
name = "Summoned Skeleton Caster",
monsterCategory = "Humanoid",
life = 1.05,
energyShield = 0.4,
fireResist = 40,
Expand All @@ -284,6 +295,7 @@ minions["RaisedSkeletonCaster"] = {

minions["RaisedSkeletonArcher"] = {
name = "Summoned Skeleton Archer",
monsterCategory = "Humanoid",
life = 1.05,
fireResist = 40,
coldResist = 40,
Expand All @@ -305,6 +317,7 @@ minions["RaisedSkeletonArcher"] = {

minions["Clone"] = {
name = "Clone",
monsterCategory = "Construct",
life = 1,
fireResist = 40,
coldResist = 40,
Expand All @@ -325,6 +338,7 @@ minions["Clone"] = {

minions["ArrowClone"] = {
name = "Clone",
monsterCategory = "Construct",
life = 1.5,
fireResist = 40,
coldResist = 40,
Expand All @@ -345,6 +359,7 @@ minions["ArrowClone"] = {

minions["SpiderMinion"] = {
name = "Spider Minion",
monsterCategory = "Beast",
life = 1.8,
fireResist = 40,
coldResist = 40,
Expand All @@ -368,6 +383,7 @@ minions["SpiderMinion"] = {

minions["AnimatedWeapon"] = {
name = "Animated Weapon",
monsterCategory = "Construct",
life = 4,
fireResist = 40,
coldResist = 40,
Expand All @@ -388,6 +404,7 @@ minions["AnimatedWeapon"] = {

minions["AnimatedArmour"] = {
name = "Animated Guardian",
monsterCategory = "Construct",
life = 5,
armour = 0.5,
fireResist = 40,
Expand All @@ -412,6 +429,7 @@ minions["AnimatedArmour"] = {

minions["IcyRagingSpirit"] = {
name = "Grave Spirit",
monsterCategory = "Construct",
life = 3.75,
fireResist = 40,
coldResist = 40,
Expand All @@ -434,6 +452,7 @@ minions["IcyRagingSpirit"] = {

minions["UniqueAnimatedWeapon"] = {
name = "Dancing Dervish",
monsterCategory = "Construct",
life = 5,
fireResist = 40,
coldResist = 40,
Expand All @@ -454,6 +473,7 @@ minions["UniqueAnimatedWeapon"] = {

minions["SummonedPhantasm"] = {
name = "Summoned Phantasm",
monsterCategory = "Undead",
life = 1.58,
energyShield = 0.2,
fireResist = 40,
Expand All @@ -477,6 +497,7 @@ minions["SummonedPhantasm"] = {

minions["HeraldOfAgonySpiderPlated"] = {
name = "Agony Crawler",
monsterCategory = "Beast",
life = 1.5,
fireResist = 0,
coldResist = 0,
Expand All @@ -503,6 +524,7 @@ minions["HeraldOfAgonySpiderPlated"] = {

minions["AxisEliteSoldierHeraldOfLight"] = {
name = "Sentinel of Purity",
monsterCategory = "Humanoid",
life = 3.4,
armour = 0.5,
fireResist = 40,
Expand All @@ -528,6 +550,7 @@ minions["AxisEliteSoldierHeraldOfLight"] = {

minions["HolyLivingRelic"] = {
name = "Holy Relic",
monsterCategory = "Construct",
life = 6,
energyShield = 0.6,
fireResist = 40,
Expand All @@ -551,6 +574,7 @@ minions["HolyLivingRelic"] = {

minions["AxisEliteSoldierDominatingBlow"] = {
name = "Sentinel of Dominance",
monsterCategory = "Humanoid",
life = 4,
armour = 0.5,
fireResist = 40,
Expand Down Expand Up @@ -578,6 +602,7 @@ minions["AxisEliteSoldierDominatingBlow"] = {

minions["AxisEliteSoldierDominatingBlowVaal"] = {
name = "Ascended Sentinel of Dominance",
monsterCategory = "Humanoid",
life = 4,
armour = 0.5,
fireResist = 40,
Expand Down Expand Up @@ -605,6 +630,7 @@ minions["AxisEliteSoldierDominatingBlowVaal"] = {

minions["AbsolutionTemplarJudge"] = {
name = "Sentinel of Absolution",
monsterCategory = "Humanoid",
life = 4,
energyShield = 0.2,
armour = 0.5,
Expand All @@ -629,6 +655,7 @@ minions["AbsolutionTemplarJudge"] = {

minions["AbsolutionTemplarJudgeVaal"] = {
name = "Ascended Sentinel of Absolution",
monsterCategory = "Humanoid",
life = 4,
energyShield = 0.2,
armour = 0.5,
Expand Down Expand Up @@ -656,6 +683,7 @@ minions["AbsolutionTemplarJudgeVaal"] = {

minions["RhoaUniqueSummoned"] = {
name = "Summoned Rhoa",
monsterCategory = "Beast",
life = 9,
armour = 0.2,
fireResist = 40,
Expand All @@ -681,6 +709,7 @@ minions["RhoaUniqueSummoned"] = {

minions["SnakeSpitUniqueSummoned"] = {
name = "Summoned Cobra",
monsterCategory = "Beast",
life = 9,
armour = 0.15,
fireResist = 40,
Expand All @@ -704,6 +733,7 @@ minions["SnakeSpitUniqueSummoned"] = {

minions["DropBearUniqueSummoned"] = {
name = "Summoned Ursa",
monsterCategory = "Beast",
life = 9,
armour = 0.5,
fireResist = 40,
Expand All @@ -729,6 +759,7 @@ minions["DropBearUniqueSummoned"] = {

minions["SummonedCarrionGolem"] = {
name = "Carrion Golem",
monsterCategory = "Construct",
life = 5.82,
energyShield = 0.4,
fireResist = 40,
Expand Down Expand Up @@ -756,6 +787,7 @@ minions["SummonedCarrionGolem"] = {

minions["SkitterbotCold"] = {
name = "Chilling Skitterbot",
monsterCategory = "Construct",
life = 1,
fireResist = 0,
coldResist = 0,
Expand All @@ -777,6 +809,7 @@ minions["SkitterbotCold"] = {

minions["SkitterbotLightning"] = {
name = "Shocking Skitterbot",
monsterCategory = "Construct",
life = 1,
fireResist = 0,
coldResist = 0,
Expand All @@ -798,6 +831,7 @@ minions["SkitterbotLightning"] = {

minions["SummonedReaper"] = {
name = "Reaper",
monsterCategory = "Undead",
life = 3.74,
armour = 1,
fireResist = 40,
Expand Down Expand Up @@ -833,6 +867,7 @@ minions["SummonedReaper"] = {

minions["SummonedArbalists"] = {
name = "Summoned Arbalist",
monsterCategory = "Undead",
life = 7.41,
fireResist = 40,
coldResist = 40,
Expand All @@ -854,6 +889,7 @@ minions["SummonedArbalists"] = {

minions["GuardianSentinel"] = {
name = "Sentinel of Radiance",
monsterCategory = "Humanoid",
life = 12,
armour = 0.5,
fireResist = 40,
Expand Down Expand Up @@ -900,6 +936,7 @@ minions["GuardianRelicAll"] = {

minions["GuardianRelicFire"] = {
name = "Fire Relic",
monsterCategory = "Construct",
life = 4,
energyShield = 0.6,
fireResist = 40,
Expand All @@ -922,6 +959,7 @@ minions["GuardianRelicFire"] = {

minions["GuardianRelicCold"] = {
name = "Cold Relic",
monsterCategory = "Construct",
life = 4,
energyShield = 0.6,
fireResist = 40,
Expand All @@ -944,6 +982,7 @@ minions["GuardianRelicCold"] = {

minions["GuardianRelicLightning"] = {
name = "Lightning Relic",
monsterCategory = "Construct",
life = 4,
energyShield = 0.6,
fireResist = 40,
Expand Down
Loading
Loading