statmods

package
v0.9.9 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2026 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetStatMods added in v0.9.8

func GetStatMods() map[StatName]string

func RegisterStatMod added in v0.9.8

func RegisterStatMod(name StatName, description string)

Types

type StatMods

type StatMods map[string]int

Statmods are a simple map of "name" to "modifier"

func (StatMods) Add

func (s StatMods) Add(statName string, statVal int)

func (StatMods) Get

func (s StatMods) Get(statName ...string) int

type StatName

type StatName string
var (
	// specific skills
	Picklock StatName = `picklock`
	Tame     StatName = `tame`

	// Not an exhaustive list, but ideally keep track of
	RacialBonusPrefix StatName = `racial-bonus-`

	// any statnames/prefixes here
	Casting        StatName = `casting`        // also used for `casting-` prefix followed by spell School
	CastingPrefix  StatName = `casting-`       // followed by spell School
	XPScale        StatName = `xpscale`        // Used for scaling xp after kills by this %
	HealthRecovery StatName = `healthrecovery` // When recovering HP naturally, recover this much extra
	ManaRecovery   StatName = `manarecovery`   // When recovering MP naturally, recover this much extra

	// Combat
	Attacks StatName = `attacks` // Additional attacks per combat round
	Damage  StatName = `damage`  // Flat bonus damage added to every hit

	// Stat based
	Strength   StatName = `strength`
	Speed      StatName = `speed`
	Smarts     StatName = `smarts`
	Vitality   StatName = `vitality`
	Mysticism  StatName = `mysticism`
	Perception StatName = `perception`
	HealthMax  StatName = `healthmax`
	ManaMax    StatName = `manamax`
)

Jump to

Keyboard shortcuts

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