Amazingly, someone's already done the math on this. All credit for the solution goes to /u/Parad0xxis on Reddit for the answer (he claims others before him did something similar, but never cites any names or alternative sources, but I'm going to be better than that), as well as the many contributors adding small improvements here and there. But all told, it supposedly takes only a single 13th-level character to deal all thirteen "official" damage types in a single attack roll (sorry, no blueberry damage). I'll streamline the process a bit from the original post, but you can read the original at the link provided.
Step the First: make a Fallen Aasimar (Volo's Guide)
- At 3rd level, your Fallen Aasimar gains the Necrotic Shroud ability, which makes your Aasimar's eyes pools of inky blackness, and gives them a pair of skeletal wings... but more importantly, adds necrotic damage equal to their level on attacks for 1 minute per day.
Step два: Warlock (Pact of the Blade) 5
- According to the post, you start with five levels as a Pact of the Blade Warlock. During a short rest, you can make any magic weapon your pact weapon, for which you'll want a Frost Brand for the added 1d6 cold damage; as for the weapon itself, the Frost Brand can be of any type of weapon, so the original post cites a longsword for simplicity (and the 1d8 slashing damage).
- These levels also grant you access to cantrips such as Booming Blade that will add 1d8 thunder damage to your weapon attacks should the target of your attack move...
- ...and multiple invocations, the most important of which is Eldritch Smite, letting you expend a Warlock spell slot and granting 1d8 force damage (plus 1d8 more per spell level) on a successful attack.
- And if your patron is a Dao Genie, you can choose to add bludgeoning damage to your attack equal to your proficiency bonus (which, since this is a 13th-level character, would be +5 if my overall math is right).
Current damage types:
slashing, bludgeoning, cold, force, necrotic, thunder (6/13)
Step 2½: miscellaneous, not-class-based stuff
- At several points in this build, you'll be granted the option of a feat or an ability score increase. Eventually, you'll want to take the Gift of the Chromatic Dragon feat to add 1d4 lightning damage to one weapon attack once per long rest. It's not a lot, but it all adds up.
- What is a lot, however, is the application of purple worm poison for its 12d6 poison damage on a failed DC 19 Constitution save. (We don't use that namby-pamby serpent venom here.)
Current damage types:
slashing, bludgeoning, cold, force, lightning, necrotic, poison, thunder (8/13)
Step 5—"3, sir!"—3: Bard (College of Whispers) 3
- With the Psychic Blades special ability, you can expend one use of Bardic Inspiration to add an additional 2d6 psychic damage to your weapon attack.
- ...yeah, this was kind of a lame one. Sorry.
Current damage types:
slashing, bludgeoning, cold, force, lightning, necrotic, poison, psychic, thunder (9/13)
Step 1002: Paladin 2
That means '4' in base 2, aka binary... okay, I'm getting carried away with the silly headers. I'll stop now.
- You won't even have time to take an oath, because we're only dipping into this class for two things:
- Divine Smite adds 2d8 radiant damage to your attack after you expend a 1st-level spell slot, of which the Paladin gets two; and
- Searing Smite in turn adds 1d6 fire damage. (Keep in mind that Searing Smite is a concentration spell lasting 1 minute or until expended.)
Current damage types:
slashing, bludgeoning, cold, fire, force, lightning, necrotic, poison, psychic, radiant, thunder (11/13)
Step 5 (and Final): Ranger (Swarmkeeper) 3
- While you could also get Searing Smite here, what's more important is the retention of Absorb Elements: when you take damage of a specified damage type—in this case, we want acid—you can deal 1d6 damage of that type in your next attack. (You might want a Wizard or something to hit you with Acid Splash, since this is the only real random element otherwise.)
- Finally, the Gathered Swarm ability of the Swarmkeeper Ranger conjures a small intangible swarm to assist you in combat, of which one of their effects is to immediately deal 1d6 piercing damage after you land an attack.
Final Tally:
Thirteen levels, thirteen damage types. (Once again, no blueberry. Sorry.) With all that said and done, once per day, our theoretical character is able to inflict the following damage in a single attack:
1d8 slashing + 13 necrotic + 1d6 frost + 1d8 thunder + 2d8 force + 5 bludgeoning + 1d4 lightning + 12d6(!) poison + 2d6 psychic + 2d8 radiant + 1d6 fire + 1d6 acid + 1d6 piercing
Average damage: 18d6 (63) + 6d8 (27) + 1d4 (2.5) + 13 + 5 = 110.5
Total expenditure: 4 spell slots (2 × Paladin, 1 × Warlock, 1 × Ranger), 1 Bardic Inspiration, 1 vial of poison
Again, I take no credit of my own for discovering this, though I did take the time to look over the pieces individually and verify that everything meshes together...
...which means I probably got something wrong somewhere, and I'm sure someone will not hesitate to point it out.