SIG SELECT FYI: .card-ref spans in Schizo effects; Energy/Operation singular titles; .sig-info CSS fix — TDD
- migration 0009: re-seeds The Schizo energies/operations w. .card-ref spans on all card titles (1. The Priest, 2. The Occultist, 2. Pestilence, 1. The Pervert, etc.) - migration 0008: updated data constants to match (fresh-install canonical source) - sig-select.js: title reads "Energy" / "Operation" (singular) - _card-deck.scss: .sig-info-tooltip → .sig-info (fixes invisible panel + broken dismiss); Energy + Operation titles both use --quaUser (gold --terUser reserved for .card-ref spans) Code architected by Disco DeDisco <discodedisco@outlook.com> Git commit message Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -3,18 +3,20 @@ seed The Schizo (Earthman major arcana card 1) with Energy and Operation entries
|
||||
"""
|
||||
from django.db import migrations
|
||||
|
||||
CR = '<span class="card-ref">{}</span>'
|
||||
|
||||
SCHIZO_ENERGIES = [
|
||||
{"type": "LIBIDO", "effect": "When encountering territorial Libido, may convert Emanation into 1. The Priest."},
|
||||
{"type": "NUMEN", "effect": "When encountering despotic Numen, may convert Emanation into 1. The Powerful."},
|
||||
{"type": "VOLUPTAS", "effect": "When encountering axiomatic Voluptas, may convert Emanation into 1. The Normal."},
|
||||
{"type": "VOLUPTAS", "effect": "When encountering annihilating Voluptas, may convert Emanation into 1. The Surrendered."},
|
||||
{"type": "LIBIDO", "effect": f'When encountering territorial Libido, may convert Emanation into {CR.format("1. The Priest")}.'},
|
||||
{"type": "NUMEN", "effect": f'When encountering despotic Numen, may convert Emanation into {CR.format("1. The Powerful")}.'},
|
||||
{"type": "VOLUPTAS", "effect": f'When encountering axiomatic Voluptas, may convert Emanation into {CR.format("1. The Normal")}.'},
|
||||
{"type": "VOLUPTAS", "effect": f'When encountering annihilating Voluptas, may convert Emanation into {CR.format("1. The Surrendered")}.'},
|
||||
]
|
||||
|
||||
SCHIZO_OPERATIONS = [
|
||||
{"type": "COVER", "effect": "When covering 2. The Occultist she may choose, by converting her own Reversal into 2. Pestilence, to convert this Reversal into 1. The Pervert."},
|
||||
{"type": "CROWN", "effect": "When crowning 3. The Despot she may choose, by converting her own Reversal into 3. War, to convert this Reversal into 1. The Paranoiac."},
|
||||
{"type": "BEHIND", "effect": "When behind 4. The Capitalist he may choose, by converting his own Reversal into 4. Famine, to convert this Reversal into 1. The Neurotic."},
|
||||
{"type": "BEFORE", "effect": "When before 5. The Fascist he may choose, by converting his own Reversal into 5. Death, to convert this Reversal into 1. The Suicidal."},
|
||||
{"type": "COVER", "effect": f'When covering {CR.format("2. The Occultist")} she may choose, by converting her own Reversal into {CR.format("2. Pestilence")}, to convert this Reversal into {CR.format("1. The Pervert")}.'},
|
||||
{"type": "CROWN", "effect": f'When crowning {CR.format("3. The Despot")} she may choose, by converting her own Reversal into {CR.format("3. War")}, to convert this Reversal into {CR.format("1. The Paranoiac")}.'},
|
||||
{"type": "BEHIND", "effect": f'When behind {CR.format("4. The Capitalist")} he may choose, by converting his own Reversal into {CR.format("4. Famine")}, to convert this Reversal into {CR.format("1. The Neurotic")}.'},
|
||||
{"type": "BEFORE", "effect": f'When before {CR.format("5. The Fascist")} he may choose, by converting his own Reversal into {CR.format("5. Death")}, to convert this Reversal into {CR.format("1. The Suicidal")}.'},
|
||||
]
|
||||
|
||||
|
||||
|
||||
53
src/apps/epic/migrations/0009_schizo_card_ref_spans.py
Normal file
53
src/apps/epic/migrations/0009_schizo_card_ref_spans.py
Normal file
@@ -0,0 +1,53 @@
|
||||
"""Re-seed The Schizo's energies and operations with .card-ref HTML spans."""
|
||||
from django.db import migrations
|
||||
|
||||
CR = '<span class="card-ref">{}</span>'
|
||||
|
||||
SCHIZO_ENERGIES = [
|
||||
{"type": "LIBIDO", "effect": f'When encountering territorial Libido, may convert Emanation into {CR.format("1. The Priest")}.'},
|
||||
{"type": "NUMEN", "effect": f'When encountering despotic Numen, may convert Emanation into {CR.format("1. The Powerful")}.'},
|
||||
{"type": "VOLUPTAS", "effect": f'When encountering axiomatic Voluptas, may convert Emanation into {CR.format("1. The Normal")}.'},
|
||||
{"type": "VOLUPTAS", "effect": f'When encountering annihilating Voluptas, may convert Emanation into {CR.format("1. The Surrendered")}.'},
|
||||
]
|
||||
|
||||
SCHIZO_OPERATIONS = [
|
||||
{"type": "COVER", "effect": f'When covering {CR.format("2. The Occultist")} she may choose, by converting her own Reversal into {CR.format("2. Pestilence")}, to convert this Reversal into {CR.format("1. The Pervert")}.'},
|
||||
{"type": "CROWN", "effect": f'When crowning {CR.format("3. The Despot")} she may choose, by converting her own Reversal into {CR.format("3. War")}, to convert this Reversal into {CR.format("1. The Paranoiac")}.'},
|
||||
{"type": "BEHIND", "effect": f'When behind {CR.format("4. The Capitalist")} he may choose, by converting his own Reversal into {CR.format("4. Famine")}, to convert this Reversal into {CR.format("1. The Neurotic")}.'},
|
||||
{"type": "BEFORE", "effect": f'When before {CR.format("5. The Fascist")} he may choose, by converting his own Reversal into {CR.format("5. Death")}, to convert this Reversal into {CR.format("1. The Suicidal")}.'},
|
||||
]
|
||||
|
||||
|
||||
def seed_schizo(apps, schema_editor):
|
||||
TarotCard = apps.get_model("epic", "TarotCard")
|
||||
DeckVariant = apps.get_model("epic", "DeckVariant")
|
||||
try:
|
||||
earthman = DeckVariant.objects.get(slug="earthman")
|
||||
except DeckVariant.DoesNotExist:
|
||||
return
|
||||
TarotCard.objects.filter(
|
||||
deck_variant=earthman, arcana="MAJOR", number=1,
|
||||
).update(energies=SCHIZO_ENERGIES, operations=SCHIZO_OPERATIONS)
|
||||
|
||||
|
||||
def clear_schizo(apps, schema_editor):
|
||||
TarotCard = apps.get_model("epic", "TarotCard")
|
||||
DeckVariant = apps.get_model("epic", "DeckVariant")
|
||||
try:
|
||||
earthman = DeckVariant.objects.get(slug="earthman")
|
||||
except DeckVariant.DoesNotExist:
|
||||
return
|
||||
TarotCard.objects.filter(
|
||||
deck_variant=earthman, arcana="MAJOR", number=1,
|
||||
).update(energies=[], operations=[])
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
("epic", "0008_rename_energies_operations_seed_schizo"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RunPython(seed_schizo, reverse_code=clear_schizo),
|
||||
]
|
||||
@@ -47,7 +47,7 @@ var SigSelect = (function () {
|
||||
|
||||
function _renderCaution() {
|
||||
if (_cautionData.length === 0) {
|
||||
cautionTitle.textContent = 'Energies';
|
||||
cautionTitle.textContent = 'Energy';
|
||||
cautionTitle.className = 'sig-info-title sig-info-title--energies';
|
||||
if (cautionTypeEl) cautionTypeEl.textContent = '';
|
||||
cautionEffect.innerHTML = '<em>No interactions defined.</em>';
|
||||
@@ -58,7 +58,7 @@ var SigSelect = (function () {
|
||||
}
|
||||
var entry = _cautionData[_cautionIdx];
|
||||
var isEnergies = entry.category === 'energies';
|
||||
cautionTitle.textContent = isEnergies ? 'Energies' : 'Operations';
|
||||
cautionTitle.textContent = isEnergies ? 'Energy' : 'Operation';
|
||||
cautionTitle.className = 'sig-info-title sig-info-title--' + entry.category;
|
||||
if (cautionTypeEl) cautionTypeEl.textContent = entry.type || '';
|
||||
cautionEffect.innerHTML = entry.effect || '';
|
||||
|
||||
Reference in New Issue
Block a user