Your actual problem with the “EPM” is the way Inform builds assemblages (in fact, I’d say that’s the source of most of your difficulties in this thread): when you say that every man has a left hand, and then create a man named “EPM”, then Inform automatically creates a left hand named “EPM’s left hand” and makes it a part of EPM.
In fact, the Inform 7 parser doesn’t really understand the “s” genitive! The only reason you can refer to, say, “Joe’s left hand” is that the name of that object literally includes the word “Joe’s”, apostrophe and all. In fact, out of the box, the Inform in-game parser doesn’t really understand the “of” genitive either (even though the compiler does), although it’s possible to fix that with a rule like:
Understand "of [something related by reversed incorporation]" as a body part.
We can do something similar for the “s” genitive, although that takes a bit more work since the Inform parser doesn’t normally recognize apostrophes as word delimiters, so we have to get rid of them. Fortunately, there’s a built-in extension that can do that:
Include Punctuation Removal by Emily Short.
After reading a command: remove apostrophes.
Understand "[something related by reversed incorporation] s" as a body part.
You might also want to tell Inform to understand certain words as describing kinds of people (which Inform doesn’t do by default), so that a command like, say, “examine dog’s nose” will work:
Understand "man" as a man. Understand "woman" as a woman.
Understand "human" as a human. Understand "dog" as a dog.
If you add all that code to the example I posted above, the command “examine dog’s nose” should now print “You see nothing special about Fido’s nose.”
Anyway, back to your Eye Patch Man, I think the easiest solution to the “eye” problem would be simply to change his name to “Eye-Patch Man” with a hyphen. This will cause all his body parts to be given hyphenated names too, so that “Eye-Patch Man’s left foot” won’t match the word “eye”. You can then tell the parser that the player is allowed to drop the hyphen with a statement like:
Understand "eyepatch" or "eye patch" as Eye-Patch Man.
If you use the “s” genitive parsing trick I showed above, that will then let this understanding rule apply to the eye-patch man’s body parts too.
Also, I think I figured out a simpler way to handle missing body parts – just move them off-stage at the beginning of the game with a rule like:
When play begins: remove the Hook Hand Man's right hand from play.
or more generally with:
A body part can be missing. Hook Hand Man's right hand is missing.
When play begins: now all missing body parts are off-stage.
Anyway, here’s some almost complete test code demonstrating these things that you can append to the example code (“Lefty”) in my previous post:
A body part can be missing.
When play begins: now all missing body parts are off-stage.
Understand "human" as a human. Understand "dog" as a dog.
Understand "man" as a man. Understand "woman" as a woman.
Understand "of [something related by reversed incorporation]" as a body part.
Include Punctuation Removal by Emily Short.
After reading a command: remove apostrophes.
Understand "[something related by reversed incorporation] s" as a body part.
Eye-Patch Man is a man in the Testing Chamber.
Understand "eyepatch" or "eye patch" as Eye-Patch Man.
Eye-Patch Man's eyes are missing.
A body part called Eye-Patch Man's right eye is part of the Eye-Patch Man.
Understand "eyes" as Eye-Patch Man's right eye.
Understand "left eye", "right eye" or "eye" as eyes.
Test eyes with "x eye / x eye patch / x man's nose / eye patch / x dog's nose / x left eye / x right eye / x eyes / eye patch man's".
(Ps. Matt w posted his message above while I was writing this, so there’s some duplication. I didn’t feel like revising this post further, so I just posted it as I was originally going to. Anyway, it might be useful to compare our approaches.)