Skip to content

Commit ee13999

Browse files
LocalIdentityLocalIdentity
andauthored
Add default values for melee and projectile distance to enemy (#9207)
* Add default values for melee and projectile distance to enemy Defaulting the value to 15 for melee distance and 30 for projectile distance allows skills to better filter some uniques and skill gems e.g. Close combat for melee skills, Far shot / point blank, freezing pulse damage and many more that rely on either `DistanceRamp` or `MeleeProximity` mods * Default range to 40 --------- Co-authored-by: LocalIdentity <[email protected]>
1 parent 1b8a459 commit ee13999

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/Modules/CalcActiveSkill.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -421,9 +421,9 @@ function calcs.buildActiveSkillModList(env, activeSkill)
421421

422422
-- Calculate Distance for meleeDistance or projectileDistance (for melee proximity, e.g. Impact)
423423
if skillFlags.melee then
424-
effectiveRange = env.configInput.meleeDistance
424+
effectiveRange = env.configInput.meleeDistance or env.configPlaceholder.meleeDistance
425425
else
426-
effectiveRange = env.configInput.projectileDistance
426+
effectiveRange = env.configInput.projectileDistance or env.configPlaceholder.projectileDistance
427427
end
428428

429429
-- Build config structure for modifier searches

src/Modules/ConfigOptions.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1592,8 +1592,8 @@ Huge sets the radius to 11.
15921592
{ var = "skillPierceCount", type = "count", label = "# of times Skill has Pierced:", ifStat = "PiercedCount", ifFlag = "piercing", apply = function(val, modList, enemyModList)
15931593
modList:NewMod("PiercedCount", "BASE", val, "Config", { type = "Condition", var = "Effective" })
15941594
end },
1595-
{ var = "meleeDistance", type = "count", label = "Melee distance to enemy:", tooltip = "10 units equals 1 metre", ifTagType = "MeleeProximity", ifFlag = "melee" },
1596-
{ var = "projectileDistance", type = "count", label = "Projectile travel distance:", tooltip = "10 units equals 1 metre", ifTagType = "DistanceRamp", ifFlag = "projectile" },
1595+
{ var = "meleeDistance", type = "count", label = "Melee distance to enemy:", tooltip = "10 units equals 1 metre", ifTagType = "MeleeProximity", ifFlag = "melee", defaultPlaceholderState = 15 },
1596+
{ var = "projectileDistance", type = "count", label = "Projectile travel distance:", tooltip = "10 units equals 1 metre", ifTagType = "DistanceRamp", ifFlag = "projectile", defaultPlaceholderState = 40 },
15971597
{ var = "conditionAtCloseRange", type = "check", label = "Is the enemy at Close Range?", ifCond = "AtCloseRange", apply = function(val, modList, enemyModList)
15981598
modList:NewMod("Condition:AtCloseRange", "FLAG", true, "Config", { type = "Condition", var = "Effective" })
15991599
end },

0 commit comments

Comments
 (0)