Merge branch 'NetHack-3.6.2'
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
$NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.225 $ $NHDT-Date: 1546770987 2019/01/06 10:36:27 $
|
$NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.226 $ $NHDT-Date: 1547118629 2019/01/10 11:10:29 $
|
||||||
|
|
||||||
This fixes36.2 file is here to capture information about updates in the 3.6.x
|
This fixes36.2 file is here to capture information about updates in the 3.6.x
|
||||||
lineage following the release of 3.6.1 in April 2018. Please note, however,
|
lineage following the release of 3.6.1 in April 2018. Please note, however,
|
||||||
@@ -327,6 +327,8 @@ when ^T resorted to the teleport-away spell if hero didn't have intrinsic
|
|||||||
than casting with 'Z'; ^T also required that the corresponding book
|
than casting with 'Z'; ^T also required that the corresponding book
|
||||||
be known even though knowing and casting a spell should be (and is
|
be known even though knowing and casting a spell should be (and is
|
||||||
with 'Z') possible after forgetting the spellbook due to amnesia
|
with 'Z') possible after forgetting the spellbook due to amnesia
|
||||||
|
setting SEDUCE=0 made all succubus and incubus attacks be described as
|
||||||
|
smiling engagingly or seductively rather than hitting or missing
|
||||||
|
|
||||||
|
|
||||||
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
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.6 mondata.h $NHDT-Date: 1513297342 2017/12/15 00:22:22 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.33 $ */
|
/* NetHack 3.6 mondata.h $NHDT-Date: 1547086248 2019/01/10 02:10:48 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.35 $ */
|
||||||
/* Copyright (c) 1989 Mike Threepoint */
|
/* Copyright (c) 1989 Mike Threepoint */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
|
|
||||||
@@ -127,9 +127,9 @@
|
|||||||
#define is_longworm(ptr) \
|
#define is_longworm(ptr) \
|
||||||
(((ptr) == &mons[PM_BABY_LONG_WORM]) || ((ptr) == &mons[PM_LONG_WORM]) \
|
(((ptr) == &mons[PM_BABY_LONG_WORM]) || ((ptr) == &mons[PM_LONG_WORM]) \
|
||||||
|| ((ptr) == &mons[PM_LONG_WORM_TAIL]))
|
|| ((ptr) == &mons[PM_LONG_WORM_TAIL]))
|
||||||
#define is_covetous(ptr) ((ptr->mflags3 & M3_COVETOUS))
|
#define is_covetous(ptr) (((ptr)->mflags3 & M3_COVETOUS))
|
||||||
#define infravision(ptr) ((ptr->mflags3 & M3_INFRAVISION))
|
#define infravision(ptr) (((ptr)->mflags3 & M3_INFRAVISION))
|
||||||
#define infravisible(ptr) ((ptr->mflags3 & M3_INFRAVISIBLE))
|
#define infravisible(ptr) (((ptr)->mflags3 & M3_INFRAVISIBLE))
|
||||||
#define is_displacer(ptr) (((ptr)->mflags3 & M3_DISPLACES) != 0L)
|
#define is_displacer(ptr) (((ptr)->mflags3 & M3_DISPLACES) != 0L)
|
||||||
#define is_mplayer(ptr) \
|
#define is_mplayer(ptr) \
|
||||||
(((ptr) >= &mons[PM_ARCHEOLOGIST]) && ((ptr) <= &mons[PM_WIZARD]))
|
(((ptr) >= &mons[PM_ARCHEOLOGIST]) && ((ptr) <= &mons[PM_WIZARD]))
|
||||||
|
|||||||
46
src/attrib.c
46
src/attrib.c
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.6 attrib.c $NHDT-Date: 1494034337 2017/05/06 01:32:17 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.62 $ */
|
/* NetHack 3.6 attrib.c $NHDT-Date: 1547086687 2019/01/10 02:18:07 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.64 $ */
|
||||||
/* Copyright 1988, 1989, 1990, 1992, M. Stephenson */
|
/* Copyright 1988, 1989, 1990, 1992, M. Stephenson */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
|
|
||||||
@@ -115,7 +115,7 @@ adjattrib(ndx, incr, msgflg)
|
|||||||
int ndx, incr;
|
int ndx, incr;
|
||||||
int msgflg; /* positive => no message, zero => message, and */
|
int msgflg; /* positive => no message, zero => message, and */
|
||||||
{ /* negative => conditional (msg if change made) */
|
{ /* negative => conditional (msg if change made) */
|
||||||
int old_acurr, old_abase;
|
int old_acurr, old_abase, old_amax, decr;
|
||||||
boolean abonflg;
|
boolean abonflg;
|
||||||
const char *attrstr;
|
const char *attrstr;
|
||||||
|
|
||||||
@@ -130,23 +130,38 @@ int msgflg; /* positive => no message, zero => message, and */
|
|||||||
|
|
||||||
old_acurr = ACURR(ndx);
|
old_acurr = ACURR(ndx);
|
||||||
old_abase = ABASE(ndx);
|
old_abase = ABASE(ndx);
|
||||||
|
old_amax = AMAX(ndx);
|
||||||
|
ABASE(ndx) += incr; /* when incr is negative, this reduces ABASE() */
|
||||||
if (incr > 0) {
|
if (incr > 0) {
|
||||||
ABASE(ndx) += incr;
|
|
||||||
if (ABASE(ndx) > AMAX(ndx)) {
|
if (ABASE(ndx) > AMAX(ndx)) {
|
||||||
incr = ABASE(ndx) - AMAX(ndx);
|
AMAX(ndx) = ABASE(ndx);
|
||||||
AMAX(ndx) += incr;
|
|
||||||
if (AMAX(ndx) > ATTRMAX(ndx))
|
if (AMAX(ndx) > ATTRMAX(ndx))
|
||||||
AMAX(ndx) = ATTRMAX(ndx);
|
ABASE(ndx) = AMAX(ndx) = ATTRMAX(ndx);
|
||||||
ABASE(ndx) = AMAX(ndx);
|
|
||||||
}
|
}
|
||||||
attrstr = plusattr[ndx];
|
attrstr = plusattr[ndx];
|
||||||
abonflg = (ABON(ndx) < 0);
|
abonflg = (ABON(ndx) < 0);
|
||||||
} else {
|
} else { /* incr is negative */
|
||||||
ABASE(ndx) += incr;
|
|
||||||
if (ABASE(ndx) < ATTRMIN(ndx)) {
|
if (ABASE(ndx) < ATTRMIN(ndx)) {
|
||||||
incr = ABASE(ndx) - ATTRMIN(ndx);
|
/*
|
||||||
|
* If base value has dropped so low that it is trying to be
|
||||||
|
* taken below the minimum, reduce max value (peak reached)
|
||||||
|
* instead. That means that restore ability and repeated
|
||||||
|
* applications of unicorn horn will not be able to recover
|
||||||
|
* all the lost value. Starting will 3.6.2, we only take away
|
||||||
|
* some (average half, possibly zero) of the excess from max
|
||||||
|
* instead of all of it, but without intervening recovery, it
|
||||||
|
* can still eventually drop to the minimum allowed. After
|
||||||
|
* that, it can't be recovered, only improved with new gains.
|
||||||
|
*
|
||||||
|
* This used to assign a new negative value to incr and then
|
||||||
|
* add it, but that could affect messages below, possibly
|
||||||
|
* making a large decrease be described as a small one.
|
||||||
|
*
|
||||||
|
* decr = rn2(-(ABASE - ATTRMIN) + 1);
|
||||||
|
*/
|
||||||
|
decr = rn2(ATTRMIN(ndx) - ABASE(ndx) + 1);
|
||||||
ABASE(ndx) = ATTRMIN(ndx);
|
ABASE(ndx) = ATTRMIN(ndx);
|
||||||
AMAX(ndx) += incr;
|
AMAX(ndx) -= decr;
|
||||||
if (AMAX(ndx) < ATTRMIN(ndx))
|
if (AMAX(ndx) < ATTRMIN(ndx))
|
||||||
AMAX(ndx) = ATTRMIN(ndx);
|
AMAX(ndx) = ATTRMIN(ndx);
|
||||||
}
|
}
|
||||||
@@ -155,12 +170,15 @@ int msgflg; /* positive => no message, zero => message, and */
|
|||||||
}
|
}
|
||||||
if (ACURR(ndx) == old_acurr) {
|
if (ACURR(ndx) == old_acurr) {
|
||||||
if (msgflg == 0 && flags.verbose) {
|
if (msgflg == 0 && flags.verbose) {
|
||||||
if (ABASE(ndx) == old_abase)
|
if (ABASE(ndx) == old_abase && AMAX(ndx) == old_amax) {
|
||||||
pline("You're %s as %s as you can get.",
|
pline("You're %s as %s as you can get.",
|
||||||
abonflg ? "currently" : "already", attrstr);
|
abonflg ? "currently" : "already", attrstr);
|
||||||
else /* current stayed the same but base value changed */
|
} else {
|
||||||
|
/* current stayed the same but base value changed, or
|
||||||
|
base is at minimum and reduction caused max to drop */
|
||||||
Your("innate %s has %s.", attrname[ndx],
|
Your("innate %s has %s.", attrname[ndx],
|
||||||
(incr > 0) ? "improved" : "declined");
|
(incr > 0) ? "improved" : "declined");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
@@ -582,7 +600,7 @@ exerchk()
|
|||||||
(mod_val > 0) ? "must have been" : "haven't been",
|
(mod_val > 0) ? "must have been" : "haven't been",
|
||||||
exertext[i][(mod_val > 0) ? 0 : 1]);
|
exertext[i][(mod_val > 0) ? 0 : 1]);
|
||||||
}
|
}
|
||||||
nextattrib:
|
nextattrib:
|
||||||
/* this used to be ``AEXE(i) /= 2'' but that would produce
|
/* this used to be ``AEXE(i) /= 2'' but that would produce
|
||||||
platform-dependent rounding/truncation for negative vals */
|
platform-dependent rounding/truncation for negative vals */
|
||||||
AEXE(i) = (abs(ax) / 2) * mod_val;
|
AEXE(i) = (abs(ax) / 2) * mod_val;
|
||||||
|
|||||||
15
src/do.c
15
src/do.c
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.6 do.c $NHDT-Date: 1545597418 2018/12/23 20:36:58 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.182 $ */
|
/* NetHack 3.6 do.c $NHDT-Date: 1547086513 2019/01/10 02:15:13 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.183 $ */
|
||||||
/* 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. */
|
||||||
@@ -369,7 +369,7 @@ register struct obj *obj;
|
|||||||
goto giveback;
|
goto giveback;
|
||||||
case RIN_SLOW_DIGESTION:
|
case RIN_SLOW_DIGESTION:
|
||||||
pline_The("ring is regurgitated!");
|
pline_The("ring is regurgitated!");
|
||||||
giveback:
|
giveback:
|
||||||
obj->in_use = FALSE;
|
obj->in_use = FALSE;
|
||||||
dropx(obj);
|
dropx(obj);
|
||||||
trycall(obj);
|
trycall(obj);
|
||||||
@@ -888,7 +888,7 @@ int retry;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
drop_done:
|
drop_done:
|
||||||
return n_dropped;
|
return n_dropped;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1688,17 +1688,16 @@ struct obj *corpse;
|
|||||||
where = corpse->where;
|
where = corpse->where;
|
||||||
is_uwep = (corpse == uwep);
|
is_uwep = (corpse == uwep);
|
||||||
chewed = (corpse->oeaten != 0);
|
chewed = (corpse->oeaten != 0);
|
||||||
Strcpy(cname,
|
Strcpy(cname, corpse_xname(corpse,
|
||||||
corpse_xname(corpse, chewed ? "bite-covered" : (const char *) 0,
|
chewed ? "bite-covered" : (const char *) 0,
|
||||||
CXN_SINGULAR));
|
CXN_SINGULAR));
|
||||||
mcarry = (where == OBJ_MINVENT) ? corpse->ocarry : 0;
|
mcarry = (where == OBJ_MINVENT) ? corpse->ocarry : 0;
|
||||||
|
|
||||||
if (where == OBJ_CONTAINED) {
|
if (where == OBJ_CONTAINED) {
|
||||||
struct monst *mtmp2;
|
struct monst *mtmp2;
|
||||||
|
|
||||||
container = corpse->ocontainer;
|
container = corpse->ocontainer;
|
||||||
mtmp2 =
|
mtmp2 = get_container_location(container, &container_where, (int *) 0);
|
||||||
get_container_location(container, &container_where, (int *) 0);
|
|
||||||
/* container_where is the outermost container's location even if
|
/* container_where is the outermost container's location even if
|
||||||
* nested */
|
* nested */
|
||||||
if (container_where == OBJ_MINVENT && mtmp2)
|
if (container_where == OBJ_MINVENT && mtmp2)
|
||||||
|
|||||||
17
src/dokick.c
17
src/dokick.c
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.6 dokick.c $NHDT-Date: 1543185070 2018/11/25 22:31:10 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.128 $ */
|
/* NetHack 3.6 dokick.c $NHDT-Date: 1547086527 2019/01/10 02:15:27 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.129 $ */
|
||||||
/* Copyright (c) Izchak Miller, Mike Stephenson, Steve Linhart, 1989. */
|
/* Copyright (c) Izchak Miller, Mike Stephenson, Steve Linhart, 1989. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
|
|
||||||
@@ -242,7 +242,7 @@ xchar x, y;
|
|||||||
|
|
||||||
else if (uarm && objects[uarm->otyp].oc_bulky && ACURR(A_DEX) < rnd(25))
|
else if (uarm && objects[uarm->otyp].oc_bulky && ACURR(A_DEX) < rnd(25))
|
||||||
clumsy = TRUE;
|
clumsy = TRUE;
|
||||||
doit:
|
doit:
|
||||||
You("kick %s.", mon_nam(mon));
|
You("kick %s.", mon_nam(mon));
|
||||||
if (!rn2(clumsy ? 3 : 4) && (clumsy || !bigmonst(mon->data))
|
if (!rn2(clumsy ? 3 : 4) && (clumsy || !bigmonst(mon->data))
|
||||||
&& mon->mcansee && !mon->mtrapped && !thick_skinned(mon->data)
|
&& mon->mcansee && !mon->mtrapped && !thick_skinned(mon->data)
|
||||||
@@ -1198,7 +1198,7 @@ dokick()
|
|||||||
|| IS_STWALL(g.maploc->typ)) {
|
|| IS_STWALL(g.maploc->typ)) {
|
||||||
if (!IS_STWALL(g.maploc->typ) && g.maploc->ladder == LA_DOWN)
|
if (!IS_STWALL(g.maploc->typ) && g.maploc->ladder == LA_DOWN)
|
||||||
goto dumb;
|
goto dumb;
|
||||||
ouch:
|
ouch:
|
||||||
pline("Ouch! That hurts!");
|
pline("Ouch! That hurts!");
|
||||||
exercise(A_DEX, FALSE);
|
exercise(A_DEX, FALSE);
|
||||||
exercise(A_STR, FALSE);
|
exercise(A_STR, FALSE);
|
||||||
@@ -1225,7 +1225,7 @@ dokick()
|
|||||||
|
|
||||||
if (g.maploc->doormask == D_ISOPEN || g.maploc->doormask == D_BROKEN
|
if (g.maploc->doormask == D_ISOPEN || g.maploc->doormask == D_BROKEN
|
||||||
|| g.maploc->doormask == D_NODOOR) {
|
|| g.maploc->doormask == D_NODOOR) {
|
||||||
dumb:
|
dumb:
|
||||||
exercise(A_DEX, FALSE);
|
exercise(A_DEX, FALSE);
|
||||||
if (martial() || ACURR(A_DEX) >= 16 || rn2(3)) {
|
if (martial() || ACURR(A_DEX) >= 16 || rn2(3)) {
|
||||||
You("kick at empty space.");
|
You("kick at empty space.");
|
||||||
@@ -1407,10 +1407,11 @@ xchar dlev; /* if !0 send to dlev near player */
|
|||||||
obj_extract_self(obj);
|
obj_extract_self(obj);
|
||||||
|
|
||||||
if (costly) {
|
if (costly) {
|
||||||
price += stolen_value(
|
price += stolen_value(obj, x, y,
|
||||||
obj, x, y, (costly_spot(u.ux, u.uy)
|
(costly_spot(u.ux, u.uy)
|
||||||
&& index(u.urooms, *in_rooms(x, y, SHOPBASE))),
|
&& index(u.urooms,
|
||||||
TRUE);
|
*in_rooms(x, y, SHOPBASE))),
|
||||||
|
TRUE);
|
||||||
/* set obj->no_charge to 0 */
|
/* set obj->no_charge to 0 */
|
||||||
if (Has_contents(obj))
|
if (Has_contents(obj))
|
||||||
picked_container(obj); /* does the right thing */
|
picked_container(obj); /* does the right thing */
|
||||||
|
|||||||
11
src/lock.c
11
src/lock.c
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.6 lock.c $NHDT-Date: 1544442712 2018/12/10 11:51:52 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.82 $ */
|
/* NetHack 3.6 lock.c $NHDT-Date: 1547086531 2019/01/10 02:15:31 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.83 $ */
|
||||||
/* 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. */
|
||||||
@@ -186,12 +186,13 @@ boolean destroyit;
|
|||||||
if (!rn2(3) || otmp->oclass == POTION_CLASS) {
|
if (!rn2(3) || otmp->oclass == POTION_CLASS) {
|
||||||
chest_shatter_msg(otmp);
|
chest_shatter_msg(otmp);
|
||||||
if (costly)
|
if (costly)
|
||||||
loss +=
|
loss += stolen_value(otmp, u.ux, u.uy, peaceful_shk, TRUE);
|
||||||
stolen_value(otmp, u.ux, u.uy, peaceful_shk, TRUE);
|
|
||||||
if (otmp->quan == 1L) {
|
if (otmp->quan == 1L) {
|
||||||
obfree(otmp, (struct obj *) 0);
|
obfree(otmp, (struct obj *) 0);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
/* this works because we're sure to have at least 1 left;
|
||||||
|
otherwise it would fail since otmp is not in inventory */
|
||||||
useup(otmp);
|
useup(otmp);
|
||||||
}
|
}
|
||||||
if (box->otyp == ICE_BOX && otmp->otyp == CORPSE) {
|
if (box->otyp == ICE_BOX && otmp->otyp == CORPSE) {
|
||||||
@@ -737,7 +738,7 @@ boolean quietly;
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
if (OBJ_AT(x, y)) {
|
if (OBJ_AT(x, y)) {
|
||||||
objhere:
|
objhere:
|
||||||
if (!quietly)
|
if (!quietly)
|
||||||
pline("%s's in the way.", Something);
|
pline("%s's in the way.", Something);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
@@ -803,7 +804,7 @@ doclose()
|
|||||||
else if (portcullis || door->typ == DRAWBRIDGE_DOWN)
|
else if (portcullis || door->typ == DRAWBRIDGE_DOWN)
|
||||||
There("is no obvious way to close the drawbridge.");
|
There("is no obvious way to close the drawbridge.");
|
||||||
else {
|
else {
|
||||||
nodoor:
|
nodoor:
|
||||||
You("%s no door there.", Blind ? "feel" : "see");
|
You("%s no door there.", Blind ? "feel" : "see");
|
||||||
}
|
}
|
||||||
return res;
|
return res;
|
||||||
|
|||||||
10
src/mhitm.c
10
src/mhitm.c
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.6 mhitm.c $NHDT-Date: 1513297346 2017/12/15 00:22:26 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.99 $ */
|
/* NetHack 3.6 mhitm.c $NHDT-Date: 1547118629 2019/01/10 11:10:29 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.112 $ */
|
||||||
/* 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. */
|
||||||
@@ -904,7 +904,7 @@ register struct attack *mattk;
|
|||||||
case AD_WERE:
|
case AD_WERE:
|
||||||
case AD_HEAL:
|
case AD_HEAL:
|
||||||
case AD_PHYS:
|
case AD_PHYS:
|
||||||
physical:
|
physical:
|
||||||
if (mattk->aatyp == AT_KICK && thick_skinned(pd)) {
|
if (mattk->aatyp == AT_KICK && thick_skinned(pd)) {
|
||||||
tmp = 0;
|
tmp = 0;
|
||||||
} else if (mattk->aatyp == AT_WEAP) {
|
} else if (mattk->aatyp == AT_WEAP) {
|
||||||
@@ -1064,7 +1064,7 @@ register struct attack *mattk;
|
|||||||
case AD_STON:
|
case AD_STON:
|
||||||
if (magr->mcan)
|
if (magr->mcan)
|
||||||
break;
|
break;
|
||||||
do_stone:
|
do_stone:
|
||||||
/* may die from the acid if it eats a stone-curing corpse */
|
/* may die from the acid if it eats a stone-curing corpse */
|
||||||
if (munstone(mdef, FALSE))
|
if (munstone(mdef, FALSE))
|
||||||
goto post_stone;
|
goto post_stone;
|
||||||
@@ -1077,7 +1077,7 @@ register struct attack *mattk;
|
|||||||
if (g.vis && canseemon(mdef))
|
if (g.vis && canseemon(mdef))
|
||||||
pline("%s turns to stone!", Monnam(mdef));
|
pline("%s turns to stone!", Monnam(mdef));
|
||||||
monstone(mdef);
|
monstone(mdef);
|
||||||
post_stone:
|
post_stone:
|
||||||
if (!DEADMONSTER(mdef))
|
if (!DEADMONSTER(mdef))
|
||||||
return 0;
|
return 0;
|
||||||
else if (mdef->mtame && !g.vis)
|
else if (mdef->mtame && !g.vis)
|
||||||
@@ -1650,7 +1650,7 @@ int mdead;
|
|||||||
else
|
else
|
||||||
tmp = 0;
|
tmp = 0;
|
||||||
|
|
||||||
assess_dmg:
|
assess_dmg:
|
||||||
if ((magr->mhp -= tmp) <= 0) {
|
if ((magr->mhp -= tmp) <= 0) {
|
||||||
monkilled(magr, "", (int) mddat->mattk[i].adtyp);
|
monkilled(magr, "", (int) mddat->mattk[i].adtyp);
|
||||||
return (mdead | mhit | MM_AGR_DIED);
|
return (mdead | mhit | MM_AGR_DIED);
|
||||||
|
|||||||
49
src/mhitu.c
49
src/mhitu.c
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.6 mhitu.c $NHDT-Date: 1545130893 2018/12/18 11:01:33 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.160 $ */
|
/* NetHack 3.6 mhitu.c $NHDT-Date: 1547118629 2019/01/10 11:10:29 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.161 $ */
|
||||||
/* 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. */
|
||||||
@@ -264,6 +264,23 @@ struct attack *alt_attk_buf;
|
|||||||
struct attack *attk = &mptr->mattk[indx];
|
struct attack *attk = &mptr->mattk[indx];
|
||||||
struct obj *weap = (magr == &g.youmonst) ? uwep : MON_WEP(magr);
|
struct obj *weap = (magr == &g.youmonst) ? uwep : MON_WEP(magr);
|
||||||
|
|
||||||
|
/* honor SEDUCE=0 */
|
||||||
|
if (!SYSOPT_SEDUCE) {
|
||||||
|
extern const struct attack c_sa_no[NATTK];
|
||||||
|
|
||||||
|
/* if the first attack is for SSEX damage, all six attacks will be
|
||||||
|
substituted (expected succubus/incubus handling); if it isn't
|
||||||
|
but another one is, only that other one will be substituted */
|
||||||
|
if (mptr->mattk[0].adtyp == AD_SSEX) {
|
||||||
|
*alt_attk_buf = c_sa_no[indx];
|
||||||
|
attk = alt_attk_buf;
|
||||||
|
} else if (attk->adtyp == AD_SSEX) {
|
||||||
|
*alt_attk_buf = *attk;
|
||||||
|
attk = alt_attk_buf;
|
||||||
|
attk->adtyp = AD_DRLI;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* prevent a monster with two consecutive disease or hunger attacks
|
/* prevent a monster with two consecutive disease or hunger attacks
|
||||||
from hitting with both of them on the same turn; if the first has
|
from hitting with both of them on the same turn; if the first has
|
||||||
already hit, switch to a stun attack for the second */
|
already hit, switch to a stun attack for the second */
|
||||||
@@ -1111,7 +1128,7 @@ register struct attack *mattk;
|
|||||||
goto dopois;
|
goto dopois;
|
||||||
case AD_DRCO:
|
case AD_DRCO:
|
||||||
ptmp = A_CON;
|
ptmp = A_CON;
|
||||||
dopois:
|
dopois:
|
||||||
hitmsg(mtmp, mattk);
|
hitmsg(mtmp, mattk);
|
||||||
if (uncancelled && !rn2(8)) {
|
if (uncancelled && !rn2(8)) {
|
||||||
Sprintf(buf, "%s %s", s_suffix(Monnam(mtmp)),
|
Sprintf(buf, "%s %s", s_suffix(Monnam(mtmp)),
|
||||||
@@ -1230,7 +1247,7 @@ register struct attack *mattk;
|
|||||||
You_hear("%s hissing!", s_suffix(mon_nam(mtmp)));
|
You_hear("%s hissing!", s_suffix(mon_nam(mtmp)));
|
||||||
if (!rn2(10)
|
if (!rn2(10)
|
||||||
|| (flags.moonphase == NEW_MOON && !have_lizard())) {
|
|| (flags.moonphase == NEW_MOON && !have_lizard())) {
|
||||||
do_stone:
|
do_stone:
|
||||||
if (!Stoned && !Stone_resistance
|
if (!Stoned && !Stone_resistance
|
||||||
&& !(poly_when_stoned(g.youmonst.data)
|
&& !(poly_when_stoned(g.youmonst.data)
|
||||||
&& polymon(PM_STONE_GOLEM))) {
|
&& polymon(PM_STONE_GOLEM))) {
|
||||||
@@ -1322,7 +1339,10 @@ register struct attack *mattk;
|
|||||||
break;
|
break;
|
||||||
/* Continue below */
|
/* Continue below */
|
||||||
} else if (dmgtype(g.youmonst.data, AD_SEDU)
|
} else if (dmgtype(g.youmonst.data, AD_SEDU)
|
||||||
|| (SYSOPT_SEDUCE && dmgtype(g.youmonst.data, AD_SSEX))) {
|
/* !SYSOPT_SEDUCE: when hero is attacking and AD_SSEX
|
||||||
|
is disabled, it would be changed to another damage
|
||||||
|
type, but when defending, it remains as-is */
|
||||||
|
|| dmgtype(g.youmonst.data, AD_SSEX)) {
|
||||||
pline("%s %s.", Monnam(mtmp),
|
pline("%s %s.", Monnam(mtmp),
|
||||||
Deaf ? "says something but you can't hear it"
|
Deaf ? "says something but you can't hear it"
|
||||||
: mtmp->minvent
|
: mtmp->minvent
|
||||||
@@ -2015,7 +2035,7 @@ boolean ufound;
|
|||||||
static analysis complains that 'physical_damage' is always
|
static analysis complains that 'physical_damage' is always
|
||||||
False when tested below; it's right, but having that in
|
False when tested below; it's right, but having that in
|
||||||
place means one less thing to update if AD_PHYS gets added */
|
place means one less thing to update if AD_PHYS gets added */
|
||||||
common:
|
common:
|
||||||
|
|
||||||
if (!not_affected) {
|
if (!not_affected) {
|
||||||
if (ACURR(A_DEX) > rnd(20)) {
|
if (ACURR(A_DEX) > rnd(20)) {
|
||||||
@@ -2324,6 +2344,7 @@ struct attack *mattk;
|
|||||||
struct permonst *pagr;
|
struct permonst *pagr;
|
||||||
boolean agrinvis, defperc;
|
boolean agrinvis, defperc;
|
||||||
xchar genagr, gendef;
|
xchar genagr, gendef;
|
||||||
|
int adtyp = mattk ? mattk->adtyp : AD_PHYS;
|
||||||
|
|
||||||
if (is_animal(magr->data))
|
if (is_animal(magr->data))
|
||||||
return 0;
|
return 0;
|
||||||
@@ -2343,20 +2364,18 @@ struct attack *mattk;
|
|||||||
defperc = perceives(mdef->data);
|
defperc = perceives(mdef->data);
|
||||||
gendef = gender(mdef);
|
gendef = gender(mdef);
|
||||||
}
|
}
|
||||||
|
if (adtyp == AD_SSEX && !SYSOPT_SEDUCE)
|
||||||
|
adtyp = AD_SEDU;
|
||||||
|
|
||||||
if (agrinvis && !defperc
|
if (agrinvis && !defperc && adtyp == AD_SEDU)
|
||||||
&& (!SYSOPT_SEDUCE || (mattk && mattk->adtyp != AD_SSEX)))
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (pagr->mlet != S_NYMPH
|
if ((pagr->mlet != S_NYMPH
|
||||||
&& ((pagr != &mons[PM_INCUBUS] && pagr != &mons[PM_SUCCUBUS])
|
&& pagr != &mons[PM_INCUBUS] && pagr != &mons[PM_SUCCUBUS])
|
||||||
|| (SYSOPT_SEDUCE && mattk && mattk->adtyp != AD_SSEX)))
|
|| (adtyp != AD_SEDU && adtyp != AD_SSEX))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (genagr == 1 - gendef)
|
return (genagr == 1 - gendef) ? 1 : (pagr->mlet == S_NYMPH) ? 2 : 0;
|
||||||
return 1;
|
|
||||||
else
|
|
||||||
return (pagr->mlet == S_NYMPH) ? 2 : 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* returns 1 if monster teleported (or hero leaves monster's vicinity) */
|
/* returns 1 if monster teleported (or hero leaves monster's vicinity) */
|
||||||
@@ -2884,7 +2903,7 @@ struct attack *mattk;
|
|||||||
else
|
else
|
||||||
tmp = 0;
|
tmp = 0;
|
||||||
|
|
||||||
assess_dmg:
|
assess_dmg:
|
||||||
if ((mtmp->mhp -= tmp) <= 0) {
|
if ((mtmp->mhp -= tmp) <= 0) {
|
||||||
pline("%s dies!", Monnam(mtmp));
|
pline("%s dies!", Monnam(mtmp));
|
||||||
xkilled(mtmp, XKILL_NOMSG);
|
xkilled(mtmp, XKILL_NOMSG);
|
||||||
|
|||||||
10
src/mkobj.c
10
src/mkobj.c
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.6 mkobj.c $NHDT-Date: 1546837153 2019/01/07 04:59:13 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.140 $ */
|
/* NetHack 3.6 mkobj.c $NHDT-Date: 1547086532 2019/01/10 02:15:32 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.141 $ */
|
||||||
/* 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. */
|
||||||
@@ -71,7 +71,7 @@ newoextra()
|
|||||||
{
|
{
|
||||||
struct oextra *oextra;
|
struct oextra *oextra;
|
||||||
|
|
||||||
oextra = (struct oextra *) alloc(sizeof(struct oextra));
|
oextra = (struct oextra *) alloc(sizeof (struct oextra));
|
||||||
oextra->oname = 0;
|
oextra->oname = 0;
|
||||||
oextra->omonst = 0;
|
oextra->omonst = 0;
|
||||||
oextra->omid = 0;
|
oextra->omid = 0;
|
||||||
@@ -391,7 +391,7 @@ struct obj *obj2, *obj1;
|
|||||||
if (!OMONST(obj2))
|
if (!OMONST(obj2))
|
||||||
newomonst(obj2);
|
newomonst(obj2);
|
||||||
(void) memcpy((genericptr_t) OMONST(obj2),
|
(void) memcpy((genericptr_t) OMONST(obj2),
|
||||||
(genericptr_t) OMONST(obj1), sizeof(struct monst));
|
(genericptr_t) OMONST(obj1), sizeof (struct monst));
|
||||||
OMONST(obj2)->mextra = (struct mextra *) 0;
|
OMONST(obj2)->mextra = (struct mextra *) 0;
|
||||||
OMONST(obj2)->nmon = (struct monst *) 0;
|
OMONST(obj2)->nmon = (struct monst *) 0;
|
||||||
#if 0
|
#if 0
|
||||||
@@ -406,13 +406,13 @@ struct obj *obj2, *obj1;
|
|||||||
if (!OMID(obj2))
|
if (!OMID(obj2))
|
||||||
newomid(obj2);
|
newomid(obj2);
|
||||||
(void) memcpy((genericptr_t) OMID(obj2), (genericptr_t) OMID(obj1),
|
(void) memcpy((genericptr_t) OMID(obj2), (genericptr_t) OMID(obj1),
|
||||||
sizeof(unsigned));
|
sizeof (unsigned));
|
||||||
}
|
}
|
||||||
if (has_olong(obj1)) {
|
if (has_olong(obj1)) {
|
||||||
if (!OLONG(obj2))
|
if (!OLONG(obj2))
|
||||||
newolong(obj2);
|
newolong(obj2);
|
||||||
(void) memcpy((genericptr_t) OLONG(obj2), (genericptr_t) OLONG(obj1),
|
(void) memcpy((genericptr_t) OLONG(obj2), (genericptr_t) OLONG(obj1),
|
||||||
sizeof(long));
|
sizeof (long));
|
||||||
}
|
}
|
||||||
if (has_omailcmd(obj1)) {
|
if (has_omailcmd(obj1)) {
|
||||||
new_omailcmd(obj2, OMAILCMD(obj1));
|
new_omailcmd(obj2, OMAILCMD(obj1));
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.6 monst.c $NHDT-Date: 1539804880 2018/10/17 19:34:40 $ $NHDT-Branch: keni-makedefsm $:$NHDT-Revision: 1.61 $ */
|
/* NetHack 3.6 monst.c $NHDT-Date: 1547118631 2019/01/10 11:10:31 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.62 $ */
|
||||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/*-Copyright (c) Michael Allison, 2006. */
|
/*-Copyright (c) Michael Allison, 2006. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.6 polyself.c $NHDT-Date: 1520797126 2018/03/11 19:38:46 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.117 $ */
|
/* NetHack 3.6 polyself.c $NHDT-Date: 1547086249 2019/01/10 02:10:49 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.125 $ */
|
||||||
/* Copyright (C) 1987, 1988, 1989 by Ken Arromdee */
|
/* Copyright (C) 1987, 1988, 1989 by Ken Arromdee */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
|
|
||||||
@@ -77,7 +77,8 @@ set_uasmon()
|
|||||||
PROPSET(HALLUC_RES, dmgtype(mdat, AD_HALU));
|
PROPSET(HALLUC_RES, dmgtype(mdat, AD_HALU));
|
||||||
PROPSET(SEE_INVIS, perceives(mdat));
|
PROPSET(SEE_INVIS, perceives(mdat));
|
||||||
PROPSET(TELEPAT, telepathic(mdat));
|
PROPSET(TELEPAT, telepathic(mdat));
|
||||||
PROPSET(INFRAVISION, infravision(mdat));
|
/* note that Infravision uses mons[race] rather than usual mons[role] */
|
||||||
|
PROPSET(INFRAVISION, infravision(Upolyd ? mdat : &mons[g.urace.malenum]));
|
||||||
PROPSET(INVIS, pm_invisible(mdat));
|
PROPSET(INVIS, pm_invisible(mdat));
|
||||||
PROPSET(TELEPORT, can_teleport(mdat));
|
PROPSET(TELEPORT, can_teleport(mdat));
|
||||||
PROPSET(TELEPORT_CONTROL, control_teleport(mdat));
|
PROPSET(TELEPORT_CONTROL, control_teleport(mdat));
|
||||||
|
|||||||
17
src/potion.c
17
src/potion.c
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.6 potion.c $NHDT-Date: 1545597429 2018/12/23 20:37:09 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.157 $ */
|
/* NetHack 3.6 potion.c $NHDT-Date: 1547086533 2019/01/10 02:15:33 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.158 $ */
|
||||||
/* 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. */
|
||||||
@@ -1399,7 +1399,7 @@ int how;
|
|||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case POT_RESTORE_ABILITY:
|
case POT_RESTORE_ABILITY:
|
||||||
case POT_GAIN_ABILITY:
|
case POT_GAIN_ABILITY:
|
||||||
do_healing:
|
do_healing:
|
||||||
angermon = FALSE;
|
angermon = FALSE;
|
||||||
if (mon->mhp < mon->mhpmax) {
|
if (mon->mhp < mon->mhpmax) {
|
||||||
mon->mhp = mon->mhpmax;
|
mon->mhp = mon->mhpmax;
|
||||||
@@ -1421,7 +1421,7 @@ int how;
|
|||||||
pline("%s looks unharmed.", Monnam(mon));
|
pline("%s looks unharmed.", Monnam(mon));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
do_illness:
|
do_illness:
|
||||||
if ((mon->mhpmax > 3) && !resist(mon, POTION_CLASS, 0, NOTELL))
|
if ((mon->mhpmax > 3) && !resist(mon, POTION_CLASS, 0, NOTELL))
|
||||||
mon->mhpmax /= 2;
|
mon->mhpmax /= 2;
|
||||||
if ((mon->mhp > 2) && !resist(mon, POTION_CLASS, 0, NOTELL))
|
if ((mon->mhp > 2) && !resist(mon, POTION_CLASS, 0, NOTELL))
|
||||||
@@ -2143,7 +2143,7 @@ dodip()
|
|||||||
useup(potion);
|
useup(potion);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
more_dips:
|
more_dips:
|
||||||
|
|
||||||
/* Allow filling of MAGIC_LAMPs to prevent identification by player */
|
/* Allow filling of MAGIC_LAMPs to prevent identification by player */
|
||||||
if ((obj->otyp == OIL_LAMP || obj->otyp == MAGIC_LAMP)
|
if ((obj->otyp == OIL_LAMP || obj->otyp == MAGIC_LAMP)
|
||||||
@@ -2231,9 +2231,10 @@ more_dips:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
obj_extract_self(singlepotion);
|
obj_extract_self(singlepotion);
|
||||||
singlepotion =
|
singlepotion = hold_another_object(singlepotion,
|
||||||
hold_another_object(singlepotion, "You juggle and drop %s!",
|
"You juggle and drop %s!",
|
||||||
doname(singlepotion), (const char *) 0);
|
doname(singlepotion),
|
||||||
|
(const char *) 0);
|
||||||
nhUse(singlepotion);
|
nhUse(singlepotion);
|
||||||
update_inventory();
|
update_inventory();
|
||||||
return 1;
|
return 1;
|
||||||
@@ -2242,7 +2243,7 @@ more_dips:
|
|||||||
pline("Interesting...");
|
pline("Interesting...");
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
poof:
|
poof:
|
||||||
if (!objects[potion->otyp].oc_name_known
|
if (!objects[potion->otyp].oc_name_known
|
||||||
&& !objects[potion->otyp].oc_uname)
|
&& !objects[potion->otyp].oc_uname)
|
||||||
docall(potion);
|
docall(potion);
|
||||||
|
|||||||
11
src/role.c
11
src/role.c
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.6 role.c $NHDT-Date: 1546137492 2018/12/30 02:38:12 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.55 $ */
|
/* NetHack 3.6 role.c $NHDT-Date: 1547086250 2019/01/10 02:10:50 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.56 $ */
|
||||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985-1999. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985-1999. */
|
||||||
/*-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. */
|
||||||
@@ -2031,6 +2031,14 @@ role_init()
|
|||||||
/* 0 or 1; no gods are neuter, nor is gender randomized */
|
/* 0 or 1; no gods are neuter, nor is gender randomized */
|
||||||
g.quest_status.godgend = !strcmpi(align_gtitle(alignmnt), "goddess");
|
g.quest_status.godgend = !strcmpi(align_gtitle(alignmnt), "goddess");
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
/*
|
||||||
|
* Disable this fixup so that mons[] can be const. The only
|
||||||
|
* place where it actually matters for the hero is in set_uasmon()
|
||||||
|
* and that can use mons[race] rather than mons[role] for this
|
||||||
|
* particular property. Despite the comment, it is checked--where
|
||||||
|
* needed--via instrinsic 'Infravision' which set_uasmon() manages.
|
||||||
|
*/
|
||||||
/* Fix up infravision */
|
/* Fix up infravision */
|
||||||
if (mons[g.urace.malenum].mflags3 & M3_INFRAVISION) {
|
if (mons[g.urace.malenum].mflags3 & M3_INFRAVISION) {
|
||||||
/* although an infravision intrinsic is possible, infravision
|
/* although an infravision intrinsic is possible, infravision
|
||||||
@@ -2046,6 +2054,7 @@ role_init()
|
|||||||
if (g.urole.femalenum != NON_PM)
|
if (g.urole.femalenum != NON_PM)
|
||||||
mons[g.urole.femalenum].mflags3 |= M3_INFRAVISION;
|
mons[g.urole.femalenum].mflags3 |= M3_INFRAVISION;
|
||||||
}
|
}
|
||||||
|
#endif /*0*/
|
||||||
|
|
||||||
/* Artifacts are fixed in hack_artifacts() */
|
/* Artifacts are fixed in hack_artifacts() */
|
||||||
|
|
||||||
|
|||||||
11
src/sys.c
11
src/sys.c
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.6 sys.c $NHDT-Date: 1448241785 2015/11/23 01:23:05 $ $NHDT-Branch: master $:$NHDT-Revision: 1.35 $ */
|
/* NetHack 3.6 sys.c $NHDT-Date: 1547118632 2019/01/10 11:10:32 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.43 $ */
|
||||||
/* Copyright (c) Kenneth Lorber, Kensington, Maryland, 2008. */
|
/* Copyright (c) Kenneth Lorber, Kensington, Maryland, 2008. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
|
|
||||||
@@ -127,13 +127,20 @@ void
|
|||||||
sysopt_seduce_set(val)
|
sysopt_seduce_set(val)
|
||||||
int val;
|
int val;
|
||||||
{
|
{
|
||||||
const struct attack *setval = val ? c_sa_yes : c_sa_no;
|
#if 0
|
||||||
|
/*
|
||||||
|
* Attack substitution is now done on the fly in getmattk(mhitu.c).
|
||||||
|
*/
|
||||||
|
struct attack *setval = val ? c_sa_yes : c_sa_no;
|
||||||
int x;
|
int x;
|
||||||
|
|
||||||
for (x = 0; x < NATTK; x++) {
|
for (x = 0; x < NATTK; x++) {
|
||||||
mons[PM_INCUBUS].mattk[x] = setval[x];
|
mons[PM_INCUBUS].mattk[x] = setval[x];
|
||||||
mons[PM_SUCCUBUS].mattk[x] = setval[x];
|
mons[PM_SUCCUBUS].mattk[x] = setval[x];
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
nhUse(val);
|
||||||
|
#endif /*0*/
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.6 uhitm.c $NHDT-Date: 1545597432 2018/12/23 20:37:12 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.197 $ */
|
/* NetHack 3.6 uhitm.c $NHDT-Date: 1547118630 2019/01/10 11:10:30 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.198 $ */
|
||||||
/* 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. */
|
||||||
@@ -1598,7 +1598,7 @@ register struct attack *mattk;
|
|||||||
case AD_WERE: /* no special effect on monsters */
|
case AD_WERE: /* no special effect on monsters */
|
||||||
case AD_HEAL: /* likewise */
|
case AD_HEAL: /* likewise */
|
||||||
case AD_PHYS:
|
case AD_PHYS:
|
||||||
physical:
|
physical:
|
||||||
if (mattk->aatyp == AT_WEAP) {
|
if (mattk->aatyp == AT_WEAP) {
|
||||||
if (uwep)
|
if (uwep)
|
||||||
tmp = 0;
|
tmp = 0;
|
||||||
@@ -1985,7 +1985,7 @@ register struct attack *mattk;
|
|||||||
goto common;
|
goto common;
|
||||||
case AD_ELEC:
|
case AD_ELEC:
|
||||||
resistance = resists_elec(mdef);
|
resistance = resists_elec(mdef);
|
||||||
common:
|
common:
|
||||||
if (!resistance) {
|
if (!resistance) {
|
||||||
pline("%s gets blasted!", Monnam(mdef));
|
pline("%s gets blasted!", Monnam(mdef));
|
||||||
mdef->mhp -= tmp;
|
mdef->mhp -= tmp;
|
||||||
@@ -2284,7 +2284,7 @@ register struct monst *mon;
|
|||||||
weapon = 0;
|
weapon = 0;
|
||||||
switch (mattk->aatyp) {
|
switch (mattk->aatyp) {
|
||||||
case AT_WEAP:
|
case AT_WEAP:
|
||||||
use_weapon:
|
use_weapon:
|
||||||
/* Certain monsters don't use weapons when encountered as enemies,
|
/* Certain monsters don't use weapons when encountered as enemies,
|
||||||
* but players who polymorph into them have hands or claws and
|
* but players who polymorph into them have hands or claws and
|
||||||
* thus should be able to use weapons. This shouldn't prohibit
|
* thus should be able to use weapons. This shouldn't prohibit
|
||||||
|
|||||||
Reference in New Issue
Block a user