Skip to content

Commit 7145d80

Browse files
committed
implement slow magnitude
1 parent e90bdce commit 7145d80

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
@@ -2336,12 +2336,10 @@ c["Deal up to 30% more Damage to Enemies based on their missing Concentration"]=
23362336
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 "}
23372337
c["Debuffs on you expire 10% faster"]={{[1]={flags=0,keywordFlags=0,name="SelfDebuffExpirationRate",type="BASE",value=10}},nil}
23382338
c["Debuffs on you expire 20% faster"]={{[1]={flags=0,keywordFlags=0,name="SelfDebuffExpirationRate",type="BASE",value=20}},nil}
2339-
c["Debuffs you inflict have 10% increased Slow Magnitude"]={nil,"Debuffs you inflict have 10% increased Slow Magnitude "}
2340-
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 "}
2341-
c["Debuffs you inflict have 4% increased Slow Magnitude"]={nil,"Debuffs you inflict have 4% increased Slow Magnitude "}
2342-
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 "}
2343-
c["Debuffs you inflict have 5% increased Slow Magnitude"]={nil,"Debuffs you inflict have 5% increased Slow Magnitude "}
2344-
c["Debuffs you inflict have 6% increased Slow Magnitude"]={nil,"Debuffs you inflict have 6% increased Slow Magnitude "}
2339+
c["Debuffs you inflict have 10% increased Slow Magnitude"]={{[1]={flags=0,keywordFlags=0,name="EnemySlowMagnitude",type="INC",value=10}},nil}
2340+
c["Debuffs you inflict have 4% increased Slow Magnitude"]={{[1]={flags=0,keywordFlags=0,name="EnemySlowMagnitude",type="INC",value=4}},nil}
2341+
c["Debuffs you inflict have 5% increased Slow Magnitude"]={{[1]={flags=0,keywordFlags=0,name="EnemySlowMagnitude",type="INC",value=5}},nil}
2342+
c["Debuffs you inflict have 6% increased Slow Magnitude"]={{[1]={flags=0,keywordFlags=0,name="EnemySlowMagnitude",type="INC",value=6}},nil}
23452343
c["Decimating Strike"]={nil,"Decimating Strike "}
23462344
c["Defend with 120% of Armour against Projectile Attacks"]={nil,"Defend with 120% of Armour against Projectile Attacks "}
23472345
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}
@@ -2390,7 +2388,7 @@ c["Enemies in your Presence are Blinded"]={nil,"Enemies in your Presence are Bli
23902388
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 "}
23912389
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 "}
23922390
c["Enemies in your Presence are Intimidated"]={nil,"Enemies in your Presence are Intimidated "}
2393-
c["Enemies in your Presence are Slowed by 20%"]={nil,"Enemies in your Presence are Slowed by 20% "}
2391+
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}
23942392
c["Enemies in your Presence gain Critical Weakness every second"]={{[1]={flags=0,keywordFlags=0,name="ApplyCriticalWeakness",type="FLAG",value=true}},nil}
23952393
c["Enemies in your Presence have 10% reduced Cooldown Recovery Rate"]={nil,"Enemies in your Presence have 10% reduced Cooldown Recovery Rate "}
23962394
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
@@ -16606,6 +16606,14 @@ skills["TemporalChainsPlayer"] = {
1660616606
baseEffectiveness = 0,
1660716607
incrementalEffectiveness = 0.092720001935959,
1660816608
statDescriptionScope = "temporal_chains",
16609+
statMap = {
16610+
["temporal_chains_base_action_speed_+%_final_to_apply"] = {
16611+
mod("TemporalChainsActionSpeed", "INC", nil, 0, 0, { type = "GlobalEffect", effectType = "Curse" })
16612+
},
16613+
["buff_time_passed_+%_other_than_temporal_chains"] = {
16614+
mod("BuffExpireFaster", "MORE", nil, 0, 0, { type = "GlobalEffect", effectType = "Curse" }),
16615+
},
16616+
},
1660916617
baseFlags = {
1661016618
area = true,
1661116619
duration = true,

src/Export/Skills/act_int.txt

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1122,7 +1122,15 @@ statMap = {
11221122
#skill TemporalChainsPlayer
11231123
#startSets
11241124
#set TemporalChainsPlayer
1125-
#flags area duration
1125+
#flags spell area duration curse
1126+
statMap = {
1127+
["temporal_chains_base_action_speed_+%_final_to_apply"] = {
1128+
mod("TemporalChainsActionSpeed", "INC", nil, 0, 0, { type = "GlobalEffect", effectType = "Curse" })
1129+
},
1130+
["buff_time_passed_+%_other_than_temporal_chains"] = {
1131+
mod("BuffExpireFaster", "MORE", nil, 0, 0, { type = "GlobalEffect", effectType = "Curse" }),
1132+
},
1133+
},
11261134
#mods
11271135
#skillEnd
11281136

src/Modules/CalcPerform.lua

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

750+
-- Process slow effects/magnitude
751+
local function applySlowMagnitude(env)
752+
local modDB = env.modDB
753+
local enemyDB = env.enemyDB
754+
if enemyDB:HasMod("INC", nil, "TemporalChainsActionSpeed", nil) then
755+
enemyDB:NewMod("Condition:Slowed", "FLAG", true, 'Skill:TemporalChainsPlayer')
756+
end
757+
758+
if enemyDB:Flag(nil, "Condition:Slowed") then
759+
local slowMagnitude = modDB:Sum("INC", nil, "EnemySlowMagnitude") / 100
760+
if slowMagnitude > 0 then
761+
enemyDB:ScaleAddMod(modLib.createMod("TemporalChainsActionSpeed", "INC", enemyDB:Sum("INC", nil, "TemporalChainsActionSpeed"), "Slow Magnitude"), slowMagnitude)
762+
enemyDB:ScaleAddMod(modLib.createMod("ApexOfMomentSlow", "INC", enemyDB:Sum("INC", nil, "ApexOfMomentSlow"), "Slow Magnitude"), slowMagnitude)
763+
end
764+
end
765+
end
766+
750767
function calcs.actionSpeedMod(actor)
751768
local modDB = actor.modDB
752769
local minimumActionSpeed = modDB:Max(nil, "MinimumActionSpeed") or 0
753770
local maximumActionSpeedReduction = modDB:Max(nil, "MaximumActionSpeedReduction")
754-
local actionSpeedMod = 1 + (m_max(-data.misc.TemporalChainsEffectCap, modDB:Sum("INC", nil, "TemporalChainsActionSpeed")) + modDB:Sum("INC", nil, "ActionSpeed")) / 100
771+
772+
local apexOfMoment = modDB:Sum("INC", nil, "ApexOfMomentSlow")
773+
local tempChains = modDB:Sum("INC", nil, "TemporalChainsActionSpeed")
774+
local chill = modDB:Sum("INC", nil, "ActionSpeed", "Chill")
775+
776+
local slowMultiplier = (1 + tempChains / 100) * (1 + apexOfMoment / 100) * (1 + chill / 100) * modDB:More(nil, "ActionSpeed", "Less Slow")
777+
local slowEffect = (1 - slowMultiplier) * 100
778+
779+
local actionSpeedMod = 1 + (-slowEffect + modDB:Sum("INC", nil, "ActionSpeed")) / 100
755780
actionSpeedMod = m_max(minimumActionSpeed / 100, actionSpeedMod)
756781
if maximumActionSpeedReduction then
757782
actionSpeedMod = m_min((100 - maximumActionSpeedReduction) / 100, actionSpeedMod)
@@ -2853,6 +2878,9 @@ function calcs.perform(env, skipEHP)
28532878
enemyDB:NewMod("DamageTaken", "INC", enemyDB:Sum("INC", nil, "DamageTakenConsecratedGround") * effect, "Consecrated Ground")
28542879
end
28552880

2881+
-- Handle Slow
2882+
applySlowMagnitude(env)
2883+
28562884
-- Defence/offence calculations
28572885
calcs.defence(env, env.player)
28582886
if not skipEHP then

src/Modules/CalcSections.lua

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2200,8 +2200,9 @@ return {
22002200
{ label = "Hits before death", { format = "{2:output:TotalNumberOfHits}", { breakdown = "TotalNumberOfHits" }}, },
22012201
{ label = "Effective Hit Pool",{ format = "{0:output:TotalEHP}", { breakdown = "TotalEHP" }, },},
22022202
{ label = "Time before death",{ format = "{2:output:EHPSurvivalTime}s",
2203-
{ breakdown = "EHPSurvivalTime" },
2204-
{ label = "Enemy modifiers", modName = { "TemporalChainsActionSpeed", "ActionSpeed", "Speed", "MinimumActionSpeed" }, enemy = true },
2203+
{ breakdown = "EHPSurvivalTime" },
2204+
{ label = "Player modifiers", modName = { "EnemySlowMagnitude" } },
2205+
{ label = "Enemy modifiers", modName = { "TemporalChainsActionSpeed", "ApexOfMomentSlow", "EnemySlowMagnitude", "Slow", "ActionSpeed", "Speed", "MinimumActionSpeed" }, enemy = true },
22052206
},}
22062207
}, }, { defaultCollapsed = false, label = "Maximum Hit Taken", data = {
22072208
colWidth = 114,

src/Modules/ConfigOptions.lua

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1433,6 +1433,9 @@ Huge sets the radius to 11.
14331433
{ var = "conditionEnemyMoving", type = "check", label = "Is the enemy Moving?", ifMod = "BleedChance", apply = function(val, modList, enemyModList)
14341434
enemyModList:NewMod("Condition:Moving", "FLAG", true, "Config", { type = "Condition", var = "Effective" })
14351435
end },
1436+
{ var = "conditionEnemySlowed", type = "check", label = "Is the enemy Slowed?", apply = function(val, modList, enemyModList)
1437+
enemyModList:NewMod("Condition:Slowed", "FLAG", true, "Config", { type = "Condition", var = "Effective" })
1438+
end },
14361439
{ var = "conditionEnemyFullLife", type = "check", label = "Is the enemy on Full ^xE05030Life?", ifEnemyCond = "FullLife", apply = function(val, modList, enemyModList)
14371440
enemyModList:NewMod("Condition:FullLife", "FLAG", true, "Config", { type = "Condition", var = "Effective" })
14381441
end },
@@ -1693,6 +1696,14 @@ Huge sets the radius to 11.
16931696
{ 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)
16941697
enemyModList:NewMod("Condition:RareOrUnique", "FLAG", true, "Config", { type = "Condition", var = "Effective" })
16951698
end },
1699+
{ var = "conditionEnemyMagic", type = "check", label = s_format("Is the enemy %sMagic?", colorCodes.MAGIC), tooltip = "", apply = function(val, modList, enemyModList)
1700+
enemyModList:NewMod("Condition:Magic", "FLAG", true, "Config", { type = "Condition", var = "Effective" })
1701+
enemyModList:NewMod("ActionSpeed", "MORE", 15, "Less Slow", { type = "Condition", var = "Effective" }, { type = "Condition", var = "Slowed" })
1702+
end },
1703+
{ var = "conditionEnemyRare", type = "check", label = s_format("Is the enemy %sRare?", colorCodes.RARE), tooltip = "", apply = function(val, modList, enemyModList)
1704+
enemyModList:NewMod("Condition:Rare", "FLAG", true, "Config", { type = "Condition", var = "Effective" })
1705+
enemyModList:NewMod("ActionSpeed", "MORE", 30, "Less Slow", { type = "Condition", var = "Effective" }, { type = "Condition", var = "Slowed" })
1706+
end },
16961707
{ 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)
16971708
-- These defaults are here so that the placeholders get reset correctly
16981709
build.configTab.varControls['enemySpeed']:SetPlaceholder(700, true)
@@ -1727,8 +1738,10 @@ Huge sets the radius to 11.
17271738

17281739
build.configTab.varControls['enemyArmour']:SetPlaceholder(data.monsterArmourTable[defaultLevel], true)
17291740
build.configTab.varControls['enemyEvasion']:SetPlaceholder(data.monsterEvasionTable[defaultLevel], true)
1730-
elseif val == "Boss" then
1741+
elseif val == "Boss" then
1742+
enemyModList:NewMod("Condition:Unique", "FLAG", true, "Config", { type = "Condition", var = "Effective" })
17311743
enemyModList:NewMod("Condition:RareOrUnique", "FLAG", true, "Config", { type = "Condition", var = "Effective" })
1744+
enemyModList:NewMod("ActionSpeed", "MORE", 50, "Less Slow", { type = "Condition", var = "Effective" }, { type = "Condition", var = "Slowed" })
17321745
enemyModList:NewMod("AilmentThreshold", "MORE", 488, "Boss")
17331746
modList:NewMod("WarcryPower", "BASE", 20, "Boss")
17341747
modList:NewMod("Multiplier:EnemyPower", "BASE", 20, "Boss")
@@ -1762,8 +1775,10 @@ Huge sets the radius to 11.
17621775
build.configTab.varControls['enemyArmour']:SetPlaceholder(data.monsterArmourTable[defaultLevel], true)
17631776
build.configTab.varControls['enemyEvasion']:SetPlaceholder(data.monsterEvasionTable[defaultLevel], true)
17641777
elseif val == "Pinnacle" then
1778+
enemyModList:NewMod("Condition:Unique", "FLAG", true, "Config", { type = "Condition", var = "Effective" })
17651779
enemyModList:NewMod("Condition:RareOrUnique", "FLAG", true, "Config", { type = "Condition", var = "Effective" })
17661780
enemyModList:NewMod("Condition:PinnacleBoss", "FLAG", true, "Config", { type = "Condition", var = "Effective" })
1781+
enemyModList:NewMod("ActionSpeed", "MORE", 50, "Less Slow", { type = "Condition", var = "Effective" }, { type = "Condition", var = "Slowed" })
17671782
enemyModList:NewMod("AilmentThreshold", "MORE", 404, "Boss")
17681783
modList:NewMod("WarcryPower", "BASE", 20, "Boss")
17691784
modList:NewMod("Multiplier:EnemyPower", "BASE", 20, "Boss")
@@ -1797,6 +1812,7 @@ Huge sets the radius to 11.
17971812
elseif val == "Uber" then
17981813
enemyModList:NewMod("Condition:RareOrUnique", "FLAG", true, "Config", { type = "Condition", var = "Effective" })
17991814
enemyModList:NewMod("Condition:PinnacleBoss", "FLAG", true, "Config", { type = "Condition", var = "Effective" })
1815+
enemyModList:NewMod("ActionSpeed", "MORE", 50, "Less Slow", { type = "Condition", var = "Effective" }, { type = "Condition", var = "Slowed" })
18001816
enemyModList:NewMod("DamageTaken", "MORE", -70, "Boss")
18011817
enemyModList:NewMod("AilmentThreshold", "MORE", 404, "Boss")
18021818
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)