Skip to content

P0: engine getRemovalRoles detector (+ conditions) #460

Description

@Doberjohn

Add a generic opponent-removal detector to packages/synergy-engine/src/utils/cardHelpers.ts — the one real engine gap (only per-classification hasNegativeTargeting and your-own self-banish exist today).

ScopegetRemovalRoles(card): RemovalRole[] where role ∈ banish | conditional-banish | damage | debuff | bounce.

  • Exclude self-banish (reuse SACRIFICE_SELF_BANISH_PATTERN as a negative gate).
  • Reuse getActionDamage/isMultiTargetDamageAction (damage) and getBounceRoles 'opponent-bounce' (bounce) — don't re-parse.
  • Also emit the trigger condition (low-strength ≤N / evasive / bodyguard / damaged / high-cost ≥N / mass) that feeds the vulnerability (hoser) catalog.
  • Export via utils/index.ts.

Tests: hard banish, conditional banish, burn action, self-banish must NOT match, opponent bounce, condition extraction.

Watch: the engine-auto-rebuild hook runs build:engine + precompute-synergies; keep CodeScene CC ≤10 (extract helpers).

Part of #450 · Deck Builder & Engine Score milestone.

Metadata

Metadata

Assignees

No one assigned

    Labels

    deck-builderDeck builder + advisor + Engine Score initiativeengineSynergy enginetestingTest coverage and quality

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions