bones bit: crysknife vs green slime
Being turned into green slime never drops hero's inventory so invent objects shouldn't be subject to obj_not_held() handling. obj_not_held() does apply to undead. Arising as a mummy or vampire doesn't go through the trouble of dropping everything and picking it back up, but there is a point in the die...arise sequence where the hero is implicitly a corpse so nobody is holding his/her stuff.
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
$NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.312 $ $NHDT-Date: 1556649298 2019/04/30 18:34:58 $
|
$NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.315 $ $NHDT-Date: 1557091781 2019/05/05 21:29:41 $
|
||||||
|
|
||||||
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,
|
||||||
@@ -424,6 +424,8 @@ poly'd hero capable of spitting venom would leave intact venom object if it
|
|||||||
avoid impossible if monster cannot be relocated from teleport region
|
avoid impossible if monster cannot be relocated from teleport region
|
||||||
fix cloned monster trapped and hiding states
|
fix cloned monster trapped and hiding states
|
||||||
split monster could be placed on trap without triggering it
|
split monster could be placed on trap without triggering it
|
||||||
|
turning into green slime would make wielded or carried crysknives revert to
|
||||||
|
worm teeth in bones data even though they remained carried
|
||||||
|
|
||||||
|
|
||||||
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
|
||||||
|
|||||||
28
src/bones.c
28
src/bones.c
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.6 bones.c $NHDT-Date: 1539653203 2018/10/16 01:26:43 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.73 $ */
|
/* NetHack 3.6 bones.c $NHDT-Date: 1557092711 2019/05/05 21:45:11 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.75 $ */
|
||||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985,1993. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985,1993. */
|
||||||
/*-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. */
|
||||||
@@ -214,8 +214,8 @@ char *namebuf;
|
|||||||
/* called by savebones(); also by finish_paybill(shk.c) */
|
/* called by savebones(); also by finish_paybill(shk.c) */
|
||||||
void
|
void
|
||||||
drop_upon_death(mtmp, cont, x, y)
|
drop_upon_death(mtmp, cont, x, y)
|
||||||
struct monst *mtmp;
|
struct monst *mtmp; /* monster if hero turned into one (other than ghost) */
|
||||||
struct obj *cont;
|
struct obj *cont; /* container if hero is turned into a statue */
|
||||||
int x, y;
|
int x, y;
|
||||||
{
|
{
|
||||||
struct obj *otmp;
|
struct obj *otmp;
|
||||||
@@ -223,9 +223,13 @@ int x, y;
|
|||||||
u.twoweap = 0; /* ensure curse() won't cause swapwep to drop twice */
|
u.twoweap = 0; /* ensure curse() won't cause swapwep to drop twice */
|
||||||
while ((otmp = invent) != 0) {
|
while ((otmp = invent) != 0) {
|
||||||
obj_extract_self(otmp);
|
obj_extract_self(otmp);
|
||||||
obj_no_longer_held(otmp);
|
/* when turning into green slime, all gear remains held;
|
||||||
|
other types "arise from the dead" do aren't holding
|
||||||
|
equipment during their brief interval as a corpse */
|
||||||
|
if (!mtmp || is_undead(mtmp->data))
|
||||||
|
obj_no_longer_held(otmp);
|
||||||
|
|
||||||
otmp->owornmask = 0;
|
otmp->owornmask = 0L;
|
||||||
/* lamps don't go out when dropped */
|
/* lamps don't go out when dropped */
|
||||||
if ((cont || artifact_light(otmp)) && obj_is_burning(otmp))
|
if ((cont || artifact_light(otmp)) && obj_is_burning(otmp))
|
||||||
end_burn(otmp, TRUE); /* smother in statue */
|
end_burn(otmp, TRUE); /* smother in statue */
|
||||||
@@ -365,7 +369,7 @@ struct obj *corpse;
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
make_bones:
|
make_bones:
|
||||||
unleash_all();
|
unleash_all();
|
||||||
/* in case these characters are not in their home bases */
|
/* in case these characters are not in their home bases */
|
||||||
for (mtmp = fmon; mtmp; mtmp = mtmp->nmon) {
|
for (mtmp = fmon; mtmp; mtmp = mtmp->nmon) {
|
||||||
@@ -390,7 +394,7 @@ make_bones:
|
|||||||
|
|
||||||
/* check iron balls separately--maybe they're not carrying it */
|
/* check iron balls separately--maybe they're not carrying it */
|
||||||
if (uball)
|
if (uball)
|
||||||
uball->owornmask = uchain->owornmask = 0;
|
uball->owornmask = uchain->owornmask = 0L;
|
||||||
|
|
||||||
/* dispose of your possessions, usually cursed */
|
/* dispose of your possessions, usually cursed */
|
||||||
if (u.ugrave_arise == (NON_PM - 1)) {
|
if (u.ugrave_arise == (NON_PM - 1)) {
|
||||||
@@ -422,21 +426,21 @@ make_bones:
|
|||||||
in_mklev = TRUE; /* use <u.ux,u.uy> as-is */
|
in_mklev = TRUE; /* use <u.ux,u.uy> as-is */
|
||||||
mtmp = makemon(&mons[u.ugrave_arise], u.ux, u.uy, NO_MINVENT);
|
mtmp = makemon(&mons[u.ugrave_arise], u.ux, u.uy, NO_MINVENT);
|
||||||
in_mklev = FALSE;
|
in_mklev = FALSE;
|
||||||
if (!mtmp) {
|
if (!mtmp) { /* arise-type might have been genocided */
|
||||||
drop_upon_death((struct monst *) 0, (struct obj *) 0, u.ux, u.uy);
|
drop_upon_death((struct monst *) 0, (struct obj *) 0, u.ux, u.uy);
|
||||||
u.ugrave_arise = NON_PM; /* in case caller cares */
|
u.ugrave_arise = NON_PM; /* in case caller cares */
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
/* give mummy-from-hero a wrapping unless hero already
|
|
||||||
carries one; don't bother forcing it to become worn */
|
|
||||||
if (mtmp->data->mlet == S_MUMMY && !carrying(MUMMY_WRAPPING))
|
|
||||||
(void) mongets(mtmp, MUMMY_WRAPPING);
|
|
||||||
mtmp = christen_monst(mtmp, plname);
|
mtmp = christen_monst(mtmp, plname);
|
||||||
newsym(u.ux, u.uy);
|
newsym(u.ux, u.uy);
|
||||||
/* ["Your body rises from the dead as an <mname>..." used
|
/* ["Your body rises from the dead as an <mname>..." used
|
||||||
to be given here, but it has been moved to done() so that
|
to be given here, but it has been moved to done() so that
|
||||||
it gets delivered even when savebones() isn't called] */
|
it gets delivered even when savebones() isn't called] */
|
||||||
drop_upon_death(mtmp, (struct obj *) 0, u.ux, u.uy);
|
drop_upon_death(mtmp, (struct obj *) 0, u.ux, u.uy);
|
||||||
|
/* 'mtmp' now has hero's inventory; if 'mtmp' is a mummy, give it
|
||||||
|
a wrapping unless already carrying one */
|
||||||
|
if (mtmp->data->mlet == S_MUMMY && !m_carrying(mtmp, MUMMY_WRAPPING))
|
||||||
|
(void) mongets(mtmp, MUMMY_WRAPPING);
|
||||||
m_dowear(mtmp, TRUE);
|
m_dowear(mtmp, TRUE);
|
||||||
}
|
}
|
||||||
if (mtmp) {
|
if (mtmp) {
|
||||||
|
|||||||
Reference in New Issue
Block a user