home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Usenet 1994 January
/
usenetsourcesnewsgroupsinfomagicjanuary1994.iso
/
sources
/
games
/
volume16
/
nethack31
/
patch1n
/
patches01g
Wrap
Text File
|
1993-03-05
|
53KB
|
1,899 lines
*** /tmp/da08437 Thu Feb 25 10:24:27 1993
--- src/objnam.c Tue Feb 23 17:03:14 1993
***************
*** 1,4 ****
! /* SCCS Id: @(#)objnam.c 3.1 92/12/13 */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
--- 1,4 ----
! /* SCCS Id: @(#)objnam.c 3.1 93/02/12 */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
***************
*** 167,182 ****
register struct obj *obj;
{
#ifdef LINT /* lint may handle static decl poorly -- static char bufr[]; */
! char bufr[BUFSZ];
#else
! static char bufr[BUFSZ];
#endif
! register char *buf = &(bufr[PREFIX]); /* leave room for "17 -3 " */
! register int typ = obj->otyp;
! register int nn = objects[typ].oc_name_known;
! register const char *actualn = OBJ_NAME(objects[typ]);
! register const char *dn = OBJ_DESCR(objects[typ]);
! register const char *un = objects[typ].oc_uname;
if (pl_character[0] == 'S' && Japanese_item_name(typ))
actualn = Japanese_item_name(typ);
--- 167,182 ----
register struct obj *obj;
{
#ifdef LINT /* lint may handle static decl poorly -- static char bufr[]; */
! char bufr[BUFSZ];
#else
! static char bufr[BUFSZ];
#endif
! register char *buf = &(bufr[PREFIX]); /* leave room for "17 -3 " */
! register int typ = obj->otyp;
! register int nn = objects[typ].oc_name_known;
! register const char *actualn = OBJ_NAME(objects[typ]);
! register const char *dn = OBJ_DESCR(objects[typ]);
! register const char *un = objects[typ].oc_uname;
if (pl_character[0] == 'S' && Japanese_item_name(typ))
actualn = Japanese_item_name(typ);
***************
*** 385,398 ****
default:
Sprintf(buf,"glorkum %d %d %d", obj->oclass, typ, obj->spe);
}
! if(obj->quan != 1L) Strcpy(buf, makeplural(buf));
! if(obj->onamelth &&
! (!obj->oartifact || !objects[obj->otyp].oc_unique)) {
Strcat(buf, " named ");
nameit:
Strcat(buf, ONAME(obj));
}
return(buf);
}
--- 385,400 ----
default:
Sprintf(buf,"glorkum %d %d %d", obj->oclass, typ, obj->spe);
}
! if (obj->quan != 1L) Strcpy(buf, makeplural(buf));
! if (obj->onamelth &&
! (!obj->oartifact || !objects[obj->otyp].oc_unique)) {
Strcat(buf, " named ");
nameit:
Strcat(buf, ONAME(obj));
}
+
+ if (!strncmpi(buf, "the ", 4)) buf += 4;
return(buf);
}
***************
*** 487,493 ****
Strcat(prefix,
is_rustprone(obj) ? "rusty " :
is_corrodeable(obj) ? "corroded " :
! is_flammable(obj) ? "burnt " : "");
} else if (obj->rknown && obj->oerodeproof)
Strcat(prefix,
is_rustprone(obj) ? "rustproof " :
--- 489,495 ----
Strcat(prefix,
is_rustprone(obj) ? "rusty " :
is_corrodeable(obj) ? "corroded " :
! is_flammable(obj) ? "burnt " : "eroded ");
} else if (obj->rknown && obj->oerodeproof)
Strcat(prefix,
is_rustprone(obj) ? "rustproof " :
***************
*** 904,910 ****
/* same singular and plural */
/* note: also swine, trout, grouse */
! if ((len >= 7 && !strcmp(spot-6, "samurai")) ||
#ifdef TUTTI_FRUTTI
(len >= 5 &&
(!strcmp(spot-4, "manes") || !strcmp(spot-4, "sheep"))) ||
--- 906,912 ----
/* same singular and plural */
/* note: also swine, trout, grouse */
! if ((len >= 2 && !strcmp(spot-1, "ai")) || /* samurai, Uruk-hai */
#ifdef TUTTI_FRUTTI
(len >= 5 &&
(!strcmp(spot-4, "manes") || !strcmp(spot-4, "sheep"))) ||
***************
*** 971,977 ****
}
/* Japanese words: plurals are the same as singlar */
! if (len == 2 && !strcmp(str, "ya"))
goto bottom;
/* Default: append an 's' */
--- 973,980 ----
}
/* Japanese words: plurals are the same as singlar */
! if ((len == 2 && !strcmp(str, "ya")) ||
! (len > 2 && !strcmp(spot-2, " ya")))
goto bottom;
/* Default: append an 's' */
***************
*** 1535,1540 ****
--- 1538,1544 ----
p = eos(bp);
if(!BSTRCMP(bp, p-8, "fountain")) {
levl[u.ux][u.uy].typ = FOUNTAIN;
+ level.flags.nfountains++;
if(!strncmpi(bp, "magic ", 6))
levl[u.ux][u.uy].blessedftn = 1;
pline("A %sfountain.",
***************
*** 1542,1547 ****
--- 1546,1560 ----
newsym(u.ux, u.uy);
return(&zeroobj);
}
+ # ifdef SINKS
+ if(!BSTRCMP(bp, p-4, "sink")) {
+ levl[u.ux][u.uy].typ = SINK;
+ level.flags.nsinks++;
+ pline("A sink.");
+ newsym(u.ux, u.uy);
+ return &zeroobj;
+ }
+ # endif
if(!BSTRCMP(bp, p-5, "altar")) {
aligntyp al;
***************
*** 1670,1685 ****
typ = SPE_BLANK_PAPER;
break;
}
!
! /* venom isn't really an object and can't be wished for; but allow
! * wizards to wish for it since it's faster than polymorphing and
! * spitting.
! */
! if(let == VENOM_CLASS)
#ifdef WIZARD
! if (!wizard)
#endif
! return((struct obj *)0);
if(typ) {
otmp = mksobj(typ, TRUE, FALSE);
--- 1683,1695 ----
typ = SPE_BLANK_PAPER;
break;
}
! /* catch any other non-wishable objects */
! if (objects[typ].oc_nowish
#ifdef WIZARD
! && !wizard
#endif
! )
! return((struct obj *)0);
if(typ) {
otmp = mksobj(typ, TRUE, FALSE);
***************
*** 1696,1701 ****
--- 1706,1712 ----
#ifdef WIZARD
wizard ||
#endif
+ (cnt <= 7 && Is_candle(otmp)) ||
(cnt <= 20 &&
((let == WEAPON_CLASS && typ <= SHURIKEN) || (typ == ROCK)))))
otmp->quan = (long) cnt;
***************
*** 1858,1863 ****
--- 1869,1889 ----
otmp = oname(otmp, name, 0);
if (otmp->oartifact) otmp->quan = 1L;
}
+
+ /* more wishing abuse: don't allow wishing for certain artifacts */
+ /* and make them pay; charge them for the wish anyway! */
+ if ((is_quest_artifact(otmp) ||
+ (otmp->oartifact && rn2(nartifact_exist()) > 1))
+ # ifdef WIZARD
+ && !wizard
+ # endif
+ ) {
+ artifact_unexist(otmp);
+ obfree(otmp, (struct obj *) 0);
+ otmp = &zeroobj;
+ pline("For a moment, you feel something in your %s, but it disappears!", makeplural(body_part(HAND)));
+ }
+
otmp->owt = weight(otmp);
if (very && otmp->otyp == HEAVY_IRON_BALL) otmp->owt += 160;
if (halfeaten && otmp->oclass == FOOD_CLASS) {
*** /tmp/da08445 Thu Feb 25 10:24:31 1993
--- src/options.c Mon Feb 22 11:02:49 1993
***************
*** 1,4 ****
! /* SCCS Id: @(#)options.c 3.1 92/11/14 */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
--- 1,4 ----
! /* SCCS Id: @(#)options.c 3.1 93/02/19 */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
***************
*** 9,15 ****
/*
* NOTE: If you add (or delete) an option, please update the short
* options help (option_help()), the long options help (dat/opthelp),
! * and the current options setting display function (doset()).
*/
#if defined(TOS) && defined(TEXTCOLOR)
--- 9,16 ----
/*
* NOTE: If you add (or delete) an option, please update the short
* options help (option_help()), the long options help (dat/opthelp),
! * and the current options setting display function (doset()),
! * and also the Guidebooks.
*/
#if defined(TOS) && defined(TEXTCOLOR)
***************
*** 20,33 ****
extern char inv_order[]; /* from invent.c */
static boolean initial, from_file;
- static boolean NEARDATA set_order;
static void FDECL(nmcpy, (char *, const char *, int));
static void FDECL(escapes, (const char *, char *));
static void FDECL(rejectoption, (const char *));
static void FDECL(badoption, (const char *));
static char *FDECL(string_for_env_opt, (const char *, char *));
! static int FDECL(change_inv_order, (char *, int));
static void FDECL(oc_to_str, (char *, char *));
static struct Bool_Opt
--- 21,34 ----
extern char inv_order[]; /* from invent.c */
static boolean initial, from_file;
static void FDECL(nmcpy, (char *, const char *, int));
static void FDECL(escapes, (const char *, char *));
static void FDECL(rejectoption, (const char *));
static void FDECL(badoption, (const char *));
+ static char *FDECL(string_for_opt, (char *));
static char *FDECL(string_for_env_opt, (const char *, char *));
! static int FDECL(change_inv_order, (char *));
static void FDECL(oc_to_str, (char *, char *));
static struct Bool_Opt
***************
*** 72,78 ****
{"legacy",&flags.legacy, TRUE},
{"lit_corridor", &flags.lit_corridor, FALSE},
#ifdef MAC_GRAPHICS_ENV
! {"MACgraphics", &flags.MACgraphics, TRUE},
#endif
#ifdef NEWS
{"news", &flags.news, TRUE},
--- 73,79 ----
{"legacy",&flags.legacy, TRUE},
{"lit_corridor", &flags.lit_corridor, FALSE},
#ifdef MAC_GRAPHICS_ENV
! {"Macgraphics", &flags.MACgraphics, TRUE},
#endif
#ifdef NEWS
{"news", &flags.news, TRUE},
***************
*** 79,84 ****
--- 80,88 ----
#endif
{"null", &flags.null, TRUE},
{"number_pad", &flags.num_pad, FALSE},
+ #ifdef MAC
+ {"page_wait", &flags.page_wait, TRUE},
+ #endif
{"pickup", &flags.pickup, TRUE},
#ifdef MAC
{"popup_dialog", &flags.popup_dialog, FALSE},
***************
*** 87,93 ****
{"rawio", &flags.rawio, FALSE},
#endif
{"rest_on_space", &flags.rest_on_space, FALSE},
! {"safepet", &flags.safe_dog, TRUE},
#ifdef EXP_ON_BOTL
{"showexp", &flags.showexp, FALSE},
#endif
--- 91,97 ----
{"rawio", &flags.rawio, FALSE},
#endif
{"rest_on_space", &flags.rest_on_space, FALSE},
! {"safe_pet", &flags.safe_dog, TRUE},
#ifdef EXP_ON_BOTL
{"showexp", &flags.showexp, FALSE},
#endif
***************
*** 129,135 ****
monsyms[i] = (uchar) def_monsyms[i];
switch_graphics(ASCII_GRAPHICS); /* set default characters */
! #ifdef UNIX
/*
* Set defaults for some options depending on what we can
* detect about the environment's capabilities.
--- 133,139 ----
monsyms[i] = (uchar) def_monsyms[i];
switch_graphics(ASCII_GRAPHICS); /* set default characters */
! #if defined(UNIX) && defined(TTY_GRAPHICS)
/*
* Set defaults for some options depending on what we can
* detect about the environment's capabilities.
***************
*** 144,156 ****
flags.use_color = TRUE;
# endif
}
! #endif /* UNIX */
#if defined(UNIX) || defined(VMS)
/* detect whether a "vt" terminal can handle alternate charsets */
if (!strncmpi(getenv("TERM"), "vt", 2) && (AS && AE) &&
!strcmp(AS, "\016") && !strcmp(AE, "\017")) {
switch_graphics(DEC_GRAPHICS);
}
#endif /* UNIX || VMS */
#ifdef MAC_GRAPHICS_ENV
--- 148,162 ----
flags.use_color = TRUE;
# endif
}
! #endif /* UNIX && TTY_GRAPHICS */
#if defined(UNIX) || defined(VMS)
+ # ifdef TTY_GRAPHICS
/* detect whether a "vt" terminal can handle alternate charsets */
if (!strncmpi(getenv("TERM"), "vt", 2) && (AS && AE) &&
!strcmp(AS, "\016") && !strcmp(AE, "\017")) {
switch_graphics(DEC_GRAPHICS);
}
+ # endif
#endif /* UNIX || VMS */
#ifdef MAC_GRAPHICS_ENV
***************
*** 186,192 ****
/* result in the player's preferred fruit [better than "\033"]. */
obj_descr[SLIME_MOLD].oc_name = "fruit";
#endif
! if(flags.female) { /* should have been set in NETHACKOPTIONS */
roles[2] = "Cavewoman";
roles[6] = "Priestess";
}
--- 192,198 ----
/* result in the player's preferred fruit [better than "\033"]. */
obj_descr[SLIME_MOLD].oc_name = "fruit";
#endif
! if (flags.female) { /* should have been set in NETHACKOPTIONS */
roles[2] = "Cavewoman";
roles[6] = "Priestess";
}
***************
*** 292,302 ****
badoption(opts)
const char *opts;
{
! if(!initial) {
! if(!strncmp(opts, "h", 1) || !strncmp(opts, "?", 1))
option_help();
else
! pline("Unknown option: %s. Enter \"?g\" for help.", opts);
return;
}
# ifdef AMIGA
--- 298,308 ----
badoption(opts)
const char *opts;
{
! if (!initial) {
! if (!strncmp(opts, "h", 1) || !strncmp(opts, "?", 1))
option_help();
else
! pline("Bad syntax: %s. Enter \"?g\" for help.", opts);
return;
}
# ifdef AMIGA
***************
*** 313,329 ****
}
static char *
! string_for_env_opt(optname, opts)
! const char *optname;
char *opts;
{
register char *colon;
! if(!initial) {
! rejectoption(optname);
! return NULL;
! }
! colon = index(opts,':');
if(!colon) {
badoption(opts);
return NULL;
--- 319,330 ----
}
static char *
! string_for_opt(opts)
char *opts;
{
register char *colon;
! colon = index(opts, ':');
if(!colon) {
badoption(opts);
return NULL;
***************
*** 331,351 ****
return ++colon;
}
/*
* Change the inventory order, using the given string as the new order.
* Missing characters in the new order are filled in at the end from
* the current inv_order.
*
! * This routine always returns 1 unless the parameter 'fail' is true
! * and there is a duplicate or bad char in the string.
*/
static int
! change_inv_order(op, fail)
! char *op;
! int fail; /* If TRUE, return 0 if any duplicates or bad chars. */
{
int oc_sym, num;
! char *sp, *tmp, buf[BUFSZ];
for (sp = op; *sp; sp++) {
oc_sym = def_char_to_objclass(*sp);
--- 332,363 ----
return ++colon;
}
+ static char *
+ string_for_env_opt(optname, opts)
+ const char *optname;
+ char *opts;
+ {
+ if(!initial) {
+ rejectoption(optname);
+ return NULL;
+ }
+ return string_for_opt(opts);
+ }
+
/*
* Change the inventory order, using the given string as the new order.
* Missing characters in the new order are filled in at the end from
* the current inv_order.
*
! * This routine returns 1 unless there is a duplicate or bad char in
! * the string.
*/
static int
! change_inv_order(op)
! char *op;
{
int oc_sym, num;
! char *sp, buf[BUFSZ];
for (sp = op; *sp; sp++) {
oc_sym = def_char_to_objclass(*sp);
***************
*** 352,365 ****
/* Remove bad or duplicate entries. */
if (oc_sym == MAXOCLASSES ||
! (!index(inv_order, oc_sym)) || (index(sp+1, *sp))) {
! if (fail) return 0;
! for(tmp = sp; *tmp; tmp++)
! tmp[0] = tmp[1];
! sp--;
! } else
! *sp = (char) oc_sym;
}
Strcpy(buf, op);
for (sp = inv_order, num = strlen(buf); *sp; sp++)
--- 364,374 ----
/* Remove bad or duplicate entries. */
if (oc_sym == MAXOCLASSES ||
! (!index(inv_order, oc_sym)) || (index(sp+1, *sp)))
! return 0;
!
! *sp = (char) oc_sym;
}
Strcpy(buf, op);
for (sp = inv_order, num = strlen(buf); *sp; sp++)
***************
*** 393,489 ****
op = eos(opts);
while (--op >= opts && isspace(*op)) *op = '\0';
! if(!*opts) return;
negated = FALSE;
! while((*opts == '!') || !strncmpi(opts, "no", 2)) {
! if(*opts == '!') opts++; else opts += 2;
negated = !negated;
}
! #if defined(MICRO) && !defined(AMIGA)
! /* included for compatibility with old NetHack.cnf files */
! if (!strncmp(opts, "IBM_", 4)) {
! flags.BIOS = !negated;
! return;
! }
! /* put here cause it has to come from the config file */
! if (!strncmpi(opts, "raw", 3)) {
! if (initial)
! flags.rawio = !negated;
! else
! rejectoption("rawio");
! return;
! }
! #endif /* MICRO */
!
! #if defined(TOS) && defined(TEXTCOLOR)
! if (!strncmpi(opts, "col", 3)) {
! flags.use_color = !negated;
! if (flags.BIOS && !initial) {
! if (colors_changed)
! restore_colors();
! else
! set_colors();
! }
! }
! #endif
! /* other special-case boolean options */
! #ifdef TERMLIB
! if (!strncmpi(opts, "DEC", 3)) {
! #ifdef REINCARNATION
! if (!initial && Is_rogue_level(&u.uz))
! assign_rogue_graphics(FALSE);
! #endif
! flags.DECgraphics = !negated;
! need_redraw = TRUE;
! switch_graphics(flags.DECgraphics ?
! DEC_GRAPHICS : ASCII_GRAPHICS);
! #ifdef REINCARNATION
! if (!initial && Is_rogue_level(&u.uz))
! assign_rogue_graphics(TRUE);
! #endif
! return;
! }
! #endif /* TERMLIB */
! #ifdef ASCIIGRAPH
! if (!strncmpi(opts, "IBMg", 4)) {
! #ifdef REINCARNATION
! if (!initial && Is_rogue_level(&u.uz))
! assign_rogue_graphics(FALSE);
! #endif
! flags.IBMgraphics = !negated;
! need_redraw = TRUE;
! switch_graphics(flags.IBMgraphics ?
! IBM_GRAPHICS : ASCII_GRAPHICS);
! #ifdef REINCARNATION
! if (!initial && Is_rogue_level(&u.uz))
! assign_rogue_graphics(TRUE);
! #endif
! return;
! }
! #endif /* ASCIIGRAPH */
! #ifdef MAC_GRAPHICS_ENV
! if (!strncmpi(opts, "MACg", 4)) {
! #ifdef REINCARNATION
! if (!initial && Is_rogue_level(&u.uz))
! assign_rogue_graphics(FALSE);
! #endif
! flags.MACgraphics = !negated;
! need_redraw = TRUE;
! switch_graphics(flags.MACgraphics ?
! MAC_GRAPHICS : ASCII_GRAPHICS);
! #ifdef REINCARNATION
! if (!initial && Is_rogue_level(&u.uz))
! assign_rogue_graphics(TRUE);
! #endif
! return;
! }
! #endif /* MAC_GRAPHICS_ENV */
!
! /* common boolean options */
!
! if (!strncmpi(opts, "fem", 3)) {
if(!initial && flags.female == negated)
pline("That is not anatomically possible.");
else
--- 402,417 ----
op = eos(opts);
while (--op >= opts && isspace(*op)) *op = '\0';
! if (!*opts) return;
negated = FALSE;
! while ((*opts == '!') || !strncmpi(opts, "no", 2)) {
! if (*opts == '!') opts++; else opts += 2;
negated = !negated;
}
! /* special boolean options */
! if (!strncmpi(opts, "female", 3)) {
if(!initial && flags.female == negated)
pline("That is not anatomically possible.");
else
***************
*** 491,502 ****
return;
}
- if (!strncmpi(opts, "fix", 3)) {
- flags.invlet_constant = !negated;
- if (!initial && flags.invlet_constant) reassign();
- return;
- }
-
if (!strncmpi(opts, "male", 4)) {
if(!initial && flags.female != negated)
pline("That is not anatomically possible.");
--- 419,424 ----
***************
*** 505,544 ****
return;
}
! if (!strncmpi(opts, "num", 3)) {
! flags.num_pad = !negated;
! if (!initial) number_pad(flags.num_pad ? 1 : 0);
return;
}
! #ifdef EXP_ON_BOTL
! if (!strncmpi(opts, "showexp", 7)) {
! flags.showexp = !negated;
! flags.botl = 1;
! return;
! }
! #endif
! #ifdef SCORE_ON_BOTL
! if (!strncmpi(opts, "showscore", 9)) {
! flags.showscore = !negated;
! flags.botl = 1;
! return;
! }
! #endif
! if (!strncmpi(opts, "time", 4)) {
! flags.time = !negated;
! flags.botl = 1;
! return;
! }
- if (!strncmpi(opts, "legacy", 6)) {
- if(!initial) rejectoption("legacy");
- else flags.legacy = !negated;
- return;
- }
-
/* compound options */
! if (!strncmpi(opts, "pet", 3)) {
if ((op = string_for_env_opt("pettype", opts)) != 0)
switch (*op) {
case 'd': /* dog */
--- 427,443 ----
return;
}
! #if defined(MICRO) && !defined(AMIGA)
! /* included for compatibility with old NetHack.cnf files */
! if (!strncmp(opts, "IBM_", 4)) {
! flags.BIOS = !negated;
return;
}
! #endif /* MICRO */
/* compound options */
! if (!strncmpi(opts, "pettype", 3)) {
if ((op = string_for_env_opt("pettype", opts)) != 0)
switch (*op) {
case 'd': /* dog */
***************
*** 552,576 ****
preferred_pet = 'c';
break;
default:
! pline("Unrecognized pettype '%s'", op);
break;
}
return;
}
! if (!strncmpi(opts, "cat", 3)) {
if ((op = string_for_env_opt("catname", opts)) != 0)
nmcpy(catname, op, 62);
return;
}
! if (!strncmpi(opts, "dog", 3)) {
if ((op = string_for_env_opt("dogname", opts)) != 0)
nmcpy(dogname, op, 62);
return;
}
! if (!strncmpi(opts, "msg", 3)) {
if ((op = string_for_env_opt("msghistory", opts)) != 0) {
flags.msg_history = atoi(op);
}
--- 451,475 ----
preferred_pet = 'c';
break;
default:
! pline("Unrecognized pet type '%s'", op);
break;
}
return;
}
! if (!strncmpi(opts, "catname", 3)) {
if ((op = string_for_env_opt("catname", opts)) != 0)
nmcpy(catname, op, 62);
return;
}
! if (!strncmpi(opts, "dogname", 3)) {
if ((op = string_for_env_opt("dogname", opts)) != 0)
nmcpy(dogname, op, 62);
return;
}
! if (!strncmpi(opts, "msghistory", 3)) {
if ((op = string_for_env_opt("msghistory", opts)) != 0) {
flags.msg_history = atoi(op);
}
***************
*** 577,598 ****
return;
}
#ifdef TUTTI_FRUTTI
! if (!strncmpi(opts, "fr", 2)) {
! op = index(opts, ':');
! if (!op) {
! badoption(opts);
! return;
! }
! op++;
if (!initial) {
struct fruit *f;
- int numfruits = 0;
for(f=ffruit; f; f=f->nextf) {
if (!strcmp(op, f->fname)) goto goodfruit;
! numfruits++;
}
! if (numfruits >= 100) {
pline("Doing that so many times isn't very fruitful.");
return;
}
--- 476,492 ----
return;
}
#ifdef TUTTI_FRUTTI
! if (!strncmpi(opts, "fruit", 2)) {
! if (!(op = string_for_opt(opts))) return;
if (!initial) {
struct fruit *f;
+ num = 0;
for(f=ffruit; f; f=f->nextf) {
if (!strcmp(op, f->fname)) goto goodfruit;
! num++;
}
! if (num >= 100) {
pline("Doing that so many times isn't very fruitful.");
return;
}
***************
*** 612,637 ****
}
#endif
/* graphics:string */
! if (!strncmpi(opts, "gr", 2)) {
uchar translate[MAXPCHARS+1];
! int lth;
if (!(opts = string_for_env_opt("graphics", opts)))
return;
escapes(opts, opts);
! lth = strlen(opts);
! if (lth > MAXPCHARS) lth = MAXPCHARS;
/* match the form obtained from PC configuration files */
! for (i = 0; i < lth; i++)
translate[i] = (uchar) opts[i];
! assign_graphics(translate, lth);
return;
}
/* objects:string */
if (!strncmpi(opts, "objects", 7)) {
! int k, length;
if (!(opts = string_for_env_opt("objects", opts)))
return;
--- 506,531 ----
}
#endif
/* graphics:string */
! if (!strncmpi(opts, "graphics", 2)) {
uchar translate[MAXPCHARS+1];
! int length;
if (!(opts = string_for_env_opt("graphics", opts)))
return;
escapes(opts, opts);
! length = strlen(opts);
! if (length > MAXPCHARS) length = MAXPCHARS;
/* match the form obtained from PC configuration files */
! for (i = 0; i < length; i++)
translate[i] = (uchar) opts[i];
! assign_graphics(translate, length);
return;
}
/* objects:string */
if (!strncmpi(opts, "objects", 7)) {
! int length;
if (!(opts = string_for_env_opt("objects", opts)))
return;
***************
*** 650,663 ****
if (length >= MAXOCLASSES)
length = MAXOCLASSES-1; /* don't count RANDOM_OBJECT */
! for (k = 0; k < length; k++)
! oc_syms[k+1] = (uchar) opts[k];
return;
}
/* monsters:string */
if (!strncmpi(opts, "monsters", 8)) {
! int k, length;
if (!(opts = string_for_env_opt("monsters", opts)))
return;
--- 544,557 ----
if (length >= MAXOCLASSES)
length = MAXOCLASSES-1; /* don't count RANDOM_OBJECT */
! for (i = 0; i < length; i++)
! oc_syms[i+1] = (uchar) opts[i];
return;
}
/* monsters:string */
if (!strncmpi(opts, "monsters", 8)) {
! int length;
if (!(opts = string_for_env_opt("monsters", opts)))
return;
***************
*** 668,675 ****
if (length >= MAXMCLASSES)
length = MAXMCLASSES-1; /* mon class 0 unused */
! for (k = 0; k < length; k++)
! monsyms[k+1] = (uchar) opts[k];
return;
}
--- 562,569 ----
if (length >= MAXMCLASSES)
length = MAXMCLASSES-1; /* mon class 0 unused */
! for (i = 0; i < length; i++)
! monsyms[i+1] = (uchar) opts[i];
return;
}
***************
*** 681,697 ****
}
/* the order to list the pack */
! if (!strncmpi(opts, "pack", 4)) {
! op = index(opts,':');
! if(!op) {
! badoption(opts);
! return;
! }
! op++; /* skip : */
! if (!change_inv_order(op, 1))
! set_order = TRUE;
! else
badoption(opts);
return;
}
--- 575,584 ----
}
/* the order to list the pack */
! if (!strncmpi(opts, "packorder", 4)) {
! if (!(op = string_for_opt(opts))) return;
! if (!change_inv_order(op))
badoption(opts);
return;
}
***************
*** 698,710 ****
/* scores:5t[op] 5a[round] o[wn] */
if (!strncmpi(opts, "scores", 6)) {
! op = index(opts,':');
! if(!op) {
! badoption(opts);
! return;
! }
! op++;
! while(*op) {
num = 1;
if(digit(*op)) {
num = atoi(op);
--- 585,593 ----
/* scores:5t[op] 5a[round] o[wn] */
if (!strncmpi(opts, "scores", 6)) {
! if (!(op = string_for_opt(opts))) return;
!
! while (*op) {
num = 1;
if(digit(*op)) {
num = atoi(op);
***************
*** 737,743 ****
}
return;
}
! if (!strncmpi(opts, "win", 3)) {
if ((op = string_for_env_opt("windowtype", opts)) != 0) {
char buf[16];
nmcpy(buf, op, 15);
--- 620,627 ----
}
return;
}
!
! if (!strncmpi(opts, "windowtype", 3)) {
if ((op = string_for_env_opt("windowtype", opts)) != 0) {
char buf[16];
nmcpy(buf, op, 15);
***************
*** 750,765 ****
* options list
*/
for (i = 0; boolopt[i].name; i++) {
! if (boolopt[i].addr && !strncmpi(boolopt[i].name, opts, 3)) {
*(boolopt[i].addr) = !negated;
- #ifdef TEXTCOLOR
- if((boolopt[i].addr) == &flags.use_color)
- need_redraw = TRUE;
! if((boolopt[i].addr) == &flags.hilite_pet)
need_redraw = TRUE;
#endif
! if (!initial && boolopt[i].addr==&flags.lit_corridor) {
/*
* All corridor squares seen via night vision or
* candles & lamps change. Update them by calling
--- 634,714 ----
* options list
*/
for (i = 0; boolopt[i].name; i++) {
! if (boolopt[i].addr && strlen(opts) >= 3 &&
! !strncmpi(boolopt[i].name, opts, strlen(opts))) {
! /* options that must come from config file */
! if (!initial &&
! ((boolopt[i].addr) == &flags.legacy
! #if defined(MICRO) && !defined(AMIGA)
! || (boolopt[i].addr) == &flags.rawio
! #endif
! )) {
! rejectoption(boolopt[i].name);
! return;
! }
!
*(boolopt[i].addr) = !negated;
! #if defined(TERMLIB) || defined(ASCIIGRAPH) || defined(MAC_GRAPHICS_ENV)
! if (FALSE
! # ifdef TERMLIB
! || (boolopt[i].addr) == &flags.DECgraphics
! # endif
! # ifdef ASCIIGRAPH
! || (boolopt[i].addr) == &flags.IBMgraphics
! # endif
! # ifdef MAC_GRAPHICS_ENV
! || (boolopt[i].addr) == &flags.MACgraphics
! # endif
! ) {
! # ifdef REINCARNATION
! if (!initial && Is_rogue_level(&u.uz))
! assign_rogue_graphics(FALSE);
! # endif
need_redraw = TRUE;
+ # ifdef TERMLIB
+ if ((boolopt[i].addr) == &flags.DECgraphics)
+ switch_graphics(flags.DECgraphics ?
+ DEC_GRAPHICS : ASCII_GRAPHICS);
+ # endif
+ # ifdef ASCIIGRAPH
+ if ((boolopt[i].addr) == &flags.IBMgraphics)
+ switch_graphics(flags.IBMgraphics ?
+ IBM_GRAPHICS : ASCII_GRAPHICS);
+ # endif
+ # ifdef MAC_GRAPHICS_ENV
+ if ((boolopt[i].addr) == &flags.MACgraphics)
+ switch_graphics(flags.MACgraphics ?
+ MAC_GRAPHICS : ASCII_GRAPHICS);
+ # endif
+ # ifdef REINCARNATION
+ if (!initial && Is_rogue_level(&u.uz))
+ assign_rogue_graphics(TRUE);
+ # endif
+ }
+ #endif /* TERMLIB || ASCIIGRAPH || MAC_GRAPHICS_ENV */
+
+ /* only do processing below if setting with doset() */
+ if (initial) return;
+
+ if ((boolopt[i].addr) == &flags.time
+ #ifdef EXP_ON_BOTL
+ || (boolopt[i].addr) == &flags.showexp
#endif
! #ifdef SCORE_ON_BOTL
! || (boolopt[i].addr) == &flags.showscore
! #endif
! )
! flags.botl = TRUE;
!
! else if ((boolopt[i].addr) == &flags.invlet_constant) {
! if (flags.invlet_constant) reassign();
! }
!
! else if ((boolopt[i].addr) == &flags.num_pad)
! number_pad(flags.num_pad ? 1 : 0);
!
! else if ((boolopt[i].addr) == &flags.lit_corridor) {
/*
* All corridor squares seen via night vision or
* candles & lamps change. Update them by calling
***************
*** 770,775 ****
--- 719,741 ----
vision_recalc(2); /* shut down vision */
vision_full_recalc = 1; /* delayed recalc */
}
+
+ #ifdef TEXTCOLOR
+ else if ((boolopt[i].addr) == &flags.use_color
+ || (boolopt[i].addr) == &flags.hilite_pet) {
+ need_redraw = TRUE;
+ # ifdef TOS
+ if ((boolopt[i].addr) == &flags.use_color
+ && flags.BIOS) {
+ if (colors_changed)
+ restore_colors();
+ else
+ set_colors();
+ }
+ # endif
+ }
+ #endif
+
return;
}
}
***************
*** 869,875 ****
case 's':
clear_nhwindow(WIN_MESSAGE);
getlin("What options do you want to set?", buf);
- clear_nhwindow(WIN_MESSAGE);
if(buf[0] == '\033') return 0;
need_redraw = FALSE;
parseoptions(buf, FALSE, FALSE);
--- 835,840 ----
*** /tmp/da08454 Thu Feb 25 10:24:34 1993
--- src/pager.c Mon Feb 8 14:31:40 1993
***************
*** 1,4 ****
! /* SCCS Id: @(#)pager.c 3.1 92/09/01 */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
--- 1,4 ----
! /* SCCS Id: @(#)pager.c 3.1 93/02/04 */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
***************
*** 93,103 ****
(hp ? "high priest" : l_monnam(mtmp)),
u.ustuck == mtmp ?
#ifdef POLYSELF
! (u.mtimedone ? ", being held" :
#endif
! ", holding you"
#ifdef POLYSELF
! )
#endif
: "");
}
--- 93,103 ----
(hp ? "high priest" : l_monnam(mtmp)),
u.ustuck == mtmp ?
#ifdef POLYSELF
! ((u.mtimedone && sticks(uasmon)) ? ", being held" :
#endif
! ", holding you"
#ifdef POLYSELF
! )
#endif
: "");
}
***************
*** 313,319 ****
cc.y = u.uy;
} else {
getlin("Specify what? (type the word)", out_str);
! if (out_str[0] == '\033')
return 0;
if (out_str[1]) { /* user typed in a complete string */
--- 313,319 ----
cc.y = u.uy;
} else {
getlin("Specify what? (type the word)", out_str);
! if (out_str[0] == '\0' || out_str[0] == '\033')
return 0;
if (out_str[1]) { /* user typed in a complete string */
*** /tmp/da08462 Thu Feb 25 10:24:36 1993
--- src/pickup.c Wed Feb 17 09:51:58 1993
***************
*** 1,4 ****
! /* SCCS Id: @(#)pickup.c 3.1 93/01/04 */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
--- 1,4 ----
! /* SCCS Id: @(#)pickup.c 3.1 93/02/16 */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
***************
*** 138,147 ****
Sprintf(qbuf,"What kinds of thing do you want to %s? [%s]",
action, ilets);
getlin(qbuf,inbuf);
! if (*inbuf == '\033') {
! clear_nhwindow(WIN_MESSAGE);
! return FALSE;
! }
for (p = inbuf; (sym = *p++); ) {
/* new A function (selective all) added by GAN 01/09/87 */
if (sym == ' ') continue;
--- 138,145 ----
Sprintf(qbuf,"What kinds of thing do you want to %s? [%s]",
action, ilets);
getlin(qbuf,inbuf);
! if (*inbuf == '\033') return FALSE;
!
for (p = inbuf; (sym = *p++); ) {
/* new A function (selective all) added by GAN 01/09/87 */
if (sym == ' ') continue;
***************
*** 236,248 ****
}
}
- #ifdef POLYSELF
- if (nolimbs(uasmon)) {
- You("cannot pick things up without limbs.");
- return;
- }
- #endif
-
/* added by GAN 10/24/86 to allow selective picking up */
if (!all) {
if (!query_classes(olets, &selective, &all_of_a_type,
--- 234,239 ----
***************
*** 261,267 ****
if (!all_of_a_type) {
char qbuf[QBUFSZ];
! Sprintf(qbuf,"Pick up %s?", doname(obj));
switch ((obj->quan < 2L) ? ynaq(qbuf) : ynNaq(qbuf)) {
case 'q': return;
case 'n': continue;
--- 252,258 ----
if (!all_of_a_type) {
char qbuf[QBUFSZ];
! Sprintf(qbuf, "Pick up %s?", doname(obj));
switch ((obj->quan < 2L) ? ynaq(qbuf) : ynNaq(qbuf)) {
case 'q': return;
case 'n': continue;
***************
*** 276,282 ****
case '#': /* count was entered */
if (!yn_number) continue; /* 0 count => No */
else count = yn_number;
! /* fall thru :-} */
default: /* 'y' */
break;
}
--- 267,273 ----
case '#': /* count was entered */
if (!yn_number) continue; /* 0 count => No */
else count = yn_number;
! /* fall thru */
default: /* 'y' */
break;
}
***************
*** 384,390 ****
exercise(A_WIS, FALSE);
return FALSE;
}
-
} else if (obj->otyp == SCR_SCARE_MONSTER) {
if (obj->blessed) obj->blessed = 0;
else if (!obj->spe && !obj->cursed) obj->spe = 1;
--- 375,380 ----
***************
*** 454,464 ****
lift_some:
if (inv_cnt() >= 52) {
if (objx) unsplitobj(obj, objx, 0L);
- Your("knapsack cannot accommodate any more items.");
if (obj->otyp == SCR_SCARE_MONSTER) obj->spe = 0;
return TRUE;
}
pickquan = obj->quan; /* save number picked up */
obj = pick_obj(obj);
--- 444,472 ----
lift_some:
if (inv_cnt() >= 52) {
if (objx) unsplitobj(obj, objx, 0L);
if (obj->otyp == SCR_SCARE_MONSTER) obj->spe = 0;
+ Your("knapsack cannot accommodate any more items.");
return TRUE;
}
+ if (obj->otyp != LOADSTONE &&
+ (wt*2 / weight_cap()) + 1 > SLT_ENCUMBER) {
+ /* as in near_capacity() */
+ char qbuf[QBUFSZ];
+ char ch;
+
+ Sprintf(qbuf, "%s %s. Continue?", nearloadmsg, doname(obj));
+ switch (ch = ynq(qbuf)) {
+ case 'n':
+ case 'q':
+ if (objx) unsplitobj(obj, objx, 0L);
+ if (obj->otyp == SCR_SCARE_MONSTER)
+ obj->spe = 0;
+ return (ch == 'q');
+ default: break; /* 'y' */
+ }
+ }
+
pickquan = obj->quan; /* save number picked up */
obj = pick_obj(obj);
***************
*** 465,473 ****
if (!Blind) obj->dknown = 1;
if (uwep && uwep == obj) mrg_to_wielded = TRUE;
nearload = near_capacity();
! prinv(nearload > SLT_ENCUMBER ? nearloadmsg :
! nearload > UNENCUMBERED ? moderateloadmsg : NULL,
! obj, pickquan);
mrg_to_wielded = FALSE;
return FALSE;
}
--- 473,480 ----
if (!Blind) obj->dknown = 1;
if (uwep && uwep == obj) mrg_to_wielded = TRUE;
nearload = near_capacity();
! prinv(nearload > UNENCUMBERED && nearload < MOD_ENCUMBER ?
! moderateloadmsg : NULL, obj, pickquan);
mrg_to_wielded = FALSE;
return FALSE;
}
***************
*** 612,618 ****
/* A variable set in use_container(), to be used by the callback routines */
/* chk_bg(), in_container(), and out_container() from askchain(). */
! static struct obj NEARDATA *current_container;
#define Icebox (current_container->otyp == ICE_BOX)
STATIC_PTR int
--- 619,625 ----
/* A variable set in use_container(), to be used by the callback routines */
/* chk_bg(), in_container(), and out_container() from askchain(). */
! static NEARDATA struct obj *current_container;
#define Icebox (current_container->otyp == ICE_BOX)
STATIC_PTR int
***************
*** 806,811 ****
--- 813,820 ----
if(!obj->unpaid && !carried(current_container) &&
costly_spot(current_container->ox, current_container->oy)) {
+ obj->ox = current_container->ox;
+ obj->oy = current_container->oy;
addtobill(obj, FALSE, FALSE, FALSE);
}
***************
*** 826,832 ****
}
/* for getobj: allow counts, allow all types, expect food */
! static const char NEARDATA frozen_food[] =
{ ALLOW_COUNT, ALL_CLASSES, FOOD_CLASS, 0 };
int
--- 835,841 ----
}
/* for getobj: allow counts, allow all types, expect food */
! static NEARDATA const char frozen_food[] =
{ ALLOW_COUNT, ALL_CLASSES, FOOD_CLASS, 0 };
int
*** /tmp/da08478 Thu Feb 25 10:24:41 1993
--- src/polyself.c Tue Feb 23 20:56:32 1993
***************
*** 244,250 ****
if(flags.female) dochange = TRUE;
} else if (is_female(&mons[mntmp])) {
if(!flags.female) dochange = TRUE;
! } else if (!is_neuter(&mons[mntmp])) {
if(!rn2(10)) dochange = TRUE;
}
if (dochange) {
--- 244,250 ----
if(flags.female) dochange = TRUE;
} else if (is_female(&mons[mntmp])) {
if(!flags.female) dochange = TRUE;
! } else if (!is_neuter(&mons[mntmp]) && mntmp != u.ulycn) {
if(!rn2(10)) dochange = TRUE;
}
if (dochange) {
***************
*** 777,809 ****
* plus the trailing null, after pluralizing (since sometimes a
* buffer is made a fixed size and must be able to hold it)
*/
! static const char NEARDATA *humanoid_parts[] = { "arm", "eye", "face", "finger",
"fingertip", "foot", "hand", "handed", "head", "leg",
"light headed", "neck", "spine", "toe" };
#ifdef POLYSELF
! static const char NEARDATA *jelly_parts[] = { "pseudopod", "dark spot", "front",
"pseudopod extension", "pseudopod extremity",
"pseudopod root", "grasp", "grasped", "cerebral area",
"lower pseudopod", "viscous", "middle", "surface",
"pseudopod extremity" },
! NEARDATA *animal_parts[] = { "forelimb", "eye", "face", "foreclaw", "claw tip",
"rear claw", "foreclaw", "clawed", "head", "rear limb",
"light headed", "neck", "spine", "rear claw tip" },
! NEARDATA *horse_parts[] = { "forelimb", "eye", "face", "forehoof", "hoof tip",
"rear hoof", "foreclaw", "hooved", "head", "rear limb",
"light headed", "neck", "backbone", "rear hoof tip" },
! NEARDATA *sphere_parts[] = { "appendage", "optic nerve", "body", "tentacle",
"tentacle tip", "lower appendage", "tentacle", "tentacled",
"body", "lower tentacle", "rotational", "equator", "body",
"lower tentacle tip" },
! NEARDATA *fungus_parts[] = { "mycelium", "visual area", "front", "hypha",
"hypha", "root", "strand", "stranded", "cap area",
"rhizome", "sporulated", "stalk", "root", "rhizome tip" },
! NEARDATA *vortex_parts[] = { "region", "eye", "front", "minor current",
"minor current", "lower current", "swirl", "swirled",
"central core", "lower current", "addled", "center",
"currents", "edge" },
! NEARDATA *snake_parts[] = { "vestigial limb", "eye", "face", "large scale",
"large scale tip", "rear region", "scale gap", "scale gapped",
"head", "rear region", "light headed", "neck", "length",
"rear scale" };
--- 777,809 ----
* plus the trailing null, after pluralizing (since sometimes a
* buffer is made a fixed size and must be able to hold it)
*/
! static NEARDATA const char *humanoid_parts[] = { "arm", "eye", "face", "finger",
"fingertip", "foot", "hand", "handed", "head", "leg",
"light headed", "neck", "spine", "toe" };
#ifdef POLYSELF
! static NEARDATA const char *jelly_parts[] = { "pseudopod", "dark spot", "front",
"pseudopod extension", "pseudopod extremity",
"pseudopod root", "grasp", "grasped", "cerebral area",
"lower pseudopod", "viscous", "middle", "surface",
"pseudopod extremity" },
! *animal_parts[] = { "forelimb", "eye", "face", "foreclaw", "claw tip",
"rear claw", "foreclaw", "clawed", "head", "rear limb",
"light headed", "neck", "spine", "rear claw tip" },
! *horse_parts[] = { "forelimb", "eye", "face", "forehoof", "hoof tip",
"rear hoof", "foreclaw", "hooved", "head", "rear limb",
"light headed", "neck", "backbone", "rear hoof tip" },
! *sphere_parts[] = { "appendage", "optic nerve", "body", "tentacle",
"tentacle tip", "lower appendage", "tentacle", "tentacled",
"body", "lower tentacle", "rotational", "equator", "body",
"lower tentacle tip" },
! *fungus_parts[] = { "mycelium", "visual area", "front", "hypha",
"hypha", "root", "strand", "stranded", "cap area",
"rhizome", "sporulated", "stalk", "root", "rhizome tip" },
! *vortex_parts[] = { "region", "eye", "front", "minor current",
"minor current", "lower current", "swirl", "swirled",
"central core", "lower current", "addled", "center",
"currents", "edge" },
! *snake_parts[] = { "vestigial limb", "eye", "face", "large scale",
"large scale tip", "rear region", "scale gap", "scale gapped",
"head", "rear region", "light headed", "neck", "length",
"rear scale" };
*** /tmp/da08486 Thu Feb 25 10:24:43 1993
--- src/potion.c Thu Feb 11 13:27:58 1993
***************
*** 1,4 ****
! /* SCCS Id: @(#)potion.c 3.1 92/12/10 */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
--- 1,4 ----
! /* SCCS Id: @(#)potion.c 3.1 93/02/06 */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
***************
*** 8,14 ****
static void NDECL(ghost_from_bottle);
static boolean FDECL(neutralizes, (struct obj *,struct obj *));
! static int NEARDATA nothing, NEARDATA unkn;
#endif /* OVLB */
extern boolean notonhead; /* for long worms */
--- 8,14 ----
static void NDECL(ghost_from_bottle);
static boolean FDECL(neutralizes, (struct obj *,struct obj *));
! static NEARDATA int nothing, unkn;
#endif /* OVLB */
extern boolean notonhead; /* for long worms */
***************
*** 18,24 ****
#ifdef OVLB
! static const char NEARDATA beverages[] = { POTION_CLASS, 0 };
void
make_confused(xtime,talk)
--- 18,24 ----
#ifdef OVLB
! static NEARDATA const char beverages[] = { POTION_CLASS, 0 };
void
make_confused(xtime,talk)
***************
*** 310,317 ****
case POT_WATER:
if(!otmp->blessed && !otmp->cursed) {
pline("This tastes like %swater.",
! otmp->spe == -1 ? "impure " : "");
! lesshungry(rnd(otmp->spe == -1 ? 3 : 10));
break;
}
unkn++;
--- 310,317 ----
case POT_WATER:
if(!otmp->blessed && !otmp->cursed) {
pline("This tastes like %swater.",
! otmp->odiluted ? "impure " : "");
! lesshungry(rnd(otmp->odiluted ? 3 : 10));
break;
}
unkn++;
***************
*** 365,375 ****
break;
case POT_BOOZE:
unkn++;
! pline("Ooph! This tastes like %s!",
Hallucination ? "furniture polish" : "liquid fire");
if (!otmp->blessed) make_confused(HConfusion + d(3,8),FALSE);
/* the whiskey makes us feel better */
! if(u.uhp < u.uhpmax) losehp(-1, "", 0); /* can't kill you */
lesshungry(10 * (2 + bcsign(otmp)));
exercise(A_WIS, FALSE);
if(otmp->cursed) {
--- 365,377 ----
break;
case POT_BOOZE:
unkn++;
! pline("Ooph! This tastes like %s%s!",
! otmp->odiluted ? "watered down " : "",
Hallucination ? "furniture polish" : "liquid fire");
if (!otmp->blessed) make_confused(HConfusion + d(3,8),FALSE);
/* the whiskey makes us feel better */
! if (u.uhp < u.uhpmax && !otmp->odiluted)
! losehp(-1, "", 0); /* can't kill you */
lesshungry(10 * (2 + bcsign(otmp)));
exercise(A_WIS, FALSE);
if(otmp->cursed) {
***************
*** 429,442 ****
else pline (Hallucination ?
#ifdef TUTTI_FRUTTI
"This tastes like 10%% real %s juice all-natural beverage." :
! "This tastes like %s juice.", pl_fruit
#else
"This tastes like 10%% real fruit juice all-natural beverage." :
! "This tastes like fruit juice."
#endif
);
if (otmp->otyp == POT_FRUIT_JUICE) {
! lesshungry(10 * (2 + bcsign(otmp)));
break;
}
if (!otmp->cursed) {
--- 431,446 ----
else pline (Hallucination ?
#ifdef TUTTI_FRUTTI
"This tastes like 10%% real %s juice all-natural beverage." :
! "This tastes like %s%s juice.",
! otmp->odiluted ? "reconstituted " : "", pl_fruit
#else
"This tastes like 10%% real fruit juice all-natural beverage." :
! "This tastes like %sfruit juice.",
! otmp->odiluted ? "reconstituted " : ""
#endif
);
if (otmp->otyp == POT_FRUIT_JUICE) {
! lesshungry((otmp->odiluted ? 5 : 10) * (2 + bcsign(otmp)));
break;
}
if (!otmp->cursed) {
***************
*** 985,995 ****
case POTION_CLASS:
if (obj->otyp == POT_WATER) return FALSE;
Your("%s.", aobjnam(obj,"dilute"));
! if (obj->spe == -1) {
! obj->spe = 0;
obj->blessed = obj->cursed = FALSE;
obj->otyp = POT_WATER;
! } else obj->spe--;
return TRUE;
case SCROLL_CLASS:
if (obj->otyp != SCR_BLANK_PAPER
--- 989,999 ----
case POTION_CLASS:
if (obj->otyp == POT_WATER) return FALSE;
Your("%s.", aobjnam(obj,"dilute"));
! if (obj->odiluted) {
! obj->odiluted = 0;
obj->blessed = obj->cursed = FALSE;
obj->otyp = POT_WATER;
! } else obj->odiluted++;
return TRUE;
case SCROLL_CLASS:
if (obj->otyp != SCR_BLANK_PAPER
***************
*** 1139,1145 ****
if (Blind) obj->dknown = 0;
switch (neutralizes(obj, potion) ||
! obj->spe == -1 /* diluted */ ? 1 : rnd(8)) {
case 1:
obj->otyp = POT_WATER;
obj->blessed = obj->cursed = 0;
--- 1143,1149 ----
if (Blind) obj->dknown = 0;
switch (neutralizes(obj, potion) ||
! obj->odiluted ? 1 : rnd(8)) {
case 1:
obj->otyp = POT_WATER;
obj->blessed = obj->cursed = 0;
***************
*** 1165,1175 ****
}
if (obj->otyp == POT_WATER) {
! obj->spe = 0; /* in case it was diluted before */
pline("The mixture bubbles violently%s.",
Blind ? "" : ", then clears");
} else {
! obj->spe--; /* diluted */
if (!Blind) {
pline("The mixture looks %s.",
OBJ_DESCR(objects[obj->otyp]));
--- 1169,1179 ----
}
if (obj->otyp == POT_WATER) {
! obj->odiluted = 0; /* in case it was diluted before */
pline("The mixture bubbles violently%s.",
Blind ? "" : ", then clears");
} else {
! obj->odiluted++;
if (!Blind) {
pline("The mixture looks %s.",
OBJ_DESCR(objects[obj->otyp]));
***************
*** 1208,1214 ****
potion->otyp = POT_WATER;
potion->blessed = 0;
potion->cursed = 0;
! potion->spe = 0;
return(1);
}
--- 1212,1218 ----
potion->otyp = POT_WATER;
potion->blessed = 0;
potion->cursed = 0;
! potion->odiluted = 0;
return(1);
}
*** /tmp/da08494 Thu Feb 25 10:24:46 1993
--- src/pray.c Tue Feb 23 16:07:40 1993
***************
*** 524,530 ****
case 0: break;
case 1:
if (uwep && (welded(uwep) || uwep->oclass == WEAPON_CLASS ||
! uwep->otyp == PICK_AXE) && (!uwep->blessed)) {
if (uwep->cursed) {
uwep->cursed = FALSE;
uwep->bknown = TRUE;
--- 524,531 ----
case 0: break;
case 1:
if (uwep && (welded(uwep) || uwep->oclass == WEAPON_CLASS ||
! uwep->otyp == PICK_AXE || uwep->otyp == UNICORN_HORN)
! && (!uwep->blessed)) {
if (uwep->cursed) {
uwep->cursed = FALSE;
uwep->bknown = TRUE;
***************
*** 533,539 ****
Hallucination ? hcolor() : amber);
else You("feel the power of %s over your %s.",
u_gname(), xname(uwep));
! } else if(uwep->otyp < BOW) {
uwep->blessed = uwep->bknown = TRUE;
if (!Blind)
Your("%s with %s aura.",
--- 534,540 ----
Hallucination ? hcolor() : amber);
else You("feel the power of %s over your %s.",
u_gname(), xname(uwep));
! } else if(uwep->otyp < BOW || uwep->otyp > CROSSBOW) {
uwep->blessed = uwep->bknown = TRUE;
if (!Blind)
Your("%s with %s aura.",
***************
*** 696,702 ****
break;
}
/* enhance weapon regardless of alignment or artifact status */
! if (obj && (obj->oclass == WEAPON_CLASS)) {
bless(obj);
obj->oeroded = 0;
obj->oerodeproof = TRUE;
--- 697,703 ----
break;
}
/* enhance weapon regardless of alignment or artifact status */
! if (obj && obj->oclass == WEAPON_CLASS) {
bless(obj);
obj->oeroded = 0;
obj->oerodeproof = TRUE;
***************
*** 788,794 ****
angrygods(g_align);
}
! static const char NEARDATA sacrifice_types[] = { FOOD_CLASS, AMULET_CLASS, 0 };
static void
consume_offering(otmp)
--- 789,795 ----
angrygods(g_align);
}
! static NEARDATA const char sacrifice_types[] = { FOOD_CLASS, AMULET_CLASS, 0 };
static void
consume_offering(otmp)
***************
*** 866,872 ****
exercise(A_WIS, FALSE);
}
! if (altaralign != A_CHAOTIC) {
/* curse the lawful/neutral altar */
pline("The altar is stained with %sn blood.",
(pl_character[0]=='E') ? "elve" : "huma");
--- 867,873 ----
exercise(A_WIS, FALSE);
}
! if (altaralign != A_CHAOTIC && altaralign != A_NONE) {
/* curse the lawful/neutral altar */
pline("The altar is stained with %sn blood.",
(pl_character[0]=='E') ? "elve" : "huma");
***************
*** 874,881 ****
angry_priest();
} else {
register struct monst *dmon;
! /* Human sacrifice on a chaotic altar is equivalent */
! /* to demon summoning */
if(u.ualign.type != A_CHAOTIC) {
pline("The blood floods the altar, which vanishes in %s cloud!",
an(Hallucination ? hcolor() : Black));
--- 875,882 ----
angry_priest();
} else {
register struct monst *dmon;
! /* Human sacrifice on a chaotic or unaligned altar */
! /* is equivalent to demon summoning */
if(u.ualign.type != A_CHAOTIC) {
pline("The blood floods the altar, which vanishes in %s cloud!",
an(Hallucination ? hcolor() : Black));
***************
*** 886,894 ****
pline("The blood covers the altar!");
change_luck(2);
}
! if ((dmon = makemon(&mons[dlord()], u.ux, u.uy)) != 0) {
You("have summoned %s!", a_monnam(dmon));
! if (u.ualign.type == A_CHAOTIC)
dmon->mpeaceful = TRUE;
You("are terrified, and unable to move.");
nomul(-3);
--- 887,895 ----
pline("The blood covers the altar!");
change_luck(2);
}
! if ((dmon = makemon(&mons[dlord(altaralign)], u.ux, u.uy))) {
You("have summoned %s!", a_monnam(dmon));
! if (sgn(u.ualign.type) == sgn(dmon->data->maligntyp))
dmon->mpeaceful = TRUE;
You("are terrified, and unable to move.");
nomul(-3);
***************
*** 1279,1285 ****
doturn()
{ /* Knights & Priest(esse)s only please */
! register struct monst *mtmp;
register int xlev = 6;
if((pl_character[0] != 'P') &&
--- 1280,1286 ----
doturn()
{ /* Knights & Priest(esse)s only please */
! register struct monst *mtmp, *mtmp2;
register int xlev = 6;
if((pl_character[0] != 'P') &&
***************
*** 1319,1325 ****
}
pline("Calling upon %s, you chant an arcane formula.", u_gname());
exercise(A_WIS, TRUE);
! for(mtmp = fmon; mtmp; mtmp = mtmp->nmon)
if(cansee(mtmp->mx,mtmp->my)) {
if(!mtmp->mpeaceful && (is_undead(mtmp->data) ||
(is_demon(mtmp->data) && (u.ulevel > (MAXULEV/2))))) {
--- 1320,1327 ----
}
pline("Calling upon %s, you chant an arcane formula.", u_gname());
exercise(A_WIS, TRUE);
! for(mtmp = fmon; mtmp; mtmp = mtmp2) {
! mtmp2 = mtmp->nmon;
if(cansee(mtmp->mx,mtmp->my)) {
if(!mtmp->mpeaceful && (is_undead(mtmp->data) ||
(is_demon(mtmp->data) && (u.ulevel > (MAXULEV/2))))) {
***************
*** 1328,1334 ****
pline("Unfortunately, your voice falters.");
mtmp->mflee = mtmp->mfrozen = mtmp->msleep = FALSE;
mtmp->mcanmove = TRUE;
! } else if (! resist(mtmp, '\0', 0, TELL))
switch (mtmp->data->mlet) {
/* this is intentional, lichs are tougher
than zombies. */
--- 1330,1336 ----
pline("Unfortunately, your voice falters.");
mtmp->mflee = mtmp->mfrozen = mtmp->msleep = FALSE;
mtmp->mcanmove = TRUE;
! } else if (! resist(mtmp, '\0', 0, TELL)) {
switch (mtmp->data->mlet) {
/* this is intentional, lichs are tougher
than zombies. */
***************
*** 1352,1359 ****
default: mtmp->mflee = TRUE;
break;
}
! }
}
nomul(-5);
return(1);
}
--- 1354,1363 ----
default: mtmp->mflee = TRUE;
break;
}
! }
! }
}
+ }
nomul(-5);
return(1);
}