Unable To Get Proper Response When Typing Understood Names

I mostly have this under control except for this one bug which is driving me nuts. The basic scenario here is that the player is hiding from a pursuer and must remain hidden for a certain period of time (until the pursuers give up). Nothing happens unless the player observes the situation (namely keeping an eye on the pursuers, unless the player tries to move which results in their arrest). Here is a run that works perfectly.

[code]>look balak patrol

From your cover behind the crates you watch the Balak Patrol harass the patrons of the east quarter as to your where-abouts.

watch patrol

The Balak Patrol is searching the eateries and salons of the east quarter in an effort to find your trail.

observe balak patrol

In a state of agitation the Balak Patrol leaves the area to look for you somewhere other than the East Market.

East Shyn Market

You are in the east quarter of Shyn Market in the town of Ciplak.
[/code]

Here is the bug that is getting me. In this next run I will assume the player only types Balak and I get this.

[code]>watch balak
What do you want to watch?

balak

From your cover behind the crates you watch the Balak Patrol harass the patrons of the east quarter as to your where-abouts.

observe balak
I didn’t understand that sentence.

watch patrol

The Balak Patrol is searching the eateries and salons of the east quarter in an effort to find your trail.

observe patrol

In a state of agitation the Balak Patrol leaves the area to look for you somewhere other than the East Market.

East Shyn Market

You are in the east quarter of Shyn Market in the town of Ciplak.
[/code]

I cannot find the problem with just using Balak. Here are some of the things I have tried.

[code]Balak is a kind of adversary. Balak is an enemy. Balak is undescribed.

Instead of watching an enemy during Market Hiding:
if the player’s command includes “[adversary]”:
cut matched text;
try tolooking instead.

Instead of observing an enemy during Market Hiding:
if the player’s command includes “[adversary]”:
cut matched text;
try tolooking instead.

ToLooking is an action applying to one visible thing. Understand “look patrol” or “look at the patrol” or “look at patrol” or “patrol” or “look balak patrol” or “look at balak patrol” or “observe balak” or “observe balak patrol” or “observe patrol” or “observe the patrol” or “the patrol” or “watch balak” or “watch balak patrol” or “watch patrol” or “watch the patrol” as tolooking.

Watching is an action applying to one visible thing. Understand “watch balak” or “watch balak patrol” or “watch patrol” or “watch the patrol” as watching.

Observing is an action applying to one visible thing. Understand “observe balak” or “observe balak patrol” or “observe patrol” or “observe the patrol” as observing.[/code]

I know the actions show duplicates of the understood phrases, I am just showing you what I have used. They did not work when separated out properly either.

One other issue with all of this is if I assume the player will type “look Balak” I get the room description delivered back to the player prematurely. This should only how after the scene has run its course as in the first example above.

[code]>look balak patrol

From your cover behind the crates you watch the Balak Patrol harass the patrons of the east quarter as to your where-abouts.

look balak

East Shyn Market

You are in the east quarter of Shyn Market in the town of Ciplak.

The Balak Patrol is searching the eateries and salons of the east quarter in an effort to find your trail.
[/code]

I am going to move over to my LAY LOW and FIGHT portion of this code for a bit. Any help will be greatly appreciated.

Well first of all, you seem to be trying to completely circumvent the normal noun parser and build your own. I would advise you not to do that unless you’re really willing to commit to it and dig down into the low-level code. What’s wrong with the normal examining action?

I am not trying to circumnavigate the parser to any great extent. Examine works fine unless the player only types “look balak” “watch balak” “observe balak”. In all other cases the code works fine. For example, typing “look patrol” watch patrol" or “observe patrol” all produce response in the proper sequence according to the timer set up in the scene. What I cannot figure out is why balak by itself gives me a different set of issues to deal with.

The standard way to parse an action applying to an object is something like this.

Examining is an action applying to one visible thing and requiring light. Understand "examine [something]" or "look at [something]" as examining.

Now the parser will figure out the object automatically for you, you don’t need to hard-code every possible command.

Well now I feel like a complete idiot. That’s the way I have most of my actions written. I have been away from my writing for a short while and I guess my head is a little foggy. Thanks for the help.

Not a problem. Just wanted to warn you away from reinventing the wheel to that extent—just wait until the combinatorial explosion hits. :stuck_out_tongue: