Dungeon

class pyscoundrel.dungeon.card_pool.Dungeon(config_path: Path | None = None)[source]

Bases: object

Dungeon card pool loaded from YAML configuration.

The dungeon represents all possible cards that can appear in the game, not the shuffled deck used during play.

get_total_cards() int[source]

Get total number of cards in the dungeon pool.

get_cards_by_type(card_type: CardType) List[CardDefinition][source]

Get all card definitions of a specific type.

get_card_by_id(card_id: str) CardDefinition | None[source]

Get a card definition by its ID.

validate() List[str][source]

Validate the dungeon configuration.

Returns:

List of validation error messages (empty if valid)

class pyscoundrel.dungeon.card_pool.CardDefinition(id: str, name: str, card_type: CardType, value: int, count: int, description: str | None = None)[source]

Bases: object

Definition of a card in the dungeon pool.

id: str
name: str
card_type: CardType
value: int
count: int
description: str | None = None
static from_dict(data: Dict) CardDefinition[source]

Create a CardDefinition from a dictionary.