Inform - Resources - Examples

Back to List

Inventory
Complete

Backward
Forward

Plain
Coloured
Gaudy

This code
in plain text

Browsing Toyshop.inf

Toothed Bag (lines 739-762)

739  ! >TB  A somewhat acquisitive container... but it can be taught to behave.
740  ! ----------------------------------------------------------------------------
741   
742  Object -> "toothed bag"
743    with name "toothed" "bag",
744         initial "In one corner is a curious, toothed bag.",
745         description "A capacious bag with a toothed mouth.",
746         before
747         [; LetGo: "The bag defiantly bites itself 
748                    shut on your hand until you desist.";
749         ],
750         after
751         [; Receive:
752                if (noun==cone)
753                {   self.before=0; self.after=0;
754                    "The bag wriggles interminably as it tries 
755                     to eat the enormous mass of marzipan. That'll 
756                     teach it.";
757                }
758                "The bag wriggles hideously as it swallows ", (the) noun, ".";
759         ],
760    has  container open;
761   
762  ! ----------------------------------------------------------------------------


Last updated 23 June 2004. This web site has not been fully supported since April 2008. Information may be out of date. This page was originally managed by Graham Nelson (graham@gnelson.demon.co.uk) assisted by C Knight.