Skip to content

Dismantle target export omits Vulnerable doubled hit count #78

@CyberBarbarian

Description

@CyberBarbarian

I hit this while checking target-specific combat hand exports from the headless JSON state.

Minimal repro shape:

  1. Start a combat with Bash and Dismantle in hand, such as SHRINKER_BEETLE_WEAK with a controlled deck.
  2. Play Bash into the target so that enemy has Vulnerable.
  3. Inspect Dismantle.stats.damage_by_target[0] before playing it.
  4. Play Dismantle into that same target and compare the exported value with the HP delta.

Observed before local patch:

  • The target-specific damage preview exported the per-hit damage, e.g. damage: 12.
  • The export did not expose that Dismantle would hit twice against a Vulnerable target.
  • Actual combat resolution reduced enemy HP by 24, because Dismantle.OnPlay uses target.HasPower<VulnerablePower>() to choose a hit count of 2.

Expected:

The headless state export should expose the target-specific repeat/total damage for this target, for example repeat: 2 and total_damage: 24, while leaving underlying card and combat resolution unchanged.

Implementation note from downstream testing:

Using the game's dynamic-var preview layer (CardModel.UpdateDynamicVarPreview with CardPreviewMode.MultiCreatureTargeting) is a cleaner way to export ordinary target-side damage modifiers such as Vulnerable and Slow. This Dismantle case is separate because the conditional hit count lives in card OnPlay, not in the dynamic damage preview.

Fork reference for the export-layer patch only: CyberBarbarian@952a03c

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions