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,47 @@
|
||||
package enchantment
|
||||
|
||||
import (
|
||||
"github.com/df-mc/dragonfly/server/item"
|
||||
"github.com/df-mc/dragonfly/server/world"
|
||||
)
|
||||
|
||||
// Multishot is an enchantment for crossbows that allow them to shoot three arrows or firework rockets at the cost of one.
|
||||
var Multishot multishot
|
||||
|
||||
type multishot struct{}
|
||||
|
||||
// Name ...
|
||||
func (multishot) Name() string {
|
||||
return "Multishot"
|
||||
}
|
||||
|
||||
// MaxLevel ...
|
||||
func (multishot) MaxLevel() int {
|
||||
return 1
|
||||
}
|
||||
|
||||
// Cost ...
|
||||
func (m multishot) Cost(level int) (int, int) {
|
||||
return 20, 50
|
||||
}
|
||||
|
||||
// Rarity ...
|
||||
func (multishot) Rarity() item.EnchantmentRarity {
|
||||
return item.EnchantmentRarityRare
|
||||
}
|
||||
|
||||
// CompatibleWithEnchantment ...
|
||||
func (multishot) CompatibleWithEnchantment(t item.EnchantmentType) bool {
|
||||
return t != Piercing
|
||||
}
|
||||
|
||||
// CompatibleWithItem ...
|
||||
func (multishot) CompatibleWithItem(i world.Item) bool {
|
||||
_, ok := i.(item.Crossbow)
|
||||
return ok
|
||||
}
|
||||
|
||||
// MultipleProjectiles ...
|
||||
func (multishot) MultipleProjectiles() bool {
|
||||
return true
|
||||
}
|
||||
Reference in New Issue
Block a user