Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const item = actor.itemTypes.skill.find(i => i.name === "Survival"); // Change this value to the desired skill
- const result = await fallout.Dialog2d20.createDialog({
- rollName: item.localizedName,
- diceNum: 2,
- attribute: actor.system.attributes.int.value,
- skill: item.system.value,
- tag: item.system.tag,
- complication: parseInt(actor.system.complication)
- });
- let rolledsuccess = 0;
- result.dicesRolled.forEach(element => {
- rolledsuccess += element.success;
- });
- const totalnumberofsuccess = rolledsuccess;
- console.log(totalnumberofsuccess);
- return {
- success: totalnumberofsuccess >= 1-(item.system.value), // Change this value to the desired difficulty level
- consume: true
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement