From: PatR Date: Fri, 29 Jul 2022 23:11:35 +0000 (-0700) Subject: dwarf + pick-axe feedback X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a6d85f9d362e0a536fd23c7ad45f848f759deef1;p=nethack dwarf + pick-axe feedback When you see a dwarf wield a pick-axe, |The dwarf wields a pick-axe! avoid the exclamation point if that dwarf just intends to dig. |The dwarf wields a pick-axe. --- diff --git a/src/weapon.c b/src/weapon.c index c38855ddd..fc019810f 100644 --- a/src/weapon.c +++ b/src/weapon.c @@ -746,6 +746,7 @@ int mon_wield_item(struct monst *mon) { struct obj *obj; + boolean exclaim = TRUE; /* assume mon is planning to attack */ /* This case actually should never happen */ if (mon->weapon_check == NO_WEAPON_WANTED) @@ -763,12 +764,14 @@ mon_wield_item(struct monst *mon) /* KMH -- allow other picks */ if (!obj && !which_armor(mon, W_ARMS)) obj = m_carrying(mon, DWARVISH_MATTOCK); + exclaim = FALSE; /* mon is just planning to dig */ break; case NEED_AXE: /* currently, only 2 types of axe */ obj = m_carrying(mon, BATTLE_AXE); if (!obj || which_armor(mon, W_ARMS)) obj = m_carrying(mon, AXE); + exclaim = FALSE; break; case NEED_PICK_OR_AXE: /* prefer pick for fewer switches on most levels */ @@ -780,6 +783,7 @@ mon_wield_item(struct monst *mon) if (!obj) obj = m_carrying(mon, AXE); } + exclaim = FALSE; break; default: impossible("weapon_check %d for %s?", mon->weapon_check, @@ -829,7 +833,8 @@ mon_wield_item(struct monst *mon) if (canseemon(mon)) { boolean newly_welded; - pline("%s wields %s!", Monnam(mon), doname(obj)); + pline("%s wields %s%c", Monnam(mon), doname(obj), + exclaim ? '!' : '.'); /* 3.6.3: mwelded() predicate expects the object to have its W_WEP bit set in owormmask, but the pline here and for artifact_light don't want that because they'd have '(weapon