#define DEVTEAM_EMAIL "devteam@nethack.org"
#define DEVTEAM_URL "https://www.nethack.org/"
+#if !defined(NO_VERBOSE_GRANULARITY)
+#define VB_ELEMENTS 5
+/*
+ * Maintenance Notes:
+ * - if one of the function's involved has a name change,
+ * and the Verbose() macro use instance is updated to match,
+ * it will have to be reflected below. If the use instance
+ * isn't updated to reflect the function name change,
+ * it will continue to work using the old name if it matches
+ * one of the entries below.
+ */
+
+enum verbosity_values {
+ vb0interrupt_multi = 0x00000001,
+ vb0use_stethoscope = 0x00000002,
+ vb0Mb_hit = 0x00000004,
+ vb0adjattrib = 0x00000008,
+ vb0ballfall = 0x00000010,
+ vb0use_crystal_ball1 = 0x00000020,
+ vb0use_crystal_ball2 = 0x00000040,
+ vb0digactualhole1 = 0x00000080,
+ vb0digactualhole2 = 0x00000100,
+ vb0mdig_tunnel1 = 0x00000200,
+ vb0mdig_tunnel2 = 0x00000400,
+ vb0boulder_hits_pool1 = 0x00000800,
+ vb0boulder_hits_pool2 = 0x00001000,
+ vb0drop1 = 0x00002000,
+ vb0drop2 = 0x00004000,
+ vb0drop3 = 0x00008000,
+ vb0go_to_level1 = 0x00010000,
+ vb0go_to_level2 = 0x00020000,
+ vb0go_to_level3 = 0x00040000,
+ vb0rot_corpse = 0x00080000,
+ vb0getpos1 = 0x00100000,
+ vb0getpos2 = 0x00200000,
+ vb0off_msg = 0x00400000,
+ vb0on_msg = 0x00800000,
+ vb0Blindf_on = 0x01000000,
+ vb0dog_eat = 0x02000000,
+ vb0dog_invent = 0x04000000,
+ vb0dokick = 0x08000000,
+ vb0toss_up = 0x10000000,
+ vb0consume_tin1 = 0x20000000,
+ vb0consume_tin2 = 0x40000000,
+
+ vb1doengrave1 = 0x00000001,
+ vb1doengrave2 = 0x00000002,
+ vb1doengrave3 = 0x00000004,
+ vb1explode = 0x00000008,
+ vb1moverock = 0x00000010,
+ vb1still_chewing = 0x00000020,
+ vb1trapmove1 = 0x00000040,
+ vb1trapmove2 = 0x00000080,
+ vb1trapmove3 = 0x00000100,
+ vb1trapmove4 = 0x00000200,
+ vb1trapmove5 = 0x00000400,
+ vb1getobj1 = 0x00000800,
+ vb1getobj2 = 0x00001000,
+ vb1doprgold = 0x00002000,
+ vb1doorlock1 = 0x00004000,
+ vb1doorlock2 = 0x00008000,
+ vb1monpoly1 = 0x00010000,
+ vb1monpoly2 = 0x00020000,
+ vb1mswingsm = 0x00040000,
+ vb1missmu = 0x00080000,
+ vb1mswings = 0x00100000,
+ vb1wildmiss = 0x00200000,
+ vb1gulpmu = 0x00400000,
+ vb1explmu = 0x00800000,
+ vb1meatmetal1 = 0x01000000,
+ vb1meatmetal2 = 0x02000000,
+ vb1meatmetal3 = 0x04000000,
+ vb1meatmetal4 = 0x08000000,
+ vb1relobj = 0x10000000,
+ vb1ready_weapon = 0x20000000,
+ vb1wield_tool = 0x40000000,
+
+ vb2meatobj1 = 0x00000001,
+ vb2meatobj2 = 0x00000002,
+ vb2meatobj3 = 0x00000004,
+ vb2meatobj4 = 0x00000008,
+ vb2meatcorpse1 = 0x00000010,
+ vb2meatcorpse2 = 0x00000020,
+ vb2mpickgold = 0x00000040,
+ vb2mpickstuff = 0x00000080,
+ vb2setmangry = 0x00000100,
+ vb2mb_trapped = 0x00000200,
+ vb2m_move1 = 0x00000400,
+ vb2m_move2 = 0x00000800,
+ vb2m_move3 = 0x00001000,
+ vb2m_move4 = 0x00002000,
+ vb2m_move5 = 0x00004000,
+ vb2thitu1 = 0x00008000,
+ vb2thitu2 = 0x00010000,
+ vb2m_throw = 0x00020000,
+ vb2handler_menustyle = 0x00040000,
+ vb2handler_autounlock = 0x00080000,
+ vb2handler_msg_window = 0x00100000,
+ vb2handler_whatis_coord1 = 0x00200000,
+ vb2handler_whatis_coord2 = 0x00400000,
+ vb2dolook = 0x00800000,
+ vb2describe_decor1 = 0x01000000,
+ vb2describe_decor2 = 0x02000000,
+ vb2loot_mon = 0x04000000,
+ vb2dotip = 0x08000000,
+ vb2polymon = 0x10000000,
+ vb2teleds = 0x20000000,
+ vb2level_tele = 0x40000000,
+
+ vb3ghost_from_bottle = 0x00000001,
+ vb3dodip1 = 0x00000002,
+ vb3dodip2 = 0x00000004,
+ vb3dodip3 = 0x00000008,
+ vb3intemple = 0x00000010,
+ vb3doread1 = 0x00000020,
+ vb3doread2 = 0x00000040,
+ vb3doread3 = 0x00000080,
+ vb3doread4 = 0x00000100,
+ vb3doread5 = 0x00000200,
+ vb3doread6 = 0x00000400,
+ vb3doread7 = 0x00000800,
+ vb3drop_boulder_on_player= 0x00001000,
+ vb3do_genocide = 0x00002000,
+ vb3call_kops1 = 0x00004000,
+ vb3call_kops2 = 0x00008000,
+ vb3call_kops3 = 0x00010000,
+ vb3erode_obj1 = 0x00020000,
+ vb3erode_obj2 = 0x00040000,
+ vb3erode_obj3 = 0x00080000,
+ vb3trapeffect_rocktrap = 0x00100000,
+ vb3climb_pit = 0x00200000,
+ vb3drown = 0x00400000,
+ vb3mon_adjust_speed = 0x00800000,
+ vb3hit = 0x01000000,
+ vb3miss = 0x02000000,
+ vb3makewish = 0x04000000,
+ /* 4 available bits*/
+
+ vb4do_attack = 0x00000001,
+ vb4known_hitum = 0x00000002,
+ vb4hmon_hitmon1 = 0x00000004,
+ vb4hmon_hitmon2 = 0x00000008,
+ vb4mhitm_ad_tlpt = 0x00000010,
+ vb4mhitm_ad_wrap1 = 0x00000020,
+ vb4mhitm_ad_wrap2 = 0x00000040,
+ vb4mhitm_ad_dgst = 0x00000080,
+ vb4damageum = 0x00000100,
+ vb4missum = 0x00000200,
+ vb4hmonas1 = 0x00000400,
+ vb4hmonas2 = 0x00000800,
+ vb4hmonas3 = 0x00001000,
+ vb4hmonas4 = 0x00002000,
+ vb4passive = 0x00004000,
+ vb4flash_hits_mon = 0x00008000,
+ /* 11 available bits */
+
+ vb_elements = VB_ELEMENTS
+};
+#undef VB_ELEMENTS
+extern long verbosity_suppressions[vb_elements]; /* in decl.c */
+
+#define Verbose(n,s) (flags.verbose && ((n) < vb_elements) \
+ && !(verbosity_suppressions[(n)] & vb##n##s))
+#else /* NO_VERBOSE_GRANULARITY */
+#define Verbose(n,s) (flags.verbose)
+#endif /* !NO_VERBOSE_GRANULARITY */
+
#endif /* HACK_H */
{
if (g.multi > 0 && !g.context.travel && !g.context.run) {
nomul(0);
- if (flags.verbose && msg)
+ if (Verbose(0,interrupt_multi) && msg)
Norep("%s", msg);
}
}
pline("%s %s %s really %s.",
use_plural ? "Those" : "That", what,
use_plural ? "are" : "is", mnm);
- } else if (flags.verbose && !canspotmon(mtmp)) {
+ } else if (Verbose(0, use_stethoscope) && !canspotmon(mtmp)) {
There("is %s there.", mnm);
}
shieldeff(youdefend ? u.ux : mdef->mx,
youdefend ? u.uy : mdef->my);
}
- if ((do_stun || do_confuse) && flags.verbose) {
+ if ((do_stun || do_confuse) && Verbose(0,Mb_hit)) {
char buf[BUFSZ];
buf[0] = '\0';
abonflg = (ABON(ndx) > 0);
}
if (ACURR(ndx) == old_acurr) {
- if (msgflg == 0 && flags.verbose) {
+ if (msgflg == 0 && Verbose(0, adjattrib)) {
if (ABASE(ndx) == old_abase && AMAX(ndx) == old_amax) {
pline("You're %s as %s as you can get.",
abonflg ? "currently" : "already", attrstr);
if (is_metallic(uarmh)) {
pline("Fortunately, you are wearing a hard helmet.");
dmg = 3;
- } else if (flags.verbose)
+ } else if (Verbose(0, ballfall))
pline("%s does not protect you.", Yname2(uarmh));
}
losehp(Maybe_Half_Phys(dmg), "crunched in the head by an iron ball",
g.urace = urace_init_data;
}
+#ifndef NO_VERBOSE_GRANULARITY
+long verbosity_suppressions[vb_elements] = { 0L, 0L, 0L, 0L, 0L, };
+#endif
+
/*decl.c*/
}
/* read a single character */
- if (flags.verbose)
+ if (Verbose(0, use_crystal_ball1))
You("may look for an object, monster, or special map symbol.");
ch = yn_function("What do you look for?", (char *) 0, '\0');
/* Don't filter out ' ' here; it has a use */
if ((ch != def_monsyms[S_GHOST].sym) && index(quitchars, ch)) {
- if (flags.verbose)
+ if (Verbose(0, use_crystal_ball2))
pline1(Never_mind);
return;
}
add_damage(x, y, madeby_u ? SHOP_PIT_COST : 0L);
} else if (!madeby_obj && canseemon(madeby)) {
pline("%s digs a pit in the %s.", Monnam(madeby), surface_type);
- } else if (cansee(x, y) && flags.verbose) {
+ } else if (cansee(x, y) && Verbose(0, digactualhole1)) {
pline("A pit appears in the %s.", surface_type);
}
/* in case we're digging down while encased in solid rock
else if (!madeby_obj && canseemon(madeby))
pline("%s digs a hole through the %s.", Monnam(madeby),
surface_type);
- else if (cansee(x, y) && flags.verbose)
+ else if (cansee(x, y) && Verbose(0, digactualhole2))
pline("A hole appears in the %s.", surface_type);
if (at_u) {
return TRUE;
}
} else {
- if (flags.verbose) {
+ if (Verbose(0, mdig_tunnel1)) {
if (!Unaware && !rn2(3)) /* not too often.. */
draft_message(TRUE); /* "You feel an unexpected draft." */
}
if (IS_WALL(here->typ)) {
/* KMH -- Okay on arboreal levels (room walls are still stone) */
- if (flags.verbose && !rn2(5))
+ if (Verbose(0, mdig_tunnel2) && !rn2(5))
You_hear("crashing rock.");
if (*in_rooms(mtmp->mx, mtmp->my, SHOPBASE))
add_damage(mtmp->mx, mtmp->my, 0L);
x = obj->ox;
y = obj->oy;
} else if (in_invent) {
- if (flags.verbose) {
+ if (Verbose(0, rot_corpse)) {
char *cname = corpse_xname(obj, (const char *) 0, CXN_NO_PFX);
Your("%s%s %s away%c", obj == uwep ? "wielded " : "", cname,
Strcpy(whobuf, y_monnam(u.usteed));
pline("%s %s %s into the %s.", upstart(whobuf),
vtense(whobuf, "push"), the(xname(otmp)), what);
- if (flags.verbose && !Blind)
+ if (Verbose(0, boulder_hits_pool1) && !Blind)
pline("Now you can cross it!");
/* no splashing in this case */
}
dmg = d((Fire_resistance ? 1 : 3), 6);
losehp(Maybe_Half_Phys(dmg), /* lava damage */
"molten lava", KILLED_BY);
- } else if (!fills_up && flags.verbose
+ } else if (!fills_up && Verbose(0, boulder_hits_pool2)
&& (pushing ? !Blind : cansee(rx, ry)))
pline("It sinks without a trace!");
}
if (u.uswallow) {
/* barrier between you and the floor */
- if (flags.verbose) {
+ if (Verbose(0, drop1)) {
char *onam_p, monbuf[BUFSZ];
/* doname can call s_suffix, reusing its buffer */
if (levhack)
ELevitation = W_ART; /* other than W_ARTI */
- if (flags.verbose)
+ if (Verbose(0, drop2))
You("drop %s.", doname(obj));
freeinv(obj);
hitfloor(obj, TRUE);
float_down(I_SPECIAL | TIMEOUT, W_ARTI | W_ART);
return ECMD_TIME;
}
- if (!IS_ALTAR(levl[u.ux][u.uy].typ) && flags.verbose)
+ if (!IS_ALTAR(levl[u.ux][u.uy].typ) && Verbose(0, drop3))
You("drop %s.", doname(obj));
}
dropx(obj);
/* you climb up the {stairs|ladder};
fly up the stairs; fly up along the ladder */
great_effort = (Punished && !Levitation);
- if (flags.verbose || great_effort)
+ if (Verbose(0, go_to_level1) || great_effort)
pline("%s %s up%s the %s.",
great_effort ? "With great effort, you" : "You",
u_locomotion("climb"),
if (!u.dz) {
; /* stayed on same level? (no transit effects) */
} else if (Flying) {
- if (flags.verbose)
+ if (Verbose(0, go_to_level2))
You("fly down %s.",
g.at_ladder ? "along the ladder" : "the stairs");
} else if (near_capacity() > UNENCUMBERED
KILLED_BY);
selftouch("Falling, you");
} else { /* ordinary descent */
- if (flags.verbose)
+ if (Verbose(0, go_to_level3))
You("%s.", g.at_ladder ? "climb down the ladder"
: "descend the stairs");
}
if (!goal)
goal = "desired location";
- if (flags.verbose) {
+ if (Verbose(0, getpos1)) {
pline("(For instructions type a '%s')",
visctrl(g.Cmd.spkeys[NHKF_GETPOS_HELP]));
msg_given = TRUE;
} else if (c == g.Cmd.spkeys[NHKF_GETPOS_AUTODESC]) {
iflags.autodescribe = !iflags.autodescribe;
pline("Automatic description %sis %s.",
- flags.verbose ? "of features under cursor " : "",
+ Verbose(0, getpos2) ? "of features under cursor " : "",
iflags.autodescribe ? "on" : "off");
if (!iflags.autodescribe)
show_goal_msg = TRUE;
void
off_msg(struct obj *otmp)
{
- if (flags.verbose)
+ if (Verbose(0, off_msg))
You("were wearing %s.", doname(otmp));
}
static void
on_msg(struct obj *otmp)
{
- if (flags.verbose) {
+ if (Verbose(0, on_msg)) {
char how[BUFSZ];
/* call xname() before obj_is_pname(); formatting obj's name
might set obj->dknown and that affects the pname test */
if (Blind && !already_blind) {
changed = TRUE;
- if (flags.verbose)
+ if (Verbose(0, Blindf_on))
You_cant("see any more.");
/* set ball&chain variables before the hero goes blind */
if (Punished)
mtmp->mstun = 1;
if (canseemon(mtmp)) {
obj_name = distant_name(obj, doname); /* (see above) */
- if (flags.verbose)
+ if (Verbose(0, dog_eat))
pline("%s spits %s out in disgust!",
Monnam(mtmp), obj_name);
}
while otmp is still on floor */
char *otmpname = distant_name(otmp, doname);
- if (flags.verbose)
+ if (Verbose(0, dog_invent))
pline("%s picks up %s.",
Monnam(mtmp), otmpname);
}
boolean shopdoor = *in_rooms(x, y, SHOPBASE) ? TRUE : FALSE;
/* break the door */
if (g.maploc->doormask & D_TRAPPED) {
- if (flags.verbose)
+ if (Verbose(0, dokick))
You("kick the door.");
exercise(A_STR, FALSE);
g.maploc->doormask = D_NODOOR;
/* helmet definitely protects you when it blocks petrification */
} else if (!petrifier) {
- if (flags.verbose)
+ if (Verbose(0, toss_up))
Your("%s does not protect you.", helm_simple_name(uarmh));
}
/* stone missile against hero in xorn form would have been
pline("It smells like %s.", what);
if (yn("Eat it?") == 'n') {
- if (flags.verbose)
+ if (Verbose(0, consume_tin1))
You("discard the open tin.");
if (!Hallucination)
tin->dknown = tin->known = 1;
}
if (yn("Eat it?") == 'n') {
- if (flags.verbose)
+ if (Verbose(0, consume_tin2))
You("discard the open tin.");
tin = costly_tin(COST_OPEN);
goto use_up_tin;
ptext = TRUE;
type = ENGRAVE;
if (!objects[otmp->otyp].oc_name_known) {
- if (flags.verbose)
+ if (Verbose(1, doengrave1))
pline("This %s is a wand of digging!", xname(otmp));
doknown = TRUE;
}
ptext = TRUE;
type = BURN;
if (!objects[otmp->otyp].oc_name_known) {
- if (flags.verbose)
+ if (Verbose(1, doengrave2))
pline("This %s is a wand of fire!", xname(otmp));
doknown = TRUE;
}
ptext = TRUE;
type = BURN;
if (!objects[otmp->otyp].oc_name_known) {
- if (flags.verbose)
+ if (Verbose(1, doengrave3))
pline("This %s is a wand of lightning!", xname(otmp));
doknown = TRUE;
}
if (uhurt) {
/* give message for any monster-induced explosion
or player-induced one other than scroll of fire */
- if (flags.verbose && (type < 0 || olet != SCROLL_CLASS)) {
+ if (Verbose(1, explode) && (type < 0 || olet != SCROLL_CLASS)) {
if (do_hallu) { /* (see explanation above) */
do {
Sprintf(hallu_buf, "%s explosion",
deliver_part1 = TRUE;
map_invisible(rx, ry);
}
- if (flags.verbose) {
+ if (Verbose(1, moverock)) {
char you_or_steed[BUFSZ];
Strcpy(you_or_steed,
watch_dig((struct monst *) 0, x, y, FALSE);
return 1;
} else if ((g.context.digging.effort += (30 + u.udaminc)) <= 100) {
- if (flags.verbose)
+ if (Verbose(1, still_chewing))
You("%s chewing on the %s.",
g.context.digging.chew ? "continue" : "begin",
boulder
switch (u.utraptype) {
case TT_BEARTRAP:
- if (flags.verbose) {
+ if (Verbose(1, trapmove1)) {
predicament = "caught in a bear trap";
if (u.usteed)
Norep("%s is %s.", upstart(steedname), predicament);
break;
}
if (--u.utrap) {
- if (flags.verbose) {
+ if (Verbose(1, trapmove2)) {
predicament = "stuck to the web";
if (u.usteed)
Norep("%s is %s.", upstart(steedname), predicament);
}
break;
case TT_LAVA:
- if (flags.verbose) {
+ if (Verbose(1, trapmove3)) {
predicament = "stuck in the lava";
if (u.usteed)
Norep("%s is %s.", upstart(steedname), predicament);
our next attempt to move out of tether range
after this successful move would have its
can't-do-that message suppressed by Norep */
- if (flags.verbose)
+ if (Verbose(1, trapmove4))
Norep("You move within the chain's reach.");
return TRUE;
}
}
if (--u.utrap) {
- if (flags.verbose) {
+ if (Verbose(1, trapmove5)) {
if (anchored) {
predicament = "chained to the";
culprit = "buried ball";
}
}
if (index(quitchars, ilet)) {
- if (flags.verbose)
+ if (Verbose(1, getobj1))
pline1(Never_mind);
return (struct obj *) 0;
}
if (ilet == HANDS_SYM)
return (struct obj *) &cg.zeroobj; /* cast away 'const' */
if (ilet == '\033') {
- if (flags.verbose)
+ if (Verbose(1, getobj2))
pline1(Never_mind);
return (struct obj *) 0;
}
person, but you have no such preternatural gold-sense. */
long hmoney = hidden_gold(FALSE);
- if (flags.verbose) {
+ if (Verbose(1, doprgold)) {
if (!umoney && !hmoney)
Your("wallet is empty.");
else if (umoney && !hmoney)
} else {
/* for mtmp, mb_trapped() does is own wake_nearto() */
loudness = 40;
- if (flags.verbose) {
+ if (Verbose(1, doorlock1)) {
if ((sawit || seeit) && !Unaware)
pline("KABOOM!! You see a door explode.");
else if (!Deaf)
unblock_point(x, y);
seeit = cansee(x, y);
newsym(x, y);
- if (flags.verbose) {
+ if (Verbose(1, doorlock2)) {
if ((sawit || seeit) && !Unaware)
pline_The("door crashes open!");
else if (!Deaf)
} else if (newcham(mdef, (struct permonst *) 0, NO_NC_FLAGS)) {
if (g.vis) { /* either seen or adjacent */
boolean was_seen = !!strcmpi("It", Before),
- verbosely = flags.verbose || !was_seen;
+ verbosely = Verbose(1, monpoly1) || !was_seen;
if (canspotmon(mdef))
pline("%s%s%s turns into %s.", Before,
(void) rloc(magr, RLOC_MSG);
}
} else {
- if (g.vis && flags.verbose)
+ if (g.vis && Verbose(1, monpoly2))
pline1(nothing_happens);
}
}
struct monst *mdef, /* defender */
struct obj *otemp) /* attacker's weapon */
{
- if (flags.verbose && !Blind && mon_visible(magr)) {
+ if (Verbose(1, mswingsm) && !Blind && mon_visible(magr)) {
boolean bash = (is_pole(otemp)
&& dist2(magr->mx, magr->my, mdef->mx, mdef->my) <= 2);
pline("%s pretends to be friendly.", Monnam(mtmp));
else
pline("%s %smisses!", Monnam(mtmp),
- (nearmiss && flags.verbose) ? "just " : "");
+ (nearmiss && Verbose(1, missmu)) ? "just " : "");
stop_occupation();
}
struct obj *otemp, /* attacker's weapon */
boolean bash) /* True: polearm used at too close range */
{
- if (flags.verbose && !Blind && mon_visible(mtmp)) {
+ if (Verbose(1, mswings) && !Blind && mon_visible(mtmp)) {
pline("%s %s %s%s %s.", Monnam(mtmp), mswings_verb(otemp, bash),
(otemp->quan > 1L) ? "one of " : "", mhis(mtmp), xname(otemp));
}
/* no map_invisible() -- no way to tell where _this_ is coming from */
- if (!flags.verbose)
+ if (!Verbose(1, wildmiss))
return;
if (!cansee(mtmp->mx, mtmp->my))
return;
however, polymorphing into a huge form while already
swallowed is still possible */
You("get %s!", is_animal(mtmp->data) ? "regurgitated" : "expelled");
- if (flags.verbose
+ if (Verbose(1, gulpmu)
&& (is_animal(mtmp->data)
|| (dmgtype(mtmp->data, AD_DGST) && Slow_digestion)))
pline("Obviously %s doesn't like your taste.", mon_nam(mtmp));
make_blinded((long) tmp, FALSE);
if (!Blind)
Your1(vision_clears);
- } else if (flags.verbose)
+ } else if (Verbose(1, explmu))
You("get the impression it was not terribly bright.");
}
break;
/* call distant_name() for its side-effects even when
!verbose so won't be printed */
otmpname = distant_name(otmp, doname);
- if (flags.verbose)
+ if (Verbose(1, meatmetal1))
pline("%s eats %s!", Monnam(mtmp), otmpname);
}
/* The object's rustproofing is gone now */
if (vis) {
/* (see above; format even if it won't be printed) */
otmpname = distant_name(otmp, doname);
- if (flags.verbose)
+ if (Verbose(1, meatmetal2))
pline("%s spits %s out in disgust!",
Monnam(mtmp), otmpname);
}
if (cansee(mtmp->mx, mtmp->my)) {
/* (see above; format even if it won't be printed) */
otmpname = distant_name(otmp, doname);
- if (flags.verbose)
+ if (Verbose(1, meatmetal3))
pline("%s eats %s!", Monnam(mtmp), otmpname);
} else {
- if (flags.verbose)
+ if (Verbose(1, meatmetal4))
You_hear("a crunching sound.");
}
mtmp->meating = otmp->owt / 2 + 1;
if (cansee(mtmp->mx, mtmp->my)) {
/* (see above; distant_name() sometimes has side-effects */
otmpname = distant_name(otmp, doname);
- if (flags.verbose)
+ if (Verbose(2, meatobj1))
pline("%s eats %s!", Monnam(mtmp), otmpname);
/* give this one even if !verbose */
if (otmp->oclass == SCROLL_CLASS
if (otmp->otyp == CORPSE)
mon_givit(mtmp, &mons[otmp->corpsenm]);
} else {
- if (flags.verbose)
+ if (Verbose(2, meatobj2))
You_hear("a slurping sound.");
}
/* Heal up to the object's weight in hp */
}
if (ecount > 0) {
- if (cansee(mtmp->mx, mtmp->my) && flags.verbose && buf[0])
+ if (cansee(mtmp->mx, mtmp->my) && Verbose(2, meatobj3) && buf[0])
pline1(buf);
- else if (flags.verbose)
+ else if (Verbose(2, meatobj4))
You_hear("%s slurping sound%s.",
(ecount == 1) ? "a" : "several", plur(ecount));
}
the result won't be printed */
char *otmpname = distant_name(otmp, doname);
- if (flags.verbose)
+ if (Verbose(2, meatcorpse1))
pline("%s eats %s!", Monnam(mtmp), otmpname);
} else {
- if (flags.verbose)
+ if (Verbose(2, meatcorpse2))
You_hear("a masticating sound.");
}
obj_extract_self(gold);
add_to_minv(mtmp, gold);
if (cansee(mtmp->mx, mtmp->my)) {
- if (flags.verbose && !mtmp->isgd)
+ if (Verbose(2, mpickgold) && !mtmp->isgd)
pline("%s picks up some %s.", Monnam(mtmp),
mat_idx == GOLD ? "gold" : "money");
newsym(mtmp->mx, mtmp->my);
from floor and subsequent pickup by mtmp */
char *otmpname = distant_name(otmp, doname);
- if (flags.verbose)
+ if (Verbose(2, mpickstuff))
pline("%s picks up %s.", Monnam(mtmp), otmpname);
}
obj_extract_self(otmp3); /* remove from floor */
alreadyfleeing = (mon->mflee || mon->mfleetim);
monflee(mon, rn2(50) + 25, TRUE, !exclaimed);
if (exclaimed) {
- if (flags.verbose && !alreadyfleeing) {
+ if (Verbose(2, setmangry) && !alreadyfleeing) {
Strcat(buf, " and then turns to flee.");
needpunct = FALSE;
}
boolean
mb_trapped(struct monst *mtmp, boolean canseeit)
{
- if (flags.verbose) {
+ if (Verbose(2, mb_trapped)) {
if (canseeit && !Unaware)
pline("KABOOM!! You see a door explode.");
else if (!Deaf)
}
if ((here->doormask & (D_LOCKED | D_CLOSED)) != 0
&& amorphous(ptr)) {
- if (flags.verbose && canseemon(mtmp))
+ if (Verbose(2, m_move1) && canseemon(mtmp))
pline("%s %s under the door.", Monnam(mtmp),
(ptr == &mons[PM_FOG_CLOUD]
|| ptr->mlet == S_LIGHT) ? "flows" : "oozes");
if (mb_trapped(mtmp, canseeit))
return 2;
} else {
- if (flags.verbose) {
+ if (Verbose(2, m_move2)) {
if (canseeit && canspotmon(mtmp))
pline("%s unlocks and opens a door.",
Monnam(mtmp));
if (mb_trapped(mtmp, canseeit))
return 2;
} else {
- if (flags.verbose) {
+ if (Verbose(2, m_move3)) {
if (canseeit && canspotmon(mtmp))
pline("%s opens a door.", Monnam(mtmp));
else if (canseeit)
if (mb_trapped(mtmp, canseeit))
return 2;
} else {
- if (flags.verbose) {
+ if (Verbose(2, m_move4)) {
if (canseeit && canspotmon(mtmp))
pline("%s smashes down a door.",
Monnam(mtmp));
pline("%s eats through the iron bars.", Monnam(mtmp));
dissolve_bars(mtmp->mx, mtmp->my);
return 3;
- } else if (flags.verbose && canseemon(mtmp))
+ } else if (Verbose(2, m_move5) && canseemon(mtmp))
Norep("%s %s %s the iron bars.", Monnam(mtmp),
/* pluralization fakes verb conjugation */
makeplural(locomotion(ptr, "pass")),
if (u.uac + tlev <= (dieroll = rnd(20))) {
++g.mesg_given;
- if (Blind || !flags.verbose) {
+ if (Blind || !Verbose(2, thitu1)) {
pline("It misses.");
} else if (u.uac + tlev <= dieroll - 2) {
if (onm != onmbuf)
You("are almost hit by %s.", onm);
return 0;
} else {
- if (Blind || !flags.verbose)
+ if (Blind || !Verbose(2, thitu2))
You("are hit%s", exclam(dam));
else
You("are hit by %s%s", onm, exclam(dam));
clear_dknown(singleobj); /* singleobj->dknown = 0; */
if ((singleobj->cursed || singleobj->greased) && (dx || dy) && !rn2(7)) {
- if (canseemon(mon) && flags.verbose) {
+ if (canseemon(mon) && Verbose(2, m_throw)) {
if (is_ammo(singleobj))
pline("%s misfires!", Monnam(mon));
else
}
destroy_nhwindow(tmpwin);
chngd = (flags.menu_style != old_menu_style);
- if (chngd || flags.verbose)
+ if (chngd || Verbose(2, handler_menustyle))
pline("'menustyle' %s \"%s\".", chngd ? "changed to" : "is still",
menutype[(int) flags.menu_style][0]);
return optn_ok;
}
destroy_nhwindow(tmpwin);
chngd = (flags.autounlock != oldflags);
- if (chngd || flags.verbose) {
+ if (chngd || Verbose(2, handler_autounlock)) {
optfn_autounlock(optidx, get_val, FALSE, buf, (char *) NULL);
pline("'%s' %s '%s'.", optname,
chngd ? "changed to" : "is still", buf);
}
destroy_nhwindow(tmpwin);
chngd = (iflags.prevmsg_window != old_prevmsg_window);
- if (chngd || flags.verbose) {
+ if (chngd || Verbose(2, handler_msg_window)) {
(void) optfn_msg_window(opt_msg_window, get_val,
FALSE, buf, empty_optstr);
pline("'msg_window' %.20s \"%.20s\".",
"", MENU_ITEMFLAGS_NONE);
Sprintf(buf, "map: upper-left: <%d,%d>, lower-right: <%d,%d>%s",
1, 0, COLNO - 1, ROWNO - 1,
- flags.verbose ? "; column 0 unused, off left edge" : "");
+ Verbose(2, handler_whatis_coord1)
+ ? "; column 0 unused, off left edge" : "");
add_menu(tmpwin, &nul_glyphinfo, &any, 0, 0,
ATR_NONE, buf, MENU_ITEMFLAGS_NONE);
if (strcmp(windowprocs.name, "tty")) /* only show for non-tty */
"screen: row is offset to accommodate tty interface's use of top line",
MENU_ITEMFLAGS_NONE);
#if COLNO == 80
-#define COL80ARG flags.verbose ? "; column 80 is not used" : ""
+#define COL80ARG Verbose(2, handler_whatis_coord2) ? "; column 80 is not used" : ""
#else
#define COL80ARG ""
#endif
if (from_screen || clicklook) {
if (from_screen) {
- if (flags.verbose)
+ if (Verbose(2, dolook))
pline("Please move the cursor to %s.",
what_is_an_unknown_object);
else
if (strcmp(dfeature, "swamp"))
dfeature = an(dfeature);
- if (flags.verbose) {
+ if (Verbose(2, describe_decor1)) {
Sprintf(outbuf, "There is %s here.", dfeature);
} else {
if (dfeature != fbuf)
if (iflags.last_msg != PLNMSG_BACK_ON_GROUND)
pline("%s %s %s.",
- flags.verbose ? "You are back" : "Back",
+ Verbose(2, describe_decor2) ? "You are back" : "Back",
(Levitation || Flying) ? "over" : "on",
ground);
}
return 1;
}
extract_from_minvent(mtmp, otmp, TRUE, FALSE);
- if (flags.verbose)
+ if (Verbose(2, loot_mon))
You("take %s off of %s.",
thesimpleoname(otmp), mon_nam(mtmp));
otmp = hold_another_object(otmp, "You drop %s!", doname(otmp),
/* check floor container(s) first; at most one will be accessed */
if ((boxes = container_at(cc.x, cc.y, TRUE)) > 0) {
Sprintf(buf, "You can't tip %s while carrying so much.",
- !flags.verbose ? "a container" : (boxes > 1) ? "one" : "it");
+ !Verbose(2, dotip)
+ ? "a container" : (boxes > 1) ? "one" : "it");
if (!check_capacity(buf) && able_to_loot(cc.x, cc.y, FALSE)) {
if (boxes > 1 && (flags.menu_style != MENU_TRADITIONAL
|| iflags.menu_requested)) {
dismount_steed(DISMOUNT_POLY);
}
- if (flags.verbose) {
+ if (Verbose(2, polymon)) {
static const char use_thec[] = "Use the command #%s to %s.";
static const char monsterc[] = "monster";
struct permonst *uptr = g.youmonst.data;
}
pline("As you open the bottle, an enormous %s emerges!",
Hallucination ? rndmonnam(NULL) : (const char *) "ghost");
- if (flags.verbose)
+ if (Verbose(3, ghost_from_bottle))
You("are frightened to death, and unable to move.");
nomul(-3);
g.multi_reason = "being frightened to death";
; /* can't dip something into fountain or pool if can't reach */
} else if (IS_FOUNTAIN(here)) {
Snprintf(qbuf, sizeof(qbuf), "%s%s into the fountain?", Dip_,
- flags.verbose ? obuf : shortestname);
+ Verbose(3, dodip1) ? obuf : shortestname);
/* "Dip <the object> into the fountain?" */
if (yn(qbuf) == 'y') {
obj->pickup_prev = 0;
const char *pooltype = waterbody_name(u.ux, u.uy);
Snprintf(qbuf, sizeof(qbuf), "%s%s into the %s?", Dip_,
- flags.verbose ? obuf : shortestname, pooltype);
+ Verbose(3, dodip2) ? obuf : shortestname, pooltype);
/* "Dip <the object> into the {pool, moat, &c}?" */
if (yn(qbuf) == 'y') {
if (Levitation) {
/* "What do you want to dip <the object> into? [xyz or ?*] " */
Snprintf(qbuf, sizeof qbuf, "dip %s into",
- flags.verbose ? obuf : shortestname);
+ Verbose(3, dodip3) ? obuf : shortestname);
potion = getobj(qbuf, drink_ok, GETOBJ_NOFLAGS);
if (!potion)
return ECMD_CANCEL;
You("sense a presence close by!");
mtmp->mpeaceful = 0;
set_malign(mtmp);
- if (flags.verbose)
+ if (Verbose(3, intemple))
You("are frightened to death, and unable to move.");
nomul(-3);
g.multi_reason = "being terrified of a ghost";
/* outrumor has its own blindness check */
if (otyp == FORTUNE_COOKIE) {
- if (flags.verbose)
+ if (Verbose(3, doread1))
You("break up the cookie and throw away the pieces.");
outrumor(bcsign(scroll), BY_COOKIE);
if (!Blind)
return ECMD_OK;
}
if (otyp == HAWAIIAN_SHIRT) {
- pline("%s features %s.", flags.verbose ? "The design" : "It",
+ pline("%s features %s.",
+ Verbose(3, doread2) ? "The design" : "It",
hawaiian_design(scroll, buf));
return ECMD_TIME;
}
mesg = (otyp == T_SHIRT) ? tshirt_text(scroll, buf)
: apron_text(scroll, buf);
endpunct = "";
- if (flags.verbose) {
+ if (Verbose(3, doread3)) {
int ln = (int) strlen(mesg);
/* we will be displaying a sentence; need ending punctuation */
if (Blind) {
You("feel the embossed numbers:");
} else {
- if (flags.verbose)
+ if (Verbose(3, doread4))
pline("It reads:");
pline("\"%s\"",
scroll->oartifact
((int) scroll->o_id % 10),
(!((int) scroll->o_id % 3)),
(((int) scroll->o_id * 7) % 10),
- (flags.verbose || Blind) ? "." : "");
+ (Verbose(3, doread5) || Blind) ? "." : "");
if (!u.uconduct.literate++)
livelog_printf(LL_CONDUCT,
"became literate by reading a credit card");
You_cant(find_any_braille);
return ECMD_OK;
}
- if (flags.verbose)
+ if (Verbose(3, doread6))
pline("It reads:");
Sprintf(buf, "%s", pmname(pm, NEUTRAL));
pline("\"Magic Marker(TM) %s Red Ink Marker Pen. Water Soluble.\"",
} else if (scroll->oclass == COIN_CLASS) {
if (Blind)
You("feel the embossed words:");
- else if (flags.verbose)
+ else if (Verbose(3, doread7))
You("read:");
pline("\"1 Zorkmid. 857 GUE. In Frobs We Trust.\"");
if (!u.uconduct.literate++)
pline("Fortunately, you are wearing a hard helmet.");
if (dmg > 2)
dmg = 2;
- } else if (flags.verbose) {
+ } else if (Verbose(3, drop_boulder_on_player)) {
pline("%s does not protect you.", Yname2(uarmh));
}
}
* circumstances. Who's speaking? Divine pronouncements
* aren't supposed to be hampered by deafness....
*/
- if (flags.verbose)
+ if (Verbose(3, do_genocide))
pline("A thunderous voice booms through the caverns:");
verbalize("No, mortal! That will not be done.");
}
&& (g.mvitals[PM_KOP_KAPTAIN].mvflags & G_GONE));
if (!angry_guards(!!Deaf) && nokops) {
- if (flags.verbose && !Deaf)
+ if (Verbose(3, call_kops1) && !Deaf)
pline("But no one seems to respond to it.");
return;
}
if (nearshop) {
/* Create swarm around you, if you merely "stepped out" */
- if (flags.verbose)
+ if (Verbose(3, call_kops2))
pline_The("Keystone Kops appear!");
mm.x = u.ux;
mm.y = u.uy;
makekops(&mm);
return;
}
- if (flags.verbose)
+ if (Verbose(3, call_kops3))
pline_The("Keystone Kops are after you!");
/* Create swarm near down staircase (hinders return to level) */
if (isok(sx, sy)) {
} /* isgd && has gold */
while ((otmp = (is_pet ? droppables(mtmp) : mtmp->minvent)) != 0) {
- mdrop_obj(mtmp, otmp, is_pet && flags.verbose);
+ mdrop_obj(mtmp, otmp, is_pet && Verbose(1, relobj));
}
if (show && cansee(omx, omy))
/* this used to take place sooner, but if a --More-- prompt was issued
then the old map display was shown instead of the new one */
- if (is_teleport && flags.verbose)
+ if (is_teleport && Verbose(2, teleds))
You("materialize in %s location!",
(nux == u.ux0 && nuy == u.uy0) ? "the same" : "a different");
/* if terrain type changes, levitation or flying might become blocked
}
schedule_goto(&newlevel, UTOTYPE_NONE, (char *) 0,
- flags.verbose ? "You materialize on a different level!"
- : (char *) 0);
+ Verbose(2, level_tele)
+ ? "You materialize on a different level!"
+ : (char *) 0);
/* in case player just read a scroll and is about to be asked to
call it something, we can't defer until the end of the turn */
} else if (!erosion_matters(otmp)) {
return ER_NOTHING;
} else if (!vulnerable || (otmp->oerodeproof && otmp->rknown)) {
- if (flags.verbose && print && (uvictim || vismon))
+ if (Verbose(3, erode_obj1) && print && (uvictim || vismon))
pline("%s %s %s not affected by %s.",
uvictim ? "Your" : s_suffix(Monnam(victim)),
ostr, vtense(ostr, "are"), bythe[type]);
return ER_NOTHING;
} else if (otmp->oerodeproof || (otmp->blessed && !rnl(4))) {
- if (flags.verbose && (print || otmp->oerodeproof)
+ if (Verbose(3, erode_obj2) && (print || otmp->oerodeproof)
&& (uvictim || vismon || visobj))
pline("Somehow, %s %s %s not affected by the %s.",
uvictim ? "your"
delobj(otmp);
return ER_DESTROYED;
} else {
- if (flags.verbose && print) {
+ if (Verbose(3, erode_obj3) && print) {
if (uvictim)
Your("%s %s completely %s.",
ostr, vtense(ostr, Blind ? "feel" : "look"), msg[type]);
} else if (is_metallic(uarmh)) {
pline("Fortunately, you are wearing a hard helmet.");
dmg = 2;
- } else if (flags.verbose) {
+ } else if (Verbose(3, trapeffect_rocktrap)) {
pline("%s does not protect you.", Yname2(uarmh));
}
} else if (passes_rocks(g.youmonst.data)) {
pitname);
fill_pit(u.ux, u.uy);
g.vision_full_recalc = 1; /* vision limits change */
- } else if (u.dz || flags.verbose) {
+ } else if (u.dz || Verbose(3, climb_pit)) {
/* these should use 'pitname' rather than "pit" for hallucination
but that would nullify Norep (this message can be repeated
many times without further user intervention by using a run
if (Amphibious || Swimming) {
if (Amphibious) {
- if (flags.verbose)
+ if (Verbose(3, drown))
pline("But you aren't drowning.");
if (!Is_waterlevel(&u.uz)) {
if (Hallucination)
if (g.unweapon) {
g.unweapon = FALSE;
- if (flags.verbose) {
+ if (Verbose(4, do_attack)) {
if (uwep)
You("begin bashing monsters with %s.", yname(uwep));
else if (!cantwield(g.youmonst.data))
if (g.override_confirmation) {
/* this may need to be generalized if weapons other than
Stormbringer acquire similar anti-social behavior... */
- if (flags.verbose)
+ if (Verbose(4, known_hitum))
Your("bloodthirsty blade attacks!");
}
if ((mclone = clone_mon(mon, 0, 0)) != 0) {
withwhat[0] = '\0';
- if (u.twoweap && flags.verbose)
+ if (u.twoweap && Verbose(4, hmon_hitmon1))
Sprintf(withwhat, " with %s", yname(obj));
pline("%s divides as you hit it%s!", Monnam(mon), withwhat);
hittxt = TRUE;
|| (thrown && g.m_shot.n > 1 && g.m_shot.o == obj->otyp))) {
if (thrown)
hit(mshot_xname(obj), mon, exclam(tmp));
- else if (!flags.verbose)
+ else if (!Verbose(4, hmon_hitmon2))
You("hit it.");
else /* hand_to_hand */
You("%s %s%s",
hitmsg(magr, mattk);
if (!negated) {
- if (flags.verbose)
+ if (Verbose(4, mhitm_ad_tlpt))
Your("position suddenly seems %suncertain!",
(Teleport_control && !Stunned && !unconscious()) ? ""
: "very ");
pline("%s is being crushed.", Monnam(mdef));
} else {
mhm->damage = 0;
- if (flags.verbose)
+ if (Verbose(4, mhitm_ad_wrap1))
You("brush against %s %s.", s_suffix(mon_nam(mdef)),
mbodypart(mdef, LEG));
}
}
} else {
mhm->damage = 0;
- if (flags.verbose)
+ if (Verbose(4, mhitm_ad_wrap2))
pline("%s brushes against your %s.", Monnam(magr),
body_part(LEG));
}
mhm->done = TRUE;
return;
}
- if (flags.verbose && !Deaf)
+ if (Verbose(4, mhitm_ad_dgst) && !Deaf)
verbalize("Burrrrp!");
mhm->damage = mdef->mhp;
/* Use up amulet of life saving */
You_feel("embarrassed for a moment.");
if (mhm.damage)
xkilled(mdef, XKILL_NOMSG);
- } else if (!flags.verbose) {
+ } else if (!Verbose(4, damageum)) {
You("destroy it!");
if (mhm.damage)
xkilled(mdef, XKILL_NOMSG);
if (could_seduce(&g.youmonst, mdef, mattk))
You("pretend to be friendly to %s.", mon_nam(mdef));
- else if (canspotmon(mdef) && flags.verbose)
+ else if (canspotmon(mdef) && Verbose(4, missum))
You("miss %s.", mon_nam(mdef));
else
You("miss it.");
if (mattk->aatyp == AT_CLAW)
verb = "hit"; /* not "claws" */
You("%s %s.", verb, mon_nam(mon));
- if (silverhit && flags.verbose)
+ if (silverhit && Verbose(4, hmonas1))
silver_sears(&g.youmonst, mon, silverhit);
}
sum[i] = damageum(mon, mattk, specialdmg);
choking hug; deals damage but never grabs hold */
if (specialdmg) {
You("%s %s%s", verb, mon_nam(mon), exclam(specialdmg));
- if (silverhit && flags.verbose)
+ if (silverhit && Verbose(4, hmonas2))
silver_sears(&g.youmonst, mon, silverhit);
sum[i] = damageum(mon, mattk, specialdmg);
} else {
byhand ? "throttled" : "crushed",
/* extra feedback for non-breather being choked */
unconcerned ? " but doesn't seem concerned" : "");
- if (silverhit && flags.verbose)
+ if (silverhit && Verbose(4, hmonas3))
silver_sears(&g.youmonst, mon, silverhit);
sum[i] = damageum(mon, mattk, specialdmg);
} else if (i >= 2 && (sum[i - 1] > MM_MISS)
uunstick();
You("grab %s!", mon_nam(mon));
set_ustuck(mon);
- if (silverhit && flags.verbose)
+ if (silverhit && Verbose(4, hmonas4))
silver_sears(&g.youmonst, mon, silverhit);
sum[i] = damageum(mon, mattk, specialdmg);
}
break;
case AD_ACID:
if (mhitb && rn2(2)) {
- if (Blind || !flags.verbose)
+ if (Blind || !Verbose(4, passive))
You("are splashed!");
else
You("are splashed by %s %s!", s_suffix(mon_nam(mon)),
mtmp->mcansee = 0;
mtmp->mblinded = (tmp < 3) ? 0 : rnd(1 + 50 / tmp);
}
- } else if (flags.verbose && useeit) {
+ } else if (Verbose(4, flash_hits_mon) && useeit) {
if (lev->lit)
pline("The flash of light shines on %s.", mon_nam(mtmp));
else
}
setuwep(wep);
- if (was_twoweap && !u.twoweap && flags.verbose) {
+ if (was_twoweap && !u.twoweap && Verbose(1, ready_weapon)) {
/* skip this message if we already got "empty handed" one above;
also, Null is not safe for neither TWOWEAPOK() or bimanual() */
if (uwep)
return FALSE;
}
if (welded(uwep)) {
- if (flags.verbose) {
+ if (Verbose(1, wield_tool)) {
const char *hand = body_part(HAND);
if (bimanual(uwep))
if (petrify) {
/* mimic the player's petrification countdown; "slowing down"
even if fast movement rate retained via worn speed boots */
- if (flags.verbose)
+ if (Verbose(3, mon_adjust_speed))
pline("%s is slowing down.", Monnam(mon));
} else if (adjust > 0 || mon->mspeed == MFAST)
pline("%s is suddenly moving %sfaster.", Monnam(mon), howmuch);
const char *force) /* usually either "." or "!" via exclam() */
{
boolean verbosely = (mtmp == &g.youmonst
- || (flags.verbose
+ || (Verbose(3, hit)
&& (cansee(g.bhitpos.x, g.bhitpos.y)
|| canspotmon(mtmp) || engulfing_u(mtmp))));
{
pline("%s %s %s.", The(str), vtense(str, "miss"),
((cansee(g.bhitpos.x, g.bhitpos.y) || canspotmon(mtmp))
- && flags.verbose) ? mon_nam(mtmp) : "it");
+ && Verbose(3, miss)) ? mon_nam(mtmp) : "it");
}
static void
promptbuf[0] = '\0';
nothing = cg.zeroobj; /* lint suppression; only its address matters */
- if (flags.verbose)
+ if (Verbose(3, makewish))
You("may wish for an object.");
retry:
Strcpy(promptbuf, "For what do you wish");