Documentation ¶
Index ¶
- Constants
- Variables
- func CalcAttrBonus(a int) int
- func KeepHighestRolls(h int, rs []int) []int
- func KeepLowestRolls(l int, rs []int) []int
- func MultiRollSum(n, d int) int
- func MultiRolls(n, d int) []int
- func ReadCSV(filename string) ([][]string, error)
- func Roll(d int) int
- func RollString(s string) (numberOfDice, typeOfDice int)
- func SumRolls(r []int) int
- type AgeGroup
- type Attributes
- type Bonuses
- type Character
- type CoinTypes
- type CopperPennies
- type DamageConditionState
- type DwarvenHeritage
- type ElvenHeritage
- type Enum
- type Focus
- type Gender
- type GoldCrowns
- type HumanHeritage
- type HumanHeritageRange
- type HumanHeritageWeighted
- type InventoryItem
- type Item
- type ItemWithCount
- type Languages
- type MeleeWeapon
- type MeleeWeaponWithCount
- type Money
- type PerilsConditonState
- type Profession
- type ProfessionType
- type Race
- type RangeWeapon
- type RangeWeaponWithCount
- type SilverShillings
- type Skill
- type ThrownWeapon
- type ThrownWeaponWithCount
- type Trait
- type WeaponTrait
- type WeightedRow
- type WeightedTable
Constants ¶
View Source
const ( Human = iota + 1 Elf Dwarf )
View Source
const ( Empirial = iota + 1 Nord Vardisan Lumdrani Nimalese Minskite )
Variables ¶
View Source
var BoxData *packr.Box
Functions ¶
func KeepHighestRolls ¶
func KeepLowestRolls ¶
func MultiRollSum ¶
func MultiRolls ¶
func RollString ¶
Types ¶
type Attributes ¶
type Attributes struct { Strength int `json:"strength"` Dexterity int `json:"dexterity"` Constitution int `json:"constitution"` Perception int `json:"perception"` Intelligence int `json:"intelligence"` Willpower int `json:"willpower"` Charisma int `json:"charisma"` Movement int `json:"movement"` }
func NewAttributes ¶
func NewAttributes() Attributes
type Character ¶
type Character struct { Name string `json:"name"` Gender string `json:"gender"` Race string `json:"race"` Ancestry string `json:"ancestry"` Age string `json:"age"` DamageThreshold int `json:"damage_threshold"` DamageConditionState string `json:"damage_condition_state"` Injuries []string `json:"injuries"` PerilsThreshold int `json:"perils_threshold"` PerilsConditionState string `json:"perils_condition_state"` Bonuses Attributes DistinguishingMarks []string `json:"distinguishing_marks"` BodyType string `json:"body_type"` Complexion string `json:"complexion"` Season string `json:"season"` Upbringing string `json:"upbringing"` SocialClass string `json:"social_class"` EyeColor string `json:"eye_color"` HairColor string `json:"hair_color"` Languages []string `json:"languages"` Height string `json:"height"` Weight int `json:"weight"` Professions []string `json:"professions"` Skills []Skill `json:"skills"` ProfessionSelection string `json:"profession_selection"` Money Items []InventoryItem `json:"items"` }
Character is the fields of information
func NewCharacter ¶
func NewCharacter() Character
type CopperPennies ¶
type DamageConditionState ¶
type DamageConditionState int
const ( Unharmed DamageConditionState = iota LightlyWounded ModeratelyWounded SeriouslyWounded GreivouslyWounded Slain )
func (DamageConditionState) Len ¶
func (d DamageConditionState) Len() int
func (DamageConditionState) String ¶
func (d DamageConditionState) String() string
type DwarvenHeritage ¶
type DwarvenHeritage int
const ( IronHills DwarvenHeritage = iota + 1 Mountain Deep )
func (DwarvenHeritage) Len ¶
func (d DwarvenHeritage) Len() int
func (DwarvenHeritage) String ¶
func (d DwarvenHeritage) String() string
type ElvenHeritage ¶
type ElvenHeritage int
const ( High ElvenHeritage = iota + 1 Drow Wood )
func (ElvenHeritage) Len ¶
func (e ElvenHeritage) Len() int
func (ElvenHeritage) String ¶
func (e ElvenHeritage) String() string
type GoldCrowns ¶
type HumanHeritage ¶
type HumanHeritage int
func (HumanHeritage) Len ¶
func (h HumanHeritage) Len() int
func (HumanHeritage) String ¶
func (h HumanHeritage) String() string
type HumanHeritageRange ¶
type HumanHeritageRange struct { HumanHeritage Min int `json:"min"` Max int `json:"max"` }
type HumanHeritageWeighted ¶
type HumanHeritageWeighted struct { HumanHeritage Weight int `json:"weight"` }
type InventoryItem ¶ added in v0.2.0
type Item ¶ added in v0.2.0
type ItemWithCount ¶ added in v0.2.0
func (*ItemWithCount) GetCount ¶ added in v0.2.0
func (i *ItemWithCount) GetCount() int
type MeleeWeapon ¶ added in v0.2.0
type MeleeWeaponWithCount ¶ added in v0.2.0
type MeleeWeaponWithCount struct { MeleeWeapon Count int `json:"count"` }
func (*MeleeWeaponWithCount) GetCount ¶ added in v0.2.0
func (i *MeleeWeaponWithCount) GetCount() int
type Money ¶
type Money struct { GoldCrowns SilverShillings CopperPennies }
type PerilsConditonState ¶
type PerilsConditonState int
const ( Unhindered PerilsConditonState = iota Imperiled IgnoreOneSkill IgnoreTwoSkills IgnoreThreeSkills Incapacitated )
func (PerilsConditonState) Len ¶
func (p PerilsConditonState) Len() int
func (PerilsConditonState) String ¶
func (p PerilsConditonState) String() string
type Profession ¶
type Profession struct { Name string `json:"name"` Description string `json:"description"` BonusAdvances []string `json:"bonus_advances"` AttributeBonusAdvances []string `json:"attribute_bonus_advances"` SkillAdvances []string `json:"skill_advances"` Talents []string `json:"talents"` StartingMoney map[string]string `json:"starting_money"` StartingEquip [][]string `json:"starting_equip"` UniqueTrait Trait `json:"unique_trait"` }
Profession is the object for the professions with advance description
type ProfessionType ¶
type ProfessionType int
const ( Agriculture ProfessionType = iota + 1 Arts BusinessTrade Communications Construction Craftman Crime Government Health Labor Magic Military Outcast Religion Scholars Transportation )
func (ProfessionType) Len ¶
func (p ProfessionType) Len() int
func (ProfessionType) String ¶
func (p ProfessionType) String() string
type RangeWeapon ¶ added in v0.2.0
type RangeWeapon struct { Item OptimalRangeYds int `json:"optimal_range_yds"` FallOffYds int `json:"fall_off_yds"` MaxRangeYds int `json:"max_range_yds"` AmmunitionType string `json:"ammunition_type"` ReloadTimeMS int `json:"reload_time_ms"` DrawTimeMS int `json:"draw_time_ms"` WeaponTraits []WeaponTrait `json:"weapon_traits"` }
type RangeWeaponWithCount ¶ added in v0.2.0
type RangeWeaponWithCount struct { RangeWeapon Count int `json:"count"` }
func (*RangeWeaponWithCount) GetCount ¶ added in v0.2.0
func (i *RangeWeaponWithCount) GetCount() int
type SilverShillings ¶
type ThrownWeapon ¶ added in v0.2.0
type ThrownWeapon struct { Item ReachInch int `json:"reach_inch"` InitBonusNear int `json:"init_bonus_near"` InitBonusFar int `json:"init_bonus_far"` HandsUsed []int `json:"hands_used"` MeleeType string `json:"melee_type"` WeaponTraits []WeaponTrait `json:"weapon_traits"` OptimalRangeYds int `json:"optimal_range_yds"` FallOffYds int `json:"fall_off_yds"` MaxRangeYds int `json:"max_range_yds"` }
type ThrownWeaponWithCount ¶ added in v0.2.0
type ThrownWeaponWithCount struct { ThrownWeapon Count int `json:"count"` }
func (*ThrownWeaponWithCount) GetCount ¶ added in v0.2.0
func (i *ThrownWeaponWithCount) GetCount() int
type Trait ¶
type Trait struct { Name string `json:"name"` Description string `json:"description"` Effect string `json:"effect"` }
Talent is a modifier to a character with a special ability
type WeaponTrait ¶ added in v0.2.0
type WeightedRow ¶
type WeightedTable ¶
type WeightedTable []WeightedRow
func NewWeightedTable ¶
func NewWeightedTable(enum Enum, w []int) WeightedTable
func (*WeightedTable) Roll ¶
func (wt *WeightedTable) Roll() int
Click to show internal directories.
Click to hide internal directories.