Allowing "ask Josh to look at himself" to be parsed as "Josh, look at yourself"

The example “Northstar” allows commands such as ASK JOSH TO TAKE INVENTORY to be reparsed as JOSH, TAKE INVENTORY. But what I’d also like is for commands such as ASK JOSH TO LOOK AT HIMSELF to be understood as JOSH, LOOK AT YOURSELF.

I already have this line:

Understand "you" and "yourself" as a thing when the item described is the person asked and the item described is not the player.

I’ve added this, and it appears to work:

Understand "himself" as a thing when the item described is the person asked and the item described is not the player and the item described is male.

Is this the best way to go about this?

Also, I didn’t like how the standard response to an NPC examining themselves is “Josh looks closely at Josh”, or how the response to an NPC examining the PC is “Josh looks closely at yourself”, so I changed the “report other people examining rule” to this:

Report an actor examining (this is the new report other people examining rule):
	if the actor is not the player:
		if the noun is the actor:
			say "[The actor] [look] closely at [themselves].";
		otherwise:
			if the noun is the player:
				say "[The actor] [look] closely at [us].";
			otherwise:
				say "[The actor] [look] closely at [the noun]."

The new report other people examining rule is listed instead of the report other people examining rule in the report examining rules.

That’s how I’d do it, yeah! You could do a hacky I6 solution but I think handling this in pure I7 is much cleaner.

1 Like

Thanks! What would be the hacky I6 solution, out of curiosity?

There’s special I6 code to handle pronouns, and you could extend that to treat reflexives (“himself”) etc as pronouns that always refer back to the actor, and make sure non-reflexive pronouns in such commands can’t refer to the actor, so that ASK JOSH TO LOOK AT HIM has to look at a non-Josh man. But that’s a lot of work for very little gain.