3 !============================================================================
\r
4 Constant Story "Captain Fate";
\r
6 "^A simple Inform example
\r
7 ^by Roger Firth and Sonja Kesserich.^";
\r
8 !Release 1; Serial "020428"; ! IBG first edition (public beta)
\r
9 !Release 2; Serial "020827"; ! IBG second edition
\r
10 Release 3; Serial "040804"; ! for keeping track of public releases
\r
12 Constant MANUAL_PRONOUNS;
\r
13 Constant MAX_SCORE 2;
\r
14 Constant OBJECT_SCORE 1;
\r
15 Constant ROOM_SCORE 1;
\r
17 Replace MakeMatch; ! required by pname.h
\r
20 Replace TryGivenObject;
\r
23 Include "pname"; ! pname.h is from the Archive
\r
25 Object LibraryMessages ! must be defined between Parser and VerbLib
\r
27 Buy: "Petty commerce interests you only on COUNTED occasions.";
\r
28 Dig: "Your keen senses detect NOTHING underground worth your
\r
29 immediate attention.";
\r
30 Pray: "You won't need to bother almighty DIVINITIES to save
\r
32 Sing: "Alas! That is not one of your many superpowers.";
\r
33 Sleep: "A hero is ALWAYS on the watch.";
\r
34 Sorry: "Captain FATE prefers ACTION over apologies.";
\r
35 Strong: "An unlikely vocabulary for a HERO like you.";
\r
36 Swim: "You quickly turn all your ATTENTION towards locating a
\r
37 suitable place to EXERCISE your superior strokes,
\r
38 but alas! you find none.";
\r
41 if (clothes has worn)
\r
42 "In your secret identity's outfit, you manage most
\r
43 efficaciously to look like a two-cent loser, a
\r
44 good-for-nothing wimp.";
\r
46 "Now that you are wearing your costume, you project
\r
47 the image of power UNBOUND, of ballooned,
\r
48 multicoloured MUSCLE, of DASHING yet MODEST chic.";
\r
50 "That's not a verb you need to SUCCESSFULLY save the day.";
\r
52 "That's not something you need to refer to in order to
\r
58 !============================================================================
\r
62 with description "UNDER CONSTRUCTION",
\r
67 Take,Pull,Push,PushDir:
\r
68 "Even though your SCULPTED adamantine muscles are up to the task,
\r
69 you don't favour property damage.";
\r
73 !============================================================================
\r
76 Room street "On the street"
\r
77 with name 'city' 'buildings' 'skyscrapers' 'shops' 'apartments' 'cars',
\r
79 if (player in booth)
\r
80 "From this VANTAGE point, you are rewarded with a broad view
\r
81 of the sidewalk and the entrance to Benny's cafe.";
\r
83 "On one side -- which your HEIGHTENED sense of direction
\r
84 indicates is NORTH -- there's an open cafe now serving
\r
85 lunch. To the south, you can see a phone booth.";
\r
89 if (player in booth && noun == n_obj) <<Exit booth>>;
\r
91 n_to [; <<Enter outside_of_cafe>>; ],
\r
92 s_to [; <<Enter booth>>; ],
\r
93 in_to "But which way?",
\r
95 "No time now for exploring! You'll move much faster in your
\r
96 Captain FATE costume.";
\r
98 Object "pedestrians" street
\r
99 with name 'passing' 'people' 'pedestrians',
\r
101 "They're just PEOPLE going about their daily HONEST business.",
\r
106 "The passing pedestrians are of NO concern to you.";
\r
108 has animate pluralname scenery;
\r
110 Appliance booth "phone booth" street
\r
111 with name 'old' 'red' 'picturesque' 'phone' 'booth' 'cabin'
\r
114 "It's one of the old picturesque models, a red cabin with room
\r
118 "The booth is already open.";
\r
120 "There's no way to close this booth.";
\r
124 "With implausible celerity, you dive inside the phone booth.";
\r
126 has enterable container open;
\r
128 Appliance "sidewalk" street
\r
129 with name 'sidewalk' 'pavement' 'street',
\r
132 "You make a quick surveillance of the sidewalk and discover much
\r
133 to your surprise that it looks JUST like any other sidewalk in
\r
136 Appliance outside_of_cafe "Benny's cafe" street
\r
137 with name 'benny^s' 'cafe' 'entrance',
\r
139 "The town's favourite for a quick snack, Benny's cafe has a 50's
\r
143 print "With an impressive mixture of hurry and nonchalance you
\r
144 step into the open cafe.^";
\r
148 has enterable proper;
\r
150 !----------------------------------------------------------------------------
\r
152 Room cafe "Inside Benny's cafe"
\r
154 "Benny's offers the FINEST selection of pastries and sandwiches.
\r
155 Customers clog the counter, where Benny himself manages to
\r
156 serve, cook and charge without missing a step. At the north side
\r
157 of the cafe you can see a red door connecting with the toilet.",
\r
159 Go: ! The player is about to depart. Is he making for the street?
\r
160 if (noun ~= s_obj) return false;
\r
161 if (benny.coffee_not_paid == true ||
\r
162 benny.key_not_returned == true) {
\r
163 print "Just as you are stepping into the street, the big hand
\r
164 of Benny falls on your shoulder.";
\r
165 if (benny.coffee_not_paid == true &&
\r
166 benny.key_not_returned == true)
\r
167 "^^~Hey! You've got my key and haven't paid for the
\r
168 coffee. Do I look like a chump?~ You apologise as only a
\r
169 HERO knows how to do and return inside.";
\r
170 if (benny.coffee_not_paid == true)
\r
171 "^^~Just waidda minute here, Mister,~ he says.
\r
172 ~Sneaking out without paying, are you?~ You quickly
\r
173 mumble an excuse and go back into the cafe. Benny
\r
174 returns to his chores with a mistrusting eye.";
\r
175 if (benny.key_not_returned == true)
\r
176 "^^~Just where you think you're going with the toilet
\r
177 key?~ he says. ~You a thief?~ As Benny forces you back
\r
178 into the cafe, you quickly assure him that it was only
\r
179 a STUPEFYING mistake.";
\r
181 if (costume has worn) {
\r
182 deadflag = 5; ! you win!
\r
183 "You step onto the sidewalk, where the passing pedestrians
\r
184 recognise the rainbow EXTRAVAGANZA of Captain FATE's costume
\r
185 and cry your name in awe as you JUMP with sensational
\r
186 momentum into the BLUE morning skies!";
\r
189 first_time_out false, ! Captain Fate's first appearance?
\r
191 Go: ! The player has just arrived. Did he come from the toilet?
\r
192 if (noun ~= s_obj) return false;
\r
193 if (costume has worn && self.first_time_out == false) {
\r
194 self.first_time_out = true;
\r
195 StartDaemon(customers);
\r
201 Appliance counter "counter" cafe
\r
202 with name 'counter' 'bar',
\r
205 "The counter is made of an astonishing ALLOY of metals,
\r
206 STAIN-PROOF, SPILL-RESISTANT and VERY EASY to clean. Customers
\r
207 enjoy their snacks with UTTER tranquillity, safe in the notion
\r
208 that the counter can take it all.",
\r
211 <<Give noun benny>>;
\r
215 Object food "Benny's snacks" cafe
\r
216 with name 'food' 'pastry' 'pastries' 'sandwich' 'sandwiches' 'snack'
\r
217 'snacks' 'doughnut',
\r
218 before [; "There is no time for FOOD right now."; ],
\r
219 has scenery proper;
\r
221 Object menu "menu" cafe
\r
222 with name 'informative' 'menu' 'board' 'picture' 'writing',
\r
224 "The menu board lists Benny's food and drinks, along with their
\r
225 prices. Too bad you've never learnt how to read, but luckily
\r
226 there is a picture of a big cup of coffee among the
\r
227 incomprehensible writing.",
\r
230 "The board is mounted on the wall behind Benny. Besides, it's
\r
235 Object customers "customers" cafe
\r
236 with name 'customers' 'people' 'customer' 'men' 'women',
\r
238 if (costume has worn)
\r
239 "Most seem to be concentrating on their food, but some do
\r
240 look at you quite blatantly. Must be the MIND-BEFUDDLING
\r
241 colours of your costume.";
\r
243 "A group of HELPLESS and UNSUSPECTING mortals, the kind
\r
244 Captain FATE swore to DEFEND the day his parents choked on a
\r
245 DEVIOUS slice of RASPBERRY PIE.";
\r
249 if (costume has worn)
\r
250 "People seem to MISTRUST the look of your FABULOUS costume.";
\r
252 "As John Covarth, you attract LESS interest than Benny's
\r
255 "There's no telling what sorts of MUTANT bacteria these
\r
256 STRANGERS may be carrying around.";
\r
258 "Mindless massacre of civilians is the qualification for
\r
259 VILLAINS. You are SUPPOSED to protect the likes of these
\r
263 "These people don't appear to be of the cooperative sort.";
\r
265 number_of_comments 0, ! for counting the customer comments
\r
267 if (location ~= cafe) return;
\r
268 if (self.number_of_comments == 0) {
\r
269 self.number_of_comments = 1;
\r
270 print "^Nearby customers glance at your costume with open
\r
273 if (random(2) == 1) { ! do this 50% of the time
\r
274 self.number_of_comments = self.number_of_comments + 1;
\r
275 switch (self.number_of_comments) {
\r
276 2: "^~Didn't know there was a circus in town,~ comments one
\r
277 customer to another. ~Seems like the clowns have the
\r
279 3: "^~These fashion designers don't know what to do to show
\r
280 off,~ snorts a fat gentleman, looking your way. Those
\r
281 within earshot try to conceal their smiles.";
\r
282 4: "^~Must be carnival again,~ says a man to his wife, who
\r
283 giggles, stealing a peek at you. ~Time sure flies.~";
\r
284 5: "^~Bad thing about big towns~, comments someone to his
\r
285 table companion, ~is you get the damnedest bugs coming
\r
286 out from toilets.~";
\r
287 6: "^~I sure WISH I could go to work in my pyjamas,~ says a
\r
288 girl in an office suit to some colleagues. ~It looks SO
\r
290 default: StopDaemon(self);
\r
294 has scenery animate pluralname;
\r
296 Object benny "Benny" cafe
\r
299 "A deceptively FAT man of uncanny agility, Benny entertains his
\r
300 customers crushing coconuts against his forehead when the mood
\r
302 coffee_asked_for false, ! has player asked for a coffee?
\r
303 coffee_not_paid false, ! is Benny waiting to be paid?
\r
304 key_not_returned false, ! is Benny waiting for the key?
\r
309 "You NEED your unpretentious John Covarth clothes.";
\r
311 "You NEED your stupendous ACID-PROTECTIVE suit.";
\r
313 self.key_not_returned = false;
\r
314 move toilet_key to benny;
\r
315 "Benny nods as you ADMIRABLY return his key.";
\r
318 self.coffee_not_paid = false;
\r
319 print "With marvellous ILLUSIONIST gestures, you produce the
\r
320 coin from the depths of your ";
\r
321 if (costume has worn) print "BULLET-PROOF costume";
\r
322 else print "ordinary street clothes";
\r
323 " as if it had dropped on the counter from Benny's ear!
\r
324 People around you clap politely. Benny takes the coin
\r
325 and gives it a SUSPICIOUS bite. ~Thank you, sir. Come
\r
326 back anytime,~ he says.";
\r
329 if (costume has worn) {
\r
331 print "Before the horror-stricken eyes of the surrounding
\r
332 people, you MAGNIFICENTLY jump OVER the counter and
\r
333 attack Benny with REMARKABLE, albeit NOT sufficient,
\r
334 speed. Benny receives you with a TREACHEROUS upper-cut
\r
335 that sends your GRANITE JAW flying through the cafe.^^
\r
336 ~These guys in pyjamas think they can bully innocent
\r
337 folk,~ snorts Benny, as the EERIE hands of DARKNESS
\r
338 engulf your vision and you lose consciousness.";
\r
341 "That would be an unlikely act for MEEK John Covarth.";
\r
343 "This is no time for MINDLESS infatuation.";
\r
345 "Benny is too busy for idle chit-chat.";
\r
347 orders [; ! handles ASK BENNY FOR X and BENNY, GIVE ME XXX
\r
349 if (second ~= player or nothing) "Benny looks at you strangely.";
\r
352 if (toilet_key in player) "But you DO have the key already.";
\r
353 if (self.coffee_asked_for == true)
\r
354 if (toilet_key in self) {
\r
355 move toilet_key to player;
\r
356 self.key_not_returned = true;
\r
357 "Benny tosses the key to the rest rooms on the
\r
358 counter, where you grab it with a dextrous and
\r
359 precise movement of your HYPER-AGILE hand.";
\r
362 "~Last place I saw that key, it was in YOUR
\r
363 possession,~ grumbles Benny. ~Be sure to return it
\r
364 before you leave.~";
\r
366 "~Toilet is only fer customers,~ he grumbles, looking
\r
367 pointedly at a menu board behind him.";
\r
369 if (self.coffee_asked_for == true)
\r
370 "One coffee should be enough.";
\r
371 move coffee to counter;
\r
372 self.coffee_asked_for = self.coffee_not_paid = true;
\r
373 "With two gracious steps, Benny places his world-famous
\r
374 Cappuccino in front of you.";
\r
376 "Food will take too much time, and you must change NOW.";
\r
378 "With only the smallest sigh, Benny nods towards the menu
\r
379 on the wall behind him.";
\r
381 "~I don't think that's on the menu, sir.~";
\r
384 has scenery animate male proper transparent;
\r
386 Object coffee "cup of coffee" benny
\r
387 with name 'cup' 'of' 'coffee' 'steaming' 'cappuccino'
\r
388 'cappucino' 'capuccino' 'capucino',
\r
391 "The picture on the menu board SURE looks good.";
\r
393 "It smells delicious.";
\r
397 if (self in benny) "You should ask Benny for one first.";
\r
399 move self to benny;
\r
400 print "You pick up the cup and swallow a mouthful. Benny's
\r
401 WORLDWIDE REPUTATION is well deserved. Just as you
\r
402 finish, Benny takes away the empty cup.";
\r
403 if (benny.coffee_not_paid == true)
\r
404 " ~That will be one quidbuck, sir.~";
\r
409 if (coin in player) <<Give coin benny>>;
\r
410 else "You have no money.";
\r
412 "If your HYPERACTIVE pituitary glands are to be trusted,
\r
416 Object outside_of_toilet "toilet" cafe
\r
417 with name 'toilet' 'bath' 'rest' 'room' 'bathroom' 'restroom',
\r
420 if (toilet_door has open) {
\r
425 "Your SUPERB deductive mind detects that the DOOR is
\r
428 if (toilet_door has open)
\r
429 "A brilliant thought flashes through your SUPERLATIVE
\r
430 brain: detailed examination of the toilet would be
\r
431 EXTREMELY facilitated if you entered it.";
\r
433 "With a TREMENDOUS effort of will, you summon your
\r
434 unfathomable ASTRAL VISION and project it FORWARD towards
\r
435 the closed door... until you remember that it's
\r
436 Dr Mystere who's the one with mystic powers.";
\r
438 <<Open toilet_door>>;
\r
440 <<Close toilet_door>>;
\r
442 "That would be PART of the building.";
\r
444 has scenery openable enterable;
\r
447 with pname '.x' 'red' '.x' 'toilet' 'door',
\r
449 if (location == cafe) print "door to the toilet";
\r
450 else print "door to the cafe";
\r
454 if (location == cafe)
\r
455 "A red door with the unequivocal black man-woman silhouettes
\r
456 marking the entrance to hygienic facilities. There is a
\r
457 scribbled note stuck on its surface.";
\r
459 "A red door with no OUTSTANDING features.";
\r
461 found_in cafe toilet,
\r
464 if (self hasnt locked || toilet_key notin player) return false;
\r
465 ks = keep_silent; keep_silent = true;
\r
466 <Unlock self toilet_key>; keep_silent = ks;
\r
469 if (self hasnt open) return false;
\r
470 print "(first closing ", (the) self, ")^";
\r
471 ks = keep_silent; keep_silent = true;
\r
472 <Close self>; keep_silent = ks;
\r
477 if (self has locked) return false;
\r
478 print "You unlock ", (the) self, " and open it.^";
\r
479 ks = keep_silent; keep_silent = true;
\r
480 <Open self>; keep_silent = ks;
\r
485 give toilet ~light;
\r
488 if (location == cafe) return n_to;
\r
492 if (location == cafe) return toilet;
\r
495 with_key toilet_key,
\r
496 has scenery door openable lockable locked;
\r
498 Object toilet_key "toilet key" benny
\r
499 with pname '.x' 'toilet' 'key',
\r
502 if (clothes has worn) print "the CRUCIAL key";
\r
503 else print "the used and IRRELEVANT key";
\r
507 "Your SUPRA PERCEPTIVE senses detect nothing of consequence
\r
508 about the toilet key.",
\r
511 "You SCAN your surroundings with ENHANCED AWARENESS,
\r
512 but fail to detect any key.";
\r
514 "Benny is trusting you to look after that key.";
\r
517 Object "scribbled note" cafe
\r
518 with name 'scribbled' 'note',
\r
520 if (self.read_once == false) {
\r
521 self.read_once = true;
\r
522 "You apply your ENHANCED ULTRAFREQUENCY vision to the note
\r
523 and squint in concentration, giving up only when you see the
\r
524 borders of the note begin to blacken under the incredible
\r
525 intensity of your burning stare. You reflect once more how
\r
526 helpful it would've been if you'd ever learnt to read.
\r
527 ^^A kind old lady passes by and explains:
\r
528 ~You have to ask Benny for the key, at the counter.~^^
\r
529 You turn quickly and begin, ~Oh, I KNOW that, but...~^^
\r
530 ~My pleasure, son,~ says the lady, as she exits the cafe.";
\r
533 "The scorched undecipherable note holds no SECRETS from
\r
536 read_once false, ! has the player read the note once?
\r
539 "No reason to start collecting UNDECIPHERABLE notes.";
\r
543 !----------------------------------------------------------------------------
\r
545 Room toilet "Unisex toilet"
\r
547 "A surprisingly CLEAN square room covered with glazed-ceramic
\r
548 tiles, featuring little more than a lavatory and a light switch.
\r
549 The only exit is south, through the door and into the cafe.",
\r
553 Appliance light_switch "light switch" toilet
\r
554 with name 'light' 'switch',
\r
556 "A notorious ACHIEVEMENT of technological SCIENCE, elegant yet
\r
560 if (self has on) <<SwitchOff self>>;
\r
561 else <<SwitchOn self>>;
\r
566 "You turn on the light in the toilet.";
\r
569 "You turn off the light in the toilet.";
\r
571 has switchable ~on;
\r
573 Appliance lavatory "lavatory" toilet
\r
574 with name 'lavatory' 'wc' 'toilet' 'loo' 'bowl' 'can' 'john' 'bog',
\r
576 Examine,Search,LookUnder:
\r
577 if (coin in self) {
\r
578 move coin to parent(self);
\r
579 "The latest user CIVILLY flushed it after use, but failed to
\r
580 pick up the VALUABLE coin that fell from his pants.";
\r
583 "While any other MORTALS might unwittingly throw just about
\r
584 ANYTHING into ", (the) self, ", you remember the WISE teachings
\r
585 of your mentor, Duke ELEGANT, about elderly plumbing and rising
\r
589 Object coin "valuable coin" lavatory
\r
590 with name 'valuable' 'coin' 'silver' 'quidbuck',
\r
591 description "It's a genuine SILVER QUIDBUCK.",
\r
594 if (self notin player) return false;
\r
595 "Such a valuable coin? Har, har! This must be a demonstration of
\r
596 your ULTRA-FLIPPANT jesting!";
\r
600 "You crouch into the SLEEPING DRAGON position and deftly, with
\r
601 PARAMOUNT STEALTH, you pocket the lost coin.";
\r
605 !============================================================================
\r
606 ! The player's possessions
\r
608 Object clothes "your clothes"
\r
609 with name 'ordinary' 'street' 'clothes' 'clothing',
\r
611 "Perfectly ORDINARY-LOOKING street clothes for a NOBODY like
\r
616 "You are already dressed as John Covarth.";
\r
618 "The town NEEDS the power of Captain FATE, not the anonymity
\r
621 if (self hasnt worn)
\r
622 "Your KEEN eye detects that you're no longer wearing them.";
\r
623 switch (location) {
\r
625 if (player in booth)
\r
626 "Lacking Superman's super-speed, you realise that it
\r
627 would be awkward to change in plain view of the passing
\r
630 "In the middle of the street? That would be a PUBLIC
\r
631 SCANDAL, to say nothing of revealing your secret
\r
634 "Benny allows no monkey business in his establishment.";
\r
636 if (toilet_door has open)
\r
637 "The door to the bar stands OPEN at tens of curious eyes.
\r
638 You'd be forced to arrest yourself for LEWD conduct.";
\r
639 print "You quickly remove your street clothes and bundle them
\r
640 up together into an INFRA MINUSCULE pack ready for easy
\r
642 if (toilet_door has locked) {
\r
643 give clothes ~worn; give costume worn;
\r
644 "Then you unfold your INVULNERABLE-COTTON costume and
\r
645 turn into Captain FATE, defender of free will, adversary
\r
650 "Just as you are slipping into Captain FATE's costume,
\r
651 the door opens and a young woman enters. She looks at
\r
652 you and starts screaming, ~RAPIST! NAKED RAPIST IN THE
\r
654 Everybody in the cafe quickly comes to the rescue, only
\r
655 to find you ridiculously jumping on one leg while trying
\r
656 to get dressed. Their laughter brings a QUICK END to
\r
657 your crime-fighting career!";
\r
660 "Last time you changed in the dark, you wore the suit inside
\r
662 default: ! this _should_ never happen...
\r
663 "There must be better places to change your clothes!";
\r
666 has clothing proper pluralname;
\r
668 Object costume "your costume"
\r
669 with name 'captain' 'captain^s' 'fate' 'fate^s' 'costume' 'suit',
\r
671 "STATE OF THE ART manufacture, from chemically reinforced 100%
\r
672 COTTON-lastic(tm).",
\r
676 "You are already dressed as Captain FATE.";
\r
678 "First you'd have to take off your commonplace unassuming
\r
679 John Covarth INCOGNITO street clothes.";
\r
682 "You need to wear your costume to FIGHT crime!";
\r
684 "But you're not yet wearing it!";
\r
686 "Your UNIQUE Captain FATE multi-coloured costume? The most
\r
687 coveted clothing ITEM in the whole city? Certainly NOT!";
\r
689 has clothing proper;
\r
691 !============================================================================
\r
692 ! Entry point routines
\r
695 #Ifdef DEBUG; pname_verify(); #Endif; ! suggested by pname.h
\r
697 move costume to player;
\r
698 move clothes to player; give clothes worn;
\r
700 "^^Impersonating mild mannered John Covarth, assistant help boy at an
\r
701 insignificant drugstore, you suddenly STOP when your acute hearing
\r
702 deciphers a stray radio call from the POLICE. There's some MADMAN
\r
703 attacking the population in Granary Park! You must change into your
\r
704 Captain FATE costume fast...!^^";
\r
708 if (deadflag == 3) print "Your secret identity has been revealed";
\r
709 if (deadflag == 4) print "You have been SHAMEFULLY defeated";
\r
710 if (deadflag == 5) print "You fly away to SAVE the DAY";
\r
713 [ InScope person item;
\r
714 if (person == player && location == thedark && real_location == toilet) {
\r
715 PlaceInScope(light_switch);
\r
716 PlaceInScope(toilet_door);
\r
718 if (person == player && location == thedark)
\r
719 objectloop (item in parent(player))
\r
720 if (item has moved) PlaceInScope(item);
\r
724 !============================================================================
\r
725 ! Standard and extended grammar
\r
730 if (noun has pluralname) print "They're";
\r
731 else print "That's";
\r
732 " not something you must change to save the day.";
\r
735 Verb 'change' 'exchange' 'swap' 'swop'
\r
739 * creature 'for' topic -> AskFor;
\r
741 !============================================================================
\r