The standard behavior of the taking off action is somewhat wonky anyway. If there's a jacket lying around on the floor and you type "shed jacket," you will pick up the jacket before attempting to take it off; and then of course you will fail at taking it off, because you're holding it instead of wearing it. So the implicit take doesn't actually help prepare for the action.
I really don't see why this action should generate implicit takes. Perhaps it's to enable automatic disambiguation, but on a very crude test, even if you define an action that doesn't apply to carried things the parser seems to prefer something worn to something lying on the floor -- and of course it doesn't help at all with something worn versus something carried. So in general, I think it might be a good idea to edit the Standard Rules so they say
Code:
Taking off is an action applying to one thing.
and use a DTPM rule to make sure the parser tries to choose worn things to take off:
Code:
Does the player mean taking off something worn: it is very likely.
I've just posted a
Uservoice suggestion that this change should be made in the Standard Rules.
I'm not sure this would solve your case, though, because it sounds like you want "remove crystal" to effectively dislodge the crystal, so it winds up on the floor. (Is that right?) In that case, I might try defining a new action:
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.
Persuasion rule for asking Golem to try doing something:
rule succeeds;
Persuasion rule for asking Sidekick to try doing something:
rule succeeds;
A blue jacket is in chamber. The player wears a red jacket.
Dislodging is an action applying to one thing.
Understand "remove [crystal]" as dislodging when the golem encloses the crystal.
Understand "dislodge [something]" as dislodging.
Check an actor dislodging:
if the noun is enclosed by the actor:
try the actor dropping the noun instead;
otherwise if the noun is not enclosed by a person:
say "[The noun] doesn't need to be dislodged." instead.
Check dislodging:
if the noun is not the crystal:
say "That can't be dislodged." instead.
Carry out an actor dislodging:
now the noun is in the location.
Report an actor dislodging:
if the actor is the player:
say "You poke [the noun] free.";
otherwise:
say "[The actor] pokes [the noun] free."
Test me with "remove crystal/l/golem, wear crystal/dislodge jacket/dislodge blue jacket/golem, remove crystal/golem, wear crystal/sidekick, remove crystal/sidekick, dislodge crystal/wear crystal/remove crystal".
I'm not particularly fond of special-casing "remove [crystal]" but maybe this can help you get started, if this is indeed what you want.