diff --git a/SessionCompanion/SessionCompanion.Database/ApplicationDbContext.cs b/SessionCompanion/SessionCompanion.Database/ApplicationDbContext.cs index def3e6f..a8e842d 100644 --- a/SessionCompanion/SessionCompanion.Database/ApplicationDbContext.cs +++ b/SessionCompanion/SessionCompanion.Database/ApplicationDbContext.cs @@ -1,7 +1,9 @@ using Microsoft.EntityFrameworkCore; +using Newtonsoft.Json.Linq; using SessionCompanion.Database.Tables; using System; using System.Collections.Generic; +using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; @@ -27,8 +29,62 @@ namespace SessionCompanion.Database public virtual DbSet Spells { get; set; } public virtual DbSet CharacterSpells { get; set; } public virtual DbSet CharacterSpellSlots { get; set; } + public virtual DbSet Armors { get; set; } + public virtual DbSet CharacterArmors { get; set; } + public virtual DbSet Weapons { get; set; } + public virtual DbSet CharacterWeapons { get; set; } + public virtual DbSet OtherEquipment { get; set; } + public virtual DbSet CharacterOtherEquipment { get; set; } + public ApplicationDbContext(DbContextOptions options) : base(options) { } + protected IEnumerable SeedWeapon() + { + const string file = "../SessionCompanion.Database/JsonData/weapons.json"; + List weapons = new List(); + using (StreamReader reader = new StreamReader(file)) + { + var json = reader.ReadToEnd(); + dynamic jweapons = JArray.Parse(json); + foreach (dynamic item in jweapons) + weapons.Add(SeedFromJsons.SingleWeaponSeeder(item)); + } + return weapons; + } + protected IEnumerable SeedArmor() + { + const string file = "../SessionCompanion.Database/JsonData/armors.json"; + List armors = new List(); + using (StreamReader reader = new StreamReader(file)) + { + var json = reader.ReadToEnd(); + dynamic jactions = JArray.Parse(json); + int id = 1; + foreach (dynamic item in jactions) + { + armors.Add(SeedFromJsons.SingleArmorSeeder(item, id)); + id++; + } + } + return armors; + } + protected IEnumerable SeedOtherEquipment() + { + const string file = "../SessionCompanion.Database/JsonData/otherEquipments.json"; + List otherEquipment = new List(); + using (StreamReader reader = new StreamReader(file)) + { + var json = reader.ReadToEnd(); + dynamic jactions = JArray.Parse(json); + int id = 1; + foreach (dynamic item in jactions) + { + otherEquipment.Add(SeedFromJsons.SingleOtherEquipmentSeeder(item, id)); + id++; + } + } + return otherEquipment; + } protected override void OnModelCreating(ModelBuilder builder) { base.OnModelCreating(builder); @@ -40,6 +96,12 @@ namespace SessionCompanion.Database builder.Entity().HasData(SeedData.SeedBackground()); builder.Entity().HasData(SeedData.SeedBiography()); builder.Entity().HasData(SeedData.SeedStatistics()); + builder.Entity().HasData(SeedWeapon()); + builder.Entity().HasData(SeedArmor()); + builder.Entity().HasData(SeedOtherEquipment()); + builder.Entity().HasData(SeedData.SeedCharacterWeapon()); + builder.Entity().HasData(SeedData.SeedCharacterArmor()); + builder.Entity().HasData(SeedData.SeedCharacterOtherEquipment()); } } } diff --git a/SessionCompanion/SessionCompanion.Database/JsonData/armors.json b/SessionCompanion/SessionCompanion.Database/JsonData/armors.json new file mode 100644 index 0000000..a2c4772 --- /dev/null +++ b/SessionCompanion/SessionCompanion.Database/JsonData/armors.json @@ -0,0 +1,236 @@ +[ + { + "index": 38, + "name": "Padded", + "equipment_category": "Armor", + "armor_category": "Light", + "armor_class": { + "base": 11, + "dex_bonus": true, + "max_bonus": null + }, + "str_minimum": 0, + "stealth_disadvantage": true, + "weight": 8, + "cost": { + "quantity": 5, + "unit": "gp" + } + }, + { + "index": 39, + "name": "Leather", + "equipment_category": "Armor", + "armor_category": "Light", + "armor_class": { + "base": 11, + "dex_bonus": true, + "max_bonus": null + }, + "str_minimum": 0, + "stealth_disadvantage": false, + "weight": 10, + "cost": { + "quantity": 10, + "unit": "gp" + } + }, + { + "index": 40, + "name": "Studded Leather", + "equipment_category": "Armor", + "armor_category": "Light", + "armor_class": { + "base": 12, + "dex_bonus": true, + "max_bonus": null + }, + "str_minimum": 0, + "stealth_disadvantage": false, + "weight": 13, + "cost": { + "quantity": 45, + "unit": "gp" + } + }, + { + "index": 41, + "name": "Hide", + "equipment_category": "Armor", + "armor_category": "Medium", + "armor_class": { + "base": 12, + "dex_bonus": true, + "max_bonus": 2 + }, + "str_minimum": 0, + "stealth_disadvantage": false, + "weight": 12, + "cost": { + "quantity": 10, + "unit": "gp" + } + }, + { + "index": 42, + "name": "Chain Shirt", + "equipment_category": "Armor", + "armor_category": "Medium", + "armor_class": { + "base": 13, + "dex_bonus": true, + "max_bonus": 2 + }, + "str_minimum": 0, + "stealth_disadvantage": false, + "weight": 20, + "cost": { + "quantity": 50, + "unit": "gp" + } + }, + { + "index": 43, + "name": "Scale Mail", + "equipment_category": "Armor", + "armor_category": "Medium", + "armor_class": { + "base": 14, + "dex_bonus": true, + "max_bonus": 2 + }, + "str_minimum": 0, + "stealth_disadvantage": true, + "weight": 45, + "cost": { + "quantity": 50, + "unit": "gp" + } + }, + { + "index": 44, + "name": "Breastplate", + "equipment_category": "Armor", + "armor_category": "Medium", + "armor_class": { + "base": 14, + "dex_bonus": true, + "max_bonus": 2 + }, + "str_minimum": 0, + "stealth_disadvantage": false, + "weight": 20, + "cost": { + "quantity": 400, + "unit": "gp" + } + }, + { + "index": 45, + "name": "Half Plate", + "equipment_category": "Armor", + "armor_category": "Medium", + "armor_class": { + "base": 15, + "dex_bonus": true, + "max_bonus": 2 + }, + "str_minimum": 0, + "stealth_disadvantage": true, + "weight": 40, + "cost": { + "quantity": 750, + "unit": "gp" + } + }, + { + "index": 46, + "name": "Ring Mail", + "equipment_category": "Armor", + "armor_category": "Heavy", + "armor_class": { + "base": 14, + "dex_bonus": false, + "max_bonus": null + }, + "str_minimum": 0, + "stealth_disadvantage": true, + "weight": 40, + "cost": { + "quantity": 30, + "unit": "gp" + } + }, + { + "index": 47, + "name": "Chain Mail", + "equipment_category": "Armor", + "armor_category": "Heavy", + "armor_class": { + "base": 16, + "dex_bonus": false, + "max_bonus": null + }, + "str_minimum": 13, + "stealth_disadvantage": true, + "weight": 55, + "cost": { + "quantity": 75, + "unit": "gp" + } + }, + { + "index": 48, + "name": "Splint", + "equipment_category": "Armor", + "armor_category": "Heavy", + "armor_class": { + "base": 17, + "dex_bonus": false, + "max_bonus": null + }, + "str_minimum": 15, + "stealth_disadvantage": true, + "weight": 60, + "cost": { + "quantity": 200, + "unit": "gp" + } + }, + { + "index": 49, + "name": "Plate", + "equipment_category": "Armor", + "armor_category": "Heavy", + "armor_class": { + "base": 18, + "dex_bonus": false, + "max_bonus": null + }, + "str_minimum": 15, + "stealth_disadvantage": true, + "weight": 65, + "cost": { + "quantity": 1500, + "unit": "gp" + } + }, + { + "index": 50, + "name": "Shield", + "equipment_category": "Armor", + "armor_category": "Shield", + "armor_class": { + "base": 2, + "dex_bonus": false, + "max_bonus": null + }, + "str_minimum": 0, + "stealth_disadvantage": false, + "weight": 6, + "cost": { + "quantity": 10, + "unit": "gp" + } + } +] diff --git a/SessionCompanion/SessionCompanion.Database/JsonData/otherEquipments.json b/SessionCompanion/SessionCompanion.Database/JsonData/otherEquipments.json new file mode 100644 index 0000000..ef3626f --- /dev/null +++ b/SessionCompanion/SessionCompanion.Database/JsonData/otherEquipments.json @@ -0,0 +1,1898 @@ +[ + { + "index": 51, + "name": "Abacus", + "equipment_category": "Adventuring Gear", + "gear_category": "Standard Gear", + "cost": { + "quantity": 2, + "unit": "gp" + }, + "weight": 2, + "url": "http://www.dnd5eapi.co/api/equipment/51" + }, + { + "index": 52, + "name": "Acid (vial)", + "equipment_category": "Adventuring Gear", + "gear_category": "Standard Gear", + "cost": { + "quantity": 25, + "unit": "gp" + }, + "weight": 1, + "desc": [ + "As an action, you can splash the contents of this vial onto a creature within 5 feet of you or throw the vial up to 20 feet, shattering it on impact. In either case, make a ranged attack against a creature or object, treating the acid as an improvised weapon.", + "On a hit, the target takes 2d6 acid damage." + ], + "url": "http://www.dnd5eapi.co/api/equipment/52" + }, + { + "index": 53, + "name": "Alchemist's fire (flask)", + "equipment_category": "Adventuring Gear", + "gear_category": "Standard Gear", + "cost": { + "quantity": 50, + "unit": "gp" + }, + "desc": [ + "This sticky, adhesive fluid ignites when exposed to air.", + "As an action, you can throw this flask up to 20 feet, shattering it on impact. Make a ranged attack against a creature or object, treating the alchemist's fire as an improvised weapon.", + "On a hit, the target takes 1d4 fire damage at the start of each of its turns. A creature can end this damage by using its action to make a DC 10 Dexterity check to extinguish the flames." + ], + "weight": 1, + "url": "http://www.dnd5eapi.co/api/equipment/53" + }, + { + "index": 54, + "name": "Arrow", + "equipment_category": "Adventuring Gear", + "gear_category": "Ammunition", + "cost": { + "quantity": 5, + "unit": "cp" + }, + "weight": 1, + "url": "http://www.dnd5eapi.co/api/equipment/54" + }, + { + "index": 55, + "name": "Blowgun needle", + "equipment_category": "Adventuring Gear", + "gear_category": "Ammunition", + "cost": { + "quantity": 2, + "unit": "cp" + }, + "weight": 1, + "url": "http://www.dnd5eapi.co/api/equipment/55" + }, + { + "index": 56, + "name": "Crossbow bolt", + "equipment_category": "Adventuring Gear", + "gear_category": "Ammunition", + "cost": { + "quantity": 5, + "unit": "cp" + }, + "weight": 1.5, + "url": "http://www.dnd5eapi.co/api/equipment/56" + }, + { + "index": 57, + "name": "Sling bullet", + "equipment_category": "Adventuring Gear", + "gear_category": "Ammunition", + "cost": { + "quantity": 1, + "unit": "cp" + }, + "weight": 1.5, + "url": "http://www.dnd5eapi.co/api/equipment/57" + }, + { + "index": 58, + "name": "Amulet", + "equipment_category": "Adventuring Gear", + "gear_category": "Holy Symbol", + "cost": { + "quantity": 5, + "unit": "gp" + }, + "weight": 1, + "desc": [ + "A holy symbol is a representation of a god or pantheon. It might be an amulet depicting a symbol representing a deity, the same symbol carefully engraved or inlaid as an emblem on a shield, or a tiny box holding a fragment of a sacred relic.", + "Appendix B lists the symbols commonly associated with many gods in the multiverse. A cleric or paladin can use a holy symbol as a spellcasting focus. To use the symbol in this way, the caster must hold it in hand, wear it visibly, or bear it on a shield." + ], + "url": "http://www.dnd5eapi.co/api/equipment/58" + }, + { + "index": 59, + "name": "Antitoxin (vial)", + "equipment_category": "Adventuring Gear", + "gear_category": "Standard Gear", + "cost": { + "quantity": 50, + "unit": "gp" + }, + "weight": 0, + "desc": [ + "A creature that drinks this vial of liquid gains advantage on saving throws against poison for 1 hour. It confers no benefit to undead or constructs." + ], + "url": "http://www.dnd5eapi.co/api/equipment/59" + }, + { + "index": 60, + "name": "Crystal", + "equipment_category": "Adventuring Gear", + "gear_category": "Arcane focus", + "cost": { + "quantity": 10, + "unit": "gp" + }, + "weight": 1, + "desc": [ + "An arcane focus is a special item--an orb, a crystal, a rod, a specially constructed staff, a wand-like length of wood, or some similar item--designed to channel the power of arcane spells. A sorcerer, warlock, or wizard can use such an item as a spellcasting focus." + ], + "url": "http://www.dnd5eapi.co/api/equipment/60" + }, + { + "index": 61, + "name": "Orb", + "equipment_category": "Adventuring Gear", + "gear_category": "Arcane focus", + "cost": { + "quantity": 20, + "unit": "gp" + }, + "weight": 3, + "desc": [ + "An arcane focus is a special item--an orb, a crystal, a rod, a specially constructed staff, a wand-like length of wood, or some similar item--designed to channel the power of arcane spells. A sorcerer, warlock, or wizard can use such an item as a spellcasting focus." + ], + "url": "http://www.dnd5eapi.co/api/equipment/61" + }, + { + "index": 62, + "name": "Rod", + "equipment_category": "Adventuring Gear", + "gear_category": "Arcane focus", + "cost": { + "quantity": 10, + "unit": "gp" + }, + "weight": 2, + "desc": [ + "An arcane focus is a special item--an orb, a crystal, a rod, a specially constructed staff, a wand-like length of wood, or some similar item--designed to channel the power of arcane spells. A sorcerer, warlock, or wizard can use such an item as a spellcasting focus." + ], + "url": "http://www.dnd5eapi.co/api/equipment/62" + }, + { + "index": 63, + "name": "Staff", + "equipment_category": "Adventuring Gear", + "gear_category": "Arcane focus", + "cost": { + "quantity": 5, + "unit": "gp" + }, + "weight": 4, + "desc": [ + "An arcane focus is a special item--an orb, a crystal, a rod, a specially constructed staff, a wand-like length of wood, or some similar item--designed to channel the power of arcane spells. A sorcerer, warlock, or wizard can use such an item as a spellcasting focus." + ], + "url": "http://www.dnd5eapi.co/api/equipment/63" + }, + { + "index": 64, + "name": "Wand", + "equipment_category": "Adventuring Gear", + "gear_category": "Arcane focus", + "cost": { + "quantity": 10, + "unit": "gp" + }, + "weight": 1, + "desc": [ + "An arcane focus is a special item--an orb, a crystal, a rod, a specially constructed staff, a wand-like length of wood, or some similar item--designed to channel the power of arcane spells. A sorcerer, warlock, or wizard can use such an item as a spellcasting focus." + ], + "url": "http://www.dnd5eapi.co/api/equipment/64" + }, + { + "index": 65, + "name": "Backpack", + "equipment_category": "Adventuring Gear", + "gear_category": "Standard Gear", + "cost": { + "quantity": 2, + "unit": "gp" + }, + "weight": 5, + "url": "http://www.dnd5eapi.co/api/equipment/65" + }, + { + "index": 66, + "name": "Ball bearings (bag of 1,000)", + "equipment_category": "Adventuring Gear", + "gear_category": "Standard Gear", + "cost": { + "quantity": 1, + "unit": "gp" + }, + "weight": 2, + "desc": [ + "As an action, you can spill these tiny metal balls from their pouch to cover a level, square area that is 10 feet on a side.", + "A creature moving across the covered area must succeed on a DC 10 Dexterity saving throw or fall prone.", + "A creature moving through the area at half speed doesn't need to make the save." + ], + "url": "http://www.dnd5eapi.co/api/equipment/66" + }, + { + "index": 67, + "name": "Barrel", + "equipment_category": "Adventuring Gear", + "gear_category": "Standard Gear", + "cost": { + "quantity": 2, + "unit": "gp" + }, + "weight": 70, + "url": "http://www.dnd5eapi.co/api/equipment/67" + }, + { + "index": 68, + "name": "Basket", + "equipment_category": "Adventuring Gear", + "gear_category": "Standard Gear", + "cost": { + "quantity": 4, + "unit": "sp" + }, + "weight": 2, + "url": "http://www.dnd5eapi.co/api/equipment/68" + }, + { + "index": 69, + "name": "Bedroll", + "equipment_category": "Adventuring Gear", + "gear_category": "Standard Gear", + "cost": { + "quantity": 1, + "unit": "gp" + }, + "weight": 7, + "url": "http://www.dnd5eapi.co/api/equipment/69" + }, + { + "index": 70, + "name": "Bell", + "equipment_category": "Adventuring Gear", + "gear_category": "Standard Gear", + "cost": { + "quantity": 1, + "unit": "gp" + }, + "weight": 0, + "url": "http://www.dnd5eapi.co/api/equipment/70" + }, + { + "index": 71, + "name": "Blanket", + "equipment_category": "Adventuring Gear", + "gear_category": "Standard Gear", + "cost": { + "quantity": 5, + "unit": "sp" + }, + "weight": 3, + "url": "http://www.dnd5eapi.co/api/equipment/71" + }, + { + "index": 72, + "name": "Block and tackle", + "equipment_category": "Adventuring Gear", + "gear_category": "Standard Gear", + "cost": { + "quantity": 1, + "unit": "gp" + }, + "weight": 5, + "desc": [ + "A set of pulleys with a cable threaded through them and a hook to attach to objects, a block and tackle allows you to hoist up to four times the weight you can normally lift." + ], + "url": "http://www.dnd5eapi.co/api/equipment/72" + }, + { + "index": 73, + "name": "Book", + "equipment_category": "Adventuring Gear", + "gear_category": "Standard Gear", + "cost": { + "quantity": 25, + "unit": "gp" + }, + "weight": 5, + "desc": [ + "A book might contain poetry, historical accounts, information pertaining to a particular field of lore, diagrams and notes on gnomish contraptions, or just about anything else that can be represented using text or pictures. A book of spells is a spellbook (described later in this section)." + ], + "url": "http://www.dnd5eapi.co/api/equipment/73" + }, + { + "index": 74, + "name": "Bottle, glass", + "equipment_category": "Adventuring Gear", + "gear_category": "Standard Gear", + "cost": { + "quantity": 2, + "unit": "gp" + }, + "weight": 2, + "url": "http://www.dnd5eapi.co/api/equipment/74" + }, + { + "index": 75, + "name": "Bucket", + "equipment_category": "Adventuring Gear", + "gear_category": "Standard Gear", + "cost": { + "quantity": 5, + "unit": "cp" + }, + "weight": 2, + "url": "http://www.dnd5eapi.co/api/equipment/75" + }, + { + "index": 76, + "name": "Caltrops", + "equipment_category": "Adventuring Gear", + "gear_category": "Standard Gear", + "cost": { + "quantity": 5, + "unit": "cp" + }, + "weight": 2, + "desc": [ + "As an action, you can spread a bag of caltrops to cover a square area that is 5 feet on a side.", + "Any creature that enters the area must succeed on a DC 15 Dexterity saving throw or stop moving this turn and take 1 piercing damage.", + "Taking this damage reduces the creature's walking speed by 10 feet until the creature regains at least 1 hit point.", + "A creature moving through the area at half speed doesn't need to make the save." + ], + "url": "http://www.dnd5eapi.co/api/equipment/76" + }, + { + "index": 77, + "name": "Candle", + "equipment_category": "Adventuring Gear", + "gear_category": "Standard Gear", + "cost": { + "quantity": 1, + "unit": "cp" + }, + "weight": 0, + "desc": [ + "For 1 hour, a candle sheds bright light in a 5-foot radius and dim light for an additional 5 feet." + ], + "url": "http://www.dnd5eapi.co/api/equipment/77" + }, + { + "index": 78, + "name": "Case, crossbow bolt", + "equipment_category": "Adventuring Gear", + "gear_category": "Standard Gear", + "cost": { + "quantity": 1, + "unit": "gp" + }, + "weight": 1, + "desc": [ "This wooden case can hold up to twenty crossbow bolts." ], + "url": "http://www.dnd5eapi.co/api/equipment/78" + }, + { + "index": 79, + "name": "Case, map or scroll", + "equipment_category": "Adventuring Gear", + "gear_category": "Standard Gear", + "cost": { + "quantity": 1, + "unit": "gp" + }, + "weight": 1, + "desc": [ + "This cylindrical leather case can hold up to ten rolled-up sheets of paper or five rolled-up sheets of parchment." + ], + "url": "http://www.dnd5eapi.co/api/equipment/79" + }, + { + "index": 80, + "name": "Chain (10 feet)", + "equipment_category": "Adventuring Gear", + "gear_category": "Standard Gear", + "cost": { + "quantity": 5, + "unit": "gp" + }, + "weight": 10, + "desc": [ + "A chain has 10 hit points. It can be burst with a successful DC 20 Strength check." + ], + "url": "http://www.dnd5eapi.co/api/equipment/80" + }, + { + "index": 81, + "name": "Chalk (1 piece)", + "equipment_category": "Adventuring Gear", + "gear_category": "Standard Gear", + "cost": { + "quantity": 1, + "unit": "cp" + }, + "weight": 0, + "url": "http://www.dnd5eapi.co/api/equipment/81" + }, + { + "index": 82, + "name": "Chest", + "equipment_category": "Adventuring Gear", + "gear_category": "Standard Gear", + "cost": { + "quantity": 5, + "unit": "gp" + }, + "weight": 25, + "url": "http://www.dnd5eapi.co/api/equipment/82" + }, + { + "index": 83, + "name": "Clothes, common", + "equipment_category": "Adventuring Gear", + "gear_category": "Standard Gear", + "cost": { + "quantity": 5, + "unit": "sp" + }, + "weight": 3, + "url": "http://www.dnd5eapi.co/api/equipment/83" + }, + { + "index": 84, + "name": "Clothes, costume", + "equipment_category": "Adventuring Gear", + "gear_category": "Standard Gear", + "cost": { + "quantity": 5, + "unit": "gp" + }, + "weight": 4, + "url": "http://www.dnd5eapi.co/api/equipment/84" + }, + { + "index": 85, + "name": "Clothes, fine", + "equipment_category": "Adventuring Gear", + "gear_category": "Standard Gear", + "cost": { + "quantity": 15, + "unit": "gp" + }, + "weight": 6, + "url": "http://www.dnd5eapi.co/api/equipment/85" + }, + { + "index": 86, + "name": "Clothes, traveler's", + "equipment_category": "Adventuring Gear", + "gear_category": "Standard Gear", + "cost": { + "quantity": 2, + "unit": "gp" + }, + "weight": 4, + "url": "http://www.dnd5eapi.co/api/equipment/86" + }, + { + "index": 87, + "name": "Component pouch", + "equipment_category": "Adventuring Gear", + "gear_category": "Standard Gear", + "cost": { + "quantity": 25, + "unit": "gp" + }, + "weight": 2, + "desc": [ + " A component pouch is a small, watertight leather belt pouch that has compartments to hold all the material components and other special items you need to cast your spells, except for those components that have a specific cost (as indicated in a spell's description)." + ], + "url": "http://www.dnd5eapi.co/api/equipment/87" + }, + { + "index": 88, + "name": "Crowbar", + "equipment_category": "Adventuring Gear", + "gear_category": "Standard Gear", + "cost": { + "quantity": 2, + "unit": "gp" + }, + "weight": 5, + "desc": [ + "Using a crowbar grants advantage to Strength checks where the crowbar's leverage can be applied." + ], + "url": "http://www.dnd5eapi.co/api/equipment/88" + }, + { + "index": 89, + "name": "Sprig of mistletoe", + "equipment_category": "Adventuring Gear", + "gear_category": "Druidic focus", + "cost": { + "quantity": 1, + "unit": "gp" + }, + "weight": 0, + "desc": [ + "A druidic focus might be a sprig of mistletoe or holly, a wand or scepter made of yew or another special wood, a staff drawn whole out of a living tree, or a totem object incorporating feathers, fur, bones, and teeth from sacred animals. A druid can use such an object as a spellcasting focus." + ], + "url": "http://www.dnd5eapi.co/api/equipment/89" + }, + { + "index": 90, + "name": "Totem", + "equipment_category": "Adventuring Gear", + "gear_category": "Druidic focus", + "cost": { + "quantity": 1, + "unit": "gp" + }, + "weight": 0, + "desc": [ + "A druidic focus might be a sprig of mistletoe or holly, a wand or scepter made of yew or another special wood, a staff drawn whole out of a living tree, or a totem object incorporating feathers, fur, bones, and teeth from sacred animals. A druid can use such an object as a spellcasting focus." + ], + "url": "http://www.dnd5eapi.co/api/equipment/90" + }, + { + "index": 91, + "name": "Wooden staff", + "equipment_category": "Adventuring Gear", + "gear_category": "Druidic focus", + "cost": { + "quantity": 5, + "unit": "gp" + }, + "weight": 4, + "desc": [ + "A druidic focus might be a sprig of mistletoe or holly, a wand or scepter made of yew or another special wood, a staff drawn whole out of a living tree, or a totem object incorporating feathers, fur, bones, and teeth from sacred animals. A druid can use such an object as a spellcasting focus." + ], + "url": "http://www.dnd5eapi.co/api/equipment/91" + }, + { + "index": 92, + "name": "Yew wand", + "equipment_category": "Adventuring Gear", + "gear_category": "Druidic focus", + "cost": { + "quantity": 10, + "unit": "gp" + }, + "weight": 1, + "desc": [ + "A druidic focus might be a sprig of mistletoe or holly, a wand or scepter made of yew or another special wood, a staff drawn whole out of a living tree, or a totem object incorporating feathers, fur, bones, and teeth from sacred animals. A druid can use such an object as a spellcasting focus." + ], + "url": "http://www.dnd5eapi.co/api/equipment/92" + }, + { + "index": 93, + "name": "Emblem", + "equipment_category": "Adventuring Gear", + "gear_category": "Holy Symbol", + "cost": { + "quantity": 5, + "unit": "gp" + }, + "weight": 0, + "desc": [ + "A holy symbol is a representation of a god or pantheon. It might be an amulet depicting a symbol representing a deity, the same symbol carefully engraved or inlaid as an emblem on a shield, or a tiny box holding a fragment of a sacred relic.", + "Appendix B lists the symbols commonly associated with many gods in the multiverse. A cleric or paladin can use a holy symbol as a spellcasting focus. To use the symbol in this way, the caster must hold it in hand, wear it visibly, or bear it on a shield." + ], + "url": "http://www.dnd5eapi.co/api/equipment/93" + }, + { + "index": 94, + "name": "Fishing tackle", + "equipment_category": "Adventuring Gear", + "gear_category": "Standard Gear", + "cost": { + "quantity": 1, + "unit": "gp" + }, + "weight": 4, + "desc": [ + "This kit includes a wooden rod, silken line, corkwood bobbers, steel hooks, lead sinkers, velvet lures, and narrow netting." + ], + "url": "http://www.dnd5eapi.co/api/equipment/94" + }, + { + "index": 95, + "name": "Flask or tankard", + "equipment_category": "Adventuring Gear", + "gear_category": "Standard Gear", + "cost": { + "quantity": 2, + "unit": "cp" + }, + "weight": 1, + "url": "http://www.dnd5eapi.co/api/equipment/95" + }, + { + "index": 96, + "name": "Grappling hook", + "equipment_category": "Adventuring Gear", + "gear_category": "Standard Gear", + "cost": { + "quantity": 2, + "unit": "gp" + }, + "weight": 4, + "url": "http://www.dnd5eapi.co/api/equipment/96" + }, + { + "index": 97, + "name": "Hammer", + "equipment_category": "Adventuring Gear", + "gear_category": "Standard Gear", + "cost": { + "quantity": 1, + "unit": "gp" + }, + "weight": 3, + "url": "http://www.dnd5eapi.co/api/equipment/97" + }, + { + "index": 98, + "name": "Hammer, sledge", + "equipment_category": "Adventuring Gear", + "gear_category": "Standard Gear", + "cost": { + "quantity": 2, + "unit": "gp" + }, + "weight": 10, + "url": "http://www.dnd5eapi.co/api/equipment/98" + }, + { + "index": 99, + "name": "Holy water (flask)", + "equipment_category": "Adventuring Gear", + "gear_category": "Standard Gear", + "cost": { + "quantity": 25, + "unit": "gp" + }, + "weight": 1, + "desc": [ + "As an action, you can splash the contents of this flask onto a creature within 5 feet of you or throw it up to 20 feet, shattering it on impact. In either case, make a ranged attack against a target creature, treating the holy water as an improvised weapon.", + "If the target is a fiend or undead, it takes 2d6 radiant damage.", + "A cleric or paladin may create holy water by performing a special ritual.", + "The ritual takes 1 hour to perform, uses 25 gp worth of powdered silver, and requires the caster to expend a 1st-level spell slot." + ], + "url": "http://www.dnd5eapi.co/api/equipment/99" + }, + { + "index": 100, + "name": "Hourglass", + "equipment_category": "Adventuring Gear", + "gear_category": "Standard Gear", + "cost": { + "quantity": 25, + "unit": "gp" + }, + "weight": 1, + "url": "http://www.dnd5eapi.co/api/equipment/100" + }, + { + "index": 101, + "name": "Hunting trap", + "equipment_category": "Adventuring Gear", + "gear_category": "Standard Gear", + "cost": { + "quantity": 5, + "unit": "gp" + }, + "desc": [ + "When you use your action to set it, this trap forms a saw-toothed steel ring that snaps shut when a creature steps on a pressure plate in the center. The trap is affixed by a heavy chain to an immobile object, such as a tree or a spike driven into the ground.", + "A creature that steps on the plate must succeed on a DC 13 Dexterity saving throw or take 1d4 piercing damage and stop moving. Thereafter, until the creature breaks free of the trap, its movement is limited by the length of the chain (typically 3 feet long).", + "A creature can use its action to make a DC 13 Strength check, freeing itself or another creature within its reach on a success. Each failed check deals 1 piercing damage to the trapped creature." + ], + "weight": 25, + "url": "http://www.dnd5eapi.co/api/equipment/101" + }, + { + "index": 102, + "name": "Ink (1 ounce bottle)", + "equipment_category": "Adventuring Gear", + "gear_category": "Standard Gear", + "cost": { + "quantity": 10, + "unit": "gp" + }, + "weight": 0, + "url": "http://www.dnd5eapi.co/api/equipment/102" + }, + { + "index": 103, + "name": "Ink pen", + "equipment_category": "Adventuring Gear", + "gear_category": "Standard Gear", + "cost": { + "quantity": 2, + "unit": "cp" + }, + "weight": 0, + "url": "http://www.dnd5eapi.co/api/equipment/103" + }, + { + "index": 104, + "name": "Jug or pitcher", + "equipment_category": "Adventuring Gear", + "gear_category": "Standard Gear", + "cost": { + "quantity": 2, + "unit": "cp" + }, + "weight": 4, + "url": "http://www.dnd5eapi.co/api/equipment/104" + }, + { + "index": 105, + "name": "Climber's Kit", + "equipment_category": "Adventuring Gear", + "gear_category": "Kit", + "cost": { + "quantity": 25, + "unit": "gp" + }, + "weight": 12, + "desc": [ + "A climber's kit includes special pitons, boot tips, gloves, and a harness. You can use the climber's kit as an action to anchor yourself; when you do, you can't fall more than 25 feet from the point where you anchored yourself, and you can't climb more than 25 feet away from that point without undoing the anchor." + ], + "url": "http://www.dnd5eapi.co/api/equipment/105" + }, + { + "index": 106, + "name": "Disguise Kit", + "equipment_category": "Adventuring Gear", + "gear_category": "Kit", + "cost": { + "quantity": 25, + "unit": "gp" + }, + "weight": 3, + "desc": [ + "This pouch of cosmetics, hair dye, and small props lets you create disguises that change your physical appearance. Proficiency with this kit lets you add your proficiency bonus to any ability checks you make to create a visual disguise." + ], + "url": "http://www.dnd5eapi.co/api/equipment/106" + }, + { + "index": 107, + "name": "Forgery Kit", + "equipment_category": "Adventuring Gear", + "gear_category": "Kit", + "cost": { + "quantity": 15, + "unit": "gp" + }, + "weight": 5, + "desc": [ + "This small box contains a variety of papers and parchments, pens and inks, seals and sealing wax, gold and silver leaf, and other supplies necessary to create convincing forgeries of physical documents. Proficiency with this kit lets you add your proficiency bonus to any ability checks you make to create a physical forgery of a document." + ], + "url": "http://www.dnd5eapi.co/api/equipment/107" + }, + { + "index": 108, + "name": "Herbalism Kit", + "equipment_category": "Adventuring Gear", + "gear_category": "Kit", + "cost": { + "quantity": 5, + "unit": "gp" + }, + "weight": 3, + "desc": [ + "This kit contains a variety of instruments such as clippers, mortar and pestle, and pouches and vials used by herbalists to create remedies and potions. Proficiency with this kit lets you add your proficiency bonus to any ability checks you make to identify or apply herbs. Also, proficiency with this kit is required to create antitoxin and potions of healing." + ], + "url": "http://www.dnd5eapi.co/api/equipment/108" + }, + { + "index": 109, + "name": "Healer's Kit", + "equipment_category": "Adventuring Gear", + "gear_category": "Kit", + "cost": { + "quantity": 5, + "unit": "gp" + }, + "weight": 3, + "desc": [ + "This kit is a leather pouch containing bandages, salves, and splints. The kit has ten uses. As an action, you can expend one use of the kit to stabilize a creature that has 0 hit points, without needing to make a Wisdom (Medicine) check." + ], + "url": "http://www.dnd5eapi.co/api/equipment/109" + }, + { + "index": 110, + "name": "Mess Kit", + "equipment_category": "Adventuring Gear", + "gear_category": "Kit", + "cost": { + "quantity": 2, + "unit": "sp" + }, + "weight": 1, + "desc": [ + "This tin box contains a cup and simple cutlery. The box clamps together, and one side can be used as a cooking pan and the other as a plate or shallow bowl." + ], + "url": "http://www.dnd5eapi.co/api/equipment/110" + }, + { + "index": 111, + "name": "Poisoner's Kit", + "equipment_category": "Adventuring Gear", + "gear_category": "Kit", + "cost": { + "quantity": 50, + "unit": "gp" + }, + "weight": 2, + "desc": [ + "A poisoner's kit includes the vials, chemicals, and other equipment necessary for the creation of poisons. Proficiency with this kit lets you add your proficiency bonus to any ability checks you make to craft or use poisons." + ], + "url": "http://www.dnd5eapi.co/api/equipment/111" + }, + { + "index": 112, + "name": "Ladder (10-foot)", + "equipment_category": "Adventuring Gear", + "gear_category": "Standard Gear", + "cost": { + "quantity": 1, + "unit": "sp" + }, + "weight": 25, + "url": "http://www.dnd5eapi.co/api/equipment/112" + }, + { + "index": 113, + "name": "Lamp", + "equipment_category": "Adventuring Gear", + "gear_category": "Standard Gear", + "cost": { + "quantity": 5, + "unit": "sp" + }, + "weight": 1, + "desc": [ + "A lamp casts bright light in a 15-foot radius and dim light for an additional 30 feet. Once lit, it burns for 6 hours on a flask (1 pint) of oil." + ], + "url": "http://www.dnd5eapi.co/api/equipment/113" + }, + { + "index": 114, + "name": "Lantern, bullseye", + "equipment_category": "Adventuring Gear", + "gear_category": "Standard Gear", + "cost": { + "quantity": 10, + "unit": "gp" + }, + "weight": 2, + "desc": [ + "A bullseye lantern casts bright light in a 60-foot cone and dim light for an additional 60 feet. Once lit, it burns for 6 hours on a flask (1 pint) of oil." + ], + "url": "http://www.dnd5eapi.co/api/equipment/114" + }, + { + "index": 115, + "name": "Lantern, hooded", + "equipment_category": "Adventuring Gear", + "gear_category": "Standard Gear", + "cost": { + "quantity": 5, + "unit": "gp" + }, + "weight": 2, + "desc": [ + "A hooded lantern casts bright light in a 30-foot radius and dim light for an additional 30 feet. Once lit, it burns for 6 hours on a flask (1 pint) of oil. As an action, you can lower the hood, reducing the light to dim light in a 5-foot radius." + ], + "url": "http://www.dnd5eapi.co/api/equipment/115" + }, + { + "index": 116, + "name": "Lock", + "equipment_category": "Adventuring Gear", + "gear_category": "Standard Gear", + "cost": { + "quantity": 10, + "unit": "gp" + }, + "weight": 1, + "desc": [ + "A key is provided with the lock. Without the key, a creature proficient with thieves' tools can pick this lock with a successful DC 15 Dexterity check. Your GM may decide that better locks are available for higher prices." + ], + "url": "http://www.dnd5eapi.co/api/equipment/116" + }, + { + "index": 117, + "name": "Magnifying glass", + "equipment_category": "Adventuring Gear", + "gear_category": "Standard Gear", + "cost": { + "quantity": 100, + "unit": "gp" + }, + "weight": 0, + "desc": [ + "This lens allows a closer look at small objects. It is also useful as a substitute for flint and steel when starting fires. Lighting a fire with a magnifying glass requires light as bright as sunlight to focus, tinder to ignite, and about 5 minutes for the fire to ignite.", + "A magnifying glass grants advantage on any ability check made to appraise or inspect an item that is small or highly detailed." + ], + "url": "http://www.dnd5eapi.co/api/equipment/117" + }, + { + "index": 118, + "name": "Manacles", + "equipment_category": "Adventuring Gear", + "gear_category": "Standard Gear", + "cost": { + "quantity": 2, + "unit": "gp" + }, + "weight": 6, + "desc": [ + "These metal restraints can bind a Small or Medium creature. Escaping the manacles requires a successful DC 20 Dexterity check. Breaking them requires a successful DC 20 Strength check.", + "Each set of manacles comes with one key. Without the key, a creature proficient with thieves' tools can pick the manacles' lock with a successful DC 15 Dexterity check. Manacles have 15 hit points." + ], + "url": "http://www.dnd5eapi.co/api/equipment/118" + }, + { + "index": 119, + "name": "Mirror, steel", + "equipment_category": "Adventuring Gear", + "gear_category": "Standard Gear", + "cost": { + "quantity": 5, + "unit": "gp" + }, + "weight": 0.5, + "url": "http://www.dnd5eapi.co/api/equipment/119" + }, + { + "index": 120, + "name": "Oil (flask)", + "equipment_category": "Adventuring Gear", + "gear_category": "Standard Gear", + "cost": { + "quantity": 1, + "unit": "sp" + }, + "weight": 1, + "desc": [ + "Oil usually comes in a clay flask that holds 1 pint.", + "As an action, you can splash the oil in this flask onto a creature within 5 feet of you or throw it up to 20 feet, shattering it on impact. Make a ranged attack against a target creature or object, treating the oil as an improvised weapon.", + "On a hit, the target is covered in oil. If the target takes any fire damage before the oil dries (after 1 minute), the target takes an additional 5 fire damage from the burning oil.", + "You can also pour a flask of oil on the ground to cover a 5-foot-square area, provided that the surface is level.", + "If lit, the oil burns for 2 rounds and deals 5 fire damage to any creature that enters the area or ends its turn in the area. A creature can take this damage only once per turn." + ], + "url": "http://www.dnd5eapi.co/api/equipment/120" + }, + { + "index": 121, + "name": "Paper (one sheet)", + "equipment_category": "Adventuring Gear", + "gear_category": "Standard Gear", + "cost": { + "quantity": 2, + "unit": "sp" + }, + "weight": 0, + "url": "http://www.dnd5eapi.co/api/equipment/121" + }, + { + "index": 122, + "name": "Parchment (one sheet)", + "equipment_category": "Adventuring Gear", + "gear_category": "Standard Gear", + "cost": { + "quantity": 1, + "unit": "sp" + }, + "weight": 0, + "url": "http://www.dnd5eapi.co/api/equipment/122" + }, + { + "index": 123, + "name": "Perfume (vial)", + "equipment_category": "Adventuring Gear", + "gear_category": "Standard Gear", + "cost": { + "quantity": 5, + "unit": "gp" + }, + "weight": 0, + "url": "http://www.dnd5eapi.co/api/equipment/123" + }, + { + "index": 124, + "name": "Pick, miner's", + "equipment_category": "Adventuring Gear", + "gear_category": "Standard Gear", + "cost": { + "quantity": 2, + "unit": "gp" + }, + "weight": 10, + "url": "http://www.dnd5eapi.co/api/equipment/124" + }, + { + "index": 125, + "name": "Piton", + "equipment_category": "Adventuring Gear", + "gear_category": "Standard Gear", + "cost": { + "quantity": 5, + "unit": "cp" + }, + "weight": 0.25, + "url": "http://www.dnd5eapi.co/api/equipment/125" + }, + { + "index": 126, + "name": "Poison, basic (vial)", + "equipment_category": "Adventuring Gear", + "gear_category": "Standard Gear", + "cost": { + "quantity": 100, + "unit": "gp" + }, + "weight": 0, + "desc": [ + "You can use the poison in this vial to coat one slashing or piercing weapon or up to three pieces of ammunition. Applying the poison takes an action. A creature hit by the poisoned weapon or ammunition must make a DC 10 Constitution saving throw or take 1d4 poison damage. Once applied, the poison retains potency for 1 minute before drying." + ], + "url": "http://www.dnd5eapi.co/api/equipment/126" + }, + { + "index": 127, + "name": "Pole (10-foot)", + "equipment_category": "Adventuring Gear", + "gear_category": "Standard Gear", + "cost": { + "quantity": 5, + "unit": "cp" + }, + "weight": 7, + "url": "http://www.dnd5eapi.co/api/equipment/127" + }, + { + "index": 128, + "name": "Pot, iron", + "equipment_category": "Adventuring Gear", + "gear_category": "Standard Gear", + "cost": { + "quantity": 2, + "unit": "gp" + }, + "weight": 10, + "url": "http://www.dnd5eapi.co/api/equipment/128" + }, + { + "index": 129, + "name": "Potion of healing", + "equipment_category": "Adventuring Gear", + "gear_category": "Standard Gear", + "cost": { + "quantity": 50, + "unit": "gp" + }, + "weight": 0.5, + "desc": [ + "A character who drinks the magical red fluid in this vial regains 2d4 + 2 hit points. Drinking or administering a potion takes an action." + ], + "url": "http://www.dnd5eapi.co/api/equipment/129" + }, + { + "index": 130, + "name": "Pouch", + "equipment_category": "Adventuring Gear", + "gear_category": "Standard Gear", + "cost": { + "quantity": 5, + "unit": "sp" + }, + "weight": 1, + "desc": [ + "A cloth or leather pouch can hold up to 20 sling bullets or 50 blowgun needles, among other things. A compartmentalized pouch for holding spell components is called a component pouch (described earlier in this section)." + ], + "url": "http://www.dnd5eapi.co/api/equipment/130" + }, + { + "index": 131, + "name": "Quiver", + "equipment_category": "Adventuring Gear", + "gear_category": "Standard Gear", + "cost": { + "quantity": 1, + "unit": "gp" + }, + "weight": 1, + "desc": [ "A quiver can hold up to 20 arrows." ], + "url": "http://www.dnd5eapi.co/api/equipment/131" + }, + { + "index": 132, + "name": "Ram, portable", + "equipment_category": "Adventuring Gear", + "gear_category": "Standard Gear", + "cost": { + "quantity": 4, + "unit": "gp" + }, + "weight": 35, + "desc": [ + "You can use a portable ram to break down doors. When doing so, you gain a +4 bonus on the Strength check. One other character can help you use the ram, giving you advantage on this check." + ], + "url": "http://www.dnd5eapi.co/api/equipment/132" + }, + { + "index": 133, + "name": "Rations (1 day)", + "equipment_category": "Adventuring Gear", + "gear_category": "Standard Gear", + "cost": { + "quantity": 5, + "unit": "sp" + }, + "weight": 2, + "desc": [ + "Rations consist of dry foods suitable for extended travel, including jerky, dried fruit, hardtack, and nuts." + ], + "url": "http://www.dnd5eapi.co/api/equipment/133" + }, + { + "index": 134, + "name": "Reliquary", + "equipment_category": "Adventuring Gear", + "gear_category": "Holy Symbol", + "cost": { + "quantity": 5, + "unit": "gp" + }, + "weight": 2, + "desc": [ + "A holy symbol is a representation of a god or pantheon. It might be an amulet depicting a symbol representing a deity, the same symbol carefully engraved or inlaid as an emblem on a shield, or a tiny box holding a fragment of a sacred relic.", + "Appendix B lists the symbols commonly associated with many gods in the multiverse. A cleric or paladin can use a holy symbol as a spellcasting focus. To use the symbol in this way, the caster must hold it in hand, wear it visibly, or bear it on a shield." + ], + "url": "http://www.dnd5eapi.co/api/equipment/134" + }, + { + "index": 135, + "name": "Robes", + "equipment_category": "Adventuring Gear", + "gear_category": "Standard Gear", + "cost": { + "quantity": 1, + "unit": "gp" + }, + "weight": 4, + "url": "http://www.dnd5eapi.co/api/equipment/135" + }, + { + "index": 136, + "name": "Rope, hempen (50 feet)", + "equipment_category": "Adventuring Gear", + "gear_category": "Standard Gear", + "cost": { + "quantity": 1, + "unit": "gp" + }, + "weight": 10, + "desc": [ + "Rope, whether made of hemp or silk, has 2 hit points and can be burst with a DC 17 Strength check." + ], + "url": "http://www.dnd5eapi.co/api/equipment/136" + }, + { + "index": 137, + "name": "Rope, silk (50 feet)", + "equipment_category": "Adventuring Gear", + "gear_category": "Standard Gear", + "cost": { + "quantity": 10, + "unit": "gp" + }, + "weight": 5, + "desc": [ + "Rope, whether made of hemp or silk, has 2 hit points and can be burst with a DC 17 Strength check." + ], + "url": "http://www.dnd5eapi.co/api/equipment/137" + }, + { + "index": 138, + "name": "Sack", + "equipment_category": "Adventuring Gear", + "gear_category": "Standard Gear", + "cost": { + "quantity": 1, + "unit": "cp" + }, + "weight": 0.5, + "url": "http://www.dnd5eapi.co/api/equipment/138" + }, + { + "index": 139, + "name": "Scale, merchant's", + "equipment_category": "Adventuring Gear", + "gear_category": "Standard Gear", + "cost": { + "quantity": 5, + "unit": "gp" + }, + "weight": 3, + "desc": [ + "A scale includes a small balance, pans, and a suitable assortment of weights up to 2 pounds. With it, you can measure the exact weight of small objects, such as raw precious metals or trade goods, to help determine their worth." + ], + "url": "http://www.dnd5eapi.co/api/equipment/139" + }, + { + "index": 140, + "name": "Sealing wax", + "equipment_category": "Adventuring Gear", + "gear_category": "Standard Gear", + "cost": { + "quantity": 5, + "unit": "sp" + }, + "weight": 0, + "url": "http://www.dnd5eapi.co/api/equipment/140" + }, + { + "index": 141, + "name": "Shovel", + "equipment_category": "Adventuring Gear", + "gear_category": "Standard Gear", + "cost": { + "quantity": 2, + "unit": "gp" + }, + "weight": 5, + "url": "http://www.dnd5eapi.co/api/equipment/141" + }, + { + "index": 142, + "name": "Signal whistle", + "equipment_category": "Adventuring Gear", + "gear_category": "Standard Gear", + "cost": { + "quantity": 5, + "unit": "cp" + }, + "weight": 0, + "url": "http://www.dnd5eapi.co/api/equipment/142" + }, + { + "index": 143, + "name": "Signet ring", + "equipment_category": "Adventuring Gear", + "gear_category": "Standard Gear", + "cost": { + "quantity": 5, + "unit": "gp" + }, + "weight": 0, + "url": "http://www.dnd5eapi.co/api/equipment/143" + }, + { + "index": 144, + "name": "Soap", + "equipment_category": "Adventuring Gear", + "gear_category": "Standard Gear", + "cost": { + "quantity": 2, + "unit": "cp" + }, + "weight": 0, + "url": "http://www.dnd5eapi.co/api/equipment/144" + }, + { + "index": 145, + "name": "Spellbook", + "equipment_category": "Adventuring Gear", + "gear_category": "Standard Gear", + "cost": { + "quantity": 50, + "unit": "gp" + }, + "weight": 3, + "desc": [ + "Essential for wizards, a spellbook is a leather-bound tome with 100 blank vellum pages suitable for recording spells." + ], + "url": "http://www.dnd5eapi.co/api/equipment/145" + }, + { + "index": 146, + "name": "Spike, iron", + "equipment_category": "Adventuring Gear", + "gear_category": "Standard Gear", + "cost": { + "quantity": 1, + "unit": "sp" + }, + "weight": 5, + "url": "http://www.dnd5eapi.co/api/equipment/146" + }, + { + "index": 147, + "name": "Spyglass", + "equipment_category": "Adventuring Gear", + "gear_category": "Standard Gear", + "cost": { + "quantity": 1000, + "unit": "gp" + }, + "weight": 1, + "desc": [ + "Objects viewed through a spyglass are magnified to twice their size." + ], + "url": "http://www.dnd5eapi.co/api/equipment/147" + }, + { + "index": 148, + "name": "Tent, two-person", + "equipment_category": "Adventuring Gear", + "gear_category": "Standard Gear", + "cost": { + "quantity": 2, + "unit": "gp" + }, + "weight": 20, + "desc": [ "A simple and portable canvas shelter, a tent sleeps two." ], + "url": "http://www.dnd5eapi.co/api/equipment/148" + }, + { + "index": 149, + "name": "Tinderbox", + "equipment_category": "Adventuring Gear", + "gear_category": "Standard Gear", + "cost": { + "quantity": 5, + "unit": "sp" + }, + "weight": 1, + "desc": [ + "This small container holds flint, fire steel, and tinder (usually dry cloth soaked in light oil) used to kindle a fire. Using it to light a torch--or anything else with abundant, exposed fuel--takes an action.", + "Lighting any other fire takes 1 minute." + ], + "url": "http://www.dnd5eapi.co/api/equipment/149" + }, + { + "index": 150, + "name": "Torch", + "equipment_category": "Adventuring Gear", + "gear_category": "Standard Gear", + "cost": { + "quantity": 1, + "unit": "cp" + }, + "weight": 1, + "desc": [ + "A torch burns for 1 hour, providing bright light in a 20-foot radius and dim light for an additional 20 feet. If you make a melee attack with a burning torch and hit, it deals 1 fire damage." + ], + "url": "http://www.dnd5eapi.co/api/equipment/150" + }, + { + "index": 151, + "name": "Vial", + "equipment_category": "Adventuring Gear", + "gear_category": "Standard Gear", + "cost": { + "quantity": 1, + "unit": "gp" + }, + "weight": 0, + "url": "http://www.dnd5eapi.co/api/equipment/151" + }, + { + "index": 152, + "name": "Waterskin", + "equipment_category": "Adventuring Gear", + "gear_category": "Standard Gear", + "cost": { + "quantity": 2, + "unit": "sp" + }, + "weight": 5, + "url": "http://www.dnd5eapi.co/api/equipment/152" + }, + { + "index": 153, + "name": "Whetstone", + "equipment_category": "Adventuring Gear", + "gear_category": "Standard Gear", + "cost": { + "quantity": 1, + "unit": "cp" + }, + "weight": 1, + "url": "http://www.dnd5eapi.co/api/equipment/153" + }, + { + "index": 154, + "name": "Burglar's Pack", + "equipment_category": "Adventuring Gear", + "gear_category": "Equipment Pack", + "cost": { + "quantity": 16, + "unit": "gp" + } + }, + { + "index": 161, + "name": "Alchemist's supplies", + "equipment_category": "Tools", + "tool_category": "Artisan's Tools", + "cost": { + "quantity": 50, + "unit": "gp" + }, + "weight": 8, + "desc": [ + "These special tools include the items needed to pursue a craft or trade. The table shows examples of the most common types of tools, each providing items related to a single craft. Proficiency with a set of artisan's tools lets you add your proficiency bonus to any ability checks you make using the tools in your craft. Each type of artisan's tools requires a separate proficiency." + ], + "url": "http://www.dnd5eapi.co/api/equipment/161" + }, + { + "index": 162, + "name": "Brewer's supplies", + "equipment_category": "Tools", + "tool_category": "Artisan's Tools", + "cost": { + "quantity": 20, + "unit": "gp" + }, + "weight": 9, + "desc": [ + "These special tools include the items needed to pursue a craft or trade. The table shows examples of the most common types of tools, each providing items related to a single craft. Proficiency with a set of artisan's tools lets you add your proficiency bonus to any ability checks you make using the tools in your craft. Each type of artisan's tools requires a separate proficiency." + ], + "url": "http://www.dnd5eapi.co/api/equipment/162" + }, + { + "index": 163, + "name": "Calligrapher's supplies", + "equipment_category": "Tools", + "tool_category": "Artisan's Tools", + "cost": { + "quantity": 10, + "unit": "gp" + }, + "weight": 5, + "desc": [ + "These special tools include the items needed to pursue a craft or trade. The table shows examples of the most common types of tools, each providing items related to a single craft. Proficiency with a set of artisan's tools lets you add your proficiency bonus to any ability checks you make using the tools in your craft. Each type of artisan's tools requires a separate proficiency." + ], + "url": "http://www.dnd5eapi.co/api/equipment/163" + }, + { + "index": 164, + "name": "Carpenter's tools", + "equipment_category": "Tools", + "tool_category": "Artisan's Tools", + "cost": { + "quantity": 8, + "unit": "gp" + }, + "weight": 6, + "desc": [ + "These special tools include the items needed to pursue a craft or trade. The table shows examples of the most common types of tools, each providing items related to a single craft. Proficiency with a set of artisan's tools lets you add your proficiency bonus to any ability checks you make using the tools in your craft. Each type of artisan's tools requires a separate proficiency." + ], + "url": "http://www.dnd5eapi.co/api/equipment/164" + }, + { + "index": 165, + "name": "Cartographer's tools", + "equipment_category": "Tools", + "tool_category": "Artisan's Tools", + "cost": { + "quantity": 15, + "unit": "gp" + }, + "weight": 6, + "desc": [ + "These special tools include the items needed to pursue a craft or trade. The table shows examples of the most common types of tools, each providing items related to a single craft. Proficiency with a set of artisan's tools lets you add your proficiency bonus to any ability checks you make using the tools in your craft. Each type of artisan's tools requires a separate proficiency." + ], + "url": "http://www.dnd5eapi.co/api/equipment/165" + }, + { + "index": 166, + "name": "Cobbler's tools", + "equipment_category": "Tools", + "tool_category": "Artisan's Tools", + "cost": { + "quantity": 5, + "unit": "gp" + }, + "weight": 5, + "desc": [ + "These special tools include the items needed to pursue a craft or trade. The table shows examples of the most common types of tools, each providing items related to a single craft. Proficiency with a set of artisan's tools lets you add your proficiency bonus to any ability checks you make using the tools in your craft. Each type of artisan's tools requires a separate proficiency." + ], + "url": "http://www.dnd5eapi.co/api/equipment/166" + }, + { + "index": 167, + "name": "Cook's utensils", + "equipment_category": "Tools", + "tool_category": "Artisan's Tools", + "cost": { + "quantity": 1, + "unit": "gp" + }, + "weight": 8, + "desc": [ + "These special tools include the items needed to pursue a craft or trade. The table shows examples of the most common types of tools, each providing items related to a single craft. Proficiency with a set of artisan's tools lets you add your proficiency bonus to any ability checks you make using the tools in your craft. Each type of artisan's tools requires a separate proficiency." + ], + "url": "http://www.dnd5eapi.co/api/equipment/167" + }, + { + "index": 168, + "name": "Glassblower's tools", + "equipment_category": "Tools", + "tool_category": "Artisan's Tools", + "cost": { + "quantity": 30, + "unit": "gp" + }, + "weight": 5, + "desc": [ + "These special tools include the items needed to pursue a craft or trade. The table shows examples of the most common types of tools, each providing items related to a single craft. Proficiency with a set of artisan's tools lets you add your proficiency bonus to any ability checks you make using the tools in your craft. Each type of artisan's tools requires a separate proficiency." + ], + "url": "http://www.dnd5eapi.co/api/equipment/168" + }, + { + "index": 169, + "name": "Jeweler's tools", + "equipment_category": "Tools", + "tool_category": "Artisan's Tools", + "cost": { + "quantity": 25, + "unit": "gp" + }, + "weight": 2, + "desc": [ + "These special tools include the items needed to pursue a craft or trade. The table shows examples of the most common types of tools, each providing items related to a single craft. Proficiency with a set of artisan's tools lets you add your proficiency bonus to any ability checks you make using the tools in your craft. Each type of artisan's tools requires a separate proficiency." + ], + "url": "http://www.dnd5eapi.co/api/equipment/169" + }, + { + "index": 170, + "name": "Leatherworker's tools", + "equipment_category": "Tools", + "tool_category": "Artisan's Tools", + "cost": { + "quantity": 5, + "unit": "gp" + }, + "weight": 5, + "desc": [ + "These special tools include the items needed to pursue a craft or trade. The table shows examples of the most common types of tools, each providing items related to a single craft. Proficiency with a set of artisan's tools lets you add your proficiency bonus to any ability checks you make using the tools in your craft. Each type of artisan's tools requires a separate proficiency." + ], + "url": "http://www.dnd5eapi.co/api/equipment/170" + }, + { + "index": 171, + "name": "Mason's tools", + "equipment_category": "Tools", + "tool_category": "Artisan's Tools", + "cost": { + "quantity": 10, + "unit": "gp" + }, + "weight": 8, + "desc": [ + "These special tools include the items needed to pursue a craft or trade. The table shows examples of the most common types of tools, each providing items related to a single craft. Proficiency with a set of artisan's tools lets you add your proficiency bonus to any ability checks you make using the tools in your craft. Each type of artisan's tools requires a separate proficiency." + ], + "url": "http://www.dnd5eapi.co/api/equipment/171" + }, + { + "index": 172, + "name": "Painter's supplies", + "equipment_category": "Tools", + "tool_category": "Artisan's Tools", + "cost": { + "quantity": 10, + "unit": "gp" + }, + "weight": 5, + "desc": [ + "These special tools include the items needed to pursue a craft or trade. The table shows examples of the most common types of tools, each providing items related to a single craft. Proficiency with a set of artisan's tools lets you add your proficiency bonus to any ability checks you make using the tools in your craft. Each type of artisan's tools requires a separate proficiency." + ], + "url": "http://www.dnd5eapi.co/api/equipment/172" + }, + { + "index": 173, + "name": "Potter's tools", + "equipment_category": "Tools", + "tool_category": "Artisan's Tools", + "cost": { + "quantity": 10, + "unit": "gp" + }, + "weight": 3, + "desc": [ + "These special tools include the items needed to pursue a craft or trade. The table shows examples of the most common types of tools, each providing items related to a single craft. Proficiency with a set of artisan's tools lets you add your proficiency bonus to any ability checks you make using the tools in your craft. Each type of artisan's tools requires a separate proficiency." + ], + "url": "http://www.dnd5eapi.co/api/equipment/173" + }, + { + "index": 174, + "name": "Smith's tools", + "equipment_category": "Tools", + "tool_category": "Artisan's Tools", + "cost": { + "quantity": 20, + "unit": "gp" + }, + "weight": 8, + "desc": [ + "These special tools include the items needed to pursue a craft or trade. The table shows examples of the most common types of tools, each providing items related to a single craft. Proficiency with a set of artisan's tools lets you add your proficiency bonus to any ability checks you make using the tools in your craft. Each type of artisan's tools requires a separate proficiency." + ], + "url": "http://www.dnd5eapi.co/api/equipment/174" + }, + { + "index": 175, + "name": "Tinker's tools", + "equipment_category": "Tools", + "tool_category": "Artisan's Tools", + "cost": { + "quantity": 50, + "unit": "gp" + }, + "weight": 10, + "desc": [ + "These special tools include the items needed to pursue a craft or trade. The table shows examples of the most common types of tools, each providing items related to a single craft. Proficiency with a set of artisan's tools lets you add your proficiency bonus to any ability checks you make using the tools in your craft. Each type of artisan's tools requires a separate proficiency." + ], + "url": "http://www.dnd5eapi.co/api/equipment/175" + }, + { + "index": 176, + "name": "Weaver's tools", + "equipment_category": "Tools", + "tool_category": "Artisan's Tools", + "cost": { + "quantity": 1, + "unit": "gp" + }, + "weight": 5, + "desc": [ + "These special tools include the items needed to pursue a craft or trade. The table shows examples of the most common types of tools, each providing items related to a single craft. Proficiency with a set of artisan's tools lets you add your proficiency bonus to any ability checks you make using the tools in your craft. Each type of artisan's tools requires a separate proficiency." + ], + "url": "http://www.dnd5eapi.co/api/equipment/176" + }, + { + "index": 177, + "name": "Woodcarver's tools", + "equipment_category": "Tools", + "tool_category": "Artisan's Tools", + "cost": { + "quantity": 1, + "unit": "gp" + }, + "weight": 5, + "desc": [ + "These special tools include the items needed to pursue a craft or trade. The table shows examples of the most common types of tools, each providing items related to a single craft. Proficiency with a set of artisan's tools lets you add your proficiency bonus to any ability checks you make using the tools in your craft. Each type of artisan's tools requires a separate proficiency." + ], + "url": "http://www.dnd5eapi.co/api/equipment/177" + }, + { + "index": 178, + "name": "Dice set", + "equipment_category": "Tools", + "tool_category": "Gaming Sets", + "cost": { + "quantity": 1, + "unit": "sp" + }, + "weight": 0, + "desc": [ + "This item encompasses a wide range of game pieces, including dice and decks of cards (for games such as Three-Dragon Ante). A few common examples appear on the Tools table, but other kinds of gaming sets exist. If you are proficient with a gaming set, you can add your proficiency bonus to ability checks you make to play a game with that set. Each type of gaming set requires a separate proficiency." + ], + "url": "http://www.dnd5eapi.co/api/equipment/178" + }, + { + "index": 179, + "name": "Playing card set", + "equipment_category": "Tools", + "tool_category": "Gaming Sets", + "cost": { + "quantity": 5, + "unit": "sp" + }, + "weight": 0, + "desc": [ + "This item encompasses a wide range of game pieces, including dice and decks of cards (for games such as Three-Dragon Ante). A few common examples appear on the Tools table, but other kinds of gaming sets exist. If you are proficient with a gaming set, you can add your proficiency bonus to ability checks you make to play a game with that set. Each type of gaming set requires a separate proficiency." + ], + "url": "http://www.dnd5eapi.co/api/equipment/179" + }, + { + "index": 180, + "name": "Bagpipes", + "equipment_category": "Tools", + "tool_category": "Musical Instrument", + "cost": { + "quantity": 30, + "unit": "gp" + }, + "weight": 6, + "desc": [ + "Several of the most common types of musical instruments are shown on the table as examples. If you have proficiency with a given musical instrument, you can add your proficiency bonus to any ability checks you make to play music with the instrument. A bard can use a musical instrument as a spellcasting focus. Each type of musical instrument requires a separate proficiency." + ], + "url": "http://www.dnd5eapi.co/api/equipment/180" + }, + { + "index": 181, + "name": "Drum", + "equipment_category": "Tools", + "tool_category": "Musical Instrument", + "cost": { + "quantity": 6, + "unit": "gp" + }, + "weight": 3, + "desc": [ + "Several of the most common types of musical instruments are shown on the table as examples. If you have proficiency with a given musical instrument, you can add your proficiency bonus to any ability checks you make to play music with the instrument. A bard can use a musical instrument as a spellcasting focus. Each type of musical instrument requires a separate proficiency." + ], + "url": "http://www.dnd5eapi.co/api/equipment/181" + }, + { + "index": 182, + "name": "Dulcimer", + "equipment_category": "Tools", + "tool_category": "Musical Instrument", + "cost": { + "quantity": 25, + "unit": "gp" + }, + "weight": 10, + "desc": [ + "Several of the most common types of musical instruments are shown on the table as examples. If you have proficiency with a given musical instrument, you can add your proficiency bonus to any ability checks you make to play music with the instrument. A bard can use a musical instrument as a spellcasting focus. Each type of musical instrument requires a separate proficiency." + ], + "url": "http://www.dnd5eapi.co/api/equipment/182" + }, + { + "index": 183, + "name": "Flute", + "equipment_category": "Tools", + "tool_category": "Musical Instrument", + "cost": { + "quantity": 2, + "unit": "gp" + }, + "weight": 1, + "desc": [ + "Several of the most common types of musical instruments are shown on the table as examples. If you have proficiency with a given musical instrument, you can add your proficiency bonus to any ability checks you make to play music with the instrument. A bard can use a musical instrument as a spellcasting focus. Each type of musical instrument requires a separate proficiency." + ], + "url": "http://www.dnd5eapi.co/api/equipment/183" + }, + { + "index": 184, + "name": "Lute", + "equipment_category": "Tools", + "tool_category": "Musical Instrument", + "cost": { + "quantity": 35, + "unit": "gp" + }, + "weight": 2, + "desc": [ + "Several of the most common types of musical instruments are shown on the table as examples. If you have proficiency with a given musical instrument, you can add your proficiency bonus to any ability checks you make to play music with the instrument. A bard can use a musical instrument as a spellcasting focus. Each type of musical instrument requires a separate proficiency." + ], + "url": "http://www.dnd5eapi.co/api/equipment/184" + }, + { + "index": 185, + "name": "Lyre", + "equipment_category": "Tools", + "tool_category": "Musical Instrument", + "cost": { + "quantity": 30, + "unit": "gp" + }, + "weight": 2, + "desc": [ + "Several of the most common types of musical instruments are shown on the table as examples. If you have proficiency with a given musical instrument, you can add your proficiency bonus to any ability checks you make to play music with the instrument. A bard can use a musical instrument as a spellcasting focus. Each type of musical instrument requires a separate proficiency." + ], + "url": "http://www.dnd5eapi.co/api/equipment/185" + }, + { + "index": 186, + "name": "Horn", + "equipment_category": "Tools", + "tool_category": "Musical Instrument", + "cost": { + "quantity": 3, + "unit": "gp" + }, + "weight": 2, + "desc": [ + "Several of the most common types of musical instruments are shown on the table as examples. If you have proficiency with a given musical instrument, you can add your proficiency bonus to any ability checks you make to play music with the instrument. A bard can use a musical instrument as a spellcasting focus. Each type of musical instrument requires a separate proficiency." + ], + "url": "http://www.dnd5eapi.co/api/equipment/186" + }, + { + "index": 187, + "name": "Pan flute", + "equipment_category": "Tools", + "tool_category": "Musical Instrument", + "cost": { + "quantity": 12, + "unit": "gp" + }, + "weight": 2, + "desc": [ + "Several of the most common types of musical instruments are shown on the table as examples. If you have proficiency with a given musical instrument, you can add your proficiency bonus to any ability checks you make to play music with the instrument. A bard can use a musical instrument as a spellcasting focus. Each type of musical instrument requires a separate proficiency." + ], + "url": "http://www.dnd5eapi.co/api/equipment/187" + }, + { + "index": 188, + "name": "Shawm", + "equipment_category": "Tools", + "tool_category": "Musical Instrument", + "cost": { + "quantity": 2, + "unit": "gp" + }, + "weight": 1, + "desc": [ + "Several of the most common types of musical instruments are shown on the table as examples. If you have proficiency with a given musical instrument, you can add your proficiency bonus to any ability checks you make to play music with the instrument. A bard can use a musical instrument as a spellcasting focus. Each type of musical instrument requires a separate proficiency." + ], + "url": "http://www.dnd5eapi.co/api/equipment/188" + }, + { + "index": 189, + "name": "Viol", + "equipment_category": "Tools", + "tool_category": "Musical Instrument", + "cost": { + "quantity": 30, + "unit": "gp" + }, + "weight": 1, + "desc": [ + "Several of the most common types of musical instruments are shown on the table as examples. If you have proficiency with a given musical instrument, you can add your proficiency bonus to any ability checks you make to play music with the instrument. A bard can use a musical instrument as a spellcasting focus. Each type of musical instrument requires a separate proficiency." + ], + "url": "http://www.dnd5eapi.co/api/equipment/189" + }, + { + "index": 190, + "name": "Navigator's tools", + "equipment_category": "Tools", + "tool_category": "Other Tools", + "cost": { + "quantity": 25, + "unit": "gp" + }, + "weight": 2, + "desc": [ + "This set of instruments is used for navigation at sea. Proficiency with navigator's tools lets you chart a ship's course and follow navigation charts. In addition, these tools allow you to add your proficiency bonus to any ability check you make to avoid getting lost at sea." + ], + "url": "http://www.dnd5eapi.co/api/equipment/190" + }, + { + "index": 191, + "name": "Thieves' tools", + "equipment_category": "Tools", + "tool_category": "Other Tools", + "cost": { + "quantity": 25, + "unit": "gp" + }, + "weight": 1, + "desc": [ + "This set of tools includes a small file, a set of lock picks, a small mirror mounted on a metal handle, a set of narrow-bladed scissors, and a pair of pliers. Proficiency with these tools lets you add your proficiency bonus to any ability checks you make to disarm traps or open locks." + ], + "url": "http://www.dnd5eapi.co/api/equipment/191" + } +] diff --git a/SessionCompanion/SessionCompanion.Database/JsonData/weapons.json b/SessionCompanion/SessionCompanion.Database/JsonData/weapons.json new file mode 100644 index 0000000..b0caae9 --- /dev/null +++ b/SessionCompanion/SessionCompanion.Database/JsonData/weapons.json @@ -0,0 +1,1450 @@ +[ + { + "_id": "5bce91275b7768e792017da3", + "index": 1, + "name": "Club", + "equipment_category": "Weapon", + "weapon_category:": "Simple", + "weapon_range": "Melee", + "category_range": "Simple Melee", + "cost": { + "quantity": 1, + "unit": "sp" + }, + "damage": { + "dice_count": 1, + "dice_value": 4, + "damage_type": { + "url": "http://www.dnd5eapi.co/api/damage-types/2", + "name": "Bludgeoning" + } + }, + "range": { + "normal": 5, + "_long": null + }, + "weight": 2, + "properties": [ + { + "name": "Light", + "url": "http://www.dnd5eapi.co/api/weapon-properties/4" + }, + { + "name": "Monk", + "url": "http://www.dnd5eapi.co/api/weapon-properties/11" + } + ], + "url": "http://www.dnd5eapi.co/api/equipment/1" + }, + { + "_id": "5bce91275b7768e792017da1", + "index": 2, + "name": "Dagger", + "equipment_category": "Weapon", + "weapon_category:": "Simple", + "weapon_range": "Melee", + "category_range": "Simple Melee", + "cost": { + "quantity": 2, + "unit": "gp" + }, + "damage": { + "dice_count": 1, + "dice_value": 4, + "damage_type": { + "url": "http://www.dnd5eapi.co/api/damage-types/8", + "name": "Piercing" + } + }, + "range": { + "normal": 5, + "_long": null + }, + "weight": 1, + "properties": [ + { + "name": "Finesse", + "url": "http://www.dnd5eapi.co/api/weapon-properties/2" + }, + { + "name": "Light", + "url": "http://www.dnd5eapi.co/api/weapon-properties/4" + }, + { + "name": "Thrown", + "url": "http://www.dnd5eapi.co/api/weapon-properties/8" + }, + { + "name": "Monk", + "url": "http://www.dnd5eapi.co/api/weapon-properties/11" + } + ], + "throw_range": { + "normal": 20, + "_long": 60 + }, + "url": "http://www.dnd5eapi.co/api/equipment/2" + }, + { + "_id": "5bce91275b7768e792017db1", + "index": 3, + "name": "Greatclub", + "equipment_category": "Weapon", + "weapon_category:": "Simple", + "weapon_range": "Melee", + "category_range": "Simple Melee", + "cost": { + "quantity": 2, + "unit": "sp" + }, + "damage": { + "dice_count": 1, + "dice_value": 8, + "damage_type": { + "url": "http://www.dnd5eapi.co/api/damage-types/2", + "name": "Bludgeoning" + } + }, + "range": { + "normal": 5, + "_long": null + }, + "weight": 10, + "properties": [ + { + "name": "Two-Handed", + "url": "http://www.dnd5eapi.co/api/weapon-properties/9" + } + ], + "url": "http://www.dnd5eapi.co/api/equipment/3" + }, + { + "_id": "5bce91275b7768e792017da6", + "index": 4, + "name": "Handaxe", + "equipment_category": "Weapon", + "weapon_category:": "Simple", + "weapon_range": "Melee", + "category_range": "Simple Melee", + "cost": { + "quantity": 5, + "unit": "gp" + }, + "damage": { + "dice_count": 1, + "dice_value": 6, + "damage_type": { + "url": "http://www.dnd5eapi.co/api/damage-types/12", + "name": "Slashing" + } + }, + "range": { + "normal": 5, + "_long": null + }, + "weight": 2, + "properties": [ + { + "name": "Light", + "url": "http://www.dnd5eapi.co/api/weapon-properties/4" + }, + { + "name": "Thrown", + "url": "http://www.dnd5eapi.co/api/weapon-properties/8" + }, + { + "name": "Monk", + "url": "http://www.dnd5eapi.co/api/weapon-properties/11" + } + ], + "throw_range": { + "normal": 20, + "_long": 60 + }, + "url": "http://www.dnd5eapi.co/api/equipment/4" + }, + { + "_id": "5bce91275b7768e792017da2", + "index": 5, + "name": "Javelin", + "equipment_category": "Weapon", + "weapon_category:": "Simple", + "weapon_range": "Melee", + "category_range": "Simple Melee", + "cost": { + "quantity": 5, + "unit": "sp" + }, + "damage": { + "dice_count": 1, + "dice_value": 6, + "damage_type": { + "url": "http://www.dnd5eapi.co/api/damage-types/8", + "name": "Piercing" + } + }, + "range": { + "normal": 5, + "_long": null + }, + "weight": 2, + "properties": [ + { + "name": "Thrown", + "url": "http://www.dnd5eapi.co/api/weapon-properties/8" + }, + { + "name": "Monk", + "url": "http://www.dnd5eapi.co/api/weapon-properties/11" + } + ], + "throw_range": { + "normal": 30, + "_long": 120 + }, + "url": "http://www.dnd5eapi.co/api/equipment/5" + }, + { + "_id": "5bce91275b7768e792017da4", + "index": 6, + "name": "Light hammer", + "equipment_category": "Weapon", + "weapon_category:": "Simple", + "weapon_range": "Melee", + "category_range": "Simple Melee", + "cost": { + "quantity": 2, + "unit": "gp" + }, + "damage": { + "dice_count": 1, + "dice_value": 4, + "damage_type": { + "url": "http://www.dnd5eapi.co/api/damage-types/2", + "name": "Bludgeoning" + } + }, + "range": { + "normal": 5, + "_long": null + }, + "weight": 2, + "properties": [ + { + "name": "Light", + "url": "http://www.dnd5eapi.co/api/weapon-properties/4" + }, + { + "name": "Thrown", + "url": "http://www.dnd5eapi.co/api/weapon-properties/8" + }, + { + "name": "Monk", + "url": "http://www.dnd5eapi.co/api/weapon-properties/11" + } + ], + "throw_range": { + "normal": 20, + "_long": 60 + }, + "url": "http://www.dnd5eapi.co/api/equipment/6" + }, + { + "_id": "5bce91275b7768e792017da5", + "index": 7, + "name": "Mace", + "equipment_category": "Weapon", + "weapon_category:": "Simple", + "weapon_range": "Melee", + "category_range": "Simple Melee", + "cost": { + "quantity": 5, + "unit": "gp" + }, + "damage": { + "dice_count": 1, + "dice_value": 6, + "damage_type": { + "url": "http://www.dnd5eapi.co/api/damage-types/2", + "name": "Bludgeoning" + } + }, + "range": { + "normal": 5, + "_long": null + }, + "weight": 4, + "properties": [ + { + "name": "Monk", + "url": "http://www.dnd5eapi.co/api/weapon-properties/11" + } + ], + "url": "http://www.dnd5eapi.co/api/equipment/7" + }, + { + "_id": "5bce91275b7768e792017da8", + "index": 8, + "name": "Quarterstaff", + "equipment_category": "Weapon", + "weapon_category:": "Simple", + "weapon_range": "Melee", + "category_range": "Simple Melee", + "cost": { + "quantity": 2, + "unit": "sp" + }, + "damage": { + "dice_count": 1, + "dice_value": 6, + "damage_type": { + "url": "http://www.dnd5eapi.co/api/damage-types/2", + "name": "Bludgeoning" + } + }, + "range": { + "normal": 5, + "_long": null + }, + "weight": 4, + "properties": [ + { + "name": "Versatile", + "url": "http://www.dnd5eapi.co/api/weapon-properties/10" + }, + { + "name": "Monk", + "url": "http://www.dnd5eapi.co/api/weapon-properties/11" + } + ], + "two_hand_damage": { + "dice_count": 1, + "dice_value": 8, + "damage_type": { + "url": "http://www.dnd5eapi.co/api/damage-types/2", + "name": "Bludgeoning" + } + }, + "url": "http://www.dnd5eapi.co/api/equipment/8" + }, + { + "_id": "5bce91275b7768e792017da7", + "index": 9, + "name": "Sickle", + "equipment_category": "Weapon", + "weapon_category:": "Simple", + "weapon_range": "Melee", + "category_range": "Simple Melee", + "cost": { + "quantity": 1, + "unit": "gp" + }, + "damage": { + "dice_count": 1, + "dice_value": 4, + "damage_type": { + "url": "http://www.dnd5eapi.co/api/damage-types/12", + "name": "Slashing" + } + }, + "range": { + "normal": 5, + "_long": null + }, + "weight": 2, + "properties": [ + { + "name": "Light", + "url": "http://www.dnd5eapi.co/api/weapon-properties/4" + }, + { + "name": "Monk", + "url": "http://www.dnd5eapi.co/api/weapon-properties/11" + } + ], + "url": "http://www.dnd5eapi.co/api/equipment/9" + }, + { + "_id": "5bce91275b7768e792017da9", + "index": 10, + "name": "Spear", + "equipment_category": "Weapon", + "weapon_category:": "Simple", + "weapon_range": "Melee", + "category_range": "Simple Melee", + "cost": { + "quantity": 1, + "unit": "gp" + }, + "damage": { + "dice_count": 1, + "dice_value": 4, + "damage_type": { + "url": "http://www.dnd5eapi.co/api/damage-types/8", + "name": "Piercing" + } + }, + "range": { + "normal": 5, + "_long": null + }, + "weight": 3, + "properties": [ + { + "name": "Thrown", + "url": "http://www.dnd5eapi.co/api/weapon-properties/8" + }, + { + "name": "Versatile", + "url": "http://www.dnd5eapi.co/api/weapon-properties/10" + }, + { + "name": "Monk", + "url": "http://www.dnd5eapi.co/api/weapon-properties/11" + } + ], + "throw_range": { + "normal": 20, + "_long": 60 + }, + "two_hand_damage": { + "dice_count": 1, + "dice_value": 8, + "damage_type": { + "url": "http://www.dnd5eapi.co/api/damage-types/8", + "name": "Piercing" + } + }, + "url": "http://www.dnd5eapi.co/api/equipment/10" + }, + { + "_id": "5bce91275b7768e792017db0", + "index": 11, + "name": "Crossbow, light", + "equipment_category": "Weapon", + "weapon_category:": "Simple", + "weapon_range": "Ranged", + "category_range": "Simple Ranged", + "cost": { + "quantity": 25, + "unit": "gp" + }, + "damage": { + "dice_count": 1, + "dice_value": 8, + "damage_type": { + "url": "http://www.dnd5eapi.co/api/damage-types/8", + "name": "Piercing" + } + }, + "range": { + "normal": 5, + "_long": null + }, + "weight": 5, + "properties": [ + { + "name": "Ammunition", + "url": "http://www.dnd5eapi.co/api/weapon-properties/1" + }, + { + "name": "Loading", + "url": "http://www.dnd5eapi.co/api/weapon-properties/5" + }, + { + "name": "Two-Handed", + "url": "http://www.dnd5eapi.co/api/weapon-properties/9" + } + ], + "url": "http://www.dnd5eapi.co/api/equipment/11" + }, + { + "_id": "5bce91275b7768e792017dab", + "index": 12, + "name": "Dart", + "equipment_category": "Weapon", + "weapon_category:": "Simple", + "weapon_range": "Ranged", + "category_range": "Simple Ranged", + "cost": { + "quantity": 5, + "unit": "cp" + }, + "damage": { + "dice_count": 1, + "dice_value": 4, + "damage_type": { + "url": "http://www.dnd5eapi.co/api/damage-types/8", + "name": "Piercing" + } + }, + "range": { + "normal": 5, + "_long": null + }, + "weight": 0.25, + "properties": [ + { + "name": "Finesse", + "url": "http://www.dnd5eapi.co/api/weapon-properties/2" + }, + { + "name": "Thrown", + "url": "http://www.dnd5eapi.co/api/weapon-properties/8" + } + ], + "throw_range": { + "normal": 20, + "_long": 60 + }, + "url": "http://www.dnd5eapi.co/api/equipment/12" + }, + { + "_id": "5bce91275b7768e792017daa", + "index": 13, + "name": "Shortbow", + "equipment_category": "Weapon", + "weapon_category:": "Simple", + "weapon_range": "Ranged", + "category_range": "Simple Ranged", + "cost": { + "quantity": 25, + "unit": "gp" + }, + "damage": { + "dice_count": 1, + "dice_value": 6, + "damage_type": { + "url": "http://www.dnd5eapi.co/api/damage-types/8", + "name": "Piercing" + } + }, + "range": { + "normal": 5, + "_long": null + }, + "weight": 2, + "properties": [ + { + "name": "Ammunition", + "url": "http://www.dnd5eapi.co/api/weapon-properties/1" + }, + { + "name": "Two-Handed", + "url": "http://www.dnd5eapi.co/api/weapon-properties/9" + } + ], + "url": "http://www.dnd5eapi.co/api/equipment/13" + }, + { + "_id": "5bce91275b7768e792017dac", + "index": 14, + "name": "Sling", + "equipment_category": "Weapon", + "weapon_category:": "Simple", + "weapon_range": "Ranged", + "category_range": "Simple Ranged", + "cost": { + "quantity": 1, + "unit": "sp" + }, + "damage": { + "dice_count": 1, + "dice_value": 4, + "damage_type": { + "url": "http://www.dnd5eapi.co/api/damage-types/2", + "name": "Bludgeoning" + } + }, + "range": { + "normal": 5, + "_long": null + }, + "weight": 0, + "properties": [ + { + "name": "Ammunition", + "url": "http://www.dnd5eapi.co/api/weapon-properties/1" + } + ], + "url": "http://www.dnd5eapi.co/api/equipment/14" + }, + { + "_id": "5bce91275b7768e792017dad", + "index": 15, + "name": "Battleaxe", + "equipment_category": "Weapon", + "weapon_category:": "Martial", + "weapon_range": "Melee", + "category_range": "Martial Melee", + "cost": { + "quantity": 10, + "unit": "gp" + }, + "damage": { + "dice_count": 1, + "dice_value": 8, + "damage_type": { + "url": "http://www.dnd5eapi.co/api/damage-types/12", + "name": "Slashing" + } + }, + "range": { + "normal": 5, + "_long": null + }, + "weight": 4, + "properties": [ + { + "name": "Versatile", + "url": "http://www.dnd5eapi.co/api/weapon-properties/10" + } + ], + "two_hand_damage": { + "dice_count": 1, + "dice_value": 10, + "damage_type": { + "url": "http://www.dnd5eapi.co/api/damage-types/12", + "name": "Slashing" + } + }, + "url": "http://www.dnd5eapi.co/api/equipment/15" + }, + { + "_id": "5bce91275b7768e792017dae", + "index": 16, + "name": "Flail", + "equipment_category": "Weapon", + "weapon_category:": "Martial", + "weapon_range": "Melee", + "category_range": "Martial Melee", + "cost": { + "quantity": 10, + "unit": "gp" + }, + "damage": { + "dice_count": 1, + "dice_value": 8, + "damage_type": { + "url": "http://www.dnd5eapi.co/api/damage-types/2", + "name": "Bludgeoning" + } + }, + "range": { + "normal": 5, + "_long": null + }, + "weight": 2, + "properties": [], + "url": "http://www.dnd5eapi.co/api/equipment/16" + }, + { + "_id": "5bce91275b7768e792017daf", + "index": 17, + "name": "Glaive", + "equipment_category": "Weapon", + "weapon_category:": "Martial", + "weapon_range": "Melee", + "category_range": "Martial Melee", + "cost": { + "quantity": 20, + "unit": "gp" + }, + "damage": { + "dice_count": 1, + "dice_value": 10, + "damage_type": { + "url": "http://www.dnd5eapi.co/api/damage-types/12", + "name": "Slashing" + } + }, + "range": { + "normal": 5, + "_long": null + }, + "weight": 6, + "properties": [ + { + "name": "Heavy", + "url": "http://www.dnd5eapi.co/api/weapon-properties/3" + }, + { + "name": "Reach", + "url": "http://www.dnd5eapi.co/api/weapon-properties/6" + }, + { + "name": "Two-Handed", + "url": "http://www.dnd5eapi.co/api/weapon-properties/9" + } + ], + "url": "http://www.dnd5eapi.co/api/equipment/17" + }, + { + "_id": "5bce91275b7768e792017db3", + "index": 18, + "name": "Greataxe", + "equipment_category": "Weapon", + "weapon_category:": "Martial", + "weapon_range": "Melee", + "category_range": "Martial Melee", + "cost": { + "quantity": 30, + "unit": "gp" + }, + "damage": { + "dice_count": 1, + "dice_value": 12, + "damage_type": { + "url": "http://www.dnd5eapi.co/api/damage-types/12", + "name": "Slashing" + } + }, + "range": { + "normal": 5, + "_long": null + }, + "weight": 7, + "properties": [ + { + "name": "Heavy", + "url": "http://www.dnd5eapi.co/api/weapon-properties/3" + }, + { + "name": "Two-Handed", + "url": "http://www.dnd5eapi.co/api/weapon-properties/9" + } + ], + "url": "http://www.dnd5eapi.co/api/equipment/18" + }, + { + "_id": "5bce91275b7768e792017db2", + "index": 19, + "name": "Greatsword", + "equipment_category": "Weapon", + "weapon_category:": "Martial", + "weapon_range": "Melee", + "category_range": "Martial Melee", + "cost": { + "quantity": 50, + "unit": "gp" + }, + "damage": { + "dice_count": 2, + "dice_value": 6, + "damage_type": { + "url": "http://www.dnd5eapi.co/api/damage-types/12", + "name": "Slashing" + } + }, + "range": { + "normal": 5, + "_long": null + }, + "weight": 6, + "properties": [ + { + "name": "Heavy", + "url": "http://www.dnd5eapi.co/api/weapon-properties/3" + }, + { + "name": "Two-Handed", + "url": "http://www.dnd5eapi.co/api/weapon-properties/9" + } + ], + "url": "http://www.dnd5eapi.co/api/equipment/19" + }, + { + "_id": "5bce91275b7768e792017db4", + "index": 20, + "name": "Halberd", + "equipment_category": "Weapon", + "weapon_category:": "Martial", + "weapon_range": "Melee", + "category_range": "Martial Melee", + "cost": { + "quantity": 20, + "unit": "gp" + }, + "damage": { + "dice_count": 1, + "dice_value": 10, + "damage_type": { + "url": "http://www.dnd5eapi.co/api/damage-types/12", + "name": "Slashing" + } + }, + "range": { + "normal": 5, + "_long": null + }, + "weight": 6, + "properties": [ + { + "name": "Heavy", + "url": "http://www.dnd5eapi.co/api/weapon-properties/3" + }, + { + "name": "Reach", + "url": "http://www.dnd5eapi.co/api/weapon-properties/6" + }, + { + "name": "Two-Handed", + "url": "http://www.dnd5eapi.co/api/weapon-properties/9" + } + ], + "url": "http://www.dnd5eapi.co/api/equipment/20" + }, + { + "_id": "5bce91275b7768e792017db5", + "index": 21, + "name": "Lance", + "equipment_category": "Weapon", + "weapon_category:": "Martial", + "weapon_range": "Melee", + "category_range": "Martial Melee", + "cost": { + "quantity": 10, + "unit": "gp" + }, + "damage": { + "dice_count": 1, + "dice_value": 12, + "damage_type": { + "url": "http://www.dnd5eapi.co/api/damage-types/8", + "name": "Piercing" + } + }, + "range": { + "normal": 5, + "_long": null + }, + "weight": 6, + "properties": [ + { + "name": "Reach", + "url": "http://www.dnd5eapi.co/api/weapon-properties/6" + }, + { + "name": "Special", + "url": "http://www.dnd5eapi.co/api/weapon-properties/7" + } + ], + "special": [ + "You have disadvantage when you use a lance to attack a target within 5 feet of you. Also, a lance requires two hands to wield when you aren’t mounted." + ], + "url": "http://www.dnd5eapi.co/api/equipment/21" + }, + { + "_id": "5bce91275b7768e792017db6", + "index": 22, + "name": "Longsword", + "equipment_category": "Weapon", + "weapon_category:": "Martial", + "weapon_range": "Melee", + "category_range": "Martial Melee", + "cost": { + "quantity": 15, + "unit": "gp" + }, + "damage": { + "dice_count": 1, + "dice_value": 8, + "damage_type": { + "url": "http://www.dnd5eapi.co/api/damage-types/12", + "name": "Slashing" + } + }, + "range": { + "normal": 5, + "_long": null + }, + "weight": 3, + "properties": [ + { + "name": "Versatile", + "url": "http://www.dnd5eapi.co/api/weapon-properties/10" + } + ], + "two_hand_damage": { + "dice_count": 1, + "dice_value": 10, + "damage_type": { + "url": "http://www.dnd5eapi.co/api/damage-types/12", + "name": "Slashing" + } + }, + "url": "http://www.dnd5eapi.co/api/equipment/22" + }, + { + "_id": "5bce91275b7768e792017db7", + "index": 23, + "name": "Maul", + "equipment_category": "Weapon", + "weapon_category:": "Martial", + "weapon_range": "Melee", + "category_range": "Martial Melee", + "cost": { + "quantity": 10, + "unit": "gp" + }, + "damage": { + "dice_count": 2, + "dice_value": 6, + "damage_type": { + "url": "http://www.dnd5eapi.co/api/damage-types/2", + "name": "Bludgeoning" + } + }, + "range": { + "normal": 5, + "_long": null + }, + "weight": 10, + "properties": [ + { + "name": "Heavy", + "url": "http://www.dnd5eapi.co/api/weapon-properties/3" + }, + { + "name": "Two-Handed", + "url": "http://www.dnd5eapi.co/api/weapon-properties/9" + } + ], + "url": "http://www.dnd5eapi.co/api/equipment/23" + }, + { + "_id": "5bce91275b7768e792017dc4", + "index": 24, + "name": "Morningstar", + "equipment_category": "Weapon", + "weapon_category:": "Martial", + "weapon_range": "Melee", + "category_range": "Martial Melee", + "cost": { + "quantity": 15, + "unit": "gp" + }, + "damage": { + "dice_count": 1, + "dice_value": 8, + "damage_type": { + "url": "http://www.dnd5eapi.co/api/damage-types/8", + "name": "Piercing" + } + }, + "range": { + "normal": 5, + "_long": null + }, + "weight": 4, + "properties": [], + "url": "http://www.dnd5eapi.co/api/equipment/24" + }, + { + "_id": "5bce91275b7768e792017dbb", + "index": 25, + "name": "Pike", + "equipment_category": "Weapon", + "weapon_category:": "Martial", + "weapon_range": "Melee", + "category_range": "Martial Melee", + "cost": { + "quantity": 5, + "unit": "gp" + }, + "damage": { + "dice_count": 1, + "dice_value": 10, + "damage_type": { + "url": "http://www.dnd5eapi.co/api/damage-types/8", + "name": "Piercing" + } + }, + "range": { + "normal": 5, + "_long": null + }, + "weight": 18, + "properties": [ + { + "name": "Heavy", + "url": "http://www.dnd5eapi.co/api/weapon-properties/3" + }, + { + "name": "Reach", + "url": "http://www.dnd5eapi.co/api/weapon-properties/6" + }, + { + "name": "Two-Handed", + "url": "http://www.dnd5eapi.co/api/weapon-properties/9" + } + ], + "url": "http://www.dnd5eapi.co/api/equipment/25" + }, + { + "_id": "5bce91275b7768e792017db8", + "index": 26, + "name": "Rapier", + "equipment_category": "Weapon", + "weapon_category:": "Martial", + "weapon_range": "Melee", + "category_range": "Martial Melee", + "cost": { + "quantity": 25, + "unit": "gp" + }, + "damage": { + "dice_count": 1, + "dice_value": 8, + "damage_type": { + "url": "http://www.dnd5eapi.co/api/damage-types/8", + "name": "Piercing" + } + }, + "range": { + "normal": 5, + "_long": null + }, + "weight": 2, + "properties": [ + { + "name": "Finesse", + "url": "http://www.dnd5eapi.co/api/weapon-properties/2" + } + ], + "url": "http://www.dnd5eapi.co/api/equipment/26" + }, + { + "_id": "5bce91275b7768e792017db9", + "index": 27, + "name": "Scimitar", + "equipment_category": "Weapon", + "weapon_category:": "Martial", + "weapon_range": "Melee", + "category_range": "Martial Melee", + "cost": { + "quantity": 25, + "unit": "gp" + }, + "damage": { + "dice_count": 1, + "dice_value": 6, + "damage_type": { + "url": "http://www.dnd5eapi.co/api/damage-types/12", + "name": "Slashing" + } + }, + "range": { + "normal": 5, + "_long": null + }, + "weight": 3, + "properties": [ + { + "name": "Finesse", + "url": "http://www.dnd5eapi.co/api/weapon-properties/2" + }, + { + "name": "Light", + "url": "http://www.dnd5eapi.co/api/weapon-properties/4" + } + ], + "url": "http://www.dnd5eapi.co/api/equipment/27" + }, + { + "_id": "5bce91275b7768e792017dba", + "index": 28, + "name": "Shortsword", + "equipment_category": "Weapon", + "weapon_category:": "Martial", + "weapon_range": "Melee", + "category_range": "Martial Melee", + "cost": { + "quantity": 10, + "unit": "gp" + }, + "damage": { + "dice_count": 1, + "dice_value": 6, + "damage_type": { + "url": "http://www.dnd5eapi.co/api/damage-types/8", + "name": "Piercing" + } + }, + "range": { + "normal": 5, + "_long": null + }, + "weight": 2, + "properties": [ + { + "name": "Finesse", + "url": "http://www.dnd5eapi.co/api/weapon-properties/2" + }, + { + "name": "Light", + "url": "http://www.dnd5eapi.co/api/weapon-properties/4" + }, + { + "name": "Monk", + "url": "http://www.dnd5eapi.co/api/weapon-properties/11" + } + ], + "url": "http://www.dnd5eapi.co/api/equipment/28" + }, + { + "_id": "5bce91275b7768e792017dbc", + "index": 29, + "name": "Trident", + "equipment_category": "Weapon", + "weapon_category:": "Martial", + "weapon_range": "Melee", + "category_range": "Martial Melee", + "cost": { + "quantity": 5, + "unit": "gp" + }, + "damage": { + "dice_count": 1, + "dice_value": 6, + "damage_type": { + "url": "http://www.dnd5eapi.co/api/damage-types/12", + "name": "Slashing" + } + }, + "range": { + "normal": 5, + "_long": null + }, + "weight": 4, + "properties": [ + { + "name": "Thrown", + "url": "http://www.dnd5eapi.co/api/weapon-properties/8" + }, + { + "name": "Versatile", + "url": "http://www.dnd5eapi.co/api/weapon-properties/10" + } + ], + "throw_range": { + "normal": 20, + "_long": 60 + }, + "url": "http://www.dnd5eapi.co/api/equipment/29" + }, + { + "_id": "5bce91275b7768e792017dbd", + "index": 30, + "name": "War pick", + "equipment_category": "Weapon", + "weapon_category:": "Martial", + "weapon_range": "Melee", + "category_range": "Martial Melee", + "cost": { + "quantity": 5, + "unit": "gp" + }, + "damage": { + "dice_count": 1, + "dice_value": 8, + "damage_type": { + "url": "http://www.dnd5eapi.co/api/damage-types/8", + "name": "Piercing" + } + }, + "range": { + "normal": 5, + "_long": null + }, + "weight": 2, + "properties": [], + "url": "http://www.dnd5eapi.co/api/equipment/30" + }, + { + "_id": "5bce91275b7768e792017dbe", + "index": 31, + "name": "Warhammer", + "equipment_category": "Weapon", + "weapon_category:": "Martial", + "weapon_range": "Melee", + "category_range": "Martial Melee", + "cost": { + "quantity": 15, + "unit": "gp" + }, + "damage": { + "dice_count": 1, + "dice_value": 8, + "damage_type": { + "url": "http://www.dnd5eapi.co/api/damage-types/2", + "name": "Bludgeoning" + } + }, + "range": { + "normal": 5, + "_long": null + }, + "weight": 2, + "properties": [ + { + "name": "Versatile", + "url": "http://www.dnd5eapi.co/api/weapon-properties/10" + } + ], + "two_hand_damage": { + "dice_count": 1, + "dice_value": 10, + "damage_type": { + "url": "http://www.dnd5eapi.co/api/damage-types/2", + "name": "Bludgeoning" + } + }, + "url": "http://www.dnd5eapi.co/api/equipment/31" + }, + { + "_id": "5bce91275b7768e792017dbf", + "index": 32, + "name": "Whip", + "equipment_category": "Weapon", + "weapon_category:": "Martial", + "weapon_range": "Melee", + "category_range": "Martial Melee", + "cost": { + "quantity": 2, + "unit": "gp" + }, + "damage": { + "dice_count": 1, + "dice_value": 4, + "damage_type": { + "url": "http://www.dnd5eapi.co/api/damage-types/12", + "name": "Slashing" + } + }, + "range": { + "normal": 5, + "_long": null + }, + "weight": 3, + "properties": [ + { + "name": "Finesse", + "url": "http://www.dnd5eapi.co/api/weapon-properties/2" + }, + { + "name": "Reach", + "url": "http://www.dnd5eapi.co/api/weapon-properties/6" + } + ], + "url": "http://www.dnd5eapi.co/api/equipment/32" + }, + { + "_id": "5bce91275b7768e792017dc7", + "index": 33, + "name": "Blowgun", + "equipment_category": "Weapon", + "weapon_category:": "Martial", + "weapon_range": "Ranged", + "category_range": "Martial Ranged", + "cost": { + "quantity": 10, + "unit": "gp" + }, + "damage": { + "dice_count": 1, + "dice_value": 1, + "damage_type": { + "url": "http://www.dnd5eapi.co/api/damage-types/8", + "name": "Piercing" + } + }, + "range": { + "normal": 5, + "_long": null + }, + "weight": 1, + "properties": [ + { + "url": "http://www.dnd5eapi.co/api/weapon-properties/1", + "name": "Ammunition" + }, + { + "url": "http://www.dnd5eapi.co/api/weapon-properties/5", + "name": "Loading" + } + ], + "url": "http://www.dnd5eapi.co/api/equipment/33" + }, + { + "_id": "5bce91275b7768e792017dc0", + "index": 34, + "name": "Crossbow, hand", + "equipment_category": "Weapon", + "weapon_category:": "Martial", + "weapon_range": "Ranged", + "category_range": "Martial Ranged", + "cost": { + "quantity": 75, + "unit": "gp" + }, + "damage": { + "dice_count": 1, + "dice_value": 6, + "damage_type": { + "url": "http://www.dnd5eapi.co/api/damage-types/8", + "name": "Piercing" + } + }, + "range": { + "normal": 5, + "_long": null + }, + "weight": 3, + "properties": [ + { + "url": "http://www.dnd5eapi.co/api/weapon-properties/1", + "name": "Ammunition" + }, + { + "name": "Light", + "url": "http://www.dnd5eapi.co/api/weapon-properties/4" + }, + { + "url": "http://www.dnd5eapi.co/api/weapon-properties/5", + "name": "Loading" + } + ], + "url": "http://www.dnd5eapi.co/api/equipment/34" + }, + { + "_id": "5bce91275b7768e792017dc2", + "index": 35, + "name": "Crossbow, heavy", + "equipment_category": "Weapon", + "weapon_category:": "Martial", + "weapon_range": "Ranged", + "category_range": "Martial Ranged", + "cost": { + "quantity": 50, + "unit": "gp" + }, + "damage": { + "dice_count": 1, + "dice_value": 10, + "damage_type": { + "url": "http://www.dnd5eapi.co/api/damage-types/8", + "name": "Piercing" + } + }, + "range": { + "normal": 5, + "_long": null + }, + "weight": 18, + "properties": [ + { + "url": "http://www.dnd5eapi.co/api/weapon-properties/1", + "name": "Ammunition" + }, + { + "name": "Light", + "url": "http://www.dnd5eapi.co/api/weapon-properties/4" + }, + { + "url": "http://www.dnd5eapi.co/api/weapon-properties/5", + "name": "Loading" + }, + { + "name": "Two-Handed", + "url": "http://www.dnd5eapi.co/api/weapon-properties/9" + } + ], + "url": "http://www.dnd5eapi.co/api/equipment/35" + }, + { + "_id": "5bce91275b7768e792017dc1", + "index": 36, + "name": "Longbow", + "equipment_category": "Weapon", + "weapon_category:": "Martial", + "weapon_range": "Ranged", + "category_range": "Martial Ranged", + "cost": { + "quantity": 50, + "unit": "gp" + }, + "damage": { + "dice_count": 1, + "dice_value": 8, + "damage_type": { + "url": "http://www.dnd5eapi.co/api/damage-types/8", + "name": "Piercing" + } + }, + "range": { + "normal": 5, + "_long": null + }, + "weight": 2, + "properties": [ + { + "url": "http://www.dnd5eapi.co/api/weapon-properties/1", + "name": "Ammunition" + }, + { + "name": "Heavy", + "url": "http://www.dnd5eapi.co/api/weapon-properties/3" + }, + { + "name": "Two-Handed", + "url": "http://www.dnd5eapi.co/api/weapon-properties/9" + } + ], + "url": "http://www.dnd5eapi.co/api/equipment/36" + }, + { + "_id": "5bce91275b7768e792017dc6", + "index": 37, + "name": "Net", + "equipment_category": "Weapon", + "weapon_category:": "Martial", + "weapon_range": "Ranged", + "category_range": "Martial Ranged", + "cost": { + "quantity": 1, + "unit": "gp" + }, + "damage": { + "dice_count": 1, + "dice_value": 0, + "damage_type": { + "url": "http://www.dnd5eapi.co/api/damage-types/12", + "name": "Slashing" + } + }, + "range": { + "normal": 5, + "_long": null + }, + "weight": 3, + "properties": [ + { + "name": "Thrown", + "url": "http://www.dnd5eapi.co/api/weapon-properties/8" + }, + { + "name": "Special", + "url": "http://www.dnd5eapi.co/api/weapon-properties/7" + } + ], + "special": [ + "A Large or smaller creature hit by a net is restrained until it is freed. A net has no effect on creatures that are formless, or creatures that are Huge or larger. A creature can use its action to make a DC 10 Strength check, freeing itself or another creature within its reach on a success. Dealing 5 slashing damage to the net (AC 10) also frees the creature without harming it, ending the effect and destroying the net. When you use an action, bonus action, or reaction to attack with a net, you can make only one attack regardless of the number of attacks you can normally make." + ], + "throw_range": { + "normal": 5, + "_long": 15 + }, + "url": "http://www.dnd5eapi.co/api/equipment/37" + } +] \ No newline at end of file diff --git a/SessionCompanion/SessionCompanion.Database/Migrations/20201228114303_Class name fix.Designer.cs b/SessionCompanion/SessionCompanion.Database/Migrations/20201228114303_Class name fix.Designer.cs new file mode 100644 index 0000000..7bbd955 --- /dev/null +++ b/SessionCompanion/SessionCompanion.Database/Migrations/20201228114303_Class name fix.Designer.cs @@ -0,0 +1,838 @@ +// +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using SessionCompanion.Database; + +namespace SessionCompanion.Database.Migrations +{ + [DbContext(typeof(ApplicationDbContext))] + [Migration("20201228114303_Class name fix")] + partial class Classnamefix + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .UseIdentityColumns() + .HasAnnotation("Relational:MaxIdentifierLength", 128) + .HasAnnotation("ProductVersion", "5.0.0"); + + modelBuilder.Entity("SessionCompanion.Database.Tables.Alignment", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .UseIdentityColumn(); + + b.HasKey("Id"); + + b.ToTable("Alignments"); + + b.HasData( + new + { + Id = 1 + }, + new + { + Id = 2 + }, + new + { + Id = 3 + }); + }); + + modelBuilder.Entity("SessionCompanion.Database.Tables.Background", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .UseIdentityColumn(); + + b.HasKey("Id"); + + b.ToTable("Backgrounds"); + + b.HasData( + new + { + Id = 1 + }, + new + { + Id = 2 + }, + new + { + Id = 3 + }); + }); + + modelBuilder.Entity("SessionCompanion.Database.Tables.Biography", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .UseIdentityColumn(); + + b.Property("AlignmentId") + .HasColumnType("int"); + + b.Property("BackgroundId") + .HasColumnType("int"); + + b.Property("CharacterId") + .HasColumnType("int"); + + b.Property("ClassId") + .HasColumnType("int"); + + b.Property("Name") + .HasColumnType("nvarchar(max)"); + + b.Property("RaceId") + .HasColumnType("int"); + + b.Property("Sex") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("AlignmentId"); + + b.HasIndex("BackgroundId"); + + b.HasIndex("CharacterId") + .IsUnique(); + + b.HasIndex("ClassId"); + + b.HasIndex("RaceId"); + + b.ToTable("Biographies"); + + b.HasData( + new + { + Id = 1, + AlignmentId = 1, + BackgroundId = 1, + CharacterId = 1, + ClassId = 1, + Name = "Bob", + RaceId = 1, + Sex = "Male" + }, + new + { + Id = 2, + AlignmentId = 2, + BackgroundId = 2, + CharacterId = 2, + ClassId = 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.", + RaceId = 2, + Sex = "Female" + }, + new + { + Id = 3, + AlignmentId = 3, + BackgroundId = 3, + CharacterId = 3, + ClassId = 3, + Name = "Gandalf the White", + RaceId = 3, + Sex = "Both" + }); + }); + + modelBuilder.Entity("SessionCompanion.Database.Tables.Character", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .UseIdentityColumn(); + + b.Property("UserId") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("Characters"); + + b.HasData( + new + { + Id = 1, + UserId = 1 + }, + new + { + Id = 2, + UserId = 2 + }, + new + { + Id = 3, + UserId = 3 + }); + }); + + modelBuilder.Entity("SessionCompanion.Database.Tables.Charisma", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .UseIdentityColumn(); + + b.Property("CanDeception") + .HasColumnType("bit"); + + b.Property("CanIntimidation") + .HasColumnType("bit"); + + b.Property("CanPerformance") + .HasColumnType("bit"); + + b.Property("CanPersuasion") + .HasColumnType("bit"); + + b.Property("CanSaveThrows") + .HasColumnType("bit"); + + b.Property("CharacterId") + .HasColumnType("int"); + + b.Property("Deception") + .HasColumnType("int"); + + b.Property("Intimidation") + .HasColumnType("int"); + + b.Property("Modification") + .HasColumnType("int"); + + b.Property("Performance") + .HasColumnType("int"); + + b.Property("Persuasion") + .HasColumnType("int"); + + b.Property("SavingThrows") + .HasColumnType("int"); + + b.Property("Value") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CharacterId") + .IsUnique(); + + b.ToTable("Charismas"); + }); + + modelBuilder.Entity("SessionCompanion.Database.Tables.Class", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .UseIdentityColumn(); + + b.Property("Name") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("Classes"); + + b.HasData( + new + { + Id = 1, + Name = "Fighter" + }, + new + { + Id = 2, + Name = "Paladin" + }, + new + { + Id = 3, + Name = "Cleric" + }); + }); + + modelBuilder.Entity("SessionCompanion.Database.Tables.Constitution", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .UseIdentityColumn(); + + b.Property("CanSaveThrows") + .HasColumnType("bit"); + + b.Property("CharacterId") + .HasColumnType("int"); + + b.Property("Modification") + .HasColumnType("int"); + + b.Property("SavingThrows") + .HasColumnType("int"); + + b.Property("Value") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CharacterId") + .IsUnique(); + + b.ToTable("Constitutions"); + }); + + modelBuilder.Entity("SessionCompanion.Database.Tables.Dexterity", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .UseIdentityColumn(); + + b.Property("Acrobatics") + .HasColumnType("int"); + + b.Property("CanAcrobatics") + .HasColumnType("bit"); + + b.Property("CanSaveThrows") + .HasColumnType("bit"); + + b.Property("CanSleightOfHand") + .HasColumnType("bit"); + + b.Property("CanStealth") + .HasColumnType("bit"); + + b.Property("CharacterId") + .HasColumnType("int"); + + b.Property("Modification") + .HasColumnType("int"); + + b.Property("SavingThrows") + .HasColumnType("int"); + + b.Property("SleightOfHand") + .HasColumnType("int"); + + b.Property("Stealth") + .HasColumnType("int"); + + b.Property("Value") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CharacterId") + .IsUnique(); + + b.ToTable("Dexterities"); + }); + + modelBuilder.Entity("SessionCompanion.Database.Tables.Intelligence", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .UseIdentityColumn(); + + b.Property("Arcana") + .HasColumnType("int"); + + b.Property("CanArcana") + .HasColumnType("bit"); + + b.Property("CanHistory") + .HasColumnType("bit"); + + b.Property("CanInvestigation") + .HasColumnType("bit"); + + b.Property("CanNature") + .HasColumnType("bit"); + + b.Property("CanReligion") + .HasColumnType("bit"); + + b.Property("CanSaveThrows") + .HasColumnType("bit"); + + b.Property("CharacterId") + .HasColumnType("int"); + + b.Property("History") + .HasColumnType("int"); + + b.Property("Investigation") + .HasColumnType("int"); + + b.Property("Modification") + .HasColumnType("int"); + + b.Property("Nature") + .HasColumnType("int"); + + b.Property("Religion") + .HasColumnType("int"); + + b.Property("SavingThrows") + .HasColumnType("int"); + + b.Property("Value") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CharacterId") + .IsUnique(); + + b.ToTable("Intelligences"); + }); + + modelBuilder.Entity("SessionCompanion.Database.Tables.Race", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .UseIdentityColumn(); + + b.Property("Name") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("Races"); + + b.HasData( + new + { + Id = 1, + Name = "Human" + }, + new + { + Id = 2, + Name = "Dwarf" + }, + new + { + Id = 3, + Name = "Elf" + }); + }); + + modelBuilder.Entity("SessionCompanion.Database.Tables.Statistics", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .UseIdentityColumn(); + + b.Property("ArmorClass") + .HasColumnType("int"); + + b.Property("CharacterId") + .HasColumnType("int"); + + b.Property("CurrentHealthPoints") + .HasColumnType("int"); + + b.Property("ExperiencePoints") + .HasColumnType("int"); + + b.Property("HealthPoints") + .HasColumnType("int"); + + b.Property("Initiative") + .HasColumnType("int"); + + b.Property("Level") + .HasColumnType("int"); + + b.Property("Proficiency") + .HasColumnType("int"); + + b.Property("Speed") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CharacterId") + .IsUnique(); + + b.ToTable("Statistics"); + + b.HasData( + new + { + Id = 1, + ArmorClass = 9, + CharacterId = 1, + CurrentHealthPoints = 18, + ExperiencePoints = 2, + HealthPoints = 20, + Initiative = 12, + Level = 1, + Proficiency = 1, + Speed = 5 + }, + new + { + Id = 2, + ArmorClass = 12, + CharacterId = 2, + CurrentHealthPoints = 26, + ExperiencePoints = 0, + HealthPoints = 26, + Initiative = 7, + Level = 1, + Proficiency = 1, + Speed = 10 + }, + new + { + Id = 3, + ArmorClass = 2, + CharacterId = 3, + CurrentHealthPoints = 7, + ExperiencePoints = 24, + HealthPoints = 7, + Initiative = 18, + Level = 1, + Proficiency = 2, + Speed = 15 + }); + }); + + modelBuilder.Entity("SessionCompanion.Database.Tables.Strength", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .UseIdentityColumn(); + + b.Property("Athletics") + .HasColumnType("int"); + + b.Property("CanAthletics") + .HasColumnType("bit"); + + b.Property("CanSaveThrows") + .HasColumnType("bit"); + + b.Property("CharacterId") + .HasColumnType("int"); + + b.Property("Modification") + .HasColumnType("int"); + + b.Property("SavingThrows") + .HasColumnType("int"); + + b.Property("Value") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CharacterId") + .IsUnique(); + + b.ToTable("Strengths"); + }); + + modelBuilder.Entity("SessionCompanion.Database.Tables.User", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .UseIdentityColumn(); + + b.Property("Password") + .HasColumnType("nvarchar(max)"); + + b.Property("Username") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("Users"); + + b.HasData( + new + { + Id = 1, + Password = "123", + Username = "Morwiec" + }, + new + { + Id = 2, + Password = "123", + Username = "Cichoklepiec" + }, + new + { + Id = 3, + Password = "123", + Username = "Ruletka" + }); + }); + + modelBuilder.Entity("SessionCompanion.Database.Tables.Wisdom", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .UseIdentityColumn(); + + b.Property("AnimalHandling") + .HasColumnType("int"); + + b.Property("CanAnimalHandling") + .HasColumnType("bit"); + + b.Property("CanInsight") + .HasColumnType("bit"); + + b.Property("CanMedicine") + .HasColumnType("bit"); + + b.Property("CanPerception") + .HasColumnType("bit"); + + b.Property("CanSaveThrows") + .HasColumnType("bit"); + + b.Property("CanSurvival") + .HasColumnType("bit"); + + b.Property("CharacterId") + .HasColumnType("int"); + + b.Property("Insight") + .HasColumnType("int"); + + b.Property("Medicine") + .HasColumnType("int"); + + b.Property("Modification") + .HasColumnType("int"); + + b.Property("Perception") + .HasColumnType("int"); + + b.Property("SavingThrows") + .HasColumnType("int"); + + b.Property("Survival") + .HasColumnType("int"); + + b.Property("Value") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CharacterId") + .IsUnique(); + + b.ToTable("Wisdoms"); + }); + + modelBuilder.Entity("SessionCompanion.Database.Tables.Biography", b => + { + b.HasOne("SessionCompanion.Database.Tables.Alignment", "Alignment") + .WithMany("Biography") + .HasForeignKey("AlignmentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("SessionCompanion.Database.Tables.Background", "Background") + .WithMany("Biography") + .HasForeignKey("BackgroundId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("SessionCompanion.Database.Tables.Character", "Character") + .WithOne("Biography") + .HasForeignKey("SessionCompanion.Database.Tables.Biography", "CharacterId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("SessionCompanion.Database.Tables.Class", "Class") + .WithMany("Biography") + .HasForeignKey("ClassId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("SessionCompanion.Database.Tables.Race", "Race") + .WithMany("Biography") + .HasForeignKey("RaceId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Alignment"); + + b.Navigation("Background"); + + b.Navigation("Character"); + + b.Navigation("Class"); + + b.Navigation("Race"); + }); + + modelBuilder.Entity("SessionCompanion.Database.Tables.Character", b => + { + b.HasOne("SessionCompanion.Database.Tables.User", "User") + .WithMany("Character") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("User"); + }); + + modelBuilder.Entity("SessionCompanion.Database.Tables.Charisma", b => + { + b.HasOne("SessionCompanion.Database.Tables.Character", "Character") + .WithOne("Charisma") + .HasForeignKey("SessionCompanion.Database.Tables.Charisma", "CharacterId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Character"); + }); + + modelBuilder.Entity("SessionCompanion.Database.Tables.Constitution", b => + { + b.HasOne("SessionCompanion.Database.Tables.Character", "Character") + .WithOne("Constitution") + .HasForeignKey("SessionCompanion.Database.Tables.Constitution", "CharacterId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Character"); + }); + + modelBuilder.Entity("SessionCompanion.Database.Tables.Dexterity", b => + { + b.HasOne("SessionCompanion.Database.Tables.Character", "Character") + .WithOne("Dexterity") + .HasForeignKey("SessionCompanion.Database.Tables.Dexterity", "CharacterId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Character"); + }); + + modelBuilder.Entity("SessionCompanion.Database.Tables.Intelligence", b => + { + b.HasOne("SessionCompanion.Database.Tables.Character", "Character") + .WithOne("Intelligence") + .HasForeignKey("SessionCompanion.Database.Tables.Intelligence", "CharacterId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Character"); + }); + + modelBuilder.Entity("SessionCompanion.Database.Tables.Statistics", b => + { + b.HasOne("SessionCompanion.Database.Tables.Character", "Character") + .WithOne("Statistics") + .HasForeignKey("SessionCompanion.Database.Tables.Statistics", "CharacterId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Character"); + }); + + modelBuilder.Entity("SessionCompanion.Database.Tables.Strength", b => + { + b.HasOne("SessionCompanion.Database.Tables.Character", "Character") + .WithOne("Strength") + .HasForeignKey("SessionCompanion.Database.Tables.Strength", "CharacterId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Character"); + }); + + modelBuilder.Entity("SessionCompanion.Database.Tables.Wisdom", b => + { + b.HasOne("SessionCompanion.Database.Tables.Character", "Character") + .WithOne("Wisdom") + .HasForeignKey("SessionCompanion.Database.Tables.Wisdom", "CharacterId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Character"); + }); + + modelBuilder.Entity("SessionCompanion.Database.Tables.Alignment", b => + { + b.Navigation("Biography"); + }); + + modelBuilder.Entity("SessionCompanion.Database.Tables.Background", b => + { + b.Navigation("Biography"); + }); + + modelBuilder.Entity("SessionCompanion.Database.Tables.Character", b => + { + b.Navigation("Biography"); + + b.Navigation("Charisma"); + + b.Navigation("Constitution"); + + b.Navigation("Dexterity"); + + b.Navigation("Intelligence"); + + b.Navigation("Statistics"); + + b.Navigation("Strength"); + + b.Navigation("Wisdom"); + }); + + modelBuilder.Entity("SessionCompanion.Database.Tables.Class", b => + { + b.Navigation("Biography"); + }); + + modelBuilder.Entity("SessionCompanion.Database.Tables.Race", b => + { + b.Navigation("Biography"); + }); + + modelBuilder.Entity("SessionCompanion.Database.Tables.User", b => + { + b.Navigation("Character"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/SessionCompanion/SessionCompanion.Database/Migrations/20201228114303_Class name fix.cs b/SessionCompanion/SessionCompanion.Database/Migrations/20201228114303_Class name fix.cs new file mode 100644 index 0000000..c0633fa --- /dev/null +++ b/SessionCompanion/SessionCompanion.Database/Migrations/20201228114303_Class name fix.cs @@ -0,0 +1,55 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +namespace SessionCompanion.Database.Migrations +{ + public partial class Classnamefix : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.UpdateData( + table: "Classes", + keyColumn: "Id", + keyValue: 1, + column: "Name", + value: "Fighter"); + + migrationBuilder.UpdateData( + table: "Classes", + keyColumn: "Id", + keyValue: 2, + column: "Name", + value: "Paladin"); + + migrationBuilder.UpdateData( + table: "Classes", + keyColumn: "Id", + keyValue: 3, + column: "Name", + value: "Cleric"); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.UpdateData( + table: "Classes", + keyColumn: "Id", + keyValue: 1, + column: "Name", + value: "Warrior"); + + migrationBuilder.UpdateData( + table: "Classes", + keyColumn: "Id", + keyValue: 2, + column: "Name", + value: "Knight"); + + migrationBuilder.UpdateData( + table: "Classes", + keyColumn: "Id", + keyValue: 3, + column: "Name", + value: "Priest"); + } + } +} diff --git a/SessionCompanion/SessionCompanion.Database/Migrations/20210102163136_weapons-added.Designer.cs b/SessionCompanion/SessionCompanion.Database/Migrations/20210102163136_weapons-added.Designer.cs new file mode 100644 index 0000000..d008253 --- /dev/null +++ b/SessionCompanion/SessionCompanion.Database/Migrations/20210102163136_weapons-added.Designer.cs @@ -0,0 +1,2974 @@ +// +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using SessionCompanion.Database; + +namespace SessionCompanion.Database.Migrations +{ + [DbContext(typeof(ApplicationDbContext))] + [Migration("20210102163136_weapons-added")] + partial class weaponsadded + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .UseIdentityColumns() + .HasAnnotation("Relational:MaxIdentifierLength", 128) + .HasAnnotation("ProductVersion", "5.0.0"); + + modelBuilder.Entity("SessionCompanion.Database.Tables.Alignment", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .UseIdentityColumn(); + + b.HasKey("Id"); + + b.ToTable("Alignments"); + + b.HasData( + new + { + Id = 1 + }, + new + { + Id = 2 + }, + new + { + Id = 3 + }); + }); + + modelBuilder.Entity("SessionCompanion.Database.Tables.Armor", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .UseIdentityColumn(); + + b.Property("ArmorClassBase") + .HasColumnType("nvarchar(max)"); + + b.Property("Category") + .HasColumnType("nvarchar(max)"); + + b.Property("Cost") + .HasColumnType("int"); + + b.Property("CurrencyType") + .HasColumnType("int"); + + b.Property("HaveDexterityBonus") + .HasColumnType("bit"); + + b.Property("HaveStealthDisadvantage") + .HasColumnType("bit"); + + b.Property("MinimumStrength") + .HasColumnType("int"); + + b.Property("Name") + .HasColumnType("nvarchar(max)"); + + b.Property("Weight") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("Armors"); + + b.HasData( + new + { + Id = 1, + ArmorClassBase = "11", + Category = "Light", + Cost = 5, + CurrencyType = 3, + HaveDexterityBonus = true, + HaveStealthDisadvantage = true, + MinimumStrength = 0, + Name = "Padded", + Weight = 8 + }, + new + { + Id = 2, + ArmorClassBase = "11", + Category = "Light", + Cost = 10, + CurrencyType = 3, + HaveDexterityBonus = true, + HaveStealthDisadvantage = false, + MinimumStrength = 0, + Name = "Leather", + Weight = 10 + }, + new + { + Id = 3, + ArmorClassBase = "12", + Category = "Light", + Cost = 45, + CurrencyType = 3, + HaveDexterityBonus = true, + HaveStealthDisadvantage = false, + MinimumStrength = 0, + Name = "Studded Leather", + Weight = 13 + }, + new + { + Id = 4, + ArmorClassBase = "12", + Category = "Medium", + Cost = 10, + CurrencyType = 3, + HaveDexterityBonus = true, + HaveStealthDisadvantage = false, + MinimumStrength = 0, + Name = "Hide", + Weight = 12 + }, + new + { + Id = 5, + ArmorClassBase = "13", + Category = "Medium", + Cost = 50, + CurrencyType = 3, + HaveDexterityBonus = true, + HaveStealthDisadvantage = false, + MinimumStrength = 0, + Name = "Chain Shirt", + Weight = 20 + }, + new + { + Id = 6, + ArmorClassBase = "14", + Category = "Medium", + Cost = 50, + CurrencyType = 3, + HaveDexterityBonus = true, + HaveStealthDisadvantage = true, + MinimumStrength = 0, + Name = "Scale Mail", + Weight = 45 + }, + new + { + Id = 7, + ArmorClassBase = "14", + Category = "Medium", + Cost = 400, + CurrencyType = 3, + HaveDexterityBonus = true, + HaveStealthDisadvantage = false, + MinimumStrength = 0, + Name = "Breastplate", + Weight = 20 + }, + new + { + Id = 8, + ArmorClassBase = "15", + Category = "Medium", + Cost = 750, + CurrencyType = 3, + HaveDexterityBonus = true, + HaveStealthDisadvantage = true, + MinimumStrength = 0, + Name = "Half Plate", + Weight = 40 + }, + new + { + Id = 9, + ArmorClassBase = "14", + Category = "Heavy", + Cost = 30, + CurrencyType = 3, + HaveDexterityBonus = false, + HaveStealthDisadvantage = true, + MinimumStrength = 0, + Name = "Ring Mail", + Weight = 40 + }, + new + { + Id = 10, + ArmorClassBase = "16", + Category = "Heavy", + Cost = 75, + CurrencyType = 3, + HaveDexterityBonus = false, + HaveStealthDisadvantage = true, + MinimumStrength = 13, + Name = "Chain Mail", + Weight = 55 + }, + new + { + Id = 11, + ArmorClassBase = "17", + Category = "Heavy", + Cost = 200, + CurrencyType = 3, + HaveDexterityBonus = false, + HaveStealthDisadvantage = true, + MinimumStrength = 15, + Name = "Splint", + Weight = 60 + }, + new + { + Id = 12, + ArmorClassBase = "18", + Category = "Heavy", + Cost = 1500, + CurrencyType = 3, + HaveDexterityBonus = false, + HaveStealthDisadvantage = true, + MinimumStrength = 15, + Name = "Plate", + Weight = 65 + }, + new + { + Id = 13, + ArmorClassBase = "2", + Category = "Shield", + Cost = 10, + CurrencyType = 3, + HaveDexterityBonus = false, + HaveStealthDisadvantage = false, + MinimumStrength = 0, + Name = "Shield", + Weight = 6 + }); + }); + + modelBuilder.Entity("SessionCompanion.Database.Tables.Background", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .UseIdentityColumn(); + + b.HasKey("Id"); + + b.ToTable("Backgrounds"); + + b.HasData( + new + { + Id = 1 + }, + new + { + Id = 2 + }, + new + { + Id = 3 + }); + }); + + modelBuilder.Entity("SessionCompanion.Database.Tables.Biography", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .UseIdentityColumn(); + + b.Property("AlignmentId") + .HasColumnType("int"); + + b.Property("BackgroundId") + .HasColumnType("int"); + + b.Property("CharacterId") + .HasColumnType("int"); + + b.Property("ClassId") + .HasColumnType("int"); + + b.Property("Name") + .HasColumnType("nvarchar(max)"); + + b.Property("RaceId") + .HasColumnType("int"); + + b.Property("Sex") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("AlignmentId"); + + b.HasIndex("BackgroundId"); + + b.HasIndex("CharacterId") + .IsUnique(); + + b.HasIndex("ClassId"); + + b.HasIndex("RaceId"); + + b.ToTable("Biographies"); + + b.HasData( + new + { + Id = 1, + AlignmentId = 1, + BackgroundId = 1, + CharacterId = 1, + ClassId = 1, + Name = "Bob", + RaceId = 1, + Sex = "Male" + }, + new + { + Id = 2, + AlignmentId = 2, + BackgroundId = 2, + CharacterId = 2, + ClassId = 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.", + RaceId = 2, + Sex = "Female" + }, + new + { + Id = 3, + AlignmentId = 3, + BackgroundId = 3, + CharacterId = 3, + ClassId = 3, + Name = "Gandalf the White", + RaceId = 3, + Sex = "Both" + }); + }); + + modelBuilder.Entity("SessionCompanion.Database.Tables.Character", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .UseIdentityColumn(); + + b.Property("UserId") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("Characters"); + + b.HasData( + new + { + Id = 1, + UserId = 1 + }, + new + { + Id = 2, + UserId = 2 + }, + new + { + Id = 3, + UserId = 3 + }); + }); + + modelBuilder.Entity("SessionCompanion.Database.Tables.CharacterArmor", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .UseIdentityColumn(); + + b.Property("ArmorId") + .HasColumnType("int"); + + b.Property("CharacterId") + .HasColumnType("int"); + + b.Property("InUse") + .HasColumnType("bit"); + + b.HasKey("Id"); + + b.HasIndex("ArmorId"); + + b.HasIndex("CharacterId"); + + b.ToTable("CharacterArmors"); + + b.HasData( + new + { + Id = 1, + ArmorId = 1, + CharacterId = 1, + InUse = true + }, + new + { + Id = 2, + ArmorId = 3, + CharacterId = 1, + InUse = false + }, + new + { + Id = 3, + ArmorId = 2, + CharacterId = 2, + InUse = true + }, + new + { + Id = 4, + ArmorId = 5, + CharacterId = 2, + InUse = false + }, + new + { + Id = 5, + ArmorId = 6, + CharacterId = 3, + InUse = true + }, + new + { + Id = 6, + ArmorId = 2, + CharacterId = 3, + InUse = false + }); + }); + + modelBuilder.Entity("SessionCompanion.Database.Tables.CharacterOtherEquipment", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .UseIdentityColumn(); + + b.Property("CharacterId") + .HasColumnType("int"); + + b.Property("OtherEquipmentId") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CharacterId"); + + b.HasIndex("OtherEquipmentId"); + + b.ToTable("CharacterOtherEquipment"); + + b.HasData( + new + { + Id = 1, + CharacterId = 1, + OtherEquipmentId = 1 + }, + new + { + Id = 2, + CharacterId = 1, + OtherEquipmentId = 3 + }, + new + { + Id = 3, + CharacterId = 2, + OtherEquipmentId = 2 + }, + new + { + Id = 4, + CharacterId = 2, + OtherEquipmentId = 5 + }, + new + { + Id = 5, + CharacterId = 3, + OtherEquipmentId = 6 + }, + new + { + Id = 6, + CharacterId = 3, + OtherEquipmentId = 2 + }); + }); + + modelBuilder.Entity("SessionCompanion.Database.Tables.CharacterWeapon", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .UseIdentityColumn(); + + b.Property("CharacterId") + .HasColumnType("int"); + + b.Property("HoldInLeftHand") + .HasColumnType("bit"); + + b.Property("HoldInRightHand") + .HasColumnType("bit"); + + b.Property("InUse") + .HasColumnType("bit"); + + b.Property("WeaponId") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CharacterId"); + + b.HasIndex("WeaponId"); + + b.ToTable("CharacterWeapons"); + + b.HasData( + new + { + Id = 1, + CharacterId = 1, + HoldInLeftHand = false, + HoldInRightHand = false, + InUse = false, + WeaponId = 1 + }, + new + { + Id = 2, + CharacterId = 1, + HoldInLeftHand = true, + HoldInRightHand = false, + InUse = true, + WeaponId = 4 + }, + new + { + Id = 3, + CharacterId = 2, + HoldInLeftHand = false, + HoldInRightHand = true, + InUse = true, + WeaponId = 2 + }, + new + { + Id = 4, + CharacterId = 2, + HoldInLeftHand = false, + HoldInRightHand = false, + InUse = false, + WeaponId = 8 + }, + new + { + Id = 5, + CharacterId = 3, + HoldInLeftHand = false, + HoldInRightHand = false, + InUse = false, + WeaponId = 9 + }, + new + { + Id = 7, + CharacterId = 3, + HoldInLeftHand = false, + HoldInRightHand = true, + InUse = true, + WeaponId = 7 + }); + }); + + modelBuilder.Entity("SessionCompanion.Database.Tables.Charisma", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .UseIdentityColumn(); + + b.Property("CanDeception") + .HasColumnType("bit"); + + b.Property("CanIntimidation") + .HasColumnType("bit"); + + b.Property("CanPerformance") + .HasColumnType("bit"); + + b.Property("CanPersuasion") + .HasColumnType("bit"); + + b.Property("CanSaveThrows") + .HasColumnType("bit"); + + b.Property("CharacterId") + .HasColumnType("int"); + + b.Property("Deception") + .HasColumnType("int"); + + b.Property("Intimidation") + .HasColumnType("int"); + + b.Property("Modification") + .HasColumnType("int"); + + b.Property("Performance") + .HasColumnType("int"); + + b.Property("Persuasion") + .HasColumnType("int"); + + b.Property("SavingThrows") + .HasColumnType("int"); + + b.Property("Value") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CharacterId") + .IsUnique(); + + b.ToTable("Charismas"); + }); + + modelBuilder.Entity("SessionCompanion.Database.Tables.Class", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .UseIdentityColumn(); + + b.Property("Name") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("Classes"); + + b.HasData( + new + { + Id = 1, + Name = "Fighter" + }, + new + { + Id = 2, + Name = "Paladin" + }, + new + { + Id = 3, + Name = "Cleric" + }); + }); + + modelBuilder.Entity("SessionCompanion.Database.Tables.Constitution", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .UseIdentityColumn(); + + b.Property("CanSaveThrows") + .HasColumnType("bit"); + + b.Property("CharacterId") + .HasColumnType("int"); + + b.Property("Modification") + .HasColumnType("int"); + + b.Property("SavingThrows") + .HasColumnType("int"); + + b.Property("Value") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CharacterId") + .IsUnique(); + + b.ToTable("Constitutions"); + }); + + modelBuilder.Entity("SessionCompanion.Database.Tables.Dexterity", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .UseIdentityColumn(); + + b.Property("Acrobatics") + .HasColumnType("int"); + + b.Property("CanAcrobatics") + .HasColumnType("bit"); + + b.Property("CanSaveThrows") + .HasColumnType("bit"); + + b.Property("CanSleightOfHand") + .HasColumnType("bit"); + + b.Property("CanStealth") + .HasColumnType("bit"); + + b.Property("CharacterId") + .HasColumnType("int"); + + b.Property("Modification") + .HasColumnType("int"); + + b.Property("SavingThrows") + .HasColumnType("int"); + + b.Property("SleightOfHand") + .HasColumnType("int"); + + b.Property("Stealth") + .HasColumnType("int"); + + b.Property("Value") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CharacterId") + .IsUnique(); + + b.ToTable("Dexterities"); + }); + + modelBuilder.Entity("SessionCompanion.Database.Tables.Intelligence", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .UseIdentityColumn(); + + b.Property("Arcana") + .HasColumnType("int"); + + b.Property("CanArcana") + .HasColumnType("bit"); + + b.Property("CanHistory") + .HasColumnType("bit"); + + b.Property("CanInvestigation") + .HasColumnType("bit"); + + b.Property("CanNature") + .HasColumnType("bit"); + + b.Property("CanReligion") + .HasColumnType("bit"); + + b.Property("CanSaveThrows") + .HasColumnType("bit"); + + b.Property("CharacterId") + .HasColumnType("int"); + + b.Property("History") + .HasColumnType("int"); + + b.Property("Investigation") + .HasColumnType("int"); + + b.Property("Modification") + .HasColumnType("int"); + + b.Property("Nature") + .HasColumnType("int"); + + b.Property("Religion") + .HasColumnType("int"); + + b.Property("SavingThrows") + .HasColumnType("int"); + + b.Property("Value") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CharacterId") + .IsUnique(); + + b.ToTable("Intelligences"); + }); + + modelBuilder.Entity("SessionCompanion.Database.Tables.OtherEquipment", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .UseIdentityColumn(); + + b.Property("Cost") + .HasColumnType("int"); + + b.Property("CurrencyType") + .HasColumnType("int"); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.Property("Name") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("OtherEquipment"); + + b.HasData( + new + { + Id = 1, + Cost = 2, + CurrencyType = 3, + Description = "", + Name = "Abacus" + }, + new + { + Id = 2, + Cost = 25, + CurrencyType = 3, + Description = " As an action, you can splash the contents of this vial onto a creature within 5 feet of you or throw the vial up to 20 feet, shattering it on impact. In either case, make a ranged attack against a creature or object, treating the acid as an improvised weapon. On a hit, the target takes 2d6 acid damage.", + Name = "Acid (vial)" + }, + new + { + Id = 3, + Cost = 50, + CurrencyType = 3, + Description = " This sticky, adhesive fluid ignites when exposed to air. As an action, you can throw this flask up to 20 feet, shattering it on impact. Make a ranged attack against a creature or object, treating the alchemist's fire as an improvised weapon. On a hit, the target takes 1d4 fire damage at the start of each of its turns. A creature can end this damage by using its action to make a DC 10 Dexterity check to extinguish the flames.", + Name = "Alchemist's fire (flask)" + }, + new + { + Id = 4, + Cost = 5, + CurrencyType = 0, + Description = "", + Name = "Arrow" + }, + new + { + Id = 5, + Cost = 2, + CurrencyType = 0, + Description = "", + Name = "Blowgun needle" + }, + new + { + Id = 6, + Cost = 5, + CurrencyType = 0, + Description = "", + Name = "Crossbow bolt" + }, + new + { + Id = 7, + Cost = 1, + CurrencyType = 0, + Description = "", + Name = "Sling bullet" + }, + new + { + Id = 8, + Cost = 5, + CurrencyType = 3, + Description = " A holy symbol is a representation of a god or pantheon. It might be an amulet depicting a symbol representing a deity, the same symbol carefully engraved or inlaid as an emblem on a shield, or a tiny box holding a fragment of a sacred relic. Appendix B lists the symbols commonly associated with many gods in the multiverse. A cleric or paladin can use a holy symbol as a spellcasting focus. To use the symbol in this way, the caster must hold it in hand, wear it visibly, or bear it on a shield.", + Name = "Amulet" + }, + new + { + Id = 9, + Cost = 50, + CurrencyType = 3, + Description = " A creature that drinks this vial of liquid gains advantage on saving throws against poison for 1 hour. It confers no benefit to undead or constructs.", + Name = "Antitoxin (vial)" + }, + new + { + Id = 10, + Cost = 10, + CurrencyType = 3, + Description = " An arcane focus is a special item--an orb, a crystal, a rod, a specially constructed staff, a wand-like length of wood, or some similar item--designed to channel the power of arcane spells. A sorcerer, warlock, or wizard can use such an item as a spellcasting focus.", + Name = "Crystal" + }, + new + { + Id = 11, + Cost = 20, + CurrencyType = 3, + Description = " An arcane focus is a special item--an orb, a crystal, a rod, a specially constructed staff, a wand-like length of wood, or some similar item--designed to channel the power of arcane spells. A sorcerer, warlock, or wizard can use such an item as a spellcasting focus.", + Name = "Orb" + }, + new + { + Id = 12, + Cost = 10, + CurrencyType = 3, + Description = " An arcane focus is a special item--an orb, a crystal, a rod, a specially constructed staff, a wand-like length of wood, or some similar item--designed to channel the power of arcane spells. A sorcerer, warlock, or wizard can use such an item as a spellcasting focus.", + Name = "Rod" + }, + new + { + Id = 13, + Cost = 5, + CurrencyType = 3, + Description = " An arcane focus is a special item--an orb, a crystal, a rod, a specially constructed staff, a wand-like length of wood, or some similar item--designed to channel the power of arcane spells. A sorcerer, warlock, or wizard can use such an item as a spellcasting focus.", + Name = "Staff" + }, + new + { + Id = 14, + Cost = 10, + CurrencyType = 3, + Description = " An arcane focus is a special item--an orb, a crystal, a rod, a specially constructed staff, a wand-like length of wood, or some similar item--designed to channel the power of arcane spells. A sorcerer, warlock, or wizard can use such an item as a spellcasting focus.", + Name = "Wand" + }, + new + { + Id = 15, + Cost = 2, + CurrencyType = 3, + Description = "", + Name = "Backpack" + }, + new + { + Id = 16, + Cost = 1, + CurrencyType = 3, + Description = " As an action, you can spill these tiny metal balls from their pouch to cover a level, square area that is 10 feet on a side. A creature moving across the covered area must succeed on a DC 10 Dexterity saving throw or fall prone. A creature moving through the area at half speed doesn't need to make the save.", + Name = "Ball bearings (bag of 1,000)" + }, + new + { + Id = 17, + Cost = 2, + CurrencyType = 3, + Description = "", + Name = "Barrel" + }, + new + { + Id = 18, + Cost = 4, + CurrencyType = 1, + Description = "", + Name = "Basket" + }, + new + { + Id = 19, + Cost = 1, + CurrencyType = 3, + Description = "", + Name = "Bedroll" + }, + new + { + Id = 20, + Cost = 1, + CurrencyType = 3, + Description = "", + Name = "Bell" + }, + new + { + Id = 21, + Cost = 5, + CurrencyType = 1, + Description = "", + Name = "Blanket" + }, + new + { + Id = 22, + Cost = 1, + CurrencyType = 3, + Description = " A set of pulleys with a cable threaded through them and a hook to attach to objects, a block and tackle allows you to hoist up to four times the weight you can normally lift.", + Name = "Block and tackle" + }, + new + { + Id = 23, + Cost = 25, + CurrencyType = 3, + Description = " A book might contain poetry, historical accounts, information pertaining to a particular field of lore, diagrams and notes on gnomish contraptions, or just about anything else that can be represented using text or pictures. A book of spells is a spellbook (described later in this section).", + Name = "Book" + }, + new + { + Id = 24, + Cost = 2, + CurrencyType = 3, + Description = "", + Name = "Bottle, glass" + }, + new + { + Id = 25, + Cost = 5, + CurrencyType = 0, + Description = "", + Name = "Bucket" + }, + new + { + Id = 26, + Cost = 5, + CurrencyType = 0, + Description = " As an action, you can spread a bag of caltrops to cover a square area that is 5 feet on a side. Any creature that enters the area must succeed on a DC 15 Dexterity saving throw or stop moving this turn and take 1 piercing damage. Taking this damage reduces the creature's walking speed by 10 feet until the creature regains at least 1 hit point. A creature moving through the area at half speed doesn't need to make the save.", + Name = "Caltrops" + }, + new + { + Id = 27, + Cost = 1, + CurrencyType = 0, + Description = " For 1 hour, a candle sheds bright light in a 5-foot radius and dim light for an additional 5 feet.", + Name = "Candle" + }, + new + { + Id = 28, + Cost = 1, + CurrencyType = 3, + Description = " This wooden case can hold up to twenty crossbow bolts.", + Name = "Case, crossbow bolt" + }, + new + { + Id = 29, + Cost = 1, + CurrencyType = 3, + Description = " This cylindrical leather case can hold up to ten rolled-up sheets of paper or five rolled-up sheets of parchment.", + Name = "Case, map or scroll" + }, + new + { + Id = 30, + Cost = 5, + CurrencyType = 3, + Description = " A chain has 10 hit points. It can be burst with a successful DC 20 Strength check.", + Name = "Chain (10 feet)" + }, + new + { + Id = 31, + Cost = 1, + CurrencyType = 0, + Description = "", + Name = "Chalk (1 piece)" + }, + new + { + Id = 32, + Cost = 5, + CurrencyType = 3, + Description = "", + Name = "Chest" + }, + new + { + Id = 33, + Cost = 5, + CurrencyType = 1, + Description = "", + Name = "Clothes, common" + }, + new + { + Id = 34, + Cost = 5, + CurrencyType = 3, + Description = "", + Name = "Clothes, costume" + }, + new + { + Id = 35, + Cost = 15, + CurrencyType = 3, + Description = "", + Name = "Clothes, fine" + }, + new + { + Id = 36, + Cost = 2, + CurrencyType = 3, + Description = "", + Name = "Clothes, traveler's" + }, + new + { + Id = 37, + Cost = 25, + CurrencyType = 3, + Description = " A component pouch is a small, watertight leather belt pouch that has compartments to hold all the material components and other special items you need to cast your spells, except for those components that have a specific cost (as indicated in a spell's description).", + Name = "Component pouch" + }, + new + { + Id = 38, + Cost = 2, + CurrencyType = 3, + Description = " Using a crowbar grants advantage to Strength checks where the crowbar's leverage can be applied.", + Name = "Crowbar" + }, + new + { + Id = 39, + Cost = 1, + CurrencyType = 3, + Description = " A druidic focus might be a sprig of mistletoe or holly, a wand or scepter made of yew or another special wood, a staff drawn whole out of a living tree, or a totem object incorporating feathers, fur, bones, and teeth from sacred animals. A druid can use such an object as a spellcasting focus.", + Name = "Sprig of mistletoe" + }, + new + { + Id = 40, + Cost = 1, + CurrencyType = 3, + Description = " A druidic focus might be a sprig of mistletoe or holly, a wand or scepter made of yew or another special wood, a staff drawn whole out of a living tree, or a totem object incorporating feathers, fur, bones, and teeth from sacred animals. A druid can use such an object as a spellcasting focus.", + Name = "Totem" + }, + new + { + Id = 41, + Cost = 5, + CurrencyType = 3, + Description = " A druidic focus might be a sprig of mistletoe or holly, a wand or scepter made of yew or another special wood, a staff drawn whole out of a living tree, or a totem object incorporating feathers, fur, bones, and teeth from sacred animals. A druid can use such an object as a spellcasting focus.", + Name = "Wooden staff" + }, + new + { + Id = 42, + Cost = 10, + CurrencyType = 3, + Description = " A druidic focus might be a sprig of mistletoe or holly, a wand or scepter made of yew or another special wood, a staff drawn whole out of a living tree, or a totem object incorporating feathers, fur, bones, and teeth from sacred animals. A druid can use such an object as a spellcasting focus.", + Name = "Yew wand" + }, + new + { + Id = 43, + Cost = 5, + CurrencyType = 3, + Description = " A holy symbol is a representation of a god or pantheon. It might be an amulet depicting a symbol representing a deity, the same symbol carefully engraved or inlaid as an emblem on a shield, or a tiny box holding a fragment of a sacred relic. Appendix B lists the symbols commonly associated with many gods in the multiverse. A cleric or paladin can use a holy symbol as a spellcasting focus. To use the symbol in this way, the caster must hold it in hand, wear it visibly, or bear it on a shield.", + Name = "Emblem" + }, + new + { + Id = 44, + Cost = 1, + CurrencyType = 3, + Description = " This kit includes a wooden rod, silken line, corkwood bobbers, steel hooks, lead sinkers, velvet lures, and narrow netting.", + Name = "Fishing tackle" + }, + new + { + Id = 45, + Cost = 2, + CurrencyType = 0, + Description = "", + Name = "Flask or tankard" + }, + new + { + Id = 46, + Cost = 2, + CurrencyType = 3, + Description = "", + Name = "Grappling hook" + }, + new + { + Id = 47, + Cost = 1, + CurrencyType = 3, + Description = "", + Name = "Hammer" + }, + new + { + Id = 48, + Cost = 2, + CurrencyType = 3, + Description = "", + Name = "Hammer, sledge" + }, + new + { + Id = 49, + Cost = 25, + CurrencyType = 3, + Description = " As an action, you can splash the contents of this flask onto a creature within 5 feet of you or throw it up to 20 feet, shattering it on impact. In either case, make a ranged attack against a target creature, treating the holy water as an improvised weapon. If the target is a fiend or undead, it takes 2d6 radiant damage. A cleric or paladin may create holy water by performing a special ritual. The ritual takes 1 hour to perform, uses 25 gp worth of powdered silver, and requires the caster to expend a 1st-level spell slot.", + Name = "Holy water (flask)" + }, + new + { + Id = 50, + Cost = 25, + CurrencyType = 3, + Description = "", + Name = "Hourglass" + }, + new + { + Id = 51, + Cost = 5, + CurrencyType = 3, + Description = " When you use your action to set it, this trap forms a saw-toothed steel ring that snaps shut when a creature steps on a pressure plate in the center. The trap is affixed by a heavy chain to an immobile object, such as a tree or a spike driven into the ground. A creature that steps on the plate must succeed on a DC 13 Dexterity saving throw or take 1d4 piercing damage and stop moving. Thereafter, until the creature breaks free of the trap, its movement is limited by the length of the chain (typically 3 feet long). A creature can use its action to make a DC 13 Strength check, freeing itself or another creature within its reach on a success. Each failed check deals 1 piercing damage to the trapped creature.", + Name = "Hunting trap" + }, + new + { + Id = 52, + Cost = 10, + CurrencyType = 3, + Description = "", + Name = "Ink (1 ounce bottle)" + }, + new + { + Id = 53, + Cost = 2, + CurrencyType = 0, + Description = "", + Name = "Ink pen" + }, + new + { + Id = 54, + Cost = 2, + CurrencyType = 0, + Description = "", + Name = "Jug or pitcher" + }, + new + { + Id = 55, + Cost = 25, + CurrencyType = 3, + Description = " A climber's kit includes special pitons, boot tips, gloves, and a harness. You can use the climber's kit as an action to anchor yourself; when you do, you can't fall more than 25 feet from the point where you anchored yourself, and you can't climb more than 25 feet away from that point without undoing the anchor.", + Name = "Climber's Kit" + }, + new + { + Id = 56, + Cost = 25, + CurrencyType = 3, + Description = " This pouch of cosmetics, hair dye, and small props lets you create disguises that change your physical appearance. Proficiency with this kit lets you add your proficiency bonus to any ability checks you make to create a visual disguise.", + Name = "Disguise Kit" + }, + new + { + Id = 57, + Cost = 15, + CurrencyType = 3, + Description = " This small box contains a variety of papers and parchments, pens and inks, seals and sealing wax, gold and silver leaf, and other supplies necessary to create convincing forgeries of physical documents. Proficiency with this kit lets you add your proficiency bonus to any ability checks you make to create a physical forgery of a document.", + Name = "Forgery Kit" + }, + new + { + Id = 58, + Cost = 5, + CurrencyType = 3, + Description = " This kit contains a variety of instruments such as clippers, mortar and pestle, and pouches and vials used by herbalists to create remedies and potions. Proficiency with this kit lets you add your proficiency bonus to any ability checks you make to identify or apply herbs. Also, proficiency with this kit is required to create antitoxin and potions of healing.", + Name = "Herbalism Kit" + }, + new + { + Id = 59, + Cost = 5, + CurrencyType = 3, + Description = " This kit is a leather pouch containing bandages, salves, and splints. The kit has ten uses. As an action, you can expend one use of the kit to stabilize a creature that has 0 hit points, without needing to make a Wisdom (Medicine) check.", + Name = "Healer's Kit" + }, + new + { + Id = 60, + Cost = 2, + CurrencyType = 1, + Description = " This tin box contains a cup and simple cutlery. The box clamps together, and one side can be used as a cooking pan and the other as a plate or shallow bowl.", + Name = "Mess Kit" + }, + new + { + Id = 61, + Cost = 50, + CurrencyType = 3, + Description = " A poisoner's kit includes the vials, chemicals, and other equipment necessary for the creation of poisons. Proficiency with this kit lets you add your proficiency bonus to any ability checks you make to craft or use poisons.", + Name = "Poisoner's Kit" + }, + new + { + Id = 62, + Cost = 1, + CurrencyType = 1, + Description = "", + Name = "Ladder (10-foot)" + }, + new + { + Id = 63, + Cost = 5, + CurrencyType = 1, + Description = " A lamp casts bright light in a 15-foot radius and dim light for an additional 30 feet. Once lit, it burns for 6 hours on a flask (1 pint) of oil.", + Name = "Lamp" + }, + new + { + Id = 64, + Cost = 10, + CurrencyType = 3, + Description = " A bullseye lantern casts bright light in a 60-foot cone and dim light for an additional 60 feet. Once lit, it burns for 6 hours on a flask (1 pint) of oil.", + Name = "Lantern, bullseye" + }, + new + { + Id = 65, + Cost = 5, + CurrencyType = 3, + Description = " A hooded lantern casts bright light in a 30-foot radius and dim light for an additional 30 feet. Once lit, it burns for 6 hours on a flask (1 pint) of oil. As an action, you can lower the hood, reducing the light to dim light in a 5-foot radius.", + Name = "Lantern, hooded" + }, + new + { + Id = 66, + Cost = 10, + CurrencyType = 3, + Description = " A key is provided with the lock. Without the key, a creature proficient with thieves' tools can pick this lock with a successful DC 15 Dexterity check. Your GM may decide that better locks are available for higher prices.", + Name = "Lock" + }, + new + { + Id = 67, + Cost = 100, + CurrencyType = 3, + Description = " This lens allows a closer look at small objects. It is also useful as a substitute for flint and steel when starting fires. Lighting a fire with a magnifying glass requires light as bright as sunlight to focus, tinder to ignite, and about 5 minutes for the fire to ignite. A magnifying glass grants advantage on any ability check made to appraise or inspect an item that is small or highly detailed.", + Name = "Magnifying glass" + }, + new + { + Id = 68, + Cost = 2, + CurrencyType = 3, + Description = " These metal restraints can bind a Small or Medium creature. Escaping the manacles requires a successful DC 20 Dexterity check. Breaking them requires a successful DC 20 Strength check. Each set of manacles comes with one key. Without the key, a creature proficient with thieves' tools can pick the manacles' lock with a successful DC 15 Dexterity check. Manacles have 15 hit points.", + Name = "Manacles" + }, + new + { + Id = 69, + Cost = 5, + CurrencyType = 3, + Description = "", + Name = "Mirror, steel" + }, + new + { + Id = 70, + Cost = 1, + CurrencyType = 1, + Description = " Oil usually comes in a clay flask that holds 1 pint. As an action, you can splash the oil in this flask onto a creature within 5 feet of you or throw it up to 20 feet, shattering it on impact. Make a ranged attack against a target creature or object, treating the oil as an improvised weapon. On a hit, the target is covered in oil. If the target takes any fire damage before the oil dries (after 1 minute), the target takes an additional 5 fire damage from the burning oil. You can also pour a flask of oil on the ground to cover a 5-foot-square area, provided that the surface is level. If lit, the oil burns for 2 rounds and deals 5 fire damage to any creature that enters the area or ends its turn in the area. A creature can take this damage only once per turn.", + Name = "Oil (flask)" + }, + new + { + Id = 71, + Cost = 2, + CurrencyType = 1, + Description = "", + Name = "Paper (one sheet)" + }, + new + { + Id = 72, + Cost = 1, + CurrencyType = 1, + Description = "", + Name = "Parchment (one sheet)" + }, + new + { + Id = 73, + Cost = 5, + CurrencyType = 3, + Description = "", + Name = "Perfume (vial)" + }, + new + { + Id = 74, + Cost = 2, + CurrencyType = 3, + Description = "", + Name = "Pick, miner's" + }, + new + { + Id = 75, + Cost = 5, + CurrencyType = 0, + Description = "", + Name = "Piton" + }, + new + { + Id = 76, + Cost = 100, + CurrencyType = 3, + Description = " You can use the poison in this vial to coat one slashing or piercing weapon or up to three pieces of ammunition. Applying the poison takes an action. A creature hit by the poisoned weapon or ammunition must make a DC 10 Constitution saving throw or take 1d4 poison damage. Once applied, the poison retains potency for 1 minute before drying.", + Name = "Poison, basic (vial)" + }, + new + { + Id = 77, + Cost = 5, + CurrencyType = 0, + Description = "", + Name = "Pole (10-foot)" + }, + new + { + Id = 78, + Cost = 2, + CurrencyType = 3, + Description = "", + Name = "Pot, iron" + }, + new + { + Id = 79, + Cost = 50, + CurrencyType = 3, + Description = " A character who drinks the magical red fluid in this vial regains 2d4 + 2 hit points. Drinking or administering a potion takes an action.", + Name = "Potion of healing" + }, + new + { + Id = 80, + Cost = 5, + CurrencyType = 1, + Description = " A cloth or leather pouch can hold up to 20 sling bullets or 50 blowgun needles, among other things. A compartmentalized pouch for holding spell components is called a component pouch (described earlier in this section).", + Name = "Pouch" + }, + new + { + Id = 81, + Cost = 1, + CurrencyType = 3, + Description = " A quiver can hold up to 20 arrows.", + Name = "Quiver" + }, + new + { + Id = 82, + Cost = 4, + CurrencyType = 3, + Description = " You can use a portable ram to break down doors. When doing so, you gain a +4 bonus on the Strength check. One other character can help you use the ram, giving you advantage on this check.", + Name = "Ram, portable" + }, + new + { + Id = 83, + Cost = 5, + CurrencyType = 1, + Description = " Rations consist of dry foods suitable for extended travel, including jerky, dried fruit, hardtack, and nuts.", + Name = "Rations (1 day)" + }, + new + { + Id = 84, + Cost = 5, + CurrencyType = 3, + Description = " A holy symbol is a representation of a god or pantheon. It might be an amulet depicting a symbol representing a deity, the same symbol carefully engraved or inlaid as an emblem on a shield, or a tiny box holding a fragment of a sacred relic. Appendix B lists the symbols commonly associated with many gods in the multiverse. A cleric or paladin can use a holy symbol as a spellcasting focus. To use the symbol in this way, the caster must hold it in hand, wear it visibly, or bear it on a shield.", + Name = "Reliquary" + }, + new + { + Id = 85, + Cost = 1, + CurrencyType = 3, + Description = "", + Name = "Robes" + }, + new + { + Id = 86, + Cost = 1, + CurrencyType = 3, + Description = " Rope, whether made of hemp or silk, has 2 hit points and can be burst with a DC 17 Strength check.", + Name = "Rope, hempen (50 feet)" + }, + new + { + Id = 87, + Cost = 10, + CurrencyType = 3, + Description = " Rope, whether made of hemp or silk, has 2 hit points and can be burst with a DC 17 Strength check.", + Name = "Rope, silk (50 feet)" + }, + new + { + Id = 88, + Cost = 1, + CurrencyType = 0, + Description = "", + Name = "Sack" + }, + new + { + Id = 89, + Cost = 5, + CurrencyType = 3, + Description = " A scale includes a small balance, pans, and a suitable assortment of weights up to 2 pounds. With it, you can measure the exact weight of small objects, such as raw precious metals or trade goods, to help determine their worth.", + Name = "Scale, merchant's" + }, + new + { + Id = 90, + Cost = 5, + CurrencyType = 1, + Description = "", + Name = "Sealing wax" + }, + new + { + Id = 91, + Cost = 2, + CurrencyType = 3, + Description = "", + Name = "Shovel" + }, + new + { + Id = 92, + Cost = 5, + CurrencyType = 0, + Description = "", + Name = "Signal whistle" + }, + new + { + Id = 93, + Cost = 5, + CurrencyType = 3, + Description = "", + Name = "Signet ring" + }, + new + { + Id = 94, + Cost = 2, + CurrencyType = 0, + Description = "", + Name = "Soap" + }, + new + { + Id = 95, + Cost = 50, + CurrencyType = 3, + Description = " Essential for wizards, a spellbook is a leather-bound tome with 100 blank vellum pages suitable for recording spells.", + Name = "Spellbook" + }, + new + { + Id = 96, + Cost = 1, + CurrencyType = 1, + Description = "", + Name = "Spike, iron" + }, + new + { + Id = 97, + Cost = 1000, + CurrencyType = 3, + Description = " Objects viewed through a spyglass are magnified to twice their size.", + Name = "Spyglass" + }, + new + { + Id = 98, + Cost = 2, + CurrencyType = 3, + Description = " A simple and portable canvas shelter, a tent sleeps two.", + Name = "Tent, two-person" + }, + new + { + Id = 99, + Cost = 5, + CurrencyType = 1, + Description = " This small container holds flint, fire steel, and tinder (usually dry cloth soaked in light oil) used to kindle a fire. Using it to light a torch--or anything else with abundant, exposed fuel--takes an action. Lighting any other fire takes 1 minute.", + Name = "Tinderbox" + }, + new + { + Id = 100, + Cost = 1, + CurrencyType = 0, + Description = " A torch burns for 1 hour, providing bright light in a 20-foot radius and dim light for an additional 20 feet. If you make a melee attack with a burning torch and hit, it deals 1 fire damage.", + Name = "Torch" + }, + new + { + Id = 101, + Cost = 1, + CurrencyType = 3, + Description = "", + Name = "Vial" + }, + new + { + Id = 102, + Cost = 2, + CurrencyType = 1, + Description = "", + Name = "Waterskin" + }, + new + { + Id = 103, + Cost = 1, + CurrencyType = 0, + Description = "", + Name = "Whetstone" + }, + new + { + Id = 104, + Cost = 16, + CurrencyType = 3, + Description = "", + Name = "Burglar's Pack" + }, + new + { + Id = 105, + Cost = 50, + CurrencyType = 3, + Description = " These special tools include the items needed to pursue a craft or trade. The table shows examples of the most common types of tools, each providing items related to a single craft. Proficiency with a set of artisan's tools lets you add your proficiency bonus to any ability checks you make using the tools in your craft. Each type of artisan's tools requires a separate proficiency.", + Name = "Alchemist's supplies" + }, + new + { + Id = 106, + Cost = 20, + CurrencyType = 3, + Description = " These special tools include the items needed to pursue a craft or trade. The table shows examples of the most common types of tools, each providing items related to a single craft. Proficiency with a set of artisan's tools lets you add your proficiency bonus to any ability checks you make using the tools in your craft. Each type of artisan's tools requires a separate proficiency.", + Name = "Brewer's supplies" + }, + new + { + Id = 107, + Cost = 10, + CurrencyType = 3, + Description = " These special tools include the items needed to pursue a craft or trade. The table shows examples of the most common types of tools, each providing items related to a single craft. Proficiency with a set of artisan's tools lets you add your proficiency bonus to any ability checks you make using the tools in your craft. Each type of artisan's tools requires a separate proficiency.", + Name = "Calligrapher's supplies" + }, + new + { + Id = 108, + Cost = 8, + CurrencyType = 3, + Description = " These special tools include the items needed to pursue a craft or trade. The table shows examples of the most common types of tools, each providing items related to a single craft. Proficiency with a set of artisan's tools lets you add your proficiency bonus to any ability checks you make using the tools in your craft. Each type of artisan's tools requires a separate proficiency.", + Name = "Carpenter's tools" + }, + new + { + Id = 109, + Cost = 15, + CurrencyType = 3, + Description = " These special tools include the items needed to pursue a craft or trade. The table shows examples of the most common types of tools, each providing items related to a single craft. Proficiency with a set of artisan's tools lets you add your proficiency bonus to any ability checks you make using the tools in your craft. Each type of artisan's tools requires a separate proficiency.", + Name = "Cartographer's tools" + }, + new + { + Id = 110, + Cost = 5, + CurrencyType = 3, + Description = " These special tools include the items needed to pursue a craft or trade. The table shows examples of the most common types of tools, each providing items related to a single craft. Proficiency with a set of artisan's tools lets you add your proficiency bonus to any ability checks you make using the tools in your craft. Each type of artisan's tools requires a separate proficiency.", + Name = "Cobbler's tools" + }, + new + { + Id = 111, + Cost = 1, + CurrencyType = 3, + Description = " These special tools include the items needed to pursue a craft or trade. The table shows examples of the most common types of tools, each providing items related to a single craft. Proficiency with a set of artisan's tools lets you add your proficiency bonus to any ability checks you make using the tools in your craft. Each type of artisan's tools requires a separate proficiency.", + Name = "Cook's utensils" + }, + new + { + Id = 112, + Cost = 30, + CurrencyType = 3, + Description = " These special tools include the items needed to pursue a craft or trade. The table shows examples of the most common types of tools, each providing items related to a single craft. Proficiency with a set of artisan's tools lets you add your proficiency bonus to any ability checks you make using the tools in your craft. Each type of artisan's tools requires a separate proficiency.", + Name = "Glassblower's tools" + }, + new + { + Id = 113, + Cost = 25, + CurrencyType = 3, + Description = " These special tools include the items needed to pursue a craft or trade. The table shows examples of the most common types of tools, each providing items related to a single craft. Proficiency with a set of artisan's tools lets you add your proficiency bonus to any ability checks you make using the tools in your craft. Each type of artisan's tools requires a separate proficiency.", + Name = "Jeweler's tools" + }, + new + { + Id = 114, + Cost = 5, + CurrencyType = 3, + Description = " These special tools include the items needed to pursue a craft or trade. The table shows examples of the most common types of tools, each providing items related to a single craft. Proficiency with a set of artisan's tools lets you add your proficiency bonus to any ability checks you make using the tools in your craft. Each type of artisan's tools requires a separate proficiency.", + Name = "Leatherworker's tools" + }, + new + { + Id = 115, + Cost = 10, + CurrencyType = 3, + Description = " These special tools include the items needed to pursue a craft or trade. The table shows examples of the most common types of tools, each providing items related to a single craft. Proficiency with a set of artisan's tools lets you add your proficiency bonus to any ability checks you make using the tools in your craft. Each type of artisan's tools requires a separate proficiency.", + Name = "Mason's tools" + }, + new + { + Id = 116, + Cost = 10, + CurrencyType = 3, + Description = " These special tools include the items needed to pursue a craft or trade. The table shows examples of the most common types of tools, each providing items related to a single craft. Proficiency with a set of artisan's tools lets you add your proficiency bonus to any ability checks you make using the tools in your craft. Each type of artisan's tools requires a separate proficiency.", + Name = "Painter's supplies" + }, + new + { + Id = 117, + Cost = 10, + CurrencyType = 3, + Description = " These special tools include the items needed to pursue a craft or trade. The table shows examples of the most common types of tools, each providing items related to a single craft. Proficiency with a set of artisan's tools lets you add your proficiency bonus to any ability checks you make using the tools in your craft. Each type of artisan's tools requires a separate proficiency.", + Name = "Potter's tools" + }, + new + { + Id = 118, + Cost = 20, + CurrencyType = 3, + Description = " These special tools include the items needed to pursue a craft or trade. The table shows examples of the most common types of tools, each providing items related to a single craft. Proficiency with a set of artisan's tools lets you add your proficiency bonus to any ability checks you make using the tools in your craft. Each type of artisan's tools requires a separate proficiency.", + Name = "Smith's tools" + }, + new + { + Id = 119, + Cost = 50, + CurrencyType = 3, + Description = " These special tools include the items needed to pursue a craft or trade. The table shows examples of the most common types of tools, each providing items related to a single craft. Proficiency with a set of artisan's tools lets you add your proficiency bonus to any ability checks you make using the tools in your craft. Each type of artisan's tools requires a separate proficiency.", + Name = "Tinker's tools" + }, + new + { + Id = 120, + Cost = 1, + CurrencyType = 3, + Description = " These special tools include the items needed to pursue a craft or trade. The table shows examples of the most common types of tools, each providing items related to a single craft. Proficiency with a set of artisan's tools lets you add your proficiency bonus to any ability checks you make using the tools in your craft. Each type of artisan's tools requires a separate proficiency.", + Name = "Weaver's tools" + }, + new + { + Id = 121, + Cost = 1, + CurrencyType = 3, + Description = " These special tools include the items needed to pursue a craft or trade. The table shows examples of the most common types of tools, each providing items related to a single craft. Proficiency with a set of artisan's tools lets you add your proficiency bonus to any ability checks you make using the tools in your craft. Each type of artisan's tools requires a separate proficiency.", + Name = "Woodcarver's tools" + }, + new + { + Id = 122, + Cost = 1, + CurrencyType = 1, + Description = " This item encompasses a wide range of game pieces, including dice and decks of cards (for games such as Three-Dragon Ante). A few common examples appear on the Tools table, but other kinds of gaming sets exist. If you are proficient with a gaming set, you can add your proficiency bonus to ability checks you make to play a game with that set. Each type of gaming set requires a separate proficiency.", + Name = "Dice set" + }, + new + { + Id = 123, + Cost = 5, + CurrencyType = 1, + Description = " This item encompasses a wide range of game pieces, including dice and decks of cards (for games such as Three-Dragon Ante). A few common examples appear on the Tools table, but other kinds of gaming sets exist. If you are proficient with a gaming set, you can add your proficiency bonus to ability checks you make to play a game with that set. Each type of gaming set requires a separate proficiency.", + Name = "Playing card set" + }, + new + { + Id = 124, + Cost = 30, + CurrencyType = 3, + Description = " Several of the most common types of musical instruments are shown on the table as examples. If you have proficiency with a given musical instrument, you can add your proficiency bonus to any ability checks you make to play music with the instrument. A bard can use a musical instrument as a spellcasting focus. Each type of musical instrument requires a separate proficiency.", + Name = "Bagpipes" + }, + new + { + Id = 125, + Cost = 6, + CurrencyType = 3, + Description = " Several of the most common types of musical instruments are shown on the table as examples. If you have proficiency with a given musical instrument, you can add your proficiency bonus to any ability checks you make to play music with the instrument. A bard can use a musical instrument as a spellcasting focus. Each type of musical instrument requires a separate proficiency.", + Name = "Drum" + }, + new + { + Id = 126, + Cost = 25, + CurrencyType = 3, + Description = " Several of the most common types of musical instruments are shown on the table as examples. If you have proficiency with a given musical instrument, you can add your proficiency bonus to any ability checks you make to play music with the instrument. A bard can use a musical instrument as a spellcasting focus. Each type of musical instrument requires a separate proficiency.", + Name = "Dulcimer" + }, + new + { + Id = 127, + Cost = 2, + CurrencyType = 3, + Description = " Several of the most common types of musical instruments are shown on the table as examples. If you have proficiency with a given musical instrument, you can add your proficiency bonus to any ability checks you make to play music with the instrument. A bard can use a musical instrument as a spellcasting focus. Each type of musical instrument requires a separate proficiency.", + Name = "Flute" + }, + new + { + Id = 128, + Cost = 35, + CurrencyType = 3, + Description = " Several of the most common types of musical instruments are shown on the table as examples. If you have proficiency with a given musical instrument, you can add your proficiency bonus to any ability checks you make to play music with the instrument. A bard can use a musical instrument as a spellcasting focus. Each type of musical instrument requires a separate proficiency.", + Name = "Lute" + }, + new + { + Id = 129, + Cost = 30, + CurrencyType = 3, + Description = " Several of the most common types of musical instruments are shown on the table as examples. If you have proficiency with a given musical instrument, you can add your proficiency bonus to any ability checks you make to play music with the instrument. A bard can use a musical instrument as a spellcasting focus. Each type of musical instrument requires a separate proficiency.", + Name = "Lyre" + }, + new + { + Id = 130, + Cost = 3, + CurrencyType = 3, + Description = " Several of the most common types of musical instruments are shown on the table as examples. If you have proficiency with a given musical instrument, you can add your proficiency bonus to any ability checks you make to play music with the instrument. A bard can use a musical instrument as a spellcasting focus. Each type of musical instrument requires a separate proficiency.", + Name = "Horn" + }, + new + { + Id = 131, + Cost = 12, + CurrencyType = 3, + Description = " Several of the most common types of musical instruments are shown on the table as examples. If you have proficiency with a given musical instrument, you can add your proficiency bonus to any ability checks you make to play music with the instrument. A bard can use a musical instrument as a spellcasting focus. Each type of musical instrument requires a separate proficiency.", + Name = "Pan flute" + }, + new + { + Id = 132, + Cost = 2, + CurrencyType = 3, + Description = " Several of the most common types of musical instruments are shown on the table as examples. If you have proficiency with a given musical instrument, you can add your proficiency bonus to any ability checks you make to play music with the instrument. A bard can use a musical instrument as a spellcasting focus. Each type of musical instrument requires a separate proficiency.", + Name = "Shawm" + }, + new + { + Id = 133, + Cost = 30, + CurrencyType = 3, + Description = " Several of the most common types of musical instruments are shown on the table as examples. If you have proficiency with a given musical instrument, you can add your proficiency bonus to any ability checks you make to play music with the instrument. A bard can use a musical instrument as a spellcasting focus. Each type of musical instrument requires a separate proficiency.", + Name = "Viol" + }, + new + { + Id = 134, + Cost = 25, + CurrencyType = 3, + Description = " This set of instruments is used for navigation at sea. Proficiency with navigator's tools lets you chart a ship's course and follow navigation charts. In addition, these tools allow you to add your proficiency bonus to any ability check you make to avoid getting lost at sea.", + Name = "Navigator's tools" + }, + new + { + Id = 135, + Cost = 25, + CurrencyType = 3, + Description = " This set of tools includes a small file, a set of lock picks, a small mirror mounted on a metal handle, a set of narrow-bladed scissors, and a pair of pliers. Proficiency with these tools lets you add your proficiency bonus to any ability checks you make to disarm traps or open locks.", + Name = "Thieves' tools" + }); + }); + + modelBuilder.Entity("SessionCompanion.Database.Tables.Race", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .UseIdentityColumn(); + + b.Property("Name") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("Races"); + + b.HasData( + new + { + Id = 1, + Name = "Human" + }, + new + { + Id = 2, + Name = "Dwarf" + }, + new + { + Id = 3, + Name = "Elf" + }); + }); + + modelBuilder.Entity("SessionCompanion.Database.Tables.Statistics", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .UseIdentityColumn(); + + b.Property("ArmorClass") + .HasColumnType("int"); + + b.Property("CharacterId") + .HasColumnType("int"); + + b.Property("CurrentHealthPoints") + .HasColumnType("int"); + + b.Property("ExperiencePoints") + .HasColumnType("int"); + + b.Property("HealthPoints") + .HasColumnType("int"); + + b.Property("Initiative") + .HasColumnType("int"); + + b.Property("Level") + .HasColumnType("int"); + + b.Property("Proficiency") + .HasColumnType("int"); + + b.Property("Speed") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CharacterId") + .IsUnique(); + + b.ToTable("Statistics"); + + b.HasData( + new + { + Id = 1, + ArmorClass = 9, + CharacterId = 1, + CurrentHealthPoints = 18, + ExperiencePoints = 2, + HealthPoints = 20, + Initiative = 12, + Level = 1, + Proficiency = 1, + Speed = 5 + }, + new + { + Id = 2, + ArmorClass = 12, + CharacterId = 2, + CurrentHealthPoints = 26, + ExperiencePoints = 0, + HealthPoints = 26, + Initiative = 7, + Level = 1, + Proficiency = 1, + Speed = 10 + }, + new + { + Id = 3, + ArmorClass = 2, + CharacterId = 3, + CurrentHealthPoints = 7, + ExperiencePoints = 24, + HealthPoints = 7, + Initiative = 18, + Level = 1, + Proficiency = 2, + Speed = 15 + }); + }); + + modelBuilder.Entity("SessionCompanion.Database.Tables.Strength", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .UseIdentityColumn(); + + b.Property("Athletics") + .HasColumnType("int"); + + b.Property("CanAthletics") + .HasColumnType("bit"); + + b.Property("CanSaveThrows") + .HasColumnType("bit"); + + b.Property("CharacterId") + .HasColumnType("int"); + + b.Property("Modification") + .HasColumnType("int"); + + b.Property("SavingThrows") + .HasColumnType("int"); + + b.Property("Value") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CharacterId") + .IsUnique(); + + b.ToTable("Strengths"); + }); + + modelBuilder.Entity("SessionCompanion.Database.Tables.User", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .UseIdentityColumn(); + + b.Property("Password") + .HasColumnType("nvarchar(max)"); + + b.Property("Username") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("Users"); + + b.HasData( + new + { + Id = 1, + Password = "123", + Username = "Morwiec" + }, + new + { + Id = 2, + Password = "123", + Username = "Cichoklepiec" + }, + new + { + Id = 3, + Password = "123", + Username = "Ruletka" + }); + }); + + modelBuilder.Entity("SessionCompanion.Database.Tables.Weapon", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .UseIdentityColumn(); + + b.Property("Cost") + .HasColumnType("int"); + + b.Property("CurrencyType") + .HasColumnType("int"); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.Property("DiceCount") + .HasColumnType("int"); + + b.Property("DiceValue") + .HasColumnType("int"); + + b.Property("Name") + .HasColumnType("nvarchar(max)"); + + b.Property("RangeLong") + .HasColumnType("int"); + + b.Property("RangeMeele") + .HasColumnType("int"); + + b.Property("RangeThrowLong") + .HasColumnType("int"); + + b.Property("RangeThrowNormal") + .HasColumnType("int"); + + b.Property("TwoHandDamageType") + .HasColumnType("nvarchar(max)"); + + b.Property("TwoHandDiceCount") + .HasColumnType("int"); + + b.Property("TwoHandDiceValue") + .HasColumnType("int"); + + b.Property("WeaponType") + .HasColumnType("nvarchar(max)"); + + b.Property("Weight") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("Weapons"); + + b.HasData( + new + { + Id = 1, + Cost = 1, + CurrencyType = 1, + DiceCount = 1, + DiceValue = 4, + Name = "Club", + RangeMeele = 5, + WeaponType = "Simple Melee", + Weight = 2 + }, + new + { + Id = 2, + Cost = 2, + CurrencyType = 3, + DiceCount = 1, + DiceValue = 4, + Name = "Dagger", + RangeMeele = 5, + RangeThrowLong = 60, + RangeThrowNormal = 20, + WeaponType = "Simple Melee", + Weight = 1 + }, + new + { + Id = 3, + Cost = 2, + CurrencyType = 1, + DiceCount = 1, + DiceValue = 8, + Name = "Greatclub", + RangeMeele = 5, + WeaponType = "Simple Melee", + Weight = 10 + }, + new + { + Id = 4, + Cost = 5, + CurrencyType = 3, + DiceCount = 1, + DiceValue = 6, + Name = "Handaxe", + RangeMeele = 5, + RangeThrowLong = 60, + RangeThrowNormal = 20, + WeaponType = "Simple Melee", + Weight = 2 + }, + new + { + Id = 5, + Cost = 5, + CurrencyType = 1, + DiceCount = 1, + DiceValue = 6, + Name = "Javelin", + RangeMeele = 5, + RangeThrowLong = 120, + RangeThrowNormal = 30, + WeaponType = "Simple Melee", + Weight = 2 + }, + new + { + Id = 6, + Cost = 2, + CurrencyType = 3, + DiceCount = 1, + DiceValue = 4, + Name = "Light hammer", + RangeMeele = 5, + RangeThrowLong = 60, + RangeThrowNormal = 20, + WeaponType = "Simple Melee", + Weight = 2 + }, + new + { + Id = 7, + Cost = 5, + CurrencyType = 3, + DiceCount = 1, + DiceValue = 6, + Name = "Mace", + RangeMeele = 5, + WeaponType = "Simple Melee", + Weight = 4 + }, + new + { + Id = 8, + Cost = 2, + CurrencyType = 1, + DiceCount = 1, + DiceValue = 6, + Name = "Quarterstaff", + RangeMeele = 5, + TwoHandDiceCount = 1, + TwoHandDiceValue = 8, + WeaponType = "Simple Melee", + Weight = 4 + }, + new + { + Id = 9, + Cost = 1, + CurrencyType = 3, + DiceCount = 1, + DiceValue = 4, + Name = "Sickle", + RangeMeele = 5, + WeaponType = "Simple Melee", + Weight = 2 + }, + new + { + Id = 10, + Cost = 1, + CurrencyType = 3, + DiceCount = 1, + DiceValue = 4, + Name = "Spear", + RangeMeele = 5, + RangeThrowLong = 60, + RangeThrowNormal = 20, + TwoHandDiceCount = 1, + TwoHandDiceValue = 8, + WeaponType = "Simple Melee", + Weight = 3 + }, + new + { + Id = 11, + Cost = 25, + CurrencyType = 3, + DiceCount = 1, + DiceValue = 8, + Name = "Crossbow, light", + RangeMeele = 5, + WeaponType = "Simple Ranged", + Weight = 5 + }, + new + { + Id = 12, + Cost = 5, + CurrencyType = 0, + DiceCount = 1, + DiceValue = 4, + Name = "Dart", + RangeMeele = 5, + RangeThrowLong = 60, + RangeThrowNormal = 20, + WeaponType = "Simple Ranged", + Weight = 0 + }, + new + { + Id = 13, + Cost = 25, + CurrencyType = 3, + DiceCount = 1, + DiceValue = 6, + Name = "Shortbow", + RangeMeele = 5, + WeaponType = "Simple Ranged", + Weight = 2 + }, + new + { + Id = 14, + Cost = 1, + CurrencyType = 1, + DiceCount = 1, + DiceValue = 4, + Name = "Sling", + RangeMeele = 5, + WeaponType = "Simple Ranged", + Weight = 0 + }, + new + { + Id = 15, + Cost = 10, + CurrencyType = 3, + DiceCount = 1, + DiceValue = 8, + Name = "Battleaxe", + RangeMeele = 5, + TwoHandDiceCount = 1, + TwoHandDiceValue = 10, + WeaponType = "Martial Melee", + Weight = 4 + }, + new + { + Id = 16, + Cost = 10, + CurrencyType = 3, + DiceCount = 1, + DiceValue = 8, + Name = "Flail", + RangeMeele = 5, + WeaponType = "Martial Melee", + Weight = 2 + }, + new + { + Id = 17, + Cost = 20, + CurrencyType = 3, + DiceCount = 1, + DiceValue = 10, + Name = "Glaive", + RangeMeele = 5, + WeaponType = "Martial Melee", + Weight = 6 + }, + new + { + Id = 18, + Cost = 30, + CurrencyType = 3, + DiceCount = 1, + DiceValue = 12, + Name = "Greataxe", + RangeMeele = 5, + WeaponType = "Martial Melee", + Weight = 7 + }, + new + { + Id = 19, + Cost = 50, + CurrencyType = 3, + DiceCount = 2, + DiceValue = 6, + Name = "Greatsword", + RangeMeele = 5, + WeaponType = "Martial Melee", + Weight = 6 + }, + new + { + Id = 20, + Cost = 20, + CurrencyType = 3, + DiceCount = 1, + DiceValue = 10, + Name = "Halberd", + RangeMeele = 5, + WeaponType = "Martial Melee", + Weight = 6 + }, + new + { + Id = 21, + Cost = 10, + CurrencyType = 3, + Description = "You have disadvantage when you use a lance to attack a target within 5 feet of you. Also, a lance requires two hands to wield when you aren�t mounted.", + DiceCount = 1, + DiceValue = 12, + Name = "Lance", + RangeMeele = 5, + WeaponType = "Martial Melee", + Weight = 6 + }, + new + { + Id = 22, + Cost = 15, + CurrencyType = 3, + DiceCount = 1, + DiceValue = 8, + Name = "Longsword", + RangeMeele = 5, + TwoHandDiceCount = 1, + TwoHandDiceValue = 10, + WeaponType = "Martial Melee", + Weight = 3 + }, + new + { + Id = 23, + Cost = 10, + CurrencyType = 3, + DiceCount = 2, + DiceValue = 6, + Name = "Maul", + RangeMeele = 5, + WeaponType = "Martial Melee", + Weight = 10 + }, + new + { + Id = 24, + Cost = 15, + CurrencyType = 3, + DiceCount = 1, + DiceValue = 8, + Name = "Morningstar", + RangeMeele = 5, + WeaponType = "Martial Melee", + Weight = 4 + }, + new + { + Id = 25, + Cost = 5, + CurrencyType = 3, + DiceCount = 1, + DiceValue = 10, + Name = "Pike", + RangeMeele = 5, + WeaponType = "Martial Melee", + Weight = 18 + }, + new + { + Id = 26, + Cost = 25, + CurrencyType = 3, + DiceCount = 1, + DiceValue = 8, + Name = "Rapier", + RangeMeele = 5, + WeaponType = "Martial Melee", + Weight = 2 + }, + new + { + Id = 27, + Cost = 25, + CurrencyType = 3, + DiceCount = 1, + DiceValue = 6, + Name = "Scimitar", + RangeMeele = 5, + WeaponType = "Martial Melee", + Weight = 3 + }, + new + { + Id = 28, + Cost = 10, + CurrencyType = 3, + DiceCount = 1, + DiceValue = 6, + Name = "Shortsword", + RangeMeele = 5, + WeaponType = "Martial Melee", + Weight = 2 + }, + new + { + Id = 29, + Cost = 5, + CurrencyType = 3, + DiceCount = 1, + DiceValue = 6, + Name = "Trident", + RangeMeele = 5, + RangeThrowLong = 60, + RangeThrowNormal = 20, + WeaponType = "Martial Melee", + Weight = 4 + }, + new + { + Id = 30, + Cost = 5, + CurrencyType = 3, + DiceCount = 1, + DiceValue = 8, + Name = "War pick", + RangeMeele = 5, + WeaponType = "Martial Melee", + Weight = 2 + }, + new + { + Id = 31, + Cost = 15, + CurrencyType = 3, + DiceCount = 1, + DiceValue = 8, + Name = "Warhammer", + RangeMeele = 5, + TwoHandDiceCount = 1, + TwoHandDiceValue = 10, + WeaponType = "Martial Melee", + Weight = 2 + }, + new + { + Id = 32, + Cost = 2, + CurrencyType = 3, + DiceCount = 1, + DiceValue = 4, + Name = "Whip", + RangeMeele = 5, + WeaponType = "Martial Melee", + Weight = 3 + }, + new + { + Id = 33, + Cost = 10, + CurrencyType = 3, + DiceCount = 1, + DiceValue = 1, + Name = "Blowgun", + RangeMeele = 5, + WeaponType = "Martial Ranged", + Weight = 1 + }, + new + { + Id = 34, + Cost = 75, + CurrencyType = 3, + DiceCount = 1, + DiceValue = 6, + Name = "Crossbow, hand", + RangeMeele = 5, + WeaponType = "Martial Ranged", + Weight = 3 + }, + new + { + Id = 35, + Cost = 50, + CurrencyType = 3, + DiceCount = 1, + DiceValue = 10, + Name = "Crossbow, heavy", + RangeMeele = 5, + WeaponType = "Martial Ranged", + Weight = 18 + }, + new + { + Id = 36, + Cost = 50, + CurrencyType = 3, + DiceCount = 1, + DiceValue = 8, + Name = "Longbow", + RangeMeele = 5, + WeaponType = "Martial Ranged", + Weight = 2 + }, + new + { + Id = 37, + Cost = 1, + CurrencyType = 3, + Description = "A Large or smaller creature hit by a net is restrained until it is freed. A net has no effect on creatures that are formless, or creatures that are Huge or larger. A creature can use its action to make a DC 10 Strength check, freeing itself or another creature within its reach on a success. Dealing 5 slashing damage to the net (AC 10) also frees the creature without harming it, ending the effect and destroying the net. When you use an action, bonus action, or reaction to attack with a net, you can make only one attack regardless of the number of attacks you can normally make.", + DiceCount = 1, + DiceValue = 0, + Name = "Net", + RangeMeele = 5, + RangeThrowLong = 15, + RangeThrowNormal = 5, + WeaponType = "Martial Ranged", + Weight = 3 + }); + }); + + modelBuilder.Entity("SessionCompanion.Database.Tables.Wisdom", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .UseIdentityColumn(); + + b.Property("AnimalHandling") + .HasColumnType("int"); + + b.Property("CanAnimalHandling") + .HasColumnType("bit"); + + b.Property("CanInsight") + .HasColumnType("bit"); + + b.Property("CanMedicine") + .HasColumnType("bit"); + + b.Property("CanPerception") + .HasColumnType("bit"); + + b.Property("CanSaveThrows") + .HasColumnType("bit"); + + b.Property("CanSurvival") + .HasColumnType("bit"); + + b.Property("CharacterId") + .HasColumnType("int"); + + b.Property("Insight") + .HasColumnType("int"); + + b.Property("Medicine") + .HasColumnType("int"); + + b.Property("Modification") + .HasColumnType("int"); + + b.Property("Perception") + .HasColumnType("int"); + + b.Property("SavingThrows") + .HasColumnType("int"); + + b.Property("Survival") + .HasColumnType("int"); + + b.Property("Value") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CharacterId") + .IsUnique(); + + b.ToTable("Wisdoms"); + }); + + modelBuilder.Entity("SessionCompanion.Database.Tables.Biography", b => + { + b.HasOne("SessionCompanion.Database.Tables.Alignment", "Alignment") + .WithMany("Biography") + .HasForeignKey("AlignmentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("SessionCompanion.Database.Tables.Background", "Background") + .WithMany("Biography") + .HasForeignKey("BackgroundId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("SessionCompanion.Database.Tables.Character", "Character") + .WithOne("Biography") + .HasForeignKey("SessionCompanion.Database.Tables.Biography", "CharacterId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("SessionCompanion.Database.Tables.Class", "Class") + .WithMany("Biography") + .HasForeignKey("ClassId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("SessionCompanion.Database.Tables.Race", "Race") + .WithMany("Biography") + .HasForeignKey("RaceId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Alignment"); + + b.Navigation("Background"); + + b.Navigation("Character"); + + b.Navigation("Class"); + + b.Navigation("Race"); + }); + + modelBuilder.Entity("SessionCompanion.Database.Tables.Character", b => + { + b.HasOne("SessionCompanion.Database.Tables.User", "User") + .WithMany("Character") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("User"); + }); + + modelBuilder.Entity("SessionCompanion.Database.Tables.CharacterArmor", b => + { + b.HasOne("SessionCompanion.Database.Tables.Armor", "Armor") + .WithMany("CharacterArmors") + .HasForeignKey("ArmorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("SessionCompanion.Database.Tables.Character", "Character") + .WithMany() + .HasForeignKey("CharacterId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Armor"); + + b.Navigation("Character"); + }); + + modelBuilder.Entity("SessionCompanion.Database.Tables.CharacterOtherEquipment", b => + { + b.HasOne("SessionCompanion.Database.Tables.Character", "Character") + .WithMany() + .HasForeignKey("CharacterId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("SessionCompanion.Database.Tables.OtherEquipment", "OtherEquipment") + .WithMany("CharacterOtherEquipments") + .HasForeignKey("OtherEquipmentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Character"); + + b.Navigation("OtherEquipment"); + }); + + modelBuilder.Entity("SessionCompanion.Database.Tables.CharacterWeapon", b => + { + b.HasOne("SessionCompanion.Database.Tables.Character", "Character") + .WithMany() + .HasForeignKey("CharacterId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("SessionCompanion.Database.Tables.Weapon", "Weapon") + .WithMany("CharacterWeapons") + .HasForeignKey("WeaponId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Character"); + + b.Navigation("Weapon"); + }); + + modelBuilder.Entity("SessionCompanion.Database.Tables.Charisma", b => + { + b.HasOne("SessionCompanion.Database.Tables.Character", "Character") + .WithOne("Charisma") + .HasForeignKey("SessionCompanion.Database.Tables.Charisma", "CharacterId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Character"); + }); + + modelBuilder.Entity("SessionCompanion.Database.Tables.Constitution", b => + { + b.HasOne("SessionCompanion.Database.Tables.Character", "Character") + .WithOne("Constitution") + .HasForeignKey("SessionCompanion.Database.Tables.Constitution", "CharacterId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Character"); + }); + + modelBuilder.Entity("SessionCompanion.Database.Tables.Dexterity", b => + { + b.HasOne("SessionCompanion.Database.Tables.Character", "Character") + .WithOne("Dexterity") + .HasForeignKey("SessionCompanion.Database.Tables.Dexterity", "CharacterId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Character"); + }); + + modelBuilder.Entity("SessionCompanion.Database.Tables.Intelligence", b => + { + b.HasOne("SessionCompanion.Database.Tables.Character", "Character") + .WithOne("Intelligence") + .HasForeignKey("SessionCompanion.Database.Tables.Intelligence", "CharacterId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Character"); + }); + + modelBuilder.Entity("SessionCompanion.Database.Tables.Statistics", b => + { + b.HasOne("SessionCompanion.Database.Tables.Character", "Character") + .WithOne("Statistics") + .HasForeignKey("SessionCompanion.Database.Tables.Statistics", "CharacterId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Character"); + }); + + modelBuilder.Entity("SessionCompanion.Database.Tables.Strength", b => + { + b.HasOne("SessionCompanion.Database.Tables.Character", "Character") + .WithOne("Strength") + .HasForeignKey("SessionCompanion.Database.Tables.Strength", "CharacterId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Character"); + }); + + modelBuilder.Entity("SessionCompanion.Database.Tables.Wisdom", b => + { + b.HasOne("SessionCompanion.Database.Tables.Character", "Character") + .WithOne("Wisdom") + .HasForeignKey("SessionCompanion.Database.Tables.Wisdom", "CharacterId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Character"); + }); + + modelBuilder.Entity("SessionCompanion.Database.Tables.Alignment", b => + { + b.Navigation("Biography"); + }); + + modelBuilder.Entity("SessionCompanion.Database.Tables.Armor", b => + { + b.Navigation("CharacterArmors"); + }); + + modelBuilder.Entity("SessionCompanion.Database.Tables.Background", b => + { + b.Navigation("Biography"); + }); + + modelBuilder.Entity("SessionCompanion.Database.Tables.Character", b => + { + b.Navigation("Biography"); + + b.Navigation("Charisma"); + + b.Navigation("Constitution"); + + b.Navigation("Dexterity"); + + b.Navigation("Intelligence"); + + b.Navigation("Statistics"); + + b.Navigation("Strength"); + + b.Navigation("Wisdom"); + }); + + modelBuilder.Entity("SessionCompanion.Database.Tables.Class", b => + { + b.Navigation("Biography"); + }); + + modelBuilder.Entity("SessionCompanion.Database.Tables.OtherEquipment", b => + { + b.Navigation("CharacterOtherEquipments"); + }); + + modelBuilder.Entity("SessionCompanion.Database.Tables.Race", b => + { + b.Navigation("Biography"); + }); + + modelBuilder.Entity("SessionCompanion.Database.Tables.User", b => + { + b.Navigation("Character"); + }); + + modelBuilder.Entity("SessionCompanion.Database.Tables.Weapon", b => + { + b.Navigation("CharacterWeapons"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/SessionCompanion/SessionCompanion.Database/Migrations/20210102163136_weapons-added.cs b/SessionCompanion/SessionCompanion.Database/Migrations/20210102163136_weapons-added.cs new file mode 100644 index 0000000..44d491f --- /dev/null +++ b/SessionCompanion/SessionCompanion.Database/Migrations/20210102163136_weapons-added.cs @@ -0,0 +1,480 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +namespace SessionCompanion.Database.Migrations +{ + public partial class weaponsadded : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateTable( + name: "Armors", + columns: table => new + { + Id = table.Column(type: "int", nullable: false) + .Annotation("SqlServer:Identity", "1, 1"), + Name = table.Column(type: "nvarchar(max)", nullable: true), + Category = table.Column(type: "nvarchar(max)", nullable: true), + ArmorClassBase = table.Column(type: "nvarchar(max)", nullable: true), + HaveDexterityBonus = table.Column(type: "bit", nullable: false), + MinimumStrength = table.Column(type: "int", nullable: true), + HaveStealthDisadvantage = table.Column(type: "bit", nullable: false), + Weight = table.Column(type: "int", nullable: false), + Cost = table.Column(type: "int", nullable: false), + CurrencyType = table.Column(type: "int", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_Armors", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "OtherEquipment", + columns: table => new + { + Id = table.Column(type: "int", nullable: false) + .Annotation("SqlServer:Identity", "1, 1"), + Name = table.Column(type: "nvarchar(max)", nullable: true), + Description = table.Column(type: "nvarchar(max)", nullable: true), + Cost = table.Column(type: "int", nullable: false), + CurrencyType = table.Column(type: "int", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_OtherEquipment", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Weapons", + columns: table => new + { + Id = table.Column(type: "int", nullable: false) + .Annotation("SqlServer:Identity", "1, 1"), + Name = table.Column(type: "nvarchar(max)", nullable: true), + Cost = table.Column(type: "int", nullable: false), + Weight = table.Column(type: "int", nullable: false), + CurrencyType = table.Column(type: "int", nullable: false), + DiceCount = table.Column(type: "int", nullable: false), + DiceValue = table.Column(type: "int", nullable: false), + TwoHandDiceCount = table.Column(type: "int", nullable: true), + TwoHandDiceValue = table.Column(type: "int", nullable: true), + TwoHandDamageType = table.Column(type: "nvarchar(max)", nullable: true), + Description = table.Column(type: "nvarchar(max)", nullable: true), + WeaponType = table.Column(type: "nvarchar(max)", nullable: true), + RangeMeele = table.Column(type: "int", nullable: false), + RangeThrowNormal = table.Column(type: "int", nullable: true), + RangeThrowLong = table.Column(type: "int", nullable: true), + RangeLong = table.Column(type: "int", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Weapons", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "CharacterArmors", + columns: table => new + { + Id = table.Column(type: "int", nullable: false) + .Annotation("SqlServer:Identity", "1, 1"), + CharacterId = table.Column(type: "int", nullable: false), + ArmorId = table.Column(type: "int", nullable: false), + InUse = table.Column(type: "bit", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_CharacterArmors", x => x.Id); + table.ForeignKey( + name: "FK_CharacterArmors_Armors_ArmorId", + column: x => x.ArmorId, + principalTable: "Armors", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + table.ForeignKey( + name: "FK_CharacterArmors_Characters_CharacterId", + column: x => x.CharacterId, + principalTable: "Characters", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "CharacterOtherEquipment", + columns: table => new + { + Id = table.Column(type: "int", nullable: false) + .Annotation("SqlServer:Identity", "1, 1"), + CharacterId = table.Column(type: "int", nullable: false), + OtherEquipmentId = table.Column(type: "int", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_CharacterOtherEquipment", x => x.Id); + table.ForeignKey( + name: "FK_CharacterOtherEquipment_Characters_CharacterId", + column: x => x.CharacterId, + principalTable: "Characters", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + table.ForeignKey( + name: "FK_CharacterOtherEquipment_OtherEquipment_OtherEquipmentId", + column: x => x.OtherEquipmentId, + principalTable: "OtherEquipment", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "CharacterWeapons", + columns: table => new + { + Id = table.Column(type: "int", nullable: false) + .Annotation("SqlServer:Identity", "1, 1"), + CharacterId = table.Column(type: "int", nullable: false), + WeaponId = table.Column(type: "int", nullable: false), + InUse = table.Column(type: "bit", nullable: false), + HoldInRightHand = table.Column(type: "bit", nullable: false), + HoldInLeftHand = table.Column(type: "bit", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_CharacterWeapons", x => x.Id); + table.ForeignKey( + name: "FK_CharacterWeapons_Characters_CharacterId", + column: x => x.CharacterId, + principalTable: "Characters", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + table.ForeignKey( + name: "FK_CharacterWeapons_Weapons_WeaponId", + column: x => x.WeaponId, + principalTable: "Weapons", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.InsertData( + table: "Armors", + columns: new[] { "Id", "ArmorClassBase", "Category", "Cost", "CurrencyType", "HaveDexterityBonus", "HaveStealthDisadvantage", "MinimumStrength", "Name", "Weight" }, + values: new object[,] + { + { 1, "11", "Light", 5, 3, true, true, 0, "Padded", 8 }, + { 13, "2", "Shield", 10, 3, false, false, 0, "Shield", 6 }, + { 12, "18", "Heavy", 1500, 3, false, true, 15, "Plate", 65 }, + { 11, "17", "Heavy", 200, 3, false, true, 15, "Splint", 60 }, + { 9, "14", "Heavy", 30, 3, false, true, 0, "Ring Mail", 40 }, + { 8, "15", "Medium", 750, 3, true, true, 0, "Half Plate", 40 }, + { 10, "16", "Heavy", 75, 3, false, true, 13, "Chain Mail", 55 }, + { 6, "14", "Medium", 50, 3, true, true, 0, "Scale Mail", 45 }, + { 5, "13", "Medium", 50, 3, true, false, 0, "Chain Shirt", 20 }, + { 4, "12", "Medium", 10, 3, true, false, 0, "Hide", 12 }, + { 3, "12", "Light", 45, 3, true, false, 0, "Studded Leather", 13 }, + { 2, "11", "Light", 10, 3, true, false, 0, "Leather", 10 }, + { 7, "14", "Medium", 400, 3, true, false, 0, "Breastplate", 20 } + }); + + migrationBuilder.InsertData( + table: "OtherEquipment", + columns: new[] { "Id", "Cost", "CurrencyType", "Description", "Name" }, + values: new object[,] + { + { 92, 5, 0, "", "Signal whistle" }, + { 88, 1, 0, "", "Sack" }, + { 89, 5, 3, " A scale includes a small balance, pans, and a suitable assortment of weights up to 2 pounds. With it, you can measure the exact weight of small objects, such as raw precious metals or trade goods, to help determine their worth.", "Scale, merchant's" }, + { 90, 5, 1, "", "Sealing wax" }, + { 91, 2, 3, "", "Shovel" }, + { 93, 5, 3, "", "Signet ring" }, + { 100, 1, 0, " A torch burns for 1 hour, providing bright light in a 20-foot radius and dim light for an additional 20 feet. If you make a melee attack with a burning torch and hit, it deals 1 fire damage.", "Torch" }, + { 95, 50, 3, " Essential for wizards, a spellbook is a leather-bound tome with 100 blank vellum pages suitable for recording spells.", "Spellbook" }, + { 96, 1, 1, "", "Spike, iron" }, + { 97, 1000, 3, " Objects viewed through a spyglass are magnified to twice their size.", "Spyglass" }, + { 98, 2, 3, " A simple and portable canvas shelter, a tent sleeps two.", "Tent, two-person" }, + { 99, 5, 1, " This small container holds flint, fire steel, and tinder (usually dry cloth soaked in light oil) used to kindle a fire. Using it to light a torch--or anything else with abundant, exposed fuel--takes an action. Lighting any other fire takes 1 minute.", "Tinderbox" }, + { 87, 10, 3, " Rope, whether made of hemp or silk, has 2 hit points and can be burst with a DC 17 Strength check.", "Rope, silk (50 feet)" }, + { 94, 2, 0, "", "Soap" }, + { 86, 1, 3, " Rope, whether made of hemp or silk, has 2 hit points and can be burst with a DC 17 Strength check.", "Rope, hempen (50 feet)" }, + { 79, 50, 3, " A character who drinks the magical red fluid in this vial regains 2d4 + 2 hit points. Drinking or administering a potion takes an action.", "Potion of healing" }, + { 84, 5, 3, " A holy symbol is a representation of a god or pantheon. It might be an amulet depicting a symbol representing a deity, the same symbol carefully engraved or inlaid as an emblem on a shield, or a tiny box holding a fragment of a sacred relic. Appendix B lists the symbols commonly associated with many gods in the multiverse. A cleric or paladin can use a holy symbol as a spellcasting focus. To use the symbol in this way, the caster must hold it in hand, wear it visibly, or bear it on a shield.", "Reliquary" }, + { 83, 5, 1, " Rations consist of dry foods suitable for extended travel, including jerky, dried fruit, hardtack, and nuts.", "Rations (1 day)" }, + { 82, 4, 3, " You can use a portable ram to break down doors. When doing so, you gain a +4 bonus on the Strength check. One other character can help you use the ram, giving you advantage on this check.", "Ram, portable" }, + { 81, 1, 3, " A quiver can hold up to 20 arrows.", "Quiver" }, + { 101, 1, 3, "", "Vial" }, + { 78, 2, 3, "", "Pot, iron" }, + { 77, 5, 0, "", "Pole (10-foot)" }, + { 76, 100, 3, " You can use the poison in this vial to coat one slashing or piercing weapon or up to three pieces of ammunition. Applying the poison takes an action. A creature hit by the poisoned weapon or ammunition must make a DC 10 Constitution saving throw or take 1d4 poison damage. Once applied, the poison retains potency for 1 minute before drying.", "Poison, basic (vial)" }, + { 75, 5, 0, "", "Piton" }, + { 74, 2, 3, "", "Pick, miner's" }, + { 73, 5, 3, "", "Perfume (vial)" }, + { 72, 1, 1, "", "Parchment (one sheet)" }, + { 71, 2, 1, "", "Paper (one sheet)" } + }); + + migrationBuilder.InsertData( + table: "OtherEquipment", + columns: new[] { "Id", "Cost", "CurrencyType", "Description", "Name" }, + values: new object[,] + { + { 70, 1, 1, " Oil usually comes in a clay flask that holds 1 pint. As an action, you can splash the oil in this flask onto a creature within 5 feet of you or throw it up to 20 feet, shattering it on impact. Make a ranged attack against a target creature or object, treating the oil as an improvised weapon. On a hit, the target is covered in oil. If the target takes any fire damage before the oil dries (after 1 minute), the target takes an additional 5 fire damage from the burning oil. You can also pour a flask of oil on the ground to cover a 5-foot-square area, provided that the surface is level. If lit, the oil burns for 2 rounds and deals 5 fire damage to any creature that enters the area or ends its turn in the area. A creature can take this damage only once per turn.", "Oil (flask)" }, + { 85, 1, 3, "", "Robes" }, + { 102, 2, 1, "", "Waterskin" }, + { 109, 15, 3, " These special tools include the items needed to pursue a craft or trade. The table shows examples of the most common types of tools, each providing items related to a single craft. Proficiency with a set of artisan's tools lets you add your proficiency bonus to any ability checks you make using the tools in your craft. Each type of artisan's tools requires a separate proficiency.", "Cartographer's tools" }, + { 104, 16, 3, "", "Burglar's Pack" }, + { 135, 25, 3, " This set of tools includes a small file, a set of lock picks, a small mirror mounted on a metal handle, a set of narrow-bladed scissors, and a pair of pliers. Proficiency with these tools lets you add your proficiency bonus to any ability checks you make to disarm traps or open locks.", "Thieves' tools" }, + { 134, 25, 3, " This set of instruments is used for navigation at sea. Proficiency with navigator's tools lets you chart a ship's course and follow navigation charts. In addition, these tools allow you to add your proficiency bonus to any ability check you make to avoid getting lost at sea.", "Navigator's tools" }, + { 133, 30, 3, " Several of the most common types of musical instruments are shown on the table as examples. If you have proficiency with a given musical instrument, you can add your proficiency bonus to any ability checks you make to play music with the instrument. A bard can use a musical instrument as a spellcasting focus. Each type of musical instrument requires a separate proficiency.", "Viol" }, + { 132, 2, 3, " Several of the most common types of musical instruments are shown on the table as examples. If you have proficiency with a given musical instrument, you can add your proficiency bonus to any ability checks you make to play music with the instrument. A bard can use a musical instrument as a spellcasting focus. Each type of musical instrument requires a separate proficiency.", "Shawm" }, + { 131, 12, 3, " Several of the most common types of musical instruments are shown on the table as examples. If you have proficiency with a given musical instrument, you can add your proficiency bonus to any ability checks you make to play music with the instrument. A bard can use a musical instrument as a spellcasting focus. Each type of musical instrument requires a separate proficiency.", "Pan flute" }, + { 130, 3, 3, " Several of the most common types of musical instruments are shown on the table as examples. If you have proficiency with a given musical instrument, you can add your proficiency bonus to any ability checks you make to play music with the instrument. A bard can use a musical instrument as a spellcasting focus. Each type of musical instrument requires a separate proficiency.", "Horn" }, + { 129, 30, 3, " Several of the most common types of musical instruments are shown on the table as examples. If you have proficiency with a given musical instrument, you can add your proficiency bonus to any ability checks you make to play music with the instrument. A bard can use a musical instrument as a spellcasting focus. Each type of musical instrument requires a separate proficiency.", "Lyre" }, + { 128, 35, 3, " Several of the most common types of musical instruments are shown on the table as examples. If you have proficiency with a given musical instrument, you can add your proficiency bonus to any ability checks you make to play music with the instrument. A bard can use a musical instrument as a spellcasting focus. Each type of musical instrument requires a separate proficiency.", "Lute" }, + { 127, 2, 3, " Several of the most common types of musical instruments are shown on the table as examples. If you have proficiency with a given musical instrument, you can add your proficiency bonus to any ability checks you make to play music with the instrument. A bard can use a musical instrument as a spellcasting focus. Each type of musical instrument requires a separate proficiency.", "Flute" }, + { 126, 25, 3, " Several of the most common types of musical instruments are shown on the table as examples. If you have proficiency with a given musical instrument, you can add your proficiency bonus to any ability checks you make to play music with the instrument. A bard can use a musical instrument as a spellcasting focus. Each type of musical instrument requires a separate proficiency.", "Dulcimer" }, + { 125, 6, 3, " Several of the most common types of musical instruments are shown on the table as examples. If you have proficiency with a given musical instrument, you can add your proficiency bonus to any ability checks you make to play music with the instrument. A bard can use a musical instrument as a spellcasting focus. Each type of musical instrument requires a separate proficiency.", "Drum" }, + { 124, 30, 3, " Several of the most common types of musical instruments are shown on the table as examples. If you have proficiency with a given musical instrument, you can add your proficiency bonus to any ability checks you make to play music with the instrument. A bard can use a musical instrument as a spellcasting focus. Each type of musical instrument requires a separate proficiency.", "Bagpipes" }, + { 123, 5, 1, " This item encompasses a wide range of game pieces, including dice and decks of cards (for games such as Three-Dragon Ante). A few common examples appear on the Tools table, but other kinds of gaming sets exist. If you are proficient with a gaming set, you can add your proficiency bonus to ability checks you make to play a game with that set. Each type of gaming set requires a separate proficiency.", "Playing card set" }, + { 122, 1, 1, " This item encompasses a wide range of game pieces, including dice and decks of cards (for games such as Three-Dragon Ante). A few common examples appear on the Tools table, but other kinds of gaming sets exist. If you are proficient with a gaming set, you can add your proficiency bonus to ability checks you make to play a game with that set. Each type of gaming set requires a separate proficiency.", "Dice set" }, + { 121, 1, 3, " These special tools include the items needed to pursue a craft or trade. The table shows examples of the most common types of tools, each providing items related to a single craft. Proficiency with a set of artisan's tools lets you add your proficiency bonus to any ability checks you make using the tools in your craft. Each type of artisan's tools requires a separate proficiency.", "Woodcarver's tools" }, + { 120, 1, 3, " These special tools include the items needed to pursue a craft or trade. The table shows examples of the most common types of tools, each providing items related to a single craft. Proficiency with a set of artisan's tools lets you add your proficiency bonus to any ability checks you make using the tools in your craft. Each type of artisan's tools requires a separate proficiency.", "Weaver's tools" }, + { 119, 50, 3, " These special tools include the items needed to pursue a craft or trade. The table shows examples of the most common types of tools, each providing items related to a single craft. Proficiency with a set of artisan's tools lets you add your proficiency bonus to any ability checks you make using the tools in your craft. Each type of artisan's tools requires a separate proficiency.", "Tinker's tools" }, + { 105, 50, 3, " These special tools include the items needed to pursue a craft or trade. The table shows examples of the most common types of tools, each providing items related to a single craft. Proficiency with a set of artisan's tools lets you add your proficiency bonus to any ability checks you make using the tools in your craft. Each type of artisan's tools requires a separate proficiency.", "Alchemist's supplies" }, + { 106, 20, 3, " These special tools include the items needed to pursue a craft or trade. The table shows examples of the most common types of tools, each providing items related to a single craft. Proficiency with a set of artisan's tools lets you add your proficiency bonus to any ability checks you make using the tools in your craft. Each type of artisan's tools requires a separate proficiency.", "Brewer's supplies" }, + { 107, 10, 3, " These special tools include the items needed to pursue a craft or trade. The table shows examples of the most common types of tools, each providing items related to a single craft. Proficiency with a set of artisan's tools lets you add your proficiency bonus to any ability checks you make using the tools in your craft. Each type of artisan's tools requires a separate proficiency.", "Calligrapher's supplies" }, + { 108, 8, 3, " These special tools include the items needed to pursue a craft or trade. The table shows examples of the most common types of tools, each providing items related to a single craft. Proficiency with a set of artisan's tools lets you add your proficiency bonus to any ability checks you make using the tools in your craft. Each type of artisan's tools requires a separate proficiency.", "Carpenter's tools" }, + { 69, 5, 3, "", "Mirror, steel" }, + { 110, 5, 3, " These special tools include the items needed to pursue a craft or trade. The table shows examples of the most common types of tools, each providing items related to a single craft. Proficiency with a set of artisan's tools lets you add your proficiency bonus to any ability checks you make using the tools in your craft. Each type of artisan's tools requires a separate proficiency.", "Cobbler's tools" }, + { 103, 1, 0, "", "Whetstone" }, + { 111, 1, 3, " These special tools include the items needed to pursue a craft or trade. The table shows examples of the most common types of tools, each providing items related to a single craft. Proficiency with a set of artisan's tools lets you add your proficiency bonus to any ability checks you make using the tools in your craft. Each type of artisan's tools requires a separate proficiency.", "Cook's utensils" }, + { 113, 25, 3, " These special tools include the items needed to pursue a craft or trade. The table shows examples of the most common types of tools, each providing items related to a single craft. Proficiency with a set of artisan's tools lets you add your proficiency bonus to any ability checks you make using the tools in your craft. Each type of artisan's tools requires a separate proficiency.", "Jeweler's tools" }, + { 114, 5, 3, " These special tools include the items needed to pursue a craft or trade. The table shows examples of the most common types of tools, each providing items related to a single craft. Proficiency with a set of artisan's tools lets you add your proficiency bonus to any ability checks you make using the tools in your craft. Each type of artisan's tools requires a separate proficiency.", "Leatherworker's tools" }, + { 115, 10, 3, " These special tools include the items needed to pursue a craft or trade. The table shows examples of the most common types of tools, each providing items related to a single craft. Proficiency with a set of artisan's tools lets you add your proficiency bonus to any ability checks you make using the tools in your craft. Each type of artisan's tools requires a separate proficiency.", "Mason's tools" }, + { 116, 10, 3, " These special tools include the items needed to pursue a craft or trade. The table shows examples of the most common types of tools, each providing items related to a single craft. Proficiency with a set of artisan's tools lets you add your proficiency bonus to any ability checks you make using the tools in your craft. Each type of artisan's tools requires a separate proficiency.", "Painter's supplies" }, + { 117, 10, 3, " These special tools include the items needed to pursue a craft or trade. The table shows examples of the most common types of tools, each providing items related to a single craft. Proficiency with a set of artisan's tools lets you add your proficiency bonus to any ability checks you make using the tools in your craft. Each type of artisan's tools requires a separate proficiency.", "Potter's tools" }, + { 118, 20, 3, " These special tools include the items needed to pursue a craft or trade. The table shows examples of the most common types of tools, each providing items related to a single craft. Proficiency with a set of artisan's tools lets you add your proficiency bonus to any ability checks you make using the tools in your craft. Each type of artisan's tools requires a separate proficiency.", "Smith's tools" }, + { 112, 30, 3, " These special tools include the items needed to pursue a craft or trade. The table shows examples of the most common types of tools, each providing items related to a single craft. Proficiency with a set of artisan's tools lets you add your proficiency bonus to any ability checks you make using the tools in your craft. Each type of artisan's tools requires a separate proficiency.", "Glassblower's tools" }, + { 68, 2, 3, " These metal restraints can bind a Small or Medium creature. Escaping the manacles requires a successful DC 20 Dexterity check. Breaking them requires a successful DC 20 Strength check. Each set of manacles comes with one key. Without the key, a creature proficient with thieves' tools can pick the manacles' lock with a successful DC 15 Dexterity check. Manacles have 15 hit points.", "Manacles" }, + { 80, 5, 1, " A cloth or leather pouch can hold up to 20 sling bullets or 50 blowgun needles, among other things. A compartmentalized pouch for holding spell components is called a component pouch (described earlier in this section).", "Pouch" }, + { 66, 10, 3, " A key is provided with the lock. Without the key, a creature proficient with thieves' tools can pick this lock with a successful DC 15 Dexterity check. Your GM may decide that better locks are available for higher prices.", "Lock" }, + { 31, 1, 0, "", "Chalk (1 piece)" }, + { 30, 5, 3, " A chain has 10 hit points. It can be burst with a successful DC 20 Strength check.", "Chain (10 feet)" } + }); + + migrationBuilder.InsertData( + table: "OtherEquipment", + columns: new[] { "Id", "Cost", "CurrencyType", "Description", "Name" }, + values: new object[,] + { + { 29, 1, 3, " This cylindrical leather case can hold up to ten rolled-up sheets of paper or five rolled-up sheets of parchment.", "Case, map or scroll" }, + { 28, 1, 3, " This wooden case can hold up to twenty crossbow bolts.", "Case, crossbow bolt" }, + { 27, 1, 0, " For 1 hour, a candle sheds bright light in a 5-foot radius and dim light for an additional 5 feet.", "Candle" }, + { 26, 5, 0, " As an action, you can spread a bag of caltrops to cover a square area that is 5 feet on a side. Any creature that enters the area must succeed on a DC 15 Dexterity saving throw or stop moving this turn and take 1 piercing damage. Taking this damage reduces the creature's walking speed by 10 feet until the creature regains at least 1 hit point. A creature moving through the area at half speed doesn't need to make the save.", "Caltrops" }, + { 25, 5, 0, "", "Bucket" }, + { 24, 2, 3, "", "Bottle, glass" }, + { 23, 25, 3, " A book might contain poetry, historical accounts, information pertaining to a particular field of lore, diagrams and notes on gnomish contraptions, or just about anything else that can be represented using text or pictures. A book of spells is a spellbook (described later in this section).", "Book" }, + { 22, 1, 3, " A set of pulleys with a cable threaded through them and a hook to attach to objects, a block and tackle allows you to hoist up to four times the weight you can normally lift.", "Block and tackle" }, + { 21, 5, 1, "", "Blanket" }, + { 20, 1, 3, "", "Bell" }, + { 19, 1, 3, "", "Bedroll" }, + { 18, 4, 1, "", "Basket" }, + { 17, 2, 3, "", "Barrel" }, + { 67, 100, 3, " This lens allows a closer look at small objects. It is also useful as a substitute for flint and steel when starting fires. Lighting a fire with a magnifying glass requires light as bright as sunlight to focus, tinder to ignite, and about 5 minutes for the fire to ignite. A magnifying glass grants advantage on any ability check made to appraise or inspect an item that is small or highly detailed.", "Magnifying glass" }, + { 15, 2, 3, "", "Backpack" }, + { 1, 2, 3, "", "Abacus" }, + { 2, 25, 3, " As an action, you can splash the contents of this vial onto a creature within 5 feet of you or throw the vial up to 20 feet, shattering it on impact. In either case, make a ranged attack against a creature or object, treating the acid as an improvised weapon. On a hit, the target takes 2d6 acid damage.", "Acid (vial)" }, + { 3, 50, 3, " This sticky, adhesive fluid ignites when exposed to air. As an action, you can throw this flask up to 20 feet, shattering it on impact. Make a ranged attack against a creature or object, treating the alchemist's fire as an improvised weapon. On a hit, the target takes 1d4 fire damage at the start of each of its turns. A creature can end this damage by using its action to make a DC 10 Dexterity check to extinguish the flames.", "Alchemist's fire (flask)" }, + { 4, 5, 0, "", "Arrow" }, + { 5, 2, 0, "", "Blowgun needle" }, + { 6, 5, 0, "", "Crossbow bolt" }, + { 32, 5, 3, "", "Chest" }, + { 7, 1, 0, "", "Sling bullet" }, + { 9, 50, 3, " A creature that drinks this vial of liquid gains advantage on saving throws against poison for 1 hour. It confers no benefit to undead or constructs.", "Antitoxin (vial)" }, + { 10, 10, 3, " An arcane focus is a special item--an orb, a crystal, a rod, a specially constructed staff, a wand-like length of wood, or some similar item--designed to channel the power of arcane spells. A sorcerer, warlock, or wizard can use such an item as a spellcasting focus.", "Crystal" }, + { 11, 20, 3, " An arcane focus is a special item--an orb, a crystal, a rod, a specially constructed staff, a wand-like length of wood, or some similar item--designed to channel the power of arcane spells. A sorcerer, warlock, or wizard can use such an item as a spellcasting focus.", "Orb" }, + { 12, 10, 3, " An arcane focus is a special item--an orb, a crystal, a rod, a specially constructed staff, a wand-like length of wood, or some similar item--designed to channel the power of arcane spells. A sorcerer, warlock, or wizard can use such an item as a spellcasting focus.", "Rod" }, + { 13, 5, 3, " An arcane focus is a special item--an orb, a crystal, a rod, a specially constructed staff, a wand-like length of wood, or some similar item--designed to channel the power of arcane spells. A sorcerer, warlock, or wizard can use such an item as a spellcasting focus.", "Staff" }, + { 14, 10, 3, " An arcane focus is a special item--an orb, a crystal, a rod, a specially constructed staff, a wand-like length of wood, or some similar item--designed to channel the power of arcane spells. A sorcerer, warlock, or wizard can use such an item as a spellcasting focus.", "Wand" }, + { 8, 5, 3, " A holy symbol is a representation of a god or pantheon. It might be an amulet depicting a symbol representing a deity, the same symbol carefully engraved or inlaid as an emblem on a shield, or a tiny box holding a fragment of a sacred relic. Appendix B lists the symbols commonly associated with many gods in the multiverse. A cleric or paladin can use a holy symbol as a spellcasting focus. To use the symbol in this way, the caster must hold it in hand, wear it visibly, or bear it on a shield.", "Amulet" }, + { 33, 5, 1, "", "Clothes, common" }, + { 16, 1, 3, " As an action, you can spill these tiny metal balls from their pouch to cover a level, square area that is 10 feet on a side. A creature moving across the covered area must succeed on a DC 10 Dexterity saving throw or fall prone. A creature moving through the area at half speed doesn't need to make the save.", "Ball bearings (bag of 1,000)" }, + { 35, 15, 3, "", "Clothes, fine" }, + { 34, 5, 3, "", "Clothes, costume" }, + { 65, 5, 3, " A hooded lantern casts bright light in a 30-foot radius and dim light for an additional 30 feet. Once lit, it burns for 6 hours on a flask (1 pint) of oil. As an action, you can lower the hood, reducing the light to dim light in a 5-foot radius.", "Lantern, hooded" }, + { 64, 10, 3, " A bullseye lantern casts bright light in a 60-foot cone and dim light for an additional 60 feet. Once lit, it burns for 6 hours on a flask (1 pint) of oil.", "Lantern, bullseye" }, + { 63, 5, 1, " A lamp casts bright light in a 15-foot radius and dim light for an additional 30 feet. Once lit, it burns for 6 hours on a flask (1 pint) of oil.", "Lamp" }, + { 62, 1, 1, "", "Ladder (10-foot)" }, + { 61, 50, 3, " A poisoner's kit includes the vials, chemicals, and other equipment necessary for the creation of poisons. Proficiency with this kit lets you add your proficiency bonus to any ability checks you make to craft or use poisons.", "Poisoner's Kit" }, + { 60, 2, 1, " This tin box contains a cup and simple cutlery. The box clamps together, and one side can be used as a cooking pan and the other as a plate or shallow bowl.", "Mess Kit" }, + { 59, 5, 3, " This kit is a leather pouch containing bandages, salves, and splints. The kit has ten uses. As an action, you can expend one use of the kit to stabilize a creature that has 0 hit points, without needing to make a Wisdom (Medicine) check.", "Healer's Kit" }, + { 57, 15, 3, " This small box contains a variety of papers and parchments, pens and inks, seals and sealing wax, gold and silver leaf, and other supplies necessary to create convincing forgeries of physical documents. Proficiency with this kit lets you add your proficiency bonus to any ability checks you make to create a physical forgery of a document.", "Forgery Kit" } + }); + + migrationBuilder.InsertData( + table: "OtherEquipment", + columns: new[] { "Id", "Cost", "CurrencyType", "Description", "Name" }, + values: new object[,] + { + { 56, 25, 3, " This pouch of cosmetics, hair dye, and small props lets you create disguises that change your physical appearance. Proficiency with this kit lets you add your proficiency bonus to any ability checks you make to create a visual disguise.", "Disguise Kit" }, + { 55, 25, 3, " A climber's kit includes special pitons, boot tips, gloves, and a harness. You can use the climber's kit as an action to anchor yourself; when you do, you can't fall more than 25 feet from the point where you anchored yourself, and you can't climb more than 25 feet away from that point without undoing the anchor.", "Climber's Kit" }, + { 54, 2, 0, "", "Jug or pitcher" }, + { 53, 2, 0, "", "Ink pen" }, + { 52, 10, 3, "", "Ink (1 ounce bottle)" }, + { 51, 5, 3, " When you use your action to set it, this trap forms a saw-toothed steel ring that snaps shut when a creature steps on a pressure plate in the center. The trap is affixed by a heavy chain to an immobile object, such as a tree or a spike driven into the ground. A creature that steps on the plate must succeed on a DC 13 Dexterity saving throw or take 1d4 piercing damage and stop moving. Thereafter, until the creature breaks free of the trap, its movement is limited by the length of the chain (typically 3 feet long). A creature can use its action to make a DC 13 Strength check, freeing itself or another creature within its reach on a success. Each failed check deals 1 piercing damage to the trapped creature.", "Hunting trap" }, + { 58, 5, 3, " This kit contains a variety of instruments such as clippers, mortar and pestle, and pouches and vials used by herbalists to create remedies and potions. Proficiency with this kit lets you add your proficiency bonus to any ability checks you make to identify or apply herbs. Also, proficiency with this kit is required to create antitoxin and potions of healing.", "Herbalism Kit" }, + { 49, 25, 3, " As an action, you can splash the contents of this flask onto a creature within 5 feet of you or throw it up to 20 feet, shattering it on impact. In either case, make a ranged attack against a target creature, treating the holy water as an improvised weapon. If the target is a fiend or undead, it takes 2d6 radiant damage. A cleric or paladin may create holy water by performing a special ritual. The ritual takes 1 hour to perform, uses 25 gp worth of powdered silver, and requires the caster to expend a 1st-level spell slot.", "Holy water (flask)" }, + { 36, 2, 3, "", "Clothes, traveler's" }, + { 50, 25, 3, "", "Hourglass" }, + { 37, 25, 3, " A component pouch is a small, watertight leather belt pouch that has compartments to hold all the material components and other special items you need to cast your spells, except for those components that have a specific cost (as indicated in a spell's description).", "Component pouch" }, + { 38, 2, 3, " Using a crowbar grants advantage to Strength checks where the crowbar's leverage can be applied.", "Crowbar" }, + { 39, 1, 3, " A druidic focus might be a sprig of mistletoe or holly, a wand or scepter made of yew or another special wood, a staff drawn whole out of a living tree, or a totem object incorporating feathers, fur, bones, and teeth from sacred animals. A druid can use such an object as a spellcasting focus.", "Sprig of mistletoe" }, + { 40, 1, 3, " A druidic focus might be a sprig of mistletoe or holly, a wand or scepter made of yew or another special wood, a staff drawn whole out of a living tree, or a totem object incorporating feathers, fur, bones, and teeth from sacred animals. A druid can use such an object as a spellcasting focus.", "Totem" }, + { 42, 10, 3, " A druidic focus might be a sprig of mistletoe or holly, a wand or scepter made of yew or another special wood, a staff drawn whole out of a living tree, or a totem object incorporating feathers, fur, bones, and teeth from sacred animals. A druid can use such an object as a spellcasting focus.", "Yew wand" }, + { 41, 5, 3, " A druidic focus might be a sprig of mistletoe or holly, a wand or scepter made of yew or another special wood, a staff drawn whole out of a living tree, or a totem object incorporating feathers, fur, bones, and teeth from sacred animals. A druid can use such an object as a spellcasting focus.", "Wooden staff" }, + { 44, 1, 3, " This kit includes a wooden rod, silken line, corkwood bobbers, steel hooks, lead sinkers, velvet lures, and narrow netting.", "Fishing tackle" }, + { 45, 2, 0, "", "Flask or tankard" }, + { 46, 2, 3, "", "Grappling hook" }, + { 47, 1, 3, "", "Hammer" }, + { 48, 2, 3, "", "Hammer, sledge" }, + { 43, 5, 3, " A holy symbol is a representation of a god or pantheon. It might be an amulet depicting a symbol representing a deity, the same symbol carefully engraved or inlaid as an emblem on a shield, or a tiny box holding a fragment of a sacred relic. Appendix B lists the symbols commonly associated with many gods in the multiverse. A cleric or paladin can use a holy symbol as a spellcasting focus. To use the symbol in this way, the caster must hold it in hand, wear it visibly, or bear it on a shield.", "Emblem" } + }); + + migrationBuilder.InsertData( + table: "Weapons", + columns: new[] { "Id", "Cost", "CurrencyType", "Description", "DiceCount", "DiceValue", "Name", "RangeLong", "RangeMeele", "RangeThrowLong", "RangeThrowNormal", "TwoHandDamageType", "TwoHandDiceCount", "TwoHandDiceValue", "WeaponType", "Weight" }, + values: new object[,] + { + { 22, 15, 3, null, 1, 8, "Longsword", null, 5, null, null, null, 1, 10, "Martial Melee", 3 }, + { 26, 25, 3, null, 1, 8, "Rapier", null, 5, null, null, null, null, null, "Martial Melee", 2 }, + { 21, 10, 3, "You have disadvantage when you use a lance to attack a target within 5 feet of you. Also, a lance requires two hands to wield when you aren�t mounted.", 1, 12, "Lance", null, 5, null, null, null, null, null, "Martial Melee", 6 }, + { 23, 10, 3, null, 2, 6, "Maul", null, 5, null, null, null, null, null, "Martial Melee", 10 }, + { 24, 15, 3, null, 1, 8, "Morningstar", null, 5, null, null, null, null, null, "Martial Melee", 4 }, + { 25, 5, 3, null, 1, 10, "Pike", null, 5, null, null, null, null, null, "Martial Melee", 18 }, + { 27, 25, 3, null, 1, 6, "Scimitar", null, 5, null, null, null, null, null, "Martial Melee", 3 }, + { 34, 75, 3, null, 1, 6, "Crossbow, hand", null, 5, null, null, null, null, null, "Martial Ranged", 3 }, + { 29, 5, 3, null, 1, 6, "Trident", null, 5, 60, 20, null, null, null, "Martial Melee", 4 }, + { 30, 5, 3, null, 1, 8, "War pick", null, 5, null, null, null, null, null, "Martial Melee", 2 }, + { 31, 15, 3, null, 1, 8, "Warhammer", null, 5, null, null, null, 1, 10, "Martial Melee", 2 }, + { 32, 2, 3, null, 1, 4, "Whip", null, 5, null, null, null, null, null, "Martial Melee", 3 }, + { 33, 10, 3, null, 1, 1, "Blowgun", null, 5, null, null, null, null, null, "Martial Ranged", 1 }, + { 20, 20, 3, null, 1, 10, "Halberd", null, 5, null, null, null, null, null, "Martial Melee", 6 }, + { 35, 50, 3, null, 1, 10, "Crossbow, heavy", null, 5, null, null, null, null, null, "Martial Ranged", 18 }, + { 28, 10, 3, null, 1, 6, "Shortsword", null, 5, null, null, null, null, null, "Martial Melee", 2 }, + { 19, 50, 3, null, 2, 6, "Greatsword", null, 5, null, null, null, null, null, "Martial Melee", 6 }, + { 3, 2, 1, null, 1, 8, "Greatclub", null, 5, null, null, null, null, null, "Simple Melee", 10 }, + { 17, 20, 3, null, 1, 10, "Glaive", null, 5, null, null, null, null, null, "Martial Melee", 6 }, + { 36, 50, 3, null, 1, 8, "Longbow", null, 5, null, null, null, null, null, "Martial Ranged", 2 } + }); + + migrationBuilder.InsertData( + table: "Weapons", + columns: new[] { "Id", "Cost", "CurrencyType", "Description", "DiceCount", "DiceValue", "Name", "RangeLong", "RangeMeele", "RangeThrowLong", "RangeThrowNormal", "TwoHandDamageType", "TwoHandDiceCount", "TwoHandDiceValue", "WeaponType", "Weight" }, + values: new object[,] + { + { 1, 1, 1, null, 1, 4, "Club", null, 5, null, null, null, null, null, "Simple Melee", 2 }, + { 2, 2, 3, null, 1, 4, "Dagger", null, 5, 60, 20, null, null, null, "Simple Melee", 1 }, + { 4, 5, 3, null, 1, 6, "Handaxe", null, 5, 60, 20, null, null, null, "Simple Melee", 2 }, + { 5, 5, 1, null, 1, 6, "Javelin", null, 5, 120, 30, null, null, null, "Simple Melee", 2 }, + { 6, 2, 3, null, 1, 4, "Light hammer", null, 5, 60, 20, null, null, null, "Simple Melee", 2 }, + { 7, 5, 3, null, 1, 6, "Mace", null, 5, null, null, null, null, null, "Simple Melee", 4 }, + { 18, 30, 3, null, 1, 12, "Greataxe", null, 5, null, null, null, null, null, "Martial Melee", 7 }, + { 8, 2, 1, null, 1, 6, "Quarterstaff", null, 5, null, null, null, 1, 8, "Simple Melee", 4 }, + { 10, 1, 3, null, 1, 4, "Spear", null, 5, 60, 20, null, 1, 8, "Simple Melee", 3 }, + { 11, 25, 3, null, 1, 8, "Crossbow, light", null, 5, null, null, null, null, null, "Simple Ranged", 5 }, + { 12, 5, 0, null, 1, 4, "Dart", null, 5, 60, 20, null, null, null, "Simple Ranged", 0 }, + { 13, 25, 3, null, 1, 6, "Shortbow", null, 5, null, null, null, null, null, "Simple Ranged", 2 }, + { 14, 1, 1, null, 1, 4, "Sling", null, 5, null, null, null, null, null, "Simple Ranged", 0 }, + { 15, 10, 3, null, 1, 8, "Battleaxe", null, 5, null, null, null, 1, 10, "Martial Melee", 4 }, + { 16, 10, 3, null, 1, 8, "Flail", null, 5, null, null, null, null, null, "Martial Melee", 2 }, + { 9, 1, 3, null, 1, 4, "Sickle", null, 5, null, null, null, null, null, "Simple Melee", 2 }, + { 37, 1, 3, "A Large or smaller creature hit by a net is restrained until it is freed. A net has no effect on creatures that are formless, or creatures that are Huge or larger. A creature can use its action to make a DC 10 Strength check, freeing itself or another creature within its reach on a success. Dealing 5 slashing damage to the net (AC 10) also frees the creature without harming it, ending the effect and destroying the net. When you use an action, bonus action, or reaction to attack with a net, you can make only one attack regardless of the number of attacks you can normally make.", 1, 0, "Net", null, 5, 15, 5, null, null, null, "Martial Ranged", 3 } + }); + + migrationBuilder.InsertData( + table: "CharacterArmors", + columns: new[] { "Id", "ArmorId", "CharacterId", "InUse" }, + values: new object[,] + { + { 1, 1, 1, true }, + { 3, 2, 2, true }, + { 6, 2, 3, false }, + { 2, 3, 1, false }, + { 4, 5, 2, false }, + { 5, 6, 3, true } + }); + + migrationBuilder.InsertData( + table: "CharacterOtherEquipment", + columns: new[] { "Id", "CharacterId", "OtherEquipmentId" }, + values: new object[,] + { + { 5, 3, 6 }, + { 4, 2, 5 }, + { 2, 1, 3 }, + { 6, 3, 2 }, + { 3, 2, 2 }, + { 1, 1, 1 } + }); + + migrationBuilder.InsertData( + table: "CharacterWeapons", + columns: new[] { "Id", "CharacterId", "HoldInLeftHand", "HoldInRightHand", "InUse", "WeaponId" }, + values: new object[,] + { + { 1, 1, false, false, false, 1 }, + { 3, 2, false, true, true, 2 }, + { 2, 1, true, false, true, 4 }, + { 7, 3, false, true, true, 7 }, + { 4, 2, false, false, false, 8 }, + { 5, 3, false, false, false, 9 } + }); + + migrationBuilder.CreateIndex( + name: "IX_CharacterArmors_ArmorId", + table: "CharacterArmors", + column: "ArmorId"); + + migrationBuilder.CreateIndex( + name: "IX_CharacterArmors_CharacterId", + table: "CharacterArmors", + column: "CharacterId"); + + migrationBuilder.CreateIndex( + name: "IX_CharacterOtherEquipment_CharacterId", + table: "CharacterOtherEquipment", + column: "CharacterId"); + + migrationBuilder.CreateIndex( + name: "IX_CharacterOtherEquipment_OtherEquipmentId", + table: "CharacterOtherEquipment", + column: "OtherEquipmentId"); + + migrationBuilder.CreateIndex( + name: "IX_CharacterWeapons_CharacterId", + table: "CharacterWeapons", + column: "CharacterId"); + + migrationBuilder.CreateIndex( + name: "IX_CharacterWeapons_WeaponId", + table: "CharacterWeapons", + column: "WeaponId"); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "CharacterArmors"); + + migrationBuilder.DropTable( + name: "CharacterOtherEquipment"); + + migrationBuilder.DropTable( + name: "CharacterWeapons"); + + migrationBuilder.DropTable( + name: "Armors"); + + migrationBuilder.DropTable( + name: "OtherEquipment"); + + migrationBuilder.DropTable( + name: "Weapons"); + } + } +} diff --git a/SessionCompanion/SessionCompanion.Database/Migrations/ApplicationDbContextModelSnapshot.cs b/SessionCompanion/SessionCompanion.Database/Migrations/ApplicationDbContextModelSnapshot.cs index 7898310..08196da 100644 --- a/SessionCompanion/SessionCompanion.Database/Migrations/ApplicationDbContextModelSnapshot.cs +++ b/SessionCompanion/SessionCompanion.Database/Migrations/ApplicationDbContextModelSnapshot.cs @@ -1,4 +1,5 @@ // +using System; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; @@ -44,6 +45,216 @@ namespace SessionCompanion.Database.Migrations }); }); + modelBuilder.Entity("SessionCompanion.Database.Tables.Armor", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .UseIdentityColumn(); + + b.Property("ArmorClassBase") + .HasColumnType("nvarchar(max)"); + + b.Property("Category") + .HasColumnType("nvarchar(max)"); + + b.Property("Cost") + .HasColumnType("int"); + + b.Property("CurrencyType") + .HasColumnType("int"); + + b.Property("HaveDexterityBonus") + .HasColumnType("bit"); + + b.Property("HaveStealthDisadvantage") + .HasColumnType("bit"); + + b.Property("MinimumStrength") + .HasColumnType("int"); + + b.Property("Name") + .HasColumnType("nvarchar(max)"); + + b.Property("Weight") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("Armors"); + + b.HasData( + new + { + Id = 1, + ArmorClassBase = "11", + Category = "Light", + Cost = 5, + CurrencyType = 3, + HaveDexterityBonus = true, + HaveStealthDisadvantage = true, + MinimumStrength = 0, + Name = "Padded", + Weight = 8 + }, + new + { + Id = 2, + ArmorClassBase = "11", + Category = "Light", + Cost = 10, + CurrencyType = 3, + HaveDexterityBonus = true, + HaveStealthDisadvantage = false, + MinimumStrength = 0, + Name = "Leather", + Weight = 10 + }, + new + { + Id = 3, + ArmorClassBase = "12", + Category = "Light", + Cost = 45, + CurrencyType = 3, + HaveDexterityBonus = true, + HaveStealthDisadvantage = false, + MinimumStrength = 0, + Name = "Studded Leather", + Weight = 13 + }, + new + { + Id = 4, + ArmorClassBase = "12", + Category = "Medium", + Cost = 10, + CurrencyType = 3, + HaveDexterityBonus = true, + HaveStealthDisadvantage = false, + MinimumStrength = 0, + Name = "Hide", + Weight = 12 + }, + new + { + Id = 5, + ArmorClassBase = "13", + Category = "Medium", + Cost = 50, + CurrencyType = 3, + HaveDexterityBonus = true, + HaveStealthDisadvantage = false, + MinimumStrength = 0, + Name = "Chain Shirt", + Weight = 20 + }, + new + { + Id = 6, + ArmorClassBase = "14", + Category = "Medium", + Cost = 50, + CurrencyType = 3, + HaveDexterityBonus = true, + HaveStealthDisadvantage = true, + MinimumStrength = 0, + Name = "Scale Mail", + Weight = 45 + }, + new + { + Id = 7, + ArmorClassBase = "14", + Category = "Medium", + Cost = 400, + CurrencyType = 3, + HaveDexterityBonus = true, + HaveStealthDisadvantage = false, + MinimumStrength = 0, + Name = "Breastplate", + Weight = 20 + }, + new + { + Id = 8, + ArmorClassBase = "15", + Category = "Medium", + Cost = 750, + CurrencyType = 3, + HaveDexterityBonus = true, + HaveStealthDisadvantage = true, + MinimumStrength = 0, + Name = "Half Plate", + Weight = 40 + }, + new + { + Id = 9, + ArmorClassBase = "14", + Category = "Heavy", + Cost = 30, + CurrencyType = 3, + HaveDexterityBonus = false, + HaveStealthDisadvantage = true, + MinimumStrength = 0, + Name = "Ring Mail", + Weight = 40 + }, + new + { + Id = 10, + ArmorClassBase = "16", + Category = "Heavy", + Cost = 75, + CurrencyType = 3, + HaveDexterityBonus = false, + HaveStealthDisadvantage = true, + MinimumStrength = 13, + Name = "Chain Mail", + Weight = 55 + }, + new + { + Id = 11, + ArmorClassBase = "17", + Category = "Heavy", + Cost = 200, + CurrencyType = 3, + HaveDexterityBonus = false, + HaveStealthDisadvantage = true, + MinimumStrength = 15, + Name = "Splint", + Weight = 60 + }, + new + { + Id = 12, + ArmorClassBase = "18", + Category = "Heavy", + Cost = 1500, + CurrencyType = 3, + HaveDexterityBonus = false, + HaveStealthDisadvantage = true, + MinimumStrength = 15, + Name = "Plate", + Weight = 65 + }, + new + { + Id = 13, + ArmorClassBase = "2", + Category = "Shield", + Cost = 10, + CurrencyType = 3, + HaveDexterityBonus = false, + HaveStealthDisadvantage = false, + MinimumStrength = 0, + Name = "Shield", + Weight = 6 + }); + }); + modelBuilder.Entity("SessionCompanion.Database.Tables.Background", b => { b.Property("Id") @@ -183,6 +394,222 @@ namespace SessionCompanion.Database.Migrations }); }); + modelBuilder.Entity("SessionCompanion.Database.Tables.CharacterArmor", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .UseIdentityColumn(); + + b.Property("ArmorId") + .HasColumnType("int"); + + b.Property("CharacterId") + .HasColumnType("int"); + + b.Property("InUse") + .HasColumnType("bit"); + + b.HasKey("Id"); + + b.HasIndex("ArmorId"); + + b.HasIndex("CharacterId"); + + b.ToTable("CharacterArmors"); + + b.HasData( + new + { + Id = 1, + ArmorId = 1, + CharacterId = 1, + InUse = true + }, + new + { + Id = 2, + ArmorId = 3, + CharacterId = 1, + InUse = false + }, + new + { + Id = 3, + ArmorId = 2, + CharacterId = 2, + InUse = true + }, + new + { + Id = 4, + ArmorId = 5, + CharacterId = 2, + InUse = false + }, + new + { + Id = 5, + ArmorId = 6, + CharacterId = 3, + InUse = true + }, + new + { + Id = 6, + ArmorId = 2, + CharacterId = 3, + InUse = false + }); + }); + + modelBuilder.Entity("SessionCompanion.Database.Tables.CharacterOtherEquipment", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .UseIdentityColumn(); + + b.Property("CharacterId") + .HasColumnType("int"); + + b.Property("OtherEquipmentId") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CharacterId"); + + b.HasIndex("OtherEquipmentId"); + + b.ToTable("CharacterOtherEquipment"); + + b.HasData( + new + { + Id = 1, + CharacterId = 1, + OtherEquipmentId = 1 + }, + new + { + Id = 2, + CharacterId = 1, + OtherEquipmentId = 3 + }, + new + { + Id = 3, + CharacterId = 2, + OtherEquipmentId = 2 + }, + new + { + Id = 4, + CharacterId = 2, + OtherEquipmentId = 5 + }, + new + { + Id = 5, + CharacterId = 3, + OtherEquipmentId = 6 + }, + new + { + Id = 6, + CharacterId = 3, + OtherEquipmentId = 2 + }); + }); + + modelBuilder.Entity("SessionCompanion.Database.Tables.CharacterWeapon", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .UseIdentityColumn(); + + b.Property("CharacterId") + .HasColumnType("int"); + + b.Property("HoldInLeftHand") + .HasColumnType("bit"); + + b.Property("HoldInRightHand") + .HasColumnType("bit"); + + b.Property("InUse") + .HasColumnType("bit"); + + b.Property("WeaponId") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CharacterId"); + + b.HasIndex("WeaponId"); + + b.ToTable("CharacterWeapons"); + + b.HasData( + new + { + Id = 1, + CharacterId = 1, + HoldInLeftHand = false, + HoldInRightHand = false, + InUse = false, + WeaponId = 1 + }, + new + { + Id = 2, + CharacterId = 1, + HoldInLeftHand = true, + HoldInRightHand = false, + InUse = true, + WeaponId = 4 + }, + new + { + Id = 3, + CharacterId = 2, + HoldInLeftHand = false, + HoldInRightHand = true, + InUse = true, + WeaponId = 2 + }, + new + { + Id = 4, + CharacterId = 2, + HoldInLeftHand = false, + HoldInRightHand = false, + InUse = false, + WeaponId = 8 + }, + new + { + Id = 5, + CharacterId = 3, + HoldInLeftHand = false, + HoldInRightHand = false, + InUse = false, + WeaponId = 9 + }, + new + { + Id = 7, + CharacterId = 3, + HoldInLeftHand = false, + HoldInRightHand = true, + InUse = true, + WeaponId = 7 + }); + }); + modelBuilder.Entity("SessionCompanion.Database.Tables.Charisma", b => { b.Property("Id") @@ -255,17 +682,17 @@ namespace SessionCompanion.Database.Migrations new { Id = 1, - Name = "Warrior" + Name = "Fighter" }, new { Id = 2, - Name = "Knight" + Name = "Paladin" }, new { Id = 3, - Name = "Priest" + Name = "Cleric" }); }); @@ -407,6 +834,1112 @@ namespace SessionCompanion.Database.Migrations b.ToTable("Intelligences"); }); + modelBuilder.Entity("SessionCompanion.Database.Tables.OtherEquipment", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .UseIdentityColumn(); + + b.Property("Cost") + .HasColumnType("int"); + + b.Property("CurrencyType") + .HasColumnType("int"); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.Property("Name") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("OtherEquipment"); + + b.HasData( + new + { + Id = 1, + Cost = 2, + CurrencyType = 3, + Description = "", + Name = "Abacus" + }, + new + { + Id = 2, + Cost = 25, + CurrencyType = 3, + Description = " As an action, you can splash the contents of this vial onto a creature within 5 feet of you or throw the vial up to 20 feet, shattering it on impact. In either case, make a ranged attack against a creature or object, treating the acid as an improvised weapon. On a hit, the target takes 2d6 acid damage.", + Name = "Acid (vial)" + }, + new + { + Id = 3, + Cost = 50, + CurrencyType = 3, + Description = " This sticky, adhesive fluid ignites when exposed to air. As an action, you can throw this flask up to 20 feet, shattering it on impact. Make a ranged attack against a creature or object, treating the alchemist's fire as an improvised weapon. On a hit, the target takes 1d4 fire damage at the start of each of its turns. A creature can end this damage by using its action to make a DC 10 Dexterity check to extinguish the flames.", + Name = "Alchemist's fire (flask)" + }, + new + { + Id = 4, + Cost = 5, + CurrencyType = 0, + Description = "", + Name = "Arrow" + }, + new + { + Id = 5, + Cost = 2, + CurrencyType = 0, + Description = "", + Name = "Blowgun needle" + }, + new + { + Id = 6, + Cost = 5, + CurrencyType = 0, + Description = "", + Name = "Crossbow bolt" + }, + new + { + Id = 7, + Cost = 1, + CurrencyType = 0, + Description = "", + Name = "Sling bullet" + }, + new + { + Id = 8, + Cost = 5, + CurrencyType = 3, + Description = " A holy symbol is a representation of a god or pantheon. It might be an amulet depicting a symbol representing a deity, the same symbol carefully engraved or inlaid as an emblem on a shield, or a tiny box holding a fragment of a sacred relic. Appendix B lists the symbols commonly associated with many gods in the multiverse. A cleric or paladin can use a holy symbol as a spellcasting focus. To use the symbol in this way, the caster must hold it in hand, wear it visibly, or bear it on a shield.", + Name = "Amulet" + }, + new + { + Id = 9, + Cost = 50, + CurrencyType = 3, + Description = " A creature that drinks this vial of liquid gains advantage on saving throws against poison for 1 hour. It confers no benefit to undead or constructs.", + Name = "Antitoxin (vial)" + }, + new + { + Id = 10, + Cost = 10, + CurrencyType = 3, + Description = " An arcane focus is a special item--an orb, a crystal, a rod, a specially constructed staff, a wand-like length of wood, or some similar item--designed to channel the power of arcane spells. A sorcerer, warlock, or wizard can use such an item as a spellcasting focus.", + Name = "Crystal" + }, + new + { + Id = 11, + Cost = 20, + CurrencyType = 3, + Description = " An arcane focus is a special item--an orb, a crystal, a rod, a specially constructed staff, a wand-like length of wood, or some similar item--designed to channel the power of arcane spells. A sorcerer, warlock, or wizard can use such an item as a spellcasting focus.", + Name = "Orb" + }, + new + { + Id = 12, + Cost = 10, + CurrencyType = 3, + Description = " An arcane focus is a special item--an orb, a crystal, a rod, a specially constructed staff, a wand-like length of wood, or some similar item--designed to channel the power of arcane spells. A sorcerer, warlock, or wizard can use such an item as a spellcasting focus.", + Name = "Rod" + }, + new + { + Id = 13, + Cost = 5, + CurrencyType = 3, + Description = " An arcane focus is a special item--an orb, a crystal, a rod, a specially constructed staff, a wand-like length of wood, or some similar item--designed to channel the power of arcane spells. A sorcerer, warlock, or wizard can use such an item as a spellcasting focus.", + Name = "Staff" + }, + new + { + Id = 14, + Cost = 10, + CurrencyType = 3, + Description = " An arcane focus is a special item--an orb, a crystal, a rod, a specially constructed staff, a wand-like length of wood, or some similar item--designed to channel the power of arcane spells. A sorcerer, warlock, or wizard can use such an item as a spellcasting focus.", + Name = "Wand" + }, + new + { + Id = 15, + Cost = 2, + CurrencyType = 3, + Description = "", + Name = "Backpack" + }, + new + { + Id = 16, + Cost = 1, + CurrencyType = 3, + Description = " As an action, you can spill these tiny metal balls from their pouch to cover a level, square area that is 10 feet on a side. A creature moving across the covered area must succeed on a DC 10 Dexterity saving throw or fall prone. A creature moving through the area at half speed doesn't need to make the save.", + Name = "Ball bearings (bag of 1,000)" + }, + new + { + Id = 17, + Cost = 2, + CurrencyType = 3, + Description = "", + Name = "Barrel" + }, + new + { + Id = 18, + Cost = 4, + CurrencyType = 1, + Description = "", + Name = "Basket" + }, + new + { + Id = 19, + Cost = 1, + CurrencyType = 3, + Description = "", + Name = "Bedroll" + }, + new + { + Id = 20, + Cost = 1, + CurrencyType = 3, + Description = "", + Name = "Bell" + }, + new + { + Id = 21, + Cost = 5, + CurrencyType = 1, + Description = "", + Name = "Blanket" + }, + new + { + Id = 22, + Cost = 1, + CurrencyType = 3, + Description = " A set of pulleys with a cable threaded through them and a hook to attach to objects, a block and tackle allows you to hoist up to four times the weight you can normally lift.", + Name = "Block and tackle" + }, + new + { + Id = 23, + Cost = 25, + CurrencyType = 3, + Description = " A book might contain poetry, historical accounts, information pertaining to a particular field of lore, diagrams and notes on gnomish contraptions, or just about anything else that can be represented using text or pictures. A book of spells is a spellbook (described later in this section).", + Name = "Book" + }, + new + { + Id = 24, + Cost = 2, + CurrencyType = 3, + Description = "", + Name = "Bottle, glass" + }, + new + { + Id = 25, + Cost = 5, + CurrencyType = 0, + Description = "", + Name = "Bucket" + }, + new + { + Id = 26, + Cost = 5, + CurrencyType = 0, + Description = " As an action, you can spread a bag of caltrops to cover a square area that is 5 feet on a side. Any creature that enters the area must succeed on a DC 15 Dexterity saving throw or stop moving this turn and take 1 piercing damage. Taking this damage reduces the creature's walking speed by 10 feet until the creature regains at least 1 hit point. A creature moving through the area at half speed doesn't need to make the save.", + Name = "Caltrops" + }, + new + { + Id = 27, + Cost = 1, + CurrencyType = 0, + Description = " For 1 hour, a candle sheds bright light in a 5-foot radius and dim light for an additional 5 feet.", + Name = "Candle" + }, + new + { + Id = 28, + Cost = 1, + CurrencyType = 3, + Description = " This wooden case can hold up to twenty crossbow bolts.", + Name = "Case, crossbow bolt" + }, + new + { + Id = 29, + Cost = 1, + CurrencyType = 3, + Description = " This cylindrical leather case can hold up to ten rolled-up sheets of paper or five rolled-up sheets of parchment.", + Name = "Case, map or scroll" + }, + new + { + Id = 30, + Cost = 5, + CurrencyType = 3, + Description = " A chain has 10 hit points. It can be burst with a successful DC 20 Strength check.", + Name = "Chain (10 feet)" + }, + new + { + Id = 31, + Cost = 1, + CurrencyType = 0, + Description = "", + Name = "Chalk (1 piece)" + }, + new + { + Id = 32, + Cost = 5, + CurrencyType = 3, + Description = "", + Name = "Chest" + }, + new + { + Id = 33, + Cost = 5, + CurrencyType = 1, + Description = "", + Name = "Clothes, common" + }, + new + { + Id = 34, + Cost = 5, + CurrencyType = 3, + Description = "", + Name = "Clothes, costume" + }, + new + { + Id = 35, + Cost = 15, + CurrencyType = 3, + Description = "", + Name = "Clothes, fine" + }, + new + { + Id = 36, + Cost = 2, + CurrencyType = 3, + Description = "", + Name = "Clothes, traveler's" + }, + new + { + Id = 37, + Cost = 25, + CurrencyType = 3, + Description = " A component pouch is a small, watertight leather belt pouch that has compartments to hold all the material components and other special items you need to cast your spells, except for those components that have a specific cost (as indicated in a spell's description).", + Name = "Component pouch" + }, + new + { + Id = 38, + Cost = 2, + CurrencyType = 3, + Description = " Using a crowbar grants advantage to Strength checks where the crowbar's leverage can be applied.", + Name = "Crowbar" + }, + new + { + Id = 39, + Cost = 1, + CurrencyType = 3, + Description = " A druidic focus might be a sprig of mistletoe or holly, a wand or scepter made of yew or another special wood, a staff drawn whole out of a living tree, or a totem object incorporating feathers, fur, bones, and teeth from sacred animals. A druid can use such an object as a spellcasting focus.", + Name = "Sprig of mistletoe" + }, + new + { + Id = 40, + Cost = 1, + CurrencyType = 3, + Description = " A druidic focus might be a sprig of mistletoe or holly, a wand or scepter made of yew or another special wood, a staff drawn whole out of a living tree, or a totem object incorporating feathers, fur, bones, and teeth from sacred animals. A druid can use such an object as a spellcasting focus.", + Name = "Totem" + }, + new + { + Id = 41, + Cost = 5, + CurrencyType = 3, + Description = " A druidic focus might be a sprig of mistletoe or holly, a wand or scepter made of yew or another special wood, a staff drawn whole out of a living tree, or a totem object incorporating feathers, fur, bones, and teeth from sacred animals. A druid can use such an object as a spellcasting focus.", + Name = "Wooden staff" + }, + new + { + Id = 42, + Cost = 10, + CurrencyType = 3, + Description = " A druidic focus might be a sprig of mistletoe or holly, a wand or scepter made of yew or another special wood, a staff drawn whole out of a living tree, or a totem object incorporating feathers, fur, bones, and teeth from sacred animals. A druid can use such an object as a spellcasting focus.", + Name = "Yew wand" + }, + new + { + Id = 43, + Cost = 5, + CurrencyType = 3, + Description = " A holy symbol is a representation of a god or pantheon. It might be an amulet depicting a symbol representing a deity, the same symbol carefully engraved or inlaid as an emblem on a shield, or a tiny box holding a fragment of a sacred relic. Appendix B lists the symbols commonly associated with many gods in the multiverse. A cleric or paladin can use a holy symbol as a spellcasting focus. To use the symbol in this way, the caster must hold it in hand, wear it visibly, or bear it on a shield.", + Name = "Emblem" + }, + new + { + Id = 44, + Cost = 1, + CurrencyType = 3, + Description = " This kit includes a wooden rod, silken line, corkwood bobbers, steel hooks, lead sinkers, velvet lures, and narrow netting.", + Name = "Fishing tackle" + }, + new + { + Id = 45, + Cost = 2, + CurrencyType = 0, + Description = "", + Name = "Flask or tankard" + }, + new + { + Id = 46, + Cost = 2, + CurrencyType = 3, + Description = "", + Name = "Grappling hook" + }, + new + { + Id = 47, + Cost = 1, + CurrencyType = 3, + Description = "", + Name = "Hammer" + }, + new + { + Id = 48, + Cost = 2, + CurrencyType = 3, + Description = "", + Name = "Hammer, sledge" + }, + new + { + Id = 49, + Cost = 25, + CurrencyType = 3, + Description = " As an action, you can splash the contents of this flask onto a creature within 5 feet of you or throw it up to 20 feet, shattering it on impact. In either case, make a ranged attack against a target creature, treating the holy water as an improvised weapon. If the target is a fiend or undead, it takes 2d6 radiant damage. A cleric or paladin may create holy water by performing a special ritual. The ritual takes 1 hour to perform, uses 25 gp worth of powdered silver, and requires the caster to expend a 1st-level spell slot.", + Name = "Holy water (flask)" + }, + new + { + Id = 50, + Cost = 25, + CurrencyType = 3, + Description = "", + Name = "Hourglass" + }, + new + { + Id = 51, + Cost = 5, + CurrencyType = 3, + Description = " When you use your action to set it, this trap forms a saw-toothed steel ring that snaps shut when a creature steps on a pressure plate in the center. The trap is affixed by a heavy chain to an immobile object, such as a tree or a spike driven into the ground. A creature that steps on the plate must succeed on a DC 13 Dexterity saving throw or take 1d4 piercing damage and stop moving. Thereafter, until the creature breaks free of the trap, its movement is limited by the length of the chain (typically 3 feet long). A creature can use its action to make a DC 13 Strength check, freeing itself or another creature within its reach on a success. Each failed check deals 1 piercing damage to the trapped creature.", + Name = "Hunting trap" + }, + new + { + Id = 52, + Cost = 10, + CurrencyType = 3, + Description = "", + Name = "Ink (1 ounce bottle)" + }, + new + { + Id = 53, + Cost = 2, + CurrencyType = 0, + Description = "", + Name = "Ink pen" + }, + new + { + Id = 54, + Cost = 2, + CurrencyType = 0, + Description = "", + Name = "Jug or pitcher" + }, + new + { + Id = 55, + Cost = 25, + CurrencyType = 3, + Description = " A climber's kit includes special pitons, boot tips, gloves, and a harness. You can use the climber's kit as an action to anchor yourself; when you do, you can't fall more than 25 feet from the point where you anchored yourself, and you can't climb more than 25 feet away from that point without undoing the anchor.", + Name = "Climber's Kit" + }, + new + { + Id = 56, + Cost = 25, + CurrencyType = 3, + Description = " This pouch of cosmetics, hair dye, and small props lets you create disguises that change your physical appearance. Proficiency with this kit lets you add your proficiency bonus to any ability checks you make to create a visual disguise.", + Name = "Disguise Kit" + }, + new + { + Id = 57, + Cost = 15, + CurrencyType = 3, + Description = " This small box contains a variety of papers and parchments, pens and inks, seals and sealing wax, gold and silver leaf, and other supplies necessary to create convincing forgeries of physical documents. Proficiency with this kit lets you add your proficiency bonus to any ability checks you make to create a physical forgery of a document.", + Name = "Forgery Kit" + }, + new + { + Id = 58, + Cost = 5, + CurrencyType = 3, + Description = " This kit contains a variety of instruments such as clippers, mortar and pestle, and pouches and vials used by herbalists to create remedies and potions. Proficiency with this kit lets you add your proficiency bonus to any ability checks you make to identify or apply herbs. Also, proficiency with this kit is required to create antitoxin and potions of healing.", + Name = "Herbalism Kit" + }, + new + { + Id = 59, + Cost = 5, + CurrencyType = 3, + Description = " This kit is a leather pouch containing bandages, salves, and splints. The kit has ten uses. As an action, you can expend one use of the kit to stabilize a creature that has 0 hit points, without needing to make a Wisdom (Medicine) check.", + Name = "Healer's Kit" + }, + new + { + Id = 60, + Cost = 2, + CurrencyType = 1, + Description = " This tin box contains a cup and simple cutlery. The box clamps together, and one side can be used as a cooking pan and the other as a plate or shallow bowl.", + Name = "Mess Kit" + }, + new + { + Id = 61, + Cost = 50, + CurrencyType = 3, + Description = " A poisoner's kit includes the vials, chemicals, and other equipment necessary for the creation of poisons. Proficiency with this kit lets you add your proficiency bonus to any ability checks you make to craft or use poisons.", + Name = "Poisoner's Kit" + }, + new + { + Id = 62, + Cost = 1, + CurrencyType = 1, + Description = "", + Name = "Ladder (10-foot)" + }, + new + { + Id = 63, + Cost = 5, + CurrencyType = 1, + Description = " A lamp casts bright light in a 15-foot radius and dim light for an additional 30 feet. Once lit, it burns for 6 hours on a flask (1 pint) of oil.", + Name = "Lamp" + }, + new + { + Id = 64, + Cost = 10, + CurrencyType = 3, + Description = " A bullseye lantern casts bright light in a 60-foot cone and dim light for an additional 60 feet. Once lit, it burns for 6 hours on a flask (1 pint) of oil.", + Name = "Lantern, bullseye" + }, + new + { + Id = 65, + Cost = 5, + CurrencyType = 3, + Description = " A hooded lantern casts bright light in a 30-foot radius and dim light for an additional 30 feet. Once lit, it burns for 6 hours on a flask (1 pint) of oil. As an action, you can lower the hood, reducing the light to dim light in a 5-foot radius.", + Name = "Lantern, hooded" + }, + new + { + Id = 66, + Cost = 10, + CurrencyType = 3, + Description = " A key is provided with the lock. Without the key, a creature proficient with thieves' tools can pick this lock with a successful DC 15 Dexterity check. Your GM may decide that better locks are available for higher prices.", + Name = "Lock" + }, + new + { + Id = 67, + Cost = 100, + CurrencyType = 3, + Description = " This lens allows a closer look at small objects. It is also useful as a substitute for flint and steel when starting fires. Lighting a fire with a magnifying glass requires light as bright as sunlight to focus, tinder to ignite, and about 5 minutes for the fire to ignite. A magnifying glass grants advantage on any ability check made to appraise or inspect an item that is small or highly detailed.", + Name = "Magnifying glass" + }, + new + { + Id = 68, + Cost = 2, + CurrencyType = 3, + Description = " These metal restraints can bind a Small or Medium creature. Escaping the manacles requires a successful DC 20 Dexterity check. Breaking them requires a successful DC 20 Strength check. Each set of manacles comes with one key. Without the key, a creature proficient with thieves' tools can pick the manacles' lock with a successful DC 15 Dexterity check. Manacles have 15 hit points.", + Name = "Manacles" + }, + new + { + Id = 69, + Cost = 5, + CurrencyType = 3, + Description = "", + Name = "Mirror, steel" + }, + new + { + Id = 70, + Cost = 1, + CurrencyType = 1, + Description = " Oil usually comes in a clay flask that holds 1 pint. As an action, you can splash the oil in this flask onto a creature within 5 feet of you or throw it up to 20 feet, shattering it on impact. Make a ranged attack against a target creature or object, treating the oil as an improvised weapon. On a hit, the target is covered in oil. If the target takes any fire damage before the oil dries (after 1 minute), the target takes an additional 5 fire damage from the burning oil. You can also pour a flask of oil on the ground to cover a 5-foot-square area, provided that the surface is level. If lit, the oil burns for 2 rounds and deals 5 fire damage to any creature that enters the area or ends its turn in the area. A creature can take this damage only once per turn.", + Name = "Oil (flask)" + }, + new + { + Id = 71, + Cost = 2, + CurrencyType = 1, + Description = "", + Name = "Paper (one sheet)" + }, + new + { + Id = 72, + Cost = 1, + CurrencyType = 1, + Description = "", + Name = "Parchment (one sheet)" + }, + new + { + Id = 73, + Cost = 5, + CurrencyType = 3, + Description = "", + Name = "Perfume (vial)" + }, + new + { + Id = 74, + Cost = 2, + CurrencyType = 3, + Description = "", + Name = "Pick, miner's" + }, + new + { + Id = 75, + Cost = 5, + CurrencyType = 0, + Description = "", + Name = "Piton" + }, + new + { + Id = 76, + Cost = 100, + CurrencyType = 3, + Description = " You can use the poison in this vial to coat one slashing or piercing weapon or up to three pieces of ammunition. Applying the poison takes an action. A creature hit by the poisoned weapon or ammunition must make a DC 10 Constitution saving throw or take 1d4 poison damage. Once applied, the poison retains potency for 1 minute before drying.", + Name = "Poison, basic (vial)" + }, + new + { + Id = 77, + Cost = 5, + CurrencyType = 0, + Description = "", + Name = "Pole (10-foot)" + }, + new + { + Id = 78, + Cost = 2, + CurrencyType = 3, + Description = "", + Name = "Pot, iron" + }, + new + { + Id = 79, + Cost = 50, + CurrencyType = 3, + Description = " A character who drinks the magical red fluid in this vial regains 2d4 + 2 hit points. Drinking or administering a potion takes an action.", + Name = "Potion of healing" + }, + new + { + Id = 80, + Cost = 5, + CurrencyType = 1, + Description = " A cloth or leather pouch can hold up to 20 sling bullets or 50 blowgun needles, among other things. A compartmentalized pouch for holding spell components is called a component pouch (described earlier in this section).", + Name = "Pouch" + }, + new + { + Id = 81, + Cost = 1, + CurrencyType = 3, + Description = " A quiver can hold up to 20 arrows.", + Name = "Quiver" + }, + new + { + Id = 82, + Cost = 4, + CurrencyType = 3, + Description = " You can use a portable ram to break down doors. When doing so, you gain a +4 bonus on the Strength check. One other character can help you use the ram, giving you advantage on this check.", + Name = "Ram, portable" + }, + new + { + Id = 83, + Cost = 5, + CurrencyType = 1, + Description = " Rations consist of dry foods suitable for extended travel, including jerky, dried fruit, hardtack, and nuts.", + Name = "Rations (1 day)" + }, + new + { + Id = 84, + Cost = 5, + CurrencyType = 3, + Description = " A holy symbol is a representation of a god or pantheon. It might be an amulet depicting a symbol representing a deity, the same symbol carefully engraved or inlaid as an emblem on a shield, or a tiny box holding a fragment of a sacred relic. Appendix B lists the symbols commonly associated with many gods in the multiverse. A cleric or paladin can use a holy symbol as a spellcasting focus. To use the symbol in this way, the caster must hold it in hand, wear it visibly, or bear it on a shield.", + Name = "Reliquary" + }, + new + { + Id = 85, + Cost = 1, + CurrencyType = 3, + Description = "", + Name = "Robes" + }, + new + { + Id = 86, + Cost = 1, + CurrencyType = 3, + Description = " Rope, whether made of hemp or silk, has 2 hit points and can be burst with a DC 17 Strength check.", + Name = "Rope, hempen (50 feet)" + }, + new + { + Id = 87, + Cost = 10, + CurrencyType = 3, + Description = " Rope, whether made of hemp or silk, has 2 hit points and can be burst with a DC 17 Strength check.", + Name = "Rope, silk (50 feet)" + }, + new + { + Id = 88, + Cost = 1, + CurrencyType = 0, + Description = "", + Name = "Sack" + }, + new + { + Id = 89, + Cost = 5, + CurrencyType = 3, + Description = " A scale includes a small balance, pans, and a suitable assortment of weights up to 2 pounds. With it, you can measure the exact weight of small objects, such as raw precious metals or trade goods, to help determine their worth.", + Name = "Scale, merchant's" + }, + new + { + Id = 90, + Cost = 5, + CurrencyType = 1, + Description = "", + Name = "Sealing wax" + }, + new + { + Id = 91, + Cost = 2, + CurrencyType = 3, + Description = "", + Name = "Shovel" + }, + new + { + Id = 92, + Cost = 5, + CurrencyType = 0, + Description = "", + Name = "Signal whistle" + }, + new + { + Id = 93, + Cost = 5, + CurrencyType = 3, + Description = "", + Name = "Signet ring" + }, + new + { + Id = 94, + Cost = 2, + CurrencyType = 0, + Description = "", + Name = "Soap" + }, + new + { + Id = 95, + Cost = 50, + CurrencyType = 3, + Description = " Essential for wizards, a spellbook is a leather-bound tome with 100 blank vellum pages suitable for recording spells.", + Name = "Spellbook" + }, + new + { + Id = 96, + Cost = 1, + CurrencyType = 1, + Description = "", + Name = "Spike, iron" + }, + new + { + Id = 97, + Cost = 1000, + CurrencyType = 3, + Description = " Objects viewed through a spyglass are magnified to twice their size.", + Name = "Spyglass" + }, + new + { + Id = 98, + Cost = 2, + CurrencyType = 3, + Description = " A simple and portable canvas shelter, a tent sleeps two.", + Name = "Tent, two-person" + }, + new + { + Id = 99, + Cost = 5, + CurrencyType = 1, + Description = " This small container holds flint, fire steel, and tinder (usually dry cloth soaked in light oil) used to kindle a fire. Using it to light a torch--or anything else with abundant, exposed fuel--takes an action. Lighting any other fire takes 1 minute.", + Name = "Tinderbox" + }, + new + { + Id = 100, + Cost = 1, + CurrencyType = 0, + Description = " A torch burns for 1 hour, providing bright light in a 20-foot radius and dim light for an additional 20 feet. If you make a melee attack with a burning torch and hit, it deals 1 fire damage.", + Name = "Torch" + }, + new + { + Id = 101, + Cost = 1, + CurrencyType = 3, + Description = "", + Name = "Vial" + }, + new + { + Id = 102, + Cost = 2, + CurrencyType = 1, + Description = "", + Name = "Waterskin" + }, + new + { + Id = 103, + Cost = 1, + CurrencyType = 0, + Description = "", + Name = "Whetstone" + }, + new + { + Id = 104, + Cost = 16, + CurrencyType = 3, + Description = "", + Name = "Burglar's Pack" + }, + new + { + Id = 105, + Cost = 50, + CurrencyType = 3, + Description = " These special tools include the items needed to pursue a craft or trade. The table shows examples of the most common types of tools, each providing items related to a single craft. Proficiency with a set of artisan's tools lets you add your proficiency bonus to any ability checks you make using the tools in your craft. Each type of artisan's tools requires a separate proficiency.", + Name = "Alchemist's supplies" + }, + new + { + Id = 106, + Cost = 20, + CurrencyType = 3, + Description = " These special tools include the items needed to pursue a craft or trade. The table shows examples of the most common types of tools, each providing items related to a single craft. Proficiency with a set of artisan's tools lets you add your proficiency bonus to any ability checks you make using the tools in your craft. Each type of artisan's tools requires a separate proficiency.", + Name = "Brewer's supplies" + }, + new + { + Id = 107, + Cost = 10, + CurrencyType = 3, + Description = " These special tools include the items needed to pursue a craft or trade. The table shows examples of the most common types of tools, each providing items related to a single craft. Proficiency with a set of artisan's tools lets you add your proficiency bonus to any ability checks you make using the tools in your craft. Each type of artisan's tools requires a separate proficiency.", + Name = "Calligrapher's supplies" + }, + new + { + Id = 108, + Cost = 8, + CurrencyType = 3, + Description = " These special tools include the items needed to pursue a craft or trade. The table shows examples of the most common types of tools, each providing items related to a single craft. Proficiency with a set of artisan's tools lets you add your proficiency bonus to any ability checks you make using the tools in your craft. Each type of artisan's tools requires a separate proficiency.", + Name = "Carpenter's tools" + }, + new + { + Id = 109, + Cost = 15, + CurrencyType = 3, + Description = " These special tools include the items needed to pursue a craft or trade. The table shows examples of the most common types of tools, each providing items related to a single craft. Proficiency with a set of artisan's tools lets you add your proficiency bonus to any ability checks you make using the tools in your craft. Each type of artisan's tools requires a separate proficiency.", + Name = "Cartographer's tools" + }, + new + { + Id = 110, + Cost = 5, + CurrencyType = 3, + Description = " These special tools include the items needed to pursue a craft or trade. The table shows examples of the most common types of tools, each providing items related to a single craft. Proficiency with a set of artisan's tools lets you add your proficiency bonus to any ability checks you make using the tools in your craft. Each type of artisan's tools requires a separate proficiency.", + Name = "Cobbler's tools" + }, + new + { + Id = 111, + Cost = 1, + CurrencyType = 3, + Description = " These special tools include the items needed to pursue a craft or trade. The table shows examples of the most common types of tools, each providing items related to a single craft. Proficiency with a set of artisan's tools lets you add your proficiency bonus to any ability checks you make using the tools in your craft. Each type of artisan's tools requires a separate proficiency.", + Name = "Cook's utensils" + }, + new + { + Id = 112, + Cost = 30, + CurrencyType = 3, + Description = " These special tools include the items needed to pursue a craft or trade. The table shows examples of the most common types of tools, each providing items related to a single craft. Proficiency with a set of artisan's tools lets you add your proficiency bonus to any ability checks you make using the tools in your craft. Each type of artisan's tools requires a separate proficiency.", + Name = "Glassblower's tools" + }, + new + { + Id = 113, + Cost = 25, + CurrencyType = 3, + Description = " These special tools include the items needed to pursue a craft or trade. The table shows examples of the most common types of tools, each providing items related to a single craft. Proficiency with a set of artisan's tools lets you add your proficiency bonus to any ability checks you make using the tools in your craft. Each type of artisan's tools requires a separate proficiency.", + Name = "Jeweler's tools" + }, + new + { + Id = 114, + Cost = 5, + CurrencyType = 3, + Description = " These special tools include the items needed to pursue a craft or trade. The table shows examples of the most common types of tools, each providing items related to a single craft. Proficiency with a set of artisan's tools lets you add your proficiency bonus to any ability checks you make using the tools in your craft. Each type of artisan's tools requires a separate proficiency.", + Name = "Leatherworker's tools" + }, + new + { + Id = 115, + Cost = 10, + CurrencyType = 3, + Description = " These special tools include the items needed to pursue a craft or trade. The table shows examples of the most common types of tools, each providing items related to a single craft. Proficiency with a set of artisan's tools lets you add your proficiency bonus to any ability checks you make using the tools in your craft. Each type of artisan's tools requires a separate proficiency.", + Name = "Mason's tools" + }, + new + { + Id = 116, + Cost = 10, + CurrencyType = 3, + Description = " These special tools include the items needed to pursue a craft or trade. The table shows examples of the most common types of tools, each providing items related to a single craft. Proficiency with a set of artisan's tools lets you add your proficiency bonus to any ability checks you make using the tools in your craft. Each type of artisan's tools requires a separate proficiency.", + Name = "Painter's supplies" + }, + new + { + Id = 117, + Cost = 10, + CurrencyType = 3, + Description = " These special tools include the items needed to pursue a craft or trade. The table shows examples of the most common types of tools, each providing items related to a single craft. Proficiency with a set of artisan's tools lets you add your proficiency bonus to any ability checks you make using the tools in your craft. Each type of artisan's tools requires a separate proficiency.", + Name = "Potter's tools" + }, + new + { + Id = 118, + Cost = 20, + CurrencyType = 3, + Description = " These special tools include the items needed to pursue a craft or trade. The table shows examples of the most common types of tools, each providing items related to a single craft. Proficiency with a set of artisan's tools lets you add your proficiency bonus to any ability checks you make using the tools in your craft. Each type of artisan's tools requires a separate proficiency.", + Name = "Smith's tools" + }, + new + { + Id = 119, + Cost = 50, + CurrencyType = 3, + Description = " These special tools include the items needed to pursue a craft or trade. The table shows examples of the most common types of tools, each providing items related to a single craft. Proficiency with a set of artisan's tools lets you add your proficiency bonus to any ability checks you make using the tools in your craft. Each type of artisan's tools requires a separate proficiency.", + Name = "Tinker's tools" + }, + new + { + Id = 120, + Cost = 1, + CurrencyType = 3, + Description = " These special tools include the items needed to pursue a craft or trade. The table shows examples of the most common types of tools, each providing items related to a single craft. Proficiency with a set of artisan's tools lets you add your proficiency bonus to any ability checks you make using the tools in your craft. Each type of artisan's tools requires a separate proficiency.", + Name = "Weaver's tools" + }, + new + { + Id = 121, + Cost = 1, + CurrencyType = 3, + Description = " These special tools include the items needed to pursue a craft or trade. The table shows examples of the most common types of tools, each providing items related to a single craft. Proficiency with a set of artisan's tools lets you add your proficiency bonus to any ability checks you make using the tools in your craft. Each type of artisan's tools requires a separate proficiency.", + Name = "Woodcarver's tools" + }, + new + { + Id = 122, + Cost = 1, + CurrencyType = 1, + Description = " This item encompasses a wide range of game pieces, including dice and decks of cards (for games such as Three-Dragon Ante). A few common examples appear on the Tools table, but other kinds of gaming sets exist. If you are proficient with a gaming set, you can add your proficiency bonus to ability checks you make to play a game with that set. Each type of gaming set requires a separate proficiency.", + Name = "Dice set" + }, + new + { + Id = 123, + Cost = 5, + CurrencyType = 1, + Description = " This item encompasses a wide range of game pieces, including dice and decks of cards (for games such as Three-Dragon Ante). A few common examples appear on the Tools table, but other kinds of gaming sets exist. If you are proficient with a gaming set, you can add your proficiency bonus to ability checks you make to play a game with that set. Each type of gaming set requires a separate proficiency.", + Name = "Playing card set" + }, + new + { + Id = 124, + Cost = 30, + CurrencyType = 3, + Description = " Several of the most common types of musical instruments are shown on the table as examples. If you have proficiency with a given musical instrument, you can add your proficiency bonus to any ability checks you make to play music with the instrument. A bard can use a musical instrument as a spellcasting focus. Each type of musical instrument requires a separate proficiency.", + Name = "Bagpipes" + }, + new + { + Id = 125, + Cost = 6, + CurrencyType = 3, + Description = " Several of the most common types of musical instruments are shown on the table as examples. If you have proficiency with a given musical instrument, you can add your proficiency bonus to any ability checks you make to play music with the instrument. A bard can use a musical instrument as a spellcasting focus. Each type of musical instrument requires a separate proficiency.", + Name = "Drum" + }, + new + { + Id = 126, + Cost = 25, + CurrencyType = 3, + Description = " Several of the most common types of musical instruments are shown on the table as examples. If you have proficiency with a given musical instrument, you can add your proficiency bonus to any ability checks you make to play music with the instrument. A bard can use a musical instrument as a spellcasting focus. Each type of musical instrument requires a separate proficiency.", + Name = "Dulcimer" + }, + new + { + Id = 127, + Cost = 2, + CurrencyType = 3, + Description = " Several of the most common types of musical instruments are shown on the table as examples. If you have proficiency with a given musical instrument, you can add your proficiency bonus to any ability checks you make to play music with the instrument. A bard can use a musical instrument as a spellcasting focus. Each type of musical instrument requires a separate proficiency.", + Name = "Flute" + }, + new + { + Id = 128, + Cost = 35, + CurrencyType = 3, + Description = " Several of the most common types of musical instruments are shown on the table as examples. If you have proficiency with a given musical instrument, you can add your proficiency bonus to any ability checks you make to play music with the instrument. A bard can use a musical instrument as a spellcasting focus. Each type of musical instrument requires a separate proficiency.", + Name = "Lute" + }, + new + { + Id = 129, + Cost = 30, + CurrencyType = 3, + Description = " Several of the most common types of musical instruments are shown on the table as examples. If you have proficiency with a given musical instrument, you can add your proficiency bonus to any ability checks you make to play music with the instrument. A bard can use a musical instrument as a spellcasting focus. Each type of musical instrument requires a separate proficiency.", + Name = "Lyre" + }, + new + { + Id = 130, + Cost = 3, + CurrencyType = 3, + Description = " Several of the most common types of musical instruments are shown on the table as examples. If you have proficiency with a given musical instrument, you can add your proficiency bonus to any ability checks you make to play music with the instrument. A bard can use a musical instrument as a spellcasting focus. Each type of musical instrument requires a separate proficiency.", + Name = "Horn" + }, + new + { + Id = 131, + Cost = 12, + CurrencyType = 3, + Description = " Several of the most common types of musical instruments are shown on the table as examples. If you have proficiency with a given musical instrument, you can add your proficiency bonus to any ability checks you make to play music with the instrument. A bard can use a musical instrument as a spellcasting focus. Each type of musical instrument requires a separate proficiency.", + Name = "Pan flute" + }, + new + { + Id = 132, + Cost = 2, + CurrencyType = 3, + Description = " Several of the most common types of musical instruments are shown on the table as examples. If you have proficiency with a given musical instrument, you can add your proficiency bonus to any ability checks you make to play music with the instrument. A bard can use a musical instrument as a spellcasting focus. Each type of musical instrument requires a separate proficiency.", + Name = "Shawm" + }, + new + { + Id = 133, + Cost = 30, + CurrencyType = 3, + Description = " Several of the most common types of musical instruments are shown on the table as examples. If you have proficiency with a given musical instrument, you can add your proficiency bonus to any ability checks you make to play music with the instrument. A bard can use a musical instrument as a spellcasting focus. Each type of musical instrument requires a separate proficiency.", + Name = "Viol" + }, + new + { + Id = 134, + Cost = 25, + CurrencyType = 3, + Description = " This set of instruments is used for navigation at sea. Proficiency with navigator's tools lets you chart a ship's course and follow navigation charts. In addition, these tools allow you to add your proficiency bonus to any ability check you make to avoid getting lost at sea.", + Name = "Navigator's tools" + }, + new + { + Id = 135, + Cost = 25, + CurrencyType = 3, + Description = " This set of tools includes a small file, a set of lock picks, a small mirror mounted on a metal handle, a set of narrow-bladed scissors, and a pair of pliers. Proficiency with these tools lets you add your proficiency bonus to any ability checks you make to disarm traps or open locks.", + Name = "Thieves' tools" + }); + }); + modelBuilder.Entity("SessionCompanion.Database.Tables.Race", b => { b.Property("Id") @@ -596,6 +2129,537 @@ namespace SessionCompanion.Database.Migrations }); }); + modelBuilder.Entity("SessionCompanion.Database.Tables.Weapon", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .UseIdentityColumn(); + + b.Property("Cost") + .HasColumnType("int"); + + b.Property("CurrencyType") + .HasColumnType("int"); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.Property("DiceCount") + .HasColumnType("int"); + + b.Property("DiceValue") + .HasColumnType("int"); + + b.Property("Name") + .HasColumnType("nvarchar(max)"); + + b.Property("RangeLong") + .HasColumnType("int"); + + b.Property("RangeMeele") + .HasColumnType("int"); + + b.Property("RangeThrowLong") + .HasColumnType("int"); + + b.Property("RangeThrowNormal") + .HasColumnType("int"); + + b.Property("TwoHandDamageType") + .HasColumnType("nvarchar(max)"); + + b.Property("TwoHandDiceCount") + .HasColumnType("int"); + + b.Property("TwoHandDiceValue") + .HasColumnType("int"); + + b.Property("WeaponType") + .HasColumnType("nvarchar(max)"); + + b.Property("Weight") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("Weapons"); + + b.HasData( + new + { + Id = 1, + Cost = 1, + CurrencyType = 1, + DiceCount = 1, + DiceValue = 4, + Name = "Club", + RangeMeele = 5, + WeaponType = "Simple Melee", + Weight = 2 + }, + new + { + Id = 2, + Cost = 2, + CurrencyType = 3, + DiceCount = 1, + DiceValue = 4, + Name = "Dagger", + RangeMeele = 5, + RangeThrowLong = 60, + RangeThrowNormal = 20, + WeaponType = "Simple Melee", + Weight = 1 + }, + new + { + Id = 3, + Cost = 2, + CurrencyType = 1, + DiceCount = 1, + DiceValue = 8, + Name = "Greatclub", + RangeMeele = 5, + WeaponType = "Simple Melee", + Weight = 10 + }, + new + { + Id = 4, + Cost = 5, + CurrencyType = 3, + DiceCount = 1, + DiceValue = 6, + Name = "Handaxe", + RangeMeele = 5, + RangeThrowLong = 60, + RangeThrowNormal = 20, + WeaponType = "Simple Melee", + Weight = 2 + }, + new + { + Id = 5, + Cost = 5, + CurrencyType = 1, + DiceCount = 1, + DiceValue = 6, + Name = "Javelin", + RangeMeele = 5, + RangeThrowLong = 120, + RangeThrowNormal = 30, + WeaponType = "Simple Melee", + Weight = 2 + }, + new + { + Id = 6, + Cost = 2, + CurrencyType = 3, + DiceCount = 1, + DiceValue = 4, + Name = "Light hammer", + RangeMeele = 5, + RangeThrowLong = 60, + RangeThrowNormal = 20, + WeaponType = "Simple Melee", + Weight = 2 + }, + new + { + Id = 7, + Cost = 5, + CurrencyType = 3, + DiceCount = 1, + DiceValue = 6, + Name = "Mace", + RangeMeele = 5, + WeaponType = "Simple Melee", + Weight = 4 + }, + new + { + Id = 8, + Cost = 2, + CurrencyType = 1, + DiceCount = 1, + DiceValue = 6, + Name = "Quarterstaff", + RangeMeele = 5, + TwoHandDiceCount = 1, + TwoHandDiceValue = 8, + WeaponType = "Simple Melee", + Weight = 4 + }, + new + { + Id = 9, + Cost = 1, + CurrencyType = 3, + DiceCount = 1, + DiceValue = 4, + Name = "Sickle", + RangeMeele = 5, + WeaponType = "Simple Melee", + Weight = 2 + }, + new + { + Id = 10, + Cost = 1, + CurrencyType = 3, + DiceCount = 1, + DiceValue = 4, + Name = "Spear", + RangeMeele = 5, + RangeThrowLong = 60, + RangeThrowNormal = 20, + TwoHandDiceCount = 1, + TwoHandDiceValue = 8, + WeaponType = "Simple Melee", + Weight = 3 + }, + new + { + Id = 11, + Cost = 25, + CurrencyType = 3, + DiceCount = 1, + DiceValue = 8, + Name = "Crossbow, light", + RangeMeele = 5, + WeaponType = "Simple Ranged", + Weight = 5 + }, + new + { + Id = 12, + Cost = 5, + CurrencyType = 0, + DiceCount = 1, + DiceValue = 4, + Name = "Dart", + RangeMeele = 5, + RangeThrowLong = 60, + RangeThrowNormal = 20, + WeaponType = "Simple Ranged", + Weight = 0 + }, + new + { + Id = 13, + Cost = 25, + CurrencyType = 3, + DiceCount = 1, + DiceValue = 6, + Name = "Shortbow", + RangeMeele = 5, + WeaponType = "Simple Ranged", + Weight = 2 + }, + new + { + Id = 14, + Cost = 1, + CurrencyType = 1, + DiceCount = 1, + DiceValue = 4, + Name = "Sling", + RangeMeele = 5, + WeaponType = "Simple Ranged", + Weight = 0 + }, + new + { + Id = 15, + Cost = 10, + CurrencyType = 3, + DiceCount = 1, + DiceValue = 8, + Name = "Battleaxe", + RangeMeele = 5, + TwoHandDiceCount = 1, + TwoHandDiceValue = 10, + WeaponType = "Martial Melee", + Weight = 4 + }, + new + { + Id = 16, + Cost = 10, + CurrencyType = 3, + DiceCount = 1, + DiceValue = 8, + Name = "Flail", + RangeMeele = 5, + WeaponType = "Martial Melee", + Weight = 2 + }, + new + { + Id = 17, + Cost = 20, + CurrencyType = 3, + DiceCount = 1, + DiceValue = 10, + Name = "Glaive", + RangeMeele = 5, + WeaponType = "Martial Melee", + Weight = 6 + }, + new + { + Id = 18, + Cost = 30, + CurrencyType = 3, + DiceCount = 1, + DiceValue = 12, + Name = "Greataxe", + RangeMeele = 5, + WeaponType = "Martial Melee", + Weight = 7 + }, + new + { + Id = 19, + Cost = 50, + CurrencyType = 3, + DiceCount = 2, + DiceValue = 6, + Name = "Greatsword", + RangeMeele = 5, + WeaponType = "Martial Melee", + Weight = 6 + }, + new + { + Id = 20, + Cost = 20, + CurrencyType = 3, + DiceCount = 1, + DiceValue = 10, + Name = "Halberd", + RangeMeele = 5, + WeaponType = "Martial Melee", + Weight = 6 + }, + new + { + Id = 21, + Cost = 10, + CurrencyType = 3, + Description = "You have disadvantage when you use a lance to attack a target within 5 feet of you. Also, a lance requires two hands to wield when you aren�t mounted.", + DiceCount = 1, + DiceValue = 12, + Name = "Lance", + RangeMeele = 5, + WeaponType = "Martial Melee", + Weight = 6 + }, + new + { + Id = 22, + Cost = 15, + CurrencyType = 3, + DiceCount = 1, + DiceValue = 8, + Name = "Longsword", + RangeMeele = 5, + TwoHandDiceCount = 1, + TwoHandDiceValue = 10, + WeaponType = "Martial Melee", + Weight = 3 + }, + new + { + Id = 23, + Cost = 10, + CurrencyType = 3, + DiceCount = 2, + DiceValue = 6, + Name = "Maul", + RangeMeele = 5, + WeaponType = "Martial Melee", + Weight = 10 + }, + new + { + Id = 24, + Cost = 15, + CurrencyType = 3, + DiceCount = 1, + DiceValue = 8, + Name = "Morningstar", + RangeMeele = 5, + WeaponType = "Martial Melee", + Weight = 4 + }, + new + { + Id = 25, + Cost = 5, + CurrencyType = 3, + DiceCount = 1, + DiceValue = 10, + Name = "Pike", + RangeMeele = 5, + WeaponType = "Martial Melee", + Weight = 18 + }, + new + { + Id = 26, + Cost = 25, + CurrencyType = 3, + DiceCount = 1, + DiceValue = 8, + Name = "Rapier", + RangeMeele = 5, + WeaponType = "Martial Melee", + Weight = 2 + }, + new + { + Id = 27, + Cost = 25, + CurrencyType = 3, + DiceCount = 1, + DiceValue = 6, + Name = "Scimitar", + RangeMeele = 5, + WeaponType = "Martial Melee", + Weight = 3 + }, + new + { + Id = 28, + Cost = 10, + CurrencyType = 3, + DiceCount = 1, + DiceValue = 6, + Name = "Shortsword", + RangeMeele = 5, + WeaponType = "Martial Melee", + Weight = 2 + }, + new + { + Id = 29, + Cost = 5, + CurrencyType = 3, + DiceCount = 1, + DiceValue = 6, + Name = "Trident", + RangeMeele = 5, + RangeThrowLong = 60, + RangeThrowNormal = 20, + WeaponType = "Martial Melee", + Weight = 4 + }, + new + { + Id = 30, + Cost = 5, + CurrencyType = 3, + DiceCount = 1, + DiceValue = 8, + Name = "War pick", + RangeMeele = 5, + WeaponType = "Martial Melee", + Weight = 2 + }, + new + { + Id = 31, + Cost = 15, + CurrencyType = 3, + DiceCount = 1, + DiceValue = 8, + Name = "Warhammer", + RangeMeele = 5, + TwoHandDiceCount = 1, + TwoHandDiceValue = 10, + WeaponType = "Martial Melee", + Weight = 2 + }, + new + { + Id = 32, + Cost = 2, + CurrencyType = 3, + DiceCount = 1, + DiceValue = 4, + Name = "Whip", + RangeMeele = 5, + WeaponType = "Martial Melee", + Weight = 3 + }, + new + { + Id = 33, + Cost = 10, + CurrencyType = 3, + DiceCount = 1, + DiceValue = 1, + Name = "Blowgun", + RangeMeele = 5, + WeaponType = "Martial Ranged", + Weight = 1 + }, + new + { + Id = 34, + Cost = 75, + CurrencyType = 3, + DiceCount = 1, + DiceValue = 6, + Name = "Crossbow, hand", + RangeMeele = 5, + WeaponType = "Martial Ranged", + Weight = 3 + }, + new + { + Id = 35, + Cost = 50, + CurrencyType = 3, + DiceCount = 1, + DiceValue = 10, + Name = "Crossbow, heavy", + RangeMeele = 5, + WeaponType = "Martial Ranged", + Weight = 18 + }, + new + { + Id = 36, + Cost = 50, + CurrencyType = 3, + DiceCount = 1, + DiceValue = 8, + Name = "Longbow", + RangeMeele = 5, + WeaponType = "Martial Ranged", + Weight = 2 + }, + new + { + Id = 37, + Cost = 1, + CurrencyType = 3, + Description = "A Large or smaller creature hit by a net is restrained until it is freed. A net has no effect on creatures that are formless, or creatures that are Huge or larger. A creature can use its action to make a DC 10 Strength check, freeing itself or another creature within its reach on a success. Dealing 5 slashing damage to the net (AC 10) also frees the creature without harming it, ending the effect and destroying the net. When you use an action, bonus action, or reaction to attack with a net, you can make only one attack regardless of the number of attacks you can normally make.", + DiceCount = 1, + DiceValue = 0, + Name = "Net", + RangeMeele = 5, + RangeThrowLong = 15, + RangeThrowNormal = 5, + WeaponType = "Martial Ranged", + Weight = 3 + }); + }); + modelBuilder.Entity("SessionCompanion.Database.Tables.Wisdom", b => { b.Property("Id") @@ -710,6 +2774,63 @@ namespace SessionCompanion.Database.Migrations b.Navigation("User"); }); + modelBuilder.Entity("SessionCompanion.Database.Tables.CharacterArmor", b => + { + b.HasOne("SessionCompanion.Database.Tables.Armor", "Armor") + .WithMany("CharacterArmors") + .HasForeignKey("ArmorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("SessionCompanion.Database.Tables.Character", "Character") + .WithMany() + .HasForeignKey("CharacterId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Armor"); + + b.Navigation("Character"); + }); + + modelBuilder.Entity("SessionCompanion.Database.Tables.CharacterOtherEquipment", b => + { + b.HasOne("SessionCompanion.Database.Tables.Character", "Character") + .WithMany() + .HasForeignKey("CharacterId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("SessionCompanion.Database.Tables.OtherEquipment", "OtherEquipment") + .WithMany("CharacterOtherEquipments") + .HasForeignKey("OtherEquipmentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Character"); + + b.Navigation("OtherEquipment"); + }); + + modelBuilder.Entity("SessionCompanion.Database.Tables.CharacterWeapon", b => + { + b.HasOne("SessionCompanion.Database.Tables.Character", "Character") + .WithMany() + .HasForeignKey("CharacterId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("SessionCompanion.Database.Tables.Weapon", "Weapon") + .WithMany("CharacterWeapons") + .HasForeignKey("WeaponId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Character"); + + b.Navigation("Weapon"); + }); + modelBuilder.Entity("SessionCompanion.Database.Tables.Charisma", b => { b.HasOne("SessionCompanion.Database.Tables.Character", "Character") @@ -792,6 +2913,11 @@ namespace SessionCompanion.Database.Migrations b.Navigation("Biography"); }); + modelBuilder.Entity("SessionCompanion.Database.Tables.Armor", b => + { + b.Navigation("CharacterArmors"); + }); + modelBuilder.Entity("SessionCompanion.Database.Tables.Background", b => { b.Navigation("Biography"); @@ -821,6 +2947,11 @@ namespace SessionCompanion.Database.Migrations b.Navigation("Biography"); }); + modelBuilder.Entity("SessionCompanion.Database.Tables.OtherEquipment", b => + { + b.Navigation("CharacterOtherEquipments"); + }); + modelBuilder.Entity("SessionCompanion.Database.Tables.Race", b => { b.Navigation("Biography"); @@ -830,6 +2961,11 @@ namespace SessionCompanion.Database.Migrations { b.Navigation("Character"); }); + + modelBuilder.Entity("SessionCompanion.Database.Tables.Weapon", b => + { + b.Navigation("CharacterWeapons"); + }); #pragma warning restore 612, 618 } } diff --git a/SessionCompanion/SessionCompanion.Database/Repositories/ArmorRepository.cs b/SessionCompanion/SessionCompanion.Database/Repositories/ArmorRepository.cs new file mode 100644 index 0000000..a4b187f --- /dev/null +++ b/SessionCompanion/SessionCompanion.Database/Repositories/ArmorRepository.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace SessionCompanion.Database.Repositories +{ + using SessionCompanion.Database.Repositories.Base; + using SessionCompanion.Database.Tables; + + public class ArmorRepository : Repository, IRepository + { + public ArmorRepository(ApplicationDbContext _dbContext) : base(_dbContext) + { } + } +} diff --git a/SessionCompanion/SessionCompanion.Database/Repositories/CharacterArmorRepository.cs b/SessionCompanion/SessionCompanion.Database/Repositories/CharacterArmorRepository.cs new file mode 100644 index 0000000..e76b7d9 --- /dev/null +++ b/SessionCompanion/SessionCompanion.Database/Repositories/CharacterArmorRepository.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace SessionCompanion.Database.Repositories +{ + using SessionCompanion.Database.Repositories.Base; + using SessionCompanion.Database.Tables; + + public class CharacterArmorRepository : Repository, IRepository + { + public CharacterArmorRepository(ApplicationDbContext _dbContext) : base(_dbContext) + { } + } +} diff --git a/SessionCompanion/SessionCompanion.Database/Repositories/CharacterOtherEquipmentRepository.cs b/SessionCompanion/SessionCompanion.Database/Repositories/CharacterOtherEquipmentRepository.cs new file mode 100644 index 0000000..72b9546 --- /dev/null +++ b/SessionCompanion/SessionCompanion.Database/Repositories/CharacterOtherEquipmentRepository.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace SessionCompanion.Database.Repositories +{ + using SessionCompanion.Database.Repositories.Base; + using SessionCompanion.Database.Tables; + + public class CharacterOtherEquipmentRepository : Repository, IRepository + { + public CharacterOtherEquipmentRepository(ApplicationDbContext _dbContext) : base(_dbContext) + { } + } +} diff --git a/SessionCompanion/SessionCompanion.Database/Repositories/CharacterWeaponRepository.cs b/SessionCompanion/SessionCompanion.Database/Repositories/CharacterWeaponRepository.cs new file mode 100644 index 0000000..a5afaf2 --- /dev/null +++ b/SessionCompanion/SessionCompanion.Database/Repositories/CharacterWeaponRepository.cs @@ -0,0 +1,14 @@ +using SessionCompanion.Database.Repositories.Base; +using SessionCompanion.Database.Tables; +using System; +using System.Collections.Generic; +using System.Text; + +namespace SessionCompanion.Database.Repositories +{ + public class CharacterWeaponRepository: Repository, IRepository + { + public CharacterWeaponRepository(ApplicationDbContext _dbContext) : base(_dbContext) + { } + } +} diff --git a/SessionCompanion/SessionCompanion.Database/Repositories/OtherEquipmentRepository.cs b/SessionCompanion/SessionCompanion.Database/Repositories/OtherEquipmentRepository.cs new file mode 100644 index 0000000..1da5898 --- /dev/null +++ b/SessionCompanion/SessionCompanion.Database/Repositories/OtherEquipmentRepository.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace SessionCompanion.Database.Repositories +{ + using SessionCompanion.Database.Repositories.Base; + using SessionCompanion.Database.Tables; + + public class OtherEquipmentRepository : Repository, IRepository + { + public OtherEquipmentRepository(ApplicationDbContext _dbContext) : base(_dbContext) + { } + } +} diff --git a/SessionCompanion/SessionCompanion.Database/Repositories/WeaponRepository.cs b/SessionCompanion/SessionCompanion.Database/Repositories/WeaponRepository.cs new file mode 100644 index 0000000..6bd763d --- /dev/null +++ b/SessionCompanion/SessionCompanion.Database/Repositories/WeaponRepository.cs @@ -0,0 +1,14 @@ +using SessionCompanion.Database.Repositories.Base; +using SessionCompanion.Database.Tables; +using System; +using System.Collections.Generic; +using System.Text; + +namespace SessionCompanion.Database.Repositories +{ + public class WeaponRepository : Repository, IRepository + { + public WeaponRepository(ApplicationDbContext _dbContext) : base(_dbContext) + { } + } +} diff --git a/SessionCompanion/SessionCompanion.Database/SeedData.cs b/SessionCompanion/SessionCompanion.Database/SeedData.cs index 81a9f5e..2dbef97 100644 --- a/SessionCompanion/SessionCompanion.Database/SeedData.cs +++ b/SessionCompanion/SessionCompanion.Database/SeedData.cs @@ -66,17 +66,17 @@ namespace SessionCompanion.Database new Class { Id = 1, - Name = "Warrior" + Name = "Fighter" }, new Class { Id = 2, - Name = "Knight" + Name = "Paladin" }, new Class { Id = 3, - Name = "Priest" + Name = "Cleric" } }; return classes; @@ -232,5 +232,161 @@ namespace SessionCompanion.Database }; return characters; } + + static public List SeedCharacterWeapon() + { + List characterWeapons = new List + { + 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 SeedCharacterArmor() + { + List characterArmors = new List + { + 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 SeedCharacterOtherEquipment() + { + List characterOtherEquipment = new List + { + 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; + } } } diff --git a/SessionCompanion/SessionCompanion.Database/SeedFromJsons.cs b/SessionCompanion/SessionCompanion.Database/SeedFromJsons.cs new file mode 100644 index 0000000..162e969 --- /dev/null +++ b/SessionCompanion/SessionCompanion.Database/SeedFromJsons.cs @@ -0,0 +1,124 @@ +using SessionCompanion.Database.Tables; +using SessionCompanion.ViewModels.Enums; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace SessionCompanion.Database +{ + public static class SeedFromJsons + { + static public Weapon SingleWeaponSeeder(dynamic item) + { + Weapon weapon = new Weapon(); + + // Id + weapon.Id = item.index; + + // Name + weapon.Name = item.name; + + // Weapon type + weapon.WeaponType = item.category_range; + + // Cost + weapon.Cost = item.cost.quantity; + + // CurrnecyType + switch ((string)item.cost.unit) + { + case "sp": + weapon.CurrencyType = CurrencyType.sp; + break; + case "gp": + weapon.CurrencyType = CurrencyType.gp; + break; + } + + // DiceCount + weapon.DiceCount = item.damage.dice_count; + + // DiceValue + weapon.DiceValue = item.damage.dice_value; + + // RangeMeele + weapon.RangeMeele = item.range.normal; + + // RangeLong + weapon.RangeLong = item.range._long; + + // RangeThrow + if (item.throw_range != null) + { + weapon.RangeThrowNormal = item.throw_range.normal; + weapon.RangeThrowLong = item.throw_range._long; + } + + // Weight + weapon.Weight = item.weight; + + + // Twohand + if (item.two_hand_damage != null) + { + weapon.TwoHandDiceCount = item.two_hand_damage.dice_count; + weapon.TwoHandDiceValue = item.two_hand_damage.dice_value; + } + if (item.special != null) + weapon.Description = item.special[0]; + return weapon; + } + static public Armor SingleArmorSeeder(dynamic item, int id) + { + Armor armor = new Armor(); + + armor.Id = id; + armor.Name = item.name; + armor.Category = item.armor_category; + armor.ArmorClassBase = item.armor_class["base"]; + armor.HaveDexterityBonus = item.armor_class["dex_bonus"]; + armor.MinimumStrength = item.str_minimum; + armor.HaveStealthDisadvantage = item.stealth_disadvantage; + armor.Weight = item.weight; + armor.Cost = item.cost.quantity; + switch ((string)item.cost.unit) + { + case "sp": + armor.CurrencyType = CurrencyType.sp; + break; + case "gp": + armor.CurrencyType = CurrencyType.gp; + break; + } + + return armor; + } + static public OtherEquipment SingleOtherEquipmentSeeder(dynamic item, int id) + { + OtherEquipment otherEq = new OtherEquipment(); + + otherEq.Id = id; + otherEq.Name = item.name; + if (item.desc != null) + foreach (dynamic description in item.desc) + otherEq.Description += " " + description; + else + otherEq.Description = string.Empty; + + otherEq.Cost = item.cost.quantity; + switch ((string)item.cost.unit) + { + case "sp": + otherEq.CurrencyType = CurrencyType.sp; + break; + case "gp": + otherEq.CurrencyType = CurrencyType.gp; + break; + } + + return otherEq; + } + } +} diff --git a/SessionCompanion/SessionCompanion.Database/SessionCompanion.Database.csproj b/SessionCompanion/SessionCompanion.Database/SessionCompanion.Database.csproj index a157829..120ad3e 100644 --- a/SessionCompanion/SessionCompanion.Database/SessionCompanion.Database.csproj +++ b/SessionCompanion/SessionCompanion.Database/SessionCompanion.Database.csproj @@ -21,4 +21,8 @@ + + + + diff --git a/SessionCompanion/SessionCompanion.Database/Tables/Armor.cs b/SessionCompanion/SessionCompanion.Database/Tables/Armor.cs new file mode 100644 index 0000000..ff5bf64 --- /dev/null +++ b/SessionCompanion/SessionCompanion.Database/Tables/Armor.cs @@ -0,0 +1,21 @@ +using SessionCompanion.ViewModels.Enums; +using System.Collections.Generic; + +namespace SessionCompanion.Database.Tables +{ + + public class Armor : BaseEntity + { + public string Name { get; set; } + public string Category { get; set; } + public string ArmorClassBase {get; set; } + public bool HaveDexterityBonus { get; set; } + public int? MinimumStrength { get; set; } + public bool HaveStealthDisadvantage { get; set; } + public int Weight { get; set; } + public int Cost { get; set; } + public CurrencyType CurrencyType { get; set; } + + public virtual ICollection CharacterArmors { get; set; } + } +} diff --git a/SessionCompanion/SessionCompanion.Database/Tables/CharacterArmor.cs b/SessionCompanion/SessionCompanion.Database/Tables/CharacterArmor.cs new file mode 100644 index 0000000..734c9c0 --- /dev/null +++ b/SessionCompanion/SessionCompanion.Database/Tables/CharacterArmor.cs @@ -0,0 +1,18 @@ +namespace SessionCompanion.Database.Tables +{ + using System.ComponentModel.DataAnnotations.Schema; + + public class CharacterArmor : BaseEntity + { + [ForeignKey(nameof(Character))] + public int CharacterId { get; set; } + public virtual Character Character { get; set; } + + [ForeignKey(nameof(Armor))] + public int ArmorId { get; set; } + public virtual Armor Armor { get; set; } + + public bool InUse { get; set; } + + } +} diff --git a/SessionCompanion/SessionCompanion.Database/Tables/CharacterOtherEquipment.cs b/SessionCompanion/SessionCompanion.Database/Tables/CharacterOtherEquipment.cs new file mode 100644 index 0000000..04c9e21 --- /dev/null +++ b/SessionCompanion/SessionCompanion.Database/Tables/CharacterOtherEquipment.cs @@ -0,0 +1,15 @@ +namespace SessionCompanion.Database.Tables +{ + using System.ComponentModel.DataAnnotations.Schema; + + public class CharacterOtherEquipment : BaseEntity + { + [ForeignKey(nameof(Character))] + public int CharacterId { get; set; } + public virtual Character Character { get; set; } + + [ForeignKey(nameof(OtherEquipment))] + public int OtherEquipmentId { get; set; } + public virtual OtherEquipment OtherEquipment { get; set; } + } +} diff --git a/SessionCompanion/SessionCompanion.Database/Tables/CharacterWeapon.cs b/SessionCompanion/SessionCompanion.Database/Tables/CharacterWeapon.cs new file mode 100644 index 0000000..93dec50 --- /dev/null +++ b/SessionCompanion/SessionCompanion.Database/Tables/CharacterWeapon.cs @@ -0,0 +1,20 @@ +using System.ComponentModel.DataAnnotations.Schema; + +namespace SessionCompanion.Database.Tables +{ + public class CharacterWeapon : BaseEntity + { + [ForeignKey(nameof(Character))] + public int CharacterId { get; set; } + public virtual Character Character { get; set; } + + [ForeignKey(nameof(Weapon))] + public int WeaponId { get; set; } + public virtual Weapon Weapon { get; set; } + + public bool InUse { get; set; } + + public bool HoldInRightHand { get; set; } + public bool HoldInLeftHand { get; set; } + } +} diff --git a/SessionCompanion/SessionCompanion.Database/Tables/OtherEquipment.cs b/SessionCompanion/SessionCompanion.Database/Tables/OtherEquipment.cs new file mode 100644 index 0000000..c03fbd1 --- /dev/null +++ b/SessionCompanion/SessionCompanion.Database/Tables/OtherEquipment.cs @@ -0,0 +1,16 @@ +using SessionCompanion.ViewModels.Enums; +using System.Collections.Generic; + +namespace SessionCompanion.Database.Tables +{ + + public class OtherEquipment : BaseEntity + { + public string Name { get; set; } + public string Description { get; set; } + public int Cost { get; set; } + public CurrencyType CurrencyType { get; set; } + + public virtual ICollection CharacterOtherEquipments { get; set; } + } +} diff --git a/SessionCompanion/SessionCompanion.Database/Tables/Weapon.cs b/SessionCompanion/SessionCompanion.Database/Tables/Weapon.cs new file mode 100644 index 0000000..9bc3d5f --- /dev/null +++ b/SessionCompanion/SessionCompanion.Database/Tables/Weapon.cs @@ -0,0 +1,29 @@ +using SessionCompanion.ViewModels.Enums; +using System.Collections.Generic; + +namespace SessionCompanion.Database.Tables +{ + public class Weapon : BaseEntity + { + public string Name { get; set; } + public int Cost { get; set; } + public int Weight { get; set; } + + public CurrencyType CurrencyType { get; set; } + public int DiceCount { get; set; } + public int DiceValue { get; set; } + public int? TwoHandDiceCount { get; set; } + public int? TwoHandDiceValue { get; set; } + public string TwoHandDamageType { get; set; } + + public string Description { get; set; } + + public string WeaponType { get; set; } + public int RangeMeele { get; set; } + public int? RangeThrowNormal { get; set; } + public int? RangeThrowLong { get; set; } + public int? RangeLong { get; set; } + + public virtual ICollection CharacterWeapons { get; set; } + } +} diff --git a/SessionCompanion/SessionCompanion.Services/Intefraces/IArmorService.cs b/SessionCompanion/SessionCompanion.Services/Intefraces/IArmorService.cs new file mode 100644 index 0000000..4df8f73 --- /dev/null +++ b/SessionCompanion/SessionCompanion.Services/Intefraces/IArmorService.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace SessionCompanion.Services.Interfaces +{ + using SessionCompanion.Database.Tables; + using SessionCompanion.Services.Base; + using SessionCompanion.ViewModels.ArmorViewModels; + + public interface IArmorService : IServiceBase + { + } +} diff --git a/SessionCompanion/SessionCompanion.Services/Intefraces/ICharacterArmorService.cs b/SessionCompanion/SessionCompanion.Services/Intefraces/ICharacterArmorService.cs new file mode 100644 index 0000000..08f0382 --- /dev/null +++ b/SessionCompanion/SessionCompanion.Services/Intefraces/ICharacterArmorService.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace SessionCompanion.Services.Interfaces +{ + using System.Threading.Tasks; + + using SessionCompanion.Database.Tables; + using SessionCompanion.Services.Base; + using SessionCompanion.ViewModels.CharacterArmorViewModels; + + public interface ICharacterArmorService : IServiceBase + { + } +} diff --git a/SessionCompanion/SessionCompanion.Services/Intefraces/ICharacterOtherEquipmentService.cs b/SessionCompanion/SessionCompanion.Services/Intefraces/ICharacterOtherEquipmentService.cs new file mode 100644 index 0000000..ec20aca --- /dev/null +++ b/SessionCompanion/SessionCompanion.Services/Intefraces/ICharacterOtherEquipmentService.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace SessionCompanion.Services.Interfaces +{ + using System.Threading.Tasks; + + using SessionCompanion.Database.Tables; + using SessionCompanion.Services.Base; + using SessionCompanion.ViewModels.CharacterOtherEquipmentViewModels; + + public interface ICharacterOtherEquipmentService : IServiceBase + { + } +} diff --git a/SessionCompanion/SessionCompanion.Services/Intefraces/ICharacterWeaponService.cs b/SessionCompanion/SessionCompanion.Services/Intefraces/ICharacterWeaponService.cs new file mode 100644 index 0000000..3ac386e --- /dev/null +++ b/SessionCompanion/SessionCompanion.Services/Intefraces/ICharacterWeaponService.cs @@ -0,0 +1,10 @@ +using SessionCompanion.Database.Tables; +using SessionCompanion.Services.Base; +using SessionCompanion.ViewModels.CharacterWeaponViewModels; + +namespace SessionCompanion.Services.Interfaces +{ + public interface ICharacterWeaponService : IServiceBase + { + } +} diff --git a/SessionCompanion/SessionCompanion.Services/Intefraces/IOtherEquipmentService.cs b/SessionCompanion/SessionCompanion.Services/Intefraces/IOtherEquipmentService.cs new file mode 100644 index 0000000..0f13254 --- /dev/null +++ b/SessionCompanion/SessionCompanion.Services/Intefraces/IOtherEquipmentService.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace SessionCompanion.Services.Interfaces +{ + using SessionCompanion.Database.Tables; + using SessionCompanion.Services.Base; + using SessionCompanion.ViewModels.OtherEquipmentViewModels; + + public interface IOtherEquipmentService : IServiceBase + { + } +} diff --git a/SessionCompanion/SessionCompanion.Services/Intefraces/IWeaponService.cs b/SessionCompanion/SessionCompanion.Services/Intefraces/IWeaponService.cs new file mode 100644 index 0000000..0c56409 --- /dev/null +++ b/SessionCompanion/SessionCompanion.Services/Intefraces/IWeaponService.cs @@ -0,0 +1,13 @@ +using SessionCompanion.Database.Tables; +using SessionCompanion.Services.Base; +using SessionCompanion.ViewModels.WeaponViewModels; +using System; +using System.Collections.Generic; +using System.Text; + +namespace SessionCompanion.Services.Interfaces +{ + public interface IWeaponService : IServiceBase + { + } +} diff --git a/SessionCompanion/SessionCompanion.Services/Profiles/ArmorProfile.cs b/SessionCompanion/SessionCompanion.Services/Profiles/ArmorProfile.cs new file mode 100644 index 0000000..598fb79 --- /dev/null +++ b/SessionCompanion/SessionCompanion.Services/Profiles/ArmorProfile.cs @@ -0,0 +1,14 @@ +using AutoMapper; +using SessionCompanion.Database.Tables; +using SessionCompanion.ViewModels.ArmorViewModels; + +namespace SessionCompanion.Services.Profiles +{ + public class ArmorProfile : Profile + { + public ArmorProfile() + { + CreateMap().ReverseMap(); + } + } +} diff --git a/SessionCompanion/SessionCompanion.Services/Profiles/CharacterArmorsProfile.cs b/SessionCompanion/SessionCompanion.Services/Profiles/CharacterArmorsProfile.cs new file mode 100644 index 0000000..a3ba8f0 --- /dev/null +++ b/SessionCompanion/SessionCompanion.Services/Profiles/CharacterArmorsProfile.cs @@ -0,0 +1,34 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace SessionCompanion.Services.Profiles +{ + using AutoMapper; + + using SessionCompanion.Database.Tables; + using SessionCompanion.ViewModels.CharacterArmorViewModels; + + public class CharacterArmorsProfile : Profile + { + public CharacterArmorsProfile() + { + CreateMap().ReverseMap(); + + CreateMap() + .ForMember(vm => vm.Name, conf => conf.MapFrom(armor => armor.Armor.Name.ToString())) + .ForMember(vm => vm.Category, conf => conf.MapFrom(armor => armor.Armor.Category.ToString())) + .ForMember( + vm => vm.ArmorClassBase, + conf => conf.MapFrom(armor => armor.Armor.ArmorClassBase.ToString())) + .ForMember(vm => vm.HaveDexterityBonus, conf => conf.MapFrom(armor => armor.Armor.HaveDexterityBonus)) + .ForMember(vm => vm.MinimumStrength, conf => conf.MapFrom(armor => armor.Armor.MinimumStrength)) + .ForMember( + vm => vm.HaveStealthDisadvantage, + conf => conf.MapFrom(armor => armor.Armor.HaveStealthDisadvantage)) + .ForMember(vm => vm.Weight, conf => conf.MapFrom(armor => armor.Armor.Weight)) + .ForMember(vm => vm.Cost, conf => conf.MapFrom(armor => armor.Armor.Cost)) + .ForMember(vm => vm.CurrencyType, conf => conf.MapFrom(armor => armor.Armor.CurrencyType)).ReverseMap(); + } + } +} diff --git a/SessionCompanion/SessionCompanion.Services/Profiles/CharacterOtherEquipmentsProfile.cs b/SessionCompanion/SessionCompanion.Services/Profiles/CharacterOtherEquipmentsProfile.cs new file mode 100644 index 0000000..cafff93 --- /dev/null +++ b/SessionCompanion/SessionCompanion.Services/Profiles/CharacterOtherEquipmentsProfile.cs @@ -0,0 +1,31 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace SessionCompanion.Services.Profiles +{ + using AutoMapper; + + using SessionCompanion.Database.Tables; + using SessionCompanion.ViewModels.CharacterOtherEquipmentViewModels; + + public class CharacterOtherEquipmentsProfile : Profile + { + public CharacterOtherEquipmentsProfile() + { + CreateMap().ReverseMap(); + + CreateMap() + .ForMember(vm => vm.Name, conf => conf.MapFrom(otherEquipment => otherEquipment.OtherEquipment.Name.ToString())) + .ForMember( + vm => vm.Description, + conf => conf.MapFrom(otherEquipment => otherEquipment.OtherEquipment.Description.ToString())) + .ForMember( + vm => vm.Cost, + conf => conf.MapFrom(otherEquipment => otherEquipment.OtherEquipment.Cost)) + .ForMember( + vm => vm.CurrencyType, + conf => conf.MapFrom(otherEquipment => otherEquipment.OtherEquipment.CurrencyType)).ReverseMap(); + } + } +} diff --git a/SessionCompanion/SessionCompanion.Services/Profiles/CharacterProfile.cs b/SessionCompanion/SessionCompanion.Services/Profiles/CharacterProfile.cs index 7f1417b..0262a5f 100644 --- a/SessionCompanion/SessionCompanion.Services/Profiles/CharacterProfile.cs +++ b/SessionCompanion/SessionCompanion.Services/Profiles/CharacterProfile.cs @@ -23,7 +23,8 @@ namespace SessionCompanion.Services.Profiles CreateMap() .ForMember(vm => vm.Name, conf => conf.MapFrom(charact => charact.Biography.Name)) .ForMember(vm => vm.Level, conf => conf.MapFrom(charact => charact.Statistics.Level)) - .ForMember(vm => vm.CurrentHealthPoints, conf => conf.MapFrom(charact => charact.Statistics.CurrentHealthPoints)).ReverseMap(); + .ForMember(vm => vm.CurrentHealthPoints, conf => conf.MapFrom(charact => charact.Statistics.CurrentHealthPoints)) + .ForMember(vm => vm.Class, conf => conf.MapFrom(charact => charact.Biography.Class.Name)).ReverseMap(); } } } diff --git a/SessionCompanion/SessionCompanion.Services/Profiles/CharacterWeaponsProfile.cs b/SessionCompanion/SessionCompanion.Services/Profiles/CharacterWeaponsProfile.cs new file mode 100644 index 0000000..825c0aa --- /dev/null +++ b/SessionCompanion/SessionCompanion.Services/Profiles/CharacterWeaponsProfile.cs @@ -0,0 +1,32 @@ +using AutoMapper; +using SessionCompanion.Database.Tables; +using SessionCompanion.ViewModels.CharacterWeaponViewModels; + +namespace SessionCompanion.Services.Profiles +{ + public class CharacterWeaponsProfile : Profile + { + public CharacterWeaponsProfile() + { + CreateMap().ReverseMap(); + + CreateMap() + .ForMember(vm => vm.Name, conf => conf.MapFrom(weapon => weapon.Weapon.Name.ToString())) + .ForMember(vm => vm.Weight, conf => conf.MapFrom(weapon => weapon.Weapon.Weight.ToString())) + .ForMember(vm => vm.HoldInRightHand, conf => conf.MapFrom(weapon => weapon.HoldInRightHand)) + .ForMember(vm => vm.HoldInLeftHand, conf => conf.MapFrom(weapon => weapon.HoldInLeftHand)) + .ForMember(vm => vm.Cost, conf => conf.MapFrom(weapon => weapon.Weapon.Cost.ToString())) + .ForMember(vm => vm.RangeMeele, conf => conf.MapFrom(weapon => weapon.Weapon.RangeMeele)) + .ForMember(vm => vm.RangeLong, conf => conf.MapFrom(weapon => weapon.Weapon.RangeLong)) + .ForMember(vm => vm.RangeThrowNormal, conf => conf.MapFrom(weapon => weapon.Weapon.RangeThrowNormal)) + .ForMember(vm => vm.RangeThrowLong, conf => conf.MapFrom(weapon => weapon.Weapon.RangeThrowLong)) + .ForMember(vm => vm.CurrencyType, conf => conf.MapFrom(weapon => weapon.Weapon.CurrencyType.ToString())) + .ForMember(vm => vm.WeaponType, conf => conf.MapFrom(weapon => weapon.Weapon.WeaponType.ToString())) + .ForMember(vm => vm.Description, conf => conf.MapFrom(weapon => weapon.Weapon.Description)) + .ForMember(vm => vm.DiceValue, conf => conf.MapFrom(weapon => weapon.Weapon.DiceValue)) + .ForMember(vm => vm.DiceCount, conf => conf.MapFrom(weapon => weapon.Weapon.DiceCount)) + .ForMember(vm => vm.TwoHandDiceValue, conf => conf.MapFrom(weapon => weapon.Weapon.TwoHandDiceValue)) + .ForMember(vm => vm.TwoHandDamageType, conf => conf.MapFrom(weapon => weapon.Weapon.TwoHandDamageType.ToString())).ReverseMap(); + } + } +} diff --git a/SessionCompanion/SessionCompanion.Services/Profiles/OtherEquipmentProfile.cs b/SessionCompanion/SessionCompanion.Services/Profiles/OtherEquipmentProfile.cs new file mode 100644 index 0000000..529e6ea --- /dev/null +++ b/SessionCompanion/SessionCompanion.Services/Profiles/OtherEquipmentProfile.cs @@ -0,0 +1,14 @@ +using AutoMapper; +using SessionCompanion.Database.Tables; +using SessionCompanion.ViewModels.OtherEquipmentViewModels; + +namespace SessionCompanion.Services.Profiles +{ + public class OtherEquipmentProfile : Profile + { + public OtherEquipmentProfile() + { + CreateMap().ReverseMap(); + } + } +} diff --git a/SessionCompanion/SessionCompanion.Services/Profiles/WeaponProfile.cs b/SessionCompanion/SessionCompanion.Services/Profiles/WeaponProfile.cs new file mode 100644 index 0000000..a0a6c69 --- /dev/null +++ b/SessionCompanion/SessionCompanion.Services/Profiles/WeaponProfile.cs @@ -0,0 +1,14 @@ +using AutoMapper; +using SessionCompanion.Database.Tables; +using SessionCompanion.ViewModels.WeaponViewModels; + +namespace SessionCompanion.Services.Profiles +{ + public class WeaponProfile : Profile + { + public WeaponProfile() + { + CreateMap().ReverseMap(); + } + } +} diff --git a/SessionCompanion/SessionCompanion.Services/Services/ArmorService.cs b/SessionCompanion/SessionCompanion.Services/Services/ArmorService.cs new file mode 100644 index 0000000..9397f8c --- /dev/null +++ b/SessionCompanion/SessionCompanion.Services/Services/ArmorService.cs @@ -0,0 +1,16 @@ +namespace SessionCompanion.Services.Services +{ + using AutoMapper; + + using SessionCompanion.Database.Repositories.Base; + using SessionCompanion.Database.Tables; + using SessionCompanion.Services.Base; + using SessionCompanion.Services.Interfaces; + using SessionCompanion.ViewModels.ArmorViewModels; + + public class ArmorService : ServiceBase, IArmorService + { + public ArmorService(IMapper mapper, IRepository repository) : base(mapper, repository) + { } + } +} diff --git a/SessionCompanion/SessionCompanion.Services/Services/CharacterArmorService.cs b/SessionCompanion/SessionCompanion.Services/Services/CharacterArmorService.cs new file mode 100644 index 0000000..8b417dd --- /dev/null +++ b/SessionCompanion/SessionCompanion.Services/Services/CharacterArmorService.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace SessionCompanion.Services.Services +{ + using System.Linq; + using System.Threading.Tasks; + + using AutoMapper; + + using Microsoft.EntityFrameworkCore; + + using SessionCompanion.Database.Repositories.Base; + using SessionCompanion.Database.Tables; + using SessionCompanion.Services.Base; + using SessionCompanion.Services.Interfaces; + using SessionCompanion.ViewModels.CharacterArmorViewModels; + + public class CharacterArmorService : ServiceBase, ICharacterArmorService + { + public CharacterArmorService(IMapper mapper, IRepository repository) : base(mapper, repository) + { } + } +} diff --git a/SessionCompanion/SessionCompanion.Services/Services/CharacterOtherEquipmentService.cs b/SessionCompanion/SessionCompanion.Services/Services/CharacterOtherEquipmentService.cs new file mode 100644 index 0000000..1d80427 --- /dev/null +++ b/SessionCompanion/SessionCompanion.Services/Services/CharacterOtherEquipmentService.cs @@ -0,0 +1,17 @@ +namespace SessionCompanion.Services.Services +{ + + using AutoMapper; + using SessionCompanion.Database.Repositories.Base; + using SessionCompanion.Database.Tables; + using SessionCompanion.Services.Base; + using SessionCompanion.Services.Interfaces; + using SessionCompanion.ViewModels.CharacterOtherEquipmentViewModels; + + public class CharacterOtherEquipmentService : ServiceBase, ICharacterOtherEquipmentService + { + public CharacterOtherEquipmentService(IMapper mapper, IRepository repository) : base(mapper, repository) + { } + + } +} diff --git a/SessionCompanion/SessionCompanion.Services/Services/CharacterService.cs b/SessionCompanion/SessionCompanion.Services/Services/CharacterService.cs index a336d42..a07f53c 100644 --- a/SessionCompanion/SessionCompanion.Services/Services/CharacterService.cs +++ b/SessionCompanion/SessionCompanion.Services/Services/CharacterService.cs @@ -46,6 +46,7 @@ namespace SessionCompanion.Services.Services { var characters = await Repository.Get(c => charactersId.Contains(c.Id)) .Include(x => x.Biography) + .ThenInclude(x => x.Class) .Include(x => x.Statistics).ToListAsync(); var result = Mapper.Map>(characters); return result; diff --git a/SessionCompanion/SessionCompanion.Services/Services/CharacterWeaponService.cs b/SessionCompanion/SessionCompanion.Services/Services/CharacterWeaponService.cs new file mode 100644 index 0000000..3dae1ac --- /dev/null +++ b/SessionCompanion/SessionCompanion.Services/Services/CharacterWeaponService.cs @@ -0,0 +1,15 @@ +using AutoMapper; +using SessionCompanion.Database.Repositories.Base; +using SessionCompanion.Database.Tables; +using SessionCompanion.Services.Base; +using SessionCompanion.Services.Interfaces; +using SessionCompanion.ViewModels.CharacterWeaponViewModels; + +namespace SessionCompanion.Services.Services +{ + public class CharacterWeaponService : ServiceBase, ICharacterWeaponService + { + public CharacterWeaponService(IMapper mapper, IRepository repository) : base(mapper, repository) + { } + } +} diff --git a/SessionCompanion/SessionCompanion.Services/Services/OtherEquipmentService.cs b/SessionCompanion/SessionCompanion.Services/Services/OtherEquipmentService.cs new file mode 100644 index 0000000..c10e425 --- /dev/null +++ b/SessionCompanion/SessionCompanion.Services/Services/OtherEquipmentService.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace SessionCompanion.Services.Services +{ + using AutoMapper; + + using SessionCompanion.Database.Repositories.Base; + using SessionCompanion.Database.Tables; + using SessionCompanion.Services.Base; + using SessionCompanion.Services.Interfaces; + using SessionCompanion.ViewModels.OtherEquipmentViewModels; + + public class OtherEquipmentService : ServiceBase, IOtherEquipmentService + { + public OtherEquipmentService(IMapper mapper, IRepository repository) : base(mapper, repository) + { } + } +} diff --git a/SessionCompanion/SessionCompanion.Services/Services/WeaponService.cs b/SessionCompanion/SessionCompanion.Services/Services/WeaponService.cs new file mode 100644 index 0000000..a3a12f4 --- /dev/null +++ b/SessionCompanion/SessionCompanion.Services/Services/WeaponService.cs @@ -0,0 +1,18 @@ +using AutoMapper; +using SessionCompanion.Database.Repositories.Base; +using SessionCompanion.Database.Tables; +using SessionCompanion.Services.Base; +using SessionCompanion.Services.Interfaces; +using SessionCompanion.ViewModels.WeaponViewModels; +using System; +using System.Collections.Generic; +using System.Text; + +namespace SessionCompanion.Services.Services +{ + public class WeaponService : ServiceBase, IWeaponService + { + public WeaponService(IMapper mapper, IRepository repository) : base(mapper, repository) + { } + } +} diff --git a/SessionCompanion/SessionCompanion.ViewModels/ArmorViewModel/ArmorViewModel.cs b/SessionCompanion/SessionCompanion.ViewModels/ArmorViewModel/ArmorViewModel.cs new file mode 100644 index 0000000..892da7c --- /dev/null +++ b/SessionCompanion/SessionCompanion.ViewModels/ArmorViewModel/ArmorViewModel.cs @@ -0,0 +1,18 @@ +namespace SessionCompanion.ViewModels.ArmorViewModels +{ + using SessionCompanion.ViewModels.Enums; + + public class ArmorViewModel + { + public int Id { get; set; } + public string Name { get; set; } + public string Category { get; set; } + public string ArmorClassBase { get; set; } + public bool HaveDexterityBonus { get; set; } + public int? MinimumStrength { get; set; } + public bool HaveStealthDisadvantage { get; set; } + public int Weight { get; set; } + public int Cost { get; set; } + public CurrencyType CurrencyType { get; set; } + } +} diff --git a/SessionCompanion/SessionCompanion.ViewModels/CharacterArmorViewModels/CharacterArmorViewModel.cs b/SessionCompanion/SessionCompanion.ViewModels/CharacterArmorViewModels/CharacterArmorViewModel.cs new file mode 100644 index 0000000..a8098de --- /dev/null +++ b/SessionCompanion/SessionCompanion.ViewModels/CharacterArmorViewModels/CharacterArmorViewModel.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace SessionCompanion.ViewModels.CharacterArmorViewModels +{ + public class CharacterArmorViewModel + { + public int Id { get; set; } + public int CharacterId { get; set; } + public int ArmorId { get; set; } + public bool InUse { get; set; } + } +} diff --git a/SessionCompanion/SessionCompanion.ViewModels/CharacterArmorViewModels/CharacterArmorViewModelDetails.cs b/SessionCompanion/SessionCompanion.ViewModels/CharacterArmorViewModels/CharacterArmorViewModelDetails.cs new file mode 100644 index 0000000..57bb3fc --- /dev/null +++ b/SessionCompanion/SessionCompanion.ViewModels/CharacterArmorViewModels/CharacterArmorViewModelDetails.cs @@ -0,0 +1,21 @@ +using SessionCompanion.ViewModels.Enums; + +namespace SessionCompanion.ViewModels.CharacterArmorViewModels +{ + public class CharacterArmorViewModelDetails + { + public int Id { get; set; } + public int CharacterId { get; set; } + public int ArmorId { get; set; } + public string Name { get; set; } + public string Category { get; set; } + public string ArmorClassBase { get; set; } + public bool HaveDexterityBonus { get; set; } + public int? MinimumStrength { get; set; } + public bool HaveStealthDisadvantage { get; set; } + public int Weight { get; set; } + public int Cost { get; set; } + public CurrencyType CurrencyType { get; set; } + public bool InUse { get; set; } + } +} diff --git a/SessionCompanion/SessionCompanion.ViewModels/CharacterOtherEquipmentViewModels/CharacterOtherEquipmentViewModel.cs b/SessionCompanion/SessionCompanion.ViewModels/CharacterOtherEquipmentViewModels/CharacterOtherEquipmentViewModel.cs new file mode 100644 index 0000000..7317779 --- /dev/null +++ b/SessionCompanion/SessionCompanion.ViewModels/CharacterOtherEquipmentViewModels/CharacterOtherEquipmentViewModel.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace SessionCompanion.ViewModels.CharacterOtherEquipmentViewModels +{ + public class CharacterOtherEquipmentViewModel + { + public int Id { get; set; } + public int CharacterId { get; set; } + public int OtherEquipmentId { get; set; } + } +} diff --git a/SessionCompanion/SessionCompanion.ViewModels/CharacterOtherEquipmentViewModels/CharacterOtherEquipmentWithDetailsViewModel.cs b/SessionCompanion/SessionCompanion.ViewModels/CharacterOtherEquipmentViewModels/CharacterOtherEquipmentWithDetailsViewModel.cs new file mode 100644 index 0000000..9e08e80 --- /dev/null +++ b/SessionCompanion/SessionCompanion.ViewModels/CharacterOtherEquipmentViewModels/CharacterOtherEquipmentWithDetailsViewModel.cs @@ -0,0 +1,15 @@ +using SessionCompanion.ViewModels.Enums; + +namespace SessionCompanion.ViewModels.CharacterOtherEquipmentViewModels +{ + public class CharacterOtherEquipmentWithDetailsViewModel + { + public int Id { get; set; } + public int CharacterId { get; set; } + public int OtherEquipmentId { get; set; } + public string Name { get; set; } + public string Description { get; set; } + public int Cost { get; set; } + public CurrencyType CurrencyType { get; set; } + } +} diff --git a/SessionCompanion/SessionCompanion.ViewModels/CharacterViewModels/CharacterBasicStatsViewModel.cs b/SessionCompanion/SessionCompanion.ViewModels/CharacterViewModels/CharacterBasicStatsViewModel.cs index 525419f..adbfafd 100644 --- a/SessionCompanion/SessionCompanion.ViewModels/CharacterViewModels/CharacterBasicStatsViewModel.cs +++ b/SessionCompanion/SessionCompanion.ViewModels/CharacterViewModels/CharacterBasicStatsViewModel.cs @@ -21,5 +21,10 @@ /// Aktualna ilość życia postaci /// public int CurrentHealthPoints { get; set; } + + /// + /// Klasa postaci + /// + public string Class { get; set; } } } diff --git a/SessionCompanion/SessionCompanion.ViewModels/CharacterWeaponsViewModels/CharacterWeaponViewModel.cs b/SessionCompanion/SessionCompanion.ViewModels/CharacterWeaponsViewModels/CharacterWeaponViewModel.cs new file mode 100644 index 0000000..50fd0d7 --- /dev/null +++ b/SessionCompanion/SessionCompanion.ViewModels/CharacterWeaponsViewModels/CharacterWeaponViewModel.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Text; + +namespace SessionCompanion.ViewModels.CharacterWeaponViewModels +{ + public class CharacterWeaponViewModel + { + public int Id { get; set; } + public int CharacterId { get; set; } + public int WeaponId { get; set; } + public bool InUse { get; set; } + public bool HoldInRightHand { get; set; } + public bool HoldInLeftHand { get; set; } + } +} diff --git a/SessionCompanion/SessionCompanion.ViewModels/CharacterWeaponsViewModels/CharacterWeaponWithWeaponsDetailsViewModel.cs b/SessionCompanion/SessionCompanion.ViewModels/CharacterWeaponsViewModels/CharacterWeaponWithWeaponsDetailsViewModel.cs new file mode 100644 index 0000000..2e42d82 --- /dev/null +++ b/SessionCompanion/SessionCompanion.ViewModels/CharacterWeaponsViewModels/CharacterWeaponWithWeaponsDetailsViewModel.cs @@ -0,0 +1,28 @@ +using SessionCompanion.ViewModels.Enums; +using System.Collections.Generic; + +namespace SessionCompanion.ViewModels.CharacterWeaponViewModels +{ + public class CharacterWeaponWithWeaponDetailsViewModel + { + public int WeaponId { get; set; } + public bool InUse { get; set; } + public string Name { get; set; } + public int Cost { get; set; } + public CurrencyType CurrencyType { get; set; } + public int Weight { get; set; } + public bool HoldInRightHand { get; set; } + public bool HoldInLeftHand { get; set; } + public int DiceCount { get; set; } + public int DiceValue { get; set; } + public int? TwoHandDiceCount { get; set; } + public int? TwoHandDiceValue { get; set; } + public string TwoHandDamageType { get; set; } + public string Description { get; set; } + public string WeaponType { get; set; } + public int RangeMeele { get; set; } + public int? RangeThrowNormal { get; set; } + public int? RangeThrowLong { get; set; } + public int? RangeLong { get; set; } + } +} diff --git a/SessionCompanion/SessionCompanion.ViewModels/Enums/CurrencyType.cs b/SessionCompanion/SessionCompanion.ViewModels/Enums/CurrencyType.cs new file mode 100644 index 0000000..f178afe --- /dev/null +++ b/SessionCompanion/SessionCompanion.ViewModels/Enums/CurrencyType.cs @@ -0,0 +1,40 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace SessionCompanion.ViewModels.Enums +{ + + /// + /// Rodzaje waluty + /// + public enum CurrencyType + { + /// + /// Bronz + /// + cp, + + /// + /// Srebro + /// + sp, + + /// + /// Elektrum + /// + ep, + + /// + /// ZÅ‚oto + /// + gp, + + /// + /// Platyna + /// + pp + } +} diff --git a/SessionCompanion/SessionCompanion.ViewModels/OtherEquipmentViewModels/OtherEquipmentViewModel.cs b/SessionCompanion/SessionCompanion.ViewModels/OtherEquipmentViewModels/OtherEquipmentViewModel.cs new file mode 100644 index 0000000..3774892 --- /dev/null +++ b/SessionCompanion/SessionCompanion.ViewModels/OtherEquipmentViewModels/OtherEquipmentViewModel.cs @@ -0,0 +1,13 @@ +namespace SessionCompanion.ViewModels.OtherEquipmentViewModels +{ + using SessionCompanion.ViewModels.Enums; + + public class OtherEquipmentViewModel + { + public int Id { get; set; } + public string Name { get; set; } + public string Description { get; set; } + public int Cost { get; set; } + public CurrencyType CurrencyType { get; set; } + } +} diff --git a/SessionCompanion/SessionCompanion.ViewModels/SessionCompanion.ViewModels.xml b/SessionCompanion/SessionCompanion.ViewModels/SessionCompanion.ViewModels.xml index 71e048b..5094690 100644 --- a/SessionCompanion/SessionCompanion.ViewModels/SessionCompanion.ViewModels.xml +++ b/SessionCompanion/SessionCompanion.ViewModels/SessionCompanion.ViewModels.xml @@ -100,6 +100,11 @@ Aktualna ilość życia postaci + + + Klasa postaci + + Identyfikator postaci @@ -305,6 +310,36 @@ Czy postać posiada biegÅ‚ość w skradaniu siÄ™ + + + Rodzaje waluty + + + + + Bronz + + + + + Srebro + + + + + Elektrum + + + + + ZÅ‚oto + + + + + Platyna + + Identyfikator inteligencji postaci diff --git a/SessionCompanion/SessionCompanion.ViewModels/WeaponViewModels/WeaponViewModel.cs b/SessionCompanion/SessionCompanion.ViewModels/WeaponViewModels/WeaponViewModel.cs new file mode 100644 index 0000000..4281d7e --- /dev/null +++ b/SessionCompanion/SessionCompanion.ViewModels/WeaponViewModels/WeaponViewModel.cs @@ -0,0 +1,29 @@ +using SessionCompanion.ViewModels.Enums; +using System.Collections.Generic; + +namespace SessionCompanion.ViewModels.WeaponViewModels +{ + public class WeaponViewModel + { + public int Id { get; set; } + public string Name { get; set; } + public int Cost { get; set; } + public int Weight { get; set; } + + public CurrencyType CurrencyType { get; set; } + public int DiceCount { get; set; } + public int DiceValue { get; set; } + + public int? TwoHandDiceCount { get; set; } + public int? TwoHandDiceValue { get; set; } + public string TwoHandDamageType { get; set; } + + public string Description { get; set; } + + public string WeaponType { get; set; } + public int RangeMeele { get; set; } + public int? RangeThrowNormal { get; set; } + public int? RangeThrowLong { get; set; } + public int? RangeLong { get; set; } + } +} diff --git a/SessionCompanion/SessionCompanion/ClientApp/.prettierrc b/SessionCompanion/SessionCompanion/ClientApp/.prettierrc new file mode 100644 index 0000000..544138b --- /dev/null +++ b/SessionCompanion/SessionCompanion/ClientApp/.prettierrc @@ -0,0 +1,3 @@ +{ + "singleQuote": true +} diff --git a/SessionCompanion/SessionCompanion/ClientApp/package-lock.json b/SessionCompanion/SessionCompanion/ClientApp/package-lock.json index e784a87..d012404 100644 --- a/SessionCompanion/SessionCompanion/ClientApp/package-lock.json +++ b/SessionCompanion/SessionCompanion/ClientApp/package-lock.json @@ -9747,6 +9747,12 @@ "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=", "dev": true }, + "prettier": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.2.1.tgz", + "integrity": "sha512-PqyhM2yCjg/oKkFPtTGUojv7gnZAoG80ttl45O6x2Ug/rMJw4wcc9k6aaf2hibP7BGVCCM33gZoGjyvt9mm16Q==", + "dev": true + }, "private": { "version": "0.1.8", "resolved": "https://registry.npmjs.org/private/-/private-0.1.8.tgz", @@ -12040,6 +12046,12 @@ } } }, + "tslint-config-prettier": { + "version": "1.18.0", + "resolved": "https://registry.npmjs.org/tslint-config-prettier/-/tslint-config-prettier-1.18.0.tgz", + "integrity": "sha512-xPw9PgNPLG3iKRxmK7DWr+Ea/SzrvfHtjFt5LBl61gk2UBG/DB9kCXRjv+xyIU1rUtnayLeMUVJBcMX8Z17nDg==", + "dev": true + }, "tsutils": { "version": "2.29.0", "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.29.0.tgz", diff --git a/SessionCompanion/SessionCompanion/ClientApp/package.json b/SessionCompanion/SessionCompanion/ClientApp/package.json index 8d97cb5..5e89112 100644 --- a/SessionCompanion/SessionCompanion/ClientApp/package.json +++ b/SessionCompanion/SessionCompanion/ClientApp/package.json @@ -53,6 +53,7 @@ "karma-coverage-istanbul-reporter": "~2.1.0", "karma-jasmine": "~2.0.1", "karma-jasmine-html-reporter": "^1.4.2", + "prettier": "2.2.1", "typescript": "3.5.3" }, "optionalDependencies": { diff --git a/SessionCompanion/SessionCompanion/ClientApp/src/app/app.component.ts b/SessionCompanion/SessionCompanion/ClientApp/src/app/app.component.ts index b7b309e..96d886d 100644 --- a/SessionCompanion/SessionCompanion/ClientApp/src/app/app.component.ts +++ b/SessionCompanion/SessionCompanion/ClientApp/src/app/app.component.ts @@ -1,9 +1,17 @@ -import { Component } from '@angular/core'; +import {Component, OnInit} from '@angular/core'; +import {SessionCompanionIconsRegistry} from './shared/sc-icons/session-companion-icons-registry.service'; @Component({ selector: 'app-root', templateUrl: './app.component.html' }) -export class AppComponent { +export class AppComponent implements OnInit{ title = 'Session Companion'; + + constructor(private iconService: SessionCompanionIconsRegistry) { + } + + ngOnInit() { + this.iconService.registerIcons(); + } } diff --git a/SessionCompanion/SessionCompanion/ClientApp/src/app/app.module.ts b/SessionCompanion/SessionCompanion/ClientApp/src/app/app.module.ts index 6bed2fc..d829109 100644 --- a/SessionCompanion/SessionCompanion/ClientApp/src/app/app.module.ts +++ b/SessionCompanion/SessionCompanion/ClientApp/src/app/app.module.ts @@ -23,9 +23,10 @@ import { import {UserService} from '../services/user.service'; import { StoreModule } from '@ngrx/store'; import { StoreDevtoolsModule } from '@ngrx/store-devtools'; -import { reducers} from './reducers'; -import {AppReducer} from './store/reducers/app.reducer'; import {environment} from '../environments/environment'; +import {reducers} from './store/models/app-state.model'; +import {CharacterService} from '../services/character.service'; +import { AbilityCardComponent } from './components/ability-card/ability-card.component'; @NgModule({ declarations: [ @@ -36,6 +37,7 @@ import {environment} from '../environments/environment'; GameMasterDashboardComponent, PlayerDashboardComponent, SelectCharacterComponent, + AbilityCardComponent, ], imports: [ BrowserModule.withServerTransition({ appId: 'ng-cli-universal' }), @@ -54,13 +56,14 @@ BrowserModule.withServerTransition({ appId: 'ng-cli-universal' }), MatSidenavModule, MatToolbarModule, MatListModule, - StoreModule.forRoot({appState: AppReducer}), + StoreModule.forRoot(reducers), StoreDevtoolsModule.instrument({ logOnly: environment.production }) ], providers: [ - UserService + UserService, + CharacterService ], bootstrap: [AppComponent] }) diff --git a/SessionCompanion/SessionCompanion/ClientApp/src/app/components/ability-card/ability-card.component.css b/SessionCompanion/SessionCompanion/ClientApp/src/app/components/ability-card/ability-card.component.css new file mode 100644 index 0000000..d728057 --- /dev/null +++ b/SessionCompanion/SessionCompanion/ClientApp/src/app/components/ability-card/ability-card.component.css @@ -0,0 +1,31 @@ +#main{ + width: 480px; + height: 480px; +} +#main>.mat-card{ + padding: 0; +} +.diagonal-line{ + width:50px; + background:linear-gradient(45deg,rgb(16 32 40 / 0%) 49%,black,#ffffff00 51%); +} +#ability-card-content{ + display: flex; + flex-wrap: wrap; + justify-content: space-around; + padding-top: 10px; + padding-bottom: 10px; +} +#skill-btn{ + border-color: black; + flex: 1 0 auto; + margin-bottom: 10px; + margin-left: 10px; + margin-right: 10px; +} +#skill-btn-divider{ + border-left: black 1px solid; + padding-right: 10px; + padding-top: 10px; + padding-bottom: 10px; +} diff --git a/SessionCompanion/SessionCompanion/ClientApp/src/app/components/ability-card/ability-card.component.html b/SessionCompanion/SessionCompanion/ClientApp/src/app/components/ability-card/ability-card.component.html new file mode 100644 index 0000000..376fea9 --- /dev/null +++ b/SessionCompanion/SessionCompanion/ClientApp/src/app/components/ability-card/ability-card.component.html @@ -0,0 +1,24 @@ +
+ + + {{ability.value}} +
+ Mod: {{ability.modification > 0? '+' + ability.modification : '-' + ability.modification}} +
+ {{ability.name}} +
+
+ ST: {{ability.savingThrows > 0? '+' + ability.savingThrows : '-' + ability.savingThrows}} +
+
+ + + + {{skill.name}} +     + + {{skill.value > 0? '+' + skill.value : '-' + skill.value}} + + +
+
diff --git a/SessionCompanion/SessionCompanion/ClientApp/src/app/components/ability-card/ability-card.component.ts b/SessionCompanion/SessionCompanion/ClientApp/src/app/components/ability-card/ability-card.component.ts new file mode 100644 index 0000000..f525ccd --- /dev/null +++ b/SessionCompanion/SessionCompanion/ClientApp/src/app/components/ability-card/ability-card.component.ts @@ -0,0 +1,19 @@ +import { Component, Input, OnInit } from '@angular/core'; +import { AbilityViewModel } from '../../../types/viewmodels/ability-viewmodels/AbilityViewModel'; + +@Component({ + selector: 'app-ability-card', + templateUrl: './ability-card.component.html', + styleUrls: ['./ability-card.component.css'], +}) +export class AbilityCardComponent implements OnInit { + @Input() ability: AbilityViewModel; + @Input() headStyle: { bgColor: string; textColor: string }; + @Input() contentStyle: { bgColor: string; textColor: string }; + + constructor() {} + + ngOnInit() { + this.ability.skills.sort((a, b) => (a.name > b.name ? 1 : -1)); + } +} diff --git a/SessionCompanion/SessionCompanion/ClientApp/src/app/components/game-master-dashboard/game-master-dashboard.component.html b/SessionCompanion/SessionCompanion/ClientApp/src/app/components/game-master-dashboard/game-master-dashboard.component.html index 6b72c96..34918b5 100644 --- a/SessionCompanion/SessionCompanion/ClientApp/src/app/components/game-master-dashboard/game-master-dashboard.component.html +++ b/SessionCompanion/SessionCompanion/ClientApp/src/app/components/game-master-dashboard/game-master-dashboard.component.html @@ -1,56 +1,96 @@ -
- - -
- -
- - - - folder - Link 1 - - - folder - Link 2 - - - folder - Link 3 - - -
- - - SessionCompanion - - - -
- - -
- - - - folder - Link 1 - - - folder - Link 2 - - - folder - Link 3 - - -
-
+
+ + +
+ +
+ + + + folder + Link 1 + + + folder + Link 2 + + + folder + Link 3 + + +
+ + + SessionCompanion + + + +
+ + +
+ + + + + {{ + loggedCharacter.name.length > 12 + ? (loggedCharacter.name | slice: 0:12) + '..' + : loggedCharacter.name + }} + + +
+
diff --git a/SessionCompanion/SessionCompanion/ClientApp/src/app/components/game-master-dashboard/game-master-dashboard.component.ts b/SessionCompanion/SessionCompanion/ClientApp/src/app/components/game-master-dashboard/game-master-dashboard.component.ts index 1b303b8..d93a20e 100644 --- a/SessionCompanion/SessionCompanion/ClientApp/src/app/components/game-master-dashboard/game-master-dashboard.component.ts +++ b/SessionCompanion/SessionCompanion/ClientApp/src/app/components/game-master-dashboard/game-master-dashboard.component.ts @@ -1,20 +1,37 @@ -import {Component, OnInit} from '@angular/core'; -import {animateText, onSideNavChange} from '../../shared/animations/sidenav-animations'; -import {GMSignalRService} from '../../shared/signalR-service/gm-signalR.service'; +import { Component, OnDestroy, OnInit } from '@angular/core'; +import { + animateText, + onSideNavChange, +} from '../../shared/animations/sidenav-animations'; +import { GMSignalRService } from '../../shared/signalR-service/gm-signalR.service'; +import { CharacterService } from '../../../services/character.service'; +import { Subscription } from 'rxjs'; +import { ErrorResponse } from '../../../types/ErrorResponse'; +import { HttpErrorResponse } from '@angular/common/http'; +import { LoggedCharactersViewModel } from '../../../types/viewmodels/character-viewmodels/LoggedCharactersViewModel'; +import { first } from 'rxjs/operators'; @Component({ selector: 'app-game-master-dashboard', templateUrl: './game-master-dashboard.component.html', styleUrls: ['./game-master-dashboard.component.css'], - animations: [onSideNavChange, animateText] + animations: [onSideNavChange, animateText], }) -export class GameMasterDashboardComponent implements OnInit { +export class GameMasterDashboardComponent implements OnInit, OnDestroy { + allSubscriptions = new Subscription(); leftSidenavExpanded = false; leftSidenavTextExpanded = false; rightSidenavExpanded = false; rightSidenavTextExpanded = false; - constructor(private signalRService: GMSignalRService) {} + loggedCharacters: LoggedCharactersViewModel[]; + + constructor( + private signalRService: GMSignalRService, + private characterService: CharacterService + ) { + this.SubscribeToEvents(); + } ngOnInit() { this.signalRService.Login(); @@ -36,4 +53,36 @@ export class GameMasterDashboardComponent implements OnInit { break; } } + + UpdateCharactersList(): void { + this.characterService + .getLoggedCharacters() + .pipe(first()) + .subscribe( + (success) => { + this.loggedCharacters = success; + }, + (error: ErrorResponse | HttpErrorResponse) => { + if (error instanceof HttpErrorResponse) { + error = error.error as ErrorResponse; + } + console.error(error.message); + } + ); + } + + private SubscribeToEvents(): void { + this.signalRService.message.subscribe((message: string) => { + if ( + message === 'New player connected' || + message === 'Player disconnected' + ) { + this.UpdateCharactersList(); + } + }); + } + + ngOnDestroy() { + this.allSubscriptions.unsubscribe(); + } } diff --git a/SessionCompanion/SessionCompanion/ClientApp/src/app/components/player-dashboard/player-dashboard.component.css b/SessionCompanion/SessionCompanion/ClientApp/src/app/components/player-dashboard/player-dashboard.component.css index e69de29..544e80b 100644 --- a/SessionCompanion/SessionCompanion/ClientApp/src/app/components/player-dashboard/player-dashboard.component.css +++ b/SessionCompanion/SessionCompanion/ClientApp/src/app/components/player-dashboard/player-dashboard.component.css @@ -0,0 +1,44 @@ +@import "../../../styles.css"; + +.menu-spacer { + flex: 1 1 auto; +} + +.root-container { + height: calc(100vh - 64px); +} + +@media (max-width: 768px) { + .root-container { + height: calc(100vh - 58px); + } +} + +.sidenav-container { + flex: 1; + height: 100%; +} +.content { + background-color: #102028; + color: #df7c0f; +} + +.navbar { + background-color: #df7c0f; + color: #e9cca7; +} + +.sidenav { + background-color: #102028; +} + +.mat-list-item.active{ + color: #e9cca7; +} + +.ability_card_container { + margin: 5%; + display: flex; + justify-content: center; + align-items: center; +} diff --git a/SessionCompanion/SessionCompanion/ClientApp/src/app/components/player-dashboard/player-dashboard.component.html b/SessionCompanion/SessionCompanion/ClientApp/src/app/components/player-dashboard/player-dashboard.component.html index e69de29..994aab5 100644 --- a/SessionCompanion/SessionCompanion/ClientApp/src/app/components/player-dashboard/player-dashboard.component.html +++ b/SessionCompanion/SessionCompanion/ClientApp/src/app/components/player-dashboard/player-dashboard.component.html @@ -0,0 +1,59 @@ +
+ + + + +
+ Session Companion +
+
+
+ + + + + + + home + Home + + + + query_stats + Statistic and throws + + + + local_mall + Equipment + + + + brightness_4 + Spells + + + + account_circle + Profile + + + + shopping_cart + Shop + + + + exit_to_app + Log out + + + + + + + + +
diff --git a/SessionCompanion/SessionCompanion/ClientApp/src/app/components/player-dashboard/player-dashboard.component.ts b/SessionCompanion/SessionCompanion/ClientApp/src/app/components/player-dashboard/player-dashboard.component.ts index 9ed3789..91157af 100644 --- a/SessionCompanion/SessionCompanion/ClientApp/src/app/components/player-dashboard/player-dashboard.component.ts +++ b/SessionCompanion/SessionCompanion/ClientApp/src/app/components/player-dashboard/player-dashboard.component.ts @@ -1,12 +1,30 @@ -import { Component } from '@angular/core'; +import { Component, OnInit } from '@angular/core'; +import {AbilityViewModel} from "../../../types/viewmodels/ability-viewmodels/AbilityViewModel"; @Component({ selector: 'app-player-dashboard', templateUrl: './player-dashboard.component.html', - styleUrls: ['./player-dashboard.component.css'] + styleUrls: ['./player-dashboard.component.css'], }) export class PlayerDashboardComponent { isExpanded = false; + selected = false; + + ability: AbilityViewModel = { + id: 1, + name: 'Strength', + value: 18, + modification: 2, + canSaveThrows: true, + savingThrows: 1, + skills: [ + { + name: 'Throw', + value: 1, + can: false + } + ] + } collapse() { this.isExpanded = false; diff --git a/SessionCompanion/SessionCompanion/ClientApp/src/app/components/registration/registration.component.html b/SessionCompanion/SessionCompanion/ClientApp/src/app/components/registration/registration.component.html index c9837d9..9f07043 100644 --- a/SessionCompanion/SessionCompanion/ClientApp/src/app/components/registration/registration.component.html +++ b/SessionCompanion/SessionCompanion/ClientApp/src/app/components/registration/registration.component.html @@ -1,6 +1,6 @@
- arrow_back + arrow_back
Create an Account
@@ -11,7 +11,7 @@ type="text" required name="username"> - + Username is required person @@ -26,7 +26,7 @@ type="password" name="password"/> lock - + Password is required @@ -40,10 +40,10 @@ type="password" name="confirmPassword"/> lock - + Confirm your password - + Please make sure your passwords match diff --git a/SessionCompanion/SessionCompanion/ClientApp/src/app/components/registration/registration.component.ts b/SessionCompanion/SessionCompanion/ClientApp/src/app/components/registration/registration.component.ts index 5532c93..f3ebc93 100644 --- a/SessionCompanion/SessionCompanion/ClientApp/src/app/components/registration/registration.component.ts +++ b/SessionCompanion/SessionCompanion/ClientApp/src/app/components/registration/registration.component.ts @@ -6,7 +6,6 @@ import {Subscription} from 'rxjs'; import {ErrorResponse} from '../../../types/ErrorResponse'; import {UserRegisterViewModel} from '../../../types/viewmodels/user-viewmodels/UserRegisterViewModel'; import {HttpErrorResponse} from '@angular/common/http'; -import {type} from 'os'; @Component({ selector: 'app-registration', @@ -36,27 +35,33 @@ export class RegistrationComponent implements OnDestroy { } Register() { - const userRegisterModel = new class implements UserRegisterViewModel { - password: string; - username: string; - }; + if (this.signUpFormGroup.valid) { + const userRegisterModel = new class implements UserRegisterViewModel { + password: string; + username: string; + }; - userRegisterModel.username = this.signUpFormGroup.get('newAccount').value['username']; - userRegisterModel.password = this.signUpFormGroup.get('newAccount').value['password']; + userRegisterModel.username = this.signUpFormGroup.get('newAccount').value['username']; + userRegisterModel.password = this.signUpFormGroup.get('newAccount').value['password']; - this.allSubscriptions.add( - this.userService.registerUser(userRegisterModel).subscribe( - () => { - this.router.navigate(['login']); - }, - (error: ErrorResponse | HttpErrorResponse) => { - if (error instanceof HttpErrorResponse) { - error = error.error as ErrorResponse; + this.allSubscriptions.add( + this.userService.registerUser(userRegisterModel).subscribe( + () => { + this.router.navigate(['login']); + }, + (error: ErrorResponse | HttpErrorResponse) => { + if (error instanceof HttpErrorResponse) { + error = error.error as ErrorResponse; + } + this.apiError = true; + this.apiErrorMessage = error.message; } - this.apiError = true; - this.apiErrorMessage = error.message; - } - )); + )); + } else { + this.signUpFormGroup.get('newAccount').get('username').markAsTouched(); + this.signUpFormGroup.get('newAccount').get('password').markAsTouched(); + this.signUpFormGroup.get('newAccount').get('confirmPassword').markAsTouched(); + } } ngOnDestroy() { diff --git a/SessionCompanion/SessionCompanion/ClientApp/src/app/components/select-character/select-character.component.css b/SessionCompanion/SessionCompanion/ClientApp/src/app/components/select-character/select-character.component.css index ccf116c..41aa481 100644 --- a/SessionCompanion/SessionCompanion/ClientApp/src/app/components/select-character/select-character.component.css +++ b/SessionCompanion/SessionCompanion/ClientApp/src/app/components/select-character/select-character.component.css @@ -47,10 +47,6 @@ input { font-size: 20px; } -.align-to-right { - text-align: right; -} - @media (max-width: 400px) { .container { margin-left: 0%; diff --git a/SessionCompanion/SessionCompanion/ClientApp/src/app/components/select-character/select-character.component.html b/SessionCompanion/SessionCompanion/ClientApp/src/app/components/select-character/select-character.component.html index 178319d..5eae2cc 100644 --- a/SessionCompanion/SessionCompanion/ClientApp/src/app/components/select-character/select-character.component.html +++ b/SessionCompanion/SessionCompanion/ClientApp/src/app/components/select-character/select-character.component.html @@ -1,21 +1,15 @@
- arrow_back + arrow_back
Select character
- + - Oweja - arrow_forward + + account_circle +
{{character.name}}
+ arrow_forward +
{{character.className}} level: {{character.level}}
+
- - James - arrow_forward - - - Legolas - arrow_forward - - -
- +
diff --git a/SessionCompanion/SessionCompanion/ClientApp/src/app/components/select-character/select-character.component.ts b/SessionCompanion/SessionCompanion/ClientApp/src/app/components/select-character/select-character.component.ts index 2409f57..bb796df 100644 --- a/SessionCompanion/SessionCompanion/ClientApp/src/app/components/select-character/select-character.component.ts +++ b/SessionCompanion/SessionCompanion/ClientApp/src/app/components/select-character/select-character.component.ts @@ -1,30 +1,49 @@ -import { Component } from '@angular/core'; +import {Component, OnInit} from '@angular/core'; import { Router } from '@angular/router'; +import {first} from 'rxjs/operators'; +import {ClearUserId} from '../../store/actions/app.actions'; +import {ErrorResponse} from '../../../types/ErrorResponse'; +import {HttpErrorResponse} from '@angular/common/http'; +import {Store} from '@ngrx/store'; +import {AppState} from '../../store/models/app-state.model'; +import {CharacterService} from '../../../services/character.service'; +import {CharacterForLoginViewModel} from '../../../types/viewmodels/character-viewmodels/CharacterForLoginViewModel'; +import {AddCharacterId} from '../../store/actions/player.action'; @Component({ selector: 'app-select-character', templateUrl: './select-character.component.html', styleUrls: ['./select-character.component.css'] }) -export class SelectCharacterComponent { - isExpanded = false; +export class SelectCharacterComponent implements OnInit { + charactersList: CharacterForLoginViewModel[]; - collapse() { - this.isExpanded = false; + constructor(private router: Router, private store: Store, private characterService: CharacterService) {} + + ngOnInit() { + this.getUserCharactersList(); } - toggle() { - this.isExpanded = !this.isExpanded; + getUserCharactersList() { + this.store.select(s => s.appStore.userId).pipe(first()).subscribe((userId) => { + this.characterService.getUserCharactersList(userId).pipe(first()).subscribe((charactersList) => { + this.charactersList = charactersList; + }, (error: ErrorResponse | HttpErrorResponse) => { + if (error instanceof HttpErrorResponse) { + error = error.error as ErrorResponse; + } + console.error(error.message); + } ); + }); } - constructor(private router: Router) {} - - onCharacterClick(){ - this.router.navigate(['player']) + onCharacterClick(characterId: number) { + this.store.dispatch(new AddCharacterId({characterId})); + this.router.navigate(['player']); } - onArrowBackClick(){ - this.router.navigate(['login']) + onArrowBackClick() { + this.store.dispatch(new ClearUserId()); + this.router.navigate(['login']); } } - diff --git a/SessionCompanion/SessionCompanion/ClientApp/src/app/components/select-role/select-role.component.ts b/SessionCompanion/SessionCompanion/ClientApp/src/app/components/select-role/select-role.component.ts index 12bb627..1565301 100644 --- a/SessionCompanion/SessionCompanion/ClientApp/src/app/components/select-role/select-role.component.ts +++ b/SessionCompanion/SessionCompanion/ClientApp/src/app/components/select-role/select-role.component.ts @@ -12,7 +12,8 @@ import {AddRole} from '../../store/actions/app.actions'; export class SelectRoleComponent { isExpanded = false; - constructor(private router: Router, private store: Store<{ role: string }>) {} + constructor(private router: Router, private store: Store<{ role: string }>) { + } collapse() { this.isExpanded = false; diff --git a/SessionCompanion/SessionCompanion/ClientApp/src/app/components/sign-in/sign-in.component.html b/SessionCompanion/SessionCompanion/ClientApp/src/app/components/sign-in/sign-in.component.html index 5b673af..6eede7b 100644 --- a/SessionCompanion/SessionCompanion/ClientApp/src/app/components/sign-in/sign-in.component.html +++ b/SessionCompanion/SessionCompanion/ClientApp/src/app/components/sign-in/sign-in.component.html @@ -1,6 +1,6 @@
- arrow_back + arrow_back
Sign In
@@ -12,7 +12,7 @@ type="text" required name="username"> - + Username is required person @@ -28,7 +28,7 @@ type="password" name="password"/> lock - + Password is required diff --git a/SessionCompanion/SessionCompanion/ClientApp/src/app/components/sign-in/sign-in.component.ts b/SessionCompanion/SessionCompanion/ClientApp/src/app/components/sign-in/sign-in.component.ts index 16ac96e..1bf5263 100644 --- a/SessionCompanion/SessionCompanion/ClientApp/src/app/components/sign-in/sign-in.component.ts +++ b/SessionCompanion/SessionCompanion/ClientApp/src/app/components/sign-in/sign-in.component.ts @@ -6,9 +6,10 @@ import {ErrorResponse} from '../../../types/ErrorResponse'; import {Observable, Subscription} from 'rxjs'; import {HttpErrorResponse} from '@angular/common/http'; import {AppStoreModel} from '../../store/models/app-store.model'; -import { Store } from '@ngrx/store'; +import {select, Store} from '@ngrx/store'; import {AddUserId} from '../../store/actions/app.actions'; -import { AppState } from 'src/app/store/models/app-state.model'; +import {AppState} from 'src/app/store/models/app-state.model'; +import {first} from "rxjs/operators"; @Component({ selector: 'app-sign-in', @@ -38,12 +39,12 @@ export class SignInComponent implements OnDestroy, OnInit { }); ngOnInit() { - this.role$ = this.store.select(s => s.appState); + this.role$ = this.store.select(s => s.appStore); } onLoginButtonClick() { let role = ''; - this.store.select(s => s.appState.role).subscribe((v)=>{ + this.store.select(s => s.appStore.role).pipe(first()).subscribe((v) => { role = v; }); this.allSubscriptions.add( @@ -52,7 +53,6 @@ export class SignInComponent implements OnDestroy, OnInit { this.signInFormGroup.get('signIn').value['password']).subscribe( (success) => { this.store.dispatch(new AddUserId({userId: success})); - //TODO zmienić na jedna linie if (role === 'player') { this.router.navigate(['select-character']); } else { @@ -69,13 +69,12 @@ export class SignInComponent implements OnDestroy, OnInit { )); } - onRegisterButtonClick(){ - this.router.navigate(['register']) - //TODO connect with backend + onRegisterButtonClick() { + this.router.navigate(['register']); } - onArrowBackClick(){ - this.router.navigate(['']) + onArrowBackClick() { + this.router.navigate(['']); } collapse() { diff --git a/SessionCompanion/SessionCompanion/ClientApp/src/app/reducers/index.ts b/SessionCompanion/SessionCompanion/ClientApp/src/app/reducers/index.ts deleted file mode 100644 index 4f57bb0..0000000 --- a/SessionCompanion/SessionCompanion/ClientApp/src/app/reducers/index.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { - ActionReducer, - ActionReducerMap, - createFeatureSelector, - createSelector, - MetaReducer -} from '@ngrx/store'; -import { environment } from '../../environments/environment'; - -export interface State { - -} - -export const reducers: ActionReducerMap = { - -}; - - -export const metaReducers: MetaReducer[] = !environment.production ? [] : []; diff --git a/SessionCompanion/SessionCompanion/ClientApp/src/app/shared/sc-icons/how-to.RMD b/SessionCompanion/SessionCompanion/ClientApp/src/app/shared/sc-icons/how-to.RMD new file mode 100644 index 0000000..b0d9081 --- /dev/null +++ b/SessionCompanion/SessionCompanion/ClientApp/src/app/shared/sc-icons/how-to.RMD @@ -0,0 +1,4 @@ +Moduł został już dodany i wstrzyknięty do roota apki. + +Aby dodać nową ikonkę, plik svg wstawiamy do folderu assets/icons/svg-icons. +Oraz dodajym kolejnego enuma w pliku sc-icon.model.ts diff --git a/SessionCompanion/SessionCompanion/ClientApp/src/app/shared/sc-icons/session-companion-icons-registry.service.ts b/SessionCompanion/SessionCompanion/ClientApp/src/app/shared/sc-icons/session-companion-icons-registry.service.ts new file mode 100644 index 0000000..6d48cad --- /dev/null +++ b/SessionCompanion/SessionCompanion/ClientApp/src/app/shared/sc-icons/session-companion-icons-registry.service.ts @@ -0,0 +1,22 @@ +import {Injectable} from '@angular/core'; +import {scIcon} from '../../../assets/icons/sc-icon.model'; +import {MatIconRegistry} from '@angular/material'; +import {DomSanitizer} from '@angular/platform-browser'; + +@Injectable({ + providedIn: 'root' +}) +export class SessionCompanionIconsRegistry { + constructor(private registry: MatIconRegistry, private sanitizer: DomSanitizer) { + } + + public registerIcons(): void { + this.loadIcons(Object.values(scIcon), '../assets/icons/svg-icons'); + } + + private loadIcons(iconKeys: string[], iconUrl: string): void { + iconKeys.forEach((icon: string) => { + this.registry.addSvgIcon(icon, this.sanitizer.bypassSecurityTrustResourceUrl(`${iconUrl}/${icon}.svg`)); + }); + } +} diff --git a/SessionCompanion/SessionCompanion/ClientApp/src/app/shared/signalR-service/gm-signalR.service.ts b/SessionCompanion/SessionCompanion/ClientApp/src/app/shared/signalR-service/gm-signalR.service.ts index 4ca94db..08cf425 100644 --- a/SessionCompanion/SessionCompanion/ClientApp/src/app/shared/signalR-service/gm-signalR.service.ts +++ b/SessionCompanion/SessionCompanion/ClientApp/src/app/shared/signalR-service/gm-signalR.service.ts @@ -1,12 +1,15 @@ import { Inject, Injectable } from '@angular/core'; import { SignalRService } from './base/signalR.service'; +import {Subject} from 'rxjs'; @Injectable({ providedIn: 'root' }) export class GMSignalRService { signalR: SignalRService; + message: Subject; constructor(@Inject('BASE_URL') baseUrl: string) { this.signalR = new SignalRService(baseUrl); + this.message = new Subject(); this.registerOnServerEvents(); } @@ -17,10 +20,15 @@ export class GMSignalRService { if (this.signalR.connectionEstablished$.getValue() === true) { this.signalR.hubConnection.send('GameMasterLogin'); } - }); + }).unsubscribe(); } private registerOnServerEvents(): void { - + this.signalR.hubConnection.on('Welcome', (message: string) => { + this.message.next('New player connected'); + }); + this.signalR.hubConnection.on('GoodBye', (message: string) => { + this.message.next('Player disconnected'); + }); } } diff --git a/SessionCompanion/SessionCompanion/ClientApp/src/app/store/actions/app.actions.ts b/SessionCompanion/SessionCompanion/ClientApp/src/app/store/actions/app.actions.ts index 4b2b34b..362b983 100644 --- a/SessionCompanion/SessionCompanion/ClientApp/src/app/store/actions/app.actions.ts +++ b/SessionCompanion/SessionCompanion/ClientApp/src/app/store/actions/app.actions.ts @@ -1,9 +1,9 @@ -import {AppStoreModel} from '../models/app-store.model'; -import { Action } from '@ngrx/store'; +import {Action} from '@ngrx/store'; export enum AppActionTypes { ADD_USER_ID = '[APP] Add user id', - ADD_ROLE = '[APP] Add role' + ADD_ROLE = '[APP] Add role', + CLEAR_USER_ID = '[APP] Clear user id' } export class AddUserId implements Action { @@ -20,4 +20,13 @@ export class AddRole implements Action { } } -export type AppAction = AddUserId | AddRole; +export class ClearUserId implements Action { + readonly type = AppActionTypes.CLEAR_USER_ID; + + constructor() { + } +} + + + +export type AppAction = AddUserId | AddRole | ClearUserId; diff --git a/SessionCompanion/SessionCompanion/ClientApp/src/app/store/actions/player.action.ts b/SessionCompanion/SessionCompanion/ClientApp/src/app/store/actions/player.action.ts new file mode 100644 index 0000000..45c74d8 --- /dev/null +++ b/SessionCompanion/SessionCompanion/ClientApp/src/app/store/actions/player.action.ts @@ -0,0 +1,15 @@ +import {Action} from "@ngrx/store"; + +export enum PlayerActionTypes { + ADD_CHARACTER_ID= '[PLAYER] Add character id' +} + +export class AddCharacterId implements Action { + readonly type = PlayerActionTypes.ADD_CHARACTER_ID; + + constructor(public payload: {characterId: number}) { + + } +} + +export type PlayerAction = AddCharacterId; diff --git a/SessionCompanion/SessionCompanion/ClientApp/src/app/store/models/app-state.model.ts b/SessionCompanion/SessionCompanion/ClientApp/src/app/store/models/app-state.model.ts index 30226ba..fe999ff 100644 --- a/SessionCompanion/SessionCompanion/ClientApp/src/app/store/models/app-state.model.ts +++ b/SessionCompanion/SessionCompanion/ClientApp/src/app/store/models/app-state.model.ts @@ -1,5 +1,15 @@ import {AppStoreModel} from './app-store.model'; +import {ActionReducerMap} from '@ngrx/store'; +import {AppReducer} from '../reducers/app.reducer'; +import {PlayerStoreModel} from './player-store.model'; +import {PlayerReducer} from '../reducers/player.reducer'; export interface AppState { - appState: AppStoreModel; + appStore: AppStoreModel; + playerStore: PlayerStoreModel; } + +export const reducers: ActionReducerMap = { + appStore: AppReducer, + playerStore: PlayerReducer, +}; diff --git a/SessionCompanion/SessionCompanion/ClientApp/src/app/store/models/player-store.model.ts b/SessionCompanion/SessionCompanion/ClientApp/src/app/store/models/player-store.model.ts new file mode 100644 index 0000000..8cc606f --- /dev/null +++ b/SessionCompanion/SessionCompanion/ClientApp/src/app/store/models/player-store.model.ts @@ -0,0 +1,3 @@ +export interface PlayerStoreModel { + characterId: number; +} diff --git a/SessionCompanion/SessionCompanion/ClientApp/src/app/store/reducers/app.reducer.ts b/SessionCompanion/SessionCompanion/ClientApp/src/app/store/reducers/app.reducer.ts index 777c63a..d86c636 100644 --- a/SessionCompanion/SessionCompanion/ClientApp/src/app/store/reducers/app.reducer.ts +++ b/SessionCompanion/SessionCompanion/ClientApp/src/app/store/reducers/app.reducer.ts @@ -12,6 +12,8 @@ export function AppReducer(state: AppStoreModel = initialState, action: AppActio return {...state, userId: action.payload.userId}; case AppActionTypes.ADD_ROLE: return {...state, role: action.payload.role}; + case AppActionTypes.CLEAR_USER_ID: + return {...state, userId: null}; default: return state; } diff --git a/SessionCompanion/SessionCompanion/ClientApp/src/app/store/reducers/player.reducer.ts b/SessionCompanion/SessionCompanion/ClientApp/src/app/store/reducers/player.reducer.ts new file mode 100644 index 0000000..3077834 --- /dev/null +++ b/SessionCompanion/SessionCompanion/ClientApp/src/app/store/reducers/player.reducer.ts @@ -0,0 +1,15 @@ +import {PlayerStoreModel} from '../models/player-store.model'; +import {PlayerAction, PlayerActionTypes} from '../actions/player.action'; + +const initialState: PlayerStoreModel = { + characterId: null +}; + +export function PlayerReducer(state: PlayerStoreModel = initialState, action: PlayerAction) { + switch (action.type) { + case PlayerActionTypes.ADD_CHARACTER_ID: + return {...state, characterId: action.payload.characterId}; + default: + return state; + } +} diff --git a/SessionCompanion/SessionCompanion/ClientApp/src/assets/icons/sc-icon.model.ts b/SessionCompanion/SessionCompanion/ClientApp/src/assets/icons/sc-icon.model.ts new file mode 100644 index 0000000..3faceea --- /dev/null +++ b/SessionCompanion/SessionCompanion/ClientApp/src/assets/icons/sc-icon.model.ts @@ -0,0 +1,14 @@ +export enum scIcon { + Barbarian = 'barbarian', + Bard = 'bard', + Cleric = 'cleric', + Druid = 'druid', + Fighter = 'fighter', + Monk = 'monk', + Paladin = 'paladin', + Ranger = 'ranger', + rogue = 'rogue', + Sorcerer = 'sorcerer', + Warlock = 'warlock', + Wizard = 'wizard', +} diff --git a/SessionCompanion/SessionCompanion/ClientApp/src/assets/icons/svg-icons/barbarian.svg b/SessionCompanion/SessionCompanion/ClientApp/src/assets/icons/svg-icons/barbarian.svg new file mode 100644 index 0000000..ea18fd3 --- /dev/null +++ b/SessionCompanion/SessionCompanion/ClientApp/src/assets/icons/svg-icons/barbarian.svg @@ -0,0 +1 @@ + diff --git a/SessionCompanion/SessionCompanion/ClientApp/src/assets/icons/svg-icons/bard.svg b/SessionCompanion/SessionCompanion/ClientApp/src/assets/icons/svg-icons/bard.svg new file mode 100644 index 0000000..1e139d8 --- /dev/null +++ b/SessionCompanion/SessionCompanion/ClientApp/src/assets/icons/svg-icons/bard.svg @@ -0,0 +1 @@ + diff --git a/SessionCompanion/SessionCompanion/ClientApp/src/assets/icons/svg-icons/cleric.svg b/SessionCompanion/SessionCompanion/ClientApp/src/assets/icons/svg-icons/cleric.svg new file mode 100644 index 0000000..f7a6586 --- /dev/null +++ b/SessionCompanion/SessionCompanion/ClientApp/src/assets/icons/svg-icons/cleric.svg @@ -0,0 +1 @@ + diff --git a/SessionCompanion/SessionCompanion/ClientApp/src/assets/icons/svg-icons/druid.svg b/SessionCompanion/SessionCompanion/ClientApp/src/assets/icons/svg-icons/druid.svg new file mode 100644 index 0000000..8290333b --- /dev/null +++ b/SessionCompanion/SessionCompanion/ClientApp/src/assets/icons/svg-icons/druid.svg @@ -0,0 +1 @@ + diff --git a/SessionCompanion/SessionCompanion/ClientApp/src/assets/icons/svg-icons/fighter.svg b/SessionCompanion/SessionCompanion/ClientApp/src/assets/icons/svg-icons/fighter.svg new file mode 100644 index 0000000..0f55a43 --- /dev/null +++ b/SessionCompanion/SessionCompanion/ClientApp/src/assets/icons/svg-icons/fighter.svg @@ -0,0 +1 @@ + diff --git a/SessionCompanion/SessionCompanion/ClientApp/src/assets/icons/svg-icons/monk.svg b/SessionCompanion/SessionCompanion/ClientApp/src/assets/icons/svg-icons/monk.svg new file mode 100644 index 0000000..dccf6ac --- /dev/null +++ b/SessionCompanion/SessionCompanion/ClientApp/src/assets/icons/svg-icons/monk.svg @@ -0,0 +1 @@ + diff --git a/SessionCompanion/SessionCompanion/ClientApp/src/assets/icons/svg-icons/paladin.svg b/SessionCompanion/SessionCompanion/ClientApp/src/assets/icons/svg-icons/paladin.svg new file mode 100644 index 0000000..615bc8f --- /dev/null +++ b/SessionCompanion/SessionCompanion/ClientApp/src/assets/icons/svg-icons/paladin.svg @@ -0,0 +1 @@ + diff --git a/SessionCompanion/SessionCompanion/ClientApp/src/assets/icons/svg-icons/ranger.svg b/SessionCompanion/SessionCompanion/ClientApp/src/assets/icons/svg-icons/ranger.svg new file mode 100644 index 0000000..8defce6 --- /dev/null +++ b/SessionCompanion/SessionCompanion/ClientApp/src/assets/icons/svg-icons/ranger.svg @@ -0,0 +1 @@ + diff --git a/SessionCompanion/SessionCompanion/ClientApp/src/assets/icons/svg-icons/rogue.svg b/SessionCompanion/SessionCompanion/ClientApp/src/assets/icons/svg-icons/rogue.svg new file mode 100644 index 0000000..a5ebf42 --- /dev/null +++ b/SessionCompanion/SessionCompanion/ClientApp/src/assets/icons/svg-icons/rogue.svg @@ -0,0 +1 @@ + diff --git a/SessionCompanion/SessionCompanion/ClientApp/src/assets/icons/svg-icons/sorcerer.svg b/SessionCompanion/SessionCompanion/ClientApp/src/assets/icons/svg-icons/sorcerer.svg new file mode 100644 index 0000000..6fa42fb --- /dev/null +++ b/SessionCompanion/SessionCompanion/ClientApp/src/assets/icons/svg-icons/sorcerer.svg @@ -0,0 +1 @@ + diff --git a/SessionCompanion/SessionCompanion/ClientApp/src/assets/icons/svg-icons/warlock.svg b/SessionCompanion/SessionCompanion/ClientApp/src/assets/icons/svg-icons/warlock.svg new file mode 100644 index 0000000..d84762e --- /dev/null +++ b/SessionCompanion/SessionCompanion/ClientApp/src/assets/icons/svg-icons/warlock.svg @@ -0,0 +1 @@ + diff --git a/SessionCompanion/SessionCompanion/ClientApp/src/assets/icons/svg-icons/wizard.svg b/SessionCompanion/SessionCompanion/ClientApp/src/assets/icons/svg-icons/wizard.svg new file mode 100644 index 0000000..1df2853 --- /dev/null +++ b/SessionCompanion/SessionCompanion/ClientApp/src/assets/icons/svg-icons/wizard.svg @@ -0,0 +1 @@ + diff --git a/SessionCompanion/SessionCompanion/ClientApp/src/services/character.service.ts b/SessionCompanion/SessionCompanion/ClientApp/src/services/character.service.ts new file mode 100644 index 0000000..c390a44 --- /dev/null +++ b/SessionCompanion/SessionCompanion/ClientApp/src/services/character.service.ts @@ -0,0 +1,44 @@ +import {Inject, Injectable} from '@angular/core'; +import {HttpClient, HttpParams} from '@angular/common/http'; +import {Observable, of, throwError} from 'rxjs'; +import {ErrorResponse} from '../types/ErrorResponse'; +import {Either} from '../types/Either'; +import {CharacterForLoginViewModel} from '../types/viewmodels/character-viewmodels/CharacterForLoginViewModel'; +import {switchMap, retry} from 'rxjs/operators'; +import {LoggedCharactersViewModel} from '../types/viewmodels/character-viewmodels/LoggedCharactersViewModel'; + +Injectable({ + providedIn: 'root' +}) +export class CharacterService { + private baseUrl = 'api/character/'; + constructor(private http: HttpClient, @Inject('BASE_URL') baseUrl: string) { + this.baseUrl = baseUrl + this.baseUrl; + } + + getLoggedCharacters(): Observable { + return this.http.get>(this.baseUrl + 'loggedCharacters').pipe( + switchMap(response => { + if (response.isLeft) { + return of(response.left); + } else { + return throwError(response.right); + } + }), + retry(3) + ); + } + + getUserCharactersList(userId: number): Observable { + const params = new HttpParams().set('userId', userId.toString()) + return this.http.get>(this.baseUrl + 'userCharactersList', {params}).pipe( + switchMap(response => { + if (response.isLeft) { + return of(response.left); + } else { + return throwError(response.right); + } + }) + ); + } +} diff --git a/SessionCompanion/SessionCompanion/ClientApp/src/styles.css b/SessionCompanion/SessionCompanion/ClientApp/src/styles.css index bd973fd..cbfb6da 100644 --- a/SessionCompanion/SessionCompanion/ClientApp/src/styles.css +++ b/SessionCompanion/SessionCompanion/ClientApp/src/styles.css @@ -70,7 +70,11 @@ } mat-divider { - border-top-color: #e9cca7 !important; + border-top-color: #e9cca7; +} + +.arrow-select { + cursor: pointer; } html, diff --git a/SessionCompanion/SessionCompanion/ClientApp/src/types/viewmodels/ability-viewmodels/AbilityViewModel.ts b/SessionCompanion/SessionCompanion/ClientApp/src/types/viewmodels/ability-viewmodels/AbilityViewModel.ts new file mode 100644 index 0000000..8c4fb29 --- /dev/null +++ b/SessionCompanion/SessionCompanion/ClientApp/src/types/viewmodels/ability-viewmodels/AbilityViewModel.ts @@ -0,0 +1,11 @@ +import {SkillViewModel} from './SkillViewModel'; + +export interface AbilityViewModel { + id: number; + name: string; + value: number; + modification: number; + savingThrows: number; + canSaveThrows: boolean; + skills: SkillViewModel[]; +} diff --git a/SessionCompanion/SessionCompanion/ClientApp/src/types/viewmodels/ability-viewmodels/SkillViewModel.ts b/SessionCompanion/SessionCompanion/ClientApp/src/types/viewmodels/ability-viewmodels/SkillViewModel.ts new file mode 100644 index 0000000..94418d4 --- /dev/null +++ b/SessionCompanion/SessionCompanion/ClientApp/src/types/viewmodels/ability-viewmodels/SkillViewModel.ts @@ -0,0 +1,5 @@ +export interface SkillViewModel { + name: string; + value: number; + can: boolean; +} diff --git a/SessionCompanion/SessionCompanion/ClientApp/src/types/viewmodels/character-viewmodels/CharacterForLoginViewModel.ts b/SessionCompanion/SessionCompanion/ClientApp/src/types/viewmodels/character-viewmodels/CharacterForLoginViewModel.ts new file mode 100644 index 0000000..fa9c0d8 --- /dev/null +++ b/SessionCompanion/SessionCompanion/ClientApp/src/types/viewmodels/character-viewmodels/CharacterForLoginViewModel.ts @@ -0,0 +1,7 @@ +export interface CharacterForLoginViewModel { + id: number; + userId: number; + name: string; + className: string; + level: number; +} diff --git a/SessionCompanion/SessionCompanion/ClientApp/src/types/viewmodels/character-viewmodels/LoggedCharactersViewModel.ts b/SessionCompanion/SessionCompanion/ClientApp/src/types/viewmodels/character-viewmodels/LoggedCharactersViewModel.ts new file mode 100644 index 0000000..36ea974 --- /dev/null +++ b/SessionCompanion/SessionCompanion/ClientApp/src/types/viewmodels/character-viewmodels/LoggedCharactersViewModel.ts @@ -0,0 +1,7 @@ +export interface LoggedCharactersViewModel { + id: number; + name: string; + level: number; + currentHealthPoints: number; + class: string; +} diff --git a/SessionCompanion/SessionCompanion/Configurations/RepositoryConfiguration.cs b/SessionCompanion/SessionCompanion/Configurations/RepositoryConfiguration.cs index f379c5f..1e9659d 100644 --- a/SessionCompanion/SessionCompanion/Configurations/RepositoryConfiguration.cs +++ b/SessionCompanion/SessionCompanion/Configurations/RepositoryConfiguration.cs @@ -30,6 +30,12 @@ namespace SessionCompanion.Configurations services.AddScoped, SpellRepository>(); services.AddScoped, CharacterSpellRepository>(); services.AddScoped, CharacterSpellSlotsRepository>(); + services.AddScoped, ArmorRepository>(); + services.AddScoped, CharacterArmorRepository>(); + services.AddScoped, OtherEquipmentRepository>(); + services.AddScoped, CharacterOtherEquipmentRepository>(); + services.AddScoped, WeaponRepository>(); + services.AddScoped, CharacterWeaponRepository>(); return services; } } diff --git a/SessionCompanion/SessionCompanion/Configurations/ServiceConfiguration.cs b/SessionCompanion/SessionCompanion/Configurations/ServiceConfiguration.cs index 96390ed..f01a70e 100644 --- a/SessionCompanion/SessionCompanion/Configurations/ServiceConfiguration.cs +++ b/SessionCompanion/SessionCompanion/Configurations/ServiceConfiguration.cs @@ -29,6 +29,12 @@ namespace SessionCompanion.Configurations services.AddScoped(); services.AddScoped(); services.AddScoped(); + services.AddScoped(); + services.AddScoped(); + services.AddScoped(); + services.AddScoped(); + services.AddScoped(); + services.AddScoped(); return services; }