From a8583c1093509daab5b5b55464674d7d1f551fbd Mon Sep 17 00:00:00 2001 From: Stephanie Gredell Date: Mon, 1 Sep 2025 19:52:18 -0700 Subject: [PATCH] Fix card rendering --- src/main.js | 8 ++++++++ src/ui/render.js | 8 ++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/main.js b/src/main.js index fbd2904..0303987 100644 --- a/src/main.js +++ b/src/main.js @@ -193,6 +193,11 @@ const root = { clearSave() { localStorage.removeItem('birthday-spire-save'); + }, + + // Clear any old saves with outdated card IDs + clearOldSaves() { + localStorage.removeItem('birthday-spire-save'); } }; @@ -298,6 +303,9 @@ function setupMockData() { } function loadNormalGame() { + // Clear old saves to prevent card ID conflicts after refactoring + root.clearOldSaves(); + const hasLoadedData = root.load(); if (hasLoadedData) { renderMap(root); diff --git a/src/ui/render.js b/src/ui/render.js index 6ee3322..d94cf2f 100644 --- a/src/ui/render.js +++ b/src/ui/render.js @@ -1158,16 +1158,16 @@ function getCardArt(cardId) { skill_issue: 'Monk_9.png', // Protection "404": 'Monk_10.png', // Ban/restriction - segfault: 'Monk_11.png', // Powerful attack + dark_mode: 'Monk_11.png', // Powerful attack task_failed_successfully: 'Monk_12.png', // Precise strike recursion: 'Monk_13.png', // Repetition merge_conflict: 'Monk_14.png', // Dual attack hotfix: 'Monk_15.png', // Emergency fix production_deploy: 'Monk_16.png', // High risk/reward - gc: 'Monk_17.png', // Cleanup - async_await: 'Monk_18.png', // Time manipulation - stack_overflow: 'Monk_19.png', // Knowledge overflow + object_object: 'Monk_17.png', // Cleanup + just_one_game: 'Monk_18.png', // Time manipulation + colon_q: 'Monk_19.png', // Knowledge overflow vibe_code: 'Monk_20.png', // Infinite power raw_dog: 'Monk_21.png', // Information git_commit: 'Monk_22.png', // Recording