Skip to content

Thorns Support #610

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 4 commits into
base: dev
Choose a base branch
from
Open
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
1 change: 1 addition & 0 deletions src/Data/Global.lua
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ colorCodes = {
COLD = "^x3F6DB3",
LIGHTNING = "^xADAA47",
CHAOS = "^xD02090",
THORNS = "^x00CB3A",
POSITIVE = "^x33FF77",
NEGATIVE = "^xDD0022",
HIGHLIGHT ="^xFF0000",
Expand Down
43 changes: 22 additions & 21 deletions src/Data/ModCache.lua

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions src/Data/Skills/act_str.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10475,6 +10475,12 @@ skills["ScavengedPlatingPlayer"] = {
["scavenged_plating_maximum_stacks_display"] = {
mod("Multiplier:ScavengedPlatingStacksLimit", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Buff", effectName = "Scavenged Plating"}),
},
["scavenged_plating_thorns_minimum_physical_damage"] = {
mod("ThornsPhysicalMin", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Buff", effectName = "Scavenged Plating" }, { type = "Multiplier", var = "ScavengedPlatingStacks", limitVar = "ScavengedPlatingStacksLimit" }),
},
["scavenged_plating_thorns_maximum_physical_damage"] = {
mod("ThornsPhysicalMax", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Buff", effectName = "Scavenged Plating" }, { type = "Multiplier", var = "ScavengedPlatingStacks", limitVar = "ScavengedPlatingStacksLimit" }),
},
},
baseFlags = {
duration = true,
Expand Down
6 changes: 6 additions & 0 deletions src/Export/Skills/act_str.txt
Original file line number Diff line number Diff line change
Expand Up @@ -627,6 +627,12 @@ statMap = {
["scavenged_plating_maximum_stacks_display"] = {
mod("Multiplier:ScavengedPlatingStacksLimit", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Buff", effectName = "Scavenged Plating"}),
},
["scavenged_plating_thorns_minimum_physical_damage"] = {
mod("ThornsPhysicalMin", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Buff", effectName = "Scavenged Plating" }, { type = "Multiplier", var = "ScavengedPlatingStacks", limitVar = "ScavengedPlatingStacksLimit" }),
},
["scavenged_plating_thorns_maximum_physical_damage"] = {
mod("ThornsPhysicalMax", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Buff", effectName = "Scavenged Plating" }, { type = "Multiplier", var = "ScavengedPlatingStacks", limitVar = "ScavengedPlatingStacksLimit" }),
},
},
#mods
#skillEnd
Expand Down
91 changes: 91 additions & 0 deletions src/Modules/CalcSections.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1375,6 +1375,97 @@ return {
{ label = "Enemy ES Recovery", haveOutput = "EnemyEnergyShieldRegen", { format = "{0:output:EnemyEnergyShieldRegen}%", { modName = "EnergyShieldRegen", modType = "INC", enemy = true }, }, },
} }
} },
{ 3 , "ThornsDamage", 1, colorCodes.THORNS, {{ defaultCollapsed = false, label = "Thorns Damage", data = {
colWidth = 95,
{
{ format = "All Types:", },
{ format = "Physical:" },
{ format = colorCodes.LIGHTNING.."Lightning:" },
{ format = colorCodes.COLD.."Cold:" },
{ format = colorCodes.FIRE.."Fire:" },
{ format = colorCodes.CHAOS.."Chaos:" },
},
{ label = "Added Min",
{ },
{ format = "{0:mod:1,2}",
{ label = "Player modifiers", modName = "ThornsPhysicalMin", modType = "BASE", cfg = "skill" },
{ label = "Enemy modifiers", modName = "SelfThornsPhysicalMin", modType = "BASE", enemy = true, cfg = "skill" },
},
{ format = "{0:mod:1,2}",
{ label = "Player modifiers", modName = "ThornsLightningMin", modType = "BASE", cfg = "skill" },
{ label = "Enemy modifiers", modName = "SelfThornsLightningMin", modType = "BASE", enemy = true, cfg = "skill" },
},
{ format = "{0:mod:1,2}",
{ label = "Player modifiers", modName = "ThornsColdMin", modType = "BASE", cfg = "skill" },
{ label = "Enemy modifiers", modName = "SelfThornsColdMin", modType = "BASE", enemy = true, cfg = "skill" },
},
{ format = "{0:mod:1,2}",
{ label = "Player modifiers", modName = "ThornsFireMin", modType = "BASE", cfg = "skill" },
{ label = "Enemy modifiers", modName = "SelfThornsFireMin", modType = "BASE", enemy = true, cfg = "skill" },
},
{ format = "{0:mod:1,2}",
{ label = "Player modifiers", modName = "ThornsChaosMin", modType = "BASE", cfg = "skill" },
{ label = "Enemy modifiers", modName = "SelfThornsChaosMin", modType = "BASE", enemy = true, cfg = "skill" },
},
},
{ label = "Added Max",
{ },
{ format = "{0:mod:1,2}",
{ label = "Player modifiers", modName = "ThornsPhysicalMax", modType = "BASE", cfg = "skill" },
{ label = "Enemy modifiers", modName = "SelfThornsPhysicalMax", modType = "BASE", enemy = true, cfg = "skill" },
},
{ format = "{0:mod:1,2}",
{ label = "Player modifiers", modName = "ThornsLightningMax", modType = "BASE", cfg = "skill" },
{ label = "Enemy modifiers", modName = "SelfThornsLightningMax", modType = "BASE", enemy = true, cfg = "skill" },
},
{ format = "{0:mod:1,2}",
{ label = "Player modifiers", modName = "ThornsColdMax", modType = "BASE", cfg = "skill" },
{ label = "Enemy modifiers", modName = "SelfThornsColdMax", modType = "BASE", enemy = true, cfg = "skill" },
},
{ format = "{0:mod:1,2}",
{ label = "Player modifiers", modName = "ThornsFireMax", modType = "BASE", cfg = "skill" },
{ label = "Enemy modifiers", modName = "SelfThornsFireMax", modType = "BASE", enemy = true, cfg = "skill" },
},
{ format = "{0:mod:1,2}",
{ label = "Player modifiers", modName = "ThornsChaosMax", modType = "BASE", cfg = "skill" },
{ label = "Enemy modifiers", modName = "SelfThornsChaosMax", modType = "BASE", enemy = true, cfg = "skill" },
},
},
-- Thorns Damage
{ label = "Total Increased",
{ format = "{0:mod:1}%", { modName = "ThornsDamage", modType = "INC", cfg = "skill" }, },
{ format = "{0:mod:1}%", { modName = "ThornsPhysicalDamage", modType = "INC", cfg = "skill" }, },
{ format = "{0:mod:1}%", { modName = { "ThornsLightningDamage", "ThornsElementalDamage" }, modType = "INC", cfg = "skill" }, },
{ format = "{0:mod:1}%", { modName = { "ThornsColdDamage", "ThornsElementalDamage" }, modType = "INC", cfg = "skill" }, },
{ format = "{0:mod:1}%", { modName = { "ThornsFireDamage", "ThornsElementalDamage" }, modType = "INC", cfg = "skill" }, },
{ format = "{0:mod:1}%", { modName = "ThornsChaosDamage", modType = "INC", cfg = "skill" }, },
},
{ label = "Total More",
{ format = "{0:mod:1}%", { modName = "ThornsDamage", modType = "MORE", cfg = "skill" }, },
{ format = "{0:mod:1}%", { modName = "ThornsPhysicalDamage", modType = "MORE", cfg = "skill" }, },
{ format = "{0:mod:1}%", { modName = { "ThornsLightningDamage", "ThornsElementalDamage" }, modType = "MORE", cfg = "skill" }, },
{ format = "{0:mod:1}%", { modName = { "ThornsColdDamage", "ThornsElementalDamage" }, modType = "MORE", cfg = "skill" }, },
{ format = "{0:mod:1}%", { modName = { "ThornsFireDamage", "ThornsElementalDamage" }, modType = "MORE", cfg = "skill" }, },
{ format = "{0:mod:1}%", { modName = "ThornsChaosDamage", modType = "MORE", cfg = "skill" }, },
},
{ label = "Total Crit Chance",
{ format = "{0:mod:1}%", { modName = "ThornsCritChance", modType = "BASE", cfg = "skill" }, },
{ format = "{0:mod:1}%", { modName = "ThornsPhysicalCritChance", modType = "BASE", cfg = "skill" }, },
{ format = "{0:mod:1}%", { modName = { "ThornsLightningCritChance", "ThornsElementalCritChance" }, modType = "BASE", cfg = "skill" }, },
{ format = "{0:mod:1}%", { modName = { "ThornsColdCritChance", "ThornsElementalCritChance" }, modType = "BASE", cfg = "skill" }, },
{ format = "{0:mod:1}%", { modName = { "ThornsFireCritChance", "ThornsElementalCritChance" }, modType = "BASE", cfg = "skill" }, },
{ format = "{0:mod:1}%", { modName = "ThornsChaosCritChance", modType = "BASE", cfg = "skill" }, },
},
{ label = "Total Crit Multiplier",
{ format = "{0:mod:1}%", { modName = "ThornsCritMultiplier", modType = "INC", cfg = "skill" }, },
{ format = "{0:mod:1}%", { modName = "ThornsPhysicalCritMultiplier", modType = "INC", cfg = "skill" }, },
{ format = "{0:mod:1}%", { modName = { "ThornsLightningCritMultiplier", "ThornsElementalCritMultiplier" }, modType = "INC", cfg = "skill" }, },
{ format = "{0:mod:1}%", { modName = { "ThornsColdCritMultiplier", "ThornsElementalCritMultiplier" }, modType = "INC", cfg = "skill" }, },
{ format = "{0:mod:1}%", { modName = { "ThornsFireCritMultiplier", "ThornsElementalCritMultiplier" }, modType = "INC", cfg = "skill" }, },
{ format = "{0:mod:1}%", { modName = "ThornsChaosCritMultiplier", modType = "INC", cfg = "skill" }, },
},
} }
} },
-- attributes/resists
{ 1, "Attributes", 2, colorCodes.NORMAL, {{ defaultCollapsed = false, label = "Attributes", data = {
extra = colorCodes.STRENGTH.."{0:output:Str}^7, "..colorCodes.DEXTERITY.."{0:output:Dex}^7, "..colorCodes.INTELLIGENCE.."{0:output:Int}^7",
Expand Down
12 changes: 12 additions & 0 deletions src/Modules/ModParser.lua
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ local formList = {
["(%d+)%-(%d+) added (%a+) damage"] = "DMG",
["(%d+) to (%d+) additional (%a+) damage"] = "DMG",
["(%d+)%-(%d+) additional (%a+) damage"] = "DMG",
["^(%d+) to (%d+) (%a+) thorns damage"] = "THORNS_DMG",
["^(%d+) to (%d+) (%a+) damage"] = "DMG",
["adds (%d+) to (%d+) (%a+) damage"] = "DMG",
["adds (%d+)%-(%d+) (%a+) damage"] = "DMG",
Expand Down Expand Up @@ -634,6 +635,7 @@ local modNameList = {
["chaos damage"] = "ChaosDamage",
["non-chaos damage"] = "NonChaosDamage",
["elemental damage"] = "ElementalDamage",
["thorns damage"] = "ThornsDamage",
-- Other damage forms
["attack damage"] = { "Damage", flags = ModFlag.Attack },
["attack physical damage"] = { "PhysicalDamage", flags = ModFlag.Attack },
Expand Down Expand Up @@ -674,8 +676,10 @@ local modNameList = {
["damage over time multiplier"] = "DotMultiplier",
-- Crit/accuracy/speed modifiers
["critical hit chance"] = "CritChance",
["thorns critical hit chance"] = "ThornsCritChance",
["attack critical hit chance"] = { "CritChance", flags = ModFlag.Attack },
["critical damage bonus"] = "CritMultiplier",
["thorns critical damage bonus"] = "ThornsCritMultiplier",
["attack critical damage bonus"] = { "CritMultiplier", flags = ModFlag.Attack },
["critical spell damage bonus"] = { "CritMultiplier", flags = ModFlag.Spell },
["accuracy"] = "Accuracy",
Expand Down Expand Up @@ -4322,6 +4326,10 @@ local specialModList = {
["ignore all movement penalties from armour"] = { flag("Condition:IgnoreMovementPenalties") },
["gain armour equal to your reserved mana"] = { mod("Armour", "BASE", 1, { type = "PerStat", stat = "ManaReserved", div = 1 }) },
["gain ward instead of (%d+)%% of armour and evasion rating from equipped body armour"] = function(num) return {flag("ConvertBodyArmourArmourEvasionToWard"), mod("BodyArmourArmourEvasionToWardPercent", "BASE", num)} end,
["gain physical thorns damage equal to (%d+)%% of armour from equipped body armour"] = function(num) return {
mod("ThornsPhysicalMin", "BASE", 1, { type = "PercentStat", stat = "ArmourOnBody Armour", percent = num }),
mod("ThornsPhysicalMax", "BASE", 1, { type = "PercentStat", stat = "ArmourOnBody Armour", percent = num }),
} end,
["(%d+)%% increased armour per (%d+) reserved mana"] = function(num, _, mana) return { mod("Armour", "INC", num, { type = "PerStat", stat = "ManaReserved", div = tonumber(mana) }) } end,
["cannot be stunned"] = { flag("StunImmune"), },
["cannot be stunned while bleeding"] = { flag("StunImmune", { type = "Condition", var = "Bleeding" }), },
Expand Down Expand Up @@ -6066,6 +6074,10 @@ local function parseMod(line, order)
end
modValue = { tonumber(formCap[1]), tonumber(formCap[2]) }
modName = { damageType.."Min", damageType.."Max" }
elseif modForm == "THORNS_DMG" then
local damageType = "Thorns" .. dmgTypes[formCap[3]]
modValue = { tonumber(formCap[1]), tonumber(formCap[2]) }
modName = { damageType.."Min", damageType.."Max" }
elseif modForm == "DMGATTACKS" then
local damageType = dmgTypes[formCap[3]]
if not damageType then
Expand Down
Loading