The Storm Sorcery sorcerous origin from the Sword Coast Adventurer's Guide and Xanathar's Guide to Everything has the Heart of the Storm feature, part of which states:
In addition, whenever you start casting a spell of 1st level or higher that deals lightning or thunder damage, stormy magic erupts from you. This eruption causes creatures of your choice that you can see within 10 feet of you to take lightning or thunder damage (choose each time this ability activates) equal to half your sorcerer level.
I am a bit confused by various edge-cases that arise because this feature triggers when the casting starts and before any lighting or thunder damage has been dealt.
In which of these examples is Heart of the Storm triggered?
- Chromatic Orb can deal lightning or thunder damage, but when I start casting I haven't chosen the damage type yet.
- Chaos Bolt is similarly problematic because the damage type is unknown when the casting starts.
- Storm Sphere can deal lightning damage, but only if I choose to use my bonus action to deal the lightning damage.
- Absorb Elements can deal lightning or thunder damage, but only if it was triggered by lightning or thunder damage.
In the first three examples we don't know if the spell will deal lightning damage when its casting starts.
In the fourth example, the damage that triggers Absorb Elements determines the damage type of the extra damage from the melee attack following Absorb Elements before the casting starts, but the spell in general can deal lightning or thunder damage.