Source code for yasuki_core.game_pieces.dynasty
from dataclasses import dataclass
from pathlib import Path
from yasuki_core.game_pieces.cards import L5RCard
from yasuki_core.paths import (
DYNASTY_BACK,
DEFAULT_PERSONALITY,
DEFAULT_HOLDING,
DEFAULT_EVENT,
DEFAULT_REGION,
DEFAULT_CELESTIAL,
)
[docs]
@dataclass(frozen=True, slots=True)
class DynastyCard(L5RCard):
gold_cost: int | None = None
image_back: Path | None = DYNASTY_BACK
[docs]
@dataclass(frozen=True, slots=True)
class DynastyPersonality(DynastyCard):
force: int = 0
chi: int = 0
personal_honor: int = 0
# None is the printed dash: an infinitely low requirement below any number, so the card recruits
# at any Family Honor. A number (possibly 0 or negative) is a real threshold to meet.
honor_requirement: int | None = None
image_front: Path | None = DEFAULT_PERSONALITY
[docs]
@dataclass(frozen=True, slots=True)
class DynastyHolding(DynastyCard):
gold_production: int = 0
image_front: Path | None = DEFAULT_HOLDING
[docs]
@dataclass(frozen=True, slots=True)
class DynastyEvent(DynastyCard):
image_front: Path | None = DEFAULT_EVENT
[docs]
@dataclass(frozen=True, slots=True)
class DynastyRegion(DynastyCard):
image_front: Path | None = DEFAULT_REGION
[docs]
@dataclass(frozen=True, slots=True)
class DynastyCelestial(DynastyCard):
image_front: Path | None = DEFAULT_CELESTIAL