Consider the following code:
"Test" by TheBeardyMan After going: [nothing written about actor, therefore "player only", more specific than "any actor", so should run first] say "In player only after going rule."; continue the action. After an actor going: ["an actor" written about actor, therefore "any actor", less specific than "player only", so should run second] say "In all actors after going rule."; continue the action. The Lab is a room. North of the Lab is the Store Room.
The comments explain the expected behaviour.
In second rule preamble, I wrote more text about the actor - “an actor” - than I did in the first rule preamble - nothing.
But the first rule preamble makes the more specific rule - writing nothing about the actor means that the rule is restricted to actions where the player is the actor, whereas writing “an actor” leaves the actor unrestricted.
But when I run the code, I get the following:
**Test** An Interactive Fiction by TheBeardyMan Release 1 / Serial number 230404 / Inform 7 v10.1.2 / D **Lab** >n In all actors after going rule. In player only after going rule. **Store Room** >
The less specific “all actors” rule ran before the more specific “player only” rule. Is there a reason why the “more specific before less specific” rule sorting law is inverted for “player only” versus “any actor”?
Or is it defining specific in terms of “wrote something about the parameter” versus “wrote nothing about the parameter” instead of “restricts the value of the parameter” versus “doesn’t restrict the value of the parameter”?