Documentation
¶
Index ¶
- Constants
- Variables
- type LaborQuality
- func (q LaborQuality) CFAdjustment() fxp.Int
- func (q LaborQuality) DRMultiplier() fxp.Int
- func (q LaborQuality) EnsureValid() LaborQuality
- func (q LaborQuality) HPMultiplier() fxp.Int
- func (q LaborQuality) HTAdjustment() fxp.Int
- func (q LaborQuality) Key() string
- func (q LaborQuality) MarshalText() ([]byte, error)
- func (q LaborQuality) String() string
- func (q *LaborQuality) UnmarshalText(text []byte) error
- type Quality
- func (q Quality) CFAdjustment() fxp.Int
- func (q Quality) DRMultiplier() fxp.Int
- func (q Quality) EnsureValid() Quality
- func (q Quality) HPMultiplier() fxp.Int
- func (q Quality) HTAdjustment() fxp.Int
- func (q Quality) Key() string
- func (q Quality) MarshalText() ([]byte, error)
- func (q Quality) String() string
- func (q *Quality) UnmarshalText(text []byte) error
Constants ¶
const ( Unskilled = LaborQuality(Cheap) Skilled = LaborQuality(Normal) Masterful = LaborQuality(Fine) )
LaborQuality values.
Variables ¶
var LaborQualities []LaborQuality
LaborQualities holds all known labor qualities.
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.
func (Quality) CFAdjustment ¶
CFAdjustment returns the adjustment for CF based on the quality.
func (Quality) DRMultiplier ¶
DRMultiplier returns the multiplier for DR based on the quality.
func (Quality) EnsureValid ¶
EnsureValid ensures the Quality is valid, returning 0 if not.
func (Quality) HPMultiplier ¶
HPMultiplier returns the multiplier for HP based on the quality.
func (Quality) HTAdjustment ¶
HTAdjustment returns the adjustment for HT based on the quality.
func (Quality) MarshalText ¶
MarshalText implements the encoding.TextMarshaler interface.
func (*Quality) UnmarshalText ¶
UnmarshalText implements the encoding.TextUnmarshaler interface.