Documentation ¶
Index ¶
Constants ¶
const ( None = SelfControlRoll(0) CR6 = SelfControlRoll(6) CR9 = SelfControlRoll(9) CR12 = SelfControlRoll(12) CR15 = SelfControlRoll(15) )
Possible SelfControlRoll values.
Variables ¶
var ( // AllAffects holds all possible values. AllAffects = []Affects{ Total, BaseOnly, LevelsOnly, } )
var ( // AllContainerType holds all possible values. AllContainerType = []ContainerType{ Group, MetaTrait, Race, AlternativeAbilities, } )
var ( // AllModifierCostType holds all possible values. AllModifierCostType = []ModifierCostType{ Percentage, Points, Multiplier, } )
var AllSelfControlRolls = []SelfControlRoll{ None, CR6, CR9, CR12, CR15, }
AllSelfControlRolls is the complete set of SelfControlRoll values.
Functions ¶
This section is empty.
Types ¶
type Affects ¶
type Affects byte
Affects describes how a TraitModifier affects the point cost.
const ( Total Affects = iota BaseOnly LevelsOnly LastAffects = LevelsOnly )
Possible values.
func ExtractAffects ¶
ExtractAffects extracts the value from a string.
func (Affects) EnsureValid ¶
EnsureValid ensures this is of a known value.
func (Affects) MarshalText ¶
MarshalText implements the encoding.TextMarshaler interface.
func (*Affects) UnmarshalText ¶
UnmarshalText implements the encoding.TextUnmarshaler interface.
type ContainerType ¶
type ContainerType byte
ContainerType holds the type of a trait container.
const ( Group ContainerType = iota MetaTrait Race AlternativeAbilities LastContainerType = AlternativeAbilities )
Possible values.
func ExtractContainerType ¶
func ExtractContainerType(str string) ContainerType
ExtractContainerType extracts the value from a string.
func (ContainerType) EnsureValid ¶
func (enum ContainerType) EnsureValid() ContainerType
EnsureValid ensures this is of a known value.
func (ContainerType) Key ¶
func (enum ContainerType) Key() string
Key returns the key used in serialization.
func (ContainerType) MarshalText ¶
func (enum ContainerType) MarshalText() (text []byte, err error)
MarshalText implements the encoding.TextMarshaler interface.
func (ContainerType) String ¶
func (enum ContainerType) String() string
String implements fmt.Stringer.
func (*ContainerType) UnmarshalText ¶
func (enum *ContainerType) UnmarshalText(text []byte) error
UnmarshalText implements the encoding.TextUnmarshaler interface.
type ModifierCostType ¶
type ModifierCostType byte
ModifierCostType describes how a TraitModifier's point cost is applied.
const ( Percentage ModifierCostType = iota Points Multiplier LastModifierCostType = Multiplier )
Possible values.
func ExtractModifierCostType ¶
func ExtractModifierCostType(str string) ModifierCostType
ExtractModifierCostType extracts the value from a string.
func (ModifierCostType) EnsureValid ¶
func (enum ModifierCostType) EnsureValid() ModifierCostType
EnsureValid ensures this is of a known value.
func (ModifierCostType) Key ¶
func (enum ModifierCostType) Key() string
Key returns the key used in serialization.
func (ModifierCostType) MarshalText ¶
func (enum ModifierCostType) MarshalText() (text []byte, err error)
MarshalText implements the encoding.TextMarshaler interface.
func (ModifierCostType) String ¶
func (enum ModifierCostType) String() string
String implements fmt.Stringer.
func (*ModifierCostType) UnmarshalText ¶
func (enum *ModifierCostType) UnmarshalText(text []byte) error
UnmarshalText implements the encoding.TextUnmarshaler interface.
type SelfControlRoll ¶
type SelfControlRoll int
SelfControlRoll holds the information about a self-control roll, from B121.
func (SelfControlRoll) DescriptionWithCost ¶
func (s SelfControlRoll) DescriptionWithCost() string
DescriptionWithCost returns a formatted description that includes the cost multiplier.
func (SelfControlRoll) EnsureValid ¶
func (s SelfControlRoll) EnsureValid() SelfControlRoll
EnsureValid ensures this is of a known value.
func (SelfControlRoll) Index ¶
func (s SelfControlRoll) Index() int
Index returns of the SelfControlRoll within AllSelfControlRolls.
func (SelfControlRoll) MinimumRoll ¶
func (s SelfControlRoll) MinimumRoll() int
MinimumRoll returns the minimum roll to retain control.
func (SelfControlRoll) Multiplier ¶
func (s SelfControlRoll) Multiplier() fxp.Int
Multiplier returns the cost multiplier.
func (SelfControlRoll) String ¶
func (s SelfControlRoll) String() string
String implements fmt.Stringer.