Feature: implement loot resolution system with gold and item tracking from defeated creatures

This commit is contained in:
Keith Solomon
2026-03-15 14:24:39 -05:00
parent cf98636a52
commit 6c2257b032
10 changed files with 478 additions and 7 deletions

View File

@@ -13,6 +13,79 @@ const samplePack = {
],
tables: [
...level1EncounterTables,
{
id: "table.level1.humanoid-loot",
code: "L1HL",
name: "Level 1 Humanoid Loot",
category: "loot",
level: 1,
page: 122,
diceKind: "d6",
entries: [
{
key: "1-2",
min: 1,
max: 2,
label: "Scavenged coins",
effects: [{ type: "gain-gold", amount: 1, target: "self" }],
},
{
key: "3-4",
min: 3,
max: 4,
label: "Bone Charm",
references: [{ type: "item", id: "item.bone-charm" }],
},
{
key: "5",
exact: 5,
label: "Silver Clasp and coins",
references: [{ type: "item", id: "item.silver-clasp" }],
effects: [{ type: "gain-gold", amount: 2, target: "self" }],
},
{
key: "6",
exact: 6,
label: "Key Ring and coin purse",
references: [{ type: "item", id: "item.keeper-keyring" }],
effects: [{ type: "gain-gold", amount: 3, target: "self" }],
},
],
notes: ["Starter loot table for martial and humanoid encounters."],
mvp: true,
},
{
id: "table.level1.beast-loot",
code: "L1BL",
name: "Level 1 Beast Loot",
category: "loot",
level: 1,
page: 122,
diceKind: "d6",
entries: [
{
key: "1-4",
min: 1,
max: 4,
label: "Nothing useful",
},
{
key: "5",
exact: 5,
label: "Trophy Fang",
references: [{ type: "item", id: "item.trophy-fang" }],
},
{
key: "6",
exact: 6,
label: "Trophy Fang and stray coin",
references: [{ type: "item", id: "item.trophy-fang" }],
effects: [{ type: "gain-gold", amount: 1, target: "self" }],
},
],
notes: ["Starter loot table for basic animal encounters."],
mvp: true,
},
{
id: "table.weapon-manoeuvres-1",
code: "WMT1",
@@ -123,6 +196,42 @@ const samplePack = {
consumable: false,
mvp: true,
},
{
id: "item.bone-charm",
name: "Bone Charm",
itemType: "treasure",
stackable: false,
consumable: false,
valueGp: 2,
mvp: true,
},
{
id: "item.silver-clasp",
name: "Silver Clasp",
itemType: "treasure",
stackable: false,
consumable: false,
valueGp: 4,
mvp: true,
},
{
id: "item.keeper-keyring",
name: "Keeper Keyring",
itemType: "treasure",
stackable: false,
consumable: false,
valueGp: 5,
mvp: true,
},
{
id: "item.trophy-fang",
name: "Trophy Fang",
itemType: "treasure",
stackable: true,
consumable: false,
valueGp: 1,
mvp: true,
},
],
potions: [
{
@@ -163,6 +272,7 @@ const samplePack = {
numberAppearing: "1-2",
},
xpReward: 1,
lootTableCodes: ["L1BL"],
sourcePage: 102,
traits: ["level-1", "sample"],
mvp: true,
@@ -182,6 +292,7 @@ const samplePack = {
armour: 1,
},
xpReward: 2,
lootTableCodes: ["L1HL"],
sourcePage: 102,
traits: ["level-1", "martial"],
mvp: true,
@@ -201,6 +312,7 @@ const samplePack = {
armour: 1,
},
xpReward: 3,
lootTableCodes: ["L1HL"],
sourcePage: 102,
traits: ["level-1", "martial"],
mvp: true,
@@ -217,6 +329,7 @@ const samplePack = {
damage: 1,
},
xpReward: 1,
lootTableCodes: ["L1HL"],
sourcePage: 102,
traits: ["level-1", "martial"],
mvp: true,
@@ -233,6 +346,7 @@ const samplePack = {
damage: 1,
},
xpReward: 1,
lootTableCodes: ["L1BL"],
sourcePage: 102,
traits: ["level-1", "beast"],
mvp: true,
@@ -249,6 +363,7 @@ const samplePack = {
damage: 1,
},
xpReward: 2,
lootTableCodes: ["L1BL"],
sourcePage: 102,
traits: ["level-1", "beast"],
mvp: true,