if you want a quick look at some combat ideas~scripting formats (along with also checking out Pixie's Combat Library, Pertex' Combat Library, Chase's Wearables~Equipment Library, Sora's Stackable~Item Library, and etc):
(beware though: this is very old code, stupidly used abrevs, and has some errors~bugs and uber poor design, and I messed up on the elemental damage vs elemental resistance abrevs...)
viewtopic.php?f=10&t=3348&start=120#p22483 (HK's old basic combat code based upon Pertex' design~structure)
viewtopic.php?f=10&t=3348&start=120#p22486 (the post with the key~legend for all of my abrevs)
---------------------------
and here's this RPG aspects resource collection~consolidation, I started long ago and haven't touched it for a long time (at some point I'll add more to this ~ anyone is quite welcome to add to it as well, of course:
viewtopic.php?f=20&t=3876also, while this isn't the best design, maybe it can be of help to you, as you're doing a D&D~RPG, game, at the very least, it may give you some ideas:
viewtopic.php?f=18&t=4988 (I'll love to play your game, if-when I ever get the time, sighs. HK loves RPGs. I really liked Might and Magic: 4:Xeen, 5:Darkside, and ?6?Xeen+Darkside, as one of the few D&D-like games I've played. Also, you may want to check out: Shadowgate and Maniac Mansion, both for the NES, for some possible ideas from them)