new prayer trouble

3.4.1 included a change which requires you to be able to use hands
in order to manipulate containers; that makes sense but has introduced
an unintended side-effect.  It has become much harder to uncurse a
two-handed weapon or combination of a one-handed weapon and a shield
because you can't get scrolls or potions out of your bag.  This adds a
new major trouble for prayer to address that, escalating it above the
normal minor cursed item trouble.  It also removes a nonsensical check
for combination of two-handed weapon and shield that I added long ago.

     Not related, but same file:  add the missing artifact touch checks
for putting on accessories (quest amulets and lenses).  I can't remember
if this was From a bug report.
This commit is contained in:
nethack.rankin
2003-03-10 23:49:04 +00:00
parent 9327d35592
commit 6b1811007c
4 changed files with 77 additions and 33 deletions
+15 -1
View File
@@ -1,4 +1,4 @@
/* SCCS Id: @(#)do_wear.c 3.4 2003/01/08 */
/* SCCS Id: @(#)do_wear.c 3.4 2003/03/10 */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
@@ -1447,6 +1447,8 @@ doputon()
You("cannot free your weapon hand to put on the ring.");
return(0);
}
if (otmp->oartifact && !touch_artifact(otmp, &youmonst))
return 1; /* costs a turn even though it didn't get worn */
setworn(otmp, mask);
Ring_on(otmp);
} else if (otmp->oclass == AMULET_CLASS) {
@@ -1454,6 +1456,8 @@ doputon()
already_wearing("an amulet");
return(0);
}
if (otmp->oartifact && !touch_artifact(otmp, &youmonst))
return 1;
setworn(otmp, W_AMUL);
if (otmp->otyp == AMULET_OF_CHANGE) {
Amulet_on();
@@ -1484,6 +1488,8 @@ doputon()
You_cant("wear that!");
return(0);
}
if (otmp->oartifact && !touch_artifact(otmp, &youmonst))
return 1;
Blindf_on(otmp);
return(1);
}
@@ -1651,6 +1657,14 @@ int otyp;
return (struct obj *)0;
}
/* also for praying; find worn item that confers "Unchanging" attribute */
struct obj *
unchanger()
{
if (uamul && uamul->otyp == AMULET_OF_UNCHANGING) return uamul;
return 0;
}
STATIC_PTR
int
select_off(otmp)