Merge branch 'NetHack-3.6.2-beta01' into win-minor
This commit is contained in:
+52
@@ -0,0 +1,52 @@
|
|||||||
|
language: c
|
||||||
|
|
||||||
|
script: "cd sys/unix/ && sh setup.sh hints/$HINTS && cd ../../ && QT_SELECT=5 make MOC=moc install"
|
||||||
|
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- env: HINTS=linux
|
||||||
|
compiler: gcc
|
||||||
|
- env: HINTS=linux
|
||||||
|
compiler: clang
|
||||||
|
- env: HINTS=linux-x11
|
||||||
|
compiler: gcc
|
||||||
|
- env: HINTS=linux-qt5
|
||||||
|
compiler: gcc
|
||||||
|
addons:
|
||||||
|
apt:
|
||||||
|
packages:
|
||||||
|
- qtbase5-dev
|
||||||
|
- qtmultimedia5-dev
|
||||||
|
- qtbase5-dev-tools
|
||||||
|
- env: HINTS=linux-minimal
|
||||||
|
compiler: gcc
|
||||||
|
script: |
|
||||||
|
cd sys/unix/ && sh setup.sh hints/$HINTS && cd ../../
|
||||||
|
sed -i '/^#define CLIPPING/d' include/config.h
|
||||||
|
sed -i '/^#define COMPRESS/d' include/config.h
|
||||||
|
#sed -i '/^#define DOAGAIN/d' include/config.h
|
||||||
|
sed -i '/^#define DUMPLOG/d' include/config.h
|
||||||
|
#sed -i '/^#define GDBPATH/d' include/config.h
|
||||||
|
#sed -i '/^#define GREPPATH/d' include/config.h
|
||||||
|
sed -i '/^#define INSURANCE/d' include/config.h
|
||||||
|
sed -i '/^#define LOGFILE/d' include/config.h
|
||||||
|
sed -i '/^#define NEWS/d' include/config.h
|
||||||
|
sed -i '/^#define PANICLOG/d' include/config.h
|
||||||
|
#sed -i '/^#define STATUS_HILITES/d' include/config.h
|
||||||
|
sed -i '/^#define SYSCF/d' include/config.h
|
||||||
|
sed -i '/^#define USER_SOUNDS/d' include/config.h
|
||||||
|
sed -i '/^#define XLOGFILE/d' include/config.h
|
||||||
|
|
||||||
|
sed -i '/^#define MAIL/d' include/unixconf.h
|
||||||
|
sed -i '/^#define SHELL/d' include/unixconf.h
|
||||||
|
sed -i '/^#define SUSPEND/d' include/unixconf.h
|
||||||
|
sed -i 's/^#define TEXTCOLOR//' include/unixconf.h
|
||||||
|
make install
|
||||||
|
cat dat/options
|
||||||
|
|
||||||
|
sudo: false
|
||||||
|
|
||||||
|
notifications:
|
||||||
|
email:
|
||||||
|
recipients:
|
||||||
|
- devteam@nethack.org
|
||||||
@@ -205,8 +205,23 @@ successfully paying for shop damage with shop credit would be followed by
|
|||||||
if a migrating monster was killed off because there was no room on the
|
if a migrating monster was killed off because there was no room on the
|
||||||
destination level, it would leave a corpse even if it was a type
|
destination level, it would leave a corpse even if it was a type
|
||||||
which should never leave one (demon, golem, blob, &c)
|
which should never leave one (demon, golem, blob, &c)
|
||||||
|
monsters accompanying hero during level change (usually pets) who failed to
|
||||||
|
arrive and tried to re-migrate were being removed from the map after
|
||||||
|
already having been removed [impossible "no monster to remove" if
|
||||||
|
compiled with EXTRA_SANITY_CHECKS enabled] during migration handling
|
||||||
|
monsters accompanying hero during level change (usually pets) who failed to
|
||||||
|
arrive and tried to re-migrate (for hero's next visit to the level)
|
||||||
|
ended up being killed because the migration attempt happened right
|
||||||
|
away (same visit by hero, so level still full) and they weren't
|
||||||
|
accompanying hero on the second attempt
|
||||||
|
fix for above (all failed arrivals will re-migrate) makes the earlier fix (for
|
||||||
|
invalid corpse being left by monst killed upon migration failure) moot
|
||||||
end of game while carrying Schroedinger's Box would reveal cat-or-corpse
|
end of game while carrying Schroedinger's Box would reveal cat-or-corpse
|
||||||
for inventory disclosure or put that info into dumplog, but not both
|
for inventory disclosure or put that info into dumplog, but not both
|
||||||
|
attempting to untrap an adjacent trap while on the edge of--not in--a pit
|
||||||
|
failed due to not being able to reach the floor
|
||||||
|
magic trap's deafening roar effect wasn't waking nearby monsters
|
||||||
|
scattering of objects might leave source location with wrong thing displayed
|
||||||
|
|
||||||
|
|
||||||
Fixes to Post-3.6.1 Problems that Were Exposed Via git Repository
|
Fixes to Post-3.6.1 Problems that Were Exposed Via git Repository
|
||||||
@@ -216,6 +231,8 @@ setting the inverse attribute for gold had the space before "$:"
|
|||||||
getting highlighted along with the gold field
|
getting highlighted along with the gold field
|
||||||
sortloot segfaulted when filtering a subset of items (seen with 'A' command)
|
sortloot segfaulted when filtering a subset of items (seen with 'A' command)
|
||||||
orctown: prevent Bad fruit #0 and some minor tuning
|
orctown: prevent Bad fruit #0 and some minor tuning
|
||||||
|
orctown: orcs beyond the mines were being given any left-over booty and named
|
||||||
|
as part of the same marauding gang operating within the mines
|
||||||
make long extended commands list be more navigable
|
make long extended commands list be more navigable
|
||||||
simplify #wizidentify; don't rely on having bold menu entries
|
simplify #wizidentify; don't rely on having bold menu entries
|
||||||
ensure tmp_at() structures are initialized for all code paths when swallowed
|
ensure tmp_at() structures are initialized for all code paths when swallowed
|
||||||
|
|||||||
@@ -522,6 +522,10 @@ typedef unsigned char uchar;
|
|||||||
but it isn't necessary for successful operation of the program */
|
but it isn't necessary for successful operation of the program */
|
||||||
#define FREE_ALL_MEMORY /* free all memory at exit */
|
#define FREE_ALL_MEMORY /* free all memory at exit */
|
||||||
|
|
||||||
|
/* EXTRA_SANITY_CHECKS adds extra impossible calls,
|
||||||
|
* probably not useful for normal play */
|
||||||
|
/* #define EXTRA_SANITY_CHECKS */
|
||||||
|
|
||||||
/* EDIT_GETLIN makes the string input in TTY, Qt4, and X11
|
/* EDIT_GETLIN makes the string input in TTY, Qt4, and X11
|
||||||
so some prompts will remember the previously input text
|
so some prompts will remember the previously input text
|
||||||
(within the same session) */
|
(within the same session) */
|
||||||
|
|||||||
+1
-1
@@ -431,7 +431,7 @@ E struct obj *FDECL(realloc_obj,
|
|||||||
(struct obj *, int, genericptr_t, int, const char *));
|
(struct obj *, int, genericptr_t, int, const char *));
|
||||||
E char *FDECL(coyotename, (struct monst *, char *));
|
E char *FDECL(coyotename, (struct monst *, char *));
|
||||||
E char *FDECL(rndorcname, (char *));
|
E char *FDECL(rndorcname, (char *));
|
||||||
E struct monst *FDECL(christen_orc, (struct monst *, char *));
|
E struct monst *FDECL(christen_orc, (struct monst *, char *, char *));
|
||||||
E const char *FDECL(noveltitle, (int *));
|
E const char *FDECL(noveltitle, (int *));
|
||||||
E const char *FDECL(lookup_novel, (const char *, int *));
|
E const char *FDECL(lookup_novel, (const char *, int *));
|
||||||
|
|
||||||
|
|||||||
+12
-8
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.6 rm.h $NHDT-Date: 1432512776 2015/05/25 00:12:56 $ $NHDT-Branch: master $:$NHDT-Revision: 1.41 $ */
|
/* NetHack 3.6 rm.h $NHDT-Date: 1543052680 2018/11/24 09:44:40 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.59 $ */
|
||||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/*-Copyright (c) Pasi Kallinen, 2017. */
|
/*-Copyright (c) Pasi Kallinen, 2017. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
@@ -630,14 +630,18 @@ extern dlevel_t level; /* structure describing the current level */
|
|||||||
#define MON_BURIED_AT(x, y) \
|
#define MON_BURIED_AT(x, y) \
|
||||||
(level.monsters[x][y] != (struct monst *) 0 \
|
(level.monsters[x][y] != (struct monst *) 0 \
|
||||||
&& (level.monsters[x][y])->mburied)
|
&& (level.monsters[x][y])->mburied)
|
||||||
#if EXTRA_SANITY_CHECKS
|
#ifdef EXTRA_SANITY_CHECKS
|
||||||
#define place_worm_seg(m, x, y) do { \
|
#define place_worm_seg(m, x, y) \
|
||||||
if (level.monsters[x][y] && level.monsters[x][y] != m) impossible("place_worm_seg over mon"); \
|
do { \
|
||||||
level.monsters[x][y] = m; \
|
if (level.monsters[x][y] && level.monsters[x][y] != m) \
|
||||||
|
impossible("place_worm_seg over mon"); \
|
||||||
|
level.monsters[x][y] = m; \
|
||||||
} while(0)
|
} while(0)
|
||||||
#define remove_monster(x, y) do { \
|
#define remove_monster(x, y) \
|
||||||
if (!level.monsters[x][y]) impossible("no monster to remove"); \
|
do { \
|
||||||
level.monsters[x][y] = (struct monst *) 0; \
|
if (!level.monsters[x][y]) \
|
||||||
|
impossible("no monster to remove"); \
|
||||||
|
level.monsters[x][y] = (struct monst *) 0; \
|
||||||
} while(0)
|
} while(0)
|
||||||
#else
|
#else
|
||||||
#define place_worm_seg(m, x, y) level.monsters[x][y] = m
|
#define place_worm_seg(m, x, y) level.monsters[x][y] = m
|
||||||
|
|||||||
+10
-5
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.6 detect.c $NHDT-Date: 1522891623 2018/04/05 01:27:03 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.81 $ */
|
/* NetHack 3.6 detect.c $NHDT-Date: 1542853884 2018/11/22 02:31:24 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.87 $ */
|
||||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/*-Copyright (c) Robert Patrick Rankin, 2018. */
|
/*-Copyright (c) Robert Patrick Rankin, 2018. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
@@ -165,8 +165,14 @@ char oclass;
|
|||||||
|
|
||||||
if (obj->oclass == oclass)
|
if (obj->oclass == oclass)
|
||||||
return obj;
|
return obj;
|
||||||
|
/*
|
||||||
if (Has_contents(obj)) {
|
* Note: we exclude SchroedingersBox because the corpse it contains
|
||||||
|
* isn't necessarily a corpse yet. Resolving the status would lead
|
||||||
|
* to complications if it turns out to be a live cat. We know that
|
||||||
|
* that Box can't contain anything else because putting something in
|
||||||
|
* would resolve the cat/corpse situation and convert to ordinary box.
|
||||||
|
*/
|
||||||
|
if (Has_contents(obj) && !SchroedingersBox(obj)) {
|
||||||
for (otmp = obj->cobj; otmp; otmp = otmp->nobj)
|
for (otmp = obj->cobj; otmp; otmp = otmp->nobj)
|
||||||
if (otmp->oclass == oclass)
|
if (otmp->oclass == oclass)
|
||||||
return otmp;
|
return otmp;
|
||||||
@@ -442,8 +448,7 @@ outgoldmap:
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* returns 1 if nothing was detected */
|
/* returns 1 if nothing was detected, 0 if something was detected */
|
||||||
/* returns 0 if something was detected */
|
|
||||||
int
|
int
|
||||||
food_detect(sobj)
|
food_detect(sobj)
|
||||||
register struct obj *sobj;
|
register struct obj *sobj;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
/* 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 $ */
|
/* NetHack 3.6 do.c $NHDT-Date: 1543052696 2018/11/24 09:44:56 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.175 $ */
|
||||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/*-Copyright (c) Derek S. Ray, 2015. */
|
/*-Copyright (c) Derek S. Ray, 2015. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
@@ -1446,10 +1446,9 @@ boolean at_stairs, falling, portal;
|
|||||||
with the situation, so only say something when debugging */
|
with the situation, so only say something when debugging */
|
||||||
if (wizard)
|
if (wizard)
|
||||||
pline("(monster in hero's way)");
|
pline("(monster in hero's way)");
|
||||||
if (!rloc(mtmp, TRUE) || m_at(u.ux, u.uy))
|
if (!rloc(mtmp, TRUE) || (mtmp = m_at(u.ux, u.uy)) != 0)
|
||||||
/* no room to move it; send it away, to return later */
|
/* no room to move it; send it away, to return later */
|
||||||
migrate_to_level(mtmp, ledger_no(&u.uz), MIGR_RANDOM,
|
m_into_limbo(mtmp);
|
||||||
(coord *) 0);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+16
-6
@@ -2088,18 +2088,28 @@ char *s;
|
|||||||
}
|
}
|
||||||
|
|
||||||
struct monst *
|
struct monst *
|
||||||
christen_orc(mtmp, gang)
|
christen_orc(mtmp, gang, other)
|
||||||
struct monst *mtmp;
|
struct monst *mtmp;
|
||||||
char *gang;
|
char *gang, *other;
|
||||||
{
|
{
|
||||||
int sz = 0;
|
int sz = 0;
|
||||||
char buf[BUFSZ], buf2[BUFSZ], *orcname;
|
char buf[BUFSZ], buf2[BUFSZ], *orcname;
|
||||||
|
|
||||||
orcname = rndorcname(buf2);
|
orcname = rndorcname(buf2);
|
||||||
sz = (int) (strlen(gang) + strlen(orcname) + sizeof " of " - sizeof "");
|
sz = (int) ((gang ? strlen(gang) : other ? strlen(other) : 0)
|
||||||
if (gang && orcname && sz < BUFSZ) {
|
+ strlen(orcname) + sizeof " of " - sizeof "");
|
||||||
Sprintf(buf, "%s of %s", upstart(orcname), upstart(gang));
|
if (sz < BUFSZ) {
|
||||||
mtmp = christen_monst(mtmp, buf);
|
boolean nameit = FALSE;
|
||||||
|
|
||||||
|
if (gang && orcname) {
|
||||||
|
Sprintf(buf, "%s of %s", upstart(orcname), upstart(gang));
|
||||||
|
nameit = TRUE;
|
||||||
|
} else if (other && orcname) {
|
||||||
|
Sprintf(buf, "%s%s", upstart(orcname), other);
|
||||||
|
nameit = TRUE;
|
||||||
|
}
|
||||||
|
if (nameit)
|
||||||
|
mtmp = christen_monst(mtmp, buf);
|
||||||
}
|
}
|
||||||
return mtmp;
|
return mtmp;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.6 dog.c $NHDT-Date: 1502753406 2017/08/14 23:30:06 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.60 $ */
|
/* NetHack 3.6 dog.c $NHDT-Date: 1543052701 2018/11/24 09:45:01 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.84 $ */
|
||||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/*-Copyright (c) Robert Patrick Rankin, 2011. */
|
/*-Copyright (c) Robert Patrick Rankin, 2011. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
@@ -224,7 +224,7 @@ update_mlstmv()
|
|||||||
void
|
void
|
||||||
losedogs()
|
losedogs()
|
||||||
{
|
{
|
||||||
register struct monst *mtmp, *mtmp0 = 0, *mtmp2;
|
register struct monst *mtmp, *mtmp0, *mtmp2;
|
||||||
int dismissKops = 0;
|
int dismissKops = 0;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -279,17 +279,26 @@ losedogs()
|
|||||||
mon_arrive(mtmp, TRUE);
|
mon_arrive(mtmp, TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* time for migrating monsters to arrive */
|
/* time for migrating monsters to arrive;
|
||||||
|
monsters who belong on this level but fail to arrive get put
|
||||||
|
back onto the list (at head), so traversing it is tricky */
|
||||||
for (mtmp = migrating_mons; mtmp; mtmp = mtmp2) {
|
for (mtmp = migrating_mons; mtmp; mtmp = mtmp2) {
|
||||||
mtmp2 = mtmp->nmon;
|
mtmp2 = mtmp->nmon;
|
||||||
if (mtmp->mux == u.uz.dnum && mtmp->muy == u.uz.dlevel) {
|
if (mtmp->mux == u.uz.dnum && mtmp->muy == u.uz.dlevel) {
|
||||||
if (mtmp == migrating_mons)
|
/* remove mtmp from migrating_mons list */
|
||||||
|
if (mtmp == migrating_mons) {
|
||||||
migrating_mons = mtmp->nmon;
|
migrating_mons = mtmp->nmon;
|
||||||
else
|
} else {
|
||||||
mtmp0->nmon = mtmp->nmon;
|
for (mtmp0 = migrating_mons; mtmp0; mtmp0 = mtmp0->nmon)
|
||||||
|
if (mtmp0->nmon == mtmp) {
|
||||||
|
mtmp0->nmon = mtmp->nmon;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (!mtmp0)
|
||||||
|
panic("losedogs: can't find migrating mon");
|
||||||
|
}
|
||||||
mon_arrive(mtmp, FALSE);
|
mon_arrive(mtmp, FALSE);
|
||||||
} else
|
}
|
||||||
mtmp0 = mtmp;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -300,9 +309,9 @@ struct monst *mtmp;
|
|||||||
boolean with_you;
|
boolean with_you;
|
||||||
{
|
{
|
||||||
struct trap *t;
|
struct trap *t;
|
||||||
struct obj *obj;
|
|
||||||
xchar xlocale, ylocale, xyloc, xyflags, wander;
|
xchar xlocale, ylocale, xyloc, xyflags, wander;
|
||||||
int num_segs;
|
int num_segs;
|
||||||
|
boolean failed_to_place = FALSE;
|
||||||
|
|
||||||
mtmp->nmon = fmon;
|
mtmp->nmon = fmon;
|
||||||
fmon = mtmp;
|
fmon = mtmp;
|
||||||
@@ -328,7 +337,7 @@ boolean with_you;
|
|||||||
xyflags = mtmp->mtrack[0].y;
|
xyflags = mtmp->mtrack[0].y;
|
||||||
xlocale = mtmp->mtrack[1].x;
|
xlocale = mtmp->mtrack[1].x;
|
||||||
ylocale = mtmp->mtrack[1].y;
|
ylocale = mtmp->mtrack[1].y;
|
||||||
memset(mtmp->mtrack, 0, sizeof(mtmp->mtrack));
|
memset(mtmp->mtrack, 0, sizeof mtmp->mtrack);
|
||||||
|
|
||||||
if (mtmp == u.usteed)
|
if (mtmp == u.usteed)
|
||||||
return; /* don't place steed on the map */
|
return; /* don't place steed on the map */
|
||||||
@@ -447,47 +456,13 @@ boolean with_you;
|
|||||||
|
|
||||||
mtmp->mx = 0; /*(already is 0)*/
|
mtmp->mx = 0; /*(already is 0)*/
|
||||||
mtmp->my = xyflags;
|
mtmp->my = xyflags;
|
||||||
if (xlocale) {
|
if (xlocale)
|
||||||
if (!mnearto(mtmp, xlocale, ylocale, FALSE))
|
failed_to_place = !mnearto(mtmp, xlocale, ylocale, FALSE);
|
||||||
goto fail_mon_placement;
|
else
|
||||||
} else {
|
failed_to_place = !rloc(mtmp, TRUE);
|
||||||
if (!rloc(mtmp, TRUE)) {
|
|
||||||
/*
|
if (failed_to_place)
|
||||||
* Failed to place migrating monster,
|
m_into_limbo(mtmp); /* try again next time hero comes to this level */
|
||||||
* 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.
|
|
||||||
*/
|
|
||||||
fail_mon_placement:
|
|
||||||
while ((obj = mtmp->minvent) != 0) {
|
|
||||||
obj_extract_self(obj);
|
|
||||||
obj_no_longer_held(obj);
|
|
||||||
if (obj->owornmask & W_WEP)
|
|
||||||
setmnotwielded(mtmp, obj);
|
|
||||||
obj->owornmask = 0L;
|
|
||||||
if (xlocale && ylocale)
|
|
||||||
place_object(obj, xlocale, ylocale);
|
|
||||||
else if (rloco(obj)) {
|
|
||||||
if (!get_obj_location(obj, &xlocale, &ylocale, 0))
|
|
||||||
impossible("Can't find relocated object.");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/*
|
|
||||||
* 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 = 0; /* for mongone, mon is not anywhere */
|
|
||||||
mongone(mtmp);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* heal monster for time spent elsewhere */
|
/* heal monster for time spent elsewhere */
|
||||||
@@ -708,7 +683,7 @@ xchar tolev; /* destination level */
|
|||||||
xchar xyloc; /* MIGR_xxx destination xy location: */
|
xchar xyloc; /* MIGR_xxx destination xy location: */
|
||||||
coord *cc; /* optional destination coordinates */
|
coord *cc; /* optional destination coordinates */
|
||||||
{
|
{
|
||||||
register struct obj *obj;
|
struct obj *obj;
|
||||||
d_level new_lev;
|
d_level new_lev;
|
||||||
xchar xyflags;
|
xchar xyflags;
|
||||||
int num_segs = 0; /* count of worm segments */
|
int num_segs = 0; /* count of worm segments */
|
||||||
@@ -717,12 +692,12 @@ coord *cc; /* optional destination coordinates */
|
|||||||
set_residency(mtmp, TRUE);
|
set_residency(mtmp, TRUE);
|
||||||
|
|
||||||
if (mtmp->wormno) {
|
if (mtmp->wormno) {
|
||||||
register int cnt;
|
int cnt = count_wsegs(mtmp);
|
||||||
|
|
||||||
/* **** NOTE: worm is truncated to # segs = max wormno size **** */
|
/* **** NOTE: worm is truncated to # segs = max wormno size **** */
|
||||||
cnt = count_wsegs(mtmp);
|
num_segs = min(cnt, MAX_NUM_WORMS - 1); /* used below */
|
||||||
num_segs = min(cnt, MAX_NUM_WORMS - 1);
|
wormgone(mtmp); /* destroys tail and takes head off map */
|
||||||
wormgone(mtmp);
|
place_monster(mtmp, mtmp->mx, mtmp->my); /* put head back for relmon */
|
||||||
place_monster(mtmp, mtmp->mx, mtmp->my);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* set minvent's obj->no_charge to 0 */
|
/* set minvent's obj->no_charge to 0 */
|
||||||
@@ -755,7 +730,7 @@ coord *cc; /* optional destination coordinates */
|
|||||||
mtmp->muy = new_lev.dlevel;
|
mtmp->muy = new_lev.dlevel;
|
||||||
mtmp->mx = mtmp->my = 0; /* this implies migration */
|
mtmp->mx = mtmp->my = 0; /* this implies migration */
|
||||||
if (mtmp == context.polearm.hitmon)
|
if (mtmp == context.polearm.hitmon)
|
||||||
context.polearm.hitmon = NULL;
|
context.polearm.hitmon = (struct monst *) 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* return quality of food; the lower the better */
|
/* return quality of food; the lower the better */
|
||||||
|
|||||||
+8
-3
@@ -1680,7 +1680,8 @@ unsigned long deliverflags;
|
|||||||
{
|
{
|
||||||
struct obj *otmp, *otmp2;
|
struct obj *otmp, *otmp2;
|
||||||
int where, maxobj = 1;
|
int where, maxobj = 1;
|
||||||
|
boolean at_crime_scene = In_mines(&u.uz);
|
||||||
|
|
||||||
if ((deliverflags & DF_RANDOM) && cnt > 1)
|
if ((deliverflags & DF_RANDOM) && cnt > 1)
|
||||||
maxobj = rnd(cnt);
|
maxobj = rnd(cnt);
|
||||||
else if (deliverflags & DF_ALL)
|
else if (deliverflags & DF_ALL)
|
||||||
@@ -1702,8 +1703,12 @@ unsigned long deliverflags;
|
|||||||
|
|
||||||
/* special treatment for orcs and their kind */
|
/* special treatment for orcs and their kind */
|
||||||
if ((otmp->corpsenm & M2_ORC) != 0 && has_oname(otmp)) {
|
if ((otmp->corpsenm & M2_ORC) != 0 && has_oname(otmp)) {
|
||||||
if (!has_mname(mtmp))
|
if (!has_mname(mtmp)) {
|
||||||
mtmp = christen_orc(mtmp, ONAME(otmp));
|
if (at_crime_scene || (!at_crime_scene && !rn2(2)))
|
||||||
|
mtmp = christen_orc(mtmp,
|
||||||
|
at_crime_scene ? ONAME(otmp) : (char *) 0,
|
||||||
|
" the Fence"); /* bought the stolen goods */
|
||||||
|
}
|
||||||
free_oname(otmp);
|
free_oname(otmp);
|
||||||
}
|
}
|
||||||
otmp->corpsenm = 0;
|
otmp->corpsenm = 0;
|
||||||
|
|||||||
+6
-2
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.6 explode.c $NHDT-Date: 1522454717 2018/03/31 00:05:17 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.56 $ */
|
/* NetHack 3.6 explode.c $NHDT-Date: 1543101719 2018/11/24 23:21:59 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.59 $ */
|
||||||
/* Copyright (C) 1990 by Ken Arromdee */
|
/* Copyright (C) 1990 by Ken Arromdee */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
|
|
||||||
@@ -616,6 +616,10 @@ struct obj *obj; /* only scatter this obj */
|
|||||||
struct scatter_chain *schain = (struct scatter_chain *) 0;
|
struct scatter_chain *schain = (struct scatter_chain *) 0;
|
||||||
long total = 0L;
|
long total = 0L;
|
||||||
|
|
||||||
|
if (individual_object && (obj->ox != sx || obj->oy != sy))
|
||||||
|
impossible("scattered object <%d,%d> not at scatter site <%d,%d>",
|
||||||
|
obj->ox, obj->oy, sx, sy);
|
||||||
|
|
||||||
while ((otmp = (individual_object ? obj : level.objects[sx][sy])) != 0) {
|
while ((otmp = (individual_object ? obj : level.objects[sx][sy])) != 0) {
|
||||||
if (otmp->quan > 1L) {
|
if (otmp->quan > 1L) {
|
||||||
qtmp = otmp->quan - 1L;
|
qtmp = otmp->quan - 1L;
|
||||||
@@ -759,7 +763,7 @@ struct obj *obj; /* only scatter this obj */
|
|||||||
free((genericptr_t) stmp);
|
free((genericptr_t) stmp);
|
||||||
newsym(x, y);
|
newsym(x, y);
|
||||||
}
|
}
|
||||||
|
newsym(sx, sy);
|
||||||
return total;
|
return total;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -785,7 +785,7 @@ stolen_booty(VOID_ARGS)
|
|||||||
* member of the main orc horde.
|
* member of the main orc horde.
|
||||||
*/
|
*/
|
||||||
if (mtmp->data != &mons[PM_ORC_CAPTAIN])
|
if (mtmp->data != &mons[PM_ORC_CAPTAIN])
|
||||||
mtmp = christen_orc(mtmp, upstart(gang));
|
mtmp = christen_orc(mtmp, upstart(gang), "");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* Lastly, ensure there's several more orcs from the gang along the way.
|
/* Lastly, ensure there's several more orcs from the gang along the way.
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.6 mon.c $NHDT-Date: 1539479657 2018/10/14 01:14:17 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.260 $ */
|
/* NetHack 3.6 mon.c $NHDT-Date: 1543100460 2018/11/24 23:01:00 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.271 $ */
|
||||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/*-Copyright (c) Derek S. Ray, 2015. */
|
/*-Copyright (c) Derek S. Ray, 2015. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
@@ -1618,8 +1618,9 @@ struct monst *mon;
|
|||||||
struct monst **monst_list; /* &migrating_mons or &mydogs or null */
|
struct monst **monst_list; /* &migrating_mons or &mydogs or null */
|
||||||
{
|
{
|
||||||
struct monst *mtmp;
|
struct monst *mtmp;
|
||||||
boolean unhide = (monst_list != 0);
|
|
||||||
int mx = mon->mx, my = mon->my;
|
int mx = mon->mx, my = mon->my;
|
||||||
|
boolean on_map = (m_at(mx, my) == mon),
|
||||||
|
unhide = (monst_list != 0);
|
||||||
|
|
||||||
if (!fmon)
|
if (!fmon)
|
||||||
panic("relmon: no fmon available.");
|
panic("relmon: no fmon available.");
|
||||||
@@ -1633,10 +1634,12 @@ struct monst **monst_list; /* &migrating_mons or &mydogs or null */
|
|||||||
seemimic(mon);
|
seemimic(mon);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mon->wormno)
|
if (on_map) {
|
||||||
remove_worm(mon);
|
if (mon->wormno)
|
||||||
else
|
remove_worm(mon);
|
||||||
remove_monster(mx, my);
|
else
|
||||||
|
remove_monster(mx, my);
|
||||||
|
}
|
||||||
|
|
||||||
if (mon == fmon) {
|
if (mon == fmon) {
|
||||||
fmon = fmon->nmon;
|
fmon = fmon->nmon;
|
||||||
@@ -1652,7 +1655,8 @@ struct monst **monst_list; /* &migrating_mons or &mydogs or null */
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (unhide) {
|
if (unhide) {
|
||||||
newsym(mx, my);
|
if (on_map)
|
||||||
|
newsym(mx, my);
|
||||||
/* insert into mydogs or migrating_mons */
|
/* insert into mydogs or migrating_mons */
|
||||||
mon->nmon = *monst_list;
|
mon->nmon = *monst_list;
|
||||||
*monst_list = mon;
|
*monst_list = mon;
|
||||||
@@ -2515,7 +2519,7 @@ struct monst *mtmp;
|
|||||||
{
|
{
|
||||||
unstuck(mtmp);
|
unstuck(mtmp);
|
||||||
mdrop_special_objs(mtmp);
|
mdrop_special_objs(mtmp);
|
||||||
migrate_to_level(mtmp, ledger_no(&u.uz), MIGR_APPROX_XY, NULL);
|
migrate_to_level(mtmp, ledger_no(&u.uz), MIGR_APPROX_XY, (coord *) 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* make monster mtmp next to you (if possible);
|
/* make monster mtmp next to you (if possible);
|
||||||
@@ -2823,40 +2827,34 @@ boolean via_attack;
|
|||||||
void
|
void
|
||||||
wake_nearby()
|
wake_nearby()
|
||||||
{
|
{
|
||||||
register struct monst *mtmp;
|
wake_nearto(u.ux, u.uy, u.ulevel * 20);
|
||||||
|
|
||||||
for (mtmp = fmon; mtmp; mtmp = mtmp->nmon) {
|
|
||||||
if (DEADMONSTER(mtmp))
|
|
||||||
continue;
|
|
||||||
if (distu(mtmp->mx, mtmp->my) < u.ulevel * 20) {
|
|
||||||
mtmp->msleeping = 0;
|
|
||||||
if (!unique_corpstat(mtmp->data))
|
|
||||||
mtmp->mstrategy &= ~STRAT_WAITMASK;
|
|
||||||
if (mtmp->mtame) {
|
|
||||||
if (!mtmp->isminion)
|
|
||||||
EDOG(mtmp)->whistletime = moves;
|
|
||||||
/* Clear mtrack. This is to fix up a pet who is
|
|
||||||
stuck "fleeing" its master. */
|
|
||||||
memset(mtmp->mtrack, 0, sizeof(mtmp->mtrack));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Wake up monsters near some particular location. */
|
/* Wake up monsters near some particular location. */
|
||||||
void
|
void
|
||||||
wake_nearto(x, y, distance)
|
wake_nearto(x, y, distance)
|
||||||
register int x, y, distance;
|
int x, y, distance;
|
||||||
{
|
{
|
||||||
register struct monst *mtmp;
|
struct monst *mtmp;
|
||||||
|
|
||||||
for (mtmp = fmon; mtmp; mtmp = mtmp->nmon) {
|
for (mtmp = fmon; mtmp; mtmp = mtmp->nmon) {
|
||||||
if (DEADMONSTER(mtmp))
|
if (DEADMONSTER(mtmp))
|
||||||
continue;
|
continue;
|
||||||
if (distance == 0 || dist2(mtmp->mx, mtmp->my, x, y) < distance) {
|
if (distance == 0 || dist2(mtmp->mx, mtmp->my, x, y) < distance) {
|
||||||
mtmp->msleeping = 0;
|
/* sleep for N turns uses mtmp->mfrozen, but so does paralysis
|
||||||
if (!unique_corpstat(mtmp->data))
|
so we leave mfrozen monsters alone */
|
||||||
mtmp->mstrategy &= ~STRAT_WAITMASK;
|
mtmp->msleeping = 0; /* wake indeterminate sleep */
|
||||||
|
if (!(mtmp->data->geno & G_UNIQ))
|
||||||
|
mtmp->mstrategy &= ~STRAT_WAITMASK; /* wake 'meditation' */
|
||||||
|
if (context.mon_moving)
|
||||||
|
continue;
|
||||||
|
if (mtmp->mtame) {
|
||||||
|
if (!mtmp->isminion)
|
||||||
|
EDOG(mtmp)->whistletime = moves;
|
||||||
|
/* Clear mtrack. This is to fix up a pet who is
|
||||||
|
stuck "fleeing" its master. */
|
||||||
|
memset(mtmp->mtrack, 0, sizeof mtmp->mtrack);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+63
-39
@@ -1340,64 +1340,88 @@ boolean do_mons; /* True => monsters, False => objects */
|
|||||||
destroy_nhwindow(win);
|
destroy_nhwindow(win);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static const char *suptext1[] = {
|
||||||
|
"%s is a member of a marauding horde of orcs",
|
||||||
|
"rumored to have brutally attacked and plundered",
|
||||||
|
"the ordinarily sheltered town that is located ",
|
||||||
|
"deep within The Gnomish Mines.",
|
||||||
|
"",
|
||||||
|
"The members of that vicious horde proudly and ",
|
||||||
|
"defiantly acclaim their allegiance to their",
|
||||||
|
"leader %s in their names.",
|
||||||
|
(char *) 0,
|
||||||
|
};
|
||||||
|
|
||||||
|
static const char *suptext2[] = {
|
||||||
|
"%s is a nefarious orc who is known to acquire",
|
||||||
|
"property from thieves and sell it off for profit",
|
||||||
|
"or gain. The perpetrator was last seen hanging",
|
||||||
|
"around the stairs leading to the Gnomish Mines.",
|
||||||
|
(char *) 0,
|
||||||
|
};
|
||||||
|
|
||||||
void
|
void
|
||||||
do_supplemental_info(name, pm, without_asking)
|
do_supplemental_info(name, pm, without_asking)
|
||||||
char *name;
|
char *name;
|
||||||
struct permonst *pm;
|
struct permonst *pm;
|
||||||
boolean without_asking;
|
boolean without_asking;
|
||||||
{
|
{
|
||||||
|
const char **textp;
|
||||||
winid datawin = WIN_ERR;
|
winid datawin = WIN_ERR;
|
||||||
char *entrytext = name, *bp;
|
char *entrytext = name, *bp = (char *) 0, *bp2 = (char *) 0;
|
||||||
char question[QBUFSZ];
|
char question[QBUFSZ];
|
||||||
boolean yes_to_moreinfo = FALSE;
|
boolean yes_to_moreinfo = FALSE;
|
||||||
|
boolean is_marauder = (name && pm && is_orc(pm));
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Provide some info on some specific things
|
* Provide some info on some specific things
|
||||||
* meant to support in-game mythology, and not
|
* meant to support in-game mythology, and not
|
||||||
* available from data.base or other sources.
|
* available from data.base or other sources.
|
||||||
*/
|
*/
|
||||||
if (name && pm && is_orc(pm) && (strlen(name) < (BUFSZ - 1))
|
if (is_marauder && (strlen(name) < (BUFSZ - 1))) {
|
||||||
&& (bp = strstri(name, " of ")) != 0) {
|
|
||||||
char fullname[BUFSZ];
|
char fullname[BUFSZ];
|
||||||
|
|
||||||
Strcpy(fullname, name);
|
bp = strstri(name, " of ");
|
||||||
if (!without_asking) {
|
bp2 = strstri(name, " the Fence");
|
||||||
Strcpy(question, "More info about \"");
|
|
||||||
/* +2 => length of "\"?" */
|
|
||||||
copynchars(eos(question), entrytext,
|
|
||||||
(int) (sizeof question - 1 - (strlen(question) + 2)));
|
|
||||||
Strcat(question, "\"?");
|
|
||||||
if (yn(question) == 'y')
|
|
||||||
yes_to_moreinfo = TRUE;
|
|
||||||
}
|
|
||||||
if (yes_to_moreinfo) {
|
|
||||||
int i, subs = 0;
|
|
||||||
char *gang = bp + 4;
|
|
||||||
static const char *text[] = {
|
|
||||||
"%s is a member of a marauding horde of orcs",
|
|
||||||
"rumored to have brutally attacked and plundered the ordinarily",
|
|
||||||
"sheltered town that is located deep within The Gnomish Mines.",
|
|
||||||
"",
|
|
||||||
"The members of that vicious horde proudly and defiantly acclaim",
|
|
||||||
"their allegiance to their leader %s in their names.",
|
|
||||||
};
|
|
||||||
|
|
||||||
*bp = '\0';
|
if (bp || bp2) {
|
||||||
datawin = create_nhwindow(NHW_MENU);
|
Strcpy(fullname, name);
|
||||||
for (i = 0; i < SIZE(text); i++) {
|
if (!without_asking) {
|
||||||
char buf[BUFSZ];
|
Strcpy(question, "More info about \"");
|
||||||
const char *txt;
|
/* +2 => length of "\"?" */
|
||||||
|
copynchars(eos(question), entrytext,
|
||||||
if (strstri(text[i], "%s") != 0) {
|
(int) (sizeof question - 1 - (strlen(question) + 2)));
|
||||||
Sprintf(buf, text[i],
|
Strcat(question, "\"?");
|
||||||
subs++ ? gang : fullname);
|
if (yn(question) == 'y')
|
||||||
txt = buf;
|
yes_to_moreinfo = TRUE;
|
||||||
} else
|
}
|
||||||
txt = text[i];
|
if (yes_to_moreinfo) {
|
||||||
putstr(datawin, 0, txt);
|
int i, subs = 0;
|
||||||
|
char *gang = (char *) 0;
|
||||||
|
|
||||||
|
if (bp) {
|
||||||
|
textp = suptext1;
|
||||||
|
gang = bp + 4;
|
||||||
|
*bp = '\0';
|
||||||
|
} else {
|
||||||
|
textp = suptext2;
|
||||||
|
gang = "";
|
||||||
|
}
|
||||||
|
datawin = create_nhwindow(NHW_MENU);
|
||||||
|
for (i = 0; textp[i]; i++) {
|
||||||
|
char buf[BUFSZ];
|
||||||
|
const char *txt;
|
||||||
|
|
||||||
|
if (strstri(textp[i], "%s") != 0) {
|
||||||
|
Sprintf(buf, textp[i], subs++ ? gang : fullname);
|
||||||
|
txt = buf;
|
||||||
|
} else
|
||||||
|
txt = textp[i];
|
||||||
|
putstr(datawin, 0, txt);
|
||||||
|
}
|
||||||
|
display_nhwindow(datawin, FALSE);
|
||||||
|
destroy_nhwindow(datawin), datawin = WIN_ERR;
|
||||||
}
|
}
|
||||||
display_nhwindow(datawin, FALSE);
|
|
||||||
destroy_nhwindow(datawin), datawin = WIN_ERR;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.6 shk.c $NHDT-Date: 1515144230 2018/01/05 09:23:50 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.136 $ */
|
/* NetHack 3.6 shk.c $NHDT-Date: 1542853899 2018/11/22 02:31:39 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.142 $ */
|
||||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/*-Copyright (c) Robert Patrick Rankin, 2012. */
|
/*-Copyright (c) Robert Patrick Rankin, 2012. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
@@ -2400,6 +2400,8 @@ register struct monst *shkp;
|
|||||||
{
|
{
|
||||||
register struct obj *otmp;
|
register struct obj *otmp;
|
||||||
|
|
||||||
|
if (SchroedingersBox(obj))
|
||||||
|
return;
|
||||||
for (otmp = obj->cobj; otmp; otmp = otmp->nobj) {
|
for (otmp = obj->cobj; otmp; otmp = otmp->nobj) {
|
||||||
if (otmp->oclass == COIN_CLASS)
|
if (otmp->oclass == COIN_CLASS)
|
||||||
continue;
|
continue;
|
||||||
@@ -2597,15 +2599,16 @@ char *buf;
|
|||||||
static const char *const honored[] = { "good", "honored", "most gracious",
|
static const char *const honored[] = { "good", "honored", "most gracious",
|
||||||
"esteemed",
|
"esteemed",
|
||||||
"most renowned and sacred" };
|
"most renowned and sacred" };
|
||||||
|
|
||||||
Strcat(buf, honored[rn2(SIZE(honored) - 1) + u.uevent.udemigod]);
|
Strcat(buf, honored[rn2(SIZE(honored) - 1) + u.uevent.udemigod]);
|
||||||
if (is_vampire(youmonst.data))
|
if (is_vampire(youmonst.data))
|
||||||
Strcat(buf, (flags.female) ? " dark lady" : " dark lord");
|
Strcat(buf, (flags.female) ? " dark lady" : " dark lord");
|
||||||
else if (is_elf(youmonst.data))
|
else if (is_elf(youmonst.data))
|
||||||
Strcat(buf, (flags.female) ? " hiril" : " hir");
|
Strcat(buf, (flags.female) ? " hiril" : " hir");
|
||||||
else
|
else
|
||||||
Strcat(buf, !is_human(youmonst.data) ? " creature" : (flags.female)
|
Strcat(buf, !is_human(youmonst.data) ? " creature"
|
||||||
? " lady"
|
: (flags.female) ? " lady"
|
||||||
: " sir");
|
: " sir");
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|||||||
+6
-3
@@ -1,4 +1,4 @@
|
|||||||
/* 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 $ */
|
/* NetHack 3.6 trap.c $NHDT-Date: 1543100476 2018/11/24 23:01:16 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.311 $ */
|
||||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/*-Copyright (c) Robert Patrick Rankin, 2013. */
|
/*-Copyright (c) Robert Patrick Rankin, 2013. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
@@ -3164,7 +3164,7 @@ domagictrap()
|
|||||||
|
|
||||||
if (fate < 10) {
|
if (fate < 10) {
|
||||||
/* Most of the time, it creates some monsters. */
|
/* Most of the time, it creates some monsters. */
|
||||||
register int cnt = rnd(4);
|
int cnt = rnd(4);
|
||||||
|
|
||||||
/* blindness effects */
|
/* blindness effects */
|
||||||
if (!resists_blnd(&youmonst)) {
|
if (!resists_blnd(&youmonst)) {
|
||||||
@@ -3189,6 +3189,9 @@ domagictrap()
|
|||||||
}
|
}
|
||||||
while (cnt--)
|
while (cnt--)
|
||||||
(void) makemon((struct permonst *) 0, u.ux, u.uy, NO_MM_FLAGS);
|
(void) makemon((struct permonst *) 0, u.ux, u.uy, NO_MM_FLAGS);
|
||||||
|
/* roar: wake monsters in vicinity, after placing trap-created ones */
|
||||||
|
wake_nearto(u.ux, u.uy, 7 * 7);
|
||||||
|
/* [flash: should probably also hit nearby gremlins with light] */
|
||||||
} else
|
} else
|
||||||
switch (fate) {
|
switch (fate) {
|
||||||
case 10:
|
case 10:
|
||||||
@@ -4038,7 +4041,7 @@ boolean force_failure;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* untrappable traps are located on the ground. */
|
/* untrappable traps are located on the ground. */
|
||||||
if (!can_reach_floor(TRUE)) {
|
if (!can_reach_floor(under_u)) {
|
||||||
if (u.usteed && P_SKILL(P_RIDING) < P_BASIC)
|
if (u.usteed && P_SKILL(P_RIDING) < P_BASIC)
|
||||||
rider_cant_reach();
|
rider_cant_reach();
|
||||||
else
|
else
|
||||||
|
|||||||
+2
-2
@@ -585,10 +585,10 @@ gd_mv_monaway(grd, nx,ny)
|
|||||||
register struct monst *grd;
|
register struct monst *grd;
|
||||||
int nx,ny;
|
int nx,ny;
|
||||||
{
|
{
|
||||||
if (MON_AT(nx, ny) && nx != grd->mx && ny != grd->my) {
|
if (MON_AT(nx, ny) && !(nx == grd->mx && ny == grd->my)) {
|
||||||
if (!Deaf)
|
if (!Deaf)
|
||||||
verbalize("Out of my way, scum!");
|
verbalize("Out of my way, scum!");
|
||||||
if (!rloc(m_at(nx, ny), FALSE) || m_at(nx, ny))
|
if (!rloc(m_at(nx, ny), FALSE) || MON_AT(nx, ny))
|
||||||
m_into_limbo(m_at(nx, ny));
|
m_into_limbo(m_at(nx, ny));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,6 +28,12 @@ CFLAGS+=-DHACKDIR=\"$(HACKDIR)\"
|
|||||||
CFLAGS+=-DDUMPLOG
|
CFLAGS+=-DDUMPLOG
|
||||||
CFLAGS+=-DCONFIG_ERROR_SECURE=FALSE
|
CFLAGS+=-DCONFIG_ERROR_SECURE=FALSE
|
||||||
CFLAGS+=-DCURSES_GRAPHICS
|
CFLAGS+=-DCURSES_GRAPHICS
|
||||||
|
#CFLAGS+=-DEXTRA_SANITY_CHECKS
|
||||||
|
#CFLAGS+=-DEDIT_GETLIN
|
||||||
|
#CFLAGS+=-DSCORE_ON_BOTL
|
||||||
|
#CFLAGS+=-DMSGHANDLER
|
||||||
|
#CFLAGS+=-DTTY_TILES_ESCCODES
|
||||||
|
#CFLAGS+=-DDLB
|
||||||
|
|
||||||
LINK=$(CC)
|
LINK=$(CC)
|
||||||
# Only needed for GLIBC stack trace:
|
# Only needed for GLIBC stack trace:
|
||||||
@@ -37,6 +43,10 @@ WINSRC = $(WINTTYSRC) $(WINCURSESSRC)
|
|||||||
WINOBJ = $(WINTTYOBJ) $(WINCURSESOBJ)
|
WINOBJ = $(WINTTYOBJ) $(WINCURSESOBJ)
|
||||||
WINLIB = $(WINTTYLIB) $(WINCURSESLIB)
|
WINLIB = $(WINTTYLIB) $(WINCURSESLIB)
|
||||||
|
|
||||||
|
# if TTY_TILES_ESCCODES
|
||||||
|
#WINSRC += tile.c
|
||||||
|
#WINOBJ += tile.o
|
||||||
|
|
||||||
WINTTYLIB=-lcurses
|
WINTTYLIB=-lcurses
|
||||||
|
|
||||||
CHOWN=true
|
CHOWN=true
|
||||||
|
|||||||
@@ -0,0 +1,31 @@
|
|||||||
|
#
|
||||||
|
# NetHack 3.6 linux $NHDT-Date: 1432512814 2018/11/23 16:00:00 $ $NHDT-Branch: master $:$NHDT-Revision: 1.12 $
|
||||||
|
# Copyright (c) Patric Mueller
|
||||||
|
# NetHack may be freely redistributed. See license for details.
|
||||||
|
#
|
||||||
|
#-PRE
|
||||||
|
# Hints file for a minimal build
|
||||||
|
# This hints file provides the base for a minimal tty build for Linux
|
||||||
|
|
||||||
|
PREFIX=$(wildcard ~)/nethack-minimal
|
||||||
|
HACKDIR=$(PREFIX)/games/lib/$(GAME)dir
|
||||||
|
SHELLDIR=$(PREFIX)/games
|
||||||
|
INSTDIR=$(HACKDIR)
|
||||||
|
VARDIR=$(HACKDIR)
|
||||||
|
|
||||||
|
CFLAGS=-g -I../include
|
||||||
|
|
||||||
|
LINK=$(CC)
|
||||||
|
|
||||||
|
WINSRC = $(WINTTYSRC)
|
||||||
|
WINOBJ = $(WINTTYOBJ)
|
||||||
|
WINLIB = $(WINTTYLIB)
|
||||||
|
|
||||||
|
WINTTYLIB=-lcurses
|
||||||
|
|
||||||
|
CHOWN=true
|
||||||
|
CHGRP=true
|
||||||
|
|
||||||
|
VARDIRPERM = 0755
|
||||||
|
VARFILEPERM = 0600
|
||||||
|
GAMEPERM = 0755
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
$ ! vms/vmsbuild.com -- compile and link NetHack 3.6.* [pr]
|
$ ! vms/vmsbuild.com -- compile and link NetHack 3.6.* [pr]
|
||||||
$ version_number = "3.6.2"
|
$ version_number = "3.6.2"
|
||||||
$ ! $NHDT-Date: 1542411224 2018/11/16 23:33:44 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.19 $
|
$ ! $NHDT-Date: 1542847646 2018/11/22 00:47:26 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.20 $
|
||||||
# Copyright (c) 2018 by Robert Patrick Rankin
|
$ ! Copyright (c) 2018 by Robert Patrick Rankin
|
||||||
# NetHack may be freely redistributed. See license for details.
|
$ ! NetHack may be freely redistributed. See license for details.
|
||||||
$ !
|
$ !
|
||||||
$ ! usage:
|
$ ! usage:
|
||||||
$ ! $ set default [.src] !or [-.-.src] if starting from [.sys.vms]
|
$ ! $ set default [.src] !or [-.-.src] if starting from [.sys.vms]
|
||||||
@@ -178,8 +178,13 @@ $ nethacklib = "[-.src]nethack.olb"
|
|||||||
$ create nethack.opt
|
$ create nethack.opt
|
||||||
! nethack.opt
|
! nethack.opt
|
||||||
nethack.olb/Include=(vmsmain)/Library
|
nethack.olb/Include=(vmsmain)/Library
|
||||||
|
! lib$initialize is used to call a routine (before main()) in vmsunix.c that
|
||||||
|
! tries to check whether debugger support has been linked in, for PANICTRACE
|
||||||
sys$library:starlet.olb/Include=(lib$initialize)
|
sys$library:starlet.olb/Include=(lib$initialize)
|
||||||
psect_attr=lib$initialize, Con,Usr,noPic,Rel,Gbl,noShr,noExe,Rd,noWrt,Long
|
! psect_attr=lib$initialize, Con,Usr,noPic,Rel,Gbl,noShr,noExe,Rd,noWrt,Long
|
||||||
|
! IA64 linker doesn't support Usr or Pic and complains that Long is too small
|
||||||
|
psect_attr=lib$initialize, Con,Rel,Gbl,noShr,noExe,Rd,noWrt
|
||||||
|
! increase memory available to RMS (the default iosegment is probably adequate)
|
||||||
iosegment=128
|
iosegment=128
|
||||||
$ if f$search("nethack.opt;-2").nes."" then purge/Keep=2/noLog nethack.opt
|
$ if f$search("nethack.opt;-2").nes."" then purge/Keep=2/noLog nethack.opt
|
||||||
$ milestone = "write sys$output f$fao("" !5%T "",0),"
|
$ milestone = "write sys$output f$fao("" !5%T "",0),"
|
||||||
|
|||||||
@@ -686,7 +686,8 @@ $(O)install.tag: $(DAT)\data $(DAT)\rumors $(DAT)\dungeon \
|
|||||||
if exist $(DOC)\nethack.txt copy $(DOC)\nethack.txt $(GAMEDIR)\NetHack.txt
|
if exist $(DOC)\nethack.txt copy $(DOC)\nethack.txt $(GAMEDIR)\NetHack.txt
|
||||||
@if exist $(GAMEDIR)\NetHack.PDB echo NOTE: You may want to remove $(GAMEDIR:\=/)/NetHack.PDB to conserve space
|
@if exist $(GAMEDIR)\NetHack.PDB echo NOTE: You may want to remove $(GAMEDIR:\=/)/NetHack.PDB to conserve space
|
||||||
@if exist $(GAMEDIR)\NetHackW.PDB echo NOTE: You may want to remove $(GAMEDIR:\=/)/NetHackW.PDB to conserve space
|
@if exist $(GAMEDIR)\NetHackW.PDB echo NOTE: You may want to remove $(GAMEDIR:\=/)/NetHackW.PDB to conserve space
|
||||||
-if not exist $(GAMEDIR)\defaults.nh copy $(MSWSYS)\defaults.nh $(GAMEDIR)\defaults.nh
|
$(U)makedefs -c
|
||||||
|
-if not exist $(GAMEDIR)\defaults.nh copy fixed_defaults.nh $(GAMEDIR)\defaults.nh
|
||||||
-if not exist $(GAMEDIR)\record. goto>$(GAMEDIR)\record.
|
-if not exist $(GAMEDIR)\record. goto>$(GAMEDIR)\record.
|
||||||
echo install done > $@
|
echo install done > $@
|
||||||
|
|
||||||
@@ -1359,6 +1360,7 @@ clean:
|
|||||||
if exist $(U)dgncomp.exe del $(U)dgncomp.exe
|
if exist $(U)dgncomp.exe del $(U)dgncomp.exe
|
||||||
if exist $(SRC)\*.lnk del $(SRC)\*.lnk
|
if exist $(SRC)\*.lnk del $(SRC)\*.lnk
|
||||||
if exist $(SRC)\*.map del $(SRC)\*.map
|
if exist $(SRC)\*.map del $(SRC)\*.map
|
||||||
|
if exist $(SRC)\fixed_defaults.nh del $(SRC)\fixed_defaults.nh
|
||||||
if exist $(O)install.tag del $(O)install.tag
|
if exist $(O)install.tag del $(O)install.tag
|
||||||
if exist $(O)console.res del $(O)console.res
|
if exist $(O)console.res del $(O)console.res
|
||||||
if exist $(O)dgncomp.MAP del $(O)dgncomp.MAP
|
if exist $(O)dgncomp.MAP del $(O)dgncomp.MAP
|
||||||
|
|||||||
+57
-1
@@ -111,6 +111,15 @@ static const char SCCS_Id[] UNUSED = "@(#)makedefs.c\t3.6\t2018/03/02";
|
|||||||
#endif /* else !MAC */
|
#endif /* else !MAC */
|
||||||
#endif /* else !AMIGA */
|
#endif /* else !AMIGA */
|
||||||
|
|
||||||
|
#if !defined(STATUS_HILITES) && defined(WIN32)
|
||||||
|
#define FIX_SAMPLECONFIG
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef WIN32
|
||||||
|
#define SAMPLE_CONFIGFILE "../sys/winnt/defaults.nh"
|
||||||
|
#define FIXED_CONFIGFILE "./fixed_defaults.nh"
|
||||||
|
#endif
|
||||||
|
|
||||||
static const char
|
static const char
|
||||||
*Dont_Edit_Code =
|
*Dont_Edit_Code =
|
||||||
"/* This source file is generated by 'makedefs'. Do not edit. */\n",
|
"/* This source file is generated by 'makedefs'. Do not edit. */\n",
|
||||||
@@ -162,6 +171,9 @@ void NDECL(do_questtxt);
|
|||||||
void NDECL(do_rumors);
|
void NDECL(do_rumors);
|
||||||
void NDECL(do_oracles);
|
void NDECL(do_oracles);
|
||||||
void NDECL(do_vision);
|
void NDECL(do_vision);
|
||||||
|
#ifdef WIN32
|
||||||
|
void NDECL(do_fix_sampleconfig);
|
||||||
|
#endif
|
||||||
|
|
||||||
extern void NDECL(monst_init); /* monst.c */
|
extern void NDECL(monst_init); /* monst.c */
|
||||||
extern void NDECL(objects_init); /* objects.c */
|
extern void NDECL(objects_init); /* objects.c */
|
||||||
@@ -364,7 +376,12 @@ char *options;
|
|||||||
case 'Z':
|
case 'Z':
|
||||||
do_vision();
|
do_vision();
|
||||||
break;
|
break;
|
||||||
|
#ifdef WIN32
|
||||||
|
case 'c':
|
||||||
|
case 'C':
|
||||||
|
do_fix_sampleconfig();
|
||||||
|
break;
|
||||||
|
#endif
|
||||||
default:
|
default:
|
||||||
Fprintf(stderr, "Unknown option '%c'.\n", *options);
|
Fprintf(stderr, "Unknown option '%c'.\n", *options);
|
||||||
(void) fflush(stderr);
|
(void) fflush(stderr);
|
||||||
@@ -1457,6 +1474,45 @@ char *githash, *gitbranch;
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef WIN32
|
||||||
|
void
|
||||||
|
do_fix_sampleconfig()
|
||||||
|
{
|
||||||
|
FILE *scfp, *ofcfp;
|
||||||
|
char fixedline[600];
|
||||||
|
char *line;
|
||||||
|
|
||||||
|
if (!(scfp = fopen(SAMPLE_CONFIGFILE, RDTMODE))) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (!(ofcfp = fopen(FIXED_CONFIGFILE, WRTMODE))) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* read the sample config file */
|
||||||
|
while ((line = fgetline(scfp)) != 0) {
|
||||||
|
/* comment out the STATUS_HILITES related lines */
|
||||||
|
if (strlen(line) < (600 - 1)) {
|
||||||
|
if (strstr(line, "statushilites") || strstr(line, "hilite_status:")) {
|
||||||
|
#ifdef FIX_SAMPLECONFIG
|
||||||
|
fixedline[0] = '#';
|
||||||
|
Strcpy(&fixedline[1], line);
|
||||||
|
#else
|
||||||
|
Strcpy(fixedline, line);
|
||||||
|
#endif
|
||||||
|
fputs(fixedline, ofcfp);
|
||||||
|
} else {
|
||||||
|
fputs(line, ofcfp);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
free(line);
|
||||||
|
}
|
||||||
|
Fclose(scfp);
|
||||||
|
Fclose(ofcfp);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
#endif /* WIN32 */
|
||||||
|
|
||||||
static int
|
static int
|
||||||
case_insensitive_comp(s1, s2)
|
case_insensitive_comp(s1, s2)
|
||||||
const char *s1;
|
const char *s1;
|
||||||
|
|||||||
+20
-18
@@ -3612,26 +3612,10 @@ const char *fmt;
|
|||||||
boolean enable;
|
boolean enable;
|
||||||
{
|
{
|
||||||
genl_status_enablefield(fieldidx, nm, fmt, enable);
|
genl_status_enablefield(fieldidx, nm, fmt, enable);
|
||||||
|
#ifdef STATUS_HILITES
|
||||||
/* force re-evaluation of last field on the row */
|
/* force re-evaluation of last field on the row */
|
||||||
setlast = FALSE;
|
setlast = FALSE;
|
||||||
}
|
#endif
|
||||||
|
|
||||||
void
|
|
||||||
do_setlast()
|
|
||||||
{
|
|
||||||
int i, row, fld;
|
|
||||||
|
|
||||||
setlast = TRUE;
|
|
||||||
for (row = 0; row < 2; ++row)
|
|
||||||
for (i = MAX_PER_ROW - 1; i > 0; --i) {
|
|
||||||
fld = fieldorder[row][i];
|
|
||||||
|
|
||||||
if (fld == BL_FLUSH || !status_activefields[fld])
|
|
||||||
continue;
|
|
||||||
|
|
||||||
last_on_row[row] = fld;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef STATUS_HILITES
|
#ifdef STATUS_HILITES
|
||||||
@@ -3807,6 +3791,24 @@ unsigned long *colormasks;
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
do_setlast()
|
||||||
|
{
|
||||||
|
int i, row, fld;
|
||||||
|
|
||||||
|
setlast = TRUE;
|
||||||
|
for (row = 0; row < 2; ++row)
|
||||||
|
for (i = MAX_PER_ROW - 1; i > 0; --i) {
|
||||||
|
fld = fieldorder[row][i];
|
||||||
|
|
||||||
|
if (fld == BL_FLUSH || !status_activefields[fld])
|
||||||
|
continue;
|
||||||
|
|
||||||
|
last_on_row[row] = fld;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
STATIC_OVL int
|
STATIC_OVL int
|
||||||
make_things_fit(force_update)
|
make_things_fit(force_update)
|
||||||
boolean force_update;
|
boolean force_update;
|
||||||
|
|||||||
Reference in New Issue
Block a user