Merge pull request 'SES-120' (#47) from SES-120 into dev
Reviewed-on: #47
This commit is contained in:
commit
c59e4b3814
@ -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;
|
||||
@ -33,6 +35,53 @@ namespace SessionCompanion.Database
|
||||
|
||||
public ApplicationDbContext(DbContextOptions<ApplicationDbContext> options) : base(options) { }
|
||||
|
||||
protected IEnumerable<Weapon> SeedWeapon()
|
||||
{
|
||||
const string file = "../SessionCompanion.Database/JsonData/weapons.json";
|
||||
List<Weapon> weapons = new List<Weapon>();
|
||||
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<Armor> SeedArmor()
|
||||
{
|
||||
const string file = "../SessionCompanion.Database/JsonData/armors.json";
|
||||
List<Armor> armors = new List<Armor>();
|
||||
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<OtherEquipment> SeedOtherEquipment()
|
||||
{
|
||||
const string file = "../SessionCompanion.Database/JsonData/otherEquipments.json";
|
||||
List<OtherEquipment> otherEquipment = new List<OtherEquipment>();
|
||||
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);
|
||||
@ -44,6 +93,12 @@ namespace SessionCompanion.Database
|
||||
builder.Entity<Background>().HasData(SeedData.SeedBackground());
|
||||
builder.Entity<Biography>().HasData(SeedData.SeedBiography());
|
||||
builder.Entity<Statistics>().HasData(SeedData.SeedStatistics());
|
||||
builder.Entity<Weapon>().HasData(SeedWeapon());
|
||||
builder.Entity<Armor>().HasData(SeedArmor());
|
||||
builder.Entity<OtherEquipment>().HasData(SeedOtherEquipment());
|
||||
builder.Entity<CharacterWeapon>().HasData(SeedData.SeedCharacterWeapon());
|
||||
builder.Entity<CharacterArmor>().HasData(SeedData.SeedCharacterArmor());
|
||||
builder.Entity<CharacterOtherEquipment>().HasData(SeedData.SeedCharacterOtherEquipment());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
236
SessionCompanion/SessionCompanion.Database/JsonData/armors.json
Normal file
236
SessionCompanion/SessionCompanion.Database/JsonData/armors.json
Normal file
@ -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"
|
||||
}
|
||||
}
|
||||
]
|
File diff suppressed because it is too large
Load Diff
1450
SessionCompanion/SessionCompanion.Database/JsonData/weapons.json
Normal file
1450
SessionCompanion/SessionCompanion.Database/JsonData/weapons.json
Normal file
File diff suppressed because it is too large
Load Diff
2974
SessionCompanion/SessionCompanion.Database/Migrations/20210102163136_weapons-added.Designer.cs
generated
Normal file
2974
SessionCompanion/SessionCompanion.Database/Migrations/20210102163136_weapons-added.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -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<int>(type: "int", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
Name = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
Category = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
ArmorClassBase = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
HaveDexterityBonus = table.Column<bool>(type: "bit", nullable: false),
|
||||
MinimumStrength = table.Column<int>(type: "int", nullable: true),
|
||||
HaveStealthDisadvantage = table.Column<bool>(type: "bit", nullable: false),
|
||||
Weight = table.Column<int>(type: "int", nullable: false),
|
||||
Cost = table.Column<int>(type: "int", nullable: false),
|
||||
CurrencyType = table.Column<int>(type: "int", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Armors", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "OtherEquipment",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
Name = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
Description = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
Cost = table.Column<int>(type: "int", nullable: false),
|
||||
CurrencyType = table.Column<int>(type: "int", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_OtherEquipment", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Weapons",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
Name = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
Cost = table.Column<int>(type: "int", nullable: false),
|
||||
Weight = table.Column<int>(type: "int", nullable: false),
|
||||
CurrencyType = table.Column<int>(type: "int", nullable: false),
|
||||
DiceCount = table.Column<int>(type: "int", nullable: false),
|
||||
DiceValue = table.Column<int>(type: "int", nullable: false),
|
||||
TwoHandDiceCount = table.Column<int>(type: "int", nullable: true),
|
||||
TwoHandDiceValue = table.Column<int>(type: "int", nullable: true),
|
||||
TwoHandDamageType = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
Description = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
WeaponType = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
RangeMeele = table.Column<int>(type: "int", nullable: false),
|
||||
RangeThrowNormal = table.Column<int>(type: "int", nullable: true),
|
||||
RangeThrowLong = table.Column<int>(type: "int", nullable: true),
|
||||
RangeLong = table.Column<int>(type: "int", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Weapons", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "CharacterArmors",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
CharacterId = table.Column<int>(type: "int", nullable: false),
|
||||
ArmorId = table.Column<int>(type: "int", nullable: false),
|
||||
InUse = table.Column<bool>(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<int>(type: "int", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
CharacterId = table.Column<int>(type: "int", nullable: false),
|
||||
OtherEquipmentId = table.Column<int>(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<int>(type: "int", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
CharacterId = table.Column<int>(type: "int", nullable: false),
|
||||
WeaponId = table.Column<int>(type: "int", nullable: false),
|
||||
InUse = table.Column<bool>(type: "bit", nullable: false),
|
||||
HoldInRightHand = table.Column<bool>(type: "bit", nullable: false),
|
||||
HoldInLeftHand = table.Column<bool>(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<65>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");
|
||||
}
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@ -232,5 +232,161 @@ namespace SessionCompanion.Database
|
||||
};
|
||||
return characters;
|
||||
}
|
||||
|
||||
static public List<CharacterWeapon> SeedCharacterWeapon()
|
||||
{
|
||||
List<CharacterWeapon> characterWeapons = new List<CharacterWeapon>
|
||||
{
|
||||
new CharacterWeapon
|
||||
{
|
||||
Id = 1,
|
||||
CharacterId = 1,
|
||||
WeaponId = 1,
|
||||
InUse = false,
|
||||
HoldInLeftHand = false,
|
||||
HoldInRightHand = false
|
||||
},
|
||||
new CharacterWeapon
|
||||
{
|
||||
Id = 2,
|
||||
CharacterId = 1,
|
||||
WeaponId = 4,
|
||||
InUse = true,
|
||||
HoldInLeftHand = true,
|
||||
HoldInRightHand = false
|
||||
},
|
||||
new CharacterWeapon
|
||||
{
|
||||
Id = 3,
|
||||
CharacterId = 2,
|
||||
WeaponId = 2,
|
||||
InUse = true,
|
||||
HoldInLeftHand = false,
|
||||
HoldInRightHand = true
|
||||
},
|
||||
new CharacterWeapon
|
||||
{
|
||||
Id = 4,
|
||||
CharacterId = 2,
|
||||
WeaponId = 8,
|
||||
InUse = false,
|
||||
HoldInLeftHand = false,
|
||||
HoldInRightHand = false
|
||||
},
|
||||
new CharacterWeapon
|
||||
{
|
||||
Id = 5,
|
||||
CharacterId = 3,
|
||||
WeaponId = 9,
|
||||
InUse = false,
|
||||
HoldInLeftHand = false,
|
||||
HoldInRightHand = false
|
||||
},
|
||||
new CharacterWeapon
|
||||
{
|
||||
Id = 7,
|
||||
CharacterId = 3,
|
||||
WeaponId = 7,
|
||||
InUse = true,
|
||||
HoldInLeftHand = false,
|
||||
HoldInRightHand = true
|
||||
}
|
||||
};
|
||||
return characterWeapons;
|
||||
}
|
||||
|
||||
static public List<CharacterArmor> SeedCharacterArmor()
|
||||
{
|
||||
List<CharacterArmor> characterArmors = new List<CharacterArmor>
|
||||
{
|
||||
new CharacterArmor
|
||||
{
|
||||
Id = 1,
|
||||
CharacterId = 1,
|
||||
ArmorId = 1,
|
||||
InUse = true,
|
||||
},
|
||||
new CharacterArmor
|
||||
{
|
||||
Id = 2,
|
||||
CharacterId = 1,
|
||||
ArmorId = 3,
|
||||
InUse = false,
|
||||
},
|
||||
new CharacterArmor
|
||||
{
|
||||
Id = 3,
|
||||
CharacterId = 2,
|
||||
ArmorId = 2,
|
||||
InUse = true,
|
||||
},
|
||||
new CharacterArmor
|
||||
{
|
||||
Id = 4,
|
||||
CharacterId = 2,
|
||||
ArmorId = 5,
|
||||
InUse = false,
|
||||
},
|
||||
new CharacterArmor
|
||||
{
|
||||
Id = 5,
|
||||
CharacterId = 3,
|
||||
ArmorId = 6,
|
||||
InUse = true,
|
||||
},
|
||||
new CharacterArmor
|
||||
{
|
||||
Id = 6,
|
||||
CharacterId = 3,
|
||||
ArmorId = 2,
|
||||
InUse = false,
|
||||
}
|
||||
};
|
||||
return characterArmors;
|
||||
}
|
||||
|
||||
static public List<CharacterOtherEquipment> SeedCharacterOtherEquipment()
|
||||
{
|
||||
List<CharacterOtherEquipment> characterOtherEquipment = new List<CharacterOtherEquipment>
|
||||
{
|
||||
new CharacterOtherEquipment
|
||||
{
|
||||
Id = 1,
|
||||
CharacterId = 1,
|
||||
OtherEquipmentId = 1
|
||||
},
|
||||
new CharacterOtherEquipment
|
||||
{
|
||||
Id = 2,
|
||||
CharacterId = 1,
|
||||
OtherEquipmentId = 3
|
||||
},
|
||||
new CharacterOtherEquipment
|
||||
{
|
||||
Id = 3,
|
||||
CharacterId = 2,
|
||||
OtherEquipmentId = 2
|
||||
},
|
||||
new CharacterOtherEquipment
|
||||
{
|
||||
Id = 4,
|
||||
CharacterId = 2,
|
||||
OtherEquipmentId = 5
|
||||
},
|
||||
new CharacterOtherEquipment
|
||||
{
|
||||
Id = 5,
|
||||
CharacterId = 3,
|
||||
OtherEquipmentId = 6
|
||||
},
|
||||
new CharacterOtherEquipment
|
||||
{
|
||||
Id = 6,
|
||||
CharacterId = 3,
|
||||
OtherEquipmentId = 2
|
||||
}
|
||||
};
|
||||
return characterOtherEquipment;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
124
SessionCompanion/SessionCompanion.Database/SeedFromJsons.cs
Normal file
124
SessionCompanion/SessionCompanion.Database/SeedFromJsons.cs
Normal file
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
@ -21,4 +21,8 @@
|
||||
<ProjectReference Include="..\SessionCompanion.ViewModels\SessionCompanion.ViewModels.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="JsonData\" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
@ -28,7 +28,7 @@ namespace SessionCompanion.ViewModels.Enums
|
||||
ep,
|
||||
|
||||
/// <summary>
|
||||
/// Złotot
|
||||
/// Złoto
|
||||
/// </summary>
|
||||
gp,
|
||||
|
||||
|
@ -332,7 +332,7 @@
|
||||
</member>
|
||||
<member name="F:SessionCompanion.ViewModels.Enums.CurrencyType.gp">
|
||||
<summary>
|
||||
Złotot
|
||||
Złoto
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:SessionCompanion.ViewModels.Enums.CurrencyType.pp">
|
||||
|
Loading…
Reference in New Issue
Block a user