ValveSoftware / Dota2-Gameplay

Public Bug Tracker for Dota2
1.48k stars 87 forks source link

Stifling dagger damage calculation after breath fire is wrong #1407

Closed adezxc closed 1 year ago

adezxc commented 2 years ago

Ability name

Stifling dagger

Description

Stifling dagger does no damage atleast at level 1 after being affected by Breath Fire damage reduction, even though Breathfire should only reduce 25% of it. Checked in demo hero on creeps, melee heroes and ranged heroes (to not have damage block) and no damage whatsoever

Example Match ID (and possibly Timestamp)

6624371740, 6:22

ennever commented 2 years ago

Yeah, definitely not intended. Even if you assume that the percentages are additive (25% from dagger, -25% from breathe fire), it should still do 65 damage from the bonus.

Aluerie commented 1 year ago

Just adding video-post from u/anthony_cezar: link

bclaw524 commented 1 year ago

It isn't exactly a bug. The only actual issue is that Dagger is reducing the bonus 65 damage, but the rest of the interaction is correct.

This is a bit long, but I will break down a bit of the issue so far.

1) PA's dagger and DK's fire breath both reduce Total Attack Damage.

Total Attack Damage refers to the combined damage of you base attack damage (white) and bonus attack damage (green). As such, the amount of damage you have doesn't matter, they will still be reduced down at the end.

2) both damage reduction fall under "Generic Damage Manipulation".

There are 2 types of damage manipulation from abilities, generic and unique. Unique damage manipulation stacks multiplicatively, while generic damage manipulation stacks additively. (its actually gets a bit more complicated with outgoing/incoming but I won't go into it as the abilities being discuss both apply to outgoing).

As such, the "-75%" from dagger coupled with the -30% from breath fire will add up to cause a -105% to your dagger damage.

As such, the formula for the outgoing damage is as so:

(Base Damage + Bonus Damage) * (1 - Sum of generic damage reduction)

Which result in:

(PA damage + rapier damage)* (1 - 0.75 - 0.3)

The actual bug is that the 65 damage from dagger level 1 is being reduced by dagger's own damage reduction. This is likely partially due to PA dagger being pretty unique, as it is a spell that applies a flat damage bonus and a self damage reduction. I believe, the only other spell that does this is Hoodwink's Acorn shot.

Flat Damage Bonus gets added to Total Damage, and as such, would be reduced by DK's Breath Fire. However, it should still deal about 20~ damage as it is not subjected to being reduced to 25% by dagger's own ability.

I would wager that the reason the interaction is likely because of fitting in PA's unique interaction into the game's general formula for damage calculation. The dagger bonus is treated as flat damage bonus and is added before the reduction effect (and is likely boosted x4 so the actual calculations is correct).

(Also tagging /u/Aluerie )

dioxix00 commented 1 year ago

It isn't exactly a bug

It's a bug because it's not intended to do so, also on the side note, if we tweak the formula from

(Base Damage + Bonus Damage) * (1 - Sum of generic damage reduction)

To

(Base Damage + Bonus Damage) (1 - Spell / Own hero related damage reduction) (1 - Sum of outside damage reduction)

It would be something like this

(PA damage + rapier damage) (1 - 0.75) (1 - 0.3)

bclaw524 commented 1 year ago

@dioxix00

At the moment, Dragon Knight's Breathe Fire is not considered a Unique Damage Manipulator.

You can suggest for the change (which is what you are currently posting), but it does not mean the current interaction is a bugged interaction.

It's wonky, but it still is the expected outcome when you follow the set rules of the game.

adezxc commented 1 year ago

It's a bug because it's the wrong rules set in the game for the abilities. It's a bug in the sense of 'It doesn't make sense that a PA does 0 damage from Stifling Dagger if she is affected by Breath fire'. Just because because of some game mechanic gymnastics you can work this out why this works, it's nonetheless, a bug.

dioxix00 commented 1 year ago

@bclaw524

A software bug is an error, flaw or fault in the design, development, or operation of computer software that causes it to produce an incorrect or unexpected result, or to behave in unintended ways.

I won't add more but I think it's not intended or expected in a sense, sure the following interaction is working according to the formula, but the way it's unexpected which I think make it a bug.

bclaw524 commented 1 year ago

Alright, so i actually got around to testing and I was wrong, there is a bugged interaction. I apologize @dioxix00, you and @adezxc are correct.

So I tried it with a level 20 PA with 0 agi, no items using level 4 dagger with the talent. You can check the calculations here as I don't want to retype/copy paste. https://www.reddit.com/r/DotA2/comments/13wljgx/stifling_dagger_vs_enfeeble/jmdbf00/

It's a more accurate version of how the calculation is done but the short version of the bug, is that the damage gets zeroed whenever the reduction goes over 100%, even if the bonus damage compensates for it.

I missed it the previous time as larger damages caused a bigger "dip" in total damage, so the bonus dagger damage becomes negligible as the extra negative damage removed it (this behavior is correct as Razor's Static Link does the same)

At smaller values, there are thresholds where PA should still be dealing around 5 damage as the bonus damage (even with reductions) is still big enough to compensate for the dip.

I haven't dug deeper to verify the error yet, but if someone else can help check and see if its true with other interactions, that would be great.

edit: updated for clarity.

jeffhill commented 1 year ago

This should be fixed in the next update. Thank you for the bug report!

The currently intended gameplay of stifling dagger is that it applies the damage of a normal attack x $attack_factor+ $base_damage, where $attack_factor= ( 25%, 40%, 55%, 70%) and $base_damage= (65, 70, 75, 80). This total value should then also be mitigated by Dragon's Breath by 30%. As noted in the thread, the reduction of Dragon's Breath was stacking additively with the reduction value of $attack_factor, leading to incorrect final damage values. It is correct for $attack_factor to apply as a form of damage mitigation, since so many different attack damage effects are intended to apply to Stifling Dagger attacks with the $attack_factor discount applied.

The damage reduction of Stifling Dagger will now stack multiplicatively with other sources of outgoing damage reduction, so Dragon's Breath will now correctly reduces the total damage by 30% as intended.