Skip to content

Commit

Permalink
8.0.0 Bump (#644)
Browse files Browse the repository at this point in the history
  • Loading branch information
alxjrvs authored Dec 29, 2024
1 parent 3193e0b commit d713c5c
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 21 deletions.
30 changes: 15 additions & 15 deletions GETTING_STARTED.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Getting Started

## 12/19/24 Note: This documentation is still broadly accurate, but may contain small errors. I am going through and updating this as we speak, feel free to reach out for any usability questions

## Insalling

Add `randsum` to your package.json, or copy and paste one of these:
Expand Down Expand Up @@ -119,26 +121,24 @@ roll({

See the [Randsum Dice Notation](https://github.com/RANDSUM/randsum-ts/blob/main/RANDSUM_DICE_NOTATION.md) for more usage information.

One note on Custom Sides: whenever your roll includes custom dice sides, `total` will return `0`. This is because we can't meaningfully calculate the numerical total of a set of strings! This will return zero if _any_ dice pool in the roll is custom.

For example:

```ts
roll('2d20')
// total = 1-20
import { rollCustomFaces } from 'randsum'

roll({
sides: ['h', 't'],
rollCustomFaces('2d20')

rollCustomFaces({
faces: ['h', 't'],
quantity: 4
}) // total = 0

roll([
{
sides: ['h', 't'],
quantity: 4
},
'2d20'
]) // total = 0
}) /
rollCustomFaces([
{
faces: ['h', 't'],
quantity: 4
},
'2d20'
])
```

### Advanced Usage
Expand Down
5 changes: 3 additions & 2 deletions RANDSUM_DICE_NOTATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,10 @@ In `randsum` :

```js
// Roll 6 two-sided die with the sides "H" and "T"
import { rollCustomFaces } from 'randsum'

roll('6d{HT}')
roll({
rollCustomFaces('6d{HT}')
rollCustomFaces({
sides: ['H', 'T'],
quantity: 6
})
Expand Down
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,10 @@ roll({ quantity: 4, sides: 6, modifiers: { drop: { lowest: true } } })
roll('4d6L')

// Roll 4 Fudge dice
roll({ quantity: 4, sides: ['+', '+', '-', '-', ' ', ' '] })

import { rollCustomFaces } from 'randsum'

rollCustomFaces({ quantity: 4, faces: ['+', '+', '-', '-', ' ', ' '] })

// Roll a single D20
import { D20 } from 'randsum'
Expand All @@ -60,7 +63,9 @@ const D120 = new D(120)
D120.roll()

//'heads' or 'tails'?
const Coin = new D(['heads', 'tails'])
import { CustomFacesD } from 'randsum'

const Coin = new CustomFacesD(['heads', 'tails'])
Coin.roll()
```

Expand Down
Binary file modified bun.lockb
Binary file not shown.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "randsum",
"version": "7.1.0",
"version": "8.0.0",
"private": false,
"author": "Alex Jarvis",
"icon": "https://raw.githubusercontent.com/RANDSUM/randsum-ts/main/icon.webp",
Expand Down Expand Up @@ -74,7 +74,7 @@
"size-limit": "^11.1.6",
"typescript": "^5.7.2",
"typescript-eslint": "^8.18.2",
"typedoc": "^0.27.5"
"typedoc": "^0.27.6"
},
"dependencies": {
"uuid": "^11.0.3"
Expand Down

0 comments on commit d713c5c

Please sign in to comment.