up3
Build and deploy / Build (push) Has been cancelled
Build and deploy / Update Contributors (push) Has been cancelled
Build and deploy / Deploy (push) Has been cancelled
Build and deploy / Build (push) Has been cancelled
Build and deploy / Update Contributors (push) Has been cancelled
Build and deploy / Deploy (push) Has been cancelled
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
package enchantment
|
||||
|
||||
import (
|
||||
"github.com/df-mc/dragonfly/server/item"
|
||||
"github.com/df-mc/dragonfly/server/world"
|
||||
)
|
||||
|
||||
// AquaAffinity is a helmet enchantment that increases underwater mining speed.
|
||||
var AquaAffinity aquaAffinity
|
||||
|
||||
type aquaAffinity struct{}
|
||||
|
||||
// Name ...
|
||||
func (aquaAffinity) Name() string {
|
||||
return "Aqua Affinity"
|
||||
}
|
||||
|
||||
// MaxLevel ...
|
||||
func (aquaAffinity) MaxLevel() int {
|
||||
return 1
|
||||
}
|
||||
|
||||
// Cost ...
|
||||
func (aquaAffinity) Cost(int) (int, int) {
|
||||
return 1, 41
|
||||
}
|
||||
|
||||
// Rarity ...
|
||||
func (aquaAffinity) Rarity() item.EnchantmentRarity {
|
||||
return item.EnchantmentRarityRare
|
||||
}
|
||||
|
||||
// CompatibleWithEnchantment ...
|
||||
func (aquaAffinity) CompatibleWithEnchantment(item.EnchantmentType) bool {
|
||||
return true
|
||||
}
|
||||
|
||||
// CompatibleWithItem ...
|
||||
func (aquaAffinity) CompatibleWithItem(i world.Item) bool {
|
||||
h, ok := i.(item.HelmetType)
|
||||
return ok && h.Helmet()
|
||||
}
|
||||
Reference in New Issue
Block a user