write more battle code