Because in some scenarios the player will be under time pressure, I’m keen on reliably skipping the every turn rulebook when an action has failed so that time doesn’t tick.
When the action failed because the parser never got as far as successfully interpreting the player command as an action - no problem. When the action failed because one of my own rules - no problem, I have been consistent in manually setting a flag that causes the every turn rulebook to be skipped.
However, I have now realised that this approach isn’t enough because there are lots of post-parser ways the standard rules can cause actions to fail, but they don’t set any such flag.
However, I believe such actions result in rulebooks ending with failure. I’m starting to think that the only way I can do this properly is to check for whether an action has completed successfully, and only run the every turn rulebook if so.
Do you agree this is the right approach? It’s going to be hard for me to do this even if it is the right way, because I have never previously thought much about success and failure of actions and my current code is not at all consistent in making actions fail or succeed as appropriate because for my purposes so far it hardly seemed to matter.
Am I right that that standard rules only fail when the attempted action just didn’t make sense so could not be physically attempted (e. g. an attempt to take something inside a locked closed box), and don’t fail for reasons where the failed attempt would actually take time?
Are there likely to be difficulties, when, for example an action triggers other actions? Will I be able to be sure to monitor the outcome of the main one and not the others? For example, when the player command is inherently multiple actions (e.g. “take all”), will it be possible to monitor whether at least one succeeded and all failed?
As you can see, I’m just not that clued up about success and failure and would like advice before I start on a system that might end up not being the best way or not even working.