module Game.Werewolf.Role (
Role(..), name, allegiance, description, advice,
allRoles, seerRole, villagerRole, werewolfRole,
Allegiance(..),
singular,
) where
import Control.Lens hiding (singular)
import Data.Text as T
import Prelude hiding (all)
data Role = Role
{ _name :: Text
, _allegiance :: Allegiance
, _description :: Text
, _advice :: Text
} deriving (Eq, Read, Show)
allRoles :: [Role]
allRoles = [seerRole, villagerRole, werewolfRole]
seerRole :: Role
seerRole = Role
{ _name = "Seer"
, _allegiance = Villagers
, _description = T.unwords
[ "A fortunate teller by other names, with the ability to see into fellow"
, "townsfolk and determine their allegiance."
]
, _advice = T.unwords
[ "Be extremely careful if you have discovered a Werewolf."
, "It may be worth the pain of revealing yourself in order to identify the player,"
, "but avoid doing this too early."
]
}
villagerRole :: Role
villagerRole = Role
{ _name = "Villager"
, _allegiance = Villagers
, _description = "An ordinary townsperson humbly living in Millers Hollow."
, _advice =
"Bluffing can be a good technique, but you had better be convincing about what you say."
}
werewolfRole :: Role
werewolfRole = Role
{ _name = "Werewolf"
, _allegiance = Werewolves
, _description = "A shapeshifting townsperson that, at night, hunts the residents of Millers Hollow."
, _advice =
"Voting against your partner can be a good way to deflect suspicion from yourself."
}
data Allegiance = Villagers | Werewolves
deriving (Eq, Read, Show)
makeLenses ''Role
singular :: Allegiance -> Text
singular Villagers = "Villager"
singular Werewolves = "Werewolf"