let resistance if (this.item.name.includes("(") && !this.item.name.toLowerCase().includes("(any)")) { resistance = this.item.parenthesesText } else { resistance = await ValueDialog.create({text : "Entrez la Résistance", title : "Résistance"}) if (resistance) { this.item.updateSource({name : `${this.item.name.split("(")[0].trim()} (${resistance})`}) this.effet.updateSource({name : this.effet.name + ` (${resistance})`}) } } this.item.updateSource({"system.tests.value" : this.item.system.Tests.value.replace("the associated Threat", resistance)}) if (resistance && !this.effet.name.includes("(")) { this.effect.updateSource({name : this.effect.name += ` (${resistance})`}) }