Check rule not working (or: "Mirror, Mirror")

I don’t know where I went wrong with this code. Player should be able to check how he’s dressed in the mirror.

[code]A mirror is a fixed in place thing in bedroom.

The description of the mirror is “It shows a full-length image.”

Looking into is an action applying to one visible thing.

Understand “look into [something]” as looking into.

Looking in is an action applying to one visible thing.

Understand “look in [something]” as looking in.

Instead of looking into the mirror:
if player does not wear clothes:
say “You look kinda bony, standing there in just your underwear. What is that pattern, anyway? Little red hearts?”;
otherwise:
if player does not wear jacket:
say “You’re not fully dressed.”;
otherwise:
if player does not wear shirt:
say “You’re not fully dressed.”;
otherwise:
if player does not wear the pair of pants:
say “You’re not fully dressed.”;
otherwise:
if player does not wear socks:
say “You’re not fully dressed.”;
otherwise:
if player does not wear shoes:
say “You’re not fully dressed.”

Instead of looking in the mirror:
if player does not wear clothes:
say “You look kinda bony, standing there in just your underwear. What is that pattern, anyway? Little red hearts?”;
otherwise:
if player does not wear jacket:
say “You’re not fully dressed.”;
otherwise:
if player does not wear shirt:
say “You’re not fully dressed.”;
otherwise:
if player does not wear the pair of pants:
say “You’re not fully dressed.”;
otherwise:
if player does not wear socks:
say “You’re not fully dressed.”;
otherwise:
if player does not wear shoes:
say “You’re not fully dressed.”[/code]

Transcript:

Bedroom (on the bed)
Your bedroom is stark, but otherwise not elegant. That’ll change someday. You can go east to the closet, southeast to the lavatory, southwest to the kitchen, or north to Union Street.

You can see a mirror, a small stand (on which are a trophy and a clock), a bedstand (in which is a drawer (closed)) and a leather case (closed) here.

get up
You get off the bed.

Bedroom
Your bedroom is stark, but otherwise not elegant. That’ll change someday. You can go east to the closet, southeast to the lavatory, southwest to the kitchen, or north to Union Street.

You can see a mirror, a bed, a small stand (on which are a trophy and a clock), a bedstand (in which is a drawer (closed)) and a leather case (closed) here.

Hellhounds on your tail, so …

look in mirror
You find nothing of interest.

[code]Lab is a room.

A mirror is in Lab.

test me with “actions/look in mirror”[/code]

produces:

[code]Lab
You can see a mirror here.

test me
(Testing.)

[1] actions
Actions listing on.

[2] look in mirror
[searching the mirror]
You find nothing of interest.
[searching the mirror - failed the can’t search unless container or supporter rule][/code]

Look in [something] and look into [something] is already defined as the searching action.

"look/l inside/in/into/through [something]"

Try this.

Instead of searching the mirror:

OK, I will. Thanks.

Also, looking at your code, the three different outcomes of looking into the mirror would be “You look kinda bony[…]”, “You’re not fully dressed.”, and “” (i.e. nothing happens, but action fails). This would do what you want:

The player wears a jacket, a shirt, a pair of pants, some socks, and some shoes.
The bedroom is a room. 
The mirror is a fixed in place thing in bedroom.

The description of the mirror is "It shows a full-length image."

A person has a list of things called ensemble.
When play begins, add the list of things worn by the player to the ensemble of the player.

Definition: a person (called subject) is fully dressed:
	repeat with article running through ensemble of the subject:
		if the subject does not wear the article, decide no;
	yes.

Instead of searching the mirror when the player does not wear anything, say "You look kinda bony, standing there in just your underwear. What is that pattern, anyway? Little red hearts?"
Instead of searching the mirror when the player is not fully dressed, say "You're not fully dressed."
Instead of searching the mirror, say "You see an image of yourself, fully dressed."
1 Like