mirror of
https://github.com/mwisnowski/mtg_python_deckbuilder.git
synced 2025-12-17 08:00:13 +01:00
Finalize MDFC follow-ups, docs, and diagnostics tooling
document deck summary DFC badges, exporter annotations, and per-face metadata across README/DOCKER/release notes record completion of all MDFC roadmap follow-ups and add the authoring guide for multi-face CSV entries wire in optional DFC_PER_FACE_SNAPSHOT env support, exporter regression tests, and diagnostics updates noted in the changelog
This commit is contained in:
parent
6fefda714e
commit
88cf832bf2
46 changed files with 3292 additions and 86 deletions
30
code/deck_builder/shared_copy.py
Normal file
30
code/deck_builder/shared_copy.py
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
"""Shared text helpers to keep CLI and web copy in sync."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Optional
|
||||
|
||||
__all__ = ["build_land_headline", "dfc_card_note"]
|
||||
|
||||
|
||||
def build_land_headline(traditional: int, dfc_bonus: int, with_dfc: Optional[int] = None) -> str:
|
||||
"""Return the consistent land summary headline.
|
||||
|
||||
Args:
|
||||
traditional: Count of traditional land slots.
|
||||
dfc_bonus: Number of MDFC lands counted as additional slots.
|
||||
with_dfc: Optional total including MDFC lands. If omitted, the sum of
|
||||
``traditional`` and ``dfc_bonus`` is used.
|
||||
"""
|
||||
base = max(int(traditional), 0)
|
||||
bonus = max(int(dfc_bonus), 0)
|
||||
total = int(with_dfc) if with_dfc is not None else base + bonus
|
||||
headline = f"Lands: {base}"
|
||||
if bonus:
|
||||
headline += f" ({total} with DFC)"
|
||||
return headline
|
||||
|
||||
|
||||
def dfc_card_note(counts_as_extra: bool) -> str:
|
||||
"""Return the descriptive note for an MDFC land entry."""
|
||||
return "Adds extra land slot" if counts_as_extra else "Counts as land slot"
|
||||
Loading…
Add table
Add a link
Reference in a new issue