Added table and general functions for stats system #21

Merged
waifu merged 16 commits from stats_system into dev 2025-06-25 20:45:13 -07:00
Showing only changes of commit 9d98299264 - Show all commits

4
db.py
View file

@ -44,8 +44,8 @@ cursor.execute("""
cursor.execute(''' cursor.execute('''
CREATE TABLE IF NOT EXISTS character_stats ( CREATE TABLE IF NOT EXISTS character_stats (
Outdated
Review

Would we not want to extend the characters table? We could just sub in random values for stats:

power INTEGER NOT NULL DEFAULT abs(random() % 9999),

Replace 9999 with whatever the limit for that stat is

Would we not want to extend the characters table? We could just sub in random values for stats: `power INTEGER NOT NULL DEFAULT abs(random() % 9999),` Replace 9999 with whatever the limit for that stat is
Outdated
Review

Perfect, I'll add a new section in the config file for this so we can change it later.

Perfect, I'll add a new section in the config file for this so we can change it later.
character_id INTEGER PRIMARY KEY, character_id INTEGER PRIMARY KEY,
power INTEGER NOT NULL, power INTEGER NOT NULL DEFAULT abs(random() % 9999),
charm INTEGER NOT NULL, charm INTEGER NOT NULL DEFAULT abs(random() % 9999),,
FOREIGN KEY(character_id) REFERENCES characters(id) FOREIGN KEY(character_id) REFERENCES characters(id)
) )
''') ''')