lcox74 / uqcsbot-discord

:mortar_board: UQCSbot: Our friendly little Discord bot
https://discord.uqcs.org
MIT License
0 stars 0 forks source link

Basic Race Logic and Implementation #1

Open lcox74 opened 1 year ago

lcox74 commented 1 year ago

We want to have a basic/boilerplate MVP of the Race implementations. This includes the following:

Note: Though the race will have a betting phase, the placing bets will not be supported. It will only be a place holder until after this Issue has been completed.

Note: This also doesn't include rewards or snail experience, as it is the base race mechanics and functionality.

New User

If a user has never played snailrace, then they need to setup their account by using the /snailrace init command. This must generate a User record and a new random snail (which is also set as the default snail).

Host Race

When a user types /snailrace host then it should create a new race with it's own state + Race ID. Setting up the race must handle the no-bets and dont-fill flags. Entry must be open for 10 seconds before closing and going to the BETTING stage.

The host race response message must display the race meta data and the command to join the race. The race must only be the single message that gets edited displaying its state as well as the list of entrants. You can also join the race using the Discord UI View button which functions in the same way.

Join Race

To join a race you must either:

The User's single snail should be displayed as <snail name> (@user) in a list view. Using the command or button the discord response must have the ephemeral flag set so it doesn't flood the chat.

Flags

no-bets: This flag skips the ability to place bets. It will still run the "betting phase" but only displaying all the entrants, including the filled snails who are gonna race before it starts. The odds are still displayed as well.

no-fill: If this is set, then there wont be any additional snails added if the race has less than 4 snails. This opens up more win responses including making fun of a single snail race.

only-one: If this is set, then if there is a draw a new race will automatically begin with the drawn snails. If the next 5 races end in a draw it will give up and announce the drawn winners.

Win Responses

There must be inbetween 5-10 unique responses for the following win conditions:

Condition Number of snails Number of wins
Normal Win 4+ 1
Normal Tie 4+ 2
Normal 3 Way 4+ 3
Normal Super Tie 4+ 4+
Duel Win 2 1
Duel Tie 2 2
Single 1 1
lcox74 commented 1 year ago

The following are the base win responses suggested. This is subject to change and can be amended. This isn't just limited to 10 responses per condition either. These are also found in the race doc.

Normal Win

Normal Tie

Normal 3 Way

Normal Super Tie

Duel Win

Duel Tie

Single

lcox74 commented 1 year ago

As of writing this, this is the current design and function of the /snailrace init function and its responses. This doesn't include errors as it tries to avoid errors, but if it does it will follow the same design with a red bar and accompanying message.

image

lcox74 commented 1 year ago

As of writing this comment this is the current behaviour and design of the /snailrace host command:

image