Hi,
I have a room with 10 Miners. I want a way to examine them with one command and get a list of each miners description.
"Mining"
A Miner is a kind of person. A Miner is either on break, on his way to work or working. A Miner is usually working.
A Mine is a kind of room.
Mining Section A is a Mine. "A gold mine."
There are 10 Miners in Mining Section A.
Instead of examining someone:
if person is a Miner (called worker):
if worker is on break:
say "[one of]He looks at you like you don't belong here[or]He's eating a brownish looking nutrient paste[or]Behind all the dirt there appears to be a face[at random].";
otherwise if worker is working:
say "He's doing what he is supposed to do: he mines!";
otherwise:
say "He's on his way back to work.";
When play begins:
repeat with R running through rooms:
repeat with M running through each person in R:
if M is a Miner:
if a random chance of 1 in 2 succeeds and M is working:
now M is on break;
Understand "examine [things]" as examining.
[
Carry out looking at a group:
repeat with P running through each person in noun:
try examining P;
Understand "look at [things]" as looking at a group;
]
TEST ME with "examine miners"
But this version seems to pick one miner, looking up his state and then prints either 10 descriptions for a working miner or 10 descriptions for a miner who is on his break. Like this:
>[1] examine miners
Miner: He's doing what he is supposed to do: he mines!
Miner: He's doing what he is supposed to do: he mines!
Miner: He's doing what he is supposed to do: he mines!
Miner: He's doing what he is supposed to do: he mines!
Miner: He's doing what he is supposed to do: he mines!
Miner: He's doing what he is supposed to do: he mines!
Miner: He's doing what he is supposed to do: he mines!
Miner: He's doing what he is supposed to do: he mines!
Miner: He's doing what he is supposed to do: he mines!
Miner: He's doing what he is supposed to do: he mines!
>[1] examine miners
Miner: He's eating a brownish looking nutrient paste.
Miner: Behind all the dirt there appears to be a face.
Miner: He's eating a brownish looking nutrient paste.
Miner: Behind all the dirt there appears to be a face.
Miner: He looks at you like you don't belong here.
Miner: Behind all the dirt there appears to be a face.
Miner: He looks at you like you don't belong here.
Miner: Behind all the dirt there appears to be a face.
Miner: He looks at you like you don't belong here.
Miner: He's eating a brownish looking nutrient paste.
The expected result would be to see some descriptions of a working miner and some of a miner on his break. I tested the random assignment and it is working correctly.
I tried a few other approaches (one example left in a comment block) but all result in even more of a mess.