adjust wish for cockatrice corpse
Wishing is powerful, so if you cannot safely handle a cockatrice corpse, then have a wish for one result in the corpse materializing on the floor rather than in your inventory. Resolves #1320
This commit is contained in:
12
src/pickup.c
12
src/pickup.c
@@ -261,12 +261,20 @@ query_classes(
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
boolean
|
||||
u_safe_from_fatal_corpse(struct obj *obj)
|
||||
{
|
||||
if (uarmg || obj->otyp != CORPSE
|
||||
|| !touch_petrifies(&mons[obj->corpsenm]) || Stone_resistance)
|
||||
return TRUE;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* check whether hero is bare-handedly touching a cockatrice corpse */
|
||||
staticfn boolean
|
||||
fatal_corpse_mistake(struct obj *obj, boolean remotely)
|
||||
{
|
||||
if (uarmg || remotely || obj->otyp != CORPSE
|
||||
|| !touch_petrifies(&mons[obj->corpsenm]) || Stone_resistance)
|
||||
if (u_safe_from_fatal_corpse(obj) || remotely)
|
||||
return FALSE;
|
||||
|
||||
if (poly_when_stoned(gy.youmonst.data) && polymon(PM_STONE_GOLEM)) {
|
||||
|
||||
Reference in New Issue
Block a user