diff options
-rw-r--r-- | lib/mods/theme/scpt/help.lua | 13 | ||||
-rw-r--r-- | lib/scpt/help.lua | 13 | ||||
-rw-r--r-- | src/help.c | 19 |
3 files changed, 18 insertions, 27 deletions
diff --git a/lib/mods/theme/scpt/help.lua b/lib/mods/theme/scpt/help.lua index 5f1a9d2d..e6f3a8b1 100644 --- a/lib/mods/theme/scpt/help.lua +++ b/lib/mods/theme/scpt/help.lua @@ -301,19 +301,6 @@ ingame_help ingame_help { - ["hook"] = HOOK_GET, - ["event"] = function(obj, idx) if obj.tval == TV_WAND or obj.tval == TV_STAFF then return TRUE end end, - ["desc"] = - { - "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.", - } -} - -ingame_help -{ ["hook"] = HOOK_PLAYER_LEVEL, ["event"] = function(y, x) if player.lev >= 20 then return TRUE end end, ["desc"] = diff --git a/lib/scpt/help.lua b/lib/scpt/help.lua index 1481a997..b03e8d9d 100644 --- a/lib/scpt/help.lua +++ b/lib/scpt/help.lua @@ -267,19 +267,6 @@ ingame_help ingame_help { - ["hook"] = HOOK_GET, - ["event"] = function(obj, idx) if obj.tval == TV_WAND or obj.tval == TV_STAFF then return TRUE end end, - ["desc"] = - { - "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.", - } -} - -ingame_help -{ ["hook"] = HOOK_PLAYER_LEVEL, ["event"] = function(y, x) if player.lev >= 20 then return TRUE end end, ["desc"] = @@ -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 + } } }; |