Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var LevelCap int32 = 10
var XPGains = []int32{
0,
255,
340,
380,
420,
460,
505,
545,
585,
625,
670,
710,
750,
790,
835,
875,
915,
955,
1000,
1040,
1080,
}
var XPModifiers = map[int32]float32{
-2: 0,
-1: 0.5,
0: 1,
1: 1.5,
2: 2,
}
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 ¶
MarshalEasyJSON supports easyjson.Marshaler interface
func (Battle) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (*Battle) UnmarshalEasyJSON ¶
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*Battle) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
type BattleEnd ¶
type BattleEnd struct {
Turns []*BattleTurn
}
func (BattleEnd) MarshalEasyJSON ¶
MarshalEasyJSON supports easyjson.Marshaler interface
func (BattleEnd) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (*BattleEnd) UnmarshalEasyJSON ¶
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*BattleEnd) UnmarshalJSON ¶
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 ¶
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 ¶
func (Player) MarshalEasyJSON ¶
MarshalEasyJSON supports easyjson.Marshaler interface
func (Player) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (*Player) UnmarshalEasyJSON ¶
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*Player) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface