worn gear after polymorph alignment change [1 of 2] (trunk only)
Make polymorphing or changing alignment perform a touch check (as is done when catching lycanthropy) on wielded weapon(s) to see whether the hero can still use them in his new form. Part [2 of 2] will update retouch_equipment() to check all items in use rather than just weapon(s). (A comment or two in part 1 already refers to expected behavior of part 2.)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* SCCS Id: @(#)eat.c 3.5 2007/02/05 */
|
||||
/* SCCS Id: @(#)eat.c 3.5 2007/03/19 */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -1152,10 +1152,7 @@ register int pm;
|
||||
break;
|
||||
}
|
||||
|
||||
if (catch_lycanthropy) {
|
||||
if (u.twoweap) (void)retouch_object(&uswapwep, TRUE);
|
||||
if (uwep) (void)retouch_object(&uwep, TRUE);
|
||||
}
|
||||
if (catch_lycanthropy) retouch_equipment(2);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user