damage

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2025 License: GPL-2.0 Imports: 0 Imported by: 1

Documentation

Overview

Package damage provides type definitions for damage-related constants. These types are used by rulebooks to define their damage types, resistances, immunities, and vulnerabilities without the toolkit knowing specific damage types.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Category

type Category string

Category groups damage types for rules purposes. Example: physical damage (bludgeoning, piercing, slashing) vs magical

const (
	CategoryPhysical Category = "physical"
	CategoryMagical  Category = "magical"
	CategoryPsychic  Category = "psychic"
)

Common categories that many systems use

type ImmunityType

type ImmunityType string

ImmunityType identifies what provides immunity to damage. Example: const ImmunityPotion ImmunityType = "potion_of_fire_immunity"

type ResistanceType

type ResistanceType string

ResistanceType identifies what provides resistance to damage. Example: const ResistanceRage ResistanceType = "rage"

type Type

type Type string

Type identifies a specific damage type. Rulebooks define constants of this type for their damage types. Example: const Fire Type = "fire"

type VulnerabilityType

type VulnerabilityType string

VulnerabilityType identifies what causes vulnerability to damage. Example: const VulnerabilityHexed VulnerabilityType = "hexed"

Jump to

Keyboard shortcuts

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