Skip to content

Payment surfaces by wire

A decision surface is the set of questions a wire puts to a seat while a spell is paid for. Pick a wire.

Every gorge wire sits on the same cast flow. The engine announces the choices of CR 601.2b first, then offers the mana window of CR 601.2g, then pays. What differs is how much of that a wire hands to the seat.

The seat sees three ways to pay. It can answer a plain cast, submit a payment plan, or announce the cast and tap in the window.

flowchart LR
  A[Priority] --> B[Announce]
  B --> C[Plan or window]
  C --> D[Tap or Auto-fill]
  D --> E[Paid]
  C --> F[Cancel cast]

Announcements, in order. The cast asks for these before any mana moves:

Announcement Ask Where
Either-or additional cost altaddcost choice cast_asks.go:27, called at cast_begin.go:1101
Convoke, improvise, harmonize, waterbend taps one option per contribution pay/castasks.go:55, cast_begin.go:1202
The value of X x choice cast_subcounter.go:96
Delve graveyard cards to exile cast_subcounter.go:581
Each hybrid and Phyrexian pip pay_<colour>, pay_generic, pay_life pay/castasks.go:209, cast_begin.go:1253
Sacrifice, discard, tap-another costs chosen as the cost is paid cast_begin.go:1289

A kicked, flashback or other alternative-cost cast is a separate cast option, with its mode on the option.

The wire carries the native decision, so the surface is the native one. The agent's hello picks whether it sees plans.

flowchart LR
  A[hello] --> B{payment_actions}
  B -->|true| C[Plan or announce]
  B -->|false| D[Taps and cast]
  C --> E[Paid]
  D --> E
  • payment_actions: true makes the driver attach plans before the decision is handed over, and the agent may answer with intent.payment or intent.announce (draft/draftlab/extern/player.go:57, :174; engine/seat/seat.go:42).
  • false leaves the ordinary options, so the agent taps lands and casts.
  • skip_forced never skips a decision that carries a payment choice (player.go:212).

The wire is specified in gorge-agent/1.

The engine neutral vocabulary has no field for a plan. A gorged table declares engine_autopay, so the agent never taps.

flowchart LR
  A[hello_ok] --> B[engine_autopay]
  B --> C[cast_spell]
  C --> D[Planner pays]
  D --> E[Paid]
  B -.-> F[asks=native]
  • Autopay (the default). cast_spell pays with the planner's first plan. The host itself answers a mid-resolution mana window, a mana ability's colour ask and a triggered cost's pay-or-decline, and counts those as x_gorge.autopay_fallbacks (env/identity.go:114, session/session.go:119, agent/agent.go:368).
  • A hybrid pip. The host picks the first offered face. v2 has no kind for it (mapping/payment.go:18).
  • X. The agent answers choose_number (mapping/simple.go:249).
  • Convoke-family taps. One select_object per contribution object (mapping/tail.go:121).
  • Manual mana. spellbench-gorge-env -manual-mana offers activate_mana_ability candidates instead (cmd/spellbench-gorge-env/main.go:26, protocol/kinds.go:31). gorged's own tables do not.
  • Taps on gorged. A spell with no plan, such as an X spell or an equip, is offered only once mana floats. The client posts the tap on the native routes (spellbench-v2.md).
  • asks=native. A seat attached this way answers the colour ask, the pay-or-decline, the mana window and each flexible pip itself.

The wire is specified in SpellBench v2.

ManaBrew has a payment prompt of its own, payManaCost. gorge maps the announced window to it.

flowchart LR
  A[chooseAction] --> B[pay-id action]
  B --> C[payManaCost]
  C --> D[act, auto or cancel]
  D --> E[Paid]
  • A plan-backed cast rides on chooseAction as a pay-<id> cast action. Choosing it sends intent.announce, never a plan (server/manabrew/prompt_priority.go:48, :240).
  • payManaCost lists one activateAbility action per source, ability and colour, plus undoMana and autofill. canConfirmFromPool is true only when a done option exists (prompt_payment.go:40, :69).
  • The answers are act for a tap or undo, pay with auto for Auto-fill, and cancel for the cancel option. A cancel is refused on a window that does not offer one (prompt_payment.go:154).
  • The cost shown is the resolved amount owed, not the printed pips.
  • Convoke-family taps and the hybrid pip ask are plain selections over labels (prompt_choose.go:97). An either-or additional cost arrives as a generic label selection.

The wire is specified in ManaBrew.

dirac has no manual mana. Mana abilities are never priority options, and a cast is offered when the pool and untapped sources can pay.

flowchart LR
  A[Priority] --> B[Cast offered]
  B --> C[X and pips]
  C --> D[Planner order]
  D --> E[Paid]

Read more in dirac serving and the dirac guide.