xNetHack icon indicating copy to clipboard operation
xNetHack copied to clipboard

Diamond shaped stores...

Open every-in-austin opened this issue 2 years ago • 3 comments

If a store is given one of the new diamond shapes and the entrance is at one of the points of the diamond, the shopkeeper will refuse to move out of your way to allow you to enter (or presumably exit). Apparently it would cause him to lose contact with the control square just inside the door...

every-in-austin avatar Sep 25 '22 21:09 every-in-austin

I consider this not a bug with themed rooms but a latent problem with vanilla that assumed shops would always be rectangles of minimum size 3x2. Basically, the algorithm for deciding whether a room is valid to place a shop in does not account for rooms having only 1 square inside the door, and I believe these should be considered invalid.

First, I need to reproduce this in vanilla with the "Circular, small" themed room, then I will work on a vanilla patch that fixes it, and will keep this issue open until the fix is merged into xNetHack.

copperwater avatar Sep 27 '22 15:09 copperwater

OK - this doesn't appear with the Circular small room as I predicted. Is it instead this room (unique to xNetHack)?

    ---    
    |.|    
   --.--   
  --...--  
---.....---
|.........|
---.....---
  --...--  
   --.--   
    |.|    
    ---    

In this room, a shopkeeper is indeed unable to move out of your way. But the underlying problem is the same - if vanilla decided to add this room they'd have the same problem. The adjustment to the algorithm is a little more complicated though.

Submitted the fix as https://github.com/NetHack/NetHack/pull/888.

copperwater avatar Oct 01 '22 15:10 copperwater

That's the shape I encountered. Quite frustrating given it was the only store in the game (other than Izzy's) after +20k moves and, of course, undiggable walls...

every-in-austin avatar Oct 01 '22 15:10 every-in-austin

Should be fixed as of the recent vanilla merge.

copperwater avatar May 16 '23 22:05 copperwater