-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Fix Bleed DPS when using multiple totems #4650
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2883,6 +2883,10 @@ function calcs.offence(env, actor, activeSkill) | |
| local rateMod = calcLib.mod(skillModList, cfg, "BleedFaster") + enemyDB:Sum("INC", nil, "SelfBleedFaster") / 100 | ||
| globalOutput.BleedDuration = durationBase * durationMod / rateMod * debuffDurationMult | ||
| local bleedStacks = (output.HitChance / 100) * (globalOutput.BleedDuration / output.Time) / maxStacks | ||
| local activeTotems = env.modDB:Override(nil, "TotemsSummoned") or skillModList:Sum("BASE", skillCfg, "ActiveTotemLimit", "ActiveBallistaLimit") | ||
| if skillFlags.totem then | ||
| bleedStacks = (output.HitChance / 100) * (globalOutput.BleedDuration / output.Time) * activeTotems / maxStacks | ||
| end | ||
| bleedStacks = configStacks > 0 and m_min(bleedStacks, configStacks / maxStacks) or bleedStacks | ||
| globalOutput.BleedStackPotential = bleedStacks | ||
| if globalBreakdown then | ||
|
|
@@ -2891,9 +2895,12 @@ function calcs.offence(env, actor, activeSkill) | |
| s_format(""), | ||
| s_format("%.2f ^8(chance to hit)", output.HitChance / 100), | ||
| s_format("* (%.2f / %.2f) ^8(BleedDuration / Attack Time)", globalOutput.BleedDuration, output.Time), | ||
| s_format("/ %d ^8(max number of stacks)", maxStacks), | ||
| s_format("= %.2f", globalOutput.BleedStackPotential), | ||
| } | ||
| if skillFlags.totem then | ||
| t_insert(globalBreakdown.BleedStackPotential, s_format("* %d ^8(active number of totems)", activeTotems)) | ||
| end | ||
| t_insert(globalBreakdown.BleedStackPotential,s_format("/ %d ^8(max number of stacks)", maxStacks)) | ||
| t_insert(globalBreakdown.BleedStackPotential,s_format("= %.2f", globalOutput.BleedStackPotential)) | ||
| end | ||
|
|
||
| for sub_pass = 1, 2 do | ||
|
|
@@ -2961,6 +2968,9 @@ function calcs.offence(env, actor, activeSkill) | |
| local effectMod = calcLib.mod(skillModList, dotCfg, "AilmentEffect") | ||
| output.BaseBleedDPS = baseVal * effectMod * rateMod * effMult | ||
| bleedStacks = m_min(maxStacks, (output.HitChance / 100) * globalOutput.BleedDuration / output.Time) | ||
| if skillFlags.totem then | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This There is an extra space near the multiplication of |
||
| bleedStacks = m_min(maxStacks, (output.HitChance / 100) * globalOutput.BleedDuration / output.Time * activeTotems) | ||
| end | ||
| local chanceToHitInOneSecInterval = 1 - m_pow(1 - (output.HitChance / 100), output.Speed) | ||
| output.BleedDPS = (baseVal * effectMod * rateMod * effMult) * bleedStacks * chanceToHitInOneSecInterval | ||
| -- reset bleed stacks to actual number doing damage after weighted avg DPS calculation is done | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This
ifis not really necessary given thatlocal activeTotemswill be 1 when no totems, or a valid value if totems.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This makes sense when reading the code, but in practice if a totem build had other sources of maximum totems, they'll still apply to skills that aren't supported by totems without it