oskarrough/slaytheweb

Smarter dungeons

オープン

#150 opened on 2021/06/30

 (2 件のコメント) (0 件のリアクション) (0 人の担当者)JavaScript (57 件のフォーク)auto 404
featurehelp wanted

Repository metrics

Stars
 (294 個のスター)
PR merge metrics
 (30d に merged PR はありません)

説明

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:

  • Add difficulties to the monster rooms

The difficulties could be numbers (1-3?) or a size (s, m, l, xl) or just a string easy, medium, hard.

  • Add categories/tags to the monster rooms

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.

  • Improve logic for choosing which monster or elite room

See code here: https://github.com/oskarrough/slaytheweb/blob/9e466aa87da8156215fa017cef681c3505e83db0/public/game/dungeon.js#L75-L76)

Remember to use state.dungeon.y (the current floor) as well to make it balanced.

コントリビューターガイド