#8. First off, some basics. The DMG sample 20th-level wizard has a base ranged attack bonus of +13 from BAB and 16 Dexterity. The base saving throw DC for his spells are 18 + spell level due to 26 Intelligence. A standard ancient white dragon is a Huge creature with 30 HD, AC 37, touch AC 8, SR of 24 and saves of Fort +23, Reflex +17 and Will +19.
The straightforward approach is for the wizard to take the feats Point Blank Shot, Weapon Focus (ranged spell), Ranged Spell Specialization*, Improved Critical (ranged spell), Sudden Empower*, Sudden Maximize*, and Still Spell. Throw a still, sudden empowered, sudden maximized orb of fire* (stilled to bump it to a 5th-level slot). If the white dragon is within 30 feet, this deals an expected [15 x 6 (maximized) + 0.5 x 15 x 3.5 (empowered) +2 for ranged spell specialization + 1 for Point Blank Shot] x 1.5 (for the white dragon's fire vulnerability) = 178.875 damage on a successful hit. Orb of fire requires a ranged touch attack, does not allow spell resistance and does not allow a saving throw, so the expected damage = 0.05 x 0 (the wizard rolls a natural 1) + 0.85 x 178.875 (normal successful attack) + 0.1 x 0.05 x 178.875 (unconfirmed threat) + 0.1 x 0.95 x 2 x 178.875 (confirmed critical) = 186.924375 damage.
The absolutely insane approach is for the wizard to take the feats Spell Focus (conjuration), Greater Spell Focus (conjuration), Sudden Empower*, Sudden Maximize*, Energy Substitution (fire)*, and any other metamagic feat. The wizard has another 135,000 gp worth of gear, which he uses to buy a helm of brilliance (125,000 gp) and a type VII necklace of fireballs (8,700 gp). The helm occupies the head slot, so the wizard cannot use his +6 headband of intellect. He compensates for this by casting fox's cunning, which lowers the save DC of his spells to 17 + spell level (19 + spell level for Conjuration spells). In addition, for this to work, the wizard must be Small (a halfling or a gnome) or have pre-cast reduce person on himself.
The Small wizard moves into the centre of the Huge dragon's space (he can do so because he is three sizes smaller than the dragon) and casts a fire energy substituted, sudden maximized, sudden empowered arc of lightning* (Reflex 24 half, no SR). This deals an expected [15 x 6 (maximized) + 0.5 x 15 x 3.5 (empowered)] x 1.5 (fire vulnerability) = 174.375 points of damage to the white dragon on a failed save. The dragon will fail 30% of the time (1 to 6 on d20), making the expected damage (0.3 + 0.7 x 0.5) x 174.375 = 113.34375 from the spell.
The wizard then voluntarily fails his saving throw against the arc of lightning, which means his necklace of fireballs must also save or detonate. Since its saving throw bonus is +7, it detonates 80% of the time (1 to 16 on d20), causing an additional 58d6 points of fire damage (caster level 10, Reflex 14 half). This will get through the dragon's spell resistance 35% of the time (14 to 20 on d20) and the dragon will fail the saving throw 5% of the time. The expected damage is thus (0.8 x 58 x 3.5 x 0.35) x (0.05 + 0.95 x 0.5) x 1.5 = 44.7615 points of damage.
In addition, even the initial damage from the arc of lightning will get through the fire resistance 30 granted by the helm of brilliance, and if the wizard voluntarily fails a DC 15 Will save, all the gems on the helm overload and detonate. There are 30 fire opals, each of which becomes a 10d6 fireball (caster level 13, Reflex 20 half) centered on the wizard. This will get through the dragon's spell resistance 50% of the time (11 to 20 on d20) and the dragon will fail the saving throw 10% of the time (1 or 2 on d20). The expected damage is thus (30 x 10 x 3.5 x 0.5) x (0.1 + 0.9 x 0.5) x 1.5 = 433.125 points of damage.
In addition, there are 20 rubies that become walls of fire extending in straight lines in random directions from the wizard. However, since the wizard is in the centre of the dragon's space, all of them hit the dragon. Each wall of fire deals 2d6+13 points of damage (caster level 13, no save). Again, this will get through the dragon's spell resistance 50% of the time, so the expected damage is 20 x (2 x 3.5 +13) x 0.5 x 1.5 = 300 points of damage.
Finally, there are 10 diamonds that become prismatic sprays that randomly target a creature within range (possibly the caster). prismatic spray is technically a cone, so any prismatic spray that targets the caster ought to target the dragon as well, since they share the same space. Nonetheless, I will go with the more generous interpretation of the item description and assume that the dragon only gets targeted by 5 prismatic sprays. On a failed save, and ignoring the green, blue, indigo and violet effects, a prismatic spray will do on average 1/7 x 20 x 1.5 + 1/7 x 40 + 1/7 x 80 + 1/7 x 2 x 1/7 x (20 x 1.5 + 40 + 80) = 27.551 points of damage to the dragon. Again, it has a 50% chance to get through the dragon's spell resistance, and the dragon has a 10% chance of failing its saving throw. The expected damage of the five prismatic sprays is thus 5 x 0.5 x (0.1 + 0.9 x 0.5) x 27.551 = 37.88 points of damage.
The total expected damage from the kamikaze wizard is thus 113.34375 (spell) + 44.7615 (necklace of fireballs) + 433.125 (helm of brilliance fire opals) + 300 (helm of brilliance rubies) + 37.88 (helm of brilliance diamonds) = 929.11025 points of damage.
EDIT: I just realized that if you sequence this properly, the wizard can also voluntarily fail his saving throws against the 30 fireballs created by the helm of brilliance fire opals. In that case, the chance that the necklace of fireballs will eventually fail a saving throw and detonate is close enough to 100% to be taken as such. Hence, the expected damage from the necklace of fireballs increases to 55.951875, and the total expected damage increases to 940.300625.
* Feat or spell from Complete Arcane.