summaryrefslogtreecommitdiff
path: root/src/modules.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules.c')
-rw-r--r--src/modules.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/modules.c b/src/modules.c
index 552bc876..4d139397 100644
--- a/src/modules.c
+++ b/src/modules.c
@@ -585,6 +585,21 @@ static bool_ smeagol_ring(void *data, void *in_, void *out)
}
}
+static bool_ longbottom_leaf(void *data, void *in_, void *out_)
+{
+ hook_eat_in *in = (hook_eat_in *) in_;
+
+ if ((in->o_ptr->tval == TV_FOOD) &&
+ (in->o_ptr->sval == 45))
+ {
+ msg_print("What a stress reliever!");
+ heal_insanity(1000);
+ return TRUE;
+ }
+
+ return FALSE;
+}
+
void init_hooks_module()
{
/*
@@ -622,6 +637,11 @@ void init_hooks_module()
"smeagol_ring",
NULL);
+ add_hook_new(HOOK_EAT,
+ longbottom_leaf,
+ "longbottom_leaf",
+ NULL);
+
break;
}