Interaction in the creature raw:
[CAN_DO_INTERACTION:KILL_ALL_THINGS_START:0:2400]
[CDI:TARGET:A:SELF_ONLY]
[CDI:FREE_ACTION]
[CDI:WAIT_PERIOD:2405]
[CDI:ADV_NAME:Activate rage]
[CDI:TARGET_VERB:observe and hate all other creatures, living or dead:observes and hates all other creatures, living or dead:NA]
Interactions in the interactions file:
[INTERACTION:KILL_ALL_THINGS_START]
[I_TARGET:A:CREATURE]
[IT_LOCATION:CONTEXT_CREATURE]
[IT_CANNOT_TARGET_IF_ALREADY_AFFECTED]
[I_EFFECT:ADD_SYNDROME]
[IE_TARGET:A]
[IE_IMMEDIATE]
[SYNDROME]
[SYN_NAME:wild cave dragon]
[SYN_CLASS:WILD_CAVE_DRAGON]
[SYN_AFFECTED_CREATURE:CAVE_DRAGON:ALL]
[CE_CAN_DO_INTERACTION:START:1200]
[CDI:INTERACTION:KILL_ALL_THINGS_ACTIVATE]
[CDI:ADV_NAME:Act on rage]
[CDI:VERB:want to kill all other creatures, living or dead:wants to kill all other creatures, living or dead:NA]
[CDI:TARGET_VERB:are inspired to kill all other creatures:is inspired to kill all other creatures:NA]
[CDI:TARGET:A:SELF_ONLY]
[CDI:TARGET:B]
[CDI:TARGET_RANGE:B:10]
[CDI:FREE_ACTION]
[INTERACTION:KILL_ALL_THINGS_ACTIVATE]
[I_TARGET:A:CREATURE]
[IT_LOCATION:CONTEXT_CREATURE]
[IT_CANNOT_TARGET_IF_ALREADY_AFFECTED]
[I_TARGET:B:CREATURE]
[IT_LOCATION:CONTEXT_CREATURE]
[IT_CANNOT_TARGET_IF_ALREADY_AFFECTED]
[I_EFFECT:ADD_SYNDROME]
[SYNDROME]
[IE_TARGET:A]
[IE_TARGET:B]
[IE_IMMEDIATE]
[SYN_NAME:angry cave dragon]
[SYN_CLASS:ANGRY_CAVE_DRAGON]
[SYN_AFFECTED_CREATURE:CAVE_DRAGON:ALL]
[CE_ADD_TAG:CRAZED]
The intent is to have the cave dragon start out in an incredibly aggresive state*, and have this state be switched off by taming. But there's no off switch at the moment, because I haven't gotten the on switch working properly.
For testing, I've been embarking with 20 cut-price cave dragons and immediately drafting the dwarves and stationing them in a corner. The actual berserking happens as planned, with all 20 cave dragons becoming crazed in perfect harmony, but there are assorted issues and oddities.
1. The wagon animals get the 'inspired to kill all other creatures' message in the combat log, but never go berserk.
2. The 'observes and hates all other creatures' message appears 20 times, but only on about a third of the dragons. I don't get it.
3. Loyalty issues -- in one test, a wandering animal drew a dragon too close to the dwarves, and the dragon killed most of them. When the dragon went to rejoin the others in hanging around the wagon location, it was set upon and killed. This did not start a loyalty cascade, but I'll keep it in mind for future aggressive reactions to being crowded.
The main problem is #1. The interactions should only ever be targeting cave dragons, but other creatures get caught in the berserk bomb's radius.
*Given that cave dragons are very big large predators and buildingdestroyer:2, this may be unecessary...