Open SurFlurer opened 1 year ago
Ok now this is a weird one... I can confirm it happens in the provided save(thank you!) but I can't get it to happen in another test scenario:
When on guard he simply pauses. In both this test scenario and the provided save, debug mode reports the range as 2.
I think it may be because the target
is being cached and as long as the target is cached it's somehow skipping the option check? (Notice in my image target is none
) https://github.com/CleverRaven/Cataclysm-DDA/blob/a2f5875d92995cba39653f3c15a0b2d396258b37/src/npcmove.cpp#L872-L873
@RenechCDDA This line indicates that, for npcs, the distance to that monster is 2. https://github.com/CleverRaven/Cataclysm-DDA/blob/48ed876c6a1ae35d64951d99f672237580345f72/src/npcmove.cpp#L539 And this line uses a different method to calculate distance for character attacking. https://github.com/CleverRaven/Cataclysm-DDA/blob/48ed876c6a1ae35d64951d99f672237580345f72/src/character.cpp#L9547
However, I'm not sure what's happening in your test scenario. Maybe that's a different bug?
I discovered this inconsistency today, but what's weird is that while the cunning feral can attempt to make diagonal reach attacks, it seems like they can't hit the player. This character has minimal dodge, but was able to avoid many attacks in a row. I've added the save if anyone is curious.
2024-03-31-trimmed.tar.gz
Describe the bug
When "Circular distances" is turned on, NPC can use "reach attack" weapon ( like a steel spear ) to attack enemies standing 2 tiles away at 1,3,7,9 directions, but the player character cannot.
Attach save file
npcneed-trimmed.tar.gz
Steps to reproduce
Expected behavior
Consistency. I'd like to see NPC losing this ability, being the same as PC.
Screenshots
Versions and configuration
Additional context
No response