Add pseudo-hit support for ailment sources#2376
Draft
turlockmike wants to merge 1 commit into
Draft
Conversation
Some skills inflict an ailment as though dealing damage without actually hitting (e.g. Infernal Legion's burn "ignites as though dealing X"). Add a generic skillData flag, pseudoHitAilment, for such skills: - The skill inflicts only the ailment it represents: the restriction lives in canDoAilment, so on-hit ailment sources (a Poison support, etc.) can't ride along on the notional damage. This works the same for every ailment. - The hit itself deals no damage: hit outputs are zeroed after the ailment has been derived from the stored hit damage, so only the ailment/DoT counts toward DPS (and Full DPS aggregation). No skill sets the flag yet; Infernal Legion support builds on this.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Two PRs #2320 into reviewable pieces, as requested in review. the generic fake-hit mechanic, ahead of the Infernal Legion skill itself (follow-up PR).
Description of the problem being solved:
Some skills and items inflict an ailment "as though dealing" damage without actually hitting: the Infernal Legion supports and Catha's Brilliance (minions Ignite for % of their max life), Stone Greaves and Beira's Anguish (Ignited Ground igniting as though dealing % of max life), Lycosidae (Blocking Poisons as though dealing 100 Base Chaos Damage). Treating these as real hits — the approach in #2320 — inflates hit DPS and Full DPS, and lets on-hit ailment sources (e.g. a Poison support) scale off damage that is never actually dealt.
This adds a generic
skillData.pseudoHitAilmentflag for such sources. The notional damage runs the full hit pipeline (increases, conversion, gain-as-extra, crit) and feeds the one ailment the skill represents, but the hit outputs are zeroed afterwards so it contributes nothing to hit DPS or Full DPS. The gate lives incanDoAilment, which bothcalcAverageUnmitigatedSourceDamageandcalcMinMaxUnmitigatedAilmentSourceDamageroute through, so it behaves the same for every ailment and no on-hit ailment can ride the notional damage. (calcMinMaxPoiseSourceDamageshares the same gate, so a fake hit correctly contributes no stun/poise buildup either.)The existing
Ignite<Type>HitDamageOVERRIDE (used by Burning Runes) covers the other semantic — a final flat value that bypasses the pipeline and never crits — and stays untouched; a skill picks whichever matches its in-game behaviour.No in-tree skill sets the flag yet; the Infernal Legion follow-up PR is the first user.
Steps taken to verify a working solution:
spec/System/TestAilments_spec.lua: a pseudo-hit source deals no hit damage but keeps its full ailment; a 100% poison-on-hit source produces no poison off the notional damage; ailment magnitude still scales the pseudo-hit ailment.Link to a build that showcases this PR:
N/A — no in-tree skill sets the flag yet; the follow-up Infernal Legion PR showcases it.
Before screenshot:
N/A — no behaviour change until a skill sets the flag.
After screenshot:
N/A