He finally figured it out. It's no coincidence that there's an oasis nearby.
After that, I dealt with the pink castle and am now stuck in a situation where either my strongest hero ends up on the Grail's cross, or I just wait for the orange castle to arrive =(
Added after 37 minutes
Near the oasis, there are prophecy maps and a lucky dove. With a cheat for infinite turns, you can reach these points. But I don't know how to accumulate that many turns.