Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CharMap ¶
CharMap is a map holding Characters based on the name of the yaml file they are stored in
func NewCharMapFromGlob ¶
NewCharMapFromGlob creates a new CharMap and loads all the characters that matches the unix shell pattern inside it
type Character ¶
type Character struct { PortraitURL string `yaml:"portrait_url"` Name string `yaml:"name"` Age int `yaml:"age"` FakeID string `yaml:"fake_id"` Race string `yaml:"race"` Height float64 `yaml:"height"` Weight float64 `yaml:"weight"` Origin string `yaml:"origin"` PreferedHand string `yaml:"prefered_hand"` XPs int `yaml:"xps"` SpentXPs int `yaml:"spent_xps"` HitPoints int `yaml:"hit_points"` Fatigue int `yaml:"fatigue"` ForcePoints int `yaml:"force_points"` BaseMovement int `yaml:"base_movement"` Wealth Wealth `yaml:"wealth"` Formations []Formation `yaml:"formations"` Talents []Talent `yaml:"talents"` Stats []Stat `yaml:"stats"` Skills []Stat `yaml:"skills"` Spells []Spell `yaml:"spells"` Equipment Equipment `yaml:"equipment"` Inventory []QuantifiedItem `yaml:"inventory"` }
Character represents a single player character
type DiceThrow ¶
type DiceThrow struct { Throws int `yaml:"throws"` Type int `yaml:"type"` Ranked bool `yaml:"ranked"` Modifier int `yaml:"modifier"` RankedModifier bool `yaml:"ranked_modifier"` FmtModifier string }
DiceThrow defines the way dice throws are represented For exemple 10D10 → Throws: 10, Type: 10
type Equipment ¶
type Equipment struct { // Weapons Weapons []Weapon `yaml:"weapons"` RangedWeapons []RangedWeapon `yaml:"ranged_weapons"` // Armors Head []Armor `yaml:"head"` ShoulderStrap []Armor `yaml:"shoulder_strap"` Jacket []Armor `yaml:"jacket"` Holster []Armor `yaml:"holster"` Trouser []Armor `yaml:"trouser"` Belt []Armor `yaml:"belt"` Boots []Armor `yaml:"boots"` Other []Armor `yaml:"other"` }
Equipment groups all the stuff the player has equipped or can equip
type Formation ¶
type Formation struct { Name string `yaml:"name"` Description string `yaml:"description"` Modifier int `yaml:"modifier"` }
Formation represent a single formation (and what it does)
type Item ¶
type Item struct { Name string `yaml:"name"` Description string `yaml:"description"` Effect string `yaml:"effect"` Unit string `yaml:"unit"` }
Item represents a single item
type QuantifiedItem ¶
QuantifiedItem adds a single quantity field to an item (for storage purpose)
type RangedWeapon ¶
RangedWeapon describes a ranged weapon
type Spell ¶
type Spell struct { Talent `yaml:",inline"` Scope int `yaml:"scope"` Ingredients []string `yaml:"ingredients"` Duration string `yaml:"duration"` Size string `yaml:"size"` }
Spell is a talent with an associated test and a score
type Stat ¶
type Stat struct { Name string `yaml:"name"` Base int `yaml:"base"` Rank string `yaml:"rank"` Modifier int `yaml:"modifier"` Icon string `yaml:"icon"` }
Stat can be a main stat or an extra stat (in which case, rank and base are not taken into account)
type Talent ¶
type Talent struct { Name string `yaml:"name"` Description string `yaml:"description"` Effect string `yaml:"effect"` Score *DiceThrow `yaml:"score"` Test string `yaml:"test"` Rank int `yaml:"rank"` }
Talent represent a single talent and what it does
type Wealth ¶
type Wealth struct { Bank WealthStorage `yaml:"bank"` Carried WealthStorage `yaml:"carried"` }
Wealth is the money carried and in bank of the player
type WealthStorage ¶
type WealthStorage struct { Platinum int `yaml:"platinum"` Gold int `yaml:"gold"` Silver int `yaml:"silver"` Bronze int `yaml:"bronze"` }
WealthStorage is a single place where wealth can be stored