Implement a custom DS4 "dice" class.

Includes exploding and crit dice modifier, but not tested yet,
as some required types are still missing.
This commit is contained in:
Oliver Rümpelein 2021-01-06 19:15:56 +01:00
parent 9feaa5216d
commit c885d2d405
5 changed files with 112 additions and 6 deletions

View file

@ -4,6 +4,7 @@ import { DS4ActorSheet } from "./actor/actor-sheet";
import { DS4Item } from "./item/item";
import { DS4ItemSheet } from "./item/item-sheet";
import { DS4 } from "./config";
import { DS4Roll } from "./rolls/ds4roll";
Hooks.once("init", async function () {
console.log(`DS4 | Initializing the DS4 Game System\n${DS4.ASCII}`);
@ -21,6 +22,14 @@ Hooks.once("init", async function () {
CONFIG.Actor.entityClass = DS4Actor as typeof Actor;
CONFIG.Item.entityClass = DS4Item as typeof Item;
// Configure Dice
CONFIG.Dice.types = [Die, DS4Roll];
CONFIG.Dice.terms = {
c: Coin,
d: Die,
s: DS4Roll,
};
// Register sheet application classes
Actors.unregisterSheet("core", ActorSheet);
Actors.registerSheet("ds4", DS4ActorSheet, { makeDefault: true });