Added table and general functions for stats system #21
1 changed files with 2 additions and 2 deletions
4
db.py
4
db.py
|
@ -44,8 +44,8 @@ cursor.execute("""
|
||||||
cursor.execute('''
|
cursor.execute('''
|
||||||
CREATE TABLE IF NOT EXISTS character_stats (
|
CREATE TABLE IF NOT EXISTS character_stats (
|
||||||
|
|||||||
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)
|
||||||
)
|
)
|
||||||
''')
|
''')
|
||||||
|
|
Loading…
Add table
Reference in a new issue
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
Perfect, I'll add a new section in the config file for this so we can change it later.