-/* NetHack 3.6 monflag.h $NHDT-Date: 1432512778 2015/05/25 00:12:58 $ $NHDT-Branch: master $:$NHDT-Revision: 1.14 $ */
+/* NetHack 3.6 monflag.h $NHDT-Date: 1582061573 2020/02/18 21:32:53 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.17 $ */
/* Copyright (c) 1989 Mike Threepoint */
/* NetHack may be freely redistributed. See license for details. */
#ifndef MONFLAG_H
#define MONFLAG_H
-#define MS_SILENT 0 /* makes no sound */
-#define MS_BARK 1 /* if full moon, may howl */
-#define MS_MEW 2 /* mews or hisses */
-#define MS_ROAR 3 /* roars */
-#define MS_GROWL 4 /* growls */
-#define MS_SQEEK 5 /* squeaks, as a rodent */
-#define MS_SQAWK 6 /* squawks, as a bird */
-#define MS_HISS 7 /* hisses */
-#define MS_BUZZ 8 /* buzzes (killer bee) */
-#define MS_GRUNT 9 /* grunts (or speaks own language) */
-#define MS_NEIGH 10 /* neighs, as an equine */
-#define MS_WAIL 11 /* wails, as a tortured soul */
-#define MS_GURGLE 12 /* gurgles, as liquid or through saliva */
-#define MS_BURBLE 13 /* burbles (jabberwock) */
-#define MS_ANIMAL 13 /* up to here are animal noises */
-#define MS_SHRIEK 15 /* wakes up others */
-#define MS_BONES 16 /* rattles bones (skeleton) */
-#define MS_LAUGH 17 /* grins, smiles, giggles, and laughs */
-#define MS_MUMBLE 18 /* says something or other */
-#define MS_IMITATE 19 /* imitates others (leocrotta) */
-#define MS_ORC MS_GRUNT /* intelligent brutes */
-#define MS_HUMANOID 20 /* generic traveling companion */
-#define MS_ARREST 21 /* "Stop in the name of the law!" (Kops) */
-#define MS_SOLDIER 22 /* army and watchmen expressions */
-#define MS_GUARD 23 /* "Please drop that gold and follow me." */
-#define MS_DJINNI 24 /* "Thank you for freeing me!" */
-#define MS_NURSE 25 /* "Take off your shirt, please." */
-#define MS_SEDUCE 26 /* "Hello, sailor." (Nymphs) */
-#define MS_VAMPIRE 27 /* vampiric seduction, Vlad's exclamations */
-#define MS_BRIBE 28 /* asks for money, or berates you */
-#define MS_CUSS 29 /* berates (demons) or intimidates (Wiz) */
-#define MS_RIDER 30 /* astral level special monsters */
-#define MS_LEADER 31 /* your class leader */
-#define MS_NEMESIS 32 /* your nemesis */
-#define MS_GUARDIAN 33 /* your leader's guards */
-#define MS_SELL 34 /* demand payment, complain about shoplifters */
-#define MS_ORACLE 35 /* do a consultation */
-#define MS_PRIEST 36 /* ask for contribution; do cleansing */
-#define MS_SPELL 37 /* spellcaster not matching any of the above */
-#define MS_WERE 38 /* lycanthrope in human form */
-#define MS_MOO 39 /* minotaurs */
-#define MS_BOAST 40 /* giants */
+enum ms_sounds {
+ MS_SILENT = 0, /* makes no sound */
+ MS_BARK = 1, /* if full moon, may howl */
+ MS_MEW = 2, /* mews or hisses */
+ MS_ROAR = 3, /* roars */
+ MS_GROWL = 4, /* growls */
+ MS_SQEEK = 5, /* squeaks, as a rodent */
+ MS_SQAWK = 6, /* squawks, as a bird */
+ MS_HISS = 7, /* hisses */
+ MS_BUZZ = 8, /* buzzes (killer bee) */
+ MS_GRUNT = 9, /* grunts (or speaks own language) */
+ MS_NEIGH = 10, /* neighs, as an equine */
+ MS_MOO = 11, /* minotaurs, rothes */
+ MS_WAIL = 12, /* wails, as a tortured soul */
+ MS_GURGLE = 13, /* gurgles, as liquid or through saliva */
+ MS_BURBLE = 14, /* burbles (jabberwock) */
+ MS_TRUMPET = 15, /* trumpets (elephant) */
+ MS_ANIMAL = 15, /* up to here are animal noises */
+ /* FIXME? the grunt "speaks own language" case
+ shouldn't be classified as animal */
+ MS_SHRIEK = 16, /* wakes up others */
+ MS_BONES = 17, /* rattles bones (skeleton) */
+ MS_LAUGH = 18, /* grins, smiles, giggles, and laughs */
+ MS_MUMBLE = 19, /* says something or other */
+ MS_IMITATE = 20, /* imitates others (leocrotta) */
+ MS_WERE = 21, /* lycanthrope in human form */
+ MS_ORC = 22, /* intelligent brutes */
+ /* from here onward, can speach can be comprehended */
+ MS_HUMANOID = 23, /* generic traveling companion */
+ MS_ARREST = 24, /* "Stop in the name of the law!" (Kops) */
+ MS_SOLDIER = 25, /* army and watchmen expressions */
+ MS_GUARD = 26, /* "Please drop that gold and follow me." */
+ MS_DJINNI = 27, /* "Thank you for freeing me!" */
+ MS_NURSE = 28, /* "Take off your shirt, please." */
+ MS_SEDUCE = 29, /* "Hello, sailor." (Nymphs) */
+ MS_VAMPIRE = 30, /* vampiric seduction, Vlad's exclamations */
+ MS_BRIBE = 31, /* asks for money, or berates you */
+ MS_CUSS = 32, /* berates (demons) or intimidates (Wiz) */
+ MS_RIDER = 33, /* astral level special monsters */
+ MS_LEADER = 34, /* your class leader */
+ MS_NEMESIS = 35, /* your nemesis */
+ MS_GUARDIAN = 36, /* your leader's guards */
+ MS_SELL = 37, /* demand payment, complain about shoplifters */
+ MS_ORACLE = 38, /* do a consultation */
+ MS_PRIEST = 39, /* ask for contribution; do cleansing */
+ MS_SPELL = 40, /* spellcaster not matching any of the above */
+ MS_BOAST = 41 /* giants */
+};
#define MR_FIRE 0x01 /* resists fire */
#define MR_COLD 0x02 /* resists cold */
-/* NetHack 3.6 monst.c $NHDT-Date: 1577096800 2019/12/23 10:26:40 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.70 $ */
+/* NetHack 3.6 monst.c $NHDT-Date: 1582061573 2020/02/18 21:32:53 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.72 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Michael Allison, 2006. */
/* NetHack may be freely redistributed. See license for details. */
MON("rothe", S_QUADRUPED, LVL(2, 9, 7, 0, 0), (G_GENO | G_SGROUP | 4),
A(ATTK(AT_CLAW, AD_PHYS, 1, 3), ATTK(AT_BITE, AD_PHYS, 1, 3),
ATTK(AT_BITE, AD_PHYS, 1, 8), NO_ATTK, NO_ATTK, NO_ATTK),
- SIZ(400, 100, MS_SILENT, MZ_LARGE), 0, 0,
+ SIZ(400, 100, MS_MOO, MZ_LARGE), 0, 0,
M1_ANIMAL | M1_NOHANDS | M1_OMNIVORE, M2_HOSTILE, M3_INFRAVISIBLE,
4, CLR_BROWN),
MON("mumak", S_QUADRUPED, LVL(5, 9, 0, 0, -2), (G_GENO | 1),
A(ATTK(AT_BUTT, AD_PHYS, 4, 12), ATTK(AT_BITE, AD_PHYS, 2, 6),
NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK),
- SIZ(2500, 500, MS_ROAR, MZ_LARGE), 0, 0,
+ SIZ(2500, 500, MS_TRUMPET, MZ_LARGE), 0, 0,
M1_ANIMAL | M1_THICK_HIDE | M1_NOHANDS | M1_HERBIVORE,
M2_HOSTILE | M2_STRONG, M3_INFRAVISIBLE, 7, CLR_GRAY),
MON("leocrotta", S_QUADRUPED, LVL(6, 18, 4, 10, 0), (G_GENO | 2),
MON("mastodon", S_QUADRUPED, LVL(20, 12, 5, 0, 0), (G_GENO | 1),
A(ATTK(AT_BUTT, AD_PHYS, 4, 8), ATTK(AT_BUTT, AD_PHYS, 4, 8), NO_ATTK,
NO_ATTK, NO_ATTK, NO_ATTK),
- SIZ(3800, 800, MS_SILENT, MZ_LARGE), 0, 0,
+ SIZ(3800, 800, MS_TRUMPET, MZ_LARGE), 0, 0,
M1_ANIMAL | M1_THICK_HIDE | M1_NOHANDS | M1_HERBIVORE,
M2_HOSTILE | M2_STRONG, M3_INFRAVISIBLE, 22, CLR_BLACK),
/*
M1_ANIMAL | M1_HUMANOID | M1_CARNIVORE,
M2_HOSTILE | M2_STRONG | M2_NASTY, M3_INFRAVISIBLE | M3_INFRAVISION,
17, CLR_BROWN),
- /* 'I' is a visual marker for all invisible monsters and must be unused */
+ /*
+ * Invisible
+ * S_invisible=='I' is a visual marker for all invisible monsters
+ * and must be not be used for any specific monster types. Long
+ * time 'invisible stalker' was changed to 'stalker', an Elemental.
+ */
+
/*
* Jabberwock
*/
A(ATTK(AT_CLAW, AD_SITM, 0, 0), ATTK(AT_BITE, AD_PHYS, 1, 3), NO_ATTK,
NO_ATTK, NO_ATTK, NO_ATTK),
SIZ(100, 50, MS_GROWL, MZ_SMALL), 0, 0,
- M1_ANIMAL | M1_HUMANOID | M1_OMNIVORE, 0, M3_INFRAVISIBLE, 4, CLR_GRAY),
+ M1_ANIMAL | M1_HUMANOID | M1_OMNIVORE, 0, M3_INFRAVISIBLE,
+ 4, CLR_GRAY),
MON("ape", S_YETI, LVL(4, 12, 6, 0, 0), (G_GENO | G_SGROUP | 2),
A(ATTK(AT_CLAW, AD_PHYS, 1, 3), ATTK(AT_CLAW, AD_PHYS, 1, 3),
ATTK(AT_BITE, AD_PHYS, 1, 6), NO_ATTK, NO_ATTK, NO_ATTK),
-/* NetHack 3.6 sounds.c $NHDT-Date: 1582024315 2020/02/18 11:11:55 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.95 $ */
+/* NetHack 3.6 sounds.c $NHDT-Date: 1582061574 2020/02/18 21:32:54 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.96 $ */
/* Copyright (c) 1989 Janet Walz, Mike Threepoint */
/* NetHack may be freely redistributed. See license for details. */
return;
/* presumably nearness and soundok checks have already been made */
- if (!is_silent(mtmp->data) && mtmp->data->msound <= MS_ANIMAL)
+ if (!is_silent(mtmp->data) && mtmp->data->msound <= MS_ANIMAL) {
(void) domonnoise(mtmp);
- else if (mtmp->data->msound >= MS_HUMANOID) {
+ } else if (mtmp->data->msound >= MS_HUMANOID) {
if (!canspotmon(mtmp))
map_invisible(mtmp->mx, mtmp->my);
verbalize("I'm hungry.");
+ } else {
+ /* this is pretty lame but is better than leaving out the block
+ of speech types between animal and humanoid; this covers
+ MS_SILENT too (if caller lets that get this far) since it's
+ excluded by the first two cases */
+ if (canspotmon(mtmp))
+ pline("%s seems famished.", Monnam(mtmp));
+ /* looking famished will be a good trick for a tame skeleton... */
}
}
else if (msound == MS_GUARDIAN && ptr != &mons[g.urole.guardnum])
msound = mons[genus(monsndx(ptr), 1)].msound;
/* some normally non-speaking types can/will speak if hero is similar */
- else if (msound == MS_ORC /* note: MS_ORC is same as MS_GRUNT */
- && ((same_race(ptr, g.youmonst.data) /* current form, */
+ else if (msound == MS_ORC
+ && ((same_race(ptr, g.youmonst.data) /* current form, */
|| same_race(ptr, &mons[Race_switch])) /* unpoly'd form */
|| Hallucination))
msound = MS_HUMANOID;
verbl_msg = vampmsg[vampindex];
}
}
- } break;
+ break;
+ }
case MS_WERE:
if (flags.moonphase == FULL_MOON && (night() ^ !rn2(13))) {
pline("%s throws back %s head and lets out a blood curdling %s!",
Monnam(mtmp), mhis(mtmp),
- ptr == &mons[PM_HUMAN_WERERAT] ? "shriek" : "howl");
+ (ptr == &mons[PM_HUMAN_WERERAT]) ? "shriek" : "howl");
wake_nearto(mtmp->mx, mtmp->my, 11 * 11);
} else
pline_msg =
else
pline_msg = "whickers.";
break;
+ case MS_MOO:
+ pline_msg = mtmp->mpeaceful ? "moos." : "bellows!";
+ break;
case MS_WAIL:
pline_msg = "wails mournfully.";
break;
case MS_BURBLE:
pline_msg = "burbles.";
break;
+ case MS_TRUMPET:
+ pline_msg = "trumpets!";
+ wake_nearto(mtmp->mx, mtmp->my, 11 * 11);
+ break;
case MS_SHRIEK:
pline_msg = "shrieks.";
aggravate();
"giggles.", "chuckles.", "snickers.", "laughs.",
};
pline_msg = laugh_msg[rn2(4)];
- } break;
+ break;
+ }
case MS_MUMBLE:
pline_msg = "mumbles incomprehensibly.";
break;
+ case MS_ORC: /* this used to be an alias for grunt, now it is distinct */
+ pline_msg = "grunts.";
+ break;
case MS_DJINNI:
if (mtmp->mtame) {
verbl_msg = "Sorry, I'm all out of wishes.";
} else {
if (ptr != &mons[PM_PRISONER])
verbl_msg = "This will teach you not to disturb me!";
-#if 0
- else
- verbl_msg = "??????????";
-#endif
+ else /* vague because prisoner might already be out of cell */
+ verbl_msg = "Get me out of here.";
}
break;
- case MS_MOO:
- if (!mtmp->mpeaceful)
- pline_msg = "bellows!";
- else
- pline_msg = "moos.";
- break;
case MS_BOAST: /* giants */
if (!mtmp->mpeaceful) {
switch (rn2(4)) {
}
else {
verbl_msg =
- "Many enter the dungeon, and few return to the sunlit lands.";
+ "Many enter the dungeon, and few return to the sunlit lands.";
}
}
else
if (vismon || unseen || (statue && Hallucination)
/* unseen adjacent monster will respond if able */
|| (range == 1 && mtmp && responsive_mon_at(x, y)
- && mtmp->data->msound != MS_SILENT)
+ && !is_silent(mtmp->data))
/* we check accessible() after m_at() in case there's a
visible monster phazing through a wall here */
|| !(accessible(x, y) || levl[x][y].typ == IRONBARS))
/* if this monster is waiting for something, prod it into action */
mtmp->mstrategy &= ~STRAT_WAITMASK;
- if (vismon && mtmp->mpeaceful && humanoid(mtmp->data)) {
+ if (vismon && humanoid(mtmp->data) && mtmp->mpeaceful && !Conflict) {
if ((otmp = which_armor(mtmp, W_ARMH)) == 0) {
pline("%s waves.", Monnam(mtmp));
} else if (otmp->cursed) {