diff options
author | Bardur Arantsson <bardur@scientician.net> | 2012-06-08 17:25:11 +0200 |
---|---|---|
committer | Bardur Arantsson <bardur@scientician.net> | 2012-06-08 17:39:45 +0200 |
commit | 0bad18e026e1fd9254191aa8d41f2d4c1b5ce19b (patch) | |
tree | 74d2f9e24f91b824ee7d84fd7186f11740a4173e /src | |
parent | 7573056e431112f1f1c0e513fae36efa06ffaac9 (diff) |
Lua: Move "pick up essence" help to C
Diffstat (limited to 'src')
-rw-r--r-- | src/help.c | 15 |
1 files changed, 14 insertions, 1 deletions
@@ -14,13 +14,14 @@ #include "angband.h" #define DESC_MAX 10 -#define TRIGGERED_HELP_MAX 5 +#define TRIGGERED_HELP_MAX 6 #define HELP_VOID_JUMPGATE 0 #define HELP_FOUNTAIN 1 #define HELP_FOUND_OBJECT 2 #define HELP_FOUND_ALTAR 3 #define HELP_FOUND_STAIR 4 +#define HELP_GET_ESSENCE 5 /** * Struct for help triggered by a boolean condition @@ -67,6 +68,11 @@ static bool_ trigger_found_stairs(void *in, void *out) { return (cave[p->y][p->x].feat == FEAT_MORE); } +static bool_ trigger_get_essence(void *in, void *out) { + hook_get_in *g = (hook_get_in *) in; + return (g->o_ptr->tval == TV_BATERIE); +} + /** * Trigger-based help items */ @@ -111,6 +117,13 @@ static triggered_help_type triggered_help[TRIGGERED_HELP_MAX] = { "Ah, this is a stair, or a way into something. Press > to enter it.", "But be ready to fight what lies within, for it might not be too friendly.", NULL } + }, + { HELP_GET_ESSENCE, + HOOK_GET, + trigger_get_essence, + { "Ah, an essence! Those magical containers stores energies. They are used", + "with the Alchemy skill to create or modify the powers of items.", + NULL } } }; |