Files
BluTac10-Xbox_Neo/Minecraft.World/LureEnchantment.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
530 B
C++

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