KhymChanur: Right now, when a monster encounters a terrain with FLAG_WALL, if it can't fly over it or tunnel through it, then it pass through it if it has FLAG_PASS_WALL and the terrain has FLAG_CAN_PASS, or if the monster has FLAG_SPIDER and the terrain has FLAG_WEB. This seems a bit limited to me, and also places a special case that should be in the ToME module into the engine (spiders and webs).
Having a second "can_enter" type function in the dungeon feature definitions, one that's for monsters instead of the player, would be too slow. So, I was thinking that this could be made more flexible by making both PASS_WALL and CAN_PASS flagsets, rather than just boolean flags. The walls' PASS_WALL would contain a list of flags which would permit passing through the wall, and if the monster's CAN_PASS contained any them, the monster could pass through. So the web feature definition would have something like this in its flags:
CAN_PASS={
PASS_WEB=true
PASS_WRAITH=true
}
And the spider definitions would have something like this in their flags:
PASS_WALL={
PASS_WEB=true
}
With this, you could do things like make non-flying monsters which could pass through trees but not through rock, Xorns that pass through rock but not trees, and so on, plus it gets rid of the spider/web special case that's currently in the C code.
DarkGod: yes I like it. Make it valued, so that a feture can require a pass "power" of 2 or more and the monsters must have that much pass "power"
ToME Wiki