Custom pathing calculation involving multiple accumulated limiting factors

Sorry if there was a duplicated question already exist. I did take 2 days to find similar topics with no avail.

In my project, I use multiple influence maps to provide tactical information for the ai agents. And it all goes pretty well, if I only use these values to help find new destinations. However now I need a rather peculiar pathing behaviour - the agent would need to find a path, with a budget on the max distance it can travel (which i could provide a ballpark value by doing a normal abpath ignoring all the risks then multiply with a set value) and a limitation on one or more kinds of accumulated risk it can take, the risk values can be read from the influence maps.

for example: there is poisonous gas (with various values) in some of of the tiles, a unit must travel through the gas filled general area. It has a set traverse budget, and a limited air budget. So ideally the agent should take the shorter path with in the traverse budget as within the air budget (the accumulated risk is below a certain value).

It seems I would have to override the CalculateStep function, the PathHandler and a new much more complex PathNode. But I hate to do more work than less. If anyone knows another less painful way around, please help me out.