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 ¶
const ( NoCR = Roll(0) CR6 = Roll(6) CR7 = Roll(7) CR8 = Roll(8) CR9 = Roll(9) CR10 = Roll(10) CR11 = Roll(11) CR12 = Roll(12) CR13 = Roll(13) CR14 = Roll(14) CR15 = Roll(15) )
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 byte
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.