elffriend-dnd / foundryvtt-auto-roll-npc-save-5e Goto Github PK
View Code? Open in Web Editor NEWA Foundry VTT module which informs the GM of a saving throw result for an NPC in 5e when targeted.
License: MIT License
A Foundry VTT module which informs the GM of a saving throw result for an NPC in 5e when targeted.
License: MIT License
Hey Buddy, I feel that it would be enormously helpful to have the module auto-select / auto target tokens that didn't succeed their saving throw.
In addition if I were able to shift select tokens from the chat card I'd be able to make even more use out of this wonderful module.
The macro below does this in a very smart way. Feel free to dismiss this request if it wouldn't be feasible.
const options = Object.entries(CONFIG.DND5E.abilities).reduce((acc, e) => {
return acc + ${e[1]};
}, "");
new Dialog({
title: "Roll Saves",
content:
async function rollSaves(abilityId, targetValue){
if(!targetValue) return ui.notifications.warn("No target value given.");
const tokens = new Set([...canvas.tokens.controlled, ...game.user.targets]);
const failed = [];
for(const token of tokens){
const roll = await token.actor.rollAbilitySave(abilityId, {targetValue, fastForward: true});
if(!roll) continue;
if(roll.total < targetValue) failed.push(token);
}
return game.user.updateTokenTargets(failed.map(t => t.id));
}
}
}).render(true);
async function rollSaves(abilityId, targetValue){
if(!targetValue) return ui.notifications.warn("No target value given.");
const tokens = new Set([...canvas.tokens.controlled, ...game.user.targets]);
const failed = [];
for(const token of tokens){
const roll = await token.actor.rollAbilitySave(abilityId, {targetValue, fastForward: true});
if(!roll) continue;
if(roll.total < targetValue) failed.push(token);
}
return game.user.updateTokenTargets(failed.map(t => t.id));
}
I'm not sure if this is working as intended or if it's simply a limitation, but when MRE and Auto Roll NPC Save are both enabled, Foundry won't prompt for Advantage or Disadvantage and will simply do a straight roll.
Hello,
Please find attached the fr.json file for the French language.
fr.zip
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.