yasuki_core.engine.intents#

Classes

AdjustCounter(card_id, counter, delta)

Add delta to a counter on a face-up card, flooring at zero.

Attach(card_id, to)

Attach a battlefield card to another card or to a province, so it rides behind the parent.

Bow(card_ids)

CardFlagIntent(card_ids)

Base for flag operations that target one or more cards, applied atomically as a batch.

CreateProvince()

Add a fresh province zone for the acting seat.

DestroyProvince(zone)

Discard the province's contents face-up and remove the province zone.

Detach(card_id)

Break a card's own attachment to its parent in place, leaving anything hung off it attached.

DiscardProvince(zone)

Move the province's top card to the dynasty discard, face-up.

Draw(deck)

Draw the top card of a deck; routing (hand/province/battlefield) is decided on apply.

Event(seq, seat, intent[, cards])

A canonical record of one accepted mutation, for logging, redaction, and replay.

FillProvince(zone)

Draw a dynasty card face-down into an empty province.

Flip(card_ids)

FlipCoin(seed)

Flip a fair coin, its result reproducible from the explicit seed.

FlipDeckTop(deck)

Flip a deck's top card face up or down in place, revealing it without drawing.

FlipFace(card_ids)

Turn a double-faced card to its other face; a no-op for single-faced cards.

GiveControl(card_id)

Hand control of a face-up battlefield card to the opponent: the card's owner becomes the other seat.

IntentOp(*values)

Invert(card_ids)

MoveCard(card_id, to[, position, to_bottom, ...])

Move one card to a zone, deck, or the shared battlefield.

MoveDeckTop(deck, to[, position])

Pop a deck's top card and move it to a zone, deck, or the shared battlefield.

Peek(card_id)

Privately peek at one of your own face-down cards (or an owner-less public one).

Raise(card_id)

Bring one battlefield card to the top of the stacking order without moving it.

RemoveCard(card_id)

Take a card off the table entirely, wherever it sits.

ReorderHand(card_id, index)

Move a card already in the acting seat's own hand to a new slot.

ReorderPile(pile, card_id, index)

Move a card within the acting seat's own deck or discard pile to a new slot.

RollDice(seed[, sides])

Roll one sides-sided die, its face reproducible from the explicit seed.

SearchDeck(deck[, limit])

Request a deck's ordered contents; the owner alone receives them.

SetCardPos(card_id, x, y)

Reposition one card freely on the shared battlefield.

SetCardPositions(moves)

Reposition several battlefield cards in one message, the wire form of a group drag.

SetHonor([delta, value])

Adjust the acting seat's honor, either by a relative delta or to an absolute value.

SetNote(card_id, note)

Set or clear a free-text annotation on a face-up card; an empty note removes it.

Show(card_id)

Show one of your own cards to your opponent.

Shuffle(deck, seed)

Shuffle a deck with an explicit seed so the new order is reproducible.

SpawnCard(card_id, position[, token_id, ...])

Put a new public, face-up token on the shared battlefield, copied from a source card.

Unbow(card_ids)

Unpeek(card_id)

Stop peeking at one card, removing the acting seat from its peekers.

Unshow(card_id)

Stop showing one of your own cards to your opponent.

Functions

apply_intent(state, seat, intent)

Validate and apply one intent, mutating state in place and returning the events produced.

coin_flip_outcome(seed)

Return the reproducible coin result, "Heads" or "Tails", for a flip's seed.

dice_roll_outcome(seed, sides)

Return the reproducible die face, an int in 1..sides, for a roll's seed and sides.