Valhalla Rain

Valhalla rain is a zero-player game or a screensaver where a fighter has died and gone to Valhalla. He/She/It now has to keep fighting with other slain fighters and Heroes over and over.



I am working on this Javascript game now, my target to finish this game is this week, hopefully, my daily schedule does not permit me to code for 4 to 6 hours straight.

Here are some work notes straight from Codepen which is where i am hosting this game. I like coding at Codepen, their user interface makes me feel like a PRO :D


new gameplay elements:
enemy heroes gain experience
random name for non-hero fighters

gameplay flow:
-randomize enemy
-get enemy info and output
-get enemy type
-if enemy is ordinary generate random enemy name
-if enemy is ordinary proceed with attack
-if enemy is hero get enemy weapon
-check if hero and enemy weapon is the same
-if char weapon and hero weapon is the same, replace hero weapon with default weapon
-char and hero proceed with attack
-if char speed val is greater than hero/enemy speed, char attacks first, and vice versa
-attacker removes enemy hp equal to weapon damage
-if char/enemy/hero life is 0 or less
-end fight give experience to winner according to experience value (calculated)
-ordinary enemies do not gain experience but also do not lose their weapon when defeated
-if char/hero life is 0 or less, give small amount of experience (calculated) for failing in battle
-restore heroes life
-check if char/hero experience is ready to level up
-if ready to level up, calculate new values and apply to char/hero
-for heroes, copy the new experience value (wether fail or win) and weapon to data area so it can be accessed again in future encounters
-restart and find another enemy

Comments