E int FDECL(collect_obj_classes,
(char *,struct obj *,BOOLEAN_P,BOOLEAN_P,boolean FDECL((*),(OBJ_P)), int *));
#endif
+E boolean FDECL(rider_corpse_revival, (struct obj *,BOOLEAN_P));
E void FDECL(add_valid_menu_class, (int));
E boolean FDECL(allow_all, (struct obj *));
E boolean FDECL(allow_category, (struct obj *));
-/* SCCS Id: @(#)pickup.c 3.5 2008/03/19 */
+/* SCCS Id: @(#)pickup.c 3.5 2008/10/09 */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
return TRUE;
}
+/* attempting to manipulate a Rider's corpse triggers its revival */
+boolean
+rider_corpse_revival(obj, remotely)
+struct obj *obj;
+boolean remotely;
+{
+ if (!obj || obj->otyp != CORPSE || !is_rider(&mons[obj->corpsenm]))
+ return FALSE;
+
+ pline("At your %s, the corpse suddenly moves...",
+ remotely ? "attempted acquisition" : "touch");
+ (void)revive_corpse(obj);
+ exercise(A_WIS, FALSE);
+ return TRUE;
+}
+
/* look at the objects at our location, unless there are too many of them */
STATIC_OVL void
check_here(picked_some)
return 1;
#endif
} else if (obj->otyp == CORPSE) {
- if (fatal_corpse_mistake(obj, telekinesis)) {
+ if (fatal_corpse_mistake(obj, telekinesis) ||
+ rider_corpse_revival(obj, telekinesis))
return -1;
- } else if (is_rider(&mons[obj->corpsenm])) {
- pline("At your %s, the corpse suddenly moves...",
- telekinesis ? "attempted acquisition" : "touch");
- (void) revive_corpse(obj);
- exercise(A_WIS, FALSE);
- return -1;
- }
} else if (obj->otyp == SCR_SCARE_MONSTER) {
if (obj->blessed) obj->blessed = 0;
else if (!obj->spe && !obj->cursed) obj->spe = 1;
-/* SCCS Id: @(#)pray.c 3.5 2008/01/21 */
+/* SCCS Id: @(#)pray.c 3.5 2008/10/09 */
/* Copyright (c) Benson I. Margulies, Mike Stephenson, Steve Linhart, 1989. */
/* NetHack may be freely redistributed. See license for details. */
/* you're handling this corpse, even if it was killed upon the altar */
feel_cockatrice(otmp, TRUE);
+ if (rider_corpse_revival(otmp, FALSE)) return 1;
if (otmp->corpsenm == PM_ACID_BLOB
|| (monstermoves <= peek_at_iced_corpse_age(otmp) + 50)) {