From 5867e77c9fd84033ec54c565e0d0759860c2a2c1 Mon Sep 17 00:00:00 2001 From: Bardur Arantsson Date: Fri, 8 Jun 2012 18:40:12 +0200 Subject: Lua: Move wilderness help to C --- src/help.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/help.c b/src/help.c index d77f6935..7e9b110f 100644 --- a/src/help.c +++ b/src/help.c @@ -14,7 +14,7 @@ #include "angband.h" #define DESC_MAX 10 -#define TRIGGERED_HELP_MAX 11 +#define TRIGGERED_HELP_MAX 12 #define HELP_VOID_JUMPGATE 0 #define HELP_FOUNTAIN 1 @@ -27,6 +27,7 @@ #define HELP_GET_ROD_TIP 8 #define HELP_GET_TRAP_KIT 9 #define HELP_GET_DEVICE 10 +#define HELP_WILDERNESS 11 /** * Struct for help triggered by a boolean condition @@ -105,6 +106,12 @@ static bool_ trigger_get_magic_device(void *in, void *out) { (g->o_ptr->tval == TV_STAFF)); } +static bool_ trigger_end_turn_wilderness(void *in, void *out) { + return (((p_ptr->wilderness_x != 34) || + (p_ptr->wilderness_y != 21)) && + (!p_ptr->astral)); +} + /** * Trigger-based help items */ @@ -203,6 +210,16 @@ static triggered_help_type triggered_help[TRIGGERED_HELP_MAX] = "it and 'I'nspect it. Check the help file on Magic for more about these.", NULL } + }, + { HELP_WILDERNESS, + HOOK_END_TURN, + trigger_end_turn_wilderness, + { "Ahh wilderness travel... The overview mode will allow you to travel", + "fast, but that comes to the cost of GREATLY increased food consumption.", + "So you should bring lots of food and really watch your hunger status.", + "To enter the overview mode, press < while in the wilderness.", + NULL + } } }; -- cgit v1.2.3