battle prototype code