Advertisement
Guest User

Untitled

a guest
May 24th, 2018
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function skillCheck(difficulty, attributeType, attributeValue) {
  2.     if (difficulty === 'hard') {
  3.         story.success = checkAttribute(attributeType, attributeValue, 100);
  4.     }
  5.     //...
  6. }
  7.  
  8. function checkAttribute(attributeType, attributeValue, threshold) {
  9.     if (attributeType === 'Agility') {
  10.         if (attributeValue >= threshold) {
  11.             return true;
  12.         } else {
  13.             return false;
  14.         }
  15.     }
  16.     //...
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement