Inform - Resources - Examples

Back to List

Inventory
Complete

Backward
Forward

Plain
Coloured
Gaudy

This code
in plain text

Browsing Balances.inf

17. Inside the Temple (lines 1697-1811)

1697  Place Balance_Room "Balance Room"
1698    with description
1699             "This seems to be the inside of a featureless white cube, forty
1700              feet on a side.  The air is stale and there is no exit.";
1701   
1702  Object -> balance_meter "image of the scales"
1703    with name "image" "scales" "of" "pair", article "the",
1704         initial "The image of a pair of scales hangs high in the air.  One
1705                  pan is much lower than the other.",
1706         before
1707         [; "It's only an image.";
1708         ],
1709    has  static;
1710   
1711  Object -> dusty_podium "dusty podium"
1712    with name "podium" "dusty" "cobwebs" "cobwebbed",
1713         initial "Far below the scales, in the centre of the ~floor~, is a
1714                  predictably-shaped podium, but it is so dusty and
1715                  cobwebbed that you can't see what it once was.",
1716         before
1717         [;  Cast: if (the_spell_was == caskly_spell)
1718                      "Nice try, but it is protected from enchantment.";
1719                  "However dusty it is, the podium is still protected from
1720                   casual enchantment.";
1721             Rub:  remove self; move balance_key to Balance_Room;
1722                   itobj = balance_key;
1723                  "No substitute for old-fashioned hard work, sometimes,
1724                   and after much patient (sneezy) scrubbing, the podium
1725                   appears in its true white glory.  Set into it are four
1726                   sockets, arranged in a two by two square.";
1727         ],
1728    has  static;
1729   
1730  Object balance_key "podium"
1731    with name "podium" "pedestal" "platform" "cubical",
1732         description "As predicted, it is cubical.",
1733         initial "Far below the scales, in the centre of the ~floor~, is a
1734                  predictably-shaped podium.  Set into it are four sockets,
1735                  arranged in a two by two square.",
1736    has  static supporter;
1737   
1738  Object -> sockets "two by two square"
1739    with name "square" "two" "by" "two",
1740         before
1741         [ i;  if (action~=##Examine || number_filled==0)
1742                "You'll have to say which socket you mean. 
1743                 (Let's call them ~top left~, ~bottom right~ and so on.)";
1744             objectloop (i in self)
1745             {   print (The) i;
1746                 if (child(i)==0) print " is empty.^";
1747                 else { print " contains ", (a) child(i), ".^"; }
1748             }
1749             rtrue;
1750         ],
1751    has  static;
1752   
1753  Class Socket
1754    with name "socket", article "the",
1755         before
1756         [;  Cast:  "The sockets are proof against magic.";
1757             Examine: print (The) self, ", cubical and slightly more
1758                      than four inches on a side, is decorated with ",
1759                      (string) self.description;
1760                      if (child(self) == nothing) ".";
1761                      print_ret ", and contains ", (a) child(self), ".";
1762             Receive: if (~~(noun ofclass FeaturelessCube))
1763                         "The socket rejects that.";
1764                      if (child(self) ~= nothing)
1765                         "There is already a cube in that socket.";
1766         ],
1767         after
1768         [;  LetGo:  number_filled--;
1769                     "With much struggle, you manage to pull the cube away.";
1770             Receive: number_filled++;
1771             if (number_filled==4)
1772             {   if (snakes_cube in bl_socket
1773                     && barker_cube in ul_socket
1774                     && cave_cube in br_socket
1775                     && eye_cube in ur_socket)
1776                 {   deadflag=2; score=score+5;
1777                    "As you place the final cube into the sockets, you feel
1778                     imbued with celestial wisdom (more so than usually). 
1779                     You find yourself growing to the height of the cube, so
1780                     that you pull the balances back level by hand, and then
1781                     you grow still further, out of the temple until it is but
1782                     a cube in your hand, and you are a giant towering over
1783                     the land.
1784                   ^^Then, of course, you wake up, glumly realising it's time
1785                     to go to your job at the new Borphee Laboratories and
1786                     all those Wheatstone bridge experiments.  But at least
1787                     you can dream about the old days.";
1788                 }
1789                "The sockets are all full now, but that doesn't mean
1790                 anything's happened.";
1791             }
1792            "The cube is a predictably perfect fit in the socket.";
1793         ],
1794    has  static container open;
1795   
1796  Socket -> bl_socket "bottom left socket"
1797    with name "bottom" "left" "serpent",
1798         description "a serpent";
1799   
1800  Socket -> ul_socket "top left socket"
1801    with name "top" "left" "bazaar",
1802         description "a scene in a bazaar";
1803   
1804  Socket -> br_socket "bottom right socket"
1805    with name "bottom" "right" "cave",
1806         description "an engraving of a rocky cave";
1807   
1808  Socket -> ur_socket "top right socket"
1809    with name "top" "right" "eye",
1810         description "an eye";
1811   


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.