role

package
v0.0.0-...-d92090f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 8, 2020 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Good    = iota
	Evil    = iota
	Neutral = iota // won't be used during the Hackathon
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action int

type Attribute

type Attribute int

type Role

type Role struct {
	Name           string    `json:"name"`
	Description    string    `json:"description"`
	Team           int       `json:"team"`
	Parity         int       `json:"-"`
	VoteMultiplier int       `json:"-"`
	Health         int       `json:"-"`
	Alive          bool      `json:"alive"`
	Actions        Action    `json:"night_action"`
	Attributes     Attribute `json:"-"`
}

func AuxSeer

func AuxSeer() *Role

func Cultist

func Cultist() *Role

func Hunter

func Hunter() *Role

func Seer

func Seer() *Role

func Sorcerer

func Sorcerer() *Role

func Villager

func Villager() *Role

func Werewolf

func Werewolf() *Role

func (*Role) HasNightKill

func (r *Role) HasNightKill() bool

func (*Role) HasRandomN0Clear

func (r *Role) HasRandomN0Clear() bool

func (*Role) IsAuxEvil

func (r *Role) IsAuxEvil() bool

IsAuxEvil returns whether or not a player is an aux evil (ie a Cultist).

func (*Role) IsMaxEvil

func (r *Role) IsMaxEvil() bool

IsMaxEvil returns whether or not a player is a max evil (ie a Werewolf).

func (*Role) IsSeer

func (r *Role) IsSeer() bool

IsSeer returns whether or not a player is a seer

func (*Role) Kill

func (r *Role) Kill() bool

Kill attempts to kill the player. If they had more than 1 health (ie were "tough") then they will remain alive.

func (*Role) KnowsMaxes

func (r *Role) KnowsMaxes() bool

func (*Role) SetTinker

func (r *Role) SetTinker()

SetTinker makes a role a tinker: all views will be the inverse of the truth

func (*Role) ViewForAuxEvil

func (r *Role) ViewForAuxEvil() bool

ViewForAuxEvil allows seers to view if a role is aux evil. It differs from IsAuxEvil because the Tinker can invert the result.

func (*Role) ViewForMaxEvil

func (r *Role) ViewForMaxEvil() bool

ViewForMaxEvil allows seers to view if a role is max evil. It differs from IsMaxEvil because the Tinker can invert the result.

func (*Role) ViewForSeer

func (r *Role) ViewForSeer() bool

ViewForSeer allows sorcerers to view if a role is a seer. It differs from IsSeer because the Tinker can invert the result.

func (*Role) ViewsForAux

func (r *Role) ViewsForAux() bool

func (*Role) ViewsForMax

func (r *Role) ViewsForMax() bool

func (*Role) ViewsForSeer

func (r *Role) ViewsForSeer() bool

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL