Inform - Resources - Examples

Back to List

Inventory
Complete

Backward
Forward

Plain
Coloured
Gaudy

This code
in plain text

Browsing Advent.inf

5. The little bird in its natural habitat (lines 593-707)

0593  Room    In_Bird_Chamber "Orange River Chamber"
0594    with  name 'orange' 'river' 'chamber',
0595          description
0596              "You are in a splendid chamber thirty feet high.
0597               The walls are frozen rivers of orange stone.
0598               An awkward canyon and a good passage exit from east and west sides of the chamber.",
0599          e_to In_Awkward_Sloping_E_W_Canyon,
0600          w_to At_Top_Of_Small_Pit,
0601    has   nodwarf;
0602   
0603  Object  -> little_bird "little bird"
0604    with  name 'cheerful' 'mournful' 'little' 'bird',
0605          initial "A cheerful little bird is sitting here singing.",
0606          before [;
0607            Examine:
0608              if (self in wicker_cage)
0609                  "The little bird looks unhappy in the cage.";
0610              "The cheerful little bird is sitting here singing.";
0611            Insert:
0612              if (second == wicker_cage)
0613                  <<Catch self>>;
0614              else
0615                  "Don't put the poor bird in ", (the) second, "!";
0616            Drop, Remove:
0617              if (self in wicker_cage) {
0618                  print "(The bird is released from the cage.)^^";
0619                  <<Release self>>;
0620              }
0621            Take, Catch:
0622              if (self in wicker_cage)
0623                  "You already have the little bird.
0624                   If you take it out of the cage it will likely fly away from you.";
0625              if (wicker_cage notin player)
0626                  "You can catch the bird, but you cannot carry it.";
0627              if (black_rod in player)
0628                  "The bird was unafraid when you entered,
0629                   but as you approach it becomes disturbed and you cannot catch it.";
0630              move self to wicker_cage;
0631              give wicker_cage ~open;
0632              "You catch the bird in the wicker cage.";
0633            Release:
0634              if (self notin wicker_cage)
0635                  "The bird is not caged now.";
0636              give wicker_cage open;
0637              move self to location;
0638              if (Snake in location) {
0639                  remove Snake;
0640                  "The little bird attacks the green snake,
0641                   and in an astounding flurry drives the snake away.";
0642              }
0643              if (Dragon in location) {
0644                  remove self;
0645                  "The little bird attacks the green dragon,
0646                   and in an astounding flurry gets burnt to a cinder.
0647                   The ashes blow away.";
0648              }
0649              "The little bird flies free.";
0650          ],
0651          life [;
0652            Give:
0653              "It's not hungry. (It's merely pinin' for the fjords).
0654               Besides, I suspect it would prefer bird seed.";
0655            Order, Ask, Answer:
0656              "Cheep! Chirp!";
0657            Attack:
0658              if (self in wicker_cage)
0659                  "Oh, leave the poor unhappy bird alone.";
0660              remove self;
0661              "The little bird is now dead. Its body disappears.";
0662          ],
0663    has   animate;
0664   
0665  ! ------------------------------------------------------------------------------
0666   
0667  Room    At_Top_Of_Small_Pit "At Top of Small Pit"
0668    with  name 'top' 'of' 'small' 'pit',
0669          description
0670              "At your feet is a small pit breathing traces of white mist.
0671               A west passage ends here except for a small crack leading on.
0672               ^^
0673               Rough stone steps lead down the pit.",
0674          e_to In_Bird_Chamber,
0675          w_to "The crack is far too small for you to follow.",
0676          d_to [;
0677              if (large_gold_nugget in player) {
0678                  deadflag = 1;
0679                  "You are at the bottom of the pit with a broken neck.";
0680              }
0681              return In_Hall_Of_Mists;
0682          ],
0683          before [;
0684            Enter:
0685              if (noun == PitCrack)
0686                  "The crack is far too small for you to follow.";
0687          ],
0688    has   nodwarf;
0689   
0690  Scenic  -> "small pit"
0691    with  name 'pit' 'small',
0692          description "The pit is breathing traces of white mist.";
0693   
0694  Scenic  -> PitCrack "crack"
0695    with  name 'crack' 'small',
0696          description "The crack is very small -- far too small for you to follow.";
0697   
0698  Scenic  "mist"
0699    with  name 'mist' 'vapor' 'wisps' 'white',
0700          description
0701              "Mist is a white vapor, usually water, seen from time to time in caverns.
0702               It can be found anywhere but is frequently a sign of a deep pit leading down to water.",
0703          found_in
0704              At_Top_Of_Small_Pit In_Hall_Of_Mists On_East_Bank_Of_Fissure
0705              At_Window_On_Pit_1 At_West_End_Of_Hall_Of_Mists In_Misty_Cavern
0706              In_Mirror_Canyon At_Reservoir At_Window_On_Pit_2 On_Sw_Side_Of_Chasm;
0707   


Last updated 23 June 2004. This site is no longer supported; information may be out of date.
Maintained as a historical archive by the Interactive Fiction Technology Foundation. Copyright 1993-2018 IFTF, CC-BY-SA unless otherwise noted.
This page was originally managed by Graham Nelson (graham@gnelson.demon.co.uk) assisted by C Knight.