@randsum/blades
TypeScript icon, indicating that this package has built-in type declarations

0.1.24 • Public • Published

@randsum/blades

Blades in the Dark compatible dice rolling for randsum

npm version bundle size Types License Downloads

A utility for rolling dice in Forged in the Dark systems!

  • 🎲 Standard Blades in the Dark position and effect rolls
  • 🎯 Automatic handling of dice pools
  • 🔒 Full TypeScript support
  • 🪶 Lightweight implementation

Installation

npm install @randsum/blades
# or
yarn add @randsum/blades
# or
bun add @randsum/blades

Usage

import { rollBlades } from '@randsum/blades'
import type { BladesResult } from '@randsum/blades'

// Basic roll with dice pool
const result = rollBlades(2)
// Returns the highest die result and determines outcome

API Reference

rollBlades

Makes a Blades in the Dark roll, returning the result based on the highest die.

function rollBlades(dicePool: number): BladesResult
type BladesResult = 'critical' | 'success' | 'partial' | 'failure'

Related Packages

Made with 👹 by RANDSUM

Readme

Keywords

none

Package Sidebar

Install

npm i @randsum/blades

Weekly Downloads

78

Version

0.1.24

License

MIT

Unpacked Size

52.6 kB

Total Files

23

Last publish

Collaborators

  • alxjrvs