Documentation
¶
Index ¶
Constants ¶
View Source
const ( PriorityProtect = 100 // 守卫技能 PriorityKill = 200 // 狼人杀人 PriorityAntidote = 300 // 女巫救人 PriorityPoison = 400 // 女巫毒人 PriorityCheck = 500 // 预言家查验 PriorityHunter = 600 // 猎人技能(被动) PriorityLastWords = 100 // 遗言 PrioritySpeak = 200 // 普通发言 PriorityVote = 100 // 投票 )
技能优先级常量
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseSkill ¶
type BaseSkill struct {
Name werewolf.SkillType
Phase werewolf.PhaseType
Priority int
MultipleUse bool
NeedsTarget bool
}
BaseSkill 基础技能实现
func (*BaseSkill) CanUseMultipleTimes ¶
CanUseMultipleTimes 技能是否可以多次使用
func (*BaseSkill) RequiresTarget ¶
RequiresTarget 技能是否需要目标
type Skill ¶
type Skill interface {
// GetName 获取技能名称
GetName() werewolf.SkillType
// GetPhase 获取技能使用阶段
GetPhase() werewolf.PhaseType
// GetPriority 获取技能优先级
GetPriority() int
// CanUseMultipleTimes 技能是否可以多次使用
CanUseMultipleTimes() bool
// RequiresTarget 技能是否需要目标
RequiresTarget() bool
}
Skill 技能接口(简化版,无 Player 依赖) 只提供技能的元数据信息,实际执行逻辑在 Phase 中
Click to show internal directories.
Click to hide internal directories.