The idea would be to make a new flag for terrain and furniture that would function a bit like CONTAINER but for PC, monster and NPC.
When you (or another creature) are on a tile with the flag you can’t be seen by other creature not adjacent to the tile.
It could allow, obviously, to hide from monster but also the possibility for monster to ambush you. We could add this flag to pillow fort, place some in orphanages and BAM now we could have some zombie child springing from pile of pillow to bite you.
I’d like to work on adding that but I don’t know where to start. I’ve found the bit of code that handle the CONTAINER flag but I don’t know where to find the rest.