quality

package
v0.0.0-...-8122578 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2025 License: MPL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Unskilled = LaborQuality(Cheap)
	Skilled   = LaborQuality(Normal)
	Masterful = LaborQuality(Fine)
)

LaborQuality values.

Variables

View Source
var LaborQualities []LaborQuality

LaborQualities holds all known labor qualities.

View Source
var Qualities []Quality

Qualities holds all known material qualities.

Functions

This section is empty.

Types

type LaborQuality

type LaborQuality Quality

LaborQuality represents the quality of labor.

func (LaborQuality) CFAdjustment

func (q LaborQuality) CFAdjustment() fxp.Int

CFAdjustment returns the adjustment for CF based on the labor quality.

func (LaborQuality) DRMultiplier

func (q LaborQuality) DRMultiplier() fxp.Int

DRMultiplier returns the multiplier for DR based on the labor quality.

func (LaborQuality) EnsureValid

func (q LaborQuality) EnsureValid() LaborQuality

EnsureValid ensures the LaborQuality is valid, returning 0 if not.

func (LaborQuality) HPMultiplier

func (q LaborQuality) HPMultiplier() fxp.Int

HPMultiplier returns the multiplier for HP based on the labor quality.

func (LaborQuality) HTAdjustment

func (q LaborQuality) HTAdjustment() fxp.Int

HTAdjustment returns the adjustment for HT based on the labor quality.

func (LaborQuality) Key

func (q LaborQuality) Key() string

Key returns a key for the LaborQuality, suitable for use in maps or as a file name.

func (LaborQuality) MarshalText

func (q LaborQuality) MarshalText() ([]byte, error)

MarshalText implements the encoding.TextMarshaler interface.

func (LaborQuality) String

func (q LaborQuality) String() string

func (*LaborQuality) UnmarshalText

func (q *LaborQuality) UnmarshalText(text []byte) error

UnmarshalText implements the encoding.TextUnmarshaler interface.

type Quality

type Quality byte

Quality represents the quality of a material or labor.

const (
	Cheap Quality = iota
	Normal
	Fine
)

Quality values.

func (Quality) CFAdjustment

func (q Quality) CFAdjustment() fxp.Int

CFAdjustment returns the adjustment for CF based on the quality.

func (Quality) DRMultiplier

func (q Quality) DRMultiplier() fxp.Int

DRMultiplier returns the multiplier for DR based on the quality.

func (Quality) EnsureValid

func (q Quality) EnsureValid() Quality

EnsureValid ensures the Quality is valid, returning 0 if not.

func (Quality) HPMultiplier

func (q Quality) HPMultiplier() fxp.Int

HPMultiplier returns the multiplier for HP based on the quality.

func (Quality) HTAdjustment

func (q Quality) HTAdjustment() fxp.Int

HTAdjustment returns the adjustment for HT based on the quality.

func (Quality) Key

func (q Quality) Key() string

Key returns a key for the Quality, suitable for use in maps or as a file name.

func (Quality) MarshalText

func (q Quality) MarshalText() ([]byte, error)

MarshalText implements the encoding.TextMarshaler interface.

func (Quality) String

func (q Quality) String() string

func (*Quality) UnmarshalText

func (q *Quality) 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