Shroedinger's dead cat
Give experience to the hero if opening Shroedinger's Box reveals a cat corpse rather than releasing a live cat. It feels a bit odd to assess a bonus rather than a penalty.
This commit is contained in:
@@ -1581,6 +1581,7 @@ the "bustling town" minetown has more peacefuls
|
|||||||
healers may get tiny damage increase when attacking with knives
|
healers may get tiny damage increase when attacking with knives
|
||||||
allow rogues to also backstab sleeping or paralyzed monsters
|
allow rogues to also backstab sleeping or paralyzed monsters
|
||||||
rogues cannot backstab monsters that have no backside
|
rogues cannot backstab monsters that have no backside
|
||||||
|
give experience if opening Schroedinger's Box causes death of the cat inside
|
||||||
|
|
||||||
|
|
||||||
Fixes to 3.7.0-x General Problems Exposed Via git Repository
|
Fixes to 3.7.0-x General Problems Exposed Via git Repository
|
||||||
|
|||||||
+11
-4
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.7 pickup.c $NHDT-Date: 1720074481 2024/07/04 06:28:01 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.374 $ */
|
/* NetHack 3.7 pickup.c $NHDT-Date: 1773373633 2026/03/12 19:47:13 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.386 $ */
|
||||||
/* 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. */
|
||||||
@@ -2860,6 +2860,9 @@ observe_quantum_cat(struct obj *box, boolean makecat, boolean givemsg)
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
box->spe = 0; /* now an ordinary box (with a cat corpse inside) */
|
box->spe = 0; /* now an ordinary box (with a cat corpse inside) */
|
||||||
|
if (givemsg)
|
||||||
|
pline_The("%s inside the box is dead!",
|
||||||
|
Hallucination ? rndmonnam((char *) 0) : "housecat");
|
||||||
if (deadcat) {
|
if (deadcat) {
|
||||||
/* set_corpsenm() will start the rot timer that was removed
|
/* set_corpsenm() will start the rot timer that was removed
|
||||||
when makemon() created SchroedingersBox; start it from
|
when makemon() created SchroedingersBox; start it from
|
||||||
@@ -2867,10 +2870,14 @@ observe_quantum_cat(struct obj *box, boolean makecat, boolean givemsg)
|
|||||||
deadcat->age = svm.moves;
|
deadcat->age = svm.moves;
|
||||||
set_corpsenm(deadcat, PM_HOUSECAT);
|
set_corpsenm(deadcat, PM_HOUSECAT);
|
||||||
deadcat = oname(deadcat, sc, ONAME_NO_FLAGS);
|
deadcat = oname(deadcat, sc, ONAME_NO_FLAGS);
|
||||||
|
|
||||||
|
if (!svc.context.mon_moving) {
|
||||||
|
/* give experience points for the death of the cat since
|
||||||
|
that has been finalized by the hero opening the box */
|
||||||
|
more_experienced(20, 10); /* 20:current exp; 10:score bonus */
|
||||||
|
newexplevel();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (givemsg)
|
|
||||||
pline_The("%s inside the box is dead!",
|
|
||||||
Hallucination ? rndmonnam((char *) 0) : "housecat");
|
|
||||||
}
|
}
|
||||||
nhUse(deadcat);
|
nhUse(deadcat);
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user