candelabrum in shop (trunk only)
The code to have Izchak recognize the Candelabrum of Invocation instead of just being uninterested in an item not stocked in his shop was being skipped when the character is hallucinating. Make it work for any lighting store (slash'em sometimes has another candle shop, run by a randomly named shopkeeper), and make it recogize Izchak even when hallucinating. Also, have him give a message about the need for 7 candles if the candelabrum doesn't already have them attached.
This commit is contained in:
+18
-1
@@ -1,4 +1,4 @@
|
||||
/* SCCS Id: @(#)shknam.c 3.5 2006/01/03 */
|
||||
/* SCCS Id: @(#)shknam.c 3.5 2006/05/10 */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -704,4 +704,21 @@ struct monst *mtmp;
|
||||
return (*shknm == '-' || *shknm == '+' || *shknm == '=');
|
||||
}
|
||||
|
||||
boolean
|
||||
is_izchak(shkp, override_hallucination)
|
||||
struct monst *shkp;
|
||||
boolean override_hallucination;
|
||||
{
|
||||
const char *shknm;
|
||||
|
||||
if (Hallucination && !override_hallucination) return FALSE;
|
||||
if (!shkp->isshk) return FALSE;
|
||||
/* outside of town, Izchak becomes just an ordinary shopkeeper */
|
||||
if (!in_town(shkp->mx, shkp->my)) return FALSE;
|
||||
shknm = ESHK(shkp)->shknam;
|
||||
/* skip "+" prefix */
|
||||
if (!letter(*shknm)) ++shknm;
|
||||
return !strcmp(shknm, "Izchak");
|
||||
}
|
||||
|
||||
/*shknam.c*/
|
||||
|
||||
Reference in New Issue
Block a user