"BARMAN, GIVE SANDWICH TO ME" doesn't work for several reasons
Opened this issue · 1 comments
BARMAN-F
has this piece of code:
(<AND <VERB? GIVE>
<PRSO? ,ME>
<PRSI? ,SANDWICH ,BEER ,PEANUTS>>
<PERFORM ,V?BUY ,PRSI>
<RTRUE>)
This doesn't work, for a couple of reasons.
For one thing, WINNER
is still the barman so the action is redirected as "BARMAN, BUY ...".
For another, this is how the GIVE
action is defined:
<SYNTAX HAND OBJECT (MANY HELD HAVE) TO OBJECT (FIND ACTORBIT) (ON-GROUND)
= V-GIVE PRE-GIVE>
<SYNONYM HAND GIVE SELL DONATE OFFER>
So to get the barman to give to the sandwich, you have to type "BARMAN, GIVE ME TO SANDWICH".
But even if you fix that, it still doesn't work because apparently the parser decides that the bartender isn't holding the sandwich so he can't give it to you. Specifically, I think it's ITAKE-CHECK
. There are already other special cases there so maybe add one for the barman and his wares?
In addition, in this game the alternative form "GIVE SANDWICH TO ME" (SGIVE
) isn't handled by a pre-action like in some other games. Instead, it gets redirected as a GIVE
action if everything else fails. Since the barman's default action handles everything that isn't explicitly mentioned, it probably never gets that far. So maybe just intercept SGIVE
and return false?
Though if the parser is causing part of the problem, it's odd that similar code in NUTRIMAT-F
seems to be working fine...?
(<OR <AND <VERB? SGIVE>
<PRSO? ,ME>>
<AND <VERB? GIVE>
<PRSI? ,ME>>>
<SETG WINNER ,PROTAGONIST>
<PERFORM ,V?ASK-FOR ,NUTRIMAT ,PRSI>
<SETG WINNER ,NUTRIMAT>
<RTRUE>)
Or is that action handled elsewhere, and I just assumed that this was the code handling it?