Skip to content

Commit f564000

Browse files
committed
New culling strike logic, add rarity dropdown
Replace the "CullPercent" mod with "CullingStrike" flag. Add rarity dropdown to config tab, hidden when boss is selected. Add "CullThreshold" mod. Use all of these to implement new 30/20/10/5 cull logic.
1 parent ac80996 commit f564000

File tree

5 files changed

+46
-28
lines changed

5 files changed

+46
-28
lines changed

src/Data/ModCache.lua

+7-7
Original file line numberDiff line numberDiff line change
@@ -552,7 +552,7 @@ c["0% to Cold Resistance"]={{[1]={flags=0,keywordFlags=0,name="ColdResist",type=
552552
c["0% to Fire Resistance"]={{[1]={flags=0,keywordFlags=0,name="FireResist",type="BASE",value=0}},"% to "}
553553
c["0% to Lightning Resistance"]={{[1]={flags=0,keywordFlags=0,name="LightningResist",type="BASE",value=0}},"% to "}
554554
c["0.1 Life Regeneration per second"]={{[1]={flags=0,keywordFlags=0,name="LifeRegen",type="BASE",value=0.1}},nil}
555-
c["0.5% of Life Regenerated per second per Fragile Regrowth 10% increased Mana Regeneration Rate per Fragile Regrowth"]={{[1]={[1]={type="Multiplier",var="FragileRegrowthCount"},[2]={type="Multiplier",var="FragileRegrowthCount"},flags=0,keywordFlags=0,name="Life",type="BASE",value=0.5}}," Regenerated per second 10% increased Mana Regeneration Rate "}
555+
c["0.5% of Life Regenerated per second per Fragile Regrowth 10% increased Mana Regeneration Rate per Fragile Regrowth"]={{[1]={[1]={type="Multiplier",var="FragileRegrowthCount"},[2]={type="Multiplier",var="FragileRegrowthCount"},flags=0,keywordFlags=0,name="Life",type="BASE",value=0.5}}," Regenerated per second 10% increased Mana Regeneration Rate "}
556556
c["0.500000% of Life Regenerated per second per Fragile Regrowth"]={{[1]={[1]={type="Multiplier",var="FragileRegrowthCount"},flags=0,keywordFlags=0,name="Life",type="BASE",value=0.5}}," Regenerated per second "}
557557
c["1% increased Attack Damage per 75 Armour or Evasion Rating on Shield"]={{[1]={[1]={div=75,statList={[1]="ArmourOnWeapon 2",[2]="EvasionOnWeapon 2"},type="PerStat"},flags=1,keywordFlags=0,name="Damage",type="INC",value=1}},nil}
558558
c["1% increased Attack Speed per 15 Dexterity"]={{[1]={[1]={div=15,stat="Dex",type="PerStat"},flags=1,keywordFlags=0,name="Speed",type="INC",value=1}},nil}
@@ -739,7 +739,7 @@ c["100% increased Cold Damage"]={{[1]={flags=0,keywordFlags=0,name="ColdDamage",
739739
c["100% increased Critical Damage Bonus against Enemies that are on Full Life"]={{[1]={[1]={actor="enemy",type="ActorCondition",var="FullLife"},flags=0,keywordFlags=0,name="CritMultiplier",type="INC",value=100}},nil}
740740
c["100% increased Critical Hit Chance"]={{[1]={flags=0,keywordFlags=0,name="CritChance",type="INC",value=100}},nil}
741741
c["100% increased Critical Hit Chance against Enemies on Full Life"]={{[1]={[1]={actor="enemy",type="ActorCondition",var="FullLife"},flags=0,keywordFlags=0,name="CritChance",type="INC",value=100}},nil}
742-
c["100% increased Culling Strike Threshold"]={{}," Culling Strike Threshold "}
742+
c["100% increased Culling Strike Threshold"]={{[1]={flags=0,keywordFlags=0,name="CullThreshold",type="INC",value=100}},nil}
743743
c["100% increased Defences from Equipped Shield"]={{[1]={[1]={slotName="Weapon 2",type="SlotName"},flags=0,keywordFlags=0,name="Defences",type="INC",value=100}},nil}
744744
c["100% increased Effect of Jewel Socket Passive Skills"]={{[1]={flags=0,keywordFlags=0,name="LocalEffect",type="INC",value=100}}," of Jewel Socket Passive Skills "}
745745
c["100% increased Effect of Jewel Socket Passive Skills containing Corrupted Magic Jewels"]={{[1]={flags=0,keywordFlags=0,name="JewelData",type="LIST",value={key="corruptedMagicJewelIncEffect",value=100}}},nil}
@@ -1300,7 +1300,7 @@ c["25% increased Critical Hit Chance against Shocked Enemies"]={{[1]={[1]={actor
13001300
c["25% increased Critical Hit Chance for Attacks"]={{[1]={flags=1,keywordFlags=0,name="CritChance",type="INC",value=25}},nil}
13011301
c["25% increased Critical Hit Chance for Spells"]={{[1]={flags=2,keywordFlags=0,name="CritChance",type="INC",value=25}},nil}
13021302
c["25% increased Critical Hit Chance with Traps"]={{[1]={flags=0,keywordFlags=4096,name="CritChance",type="INC",value=25}},nil}
1303-
c["25% increased Culling Strike Threshold"]={{}," Culling Strike Threshold "}
1303+
c["25% increased Culling Strike Threshold"]={{[1]={flags=0,keywordFlags=0,name="CullThreshold",type="INC",value=25}},nil}
13041304
c["25% increased Damage against Dazed Enemies"]={{[1]={flags=0,keywordFlags=0,name="Damage",type="INC",value=25}}," against Dazed Enemies "}
13051305
c["25% increased Damage against Dazed Enemies 25% increased Daze Buildup"]={{[1]={flags=0,keywordFlags=0,name="Damage",type="INC",value=25}}," against Dazed Enemies 25% increased Daze Buildup "}
13061306
c["25% increased Damage while you have a Totem"]={{[1]={[1]={type="Condition",var="HaveTotem"},flags=0,keywordFlags=0,name="Damage",type="INC",value=25}},nil}
@@ -2294,9 +2294,9 @@ c["Critical Hits do not deal extra Damage"]={{[1]={flags=0,keywordFlags=0,name="
22942294
c["Critical Hits ignore Enemy Monster Elemental Resistances"]={{[1]={[1]={type="Condition",var="CriticalStrike"},flags=0,keywordFlags=0,name="IgnoreElementalResistances",type="FLAG",value=true}},nil}
22952295
c["Critical Hits ignore non-negative Enemy Monster Elemental Resistances"]={nil,"Critical Hits ignore non-negative Enemy Monster Elemental Resistances "}
22962296
c["Critical Hits with Daggers have a 25% chance to Poison the Enemy"]={{[1]={[1]={type="Condition",var="CriticalStrike"},flags=524288,keywordFlags=0,name="PoisonChance",type="BASE",value=25}},nil}
2297-
c["Culling Strike"]={{[1]={[1]={effectType="Global",type="GlobalEffect",unscalable=true},flags=0,keywordFlags=0,name="CullPercent",type="MAX",value=10}},nil}
2298-
c["Culling Strike against Enemies you Mark"]={{[1]={[1]={actor="enemy",type="ActorCondition",var="Marked"},flags=0,keywordFlags=0,name="CullPercent",type="MAX",value=10}},nil}
2299-
c["Culling Strike against Frozen Enemies"]={{[1]={[1]={actor="enemy",type="ActorCondition",var="Frozen"},flags=0,keywordFlags=0,name="CullPercent",type="MAX",value=10}},nil}
2297+
c["Culling Strike"]={{[1]={[1]={effectType="Global",type="GlobalEffect"},flags=0,keywordFlags=0,name="CullingStrike",type="FLAG",value=true}},nil}
2298+
c["Culling Strike against Enemies you Mark"]={{[1]={[1]={actor="enemy",type="ActorCondition",var="Marked"},flags=0,keywordFlags=0,name="CullingStrike",type="FLAG",value=true}},nil}
2299+
c["Culling Strike against Frozen Enemies"]={{[1]={[1]={actor="enemy",type="ActorCondition",var="Frozen"},flags=0,keywordFlags=0,name="CullingStrike",type="FLAG",value=true}},nil}
23002300
c["Curse Skills have 15% increased Cast Speed"]={{[1]={flags=16,keywordFlags=2,name="Speed",type="INC",value=15}},nil}
23012301
c["Curse Skills have 20% increased Cast Speed"]={{[1]={flags=16,keywordFlags=2,name="Speed",type="INC",value=20}},nil}
23022302
c["Curses have no Activation Delay"]={nil,"Curses have no Activation Delay "}
@@ -2606,7 +2606,7 @@ c["Hits against you have 20% reduced Critical Damage Bonus"]={{[1]={flags=0,keyw
26062606
c["Hits against you have 25% reduced Critical Damage Bonus"]={{[1]={flags=0,keywordFlags=0,name="EnemyModifier",type="LIST",value={mod={flags=4,keywordFlags=0,name="CritMultiplier",type="INC",value=-25}}}},nil}
26072607
c["Hits have 25% reduced Critical Hit Chance against you"]={nil,"Hits have 25% reduced Critical Hit Chance "}
26082608
c["Hits ignore non-negative Elemental Resistances of Frozen Enemies"]={nil,"Hits ignore non-negative Elemental Resistances of Frozen Enemies "}
2609-
c["Hits that Heavy Stun Enemies have Culling Strike"]={{[1]={[1]={type="Condition",var="AlwaysHeavyStunning"},flags=0,keywordFlags=0,name="CullPercent",type="MAX",value=10}},nil}
2609+
c["Hits that Heavy Stun Enemies have Culling Strike"]={{[1]={[1]={type="Condition",var="AlwaysHeavyStunning"},flags=0,keywordFlags=0,name="CullingStrike",type="FLAG",value=true}},nil}
26102610
c["Hits that Heavy Stun inflict Fire Exposure"]={nil,"Hits that Heavy Stun inflict Fire Exposure "}
26112611
c["Hits that deal Cold Damage remove Cold Exposure and inflict Fire Exposure"]={nil,"Hits that deal Cold Damage remove Cold Exposure and inflict Fire Exposure "}
26122612
c["Hits that deal Cold Damage remove Cold Exposure and inflict Fire Exposure Hits that deal Lightning Damage remove Lightning Exposure and inflict Cold Exposure"]={nil,"Hits that deal Cold Damage remove Cold Exposure and inflict Fire Exposure Hits that deal Lightning Damage remove Lightning Exposure and inflict Cold Exposure "}

src/Modules/CalcOffence.lua

+13-3
Original file line numberDiff line numberDiff line change
@@ -2992,12 +2992,22 @@ function calcs.offence(env, actor, activeSkill)
29922992
local hitRate = output.HitChance / 100 * (globalOutput.HitSpeed or globalOutput.Speed) * skillData.dpsMultiplier
29932993

29942994
-- Calculate culling DPS
2995-
local criticalCull = skillModList:Max(cfg, "CriticalCullPercent") or 0
2996-
if criticalCull > 0 then
2995+
local enemyRarity = env.configInput["enemyIsBoss"] ~= "None" and "Unique" or env.configInput["enemyRarity"] or "Normal"
2996+
local cullThresholds = { Normal = 30, Magic = 20, Rare = 10, Unique = 5 }
2997+
local enemyCullThreshold = cullThresholds[enemyRarity]
2998+
local criticalCull = 0
2999+
if skillModList:Flag(cfg, "CriticalCullingStrike") then
3000+
local critCullThresholdInc = skillModList:Sum("INC", cfg, "CriticalCullThreshold") or 0
3001+
criticalCull = enemyCullThreshold * (1 + critCullThresholdInc / 100)
29973002
criticalCull = m_min(criticalCull, criticalCull * (1 - (1 - output.CritChance / 100) ^ hitRate))
29983003
end
2999-
local regularCull = skillModList:Max(cfg, "CullPercent") or 0
3004+
local regularCull = 0
3005+
if skillModList:Flag(cfg, "CullingStrike") then
3006+
local cullThresholdInc = skillModList:Sum("INC", cfg, "CullThreshold") or 1
3007+
regularCull = enemyCullThreshold * (1 + cullThresholdInc / 100)
3008+
end
30003009
local maxCullPercent = m_max(criticalCull, regularCull)
3010+
30013011
globalOutput.CullPercent = maxCullPercent
30023012
globalOutput.CullMultiplier = 100 / (100 - globalOutput.CullPercent)
30033013

src/Modules/CalcSections.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -1369,7 +1369,7 @@ return {
13691369
{ label = "IIQ for Normal Mobs", haveOutput = "LootQuantityNormalEnemies", { format = "{0:output:LootQuantityNormalEnemies}%", { modName = { "LootQuantityNormalEnemies", "LootQuantity" } }, }, },
13701370
{ label = "Inc. Item Rarity", { format = "{0:mod:1}%", { modName = "LootRarity", modType = "INC", cfg = "skill" }, }, },
13711371
{ label = "IIR for Magic Mobs", haveOutput = "LootRarityMagicEnemies", { format = "{0:output:LootRarityMagicEnemies}%", { modName = { "LootRarityMagicEnemies", "LootRarity" } }, }, },
1372-
{ label = "Culling Strike", haveOutput = "CullPercent", { format = "{0:output:CullPercent}%", { modName = { "CullPercent", "CriticalCullPercent" }, cfg = "skill" } } },
1372+
{ label = "Culling Strike", haveOutput = "CullPercent", { format = "{2:output:CullPercent}%", { modName = { "CullPercent", "CriticalCullPercent" }, cfg = "skill" } } },
13731373
{ label = "Enemy Life Recovery", haveOutput = "EnemyLifeRegen", { format = "{0:output:EnemyLifeRegen}%", { modName = "LifeRegen", modType = "INC", enemy = true }, }, },
13741374
{ label = "Enemy Mana Recovery", haveOutput = "EnemyManaRegen", { format = "{0:output:EnemyManaRegen}%", { modName = "ManaRegen", modType = "INC", enemy = true }, }, },
13751375
{ label = "Enemy ES Recovery", haveOutput = "EnemyEnergyShieldRegen", { format = "{0:output:EnemyEnergyShieldRegen}%", { modName = "EnergyShieldRegen", modType = "INC", enemy = true }, }, },

src/Modules/ConfigOptions.lua

+8
Original file line numberDiff line numberDiff line change
@@ -1684,12 +1684,20 @@ Huge sets the radius to 11.
16841684
{ 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)
16851685
enemyModList:NewMod("Condition:RareOrUnique", "FLAG", true, "Config", { type = "Condition", var = "Effective" })
16861686
end },
1687+
{ var = "enemyRarity", type = "list", label = "Enemy Rarity", ifFlag = "NotABoss", list = {{val="Normal",label="Normal"},{val="Magic",label="Magic"},{val="Rare",label="Rare"},{val="Unique",label="Unique"}}, tooltip = "Used for calculating culling strike damage. Ignored if enemy is a boss.", apply = function(val, mdoList, enemyModList)
1688+
if val == "Rare" then
1689+
enemyModList:NewMod("Condition:RareOrUnique", "FLAG", true, "Config", { type = "Condition", var = "Effective" })
1690+
elseif val == "Unique" then
1691+
enemyModList:NewMod("Condition:RareOrUnique", "FLAG", true, "Config", { type = "Condition", var = "Effective" })
1692+
end
1693+
end },
16871694
{ 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)
16881695
-- These defaults are here so that the placeholders get reset correctly
16891696
build.configTab.varControls['enemySpeed']:SetPlaceholder(700, true)
16901697
build.configTab.varControls['enemyCritChance']:SetPlaceholder(5, true)
16911698
build.configTab.varControls['enemyCritDamage']:SetPlaceholder(30, true)
16921699
if val == "None" then
1700+
modList:NewMod("NotABoss", "FLAG", true, "Config")
16931701
local defaultResist = ""
16941702
build.configTab.varControls['enemyLightningResist']:SetPlaceholder(defaultResist, true)
16951703
build.configTab.varControls['enemyColdResist']:SetPlaceholder(defaultResist, true)

src/Modules/ModParser.lua

+17-17
Original file line numberDiff line numberDiff line change
@@ -785,6 +785,7 @@ local modNameList = {
785785
["to ignore enemy physical damage reduction"] = "ChanceToIgnoreEnemyPhysicalDamageReduction",
786786
["weapon swap speed"] = "WeaponSwapSpeed",
787787
["to chain an additional time from terrain"] = "TerrainChainChance",
788+
["culling strike threshold"] = "CullThreshold",
788789
-- Flask and Charm modifiers
789790
["effect"] = "LocalEffect",
790791
["effect of flasks"] = "FlaskEffect",
@@ -2783,7 +2784,6 @@ local specialModList = {
27832784
["cannot take reflected physical damage"] = { mod("PhysicalReflectedDamageTaken", "MORE", -100, { type = "GlobalEffect", effectType = "Global", unscalable = true }) },
27842785
["gain (%d+)%% increased movement speed for 20 seconds when you kill an enemy"] = function(num) return { mod("MovementSpeed", "INC", num, { type = "Condition", var = "KilledRecently" }) } end,
27852786
["gain (%d+)%% increased attack speed for 20 seconds when you kill a rare or unique enemy"] = function(num) return { mod("Speed", "INC", num, nil, ModFlag.Attack, 0, { type = "Condition", var = "KilledUniqueEnemy" }) } end,
2786-
["kill enemies that have (%d+)%% or lower life when hit by your skills"] = function(num) return { mod("CullPercent", "MAX", num) } end,
27872787
["you are unaffected by bleeding while leeching"] = { mod("SelfBleedEffect", "MORE", -100, { type = "Condition", var = "Leeching" }) },
27882788
-- Titan
27892789
["(%d+)%% increased effect of small passive skills"] = function(num) return { mod("SmallPassiveSkillEffect", "INC", num) } end,
@@ -4505,22 +4505,22 @@ local specialModList = {
45054505
["adds knockback to melee attacks during f?l?a?s?k? ?effect"] = { mod("EnemyKnockbackChance", "BASE", 100, nil, ModFlag.Melee, { type = "Condition", var = "UsingFlask" }) },
45064506
["knockback direction is reversed"] = { mod("EnemyKnockbackDistance", "MORE", -200) },
45074507
-- Culling
4508-
["culling strike"] = { mod("CullPercent", "MAX", 10, { type = "GlobalEffect", effectType = "Global", unscalable = true }) },
4509-
["culling strike with melee weapons"] = { mod("CullPercent", "MAX", 10, nil, ModFlag.WeaponMelee, { type = "GlobalEffect", effectType = "Global", unscalable = true }) },
4510-
["melee weapon attacks have culling strike"] = { mod("CullPercent", "MAX", 10, nil, bor(ModFlag.Attack, ModFlag.WeaponMelee), { type = "GlobalEffect", effectType = "Global", unscalable = true }) },
4511-
["culling strike during f?l?a?s?k? ?effect"] = { mod("CullPercent", "MAX", 10, { type = "Condition", var = "UsingFlask" }, { type = "GlobalEffect", effectType = "Global", unscalable = true }) },
4512-
["hits with this weapon have culling strike against bleeding enemies"] = { mod("CullPercent", "MAX", 10, { type = "ActorCondition", actor = "enemy", var = "Bleeding" }) },
4513-
["you have culling strike against cursed enemies"] = { mod("CullPercent", "MAX", 10, { type = "ActorCondition", actor = "enemy", var = "Cursed" }) },
4514-
["critical hits have culling strike"] = { mod("CriticalCullPercent", "MAX", 10) },
4515-
["your critical hits have culling strike"] = { mod("CriticalCullPercent", "MAX", 10) },
4516-
["your spells have culling strike"] = { mod("CullPercent", "MAX", 10, nil, ModFlag.Spell) },
4517-
["bow attacks have culling strike"] = { mod("CullPercent", "MAX", 10, nil, bor(ModFlag.Attack, ModFlag.Bow)) },
4518-
["culling strike against burning enemies"] = { mod("CullPercent", "MAX", 10, { type = "ActorCondition", actor = "enemy", var = "Burning" }) },
4519-
["culling strike against frozen enemies"] = { mod("CullPercent", "MAX", 10, { type = "ActorCondition", actor = "enemy", var = "Frozen" }) },
4520-
["culling strike against enemies you mark"] = { mod("CullPercent", "MAX", 10, { type = "ActorCondition", actor = "enemy", var = "Marked" }) },
4521-
["nearby allies have culling strike"] = { mod("ExtraAura", "LIST", {onlyAllies = true, mod = mod("CullPercent", "MAX", 10) }) },
4522-
["hits that stun enemies have culling strike"] = { mod("CullPercent", "MAX", 10, { type = "Condition", var = "AlwaysStunning" }) },
4523-
["hits that heavy stun enemies have culling strike"] = { mod("CullPercent", "MAX", 10, { type = "Condition", var = "AlwaysHeavyStunning" }) },
4508+
["culling strike"] = { flag("CullingStrike", { type = "GlobalEffect", effectType = "Global" }) },
4509+
["culling strike with melee weapons"] = { flag("CullingStrike", nil, ModFlag.WeaponMelee, { type = "GlobalEffect", effectType = "Global" }) },
4510+
["melee weapon attacks have culling strike"] = { flag("CullingStrike", nil, bor(ModFlag.Attack, ModFlag.WeaponMelee), { type = "GlobalEffect", effectType = "Global" }) },
4511+
["culling strike during f?l?a?s?k? ?effect"] = { flag("CullingStrike", { type = "Condition", var = "UsingFlask" }, { type = "GlobalEffect", effectType = "Global" }) },
4512+
["hits with this weapon have culling strike against bleeding enemies"] = { flag("CullingStrike", { type = "ActorCondition", actor = "enemy", var = "Bleeding" }) },
4513+
["you have culling strike against cursed enemies"] = { flag("CullingStrike", { type = "ActorCondition", actor = "enemy", var = "Cursed" }) },
4514+
["critical hits have culling strike"] = { flag("CriticalCullingStrike") },
4515+
["your critical hits have culling strike"] = { flag("CriticalCullingStrike") },
4516+
["your spells have culling strike"] = { flag("CullingStrike", nil, ModFlag.Spell) },
4517+
["bow attacks have culling strike"] = { flag("CullingStrike", nil, bor(ModFlag.Attack, ModFlag.Bow)) },
4518+
["culling strike against burning enemies"] = { flag("CullingStrike", { type = "ActorCondition", actor = "enemy", var = "Burning" }) },
4519+
["culling strike against frozen enemies"] = { flag("CullingStrike", { type = "ActorCondition", actor = "enemy", var = "Frozen" }) },
4520+
["culling strike against enemies you mark"] = { flag("CullingStrike", { type = "ActorCondition", actor = "enemy", var = "Marked" }) },
4521+
["nearby allies have culling strike"] = { flag("ExtraAura", "LIST", {onlyAllies = true, mod = mod("CullingStrike") }) },
4522+
["hits that stun enemies have culling strike"] = { flag("CullingStrike", { type = "Condition", var = "AlwaysStunning" }) },
4523+
["hits that heavy stun enemies have culling strike"] = { flag("CullingStrike", { type = "Condition", var = "AlwaysHeavyStunning" }) },
45244524
-- Intimidate
45254525
["permanently intimidate enemies on block"] = { mod("EnemyModifier", "LIST", { mod = flag("Condition:Intimidated") }, { type = "Condition", var = "BlockedRecently" }) },
45264526
["with a murderous eye jewel socketed, intimidate enemies for (%d) seconds on hit with attacks"] = { mod("EnemyModifier", "LIST", { mod = flag("Condition:Intimidated") }, { type = "Condition", var = "HaveMurderousEyeJewelIn{SlotName}" }) },

0 commit comments

Comments
 (0)