Advertisement
Guest User

Survival 1 Crafting Prompt

a guest
Aug 17th, 2024
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. const item = actor.itemTypes.skill.find(i => i.name === "Survival"); // Change this value to the desired skill
  2.  
  3. const result = await fallout.Dialog2d20.createDialog({
  4. rollName: item.localizedName,
  5. diceNum: 2,
  6. attribute: actor.system.attributes.int.value,
  7. skill: item.system.value,
  8. tag: item.system.tag,
  9. complication: parseInt(actor.system.complication)
  10. });
  11.  
  12. let rolledsuccess = 0;
  13. result.dicesRolled.forEach(element => {
  14. rolledsuccess += element.success;
  15. });
  16. const totalnumberofsuccess = rolledsuccess;
  17. console.log(totalnumberofsuccess);
  18.  
  19. return {
  20. success: totalnumberofsuccess >= 1-(item.system.value), // Change this value to the desired difficulty level
  21. consume: true
  22. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement