Skip to content

Add support for Elusive and its modifiers, unify Wither and Withered #1708

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 6 commits into
base: master
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
10 changes: 10 additions & 0 deletions Data/3_0/SkillStatMap.lua
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,9 @@ return {
["aura_effect_+%"] = {
mod("AuraEffect", "INC", nil),
},
["elusive_effect_+%"] = {
mod("ElusiveEffect", "INC", nil, 0, 0, { type = "GlobalEffect", effectType = "Buff" }),
},

--
-- Offensive modifiers
Expand Down Expand Up @@ -363,6 +366,13 @@ return {
["critical_strike_multiplier_+_per_power_charge"] = {
mod("CritMultiplier", "BASE", nil, 0, 0, { type = "Multiplier", var = "PowerCharge" }),
},
["additional_critical_strike_chance_permyriad_while_affected_by_elusive"] = {
mod("CritChance", "BASE", nil, 0, 0, { type = "Condition", var = "Elusive" }, { type = "Condition", varList = { "UsingClaw", "UsingDagger"} } ),
div = 100,
},
["nightblade_elusive_grants_critical_strike_multiplier_+_to_supported_skills"] = {
mod("CritMultiplier", "BASE", nil, 0, 0, { type = "Condition", var = "Elusive" }, { type = "Condition", varList = { "UsingClaw", "UsingDagger" } } ),
},
-- Duration
["buff_effect_duration_+%_per_removable_endurance_charge"] = {
mod("Duration", "INC", nil, 0, 0, { type = "Multiplier", var = "RemovableEnduranceCharge" }),
Expand Down
9 changes: 9 additions & 0 deletions Data/3_0/Skills/act_dex.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7045,11 +7045,20 @@ skills["Slither"] = {
skillTypes = { [SkillType.TravelSkill] = true, [SkillType.Buff] = true, [SkillType.Instant] = true, [SkillType.Area] = true, [SkillType.ChaosSkill] = true, [SkillType.MovementSkill] = true, [SkillType.BlinkSkill] = true, [SkillType.Spell] = true, [SkillType.Triggerable] = true, [SkillType.Duration] = true, },
statDescriptionScope = "buff_skill_stat_descriptions",
castTime = 0,
statMap = {
["slither_wither_stacks"] = {
flag("Condition:CanWither"),
mod("Dummy", "DUMMY", 1, 0, 0, { type = "Condition", var = "CanWither" }),
},
},
baseFlags = {
spell = true,
duration = true,
},
baseMods = {
mod("ChaosDamageTaken", "INC", 6, 0, 0, { type = "GlobalEffect", effectType = "Debuff", effectName = "Withered", effectStackVar = "WitheredStackCount", effectStackLimit = 15 }),
flag("Condition:CanBeElusive"),
mod("Dummy", "DUMMY", 1, 0, 0, { type = "Condition", var = "CanBeElusive" }),
},
qualityStats = {
{ "elusive_effect_+%", 0.5 },
Expand Down
6 changes: 4 additions & 2 deletions Data/3_0/Skills/act_int.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7758,10 +7758,12 @@ skills["Wither"] = {
div = 1000,
},
["chaos_damage_taken_+%"] = {
mod("ChaosDamageTaken", "INC", nil, 0, 0, { type = "GlobalEffect", effectType = "Debuff", effectName = "Withered" }),
flag("Condition:CanWither"),
mod("Dummy", "DUMMY", 1, 0, 0, { type = "Condition", var = "CanWither" }),
mod("ChaosDamageTaken", "INC", 6, 0, 0, { type = "GlobalEffect", effectType = "Debuff", effectName = "Withered", effectStackVar = "WitheredStackCount", effectStackLimit = 15 }),
},
["base_movement_velocity_+%"] = {
mod("MovementSpeed", "INC", nil, 0, 0, { type = "GlobalEffect", effectType = "Debuff", effectName = "Withered" }),
mod("MovementSpeed", "INC", nil, 0, 0, { type = "GlobalEffect", effectType = "Debuff", effectName = "Wither" }),
},
},
baseFlags = {
Expand Down
15 changes: 14 additions & 1 deletion Data/3_0/Skills/sup_dex.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1805,7 +1805,14 @@ skills["SupportPuncturingWeapon"] = {
ignoreMinionTypes = true,
statDescriptionScope = "gem_stat_descriptions",
baseMods = {
flag("Condition:CanBeElusive"),
mod("Dummy", "DUMMY", 1, 0, 0, { type = "Condition", var = "CanBeElusive" }),
},
statMap = {
["elusive_effect_+%"] = {
mod("ElusiveEffect", "INC", nil, 0, 0, { type = "GlobalEffect", effectType = "Buff", effectName = "Nightblade" }, { type = "Condition", varList = { "UsingClaw", "UsingDagger" } } ),
},
},
qualityStats = {
{ "critical_strike_chance_+%", 1 },
},
Expand Down Expand Up @@ -2815,8 +2822,14 @@ skills["SupportChaosAttacks"] = {
excludeSkillTypes = { },
statDescriptionScope = "gem_stat_descriptions",
baseMods = {
mod("ChaosDamageTaken", "INC", 6, 0, 0, { type = "GlobalEffect", effectType = "Debuff", effectName = "Withered", effectStackVar = "WitheringTouchWitheredStackCount", effectStackLimit = 15 }),
mod("ChaosDamageTaken", "INC", 6, 0, 0, { type = "GlobalEffect", effectType = "Debuff", effectName = "Withered", effectStackVar = "WitheredStackCount", effectStackLimit = 15 }),
},
statMap = {
["withered_on_hit_chance_%"] = {
flag("Condition:CanWither"),
mod("Dummy", "DUMMY", 1, 0, 0, { type = "Condition", var = "CanWither" }),
},
},
qualityStats = {
{ "chaos_damage_+%", 0.5 },
},
Expand Down
3 changes: 3 additions & 0 deletions Modules/CalcDefence-3_0.lua
Original file line number Diff line number Diff line change
Expand Up @@ -554,6 +554,9 @@ function calcs.defence(env, actor)
total = s_format("= %.2f ^8(effective movement speed modifier)", output.EffectiveMovementSpeedMod)
})
end
if modDB:Flag(nil, "Elusive") then
output.ElusiveEffectMod = calcLib.mod(modDB, nil, "ElusiveEffect", "BuffEffectOnSelf") * 100
end
output.BlockChanceMax = modDB:Sum("BASE", nil, "BlockChanceMax")
local baseBlockChance = 0
if actor.itemList["Weapon 2"] and actor.itemList["Weapon 2"].armourData then
Expand Down
7 changes: 7 additions & 0 deletions Modules/CalcPerform.lua
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,13 @@ local function doActorMisc(env, actor)
modDB:NewMod("Speed", "INC", 20, "Her Embrace")
modDB:NewMod("MovementSpeed", "INC", 20, "Her Embrace")
end
if modDB:Flag(nil, "Elusive") then
local effect = 1 + modDB:Sum("INC", nil, "ElusiveEffect", "BuffEffectOnSelf") / 100
condList["Elusive"] = true
modDB:NewMod("AttackDodgeChance", "BASE", m_floor(20 * effect), "Elusive")
modDB:NewMod("SpellDodgeChance", "BASE", m_floor(20 * effect), "Elusive")
modDB:NewMod("MovementSpeed", "INC", m_floor(40 * effect), "Elusive")
end
if modDB:Flag(nil, "Chill") then
local effect = m_max(m_floor(30 * calcLib.mod(modDB, nil, "SelfChillEffect")), 0)
modDB:NewMod("ActionSpeed", "INC", effect * (modDB:Flag(nil, "SelfChillEffectIsReversed") and 1 or -1), "Chill")
Expand Down
1 change: 1 addition & 0 deletions Modules/CalcSections-3_0.lua
Original file line number Diff line number Diff line change
Expand Up @@ -975,6 +975,7 @@ return {
} },
{ 1, "MiscDefences", 3, "Other Defences", colorCodes.DEFENCE, {
{ label = "Movement Speed", { format = "x {2:output:EffectiveMovementSpeedMod}", { breakdown = "EffectiveMovementSpeedMod" }, { modName = "MovementSpeed" }, }, },
{ label = "Effect of Elusive", haveOutput = "ElusiveEffectMod", { format = "{0:output:ElusiveEffectMod}%", { breakdown = "ElusiveEffectMod" }, { modName = { "ElusiveEffect", "BuffEffectOnSelf" }, }, } },
{ label = "Dodge Chance", { format = "{0:output:AttackDodgeChance}%", { modName = "AttackDodgeChance" }, }, },
{ label = "Spell Ddg. Chance", { format = "{0:output:SpellDodgeChance}%", { modName = "SpellDodgeChance" }, }, },
{ label = "Block Chance", { format = "{0:output:BlockChance}%",
Expand Down
3 changes: 3 additions & 0 deletions Modules/Calcs.lua
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,9 @@ function calcs.buildOutput(build, mode)
for name in pairs(env.buffs) do
t_insert(buffList, name)
end
if env.modDB:Flag(nil, "Elusive") then
t_insert(combatList, "Elusive")
end
table.sort(buffList)
env.player.breakdown.SkillBuffs = { modList = { } }
for _, name in ipairs(buffList) do
Expand Down
13 changes: 8 additions & 5 deletions Modules/ConfigOptions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -178,11 +178,7 @@ return {
{ var = "winterOrbStages", type = "count", label = "Stages:", ifSkill = "Winter Orb", apply = function(val, modList, enemyModList)
modList:NewMod("Multiplier:WinterOrbStage", "BASE", val, "Config", { type = "SkillName", skillName = "Winter Orb" })
end },
{ label = "Withering Touch:", ifSkill = "Withering Touch" },
{ var = "witheringTouchWitheredStackCount", type = "count", label = "# of Withered Stacks:", ifSkill = "Withering Touch", apply = function(val, modList, enemyModList)
modList:NewMod("Multiplier:WitheringTouchWitheredStackCount", "BASE", val, "Config")
end },


-- Section: Map modifiers/curses
{ section = "Map Modifiers and Player Debuffs", col = 2 },
{ label = "Map Prefix Modifiers:" },
Expand Down Expand Up @@ -393,6 +389,10 @@ return {
{ var = "buffAdrenaline", type = "check", label = "Do you have Adrenaline?", tooltip = "This will enable the Adrenaline buff:\n100% increased Damage\n25% increased Attack, Cast and Movement Speed\n10% additional Physical Damage Reduction", apply = function(val, modList, enemyModList)
modList:NewMod("Condition:Adrenaline", "FLAG", true, "Config", { type = "Condition", var = "Combat" })
end },
{ var = "buffElusive", type = "check", label = "Are you Elusive?", ifCond = "CanBeElusive", tooltip = "In addition to allowing any 'while Elusive' modifiers to apply,\nthis will enable the Elusive buff itself. (20% Attack and Spell Dodge, 40% increased Movement Speed)\nThe effect of Elusive decays over time.", apply = function(val, modList, enemyModList)
modList:NewMod("Condition:Elusive", "FLAG", true, "Config", { type = "Condition", varList = { "Combat", "Elusive" } })
modList:NewMod("Elusive", "FLAG", true, "Config", { type = "Condition", varList = { "Combat", "Elusive" } })
end },
{ var = "buffDivinity", type = "check", label = "Do you have Divinity?", ifCond = "Divinity", tooltip = "This will enable the Divinity buff:\n50% more Elemental Damage\n20% less Elemental Damage Taken", apply = function(val, modList, enemyModList)
modList:NewMod("Condition:Divinity", "FLAG", true, "Config", { type = "Condition", var = "Combat" })
end },
Expand Down Expand Up @@ -697,6 +697,9 @@ return {
{ var = "multiplierPoisonOnEnemy", type = "count", label = "# of Poison on Enemy:", implyCond = "Poisoned", apply = function(val, modList, enemyModList)
enemyModList:NewMod("Multiplier:PoisonStack", "BASE", val, "Config", { type = "Condition", var = "Effective" })
end },
{ var = "multiplierWitheredStackCount", type = "count", label = "# of Withered Stacks:", ifCond = "CanWither", tooltip = "Withered applies 6% increased Chaos Damage Taken to the enemy, up to 15 stacks.", apply = function(val, modList, enemyModList)
modList:NewMod("Multiplier:WitheredStackCount", "BASE", val, "Config", { type = "Condition", var = "Effective" })
end },
{ var = "conditionEnemyMaimed", type = "check", label = "Is the enemy Maimed?", apply = function(val, modList, enemyModList)
enemyModList:NewMod("Condition:Maimed", "FLAG", true, "Config", { type = "Condition", var = "Effective" })
end },
Expand Down
8 changes: 8 additions & 0 deletions Modules/ModParser-3_0.lua
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,8 @@ local modNameList = {
["fortify duration"] = "FortifyDuration",
["effect of fortify on you"] = "FortifyEffectOnSelf",
["effect of tailwind on you"] = "TailwindEffectOnSelf",
["elusive effect"] = "ElusiveEffect",
["effect of elusive on you"] = "ElusiveEffect",
-- Basic damage types
["damage"] = "Damage",
["physical damage"] = "PhysicalDamage",
Expand Down Expand Up @@ -822,6 +824,8 @@ local modTagList = {
["while you have onslaught"] = { tag = { type = "Condition", var = "Onslaught" } },
["while phasing"] = { tag = { type = "Condition", var = "Phasing" } },
["while you have tailwind"] = { tag = { type = "Condition", var = "Tailwind" } },
["while elusive"] = { tag = { type = "Condition", var = "Elusive" } },
["gain elusive"] = { tag = { type = "Condition", varList = { "CanBeElusive", "Elusive" } } },
["while you have arcane surge"] = { tag = { type = "Condition", var = "AffectedByArcaneSurge" } },
["while you have cat's stealth"] = { tag = { type = "Condition", var = "AffectedByCat'sStealth" } },
["while you have avian's might"] = { tag = { type = "Condition", var = "AffectedByAvian'sMight" } },
Expand Down Expand Up @@ -1147,6 +1151,10 @@ local specialModList = {
mod("NonChaosDamageGainAsChaos", "BASE", num, { type = "Condition", var = "KilledRecently" }, { type = "Multiplier", var = "CurseOnEnemy" }),
} end,
["cannot be stunned while you have energy shield"] = { mod("AvoidStun", "BASE", 100, { type = "Condition", var = "HaveEnergyShield" }) },
-- ["inflict withered"] = {
-- flag("Condition:CanWither"),
-- mod("Dummy", "DUMMY", 1, 0, 0, { type = "Condition", var = "CanWither" })
-- },
-- Pathfinder
["always poison on hit while using a flask"] = { mod("PoisonChance", "BASE", 100, { type = "Condition", var = "UsingFlask" }) },
["poisons you inflict during any flask effect have (%d+)%% chance to deal (%d+)%% more damage"] = function(num, _, more) return { mod("Damage", "MORE", tonumber(more) * num / 100, nil, 0, KeywordFlag.Poison, { type = "Condition", var = "UsingFlask" }) } end,
Expand Down