I am trying to implement a path-finding algorithm, but I think I'm having problems with the terminology, because I'm not quite sure how to explain what I need to execute the algorithm.
I have a regular grid of nodes, and I'm trying to find all nodes within a specific "Manhattan distance."

Finding nodes inside, say, 5, is quite simple.

But I'm interested in "Weighted Manhattan Distance", where certain squares "stand" twice as much (or more) to enter. For example, if orange squares cost 2 to enter, and purple squares cost 10, the graph that interests me is as follows:

First, is there a term for this? It is difficult to find information about things when you are not quite sure what they are called in the first place.
Secondly, how can I calculate which nodes fall into my parameters? I am not looking for a complete solution, certainly, only some hints to get started; when I realized that my implementation would require three Dictionary s, I began to think that there might be an easier way to handle things.
source share