Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Object lookup doesn't work for certain phrasings of item #102

Open
copperwater opened this issue Feb 26, 2023 · 2 comments
Open

Object lookup doesn't work for certain phrasings of item #102

copperwater opened this issue Feb 26, 2023 · 2 comments
Labels
bug help wanted Pull requests to implement this fix or feature are welcome!

Comments

@copperwater
Copy link
Owner

Object lookup works fine for "X of Y" phrasings like "wand of death" or "ring of slow digestion". But it does not work for "Y X" phrasings like "death wand" and "slow digestion ring"; these just get whatever encyclopedia entry happens to match.

@copperwater copperwater added bug help wanted Pull requests to implement this fix or feature are welcome! labels Feb 26, 2023
@zindorsky
Copy link

I think this existing code actually does this: https://github.com/copperwater/xNetHack/blob/master/src/objnam.c#L4477
At least, wishing for "death wand", "slow digestion ring", "esp amulet" etc all seem to work.

@copperwater
Copy link
Owner Author

This is regarding object lookup, not wishing. Object lookup uses a different parser.

To reproduce, type /ndeath wand - the intended behavior is you see

Object lookup for "death wand": 
Ray wand. 
Base cost 500, weighs 7 aum.
Is inherently magical.
                                 
Encyclopedia entry for "death wand" (matched to "wand *"):
[...]

But what you actually get when you try this is just the encyclopedia entry. (Whereas entering /nwand of death does produce the object lookup information.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug help wanted Pull requests to implement this fix or feature are welcome!
Projects
None yet
Development

No branches or pull requests

2 participants