Shitty bug solved.

Terrain’s type wasn’t taken into account because of a dumb mistake.