hats vs horns
Some recent newsgroup discussion claiming that a pet ki-rin was wearing a helmet (I think poster was hallucinating) caused me to look at some of the hat handling code. There were a couple of noticeable problems and one latent one in code added for 3.4.1. Polymorphing into a minotaur pushes hard helmets off hero's head, but nothing prevented you from putting one right back on. Helmet wearing monsters who polymorphed into minotaurs weren't affected at all. And message handling always assumed multiple horns even though we have some singled horned monsters, but since all those have no hands they can't wear any armor and that potential pluralization issue wasn't noticeable.
This commit is contained in:
@@ -1154,6 +1154,7 @@ E boolean FDECL(can_track, (struct permonst *));
|
||||
E boolean FDECL(breakarm, (struct permonst *));
|
||||
E boolean FDECL(sliparm, (struct permonst *));
|
||||
E boolean FDECL(sticks, (struct permonst *));
|
||||
E int FDECL(num_horns, (struct permonst *));
|
||||
/* E boolean FDECL(canseemon, (struct monst *)); */
|
||||
E struct attack *FDECL(dmgtype_fromattack, (struct permonst *,int,int));
|
||||
E boolean FDECL(dmgtype, (struct permonst *,int));
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* SCCS Id: @(#)mondata.h 3.4 2001/02/14 */
|
||||
/* SCCS Id: @(#)mondata.h 3.4 2003/01/08 */
|
||||
/* Copyright (c) 1989 Mike Threepoint */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
#define nolimbs(ptr) (((ptr)->mflags1 & M1_NOLIMBS) == M1_NOLIMBS)
|
||||
#define notake(ptr) (((ptr)->mflags1 & M1_NOTAKE) != 0L)
|
||||
#define has_head(ptr) (((ptr)->mflags1 & M1_NOHEAD) == 0L)
|
||||
#define has_horns(ptr) ((ptr) == &mons[PM_MINOTAUR])
|
||||
#define has_horns(ptr) (num_horns(ptr) > 0)
|
||||
#define is_whirly(ptr) ((ptr)->mlet == S_VORTEX || \
|
||||
(ptr) == &mons[PM_AIR_ELEMENTAL])
|
||||
#define is_silent(ptr) ((ptr)->msound == MS_SILENT)
|
||||
|
||||
Reference in New Issue
Block a user