cards

package
v0.0.0-...-0f7ec88 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2024 License: BSD-3-Clause Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CardFS = rwbyadv3.GetCardFS()
View Source
var Cards map[string]*Card

Functions

func GetEmbeddableImage

func GetEmbeddableImage(cardType string, imageType string, format string) (io.Reader, error)

func GetImageURI

func GetImageURI(cardType string, imageType string, format string) (string, error)

func MustGetImageURI

func MustGetImageURI(cardType string, imageType string, format string) string

func ParseCards

func ParseCards(location string)

Types

type Card

type Card struct {
	ID         string   `yaml:"id"`
	Name       string   `yaml:"name"`
	Type       CardType `yaml:"type"`
	Team       string   `yaml:"team"`
	Categories []string `yaml:"categories"`
	BaseStats  struct {
		Damage  int `yaml:"damage"`
		Healing int `yaml:"healing"`
		Armor   int `yaml:"armor"`
		Health  int `yaml:"health"`
		Speed   int `yaml:"speed"`
	} `yaml:"base_stats"`

	// For variants
	Parent *Card `yaml:"-"`

	// Unused after parsing
	Variants []*Card `yaml:"variants"`
}

type CardType

type CardType string
const (
	CardTypeCharacter CardType = "character"
	CardTypeGrimm     CardType = "grimm"
)

Jump to

Keyboard shortcuts

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