diff options
-rw-r--r-- | lib/mods/theme/scpt/help.lua | 14 | ||||
-rw-r--r-- | lib/scpt/help.lua | 14 | ||||
-rw-r--r-- | src/help.c | 18 |
3 files changed, 17 insertions, 29 deletions
diff --git a/lib/mods/theme/scpt/help.lua b/lib/mods/theme/scpt/help.lua index e1feea19..ff901650 100644 --- a/lib/mods/theme/scpt/help.lua +++ b/lib/mods/theme/scpt/help.lua @@ -9,20 +9,6 @@ ingame_help { ["hook"] = HOOK_MOVE, - ["event"] = function(y, x) if cave(y, x).o_idx ~= 0 then return TRUE end end, - ["desc"] = - { - "So you found your first item! Nice, eh? Now when you stumble across", - "objects, you can pick them up by pressing g, and if you are wondering", - "what they do, press I (then *, then the letter for the item) to get", - "some basic information. You may also want to identify them with scrolls,", - "staves, rods or spells.", - } -} - -ingame_help -{ - ["hook"] = HOOK_MOVE, ["event"] = function(y, x) if (cave(y, x).feat >= FEAT_ALTAR_HEAD) and (cave(y, x).feat <= FEAT_ALTAR_TAIL) then return TRUE end end, ["desc"] = { diff --git a/lib/scpt/help.lua b/lib/scpt/help.lua index 42fb9eeb..8c8ffd8d 100644 --- a/lib/scpt/help.lua +++ b/lib/scpt/help.lua @@ -9,20 +9,6 @@ ingame_help { ["hook"] = HOOK_MOVE, - ["event"] = function(y, x) if cave(y, x).o_idx ~= 0 then return TRUE end end, - ["desc"] = - { - "So you found your first item! Nice, eh? Now when you stumble across", - "objects, you can pick them up by pressing g, and if you are wondering", - "what they do, press I (then *, then the letter for the item) to get", - "some basic information. You may also want to identify them with scrolls,", - "staves, rods or spells.", - } -} - -ingame_help -{ - ["hook"] = HOOK_MOVE, ["event"] = function(y, x) if (cave(y, x).feat >= FEAT_ALTAR_HEAD) and (cave(y, x).feat <= FEAT_ALTAR_TAIL) then return TRUE end end, ["desc"] = { @@ -14,10 +14,11 @@ #include "angband.h" #define DESC_MAX 10 -#define TRIGGERED_HELP_MAX 2 +#define TRIGGERED_HELP_MAX 3 #define HELP_VOID_JUMPGATE 0 #define HELP_FOUNTAIN 1 +#define HELP_FOUND_OBJECT 2 /** * Struct for help triggered by a boolean condition @@ -48,6 +49,11 @@ static bool_ trigger_fountain(void *in, void *out) { return cave[p->y][p->x].feat == FEAT_FOUNTAIN; } +static bool_ trigger_found_object(void *in, void *out) { + hook_move_in *p = (hook_move_in *) in; + return cave[p->y][p->x].o_idx != 0; +} + /** * Trigger-based help items */ @@ -66,6 +72,16 @@ static triggered_help_type triggered_help[TRIGGERED_HELP_MAX] = { "Fountains are always magical. You can quaff from them by pressing H.", "Beware that unlike potions they cannot be identified.", NULL } + }, + { HELP_FOUND_OBJECT, + HOOK_MOVE, + trigger_found_object, + { "So you found your first item! Nice, eh? Now when you stumble across", + "objects, you can pick them up by pressing g, and if you are wondering", + "what they do, press I (then *, then the letter for the item) to get", + "some basic information. You may also want to identify them with scrolls,", + "staves, rods or spells.", + NULL } } }; |