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

exam 1. broken if there is a container on the ground #1

Open
prophnoran opened this issue Nov 18, 2019 · 3 comments
Open

exam 1. broken if there is a container on the ground #1

prophnoran opened this issue Nov 18, 2019 · 3 comments

Comments

@prophnoran
Copy link

#!prompt [3561/3441H] [2076/2021M] [327/656V] NESWU>

drop remains

You drop the bloodied remains of Moriar.

#!prompt [3561/3441H] [2076/2021M] [327/656V] NESWU>
exam 1.

[most of my desc omitted for brevity]

[Floating] Peldane Artifact

The bloodied remains of Moriar contains:
( 7) a shot of absinthe

#!prompt [3561/3441H] [2076/2021M] [327/656V] NESWU>

It appears that '1.' is referring both to me, and also the first container in the room.

@prophnoran
Copy link
Author

prophnoran commented Nov 18, 2019

nb this is not a porting bug -- the wrong behavior also exists in cproph

@prophnoran
Copy link
Author

and moreover the object doesn't even have to be on the ground; it will also do this if it is the 1st item in your inventory.

a clue in the helpfile: Examine: is short for 'LOOK container' followed by 'LOOK IN container'.

I suspect that 'look in' and 'look' have different semantics for resolving '1.', '2.' -- and that exam is just rote calling out to the 'look' code, twice. I think the correct behavior is for 'exam' to resolve 1., 2., according to some logic (probably the same as LOOK IN) and then call out to the look code per object, instead of passing along a string rep. of the command.

@anhegofcherek anhegofcherek transferred this issue from prophecymud/go-prophecy-issues Nov 22, 2019
@anhegofcherek
Copy link
Contributor

Your theory is indeed correct and I agree with your suggestion, thanks

The slight complication is that examine is tied up with a half-implemented lore skill which part of me likes - though it's a little obsolete now I've given everyone identify...

$ examine demonskin
A pair of scaley green sleeves are here, burning the ground they lay upon.

You integrate your Lore capability into your examination and uncover
the following information:
        This is a piece of armor worth 2500 silver.
        It affects pierce ac by 20
        It affects bash ac by 20
        It affects slash ac by 20
        It affects magic ac by 20
        It weighs in at 0 pounds.
        It affects damage roll positively.
        It affects hit roll positively.
        It affects hp positively.
        It affects strength positively.
        It affects saves negatively.

$ examine club
A massive club catches your eye, now thats a club.

You integrate your Lore capability into your examination and uncover
the following information:
        This weapon is a mace/club worth 20000 silver.
        It looks like it might average around 40 damage a hit.
        It sizzles with energy from an unreleased power.
        It weighs in at 2 pounds.
        It affects saves negatively.
        It affects constitution positively.
        It affects strength positively.
        It affects damage roll positively.
        It affects hit roll positively.

$ examine bag
A bag of fine green scales is foolishly left here.

You integrate your Lore capability into your examination and uncover
the following information:
        This is a storage container worth 50000 silver.
        It can hold around 500 pounds.
        You can fit up to 50 pound objects within it.
        It reduces the weight of an object by 15 percent.
        It weighs in at 5 pounds.

$ examine pie
A big pot pie has been left here.

You integrate your Lore capability into your examination and uncover
the following information:
        This is some food worth 22 silver.
        It'll keep you from hunger for 20 hours.
        It weighs in at 2 pounds.

I'm loath to rip it out (though not sure about its value) - I guess for now I could pull it into a lore command and then examine is just as the helpfile states, and I can fix it properly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants