Home
Start a new game
Explore games
Help
Log in or sign up
Log in
Username
Password (
Forgot it?
)
×
New to Playfic?
Full Name
Email
Username
Password
Password (confirm)
Are you sure about this?
Garden & Passage V4
by
Dr. Ion Florescu
Played 23 times
View game source
(spoilers!)
Download the
.z8 file
Source Code
"Red Dwarf's Revenge" by Ion Florescu The story headline is "A humorous fantasy adventure about revenge, ducks, and dwarves." [==================================================================] [ WORLD ] [==================================================================] [--- MAIN GAME LOCATION ---] The Cave Living Room is a room. "A cozy but somewhat smoky cave chamber. A rough-hewn table, a bed of straw, and a cracked mirror dominate the space." A rough-hewn table is a supporter in the Cave Living Room. The description of the rough-hewn table is "A slab of wood on sturdy legs, scarred by years of mug-rings and chisel marks." Understand "table" as the rough-hewn table. A mirror is in the Cave Living Room. The description of the mirror is "It's cracked but still reflects a surprisingly heroic-looking dwarf. You wonder who that could be." A straw bed is in the Cave Living Room. The description of the straw bed is "A rough bed stuffed with straw. It doesn't look comfortable, but it's home." The raven is an animal in the Cave Living Room. The description of the raven is "A black raven with unsettlingly intelligent eyes. It stares at you like it knows your secrets." The raven can be wizard-form or bird-form. The raven is bird-form. [--- INTRO SCENE: DREAM ---] The Dream Castle is a room. "You are standing in a beautiful dwarven castle, marble halls glittering with gold and ruby light. Servants bow as you pass. You are the smartest and best-looking Red Dwarf in all of Dwarf World. Life could not be more perfect.[paragraph break] But then... a strange discomfort creeps into your mind. Something isn't right. You want to wake up." Dreaming is a truth state that varies. Dreaming is true. Waking up is an action applying to nothing. Understand "wake" or "wake up" as waking up. Instead of waking up when dreaming is true: say "You blink as the dream crumbles away.[paragraph break] Your crown melts like wax, the ruby walls drip into shadow, and the golden chandeliers collapse into darkness. The song of your glory fades into the echo of dripping water...[paragraph break] You are back in your cave."; now dreaming is false; move the player to Cave Living Room. Instead of doing something other than waking up when dreaming is true: say "You are still dreaming. The thought nags at you: maybe you should WAKE UP."; [--- PLAYER ---] The Red Dwarf is a man in Dream Castle. The player is the Red Dwarf. The printed name of the player is "The Little Red Dwarf". The description of the player is "Short, grumpy, but surprisingly stylish. You have a fiery red beard and a sharp gleam in your eyes that suggests mischief and a hint of pride." [--- GAME STATES ---] Remembering the past is a truth state that varies. Remembering the past is false. Understanding the task is a truth state that varies. Understanding the task is false. [--- MIRROR → MEMORIES → WIZARD ---] Instead of examining the mirror for the first time: say "You stare at your reflection... Suddenly, memories flood back — your uncle, the castle, the green dwarf..."; now remembering the past is true. After examining the mirror when remembering the past is true and the raven is bird-form: say "The raven croaks. Then, before your astonished eyes, it transforms into a bearded wizard in a pointy hat!"; now the raven is wizard-form; say "'Greetings, Red Dwarf,' says the Wizard. 'It is time to reclaim what was stolen.'"; now understanding the task is true. [--- TALKING ACTION ---] Talking to is an action applying to one visible thing. Understand "talk to [someone]" as talking to. Understand "talk [someone]" as talking to. Understand "wizard" as the raven when the raven is wizard-form. Understand "raven" as the raven. Carry out talking to the raven: if the raven is bird-form: say "The raven croaks enigmatically. Maybe it knows more than it lets on."; otherwise: say "'Listen well, Red Dwarf,' says the Wizard. 'I must tell you the story of your past.'"; follow the wizard-story rule. Report talking to someone when the noun is not the raven: say "You attempt a conversation with [the noun], but it either ignores you or speaks in riddles.". [--- SIMULATED PAUSE ---] To show pause: say "[line break][bracket]Press RETURN to continue.[close bracket][paragraph break]". [--- THE WIZARD'S STORY ---] This is the wizard-story rule: say "[paragraph break]The Wizard begins: 'Once upon a time there were two brothers who grew up together in a wonderful castle. They were educated by their good-hearted uncle, who taught them kindness and wisdom. One brother wore red, the other green. Why green? Because his heart was already tinted by greed.'[paragraph break]"; show pause; say "The Wizard continues: 'But greed darkens even the brightest halls. One day, the Green Dwarf murdered your uncle out of envy and stole all the family treasures — ten in all: the Map of the World of Good Ideas, the Silver Pickaxe of Glory, the Ruby Hammer of Light, the Emerald Crown, the Golden Goblet of Songs, the Sapphire Flute, the Onyx Shield, the Book of Fire, the Feather of the White Duck, and the Crystal Heart of the Mountain.'[paragraph break]"; show pause; say "The Wizard finishes: 'You, the Red Dwarf, barely escaped the burning castle. You fled to the dwarven village, where you have lived in this humble cave ever since. But the time for hiding is over. Seek the treasures. Rebuild what was lost.'[paragraph break]"; now understanding the task is true. [--- TREASURES ---] A map of the world of good ideas is a thing. The description is "A large parchment map inked with strange symbols and sketches of places that might exist — or might be dreams. In the corner, a note reads: 'For those who still believe in better things.'" A silver pickaxe is a thing. The description is "The Silver Pickaxe of Glory — said to split stone with a song." A ruby hammer is a thing. The description is "The Ruby Hammer of Light, glowing faintly with inner fire." An emerald crown is a thing. The description is "A crown set with flawless emeralds, symbol of dwarven rule." A golden goblet is a thing. The description is "The Goblet of Songs, which sings when filled with ale." A sapphire flute is a thing. The description is "A flute carved from pure sapphire. Its tone can calm storms." An onyx shield is a thing. The description is "The Onyx Shield, forged from black stone, unbreakable." A book of fire is a thing. The description is "An ancient tome, its pages flickering with magical flame." A feather of the white duck is a thing. The description is "A single glowing feather from the mythical White Duck of the North. Don't laugh — its power is real." A crystal heart is a thing. The description is "The Crystal Heart of the Mountain, beating slowly with a pulse of light." All the treasures are privately-named things. [--- DISCOVERY UNDER THE BED ---] Instead of looking under the straw bed: if the player does not carry the map of the world of good ideas: say "You lift the straw and find a folded parchment! It's the [map of the world of good ideas]."; now the player carries the map of the world of good ideas; else: say "You already took the only thing worth finding there."; [--- READING THE MAP ---] Reading is an action applying to one thing. Understand "read [something]" as reading. Carry out reading the map of the world of good ideas: say "You carefully unfold the parchment. Faded ink reveals a winding path through strange names — Duck Hill, the Forest of Forgetting, the Library of Fire, the Castle of Greed.[line break] A red mark circles the first place: The Hill of Bad Ducks. Beneath it, someone has scribbled: 'Start here. Follow the quacks.'"; Carry out reading something (called the item): if the item is not the map of the world of good ideas: say "You study [the item] for a moment, but it doesn't seem to contain anything readable."; [--- PORCH, DOOR, KEY, AND WARNING SIGN ---] The Porch is a room. "The small stone porch lies just outside the cave entrance, damp with morning mist and the scent of pine. Moss creeps between the flagstones, glimmering faintly in the dim light. Beyond the ridge, the valley stretches out into the distance — silent, waiting, and full of unfinished business." A wooden sign is in the Porch. The description of the wooden sign is "'Beware of the garden gnome in the garden with a weird arm.'" Understand "sign" or "wooden sign" as the wooden sign. [Door declaration + placement (correct syntax)] The heavy oak door is a lockable locked door. It is east of the Cave Living Room and west of the Porch. The description of the heavy oak door is "A solid oak door with iron bands. It looks very sturdy — and very locked." A brass key is on the rough-hewn table. The description of the brass key is "A small brass key, slightly tarnished. It looks like it might fit the oak door." The brass key unlocks the heavy oak door. After unlocking the heavy oak door with the brass key: say "The lock clicks open with a satisfying sound. The door creaks slightly, as if relieved to be free at last."; After opening the heavy oak door: say "The heavy oak door groans on its hinges, letting in a gust of cold morning air from outside."; continue the action. [--- GARDEN & SECRET PASSAGE ---] The Garden is east of the Porch. "A tidy garden with a cheerful garden gnome beside a rosebush." A garden gnome is scenery in the Garden. The garden gnome has a truth state called the arm-moved. The arm-moved is false. The description of the garden gnome is "Barely knee-high but surprisingly lifelike: a dwarf with a crooked red hat, a thick white beard, and a blue jacket stretched tight over his round belly. A small clay trowel rests in his hand. His glassy eyes gleam mischievously, as if he knows more than he lets on. [paragraph break]Now that you look closely... he looks *remarkably like you.* The same beard, the same hat, even the same smug expression. Yet something about his left arm seems... off — like it's been attached differently, or perhaps it can move, though you can’t imagine how clay should do that." The Secret Passage is a room. "A narrow, dark tunnel lit by faint luminescence on the walls." A door called the secret passage door is below the Garden and above the Secret Passage. The secret passage door is closed, openable, and scenery. The printed name of the secret passage door is "secret passage". The description of the secret passage door is "A cleverly hidden opening beneath a section of paving stones." Understand "move arm" or "lift arm" or "raise arm" or "move gnome's arm" as moving-arm. Moving-arm is an action applying to nothing. Carry out moving-arm: if the arm-moved of the garden gnome is false: say "You touch the gnome’s odd-looking arm. It feels strangely warm — almost alive. As you move it, his glassy eyes flare suddenly with a sickly [bold type]green glow[roman type]. A gravelly laugh bursts from the statue: [italic type]'Ha! Ha-ha-ha! You cannot twist my arm, for sure!'[roman type] The eerie light fades as the ground trembles. With a grinding rumble, a section of paving slides aside, revealing a hidden passage below!"; now the arm-moved of the garden gnome is true; now the secret passage door is open; otherwise: say "The gnome’s eyes are dull again, and his arm hangs limply — whatever magic was in him seems spent."; Instead of going down when the secret passage door is closed: say "The paving stones look solid — perhaps that strange arm hides a secret."; [==================================================================] [ SYSTEMS ] [==================================================================] [--- v1.2 HINT SYSTEM (Neutral) ---] Requesting help is an action applying to nothing. Understand "hint" or "help" as requesting help. Carry out requesting help: if dreaming is true: say "You seem to be dreaming. Perhaps you should try to [bold type]WAKE UP[roman type]."; else if the location is the Cave Living Room: if remembering the past is false: say "You might find a clue to your past by examining something reflective."; else if understanding the task is false: say "The raven appears intelligent. Maybe you can [bold type]TALK TO RAVEN[roman type]."; else: say "You’ve recovered some memories. Perhaps something in this cave can be unlocked or opened with a small object."; else if the location is the Porch: say "You’re outside now. The sign gives a warning — perhaps there’s more to discover further east."; else if the location is the Garden: say "The gnome stands out. Maybe its strange arm can be moved or adjusted."; else if the location is the Secret Passage: say "You’ve uncovered a hidden path. It might lead to something important if you keep exploring."; else: say "There are no hints for this area yet. Try examining your surroundings or your inventory."; [--- v1.3 SAVE/RESTORE REMINDER ---] turns-since-save is a number that varies. turns-since-save is 0. After saving the game: now turns-since-save is 0. After restoring the game: now turns-since-save is 0. Every turn: increase turns-since-save by 1; if turns-since-save is 60: say "You’ve been playing for a while. Consider using [bold type]SAVE[roman type] to record your progress."; if turns-since-save is 120: say "It’s been a long stretch since your last save. [bold type]SAVE[roman type] can help you return here later."; [--- v1.4 INVENTORY TIPS SYSTEM (toggleable) ---] Inventory-tips-enabled is a truth state that varies. Inventory-tips-enabled is true. Turning inventory tips on is an action applying to nothing. Understand "invtips on" or "inventory tips on" as turning inventory tips on. Turning inventory tips off is an action applying to nothing. Understand "invtips off" or "inventory tips off" as turning inventory tips off. Carry out turning inventory tips on: now inventory-tips-enabled is true; say "Inventory tips are now ON. Type [bold type]INVTIPS OFF[roman type] to disable."; Carry out turning inventory tips off: now inventory-tips-enabled is false; say "Inventory tips are now OFF. Type [bold type]INVTIPS ON[roman type] to enable."; After taking inventory when inventory-tips-enabled is true: if dreaming is true: say "[line break]Tip: You appear to be dreaming. Try [bold type]WAKE UP[roman type]."; rule succeeds; if the location is the Cave Living Room: if the player carries the brass key and the heavy oak door is locked: say "[line break]Tip: You have a key. It may unlock something nearby."; rule succeeds; if the player carries the map of the world of good ideas: say "[line break]Tip: You can [bold type]READ MAP[roman type] for guidance."; rule succeeds; say "[line break]Tip: Examine notable objects. Reflection might jog your memory."; rule succeeds; if the location is the Porch: if the player carries the brass key and the heavy oak door is locked: say "[line break]Tip: Try [bold type]UNLOCK DOOR WITH KEY[roman type]."; rule succeeds; say "[line break]Tip: The way east may hold something relevant."; rule succeeds; if the location is the Garden: if the arm-moved of the garden gnome is false: say "[line break]Tip: The gnome’s arm looks unusual. Try [bold type]MOVE ARM[roman type]."; rule succeeds; if the secret passage door is open: say "[line break]Tip: You can go [bold type]DOWN[roman type] through the opening."; rule succeeds; say "[line break]Tip: Investigate unusual features closely."; rule succeeds; if the location is the Secret Passage: say "[line break]Tip: Keep exploring; pathways may connect to future areas."; rule succeeds; say "[line break]Tip: Explore, examine, and try using your items with obvious obstacles."; rule succeeds; [--- v1.5 SCORE & ACHIEVEMENTS (self-contained; 250 max, 25/chapter) ---] game-score is a number that varies. game-score is 0. maximum game-score is a number that varies. maximum game-score is 250. [Score flags implemented as a list of text] scored-flags is a list of text that varies. scored-flags is {}. To decide whether (T - some text) has been scored: if T is listed in scored-flags, yes; no. To mark (T - some text) as scored: if T is not listed in scored-flags: add T to scored-flags. [Player command to view score] Understand "score" or "points" as asking for the score. Asking for the score is an action applying to nothing. current chapter is a number that varies. current chapter is 1. [Chapter 1 active; budget 25 points.] Carry out asking for the score: let chapter-max be 25 * current chapter; let shown be game-score; if shown > chapter-max: now shown is chapter-max; say "Your current score is [game-score] out of [maximum game-score]."; say "[line break](Chapter [current chapter]: [shown] / [chapter-max])"; [Helper to award points once] To award (N - a number) points for (X - some text): unless X has been scored: increase game-score by N; mark X as scored; say "(+[N] points)". [Chapter 1 achievements (5 × 5 = 25)] After examining the mirror for the first time: award 5 points for "mirror-memory"; After talking to the raven when understanding the task is true: award 5 points for "wizard-talk"; After taking the map of the world of good ideas: award 5 points for "found-map"; After unlocking the heavy oak door with the brass key: award 5 points for "unlocked-door"; After opening the secret passage door: award 5 points for "found-secret"; [Entering the Secret Passage completes Chapter 1 and tops up to 25] After going to the Secret Passage for the first time: let chapter-target be 25 * current chapter; [25 for Chapter 1] if game-score < chapter-target: let delta be chapter-target - game-score; increase game-score by delta; say "(+ [delta] points)"; say "Chapter [current chapter] complete. You have earned all [chapter-target] points available for this chapter."; [When Chapter 2 content exists, uncomment:] [ increase current chapter by 1; ] [--- v1.6 JOURNAL / LOG SYSTEM ---] A lore entry is a kind of thing. A lore entry can be discovered or undiscovered. A lore entry is usually undiscovered. A lore entry has a text called entry-title. A lore entry has a text called entry-text. A lore entry is privately-named. The mirror-memory entry is a lore entry. The entry-title of the mirror-memory entry is "A Glimpse of the Past". The entry-text of the mirror-memory entry is "You examined the cracked mirror and remembered key events that define your quest."; The wizard-task entry is a lore entry. The entry-title of the wizard-task entry is "The Task Revealed". The entry-text of the wizard-task entry is "The raven revealed itself as a wizard and outlined your objective."; The map-found entry is a lore entry. The entry-title of the map-found entry is "The Map of Good Ideas". The entry-text of the map-found entry is "You recovered a parchment map that marks an initial route to follow."; The porch-warning entry is a lore entry. The entry-title of the porch-warning entry is "Warning on the Porch". The entry-text of the porch-warning entry is "A sign outside warns about a garden gnome with a strange arm."; The gnome-secret entry is a lore entry. The entry-title of the gnome-secret entry is "The Gnome’s Mechanism". The entry-text of the gnome-secret entry is "You interacted with the gnome’s odd arm, triggering a hidden mechanism."; The secret-passage entry is a lore entry. The entry-title of the secret-passage entry is "Hidden Passageway". The entry-text of the secret-passage entry is "You located a concealed descent beneath the garden paving stones."; Opening the journal is an action applying to nothing. Understand "journal" or "notes" or "log" as opening the journal. Reading a journal item is an action applying to one number. Understand "read journal [number]" or "read entry [number]" as reading a journal item. Carry out opening the journal: let idx be 0; let listed be 0; repeat with L running through lore entries: if L is discovered: increase idx by 1; if listed is 0: say "Journal entries discovered:[paragraph break]"; now listed is 1; say "[idx]. [entry-title of L][line break]"; if listed is 0: say "Your journal is currently empty. Entries are added automatically as you make progress."; else: say "[paragraph break]Type [bold type]READ JOURNAL N[roman type] to read an entry."; Carry out reading a journal item: let target be the number understood; let idx be 0; repeat with L running through lore entries: if L is discovered: increase idx by 1; if idx is target: say "[bold type][entry-title of L][roman type][paragraph break][entry-text of L]"; stop the action; say "No journal entry numbered [target] is available."; [Unlock triggers for journal] After examining the mirror for the first time: now the mirror-memory entry is discovered; After talking to the raven when understanding the task is true: now the wizard-task entry is discovered; After taking the map of the world of good ideas: now the map-found entry is discovered; After examining the wooden sign for the first time: now the porch-warning entry is discovered; Every turn when the arm-moved of the garden gnome is true and the gnome-secret entry is undiscovered: now the gnome-secret entry is discovered; After going to the Secret Passage for the first time: now the secret-passage entry is discovered; [==================================================================] [ TEST SCRIPTS ] [==================================================================] Test systems with "wake up / x mirror / talk to raven / look under bed / read map / x table / take key / unlock door with key / open door / e / x sign / e / x gnome / hint / move arm / down / look / score / journal". Test caveflow with "wake up / hint / x mirror / talk to raven / look under bed / read map / score / journal". Test porchdoor with "wake up / x mirror / talk to raven / look under bed / take key / unlock door with key / open door / e / look / x sign / score / journal". Test gardenpassage with "wake up / x mirror / talk to raven / look under bed / take key / unlock door with key / open door / e / e / look / x gnome / hint / move arm / look / down / look / score / journal". Test scoring with "wake up / x mirror / talk to raven / look under bed / take key / unlock door with key / open door / e / e / move arm / down / score". Test journalread with "wake up / x mirror / talk to raven / look under bed / examine sign / take key / unlock door with key / open door / e / e / move arm / journal / read journal 1 / read journal 2 / read journal 3 / read journal 4 / read journal 5 / read journal 6". Test invtips with "wake up / i / invtips off / i / invtips on / i / take key / i / unlock door with key / open door / e / i / e / i / move arm / i / down / i". Test hints with "wake up / hint / x mirror / hint / talk to raven / hint / look under bed / e / hint / e / hint / move arm / hint / down / hint".