This one took me a while because I was a little off on my first answers. I forgot to remove the first empty lines of the clay map, so I was 9 water tiles over the correct answer.

Apart from that, the first part of the problem took me a while to come up with a decent solution. I ended up creating a small algorithm to calculate flows which fills a reservoir and reinserts new flows into a queue for the main algorithm to go through.

The second part of the problem was probably one of the easiest modifications I had to do to get the answer. I counted only 1 type of tile instead of 2.