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:
cohrs
2002-08-11 17:32:47 +00:00
parent 02c9ce9214
commit b4b5a0fe52
6 changed files with 81 additions and 33 deletions

View File

@@ -49,10 +49,7 @@ register xchar omx,omy,gx,gy;
else allowflags = ALLOW_SSM | ALLOW_SANCT;
if (passes_walls(mtmp->data)) allowflags |= (ALLOW_ROCK|ALLOW_WALL);
if (throws_rocks(mtmp->data)) allowflags |= ALLOW_ROCK;
if (tunnels(mtmp->data) &&
(!needspick(mtmp->data) || m_carrying(mtmp, PICK_AXE) ||
m_carrying(mtmp, DWARVISH_MATTOCK)))
allowflags |= ALLOW_DIG;
if (tunnels(mtmp->data)) allowflags |= ALLOW_DIG;
if (!nohands(mtmp->data) && !verysmall(mtmp->data)) {
allowflags |= OPENDOOR;
if (m_carrying(mtmp, SKELETON_KEY)) allowflags |= BUSTDOOR;