Skip to content

Commit

Permalink
add example with roll formula many people didn't know that
Browse files Browse the repository at this point in the history
  • Loading branch information
p4535992 committed Mar 2, 2024
1 parent 73da666 commit 4b2f9fd
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -889,6 +889,9 @@ game.itempiles.API.updateCurrencies(tokenOrActor, "10gp");
// Set the value on the GP currency with the quantity 10 and on the SP currency with the quantity 5 to the target
game.itempiles.API.updateCurrencies(tokenOrActor, "10gp 5sp");

// Set the value on the GP currency with the quantity 1d4 and on the SP currency with the quantity 1d3 to the target
game.itempiles.API.updateCurrencies(actor, "1d4gp 1d3sp")

```

---
Expand Down Expand Up @@ -918,7 +921,10 @@ const tokenOrActor = game.actors.getName("Bharash");
game.itempiles.API.addCurrencies(tokenOrActor, "10gp");

// Add 10 GP and 5 SP to the target
game.itempiles.API.removeCurrencies(tokenOrActor, "10gp 5sp");
game.itempiles.API.addCurrencies(tokenOrActor, "10gp 5sp");

// Add 1d4 GP to the target
game.itempiles.API.addCurrencies(tokenOrActor, "1d4gp");

```

Expand Down Expand Up @@ -952,6 +958,9 @@ game.itempiles.API.removeCurrencies(tokenOrActor, "10gp");
// Remove 10 GP and 5 SP from the target
game.itempiles.API.removeCurrencies(tokenOrActor, "10gp 5sp");

// Remove 1d4 GP from the target
game.itempiles.API.removeCurrencies(tokenOrActor, "1d4gp");

```

---
Expand Down

0 comments on commit 4b2f9fd

Please sign in to comment.