1.2.0 • Published 5 years ago

mafia-example-game v1.2.0

Weekly downloads
3
License
Apache-2.0
Repository
github
Last release
5 years ago

Mafia-Example-Game

A little console game to show off the mafia module. Note that this isn't really the purpose of the module - it's to create multiplayer mafia games. This is just a little test playground you can modify to test stuff.

(Pst, you should open the gif on a new window to see it better!) Imgur

Downloading

Download this playground via NPM:

npm i mafia-example-game

or download this repository as a zip file or clone it. You need these 3 modules to make the game work if you download it this way:

npm i chalk
npm i mafia
npm i readline-sync

How to play

Go to the module's directory and run the game with npm run play.

Playing is pretty self explanatory. See the gif at the beginning of this readme for an example.

Default Roles

  • Sheriff (Town Investigative) - Check if your target is Wolf/Town every night. The werewolf appears as Town.
  • Villiger (Town Casual) - No special abilities.
  • Escort (Town Support) - Roleblock one player every night. If you roleblock a killer wolf, they will kill you.
  • Reviver (Town Protective) - Scry one person every night. If you die during the night, you will revive all dead scried players.
  • Protector (Town Protective) - Protect one person every night from an attack.
  • Werewolf (Wolfs Evil) - On every even night, frame one person. They will appear as Wolf to sheriff. On every odd night, kill one player.
  • Killer Wolf (Wolfs Power) - Kill one player every night.

Town wins when there is 1 or 0 wolfs left. Wolfs win if the town size is equal to the wolf size.

Default Rolelist

Game.rolelist = [
  "Town Investigative",
  "Town Protective",
  "Random Town",
  "Villager",
  "Villager",
  "Werewolf",
  "KillerWolf"
]

Default events

  • On day 1, you'll have the ability to vote.
  • On day 2, Lily will be lynched.
  • On night 1, you'll have the ability to send an action
  • On night 2, you'll have the ability to send an action AND someone else will send an action as well.
1.2.0

5 years ago

1.1.1

5 years ago

1.0.0

5 years ago