Hello,
I have already asked a few things about this in another thread, but I think this question should stand alone in a new topic. So here it is:
Although I can use the term “the map region of the location” to print the region the player is currently at (just like “location” can be used to print the location of the player), it doesn’t seem to work when I put it in an if clause (while “location” does).
Specifically, in the following code,
if an other alive person (called victim) is in the map region of the location:
doesn’t work as expected (or at least as “location” would).
I would appreciate if someone helped me clarify why this is happening.
Many thanks,
G.
[code]A thing can be lethal. A thing is usually not lethal.
A person can be alive or dead. A person is usually alive.
Definition: a thing is other if it is not the player.
After going to a room:
say “This is part of [the map region of the location].”;
continue the action.
The Bedroom is a room. The Bathroom is south of the Bedroom.
The Bates Motel is a region. The Bedroom and the Bathroom are in the Bates Motel.
The parking lot is west of the Bedroom. The shop is west of the parking lot.
Exteriors is a region. The shop and the parking lot are in the exteriors.
Janet is a woman in the bathroom. The description is “Young and likeable. You remember that she eats like a bird.”
Alfred is a man in the parking lot. The description is “He is the director.”
After examining a person, say “[The noun] is [if the noun is alive]currently enjoying life[else]dead[end if].”
The kitchen knife is carried by the player. It is a lethal thing. The description of the kitchen knife is “Sharp and stainless.”
The toothpaste is in the bathroom. The description is “Fluoride can kill you.”
Wielding is an action applying to one carried thing. Understand “wield [something]” as wielding.
Carry out wielding:
say “You wield [the noun] without much effect. No wonder. [The noun] is not a weapon of any kind.”
Instead of wielding a lethal thing:
if an other alive person (called victim) is in the map region of the location:
say “You ruthlessly attack [the victim].”;
move the player to the location of the victim;
now the victim is dead;
else:
say “You are alone. Whom are you going to fight with?”
[/code]
In order to make things work, I used “a region that varies” and an “every turn rule.” I don’t know if this is the only workaround. So, here it goes:
[code]A thing can be lethal. A thing is usually not lethal.
A person can be alive or dead. A person is usually alive.
Definition: a thing is other if it is not the player.
The current area is a region that varies.
Every turn:
now the current area is the map region of the location.
The Bedroom is a room. The Bathroom is south of the Bedroom.
The Bates Motel is a region. The Bedroom and the Bathroom are in the Bates Motel.
The Parking Lot is west of the Bedroom. The Shop is west of the parking lot.
Exteriors is a region. The shop and the parking lot are in the exteriors.
Janet is a woman in the bathroom. The description is “Young and likeable. You remember that she eats like a bird.”
Alfred is a man in the parking lot. The description is “He is the director.”
After examining a person, say “[The noun] is [if the noun is alive]currently enjoying life[else]dead[end if].”
The kitchen knife is carried by the player. It is a lethal thing. The description of the kitchen knife is “Sharp and stainless.”
The toothpaste is in the bathroom. The description is “Fluoride can kill you.”
Wielding is an action applying to one carried thing. Understand “wield [something]” as wielding.
Carry out wielding:
say “You wield [the noun] without much effect. No wonder. [The noun] is not a weapon of any kind.”
Instead of wielding a lethal thing (called the murder weapon):
if an other alive person (called victim) is in the current area:
if the player is not in the location of the victim:
say "You charge into [the location of the victim]. ";
say “You ruthlessly attack and kill [the victim] with [the murder weapon].”;
move the player to the location of the victim;
now the victim is dead;
else:
say “You are alone. Whom are you going to fight with?”[/code]