Skip to content

Commit

Permalink
Add cheating prevention
Browse files Browse the repository at this point in the history
  • Loading branch information
slaymance committed Feb 4, 2021
1 parent ed150d1 commit 45c0c98
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions javascript/dnd-character/dnd-character.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ export class Character {
Reflect.set(character, stat, Character.rollAbility());

return Reflect.get(...arguments);
},
set() {
return null; // Prevents cheaters from altering their stats
}
});
}
Expand Down

0 comments on commit 45c0c98

Please sign in to comment.