You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit ad84c4c
Browse filesBrowse the repository at this point in the historyBrowse files
David Medgyesy
committed
Apply Inverted Hits ailment mode in every calculation
The mode was limited to the Calcs environment, so the sidebar calculation could
disagree with Calcs about whether a skill Shocks or Freezes. It now applies
wherever ailments are calculated; hit damage keeps its chance weighting.
When an inverted hit deals no damage that can inflict an ailment, the rows stay
visible for the note and now carry the duration and effect an ordinary hit shows,
instead of a 0s duration.
Breakdowns state the mode that was actually used: Poison and non-damaging ailments
the skill cannot invert say Average Damage with a note, and the config tooltip
explains that Ignite, Bleed and Poison are based on damage before resistances.
Tests compare against the certain-inversion case instead of fixed percentages.
build.configTab.input.customMods="Adds 1000 to 1000 Chaos Damage to Spells\n100% chance to Ignite\n100% chance to Poison on Hit\nHits have 50% chance to treat Enemy Monster Elemental Resistance values as inverted"
Copy file name to clipboardExpand all lines: src/Modules/CalcOffence.lua
+21-15Lines changed: 21 additions & 15 deletions
Original file line number
Diff line number
Diff line change
@@ -3385,8 +3385,9 @@ function calcs.offence(env, actor, activeSkill)
3385
3385
end
3386
3386
end
3387
3387
3388
-
-- Keep conditional damage for the Calcs ailment breakdown only.
3389
-
localinvertedHits=env.mode=="CALCS" andenv.configInput.ailmentMode=="INVERTED" and { { }, { } }
3388
+
-- Inverted Hits ailment mode: track the damage of a hit that inverts each resistance it can, per crit pass.
3389
+
-- Hit damage itself keeps its chance weighting.
3390
+
localinvertedHits=env.configInput.ailmentMode=="INVERTED" and { { }, { } }
3390
3391
pass.invertedHits=invertedHits
3391
3392
3392
3393
-- Calculate base hit damage
@@ -4395,6 +4396,14 @@ function calcs.offence(env, actor, activeSkill)
4395
4396
returnsourceHitDmg, sourceCritDmg, usesInversion
4396
4397
end
4397
4398
4399
+
---Describes the ailment mode a non-damaging ailment actually used
4400
+
localfunctionailmentModeBreakdown(usesInversion)
4401
+
return {
4402
+
s_format("Ailment mode: %s ^8(can be changed in the Configuration tab)", usesInversionand"Inverted Hits" orordinaryAilmentMode),
4403
+
ailmentMode=="INVERTED" andnotusesInversionand"^8(Inverted Hits changes nothing here: no damage that can inflict this ailment has a chance to invert resistance)" ornil,
4404
+
}
4405
+
end
4406
+
4398
4407
-- Calculate the inflict chance and base damage of a secondary effect (bleed/poison/ignite/shock/freeze)
Copy file name to clipboardExpand all lines: src/Modules/ConfigOptions.lua
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -212,7 +212,7 @@ return {
212
212
{ var="minionsConditionCreatedRecently", type="check", label="Have your Minions been created Recently?", ifCond="MinionsCreatedRecently", apply=function(val, modList, enemyModList)
{ var="ailmentMode", type="list", label="Ailment calculation mode:", tooltip="Controls how the base damage for applying Ailments is calculated:\n\tAverage: damage is based on the average application, including both crits and non-crits\n\tCrits Only: damage is based solely on Ailments inflicted with crits\n\tInverted Hits: Calcs shows non-damaging ailments with each applicable resistance inverted. Uses average damage for types the skill cannot invert. Hit DPS keeps its usual chance weighting.", list= {{val="AVERAGE",label="Average"},{val="CRIT",label="Crits Only"},{val="INVERTED",label="Inverted Hits"}} },
215
+
{ var="ailmentMode", type="list", label="Ailment calculation mode:", tooltip="Controls how the base damage for applying Ailments is calculated:\n\tAverage: damage is based on the average application, including both crits and non-crits\n\tCrits Only: damage is based solely on Ailments inflicted with crits\n\tInverted Hits: non-damaging ailments and the Freeze threshold are based on a hit that treats every Enemy Resistance it can as inverted,\n\t\tinstead of weighting by the chance to invert. Damage types the skill cannot invert use their average damage.\n\t\tHit damage keeps its chance weighting. Ignite, Bleed and Poison are unaffected, as they are based on damage before Enemy Resistances.", list= {{val="AVERAGE",label="Average"},{val="CRIT",label="Crits Only"},{val="INVERTED",label="Inverted Hits"}} },
216
216
{ var="physMode", type="list", label="Random element mode:", ifFlag="randomPhys", tooltip="Controls how modifiers which choose a random element will function.\n\tAverage: Modifiers will grant one third of their value to ^xB97123Fire^7, ^x3F6DB3Cold^7, and ^xADAA47Lightning ^7simultaneously\n\t^xB97123Fire ^7/ ^x3F6DB3Cold ^7/ ^xADAA47Lightning^7: Modifiers will grant their full value as the specified element\nIf a modifier chooses between just two elements, the full value can only be given as those two elements.", list= {{val="AVERAGE",label="Average"},{val="FIRE",label="^xB97123Fire"},{val="COLD",label="^x3F6DB3Cold"},{val="LIGHTNING",label="^xADAA47Lightning"}} },
217
217
{ var="lifeRegenMode", type="list", label="^xE05030Life ^7regen calculation mode:", ifCond= { "LifeRegenBurstAvg", "LifeRegenBurstFull" }, tooltip="Controls how ^xE05030life ^7regeneration is calculated:\n\tMinimum: does not include burst regen\n\tAverage: includes burst regen, averaged based on uptime\n\tBurst: includes full burst regen", list= {{val="MIN",label="Minimum"},{val="AVERAGE",label="Average"},{val="FULL",label="Burst"}}, apply=function(val, modList, enemyModList)
0 commit comments