Package-level declarations

Contains logic related to enchantments

Types

Link copied to clipboard

Enum that contains all default enchant values

Link copied to clipboard
interface Enchantment : Listener

An interface that defines an enchantment

Link copied to clipboard
abstract class EnchantmentBase(val name: String, description: String, val levels: IntRange, val applicable: List<ItemType>, baseStats: Statistics = Statistics.zero(), baseSpecials: SpecialStatistics = SpecialStatistics(), multiplier: Float = 1.0f, conflicts: List<String> = listOf()) : Enchantment

A base for enchantment. It is recommended to inherit this class instead of implementing raw Enchantment interface

Link copied to clipboard
class SimpleEnchantment(val name: String, description: String, val levels: IntRange, val applicable: List<ItemType>, base: Statistics = Statistics.zero(), special: SpecialStatistics = SpecialStatistics(), multiplier: Float = 1.0f, conflicts: List<String> = listOf()) : EnchantmentBase

A simple enchantment to avoid unneeded inheritance

Link copied to clipboard
open class UltimateEnchantment(val name: String, description: String, val levels: IntRange, val applicable: List<ItemType>, baseStats: Statistics = Statistics.zero(), baseSpecials: SpecialStatistics = SpecialStatistics(), multiplier: Float = 1.0f, conflicts: List<String> = listOf()) : EnchantmentBase

An ultimate enchantment. In implementation details differs from SimpleEnchantment only by having light purple bold name. All the other logic is hard coded inside the MacrocosmItem

Functions

Link copied to clipboard
fun roman(num: Int): String

Converts an integer to a fancy roman number