I have a creature that uses a reaction to transform into a copy of itself for a few turns before going back to the original form. This is so that it can regenerate whole limbs. This works as intended except that now, as opposed to previous versions where it didn't, the cooldown for this reaction is reset as soon as it changes back. This basically leads to the creature infinitely transforming. Is there any way around this or is it the new intended behavior of reactions?
Here are the relevant raws:
interaction_regenerator.txt
interaction_regenerator
[OBJECT:INTERACTION]
[INTERACTION:REGENERATE]
[I_SOURCE:CREATURE_ACTION]
[I_TARGET:A:CREATURE]
[IT_LOCATION:CONTEXT_CREATURE]
[IT_MANUAL_INPUT:yourself]
[I_EFFECT:ADD_SYNDROME]
[IE_TARGET:A]
[IE_IMMEDIATE]
[SYNDROME]
[CE_BODY_TRANSFORMATION:START:0:END:1]
[CE:CREATURE:REGENERATING_REGENERATOR:DEFAULT]
creature_regenerator.txt
[CAN_DO_INTERACTION:REGENERATE]
[CDI:ADV_NAME:Regenerate!]
[CDI:TARGET:A:SELF_ONLY]
[CDI:TARGET_RANGE:A:1]
[CDI:MAX_TARGET_NUMBER:A:1]
[CDI:WAIT_PERIOD:5000]
You could make the transformation last longer and the creature it transforms to lack the transforming ability if it has it. Thats probably the most simple way to deal with that problem.
(Without DFHack, of course) Transformed creatures cannot transform again. What I think is happening there is that the creature is transforming as intended and then back when the effect ends. Since the transformation has a small (or no) cooldown, it then goes and transforms again. Just give it a greater [CDI:WAIT_PERIOD:X].
This might help
The thing is that the game doesent keep track of cooldowns during transformations so when the creature transforms back into itself it will have all its ability cooldowns reset in a same manner as how it will regrow lost limbs. so im fairly sure the only way to have the creature transform with some sort of cooldown is modifying the END part of
[CE_BODY_TRANSFORMATION:START:0:END:1]
Although i'd recommend Ianp to try both of the solutions as im using outdated version and things may have changed from the version i am using myself.