package org.allaymc.server.item.enchantment;

import org.allaymc.api.item.enchantment.ApplicableType;
import org.allaymc.api.item.enchantment.EnchantmentType;
import org.allaymc.api.item.enchantment.Rarity;
import org.allaymc.api.utils.identifier.Identifier;

/**
 * @author daoge_cmd
 */
public class EnchantmentBaneOfArthropodsType extends EnchantmentType {
    public EnchantmentBaneOfArthropodsType() {
        super(new Identifier("minecraft:bane_of_arthropods"), 11, 5, Rarity.UNCOMMON, ApplicableType.SWORD_OR_AXE);
    }

    @Override
    public boolean isIncompatibleWith(EnchantmentType other) {
        return other instanceof EnchantmentSmiteType ||
               other instanceof EnchantmentSharpnessType ||
               other instanceof EnchantmentBreachType ||
               other instanceof EnchantmentDensityType;
    }

    @Override
    public int getMinModifiedLevel(int level) {
        return level * 8 + 3;
    }

    @Override
    public int getMaxModifiedLevel(int level) {
        return getMinModifiedLevel(level) + 20;
    }
}
