A battery pull will work in most circumstances to get you back into clockwork... but, again, I say that with a heavy emphasis on "MOST" circumstances... lol it all depends on what exactly you were messing around with.
It may be best here to do some preventative research rather than focus on the "what-if's"
While its always great to know the what-if's, its generally always better to know the "how-not-to's"
For example:
-obviously, never flash a ROM that isn't meant for you phone
-when you do flash a ROM, don't use an alpha or beta of that ROM unless you know how to work out bugs and get your phone back to a functional state via every possible means.
-when you flash a ROM, make sure you always wipe cache and data first (some will say it isn't necessary, but if you want to be on the safe side....), and mount system and data before flashing (they will read "unmount" when they are mounted)
-don't ever set your overclock (or underclock for that matter, if you do either) on boot unless you KNOW it will work.
-and probably the best advice I can give you, make sure your battery is fully charged before doing any type of flashing.
Sent from my DROID2 using DroidForums