skill

package
v0.0.0-...-ac9a988 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2024 License: GPL-2.0 Imports: 5 Imported by: 5

Documentation

Overview

Package for skill structs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Skill

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

Struct for skills.

func New

func New(data res.SkillData) *Skill

New creates new skill.

func (*Skill) ID

func (s *Skill) ID() string

ID returns skill ID.

func (*Skill) PassiveEffects

func (s *Skill) PassiveEffects() []res.EffectData

PassiveEffects returns all passive effects.

func (*Skill) PassiveRequirements

func (s *Skill) PassiveRequirements() []req.Requirement

PassiveRequirements returns list of requirements for passive effects.

func (*Skill) SetOwner

func (s *Skill) SetOwner(owner User)

SetOwner sets specified skill user as skill owner.

func (*Skill) Update

func (s *Skill) Update(delta int64)

Update updates skill.

func (*Skill) UseAction

func (s *Skill) UseAction() *useaction.UseAction

UseAction returns skill use action.

type User

type User interface {
	effect.Target
	Skills() []*Skill
	AddSkill(s *Skill)
	RemoveSkill(s *Skill)
	Use(u useaction.Usable) error
	MeetReqs(r ...req.Requirement) bool
}

Struct for skill users.

Jump to

Keyboard shortcuts

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