diff options
author | Bardur Arantsson <bardur@scientician.net> | 2012-06-08 16:34:39 +0200 |
---|---|---|
committer | Bardur Arantsson <bardur@scientician.net> | 2012-06-08 16:34:39 +0200 |
commit | ac8ef5f15e948e351ff4e92a4150ff6602dd680e (patch) | |
tree | cf21da10e677bebed4bb6abb49965f00b2f9a2e5 /src/help.c | |
parent | 4401b0bd2e85f491faf9971da4015a254b45366b (diff) |
Lua: Move "Found Altar" help to C
Diffstat (limited to 'src/help.c')
-rw-r--r-- | src/help.c | 18 |
1 files changed, 17 insertions, 1 deletions
@@ -14,11 +14,12 @@ #include "angband.h" #define DESC_MAX 10 -#define TRIGGERED_HELP_MAX 3 +#define TRIGGERED_HELP_MAX 4 #define HELP_VOID_JUMPGATE 0 #define HELP_FOUNTAIN 1 #define HELP_FOUND_OBJECT 2 +#define HELP_FOUND_ALTAR 3 /** * Struct for help triggered by a boolean condition @@ -54,6 +55,12 @@ static bool_ trigger_found_object(void *in, void *out) { return cave[p->y][p->x].o_idx != 0; } +static bool_ trigger_found_altar(void *in, void *out) { + hook_move_in *p = (hook_move_in *) in; + return ((cave[p->y][p->x].feat >= FEAT_ALTAR_HEAD) && + (cave[p->y][p->x].feat <= FEAT_ALTAR_TAIL)); +} + /** * Trigger-based help items */ @@ -82,6 +89,15 @@ static triggered_help_type triggered_help[TRIGGERED_HELP_MAX] = "some basic information. You may also want to identify them with scrolls,", "staves, rods or spells.", NULL } + }, + { HELP_FOUND_ALTAR, + HOOK_MOVE, + trigger_found_altar, + { "Altars are the way to reach the Valar, powers of the world,", + "usualy called Gods. You can press O to become a follower.", + "Beware that once you follow a god, you are not allowed to change.", + "For an exact description of what gods do and want, read the documentation.", + NULL } } }; |