Just a little update, some housekeeping, and another quick couple of question:
I’ve implemented this solution in its entirety now and everything works wonderfully. I can’t thank you enough for all the effort you’ve put in.
As I was going through and comparing line by line the code I already had against yours, I realised that at some point I made the change from this:
Before printing the name of a Poké Ball while asking which do you mean: say "[name of the pokémon within] ".
Before printing the name of a Poké Ball while taking inventory: say "[name of the pokémon within] ".
to this:
Before printing the name of a pokéball carried by the player: say "[possessive of the pokémon within] ".
Before printing the name of a pokéball (called ball) while asking which do you mean:
if the ball is carried by the player, say "";
otherwise say "[possessive of the pokémon within] ";
This is because I discovered that the way I first had it caused the following output when performing an action on one of multiple pokeballs that the player is carrying:
Which do you mean, the Squirtle’s Squirtle’s pokéball, the Charmander’s Charmander’s pokéball or the Bulbasaur’s Bulbasaur’s pokéball?
Obviously not ideal. The change I’ve made seems to have solved the issue just fine.
Finally, the questions: I’m not a big fan of each ball being described as the Bulbasaur's pokéball
. Rather any ball that contains a Pokemon should drop the the
. I figure I could achieve this by making pokeballs proper-named, but then an empty pokeball appears as pokéball
instead of the pokéball
. Thinking I had a handle on it, I did this:
To decide if (ball - a pokéball) is proper-named:
if the ball contains a thing, decide yes;
decide no;
Unfortunately, this didn’t appear to work. Obviously I’m doing something wrong here, I’m just not sure what.
Also, I’ve noticed that empty pokeballs have a double space before their name:
You are carrying:
a pokéball (closed)
a Bulbasaur's pokéball (closed)
a Charmander's pokéball (closed)
a Squirtle's pokéball (closed)
This is obviously comeing from the Before printing...
lines. Should I just expand those out to have a condition inside each of them:
if the occupant of the ball is not nothing:
Or is there a cleaner way of doing that?