TADS remap direction verb

directional verbs are killing me. they’re not very well documented since they’re sort of TActions but also sort of IActions and are basically glossed over.

anyway…

I’m using the built-in action ThrowDir and have that working fine.
but I want to remap ‘throw object out’ (the built-in ThrowDir) to ‘throw out object’ (in the sense of throwing something out a window).

I’ve tried lots of combinations, most recent attempt is:

DefineTAction(ThrowOut);
VerbRule(ThrowOut)
    'throw' singleDir dobjList
    : ThrowOutAction
    verbPhrase = ('throw/throwing out (what)')
    getDirection() { return outDirection; }
;

modify Thing 
  dobjFor (ThrowOut)
    remapTo(ThrowDir, self, downDirection);
;

but I keep getting

Runtime error: wrong number of arguments
2 Likes

I hear ya. Busy tonight but I might be able to look at it in the morning…

1 Like

The reason it’s complaining about the number of arguments is, as you’ve probably guessed, because ThrowDir is a funky TAction and not a TIAction.

If I understand what you’re trying to do, what you want is probably something more like:

DefineTAction(ThrowOut);
VerbRule(ThrowOut)
        'throw' 'out' dobjList
        : ThrowOutAction
        verbPhrase = 'throw/throwing out (what)'
;

modify Thing
        dobjFor(ThrowOut)
                remapTo(ThrowDir, self)
;

…which gets you…

>throw out pebble
You should just put it down instead.

…where the failure message is shouldNotThrowAtFloorMsg, generated in this case from Thing.dobjFor(ThrowDir)'s verify() stanza.

1 Like