types

package
v0.0.0-...-5be9b26 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AbilityLevels map[int32]bool = map[int32]bool{
	3:  true,
	5:  true,
	7:  true,
	9:  true,
	14: true,
	18: true,
}
View Source
var Costs = []int32{0, 1, 2, 4, 7, 11, 16}
View Source
var InitialScores = [][]int32{{8, 8, 8}, {9, 7, 7}, {7, 7, 7}}
View Source
var SkillLevels map[int32]bool = map[int32]bool{
	2:  true,
	4:  true,
	6:  true,
	8:  true,
	10: true,
	16: true,
	20: true,
}
View Source
var XPTable = []int32{
	0,
	250,
	330,
	435,
	575,
	760,
	1005,
	1330,
	1760,
	2330,
	3085,
	4085,
	5405,
	7155,
	9470,
	12535,
	16590,
	21960,
	29065,
	29065,
}

Functions

This section is empty.

Types

type Ability

type Ability int32
const (
	Strength     Ability = 0
	Dexterity    Ability = 1
	Intelligence Ability = 2
)

type Appearance

type Appearance struct {
	Gender       int32 `json:"gender"`
	FaceId       int32 `json:"faceIdentifier"`
	HairId       int32 `json:"hairIdentifier"`
	BeardId      int32 `json:"beardIdentifier"`
	SkinToneId   int32 `json:"skinToneIdentifier"`
	HairColorId  int32 `json:"hairColorIdentifier"`
	EyeColorId   int32 `json:"eyeColorIdentifier"`
	ArmorColorId int32 `json:"armorColorIdentifier"`
	HatId        int32 `json:"hatIdentifier"`
}

func (Appearance) MarshalEasyJSON

func (v Appearance) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (Appearance) MarshalJSON

func (v Appearance) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*Appearance) UnmarshalEasyJSON

func (v *Appearance) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*Appearance) UnmarshalJSON

func (v *Appearance) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type Fighter

type Fighter struct {
	Name               string             `json:"name"`
	Race               Race               `json:"race"`
	AbilityScores      []int32            `json:"abilityScores"`
	Appearance         Appearance         `json:"appearance"`
	Skills             []skills.SkillType `json:"skills"`
	Level              int32              `json:"level"`
	Xp                 int32              `json:"xp"`
	LevelUpHpBonusDice []int32            `json:"levelUpHpBonusDice"`
	LevelUpHpBonusMods []int32            `json:"levelUpHpBonusModifiers"`
	PvpBattlesFought   int32              `json:"pvpBattlesFought"`
	PvpBattlesWon      int32              `json:"pvpBattlesWon"`
	PveBattlesFought   int32              `json:"pveBattlesFought"`
	PveBattlesWon      int32              `json:"pveBattlesWon"`
}

func (Fighter) MarshalEasyJSON

func (v Fighter) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (Fighter) MarshalJSON

func (v Fighter) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*Fighter) UnmarshalEasyJSON

func (v *Fighter) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*Fighter) UnmarshalJSON

func (v *Fighter) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (*Fighter) ValidateStartingScores

func (f *Fighter) ValidateStartingScores() bool

type Gender

type Gender int32
const (
	Male   Gender = 0
	Female Gender = 1
)

type LevelUpRequest

type LevelUpRequest struct {
	Ability   int32            `json:"ability"`
	SkillType skills.SkillType `json:"skillType"`
}

func (LevelUpRequest) MarshalEasyJSON

func (v LevelUpRequest) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (LevelUpRequest) MarshalJSON

func (v LevelUpRequest) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*LevelUpRequest) UnmarshalEasyJSON

func (v *LevelUpRequest) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*LevelUpRequest) UnmarshalJSON

func (v *LevelUpRequest) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type Race

type Race int32
const (
	Human Race = 0
	Dwarf Race = 1
	Elf   Race = 2
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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