Issue is solved, but I forgot to post the solution for anyone landing here through a search:
First, we need to create a “match object”, which should inherit from the action we want to modify, as well as from DynamicProd. Here, we’ll use WaitAction:
local matchObj = TadsObject.createInstanceOf(WaitAction, DynamicProd);
Then, we set its “grammarTag” property:
matchObj.grammarTag = 'predicate(ModifiedWait)';
“predicate(Foo)” is what is used normally as the tag when you write “VerbRule(Foo)” rules, so we did the same here.
Next, we clear the grammar for the existing “Wait” rule. This is done through the “predicate” object:
predicate.deleteAlt('Wait');
We then add the new grammar:
predicate.addAlt(
''' 'z' | 'wait' | ('kill' | 'waste') ( | 'some') 'time' ''',
matchObj, cmdDict, t3GetGlobalSymbols());
The new grammar is now in effect (entering KILL SOME TIME will perform a Wait action.)
For transitive actions that apply to objects/topics/etc, you can’t use the “dobj”, “dobjList”, etc macros. You need to use their expansions instead (defined in en_us.h).
There’s a caveat though: Mike Roberts pointed out a T3 VM bug where the above might not work correctly in all cases. It will be fixed in the next TADS 3 release.