I'm specifically looking at the Elder Brain's Mind Blast. Based on the line of effect rules for spells, I would say no... But it's not a spell really. Based on logic, I would say yes, because psychic attacks wouldn't be affected by physical barriers (unless we're assuming it's creating a physical force with its mind). Any thoughts?
It works through barriers
The Elder Brain's Mind Blast (Volo's, 174) states:
The elder brain magically emits psychic energy. Creatures of the elder brain’s choice within 60 feet of it...
This is simply an ability that the Elder Brain has and the language has no limitations about creatures they can see, etc. Without those limitations, the language can be read normally that any creature in range that the Brain is aware of is at risk of this ability.
It dovetails nicely with their Creature Sense ability:
The elder brain is aware of the presence of creatures within 5 miles of it that have an Intelligence score of 4 or higher. It knows the distance and direction to each creature, as well as each one’s Intelligence score, but can’t sense anything else about it.
They can first determine there is a creature, and then once it's in range they can hit it with a Mind Blast.
As it is not necessarily a spell, it's unclear
As read on the description of Mind Blast on the Elder Brain's stats(VGM, pp 173–174):
The elder brain magically emits psychic energy. Creatures of the elder brain's choice within 60 feet of it [...]
The only specified conditions for the target are that:
- It must be a creature.
- The elder brain must choose it, meaning it must be aware of the creature's presence.
- It must be within 60 ft of the elder brain.
Spellcasting target rules on the PHB state that:
To target something, you must have a clear path to it, so it can't be behind total cover. If you place an area of effect at a point that you can't see and an obstruction, such as a wall, is between you and that point, the point of origin comes into being on the near side of that obstruction.
As Mind Blast is not necessarily a spell i can't say with certainty this rule applies.
This would boil down to the dm's decision.
If the DM allows it, it creates a very interesting combo with the elder brain's Creature Sense feature. Allowing it blast it's enemies from safety as long as it's completelly walled off.
"Within X feet" is not a shape as specified by the spellcasting rules, so there are no clear rules about how to adjudicate it. As a DM, you can rule this any way you like on a case-by-case basis.
There are clear examples of monster abilities that are defined by "within X feet" but are obviously meant to be line-of-effect. For example, the Balor demon's Death Throes ability says:
When the balor dies, it explodes, and each creature within 30 feet of it must make a DC 20 Dexterity saving throw...
Obviously the intent here is that it explodes like a bomb (or a fireball) and doesn't somehow pass through walls.
Other abilities specify that they can explicitly pass through barriers, such as the Doppleganger's Read Thoughts:
The doppelganger magically reads the surface thoughts of one creature within 60 feet of it. The effect can penetrate barriers, but 3 feet of wood or dirt, 2 feet of stone, 2 inches of metal, or a thin sheet of lead blocks it.
But still other abilities seem like they should be meant to go through barriers, but don't actually say so, such as the pseudodragon's Limited Telepathy:
The pseudodragon can magically communicate simple ideas, emotions, and images telepathically with any creature within 100 feet of it that can understand a language.
Ultimately, the rules aren't clear about whether some abilities can go through walls or not, and it's up to the person running the game to make that call.