// A Drinker must take a Difficult (-10) Endurance Test. let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields: {difficulty: "difficult"}}) await test.roll() // If they fail, they acquire 2 Poisoned Conditions. if (test.failed) { this.actor.addCondition("poisoned", 2) this.script.scriptMessage(`
${this.actor.prototypeToken.name} reçoit 2 états @Condition[Empoisonné].
Toute créature avec le Trait Bestial qui le mord et provoque des dégats ne le mordra pas à nouveau durant un combat, la créature pouvant toutefois attaquer avec d'autres méthodes si disponibles..
`, { whisper: ChatMessage.getWhisperRecipients("GM"), blind: true }) } // If they succeed, for a number of rounds equal to 3+ their SL, they have the Corrosive Blood Creature Trait. else if (test.succeeded) { // Don't attempt to add Corrosive Blood if actor already has it const hasCorrosiveBlood = this.actor.has("Sang corrosif") if (hasCorrosiveBlood !== undefined) return let item = await fromUuid("Compendium.wfrp4e-core.items.M5QSWOYt2Rbv2yxW") let data = item.toObject() this.actor.createEmbeddedDocuments("Item", [data], {fromEffect: this.effect.id}) const duration = 3 + parseInt(test.result.SL) this.script.scriptMessage(`${this.actor.prototypeToken.name} gagne le Trait Sang Corrosif pour ${duration} rounds.
`, { whisper: ChatMessage.getWhisperRecipients("GM"), blind: true }) }