Dancing Monkey Fruit effect script
I'm still learning the ropes of how to write effects. I figured out how to apply the conditions for consuming dancing monkey fruit from Tomb of Annihilation (DISATK; DISSAV: dexterity; GRANTADVATK), but I cannot figure out how to trigger the DC 14 constitution saving throw if damage is taken. Do I nest the entire effect in an IF (SAVE: constitution 14) or is there a natural language statement I should be using? Also, what's the syntax for if damage is taken? I looked through the wiki and I couldn't figure out answers to either of these questions. Any help would be appreciated!
Here's the text of the item:
DANCING MONKEY FRUIT
This rare magical fruit produces enough juice to fill a vial. Any humanoid that eats a dancing monkey fruit or drinks its juice must succeed on a DC 14 Constitution saving throw or begin a comic dance that lasts for 1 minute. Humanoids that can't be poisoned are immune to this magical effect.
The dancer must use all its movement to dance without leaving its space and has disadvantage on attack rolls and Dexterity saving throws, and other creatures have advantage on attack rolls against it. Each time it takes damage, the dancer can repeat the saving throw, ending the effect on itself on a success. When the dancing effect ends, the humanoid suffers the poisoned condition for 1 hour.