[I7] A More Subtle Parser Problem

Having abandoned my poor hamster, I’m now delving deeper into the realm of pounding nails into a board. My code will drive the nails and make them parts of the board, no problem. But here’s what happens next:

>x board
A sturdy two-by-twelve. It appears three nails have been driven into the board.

>take nails
What do you want to take those things from?

>take nails from board
You can't see any such thing.

>take nails
What do you want to take those things from?

>board
You can't see any such thing.

I’m fine with not being able to take the nails once they’ve been pounded into the board. And I’ve written the code in such a way that I can drive in all three nails with one command. The problem is, if I try to take all three nails with one command, the parser gets very confused.

According to the index, the Take action has the grammar “take/carry/hold [things]”, so it should allow plurals. And the third check line is the can’t take component parts rule, which would certainly apply in my game. So why is this check rule not being used?

Is there a way to fix this?

I think the core problem there is that all of these resolve to the remove multiinside from noun grammar rule. And your board is not a container and the nails are not contained within it. (By default, no player actions can ever cause something to cease being a part, although rules can explicitly do so in reaction to an action.) So “you can’t see” any nails inside the board – which is correct but unhelpful.

take nail does produce a reasonable response.

take nails appears to be rejected by the exclude indirect possessions from take all rule which essentially states that a take all or other multi-object action can’t refer to things only indirectly held – i.e. those that are inside or part of something actually held. Oddly I tried a few variations on the usual method to override this rule and allow it, but it didn’t work.

But indeed, if you drop the board first then that rule no longer applies and take nails will produce the same response as take nail.

1 Like

Aha!

The exclude indirect possessions from take all rule does nothing
	when the item described is part of something.

This works. (My previous attempts were trying to check the noun, which it appears isn’t set yet.)

1 Like