aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.World/AttackDamageMobEffect.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Minecraft.World/AttackDamageMobEffect.cpp')
-rw-r--r--Minecraft.World/AttackDamageMobEffect.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/Minecraft.World/AttackDamageMobEffect.cpp b/Minecraft.World/AttackDamageMobEffect.cpp
new file mode 100644
index 00000000..00ab0f95
--- /dev/null
+++ b/Minecraft.World/AttackDamageMobEffect.cpp
@@ -0,0 +1,19 @@
+#include "stdafx.h"
+
+#include "AttackDamageMobEffect.h"
+
+AttackDamageMobEffect::AttackDamageMobEffect(int id, bool isHarmful, eMinecraftColour color) : MobEffect(id, isHarmful, color)
+{
+}
+
+double AttackDamageMobEffect::getAttributeModifierValue(int amplifier, AttributeModifier *original)
+{
+ if (id == MobEffect::weakness->id)
+ {
+ return -0.5f * (amplifier + 1);
+ }
+ else
+ {
+ return 1.3 * (amplifier + 1);
+ }
+} \ No newline at end of file