Documentation ¶ Index ¶ type Item func Generate(itemType slot.Location, level int) (Item, error) func (i Item) Power() int 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. Source Files ¶ View all Source files equipment.go weapon.go Directories ¶ Show internal Expand all Path Synopsis slot Click to show internal directories. Click to hide internal directories.