How to set higher priority for routes with certain tags

I am currently using graphhopper to build a navigation system for a park. Within the park, there are two types of routes and when the weather is bad, one type of route should be set with higher priority during navigation. How could I approach to solve this problem. I realised there is something called priority in the foot flag encoder but I have no idea how to make use of it.

This should be solved with the question here? How to understand the function handlePriority in the FootFlagEncoder