Coder Social home page Coder Social logo

muffiabot's Introduction

MuffiaBot

Telegram bot moderating mafia/werewolf game. Currently supports 4 roles: Innocent, Detective, Doctor and Mafioso.

How to

As this bot is currently not hosted anywhere, you need to host it yourself. In order to do so, you need to obtain telegram api token and store this token as system variable under name TELEGRAM_API_TOKEN. Afterwards just run main.py.

Add this bot to group chat, preferably granting him admin rights. On /start command the bot issues message with game registration link. After all players have registered, you may send /begin command to begin the game(the game also starts after registration time has passed or max number of players was reached).

Rules

On game beginning each player gets a role. Roles can be divided into 2 groups: innocents(Innocent, Detective, Doctor) and villains(Mafioso). Innocents aim to free their city from villains and villains want to eliminate innocents, so that they start to dominate.

Game itself has 2 phases: night and day.

Night

During the night players with special abilities(Detective, Doctor, Mafioso) are asked by the bot to perform some actions, e.g. Mafioso vote for their victim.

Day

During the day night victims names are displayed in group chat along with their roles and all alive players have time to debate and determine who is Mafioso, the day ends with lynching vote. Only player receiving more than a half of all possible votes gets lynched with his role revealed.

Game end

The game continues till all villains are killed off or they start to dominate.

Roles

Innocent

Average city inhabitant. Innocent stays idle at night, but can participate in day lynching vote. On game start around 70% of players are Innocent.

Detective

Leader of city innocents, most powerful role after Mafioso. During the night can either kill another player or check his role. Usually there is 1 Detective.

Doctor

Another innocent with special ability. Doctor can heal one player during the night, also himself, so that this player becomes invincible for attemps to kill him. Usually there is 1 Doctor.

Mafioso

Main antagonists of the game. Mafioso players are aware of other mafia members and are supposed to act as a team. During the night Mafioso vote for their victim. Depending on overall number of players, there are usually 1 to 3 Mafioso.

muffiabot's People

Contributors

gekas145 avatar ak4ssh avatar

Forkers

mohsinkhann12

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.