This instance will be upgraded to Heptapod 0.25.0 (final) on 2021-09-22 at 15:00 UTC+2 (a few minutes of down time)

Commit d2d6af62 authored by Jesse McGrew's avatar Jesse McGrew
Browse files

advent.zil: Changed FEED to be a new action that redirects to GIVE, so FEED ME X

can be handled differently from GIVE ME X.
Also made it do implicit taking, like EAT.
parent feeba9a012e6
......@@ -4314,8 +4314,8 @@ appears out of nowhere!" CR>)>)>)
;----------------------------------------------------------------------
<SYNTAX FEED OBJECT (HAVE HELD CARRIED) (FIND EDIBLEBIT) TO OBJECT (FIND PERSONBIT) = V-GIVE>
<SYNTAX FEED OBJECT (FIND PERSONBIT) OBJECT (HAVE HELD CARRIED) (FIND EDIBLEBIT) = V-SGIVE>
<SYNTAX FEED OBJECT (TAKE HAVE HELD CARRIED) (FIND EDIBLEBIT) TO OBJECT (FIND PERSONBIT) = V-FEED-TO>
<SYNTAX FEED OBJECT (FIND PERSONBIT) OBJECT (TAKE HAVE HELD CARRIED) (FIND EDIBLEBIT) = V-SFEED-TO>
;"When the player types an incomplete command like FEED BEAR, the parser has to infer
which syntax they meant to use (since there was no exact match). The two syntaxes for FEED
......@@ -4333,10 +4333,18 @@ appears out of nowhere!" CR>)>)>)
<COND (<NOT <FSET? ,PRSO ,PERSONBIT>>
<NOT-POSSIBLE "feed">)
(<SET O <GWIM ,EDIBLEBIT -1 <>>>
<COND (<=? ,PRSO ,WINNER> <PERFORM ,V?EAT .O>)
(ELSE <PERFORM ,V?GIVE .O ,PRSO>)>)
<PERFORM ,V?FEED-TO .O ,PRSO>)
(ELSE <BE-SPECIFIC>)>>
<ROUTINE V-FEED-TO ()
<COND (<NOT <FSET? ,PRSI ,PERSONBIT>>
<NOT-POSSIBLE "feed">)
(<PRSI? ,WINNER> <PERFORM ,V?EAT ,PRSO>)
(ELSE <PERFORM ,V?GIVE ,PRSO ,PRSI>)>>
<ROUTINE V-SFEED-TO ()
<PERFORM ,V?FEED-TO ,PRSI ,PRSO>>
;"TODO: Instead of <BE-SPECIFIC>, could we orphan and force the parser to use the
FEED OBJECT OBJECT syntax?"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment