model

package
v0.0.0-...-ce6f50e Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2024 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ROLE_SEER = Role{
		Name:        SEER,
		Variant:     NONE,
		Team:        TEAM_VILLAGER,
		DisplayTeam: TEAM_VILLAGER,
		Action:      Scry,
	}
	ROLE_CURSED_SEER = Role{
		Name:        SEER,
		Variant:     CURSED,
		Team:        TEAM_VILLAGER,
		DisplayTeam: TEAM_VILLAGER,
		Action:      Scry,
	}
	ROLE_ANCIENT_SEER = Role{
		Name:        SEER,
		Variant:     ANCIENT,
		Team:        TEAM_VILLAGER,
		DisplayTeam: TEAM_VILLAGER,
		Action:      Scry,
	}
	ROLE_GHOST = Role{
		Name:        GHOST,
		Variant:     NONE,
		Team:        TEAM_VILLAGER,
		DisplayTeam: TEAM_VILLAGER,
	}
	ROLE_BODYGUARD = Role{
		Name:        BODYGUARD,
		Variant:     NONE,
		Team:        TEAM_VILLAGER,
		DisplayTeam: TEAM_VILLAGER,
		Action:      Guard,
	}
	ROLE_CARRIAGE_DRIVER = Role{
		Name:        CARRIAGE_DRIVER,
		Variant:     NONE,
		Team:        TEAM_VILLAGER,
		DisplayTeam: TEAM_VILLAGER,
		Action:      Swap,
	}
	ROLE_CURSED = Role{
		Name:        VILLAGER,
		Variant:     CURSED,
		Team:        TEAM_VILLAGER,
		DisplayTeam: TEAM_VILLAGER,
	}
	ROLE_CORONER = Role{
		Name:        CORONER,
		Variant:     NONE,
		Team:        TEAM_VILLAGER,
		DisplayTeam: TEAM_VILLAGER,
		Action:      Autopsy,
	}
	ROLE_MASON = Role{
		Name:        MASON,
		Variant:     NONE,
		Team:        TEAM_VILLAGER,
		DisplayTeam: TEAM_VILLAGER,
	}
	ROLE_LYCAN = Role{
		Name:        VILLAGER,
		Variant:     LYCAN,
		Team:        TEAM_VILLAGER,
		DisplayTeam: TEAM_WEREWOLF,
	}
	ROLE_HUNTER = Role{
		Name:        HUNTER,
		Variant:     NONE,
		Team:        TEAM_VILLAGER,
		DisplayTeam: TEAM_VILLAGER,
	}
	ROLE_WITCH = Role{
		Name:        WITCH,
		Variant:     NONE,
		Team:        TEAM_VILLAGER,
		DisplayTeam: TEAM_VILLAGER,
	}
	ROLE_DISEASED = Role{
		Name:        VILLAGER,
		Variant:     DISEASED,
		Team:        TEAM_VILLAGER,
		DisplayTeam: TEAM_VILLAGER,
	}
	ROLE_VILLAGER = Role{
		Name:        VILLAGER,
		Variant:     NONE,
		Team:        TEAM_VILLAGER,
		DisplayTeam: TEAM_VILLAGER,
	}
	ROLE_WEREWOLF = Role{
		Name:        WEREWOLF,
		Variant:     NONE,
		Team:        TEAM_WEREWOLF,
		DisplayTeam: TEAM_WEREWOLF,
	}
	ROLE_ALPHA_WEREWOLF = Role{
		Name:        WEREWOLF,
		Variant:     ALPHA,
		Team:        TEAM_WEREWOLF,
		DisplayTeam: TEAM_WEREWOLF,
		Action:      AlphaConversion,
	}
	ROLE_WEREWOLF_SEER = Role{
		Name:        SEER,
		Variant:     WW,
		Team:        TEAM_WEREWOLF,
		DisplayTeam: TEAM_WEREWOLF,
		Action:      Scry,
	}
	ROLE_MINION = Role{
		Name:        MINION,
		Variant:     NONE,
		Team:        TEAM_WEREWOLF,
		DisplayTeam: TEAM_VILLAGER,
		Action:      Sabotage,
	}
	ROLE_TANNER = Role{
		Name:        TANNER,
		Variant:     NONE,
		Team:        TEAM_TANNER,
		DisplayTeam: TEAM_VILLAGER,
	}
)
View Source
var RoleLUT map[string]*Role

Functions

func AlphaConversion

func AlphaConversion(g *game.Game, actor *Player, targets ...string) string

func Autopsy

func Autopsy(g *game.Game, actor *Player, targets ...string) string

func Guard

func Guard(g *game.Game, actor *Player, targets ...string) string

func Sabotage

func Sabotage(g *game.Game, actor *Player, targets ...string) string

func Scry

func Scry(g *game.Game, actor *Player, targets ...string) string

func Swap

func Swap(g *game.Game, actor *Player, targets ...string) string

Types

type BaseRole

type BaseRole string
const (
	SEER            BaseRole = "seer"
	GHOST           BaseRole = "ghost"
	BODYGUARD       BaseRole = "bodyguard"
	CARRIAGE_DRIVER BaseRole = "carriage driver"
	CORONER         BaseRole = "coroner"
	DRUNK           BaseRole = "drunk"
	MASON           BaseRole = "mason"
	HUNTER          BaseRole = "hunter"
	WITCH           BaseRole = "witch"
	VILLAGER        BaseRole = "villager"
	WEREWOLF        BaseRole = "werewolf"
	MINION          BaseRole = "minion"
	TANNER          BaseRole = "tanner"
)

type DiscordUser

type DiscordUser struct {
	Username string `json:"username"`
}

type GuardState

type GuardState struct {
	// contains filtered or unexported fields
}

type Player

type Player struct {
	Name   string
	Role   *Role
	IsDead bool
	DiedOn string
}

type Role

type Role struct {
	Name            BaseRole
	Variant         RoleVariant
	Team            Team
	DisplayTeam     Team
	Action          func(g *game.Game, actor *Player, targets ...string) string
	ActionCondition func(g *game.Game) bool
}

func RoleLookup

func RoleLookup(name string) *Role

type RoleVariant

type RoleVariant string
const (
	NONE     RoleVariant = "none"
	CURSED   RoleVariant = "cursed"
	ANCIENT  RoleVariant = "ancient"
	DISEASED RoleVariant = "diseased"
	WW       RoleVariant = "werewolf"
	ALPHA    RoleVariant = "alpha"
	LYCAN    RoleVariant = "lycan"
)

type Team

type Team string
const (
	TEAM_WEREWOLF Team = "werewolf"
	TEAM_VILLAGER Team = "villager"
	TEAM_TANNER   Team = "tanner"
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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