Files
neoStudiosLCE-neoLegacy/Minecraft.World/LuckOfTheSeaEnchantment.cpp
BrainFart17 3781794be3 (fishing) Fix bugs and change random catch type selection
- Implement catch type random selection from decompiled java 1.7.2 code instead of using a WeighedRandomItemArray
- Fix fishingTreasuresArray length being set to 5 instead of 6
- Remove testing values for nibbleTimer
- Cast maxDamage of item to double before applying damage.
- Add include for EnchantmentCategory in LureEnchantment.cpp and LuckOfTheSeaEnchantment.cpp.
- sky obstruction is now checked before other checks.
2026-04-07 16:04:52 -07:00

26 lines
589 B
C++

#include "stdafx.h"
#include "LuckOfTheSeaEnchantment.h"
#include "EnchantmentCategory.h"
LuckOfTheSeaEnchantment::LuckOfTheSeaEnchantment(int id, int frequency) : Enchantment(id, frequency, EnchantmentCategory::fishing_rod)
{
setDescriptionId(IDS_ENCHANTMENT_LUCK_OF_THE_SEA);
}
// Source: https://github.com/GRAnimated/MinecraftLCE
int LuckOfTheSeaEnchantment::getMinCost(int level)
{
return 9 * level + 6;
}
int LuckOfTheSeaEnchantment::getMaxCost(int level)
{
return Enchantment::getMinCost(level) + 50;;
}
int LuckOfTheSeaEnchantment::getMaxLevel()
{
return 3;
}