monsters

package
Version: v1.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 7, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action struct {
	Name        string     `json:"name"`
	Description string     `json:"desc"`
	Options     api.Choice `json:"options"`
	AttackBonus *int       `json:"attack_bonus,omitempty"`
	DC          *DC        `json:"dc,omitempty"`
	Usage       *Usage     `json:"usage,omitempty"`
	Damage      []Damage   `json:"damage_types"`
}

type DC

type DC struct {
	Type        api.Ref `json:"dc_type"`
	Value       int     `json:"dc_value"`
	SuccessType string  `json:"success_type"`
}

type Damage

type Damage struct {
	Type api.Ref `json:"damage_type"`
	Dice string  `json:"damage_dice"`
}

type MonsterClient

type MonsterClient interface {
	GetList() (*api.ListResponse, error)
	QueryList(query map[string]string) (*api.ListResponse, error)
	GetByIndex(index string) (*MonsterDetail, error)
}

func NewClient

func NewClient(basicsProvider api.BasicsProvider) MonsterClient

type MonsterDetail

type MonsterDetail struct {
	Index                 string             `json:"index"`
	Name                  string             `json:"name"`
	Url                   string             `json:"url"`
	Size                  string             `json:"size"`
	Type                  string             `json:"type"`
	Subtype               string             `json:"subtype"`
	Alignment             string             `json:"alignment"`
	ArmorClass            int                `json:"armor_class"`
	HitPoints             int                `json:"hit_points"`
	HitDice               string             `json:"hit_dice"`
	Speed                 Speed              `json:"speed"`
	Strength              int                `json:"strength"`
	Dexterity             int                `json:"dexterity"`
	Constitution          int                `json:"constitution"`
	Intelligence          int                `json:"intelligence"`
	Wisdom                int                `json:"wisdom"`
	Charisma              int                `json:"charisma"`
	Proficiencies         []ProficiencyValue `json:"proficiencies"`
	DamageVulnerabilities []string           `json:"damage_vulnerabilities"`
	DamageResistances     []string           `json:"damage_resistances"`
	DamageImmunities      []string           `json:"damage_immunities"`
	ConditionImmunities   []string           `json:"condition_immunities"`
	Senses                Sense              `json:"senses"`
	Languages             string             `json:"languages"`
	ChallengeRating       int                `json:"challenge_rating"`
	SpecialAbilities      []SpecialAbility   `json:"special_abilities"`
	Actions               []Action           `json:"actions"`
	LegendaryActions      []Action           `json:"legendary_actions"`
}

type ProficiencyValue

type ProficiencyValue struct {
	Value       int     `json:"value"`
	Proficiency api.Ref `json:"proficiency"`
}

type Sense

type Sense struct {
	Blindsight        string `json:"blindsight"`
	Darkvision        string `json:"darkvision"`
	PassivePerception int    `json:"passive_perception"`
}

type SpecialAbility

type SpecialAbility struct {
	Name        string `json:"name"`
	Description string `json:"desc"`
	Usage       *Usage `json:"usage,omitempty"`
	DC          *DC    `json:"dc,omitempty"`
}

type Speed

type Speed struct {
	Walk  string `json:"walk"`
	Climb string `json:"climb"`
	Fly   string `json:"fly"`
}

type Usage

type Usage struct {
	Type  string `json:"type"`
	Times int    `json:"times"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL