UngeheuerLich
Legend
That is exactly my problem.Many spells don't say anything about a successful save. Command, for instance, just mentions failed saves.
If you want it in code format.
start of turn (t)
Note that while there are 2 "start of turn triggers, the target gets to choose the order. So only 1 will apply.
I think your code is wrong, I try to fix it.
If (elemental.restrained == NULL) && (t.distance(elemental) < 5)
Then if (t.DexSave)
Then {
t.damage(8d8)
Elemental.restrained = t)
}
Else elemental.restrained = NULL
Else if (elemental.restrained == t)
Then if (t.DexSave) //note restrained gives disadvantage.
t.damage(4d8)
The wording suggests, that the Else statement belongs to the first if t.DexSave
If the last line was: on a success, the target is no longer restrained, we did not have this discussion.