Files
TarnaWijaya 26ed99fda6
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
up3
2026-07-09 08:33:57 +08:00

50 lines
909 B
Go

package enchantment
import (
"github.com/df-mc/dragonfly/server/item"
"github.com/df-mc/dragonfly/server/world"
"time"
)
// Flame turns your arrows into flaming arrows allowing you to set your targets
// on fire.
var Flame flame
type flame struct{}
// Name ...
func (flame) Name() string {
return "Flame"
}
// MaxLevel ...
func (flame) MaxLevel() int {
return 1
}
// Cost ...
func (flame) Cost(int) (int, int) {
return 20, 50
}
// Rarity ...
func (flame) Rarity() item.EnchantmentRarity {
return item.EnchantmentRarityRare
}
// BurnDuration always returns five seconds, no matter the level.
func (flame) BurnDuration() time.Duration {
return time.Second * 5
}
// CompatibleWithEnchantment ...
func (flame) CompatibleWithEnchantment(item.EnchantmentType) bool {
return true
}
// CompatibleWithItem ...
func (flame) CompatibleWithItem(i world.Item) bool {
_, ok := i.(item.Bow)
return ok
}