armour

package
v0.0.0-...-d1826b6 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2022 License: AGPL-3.0, MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TierChain = Tier{BaseDurability: 166, Name: "chainmail"}

TierChain is the tier of chain armour.

View Source
var TierDiamond = Tier{BaseDurability: 363, Name: "diamond"}

TierDiamond is the tier of diamond armour.

View Source
var TierGold = Tier{BaseDurability: 77, Name: "golden"}

TierGold is the tier of gold armour.

View Source
var TierIron = Tier{BaseDurability: 165, Name: "iron"}

TierIron is the tier of iron armour.

View Source
var TierLeather = Tier{BaseDurability: 55, Name: "leather"}

TierLeather is the tier of leather armour.

View Source
var TierNetherite = Tier{BaseDurability: 408, KnockBackResistance: 0.1, Name: "netherite"}

TierNetherite is the tier of netherite armour.

Functions

This section is empty.

Types

type Armour

type Armour interface {
	// DefencePoints returns the defence points that the armour provides when worn.
	DefencePoints() float64
	// KnockBackResistance returns a number from 0-1 that decides the amount of knock back force that is
	// resisted upon being attacked. 1 knock back resistance point client-side translates to 10% knock back
	// reduction.
	KnockBackResistance() float64
}

Armour represents an item that may be worn as armour. Generally, these items provide armour points, which reduce damage taken. Some pieces of armour also provide toughness, which negates damage proportional to the total damage dealt.

type Boots

type Boots interface {
	Armour
	Boots() bool
}

Boots are an Armour item that can be worn in the boots slot.

type Chestplate

type Chestplate interface {
	Armour
	Chestplate() bool
}

Chestplate is an Armour item that can be worn in the chestplate slot.

type Helmet

type Helmet interface {
	Armour
	Helmet() bool
}

Helmet is an Armour item that can be worn in the helmet slot.

type Leggings

type Leggings interface {
	Armour
	Leggings() bool
}

Leggings are an Armour item that can be worn in the leggings slot.

type Tier

type Tier struct {
	// BaseDurability is the base durability of armour with this tier. This is otherwise the durability of
	// the helmet with this tier.
	BaseDurability float64
	// KnockBackResistance is a number from 0-1 that decides the amount of knock back force that is resisted
	// upon being attacked. 1 knock back resistance point client-side translates to 10% knock back reduction.
	KnockBackResistance float64
	// Name is the name of the tier.
	Name string
}

Tier represents the tier, or material, that a piece of armour is made of.

func Tiers

func Tiers() []Tier

Tiers returns a list of all armour tiers.

Jump to

Keyboard shortcuts

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