const vomit = this.actor.itemTags.trait.find(t => t.name === "Vomissement");
const name = "Test de Corruption";

if (!vomit) return;

const effect = vomit.effects.find(e => e.name === "Vomissement");
const scriptData = effect.system.scriptData;

scriptData[0].script = `
args.actor.addCondition("stunned");
args.actor.corruptionDialog("moderate");
`

await effect.update({
  name,
  "system.scriptData": scriptData
});

await vomit.update({name});