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 | 18 |
3 files changed, 17 insertions, 27 deletions
diff --git a/lib/mods/theme/scpt/help.lua b/lib/mods/theme/scpt/help.lua index 339a5d17..5f1a9d2d 100644 --- a/lib/mods/theme/scpt/help.lua +++ b/lib/mods/theme/scpt/help.lua @@ -290,19 +290,6 @@ ingame_help ingame_help { - ["hook"] = HOOK_GET, - ["event"] = function(obj, idx) if obj.tval == TV_TRAPKIT then return TRUE end end, - ["desc"] = - { - "Ooooh, a trapping kit. If you have ability in the trapping skill,", - "you can lay this trap (via the 'm' key) to harm unsuspecting foes.", - "You'll generally need either some ammo or magic device depending", - "on the exact type of trap kit.", - } -} - -ingame_help -{ ["hook"] = HOOK_RECALC_SKILLS, ["event"] = function() if game.started and (get_melee_skills() > 1) then return TRUE end end, ["desc"] = diff --git a/lib/scpt/help.lua b/lib/scpt/help.lua index e7b9a662..1481a997 100644 --- a/lib/scpt/help.lua +++ b/lib/scpt/help.lua @@ -256,19 +256,6 @@ ingame_help ingame_help { - ["hook"] = HOOK_GET, - ["event"] = function(obj, idx) if obj.tval == TV_TRAPKIT then return TRUE end end, - ["desc"] = - { - "Ooooh, a trapping kit. If you have ability in the trapping skill,", - "you can lay this trap (via the 'm' key) to harm unsuspecting foes.", - "You'll generally need either some ammo or magic device depending", - "on the exact type of trap kit.", - } -} - -ingame_help -{ ["hook"] = HOOK_RECALC_SKILLS, ["event"] = function() if game.started and (get_melee_skills() > 1) then return TRUE end end, ["desc"] = @@ -14,7 +14,7 @@ #include "angband.h" #define DESC_MAX 10 -#define TRIGGERED_HELP_MAX 9 +#define TRIGGERED_HELP_MAX 10 #define HELP_VOID_JUMPGATE 0 #define HELP_FOUNTAIN 1 @@ -25,6 +25,7 @@ #define HELP_GET_RUNE 6 #define HELP_GET_ROD 7 #define HELP_GET_ROD_TIP 8 +#define HELP_GET_TRAP_KIT 9 /** * Struct for help triggered by a boolean condition @@ -92,6 +93,11 @@ static bool_ trigger_get_rod_tip(void *in, void *out) { return (g->o_ptr->tval == TV_ROD); } +static bool_ trigger_get_trap_kit(void *in, void *out) { + hook_get_in *g = (hook_get_in *) in; + return (g->o_ptr->tval == TV_TRAPKIT); +} + /** * Trigger-based help items */ @@ -170,6 +176,16 @@ static triggered_help_type triggered_help[TRIGGERED_HELP_MAX] = "the rod. To use your rod, 'z'ap it once it has been assembled.", NULL } + }, + { HELP_GET_TRAP_KIT, + HOOK_GET, + trigger_get_trap_kit, + { "Ooooh, a trapping kit. If you have ability in the trapping skill,", + "you can lay this trap (via the 'm' key) to harm unsuspecting foes.", + "You'll generally need either some ammo or magic device depending", + "on the exact type of trap kit.", + NULL + } } }; |