"Unmaidenly behaviour" with more specific nouns?

Hello,

As in this post, I am exploring grouping potential actions in kinds, like in the “unmaidenly behaviour” example, under §7.15 of Inform’s Documentation.

I am now wondering whether it is possible to produce rules that take effect when “unmaidenly behaviour” is applied to specific kinds of things or things with a specific value.

For example, how can we check “unmaidenly behaviour” towards a woman or towards an open door?

I understand that there probably is a complication of the thing we are interested in being a noun in some and a second noun in other actions. For example, if we need to make a rule that affects actions towards a woman:

examining a thing (as noun)

asking a person about something (as noun)

giving something to a person
[/code] (as second noun)

Here is an example. The part in between ***asterisks*** is the one I am missing -or so I reckon:
[code]"Behaviourism" by Giannis

Examining a thing is proper behaviour.
Asking a person about something is proper behaviour.
Telling a person about something is proper behaviour.
Giving something to a person is proper behaviour.

Before proper behaviour:
	say "How proper!"
		
The Restaurant is a room.

Instead of giving the fish to gordon:
	move the fish to Gordon;
	say "Gordon nods and says, 'Thank you, but this was my fish, anyway.'"

Instead of giving the fish to Samantha:
	move the fish to Gordon;
	say "As you offer her the fish, Gordon snatches it and bites it, saying: 'This is MY fish.'"
	
After taking the fish, say "You take the fish and put it in your jacket pocket. Gordon twists on his chair. 'Hey! This isn't yours!' he mumbles."

Samantha is a woman in the restaurant. Gordon is a man in the restaurant.

The fish is in the restaurant. It is edible.

Thanks!

You can add a modification to the kind of action like this:

Before proper behaviour when the noun is a woman or the second noun is a woman: say "How proper!"

Now, if it makes a difference whether the woman is the noun or the second noun, then I think the best way to do it is probably using two kinds of action:

[code]Pushing a thing is directly unstable behavior. Attacking a thing is directly unstable behavior.

Putting a thing on a thing is indirectly unstable behavior. Throwing a thing at a thing is indirectly unstable behavior…

A thing can be stable or unstable. A thing is usually stable.

Lab is a room. The weebly table is an unstable portable supporter in Lab. The player carries a rock.

After directly unstable behavior when the noun is unstable:
say “[The noun] wobbles alarmingly!”

After indirectly unstable behavior when the second noun is unstable:
say “[The second noun] wobbles alarmingly!”

The futile to throw things at inanimate objects rule is not listed in any rulebook.
The block throwing at rule is not listed in any rulebook.

Carry out throwing it at: now the noun is in the location.

Report throwing it at: say “You throw [the noun] at [the second noun].”[/code]

Now “throw rock at table” will give the message but “throw table at rock” won’t. (Also, you can throw the table at the rock while the rock is on the table.)

You can also use “in the presence of” if you want a behavior to be observed even if not done directly to an object or a person. The doc shows this, so my apologies if you already knew this.

“Instead of violent behavior in the presence of a fragile thing…”

Yes, Matt, thanks! “When the noun is [a kind]” is the syntax I was missing! And thank you for the suggestion to separate the two kinds of action!

Hanon, thank you for your suggestion, too! It is not what I am after right now, but I am sure it will come in handy sooner or later!