yasuki_core.ruleset.Ruleset#

class Ruleset(clan_alignments, clan_aliases=<factory>, off_clan_surcharge=2)[source]#

The arc-specific rules constants the engine reads. Bundling them behind one object lets a later arc’s ruleset be swapped in wholesale rather than editing scattered literals.

Attributes:
clan_alignmentsfrozenset of str

The legal Clan Alignments, as canonical normalize_clan() slugs. A card’s clan counts toward alignment only if it resolves into this set; every other clan name is unaligned.

clan_aliasesdict mapping str to str

Alternate clan slugs that resolve to a canonical member of clan_alignments (e.g. Naga is the same alignment as Akasha in this arc). Applied before the membership test. Default empty.

off_clan_surchargeint

Extra Gold a Recruit costs when the card has a Clan Alignment the recruiting seat does not share. Default 2.

Methods

Ruleset.__init__(clan_alignments[, ...])

Ruleset.alignment(clan_name)

The canonical Clan Alignment slug clan_name denotes, or None when it is not a legal alignment in this ruleset.

Attributes

clan_alignments

clan_aliases

off_clan_surcharge