Combat help for a Newbie please?

Hey folks,
New to TADS, and I’ve probably bitten off more than I can chew, but I would like to make a combat system. The current idea for the combat system is that the player has a collection of limbs(durr :stuck_out_tongue:) that can be used to perform set combat actions.
E.G.

“USE fist to STRIKE target” is basically describing a punch.
^ I have no idea how to define this somewhat more complex action…

As this would get tiring/tedious after a while, I would like the player to be able to macro certain combinations. e.g.
“Learn Punch: USE fist to STRIKE”
this should create the verb “PUNCH” that is basically typing “USE fist to STRIKE”, again; no idea how to code this(But I do know that the program will have to prevent the player defining a macro that uses a library verb…)

Any hints as to how to figure this out would be appreciated!

Note: I’m pretty sure that mechanically the previous line would pass the target actor and ‘fist’(being a property of the player character) to some function that deals damage to the intended target.

Defining the action Use (or perhaps UseToStrike) is not difficult. After reading up on how to define new actions, you could do something like this:

VerbRule(UseToStrike) ('use' singleDobj 'to' ('strike' | 'hit') singleIobj) | (('strike' | 'hit') singleIobj ('with' | 'using') singleDobj) // and then the rest of the VerbRule...

You would then need to define what happens when the fist object is the dobj of UseToStrike, when an opponent is the iobj of UseToStrike, and so on. The methods of doing this are covered in the documentation, but feel free to ask more questions if you’re not clear how to do this.

I would recommend against letting the player create their own action commands. TADS 3 can do pretty much anything, so I expect it’s possible, but why bother? Why not just define the actions Kick, Punch, and so on? Your players will appreciate having these words ready to go.

Thanks Jim, Greatly appreciated! I was confused how to do it but that should work, thank you.

As for letting players create their own commands; I’ll run it past a couple testers without that feature, just to see if it is needed.