diff --git a/src/apps/epic/migrations/0014_rws_has_card_images_true.py b/src/apps/epic/migrations/0014_rws_has_card_images_true.py new file mode 100644 index 0000000..d8173cc --- /dev/null +++ b/src/apps/epic/migrations/0014_rws_has_card_images_true.py @@ -0,0 +1,35 @@ +"""Flip RWS `has_card_images` to True now that the 79 RWS card-face PNGs are +installed + resized + pngquant'd at `cards-faces/english/rider-waite-smith/`. +Light up the existing image-mode rendering branches (already shipped for +Minchiate) for the RWS deck too — the card face becomes the image; the text +metadata moves to the adjacent stat block; the deck-stack icon uses the +RWS card-back PNG instead of the generic SCSS placeholder rect-fill. + +`is_polarized` stays False (set by 0012). RWS was always a monodeck — flip-to- +back FLIP renders the card-back image instead of cycling gravity/levity halves. + +The is_default flag stays False (Earthman remains the default-equipped deck for +new users); explicit equip via Game Kit is required to put RWS on the table. +""" +from django.db import migrations + + +def forward(apps, schema_editor): + DeckVariant = apps.get_model("epic", "DeckVariant") + DeckVariant.objects.filter(slug="tarot-rider-waite-smith").update( + has_card_images=True, + ) + + +def backward(apps, schema_editor): + DeckVariant = apps.get_model("epic", "DeckVariant") + DeckVariant.objects.filter(slug="tarot-rider-waite-smith").update( + has_card_images=False, + ) + + +class Migration(migrations.Migration): + dependencies = [ + ("epic", "0013_seed_minchiate_fiorentine_1860_1890"), + ] + operations = [migrations.RunPython(forward, backward)] diff --git a/src/apps/epic/tests/integrated/test_models.py b/src/apps/epic/tests/integrated/test_models.py index 1d70f86..6e67b60 100644 --- a/src/apps/epic/tests/integrated/test_models.py +++ b/src/apps/epic/tests/integrated/test_models.py @@ -996,9 +996,12 @@ class DeckSchemaA0Test(TestCase): rws = DeckVariant.objects.get(slug="tarot-rider-waite-smith") self.assertEqual(rws.family, "english") - def test_rws_has_card_images_false(self): + def test_rws_has_card_images_true(self): + """Flipped 2026-05-28 by 0014 — the 79 resized + pngquant'd RWS + face PNGs are installed at `cards-faces/english/rider-waite-smith/`, + so the RWS variant joins Minchiate in image-rendering mode.""" rws = DeckVariant.objects.get(slug="tarot-rider-waite-smith") - self.assertFalse(rws.has_card_images) + self.assertTrue(rws.has_card_images) def test_rws_is_polarized_false(self): rws = DeckVariant.objects.get(slug="tarot-rider-waite-smith")