mundane.engine.actions¶
Player actions: the data players submit, plus the rejection exception.
Actions are data, not method calls — a whole game is reduce(apply_action, actions, initial).
ACTION_TYPES is the single canonical registry mapping JSON discriminator tags to action
classes; both the JSON export (serialize.py) and the HTTP parser (api/schemas.py) derive
from it so the wire format can never drift from the engine.
Attributes¶
The closed set of moves a player may submit. |
|
Canonical JSON tag -> action-class registry (the |
Exceptions¶
Raised when an action is rejected. State is never mutated on rejection. |
Classes¶
Sorcery-speed play of a PERSON / APPLIANCE / HABIT / TASK from hand. |
|
Cast an INSTANT from hand. Legal any time the player holds priority. |
|
Pass priority. The phase advances as a consequence of passing, not via its own action. |
Module Contents¶
- class mundane.engine.actions.PlayCard[source]¶
Sorcery-speed play of a PERSON / APPLIANCE / HABIT / TASK from hand.
- class mundane.engine.actions.CastInstant[source]¶
Cast an INSTANT from hand. Legal any time the player holds priority.
- class mundane.engine.actions.PassPriority[source]¶
Pass priority. The phase advances as a consequence of passing, not via its own action.
- type mundane.engine.actions.Action = PlayCard | CastInstant | PassPriority[source]¶
The closed set of moves a player may submit.