races

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2025 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadDataFiles

func LoadDataFiles()

file self loads due to init()

Types

type Race

type Race struct {
	RaceId           int
	Name             string
	Description      string
	DefaultAlignment int8
	BuffIds          []int // Permabuffs this race always has
	Size             Size
	TNLScale         float32
	UnarmedName      string
	Tameable         bool
	Damage           items.Damage
	Selectable       bool
	AngryCommands    []string         // randomly chosen to queue when they are angry/entering combat.
	KnowsFirstAid    bool             // Whether they can apply aid to other players.
	Stats            stats.Statistics // Base stats for this race.
	DisabledSlots    []string         `yaml:"disabledslots,omitempty"`
}

func FindRace

func FindRace(name string) (Race, bool)

func GetRace

func GetRace(raceId int) *Race

func GetRaces

func GetRaces() []Race

func (*Race) Filename

func (r *Race) Filename() string

func (*Race) Filepath

func (r *Race) Filepath() string

func (Race) GetEnabledSlots

func (r Race) GetEnabledSlots() []string

func (*Race) Id

func (r *Race) Id() int

func (*Race) Save

func (r *Race) Save() error

func (*Race) Validate

func (r *Race) Validate() error

type Size

type Size string
const (
	Small  Size = "small"  // Something like a mouse, dog
	Medium Size = "medium" // Something like a human
	Large  Size = "large"  // Something like a troll, ogre, dragon, kraken, or leviathan (or bigger).
)

Jump to

Keyboard shortcuts

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