How the game works

## Setting the Game up

Get your friends together in the server and join the party! To join, type m.join. You need at least 5 players to play a game. Change the game mode and any other time settings should you wish to. Once everyone is ready, the leader or admin types m.setup for the bot to give everyone their roles. Once the bot sends an embed saying that everything is ready, the leader or admin types m.start and the bot will create the mafia text channel in which the game will be played.

## Night Phase

The game starts with a night phase. This is when you get to use your abilities(sorry villagers)! Each night, the bot will send 3 embeds in the game channel. The first is a full list of players that are alive or dead. The second is a prompt to "go to sleep" as the real life version of this game would have you do. The third is a prompt to check your DMs to perform your ability.

If you are a role that has an ability each night, the bot will dm you an embed for you to perform your role. Read the list of options and react according to whichever you choose. Note that if you react to more than one for a role with only one target, the bot will recognise your first choice only. The amount of time you have to make a choice is referred to as the DM Time.

Once the bot sends a message recording your choice, your ability will be acted out accordingly. For example, the Detective and Spy will receive their information, the Godfather will proceed to kill someone, etc.

## Mafia Attack

Each night, the mafia's victim will die and not be able to perform their role (unless they are higher than the mafia on the Role Hierarchy).

## Day Phase

Each day phase begins with a "story", telling who died to the mafia and any other events that happened, such as a hoard attack or a Baiter visit. The players then have a set amount of time to discuss who the mafia is. This is referred to as the Talk Time.

Once the talk time ends, the bot displays the voting embed. This allows players to react to vote for a player which they think is the mafia. The amount of time the bot allows players to vote before recording the votes is referred to as the Vote Time.

If there is an equal number of votes on 2 or more players, or no one has enough votes to be nominated, the day phase ends and the next night begins.

If there is a sufficient amount of votes to nominate someone, the game enters the Trial Phase.

## Trial Phase

If someone is nominated by enough players, they are chosen to put on the defense. The nominated player now has 30 seconds to defend themselves with arguments. The other players can still talk during this phase though.

Once the defense time is up, the players can decide whether the nominated is guilty or innocent. For this judgement, there isn't a minimum amount of votes to lynch the nominated. The players only need to have more guilty judgements than innocent ones. Even one guilty judgement against no innocent judgement is enough to lynch the nominated.

If the nominated has an even number or more of innocent judgements than guilty judgements, they are let off and the game continues into the next night phase.

If the nominated has more guilty judgements than innocent judgements, they are lynched(hanged) and are out of the game. If the settings for showing a dead player's role is on, the bot will reveal that player's role and the game will continue into the next night phase.

## And Repeat...

This is the standard cycle of the game. The game continues on and on until either all the mafias are dead, a game-ending neutral wins or exactly half the players alive are mafias.

## End of the Game

Once the game ends, the bot will dm players who won, giving them some mafia points. A result embed is shown, displaying all the players' roles and who won. After 10 seconds, the bot will delete the game channel that it created. Once the channel is deleted, the bot is ready to start a new round.

## Alive Bonus

If you won and were alive when the game ended, you will receive an extra 50 mafia points as an alive bonus!