diff --git a/doc/fixes34.1 b/doc/fixes34.1 index 2ab956d22..09a59edfb 100644 --- a/doc/fixes34.1 +++ b/doc/fixes34.1 @@ -178,6 +178,7 @@ if you can't see or sense a monster when it dies, don't set dknown on corpse effect of wearing or removing the Eyes of the Overworld took effect on the next move, but should take effect immediately. dragon scale mail is magic armor +invoking or applying an artifact must pass a touch_artifact check Platform- and/or Interface-Specific Fixes diff --git a/src/apply.c b/src/apply.c index a4654345a..4a62a67eb 100644 --- a/src/apply.c +++ b/src/apply.c @@ -1,4 +1,4 @@ -/* SCCS Id: @(#)apply.c 3.4 2002/04/18 */ +/* SCCS Id: @(#)apply.c 3.4 2002/08/01 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -2731,6 +2731,10 @@ doapply() obj = getobj(class_list, "use or apply"); if(!obj) return 0; + if (obj->oartifact && !touch_artifact(obj, &youmonst)) + return 1; /* evading your grasp costs a turn; just be + grateful that you don't drop it as well */ + if (obj->oclass == WAND_CLASS) return do_break_wand(obj); diff --git a/src/artifact.c b/src/artifact.c index ca7d446b7..a90aff725 100644 --- a/src/artifact.c +++ b/src/artifact.c @@ -1,4 +1,4 @@ -/* SCCS Id: @(#)artifact.c 3.4 2002/03/22 */ +/* SCCS Id: @(#)artifact.c 3.4 2002/08/01 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1096,7 +1096,8 @@ doinvoke() register struct obj *obj; obj = getobj(invoke_types, "invoke"); - if(!obj) return 0; + if (!obj) return 0; + if (obj->oartifact && !touch_artifact(obj, &youmonst)) return 1; return arti_invoke(obj); }