| 1989 | } |
| 1990 | |
| 1991 | staticfn boolean |
| 1992 | shade_aware(struct obj *obj) |
| 1993 | { |
| 1994 | if (!obj) |
| 1995 | return FALSE; |
| 1996 | /* |
| 1997 | * The things in this list either |
| 1998 | * 1) affect shades. |
| 1999 | * OR |
| 2000 | * 2) are dealt with properly by other routines |
| 2001 | * when it comes to shades. |
| 2002 | */ |
| 2003 | if (obj->otyp == BOULDER |
| 2004 | || obj->otyp == HEAVY_IRON_BALL |
| 2005 | || obj->otyp == IRON_CHAIN /* dmgval handles those first three */ |
| 2006 | || obj->otyp == MIRROR /* silver in the reflective surface */ |
| 2007 | || obj->otyp == CLOVE_OF_GARLIC /* causes shades to flee */ |
| 2008 | || objects[obj->otyp].oc_material == SILVER) |
| 2009 | return TRUE; |
| 2010 | return FALSE; |
| 2011 | } |
| 2012 | |
| 2013 | /* used for hero vs monster and monster vs monster; also handles |
| 2014 | monster vs hero but that won't happen because hero can't be a shade */ |
no outgoing calls
no test coverage detected