"""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)]
