diff options
author | Bardur Arantsson <bardur@scientician.net> | 2012-06-08 17:36:02 +0200 |
---|---|---|
committer | Bardur Arantsson <bardur@scientician.net> | 2012-06-08 17:39:52 +0200 |
commit | 0ade661fe361dae2f733587f1934e078fd4559fb (patch) | |
tree | cce41d4f4d3d0cd85ccad5b23248b73cf0abf506 /src | |
parent | 0bad18e026e1fd9254191aa8d41f2d4c1b5ce19b (diff) |
Lua: Move "pick up rune" help to C
Diffstat (limited to 'src')
-rw-r--r-- | src/help.c | 17 |
1 files changed, 16 insertions, 1 deletions
@@ -14,7 +14,7 @@ #include "angband.h" #define DESC_MAX 10 -#define TRIGGERED_HELP_MAX 6 +#define TRIGGERED_HELP_MAX 7 #define HELP_VOID_JUMPGATE 0 #define HELP_FOUNTAIN 1 @@ -22,6 +22,7 @@ #define HELP_FOUND_ALTAR 3 #define HELP_FOUND_STAIR 4 #define HELP_GET_ESSENCE 5 +#define HELP_GET_RUNE 6 /** * Struct for help triggered by a boolean condition @@ -73,6 +74,12 @@ static bool_ trigger_get_essence(void *in, void *out) { return (g->o_ptr->tval == TV_BATERIE); } +static bool_ trigger_get_rune(void *in, void *out) { + hook_get_in *g = (hook_get_in *) in; + return ((g->o_ptr->tval == TV_RUNE1) || + (g->o_ptr->tval == TV_RUNE2)); +} + /** * Trigger-based help items */ @@ -124,6 +131,14 @@ static triggered_help_type triggered_help[TRIGGERED_HELP_MAX] = { "Ah, an essence! Those magical containers stores energies. They are used", "with the Alchemy skill to create or modify the powers of items.", NULL } + }, + { HELP_GET_RUNE, + HOOK_GET, + trigger_get_rune, + { "Ah, a rune! Runes are used with the Runecraft skill to allow you to", + "create spells on your own.", + NULL + } } }; |