races

package
v0.9.8-gmcp-individual... Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClearRacesForTesting

func ClearRacesForTesting()

ClearRacesForTesting removes all races from the map. This should only be used in test cleanup.

func LoadDataFiles

func LoadDataFiles()

file self loads due to init()

func SetRaceForTesting

func SetRaceForTesting(race *Race)

SetRaceForTesting allows test code to inject race data directly. This should only be used in test code.

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