I am brand new to Twine. As in, I started my first adventure in it last night, less than 24 hours ago. I do have some programming experience in general and have an (extremely) rudimentary combat engine written in it, as I want it to have a bit of an RPG-feel to it.
However, my issue is I'm having to create so many passages to select all the options I want for combat. Right now, you can select whether to attack the head or body and then pick your attack. But they're all individual passages, so it looks like this:
Do you want to attack [the head] or [the body]?
Then passages the head and the body both have something like:
Go for a KO
Go for a stun
And so on for all the options. Then all the attack passages created (KO and Stun) largely have the same code in them and there is a LOT of passages. This feels very inefficient to me. Tweaking the combat formula would be awful, as I'd have to go through every passage and change it in them all. Is there a way I could just put a list in a passage? You could pick all your options (what area to target, which attack to use, pick a special attack once I implement that, etc) and then it moves onto a second passage where it processes the choices.
The engine is functional right now, though unwieldy. (And also not exciting. It takes a _very_ long time to finish combat.) This seems like the first step towards making it better. Any suggestions?
*Edited to add: I'm using 1.4.2 with Sugarcane*