Compiles on OSX, but segfaults before battle ends.