Entranced monsters don't make movements in webs/nets
/u/xorwich:
Bug (I assume): an entranced enemy stuck in a spider web didn't attack the adjacent spider or begin to un-stick itself as my movements should have made it
Needs further investigation.
Confirmed. This appears to be intentional. I did a quick test by removing the STATUS_STUCK check below in Movement.c, and the behavior was as expected. The monster successively got less stuck on each player movement and also attacked an adjacent monster.
void moveEntrancedMonsters(enum directions dir) {
dir = oppositeDirection(dir);
for (creatureIterator it = iterateCreatures(monsters); hasNextCreature(it);) {
creature *monst = nextCreature(&it);
monst->bookkeepingFlags &= ~MB_HAS_ENTRANCED_MOVED;
}
for (creatureIterator it = iterateCreatures(monsters); hasNextCreature(it);) {
creature *monst = nextCreature(&it);
if (!(monst->bookkeepingFlags & MB_HAS_ENTRANCED_MOVED)
&& monst->status[STATUS_ENTRANCED]
&& !monst->status[STATUS_STUCK]
&& !monst->status[STATUS_PARALYZED]
&& !(monst->bookkeepingFlags & MB_CAPTIVE)) {
moveMonster(monst, nbDirs[dir][0], nbDirs[dir][1]);
monst->bookkeepingFlags |= MB_HAS_ENTRANCED_MOVED;
restartIterator(&it); // loop through from the beginning to be safe
}
}
}
Confirmed. This appears to be intentional. I did a quick test by removing the STATUS_STUCK check below in Movement.c, and the behavior was as expected. The monster successively got less stuck on each player movement and also attacked an adjacent monster.
I have no idea why this behavior would have been intended, for whatever it's worth... intuitively it does seem like entranced creatures stuck in webs should attempt to move. Maybe I included !monst->status[STATUS_STUCK] inadvertently.