"Limelight" by Justin Lowmaster

Include Basic Screen Effects by Emily Short.



chapter a - settings and action definitions


[rules required for hiding. This allows for objects to be given a size, small or large, and large ones can be used to hide behind or under. The player, if hidden has restricted actions]
size is a kind of value. The sizes are small and large. a thing has a size. The size of a thing is normally small. The size of a door is normally large.

LOS is a kind of value. the LOS are hiding and inView. The player has a LOS. The LOS of the player is normally inView.

Hiding is an action applying to one thing. understand "hide behind [something]" and "hide under [something]" and "hide in [something]" as hiding.

unhiding is an action applying to nothing. understand "unhide" as unhiding. 

check hiding:
if the noun is small begin;
say "[The noun] is too small to hide behind.";
stop;
end if;
if the noun is a closed door begin;
say "You can't hide behind a closed door.";
end if;

carry out hiding:
say "You are now using [the noun] to hide.[paragraph break](You can stop hiding by typing UNHIDE.)";
now the player is hiding.

check unhiding:
If the player is inView begin;
say "You aren't hiding at the moment.";
stop;
end if;

carry out unhiding:
say "You are no longer trying to hide.[paragraph break]";
now the player is inView;

instead of doing something other than looking or listening or examining or taking inventory or smelling or unhiding or waiting while the player is hiding, say "You can't do that while hiding."

[difficulty modes]
diff is a kind of value. the diffs are normal and hard. the player has a diff. the diff of the player is normally normal.

seteasy is an action out of world. understand "normal mode" as seteasy. 
carry out seteasy: 
now the player is normal;
say "You are now playing in [diff of the player] mode.";

setreg is an action out of world. understand "hard mode" as setreg. 
carry out setreg: 
now the player is hard;
say "You are now playing in [diff of the player] mode.";


[rules for buying things]
purchased is a kind of value. a thing has a purchased. The purchased are sold and owned and nosale. The purchased of a thing is normally nosale.

instead of buying something nosale: say "[The noun] is not for sale."



[including a build it help screen.]
help is an action out of world. Understand "help" as help. 

Carry out help:
clear the screen;
say "*Game Goal*: Get out of the mall, hopefully with a coffee, while avoiding photographers.[paragraph break]*Basic Commands*:[paragraph break]n, s, e, w, nw, sw, ne, se, up, down: These will move you into that direction, if possible[paragraph break]x something: Examine a person, place or thing. Look will look at the room you are in.[paragraph break]z: waits.[paragraph break]i: looks at your inventory. If something is inside something else, it will be nested in the list, like the debit card in the wallet.[paragraph break]get something: Pick up an object. Using drop will drop it.[paragraph break]Undo: If you decide you did something you shouldn't have or wish you had not done, you can undo it. In this game, any unfavorable game endings (end even the good ones) can be undone by typing undo.[paragraph break]*Other*: During the game, if you see all upper case text, it is a command you can type. It should be obvious when and where to use it (but then I wrote the game, so everything makes perfect sense to me.)[paragraph break]*Difficulty modes*: This game defaults to Normal Mode. This means all the bad endings are blocked with an explanation why. If you would like to be able to experience failure, type HARD MODE at any time. To switch back, type NORMAL MODE. There are no restrictions on this. Any 'bad' endings can be undone with a single UNDO then changing your actions.[paragraph break]"

[rules for the ATM machine and getting money from it]

getmoney is an action out of world. understand "withdraw money" and "withdraw cash" and "get money" and "use atm" as getmoney.

chekbal is an action applying to nothing. Understand "check balance" as chekbal. 

Carry out chekbal:
If the location of the player is the ATM begin;
say "You have plenty.[paragraph break]";
else;
say "You are standing upright.";
end if;

cash is a thing. understand "money" and "coins" as the cash. The description of the cash is "Enough to get you anything you'll need today."

check getmoney:
if the player is not in The ATM begin; 
say "Withdraw money from where?";
stop;
end if;
if the player is in The ATM and the slot does not contain something begin;
say "You'll need to put your debit card in the ATM machine";
stop;
end if;
if the wallet contains the cash or the player is carrying the cash begin;
say "You have enough money for now";
stop;
end if;

Carry out getmoney:
say "You withdraw a considerable sum from the ATM machine and put it in your wallet.";
now the cash is in the wallet;

instead of dropping the cash, say "Don't attract attention, remember?". 
Instead of giving the cash to someone: 
If the second noun is the poor kid begin;
continue the action;
otherwise;
say "Don't attract attention, remember? Giving away to just anyone isn't a good idea.";
end if;


[types of things]

a barrier is a kind of thing. barriermode is a kind of value. the barriermodes are blocking and broken. a barrier has a barriermode. a barrier is normally blocking. instead of taking a barrier, say "You can't pick that up. [if the location of the player is in the construction zone]You can try pushing it though[end if]".

a hat is a kind of thing. A hat is wearable. The purchased of a hat is normally owned. understand "hat" as hat.

check wearing a hat:
if the player is wearing a hat begin;
say "You cannot wear more than one hat.";
stop;
end if;

a coat is a kind of thing. a coat is wearable. the purchased of a coat is normally owned. understand "coat" as coat.

check wearing a coat:
if the player is wearing a coat begin;
say "You can only wear one coat.";
stop;
end if;

shoes are a kind of thing. the purchased of shoes is normally owned. understand "shoe" and "shoes" as shoes. shoes are wearable;

Instead of wearing shoes, say "You already have on your favorite pair of shoes. You don't want  to take them off.";


[various settings]


instead of attacking someone:
if the location of the player is in the construction zone begin;
say "They aren't very close, try throwing something at them.";
otherwise;
say "Now isn't the time for violence.[paragraph break]";
end if;

instead of attacking mr owen, say "You would do better to keep him on your side."

The wallet is a container. Inside the wallet is a debit card. The player carries the wallet.
before inserting something (called item) into the wallet: [people try this stuff!]
if the item is the cash or the debit card begin;
continue the action;
otherwise;
say "That wont fit inside the wallet.";
stop;
end if;

The description of the debit card is "A silver card with a shiny holographic logo on it with your name and even a little picture of your face.".

Instead of dropping the wallet, say "You should keep that."

before going a direction:
if the player is not holding the debit card begin; if the debit card is not in the wallet begin;
say "You retrieve your debit card before you go.";
now the debit card is in the wallet;
end if;
end if;


[Health]
health is a kind of value. A person has a health. The healths are healthy and wounded and KO and dead. The health of a person is normally healthy.

[Player desc]
The description of the player is "You look good with your new haircut. [if the player is wearing something]You are wearing a [list of things worn by the player].[end if]"

The haircut is a thing. The haircut is part of the player. The description of the haircut is "You decided to get a different haircut than before. It is stylish and you really like the new look.".

[Just in case]
getflask is an action applying to nothing. Understand "get ye flask" as getflask.
Carry out getflask:
say "Thy are not a dungeonman, but have a flask anyways.";
Now the player carries the flask;

the description of the flask is "Unfortunatly empty of serious mead."

[No Scoring - I didn't have time to add scoring to everything, and I since I am not going to add hidden activities to gain extra scoring, I decided scoring was moot]
use no scoring.

Chapter b - Initializing the game

When play begins: 
say "You recently became famous! You are now having to get used to people say hi when you walk down the street, your face on TVs all across the world, popular magazines writing about you, and annoying photographers taking pictures of everything you do.[paragraph break]Today you went to the hair salon at the mall that you always have gone to to get a haircut. While you were sitting, a nosey photographer tried to get your picture. The hairstylist blocked his view by turning your chair, and after you paid, she let you go out the employee exit into a side hallway. You aren't sure if the photographer is still out there. You hope you can get a coffee and out of the mall without getting mobbed by photographers who will surely want pictures of your new haircut.[paragraph break]Type [bold type]help[roman type] at any time to get basic help.[paragraph break]The game starts in normal mode. In normal mode, you cannot lose. If you would like to be able to experience failure, type HARD MODE at any time. To switch back, type NORMAL MODE. There are no restrictions on this. Any 'bad' endings can be undone with a single UNDO then changing your actions.";
pause the game;


The hallway is a room with the printed name "Side Hallway". 

The description of the hallway is "A small little hallway used by employees to enter their stores. The hairstylist let you out this way so you could try to avoid the photographers. The way out of the hall is to the west, and the door back into the salon is south. There is a door labeled -Employees Only- to the north." 


the salon is a room with a printed name "Bettie's Hair Salon". The salon door is a door. It is south of the hallway. It is scenery. It is locked. 

The employee door is a door with the printed name "Hat Shop Door". It is north of the hallway. It is locked. it is scenery. understand "hat shop door" as the employee door.


mall1 is a room with the printed name "Store fronts: Betty's Salon and Hattie's". mall1 is west of the hallway. The description of mall1 is "An upper walkway outside some stores. To the east is a small hallway. Northeast is a store called Hattie's and southeast is Betty's Hair Salon. To the south are more stores." The salon is southeast of mall1. 

Hattie's is a room. It is northeast of mall1 and north of the employee door. The description is "A nice place to buy a hat. There are several racks with various different hats of all shapes and sizes. The clerk is cheerfully arranging items on the counter. To the south is the employee door. The exit is southwest."

Instead of going southeast from mall1, say "If you go back in, the photographer might see you."

the photographera is a person with the printed name "nosey photographer". He has the description "A short stocky man with a fancy camera. He is eyeing the hair salon.". photographera is in mall1. understand "nosey photographer" as photographera. The photographera is carrying the camera. The description of the camera is "It's really fancy. You get he can afford it because he sells candid pictures of people to sleezy tabloids.". Instead of giving something to photographera, say "That's not a good way to stay hidden.".

chapter 1 - The Hat trick 

[each chapter contains all or at least most of the coding for one puzzle]


check buying something:
if the noun is an owned hat begin;
if the player is not wearing the noun begin; 
now the noun is carried by the player;
end if;
say "You pay for the hat[if the player carries more than one owned hat]s[end if] before leaving. As you hand your debit card to the cashier, she almost shouts out your name, but you manage to stop her before it is too late. You thank her and retrieve your hat[if the player carries more than one owned hat]s[end if] and debit card.";
now all hats carried by the player are sold;
now all hats worn by the player are sold;
stop;
else if the noun is a sold hat;
say "You already bought [the noun]";
stop;
end if;


mall2 is south of mall1. It has the printed name "Store Fronts: European Fog and Create-A-Squishy"

before going south from mall1:
if the player is not wearing a hat begin;
say "The photographer starts to turn to look at you. You know that even with your new haircut, he will recognize you, so you duck back into the hallway.";
now the player is in the hallway;
stop;
else;
say "The photographer glances at you sideways, but he keeps eyeing the salon, not expecting you to be coming from that direction or wearing a [list of things worn by the player]. You get past him and breath a sigh of relief.";
pause the game;
continue the action;
end if;

the fedora is a hat. The beanie is a hat. The paperboy cap is a hat. The baseball cap is a hat. 

The racks is in Hattie's. It is scenery. The racks is a supporter. understand "rack" as the racks. On the racks is the fedora, the beanie, the paperboy cap and the baseball cap.

before going southwest from Hattie's: 
if the player is holding at least one owned hat begin;
say "You should BUY what you don't own before leaving, or put it back.";
stop;
end if;

Shoppera is a person. She is in Hattie's. She has the printed name "a woman browsing the hats". Understand "woman" and "woman browsing the hats" as shoppera. She has the description "She is wearing a warm looking jacket, some dark pants, and some fashionable boots." She is wearing a jacket and pants and boots.

The clerk is person in Hattie's. She has the description "a teenage girl of medium height with short brown hair, blue eyes, and an amazing smile." She is scenery.

The countera is scenery in Hattie's. It has the description "It's the counter where you pay for things.". understand "counter" as the countera. It has the printed name "counter".

Chapter 2 - Get Coated

instead of going north from mall2:
if the player is normal begin;
say "If you go back that way, the photographer will see you.";
stop;
else;
end the game saying "The photographer outside the salon sees you come back and starts snapping photos. The next thing you know, you are surrounded by flashing cameras.";
end if;

the description of mall2 is "There are more storefronts here. There is a outerware store to the northeast and a store where you can build your own stuffed animals to the southeast. There is a stairway down from here to the lower level of the mall. To the east is an ATM machine.".

the photographerb is a person with the printed name "tall photographer". He is in mall2. He has the description "This photographer is taller than the last one and is watching the stairs while every so often looking at the surrounding stores." Instead of giving something to photographerb, say "You had best not make your presence known.".

the fog store is a room with the printed name "European Fog". It is northeast from mall2. It has the description "The room is filled with mostly coats. Apparently there is a sale on today. The clerk looks bored. The exit is southwest.".

clerkb is a person in the fog store. understand "clerk" as clerkb. He has the description "He has short jet black hair, black fingernails, a lip ring, and looks terribly bored.". He is wearing a lip ring. He is scenery.

[bear store]
the bear store is a room with the printed name "Create-A-Squishy". It is southeast from mall2. It has the description "Several small children are in this colorful store with a parent or two choosing clothing for toy animals to get filled with cozy looking white fluffy stuffing."

the stuffing is scenery in the bear store. It has the description "A machine full of white fluffy stuffing. Fun.". Understand "machine" as the stuffing.
The children are scenery in the bear store. Understand "child" as the children. The description of the children is "Many kids of size and colors running about all excited about choosing parts to put on their stuffed (or soon to be) animals.".
The parents are scenery in the bear store. understand "parent" as the parents. The description of the parents is "Moms, dads, moms and dads together, all with children. Some look tired, but most look really happy.". The bears are scenery in the bear store. understand "bear" as the bears. The description of the bears is "Barrels of unstuffed bears of different kinds, as well as other animals.".

[just for fun]
makebear is an action applying to nothing. Understand "make bear" and "buy bear" and "get bear" and "stuff bear" and "buy animal" and "get animal" and "stuff animal" and "make animal" as makebear. 

the teddy bear is a thing. it is in null. it has the description "The bear, just how you made it.". instead of touching the teddy bear, say "The bear laughs a cute little laugh.".

carry out makebear:
if the bear is not in null begin;
say "You choose the clothing and accessories for your bear, then get it stuffed, then pay for it.";
now the player carries the teddy bear;
else;
say "You don't have time to make another.";
end if;


before doing something in mall2 for the first time, say "You hear the tall photographer talking on the phone. You can't make out much, but you hear a description of exactly what you are wearing[if the player is wearing a hat], without the hat[end if]."

[the ATM machine]
The ATM is a room. It is east of mall2. It has the description "A small booth with metal walls and a small curtain behind you. West takes you back out." 

the machine is a thing in The ATM with the printed name "ATM Machine". The screen is part of the machine. The keypad is part of the machine. The slot is a container that is part of the machine. instead of taking the machine, say "You can't get your truck inside the mall. Besides, your chain is at home.". understand "atm" as the machine.

The description of the machine is "A standard ATM Machine, complete with a screen, a keypad and a slot for a debit card."

The description of the screen is "[if the slot does not contain something]Welcome to 1st Bank of Inform. PUT CARD IN SLOT to begin.[end if][if the slot contains something]Hello, how can I help you today? Would you like to WITHDRAW MONEY?[end if]"

instead of inserting something into the machine, try inserting the noun into the slot.

Before inserting something into the slot:
if the noun is not the debit card begin;
say "The slot is only for debit cards.";
stop;
end if;


After inserting the debit card into the slot, say "You slide your card into the slot.[line break](you can WITHDRAW MONEY if you would like.)"

the curtain is scenery in the ATM.

[coat store]
the round rack is in the fog store. It has the printed name "round display rack". it is a supporter. It is scenery. It is large. understand "round display rack" and "rack" and "display" as the round rack.


the blazer is a coat. the leather jacket is a coat. the trenchcoat is a coat. the hoodie is a coat.

on the round rack is the blazer, the leather jacket, the trenchcoat and the hoodie.

check buying something:
if the noun is an owned coat begin;
if the wallet contains the cash or the player is carrying the cash begin;
say "You pay with cash this time so the cashier who isn't paying too much attention doesn't recognize you. You get your coat[if the player is holding more than one owned coat]s[end if] and change.";
if the player is not wearing the noun begin;
now the noun is carried by the player;
end if;
now all coats carried by the player are sold;
now all coats worn by the player are sold;
stop;
else if the player is normal;
say "You don't want to pay with your debit card again. It has your name and picture on it.";
stop;
else;
end the game saying "You pay with your debit card again. The seemingly semi-comatose cashier reads the card and lights up. His commotion attracts attention and the next thing you see is flashing cameras.";
end if;
else if the noun is a sold coat;
say "You already bought [the noun].";
stop;
end if;


before going southwest from the fog store:
if the player is holding at least one owned coat begin;
say "You should BUY what you don't own before leaving, or put it back.";
stop;
end if;

before going down from mall2:
if the player is wearing a coat begin;
say "The photographer doesn't recognize you with your coat on. You slip past him and go down.";
pause the game;
continue the action;
else;
say "You think the photographer will recognize you since you heard him say exactly what you are wearing.";
stop;
end if;

shopperb is a person. He is in the fog store. He has the printed name "a teenage boy browsing the coats". He has the description "He is wearing a stocking cap and jeans. He has a white t-shirt on.". understand "teenager" and "boy" and "teenage boy browsing the coats" as shopperb. He is wearing a stocking cap and jeans and a t-shirt. understand "tshirt" and "shirt" as the t-shirt.

Chapter 3 - Before the coffee shop


mall3 is down from mall2. It has the printed name "Store Fronts: Midtown Coffee and The Shoe". It has the description "There is a cultural display here complete with large plants, some statues, and a fountain. There are many people here and there is lots of noise. To the south are more stores and you can see the exit past them[if the camera crew is not in mall3], but there is a news crew reporting on something that way[end if]. To the northeast is the coffee shop. To the southeast is a shoe store. Between the two stores to the east is a hallway that is covered with a plastic sheet stapled to the walls."

instead of hiding the cultural display, say "Try hiding behind a specific part of the display."

The cultural display is scenery in mall3. Understand "display" as the cultural display. It has the description "Large plants surround tall totem statues which all circle a fountian.".

the crowd is scenery in mall3. It has the description "Lots of different people.". Understand "people" as the crowd.

The news crew is a room. It is south of mall3.

Instead of going south from mall3:
if the player is normal begin;
say "Unless it can't be avoided, you shouldn't go past the news crew.";
stop;
else;
end the game saying "You go past the news crew, and they don't see you! You try to get to the doors, but you find the reporters were reporting on an accident that caused damage and the doors are blocked. You have to walk past the news crew again, and one of them sees you, and soon everyone knows you are there.";
end if;

The plastic is a barrier. it is scenery in mall3. it has the description "A translucent plastic sheet stapled to the walls blocking off a hallway. There is a sign on it that says Pardon the mess. Coming soon: More Shopping Mall Stores!". understand "sheet" and "plastic sheet" as the plastic.

Instead of cutting the plastic, say "You don't anything to cut it with."

instead of taking the plastic, say "It is firmly stapled to the walls."

Instead of going east from mall3:
if the plastic is blocking begin;
say "The plastic is in your way.";
else;
continue the action;
end if;

Instead of going west from the passage:
if the plastic is blocking begin;
say "The plastic is in your way.";
else;
continue the action;
end if;


the passage is east of mall3. It has the description "It looks under construction. The walls are unfinished. To the north and south are employee doors to the coffee shop and the shoe store. West is the area with the cultural display while to the east is a part of the mall that is under construction.".
the passage has the printed name "Unfinished hallway".

The shoedoor is a door. It is scenery. It has the printed name "shoe store door". Understand "shoe store door" and "shoe door" and "door" and "employee door" as the shoedoor. It is south from the passage. It is locked. The coffeedoor is a door. It has the printed name "coffee shop door". Understand "coffee shop door" and "coffee door" as the coffeedoor. It is north from the passage. It is locked. It is scenery.
 
The fountain is scenery in mall3. It has the description "A bubbly fountain with a small sign 'Do not toss coins in the fountain.' Scattered over the bottom of the fountain are many coins.". the coins are part of the fountain. The description of the coins is "Lots of coins, from pennies to quarters.". Instead of taking the coins, say "You don't really need them, or the attention that taking them would bring.". Understand "coin" as the coins.

The statues are scenery in mall3. The statues are large. Understand "statue" and "totem" and "totems"  as the statues. They have the description "Tall totem statues."

The plants are scenery in mall3. The plants are large. The description of the plants is "Large bushy plants.". understand "plant" as the plants.

the photographerc is a person. She has the printed name "photographer in blouse". She has the description "You've seen this photographer before. She has a real penchant for taking the worst pictures possible of people then writing the worst possible things about them.". Understand "female" as photographerc.

instead of going northeast from mall3 for the first time: 
say "You start to head for the coffee shop, but you stop short when you see a female photographer walk out with an iced coffee. You recognize her. The fact she has an ice cold drink is very fitting for her. You can't let her see you. She has a keen eye and might recognize you even with your [list of things worn by the player] on.";
now photographerc is in mall3;

instead of going a direction from mall3 while photographerc is in mall3, say "She is coming towards you fast. You might want to HIDE BEHIND something.";

[after hiding in mall3 for the first time: <-- this didn't work, so I made an every turn rule that will only work once (I hope)]
every turn while photographerc is in mall3:
if the player is hiding begin;
say "As you stand in hiding, the man in the jacket walks over your way, still talking. You see the photographer walking past towards the stairs. The man in the jacket is still talking. You hear some very spiteful words about a man called Mr. Owen. The photographer walks up the stairs. You are glad she is gone. You hear the man in the jacket say something about keeping a lookout. You think you might have heard the word 'kill'.";
now photographerc is in mall2;
end if;

the thug1 is a person. He is in mall3. He has the printed name "man in a jacket". Understand "man" and "man in jacket" and "man in a jacket" and "thug" and "Mean thug" and "mean" as thug1. He has the description "You notice the man in the jacket doesn't seem to have a camera, but he does seem to be looking around for someone. He is talking too, but you can't tell to whom. You wonder what he is saying."

before doing something in mall3 for the first time, say "The man in the jacket is standing in one spot. He looks like he is talking to himself."

instead of listening to mall3:
say "You hear the hustle and bustle of people shopping, but you'd have to focus to make anything specific out.";

instead of listening to thug1: 
say "You hear his mentioning something about a man named Mr. Owens, but you can't make out anything else.";

instead of going up from mall3, say "You don't want to go backwards.[if the player is carrying the coffee] You just want to get your coffee and leave.[end if]";

Chapter 4 - Inside the coffee shop

the coffee shop is northeast from mall3. It has the printed name "Midtown Coffee". It has the description "It is quieter in here. There is some soft jazz playing. Some people are quietly chatting while drinking coffee, others are by themselves, reading papers or working on laptops. The door is to the southwest. There is a sign on the wall." 

instead of listening to the coffee shop, say "The music is calming."


The line is a barrier that is in the coffee shop. It has the printed name "a line of people waiting to order coffee". Understand "line" and "people" and "line of people" as the line. it has the description "[if the player does not carry the cup of coffee]You aren't the only one who wants coffee. There are several people waiting in line. If you want your coffee, you will have to WAIT until it is your turn.[end if][if the player is carrying the cup of coffee]You are glad you aren't in the line anymore and you already have your coffee.[end if]"

the sign is in the coffee shop. it is scenery. it has the description "Several coffee drinks are listed here, with their flavors, their price, and their sizes. You notice that all the sizes are large.".

a thug2 is a person in the coffee shop. He has the printed name "bearded man reading a newspaper". He has the description "He doesn't seem to really be reading the newspaper.". understand "man" and "bearded man" and "thug" and "nasty thug" and "nasty" as thug2.

the newspaper is scenery in the coffee shop. The description of the newspaper is "The headline reads Oceanic Flight 815 Survivors Found.".

The laptops are scenery in the coffee shop. Understand "laptop" as the laptops. The description of the laptops is "Some larger ones and one guy has a new one that you mostake for a stack of papers it is to thin.".

The papers are scenery in the coffee shop. The description of the papers is "It's paper, made from trees.".

[listed here because it only works here]
ordercoffee is an action out of world. understand "order coffee" and "get coffee" and "buy coffee" as ordercoffee. 

check ordercoffee:
if the line is blocking begin; 
say "You have to WAIT your turn. The line seems to be moving pretty fast though.";
stop;
end if;
if the player is carrying the cup of coffee begin; 
say "You already got your coffee.";
stop;
end if;


carry out ordercoffee:
now the player carries the cup of coffee;
say "You order your favorite coffee drink and after a few moments, a cheerful teenager gives you your drink. You pay and move on.";


the cup of coffee is a thing. instead of eating or drinking the cup of coffee, say "You take a sip of the coffee. Tasty.". the description of the cup of coffee is "A warm cup of coffee. It has a saying on the side.". the saying is part of the cup of coffee. The description of the saying is "The Way I See It:[line break]When in the dark, you are likely to be eaten by a grue.". understand "coffee" and "cup" and "cup of coffee" as the cup of coffee. instead of dropping the cup of coffee, say "You don't want to waste it.".


before going southwest from the coffee shop:
if the player is not carrying the cup of coffee begin;
say "You don't want to lose your place in line. This is your chance, you don't see any photographers around. [if the line is blocking]You should WAIT in line until it is your turn.[end if]";
stop;
end if;


instead of waiting in the coffee shop for the first time:
if the player is not carrying the cup of coffee begin;
say "The lines moves a little bit.";
end if;

instead of waiting in the coffee shop for the second time:
if the player is not carrying the cup of coffee begin;
say "You hear the man reading the newspaper say he doesn't see Mr. Owen. His voice carries some of the same spite that the man in the jacket had.";
end if;

instead of waiting in the coffee shop for the third time:
if the player is not carrying the cup of coffee begin;
say "You hear the man reading the newspaper say something about shoes, then get up and walk out.";
now thug2 is in the shoe shop;
change the printed name of thug2 to "bearded man from the coffee shop";
change the description of thug2 to "He tries to seem interested in the shoes, but he seems more interested in the other shoppers in the store.";
say "The person in front of you just ordered. You can now ORDER COFFEE.";
now the line is broken;
end if;

[things the player might try while waiting]
linewait is an action applying to nothing. understand "enter line" and "get in line" and "wait in line" and "stand in line" as linewait.

carry out linewait:
try waiting;

Chapter 5 - The Twist

[This is where the game takes a turn from one storyline to the next. The player can enter the shoe store before getting coffee, but it won't seem important at the time (I hope). I purposely make it look like the other two stores, even though the man in this one is very important. I make his description similar to the other two shoppers in the other two stores, but I change it later to reveal he is someone important.]

the camera crew is a thing. it has the description "A team of newscasters and camera operators are here, filming some event that had happened."

the photographers are scenery in null. They have the description "These are the ones you snuck past.";

after going southwest from the coffee shop:
if the player is holding the cup of coffee and the poor kid is not in null begin;
now the camera crew is in mall3;
say "You exit the coffee shop and you see the camera crew that you saw at a distance earlier. They are now in the area near the cultural display. You aren't sure what is going on, but there are many people around and you even spot some of the photographers you snuck past earlier. It seems like every where you go, someone is there who might spot you and all you wanted was to get a haircut in peace.";
now the photographers are in mall3;
now the poor kid is in the shoe shop;
end if;
continue the action;

instead of going a direction (called way) from mall3 while the camera crew is in mall3:
if way is up or south begin; 
say "You just know that if you try to go past the comotion someone will recogzine you. Everyone is looking around.";
else;
continue the action;
end if;

the shoe shop is southeast from mall3 and south from the shoedoor. It has the printed name "The Shoe". It has the description "A small shoe shop. Various men's and women's shoes line the walls and display racks. Behind the counter to the north is an employee door as well as the clerk. The exit is to the northwest."

clerkc is a person in the shoe shop. He has the printed name "clerk". Understand "clerk" as clerkc. He has the description "A well dressed teenage boy.". He is scenery.

The counter is a supporter in the shoe shop. It is scenery.

Mr Owen is a person. He is in the shoe shop. He has the printed name "a man browsing the shoes". The description of Mr Owen is "He is wearing a long dark coat, and has dark brown hair that isn't long. He is looking at various types of dress shoes.". understand "man" and "mr owen" and "owen" and "man browsing the shoes" and "man browsing" as Mr Owen.


the poor kid is a person. poor kid has the printed name "kid with tattered clothes". Understand "kid" and "kid with tattered clothes" as poor kid. poor kid has the description "Slightly dirty, clothes are tattered, and shoes that are far worse off then any you have seen in a long time."


The shoe display is a supporter in the shoe shop.

The pair of sneakers are shoes. Understand "sneakers" as the pair of sneakers. They are on the shoe display. The pair of boots are shoes. They are on the shoe display. understand "boots" as the pair of boots. The pair of cleats are shoes. They are on the shoe display. understand "cleats" as the pair of cleats. The pair of sandals are shoes. They are on the shoe display. Understand "sandals" as the pair of sandals.

[The poor kid's shoes]
The pair of running shoes are shoes. Understand "running" and "running shoes" as the pair of running shoes. The poor kid carries the running shoes.


[after going southeast from mall3:]
every turn:
if the player is in the shoe shop and the player was not in the shoe shop and the poor kid is in the shoe shop begin;
[if the poor kid is in the shoe shop begin;]
say "You see a kid with slightly tattered clothing trying to buy a [list of things carried by poor kid].
You hear the shop attendant say the kid doesn't have quite enough money.
You see the kid look dejected and set down the [list of things carried by poor kid] on the counter and walk outside of the shop, saying something about not being able to join the school track team.";
now a random shoes carried by the poor kid is on the counter in the shoe shop;
now the poor kid is in mall3;
end if;
[continue the action;]

instead of buying owned shoes:
now the noun is owned;
say "You pay for [the noun][if the player does not carry the noun] and pick them up[end if].";
if the player does not carry the noun, now the player carries the noun;
now the noun is sold;


before going northwest from the shoe shop:
if the player carries owned shoes begin; 
say "You should pay for the shoes before leaving.";
stop;
end if;

procedural rule for giving something to the poor kid:
if the noun is the pair of running shoes, ignore block giving rule;
if the noun is cash, ignore block giving rule;

before giving something(called thingy) to the poor kid:
if the thingy is the cash or the running shoes begin;
continue the action;
else;
say "You know that is not what the kid needs.";
stop;
end if;


after giving the cash to the poor kid:
say "The kid looks at you with eyes filled with thanks and goes into the store and buys the shoes he wanted. After coming back out the kids looks at you. With eyes brimming up with joyful tears and unable to say anything, the kid hands you the change from buying the shoes and runs off.[paragraph break]";
Now the player carries the cash;
remove the running shoes from play;
now the poor kid is in null;
now mr owen is in mall3;
change the printed name of mr owen to "Mr Owen";
say "You see the man you saw browsing in the shoe store walk out, still talking on a cell phone. The man in the jacket sees him and has a visible reaction. The shopping man puts away his phone and as he does so, you catch a glimpse of a badge that you think says FBI. He walks right up to you and shakes your hand.[paragraph break][']I saw what you did. I've seen so many bad guys lately it is sure nice to see a good guy. I'm Harvey Owen. Do I know you?['][paragraph break]Before you can reply, the bearded man you've seen walks out of the shoe store and walks over to the man in the jacket and starts talking to him, Owen glances to see him and suddenly stiffens. [paragraph break][']I knew I recognized him. I have to get out of here! I can't believe I didn't recognize him sooner. Speaking of, I do know you, but I barely recognized you wearing that [list of things worn by the player]. Trying to avoid the press, eh? Come on, I know a way out of here![']";
now thug2 is in mall3;
let the way be the best route from the location of Mr Owen to the shoe shop, using doors; 
        try Mr Owen going the way;

after giving shoes to the poor kid:
say "The kid looks at you with eyes filled with thanks and puts on the new shoes. Eyes brimming up with joyful tears and unable to say anything, the kid runs off.[paragraph break]";
now the poor kid is in null;
now mr owen is in mall3;
change the printed name of mr owen to "Mr Owen";
say "You see the man you saw browsing in the shoe store walk out, still talking on a cell phone. The man in the jacket sees him and has a visible reaction. The shopping man puts away his phone and as he does so, you catch a glimpse of a badge that you think says FBI. He walks right up to you and shakes your hand.[paragraph break][']I saw what you did. I've seen so many bad guys lately it is sure nice to see a good guy. I'm Harvey Owen. Do I know you?['][paragraph break]Before you can reply, the bearded man you've seen walks out of the shoe store and walks over to the man in the jacket and starts talking to him. Owen glances to see him and suddenly stiffens. [paragraph break][']I knew I recognized him. I have to get out of here! I can't believe I didn't recognize him sooner. Speaking of, I do know you, but I barely recognized you wearing that [list of things worn by the player]. Trying to avoid the press, eh? Come on, I know a way out of here![']";
now thug2 is in mall3;
let the way be the best route from the location of Mr Owen to the shoe shop, using doors; 
        try Mr Owen going the way;


instead of opening the shoedoor:
if the location of the player is the shoe shop begin;
say "The store clerk says that you can't come behind the counter.";
otherwise;
continue the action;
end if;

Chapter 6 - Exiting the mall, the final battle!!!!!!

[The final section. This will hopefully be several smaller puzzles that link to one big puzzle. The linear-ness breaks here and allows the player more freedom]

[using a scene]
escape is a scene. escape begins when the printed name of mr owen is "Mr Owen".

the construction zone is a region. 

The passage is in the construction zone. escape1 is in the construction zone.

Every turn: 
    if the location of the player is in the construction zone begin;
    if the location of mr owen is not the location of the player 
    begin; 
        let the way be the best route from the location of mr owen to the location of the player, using doors; 
        try mr owen going the way;
end if;
end if;

after going southeast from mall3:
if escape is happening
	begin;
Say "Mr Owen pulls out his FBI badge and says [']FBI, we need to go through that door, please.['][paragraph break]The store clerks looks surprised, looks at the badge, then lets you both through the door.";
Now the shoedoor is open;
let the way be the best route from the location of Mr Owen to the passage, using doors; 
        try Mr Owen going the way;
end if;
continue the action;

instead of closing the shoedoor:
if escape is happening
	begin;
	say "You had best go through it while you have the chance.";
	stop;
	end if;
continue the action;

after going north from the shoe shop:
if the player is carrying owned shoes begin;
say "Not having time to pay for them, you drop the shoes you haven't payed for in the show store.[paragraph break]";
now all owned shoes carried by the player are in the shoe shop;
end if;
say "The clerk closes the door behind you.";
now the shoedoor is closed;
change the description of mr owen to "He is wearing a long dark coat, and has dark brown hair that isn't long. He is constantly checking the surroundings.";
continue the action;


escape1 is east of the passage. It has the printed name "Scattered scaffolding and debris". It has the description "Some scaffolds are standing around as well as debris created by the construction. You can go north.". the debrisa is scenery in escape1. Understand "debris" as debrisa. It has the printed name "debris".


The scaffold is a barrier in escape1. It is broken. It is scenery. understand "scaffolding" and "scaffolds" as the scaffold. It has the description "Scaffolding complete with paint (in cans and spilled), tools, and a lone lunch box.".
instead of pushing or pulling the scaffold:
now the scaffold is blocking;
say "You and Owen manage to push over the scaffolding, blocking the passageway.[paragraph break]As the scaffold crashes down, the two men who are after Mr Owen cut through the plastic and run into the passage, shouting [']There is Owen, get him alive!['][paragraph break]Mr Owen says [']Let's get outta here before they crawl through![']"

instead of going west from escape1:
if the scaffold is blocking begin; 
say "The scaffold is in your way."; 
otherwise; 
continue the action; 
end if;

The paint is scenery in escape1. It has the description "Cans of paint. You like the color.".

escape2 is a room. it is north of escape1. it is in the construction zone. It has the printed name "Large Section of the Construction Area". It has the description "This area is large and unfinished. There are scattered debris and tools laying all around.". the debris are scenery in escape2.

[The game ends with a scene of the player running. It uses 1 room, but every turn the description changes as well as items appearing to interact with.]

[end game barriers - in a special room]
null is a room.

the barrel is a barrier. it is in null. the ladder is a barrier. it is in null. the workbench is a barrier. it is in null. the cart is a barrier. it is in null.
the crate is a barrier. it is in null. 

[end game 'weapons' - also in null room] 
a weapon is a kind of thing. [so I can call random weapons, not things, from null]
the wrench is a weapon in null. the paint can is a weapon in null. the pipe is a weapon in null. the brick is a weapon in null. the pail is a weapon in null. the drill is a weapon in null.

before taking a weapon:
if the player is holding at least two weapons begin;
say "Your hands are full at the moment.";
stop;
else;
continue the action;
end if;

[now the crazy coding bit to make this all work]
Every turn:
        if the player is in escape1 and the player was not in escape1,
say "Mr Owen says [']We need to block the way and head out of here![']". 

before going north from escape1:
if the scaffold is not blocking begin; 
say "You should try to block the passage before you go.";
stop;
otherwise;
continue the action;
end if;

table of running
event
"As you run towards the exit, the thugs are close behind."
"You keep running."
"You almost trip on some wires, but manage to keep running."
"You keep running."
"Mr. Owen pushes a tool box into the way of the thugs."
"You keep running."
"Mr Owen is calling on his phone for backup to meet him at the mall."
"You keep running."
"The thugs try throwing something at you but miss."
"You keep running."
"Mr Owen keeps running along side you. [']Exciting day, no?[']"
"You keep running."
"Mr Owen says someone was nearby already and will be there when you get to the exit."
"You keep running."
"The thugs say some colorful words."
"You keep running."
"You are getting your workout for today."
"You keep running."
"The thugs are not giving up."

announcing is an action applying to nothing;

annum is a number that varies. The annum is 1.

carry out announcing:
choose row annum in the table of running;
say "[event entry][paragraph break]";
increase annum by 1;
if annum is 20, decrease annum by 2;

breakthrough is an action applying to nothing;


instead of going a direction from escape2, say "You are already running towards the exit."; 


every turn:
if the location of the player is escape2 begin;
if the player was not in escape2 begin; 
say "The thugs have crawled through the scaffolding and are giving chase! Mr Owen says [']Try and stop them, I'm calling for backup![']";
now thug1 is in escape2;
now thug2 is in escape2;
change the printed name of thug1 to "Mean thug";
change the printed name of thug2 to "Nasty thug";
remove the scaffold from play;
now a random barrier in null is in escape2;
now a random weapon in null is in escape2;
now all barriers in null are broken;
end if;
if the number of blocking barriers in the construction zone is greater than 3 begin;
say "[description of ending1]";
end the game in victory;
stop;
end if;
if thug1 is KO begin;
if thug2 is KO begin;
say "[description of ending2]";
end the game in victory;
stop;
end if;
end if;
if the player was in escape2, now all weapons in escape2 are in null;
if the player was in escape2, now all barriers in escape2 are in null;
if the number of barriers in escape2 is less than one and a random chance of 1 in 3 succeeds and the number of barriers in null is greater than zero, now a random barrier in null is in escape2;
if the number of weapons in escape2 is less than one and a random chance of 1 in 3 succeeds and the number of weapons in null is greater than zero, now a random weapon in null is in escape2;
if the number of weapons in escape2 is less than one and the number of barriers in escape2 is less than one and the number of weapons in null is greater than zero, now a random weapon in null is in escape2; [so there is always something]
try announcing;
say "You see a [list of things in escape2].[paragraph break]";
if a random chance of 1 in 4 succeeds and the number of barriers in escape1 is greater than zero begin;
now a random blocking barrier in escape1 is in null;
say "[paragraph break]The thugs quickly move the [list of blocking barriers in null] out of the way and gain ground.";
now all barriers in null are broken;
end if;
end if;

instead of pushing or pulling a barrier in escape2:
[say "You put [the noun] in the way of the thugs.";]
say "[the desc corresponding to a item of the noun in the table of block actions]"; [it worked! I didn't think this line would work!]
now the noun is blocking;
now the noun is in escape1;



instead of throwing something at someone in escape2:
if the second noun is mr owen begin;
say "Try aiming for the bad guys.";
stop;
end if;
if a random chance of 1 in 2 succeeds begin;
say "You throw [the noun] and hits [the second noun].[if the noun is the teddy bear]The teddy bear laughs a cute little laugh when it hits [the second noun] in the face.[end if][if the noun is the coffee]You regret throwing the coffee because you weren't done with it and it was very tasty. The [second noun] didn't seem to like getting burned though.[end if]";
if the second noun is wounded, now the second noun is KO;
if the second noun is healthy, now the second noun is wounded;
if the second noun is KO, now the second noun is in null;
if the second noun is KO, say "[The second noun] falls down.";
now the noun is in null;
else;
now the noun is in null;
say "You throw [the noun] but the [second noun] [one of]ducks[or]dodges[or]blocks it[at random]. The thug [one of]calls curses upon you[or]shouts obscenity at you[or]threatens you[at random]. [if the noun is the teddy bear]The teddy bear laughs a cute little laugh when it hits the ground.[end if][if the noun is the coffee]You regret throwing the coffee, it was tasty and it didn't even do any good.[end if]";
end if;

[did this to not have the text from the ending cluttering up the every turn rule]
ending 1 is a thing. The description of ending1 is "You manage to put enough stuff in front of the thugs to get a good lead on them. You make it out of the mall. There is an SUV waiting for the two of you with some of Mr. Owen's FBI friends inside. When the thugs get out of the mall, they are greeted with a few gun barrels pointed in their direction, and they are arrested. Mr. Owen thanks you for your help and appologizes for letting you get mixed up in all the excitement. They manage to cover up what happened pretty well so you don't end up getting bothered by the press. You make it home without trouble and take a nap."

ending2 is a thing. The description of ending2 is "You manage to knock out the thugs, making the rest of the trip out of the mall easy. There is an SUV waiting for the two of you with some of Mr. Owen's FBI friends inside. Several of them go into the mall and bring the thugs out and cuff them and haul them away. Mr. Owen thanks you for your help and appologizes for letting you get mixed up in all the excitement. They manage to cover up what happened pretty well so you don't end up getting bothered by the press. You make it home without trouble and take a nap."

table of block actions
item		desc
workbench	"You [one of]shove[or]slide[or]tip[at random] the workbench to block the thugs. [one of]Tools fly[or]Swearing fouls the air[at random] when the workbench [one of]blocks a thug[or]trips a thug[or]slows a thug down[at random].[paragraph break]"
crate		"The crate [one of]cracks[or]splinters[at random] when a thug [one of]bangs his knee on it[or]scrambles over it[or]falls onto it[at random].[paragraph break]"
barrel		"You [one of]roll[or]shove[or]slide[or]push[at random] the barrel into the way of the thugs.[paragraph break]"
ladder		"The ladder [one of]falls[or]tips over[or]trips up the thugs[at random] when you move the ladder.[paragraph break]"
cart		"You [one of]roll[or]push[or]tip over[at random] the cart and a thug [one of]have to climb over it[or]scramble over some debris to get around it[or]gets hit by it and swears with more colors than a crayon box[at random].[paragraph break]"

[in case someone tries to interact with 'thugs' and not an invdividual thug]
the thugs are scenery in escape2. They have the description "Mean and nasty.".

Before throwing something(called the object) at the thugs: 
say "Try throwing that at a specific thug.";
stop;

Section X - The Publishing and release data

The story title is "Limelight".
The story author is "Justin Lowmaster".
The story headline is "A story of escape".
The story genre is "Fiction".
The Release number is 1.
The story description is "When you become famous, life chages, and doing ordinary tasks becomes a game of hide and seek with intrusive photographers. You find yourself in a public place full of photographers and must find a way out."
The story creation year is 2008.

Release along with the introductory booklet. 
Release along with the source text.

Section 1 - Thinking out loud - Not for release


[Finding Mr. Owen: He could bump into the player. The player MUST know he is in danger. ]

[Ways to help Mr Owen: ]

[other ideas: help a kid find parents. catch shoplifter. help a homeless guy. help someone buy shoes who can't quite afford them. AH HA!!! Ok, so make sure player knows Mr. Owen is in grave danger. Guide the player to the shoe store. Onve player helps person buy shoes, Mr. Owen introduces himself. The player can then warn Mr Owen. Man outside coffee shop could drop something that indicates danger for Mr. Owen. We could indicate Owen is good by revealing a badge. Ah, can hide in some plants when a photographer comes from the coffee shop, then overhear thug1 talking about Mr. Owen. Back door from shoe store could lead to a hallway like before. Hallway goes all the way to another hall section. When meeting in Shoe Store, Owen could mention dealing with some kind of bad guys a lot and nice to see a good person. 

After the start of the helping of Mr. Owen escape, I want to provide at minimum two ways out of each situation, at most five. If possible, I would like the player to have multiple obsticles at one time and can choose which to tackle first. 

Up to this point, the game is very linear. I want to break that after the twist.

Thinking out load again: The final puzzle. 
I've got 6 rooms, all under construction. I've got a bad guy (who currently has a machine gun.) who the player must help Mr Owen get past. Perhaps Owen gets wounded. In any case I need an active obsitacal the player must find a way past. The area of the mall should otherwise be easilly exitable so unless I have something realistically blocking them, the game wil lbe stupid. 

Maybe have the player repair a vehiicle by finding a few parts, not car parts, but something to fix the obvious broken part. 

What about an earthquake? Seems over the top and a little random to put in all of a sudden. 

What about 2 bad guys? I need a reason why Owen can't shoot them or call for help. Or, maybe he gets hurt, and does call for help, but help will take a while and we gotta take out the bad guy or find a way out. Hmm... the machine gun get gets a shot off but so does Owen. They both get wounded. Owen takes cover, but the machine gun guy does too. Player has to barricade the way back, because machine gun man calls the two bad dudes back in the mall. Once does, the player needs to find a way to get Owen out, or maybe help him while he is hurt. What if he is bleeding and we got to get him out, so we gotta find a way to get past the machine gun guy, since help wont get there soon enough.
]


Section 2 - Debug and Admin commands - Not for release

obliterate is an action applying to one thing. understand "obliterate [something]" as obliterate.

carry out obliterate:
remove the noun from play;
say "You point your finger and [the noun] explodes into tiny dust particles that vanish.";
if the noun is a barrier, now the noun is broken;
if the noun is a door, now the noun is open;

esc is an action applying to nothing. understand "esc" as esc.

Carry out esc:
Change the printed name of mr owen to "Mr Owen";
now Mr Owen is in the passage;
now the player is in the passage;
try going east;
try pushing the scaffold;
try going north;

poking is an action applying to one thing. understand "poke [someone]" as poking.

carry out poking:
if the noun is dead, say "Dead horse";
if the noun is KO, now the noun is dead;
if the noun is wounded, now the noun is KO;
if the noun is healthy, now the noun is wounded;

gonull is an action applying to nothing. understand "gonull" as gonull. carry out gonull: Now the player is in null.


