The bug is more serious then i thought. I did a number of tests and my code checks out ok.
It seems to be a problem with Astar Pathfinder which i'm using thats ignoring cell costs on occasions.
Heres an example.
<img src="https://dl.dropboxusercontent.com/u/159885981/AWtest3/awtest3Bug2.png" border="0" />
The path above is correct. The tank unit has a cost of 100 for moving over woods and mountains. It only has a cost on 1 for moving over grass and hills. There for it has picked the quickest route available.
<img src="https://dl.dropboxusercontent.com/u/159885981/AWtest3/awtest3Bug1.png" border="0" />
Yet the square below has generated a false path. I checked the cost of squares from aStar pathfinding expressions so i know they are indeed a cost of 100, yet for some reason it has chosen a route with a total cost of 104.
I'm afraid with this bug i might not be able to continue.