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?
Cabbages
by
Jason Orendorff
Played 865 times
View game source
(spoilers!)
Download the
.z8 file
Source Code
“Cabbages” by Jason Orendorff Use the serial comma. Chapter 1 - The River The East Riverbank is a room. “Here a lazy river crosses your path.” The West Riverbank is a room. “The trail continues west from here, toward your farm. The river is behind you, to the east.” The river is a backdrop. It is in the East Riverbank and the West Riverbank. Instead of entering the river: say “[one of]You plunge one foot in, to find that the river is far too cold, and too muddy, and also your foot is stuck. After a scary moment you manage to extricate it and get yourself back on dry land.[or]You can’t step into the same river twice, they say.[or]Brrr! Not likely.[stopping]”. Swimming is an action applying to nothing. Understand “swim” and “swim across” as swimming. Instead of swimming, silently try entering the river. A dock is a backdrop. It is in the East Riverbank and the West Riverbank. Chapter 2 - The Boat The boat is a vehicle in the East Riverbank. “A boat is tied to a dock nearby.” Understand “rowboat” as the boat. Instead of taking the boat, say “There’s no point carrying a boat around.” [We make this the “Last” check rule as a way of telling Inform that the “But you’re already in the boat” rule logically precedes this one, and must be checked first.] Last check rule for entering the boat: [The boat can hold at most two things, including the player.] let L be the list of things enclosed by the boat; add the list of things enclosed by the player to L; add the player to L; if the number of entries in L is greater than 2: say “The little boat begins to sink under the weight of [L with definite articles], and you hastily scramble out of it again.” instead. Instead of inserting something (called X) into the boat when the boat encloses two things: say “The boat is already so low in the water that putting [the X] in would swamp it.” Report dropping while the player is in the boat: say “You carefully set [the noun] down in the bottom of the boat.”; stop the action. Report removing something from the boat: say “Taken, after some very awkward footwork.” Report entering the boat: say “You step carefully into the rowboat.”; stop the action. [Otherwise, the default report rule would also pipe up, saying something like “You get into the boat.”] Rule for reaching outside the boat: say “You can’t reach it from inside the boat.”; deny access. [Otherwise you would be able to swamp the boat by getting in first and then picking things up.] Chapter 3 - The Treasures A treasure is a kind of thing. A wolf is in the East Riverbank. “The ‘sheep’ you bought at the fair is here.” Understand “sheep” as the wolf. The description of the wolf is “[one of]Exceedingly dapper in its white fleece, and undeniably toothy. In hindsight, you should have examined the animal more closely before buying it; up close it obviously isn’t a sheep.[or]In fact the ‘sheep’ is a wolf wearing some sort of white woolly sweater.[stopping]” [We could treat the fleece as a separate thing, but this is a bit of a pain, so:] Understand “fleece” and “white” and “woolly” and “sweater” as the wolf. The printed name of the wolf is “‘sheep’”. After examining the wolf, now the printed name of the wolf is “wolf”. A goat is in the East Riverbank. “Your goat stands nearby, chewing on nothing in particular.” The description of the goat is “Bearded, bearing a vacant expression.” The player is carrying a sack of cabbages. The description of the cabbages is “Your very first purchase at the fair today: delicious, mouthwatering cabbages. Your favorite!” The wolf, the goat, and the cabbages are treasures. Instead of taking the sack while the player is carrying the goat: if the wolf can see the player: say “The wolf watches with apparent satisfaction as you try to keep hold of the wriggling goat and also get a hand on the heavy sack. After a brief struggle you give it up.”; otherwise: say “Hefting the sack while holding the goat proves impossible, though the goat tries to help by standing on your back, then your head, then your kidneys. In the end you just manage to stay in one piece and keep hold of the goat. The sack remains where it is.” Instead of taking the goat while the player is carrying the sack: say “Chasing the goat around while carrying the enormous sack of cabbages is a farce. You never get close[if the wolf can see the player]. The wolf makes no move to help[end if].” Chapter 4 - Crossing Crossing is an action applying to nothing. [Weirdly, the Standard Rules define a “cross” command -- it’s an obscure synonym for “enter”. Delete it:] Understand the command “cross” as something new. Understand “cross” and “cross river” and “row” and “row boat” and “row across” and “row across river” and “row boat across river” and “go across” and “go across river” as crossing. Understand “set sail” and “sail” and “sail across” and “sail across river” and “sail boat across river” as a mistake (“It’s not a sailboat.”) Instead of going west in East Riverbank: try crossing. Instead of going east in West Riverbank: try crossing. Check crossing: If the player is not in the boat, say “You’ll need to be in the boat first.” instead. To decide which room is the near bank: decide on the location of the player. [This is always one of the two rooms, even if the player is in the boat.] To decide which room is the other bank: if the near bank is the East Riverbank, decide on the West Riverbank; otherwise decide on the East Riverbank. To decide whether (X - a thing) and (Y - a thing) are ashore together: [This rule is phrased to avoid relying on subtle details; it could be just "If X is in the near bank and Y is in the near bank, decide yes; decide no".] if the boat encloses X or the boat encloses Y, decide no; if the location of X is the location of Y, decide yes; decide no. Carry out crossing: if the wolf and the goat are ashore together: say “As you row the boat out into the middle of the river, you are dismayed to note your new wolf politely devouring your new goat.”; end the story saying “Someone has got your goat”; else if the goat and the cabbages are ashore together: say “As you reach the middle of the river in the boat, you are dismayed to see the goat munching away at the sack of cabbages.”; end the story saying “Oh no, your cabbages!”; otherwise: move the boat to the other bank. Report crossing: if the cabbages are in the boat: say “[one of]The cabbages are wont to roll back and forth from one side of the boat to the other, nearly swamping it. But after a few minutes of white-knuckled terror, you reach the other bank.[or]This time you try stowing the cabbages between your legs to stop them rolling about. This has no effect, but somehow you make it across alive.[stopping]”; else if the wolf is in the boat: say “The sheep regards you coolly as you work the oars, its eyes filled with some unidentifiable but deeply disturbing emotion (or perhaps it’s just hunger). You are relieved when the boat thumps into the dock on the other side.”; else if the goat is in the boat: say “[one of]The goat stands on the port gunwale, then on the bow behind you, then on your shoulders, as you row steadily across.[or]The goat positions its rear end a few inches from your face during the return journey.[or]The goat takes a brief nap in the bottom of the boat as you row steadily across.[stopping]”; otherwise: say “You row the boat steadily to the other side of the river.[no line break][first time] Without the goat, it’s quite relaxing.[only]”; try looking. Chapter 5 - Departing Instead of going east in East Riverbank: say “It’s no good going back to the fair; they’ll have closed by now. You need to cross the river and get home.” Instead of going west in West Riverbank: if three treasures are visible: end the story finally saying “You have won”; else if the cabbages are visible and the goat is visible and the wolf is not visible: say “You and the wolf will probably both be happier this way. And anyhow...”; end the story saying “Two out of three ain’t bad”; otherwise: say “Well, you didn’t end up bringing all three of your purchases home, but...”; end the story saying “[The number of visible treasures in words] out of three ain’t bad”. Chapter 6 - Complications [Of course, the real fun is in blocking all the stuff the player should probably know better but will try anyway.] The goat-boat count is a number that varies. The goat-boat count is 0. Instead of entering the boat when the player is holding the goat: If the goat-boat count is 0: say “This nearly ends in disaster. The goat gets nervous and tries to stand up in your arms the moment you lift your foot from the dock.”; else if the goat-boat count is 1: say “Squeezing the poor goat rather tightly, you dive into the boat, which miraculously does not capsize. The goat immediately wriggles free and leaps lightly to the shore.”; move the player to the boat, without printing a room description; move the goat to the near bank; otherwise: say “Before you can manage this, the goat kicks you in the face and leaps out of your arms.[no line break][first time]It regards you coolly from the riverbank.[only]”; move the goat to the near bank; increase the goat-boat count by 1. Chapter 7 - The predation relation - Not for release [The code below illustrates relations in Inform. It’s commented out because the previous chapter contains a lot of hand-written prose for each case. Some things are better handled with bespoke code for each case, and some are better handled with relations and tables. For a game with thirty treasures, each with its own hungers, I would use a table.] [ Feeding-on relates various things to various things. The verb to be able to eat means the feeding-on relation. The wolf can eat the goat. The goat can eat the cabbages. To decide whether (A - a thing) and (B - a thing) are ashore together: if A is in a room and B is in the location of A, decide yes; decide no. Check crossing: Repeat with A running through the treasures: repeat with B running through the treasures: if A and B are ashore together and A can eat B: say “You can’t cross now. [The A] would eat [the B]!”; stop the action. ]