Lairs are distinguished from
megadungeons in that they are the abode of one singular organized
Key thing here is that many players aren't used to fighting something organized. Many of the PCs around my version of Yggsburgh have had their worst runs when invading lairs. Whether the lair was the Pod Caverns of the Sinister Shroom or my own 'Kobolds of Ever Winter', they've had runs against lairs that should have ended adventuring careers, even for those that survived. Many of these runs were losing propositions, where they used up in supplies and expendables many times what they were able to pull out of the dungeon. Sometimes you 'eat the barr' and sometimes...
It's the kinda thing that aught to drive them to find megadungeon type environments where there is more exploitable chaos. And that's why I run sandboxes, so they can choose their preferred level of risk and reward.
I shouldn't be too harsh on my players in this post. As a player, I've heard the echoes of the old Gauntlet video game sarcastically tell me "That was a valiant effort". Some players were trained by videogames with each encounter separate from the one before, and the guards where in the same place at the next visit. Others were trained by DMs who apparently were trained by videogames. Get off my lawn!
Here are 24 ways (1d12, use a d6 for high/low) that monsters in lairs can respond to an invasion of the hearth and home. Some may be beyond the capabilities of less accomplished critters like goblins, but even the lowliest humanoid will change their tactics rather than go extinct. If you think that a response isn't appropriate for the critters, I suggest the critters pick up their mobile loot (did they even know about the hoard from the lost empire, or the hidden library of the original monastery?) and skedaddle. Each of these may be used by a faction within a megadungeon, of course. But then the party can choose to take on the baddies next door.
What the Lair Will Do to Prepare for Another Incursion
(Or what 40-400 kobolds will do after you pay them a visit.)
1. Breed/train new servants/pets that complicate matters for the PCs.
2. Create/use a new entrance and block the old one.
3. Create/use a new entrance and trap the old one.
4. Plan an ambush after their entrance.
5. Double the guards.
6. Make a new alarm so their guards are reinforced quicker.
7. Pack up their treasure and leave for a new lair.
8. Run more patrols outside their lair to search for the party's camp (increase wandering monster chance with the additional chance being the patrol. If the usual chance is 1/1d6, add the patrol on a 2 in addition to the 1/1d6).
9. Ally with a spellcaster.
10. Ally with a powerful monster.
11. Poison the weapons of some guards.
12. Have trackers ready to follow the party after their next raid.
13. Pay the corrupt merchant who buys their surplus slaves and loot to take out a hit on the party. (This is dirty pool if there wasn't already such a connection that the party could have found or used.)
14. Find better armor for their guards.
15. Attempt to hide their lair.
16. Beseech their god to curse the party.
17. Use fire. With oil. Tucker's Kobolds?
18. Pack up their treasure and leave for a new lair, but leave traps.
19. Convince another tribe to trade lairs.
20. Offer the adventuring party treasure to get them to leave them alone, 1 in 4 chance the treasure is cursed. Plus, roll again for their back up plan.
21. Break the seal on the portal/demon chest/bad news package that releases a demon/plaque/uncontrolled badness. Again, best if the party had found a legend/heard the babble of an insane ex-wizard or something before this happens.
22. Offer the adventuring party directions and an advantage to attack the next lair down the block. 1 in 4 chance that the offer is a trap.
23. Make it appear that they have abandoned their lair, only to leap out from secret doors after the party is deep within the complex.
24. Ask the best fighter in the party to become their next chief. 1 in 4 chance this is an offer in earnest, but otherwise a rival will attempt to catch the PC unawares.
Example: After a party expedition that reached the 2nd level of his lair, the Sinister Shroom bred 'fungoid prowlers', which I borrowed stole from Ancient Vaults. These 6 legged crawlers moved across the ceiling to drop down on the rear of the PCs, complicating one of the better attempts the players made to take on the Pod Caverns tactically ('does everyone have a glaive-guissarme?')