fixed AI attack bug