add ammunition table and data
parent
4c1d8e998c
commit
d710e27024
|
@ -0,0 +1,11 @@
|
|||
-- -*- mode:sql sql-product:sqlite -*-
|
||||
|
||||
PRAGMA foreign_keys = ON; -- database requires foreign key checking to be turned
|
||||
-- on PER CONNECTION
|
||||
|
||||
BEGIN TRANSACTION;
|
||||
INSERT INTO ammunition VALUES(1,1,'282','Arrows',0.1,10,0.1,'These projectiles are the ammunition for bows. The shaft of an arrow is made of wood. It is stabilized in flight by fletching at one end and bears a metal head on the other.');
|
||||
INSERT INTO ammunition VALUES(2,1,'281','Blowgun Darts',0.05,10,0.1,'These thin, light darts are typically made of hardwood and stabilized with fletching of down or fur. They are often hollow so they can be used to deliver poison.');
|
||||
INSERT INTO ammunition VALUES(3,1,'281','Bolts',0.1,10,0.1,'Shorter than traditional arrows but similar in construction, bolts are the ammunition used by crossbows.');
|
||||
INSERT INTO ammunition VALUES(4,1,'281','Sling Bullets',0.01,10,0.1,'These are small metal balls, typically either iron or lead, designed to be used as ammunition in slings.');
|
||||
COMMIT;
|
2
gendb.sh
2
gendb.sh
|
@ -17,6 +17,7 @@ sqlite3 pf2.db < schema/ancestries.sql
|
|||
sqlite3 pf2.db < schema/armor.sql
|
||||
sqlite3 pf2.db < schema/gear.sql
|
||||
sqlite3 pf2.db < schema/weapons.sql
|
||||
sqlite3 pf2.db < schema/ammunition.sql
|
||||
echo 'loading data'
|
||||
sqlite3 pf2.db < data/sources.sql
|
||||
sqlite3 pf2.db < data/damagetypes.sql
|
||||
|
@ -36,6 +37,7 @@ sqlite3 pf2.db < data/armor.sql
|
|||
sqlite3 pf2.db < data/gear.sql
|
||||
sqlite3 pf2.db < data/heritages.sql
|
||||
sqlite3 pf2.db < data/weapons.sql
|
||||
sqlite3 pf2.db < data/ammunition.sql
|
||||
# Comment out the following three lines if you don't want to generate the spell data.
|
||||
cd data/third_party_json
|
||||
python3 spells.py
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
-- -*- mode:sql sql-product:sqlite -*-
|
||||
|
||||
PRAGMA foreign_keys = ON; -- database requires foreign key checking to be turned
|
||||
-- on PER CONNECTION
|
||||
|
||||
CREATE TABLE ammunition (
|
||||
ammunition_id INTEGER PRIMARY KEY,
|
||||
sources_id INTEGER,
|
||||
sources_pages TEXT,
|
||||
"name" TEXT NOT NULL UNIQUE,
|
||||
price_gp REAL,
|
||||
amount INTEGER,
|
||||
bulk REAL,
|
||||
descr TEXT,
|
||||
FOREIGN KEY (sources_id) REFERENCES sources(sources_id)
|
||||
)
|
|
@ -45,4 +45,3 @@ CREATE TABLE weapons_traits (
|
|||
FOREIGN KEY (weapons_id) REFERENCES weapons(weapons_id),
|
||||
FOREIGN KEY (trait_id) REFERENCes traits(trait_id)
|
||||
);
|
||||
|
||||
|
|
Loading…
Reference in New Issue