I'm lost. Here is my text. Why can't I change the point value of bed? Can someone explain conditionals? I set up this totally distinguished mentally-challenged sceanrio today to introduce myself to the language, but it's just. The documentation is terrible, I can't get If/Thens to work and I can't change the pointvalue of bed. Ugh.
"Cake" by Scott Stephan
Things have a number called point value. Nouns are things. The point value of a thing is usually 0.
When play begins, say "You have been drawn to this house by the smell of cake. And yet there appears to be no kitchen and no cake. What gives? You should have kept walking, you could have bought cake somewhere else. You and your cake."
The player is carrying a concealed weapon.
The foyer is a room. "You stand in a large foyer. Directly ahead of you, to the north, is a staircase leading upwards to a dark hall. To the west is a disused living room, looking both dusty and somehow immaculately staged. Behind you is the door out of the house."
West of the Foyer is the Living Room.
North of the Foyer is the Upstairs Hall.
The Upstairs Hall is a room. "You enter the dark hallway unable to see much of anything except where the late afternoon light slants through a shuttered window. There are two closed doorways here on the east and west sides of the hallway. There is a light switch on your right.".
A light switch is here. A light switch is a device.
West of the The Upstairs Hall is the Child's Bedroom.
East of the Upstairs Hall is the Master Bedroom.
[Start child's room. Player gets sugar here if they check for monsters under the bed]
The Child's Bedroom is a room. "The room you enter is unlike any you've seen in the house so far. Unlike the dusty, tomb-like chambers so far, this room is neat and clean. A space motif adorns the wall, rockets and planets splay out in front of your vision and the only source of light is a large constellation of glow-in-the-dark stars. On the bed is a spread showcasing Cowboys doing cowboy things. This must have been a child's room. As you approach the bed, there is a strong rustling sound from somewhere in the room.
There is a lump beneath the bedspread.".
A bedvalue is a kind of thing. The bedvalue has a point value 0.
A bed is here. A bed is a closed container. The bed is openable. The bed contains a sack of sugar. The bed has a point value 0. After opening the bed: say "There is an open bag of sugar in the bed. You like your sweets, but this is crazy! Make you could use the sugar to bake a cake.".
After examining the bed: say "You look under the bed and swear you see something move, but further investigation yields no lead. You are free to grab the sugar.". The bed has a point value 1. [Will need a conditional switch here to note that the player has examined the bed and is free to nab the sugar without fear of death]
[Conditional to check to see if player x'ed bed for monsters]
[If the player has examined bed, say "You get sugar."]
[After taking the sack of sugar: say "You look under the bed and swear you see something move, but further investigation yeilds no lead. You are free to grab the sugar.";
else;
After taking the sack of sugar: say "You pick up the bag of sugar and immeditely find yourself in pain. Someone has slashed your Achille's Tendon. From beneath the bed comes a soft laughter. Sprawled on your back, staring up at the enormous glowing constellation you barely have time to gasp before the thing beneath the bed tears you open. It is a slow and a painful death."; end the game in death;
end if.]
[end conditional]
[End Child's Room]
The Master Bedroom is a room. "This room is full of flour. Just full of it. Bags and bags of flour."
A bag of flour is here.
The living room is a room. "The living looks as if it hasn't been lived in for the better part of a decade. There is a well dressed skeleton on a red velvet couch. Long black curtains frame the tall windows. On a gold rattan table in the center of the room is a jar with a key inside. To the North is the kitchen."
A skeleton is here. The description is "You move towards the skeleton and find that body must have been a long, long time. Spiderwebs criss-cross the eye sockets and the bones feel brittle and dry. The bones, however, are well dressed in a tailored 3-piece suit. The skeleton appears to be sitting on an egg."
A egg is inside the skeleton. The egg is unmentioned. It is edible.
After taking the egg: say "You move the skeleton and find that it must have been sitting on top of the quail's egg. A brief shiver overcomes you as you consider the idea of using a dead man's egg for culinary delights." The description is "The egg looks quite old and not suitable for eating. It is doubtful you'd want to snack on this, at least as-is."
After eating the egg: say "You crack the egg open and slurp it down. I thought you wanted cake? You should have waited for cake because the egg is old, very old indeed and infected with polio. With no way out of the house and no vaccine in sight, you die a slow death from polio." ;
end the game in death.
North of the Living Room is the Kitchen.
The Kitchen is a room. "You find yourself in a small but servicable kitchen. You still want cake. Lining the kitchen is a long row of cabinets. There is a sink here and a mixer on the counter."
The cabinets are here. The cabinets are a closed container. The cabinets are openable.The cabinets contain a scrap of paper. After opening the cabinets: say "The cabinets are completely empty except for a scrap of paper. Maybe this is a cake recipe?".
After taking a scrap of paper: say "The paper is indeed a cake recipe. It says here that you'll need a quail's egg, a pound of sugar and 2 cups of flour".
A scrap of paper is not edible.
A mixer is here. A mixer is an open container. After examining the mixer: say "It's an old house and the power doesn't appear to be on. You could use this to make a cake if you could only turn it on.".
If mixer contains an egg and mixer contains a sack of sugar and mixer contains a bag of flour
begin;
say "Good job!".; end the game in victory;
end if
A sink is here. A sink is a device. After examining the sink: say "The sink is rusty and the basin is crusted with dirt and rust.". After switching on the sink: say "Your attempt to make water flow from the sink is in vain; This sink stopped working a long time ago.".