0.1.17 crash in battle

Sorry for the crash! Working on a fix now that should be ready in about an hour.