# ivoire-dice

> A set of magic dice for the Ivoire random number generator framework. — Edit

Latest version **1.0.0** (published 2015-07-03) · BSD license · 0 weekly downloads

## Install

```sh
npm install ivoire-dice
pnpm add ivoire-dice
yarn add ivoire-dice
bun add ivoire-dice
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2015-07-03 |
| First published | 2015-07-03 |
| Weekly downloads | 0 |
| License | BSD |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 (+6 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | David Eyk |
| Maintainers | eykd |
| Keywords | random, number, generator, dice |

## Links

- npm: https://www.npmjs.com/package/ivoire-dice
- Repository: https://github.com/dreamhorn/ivoire-dice
- Issues: https://github.com/dreamhorn/ivoire-dice/issues
- npm.io page: https://npm.io/package/ivoire-dice

## Dependencies (3)

- [ivoire](https://npm.io/package/ivoire.md) 1.x
- [lodash](https://npm.io/package/lodash.md) ^3.10.0
- [owlbear](https://npm.io/package/owlbear.md) ^0.1.0

## Alternatives

- [random-seedable](https://npm.io/package/random-seedable.md) — 27.9K weekly downloads
- [n2words](https://npm.io/package/n2words.md) — 22.2K weekly downloads
- [@stdlib/math-base-special-factorialln](https://npm.io/package/@stdlib/math-base-special-factorialln.md) — 5.7K weekly downloads
- [@stdlib/math-base-special-abs2](https://npm.io/package/@stdlib/math-base-special-abs2.md) — 1.7K weekly downloads
- [commons-math-interpolation](https://npm.io/package/commons-math-interpolation.md) — 1.4K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2015-07-03

## README

ivoire-dice
===========

A set of magic dice for the Ivoire random number generator framework.


Installing
----------

To install, use `npm`:

```
npm install ivoire-dice
```

Alternately, you can find the source [on Github](https://github.com/dreamhorn/ivoire-dice).


Getting Started
---------------

`ivoire-dice` extends the `ivoire` package. You can require it directly:

```
var Ivoire = require('ivoire-dice');
```

Or you can require it alongside `ivoire`:

```
var Ivoire = require('ivoire');
require('ivoire-dice');
```


Reference
---------

`ivoire-dice` adds some methods to the `Ivoire` prototype object, making them
available on all `Ivoire` instances.

### #roll(dexpr)

Roll the dice, as specified by the given dice expression.

`ivoire-dice` supports most common RPG dice notations, relying on the
[Owlbear](https://github.com/jmhnilbog/owlbear) parser to make sense of them:

```
var i = new require('ivoire-dice');

// Roll two six-sided die:
i.roll('2d6');

// Roll one twenty-sided die, adding 5 to the result:
i.roll('1d20 + 5')
```

### #roll_fudge(num)

Roll `num` number of [Fudge dice][fudge]. Fudge dice are six-sided dice with the sides
`[-1, -1, 0, 0, 1, 1]`.

```
var i = new require('ivoire-dice');

// Roll 4dF (the default)
i.roll_fudge();

// Roll 3dF
i.roll_fudge(3);
```


[fudge]: https://en.wikipedia.org/wiki/Fudge_(role-playing_game_system)#Fudge_dice

---
_Source: https://npm.io/package/ivoire-dice · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
