I’d like to be able to print names for actions without the “-ing” ending. So instead of something like this:
Before doing something when the paralytic gas is in the location: say "You think of [the current action], but find you cannot move at all." instead.
we might be able to print:
Before doing something when the paralytic gas is in the location: say "You try to [infinitival form of the current action], but find you cannot move at all." instead.
Now if this were just a question of removing the “-ing” from an action name, this could be done tediously but relatively simply; I could just make a big table of action names with an infinitival form for each one (so that the infinitival form of the searching action was “search,” the infinitival form of the taking inventory was “take inventory,” etc.) But I can’t see that I would be able to do such a brute force method for entire stored actions, like “searching the closet” or “throwing the key at the door.” And I can’t even break down the message into parts such that I print the infinitival form of the action name, then the first noun if any, then the second noun if any, because I would get “throw it at the key the door.”
Is there any solution here? I suppose the solution is going to involve an enormous table with all the action names, with the participial form of the action in one column, and with the infinitival form of the action in another column, so that I can use indexed text to replace the pariticiple with the infinitival form. Oh dear. And is there an easy way to make it so that only the first occurrence of the matched text gets replaced, so that “throwing the throwing knife at the troll” doesn’t become “throw the throw knife at the troll”?