fix #2495 - light vs gremlins (trunk only)

From a bug report, flashing yourself
with a camera while in gremlin form blinded as with any other form, but
didn't inflict any damage the way that flashing a monster gremlin does.
This fixes that, and also makes light from wand/scroll/spell that hits
you-as-gremlin or monster gremlins do 1d5 damage too.  It happens even
if the target is already in a lit spot, but doesn't continue afterwards:
simply being in a lit spot doesn't cause any damage, nor does lamp light.
This commit is contained in:
nethack.rankin
2011-10-17 01:32:23 +00:00
parent 2402f43776
commit 897d527837
5 changed files with 94 additions and 13 deletions

View File

@@ -2341,6 +2341,7 @@ E int FDECL(passive, (struct monst *,BOOLEAN_P,int,UCHAR_P,BOOLEAN_P));
E void FDECL(passive_obj, (struct monst *,struct obj *,struct attack *));
E void FDECL(stumble_onto_mimic, (struct monst *));
E int FDECL(flash_hits_mon, (struct monst *,struct obj *));
E void FDECL(light_hits_gremlin, (struct monst *,int));
/* ### unixmain.c ### */
@@ -2685,6 +2686,8 @@ E void FDECL(zapnodir, (struct obj *));
E int NDECL(dozap);
E int FDECL(zapyourself, (struct obj *,BOOLEAN_P));
E void FDECL(ubreatheu, (struct attack *));
E int FDECL(lightdamage, (struct obj *,BOOLEAN_P,int));
E boolean FDECL(flashburn, (long));
E boolean FDECL(cancel_monst, (struct monst *,struct obj *,
BOOLEAN_P,BOOLEAN_P,BOOLEAN_P));
E void NDECL(zapsetup);
@@ -2710,7 +2713,6 @@ E void FDECL(destroy_item, (int,int));
E int FDECL(destroy_mitem, (struct monst *,int,int));
E int FDECL(resist, (struct monst *,CHAR_P,int,int));
E void NDECL(makewish);
E boolean FDECL(flashburn, (long));
#endif /* !MAKEDEFS_C && !LEV_LEX_C */