summaryrefslogtreecommitdiffstats
path: root/src/Enchantments.cpp
diff options
context:
space:
mode:
authorJonathan Fabian <jonfabe@github>2014-12-22 01:29:34 +0100
committerJonathan Fabian <jonfabe@github>2014-12-22 04:25:27 +0100
commitae8c871565e7a13159eb2a0839053f1b5b6bcfc4 (patch)
tree3a2f0ba1439e212f3f7aa04ad1dffec6e9be098b /src/Enchantments.cpp
parentProtoProxy: Added a sanity check to metadata string lengths. (diff)
downloadcuberite-ae8c871565e7a13159eb2a0839053f1b5b6bcfc4.tar
cuberite-ae8c871565e7a13159eb2a0839053f1b5b6bcfc4.tar.gz
cuberite-ae8c871565e7a13159eb2a0839053f1b5b6bcfc4.tar.bz2
cuberite-ae8c871565e7a13159eb2a0839053f1b5b6bcfc4.tar.lz
cuberite-ae8c871565e7a13159eb2a0839053f1b5b6bcfc4.tar.xz
cuberite-ae8c871565e7a13159eb2a0839053f1b5b6bcfc4.tar.zst
cuberite-ae8c871565e7a13159eb2a0839053f1b5b6bcfc4.zip
Diffstat (limited to 'src/Enchantments.cpp')
-rw-r--r--src/Enchantments.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/Enchantments.cpp b/src/Enchantments.cpp
index e72ec668a..5ed18de6b 100644
--- a/src/Enchantments.cpp
+++ b/src/Enchantments.cpp
@@ -183,6 +183,7 @@ int cEnchantments::StringToEnchantmentID(const AString & a_EnchantmentName)
{ enchRespiration, "Respiration"},
{ enchAquaAffinity, "AquaAffinity"},
{ enchThorns, "Thorns"},
+ { enchDepthStrider, "DepthStrider"},
{ enchSharpness, "Sharpness"},
{ enchSmite, "Smite"},
{ enchBaneOfArthropods, "BaneOfArthropods"},
@@ -506,6 +507,20 @@ void cEnchantments::AddItemEnchantmentWeights(cWeightedEnchantments & a_Enchantm
{
AddEnchantmentWeightToVector(a_Enchantments, 5, enchFeatherFalling, 1);
}
+
+ // Depth Strider
+ if ((a_EnchantmentLevel >= 30) && (a_EnchantmentLevel <= 45))
+ {
+ AddEnchantmentWeightToVector(a_Enchantments, 2, enchDepthStrider, 3);
+ }
+ else if ((a_EnchantmentLevel >= 20) && (a_EnchantmentLevel <= 35))
+ {
+ AddEnchantmentWeightToVector(a_Enchantments, 2, enchDepthStrider, 2);
+ }
+ else if ((a_EnchantmentLevel >= 10) && (a_EnchantmentLevel <= 25))
+ {
+ AddEnchantmentWeightToVector(a_Enchantments, 2, enchDepthStrider, 1);
+ }
}
}