Saibot393 / enhancedcombathud-pf2e

GNU General Public License v3.0
2 stars 3 forks source link

The distance is not counted correctly while moving diagonally #7

Open droideck opened 9 months ago

droideck commented 9 months ago

The distance counter (which shows squares on the right side of the portrait) counts the squares just 1 by 1. But in pf2e, the first square of diagonal movement you make in a turn counts as 5 feet, but the second counts as 10 feet, and your count thereafter alternates between the two.

Could you please check this when you have time? Otherwise, it's an awesome tool and a great pf2e implementation! Thank you so much for the work!

Saibot393 commented 9 months ago

I will look into it, should not be too hard to implement

droideck commented 9 months ago

Just a short update for v1.6.0. When I grab the token and move it diagonally three squares with one move, it's all good, and the distance is counted correctly.

But when I do move through the squares one by one - it doesn't work, and the UI doesn't remember that I already moved diagonally. Hence, it counts each square separately when moving one by one.

Saibot393 commented 9 months ago

Yeah, couting diagonall moves is a bit harder then initially thought. I am still looking at a good solution for it

droideck commented 9 months ago

Yeah, couting diagonall moves is a bit harder then initially thought. I am still looking at a good solution for it

I am not sure how helpful it will be, but you may check Drag Ruller's PF2e integration module for ideas (or even take it as a soft dependency): https://github.com/reyzor1991/pf2edragruler

Saibot393 commented 9 months ago

Good idea, i will see if there is any api i can use