added some attack table testcode
cleaned up char cerate function