summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBardur Arantsson <bardur@scientician.net>2012-06-08 17:36:02 +0200
committerBardur Arantsson <bardur@scientician.net>2012-06-08 17:39:52 +0200
commit0ade661fe361dae2f733587f1934e078fd4559fb (patch)
treecce41d4f4d3d0cd85ccad5b23248b73cf0abf506 /src
parent0bad18e026e1fd9254191aa8d41f2d4c1b5ce19b (diff)
Lua: Move "pick up rune" help to C
Diffstat (limited to 'src')
-rw-r--r--src/help.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/help.c b/src/help.c
index cb73025b..a0ad3612 100644
--- a/src/help.c
+++ b/src/help.c
@@ -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
+ }
}
};