Okay, thank you for getting involved. I do think you have to sign up with codepen to fork & edit pens.
The numbers that change below the name is the tally & tallyMark numbers, when the game gets done or the conditional statements start working the user will not be able to see the tally numbers. So the game is going to be mostly event based by the tally or tallyMark numbers. For example, their would be specific events at certain number marks and possible events when players are in certain ranges. For example, I want to the first monster event to happen at tallyMark 12. The users action keys would change to a fight key set (not yet coded). The value assigned to the objects like the weapons or armor will give its "ability score" so a stick's weapon value is 1 and an boar's value is one, so the user would only have to hit the boar once to kill it. Same goes for armor (armorValue would be equal to its defense points), spells (spell Value would be equal to its duration time), etc etc etc.
An example of the tally range would be like, if the first town is to appear when the player tallyMark hits the 20-30 range. So it wouldn't be every time at a certain point but more random so players get that random aspect. Also the difficulty is a unique thing I'm trying where, if a player's tallyMark hits 100 the player will be bumped up to easyHard instead of just easy but at the same time for example let's say the player is under 100 tallyMark points, in the 1st town and is on easyPick but they run to the castle to enter the castle's keep, the difficulty will automatically bump up to easyHardPick, making it less likely the player will succeed without stuff. So the difficulty will have fixed increase and a flow-difficulty so it may go up or down depending on where the player is.
So that's much of the mechanics some still not coded yet but the game I want to be mostly a text adventure but with some interface. The moving keys is a great example but there's also stats (#/#/#/#/#), mana, health and an inventory. So say the player is in a battle, instead of a button that says equip, the user would just click the weapon to equip then the "attack" button would become usable and then they can use it or click on a potion to use a potion. I don't want the fights to be turn based but time based so if a player just sat and didn't do anything, the monster/enemy would keep attacking every x-number of seconds. The time between attacks for random drop enemies would be based on the monsterValue and the time for pre-determined enemies would be based on their monsterValue but in ranges. For example, in the castle's dungeon their could be a dragon placed and its monsterValue is 12 so, it would attack between x times 1-seconds & x times 12-seconds giving opportunities like quick time between attacks and long time between attacks. Also I want to set in attacks that give illusions of like double attacks or sweeping attacks and so forth.
Since you are helping, I will want to place your name/preferred username & finding location (github, codepen or a social media location) in the credits (also not yet coded). You can contact me on Twitter (Twitter.com/Radioactive3D) or ReBuzz app (I'm on Rebuzz) or just continue contacting me here through Hive. Thank you again and I appreciate your assistance.
Just a heads up, I've done more coding since I originally posted this and have included more data there so you may want to check the codepen again https://codepen.io/digimancer3d/pen/QWjKQeR.
RE: Having problems with the code