refactor ancestries boosts and flaws to separate tables, need data
parent
02e6bebecc
commit
9276249959
|
@ -7,15 +7,38 @@
|
|||
/* Probably need to model Half-Elf and Half-Orc as a whole separate
|
||||
ancestry? NO. They are separate heritages, not separate ancestries. */
|
||||
|
||||
INSERT INTO ancestries (ancestry_id, short_name, flavor_text, hp, size_id, speed,
|
||||
boosts, flaws, vision_id)
|
||||
|
||||
INSERT INTO ancestries (ancestry_id, short_name, flavor_text, hp, size_id, speed, vision_id)
|
||||
VALUES
|
||||
(1, 'Dwarf', 'TODO', 10, 3, 20, 84, 32, 1),
|
||||
(2, 'Elf', 'TODO', 6, 3, 30, 74, 4, 2),
|
||||
(3, 'Gnome', 'TODO', 8, 2, 25, 100, 1, 2),
|
||||
(4, 'Goblin', 'TODO', 6, 2, 25, 98, 16, 1),
|
||||
(5, 'Halfling', 'TODO', 6, 2, 25, 82, 1, 3),
|
||||
(6, 'Human', 'TODO', 8, 3, 25, 128, 0, 4);
|
||||
(1, 'Dwarf', 'TODO', 10, 3, 20, 1),
|
||||
(2, 'Elf', 'TODO', 6, 3, 30, 2),
|
||||
(3, 'Gnome', 'TODO', 8, 2, 25, 2),
|
||||
(4, 'Goblin', 'TODO', 6, 2, 25, 1),
|
||||
(5, 'Halfling', 'TODO', 6, 2, 25, 3),
|
||||
(6, 'Human', 'TODO', 8, 3, 25, 4);
|
||||
|
||||
|
||||
/* TODO insert remaining data into ancestries_boosts and ancestries_flaws */
|
||||
|
||||
/* Example Query to get boosts in text representation:
|
||||
|
||||
sqlite> select ancestries.short_name, abilityscores.short_name FROM ancestries INNER JOIN ancestries_boosts on ancestries_boosts.ancestry_id = ancestries.ancestry_id INNER JOIN abilityscores on ancestries_boosts.abilityscores_id = abilityscores.abilityscores_id;
|
||||
short_name short_name
|
||||
---------- ----------
|
||||
Dwarf CON
|
||||
Dwarf WIS
|
||||
Dwarf Free1
|
||||
*/
|
||||
|
||||
INSERT INTO ancestries_boosts (ancestry_id, abilityscores_id)
|
||||
VALUES
|
||||
(1, 3), -- dwarf CON
|
||||
(1, 5), -- dwarf WIS
|
||||
(1, 7); -- dwarf free 1
|
||||
|
||||
INSERT INTO ancestries_flaws (ancestry_id, abilityscores_id)
|
||||
VALUES
|
||||
(1, 6); -- dwarf CHA
|
||||
|
||||
/* TODO flesh out the ancestry-trait pairs */
|
||||
|
||||
|
|
|
@ -18,13 +18,27 @@ CREATE TABLE ancestries (
|
|||
hp INTEGER NOT NULL,
|
||||
size_id INTEGER NOT NULL,
|
||||
speed INTEGER NOT NULL,
|
||||
boosts INTEGER NOT NULL,
|
||||
flaws INTEGER NOT NULL,
|
||||
vision_id INTEGER NOT NULL,
|
||||
FOREIGN KEY (vision_id) REFERENCES visions(vision_id),
|
||||
FOREIGN KEY (size_id) REFERENCES sizes(size_id)
|
||||
);
|
||||
|
||||
CREATE TABLE ancestries_boosts (
|
||||
anc_boosts_id INTEGER PRIMARY KEY,
|
||||
ancestry_id INTEGER NOT NULL,
|
||||
abilityscores_id INTEGER NOT NULL,
|
||||
FOREIGN KEY (ancestry_id) REFERENCES ancestries(ancestry_id),
|
||||
FOREIGN KEY (abilityscores_id) REFERENCES abilityscores(abilityscores_id)
|
||||
);
|
||||
|
||||
CREATE TABLE ancestries_flaws (
|
||||
anc_flaws_id INTEGER PRIMARY KEY,
|
||||
ancestry_id INTEGER NOT NULL,
|
||||
abilityscores_id INTEGER NOT NULL,
|
||||
FOREIGN KEY (ancestry_id) REFERENCES ancestries(ancestry_id),
|
||||
FOREIGN KEY (abilityscores_id) REFERENCES abilityscores(abilityscores_id)
|
||||
);
|
||||
|
||||
/* has partial data */
|
||||
CREATE TABLE visions (
|
||||
vision_id INTEGER PRIMARY KEY,
|
||||
|
@ -67,6 +81,7 @@ CREATE TABLE traittypes (
|
|||
name TEXT NOT NULL
|
||||
);
|
||||
|
||||
/* TODO THIS TABLE IS LIKELY NOT NEEDED. THANKS WES! */
|
||||
|
||||
CREATE TABLE heritages_traits (
|
||||
id INTEGER PRIMARY KEY,
|
||||
|
|
Loading…
Reference in New Issue