About 2.5M paths will be checked and the best one chosen (there can ofc be better ones). If none is found it will also check every possible permutation until the first hit (again, there _could_ be better ones -> More HP left) or it can also be unsolveable with low HP pool.
Checking/Calculation will be done client-side on your CPU, the browser may freeze for a few seconds.