My RC file has a lua macro that automatically selects and casts an appropriate direct damage spell.
It is currently capable of choosing between starburst, foxfire, stone arrow, bombard, scorch, airstrike, shock, flame wave, irradiate, fireball, ignition, firestorm, IOOD, LCS, and LRD.
It is designed to select the spell and the targeting point to deal maximum damage to the enemies that deserve it most - those that are high threat or low on health are priority targeted.
There are three ways to invoke it. There is the “cast” function, and the “cast_efficient” function. The difference is that “cast_efficient” takes into account the MP cost of the spell, unless threatening enemies are nearby. “cast” just deals the most damage possible (roughly speaking) without regard for MP. There is also the “cast_quiet” function that is like “cast_efficient” but avoids the loudest spells (LRD, fireball, ignition, firestorm) which you might want in certain situations, e.g. you’ve been shafted. I have bound “cast” and “cast_efficient” to keys 3 and 4, as follows:
macros += M 4 ===cast
macros += M 3 ===cast_efficient
So that, in combat, I mostly just press 3 repeatedly to cast various spells until things die. If I feel that cast_efficient isn’t getting the job done, I press 4 instead. If the situation is getting too dangerous (or I want to use a spell that “cast” doesn’t handle) then I will switch to manually selecting spells.
Feel free to give it a try. The rcfile can be found here: https://cbro.berotato.org/rcfiles/crawl-git/Berder.rc