add ammunition table and data

merge-requests/34/merge
James Miller 2019-08-15 23:26:45 -05:00
parent 4c1d8e998c
commit d710e27024
4 changed files with 29 additions and 1 deletions

View File

@ -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;

View File

@ -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

View File

@ -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)
)

View File

@ -45,4 +45,3 @@ CREATE TABLE weapons_traits (
FOREIGN KEY (weapons_id) REFERENCES weapons(weapons_id),
FOREIGN KEY (trait_id) REFERENCes traits(trait_id)
);