feat: Add new GUI effects view and numerous image assets.

This commit is contained in:
kiyreload27
2025-12-31 16:29:12 +00:00
parent 3b58d234c4
commit 04a2c1bcb3
1051 changed files with 531 additions and 243 deletions

View File

@@ -33,6 +33,10 @@ def init_db(reset=False):
cur.execute("DROP TABLE IF EXISTS support_effects")
cur.execute("DROP TABLE IF EXISTS owned_cards")
cur.execute("DROP TABLE IF EXISTS support_cards")
else:
# Run migrations for existing database
migrate_add_image_path()
migrate_event_skills_columns()
# Support Cards - main card info
cur.execute("""
@@ -87,6 +91,8 @@ def init_db(reset=False):
skill_id INTEGER PRIMARY KEY AUTOINCREMENT,
event_id INTEGER,
skill_name TEXT,
is_gold INTEGER DEFAULT 0,
is_or INTEGER DEFAULT 0,
FOREIGN KEY (event_id) REFERENCES support_events(event_id)
)
""")
@@ -150,5 +156,24 @@ def migrate_add_image_path():
pass # Column already exists
conn.close()
def migrate_event_skills_columns():
"""Add is_gold and is_or columns to event_skills if they don't exist"""
conn = get_conn()
cur = conn.cursor()
try:
cur.execute("ALTER TABLE event_skills ADD COLUMN is_gold INTEGER DEFAULT 0")
print("Added is_gold column to event_skills")
except sqlite3.OperationalError:
pass # Column already exists
try:
cur.execute("ALTER TABLE event_skills ADD COLUMN is_or INTEGER DEFAULT 0")
print("Added is_or column to event_skills")
except sqlite3.OperationalError:
pass # Column already exists
conn.commit()
conn.close()
if __name__ == "__main__":
init_db(reset=True)