B02001 - trees and monster
<Someone> noticed that the change to require axes for trees (and allow them for doors) did not extend to monsters. Now it does. - added 2 new weapon check flags to handle the new cases - added some detailed digging flags to mfndpos, based on ALLOW_DIG, and moved some common logic regarding that flag into mfndpos - made the ARMS check consistent for 2-handed weapons I also noticed that simply carrying a pick was enough to allow a monster to dig a door; wielding wasn't required. This is fixed as well.
This commit is contained in:
18
src/weapon.c
18
src/weapon.c
@@ -599,7 +599,23 @@ register struct monst *mon;
|
||||
case NEED_PICK_AXE:
|
||||
obj = m_carrying(mon, PICK_AXE);
|
||||
/* KMH -- allow other picks */
|
||||
if (!obj) obj = m_carrying(mon, DWARVISH_MATTOCK);
|
||||
if (!obj && !which_armor(mon, W_ARMS))
|
||||
obj = m_carrying(mon, DWARVISH_MATTOCK);
|
||||
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);
|
||||
break;
|
||||
case NEED_PICK_OR_AXE:
|
||||
/* prefer pick for fewer switches on most levels */
|
||||
obj = m_carrying(mon, DWARVISH_MATTOCK);
|
||||
if (!obj) obj = m_carrying(mon, BATTLE_AXE);
|
||||
if (!obj || which_armor(mon, W_ARMS)) {
|
||||
obj = m_carrying(mon, PICK_AXE);
|
||||
if (!obj) obj = m_carrying(mon, AXE);
|
||||
}
|
||||
break;
|
||||
default: impossible("weapon_check %d for %s?",
|
||||
mon->weapon_check, mon_nam(mon));
|
||||
|
||||
Reference in New Issue
Block a user