attribute

package
v5.2.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// AllBonusLimitation holds all possible values.
	AllBonusLimitation = []BonusLimitation{
		None,
		StrikingOnly,
		LiftingOnly,
		ThrowingOnly,
	}
)
View Source
var (
	// AllDamageProgression holds all possible values.
	AllDamageProgression = []DamageProgression{
		BasicSet,
		KnowingYourOwnStrength,
		NoSchoolGrognardDamage,
		ThrustEqualsSwingMinus2,
		SwingEqualsThrustPlus2,
		PhoenixFlameD3,
	}
)
View Source
var (
	// AllThresholdOp holds all possible values.
	AllThresholdOp = []ThresholdOp{
		Unknown,
		HalveMove,
		HalveDodge,
		HalveST,
	}
)
View Source
var (
	// AllType holds all possible values.
	AllType = []Type{
		Integer,
		Decimal,
		Pool,
		PrimarySeparator,
		SecondarySeparator,
		PoolSeparator,
	}
)

Functions

This section is empty.

Types

type BonusLimitation

type BonusLimitation byte

BonusLimitation holds a limitation for an AttributeBonus.

const (
	None BonusLimitation = iota
	StrikingOnly
	LiftingOnly
	ThrowingOnly
	LastBonusLimitation = ThrowingOnly
)

Possible values.

func ExtractBonusLimitation

func ExtractBonusLimitation(str string) BonusLimitation

ExtractBonusLimitation extracts the value from a string.

func (BonusLimitation) EnsureValid

func (enum BonusLimitation) EnsureValid() BonusLimitation

EnsureValid ensures this is of a known value.

func (BonusLimitation) Key

func (enum BonusLimitation) Key() string

Key returns the key used in serialization.

func (BonusLimitation) MarshalText

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

MarshalText implements the encoding.TextMarshaler interface.

func (BonusLimitation) String

func (enum BonusLimitation) String() string

String implements fmt.Stringer.

func (*BonusLimitation) UnmarshalText

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

UnmarshalText implements the encoding.TextUnmarshaler interface.

type DamageProgression

type DamageProgression byte

DamageProgression controls how Thrust and Swing are calculated.

const (
	BasicSet DamageProgression = iota
	KnowingYourOwnStrength
	NoSchoolGrognardDamage
	ThrustEqualsSwingMinus2
	SwingEqualsThrustPlus2
	PhoenixFlameD3
	LastDamageProgression = PhoenixFlameD3
)

Possible values.

func ExtractDamageProgression

func ExtractDamageProgression(str string) DamageProgression

ExtractDamageProgression extracts the value from a string.

func (DamageProgression) AltString

func (enum DamageProgression) AltString() string

AltString returns the alternate string.

func (DamageProgression) EnsureValid

func (enum DamageProgression) EnsureValid() DamageProgression

EnsureValid ensures this is of a known value.

func (DamageProgression) Key

func (enum DamageProgression) Key() string

Key returns the key used in serialization.

func (DamageProgression) MarshalText

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

MarshalText implements the encoding.TextMarshaler interface.

func (DamageProgression) String

func (enum DamageProgression) String() string

String implements fmt.Stringer.

func (DamageProgression) Swing

func (enum DamageProgression) Swing(strength int) *dice.Dice

Swing returns the swing damage for the given strength.

func (DamageProgression) Thrust

func (enum DamageProgression) Thrust(strength int) *dice.Dice

Thrust returns the thrust damage for the given strength.

func (DamageProgression) Tooltip

func (enum DamageProgression) Tooltip() string

Tooltip returns the tooltip for the DamageProgression.

func (*DamageProgression) UnmarshalText

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

UnmarshalText implements the encoding.TextUnmarshaler interface.

type ThresholdOp

type ThresholdOp byte

ThresholdOp holds an operation to apply when a pool threshold is hit.

const (
	Unknown ThresholdOp = iota
	HalveMove
	HalveDodge
	HalveST
	LastThresholdOp = HalveST
)

Possible values.

func ExtractThresholdOp

func ExtractThresholdOp(str string) ThresholdOp

ExtractThresholdOp extracts the value from a string.

func (ThresholdOp) AltString

func (enum ThresholdOp) AltString() string

AltString returns the alternate string.

func (ThresholdOp) EnsureValid

func (enum ThresholdOp) EnsureValid() ThresholdOp

EnsureValid ensures this is of a known value.

func (ThresholdOp) Key

func (enum ThresholdOp) Key() string

Key returns the key used in serialization.

func (ThresholdOp) MarshalText

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

MarshalText implements the encoding.TextMarshaler interface.

func (ThresholdOp) String

func (enum ThresholdOp) String() string

String implements fmt.Stringer.

func (*ThresholdOp) UnmarshalText

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

UnmarshalText implements the encoding.TextUnmarshaler interface.

type Type

type Type byte

Type holds the type of an attribute definition.

const (
	Integer Type = iota
	Decimal
	Pool
	PrimarySeparator
	SecondarySeparator
	PoolSeparator
	LastType = PoolSeparator
)

Possible values.

func ExtractType

func ExtractType(str string) Type

ExtractType extracts the value from a string.

func (Type) EnsureValid

func (enum Type) EnsureValid() Type

EnsureValid ensures this is of a known value.

func (Type) Key

func (enum Type) Key() string

Key returns the key used in serialization.

func (Type) MarshalText

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

MarshalText implements the encoding.TextMarshaler interface.

func (Type) String

func (enum Type) String() string

String implements fmt.Stringer.

func (*Type) UnmarshalText

func (enum *Type) 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