Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function skillCheck(difficulty, attributeType, attributeValue) {
- if (difficulty === 'hard') {
- story.success = checkAttribute(attributeType, attributeValue, 100);
- }
- //...
- }
- function checkAttribute(attributeType, attributeValue, threshold) {
- if (attributeType === 'Agility') {
- if (attributeValue >= threshold) {
- return true;
- } else {
- return false;
- }
- }
- //...
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement