yasuki_core.card_art#

Classes

CustomPrint(recipient_card_id, ...)

A reproducible art-swap recipe: the donor's art landed onto a specific recipient printing.

Functions

art_rect(key)

The art rect for an (era, layout type) key, falling back to the era's then the modern Strategy window.

back_era_for_set(set_name)

Which generic card back a set's printings use: "old" before Gold Edition, else "new".

classify(card, set_name)

A card printing's (era, layout type) key into ART_RECTS.

cover_crop(box, target_w, target_h)

Shrink box to the target aspect ratio, centered, so a resize to target fills without distortion.

custom_print_id(recipe)

A stable synthetic print id for a recipe, negative to never collide with DB serial ids.

era_for_date(release_date)

Map a set's release date to its art-layout era band; the modern band for an unknown date.

era_for_set(set_name)

Art-layout era for a set.

load_art_layout()

The raw art-layout data (rects, era bands, layout map) for serving to the browser canvas.

mon_overlays(keywords, era)

Mon overlays for a card's keywords on the modern frame; empty off-era or with no mon keywords.

overlays_for(key)

Frame-element overlays to stamp over the donor art for an (era, layout) key; empty if none.

patches_for(key)

Recipient patches to re-stamp over the donor art for an (era, layout) key; empty if none.