This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function postToChat(num, label){ | |
var plusOrMinus = Math.random() < 0.5 ? -1 : 1; | |
console.log(plusOrMinus) | |
let DC = num+plusOrMinus*(Math.floor(Math.random()*4)); | |
console.log(DC) | |
let chatData = { | |
user: game.user._id, | |
speaker: {alias: "DC"}, | |
content: `The ${label} DC is: <b>${DC}<b>`, | |
whisper : ChatMessage.getWhisperRecipients("USERNAME_OF_GM") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const cardImageURLs = [`https://i.imgur.com/IPA90hF.png`,`https://i.imgur.com/L7ZaH32.png`,`https://i.imgur.com/kkm7WFo.png`,`https://i.imgur.com/AfyefuZ.png`,`https://i.imgur.com/NDl5PRh.png`,`https://i.imgur.com/kgCkfYc.png`,`https://i.imgur.com/1QoHhca.png`,`https://i.imgur.com/60lahPl.png`,`https://i.imgur.com/ajc5X5U.png`,`https://i.imgur.com/QNPySfx.png`,`https://i.imgur.com/ufBY236.png`,`https://i.imgur.com/zH25V18.png`,`https://i.imgur.com/j4Hprzx.png`,`https://i.imgur.com/mG3DtLZ.png`,`https://i.imgur.com/QW09Ne1.png`,`https://i.imgur.com/o9pYveI.png`,`https://i.imgur.com/VmqUGQZ.png`,`https://i.imgur.com/l6rSLMN.png`,`https://i.imgur.com/o3GOJo6.png`,`https://i.imgur.com/kKZht9N.png`,`https://i.imgur.com/lQpdgAD.png`,`https://i.imgur.com/epL2BwD.png`] | |
const cardNames = [`Balance`,`Comet`,`Donjon`,`Euryale`,`Fates`,`Flames`,`Fool`,`Gem`,`Idiot`,`Jester`,`Key`,`Knight`,`Moon`,`Rogue`,`Ruin`,`Skull`,`Star`,`Sun`,`Talons`,`Throne`,`Vizier`,`Void`] | |
const cardDescriptions = [`Your mind suffers a wrenchi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let temp = [`Normal for the season`,`${(Math.ceil(Math.random()*4))*10} degrees Fahrenheit colder than normal`,`${(Math.ceil(Math.random()*4))*10} degrees Fahrenheit hotter than normal`]; | |
let wind = [`None`,`Light`,`Strong`]; | |
let precip = [`None`, `Light rain or light snowfall`,` Heavy rain or heavy snowfall`]; | |
function roll(){return Math.ceil(Math.random()*20)} | |
function rollTable(name,arr,first,second,third,fourth) { | |
let tempRoll = roll() | |
let message = `${name}: `; | |
if (tempRoll <= first) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//rolltable by u/DougTheDragonborn from https://www.reddit.com/r/BehindTheTables/comments/fgdrq0/omens_from_dreams_an_all_dice_table/ | |
let setting = [ | |
`You find yourself on a ship at night with rain pelting your face. `, | |
`You find yourself in a seemingly peaceful grove full of flowers. `, | |
`You find yourself at the top of a wizard's tower, looking over the ledge. `, | |
`You find yourself sitting at a the bar of a familiar inn. `, | |
`You find yourself face down in the sand with no structure in sight. `, | |
`You find yourself falling from the sky and crashing into a body of water. `, | |
`You find yourself on a battlefield lined with dead soldiers and common folk alike. `, |