Triggered by the question about a fireball in a box, I was curious as to what the specific order of operations is with respect to spell resolution.
I have been unable to find any information which states that a spell's area of effect is limited to it's initial casting point.
Example scenarios:
A fireball is inside a wooden box. Does it destroy the box and expand to 20'?
If not, then consider that if the fireball was inside a cotton shirt. Or a bubble.
An additional example would be to swap fireball out for something like Lightning Bolt. Would hanging out behind a curtain suddenly make the spell utterly useless against you if area of effect is determined before the damage is?
I feel that spells area of effect and damage are not exclusive of each other, and that objects which are destroyed don't successfully impede the spell.
Is this accurate?
Additional information I've found which created the problem:
PHB pg. 196 under Cover
A target with total cover can’t be targeted directly by an attack or a spell, although some spells can reach such a target by including it in an area of effect. A target has total cover if it is completely concealed by an obstacle.
PHB pg. 204 under Area of Effect
A spell’s effect expands in straight lines from the point of origin. If no unblocked straight line extends from the point of origin to a location within the area o f effect, that location isn’t included in the spell’s area. To block one of these imaginary lines, an obstruction must provide total cover, as explained in chapter 9.
These two rules indicate that something as simple as a 5' X 5' roll of linen, so long as it is granting you full cover, is capable of withstanding any AOE spell and excluding you from the area. What's more, the wording seems to contradict each other. Spell AOE says it doesn't affect areas under total cover. Total cover states spell AOE can reach you. That's...... not helpful.
So I've attached an image which shows a Caster (denoted with a C) launching a lightning bolt through a room with 5 targets to help illustrate an example of this issue.