| Copyright | (c) Henry J. Wylde, 2016 |
|---|---|
| License | BSD3 |
| Maintainer | public@hjwylde.com |
| Safe Haskell | None |
| Language | Haskell2010 |
Game.Werewolf.Role
Description
Role instances are defined in Game.Werewolf.Internal.Role. This module just re-exports the functions relevant to the public interface.
- data Role
- name :: Lens' Role Text
- allegiance :: Lens' Role Allegiance
- balance :: Lens' Role Int
- description :: Lens' Role Text
- advice :: Lens' Role Text
- data Allegiance
- = Angel
- | Villagers
- | Werewolves
- allRoles :: [Role]
- restrictedRoles :: [Role]
Role
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
Instances
restrictedRoles :: [Role] Source
A list containing roles that are restricted to a single instance per game.
restrictedRoles = allRoles \\ [simpleVillagerRole, simpleWerewolfRole]