Structs§
Enums§
- Mana
PayCallback - Callback parameter for mana ability payment decisions. Used to dispatch both sacrifice chooser and confirm payment callbacks through a single unified interface to avoid multiple mutable borrows.
Functions§
- auto_
tap_ lands - Auto-tap lands to produce the required mana. Mirrors harness AutoPay flow used by parity tests: collect currently playable mana abilities in battlefield order, choose the first legal source for the next unpaid shard, then repeat after each activation.
- auto_
tap_ lands_ allow_ reserved_ source_ reuse - auto_
tap_ lands_ allow_ reserved_ source_ reuse_ trace - auto_
tap_ lands_ allow_ reserved_ source_ reuse_ trace_ with_ callbacks_ and_ reserved_ sacrifices - auto_
tap_ lands_ allow_ reserved_ source_ reuse_ with_ callbacks - auto_
tap_ lands_ allow_ reserved_ source_ reuse_ with_ callbacks_ and_ reserved_ sacrifices - auto_
tap_ lands_ allow_ reserved_ source_ reuse_ with_ chooser - auto_
tap_ lands_ generic - Auto-tap untapped lands to produce
neededadditional generic mana. Used for paying commander tax on top of the regular cost. - auto_
tap_ lands_ pay_ incremental_ with_ callbacks_ reserved_ and_ ctx - auto_
tap_ lands_ trace - auto_
tap_ lands_ trace_ with_ callbacks - auto_
tap_ lands_ trace_ with_ callbacks_ and_ reserved_ sacrifices - Same as
auto_tap_lands_trace_with_callbacksbut excludes the given permanents from the auto-payer’s mana-source pool. Used during spell casting so a permanent reserved for the spell’s additional sacrifice cost (Sac<1/X>) can’t also be picked for aSac<1/CARDNAME>mana ability — see the seed-62 Eviscerator’s Insight divergence. - auto_
tap_ lands_ trace_ with_ callbacks_ reserved_ and_ ctx - Same as
auto_tap_lands_trace_with_callbacks_and_reserved_sacrificesbut propagates aManaPaymentContextto the source-grouping pass soRestrictValid$mana sources are filtered out when they don’t apply to the current payment (e.g. Flamebraider’s “Spend only on Elemental spells/ abilities” must not show up when paying anUnlessCost). - auto_
tap_ lands_ with_ callbacks - Auto-tap with unified callback for both sacrifice chooser and confirm payment. Used by parity tests to mirror Java’s RNG-driven decision paths.
- auto_
tap_ lands_ with_ chooser - Auto-tap with an explicit sacrifice chooser callback for parity with Java’s
choosePermanentsToSacrificeRNG path. - can_
pay_ mana_ cost_ with_ reserved_ sacrifices - can_
pay_ spell_ mana_ cost_ for_ action_ space - collect_
mana_ payment_ sources - next_
auto_ tap_ choice - Determine the next mana source/ability auto-pay would use without mutating the game or pool. This lets callback-driven payment replay the exact same source choice as engine auto-pay, including multi-ability lands.
- next_
auto_ tap_ choice_ with_ reserved_ sacrifices
Type Aliases§
- Mana
PayCallback Fn - Unified callback for mana payment decisions during auto-tap. Returns Some(card_id) on success, None to cancel.
- Sacrifice
Chooser - Optional callback for choosing which permanent to sacrifice during mana
ability cost payment. When
None, the engine picks the first target after sorting by (card_name, card_id) — a deterministic fallback. WhenSome, the callback is invoked with the sorted list of valid targets and should return the chosen card (mirrors Java’schoosePermanentsToSacrificewhich uses the harness RNG).