[RPG] Does Sacred Flame or Firebolt do more damage on average to a Shadow over an arbitrary but finite number of rounds

dnd-5emonstersoptimizationspellsstatistics

Assume the following character build:

Level 2 Variant Human Wild Magic Sorcerer with Magic Initiate Feat; relevant spells are Sacred Flame and Fire Bolt. While I don't think character level is relevant, it is included in case an ability plays a larger roll than anticipated.

Ability Scores:
STR: 8 (-1)
DEX: 14 (+2)
CON: 14 (+2)
INT: 10 (+0)
WIS: 12 (+1)
CHA: 14 (+2)

Spell Save DC: 8 + 2 + 2 = 12
Spell Attack Modifier: 2 + 2 = 4

Spell Save DC for Sacred Flame: 8 + 2 + 1 = 11

Magic Initiate (5e PHB page 168):

Choose a class{cleric}: You learn two cantrips of your choice from that class’s spell list. … Your spellcasting ability for these spells depends on the class you chose: … Wisdom for cleric

Sacred Flame (5e PHB page 272):

Cantrip.
Casting Time: 1 action.
Flame-like radiance descends on a creature that you can see within range. The target must succeed on a Dexterity saving throw or take 1d8 radiant damage. The target gains no benefit from cover for this saving throw.

Firebolt (5e PHB page 242):

Cantrip.
Casting Time: 1 action
You hurl a mote of fire at a creature or object within range. Make a ranged spell attack against the target. On a hit, the target takes 1d10 fire damage. A flammable object hit by this spell ignites if it isn't being worn or carried.

Shadow (53 MM page 269),

Armor Class 12
Hit Points 16 (3d8 + 3)
DEX: 14 (+2)
Damage Vulnerabilities radiant
Damage Resistances … fire …

Damage Resistance and Vulnerability (53 PHB page 197)

If a creature or an object has resistance to a damage type, damage of that type is halved against it. If a creature or an object has vulnerability to a damage type, damage of that type is doubled against it.

Assuming that we don't have to worry about the Sorcerer taking any damage (just for the sake of the question, otherwise it boils down to the Sorcerer dying after a few rounds), which spell would be the better choice to deal the maximum amount of damage on average within an arbitrary but finite amount of rounds?

Best Answer

Ideally, Sacred Flame kills it (roughly) twice as fast

A simple formula answers this, with X being the number of rounds needed to kill the Shadow.
1d10 averages 5.5, halved is 2.75
1d8 averages 4.5, doubled is 9

For Firebolt, you hit on 8-20 (chance for crit), so .65 x (5.5/2)(crit bonus)x(XFB) >= 16
(Need to hit AC 12; roll 1d20 +2 Int +2 proficiency)
(14 / 13 = crit factor; (x+1)/x for damage with the chance of crit thrown in)

For Sacred Flame, you hit on 13-20 (and no crit) .4 x (4.5 x 2)(XSF) >= 16
With a DC of 11 (you only have +1 due to your 12 Wisdom)
(The Shadow makes a dex saving throw versus the spell)

Solve for XFB: 16/(.65 x 2.75 x 1.077) = 8.31 rounds
Solve for XSF: 16/(.4 x 9) = 4.44 rounds

As a practical matter, being able to kill it in ~4 rounds rather than ~8 rounds means that your Sorcerer with that meager 16 HP has a far better chance to survive the fight before having no offensive capability.

Actions
Strength Drain. Melee Weapon Attack: +4 to hit, reach 5 ft., one creature.
Hit: 9 (2d6 + 2) necrotic damage.

Two hits and your Sorcerer is down.

This is an encounter were the Cleric's "turn undead" would be a handy skill to have.

This whole problem also presumes that you stay more than five feet away from the Shadow. In the case of firebolt, since that is a ranged spell attack rather than a spell that calls for a save, if the Shadow closes to melee range your firebolt attacks at disadvantage.

(SRD p. 103; spell attacks) Most spells that require attack rolls involve ranged attacks. Remember that you have disadvantage on a ranged attack roll if you are within 5 feet of a hostile creature that can see you and that isn’t incapacitated.