Ajout commande /ddr

This commit is contained in:
Vincent Vandemeulebrouck
2020-12-31 11:53:41 +01:00
parent d5c4b69e1d
commit bfffd09f0f
5 changed files with 80 additions and 39 deletions

View File

@ -2,14 +2,6 @@ import { ChatUtility } from "./chat-utility.js";
export class RdDDice {
/* -------------------------------------------- */
static async deDraconique(rollMode="selfroll") {
let roll = new Roll("1d8x8").evaluate();
await this.show(roll, rollMode);
return roll.total - Math.ceil(roll.total / 8);
}
/* -------------------------------------------- */
static async show(roll, rollMode = undefined) {
if (roll.showDice || game.settings.get("foundryvtt-reve-de-dragon", "dice-so-nice") == true) {
@ -23,7 +15,7 @@ export class RdDDice {
if (game.modules.get("dice-so-nice") && game.modules.get("dice-so-nice").active) {
let whisper = null;
let blind = false;
rollMode = rollMode == undefined ? game.settings.get("core", "rollMode") : rollMode;
rollMode = rollMode || game.settings.get("core", "rollMode");
switch (rollMode) {
case "blindroll": //GM only
blind = true;