werewolf-0.4.6.0: A game engine for running werewolf in a chat client

Copyright(c) Henry J. Wylde, 2016
LicenseBSD3
Maintainerpublic@hjwylde.com
Safe HaskellNone
LanguageHaskell2010

Game.Werewolf.Role

Contents

Description

Role instances are defined in Game.Werewolf.Internal.Role. This module just re-exports the functions relevant to the public interface.

Synopsis

Role

data Role Source

Role definitions require only a few pieces of information. Most of the game logic behind a role is implemented in Game.Werewolf.Command and Game.Werewolf.Engine.

The balance attribute on a role indicates the allegiance it favours. For example, a Simple Werewolf has a balance of -4 while the Seer has a balance of 2. A balance of 0 means it favours neither allegiance.

N.B., role equality is defined on just the name as a role's allegiance may change throughout the game.

data Allegiance Source

The Loner allegiances are seldom used, rather they are present for correctness.

Constructors

Angel 
Villagers 
Werewolves 

Instances

allRoles :: [Role] Source

A list containing all the roles defined in this file.

restrictedRoles :: [Role] Source

A list containing roles that are restricted to a single instance per game.

restrictedRoles = allRoles \\ [simpleVillagerRole, simpleWerewolfRole]