rpg

package
v0.0.0-...-7dd5b4e Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2021 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Character

type Character struct {
	Name            string `json:",omitempty"`
	Race            string `json:",omitempty"`
	Level           uint   `json:",omitempty"`
	CR              uint   `json:",omitempty"`
	Class           string `json:",omitempty"`
	HP              uint
	AC              uint
	Initiative      int
	PassivePer      uint `json:"Passive Per"`
	DexST           int  `json:"Dex ST"`
	Size            CharacterSize
	Type            string `json:",omitempty"`
	Speed           uint8
	Player          string `json:",omitempty"`
	Affiliated      bool
	Gender          string `json:",omitempty"` // {Male, Female}
	GenerationDelta int    `json:"Generation Delta,omitempty"`
	YOBDelta        int    `json:"Year of Birth Delta,omitempty"`
	YODDelta        int    `json:"Year of Death Delta,omitempty"`
	MotherID        uint   `json:"Mother ID,omitempty"`
	FatherID        uint   `json:"Father ID,omitempty"`
	LocationID      uint   `json:"Location ID,omitempty"`
}

type CharacterSize

type CharacterSize uint8
const (
	SizeTiny       CharacterSize = 0
	SizeSmall      CharacterSize = 1
	SizeMedium     CharacterSize = 2
	SizeLarge      CharacterSize = 3
	SizeHuge       CharacterSize = 4
	SizeGargantuan CharacterSize = 5
)

type Encounter

type Encounter struct {
	Name       string
	Session    uint
	Location   string
	Level      uint
	Room       uint
	NumPlayers uint `json:"Number of Players"`
	XP         uint
}

func NewEncounter

func NewEncounter(session uint, loc string, level, room, numPlayers uint) *Encounter

type EncounterState

type EncounterState struct {
	Round           uint
	Turn            uint
	InitiativeOrder []*Character
}

type InitiativeList

type InitiativeList []InitiativeValue

func RankInitiatives

func RankInitiatives(initiatives map[*Character]int) InitiativeList

func (InitiativeList) Characters

func (il InitiativeList) Characters() []*Character

func (InitiativeList) Len

func (il InitiativeList) Len() int

func (InitiativeList) Less

func (il InitiativeList) Less(i, j int) bool

func (InitiativeList) Swap

func (il InitiativeList) Swap(i, j int)

type InitiativeValue

type InitiativeValue struct {
	Character  *Character
	Initiative int
}

type Item

type Item struct {
	Name        string
	Quantity    uint
	Weight      float32
	ApproxValue float32 `json:"Appr. value"`
}

Jump to

Keyboard shortcuts

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