reformat of spells.cpp