Skip to content

Commit b9e2767

Browse files
committed
implement slow magnitude
1 parent e1a90ae commit b9e2767

File tree

7 files changed

+71
-16
lines changed

7 files changed

+71
-16
lines changed

src/Data/ModCache.lua

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2522,12 +2522,10 @@ c["Deal up to 30% more Damage to Enemies based on their missing Concentration"]=
25222522
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 "}
25232523
c["Debuffs on you expire 10% faster"]={{[1]={flags=0,keywordFlags=0,name="SelfDebuffExpirationRate",type="BASE",value=10}},nil}
25242524
c["Debuffs on you expire 20% faster"]={{[1]={flags=0,keywordFlags=0,name="SelfDebuffExpirationRate",type="BASE",value=20}},nil}
2525-
c["Debuffs you inflict have 10% increased Slow Magnitude"]={nil,"Debuffs you inflict have 10% increased Slow Magnitude "}
2526-
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 "}
2527-
c["Debuffs you inflict have 4% increased Slow Magnitude"]={nil,"Debuffs you inflict have 4% increased Slow Magnitude "}
2528-
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 "}
2529-
c["Debuffs you inflict have 5% increased Slow Magnitude"]={nil,"Debuffs you inflict have 5% increased Slow Magnitude "}
2530-
c["Debuffs you inflict have 6% increased Slow Magnitude"]={nil,"Debuffs you inflict have 6% increased Slow Magnitude "}
2525+
c["Debuffs you inflict have 10% increased Slow Magnitude"]={{[1]={flags=0,keywordFlags=0,name="EnemySlowMagnitude",type="INC",value=10}},nil}
2526+
c["Debuffs you inflict have 4% increased Slow Magnitude"]={{[1]={flags=0,keywordFlags=0,name="EnemySlowMagnitude",type="INC",value=4}},nil}
2527+
c["Debuffs you inflict have 5% increased Slow Magnitude"]={{[1]={flags=0,keywordFlags=0,name="EnemySlowMagnitude",type="INC",value=5}},nil}
2528+
c["Debuffs you inflict have 6% increased Slow Magnitude"]={{[1]={flags=0,keywordFlags=0,name="EnemySlowMagnitude",type="INC",value=6}},nil}
25312529
c["Decimating Strike"]={nil,"Decimating Strike "}
25322530
c["Defend with 120% of Armour against Projectile Attacks"]={nil,"Defend with 120% of Armour against Projectile Attacks "}
25332531
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}
@@ -2580,7 +2578,7 @@ c["Enemies in your Presence are Blinded"]={nil,"Enemies in your Presence are Bli
25802578
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 "}
25812579
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 "}
25822580
c["Enemies in your Presence are Intimidated"]={nil,"Enemies in your Presence are Intimidated "}
2583-
c["Enemies in your Presence are Slowed by 20%"]={nil,"Enemies in your Presence are Slowed by 20% "}
2581+
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}
25842582
c["Enemies in your Presence gain Critical Weakness every second"]={{[1]={flags=0,keywordFlags=0,name="ApplyCriticalWeakness",type="FLAG",value=true}},nil}
25852583
c["Enemies in your Presence have 10% reduced Cooldown Recovery Rate"]={nil,"Enemies in your Presence have 10% reduced Cooldown Recovery Rate "}
25862584
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
@@ -16616,6 +16616,14 @@ skills["TemporalChainsPlayer"] = {
1661616616
baseEffectiveness = 0,
1661716617
incrementalEffectiveness = 0.092720001935959,
1661816618
statDescriptionScope = "temporal_chains",
16619+
statMap = {
16620+
["temporal_chains_base_action_speed_+%_final_to_apply"] = {
16621+
mod("TemporalChainsActionSpeed", "INC", nil, 0, 0, { type = "GlobalEffect", effectType = "Curse" })
16622+
},
16623+
["buff_time_passed_+%_other_than_temporal_chains"] = {
16624+
mod("BuffExpireFaster", "MORE", nil, 0, 0, { type = "GlobalEffect", effectType = "Curse" }),
16625+
},
16626+
},
1661916627
baseFlags = {
1662016628
area = true,
1662116629
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 & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -748,24 +748,46 @@ local function doActorCharges(env, actor)
748748
modDB.multipliers["SpiritCharge"] = output.SpiritCharges
749749
end
750750

751+
-- Process slow effects/magnitude
752+
local function applySlowMagnitude(env)
753+
local modDB = env.modDB
754+
local enemyDB = env.enemyDB
755+
if enemyDB:HasMod("INC", nil, "TemporalChainsActionSpeed", nil) then
756+
enemyDB:NewMod("Condition:Slowed", "FLAG", true, 'Skill:TemporalChainsPlayer')
757+
end
758+
759+
if enemyDB:Flag(nil, "Condition:Slowed") then
760+
local slowMagnitude = modDB:Sum("INC", nil, "EnemySlowMagnitude") / 100
761+
if slowMagnitude > 0 then
762+
enemyDB:ScaleAddMod(modLib.createMod("TemporalChainsActionSpeed", "INC", enemyDB:Sum("INC", nil, "TemporalChainsActionSpeed"), "Slow Magnitude"), slowMagnitude)
763+
enemyDB:ScaleAddMod(modLib.createMod("ApexOfMomentSlow", "INC", enemyDB:Sum("INC", nil, "ApexOfMomentSlow"), "Slow Magnitude"), slowMagnitude)
764+
end
765+
end
766+
end
751767

752768
function calcs.actionSpeedMod(actor)
753769
local modDB = actor.modDB
754770
local minimumActionSpeed = modDB:Max(nil, "MinimumActionSpeed") or 0
755771
local maximumActionSpeedReduction = modDB:Max(nil, "MaximumActionSpeedReduction")
756772
local actionSpeedSum
757-
local tempChainsSum
773+
local slowEffectsSum
758774

759775
-- if we are unaffected by slows, only count the positive modifiers to action speed
760776
if modDB:Flag(nil, "UnaffectedBySlows") then
761777
actionSpeedSum = modDB:SumPositiveValues("INC", nil, "ActionSpeed")
762-
tempChainsSum = modDB:SumPositiveValues("INC", nil, "TemporalChainsActionSpeed")
778+
slowEffectsSum = modDB:SumPositiveValues("INC", nil, "ApexOfMomentSlow", "TemporalChainsActionSpeed")
763779
else
764780
actionSpeedSum = modDB:Sum("INC", nil, "ActionSpeed")
765-
tempChainsSum = modDB:Sum("INC", nil, "TemporalChainsActionSpeed")
781+
slowEffectsSum = modDB:Sum("INC", nil, "ApexOfMomentSlow", "TemporalChainsActionSpeed")
766782
end
783+
784+
-- local slowMultiplier = (1 + tempChains / 100) * (1 + apexOfMoment / 100) * (1 + modDB:Sum("INC", nil, "ActionSpeed", "Chill") / 100) * modDB:More(nil, "ActionSpeed", "Less Slow")
785+
local slowMultiplier = (1 + slowEffectsSum / 100) * (1 + modDB:Sum("INC", nil, "ActionSpeed", "Chill") / 100) * modDB:More(nil, "ActionSpeed", "Less Slow")
786+
local slowEffect = (1 - slowMultiplier) * 100
787+
788+
local actionSpeedMod = 1 + (-slowEffect + actionSpeedSum) / 100
767789

768-
local actionSpeedMod = 1 + (m_max(-data.misc.TemporalChainsEffectCap, tempChainsSum) + actionSpeedSum) / 100
790+
-- local actionSpeedMod = 1 + (slowEffectsSum + actionSpeedSum) / 100
769791
actionSpeedMod = m_max(minimumActionSpeed / 100, actionSpeedMod)
770792
if maximumActionSpeedReduction then
771793
actionSpeedMod = m_min((100 - maximumActionSpeedReduction) / 100, actionSpeedMod)
@@ -2872,6 +2894,9 @@ function calcs.perform(env, skipEHP)
28722894
enemyDB:NewMod("DamageTaken", "INC", enemyDB:Sum("INC", nil, "DamageTakenConsecratedGround") * effect, "Consecrated Ground")
28732895
end
28742896

2897+
-- Handle Slow
2898+
applySlowMagnitude(env)
2899+
28752900
-- Defence/offence calculations
28762901
calcs.defence(env, env.player)
28772902
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
@@ -1458,6 +1458,9 @@ Huge sets the radius to 11.
14581458
{ var = "conditionEnemyMoving", type = "check", label = "Is the enemy Moving?", ifMod = "BleedChance", apply = function(val, modList, enemyModList)
14591459
enemyModList:NewMod("Condition:Moving", "FLAG", true, "Config", { type = "Condition", var = "Effective" })
14601460
end },
1461+
{ var = "conditionEnemySlowed", type = "check", label = "Is the enemy Slowed?", apply = function(val, modList, enemyModList)
1462+
enemyModList:NewMod("Condition:Slowed", "FLAG", true, "Config", { type = "Condition", var = "Effective" })
1463+
end },
14611464
{ var = "conditionEnemyFullLife", type = "check", label = "Is the enemy on Full ^xE05030Life?", ifEnemyCond = "FullLife", apply = function(val, modList, enemyModList)
14621465
enemyModList:NewMod("Condition:FullLife", "FLAG", true, "Config", { type = "Condition", var = "Effective" })
14631466
end },
@@ -1732,6 +1735,14 @@ Huge sets the radius to 11.
17321735
{ 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)
17331736
enemyModList:NewMod("Condition:RareOrUnique", "FLAG", true, "Config", { type = "Condition", var = "Effective" })
17341737
end },
1738+
{ var = "conditionEnemyMagic", type = "check", label = s_format("Is the enemy %sMagic?", colorCodes.MAGIC), tooltip = "", apply = function(val, modList, enemyModList)
1739+
enemyModList:NewMod("Condition:Magic", "FLAG", true, "Config", { type = "Condition", var = "Effective" })
1740+
enemyModList:NewMod("ActionSpeed", "MORE", 15, "Less Slow", { type = "Condition", var = "Effective" }, { type = "Condition", var = "Slowed" })
1741+
end },
1742+
{ var = "conditionEnemyRare", type = "check", label = s_format("Is the enemy %sRare?", colorCodes.RARE), tooltip = "", apply = function(val, modList, enemyModList)
1743+
enemyModList:NewMod("Condition:Rare", "FLAG", true, "Config", { type = "Condition", var = "Effective" })
1744+
enemyModList:NewMod("ActionSpeed", "MORE", 30, "Less Slow", { type = "Condition", var = "Effective" }, { type = "Condition", var = "Slowed" })
1745+
end },
17351746
{ 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)
17361747
-- These defaults are here so that the placeholders get reset correctly
17371748
build.configTab.varControls['enemySpeed']:SetPlaceholder(700, true)
@@ -1766,8 +1777,10 @@ Huge sets the radius to 11.
17661777

17671778
build.configTab.varControls['enemyArmour']:SetPlaceholder(data.monsterArmourTable[defaultLevel], true)
17681779
build.configTab.varControls['enemyEvasion']:SetPlaceholder(data.monsterEvasionTable[defaultLevel], true)
1769-
elseif val == "Boss" then
1780+
elseif val == "Boss" then
1781+
enemyModList:NewMod("Condition:Unique", "FLAG", true, "Config", { type = "Condition", var = "Effective" })
17701782
enemyModList:NewMod("Condition:RareOrUnique", "FLAG", true, "Config", { type = "Condition", var = "Effective" })
1783+
enemyModList:NewMod("ActionSpeed", "MORE", 50, "Less Slow", { type = "Condition", var = "Effective" }, { type = "Condition", var = "Slowed" })
17711784
enemyModList:NewMod("AilmentThreshold", "MORE", 488, "Boss")
17721785
modList:NewMod("WarcryPower", "BASE", 20, "Boss")
17731786
modList:NewMod("Multiplier:EnemyPower", "BASE", 20, "Boss")
@@ -1801,8 +1814,10 @@ Huge sets the radius to 11.
18011814
build.configTab.varControls['enemyArmour']:SetPlaceholder(data.monsterArmourTable[defaultLevel], true)
18021815
build.configTab.varControls['enemyEvasion']:SetPlaceholder(data.monsterEvasionTable[defaultLevel], true)
18031816
elseif val == "Pinnacle" then
1817+
enemyModList:NewMod("Condition:Unique", "FLAG", true, "Config", { type = "Condition", var = "Effective" })
18041818
enemyModList:NewMod("Condition:RareOrUnique", "FLAG", true, "Config", { type = "Condition", var = "Effective" })
18051819
enemyModList:NewMod("Condition:PinnacleBoss", "FLAG", true, "Config", { type = "Condition", var = "Effective" })
1820+
enemyModList:NewMod("ActionSpeed", "MORE", 50, "Less Slow", { type = "Condition", var = "Effective" }, { type = "Condition", var = "Slowed" })
18061821
enemyModList:NewMod("AilmentThreshold", "MORE", 404, "Boss")
18071822
modList:NewMod("WarcryPower", "BASE", 20, "Boss")
18081823
modList:NewMod("Multiplier:EnemyPower", "BASE", 20, "Boss")
@@ -1836,6 +1851,7 @@ Huge sets the radius to 11.
18361851
elseif val == "Uber" then
18371852
enemyModList:NewMod("Condition:RareOrUnique", "FLAG", true, "Config", { type = "Condition", var = "Effective" })
18381853
enemyModList:NewMod("Condition:PinnacleBoss", "FLAG", true, "Config", { type = "Condition", var = "Effective" })
1854+
enemyModList:NewMod("ActionSpeed", "MORE", 50, "Less Slow", { type = "Condition", var = "Effective" }, { type = "Condition", var = "Slowed" })
18391855
enemyModList:NewMod("DamageTaken", "MORE", -70, "Boss")
18401856
enemyModList:NewMod("AilmentThreshold", "MORE", 404, "Boss")
18411857
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)