session-companion/SessionCompanion/SessionCompanion.Database/SeedData.cs

1052 lines
66 KiB
C#
Raw Normal View History

2020-12-03 17:50:11 +01:00
using Microsoft.EntityFrameworkCore;
using SessionCompanion.Database.Tables;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SessionCompanion.Database
{
public class SeedData
{
static public List<User> SeedUsers()
{
List<User> users = new List<User>
{
new User
{
Id = 1,
Username = "Morwiec",
2020-12-03 17:50:11 +01:00
Password = "123"
},
new User
{
Id = 2,
Username = "Cichoklepiec",
2020-12-03 17:50:11 +01:00
Password = "123"
},
new User
{
Id = 3,
Username = "Ruletka",
2020-12-03 17:50:11 +01:00
Password = "123"
}
};
return users;
}
2020-12-18 12:00:36 +01:00
static public List<Character> SeedCharacter()
{
List<Character> characters = new List<Character>
{
new Character
{
Id = 1,
UserId = 1,
},
new Character
{
Id = 2,
UserId = 2,
},
new Character
{
Id = 3,
UserId = 3,
}
};
return characters;
}
static public List<Class> SeedClass()
{
List<Class> classes = new List<Class>
{
new Class
{
Id = 1,
2020-12-28 14:59:42 +01:00
Name = "Fighter"
2020-12-18 12:00:36 +01:00
},
new Class
{
Id = 2,
2020-12-28 14:59:42 +01:00
Name = "Paladin"
2020-12-18 12:00:36 +01:00
},
new Class
{
Id = 3,
2020-12-28 14:59:42 +01:00
Name = "Cleric"
2020-12-18 12:00:36 +01:00
}
};
return classes;
}
static public List<Race> SeedRace()
{
List<Race> races = new List<Race>
{
new Race
{
Id = 1,
Name = "Human"
},
new Race
{
Id = 2,
Name = "Dwarf"
},
new Race
{
Id = 3,
Name = "Elf"
}
};
return races;
}
static public List<Alignment> SeedAlignment()
{
List<Alignment> alignments = new List<Alignment>
{
new Alignment
{
Id = 1,
},
new Alignment
{
Id = 2,
},
new Alignment
{
Id = 3,
}
};
return alignments;
}
static public List<Background> SeedBackground()
{
List<Background> backgrounds = new List<Background>
{
new Background
{
Id = 1,
},
new Background
{
Id = 2,
},
new Background
{
Id = 3,
}
};
return backgrounds;
}
static public List<Biography> SeedBiography()
{
List<Biography> bios = new List<Biography>
{
new Biography
{
Id = 1,
Sex = "Male",
CharacterId = 1,
ClassId = 1,
AlignmentId = 1,
BackgroundId = 1,
RaceId = 1,
Name = "Bob"
},
new Biography
{
Id = 2,
Sex = "Female",
CharacterId = 2,
ClassId = 2,
AlignmentId = 2,
BackgroundId = 2,
RaceId = 2,
Name = "Queen Daenerys Stormborn of the House Targaryen, the First of Her Name, Queen of the Andals, the Rhoynar and the First Men, Lady of the Seven Kingdoms and Protector of the Realm, Lady of Dragonstone, Queen of Meereen, Khaleesi of the Great Grass Sea, the Unburnt, Breaker of Chains and Mother of Dragons."
},
new Biography
{
Id = 3,
Sex = "Both",
CharacterId = 3,
ClassId = 3,
AlignmentId = 3,
BackgroundId = 3,
RaceId = 3,
Name = "Gandalf the White"
}
};
return bios;
}
static public List<Statistics> SeedStatistics()
{
List<Statistics> characters = new List<Statistics>
{
new Statistics
{
Id = 1,
CharacterId = 1,
ArmorClass = 9,
ExperiencePoints = 2,
Level = 1,
Speed = 5,
Initiative = 12,
HealthPoints = 20,
CurrentHealthPoints = 18,
Proficiency = 1
},
new Statistics
{
Id = 2,
CharacterId = 2,
ArmorClass = 12,
ExperiencePoints = 0,
Level = 1,
Speed = 10,
Initiative = 7,
HealthPoints = 26,
CurrentHealthPoints = 26,
Proficiency = 1
},
new Statistics
{
Id = 3,
CharacterId = 3,
ArmorClass = 2,
ExperiencePoints = 24,
Level = 1,
Speed = 15,
Initiative = 18,
HealthPoints = 7,
CurrentHealthPoints = 7,
Proficiency = 2
}
};
return characters;
}
static public List<CharacterWeapon> SeedCharacterWeapon()
{
List<CharacterWeapon> characterWeapons = new List<CharacterWeapon>
{
new CharacterWeapon
{
Id = 1,
CharacterId = 1,
WeaponId = 1,
InUse = false,
HoldInLeftHand = false,
HoldInRightHand = false
},
new CharacterWeapon
{
Id = 2,
CharacterId = 1,
WeaponId = 4,
InUse = true,
HoldInLeftHand = true,
HoldInRightHand = false
},
new CharacterWeapon
{
Id = 3,
CharacterId = 2,
WeaponId = 2,
InUse = true,
HoldInLeftHand = false,
HoldInRightHand = true
},
new CharacterWeapon
{
Id = 4,
CharacterId = 2,
WeaponId = 8,
InUse = false,
HoldInLeftHand = false,
HoldInRightHand = false
},
new CharacterWeapon
{
Id = 5,
CharacterId = 3,
WeaponId = 9,
InUse = false,
HoldInLeftHand = false,
HoldInRightHand = false
},
new CharacterWeapon
{
Id = 7,
CharacterId = 3,
WeaponId = 7,
InUse = true,
HoldInLeftHand = false,
HoldInRightHand = true
}
};
return characterWeapons;
}
static public List<CharacterArmor> SeedCharacterArmor()
{
List<CharacterArmor> characterArmors = new List<CharacterArmor>
{
new CharacterArmor
{
Id = 1,
CharacterId = 1,
ArmorId = 1,
InUse = true,
},
new CharacterArmor
{
Id = 2,
CharacterId = 1,
ArmorId = 3,
InUse = false,
},
new CharacterArmor
{
Id = 3,
CharacterId = 2,
ArmorId = 2,
InUse = true,
},
new CharacterArmor
{
Id = 4,
CharacterId = 2,
ArmorId = 5,
InUse = false,
},
new CharacterArmor
{
Id = 5,
CharacterId = 3,
ArmorId = 6,
InUse = true,
},
new CharacterArmor
{
Id = 6,
CharacterId = 3,
ArmorId = 2,
InUse = false,
}
};
return characterArmors;
}
static public List<CharacterOtherEquipment> SeedCharacterOtherEquipment()
{
List<CharacterOtherEquipment> characterOtherEquipment = new List<CharacterOtherEquipment>
{
new CharacterOtherEquipment
{
Id = 1,
CharacterId = 1,
OtherEquipmentId = 1
},
new CharacterOtherEquipment
{
Id = 2,
CharacterId = 1,
OtherEquipmentId = 3
},
new CharacterOtherEquipment
{
Id = 3,
CharacterId = 2,
OtherEquipmentId = 2
},
new CharacterOtherEquipment
{
Id = 4,
CharacterId = 2,
OtherEquipmentId = 5
},
new CharacterOtherEquipment
{
Id = 5,
CharacterId = 3,
OtherEquipmentId = 6
},
new CharacterOtherEquipment
{
Id = 6,
CharacterId = 3,
OtherEquipmentId = 2
}
};
return characterOtherEquipment;
}
2021-01-04 00:59:23 +01:00
static public List<Strength> SeedStrength()
{
List<Strength> strengths = new List<Strength>
{
new Strength
{
Id = 1,
CharacterId = 1,
Value = 10,
Modification = 1,
SavingThrows = 0,
CanSaveThrows = false,
Athletics = 2,
CanAthletics = true
},
new Strength
{
Id = 2,
CharacterId = 2,
Value = 11,
Modification = 3,
SavingThrows = 2,
CanSaveThrows = true,
Athletics = 2,
CanAthletics = true
},
new Strength
{
Id = 3,
CharacterId = 3,
Value = 5,
Modification = 0,
SavingThrows = 2,
CanSaveThrows = true,
Athletics = 1,
CanAthletics = true
}
};
return strengths;
}
static public List<Charisma> SeedCharisma()
{
List<Charisma> charismas = new List<Charisma>
{
new Charisma
{
Id = 1,
CharacterId = 1,
Value = 10,
Modification = 3,
SavingThrows = 0,
CanSaveThrows = false,
Deception = 0,
CanDeception = false,
Intimidation = 1,
CanIntimidation = true,
Performance = 2,
CanPerformance = true,
Persuasion = 0,
CanPersuasion = false
},
new Charisma
{
Id = 2,
CharacterId = 2,
Value = 11,
Modification = 5,
SavingThrows = 3,
CanSaveThrows = true,
Deception = 1,
CanDeception = true,
Intimidation = 1,
CanIntimidation = true,
Performance = 2,
CanPerformance = true,
Persuasion = 0,
CanPersuasion = false
},
new Charisma
{
Id = 3,
CharacterId = 3,
Value = 5,
Modification = -2,
SavingThrows = 0,
CanSaveThrows = false,
Deception = 0,
CanDeception = false,
Intimidation = 4,
CanIntimidation = false,
Performance = 2,
CanPerformance = true,
Persuasion = 1,
CanPersuasion = true
}
};
return charismas;
}
static public List<Constitution> SeedConstitution()
{
List<Constitution> constitutions = new List<Constitution>
{
new Constitution
{
Id = 1,
CharacterId = 1,
Value = 11,
Modification = 4,
SavingThrows = 2,
CanSaveThrows = true
},
new Constitution
{
Id = 2,
CharacterId = 2,
Value = 9,
Modification = 4,
SavingThrows = 1,
CanSaveThrows = true
},
new Constitution
{
Id = 3,
CharacterId = 3,
Value = 12,
Modification = 1,
SavingThrows = 2,
CanSaveThrows = true
}
};
return constitutions;
}
static public List<Dexterity> SeedDexterity()
{
List<Dexterity> dexterities = new List<Dexterity>
{
new Dexterity
{
Id = 1,
CharacterId = 1,
Value = 10,
Modification = 1,
SavingThrows = 4,
CanSaveThrows = true,
Acrobatics = 3,
CanAcrobatics = true,
SleightOfHand = 1,
CanSleightOfHand = true,
Stealth = 2,
CanStealth = true
},
new Dexterity
{
Id = 2,
CharacterId = 2,
Value = 11,
Modification = 2,
SavingThrows = 2,
CanSaveThrows = true,
Acrobatics = 1,
CanAcrobatics = true,
SleightOfHand = 2,
CanSleightOfHand = true,
Stealth = 2,
CanStealth = true
},
new Dexterity
{
Id = 3,
CharacterId = 3,
Value = 5,
Modification = 0,
SavingThrows = 2,
CanSaveThrows = true,
Acrobatics = 0,
CanAcrobatics = false,
SleightOfHand = 1,
CanSleightOfHand = true,
Stealth = 2,
CanStealth = true
}
};
return dexterities;
}
static public List<Intelligence> SeedIntelligence()
{
List<Intelligence> intelligences = new List<Intelligence>
{
new Intelligence
{
Id = 1,
CharacterId = 1,
Value = 6,
Modification = -2,
SavingThrows = 1,
CanSaveThrows = true,
Arcana = 1,
CanArcana = true,
History = 4,
CanHistory = true,
Investigation = 0,
CanInvestigation = false,
Nature = 1,
CanNature = true,
Religion = 3,
CanReligion = true
},
new Intelligence
{
Id = 2,
CharacterId = 2,
Value = 10,
Modification = 0,
SavingThrows = 1,
CanSaveThrows = true,
Arcana = 1,
CanArcana = true,
History = 1,
CanHistory = true,
Investigation = 0,
CanInvestigation = false,
Nature = 0,
CanNature = false,
Religion = 3,
CanReligion = true
},
new Intelligence
{
Id = 3,
CharacterId = 3,
Value = 10,
Modification = 2,
SavingThrows = 1,
CanSaveThrows = true,
Arcana = 2,
CanArcana = true,
History = 0,
CanHistory = false,
Investigation = 0,
CanInvestigation = false,
Nature = 2,
CanNature = true,
Religion = 2,
CanReligion = true
}
};
return intelligences;
}
static public List<Wisdom> SeedWisdom()
{
List<Wisdom> wisdoms = new List<Wisdom>
{
new Wisdom
{
Id = 1,
CharacterId = 1,
Value = 11,
Modification = 3,
SavingThrows = 1,
CanSaveThrows = true,
AnimalHandling = 2,
CanAnimalHandling = true,
Insight = 1,
CanInsight = true,
Medicine = 0,
CanMedicine = false,
Perception = 5,
CanPerception = true,
Survival = 2,
CanSurvival = true
},
new Wisdom
{
Id = 2,
CharacterId = 2,
Value = 9,
Modification = 2,
SavingThrows = 1,
CanSaveThrows = true,
AnimalHandling = 2,
CanAnimalHandling = true,
Insight = 2,
CanInsight = true,
Medicine = 0,
CanMedicine = false,
Perception = 2,
CanPerception = true,
Survival = 6,
CanSurvival = true
},
new Wisdom
{
Id = 3,
CharacterId = 3,
Value = 6,
Modification = -3,
SavingThrows = 1,
CanSaveThrows = true,
AnimalHandling = 0,
CanAnimalHandling = false,
Insight = 1,
CanInsight = true,
Medicine = 2,
CanMedicine = true,
Perception = 5,
CanPerception = true,
Survival = 2,
CanSurvival = true
}
};
return wisdoms;
}
2021-01-03 16:28:13 +01:00
static public List<CharacterSpell> SeedCharacterSpell()
{
List<CharacterSpell> characterSpells = new List<CharacterSpell>
{
new CharacterSpell
{
Id = 1,
CharacterId = 1,
SpellId = 2
},
new CharacterSpell
{
Id = 2,
CharacterId = 1,
SpellId = 55
},
new CharacterSpell
{
Id = 3,
CharacterId = 1,
SpellId = 17
},
new CharacterSpell
{
Id = 4,
CharacterId = 1,
SpellId = 78
},
new CharacterSpell
{
Id = 5,
CharacterId = 2,
SpellId = 43
},
new CharacterSpell
{
Id = 6,
CharacterId = 2,
SpellId = 154
},
new CharacterSpell
{
Id = 7,
CharacterId = 2,
SpellId = 123
},
new CharacterSpell
{
Id = 8,
CharacterId = 2,
SpellId = 67
},
new CharacterSpell
{
Id = 9,
CharacterId = 3,
SpellId = 90
},
new CharacterSpell
{
Id = 10,
CharacterId = 2,
SpellId = 44
},
};
return characterSpells;
}
static public List<CharacterSpellSlots> SeedCharacterSpellSlot()
{
List<CharacterSpellSlots> characterSpellSlots = new List<CharacterSpellSlots>
{
new CharacterSpellSlots
{
Id = 1,
CharacterId = 1,
FirstLevelSlots = 4,
FirstLevelSlotsUsed = 0,
SecondLevelSlots = 5,
SecondLevelSlotsUsed = 4,
ThirdLevelSlots = 2,
ThirdLevelSlotsUsed = 1,
FourthLevelSlots = 3,
FourthLevelSlotsUsed = 1,
FifthLevelSlots = 1,
FifthLevelSlotsUsed = 0,
SixthLevelSlots = 0,
SixthLevelSlotsUsed = 0,
SeventhLevelSlots = 0,
SeventhLevelSlotsUsed = 0,
EightLevelSlots = 0,
EightLevelSlotsUsed = 0,
NinthLevelSlots = 0,
NinthLevelSlotsUsed = 0
},
new CharacterSpellSlots
{
Id = 2,
CharacterId = 2,
FirstLevelSlots = 6,
FirstLevelSlotsUsed = 2,
SecondLevelSlots = 3,
SecondLevelSlotsUsed = 2,
ThirdLevelSlots = 3,
ThirdLevelSlotsUsed = 1,
FourthLevelSlots = 2,
FourthLevelSlotsUsed = 2,
FifthLevelSlots = 1,
FifthLevelSlotsUsed = 1,
SixthLevelSlots = 0,
SixthLevelSlotsUsed = 0,
SeventhLevelSlots = 0,
SeventhLevelSlotsUsed = 0,
EightLevelSlots = 0,
EightLevelSlotsUsed = 0,
NinthLevelSlots = 0,
NinthLevelSlotsUsed = 0
},
new CharacterSpellSlots
{
Id = 3,
CharacterId = 3,
FirstLevelSlots = 2,
FirstLevelSlotsUsed = 0,
SecondLevelSlots = 3,
SecondLevelSlotsUsed = 2,
ThirdLevelSlots = 2,
ThirdLevelSlotsUsed = 0,
FourthLevelSlots = 1,
FourthLevelSlotsUsed = 1,
FifthLevelSlots = 1,
FifthLevelSlotsUsed = 0,
SixthLevelSlots = 0,
SixthLevelSlotsUsed = 0,
SeventhLevelSlots = 0,
SeventhLevelSlotsUsed = 0,
EightLevelSlots = 0,
EightLevelSlotsUsed = 0,
NinthLevelSlots = 0,
NinthLevelSlotsUsed = 0
}
};
return characterSpellSlots;
}
static public List<Shopkeeper> SeedSchopkeepers()
{
List<Shopkeeper> shopkeepers = new List<Shopkeeper>()
{
new Shopkeeper
{
Id = 1,
Name = "Swędzioch",
IsAvailable = true
},
new Shopkeeper
{
Id = 2,
Name = "Lucius Prawowity",
IsAvailable = false
},
new Shopkeeper
{
Id = 3,
Name = "Bohr Twarda Zbroja",
IsAvailable = false
},
new Shopkeeper
{
Id = 4,
Name = "Skwarczyk Podobny",
IsAvailable = false
},
new Shopkeeper
{
Id = 5,
Name = "Zielony spod Gruszkowego Lasu",
IsAvailable = false
},
new Shopkeeper
{
Id = 6,
Name = "Zmarniały",
IsAvailable = false
}
};
return shopkeepers;
}
static public List<ShopkeeperItem> SeedShopkeeperItems()
{
List<ShopkeeperItem> shopkeeperItems = new List<ShopkeeperItem>()
{
new ShopkeeperItem
{
Id = 1,
ShopkeeperId = 1,
ArmorId = 2,
Amount = 3
},
new ShopkeeperItem
{
Id = 2,
ShopkeeperId = 1,
WeaponId = 33,
Amount = 5
},
new ShopkeeperItem
{
Id = 3,
ShopkeeperId = 1,
ArmorId = 10,
Amount = 20
},
new ShopkeeperItem
{
Id = 4,
ShopkeeperId = 1,
WeaponId = 17,
Amount = 34
},
new ShopkeeperItem
{
Id = 5,
ShopkeeperId = 1,
ArmorId = 12,
Amount = 12
},
new ShopkeeperItem
{
Id = 6,
ShopkeeperId = 2,
WeaponId = 3,
Amount = 48
},
new ShopkeeperItem
{
Id = 7,
ShopkeeperId = 2,
WeaponId = 25,
Amount = 25
},
new ShopkeeperItem
{
Id = 8,
ShopkeeperId = 2,
WeaponId = 14,
Amount = 34
},
new ShopkeeperItem
{
Id = 9,
ShopkeeperId = 3,
ArmorId = 1,
Amount = 44
},
new ShopkeeperItem
{
Id = 10,
ShopkeeperId = 3,
ArmorId = 8,
Amount = 2
},
new ShopkeeperItem
{
Id = 11,
ShopkeeperId = 3,
WeaponId = 7,
Amount = 21
},
new ShopkeeperItem
{
Id = 12,
ShopkeeperId = 4,
WeaponId = 1,
Amount = 36
},
new ShopkeeperItem
{
Id = 13,
ShopkeeperId = 4,
WeaponId = 24,
Amount = 5
},
new ShopkeeperItem
{
Id = 14,
ShopkeeperId = 4,
WeaponId = 14,
Amount = 13
},
new ShopkeeperItem
{
Id = 15,
ShopkeeperId = 4,
ArmorId = 11,
Amount = 19
},
new ShopkeeperItem
{
Id = 16,
ShopkeeperId = 5,
ArmorId = 6,
Amount = 17
},
new ShopkeeperItem
{
Id = 17,
ShopkeeperId = 5,
ArmorId = 9,
Amount = 3
},
new ShopkeeperItem
{
Id = 18,
ShopkeeperId = 5,
ArmorId = 7,
Amount = 1
},
new ShopkeeperItem
{
Id = 19,
ShopkeeperId = 6,
ArmorId = 2,
Amount = 6
},
new ShopkeeperItem
{
Id = 20,
ShopkeeperId = 6,
ArmorId = 13,
Amount = 9
},
new ShopkeeperItem
{
Id = 21,
ShopkeeperId = 6,
ArmorId = 10,
Amount = 12
},
new ShopkeeperItem
{
Id = 22,
ShopkeeperId = 6,
WeaponId = 37,
Amount = 6
}
};
return shopkeeperItems;
}
2020-12-03 17:50:11 +01:00
}
}