RPG prove of concept in JavaScipt