Action(action, label, optional, finishTurn, consumable, handler, cards / zone / area) | Activate a tag unique for this player during BeginTurn, a waiting EndRound, or after successful completion. label is Text. Handler(action, player) for buttons; Handler(action, player, card) with a final cards list for card choices. area: #table or a numeric player ID places a button at that area’s heading. Alternatively, zone: Tag makes an existing zone clickable with a green outline instead of showing a button. |
consumable: #auto / 1–1000 / #manual / #never | Consume after one success, after N successes, explicitly via ConsumeAction, or never. Rejections do not count. #never requires optional: true and finishTurn: false. |
optional / finishTurn | Non-optional actions must be fully consumed before turn end. finishTurn requests turn end on full consumption, waiting for other required actions if necessary. |
ConsumeAction(action) | Consume the current #manual activation by its numeric ID, after completing it successfully. |
Action(spec: […]) | Action map with priority (default 0) and optional player. Use exactly one Text caption: label or button. button places a centered button below the zone cards (zone) or each target card (cards); for area it stays in the heading. Button offers are excluded from card-click choices. Multiple buttons sit together and wrap. Explicit player queues for that player's next turn; otherwise the action lasts this turn. Defaults: optional true, finishTurn false, consumable #auto. |
ActionGroup(spec: […]) | Fields: group, actions, optional player, priority, optional, exclusive, data. Alternatives inherit recipient and priority. One completed alternative completes the group. exclusive (default true) locks after first successful execution. Mandatory groups default optional false; alternatives omit optional/priority/player. |
priority: 10 | Open mandatory offers block player actions with lower priority. Optional offers never block. Same-priority alternatives remain selectable; global actions stay accessible. Nothing executes automatically. |
:board.actions(player) | Active, queued and consumed actions/groups with stable ref, id, kind, player, priority, optional, queued, active, consumed. Actions include group and remaining; groups include exclusive and data. Pass filtered entries to ClearActions. |
SetActionCards(action, cards) | Refresh an active card action by tag, without resetting its consumption counter. |
Complete(action) | Accept the pending request after the rule has applied its effects. |
Reject(action, reason) | Reject with a Text reason; retain the current offers. |
NextRound() | Continue from EndRound or an accepted between-round action once required actions are consumed. Ignored during game shutdown. |
ClearActions() / ClearActions(actions) | Remove all current-player offers, including queued groups, or selected entries from :board.actions(player). Group removal includes its alternatives; an empty group is removed. Global offers and other players remain when no list is supplied. |
NextPlayersTurn() | Request normal turn advancement in BeginTurn, after acceptance, or in on EndTurn(player). Required actions must be consumed; finishTurn can request the transition automatically. |
NextPlayersTurn(nextPlayer: X) | Select a valid next player in BeginTurn, after acceptance or in on EndTurn(player). Forward seat distance counts toward round completion. Last NextPlayersTurn command wins. |
NextPlayersTurn(repeatTurnForPlayer: true) | Repeat the active player after a full circuit; false means normal advancement. Available in BeginTurn, after acceptance or in on EndTurn(player). |
EndGame() | Request EndGame(players) from a round hook, BeginTurn, an answered action, or EndTurn. Closes the open round before EndGame(players). |
Finish(winners) | During EndGame: a list of distinct player IDs wins; [] means nobody wins. |
NoticeTable(_ text) | Replace the centered status text at the bottom of the table. Persists until changed; empty Text clears it. |
NoticeTable(_ text, pushOld) | With true, save the current text and show the new text. Up to 64 saved texts; false only replaces the visible text. |
NoticeTable(pop) | With true, restore the most recently saved text. False or an empty stack does nothing. |
NoticeTable(_ text, stackClear) | With true, clear saved texts and show the new text. New game always resets the stack and visible text. Plain NoticeTable preserves the stack. |
ZoneBadge(_ text, zone[, color]) | Badge beside an existing zone's label; zone is its Tag ID. Same colors and lifetime as PlayerBadge. Empty text removes it. Example: emit ZoneBadge('Dealer', zone: #dealer, color: #blue). |
TableBadge(_ text[, color]) | Badge beside the Table heading. Same colors and lifetime as PlayerBadge. Empty text removes it. Example: emit TableBadge('Round 2', color: #yellow). |
PlayerBadge(_ text, player[, color]) | Set a free-text badge beside a player’s name; empty text removes it. Badges persist until changed or New game. Optional color tag: #green (default), #red, #yellow, #blue or #gray. Example: emit PlayerBadge('Winner', player: 0, color: #green). Omitting color resets it to green. |
Notice(_ text, title: Text) | Show a modal dialog after the rule cascade. Text is unlabeled; title is optional: emit Notice('Hello', title: 'Rules'). Without title, the heading is Game Notice. Multiple notices display one after another; Complete does not erase them. |