Commits

Anton Golov committed d734502

Finished filling.

Comments (0)

Files changed (2)

 INSERT INTO Player (MemId) VALUES (6);
 
 INSERT INTO DungeonMaster (MemId) VALUES (7);
-INSERT INTO DungeonMaster (MemId) VALUES (4);
+INSERT INTO DungeonMaster (MemId) VALUES (6);
 
 INSERT INTO Campaign (Title, BeginDate, EndDate, DmId)  VALUES ("The Beginning of the End", 23-03-2012, 27-03-2012, 1);
 INSERT INTO Campaign (Title, BeginDate, EndDate, DmId)  VALUES ("What comes from the shadows", 29-03-2012, 02-04-2012, 1);
 INSERT INTO Character (CharName, RaceId) VALUES ("John", 6);
 INSERT INTO Character (CharName, RaceId) VALUES ("Grace", 7);
 
-INSERT INTO Character (CharName, RaceId) VALUES ("Grumpf", 1);
-INSERT INTO Character (CharName, RaceId) VALUES ("Kilroy", 2);
-INSERT INTO Character (CharName, RaceId) VALUES ("Silverleaf", 3);
-INSERT INTO Character (CharName, RaceId) VALUES ("Knibbler", 6);
-INSERT INTO Character (CharName, RaceId) VALUES ("John", 7);
-INSERT INTO Character (CharName, RaceId) VALUES ("Grace", 8);
-
 INSERT INTO CharSkill (CharId, Skill) VALUES (1, "Acrobatics");
 INSERT INTO CharSkill (CharId, Skill) VALUES (1, "Dungeoneering");
 INSERT INTO CharSkill (CharId, Skill) VALUES (1, "Intimidate");
 INSERT INTO Power(PowName, PowDescription, Effect) VALUES ("Entangling Smite", "Strands of energy erupt from your weapon as it strikes true, wrapping around your foe and rooting it to the ground", "2[W] + Charisma modifier damage. Target is immobilized for 1 turn.");
 INSERT INTO Power(PowName, PowDescription, Effect) VALUES ("Thundertusk Boar Strike", "You attack twice, causing your foes to stagger backward.", "1[W] + Strength modifier damage, attack twice. Push taget 1 square with each attack.");
 
-INSERT INTO Controls (PlayId, CharId) VALUES (2, 1);
-INSERT INTO Controls (PlayId, CharId) VALUES (4, 2);
-INSERT INTO Controls (PlayId, CharId) VALUES (5, 3);
-INSERT INTO Controls (PlayId, CharId) VALUES (6, 4);
-INSERT INTO Controls (PlayId, CharId) VALUES (9, 5);
-
 INSERT INTO Runs (DmId, CampId) VALUES (7, 1);
 INSERT INTO Runs (DmId, CampId) VALUES (7, 2);
-INSERT INTO Runs (DmId, CampId) VALUES (4, 3);
-
-INSERT INTO PresentAt (MemId, SitId) VALUES (3, 1);
-INSERT INTO PresentAt (MemId, SitId) VALUES (2, 1);
-INSERT INTO PresentAt (MemId, SitId) VALUES (4, 1);
-INSERT INTO PresentAt (MemId, SitId) VALUES (6, 1);
-INSERT INTO PresentAt (MemId, SitId) VALUES (7, 1);
-INSERT INTO PresentAt (MemId, SitId) VALUES (1, 2);
-INSERT INTO PresentAt (MemId, SitId) VALUES (5, 2);
-INSERT INTO PresentAt (MemId, SitId) VALUES (6, 2);
-INSERT INTO PresentAt (MemId, SitId) VALUES (7, 2);
-INSERT INTO PresentAt (MemId, SitId) VALUES (3, 2);
-INSERT INTO PresentAt (MemId, SitId) VALUES (4, 2);
-INSERT INTO PresentAt (MemId, SitId) VALUES (3, 3);
-INSERT INTO PresentAt (MemId, SitId) VALUES (8, 3);
-INSERT INTO PresentAt (MemId, SitId) VALUES (9, 3);
-INSERT INTO PresentAt (MemId, SitId) VALUES (2, 3);
-INSERT INTO PresentAt (MemId, SitId) VALUES (7, 3);
-INSERT INTO PresentAt (MemId, SitId) VALUES (3, 4);
-INSERT INTO PresentAt (MemId, SitId) VALUES (7, 4);
-INSERT INTO PresentAt (MemId, SitId) VALUES (2, 4);
-INSERT INTO PresentAt (MemId, SitId) VALUES (4, 4);
-INSERT INTO PresentAt (MemId, SitId) VALUES (6, 4);
-INSERT INTO PresentAt (MemId, SitId) VALUES (7, 5);
-INSERT INTO PresentAt (MemId, SitId) VALUES (6, 5);
-INSERT INTO PresentAt (MemId, SitId) VALUES (1, 5);
-INSERT INTO PresentAt (MemId, SitId) VALUES (9, 5);
-
-INSERT INTO ParticipatesIn (PlayId, CampId) VALUES (3, 1);
-INSERT INTO ParticipatesIn (PlayId, CampId) VALUES (2, 1);
-INSERT INTO ParticipatesIn (PlayId, CampId) VALUES (4, 1);
-INSERT INTO ParticipatesIn (PlayId, CampId) VALUES (6, 1);
-INSERT INTO ParticipatesIn (PlayId, CampId) VALUES (1, 2);
-INSERT INTO ParticipatesIn (PlayId, CampId) VALUES (2, 2);
-INSERT INTO ParticipatesIn (PlayId, CampId) VALUES (3, 2);
-INSERT INTO ParticipatesIn (PlayId, CampId) VALUES (3, 3);
-INSERT INTO ParticipatesIn (PlayId, CampId) VALUES (2, 3);
-INSERT INTO ParticipatesIn (PlayId, CampId) VALUES (5, 3);
-INSERT INTO ParticipatesIn (PlayId, CampId) VALUES (7, 3);
+INSERT INTO Runs (DmId, CampId) VALUES (6, 3);
 
 INSERT INTO IsOfClass (CharId, ClassId, Level) VALUES (1, 3, 5);
 INSERT INTO IsOfClass (CharId, ClassId, Level) VALUES (1, 4, 3);
 INSERT INTO IsOfClass (CharId, ClassId, Level) VALUES (4, 1, 3);
 INSERT INTO IsOfClass (CharId, ClassId, Level) VALUES (4, 3, 4);
 INSERT INTO IsOfClass (CharId, ClassId, Level) VALUES (5, 2, 1);
+
+INSERT INTO HasPower (CharId, PowId) VALUES (1, 4);
+INSERT INTO HasPower (CharId, PowId) VALUES (4, 1);
+INSERT INTO HasPower (CharId, PowId) VALUES (4, 2);
+
+INSERT INTO OwnedBy (ItemId, CharId, Quantity) VALUES (1, 1, 5);
+INSERT INTO OwnedBy (ItemId, CharId, Quantity) VALUES (3, 1, 1);
+INSERT INTO OwnedBy (ItemId, CharId, Quantity) VALUES (1, 2, 8);
+INSERT INTO OwnedBy (ItemId, CharId, Quantity) VALUES (5, 2, 1);
+INSERT INTO OwnedBy (ItemId, CharId, Quantity) VALUES (12, 2, 1);
+INSERT INTO OwnedBy (ItemId, CharId, Quantity) VALUES (1, 3, 10);
+INSERT INTO OwnedBy (ItemId, CharId, Quantity) VALUES (4, 3, 1);
+INSERT INTO OwnedBy (ItemId, CharId, Quantity) VALUES (8, 3, 1);
+INSERT INTO OwnedBy (ItemId, CharId, Quantity) VALUES (1, 4, 45);
+INSERT INTO OwnedBy (ItemId, CharId, Quantity) VALUES (13, 4, 2);
+INSERT INTO OwnedBy (ItemId, CharId, Quantity) VALUES (2, 4, 1);
+INSERT INTO OwnedBy (ItemId, CharId, Quantity) VALUES (1, 5, 1);
+INSERT INTO OwnedBy (ItemId, CharId, Quantity) VALUES (3, 5, 1);
+INSERT INTO OwnedBy (ItemId, CharId, Quantity) VALUES (8, 5, 1);
+INSERT INTO OwnedBy (ItemId, CharId, Quantity) VALUES (1, 6, 25);
+INSERT INTO OwnedBy (ItemId, CharId, Quantity) VALUES (11, 6, 1);
+INSERT INTO OwnedBy (ItemId, CharId, Quantity) VALUES (10, 6, 1);
+
+INSERT INTO RaceGrants (RaceId, PowId) VALUES (1, 5);
+
+INSERT INTO RequiresRace (PowId, RaceId) VALUES (5, 1);
+
+INSERT INTO RequiresClass (PowId, ClassId) VALUES (1, 2);
+INSERT INTO RequiresClass (PowId, ClassId) VALUES (2, 2);
+INSERT INTO RequiresClass (PowId, ClassId) VALUES (3, 1);
+INSERT INTO RequiresClass (PowId, ClassId) VALUES (4, 7);
+
+INSERT INTO Controls (PlayId, CharId) VALUES ( 1, 1 );
+INSERT INTO FeaturesIn (CampId, CharId) VALUES ( 1, 3 );
+INSERT INTO ParticipatesIn (PlayId, CampId) VALUES ( 1, 3 );
+INSERT INTO FeaturesIn (CampId, CharId) VALUES ( 1, 2 );
+INSERT INTO ParticipatesIn (PlayId, CampId) VALUES ( 1, 2 );
+INSERT INTO Controls (PlayId, CharId) VALUES ( 2, 5 );
+INSERT INTO FeaturesIn (CampId, CharId) VALUES ( 5, 3 );
+INSERT INTO ParticipatesIn (PlayId, CampId) VALUES ( 2, 3 );
+INSERT INTO FeaturesIn (CampId, CharId) VALUES ( 5, 2 );
+INSERT INTO ParticipatesIn (PlayId, CampId) VALUES ( 2, 2 );
+INSERT INTO Controls (PlayId, CharId) VALUES ( 3, 4 );
+INSERT INTO FeaturesIn (CampId, CharId) VALUES ( 4, 2 );
+INSERT INTO ParticipatesIn (PlayId, CampId) VALUES ( 3, 2 );
+INSERT INTO FeaturesIn (CampId, CharId) VALUES ( 4, 1 );
+INSERT INTO ParticipatesIn (PlayId, CampId) VALUES ( 3, 1 );
+INSERT INTO Controls (PlayId, CharId) VALUES ( 4, 6 );
+INSERT INTO FeaturesIn (CampId, CharId) VALUES ( 6, 2 );
+INSERT INTO ParticipatesIn (PlayId, CampId) VALUES ( 4, 2 );
+INSERT INTO FeaturesIn (CampId, CharId) VALUES ( 6, 1 );
+INSERT INTO ParticipatesIn (PlayId, CampId) VALUES ( 4, 1 );
+INSERT INTO Controls (PlayId, CharId) VALUES ( 5, 3 );
+INSERT INTO FeaturesIn (CampId, CharId) VALUES ( 3, 2 );
+INSERT INTO ParticipatesIn (PlayId, CampId) VALUES ( 5, 2 );
+INSERT INTO FeaturesIn (CampId, CharId) VALUES ( 3, 1 );
+INSERT INTO ParticipatesIn (PlayId, CampId) VALUES ( 5, 1 );
+INSERT INTO Controls (PlayId, CharId) VALUES ( 6, 2 );
+INSERT INTO FeaturesIn (CampId, CharId) VALUES ( 2, 1 );
+INSERT INTO ParticipatesIn (PlayId, CampId) VALUES ( 6, 1 );
+INSERT INTO FeaturesIn (CampId, CharId) VALUES ( 2, 2 );
+INSERT INTO ParticipatesIn (PlayId, CampId) VALUES ( 6, 2 );
+INSERT INTO PlayedDuring (CampId, SitId) VALUES ( 3, 1 );
+INSERT INTO PresentAt (MemId, SitId) VALUES ( 6, 1 );
+INSERT INTO PresentAt (MemId, SitId) VALUES ( 1, 1 );
+INSERT INTO PresentAt (MemId, SitId) VALUES ( 2, 1 );
+INSERT INTO PresentAt (MemId, SitId) VALUES ( 3, 1 );
+INSERT INTO PresentAt (MemId, SitId) VALUES ( 4, 1 );
+INSERT INTO PresentAt (MemId, SitId) VALUES ( 5, 1 );
+INSERT INTO PresentAt (MemId, SitId) VALUES ( 6, 1 );
+INSERT INTO PlayedDuring (CampId, SitId) VALUES ( 2, 2 );
+INSERT INTO PresentAt (MemId, SitId) VALUES ( 7, 2 );
+INSERT INTO PresentAt (MemId, SitId) VALUES ( 1, 2 );
+INSERT INTO PresentAt (MemId, SitId) VALUES ( 2, 2 );
+INSERT INTO PresentAt (MemId, SitId) VALUES ( 3, 2 );
+INSERT INTO PresentAt (MemId, SitId) VALUES ( 4, 2 );
+INSERT INTO PresentAt (MemId, SitId) VALUES ( 5, 2 );
+INSERT INTO PresentAt (MemId, SitId) VALUES ( 6, 2 );
+INSERT INTO PlayedDuring (CampId, SitId) VALUES ( 1, 3 );
+INSERT INTO PresentAt (MemId, SitId) VALUES ( 7, 3 );
+INSERT INTO PresentAt (MemId, SitId) VALUES ( 1, 3 );
+INSERT INTO PresentAt (MemId, SitId) VALUES ( 2, 3 );
+INSERT INTO PresentAt (MemId, SitId) VALUES ( 3, 3 );
+INSERT INTO PresentAt (MemId, SitId) VALUES ( 4, 3 );
+INSERT INTO PresentAt (MemId, SitId) VALUES ( 5, 3 );
+INSERT INTO PresentAt (MemId, SitId) VALUES ( 6, 3 );
+INSERT INTO PlayedDuring (CampId, SitId) VALUES ( 2, 4 );
+INSERT INTO PresentAt (MemId, SitId) VALUES ( 7, 4 );
+INSERT INTO PresentAt (MemId, SitId) VALUES ( 1, 4 );
+INSERT INTO PresentAt (MemId, SitId) VALUES ( 2, 4 );
+INSERT INTO PresentAt (MemId, SitId) VALUES ( 3, 4 );
+INSERT INTO PresentAt (MemId, SitId) VALUES ( 4, 4 );
+INSERT INTO PresentAt (MemId, SitId) VALUES ( 5, 4 );
+INSERT INTO PresentAt (MemId, SitId) VALUES ( 6, 4 );
+INSERT INTO PlayedDuring (CampId, SitId) VALUES ( 3, 5 );
+INSERT INTO PresentAt (MemId, SitId) VALUES ( 6, 5 );
+INSERT INTO PresentAt (MemId, SitId) VALUES ( 1, 5 );
+INSERT INTO PresentAt (MemId, SitId) VALUES ( 2, 5 );
+INSERT INTO PresentAt (MemId, SitId) VALUES ( 3, 5 );
+INSERT INTO PresentAt (MemId, SitId) VALUES ( 4, 5 );
+INSERT INTO PresentAt (MemId, SitId) VALUES ( 5, 5 );
+INSERT INTO PresentAt (MemId, SitId) VALUES ( 6, 5 );

make_combinations.py

+import random
+
+COLUMNS = {
+    'ParticipatesIn': '(PlayId, CampId)',
+    'FeaturesIn': '(CampId, CharId)',
+    'PlayedDuring': '(CampId, SitId)',
+    'PresentAt': '(MemId, SitId)',
+    'Controls': '(PlayId, CharId)'
+        }
+
+def p_insert(table, values):
+    columns = COLUMNS[table]
+    values = map(str, values)
+    print('INSERT INTO', table, columns, 'VALUES (', ', '.join(values), ');')
+
+p_ch_c_combos = []
+
+for p, ch in zip(range(1, 7), random.sample(range(1, 7), 6)):
+    p_insert('Controls', (p, ch))
+    ca = random.sample(range(1, 4), 2)
+    for c in ca:
+        p_insert('FeaturesIn', (ch, c))
+        p_insert('ParticipatesIn', (p, c))
+    p_ch_c_combos.append((p, ch, ca))
+
+
+for s in range(1, 6):
+    ca = random.randint(1, 3)
+    p_insert('PlayedDuring', (ca, s))
+    p_insert('PresentAt', (6 if ca == 3 else 7, s))
+    for p, ch, c in p_ch_c_combos:
+        p_insert('PresentAt', (p, s))
+        
+