Package Exports
- @swrpg-online/dice
- @swrpg-online/dice/dist/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@swrpg-online/dice) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
swrpg-dice
A TypeScript library for simulating Star Wars RPG narrative dice rolls.
Installation
npm install swrpg-diceFeatures
- Complete narrative dice system implementation
- Detailed roll breakdown for each die
- Comprehensive test coverage
- TypeScript type safety
Usage
Basic usage:
import { roll, DicePool } from 'swrpg-dice';
const pool: DicePool = {
proficiencyDice: 2,
abilityDice: 1,
difficultyDice: 2
};
const result = roll(pool);
// Access detailed results
console.log(result.results); // Array of individual die results
console.log(result.summary); // Summary of total successes, advantages, etc.Each roll result includes:
- Detailed breakdown of each die roll
- Die type identification
- Individual results per die
- Overall summary of the roll