If I understand correctly, in Inform 7 “Buy” is defined, but there is no way for it to do anything but print “Nothing is on sale”. I’ve seen some example code and adapted it for my needs. Here it is in case this helps:
Instead of buying something: decrease the price of the money by the price of the noun; say "You pay [the price of the noun] for [the noun], leaving yourself with [the price of the money]."; if the money is free: now the money is nowhere; now the price of the noun is $0.00; now the player is carrying the noun.
This is great except I can’t use an “after buying” rule because “buying” fails (since I’m using “Instead of”). I tried to change the code from “instead of buying” to “carry out buying”, but that doesn’t work, simply printing “Nothing is on sale” presumably because I cannot override a built-in command in this way.
What I’m trying to accomplish is:
After buying train ticket: try giving train ticket to conductor.
Is there a way to do this? Thanks.