artifact invisibility fixes
Invoking the archeologist's Orb of Detection gave "you feel a surge of power, but nothing seems to happen" if you were able to see invisible, but various other ways of toggling invisibility give fade/unfade messages in that situation. Also, you would get false reports of invisibility changes if you invoked the artifact while temporarily invisible due to potion or spell or while wearing a mummy wrapping.
This commit is contained in:
@@ -337,6 +337,7 @@ can't successfully bribe a demon who happens to be carrying the Amulet
|
|||||||
while over water, killing a monster that had engulfed you does not result
|
while over water, killing a monster that had engulfed you does not result
|
||||||
in the usual water effects
|
in the usual water effects
|
||||||
removing a ring of levitation while engulfed should not invoke spoteffects
|
removing a ring of levitation while engulfed should not invoke spoteffects
|
||||||
|
feedback from invoking Orb of Detection was sometimes misleading or wrong
|
||||||
|
|
||||||
|
|
||||||
Platform- and/or Interface-Specific Fixes
|
Platform- and/or Interface-Specific Fixes
|
||||||
|
|||||||
+14
-13
@@ -1,4 +1,4 @@
|
|||||||
/* SCCS Id: @(#)artifact.c 3.4 2002/10/07 */
|
/* SCCS Id: @(#)artifact.c 3.4 2002/12/18 */
|
||||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
|
|
||||||
@@ -1278,13 +1278,16 @@ arti_invoke(obj)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
long cprop = (u.uprops[oart->inv_prop].extrinsic ^= W_ARTI);
|
long eprop = (u.uprops[oart->inv_prop].extrinsic ^= W_ARTI),
|
||||||
boolean on = (cprop & W_ARTI) != 0; /* true if invoked prop just set */
|
iprop = u.uprops[oart->inv_prop].intrinsic;
|
||||||
|
boolean on = (eprop & W_ARTI) != 0; /* true if invoked prop just set */
|
||||||
|
|
||||||
if(on && obj->age > monstermoves) {
|
if(on && obj->age > monstermoves) {
|
||||||
/* the artifact is tired :-) */
|
/* the artifact is tired :-) */
|
||||||
u.uprops[oart->inv_prop].extrinsic ^= W_ARTI;
|
u.uprops[oart->inv_prop].extrinsic ^= W_ARTI;
|
||||||
You_feel("that %s is ignoring you.", the(xname(obj)));
|
You_feel("that %s is ignoring you.", the(xname(obj)));
|
||||||
|
/* can't just keep repeatedly trying */
|
||||||
|
obj->age += (long) d(3,10);
|
||||||
return 1;
|
return 1;
|
||||||
} else if(!on) {
|
} else if(!on) {
|
||||||
/* when turning off property, determine downtime */
|
/* when turning off property, determine downtime */
|
||||||
@@ -1292,7 +1295,7 @@ arti_invoke(obj)
|
|||||||
obj->age = monstermoves + rnz(100);
|
obj->age = monstermoves + rnz(100);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(cprop & ~W_ARTI) {
|
if ((eprop & ~W_ARTI) || iprop) {
|
||||||
nothing_special:
|
nothing_special:
|
||||||
/* you had the property from some other source too */
|
/* you had the property from some other source too */
|
||||||
if (carried(obj))
|
if (carried(obj))
|
||||||
@@ -1311,15 +1314,13 @@ nothing_special:
|
|||||||
} else (void) float_down(I_SPECIAL|TIMEOUT, W_ARTI);
|
} else (void) float_down(I_SPECIAL|TIMEOUT, W_ARTI);
|
||||||
break;
|
break;
|
||||||
case INVIS:
|
case INVIS:
|
||||||
if (!See_invisible && !Blind) {
|
if (BInvis || Blind) goto nothing_special;
|
||||||
newsym(u.ux,u.uy);
|
newsym(u.ux, u.uy);
|
||||||
if (on) {
|
if (on)
|
||||||
Your("body takes on a %s transparency...",
|
Your("body takes on a %s transparency...",
|
||||||
Hallucination ? "normal" : "strange");
|
Hallucination ? "normal" : "strange");
|
||||||
} else {
|
else
|
||||||
Your("body seems to unfade...");
|
Your("body seems to unfade...");
|
||||||
}
|
|
||||||
} else goto nothing_special;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user