skill

package
v5.3.1 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2022 License: MPL-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// AllDifficulty holds all possible values.
	AllDifficulty = []Difficulty{
		Easy,
		Average,
		Hard,
		VeryHard,
		Wildcard,
	}
)
View Source
var (
	// AllSelectionType holds all possible values.
	AllSelectionType = []SelectionType{
		SkillsWithName,
		ThisWeapon,
		WeaponsWithName,
	}
)
View Source
var AllTechniqueDifficulty = []Difficulty{
	Average,
	Hard,
}

AllTechniqueDifficulty holds all possible values when used with Techniques.

Functions

func DefaultTypeIsSkillBased

func DefaultTypeIsSkillBased(skillDefaultType string) bool

DefaultTypeIsSkillBased returns true if the SkillDefault type is Skill-based.

Types

type Difficulty

type Difficulty byte

Difficulty holds the difficulty level of a skill.

const (
	Easy Difficulty = iota
	Average
	Hard
	VeryHard
	Wildcard
	LastDifficulty = Wildcard
)

Possible values.

func ExtractDifficulty

func ExtractDifficulty(str string) Difficulty

ExtractDifficulty extracts the value from a string.

func (Difficulty) BaseRelativeLevel

func (enum Difficulty) BaseRelativeLevel() fxp.Int

BaseRelativeLevel returns the base relative skill level at 0 points.

func (Difficulty) EnsureValid

func (enum Difficulty) EnsureValid() Difficulty

EnsureValid ensures this is of a known value.

func (Difficulty) Key

func (enum Difficulty) Key() string

Key returns the key used in serialization.

func (Difficulty) MarshalText

func (enum Difficulty) MarshalText() (text []byte, err error)

MarshalText implements the encoding.TextMarshaler interface.

func (Difficulty) String

func (enum Difficulty) String() string

String implements fmt.Stringer.

func (*Difficulty) UnmarshalText

func (enum *Difficulty) UnmarshalText(text []byte) error

UnmarshalText implements the encoding.TextUnmarshaler interface.

type Level

type Level struct {
	Level         fxp.Int
	RelativeLevel fxp.Int
	Tooltip       string
}

Level provides a level & relative level pair, plus a tooltip.

func (Level) LevelAsString

func (l Level) LevelAsString(forContainer bool) string

LevelAsString returns the level as a string.

type SelectionType

type SelectionType byte

SelectionType holds the type of a selection.

const (
	SkillsWithName SelectionType = iota
	ThisWeapon
	WeaponsWithName
	LastSelectionType = WeaponsWithName
)

Possible values.

func ExtractSelectionType

func ExtractSelectionType(str string) SelectionType

ExtractSelectionType extracts the value from a string.

func (SelectionType) EnsureValid

func (enum SelectionType) EnsureValid() SelectionType

EnsureValid ensures this is of a known value.

func (SelectionType) Key

func (enum SelectionType) Key() string

Key returns the key used in serialization.

func (SelectionType) MarshalText

func (enum SelectionType) MarshalText() (text []byte, err error)

MarshalText implements the encoding.TextMarshaler interface.

func (SelectionType) String

func (enum SelectionType) String() string

String implements fmt.Stringer.

func (*SelectionType) UnmarshalText

func (enum *SelectionType) UnmarshalText(text []byte) error

UnmarshalText implements the encoding.TextUnmarshaler interface.

Jump to

Keyboard shortcuts

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