Problem
Current state of the dungeons:
- The monsters you have to fight in the dungeons are randomly chosen.
- Monsters are divided into three categories:
monsters, elites and bosses.
You only meet bosses at the end, so that's fine.
But monsters and elites are scattered around the floors and since it's random, you might meet a very difficult monster on floor 1 and an easy one on the last floors.
Solution
It'd make for a more fun and balanced game if the logic for choosing a monster and/or elite was smarter.
We could extend the function to choose a monster and elite to account for the floor you are currently on. A plan could look like this:
The difficulties could be numbers (1-3?) or a size (s, m, l, xl) or just a string easy, medium, hard.
The tags I'm not sure we need for now, but could indicate what type of fight it is. For example aoe, single target, scaling, kill fast before it kills you and so on.
See code here:
|
if (nodeType === 'M') return pickRandomFromObj(monsters) |
|
if (nodeType === 'E') return pickRandomFromObj(elites) |
)
Remember to use state.dungeon.y (the current floor) as well to make it balanced.
Problem
Current state of the dungeons:
monsters,elitesandbosses.You only meet bosses at the end, so that's fine.
But monsters and elites are scattered around the floors and since it's random, you might meet a very difficult monster on floor 1 and an easy one on the last floors.
Solution
It'd make for a more fun and balanced game if the logic for choosing a monster and/or elite was smarter.
We could extend the function to choose a monster and elite to account for the floor you are currently on. A plan could look like this:
The difficulties could be numbers (1-3?) or a size (s, m, l, xl) or just a string easy, medium, hard.
The tags I'm not sure we need for now, but could indicate what type of fight it is. For example
aoe,single target,scaling,kill fast before it kills youand so on.See code here:
slaytheweb/public/game/dungeon.js
Lines 75 to 76 in 9e466aa
Remember to use
state.dungeon.y(the current floor) as well to make it balanced.