armour

package
v0.0.4 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TierChain = Tier{BaseDurability: 166}

TierChain is the tier of chain armour.

View Source
var TierDiamond = Tier{BaseDurability: 363}

TierDiamond is the tier of diamond armour.

View Source
var TierGold = Tier{BaseDurability: 77}

TierGold is the tier of gold armour.

View Source
var TierIron = Tier{BaseDurability: 165}

TierIron is the tier of iron armour.

View Source
var TierLeather = Tier{BaseDurability: 55}

TierLeather is the tier of leather armour.

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

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 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
}

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

Jump to

Keyboard shortcuts

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