✨Feature: add character creation logic and tests
- Implement character creation functions to handle adventurer setup. - Add validation for adventurer name and selection of starting items. - Introduce new items in sample content pack: Flint and Steel, Pouch, Wax Sealing Kit, and Backpack. - Create tests for character creation functionality to ensure valid options and error handling. ✨Feature: implement dice rolling mechanics and tests - Add functions for rolling various dice types (d3, d6, 2d6, d66) with validation. - Implement modifier application with clamping for roll results. - Create tests to verify correct behavior of dice rolling functions. ✨Feature: add table lookup functionality and tests - Implement table lookup and resolution logic for defined tables. - Support for modified ranges and fallback to nearest entries. - Create tests to ensure correct table entry resolution based on roll results.
This commit is contained in:
@@ -72,6 +72,14 @@ const samplePack = {
|
||||
},
|
||||
],
|
||||
items: [
|
||||
{
|
||||
id: "item.flint-and-steel",
|
||||
name: "Flint and Steel",
|
||||
itemType: "gear",
|
||||
stackable: false,
|
||||
consumable: false,
|
||||
mvp: true,
|
||||
},
|
||||
{
|
||||
id: "item.ration",
|
||||
name: "Ration",
|
||||
@@ -88,6 +96,30 @@ const samplePack = {
|
||||
consumable: false,
|
||||
mvp: true,
|
||||
},
|
||||
{
|
||||
id: "item.pouch",
|
||||
name: "Pouch",
|
||||
itemType: "gear",
|
||||
stackable: false,
|
||||
consumable: false,
|
||||
mvp: true,
|
||||
},
|
||||
{
|
||||
id: "item.wax-sealing-kit",
|
||||
name: "Wax Sealing Kit",
|
||||
itemType: "gear",
|
||||
stackable: false,
|
||||
consumable: false,
|
||||
mvp: true,
|
||||
},
|
||||
{
|
||||
id: "item.backpack",
|
||||
name: "Backpack",
|
||||
itemType: "gear",
|
||||
stackable: false,
|
||||
consumable: false,
|
||||
mvp: true,
|
||||
},
|
||||
],
|
||||
potions: [
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user