So as a general rule, one may not copyright game mechanics, so you are covered in that regard as making an inititive tracker, a dice roller, and even a sheet that will roll the dice and apply preset modifiers and list which ones are available.
Where you would be infringing is in DND specific lore, images, and terms (Some but not all DND spells are named in a way that is a copyrighted term, "Bigby's Hand" being one such example, as "Bigby" is a lore specific character who made the spell.
Due to the OGL controversy earlier this year, expect more names like this to be given to spells).
Where you can avoid this is by allowing players to edit in their own spells and dice modifiers, and preset rolls (If you've ever used roll20, you can put in your various attacks and features into a character sheet, and then it's a simple button click to roll the various attacks.).
This would likely also help you with marketing to homebrew, which cannot be anticipated.
There are plenty of these applications out there already (Virtual Table Tops OR VTTs) of various sophistications and are often capable of playing different systems that have no compatibility with each other. Do keep in mind that WotC may try to send cease and desist anyway, as they want to move into the VTT market. It may also factor into what your intentions with the app are (if you're just making it for your buds or a school project and don't plan to monetize it, that will be something the courts would find more forgiving in your case.).