"""Seed the Earthman deck: DeckVariant + 50 major + 56 minor/middle arcana (106 cards total)."""
from django.db import migrations

# Major arcana
# (number, name, slug, group, correspondence, icon,
#  reversal, levity_qualifier, gravity_qualifier,
#  levity_emanation, gravity_emanation, levity_reversal, gravity_reversal,
#  mechanisms, articulations, keywords_upright, keywords_reversed, cautions)
EM_MAJOR = [
    (0,"The Nomad","the-nomad","","The Fool / Il Matto","fa-hat-cowboy-side","","Enlightened","Engraven","","","","",[], [],["beginnings","spontaneity","freedom"],["recklessness","naivety","risk"],[]),
    (1,"The Schizo","the-schizo","Pope/Horseman","Magician","fa-hat-wizard","Territoriality","Enlightened","Engraven","","","","",[], [],["willpower","skill","resourcefulness"],["manipulation","untapped potential","deceit"],["This card will reverse into <span class=\"card-ref\">I. The Pervert</span> when it comes under dominion of <span class=\"card-ref\">II. The Occultist</span>, which in turn reverses into <span class=\"card-ref\">II. Pestilence</span>.","This card will reverse into <span class=\"card-ref\">I. The Paranoiac</span> when it comes under dominion of <span class=\"card-ref\">III. The Despot</span>, which in turn reverses into <span class=\"card-ref\">III. War</span>.","This card will reverse into <span class=\"card-ref\">I. The Neurotic</span> when it comes under dominion of <span class=\"card-ref\">IV. The Capitalist</span>, which in turn reverses into <span class=\"card-ref\">IV. Famine</span>.","This card will reverse into <span class=\"card-ref\">I. The Suicidal</span> when it comes under dominion of <span class=\"card-ref\">V. The Fascist</span>, which in turn reverses into <span class=\"card-ref\">V. Death</span>."]),
    (2,"The Occultist","the-occultist","Pope/Horseman","High Priestess","fa-hand-dots","Territoriality","Enlightened","Engraven","","","","",[], [],["intuition","mystery","inner knowledge"],["secrets","disconnection","withdrawal"],[]),
    (3,"The Despot","the-despot","Pope/Horseman","Empress","fa-hand-dots","Despotism","Enlightened","Engraven","","","","",[], [],["fertility","abundance","nurturing"],["dependence","smothering","creative block"],[]),
    (4,"The Capitalist","the-capitalist","Pope/Horseman","Emperor","fa-hand-dots","Capitalism","Enlightened","Engraven","","","","",[], [],["authority","structure","stability"],["rigidity","domination","inflexibility"],[]),
    (5,"The Fascist","the-fascist","Pope/Horseman","Hierophant","fa-hand-dots","Fascism","Enlightened","Engraven","","","","",[], [],["tradition","conformity","institutions"],["rebellion","unconventionality","challenge"],[]),
    (6,"Controlled Folly","controlled-folly","Implicit Virtues","Fortitude","fa-hand-dots","","","","","","","",[], [],["courage","patience","compassion"],["self-doubt","weakness","insecurity"],[]),
    (7,"Not Doing","not-doing","Implicit Virtues","Temperance","fa-hand-dots","","","","","","","",[], [],["fairness","truth","cause and effect"],["injustice","dishonesty","avoidance"],[]),
    (8,"Losing Self-Importance","losing-self-importance","Implicit Virtues","Justice","fa-hand-dots","","","","","","","",[], [],["balance","patience","moderation"],["imbalance","excess","lack of harmony"],[]),
    (9,"Erasing Personal History","erasing-personal-history","Implicit Virtues","Prudence","fa-hand-dots","","","","","","","",[], [],[],[],[]),
    (10,"Space","space-em","Elements","Chariot","fa-hand-dots","Nexus","Kinetic","Potential","","","","",[], [],[],[],[]),
    (11,"Time","time-em","Elements","Hermit","fa-hand-dots","Tempo","Kinetic","Potential","","","","",[], [],[],[],[]),
    (12,"Stone","stone-em","Elements","Earth","fa-hand-dots","Ossum","Kinetic","Potential","","","","",[], [],[],[],[]),
    (13,"Fire","fire-em","Elements","Fire","fa-hand-dots","Ardor","Kinetic","Potential","","","","",[], [],[],[],[]),
    (14,"Water","water-em","Elements","Water","fa-hand-dots","Humor","Kinetic","Potential","","","","",[], [],[],[],[]),
    (15,"Air","air-em","Elements","Air","fa-hand-dots","Pneuma","Kinetic","Potential","","","","",[], [],[],[],[]),
    (16,"Disco Inferno","disco-inferno","Realms","Devil","fa-hand-dots","Shame","Deasil","Widdershins","","","","",[], [],["sudden change","upheaval","revelation"],["avoidance","fear of change","delaying disaster"],[]),
    (17,"Torre Terrestre","torre-terrestre","Realms","Tower","fa-hand-dots","Guilt","Deasil","Widdershins","","","","",[], [],[],[],[]),
    (18,"Fantasia Celestia","fantasia-celestia","Realms","Wheel of Fortune","fa-hand-dots","Anxiety","Deasil","Widdershins","","","","",[], [],[],[],[]),
    (19,"Stalking","stalking","Explicit Virtues","Charity","fa-hand-dots","","","","","","","",[], [],["love","harmony","choice"],["disharmony","imbalance","misalignment"],[]),
    (20,"Dreaming","dreaming","Explicit Virtues","Faith","fa-hand-dots","","","","","","","",[], [],[],[],[]),
    (21,"Intent","intent","Explicit Virtues","Hope","fa-hand-dots","","","","","","","",[], [],[],[],[]),
    (22,"Aries","aries","Zodiac Signs & Houses","Aries","fa-hand-dots","House of Self","Precessional","Recessional","","","","",[], [],[],[],[]),
    (23,"Taurus","taurus","Zodiac Signs & Houses","Taurus","fa-hand-dots","House of Worth","Precessional","Recessional","","","","",[], [],[],[],[]),
    (24,"Gemini","gemini","Zodiac Signs & Houses","Gemini","fa-hand-dots","House of Education","Precessional","Recessional","","","","",[], [],[],[],[]),
    (25,"Cancer","cancer","Zodiac Signs & Houses","Cancer","fa-hand-dots","House of Family","Precessional","Recessional","","","","",[], [],[],[],[]),
    (26,"Leo","leo","Zodiac Signs & Houses","Leo","fa-hand-dots","House of Creation","Precessional","Recessional","","","","",[], [],[],[],[]),
    (27,"Virgo","virgo","Zodiac Signs & Houses","Virgo","fa-hand-dots","House of Ritual","Precessional","Recessional","","","","",[], [],[],[],[]),
    (28,"Libra","libra","Zodiac Signs & Houses","Libra","fa-hand-dots","House of Cooperation","Precessional","Recessional","","","","",[], [],[],[],[]),
    (29,"Scorpio","scorpio","Zodiac Signs & Houses","Scorpio","fa-hand-dots","House of Regeneration","Precessional","Recessional","","","","",[], [],[],[],[]),
    (30,"Sagittarius","sagittarius","Zodiac Signs & Houses","Sagittarius","fa-hand-dots","House of Enterprise","Precessional","Recessional","","","","",[], [],[],[],[]),
    (31,"Capricorn","capricorn","Zodiac Signs & Houses","Capricorn","fa-hand-dots","House of Career","Precessional","Recessional","","","","",[], [],[],[],[]),
    (32,"Aquarius","aquarius","Zodiac Signs & Houses","Aquarius","fa-hand-dots","House of Reward","Precessional","Recessional","","","","",[], [],[],[],[]),
    (33,"Pisces","pisces","Zodiac Signs & Houses","Pisces","fa-hand-dots","House of Reprisal","Precessional","Recessional","","","","",[], [],[],[],[]),
    (34,"Animal Powers","animal-powers","Lunars","Hanged Man","fa-hand-dots","Patrilineage","Centrifugal","Centripetal","","","","",[], [],["pause","surrender","new perspective"],["stalling","resistance","indecision"],[]),
    (35,"Seeded Earth","seeded-earth","Lunars","Death","fa-hand-dots","Matrilineage","Centrifugal","Centripetal","","","","",[], [],["endings","transition","transformation"],["fear of change","stagnation","resistance"],[]),
    (36,"The Twins of Pluto","twins-of-pluto","Lunars","Pluto","fa-hand-dots","","Prograde","Retrograde","","","","",[], [],[],[],[]),
    (37,"Neptune","neptune","Planets","Neptune","fa-hand-dots","","Prograde","Retrograde","","","","",[], [],[],[],[]),
    (38,"Uranus","uranus","Planets","Uranus","fa-hand-dots","","Prograde","Retrograde","","","","",[], [],[],[],[]),
    (39,"Saturn","saturn","Planets","Saturn","fa-hand-dots","","Prograde","Retrograde","","","","",[], [],[],[],[]),
    (40,"Jupiter","jupiter","Planets","Jupiter","fa-hand-dots","","Prograde","Retrograde","","","","",[], [],[],[],[]),
    (41,"The Asteroid Belt","the-asteroid-belt","Planets","","","Ouroboros","Prograde","Retrograde","","","","",[], [],[],[],[]),
    (42,"Mars","mars","Planets","Mars","fa-hand-dots","","Prograde","Retrograde","","","","",[], [],[],[],[]),
    (43,"Venus","venus","Planets","Venus","fa-hand-dots","","Prograde","Retrograde","","","","",[], [],[],[],[]),
    (44,"Mercury","mercury","Planets","Mercury","fa-hand-dots","","Prograde","Retrograde","","","","",[], [],[],[],[]),
    (45,"The Polestar","the-polestar","Inner Rings","Star","fa-hand-dots","","Precessional","Recessional","","","","",[], [],["hope","renewal","inspiration"],["despair","insecurity","hopelessness"],[]),
    (46,"The Antichthon","the-antichthon","Inner Rings","Moon","fa-hand-dots","","Waxing","Waning","","","","",[], [],["illusion","fear","the unconscious"],["confusion","misinterpretation","clarity"],[]),
    (47,"The Corestar","the-corestar","Inner Rings","Sun","fa-hand-dots","","Inclining","Declining","","","","",[], [],["positivity","success","vitality"],["negativity","depression","sadness"],[]),
    (48,"Father Sky / Mother Sea","father-sky-mother-sea","","World","fa-hand-dots","","","","Father Sky","Mother Sea","The Storm","The Flood",[], [],["completion","integration","accomplishment"],["incompletion","no closure","shortcuts"],[]),
    (49,"The Effulgent Mould of Man / The Devouring Eagle","effulgent-mould-devouring-eagle","","Trumpets","fa-hand-dots","","","","The Effulgent Mould of Man","The Devouring Eagle","","",[], [],["reflection","reckoning","absolution"],["self-doubt","lack of self-awareness","loathing"],[]),
]

# Minor/Middle arcana
# (arcana, suit, number, name, slug, keywords_upright, keywords_reversed)
EM_MINOR = [
    ("MINOR","BRANDS",1,"Ace of Brands","ace-of-wands-em",["inspiration","new venture","spark"],["delays","lack of motivation","false start"]),
    ("MINOR","BRANDS",2,"Two of Brands","two-of-wands-em",["planning","progress","decisions"],["impatience","lack of planning","hesitation"]),
    ("MINOR","BRANDS",3,"Three of Brands","three-of-wands-em",["expansion","foresight","enterprise"],["obstacles","lack of foresight","delays"]),
    ("MINOR","BRANDS",4,"Four of Brands","four-of-wands-em",["celebration","harmony","homecoming"],["lack of support","transience","home conflicts"]),
    ("MINOR","BRANDS",5,"Five of Brands","five-of-wands-em",["conflict","competition","tension"],["avoiding conflict","compromise","truce"]),
    ("MINOR","BRANDS",6,"Six of Brands","six-of-wands-em",["victory","recognition","progress"],["excess pride","lack of recognition","fall"]),
    ("MINOR","BRANDS",7,"Seven of Brands","seven-of-wands-em",["challenge","courage","competition"],["anxiety","giving up","overwhelmed"]),
    ("MINOR","BRANDS",8,"Eight of Brands","eight-of-wands-em",["rapid action","adventure","change"],["haste","scattered energy","delays"]),
    ("MINOR","BRANDS",9,"Nine of Brands","nine-of-wands-em",["resilience","persistence","last stand"],["exhaustion","giving up","surrender"]),
    ("MINOR","BRANDS",10,"Ten of Brands","ten-of-wands-em",["completion","celebration","travel"],["burdens","oppression","carrying too much"]),
    ("MIDDLE","BRANDS",11,"Maid of Brands","maid-of-wands-em",["exploration","enthusiasm","adventure"],["hasty decisions","scattered energy","immaturity"]),
    ("MIDDLE","BRANDS",12,"Jack of Brands","jack-of-wands-em",["energy","passion","adventure"],["scattered energy","frustration","aggression"]),
    ("MIDDLE","BRANDS",13,"Queen of Brands","queen-of-wands-em",["confidence","independence","courage"],["selfishness","jealousy","insecurity"]),
    ("MIDDLE","BRANDS",14,"King of Brands","king-of-wands-em",["big picture","leadership","vision"],["impulsiveness","haste","overconfidence"]),
    ("MINOR","GRAILS",1,"Ace of Grails","ace-of-cups-em",["new feelings","intuition","opportunity"],["blocked creativity","emptiness","hesitation"]),
    ("MINOR","GRAILS",2,"Two of Grails","two-of-cups-em",["partnership","unity","celebration"],["imbalance","broken bonds","misalignment"]),
    ("MINOR","GRAILS",3,"Three of Grails","three-of-cups-em",["creativity","community","abundance"],["independence","isolation","looking inward"]),
    ("MINOR","GRAILS",4,"Four of Grails","four-of-cups-em",["contemplation","apathy","reevaluation"],["withdrawal","boredom","seeking motivation"]),
    ("MINOR","GRAILS",5,"Five of Grails","five-of-cups-em",["loss","grief","disappointment"],["acceptance","moving on","forgiveness"]),
    ("MINOR","GRAILS",6,"Six of Grails","six-of-cups-em",["nostalgia","reunion","joy"],["living in the past","naivety","unrealistic"]),
    ("MINOR","GRAILS",7,"Seven of Grails","seven-of-cups-em",["illusion","fantasy","wishful thinking"],["alignment","clarity","sobriety"]),
    ("MINOR","GRAILS",8,"Eight of Grails","eight-of-cups-em",["disappointment","abandonment","walking away"],["hopelessness","aimlessness","stagnation"]),
    ("MINOR","GRAILS",9,"Nine of Grails","nine-of-cups-em",["contentment","fulfilment","satisfaction"],["inner happiness","materialism","indulgence"]),
    ("MINOR","GRAILS",10,"Ten of Grails","ten-of-cups-em",["divine love","bliss","fulfilment"],["inner happiness","alignment","personal values"]),
    ("MIDDLE","GRAILS",11,"Maid of Grails","maid-of-cups-em",["sensitivity","creativity","intuition"],["insecurity","emotional immaturity","creative blocks"]),
    ("MIDDLE","GRAILS",12,"Jack of Grails","jack-of-cups-em",["compassion","romanticism","diplomacy"],["moodiness","emotional manipulation","deception"]),
    ("MIDDLE","GRAILS",13,"Queen of Grails","queen-of-cups-em",["compassion","empathy","nurturing"],["emotional insecurity","over-giving","neglect"]),
    ("MIDDLE","GRAILS",14,"King of Grails","king-of-cups-em",["emotional maturity","diplomacy","wisdom"],["manipulation","moodiness","coldness"]),
    ("MINOR","BLADES",1,"Ace of Blades","ace-of-swords-em",["raw power","breakthrough","clarity"],["confusion","brutality","mental chaos"]),
    ("MINOR","BLADES",2,"Two of Blades","two-of-swords-em",["difficult choices","stalemate","truce"],["indecision","lies","confusion"]),
    ("MINOR","BLADES",3,"Three of Blades","three-of-swords-em",["heartbreak","sorrow","grief"],["recovery","forgiveness","moving on"]),
    ("MINOR","BLADES",4,"Four of Blades","four-of-swords-em",["rest","restoration","retreat"],["restlessness","burnout","illness"]),
    ("MINOR","BLADES",5,"Five of Blades","five-of-swords-em",["defeat","change","transition"],["resistance to change","inability to move"]),
    ("MINOR","BLADES",6,"Six of Blades","six-of-swords-em",["victory","success","ambition"],["an eye for an eye","dishonour","manipulation"]),
    ("MINOR","BLADES",7,"Seven of Blades","seven-of-swords-em",["deception","trickery","tactics"],["imposter syndrome","coming clean","rethinking"]),
    ("MINOR","BLADES",8,"Eight of Blades","eight-of-swords-em",["restriction","isolation","imprisonment"],["self-limiting beliefs","inner critic","opening up"]),
    ("MINOR","BLADES",9,"Nine of Blades","nine-of-swords-em",["anxiety","worry","fear"],["recovery from anxiety","inner turmoil","secrets"]),
    ("MINOR","BLADES",10,"Ten of Blades","ten-of-swords-em",["ruin","painful endings","loss"],["recovery","regeneration","resisting an end"]),
    ("MIDDLE","BLADES",11,"Maid of Blades","maid-of-swords-em",["new ideas","mental agility","curiosity"],["manipulation","all talk no action","ruthlessness"]),
    ("MIDDLE","BLADES",12,"Jack of Blades","jack-of-swords-em",["action","impulsiveness","ambition"],["no direction","disregard for consequences"]),
    ("MIDDLE","BLADES",13,"Queen of Blades","queen-of-swords-em",["clarity","directness","structure"],["coldness","cruelty","manipulation"]),
    ("MIDDLE","BLADES",14,"King of Blades","king-of-swords-em",["mental clarity","truth","authority"],["abuse of power","manipulation","coldness"]),
    ("MINOR","CROWNS",1,"Ace of Crowns","ace-of-crowns-em",["opportunity","new venture","manifestation"],["lost opportunity","lack of planning","scarcity"]),
    ("MINOR","CROWNS",2,"Two of Crowns","two-of-crowns-em",["juggling resources","flexibility","fun"],["imbalance","disorganisation","overwhelm"]),
    ("MINOR","CROWNS",3,"Three of Crowns","three-of-crowns-em",["teamwork","building","apprenticeship"],["lack of teamwork","disharmony","misalignment"]),
    ("MINOR","CROWNS",4,"Four of Crowns","four-of-crowns-em",["stability","security","conservation"],["greed","stinginess","possessiveness"]),
    ("MINOR","CROWNS",5,"Five of Crowns","five-of-crowns-em",["isolation","insecurity","worry"],["recovery from loss","overcoming hardship"]),
    ("MINOR","CROWNS",6,"Six of Crowns","six-of-crowns-em",["generosity","charity","community"],["strings attached","power dynamics","inequality"]),
    ("MINOR","CROWNS",7,"Seven of Crowns","seven-of-crowns-em",["hard work","perseverance","diligence"],["lack of reward","laziness","low quality"]),
    ("MINOR","CROWNS",8,"Eight of Crowns","eight-of-crowns-em",["apprenticeship","education","skill"],["perfectionism","misdirected activity","misuse"]),
    ("MINOR","CROWNS",9,"Nine of Crowns","nine-of-crowns-em",["abundance","luxury","self-sufficiency"],["overindulgence","superficiality","materialism"]),
    ("MINOR","CROWNS",10,"Ten of Crowns","ten-of-crowns-em",["wealth","financial security","achievement"],["financial failure","greed","lost success"]),
    ("MIDDLE","CROWNS",11,"Maid of Crowns","maid-of-crowns-em",["ambition","diligence","management"],["underhandedness","greediness","unethical"]),
    ("MIDDLE","CROWNS",12,"Jack of Crowns","jack-of-crowns-em",["hard work","productivity","routine"],["laziness","obsession with work","burnout"]),
    ("MIDDLE","CROWNS",13,"Queen of Crowns","queen-of-crowns-em",["nurturing","practical","abundance"],["financial dependence","smothering","insecurity"]),
    ("MIDDLE","CROWNS",14,"King of Crowns","king-of-crowns-em",["abundance","prosperity","security"],["greed","indulgence","sensual obsession"]),
]


def seed(apps, schema_editor):
    DeckVariant = apps.get_model('epic', 'DeckVariant')
    TarotCard   = apps.get_model('epic', 'TarotCard')

    deck = DeckVariant.objects.create(
        name='Earthman',
        slug='earthman',
        card_count=106,
        is_default=True,
    )

    for (number, name, slug, group, correspondence, icon,
         reversal, levity_qualifier, gravity_qualifier,
         levity_emanation, gravity_emanation, levity_reversal, gravity_reversal,
         mechanisms, articulations, kw_up, kw_rev, cautions) in EM_MAJOR:
        TarotCard.objects.create(
            deck_variant=deck,
            arcana='MAJOR',
            suit=None,
            number=number,
            name=name,
            slug=slug,
            group=group,
            correspondence=correspondence,
            icon=icon,
            reversal=reversal,
            levity_qualifier=levity_qualifier,
            gravity_qualifier=gravity_qualifier,
            levity_emanation=levity_emanation,
            gravity_emanation=gravity_emanation,
            levity_reversal=levity_reversal,
            gravity_reversal=gravity_reversal,
            mechanisms=mechanisms,
            articulations=articulations,
            keywords_upright=kw_up,
            keywords_reversed=kw_rev,
            cautions=cautions,
        )

    for arcana, suit, number, name, slug, kw_up, kw_rev in EM_MINOR:
        if arcana == 'MIDDLE':
            lev_qual, grav_qual = 'Elevated', 'Graven'
        else:
            lev_qual, grav_qual = 'Relieving', 'Grieving'
        TarotCard.objects.create(
            deck_variant=deck,
            arcana=arcana,
            suit=suit,
            number=number,
            name=name,
            slug=slug,
            levity_qualifier=lev_qual,
            gravity_qualifier=grav_qual,
            keywords_upright=kw_up,
            keywords_reversed=kw_rev,
        )


class Migration(migrations.Migration):

    dependencies = [
        ('epic', '0003_seed_fiorentine_deck'),
    ]

    operations = [
        migrations.RunPython(seed, migrations.RunPython.noop),
    ]
