Files
foundry-Slamother/macros/triggered/panic_check+.js
T

15 lines
774 B
JavaScript

prepTableRoll(`ypcoikqHLhnc9tNs`,`1d20 [+]`,`high`,false,false,'system.other.stress.value','>');
//run the panic check
async function prepTableRoll(tableName,rollString,aimFor,zeroBased,checkCrit,rollAgainst,comparison) {
//determine who to run the macro for
if (game.settings.get('mosh','macroTarget') === 'character') {
//roll the table for the player's 'Selected Character'
game.user.character.rollTable(tableName,rollString,aimFor,zeroBased,checkCrit,rollAgainst,comparison);
} else if (game.settings.get('mosh','macroTarget') === 'token') {
//roll the table for all selected tokens
canvas.tokens.controlled.foreach(function(token){
token.actor.rollTable(tableName,rollString,aimFor,zeroBased,checkCrit,rollAgainst,comparison);
});
}
}