JSPM

yearzero-roll

1.0.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2
  • Score
    100M100P100Q20698F
  • License MIT

A package for rolling Year Zero Engine dice for Free League Publishing roleplaying games.

Package Exports

  • yearzero-roll

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 (yearzero-roll) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Year Zero Roll

A package for rolling Year Zero Engine dice for Free League Publishing roleplaying games.

Installation & Usage

To install the latest version on npm:

npm install yearzero-roll

To import the Class, add the following line at the top of your JavaScript file:

const YZRoll = require('yearzero-roll');

To create a new roll, use the following code:

let roll = new YZRoll();

Example

// Creates the roll for the Twilight 2000 4E game.
let roll = new YZRoll('t2k');

// Adds one D10 base die and rolls it.
roll.addDice('base', 1, '10');

// Adds one D6 skill die and rolls it.
roll.addSkillDice('skill', 1);

// Pushes the roll.
roll.push();

// Gets the number of successes & banes.
let successes = roll.successCount;
let banes     = roll.baneCount;

See Also