[ ColorString ix; switch (ix) { 1: print "white"; 2: print "gold"; 3: print "red"; 4: print "brown"; 5: print "green"; 6: print "blue"; 7: print "black"; default: print "[BUG]"; } ]; [ CapColorString ix; switch (ix) { 1: print "White"; 2: print "Gold"; 3: print "Red"; 4: print "Brown"; 5: print "Green"; 6: print "Blue"; 7: print "Black"; default: print "[BUG]"; } ]; [ LongColorString ix; switch (ix) { 1: print "white"; 2: print "vivid gold"; 3: print "rich crimson"; 4: print "muted brown"; 5: print "pale green"; 6: print "deep blue"; 7: print "strange dark"; default: print "[BUG]"; } ]; [ MatchColorWord ix wd; switch (ix) { 1: return (wd == 'white'); 2: return (wd == 'vivid' or 'gold'); 3: return (wd == 'rich' or 'red' or 'crimson'); 4: return (wd == 'muted' or 'brown'); 5: return (wd == 'pale' or 'green'); 6: return (wd == 'deep' or 'blue'); 7: return (wd == 'strange' or 'dark' or 'black'); default: return false; } ]; Global MaskNumSeen = 0; Global MaskNumGotten = 0; Global MaskNumWorn = 0; [ AcquireMask obj; if (obj.acquired) "[BUG] Mask got acquired twice."; if (~~(obj ofclass MaskClass)) "[BUG] Non-mask acquired."; obj.acquired = true; if (MaskNumGotten == 0) GuideMaskScoreMessage.invoke(obj); else if (notify_mode) GuideEnqueue("Your score has gone up."); MaskNumGotten++; ]; [ WitnessMask obj; if (obj.witnessed) return; if (~~(obj ofclass MaskClass)) "[BUG] Non-mask seen."; obj.witnessed = true; MaskNumSeen++; ]; Object GuideMaskScoreMessage with invoke [ obj; self.number = obj; GuideEnqueue(self); ], number 0, description [; print "Your score has gone up.^^ Your score is displayed in the top right corner of the window. ~"; print MaskNumGotten, " of 7"; if (ArtifNumGotten) print ", +", ArtifNumGotten; print "~ means you've achieved ", (EnglishNumber) MaskNumGotten, " out of seven main goals."; if (ArtifNumGotten) print " (The +", ArtifNumGotten, " is the number of additional, optional goals.)"; print " The score increased when you picked up ", (the) self.number, "; so presumably there are seven masks to find in the game.^^ You can get a full account of your score by typing ", (helpcmd) "score", "."; ]; Class MaskClass with name 'flat' 'face' 'faces//p' 'mask' 'masks//p', mask_word_used 0, parse_name [ wd num colwd; if (parser_action == ##TheSame) { return -2; } self.mask_word_used = false; colwd = self.name_wd; wd = NextWord(); while (WordInProperty(wd, self, name) || (wd == colwd)) { if (wd == 'mask') self.mask_word_used = true; num++; wd = NextWord(); } return num; ], name_wd 'bug', name_str "[BUG]", list_together "masks", short_name [; print (string) self.name_str, " mask"; rtrue; ], description [; print_ret "It looks like a ", (string) self.name_str, " paper mask, half life-size. But its curves are only delicate shading; the mask is flat, a ", (string) self.name_str, " cutout of a face."; ], count 0, acquired 0, witnessed 0, mask_worn false, mask_mirrored false, before [ firsttime; Wear: if (player in mirrorchair) { OfferHint(HintoUsing); } if (MaskNumWorn == 0) { firsttime = true; self.mask_worn = true; MaskNumWorn++; print "The mask has no ribbons to tie -- it is not even curved to fit a human face. In any case, it's half life-size. It cannot be worn.^^ Nonetheless, you try raising the mask before your eyes....^"; } else if (self.mask_worn == 0) { self.mask_worn = true; MaskNumWorn++; print "Gingerly, you raise the mask to your face....^"; } else { print "Once again you hold the mask up before your face....^"; } new_line; MaskStory(self.count, firsttime); rtrue; Disrobe: print "You're not wearing ", (the) self; if (MaskNumWorn) { print ". It's unwearable, flat paper. All you can do with the"; if (MaskNumWorn == 1) print " mask is hold it"; else print " masks is hold them"; print " up in front of your face"; } "."; Touch: "The mask is light, but very stiff. Perhaps it is not paper after all."; ]; Class DistantMaskClass with name 'flat' 'face' 'faces//p' 'mask' 'masks//p', mask_word_used 0, parse_name [ wd num colwd; if (parser_action == ##TheSame) { return -2; } self.mask_word_used = false; colwd = self.number.name_wd; wd = NextWord(); while (WordInProperty(wd, self, name) || (wd == colwd)) { if (wd == 'mask') self.mask_word_used = true; num++; wd = NextWord(); } return num; ], short_name [; if (self.number == 0) { print "[BUG] distant mask"; rtrue; } print (string) self.number.name_str, " mask"; rtrue; ], number 0, has scenery; Object maskshred "torn black shred" with name 'black' 'shred' 'of' 'paper' 'torn' 'face' 'drawing', description [; print "It's the left side of a face, sketched on black paper. It seems to have been torn from a drawing of you."; if (self hasnt moved) { give self moved; print "^^Wait. Was that there before?"; } new_line; rtrue; ], invoke [; if (self hasnt general) { give self general; move self to desk; } ], before [; Wear: print "You hold the black shred up before your left eye.^^"; print (emph) "-- too late, for your bitter wrath is descending--"; "^^You yank it away, shivering. Could that have been you?"; ], has ~general; [ MaskPaintingDesc rm str obj count mask ix; count = 0; objectloop (obj in rm) { if (obj ofclass MaskClass) { count++; mask = obj; WitnessMask(mask); } } if (count == 0) return 0; if (count == 1) { print "^The artist has depicted something ", (string) mask.name_str, " lying ", (string) str, ". It is small, hard to distinguish amid the brushwork; but it seems to be a ", (string) mask.name_str, " mask.^"; return 1; } print "^The artist has depicted something colorful lying ", (string) str, ". They are small, hard to distinguish amid the brushwork; but they seem to be "; ix = 0; objectloop (obj in rm) { if (obj ofclass MaskClass) { ix++; if (ix > 1) { if (ix < count) print ", "; else if (count <= 2) print " and "; else print ", and "; } print (string) obj.name_str; } } print " masks.^"; return count; ]; Object maskvoices "voices" with name 'voice' 'voices' 'sound' 'sounds' 'distant' 'distance' 'murmur' 'babble', found_in [; return self.number; ], number 0, count 0, before [ dir dirmod; Examine, Search: <>; Listen: dir = 0; dirmod = 0; if (location provides coredir) dir = location.coredir; if (location provides coredirmod) dirmod = location.coredirmod; print "The voices seem to be"; if (dir == 0) { print " coming from everywhere and nowhere"; } else if (metaclass(dir) == String) { print " ", (string) dir; } else { if (dirmod & DIRMOD_NEAR) print " nearby, somewhere"; else if (dirmod & DIRMOD_FAR) print " coming from somewhere far"; else print " coming from somewhere"; if (dirmod & DIRMOD_ABOVE) print " above and"; else if (dirmod & DIRMOD_BELOW) print " below and"; switch (dir) { u_obj: print " above you"; d_obj: print " below you"; default: print " to the ", (string) dir.name_str; } } ". They murmur in a language with the tang of familiarity; but you are unable to make out even one word."; Enter: dir = 0; dirmod = 0; if (location provides coredir) dir = location.coredir; if (location provides coredirmod) dirmod = location.coredirmod; if (dirmod & DIRMOD_UNCERTAINPATH) "You are not certain which way leads towards the voices."; if (dir == 0 || metaclass(dir) == String) "You cannot tell where the voices are coming from."; if (dirmod & DIRMOD_FOLLOWVERT) { if (dirmod & DIRMOD_ABOVE) dir = u_obj; if (dirmod & DIRMOD_BELOW) dir = d_obj; } print "(follow the voices ", (string) dir.name_str, ")^"; <>; default: "That's clearly impossible."; ], react_before [; Listen: if (noun == nothing) <>; ], invoke [; if (Enlightened) "[BUG] voices appear when enlightened."; if (self has general) return; give self general; StartDaemon(self); self.count = 0; self.number = false; ], evoke [; if (self.number) { print "^As you release the mask, the voices fade imperceptibly away.^"; self.number = false; } self.count = 0; give self ~general; StopDaemon(self); remove self; ], daemon [ total dir; total = ((whitemask in player) + (goldmask in player) + (redmask in player) + (brownmask in player) + (greenmask in player) + (bluemask in player) + (blackmask in player)); if (total < 7) { self.evoke(); return; } if (location ~= MirrorRoom) { if (~~self.number) { self.number = true; self.count = 0; move self to location; if (self hasnt moved) { give self moved; print "^You raise your head. You think you can hear voices in the distance.^"; } else { print "^You strain your ears: once again you can make out voices in the distance.^"; } return; } } else { if (self.number) { self.number = false; remove self; print "^As you cross the room's threshold, the voices go silent -- a sudden and simultaneous hush, as of exultant expectation.^"; return; } } if (self.number) { self.count++; if (self.count == 1) { print "^The distant voices are growing more distinct, if not louder.^"; } if (self.count == 3) { dir = 0; if (location provides coredir) dir = location.coredir; if (metaclass(dir) == String) print "^The voices are ", (string) dir, ".^"; else switch (random(7)) { 1: print "^The voices seem to intone a single word in unison.^"; 2: print "^The distant voices natter imperiously.^"; 3: print "^A note of laughter peaks amid the voices.^"; 4: print "^One of the distant voices rises for a moment in anger.^"; 5: print "^The voices hasten into an urgent babble, for a moment.^"; default: print "^The distant voices continue to murmur.^"; } } if (self.count >= 5 && random(101) < 30) self.count = 2; } ], has pluralname scenery ~general ~moved; [ MaskStory val firsttime; style underline; global_italic = true; print "...Memory stirs...^^"; MaskStoryText(val); if (val == 7) print "^...your memory ends abruptly.^"; style roman; global_italic = false; if (firsttime) print "^You yank the mask away with a shudder. What are these memories? Do they belong to the wizard whose house you are disturbing?^"; ]; [ MaskFlash val; new_line; style underline; global_italic = true; print "You know this: "; switch (val) { 1: print "When you sneak out at night to gaze up at the stars, you can hear them laugh and tell each other stories. Cannot everyone?"; 2: print "Life takes its own course, and sometimes no reason nor argument nor urgent need can divert its speaking tide."; 3: print "The incidents are not the essence, and the blood is not the life. But the incidents of blood are a symbol beneath every human thought."; 4: print "Mathematic art may chart the course of a messenger, or an army, more precisely than a knotted string on a peg-nailed map. But the simple string is an art which can be seen and felt. Thus does the general see and feel."; 5: print "To win a battle is never a gain. It only means you may resume the burdens you bore before the war. You do not look forward to them."; 6: print "The dance of symbols is the movement of the people. Perhaps you have not studied them enough... but your own studies, the symbols of worlds within and above, press you so."; 7: print "These people interrupt your studies--"; } style roman; global_italic = false; new_line; ]; [ MaskStoryText val; switch (val) { 1: print "A child runs through the forest. A robe, richly bright-embroidered, has slipped off one skinny shoulder -- a child old enough to be put in clothes, too young to know what it means to wear them. A silver-haired child whose glance darts from tree to bird, caught everywhere.^^"; print "A mother's voice shouting. Not patient, not yet urgent. The child attends this, with the same interest as bush, flower, fascinating new rustle underfoot...^^"; print "The name, again.^^"; print "A moist leaf, torn from a tree, clutched in a small fist. Tossed in the air. Blown about, blown upwards again and again, as the child dances back and forth, face raised, flushed, puffing madly...^^"; print "Mother's voice interrupting the game. The child spins once more, dashes back towards dinner.^^"; print "The leaf flutters about in the air. It circles a tree; then rises to a high branch, clings there. It seems to bend this way and that; then it casts loose, and flutters determinedly after its thoughtless maker.^"; 2: print "A man and a woman; they lean on each other, a dim and distant exhaustion. Between them, they cradle a dark-haired infant. It is the only thing in the world, as they always are.^^"; print "A silver head shakes; a hand draws back the blanket. The infant has a clubbed foot -- twisted and drawn in.^^"; print "The couple put out their hands, once again. Light curls out of the air. Blue and green, violet and no color at all, luminous currents slide down the infant's limbs. It twists and whines, fretting, but the child is exhausted as well.^^"; print "Then the light splinters and is gone. The foot is unchanged. The infant gathers itself for another howl. Its parents rock it absently, but they are looking at each other. The silver-haired one snaps a word -- both know the anger is self-directed, and is despair.^"; 3: print "True and heavy beams of wood frame the hall; it is dominated by a high table. At the head of the table, a tall figure stands -- silver hair, intricately stitched robes -- drawing all eyes.^^"; print "A sharp gesture. To one side, a half-grown boy frowns, tries to ask a question. He is shushed fiercely and without a glance.^^"; print "At the door, uniformed guards carry in a bundle of cloth. The silver-haired figure stares at it -- stares at it for long moments.^^"; print "A guard, moved finally by the silence, unfolds the cloth. Eyes jerk; but there is still no sound.^^"; print "Eventually, the tall figure moves a hand again. The wet red stains that have been revealed sparkle, glow, and slowly vanish from the cloth. It is only a gesture; it is all anyone can do; it is nothing.^^"; print "Muffling a cry, the boy leaps up and limps for the door. Hurrying, his uneven steps are more halt than usual. His face twists in pain; but no one moves to help him.^"; 4: print "In a darkened library, someone works alone. The tall shelves are crowded, but the rows of titles fade into shadows; only the desk is illuminated. A map is spread upon it. The pen, moving across its face, annotates and speculates.^^"; print "Nearly half the map is tinted red. Along the border, marks and notations cluster like wasps.^^"; print "The silver head snaps up, as an officer enters. He holds a pale cylinder, the length of a tall man's finger. He places it on the desk; he bows; he turns and leaves. At no point do his eyes rise from the floor.^^"; print "The cylinder, unrolled, proves to be a length of parchment: filthy, closely lettered. The tall figure reads it, once. Then the pen, taken up once again.^^"; print "In the blank heart of the red-tinted region, quick strokes now emblazon the shape of a crutch.^"; 5: print "A tent rests in mud; it is rigidly upright, defying its stains and any weariness. Once-gold laces twitch against once-white cloth. Then a figure is emerging. It too is rigidly upright, stained and dirtied, although the hair remains silver.^^"; print "Facing the tent are four soldiers. The man they surround is a soldier too; but his red sashes are hasty, crudely torn from some flag and stitched to a soldier's common clothes. He looks too young for them.^^"; print "The man carries no weapon, though his escorts eye him as if he might pull one out of any puddle of mud. What he carries instead is a length of hacked wood with a shattered handle. He kneels -- in the mud -- and lays it at the tall figure's feet.^^"; print "The eyes that peer down from beneath silver hair seem only tired. The figure turns away, and reaches for the tent flap again. But a fist clenches on the lacing; harsh yellow light splinters the air.^^"; print "A length of wood, which might once have been a crutch -- once, a war ago -- flares into fire, ember, and ash.^"; 6: print "The rooflines of the city are slate over brick; but the tower is older stone. A silver-haired figure looks down from an embrasured window. The largest building in view faces the tower, across the square, perhaps in challenge. Its brick arches frame an intricate web wrought of iron. The web shapes a symbol: an ornately styled crutch.^^"; print "A small carved crutch hangs at the figure's throat; but this is simple, a few splinters of wood. Absent fingers have smoothed the rough wood to a polish, here and there.^^"; print "The people in the square do not look up; they go about their business quietly. Or -- all do but one. One dark cloak is thrown down suddenly. A woman stands revealed in bright-dyed rags. She is shouting, up at the tower, out through the square, around at the citizens who move away from her. She spins, gesticulating. She points at the arched building; she points at the tower.^^"; print "Above, looking down, a brow furrows beneath silver hair.^^"; print "But the guards are coming, pushing through the crowd that melts away from the square. In moments, the ragged woman too is cleared from sight.^^"; print "The face in the window watches this. Not, perhaps, pleased; but satisfied enough. And then the face turns away, back to the books and artifices within the stone tower.^"; 7: print "The one who stands in the field has silver hair, but it is cropped, and faded with streaks of white. The field has no corn, only muddy ruts.^^"; print "Behind the tall figure is a city; a bright city, with white spires, but perhaps a cold one. There are lights within it, but they do not move.^^"; print "Before the tall figure is an army. Its soldiers are arrayed in mail and gilt tabards. The sign on their tabards is unrecognizably changed. There are very many of them, and they have come a very long way, but now they too are still.^^"; print "The front rank shifts, and three figures come forward. Each carries a tall spear, held upright; brilliant blue luminosity whirls and knots on each spearpoint. The light falls on the silver-haired figure, and casts a long red shadow behind him, pointing back at the city.^^"; print "The three soldiers begin to bring their spears down. The blue radiance flares hungrily.^^"; print "Then it goes out. The tall figure has raised one hand. No more than that; the spears are clattering atop each other in the mud, and the three soldiers are on their knees, huddled over their empty hands.^^"; print "The gilt ranks shift again, and now it is no ordered movement. Mail-bound faces look up, at the aching black opacity which has begun to open above the silver one's raised hand. The hurting blackness is the sky now, and the army begins to run--^"; } ]; [ EndStory val; style underline; global_italic = true; EndStoryText(val); style roman; global_italic = false; ]; [ linenoise len val ix; if (len) val = random(3) + 4; else val = random(2) + 2; for (ix=0 : ix