Skip to content

Commit 35d4507

Browse files
committed
implement slow magnitude
1 parent 269c1b7 commit 35d4507

File tree

7 files changed

+71
-13
lines changed

7 files changed

+71
-13
lines changed

src/Data/ModCache.lua

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2526,12 +2526,10 @@ c["Deal up to 30% more Damage to Enemies based on their missing Concentration"]=
25262526
c["Deals 25% of current Mana as Chaos Damage to you when Effect ends"]={nil,"Deals 25% of current Mana as Chaos Damage to you when Effect ends "}
25272527
c["Debuffs on you expire 10% faster"]={{[1]={flags=0,keywordFlags=0,name="SelfDebuffExpirationRate",type="BASE",value=10}},nil}
25282528
c["Debuffs on you expire 20% faster"]={{[1]={flags=0,keywordFlags=0,name="SelfDebuffExpirationRate",type="BASE",value=20}},nil}
2529-
c["Debuffs you inflict have 10% increased Slow Magnitude"]={nil,"Debuffs you inflict have 10% increased Slow Magnitude "}
2530-
c["Debuffs you inflict have 10% increased Slow Magnitude Debuffs on you expire 20% faster"]={nil,"Debuffs you inflict have 10% increased Slow Magnitude Debuffs on you expire 20% faster "}
2531-
c["Debuffs you inflict have 4% increased Slow Magnitude"]={nil,"Debuffs you inflict have 4% increased Slow Magnitude "}
2532-
c["Debuffs you inflict have 4% increased Slow Magnitude 20% increased Hinder Duration"]={nil,"Debuffs you inflict have 4% increased Slow Magnitude 20% increased Hinder Duration "}
2533-
c["Debuffs you inflict have 5% increased Slow Magnitude"]={nil,"Debuffs you inflict have 5% increased Slow Magnitude "}
2534-
c["Debuffs you inflict have 6% increased Slow Magnitude"]={nil,"Debuffs you inflict have 6% increased Slow Magnitude "}
2529+
c["Debuffs you inflict have 10% increased Slow Magnitude"]={{[1]={flags=0,keywordFlags=0,name="EnemySlowMagnitude",type="INC",value=10}},nil}
2530+
c["Debuffs you inflict have 4% increased Slow Magnitude"]={{[1]={flags=0,keywordFlags=0,name="EnemySlowMagnitude",type="INC",value=4}},nil}
2531+
c["Debuffs you inflict have 5% increased Slow Magnitude"]={{[1]={flags=0,keywordFlags=0,name="EnemySlowMagnitude",type="INC",value=5}},nil}
2532+
c["Debuffs you inflict have 6% increased Slow Magnitude"]={{[1]={flags=0,keywordFlags=0,name="EnemySlowMagnitude",type="INC",value=6}},nil}
25352533
c["Decimating Strike"]={nil,"Decimating Strike "}
25362534
c["Defend with 120% of Armour against Projectile Attacks"]={nil,"Defend with 120% of Armour against Projectile Attacks "}
25372535
c["Defend with 120% of Armour while not on Low Energy Shield"]={{[1]={[1]={neg=true,type="Condition",var="LowEnergyShield"},flags=0,keywordFlags=0,name="ArmourDefense",source="Armour and Energy Shield Mastery",type="MAX",value=20}},nil}
@@ -2584,7 +2582,7 @@ c["Enemies in your Presence are Blinded"]={nil,"Enemies in your Presence are Bli
25842582
c["Enemies in your Presence are Blinded Enemies in your Presence gain Critical Weakness every second"]={nil,"Enemies in your Presence are Blinded Enemies in your Presence gain Critical Weakness every second "}
25852583
c["Enemies in your Presence are Ignited as though dealt 100 Base Fire Damage"]={nil,"Enemies in your Presence are Ignited as though dealt 100 Base Fire Damage "}
25862584
c["Enemies in your Presence are Intimidated"]={nil,"Enemies in your Presence are Intimidated "}
2587-
c["Enemies in your Presence are Slowed by 20%"]={nil,"Enemies in your Presence are Slowed by 20% "}
2585+
c["Enemies in your Presence are Slowed by 20%"]={{[1]={flags=0,keywordFlags=0,name="EnemyModifier",type="LIST",value={mod={flags=0,keywordFlags=0,name="Condition:Slowed",type="FLAG",value=true}}},[2]={flags=0,keywordFlags=0,name="EnemyModifier",type="LIST",value={mod={[1]={effectType="AuraDebuff",type="GlobalEffect"},[2]={type="Condition",var="Slowed"},flags=0,keywordFlags=0,name="ApexOfMomentSlow",type="INC",value=-20}}}},nil}
25882586
c["Enemies in your Presence gain Critical Weakness every second"]={{[1]={flags=0,keywordFlags=0,name="ApplyCriticalWeakness",type="FLAG",value=true}},nil}
25892587
c["Enemies in your Presence have 10% reduced Cooldown Recovery Rate"]={nil,"Enemies in your Presence have 10% reduced Cooldown Recovery Rate "}
25902588
c["Enemies in your Presence have Fire Exposure"]={nil,"Enemies in your Presence have Fire Exposure "}

src/Data/Skills/act_int.lua

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16611,6 +16611,14 @@ skills["TemporalChainsPlayer"] = {
1661116611
baseEffectiveness = 0,
1661216612
incrementalEffectiveness = 0.092720001935959,
1661316613
statDescriptionScope = "temporal_chains",
16614+
statMap = {
16615+
["temporal_chains_base_action_speed_+%_final_to_apply"] = {
16616+
mod("TemporalChainsActionSpeed", "INC", nil, 0, 0, { type = "GlobalEffect", effectType = "Curse" })
16617+
},
16618+
["buff_time_passed_+%_other_than_temporal_chains"] = {
16619+
mod("BuffExpireFaster", "MORE", nil, 0, 0, { type = "GlobalEffect", effectType = "Curse" }),
16620+
},
16621+
},
1661416622
baseFlags = {
1661516623
area = true,
1661616624
duration = true,

src/Export/Skills/act_int.txt

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -989,7 +989,15 @@ statMap = {
989989

990990
#skill TemporalChainsPlayer
991991
#set TemporalChainsPlayer
992-
#flags area duration
992+
#flags spell area duration curse
993+
statMap = {
994+
["temporal_chains_base_action_speed_+%_final_to_apply"] = {
995+
mod("TemporalChainsActionSpeed", "INC", nil, 0, 0, { type = "GlobalEffect", effectType = "Curse" })
996+
},
997+
["buff_time_passed_+%_other_than_temporal_chains"] = {
998+
mod("BuffExpireFaster", "MORE", nil, 0, 0, { type = "GlobalEffect", effectType = "Curse" }),
999+
},
1000+
},
9931001
#mods
9941002
#skillEnd
9951003

src/Modules/CalcPerform.lua

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -751,11 +751,36 @@ local function doActorCharges(env, actor)
751751
modDB.multipliers["SpiritCharge"] = output.SpiritCharges
752752
end
753753

754+
-- Process slow effects/magnitude
755+
local function applySlowMagnitude(env)
756+
local modDB = env.modDB
757+
local enemyDB = env.enemyDB
758+
if enemyDB:HasMod("INC", nil, "TemporalChainsActionSpeed", nil) then
759+
enemyDB:NewMod("Condition:Slowed", "FLAG", true, 'Skill:TemporalChainsPlayer')
760+
end
761+
762+
if enemyDB:Flag(nil, "Condition:Slowed") then
763+
local slowMagnitude = modDB:Sum("INC", nil, "EnemySlowMagnitude") / 100
764+
if slowMagnitude > 0 then
765+
enemyDB:ScaleAddMod(modLib.createMod("TemporalChainsActionSpeed", "INC", enemyDB:Sum("INC", nil, "TemporalChainsActionSpeed"), "Slow Magnitude"), slowMagnitude)
766+
enemyDB:ScaleAddMod(modLib.createMod("ApexOfMomentSlow", "INC", enemyDB:Sum("INC", nil, "ApexOfMomentSlow"), "Slow Magnitude"), slowMagnitude)
767+
end
768+
end
769+
end
770+
754771
function calcs.actionSpeedMod(actor)
755772
local modDB = actor.modDB
756773
local minimumActionSpeed = modDB:Max(nil, "MinimumActionSpeed") or 0
757774
local maximumActionSpeedReduction = modDB:Max(nil, "MaximumActionSpeedReduction")
758-
local actionSpeedMod = 1 + (m_max(-data.misc.TemporalChainsEffectCap, modDB:Sum("INC", nil, "TemporalChainsActionSpeed")) + modDB:Sum("INC", nil, "ActionSpeed")) / 100
775+
776+
local apexOfMoment = modDB:Sum("INC", nil, "ApexOfMomentSlow")
777+
local tempChains = modDB:Sum("INC", nil, "TemporalChainsActionSpeed")
778+
local chill = modDB:Sum("INC", nil, "ActionSpeed", "Chill")
779+
780+
local slowMultiplier = (1 + tempChains / 100) * (1 + apexOfMoment / 100) * (1 + chill / 100) * modDB:More(nil, "ActionSpeed", "Less Slow")
781+
local slowEffect = (1 - slowMultiplier) * 100
782+
783+
local actionSpeedMod = 1 + (-slowEffect + modDB:Sum("INC", nil, "ActionSpeed")) / 100
759784
actionSpeedMod = m_max(minimumActionSpeed / 100, actionSpeedMod)
760785
if maximumActionSpeedReduction then
761786
actionSpeedMod = m_min((100 - maximumActionSpeedReduction) / 100, actionSpeedMod)
@@ -2862,6 +2887,9 @@ function calcs.perform(env, skipEHP)
28622887
enemyDB:NewMod("DamageTaken", "INC", enemyDB:Sum("INC", nil, "DamageTakenConsecratedGround") * effect, "Consecrated Ground")
28632888
end
28642889

2890+
-- Handle Slow
2891+
applySlowMagnitude(env)
2892+
28652893
-- Defence/offence calculations
28662894
calcs.defence(env, env.player)
28672895
if not skipEHP then

src/Modules/CalcSections.lua

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2196,8 +2196,9 @@ return {
21962196
{ label = "Hits before death", { format = "{2:output:TotalNumberOfHits}", { breakdown = "TotalNumberOfHits" }}, },
21972197
{ label = "Effective Hit Pool",{ format = "{0:output:TotalEHP}", { breakdown = "TotalEHP" }, },},
21982198
{ label = "Time before death",{ format = "{2:output:EHPSurvivalTime}s",
2199-
{ breakdown = "EHPSurvivalTime" },
2200-
{ label = "Enemy modifiers", modName = { "TemporalChainsActionSpeed", "ActionSpeed", "Speed", "MinimumActionSpeed" }, enemy = true },
2199+
{ breakdown = "EHPSurvivalTime" },
2200+
{ label = "Player modifiers", modName = { "EnemySlowMagnitude" } },
2201+
{ label = "Enemy modifiers", modName = { "TemporalChainsActionSpeed", "ApexOfMomentSlow", "EnemySlowMagnitude", "Slow", "ActionSpeed", "Speed", "MinimumActionSpeed" }, enemy = true },
22012202
},}
22022203
}, }, { defaultCollapsed = false, label = "Maximum Hit Taken", data = {
22032204
colWidth = 114,

src/Modules/ConfigOptions.lua

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1443,6 +1443,9 @@ Huge sets the radius to 11.
14431443
{ var = "conditionEnemyMoving", type = "check", label = "Is the enemy Moving?", ifMod = "BleedChance", apply = function(val, modList, enemyModList)
14441444
enemyModList:NewMod("Condition:Moving", "FLAG", true, "Config", { type = "Condition", var = "Effective" })
14451445
end },
1446+
{ var = "conditionEnemySlowed", type = "check", label = "Is the enemy Slowed?", apply = function(val, modList, enemyModList)
1447+
enemyModList:NewMod("Condition:Slowed", "FLAG", true, "Config", { type = "Condition", var = "Effective" })
1448+
end },
14461449
{ var = "conditionEnemyFullLife", type = "check", label = "Is the enemy on Full ^xE05030Life?", ifEnemyCond = "FullLife", apply = function(val, modList, enemyModList)
14471450
enemyModList:NewMod("Condition:FullLife", "FLAG", true, "Config", { type = "Condition", var = "Effective" })
14481451
end },
@@ -1710,6 +1713,14 @@ Huge sets the radius to 11.
17101713
{ var = "conditionEnemyRareOrUnique", type = "check", label = "Is the enemy Rare or Unique?", ifEnemyCond = "EnemyRareOrUnique", tooltip = "The enemy will automatically be considered to be Unique if they are a Boss,\nbut you can use this option to force it if necessary.", apply = function(val, modList, enemyModList)
17111714
enemyModList:NewMod("Condition:RareOrUnique", "FLAG", true, "Config", { type = "Condition", var = "Effective" })
17121715
end },
1716+
{ var = "conditionEnemyMagic", type = "check", label = s_format("Is the enemy %sMagic?", colorCodes.MAGIC), tooltip = "", apply = function(val, modList, enemyModList)
1717+
enemyModList:NewMod("Condition:Magic", "FLAG", true, "Config", { type = "Condition", var = "Effective" })
1718+
enemyModList:NewMod("ActionSpeed", "MORE", 15, "Less Slow", { type = "Condition", var = "Effective" }, { type = "Condition", var = "Slowed" })
1719+
end },
1720+
{ var = "conditionEnemyRare", type = "check", label = s_format("Is the enemy %sRare?", colorCodes.RARE), tooltip = "", apply = function(val, modList, enemyModList)
1721+
enemyModList:NewMod("Condition:Rare", "FLAG", true, "Config", { type = "Condition", var = "Effective" })
1722+
enemyModList:NewMod("ActionSpeed", "MORE", 30, "Less Slow", { type = "Condition", var = "Effective" }, { type = "Condition", var = "Slowed" })
1723+
end },
17131724
{ var = "enemyIsBoss", type = "list", label = "Is the enemy a Boss?", defaultIndex = 3, tooltip = data.enemyIsBossTooltip, list = {{val="None",label="No"},{val="Boss",label="Standard Boss"},{val="Pinnacle",label="Guardian/Pinnacle Boss"},{val="Uber",label="Uber Pinnacle Boss"}}, apply = function(val, modList, enemyModList, build)
17141725
-- These defaults are here so that the placeholders get reset correctly
17151726
build.configTab.varControls['enemySpeed']:SetPlaceholder(700, true)
@@ -1744,8 +1755,10 @@ Huge sets the radius to 11.
17441755

17451756
build.configTab.varControls['enemyArmour']:SetPlaceholder(data.monsterArmourTable[defaultLevel], true)
17461757
build.configTab.varControls['enemyEvasion']:SetPlaceholder(data.monsterEvasionTable[defaultLevel], true)
1747-
elseif val == "Boss" then
1758+
elseif val == "Boss" then
1759+
enemyModList:NewMod("Condition:Unique", "FLAG", true, "Config", { type = "Condition", var = "Effective" })
17481760
enemyModList:NewMod("Condition:RareOrUnique", "FLAG", true, "Config", { type = "Condition", var = "Effective" })
1761+
enemyModList:NewMod("ActionSpeed", "MORE", 50, "Less Slow", { type = "Condition", var = "Effective" }, { type = "Condition", var = "Slowed" })
17491762
enemyModList:NewMod("AilmentThreshold", "MORE", 488, "Boss")
17501763
modList:NewMod("WarcryPower", "BASE", 20, "Boss")
17511764
modList:NewMod("Multiplier:EnemyPower", "BASE", 20, "Boss")
@@ -1779,8 +1792,10 @@ Huge sets the radius to 11.
17791792
build.configTab.varControls['enemyArmour']:SetPlaceholder(data.monsterArmourTable[defaultLevel], true)
17801793
build.configTab.varControls['enemyEvasion']:SetPlaceholder(data.monsterEvasionTable[defaultLevel], true)
17811794
elseif val == "Pinnacle" then
1795+
enemyModList:NewMod("Condition:Unique", "FLAG", true, "Config", { type = "Condition", var = "Effective" })
17821796
enemyModList:NewMod("Condition:RareOrUnique", "FLAG", true, "Config", { type = "Condition", var = "Effective" })
17831797
enemyModList:NewMod("Condition:PinnacleBoss", "FLAG", true, "Config", { type = "Condition", var = "Effective" })
1798+
enemyModList:NewMod("ActionSpeed", "MORE", 50, "Less Slow", { type = "Condition", var = "Effective" }, { type = "Condition", var = "Slowed" })
17841799
enemyModList:NewMod("AilmentThreshold", "MORE", 404, "Boss")
17851800
modList:NewMod("WarcryPower", "BASE", 20, "Boss")
17861801
modList:NewMod("Multiplier:EnemyPower", "BASE", 20, "Boss")
@@ -1814,6 +1829,7 @@ Huge sets the radius to 11.
18141829
elseif val == "Uber" then
18151830
enemyModList:NewMod("Condition:RareOrUnique", "FLAG", true, "Config", { type = "Condition", var = "Effective" })
18161831
enemyModList:NewMod("Condition:PinnacleBoss", "FLAG", true, "Config", { type = "Condition", var = "Effective" })
1832+
enemyModList:NewMod("ActionSpeed", "MORE", 50, "Less Slow", { type = "Condition", var = "Effective" }, { type = "Condition", var = "Slowed" })
18171833
enemyModList:NewMod("DamageTaken", "MORE", -70, "Boss")
18181834
enemyModList:NewMod("AilmentThreshold", "MORE", 404, "Boss")
18191835
modList:NewMod("WarcryPower", "BASE", 20, "Boss")

src/Modules/Data.lua

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,6 @@ data.misc = { -- magic numbers
154154
ServerTickRate = 1 / 0.033,
155155
AccuracyPerDexBase = 5,
156156
LowPoolThreshold = 0.35,
157-
TemporalChainsEffectCap = 75,
158157
BuffExpirationSlowCap = 0.25,
159158
DamageReductionCap = 90,
160159
ResistFloor = -200,

0 commit comments

Comments
 (0)