Allow cancelling Temporal Form's anomaly talents
doAction function to all anomalies which gets wrapped by the
action function and adds a parameter to specify whether targeting
can be cancelled. The default is for this to be true, if the talent
gets used directly by the player, like when in Temporal Form.
For the special cases related to Twist Fate, cancelling is disabled like it was in the past, even while in Temporal Form.
Currently if you use the Temporal Form prodigy and activate one of the anomaly talents it adds, you can't cancel targeting if you don't like your options, which feels like a bug to me (http://forums.te4.org/viewtopic.php?f=42&t=50761). The reason they can't be cancelled is that anomalies are usually not under the player's control. The Twist Fate talent gives control over targeting, but cancelling is disabled to prevent the player from avoiding the effect.
For Temporal Form this doesn't make sense to me, because as a Telegoroth you're able to specify which anomaly you want to create, and thus you should also be able to cancel the targeting. I also assume that lore-wise they have more control than a chronomancing player character would.
At the same time, I didn't want Twist Fate to behave differently if Temporal Form was active. I consider the anomalies that you directly trigger to be more under your control, while anomalies resulting from Induce Anomaly and paradox failures etc. are less under your control, even in Temporal Form.
I tried a bunch of different approaches, and the one described in the summary is the cleanest and most future proof one I could come up with with my current knowledge of the code. I'm open to alternatives.
Scenarios I tested:
- Alchemist with Temporal Form. Verified cancelling the different anomaly talents while targeting works.
- Paradox Mage with Induce Anomaly. Verified the anomalies happened without further user interaction.
- Paradox Mage with Induce Anomaly and Twist Fate. Verified the anomalies couldn't be cancelled.
- Paradox Mage with Induce Anomaly, Twist Fate and Temporal Form active. Verified the anomalies couldn't be cancelled.
I didn't test traps and paradox failures since those all call
paradoxDoAnomaly, which is mostly the same code path as Induce Anomaly.