Skip to content
Closed
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
46 changes: 24 additions & 22 deletions src/Data/ModCache.lua

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/Data/SkillStatMap.lua
Original file line number Diff line number Diff line change
Expand Up @@ -996,7 +996,7 @@ return {
mod("ImprovedSpellDamageAppliesToAttacks", "MAX", nil),
},
["additive_thorns_damage_modifiers_apply_to_attack_damage"] = {
flag("ThornsDamageAppliesToHits"),
flag("ThornsModifiersApplyToHits"),
},
["active_skill_main_hand_weapon_damage_+%_final"] = {
mod("Damage", "MORE", nil, 0, 0, { type = "Condition", var = "MainHandAttack" }),
Expand Down
80 changes: 80 additions & 0 deletions src/Data/Skills/other.lua
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,86 @@ skills["AcidicConcoctionPlayer"] = {
},
}
}
skills["ThornsPlayer"] = {
name = "Thorns",
hidden = true,
fromItem = true,
skillTypes = { [SkillType.Damage] = true },
qualityStats = {},
levels = {
[1] = { levelRequirement = 0 },
},
preDamageFunc = function(activeSkill, output, breakdown)
local skillModList = activeSkill.skillModList
local cfg = activeSkill.skillCfg

if activeSkill.actor and activeSkill.actor.modDB and activeSkill.actor.modDB:Flag(nil, "Condition:Shapeshifted") then
skillModList:NewMod("Condition:Shapeshifted", "FLAG", true, "Thorns")
end

for _, value in ipairs(skillModList:Tabulate("INC", cfg, "ThornsDamage")) do
local mod = value.mod
skillModList:NewMod("Damage", "INC", mod.value, mod.source, mod.flags, mod.keywordFlags, unpack(mod))
end
local function remapThornsBase(fromStat, toStat)
for _, value in ipairs(skillModList:Tabulate("BASE", cfg, fromStat)) do
local mod = value.mod
skillModList:NewMod(toStat, "BASE", mod.value, mod.source, mod.flags, mod.keywordFlags, unpack(mod))
end
end

remapThornsBase("PhysicalThornsMin", "PhysicalMin")
remapThornsBase("PhysicalThornsMax", "PhysicalMax")
remapThornsBase("FireThornsMin", "FireMin")
remapThornsBase("FireThornsMax", "FireMax")
remapThornsBase("ColdThornsMin", "ColdMin")
remapThornsBase("ColdThornsMax", "ColdMax")
remapThornsBase("LightningThornsMin", "LightningMin")
remapThornsBase("LightningThornsMax", "LightningMax")
remapThornsBase("ChaosThornsMin", "ChaosMin")
remapThornsBase("ChaosThornsMax", "ChaosMax")

-- Crit calculations
for _, value in ipairs(skillModList:Tabulate("BASE", cfg, "ThornsCritChance")) do
local mod = value.mod
skillModList:NewMod("CritChance", "BASE", mod.value, mod.source, mod.flags, mod.keywordFlags, unpack(mod))
end

for _, value in ipairs(skillModList:Tabulate("INC", cfg, "ThornsCritChance")) do
local mod = value.mod
skillModList:NewMod("CritChance", "INC", mod.value, mod.source, mod.flags, mod.keywordFlags, unpack(mod))
end

for _, value in ipairs(skillModList:Tabulate("INC", cfg, "ThornsCritMultiplier")) do
local mod = value.mod
skillModList:NewMod("CritMultiplier", "INC", mod.value, mod.source, mod.flags, mod.keywordFlags, unpack(mod))
end

for _, value in ipairs(skillModList:Tabulate("BASE", cfg, "ThornsChanceToIgnoreEnemyArmour")) do
local mod = value.mod
skillModList:NewMod("ChanceToIgnoreEnemyPhysicalDamageReduction", "BASE", mod.value, mod.source, mod.flags, mod.keywordFlags, unpack(mod))
end
end,
statSets = {
[1] = {
label = "Thorns",
incrementalEffectiveness = 0,
statDescriptionScope = "skill_stat_descriptions",
baseFlags = {
thorns = true,
},
baseMods = {
flag("CannotBleed"),
flag("CannotPoison"),
},
constantStats = {},
stats = {},
levels = {
[1] = {},
},
},
}
}
skills["AlignFatePlayer"] = {
name = "Align Fate",
baseTypeName = "Align Fate",
Expand Down
69 changes: 69 additions & 0 deletions src/Data/Skills/sup_str.lua
Original file line number Diff line number Diff line change
Expand Up @@ -540,6 +540,11 @@ skills["SupportBarbsPlayer"] = {
label = "Barbs I",
incrementalEffectiveness = 0.054999999701977,
statDescriptionScope = "gem_stat_descriptions",
statMap = {
["deal_thorns_damage_on_hit_for_X_hits_after_thorns_trigger"] = {
flag("ThornsDamageAppliesToHits"),
},
},
baseFlags = {
},
constantStats = {
Expand Down Expand Up @@ -571,6 +576,11 @@ skills["SupportBarbsPlayerTwo"] = {
label = "Barbs II",
incrementalEffectiveness = 0.054999999701977,
statDescriptionScope = "gem_stat_descriptions",
statMap = {
["deal_thorns_damage_on_hit_for_X_hits_after_thorns_trigger"] = {
flag("ThornsDamageAppliesToHits"),
},
},
baseFlags = {
},
constantStats = {
Expand Down Expand Up @@ -602,6 +612,12 @@ skills["SupportBarbsPlayerThree"] = {
label = "Barbs III",
incrementalEffectiveness = 0.054999999701977,
statDescriptionScope = "gem_stat_descriptions",
statMap = {
["deal_thorns_damage_twice_on_hit_for_X_hits_after_thorns_trigger"] = {
flag("ThornsDamageAppliesToHits"),
flag("BarbsThornsTwiceOnHit"),
},
},
baseFlags = {
},
constantStats = {
Expand Down Expand Up @@ -5200,6 +5216,11 @@ skills["SupportQuillburstPlayer"] = {
label = "Quill Burst",
incrementalEffectiveness = 0.054999999701977,
statDescriptionScope = "gem_stat_descriptions",
statMap = {
["trigger_spiked_gauntlets_for_X_hits_after_thorns_trigger"] = {
flag("EnableTriggeredQuillburst"),
},
},
baseFlags = {
},
constantStats = {
Expand All @@ -5221,6 +5242,53 @@ skills["TriggeredQuillburstPlayer"] = {
castTime = 1,
qualityStats = {
},
preDamageFunc = function(activeSkill, output, breakdown)
local skillModList = activeSkill.skillModList
local cfg = activeSkill.skillCfg

local function remapThornsBase(fromStat, toStat)
for _, value in ipairs(skillModList:Tabulate("BASE", cfg, fromStat)) do
local mod = value.mod
skillModList:NewMod(toStat, "BASE", mod.value, mod.source, mod.flags, mod.keywordFlags, unpack(mod))
end
end

for _, value in ipairs(skillModList:Tabulate("INC", cfg, "ThornsDamage")) do
local mod = value.mod
skillModList:NewMod("Damage", "INC", mod.value, mod.source, mod.flags, mod.keywordFlags, unpack(mod))
end

remapThornsBase("PhysicalThornsMin", "PhysicalMin")
remapThornsBase("PhysicalThornsMax", "PhysicalMax")
remapThornsBase("FireThornsMin", "FireMin")
remapThornsBase("FireThornsMax", "FireMax")
remapThornsBase("ColdThornsMin", "ColdMin")
remapThornsBase("ColdThornsMax", "ColdMax")
remapThornsBase("LightningThornsMin", "LightningMin")
remapThornsBase("LightningThornsMax", "LightningMax")
remapThornsBase("ChaosThornsMin", "ChaosMin")
remapThornsBase("ChaosThornsMax", "ChaosMax")

for _, value in ipairs(skillModList:Tabulate("BASE", cfg, "ThornsCritChance")) do
local mod = value.mod
skillModList:NewMod("CritChance", "BASE", mod.value, mod.source, mod.flags, mod.keywordFlags, unpack(mod))
end

for _, value in ipairs(skillModList:Tabulate("INC", cfg, "ThornsCritChance")) do
local mod = value.mod
skillModList:NewMod("CritChance", "INC", mod.value, mod.source, mod.flags, mod.keywordFlags, unpack(mod))
end

for _, value in ipairs(skillModList:Tabulate("INC", cfg, "ThornsCritMultiplier")) do
local mod = value.mod
skillModList:NewMod("CritMultiplier", "INC", mod.value, mod.source, mod.flags, mod.keywordFlags, unpack(mod))
end

for _, value in ipairs(skillModList:Tabulate("BASE", cfg, "ThornsChanceToIgnoreEnemyArmour")) do
local mod = value.mod
skillModList:NewMod("ChanceToIgnoreEnemyPhysicalDamageReduction", "BASE", mod.value, mod.source, mod.flags, mod.keywordFlags, unpack(mod))
end
end,
levels = {
[1] = { cooldown = 0.15, levelRequirement = 0, storedUses = 1, },
},
Expand All @@ -5230,6 +5298,7 @@ skills["TriggeredQuillburstPlayer"] = {
incrementalEffectiveness = 0.054999999701977,
statDescriptionScope = "triggered_spiked_gauntlets",
baseFlags = {
thorns = true,
},
constantStats = {
{ "triggered_by_spiked_gauntlets_support_%", 100 },
Expand Down
21 changes: 21 additions & 0 deletions src/Export/Skills/sup_str.txt
Original file line number Diff line number Diff line change
Expand Up @@ -107,16 +107,32 @@ statMap = {

#skill SupportBarbsPlayer
#set SupportBarbsPlayer
statMap = {
["deal_thorns_damage_on_hit_for_X_hits_after_thorns_trigger"] = {
flag("ThornsDamageAppliesToHits"),
},
}
#mods
#skillEnd

#skill SupportBarbsPlayerTwo
#set SupportBarbsPlayerTwo
statMap = {
["deal_thorns_damage_on_hit_for_X_hits_after_thorns_trigger"] = {
flag("ThornsDamageAppliesToHits"),
},
}
#mods
#skillEnd

#skill SupportBarbsPlayerThree
#set SupportBarbsPlayerThree
statMap = {
["deal_thorns_damage_twice_on_hit_for_X_hits_after_thorns_trigger"] = {
flag("ThornsDamageAppliesToHits"),
flag("BarbsThornsTwiceOnHit"),
},
}
#mods
#skillEnd

Expand Down Expand Up @@ -1211,6 +1227,11 @@ statMap = {

#skill SupportQuillburstPlayer
#set SupportQuillburstPlayer
statMap = {
["trigger_spiked_gauntlets_for_X_hits_after_thorns_trigger"] = {
flag("EnableTriggeredQuillburst"),
},
}
#mods
#skillEnd

Expand Down
55 changes: 52 additions & 3 deletions src/Modules/CalcOffence.lua
Original file line number Diff line number Diff line change
Expand Up @@ -725,13 +725,62 @@ function calcs.offence(env, actor, activeSkill)
end
end
end
if skillModList:Flag(nil, "ThornsDamageAppliesToHits") then
-- Caltrops mod
for i, value in ipairs(skillModList:Tabulate("INC", { }, "ThornsDamage")) do

-- Apply thorns-derived modifiers to hits
if skillModList:Flag(nil, "ThornsModifiersApplyToHits") or skillModList:Flag(nil, "ThornsDamageAppliesToHits") then
-- % increased Thorns damage
for _, value in ipairs(skillModList:Tabulate("INC", {}, "ThornsDamage")) do
local mod = value.mod
skillModList:NewMod("Damage", "INC", mod.value, mod.source, ModFlag.Hit, mod.keywordFlags, unpack(mod))
end

-- Thorns crit chance
for _, value in ipairs(skillModList:Tabulate("BASE", {}, "ThornsCritChance")) do
local mod = value.mod
skillModList:NewMod("CritChance", "BASE", mod.value, mod.source, mod.flags, mod.keywordFlags, unpack(mod))
end
for _, value in ipairs(skillModList:Tabulate("INC", {}, "ThornsCritChance")) do
local mod = value.mod
skillModList:NewMod("CritChance", "INC", mod.value, mod.source, mod.flags, mod.keywordFlags, unpack(mod))
end

-- Thorns crit multiplier
for _, value in ipairs(skillModList:Tabulate("INC", {}, "ThornsCritMultiplier")) do
local mod = value.mod
skillModList:NewMod("CritMultiplier", "INC", mod.value, mod.source, mod.flags, mod.keywordFlags, unpack(mod))
end

-- Thorns chance to ignore enemy armour
for _, value in ipairs(skillModList:Tabulate("BASE", {}, "ThornsChanceToIgnoreEnemyArmour")) do
local mod = value.mod
skillModList:NewMod("ChanceToIgnoreEnemyPhysicalDamageReduction", "BASE", mod.value, mod.source, mod.flags, mod.keywordFlags, unpack(mod))
end
end

-- Apply full thorns damage payload to hits
if skillModList:Flag(nil, "ThornsDamageAppliesToHits") then
local multiplier = skillModList:Flag(nil, "BarbsThornsTwiceOnHit") and 2 or 1

local function remapThornsBase(fromStat, toStat)
for _, value in ipairs(skillModList:Tabulate("BASE", {}, fromStat)) do
local mod = value.mod
skillModList:NewMod(toStat, "BASE", mod.value * multiplier, mod.source, ModFlag.Hit, mod.keywordFlags, unpack(mod))
end
end

-- Base thorns damage to hits
remapThornsBase("PhysicalThornsMin", "PhysicalMin")
remapThornsBase("PhysicalThornsMax", "PhysicalMax")
remapThornsBase("FireThornsMin", "FireMin")
remapThornsBase("FireThornsMax", "FireMax")
remapThornsBase("ColdThornsMin", "ColdMin")
remapThornsBase("ColdThornsMax", "ColdMax")
remapThornsBase("LightningThornsMin", "LightningMin")
remapThornsBase("LightningThornsMax", "LightningMax")
remapThornsBase("ChaosThornsMin", "ChaosMin")
remapThornsBase("ChaosThornsMax", "ChaosMax")
end

if skillModList:Flag(nil, "CastSpeedAppliesToAttacks") then
-- Get all increases for this; assumption is that multiple sources would not stack, so find the max
local multiplier = (skillModList:Max(skillCfg, "ImprovedCastSpeedAppliesToAttacks") or 100) / 100
Expand Down
5 changes: 5 additions & 0 deletions src/Modules/CalcPerform.lua
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,11 @@ local function doActorAttribsConditions(env, actor)
condList["Channelling"] = true
end
end

if env.configInput.conditionShapeshifted then
condList["Shapeshifted"] = true
end

if actor.mainSkill.skillTypes[SkillType.Bear] then
condList["Shapeshifted"] = true
condList["BearForm"] = true
Expand Down
4 changes: 2 additions & 2 deletions src/Modules/CalcSections.lua
Original file line number Diff line number Diff line change
Expand Up @@ -623,7 +623,7 @@ return {
} }
} },
{ 1, "SkillTypeStats", 1, colorCodes.OFFENCE, {{ defaultCollapsed = false, label = "Skill type-specific Stats", data = {
{ label = "Gem Level", haveOutput = "GemHasLevel", { format = "{0:output:GemLevel}", { breakdown = "GemLevel" }, { modName = { "GemLevel" }, cfg = "skill" },{ modName = { "GemSupportLevel" }, cfg = "skill" }, { modName = { "GemItemLevel" }, cfg = "skill" }, }, },
{ label = "Gem Level", notFlag = "thorns", haveOutput = "GemHasLevel", { format = "{0:output:GemLevel}", { breakdown = "GemLevel" }, { modName = { "GemLevel" }, cfg = "skill" }, { modName = { "GemSupportLevel" }, cfg = "skill" }, { modName = { "GemItemLevel" }, cfg = "skill" }, }, },
{ label = "Spirit Cost", color = colorCodes.SPIRIT, haveOutput = "SpiritHasCost", { format = "{0:output:SpiritCost}", { breakdown = "SpiritCost" }, { modName = { "SpiritCost", "Cost", "SpiritCostNoMult" }, cfg = "skill" }, }, },
{ label = "Spirit % Cost", color = colorCodes.SPIRIT, haveOutput = "SpiritPercentHasCost", { format = "{0:output:SpiritPercentCost}", { breakdown = "SpiritPercentCost" }, { modName = { "SpiritCost", "Cost", "SpiritCostNoMult" }, cfg = "skill" }, }, },
{ label = "Mana Cost", color = colorCodes.MANA, haveOutput = "ManaHasCost", { format = "{0:output:ManaCost}", { breakdown = "ManaCost" }, { modName = { "ManaCost", "Cost", "ManaCostNoMult" }, cfg = "skill" }, }, },
Expand Down Expand Up @@ -721,7 +721,7 @@ return {
{ modName = { "CurseDelay" }, cfg = "skill" },
{ modName = { "CurseActivation" }, cfg = "skill" },
} },
{ label = "Curse Limit", haveOutput = "EnemyCurseLimit", { format = "{0:output:EnemyCurseLimit}",
{ label = "Curse Limit", notFlag = "thorns", haveOutput = "EnemyCurseLimit", { format = "{0:output:EnemyCurseLimit}",
{ breakdown = "EnemyCurseLimit" },
{ modName = { "CurseLimitIsMaximumPowerCharges", "EnemyCurseLimit" } },
}, },
Expand Down
Loading