summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBardur Arantsson <bardur@scientician.net>2012-06-08 18:07:38 +0200
committerBardur Arantsson <bardur@scientician.net>2012-06-08 18:07:38 +0200
commit8a94b839d00267e7be1664f521de1c0033921b8c (patch)
tree1ae69c5fa6d7c6de25c11751fc6d71cae2f2aebd /src
parent01b96520e44540b08ce221253248307492bf6383 (diff)
Lua: Move "pick up staff/wand" help to C
Diffstat (limited to 'src')
-rw-r--r--src/help.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/help.c b/src/help.c
index 3bd0c05d..d77f6935 100644
--- a/src/help.c
+++ b/src/help.c
@@ -14,7 +14,7 @@
#include "angband.h"
#define DESC_MAX 10
-#define TRIGGERED_HELP_MAX 10
+#define TRIGGERED_HELP_MAX 11
#define HELP_VOID_JUMPGATE 0
#define HELP_FOUNTAIN 1
@@ -26,6 +26,7 @@
#define HELP_GET_ROD 7
#define HELP_GET_ROD_TIP 8
#define HELP_GET_TRAP_KIT 9
+#define HELP_GET_DEVICE 10
/**
* Struct for help triggered by a boolean condition
@@ -98,6 +99,12 @@ static bool_ trigger_get_trap_kit(void *in, void *out) {
return (g->o_ptr->tval == TV_TRAPKIT);
}
+static bool_ trigger_get_magic_device(void *in, void *out) {
+ hook_get_in *g = (hook_get_in *) in;
+ return ((g->o_ptr->tval == TV_WAND) ||
+ (g->o_ptr->tval == TV_STAFF));
+}
+
/**
* Trigger-based help items
*/
@@ -186,6 +193,16 @@ static triggered_help_type triggered_help[TRIGGERED_HELP_MAX] =
"on the exact type of trap kit.",
NULL
}
+ },
+ { HELP_GET_DEVICE,
+ HOOK_GET,
+ trigger_get_magic_device,
+ { "You've found a magical device, either a staff or a wand. Each staff",
+ "contains a spell, often from one of the primary magic schools. There",
+ "is a lot of information you can find about this object if you identify",
+ "it and 'I'nspect it. Check the help file on Magic for more about these.",
+ NULL
+ }
}
};