oskarrough/slaytheweb

Smarter dungeons

開放

#150 建立於 2021年6月30日

 (2 則留言) (0 個反應) (0 位負責人)JavaScript (57 個分叉)auto 404
featurehelp wanted

倉庫指標

星標
 (294 顆星)
PR 合併指標
 (30 天內沒有已合併 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.

貢獻者指南