role

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(roleType werewolf.RoleType) (werewolf.Role, error)

New 根据角色类型创建角色实例

Types

type BaseRole

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

BaseRole 基础角色实现

func NewBaseRole

func NewBaseRole(roleType werewolf.RoleType, camp werewolf.Camp) *BaseRole

NewBaseRole 创建基础角色

func (*BaseRole) GetAvailableSkills

func (r *BaseRole) GetAvailableSkills(phase werewolf.PhaseType) []werewolf.Skill

GetAvailableSkills 获取可用技能

func (*BaseRole) GetCamp

func (r *BaseRole) GetCamp() werewolf.Camp

GetCamp 获取角色所属阵营

func (*BaseRole) GetName

func (r *BaseRole) GetName() werewolf.RoleType

GetName 获取角色名称

func (*BaseRole) GetPriority

func (r *BaseRole) GetPriority(phase werewolf.PhaseType) int

GetPriority 获取角色在指定阶段的优先级

type Guard

type Guard struct {
	*BaseRole
}

Guard 守卫角色

func NewGuard

func NewGuard() *Guard

NewGuard 创建守卫角色

type Hunter

type Hunter struct {
	*BaseRole
}

Hunter 猎人角色

func NewHunter

func NewHunter() *Hunter

NewHunter 创建猎人角色

type Seer

type Seer struct {
	*BaseRole
}

Seer 预言家角色

func NewSeer

func NewSeer() *Seer

NewSeer 创建预言家角色

type Villager

type Villager struct {
	*BaseRole
}

Villager 村民角色

func NewVillager

func NewVillager() *Villager

NewVillager 创建村民角色

type Werewolf

type Werewolf struct {
	*BaseRole
}

Werewolf 狼人角色

func NewWerewolf

func NewWerewolf() *Werewolf

NewWerewolf 创建狼人角色

type Witch

type Witch struct {
	*BaseRole
}

Witch 女巫角色

func NewWitch

func NewWitch() *Witch

NewWitch 创建女巫角色

Jump to

Keyboard shortcuts

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