summaryrefslogtreecommitdiffstats
path: root/src/Items/ItemRawChicken.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/Items/ItemRawChicken.h')
-rw-r--r--src/Items/ItemRawChicken.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/Items/ItemRawChicken.h b/src/Items/ItemRawChicken.h
new file mode 100644
index 000000000..e1a6d4870
--- /dev/null
+++ b/src/Items/ItemRawChicken.h
@@ -0,0 +1,36 @@
+
+#pragma once
+
+#include "ItemFood.h"
+
+
+
+
+
+class cItemRawChickenHandler :
+ public cItemFoodHandler
+{
+ typedef cItemFoodHandler super;
+
+public:
+ cItemRawChickenHandler()
+ : super(E_ITEM_RAW_CHICKEN, FoodInfo(2, 1.2))
+ {
+ }
+
+ virtual bool EatItem(cPlayer * a_Player, cItem * a_Item) override
+ {
+ if (!super::EatItem(a_Player, a_Item))
+ {
+ return false;
+ }
+
+ if (GetRandomProvider().RandBool(0.3))
+ {
+ a_Player->AddEntityEffect(cEntityEffect::effHunger, 600, 0);
+ }
+
+ return true;
+ }
+
+};