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 LevelCap int32 = 10
View Source
var XPGains = []int32{
	0,
	255,
	340,
	380,
	420,
	460,
	505,
	545,
	585,
	625,
	670,
	710,
	750,
	790,
	835,
	875,
	915,
	955,
	1000,
	1040,
	1080,
}
View Source
var XPModifiers = map[int32]float32{
	-2: 0,
	-1: 0.5,
	0:  1,
	1:  1.5,
	2:  2,
}
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 Battle

type Battle struct {
	Engine  []byte
	Players []*BattlePlayer
	Turns   []*BattleTurn
	Status  BattleStatus
}

func (Battle) MarshalEasyJSON

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

MarshalEasyJSON supports easyjson.Marshaler interface

func (Battle) MarshalJSON

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

MarshalJSON supports json.Marshaler interface

func (*Battle) UnmarshalEasyJSON

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

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*Battle) UnmarshalJSON

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

UnmarshalJSON supports json.Unmarshaler interface

type BattleEnd

type BattleEnd struct {
	Turns []*BattleTurn
}

func (BattleEnd) MarshalEasyJSON

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

MarshalEasyJSON supports easyjson.Marshaler interface

func (BattleEnd) MarshalJSON

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

MarshalJSON supports json.Marshaler interface

func (*BattleEnd) UnmarshalEasyJSON

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

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*BattleEnd) UnmarshalJSON

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

UnmarshalJSON supports json.Unmarshaler interface

type BattlePlayer

type BattlePlayer struct {
	Pubkey  []byte
	Payload []byte
	Fighter *lib.Instance
	Items   []*lib.Instance
	Xp      int32
	Level   int32
	IsBot   bool
}

func (BattlePlayer) MarshalEasyJSON

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

MarshalEasyJSON supports easyjson.Marshaler interface

func (BattlePlayer) MarshalJSON

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

MarshalJSON supports json.Marshaler interface

func (*BattlePlayer) UnmarshalEasyJSON

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

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*BattlePlayer) UnmarshalJSON

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

UnmarshalJSON supports json.Unmarshaler interface

type BattleStart

type BattleStart struct {
	Engine  []byte
	Players []*Player
}

func (BattleStart) MarshalEasyJSON

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

MarshalEasyJSON supports easyjson.Marshaler interface

func (BattleStart) MarshalJSON

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

MarshalJSON supports json.Marshaler interface

func (*BattleStart) UnmarshalEasyJSON

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

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*BattleStart) UnmarshalJSON

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

UnmarshalJSON supports json.Unmarshaler interface

type BattleStatus

type BattleStatus int8
const (
	Open       BattleStatus = 0
	Conceded   BattleStatus = 1
	Challenged BattleStatus = -1
)

type BattleTurn

type BattleTurn struct {
	Seq     int32
	Payload []byte
	Status  BattleStatus
	Sig     []byte
}

func (*BattleTurn) Hash

func (b *BattleTurn) Hash() []byte

func (BattleTurn) MarshalEasyJSON

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

MarshalEasyJSON supports easyjson.Marshaler interface

func (BattleTurn) MarshalJSON

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

MarshalJSON supports json.Marshaler interface

func (*BattleTurn) UnmarshalEasyJSON

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

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*BattleTurn) UnmarshalJSON

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

UnmarshalJSON supports json.Unmarshaler interface

type Player

type Player struct {
	Pubkey  []byte
	Payload []byte
	IsBot   bool
}

func (Player) MarshalEasyJSON

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

MarshalEasyJSON supports easyjson.Marshaler interface

func (Player) MarshalJSON

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

MarshalJSON supports json.Marshaler interface

func (*Player) UnmarshalEasyJSON

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

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*Player) UnmarshalJSON

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

UnmarshalJSON supports json.Unmarshaler interface

Jump to

Keyboard shortcuts

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