I have a problem with trying to change the default handling for removing items.
I originally tried using Instead rules, removing various rules from the rulebooks but pretty much whatever I tried, the (first taking the huge crystal) always triggered first.
Finally I found out a way to make it work - except when you ask a third person to do it for you.
Minimal version demonstrating the problem:
[code]“Removaltest” by Zalminen
Chamber is a room.
Golem is a person. Golem is in Chamber. Sidekick is a person. Sidekick is in Chamber. Golem is wearing a huge crystal.
Special_removing is an action applying to one thing.
Carry out an actor special_removing something:
say “TESTING”;
Before an actor taking off something (this is the redirect crystal removal rule):
if the noun is a huge crystal, convert to the special_removing action on the noun;
Persuasion rule for asking Golem to try taking off something:
rule succeeds;
Persuasion rule for asking Sidekick to try taking off something:
rule succeeds;
[/code]
[code]Removaltest
An Interactive Fiction by Zalminen
Release 1 / Serial number 120603 / Inform 7 build 6G60 (I6/v6.32 lib 6/12N) SD
Chamber
You can see Golem and Sidekick here.
rules
Rules tracing now switched on. Type “rules off” to switch it off again, or “rules all” to include even rules which do not apply.
Sidekick, remove crystal
(Sidekick first taking the huge crystal)
Sidekick has better things to do.
Golem, remove crystal
[Rule “Persuasion rule for asking Golem to try taking off something” applies.]
[Rule “redirect crystal removal rule” applies.]
[Rule “Carry out an actor special_removing something” applies.]
TESTING
remove crystal
[Rule “redirect crystal removal rule” applies.]
[Rule “Carry out an actor special_removing something” applies.]
TESTING
[/code]
For some strange reason it works fine when the player removes the crystal or tells the golem to remove it but fails when asking the sidekick to remove it.
Why does the (Sidekick first taking the huge crystal) show up in the first case but the conversion works fine in the others?