Merge branch 'NetHack-3.6.2'
This commit is contained in:
+2
-2
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 apply.c $NHDT-Date: 1526769961 2018/05/19 22:46:01 $ $NHDT-Branch: NetHack-3.6.2 $:$NHDT-Revision: 1.246 $ */
|
||||
/* NetHack 3.6 apply.c $NHDT-Date: 1542765339 2018/11/21 01:55:39 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.254 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/*-Copyright (c) Robert Patrick Rankin, 2012. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -116,7 +116,7 @@ struct obj *obj;
|
||||
if (!ublindf) {
|
||||
old = u.ucreamed;
|
||||
u.ucreamed += rn1(10, 3);
|
||||
pline("Yecch! Your %s %s gunk on it!", body_part(FACE),
|
||||
pline("Yecch! Your %s %s gunk on it!", body_part(FACE),
|
||||
(old ? "has more" : "now has"));
|
||||
make_blinded(Blinded + (long) u.ucreamed - old, TRUE);
|
||||
} else {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 cmd.c $NHDT-Date: 1541902950 2018/11/11 02:22:30 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.301 $ */
|
||||
/* NetHack 3.6 cmd.c $NHDT-Date: 1542673290 2018/11/20 00:21:30 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.302 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/*-Copyright (c) Robert Patrick Rankin, 2013. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -533,7 +533,7 @@ doextlist(VOID_ARGS)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef TTY_GRAPHICS
|
||||
#if defined(TTY_GRAPHICS) || defined(CURSES_GRAPHICS)
|
||||
#define MAX_EXT_CMD 200 /* Change if we ever have more ext cmds */
|
||||
|
||||
/*
|
||||
@@ -901,7 +901,7 @@ STATIC_PTR int
|
||||
wiz_level_change(VOID_ARGS)
|
||||
{
|
||||
char buf[BUFSZ] = DUMMY;
|
||||
int newlevel;
|
||||
int newlevel = 0;
|
||||
int ret;
|
||||
|
||||
getlin("To what experience level do you want to be set?", buf);
|
||||
@@ -3820,6 +3820,7 @@ long *total_size;
|
||||
int idx;
|
||||
struct trap *tt;
|
||||
struct damage *sd; /* shop damage */
|
||||
struct kinfo *k; /* delayed killer */
|
||||
struct cemetery *bi; /* bones info */
|
||||
|
||||
/* traps and engravings are output unconditionally;
|
||||
@@ -3884,6 +3885,20 @@ long *total_size;
|
||||
putstr(win, 0, buf);
|
||||
}
|
||||
|
||||
count = size = 0L;
|
||||
for (k = killer.next; k; k = k->next) {
|
||||
++count;
|
||||
size += (long) sizeof *k;
|
||||
}
|
||||
if (count || size) {
|
||||
*total_count += count;
|
||||
*total_size += size;
|
||||
Sprintf(hdrbuf, "delayed killer%s, size %ld",
|
||||
plur(count), (long) sizeof (struct kinfo));
|
||||
Sprintf(buf, template, hdrbuf, count, size);
|
||||
putstr(win, 0, buf);
|
||||
}
|
||||
|
||||
count = size = 0L;
|
||||
for (bi = level.bonesinfo; bi; bi = bi->next) {
|
||||
++count;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 dig.c $NHDT-Date: 1517913682 2018/02/06 10:41:22 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.108 $ */
|
||||
/* NetHack 3.6 dig.c $NHDT-Date: 1542765354 2018/11/21 01:55:54 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.115 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/*-Copyright (c) Michael Allison, 2012. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -811,7 +811,7 @@ coord *cc;
|
||||
* digging makes a hole, but the boulder immediately
|
||||
* fills it. Final outcome: no hole, no boulder.
|
||||
*/
|
||||
pline("KADOOM! The boulder falls in!");
|
||||
pline("KADOOM! The boulder falls in!");
|
||||
(void) delfloortrap(ttmp);
|
||||
}
|
||||
delobj(boulder_here);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 do.c $NHDT-Date: 1472809073 2016/09/02 09:37:53 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.158 $ */
|
||||
/* NetHack 3.6 do.c $NHDT-Date: 1542765356 2018/11/21 01:55:56 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.174 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/*-Copyright (c) Derek S. Ray, 2015. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -1063,7 +1063,7 @@ doup()
|
||||
if (ledger_no(&u.uz) == 1) {
|
||||
if (iflags.debug_fuzzer)
|
||||
return 0;
|
||||
if (yn("Beware, there will be no return! Still climb?") != 'y')
|
||||
if (yn("Beware, there will be no return! Still climb?") != 'y')
|
||||
return 0;
|
||||
}
|
||||
if (!next_to_u()) {
|
||||
@@ -1457,7 +1457,7 @@ boolean at_stairs, falling, portal;
|
||||
with the situation, so only say something when debugging */
|
||||
if (wizard)
|
||||
pline("(monster in hero's way)");
|
||||
if (!rloc(mtmp, TRUE))
|
||||
if (!rloc(mtmp, TRUE) || m_at(u.ux, u.uy))
|
||||
/* no room to move it; send it away, to return later */
|
||||
migrate_to_level(mtmp, ledger_no(&u.uz), MIGR_RANDOM,
|
||||
(coord *) 0);
|
||||
|
||||
@@ -7,6 +7,11 @@
|
||||
|
||||
STATIC_DCL int NDECL(pet_type);
|
||||
|
||||
/* cloned from mon.c; used here if mon_arrive() can't place mon */
|
||||
#define LEVEL_SPECIFIC_NOCORPSE(mdat) \
|
||||
(Is_rogue_level(&u.uz) \
|
||||
|| (level.flags.graveyard && is_undead(mdat) && rn2(3)))
|
||||
|
||||
void
|
||||
newedog(mtmp)
|
||||
struct monst *mtmp;
|
||||
@@ -79,6 +84,7 @@ boolean quietly;
|
||||
do {
|
||||
if (otmp) { /* figurine; otherwise spell */
|
||||
int mndx = otmp->corpsenm;
|
||||
|
||||
pm = &mons[mndx];
|
||||
/* activating a figurine provides one way to exceed the
|
||||
maximum number of the target critter created--unless
|
||||
@@ -294,6 +300,7 @@ struct monst *mtmp;
|
||||
boolean with_you;
|
||||
{
|
||||
struct trap *t;
|
||||
struct obj *obj;
|
||||
xchar xlocale, ylocale, xyloc, xyflags, wander;
|
||||
int num_segs;
|
||||
|
||||
@@ -417,8 +424,10 @@ boolean with_you;
|
||||
/* monster moved a bit; pick a nearby location */
|
||||
/* mnearto() deals w/stone, et al */
|
||||
char *r = in_rooms(xlocale, ylocale, 0);
|
||||
|
||||
if (r && *r) {
|
||||
coord c;
|
||||
|
||||
/* somexy() handles irregular rooms */
|
||||
if (somexy(&rooms[*r - ROOMOFFSET], &c))
|
||||
xlocale = c.x, ylocale = c.y;
|
||||
@@ -426,6 +435,7 @@ boolean with_you;
|
||||
xlocale = ylocale = 0;
|
||||
} else { /* not in a room */
|
||||
int i, j;
|
||||
|
||||
i = max(1, xlocale - wander);
|
||||
j = min(COLNO - 1, xlocale + wander);
|
||||
xlocale = rn1(j - i, i);
|
||||
@@ -446,8 +456,11 @@ boolean with_you;
|
||||
* Failed to place migrating monster,
|
||||
* probably because the level is full.
|
||||
* Dump the monster's cargo and leave the monster dead.
|
||||
*
|
||||
* TODO? Put back on migrating_mons list instead so
|
||||
* that if hero leaves this level and then returns,
|
||||
* monster will have another chance to arrive.
|
||||
*/
|
||||
struct obj *obj;
|
||||
fail_mon_placement:
|
||||
while ((obj = mtmp->minvent) != 0) {
|
||||
obj_extract_self(obj);
|
||||
@@ -462,8 +475,16 @@ fail_mon_placement:
|
||||
impossible("Can't find relocated object.");
|
||||
}
|
||||
}
|
||||
(void) mkcorpstat(CORPSE, (struct monst *) 0, mtmp->data, xlocale,
|
||||
ylocale, CORPSTAT_NONE);
|
||||
/*
|
||||
* TODO? Maybe switch to make_corpse() [won't be needed if
|
||||
* we re-migrate as suggested above], probably with new
|
||||
* CORPSTAT_NOOBJS flag to suppress dragon scales and such.
|
||||
*/
|
||||
if (!(mvitals[monsndx(mtmp->data)].mvflags & G_NOCORPSE)
|
||||
&& !LEVEL_SPECIFIC_NOCORPSE(mtmp->data))
|
||||
(void) mkcorpstat(CORPSE, mtmp, mtmp->data,
|
||||
xlocale, ylocale, CORPSTAT_NONE);
|
||||
mtmp->mx = mtmp->my = -1; /* for mongone, mon is not anywhere */
|
||||
mongone(mtmp);
|
||||
}
|
||||
}
|
||||
@@ -650,6 +671,7 @@ boolean pets_only; /* true for ascension or final escape */
|
||||
cnt = count_wsegs(mtmp);
|
||||
num_segs = min(cnt, MAX_NUM_WORMS - 1);
|
||||
wormgone(mtmp);
|
||||
place_monster(mtmp, mtmp->mx, mtmp->my);
|
||||
} else
|
||||
num_segs = 0;
|
||||
|
||||
@@ -700,6 +722,7 @@ coord *cc; /* optional destination coordinates */
|
||||
cnt = count_wsegs(mtmp);
|
||||
num_segs = min(cnt, MAX_NUM_WORMS - 1);
|
||||
wormgone(mtmp);
|
||||
place_monster(mtmp, mtmp->mx, mtmp->my);
|
||||
}
|
||||
|
||||
/* set minvent's obj->no_charge to 0 */
|
||||
|
||||
+12
-3
@@ -264,6 +264,10 @@ void NDECL((*ibmgraphics_mode_callback)) = 0; /* set in tty_start_screen() */
|
||||
void NDECL((*ascgraphics_mode_callback)) = 0; /* set in tty_start_screen() */
|
||||
#endif
|
||||
|
||||
#ifdef CURSES_GRAPHICS
|
||||
void NDECL((*cursesgraphics_mode_callback)) = 0;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Convert the given character to an object class. If the character is not
|
||||
* recognized, then MAXOCLASSES is returned. Used in detect.c, invent.c,
|
||||
@@ -495,6 +499,10 @@ int nondefault;
|
||||
if (SYMHANDLING(H_DEC) && decgraphics_mode_callback)
|
||||
(*decgraphics_mode_callback)();
|
||||
#endif
|
||||
# ifdef CURSES_GRAPHICS
|
||||
if (SYMHANDLING(H_CURS) && cursesgraphics_mode_callback)
|
||||
(*cursesgraphics_mode_callback)();
|
||||
# endif
|
||||
} else
|
||||
init_symbols();
|
||||
}
|
||||
@@ -544,9 +552,10 @@ boolean name_too;
|
||||
* to this array at the matching offset.
|
||||
*/
|
||||
const char *known_handling[] = {
|
||||
"UNKNOWN", /* H_UNK */
|
||||
"IBM", /* H_IBM */
|
||||
"DEC", /* H_DEC */
|
||||
"UNKNOWN", /* H_UNK */
|
||||
"IBM", /* H_IBM */
|
||||
"DEC", /* H_DEC */
|
||||
"CURS", /* H_CURS */
|
||||
(const char *) 0,
|
||||
};
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 eat.c $NHDT-Date: 1540596900 2018/10/26 23:35:00 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.193 $ */
|
||||
/* NetHack 3.6 eat.c $NHDT-Date: 1542765357 2018/11/21 01:55:57 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.197 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/*-Copyright (c) Robert Patrick Rankin, 2012. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -1085,7 +1085,7 @@ int pm;
|
||||
case PM_MASTER_MIND_FLAYER:
|
||||
if (ABASE(A_INT) < ATTRMAX(A_INT)) {
|
||||
if (!rn2(2)) {
|
||||
pline("Yum! That was real brain food!");
|
||||
pline("Yum! That was real brain food!");
|
||||
(void) adjattrib(A_INT, 1, FALSE);
|
||||
break; /* don't give them telepathy, too */
|
||||
}
|
||||
@@ -1802,7 +1802,7 @@ struct obj *otmp;
|
||||
if (carnivorous(youmonst.data) && !humanoid(youmonst.data))
|
||||
pline("That tripe ration was surprisingly good!");
|
||||
else if (maybe_polyd(is_orc(youmonst.data), Race_if(PM_ORC)))
|
||||
pline(Hallucination ? "Tastes great! Less filling!"
|
||||
pline(Hallucination ? "Tastes great! Less filling!"
|
||||
: "Mmm, tripe... not bad!");
|
||||
else {
|
||||
pline("Yak - dog food!");
|
||||
@@ -2336,7 +2336,7 @@ struct obj *otmp;
|
||||
*/
|
||||
if (cadaver && mnum != PM_ACID_BLOB && rotted > 5L && !Sick_resistance) {
|
||||
/* Tainted meat */
|
||||
Sprintf(buf, "%s like %s could be tainted! %s", foodsmell, it_or_they,
|
||||
Sprintf(buf, "%s like %s could be tainted! %s", foodsmell, it_or_they,
|
||||
eat_it_anyway);
|
||||
if (yn_function(buf, ynchars, 'n') == 'n')
|
||||
return 1;
|
||||
@@ -2344,7 +2344,7 @@ struct obj *otmp;
|
||||
return 2;
|
||||
}
|
||||
if (stoneorslime) {
|
||||
Sprintf(buf, "%s like %s could be something very dangerous! %s",
|
||||
Sprintf(buf, "%s like %s could be something very dangerous! %s",
|
||||
foodsmell, it_or_they, eat_it_anyway);
|
||||
if (yn_function(buf, ynchars, 'n') == 'n')
|
||||
return 1;
|
||||
@@ -2353,7 +2353,7 @@ struct obj *otmp;
|
||||
}
|
||||
if (otmp->orotten || (cadaver && rotted > 3L)) {
|
||||
/* Rotten */
|
||||
Sprintf(buf, "%s like %s could be rotten! %s", foodsmell, it_or_they,
|
||||
Sprintf(buf, "%s like %s could be rotten! %s", foodsmell, it_or_they,
|
||||
eat_it_anyway);
|
||||
if (yn_function(buf, ynchars, 'n') == 'n')
|
||||
return 1;
|
||||
@@ -2362,7 +2362,7 @@ struct obj *otmp;
|
||||
}
|
||||
if (cadaver && poisonous(&mons[mnum]) && !Poison_resistance) {
|
||||
/* poisonous */
|
||||
Sprintf(buf, "%s like %s might be poisonous! %s", foodsmell,
|
||||
Sprintf(buf, "%s like %s might be poisonous! %s", foodsmell,
|
||||
it_or_they, eat_it_anyway);
|
||||
if (yn_function(buf, ynchars, 'n') == 'n')
|
||||
return 1;
|
||||
@@ -2371,20 +2371,20 @@ struct obj *otmp;
|
||||
}
|
||||
if (otmp->otyp == APPLE && otmp->cursed && !Sleep_resistance) {
|
||||
/* causes sleep, for long enough to be dangerous */
|
||||
Sprintf(buf, "%s like %s might have been poisoned. %s", foodsmell,
|
||||
Sprintf(buf, "%s like %s might have been poisoned. %s", foodsmell,
|
||||
it_or_they, eat_it_anyway);
|
||||
return (yn_function(buf, ynchars, 'n') == 'n') ? 1 : 2;
|
||||
}
|
||||
if (cadaver && !vegetarian(&mons[mnum]) && !u.uconduct.unvegetarian
|
||||
&& Role_if(PM_MONK)) {
|
||||
Sprintf(buf, "%s unhealthy. %s", foodsmell, eat_it_anyway);
|
||||
Sprintf(buf, "%s unhealthy. %s", foodsmell, eat_it_anyway);
|
||||
if (yn_function(buf, ynchars, 'n') == 'n')
|
||||
return 1;
|
||||
else
|
||||
return 2;
|
||||
}
|
||||
if (cadaver && acidic(&mons[mnum]) && !Acid_resistance) {
|
||||
Sprintf(buf, "%s rather acidic. %s", foodsmell, eat_it_anyway);
|
||||
Sprintf(buf, "%s rather acidic. %s", foodsmell, eat_it_anyway);
|
||||
if (yn_function(buf, ynchars, 'n') == 'n')
|
||||
return 1;
|
||||
else
|
||||
@@ -2392,7 +2392,7 @@ struct obj *otmp;
|
||||
}
|
||||
if (Upolyd && u.umonnum == PM_RUST_MONSTER && is_metallic(otmp)
|
||||
&& otmp->oerodeproof) {
|
||||
Sprintf(buf, "%s disgusting to you right now. %s", foodsmell,
|
||||
Sprintf(buf, "%s disgusting to you right now. %s", foodsmell,
|
||||
eat_it_anyway);
|
||||
if (yn_function(buf, ynchars, 'n') == 'n')
|
||||
return 1;
|
||||
@@ -2407,7 +2407,7 @@ struct obj *otmp;
|
||||
&& ((material == LEATHER || material == BONE
|
||||
|| material == DRAGON_HIDE || material == WAX)
|
||||
|| (cadaver && !vegan(&mons[mnum])))) {
|
||||
Sprintf(buf, "%s foul and unfamiliar to you. %s", foodsmell,
|
||||
Sprintf(buf, "%s foul and unfamiliar to you. %s", foodsmell,
|
||||
eat_it_anyway);
|
||||
if (yn_function(buf, ynchars, 'n') == 'n')
|
||||
return 1;
|
||||
@@ -2418,7 +2418,7 @@ struct obj *otmp;
|
||||
&& ((material == LEATHER || material == BONE
|
||||
|| material == DRAGON_HIDE)
|
||||
|| (cadaver && !vegetarian(&mons[mnum])))) {
|
||||
Sprintf(buf, "%s unfamiliar to you. %s", foodsmell, eat_it_anyway);
|
||||
Sprintf(buf, "%s unfamiliar to you. %s", foodsmell, eat_it_anyway);
|
||||
if (yn_function(buf, ynchars, 'n') == 'n')
|
||||
return 1;
|
||||
else
|
||||
@@ -2427,8 +2427,8 @@ struct obj *otmp;
|
||||
|
||||
if (cadaver && mnum != PM_ACID_BLOB && rotted > 5L && Sick_resistance) {
|
||||
/* Tainted meat with Sick_resistance */
|
||||
Sprintf(buf, "%s like %s could be tainted! %s", foodsmell, it_or_they,
|
||||
eat_it_anyway);
|
||||
Sprintf(buf, "%s like %s could be tainted! %s",
|
||||
foodsmell, it_or_they, eat_it_anyway);
|
||||
if (yn_function(buf, ynchars, 'n') == 'n')
|
||||
return 1;
|
||||
else
|
||||
|
||||
@@ -861,8 +861,7 @@ int how;
|
||||
}
|
||||
/* cure impending doom of sickness hero won't have time to fix */
|
||||
if ((Sick & TIMEOUT) == 1L) {
|
||||
u.usick_type = 0;
|
||||
set_itimeout(&Sick, 0L);
|
||||
make_sick(0L, (char *) 0, FALSE, SICK_ALL);
|
||||
}
|
||||
if (how == CHOKING)
|
||||
init_uhunger();
|
||||
@@ -2051,10 +2050,11 @@ struct kinfo *kptr;
|
||||
}
|
||||
|
||||
if (k == (struct kinfo *) 0) {
|
||||
impossible("dealloc_killer not on list");
|
||||
impossible("dealloc_killer (#%d) not on list", kptr->id);
|
||||
} else {
|
||||
prev->next = k->next;
|
||||
free((genericptr_t) k);
|
||||
debugpline1("freed delayed killer #%d", kptr->id);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2067,7 +2067,7 @@ int mode;
|
||||
|
||||
if (perform_bwrite(mode)) {
|
||||
for (kptr = &killer; kptr != (struct kinfo *) 0; kptr = kptr->next) {
|
||||
bwrite(fd, (genericptr_t) kptr, sizeof(struct kinfo));
|
||||
bwrite(fd, (genericptr_t) kptr, sizeof (struct kinfo));
|
||||
}
|
||||
}
|
||||
if (release_data(mode)) {
|
||||
@@ -2086,9 +2086,9 @@ int fd;
|
||||
struct kinfo *kptr;
|
||||
|
||||
for (kptr = &killer; kptr != (struct kinfo *) 0; kptr = kptr->next) {
|
||||
mread(fd, (genericptr_t) kptr, sizeof(struct kinfo));
|
||||
mread(fd, (genericptr_t) kptr, sizeof (struct kinfo));
|
||||
if (kptr->next) {
|
||||
kptr->next = (struct kinfo *) alloc(sizeof(struct kinfo));
|
||||
kptr->next = (struct kinfo *) alloc(sizeof (struct kinfo));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+4
-4
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 files.c $NHDT-Date: 1541719971 2018/11/08 23:32:51 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.242 $ */
|
||||
/* NetHack 3.6 files.c $NHDT-Date: 1542765358 2018/11/21 01:55:58 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.243 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/*-Copyright (c) Derek S. Ray, 2015. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -1692,7 +1692,7 @@ int retryct;
|
||||
#ifdef USE_FCNTL
|
||||
lockfd = open(filename, O_RDWR);
|
||||
if (lockfd == -1) {
|
||||
HUP raw_printf("Cannot open file %s. Is NetHack installed correctly?",
|
||||
HUP raw_printf("Cannot open file %s. Is NetHack installed correctly?",
|
||||
filename);
|
||||
nesting--;
|
||||
return FALSE;
|
||||
@@ -1717,8 +1717,8 @@ int retryct;
|
||||
#ifdef USE_FCNTL
|
||||
if (retryct--) {
|
||||
HUP raw_printf(
|
||||
"Waiting for release of fcntl lock on %s. (%d retries left).",
|
||||
filename, retryct);
|
||||
"Waiting for release of fcntl lock on %s. (%d retries left.)",
|
||||
filename, retryct);
|
||||
sleep(1);
|
||||
} else {
|
||||
HUP(void) raw_print("I give up. Sorry.");
|
||||
|
||||
+1
-1
@@ -1380,7 +1380,7 @@ getobj(let, word)
|
||||
register const char *let, *word;
|
||||
{
|
||||
register struct obj *otmp;
|
||||
register char ilet;
|
||||
register char ilet = 0;
|
||||
char buf[BUFSZ], qbuf[QBUFSZ];
|
||||
char lets[BUFSZ], altlets[BUFSZ], *ap;
|
||||
register int foo = 0;
|
||||
|
||||
+10
-5
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 mail.c $NHDT-Date: 1519070343 2018/02/19 19:59:03 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.31 $ */
|
||||
/* NetHack 3.6 mail.c $NHDT-Date: 1542765359 2018/11/21 01:55:59 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.37 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/*-Copyright (c) Pasi Kallinen, 2018. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -336,19 +336,21 @@ register int tx, ty; /* destination of mail daemon */
|
||||
else if (fx == u.ux && fy == u.uy)
|
||||
verbalize("Excuse me.");
|
||||
|
||||
if (mon)
|
||||
remove_monster(fx, fy);
|
||||
place_monster(md, fx, fy); /* put md down */
|
||||
newsym(fx, fy); /* see it */
|
||||
flush_screen(0); /* make sure md shows up */
|
||||
delay_output(); /* wait a little bit */
|
||||
|
||||
/* Remove md from the dungeon. Restore original mon, if necessary. */
|
||||
remove_monster(fx, fy);
|
||||
if (mon) {
|
||||
if ((mon->mx != fx) || (mon->my != fy))
|
||||
place_worm_seg(mon, fx, fy);
|
||||
else
|
||||
place_monster(mon, fx, fy);
|
||||
} else
|
||||
remove_monster(fx, fy);
|
||||
}
|
||||
newsym(fx, fy);
|
||||
}
|
||||
|
||||
@@ -357,9 +359,11 @@ register int tx, ty; /* destination of mail daemon */
|
||||
* very unlikely). If one exists, then have the md leave in disgust.
|
||||
*/
|
||||
if ((mon = m_at(fx, fy)) != 0) {
|
||||
remove_monster(fx, fy);
|
||||
place_monster(md, fx, fy); /* display md with text below */
|
||||
newsym(fx, fy);
|
||||
verbalize("This place's too crowded. I'm outta here.");
|
||||
remove_monster(fx, fy);
|
||||
|
||||
if ((mon->mx != fx) || (mon->my != fy)) /* put mon back */
|
||||
place_worm_seg(mon, fx, fy);
|
||||
@@ -418,7 +422,8 @@ struct mail_info *info;
|
||||
|
||||
/* zip back to starting location */
|
||||
go_back:
|
||||
(void) md_rush(md, start.x, start.y);
|
||||
if (!md_rush(md, start.x, start.y))
|
||||
md->mx = md->my = -1; /* for mongone, md is not on map */
|
||||
mongone(md);
|
||||
/* deliver some classes of messages even if no daemon ever shows up */
|
||||
give_up:
|
||||
@@ -463,7 +468,7 @@ struct obj *otmp UNUSED;
|
||||
"Please find enclosed a small token to represent your Owlbear",
|
||||
"**FR33 P0T10N 0F FULL H34L1NG**",
|
||||
"Please return to sender (Asmodeus)",
|
||||
"Buy a potion of gain level for only $19.99! Guaranteed to be blessed!",
|
||||
"Buy a potion of gain level for only $19.99! Guaranteed to be blessed!",
|
||||
"Invitation: Visit the NetHack web site at http://www.nethack.org!"
|
||||
};
|
||||
|
||||
|
||||
@@ -723,6 +723,7 @@ register struct attack *mattk;
|
||||
* but don't leave it on the screen. Move the aggressor to the
|
||||
* defender's position.
|
||||
*/
|
||||
remove_monster(dx, dy);
|
||||
remove_monster(ax, ay);
|
||||
place_monster(magr, dx, dy);
|
||||
newsym(ax, ay); /* erase old position */
|
||||
|
||||
@@ -29,6 +29,7 @@ STATIC_DCL struct obj *FDECL(make_corpse, (struct monst *, unsigned));
|
||||
STATIC_DCL void FDECL(m_detach, (struct monst *, struct permonst *));
|
||||
STATIC_DCL void FDECL(lifesaved_monster, (struct monst *));
|
||||
|
||||
/* note: duplicated in dog.c */
|
||||
#define LEVEL_SPECIFIC_NOCORPSE(mdat) \
|
||||
(Is_rogue_level(&u.uz) \
|
||||
|| (level.flags.graveyard && is_undead(mdat) && rn2(3)))
|
||||
@@ -446,7 +447,8 @@ unsigned corpseflags;
|
||||
}
|
||||
/* All special cases should precede the G_NOCORPSE check */
|
||||
|
||||
if (!obj) return NULL;
|
||||
if (!obj)
|
||||
return (struct obj *) 0;
|
||||
|
||||
/* if polymorph or undead turning has killed this monster,
|
||||
prevent the same attack beam from hitting its corpse */
|
||||
@@ -1587,7 +1589,7 @@ struct monst *mtmp, *mtmp2;
|
||||
if (mtmp != u.usteed) /* don't place steed onto the map */
|
||||
place_monster(mtmp2, mtmp2->mx, mtmp2->my);
|
||||
if (mtmp2->wormno) /* update level.monsters[wseg->wx][wseg->wy] */
|
||||
place_wsegs(mtmp2); /* locations to mtmp2 not mtmp. */
|
||||
place_wsegs(mtmp2, NULL); /* locations to mtmp2 not mtmp. */
|
||||
if (emits_light(mtmp2->data)) {
|
||||
/* since this is so rare, we don't have any `mon_move_light_source' */
|
||||
new_light_source(mtmp2->mx, mtmp2->my, emits_light(mtmp2->data),
|
||||
@@ -1745,6 +1747,8 @@ m_detach(mtmp, mptr)
|
||||
struct monst *mtmp;
|
||||
struct permonst *mptr; /* reflects mtmp->data _prior_ to mtmp's death */
|
||||
{
|
||||
boolean onmap = (mtmp->mx > -1);
|
||||
|
||||
if (mtmp == context.polearm.hitmon)
|
||||
context.polearm.hitmon = 0;
|
||||
if (mtmp->mleashed)
|
||||
@@ -1753,14 +1757,21 @@ struct permonst *mptr; /* reflects mtmp->data _prior_ to mtmp's death */
|
||||
mtmp->mtrapped = 0;
|
||||
mtmp->mhp = 0; /* simplify some tests: force mhp to 0 */
|
||||
relobj(mtmp, 0, FALSE);
|
||||
remove_monster(mtmp->mx, mtmp->my);
|
||||
if (onmap) {
|
||||
if (mtmp->wormno)
|
||||
remove_worm(mtmp);
|
||||
else
|
||||
remove_monster(mtmp->mx, mtmp->my);
|
||||
}
|
||||
if (emits_light(mptr))
|
||||
del_light_source(LS_MONSTER, monst_to_any(mtmp));
|
||||
if (mtmp->m_ap_type)
|
||||
seemimic(mtmp);
|
||||
newsym(mtmp->mx, mtmp->my);
|
||||
if (onmap)
|
||||
newsym(mtmp->mx, mtmp->my);
|
||||
unstuck(mtmp);
|
||||
fill_pit(mtmp->mx, mtmp->my);
|
||||
if (onmap)
|
||||
fill_pit(mtmp->mx, mtmp->my);
|
||||
|
||||
if (mtmp->isshk)
|
||||
shkgone(mtmp);
|
||||
@@ -2577,7 +2588,7 @@ boolean move_other; /* make sure mtmp gets to x, y! so move m_at(x, y) */
|
||||
xchar newx, newy;
|
||||
coord mm;
|
||||
|
||||
if (mtmp->mx == x && mtmp->my == y)
|
||||
if (mtmp->mx == x && mtmp->my == y && m_at(x,y) == mtmp)
|
||||
return TRUE;
|
||||
|
||||
if (move_other && (othermon = m_at(x, y)) != 0) {
|
||||
@@ -3568,8 +3579,7 @@ boolean msg; /* "The oldmon turns into a newmon!" */
|
||||
#endif
|
||||
/* we can now create worms with tails - 11/91 */
|
||||
initworm(mtmp, rn2(5));
|
||||
if (count_wsegs(mtmp))
|
||||
place_worm_tail_randomly(mtmp, mtmp->mx, mtmp->my);
|
||||
place_worm_tail_randomly(mtmp, mtmp->mx, mtmp->my);
|
||||
}
|
||||
|
||||
newsym(mtmp->mx, mtmp->my);
|
||||
|
||||
+3
-3
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 mthrowu.c $NHDT-Date: 1514152830 2017/12/24 22:00:30 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.73 $ */
|
||||
/* NetHack 3.6 mthrowu.c $NHDT-Date: 1542765360 2018/11/21 01:56:00 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.78 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/*-Copyright (c) Pasi Kallinen, 2016. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -356,12 +356,12 @@ boolean verbose; /* give message(s) even when you can't see what happened */
|
||||
mtmp->msleeping = 0;
|
||||
if (vis) {
|
||||
if (otmp->otyp == EGG)
|
||||
pline("Splat! %s is hit with %s egg!", Monnam(mtmp),
|
||||
pline("Splat! %s is hit with %s egg!", Monnam(mtmp),
|
||||
otmp->known ? an(mons[otmp->corpsenm].mname) : "an");
|
||||
else
|
||||
hit(distant_name(otmp, mshot_xname), mtmp, exclam(damage));
|
||||
} else if (verbose && !target)
|
||||
pline("%s%s is hit%s", (otmp->otyp == EGG) ? "Splat! " : "",
|
||||
pline("%s%s is hit%s", (otmp->otyp == EGG) ? "Splat! " : "",
|
||||
Monnam(mtmp), exclam(damage));
|
||||
|
||||
if (otmp->opoisoned && is_poisonable(otmp)) {
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 music.c $NHDT-Date: 1517877381 2018/02/06 00:36:21 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.47 $ */
|
||||
/* NetHack 3.6 music.c $NHDT-Date: 1542765361 2018/11/21 01:56:01 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.56 $ */
|
||||
/* Copyright (c) 1989 by Jean-Christophe Collet */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -328,7 +328,7 @@ int force;
|
||||
|
||||
if ((otmp = sobj_at(BOULDER, x, y)) != 0) {
|
||||
if (cansee(x, y))
|
||||
pline("KADOOM! The boulder falls into a chasm%s!",
|
||||
pline("KADOOM! The boulder falls into a chasm%s!",
|
||||
(x == u.ux && y == u.uy) ? " below you"
|
||||
: "");
|
||||
if (mtmp)
|
||||
|
||||
+118
-2
@@ -28,6 +28,10 @@ NEARDATA struct instance_flags iflags; /* provide linkage */
|
||||
#define PREFER_TILED FALSE
|
||||
#endif
|
||||
|
||||
#ifdef CURSES_GRAPHICS
|
||||
extern int curses_read_attrs(char *attrs);
|
||||
#endif
|
||||
|
||||
enum window_option_types {
|
||||
MESSAGE_OPTION = 1,
|
||||
STATUS_OPTION,
|
||||
@@ -110,7 +114,7 @@ static struct Bool_Opt {
|
||||
{ "confirm", &flags.confirm, TRUE, SET_IN_GAME },
|
||||
{ "dark_room", &flags.dark_room, TRUE, SET_IN_GAME },
|
||||
{ "eight_bit_tty", &iflags.wc_eight_bit_input, FALSE, SET_IN_GAME }, /*WC*/
|
||||
#ifdef TTY_GRAPHICS
|
||||
#if defined(TTY_GRAPHICS) || defined(CURSES_GRAPHICS)
|
||||
{ "extmenu", &iflags.extmenu, FALSE, SET_IN_GAME },
|
||||
#else
|
||||
{ "extmenu", (boolean *) 0, FALSE, SET_IN_FILE },
|
||||
@@ -130,6 +134,7 @@ static struct Bool_Opt {
|
||||
{ "force_invmenu", &iflags.force_invmenu, FALSE, SET_IN_GAME },
|
||||
{ "fullscreen", &iflags.wc2_fullscreen, FALSE, SET_IN_FILE },
|
||||
{ "goldX", &iflags.goldX, FALSE, SET_IN_GAME },
|
||||
{ "guicolor", &iflags.wc2_guicolor, TRUE, SET_IN_GAME},
|
||||
{ "help", &flags.help, TRUE, SET_IN_GAME },
|
||||
{ "herecmd_menu", &iflags.herecmd_menu, FALSE, SET_IN_GAME },
|
||||
{ "hilite_pet", &iflags.wc_hilite_pet, FALSE, SET_IN_GAME }, /*WC*/
|
||||
@@ -161,7 +166,11 @@ static struct Bool_Opt {
|
||||
{ "menu_overlay", (boolean *) 0, FALSE, SET_IN_FILE },
|
||||
#endif
|
||||
{ "monpolycontrol", &iflags.mon_polycontrol, FALSE, SET_IN_WIZGAME },
|
||||
#ifdef CURSES_GRAPHICS
|
||||
{ "mouse_support", &iflags.wc_mouse_support, FALSE, DISP_IN_GAME }, /*WC*/
|
||||
#else
|
||||
{ "mouse_support", &iflags.wc_mouse_support, TRUE, DISP_IN_GAME }, /*WC*/
|
||||
#endif
|
||||
#ifdef NEWS
|
||||
{ "news", &iflags.news, TRUE, DISP_IN_GAME },
|
||||
#else
|
||||
@@ -326,7 +335,7 @@ static struct Comp_Opt {
|
||||
{ "monsters", "the symbols to use for monsters", MAXMCLASSES,
|
||||
SET_IN_FILE },
|
||||
{ "msghistory", "number of top line messages to save", 5, DISP_IN_GAME },
|
||||
#ifdef TTY_GRAPHICS
|
||||
#if defined(TTY_GRAPHICS) || defined(CURSES_GRAPHICS)
|
||||
{ "msg_window", "the type of message window required", 1, SET_IN_GAME },
|
||||
#else
|
||||
{ "msg_window", "the type of message window required", 1, SET_IN_FILE },
|
||||
@@ -352,6 +361,7 @@ static struct Comp_Opt {
|
||||
#endif
|
||||
{ "paranoid_confirmation", "extra prompting in certain situations", 28,
|
||||
SET_IN_GAME },
|
||||
{ "petattr", "attributes for highlighting pets", 12, SET_IN_FILE },
|
||||
{ "pettype", "your preferred initial pet type", 4, DISP_IN_GAME },
|
||||
{ "pickup_burden", "maximum burden picked up before prompt", 20,
|
||||
SET_IN_GAME },
|
||||
@@ -386,6 +396,13 @@ static struct Comp_Opt {
|
||||
20, SET_IN_GAME },
|
||||
#else
|
||||
{ "statushilites", "highlight control", 20, SET_IN_FILE },
|
||||
#endif
|
||||
#ifdef CURSES_GRAPHICS
|
||||
{ "statuslines",
|
||||
"0,1,2 = classic behavior, 3 = alternative behavior",
|
||||
20, DISP_IN_GAME },
|
||||
#else
|
||||
{ "statuslines", "# of status lines", 20, SET_IN_FILE },
|
||||
#endif
|
||||
{ "symset", "load a set of display symbols from the symbols file", 70,
|
||||
SET_IN_GAME },
|
||||
@@ -427,6 +444,9 @@ static struct Comp_Opt {
|
||||
#ifdef BACKWARD_COMPAT
|
||||
{ "DECgraphics", "load DECGraphics display symbols", 70, SET_IN_FILE },
|
||||
{ "IBMgraphics", "load IBMGraphics display symbols", 70, SET_IN_FILE },
|
||||
#ifdef CURSES_GRAPHICS
|
||||
{"cursesgraphics", "load curses display symbols", 70, SET_IN_FILE},
|
||||
#endif
|
||||
#ifdef MAC_GRAPHICS_ENV
|
||||
{ "Macgraphics", "load MACGraphics display symbols", 70, SET_IN_FILE },
|
||||
#endif
|
||||
@@ -3462,6 +3482,8 @@ boolean tinitial, tfrom_file;
|
||||
*/
|
||||
fullname = "windowtype";
|
||||
if (match_optname(opts, fullname, 3, TRUE)) {
|
||||
if (iflags.windowtype_locked)
|
||||
return retval;
|
||||
if (duplicate)
|
||||
complain_about_duplicate(opts, 1);
|
||||
if (negated) {
|
||||
@@ -3509,6 +3531,74 @@ boolean tinitial, tfrom_file;
|
||||
bad_negation(fullname, TRUE);
|
||||
return retval;
|
||||
}
|
||||
#ifdef CURSES_GRAPHICS
|
||||
/* WINCAP2
|
||||
* term_cols:amount */
|
||||
fullname = "term_cols";
|
||||
if (match_optname(opts, fullname, sizeof("term_cols")-1, TRUE)) {
|
||||
op = string_for_opt(opts, negated);
|
||||
iflags.wc2_term_cols = atoi(op);
|
||||
if (negated)
|
||||
bad_negation(fullname, FALSE);
|
||||
return retval;
|
||||
}
|
||||
|
||||
/* WINCAP2
|
||||
* term_rows:amount */
|
||||
fullname = "term_rows";
|
||||
if (match_optname(opts, fullname, sizeof("term_rows")-1, TRUE)) {
|
||||
op = string_for_opt(opts, negated);
|
||||
iflags.wc2_term_rows = atoi(op);
|
||||
if (negated)
|
||||
bad_negation(fullname, FALSE);
|
||||
return retval;
|
||||
}
|
||||
|
||||
/* WINCAP2
|
||||
* petattr:string */
|
||||
fullname = "petattr";
|
||||
if (match_optname(opts, fullname, sizeof("petattr")-1, TRUE)) {
|
||||
op = string_for_opt(opts, negated);
|
||||
if (op && !negated) {
|
||||
#ifdef CURSES_GRAPHICS
|
||||
iflags.wc2_petattr = curses_read_attrs(op);
|
||||
if (!curses_read_attrs(op))
|
||||
config_error_add("Unknown %s parameter '%s'", fullname, opts);
|
||||
return FALSE;
|
||||
#else
|
||||
/* non-curses windowports will not use this flag anyway
|
||||
* but the above will not compile if we don't have curses.
|
||||
* Just set it to a sensible default: */
|
||||
iflags.wc2_petattr = ATR_INVERSE
|
||||
#endif
|
||||
} else if (negated) bad_negation(fullname, TRUE);
|
||||
return retval;
|
||||
}
|
||||
|
||||
/* WINCAP2
|
||||
* windowborders:n */
|
||||
fullname = "windowborders";
|
||||
if (match_optname(opts, fullname, sizeof("windowborders")-1, TRUE)) {
|
||||
op = string_for_opt(opts, negated);
|
||||
if (negated && op)
|
||||
bad_negation(fullname, TRUE);
|
||||
else {
|
||||
if (negated)
|
||||
iflags.wc2_windowborders = 2; /* Off */
|
||||
else if (!op)
|
||||
iflags.wc2_windowborders = 1; /* On */
|
||||
else /* Value supplied */
|
||||
iflags.wc2_windowborders = atoi(op);
|
||||
if ((iflags.wc2_windowborders > 3)
|
||||
|| (iflags.wc2_windowborders < 1)) {
|
||||
iflags.wc2_windowborders = 0;
|
||||
config_error_add(
|
||||
"Badoption - windowborders %s.", opts);
|
||||
}
|
||||
}
|
||||
return retval;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* menustyle:traditional or combination or full or partial */
|
||||
fullname = "menustyle";
|
||||
@@ -3852,6 +3942,10 @@ boolean tinitial, tfrom_file;
|
||||
status_initialize(REASSESS_ONLY);
|
||||
need_redraw = TRUE;
|
||||
#endif
|
||||
#ifdef CURSES_GRAPHICS
|
||||
} else if ((boolopt[i].addr) == &iflags.cursesgraphics) {
|
||||
need_redraw = TRUE;
|
||||
#endif
|
||||
#ifdef TEXTCOLOR
|
||||
} else if (boolopt[i].addr == &iflags.use_color) {
|
||||
need_redraw = TRUE;
|
||||
@@ -5514,6 +5608,18 @@ char *buf;
|
||||
symset[PRIMARY].name ? symset[PRIMARY].name : "default");
|
||||
if (currentgraphics == PRIMARY && symset[PRIMARY].name)
|
||||
Strcat(buf, ", active");
|
||||
#ifdef CURSES_GRAPHICS
|
||||
} else if (!strcmp(optname, "term_cols")) {
|
||||
if (iflags.wc2_term_cols)
|
||||
Sprintf(buf, "%d", iflags.wc2_term_cols);
|
||||
else
|
||||
Strcpy(buf, defopt);
|
||||
} else if (!strcmp(optname, "term_rows")) {
|
||||
if (iflags.wc2_term_rows)
|
||||
Sprintf(buf, "%d",iflags.wc2_term_rows);
|
||||
else
|
||||
Strcpy(buf, defopt);
|
||||
#endif
|
||||
} else if (!strcmp(optname, "tile_file")) {
|
||||
Sprintf(buf, "%s",
|
||||
iflags.wc_tile_file ? iflags.wc_tile_file : defopt);
|
||||
@@ -5550,6 +5656,13 @@ char *buf;
|
||||
ttycolors[CLR_YELLOW], ttycolors[CLR_BRIGHT_BLUE],
|
||||
ttycolors[CLR_BRIGHT_MAGENTA], ttycolors[CLR_BRIGHT_CYAN]);
|
||||
#endif /* VIDEOSHADES */
|
||||
#ifdef CURSES_GRAPHICS
|
||||
} else if (!strcmp(optname,"windowborders")) {
|
||||
Sprintf(buf, "%s",
|
||||
iflags.wc2_windowborders == 1 ? "1=on" :
|
||||
iflags.wc2_windowborders == 2 ? "2=off" :
|
||||
iflags.wc2_windowborders == 3 ? "3=auto" : defopt);
|
||||
#endif
|
||||
} else if (!strcmp(optname, "windowtype")) {
|
||||
Sprintf(buf, "%s", windowprocs.name);
|
||||
} else if (!strcmp(optname, "windowcolors")) {
|
||||
@@ -6217,6 +6330,9 @@ static struct wc_Opt wc2_options[] = {
|
||||
{ "status hilite rules", WC2_HILITE_STATUS },
|
||||
/* statushilites doesn't have its own bit */
|
||||
{ "statushilites", WC2_HILITE_STATUS },
|
||||
#ifdef CURSES_GRAPHICS
|
||||
{"windowborders", WC2_WINDOWBORDERS},
|
||||
#endif
|
||||
{ (char *) 0, 0L }
|
||||
};
|
||||
|
||||
|
||||
@@ -1066,6 +1066,9 @@ coord *click_cc;
|
||||
boolean save_verbose; /* saved value of flags.verbose */
|
||||
boolean from_screen; /* question from the screen */
|
||||
|
||||
cc.x = 0;
|
||||
cc.y = 0;
|
||||
|
||||
if (!clicklook) {
|
||||
if (quick) {
|
||||
from_screen = TRUE; /* yes, we want to use the cursor */
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 region.c $NHDT-Date: 1496087244 2017/05/29 19:47:24 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.40 $ */
|
||||
/* NetHack 3.6 region.c $NHDT-Date: 1542765361 2018/11/21 01:56:01 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.42 $ */
|
||||
/* Copyright (c) 1996 by Jean-Christophe Collet */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -857,7 +857,7 @@ genericptr_t p2;
|
||||
|
||||
if (p2 == (genericptr_t) 0) { /* That means the player */
|
||||
if (!Blind)
|
||||
You("bump into %s. Ouch!",
|
||||
You("bump into %s. Ouch!",
|
||||
Hallucination ? "an invisible tree"
|
||||
: "some kind of invisible wall");
|
||||
else
|
||||
|
||||
+1
-1
@@ -1080,7 +1080,7 @@ boolean ghostly;
|
||||
set_residency(mtmp, FALSE);
|
||||
place_monster(mtmp, mtmp->mx, mtmp->my);
|
||||
if (mtmp->wormno)
|
||||
place_wsegs(mtmp);
|
||||
place_wsegs(mtmp, NULL);
|
||||
|
||||
/* regenerate monsters while on another level */
|
||||
if (!u.uz.dlevel)
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#include "hack.h"
|
||||
|
||||
#if defined(TTY_GRAPHICS) || defined(X11_GRAPHICS) || defined(GEM_GRAPHICS) \
|
||||
|| defined(MSWIN_GRAPHICS) || defined(DUMPLOG)
|
||||
|| defined(MSWIN_GRAPHICS) || defined(DUMPLOG) || defined(CURSES_GRAPHICS)
|
||||
#define TEXT_TOMBSTONE
|
||||
#endif
|
||||
#if defined(mac) || defined(__BEOS__) || defined(WIN32_GRAPHICS)
|
||||
|
||||
@@ -536,6 +536,11 @@ skip_lots:
|
||||
saveobjchn(fd, level.buriedobjlist, mode);
|
||||
saveobjchn(fd, billobjs, mode);
|
||||
if (release_data(mode)) {
|
||||
int x,y;
|
||||
|
||||
for (y = 0; y < ROWNO; y++)
|
||||
for (x = 0; x < COLNO; x++)
|
||||
level.monsters[x][y] = 0;
|
||||
fmon = 0;
|
||||
ftrap = 0;
|
||||
fobj = 0;
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 sounds.c $NHDT-Date: 1452992329 2016/01/17 00:58:49 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.78 $ */
|
||||
/* NetHack 3.6 sounds.c $NHDT-Date: 1542765362 2018/11/21 01:56:02 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.81 $ */
|
||||
/* Copyright (c) 1989 Janet Walz, Mike Threepoint */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -601,7 +601,7 @@ register struct monst *mtmp;
|
||||
else if (youmonst.data == &mons[PM_SILVER_DRAGON]
|
||||
|| youmonst.data == &mons[PM_BABY_SILVER_DRAGON]) {
|
||||
/* Silver dragons are silver in color, not made of silver */
|
||||
Sprintf(verbuf, "%s! Your silver sheen does not frighten me!",
|
||||
Sprintf(verbuf, "%s! Your silver sheen does not frighten me!",
|
||||
youmonst.data == &mons[PM_SILVER_DRAGON]
|
||||
? "Fool"
|
||||
: "Young Fool");
|
||||
|
||||
+2
-2
@@ -1130,7 +1130,7 @@ xchar w, h;
|
||||
xchar xal, yal;
|
||||
xchar rtype, rlit;
|
||||
{
|
||||
xchar xabs, yabs;
|
||||
xchar xabs = 0, yabs = 0;
|
||||
int wtmp, htmp, xaltmp, yaltmp, xtmp, ytmp;
|
||||
NhRect *r1 = 0, r2;
|
||||
int trycnt = 0;
|
||||
@@ -2000,7 +2000,7 @@ struct mkroom *croom;
|
||||
* other contents, but that can be specified as an empty container.
|
||||
*/
|
||||
if (o->id == STATUE && Is_medusa_level(&u.uz) && o->corpsenm == NON_PM) {
|
||||
struct monst *was;
|
||||
struct monst *was = NULL;
|
||||
struct obj *obj;
|
||||
int wastyp;
|
||||
int i = 0; /* prevent endless loop in case makemon always fails */
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 spell.c $NHDT-Date: 1508479722 2017/10/20 06:08:42 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.84 $ */
|
||||
/* NetHack 3.6 spell.c $NHDT-Date: 1542765363 2018/11/21 01:56:03 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.87 $ */
|
||||
/* Copyright (c) M. Stephenson 1988 */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -1230,7 +1230,7 @@ throwspell()
|
||||
struct monst *mtmp;
|
||||
|
||||
if (u.uinwater) {
|
||||
pline("You're joking! In this weather?");
|
||||
pline("You're joking! In this weather?");
|
||||
return 0;
|
||||
} else if (Is_waterlevel(&u.uz)) {
|
||||
You("had better wait for the sun to come out.");
|
||||
|
||||
+4
-2
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 steed.c $NHDT-Date: 1541806894 2018/11/09 23:41:34 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.54 $ */
|
||||
/* NetHack 3.6 steed.c $NHDT-Date: 1542765364 2018/11/21 01:56:04 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.57 $ */
|
||||
/* Copyright (c) Kevin Hugo, 1998-1999. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -529,7 +529,7 @@ int reason; /* Player was thrown off etc. */
|
||||
return;
|
||||
}
|
||||
if (!have_spot) {
|
||||
You("can't. There isn't anywhere for you to stand.");
|
||||
You("can't. There isn't anywhere for you to stand.");
|
||||
return;
|
||||
}
|
||||
if (!has_mname(mtmp)) {
|
||||
@@ -704,6 +704,8 @@ int x, y;
|
||||
(mon == u.usteed) ? "steed" : "defunct monster");
|
||||
return;
|
||||
}
|
||||
if (level.monsters[x][y])
|
||||
impossible("placing monster over another?");
|
||||
mon->mx = x, mon->my = y;
|
||||
level.monsters[x][y] = mon;
|
||||
}
|
||||
|
||||
+2
-2
@@ -1005,8 +1005,8 @@ register int x, y;
|
||||
register int oldx = mtmp->mx, oldy = mtmp->my;
|
||||
boolean resident_shk = mtmp->isshk && inhishop(mtmp);
|
||||
|
||||
if (x == mtmp->mx && y == mtmp->my) /* that was easy */
|
||||
return;
|
||||
if (x == mtmp->mx && y == mtmp->my && m_at(x,y) == mtmp)
|
||||
return; /* that was easy */
|
||||
|
||||
if (oldx) { /* "pick up" monster */
|
||||
if (mtmp->wormno) {
|
||||
|
||||
+5
-5
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 trap.c $NHDT-Date: 1524312044 2018/04/21 12:00:44 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.290 $ */
|
||||
/* NetHack 3.6 trap.c $NHDT-Date: 1542765365 2018/11/21 01:56:05 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.303 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/*-Copyright (c) Robert Patrick Rankin, 2013. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -1523,7 +1523,7 @@ unsigned trflags;
|
||||
int style = ROLL | (trap->tseen ? LAUNCH_KNOWN : 0);
|
||||
|
||||
feeltrap(trap);
|
||||
pline("Click! You trigger a rolling boulder trap!");
|
||||
pline("Click! You trigger a rolling boulder trap!");
|
||||
if (!launch_obj(BOULDER, trap->launch.x, trap->launch.y,
|
||||
trap->launch2.x, trap->launch2.y, style)) {
|
||||
deltrap(trap);
|
||||
@@ -2673,7 +2673,7 @@ register struct monst *mtmp;
|
||||
|
||||
newsym(mtmp->mx, mtmp->my);
|
||||
if (in_sight)
|
||||
pline("Click! %s triggers %s.", Monnam(mtmp),
|
||||
pline("Click! %s triggers %s.", Monnam(mtmp),
|
||||
trap->tseen ? "a rolling boulder trap" : something);
|
||||
if (launch_obj(BOULDER, trap->launch.x, trap->launch.y,
|
||||
trap->launch2.x, trap->launch2.y, style)) {
|
||||
@@ -4064,7 +4064,7 @@ boolean force_failure;
|
||||
|
||||
if (ttmp2) {
|
||||
pline_The(
|
||||
"webbing sticks to you. You're caught too!");
|
||||
"webbing sticks to you. You're caught too!");
|
||||
dotrap(ttmp2, NOWEBMSG);
|
||||
if (u.usteed && u.utrap) {
|
||||
/* you, not steed, are trapped */
|
||||
@@ -4402,7 +4402,7 @@ boolean force;
|
||||
deal_with_floor_trap = FALSE;
|
||||
} else {
|
||||
Sprintf(
|
||||
qbuf, "There %s and %s here. %s %s?",
|
||||
qbuf, "There %s and %s here. %s %s?",
|
||||
(boxcnt == 1) ? "is a container" : "are containers",
|
||||
an(trapdescr),
|
||||
(ttmp->ttyp == WEB) ? "Remove" : "Disarm", the_trap);
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 uhitm.c $NHDT-Date: 1521684760 2018/03/22 02:12:40 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.176 $ */
|
||||
/* NetHack 3.6 uhitm.c $NHDT-Date: 1542765366 2018/11/21 01:56:06 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.185 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/*-Copyright (c) Robert Patrick Rankin, 2012. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -930,7 +930,7 @@ int dieroll;
|
||||
|
||||
if (touch_petrifies(&mons[obj->corpsenm])) {
|
||||
/*learn_egg_type(obj->corpsenm);*/
|
||||
pline("Splat! You hit %s with %s %s egg%s!",
|
||||
pline("Splat! You hit %s with %s %s egg%s!",
|
||||
mon_nam(mon),
|
||||
obj->known ? "the" : cnt > 1L ? "some" : "a",
|
||||
obj->known ? mons[obj->corpsenm].mname
|
||||
|
||||
+22
-9
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 vault.c $NHDT-Date: 1452132199 2016/01/07 02:03:19 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.42 $ */
|
||||
/* NetHack 3.6 vault.c $NHDT-Date: 1542765368 2018/11/21 01:56:08 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.55 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/*-Copyright (c) Robert Patrick Rankin, 2011. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -13,6 +13,7 @@ STATIC_DCL void FDECL(restfakecorr, (struct monst *));
|
||||
STATIC_DCL boolean FDECL(in_fcorridor, (struct monst *, int, int));
|
||||
STATIC_DCL void FDECL(move_gold, (struct obj *, int));
|
||||
STATIC_DCL void FDECL(wallify_vault, (struct monst *));
|
||||
STATIC_DCL void FDECL(gd_mv_monaway, (struct monst *, int, int));
|
||||
|
||||
void
|
||||
newegd(mtmp)
|
||||
@@ -351,7 +352,8 @@ invault()
|
||||
newsym(guard->mx, guard->my);
|
||||
if (u.uswallow) {
|
||||
/* can't interrogate hero, don't interrogate engulfer */
|
||||
if (!Deaf) verbalize("What's going on here?");
|
||||
if (!Deaf)
|
||||
verbalize("What's going on here?");
|
||||
if (gsensed)
|
||||
pline_The("other presence vanishes.");
|
||||
mongone(guard);
|
||||
@@ -360,8 +362,9 @@ invault()
|
||||
if (youmonst.m_ap_type == M_AP_OBJECT || u.uundetected) {
|
||||
if (youmonst.m_ap_type == M_AP_OBJECT
|
||||
&& youmonst.mappearance != GOLD_PIECE)
|
||||
if (!Deaf) verbalize("Hey! Who left that %s in here?",
|
||||
mimic_obj_name(&youmonst));
|
||||
if (!Deaf)
|
||||
verbalize("Hey! Who left that %s in here?",
|
||||
mimic_obj_name(&youmonst));
|
||||
/* You're mimicking some object or you're hidden. */
|
||||
pline("Puzzled, %s turns around and leaves.", mhe(guard));
|
||||
mongone(guard);
|
||||
@@ -577,6 +580,19 @@ struct monst *grd;
|
||||
}
|
||||
}
|
||||
|
||||
STATIC_OVL void
|
||||
gd_mv_monaway(grd, nx,ny)
|
||||
register struct monst *grd;
|
||||
int nx,ny;
|
||||
{
|
||||
if (MON_AT(nx, ny) && nx != grd->mx && ny != grd->my) {
|
||||
if (!Deaf)
|
||||
verbalize("Out of my way, scum!");
|
||||
if (!rloc(m_at(nx, ny), FALSE) || m_at(nx, ny))
|
||||
m_into_limbo(m_at(nx, ny));
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* return 1: guard moved, 0: guard didn't, -1: let m_move do it, -2: died
|
||||
*/
|
||||
@@ -745,11 +761,7 @@ register struct monst *grd;
|
||||
mpickgold(grd); /* does a newsym */
|
||||
} else {
|
||||
/* just for insurance... */
|
||||
if (MON_AT(m, n) && m != grd->mx && n != grd->my) {
|
||||
if (!Deaf)
|
||||
verbalize("Out of my way, scum!");
|
||||
(void) rloc(m_at(m, n), FALSE);
|
||||
}
|
||||
gd_mv_monaway(grd, m,n);
|
||||
remove_monster(grd->mx, grd->my);
|
||||
newsym(grd->mx, grd->my);
|
||||
place_monster(grd, m, n);
|
||||
@@ -869,6 +881,7 @@ proceed:
|
||||
fcp->fy = ny;
|
||||
fcp->ftyp = typ;
|
||||
newpos:
|
||||
gd_mv_monaway(grd, nx,ny);
|
||||
if (egrd->gddone) {
|
||||
/* The following is a kludge. We need to keep */
|
||||
/* the guard around in order to be able to make */
|
||||
|
||||
@@ -6,6 +6,9 @@
|
||||
#ifdef TTY_GRAPHICS
|
||||
#include "wintty.h"
|
||||
#endif
|
||||
#ifdef CURSES_GRAPHICS
|
||||
extern struct window_procs curses_procs;
|
||||
#endif
|
||||
#ifdef X11_GRAPHICS
|
||||
/* Cannot just blindly include winX.h without including all of X11 stuff
|
||||
and must get the order of include files right. Don't bother. */
|
||||
@@ -92,6 +95,9 @@ static struct win_choices {
|
||||
#ifdef TTY_GRAPHICS
|
||||
{ &tty_procs, win_tty_init CHAINR(0) },
|
||||
#endif
|
||||
#ifdef CURSES_GRAPHICS
|
||||
{ &curses_procs, 0 },
|
||||
#endif
|
||||
#ifdef X11_GRAPHICS
|
||||
{ &X11_procs, win_X11_init CHAINR(0) },
|
||||
#endif
|
||||
|
||||
+29
-11
@@ -301,7 +301,8 @@ register struct monst *worm;
|
||||
*/
|
||||
for (seg = wtails[wnum]; seg; seg = seg->nseg)
|
||||
if (distu(seg->wx, seg->wy) < 3)
|
||||
(void) mattacku(worm);
|
||||
if (mattacku(worm))
|
||||
return; /* your passive ability killed the worm */
|
||||
}
|
||||
|
||||
/* cutworm()
|
||||
@@ -382,6 +383,7 @@ struct obj *weap;
|
||||
|
||||
/* Sometimes the tail end dies. */
|
||||
if (!new_worm) {
|
||||
place_worm_seg(worm, x, y); /* place the "head" segment back */
|
||||
if (context.mon_moving) {
|
||||
if (canspotmon(worm))
|
||||
pline("Part of %s tail has been cut off.",
|
||||
@@ -414,7 +416,7 @@ struct obj *weap;
|
||||
wgrowtime[new_wnum] = 0L; /* trying to call initworm(). */
|
||||
|
||||
/* Place the new monster at all the segment locations. */
|
||||
place_wsegs(new_worm);
|
||||
place_wsegs(new_worm, worm);
|
||||
|
||||
if (context.mon_moving)
|
||||
pline("%s is cut in half.", Monnam(worm));
|
||||
@@ -555,17 +557,28 @@ int fd;
|
||||
* place_wsegs()
|
||||
*
|
||||
* Place the segments of the given worm. Called from restore.c
|
||||
* If oldworm is not NULL, assumes the oldworm segments are on map
|
||||
* in the same location as worm segments
|
||||
*/
|
||||
void
|
||||
place_wsegs(worm)
|
||||
struct monst *worm;
|
||||
place_wsegs(worm, oldworm)
|
||||
struct monst *worm, *oldworm;
|
||||
{
|
||||
struct wseg *curr = wtails[worm->wormno];
|
||||
|
||||
/* if (!mtmp->wormno) return; bullet proofing */
|
||||
|
||||
while (curr != wheads[worm->wormno]) {
|
||||
place_worm_seg(worm, curr->wx, curr->wy);
|
||||
xchar x = curr->wx;
|
||||
xchar y = curr->wy;
|
||||
|
||||
if (oldworm) {
|
||||
if (m_at(x,y) == oldworm)
|
||||
remove_monster(x, y);
|
||||
else
|
||||
impossible("placing worm seg <%i,%i> over another mon", x, y);
|
||||
}
|
||||
place_worm_seg(worm, x, y);
|
||||
curr = curr->nseg;
|
||||
}
|
||||
}
|
||||
@@ -584,10 +597,12 @@ struct monst *worm;
|
||||
curr = wtails[worm->wormno];
|
||||
|
||||
while (curr != wheads[worm->wormno]) {
|
||||
if (!isok(curr->wx, curr->wy))
|
||||
panic("worm seg not isok");
|
||||
if (level.monsters[curr->wx][curr->wy] != worm)
|
||||
panic("worm not at seg location");
|
||||
if (curr->wx) {
|
||||
if (!isok(curr->wx, curr->wy))
|
||||
panic("worm seg not isok");
|
||||
if (level.monsters[curr->wx][curr->wy] != worm)
|
||||
panic("worm not at seg location");
|
||||
}
|
||||
curr = curr->nseg;
|
||||
}
|
||||
}
|
||||
@@ -609,8 +624,11 @@ register struct monst *worm;
|
||||
/* if (!mtmp->wormno) return; bullet proofing */
|
||||
|
||||
while (curr) {
|
||||
remove_monster(curr->wx, curr->wy);
|
||||
newsym(curr->wx, curr->wy);
|
||||
if (curr->wx) {
|
||||
remove_monster(curr->wx, curr->wy);
|
||||
newsym(curr->wx, curr->wy);
|
||||
curr->wx = 0;
|
||||
}
|
||||
curr = curr->nseg;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user