Add the complete example files.
[ibg.git] / examples / HeidiPlus.inf
diff --git a/examples/HeidiPlus.inf b/examples/HeidiPlus.inf
new file mode 100644 (file)
index 0000000..58609ee
--- /dev/null
@@ -0,0 +1,102 @@
+!% -SD\r
+\r
+!===============================================================================\r
+Constant Story "Heidi";\r
+Constant Headline\r
+            "^A simple Inform example\r
+             ^by Roger Firth and Sonja Kesserich.^";\r
+Constant MAX_CARRIED 1;\r
+\r
+Include "Parser";\r
+Include "VerbLib";\r
+\r
+!===============================================================================\r
+! The game objects\r
+\r
+Object  before_cottage "In front of a cottage"\r
+  with  description\r
+            "You stand outside a cottage. The forest stretches east.",\r
+        e_to forest,\r
+        in_to "It's such a lovely day -- much too nice to go inside.",\r
+        cant_go "The only path lies to the east.",\r
+  has   light;\r
+\r
+Object  cottage "tiny cottage" before_cottage\r
+  with  description "It's small and simple, but you're very happy here.",\r
+        name 'tiny' 'cottage' 'home' 'house' 'hut' 'shed' 'hovel',\r
+        before [;\r
+          Enter:\r
+            print_ret "It's such a lovely day -- much too nice to go inside.";\r
+        ],\r
+  has   scenery;\r
+\r
+Object  forest "Deep in the forest"\r
+  with  description\r
+            "Through the dense foliage, you glimpse a building to the west.\r
+             A track heads to the northeast.",\r
+        w_to before_cottage,\r
+        ne_to clearing,\r
+  has   light;\r
+\r
+Object  bird "baby bird" forest\r
+  with  description "Too young to fly, the nestling tweets helplessly.",\r
+        name 'baby' 'bird' 'nestling',\r
+        before [;\r
+          Listen:\r
+            print "It sounds scared and in need of assistance.^";\r
+            return true;\r
+        ],\r
+  has   ;\r
+\r
+Object  clearing "A forest clearing"\r
+  with  description\r
+            "A tall sycamore stands in the middle of this clearing.\r
+             The path winds southwest through the trees.",\r
+        sw_to forest,\r
+        u_to top_of_tree,\r
+  has   light;\r
+\r
+Object  nest "bird's nest" clearing\r
+  with  description "The nest is carefully woven of twigs and moss.",\r
+        name 'bird^s' 'nest' 'twigs' 'moss',\r
+  has   container open;\r
+\r
+Object  tree "tall sycamore tree" clearing\r
+  with  description\r
+            "Standing proud in the middle of the clearing,\r
+             the stout tree looks easy to climb.",\r
+        name 'tall' 'sycamore' 'tree' 'stout' 'proud',\r
+        before [;\r
+          Climb:\r
+            PlayerTo(top_of_tree);\r
+            return true;\r
+        ],\r
+  has   scenery;\r
+\r
+Object  top_of_tree "At the top of the tree"\r
+  with  description "You cling precariously to the trunk.",\r
+        d_to clearing,\r
+        after [;\r
+          Drop:\r
+            move noun to clearing;\r
+            return false;\r
+        ],\r
+  has   light;\r
+\r
+Object  branch "wide firm bough" top_of_tree\r
+  with  description "It's flat enough to support a small object.",\r
+        name 'wide' 'firm' 'flat' 'bough' 'branch',\r
+        each_turn [; if (bird in nest && nest in branch) deadflag = 2; ],\r
+  has   static supporter;\r
+\r
+!===============================================================================\r
+! Entry point routines\r
+\r
+[ Initialise; location = before_cottage; ];\r
+\r
+!===============================================================================\r
+! Standard and extended grammar\r
+\r
+Include "Grammar";\r
+\r
+!===============================================================================\r