I’ve run into another handled/scoring issue (sorry to keep pestering you, @matt_weiner!).
My old code gave points when the player picked up a battery for the first time (and there are four batteries in the game):
A battery is a kind of thing. The description of a battery is "A standard D-cell battery."
[ initial battery locations ]
There is a battery in room1.
There is a battery in room2.
There is a battery in room3.
There is a battery in room4.
[ score a point when finding a battery ]
After taking a battery when the battery is not handled:
increase the score by 1;
continue the action;
Per my original post (and Matt’s solution), I had to switch to “was not handled”:
After taking a battery when a battery was not handled:
But I also had to switch to “when a battery” instead of “when the battery” otherwise I’d get a compile error (In ‘After taking a battery when the battery was not handled’, I’m not able to understand what specific thing is meant by the phrase ‘the battery’. You use the definite article ‘the’, which suggests you have a particular thing in mind, but then you go on to refer to a kind rather than something definite.).
Anyway, my point here (heh, no pun intended) is that now the player only gets a point when they pick up a battery (any battery) the first time. After that, none of the other three batteries grant points. As this used to work, I’m guessing I’m doing something incorrectly when it comes to multiple instances of an object/kind.
I can replicate the problem with this test code:
Use scoring.
The Void is a room.
A battery is a kind of thing. The description of a battery is "A standard D-cell battery."
After taking a battery when a battery was not handled:
increase the score by 1;
continue the action;
There is a battery in The Void.
There is a battery in The Void.
There is a battery in The Void.
There is a battery in The Void.
[ I've also tried: 'There are four batteries in The Void.' - doesn't seem to matter]
If I take all the batteries at once, it works:
>take batteries
battery: Taken.
battery: Taken.
battery: Taken.
battery: Taken.
[Your score has just gone up by four points.]
But if I take them individually:
>take battery
Taken.
[Your score has just gone up by one point.]
>take battery
Taken.
So I only get a point for the first battery taken. So I’m not sure what’s going on with the handled property for the individual batteries.