item

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2020 License: AGPL-3.0 Imports: 3 Imported by: 1

Documentation

Index

Constants

View Source
const (
	ModifierType_AbsoluteHealth = "absoluteHealth"
	ModifierType_CureStatus     = "cureStatus"
	ModifierType_Capture        = "capture"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AbsoluteHealthModifier

type AbsoluteHealthModifier struct {
	Amount int
}

func (*AbsoluteHealthModifier) MarshalJSON

func (ahm *AbsoluteHealthModifier) MarshalJSON() ([]byte, error)

func (AbsoluteHealthModifier) Type

type Base

type Base struct {
	Name     string     `json:"name"`
	Stack    int        `json:"stack"`
	Target   string     `json:"target"`
	Type     Type       `json:"type"`
	Reusable bool       `json:"reusable"`
	Modifier []Modifier `json:"modifier"`
}

func (*Base) UnmarshalJSON

func (b *Base) UnmarshalJSON(data []byte) error

type CaptureModifier

type CaptureModifier struct{}

func (CaptureModifier) Type

func (cm CaptureModifier) Type() ModifierType

type CureStatusModifier

type CureStatusModifier struct {
	Status status.Status
}

func (*CureStatusModifier) MarshalJSON

func (ahm *CureStatusModifier) MarshalJSON() ([]byte, error)

func (CureStatusModifier) Type

func (ahm CureStatusModifier) Type() ModifierType

type Item

type Item struct {
	Base   *Base
	Amount uint
}

type Modifier

type Modifier interface {
	Type() ModifierType
}

type ModifierType

type ModifierType string

type Type

type Type uint
const (
	// Type_Battle_Breeder allows the usage of the item in battles between breeders
	Type_Battle_Breeder Type = 1 << iota
	// Type_Battle_Wild allows the usage of the item in battles against wild monsters
	Type_Battle_Wild
	Type_World
	Type_Holding
)

Jump to

Keyboard shortcuts

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