Ranged minions has trouble to take their distance when attacking secret doors just in a corner
i noticed when a ranged creature attacks a secret door they start to 'dance' sort of speak. I did made a screen video because it is hard to explain.
I do believe it has something to do with the secret door that is thicker than standard doors, but those minions wants to take the same distance that they normaly. The extra thickness force them to step on the slab 1 further off but because there is a wall behind them and they try to sort it out.
In the video there is also a warlock attacking a secret door in straight tunnel and to me it seems that he does stand on the next slab.
Thanks for all the hard work already done btw! greetings by Crokydriver, the newbie ;-) https://github.com/user-attachments/assets/a6eddd12-69b0-4705-bb8b-ae53e7c4c136
Ranged units want to be at least 3 subtiles away in combat. In your video (a thick door right around a corner) cannot be shot from straight on since that is less than 3 subtiles away. However, the problem is when they stand in a new position to the side, that they do not see the center of the door which they would try to shoot.
Them not seeing it from afar, and being too close to comfortably stand when they do see it, will cause the dance.
While an extra condition could be made to stand closer in combat in front of thick doors, the optimal solution would be to recognize they can see the door from where they stand and then shoot correctly.
Currently jonty_creature_can_see_thing_including_lava_check inside creature_can_see_combat_path from ranged_combat_move will return 'false' at the position. Forcing it to be true would cause them to shoot and hit the corner of the wall next to the door.
Ran into a similar issue that may be related. No issues if they're lvl 9 as you can see - only lvl 10:
https://github.com/user-attachments/assets/9a94fc60-4d9d-4a61-aa29-88a369c56096