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.
This commit is contained in:
PatR
2022-07-29 16:11:35 -07:00
parent 34db0b0dd3
commit a6d85f9d36

View File

@@ -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