Skip to content

Exempt Hunny cards from the 2-ink deck limit when Hunny Sage is present #475

Description

@Doberjohn

Christopher Robin - Hunny Sage (id 3032, Amethyst-Sapphire) is the only deck-building rule modifier in Core. Its static ability GATHER THE PARTY reads: "You can have other Hunny characters in your deck regardless of ink type." So a deck running him may include Hunny-classification characters of any ink, exempt from the ≤2-ink rule. The #467 builder currently flags such decks illegal (calculateDeckStats) and dims/disables off-ink Hunny cards in the pool (getPoolTileState). Surfaced during #467.

Scope — detect the enabler by ability text, not card name/id (golden rule #2: Core rotates; it is the only card with this text, so a targeted pattern is safe). Confirmed viable client-side: the loader's LorcanaCard exposes text and classifications (apps/web/src/features/cards/loader.ts), so no build-time precompute is needed.

  • Enabler detection — a shared predicate (e.g. hasAnyInkHunnyGrant(card)) matching the GATHER THE PARTY text, e.g. /hunny characters? in your deck regardless of ink/i. Place it where both call sites can share it (a features/deck/analysis/ helper or the engine cardHelpers).
  • Legality (apps/web/src/features/deck/analysis/deckStats.ts) — when any deck card is an enabler, drop Hunny-classification cards from the ink union used for the ≤2-ink check. Keep them in inkDistribution; only the cap / inkCount / legalityErrors change. The ability says other Hunny characters, so the enabler's own inks still count.
  • Pool gating (apps/web/src/features/deck/components/poolTileState.ts) — thread an "any-ink-Hunny active" flag so a Hunny card is never offInk when an enabler is in the deck. Signature change: DeckBuilderPage computes it once, then passes it → DeckPoolGridPoolCardTilegetPoolTileState.

Tests — legality allows a 3rd ink for a Hunny card when the enabler is present; still flags a 3rd ink for a NON-Hunny card; still flags a non-enabler Hunny deck; getPoolTileState keeps an off-ink Hunny card addable under the exemption; enabler matched by text (a reprint with a new id still matches), not by id 3032.

WatchgetPoolTileState is a pure 3-arg predicate with its own poolTileState.test.ts; the new flag is a 4th input, so update those tests + the 4 call sites. Don't corrupt inkDistribution (only the cap logic changes).

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    deck-builderDeck builder + advisor + Engine Score initiativeenhancement

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions