equipment

package
v0.0.0-...-f9ac281 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2019 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Item

type Item struct {
	Attributes attributes
	Bonus      int
	Level      int
	Name       string
	Slot       slot.Location
}

Item represents a single piece of equipment that a player can have equiped.

func Generate

func Generate(itemType slot.Location, level int) (Item, error)

Generate is a factory function that can be used to create different pieces of equipment based on a target power level. The returned Item will have a power level equal to the value of the level parameter passed into the function.

func (Item) Power

func (i Item) Power() int

Power returns the total power of an Item including any attributes on the Item.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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