Documentation ¶
Index ¶
- Constants
- Variables
- type Adjustment
- func (enum Adjustment) Adjustment(cr Roll) int
- func (enum Adjustment) AltString() string
- func (enum Adjustment) Description(cr Roll) string
- func (enum Adjustment) EnsureValid() Adjustment
- func (enum Adjustment) Key() string
- func (enum Adjustment) MarshalText() (text []byte, err error)
- func (enum Adjustment) String() string
- func (enum *Adjustment) UnmarshalText(text []byte) error
- type Roll
Constants ¶
Possible Roll values.
Variables ¶
var Adjustments = []Adjustment{ NoCRAdj, ActionPenalty, ReactionPenalty, FrightCheckPenalty, FrightCheckBonus, MinorCostOfLivingIncrease, MajorCostOfLivingIncrease, }
Adjustments holds all possible values.
Rolls is the complete set of Roll values.
Functions ¶
This section is empty.
Types ¶
type Adjustment ¶
type Adjustment byte
Adjustment holds an Adjustment for a self-control roll.
const ( NoCRAdj Adjustment = iota ActionPenalty ReactionPenalty FrightCheckPenalty FrightCheckBonus MinorCostOfLivingIncrease MajorCostOfLivingIncrease )
Possible values.
const LastAdjustment Adjustment = MajorCostOfLivingIncrease
LastAdjustment is the last valid value.
func ExtractAdjustment ¶
func ExtractAdjustment(str string) Adjustment
ExtractAdjustment extracts the value from a string.
func (Adjustment) Adjustment ¶
func (enum Adjustment) Adjustment(cr Roll) int
Adjustment returns the adjustment amount.
func (Adjustment) AltString ¶
func (enum Adjustment) AltString() string
AltString returns the alternate string.
func (Adjustment) Description ¶
func (enum Adjustment) Description(cr Roll) string
Description returns a formatted description.
func (Adjustment) EnsureValid ¶
func (enum Adjustment) EnsureValid() Adjustment
EnsureValid ensures this is of a known value.
func (Adjustment) Key ¶
func (enum Adjustment) Key() string
Key returns the key used in serialization.
func (Adjustment) MarshalText ¶
func (enum Adjustment) MarshalText() (text []byte, err error)
MarshalText implements the encoding.TextMarshaler interface.
func (*Adjustment) UnmarshalText ¶
func (enum *Adjustment) UnmarshalText(text []byte) error
UnmarshalText implements the encoding.TextUnmarshaler interface.
type Roll ¶
type Roll int
Roll holds the information about a self-control roll, from B121.
func (Roll) DescriptionWithCost ¶
DescriptionWithCost returns a formatted description that includes the cost multiplier.
func (Roll) EnsureValid ¶
EnsureValid ensures this is of a known value.
func (Roll) MinimumRoll ¶
MinimumRoll returns the minimum roll to retain control.