when escaping the dungeon, change "you were here" annotation in dungeon
overview to "you left from here"
option parsing will crash if 'playmode' option is present without a value
+any item drained of enchantment was blamed on the player as far as shop
+ billing was concerned, even if caused by disenchanter attack
Fixes to Post-3.6.0 Problems that Were Exposed Via git Repository
-/* NetHack 3.6 extern.h $NHDT-Date: 1461967848 2016/04/29 22:10:48 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.558 $ */
+/* NetHack 3.6 extern.h $NHDT-Date: 1470819839 2016/08/10 09:03:59 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.569 $ */
/* Copyright (c) Steve Creps, 1988. */
/* NetHack may be freely redistributed. See license for details. */
E struct monst *FDECL(revive, (struct obj *, BOOLEAN_P));
E int FDECL(unturn_dead, (struct monst *));
E void FDECL(cancel_item, (struct obj *));
-E boolean FDECL(drain_item, (struct obj *));
+E boolean FDECL(drain_item, (struct obj *, BOOLEAN_P));
E struct obj *FDECL(poly_obj, (struct obj *, int));
E boolean FDECL(obj_resists, (struct obj *, int, int));
E boolean FDECL(obj_shudders, (struct obj *));
-/* NetHack 3.6 mhitm.c $NHDT-Date: 1456992461 2016/03/03 08:07:41 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.86 $ */
+/* NetHack 3.6 mhitm.c $NHDT-Date: 1470819842 2016/08/10 09:04:02 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.92 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
goto assess_dmg;
case AD_ENCH: /* KMH -- remove enchantment (disenchanter) */
if (mhit && !mdef->mcan && otmp) {
- (void) drain_item(otmp);
+ (void) drain_item(otmp, FALSE);
/* No message */
}
break;
-/* NetHack 3.6 mhitu.c $NHDT-Date: 1456992469 2016/03/03 08:07:49 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.136 $ */
+/* NetHack 3.6 mhitu.c $NHDT-Date: 1470819843 2016/08/10 09:04:03 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.144 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
if (uncancelled) {
struct obj *obj = some_armor(&youmonst);
- if (drain_item(obj)) {
+ if (!obj) {
+ /* some rings are susceptible;
+ amulets and blindfolds aren't (at present) */
+ switch (rn2(5)) {
+ case 0:
+ break;
+ case 1:
+ obj = uright;
+ break;
+ case 2:
+ obj = uleft;
+ break;
+ case 3:
+ obj = uamul;
+ break;
+ case 4:
+ obj = ublindf;
+ break;
+ }
+ }
+ if (drain_item(obj, FALSE)) {
pline("%s less effective.", Yobjnam2(obj, "seem"));
}
}
}
case AD_ENCH: /* KMH -- remove enchantment (disenchanter) */
if (otmp) {
- (void) drain_item(otmp);
+ /* by_you==True: passive counterattack to hero's action
+ is hero's fault */
+ (void) drain_item(otmp, TRUE);
/* No message */
}
return 1;
-/* NetHack 3.6 uhitm.c $NHDT-Date: 1460103141 2016/04/08 08:12:21 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.156 $ */
+/* NetHack 3.6 uhitm.c $NHDT-Date: 1470819843 2016/08/10 09:04:03 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.164 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
*/
void
passive_obj(mon, obj, mattk)
-register struct monst *mon;
-register struct obj *obj; /* null means pick uwep, uswapwep or uarmg */
+struct monst *mon;
+struct obj *obj; /* null means pick uwep, uswapwep or uarmg */
struct attack *mattk; /* null means we find one internally */
{
struct permonst *ptr = mon->data;
- register int i;
+ int i;
/* if caller hasn't specified an object, use uwep, uswapwep or uarmg */
if (!obj) {
break;
case AD_ENCH:
if (!mon->mcan) {
- if (drain_item(obj) && carried(obj)
+ if (drain_item(obj, TRUE) && carried(obj)
&& (obj->known || obj->oclass == ARMOR_CLASS)) {
pline("%s less effective.", Yobjnam2(obj, "seem"));
}
-/* NetHack 3.6 zap.c $NHDT-Date: 1464163779 2016/05/25 08:09:39 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.258 $ */
+/* NetHack 3.6 zap.c $NHDT-Date: 1470819844 2016/08/10 09:04:04 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.263 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
* possibly carried by you or a monster
*/
boolean
-drain_item(obj)
-register struct obj *obj;
+drain_item(obj, by_you)
+struct obj *obj;
+boolean by_you;
{
boolean u_ring;
return FALSE;
/* Charge for the cost of the object */
- costly_alteration(obj, COST_DRAIN);
+ if (by_you)
+ costly_alteration(obj, COST_DRAIN);
/* Drain the object and any implied effects */
obj->spe--;
if ((obj->owornmask & W_RING) && u_ring)
u.udaminc--;
break;
+ case RIN_PROTECTION:
+ if (u_ring)
+ context.botl = 1; /* bot() will recalc u.uac */
+ break;
case HELM_OF_BRILLIANCE:
if ((obj->owornmask & W_ARMH) && (obj == uarmh)) {
ABON(A_INT)--;
context.botl = 1;
}
break;
- case RIN_PROTECTION:
- context.botl = 1;
+ default:
break;
}
+ if (context.botl)
+ bot();
if (carried(obj))
update_inventory();
return TRUE;
#endif
break;
case SPE_DRAIN_LIFE:
- (void) drain_item(obj);
+ (void) drain_item(obj, TRUE);
break;
case WAN_TELEPORTATION:
case SPE_TELEPORT_AWAY: