This repository has been archived on 2026-05-14. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
MinecraftConsoles/Minecraft.World/KnockbackEnchantment.cpp
2026-03-01 12:16:08 +08:00

22 lines
465 B
C++

#include "stdafx.h"
#include "KnockbackEnchantment.h"
KnockbackEnchantment::KnockbackEnchantment(int id, int frequency) : Enchantment(id, frequency, EnchantmentCategory::weapon)
{
setDescriptionId(IDS_ENCHANTMENT_KNOCKBACK);
}
int KnockbackEnchantment::getMinCost(int level)
{
return 5 + 20 * (level - 1);
}
int KnockbackEnchantment::getMaxCost(int level)
{
return Enchantment::getMinCost(level) + 50;
}
int KnockbackEnchantment::getMaxLevel()
{
return 2;
}