types

package
v0.0.0-...-ef3a2ef Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidDealerType   = errors.New("types: invalid dealer type")
	ErrInvalidReceiverType = errors.New("types: invalid receiver type")
	ErrZeroType            = errors.New("types: None received")
)

Functions

func GetMultiplier

func GetMultiplier(receiver, dealer TypeBit) (float64, error)

func Register

func Register(t TypeData)

Types

type TypeBit

type TypeBit uint32
const (
	TypeNone TypeBit = 1 << iota >> 1
	TypeNormal
	TypeFighting
	TypeFlying
	TypePoison
	TypeGround
	TypeRock
	TypeBug
	TypeGhost
	TypeSteel
	TypeFire
	TypeWater
	TypeGrass
	TypeElectric
	TypePsychic
	TypeIce
	TypeDragon
	TypeDark
	TypeFairy
)

func (TypeBit) GetData

func (tb TypeBit) GetData() *TypeData

func (TypeBit) Single

func (tb TypeBit) Single() bool

type TypeData

type TypeData struct {
	Name string
	Bit  TypeBit

	DoubleDamageTaken TypeBit
	HalfDamageTaken   TypeBit
	ZeroDamageTaken   TypeBit
}

func Get

func Get(tb TypeBit) *TypeData

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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