summaryrefslogtreecommitdiffstats
path: root/src/Items/ItemSpiderEye.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/Items/ItemSpiderEye.h')
-rw-r--r--src/Items/ItemSpiderEye.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/Items/ItemSpiderEye.h b/src/Items/ItemSpiderEye.h
new file mode 100644
index 000000000..901f5d3d0
--- /dev/null
+++ b/src/Items/ItemSpiderEye.h
@@ -0,0 +1,33 @@
+
+#pragma once
+
+#include "ItemFood.h"
+
+
+
+
+
+class cItemSpiderEyeHandler :
+ public cItemFoodHandler
+{
+ typedef cItemFoodHandler super;
+
+public:
+ cItemSpiderEyeHandler()
+ : super(E_ITEM_SPIDER_EYE, FoodInfo(2, 3.2))
+ {
+ }
+
+ virtual bool EatItem(cPlayer * a_Player, cItem * a_Item) override
+ {
+ if (!super::EatItem(a_Player, a_Item))
+ {
+ return false;
+ }
+
+ a_Player->AddEntityEffect(cEntityEffect::effPoison, 100, 0);
+
+ return true;
+ }
+
+};