Compare commits

..

1 Commits
9.4.5 ... v10

Author SHA1 Message Date
8862698262 Nombreuses corections de scripts...
All checks were successful
Validation JSON / validate (push) Successful in 15s
Release Creation / build (release) Successful in 57s
2026-03-07 15:02:18 +01:00
47 changed files with 87 additions and 87 deletions

File diff suppressed because one or more lines are too long

View File

@@ -14,7 +14,7 @@
let updateObj = this.actor.toObject(); let updateObj = this.actor.toObject();
let talents = (await Promise.tout([game.wfrp4e.tables.rollTable("talents"), game.wfrp4e.tables.rollTable("talents"), game.wfrp4e.tables.rollTable("talents")])).map(i => i.text) let talents = (await Promise.all([game.wfrp4e.tables.rollTable("talents"), game.wfrp4e.tables.rollTable("talents"), game.wfrp4e.tables.rollTable("talents")])).map(i => i.text)
for (let ch in characteristics) for (let ch in characteristics)
{ {

View File

@@ -1,6 +1,6 @@
let test = await args.actor.setupCharacteristic("wp", {skipTargets: true, appendTitle : " - " + this.effect.name, context : {failure: "Gain de 1 état Sonné"}}) let test = await args.actor.setupCharacteristic("wp", {skipTargets: true, appendTitle : " - " + this.effect.name, context : {failure: "Gain de 1 état Sonné"}})
await Test.roll(); await test.roll();
if (Test.Échoué) if (test.failed)
{ {
args.actor.addCondition("stunned") args.actor.addCondition("stunned")
} }

View File

@@ -1,6 +1,6 @@
let test = await this.actor.setupCharacteristic("ag", {skipTargets: true, appendTitle : ` - ${this.effect.name}`}); let test = await this.actor.setupCharacteristic("ag", {skipTargets: true, appendTitle : ` - ${this.effect.name}`});
await Test.roll(); await test.roll();
if (Test.Échoué) if (test.failed)
{ {
this.actor.addCondition("bleeding"); this.actor.addCondition("bleeding");
} }

View File

@@ -1,6 +1,6 @@
let test = await this.actor.setupCharacteristic("wp", {skipTargets: true, appendTitle : " - " + this.effect.name, context : {failure: "GAin d'1 état Sonné"}}) let test = await this.actor.setupCharacteristic("wp", {skipTargets: true, appendTitle : " - " + this.effect.name, context : {failure: "GAin d'1 état Sonné"}})
await Test.roll(); await test.roll();
if (Test.Échoué) if (test.failed)
{ {
this.actor.addCondition("stunned"); this.actor.addCondition("stunned");
} }

View File

@@ -22,7 +22,7 @@ let Test = await actor.setupSkill('Calme', {
fields: {difficulty: 'easy'}, fields: {difficulty: 'easy'},
characteristic: 'wp', characteristic: 'wp',
}); });
await Test.roll(); await test.roll();
if (!Test.succeeded) { if (!Test.succeeded) {
Test.result.other.push(`<b>${actor.name}</b> est devenu @Condition[Stunned] par la vue.`); Test.result.other.push(`<b>${actor.name}</b> est devenu @Condition[Stunned] par la vue.`);

View File

@@ -10,12 +10,12 @@ const test = await this.actor.setupSkill(game.i18n.localize("NAME.Résistance"),
} }
}); });
await Test.roll(); await test.roll();
if (Test.Échoué) { if (test.failed) {
await this.actor.addEffectItems(bloodyFluxUUID, this.effet); await this.actor.addEffectItems(bloodyFluxUUID, this.effet);
} else { } else {
const SL = Test.result.SL; const SL = test.result.SL;
const heal = 1 + SL; const heal = 1 + SL;
await this.actor.modifyWounds(heal); await this.actor.modifyWounds(heal);
this.script.message(`Butcher a soigné ${heal} Blessures.`); this.script.message(`Butcher a soigné ${heal} Blessures.`);

View File

@@ -1,12 +1,12 @@
// Imbibing this substance grants the user the utilisateur d Creature Trait. // Imbibing this substance grants the user the Painless Creature Trait.
const hasutilisateur d = this.actor.has("Insensible à la douleur"); const hasPainless = this.actor.has("Insensible à la douleur");
if (hasutilisateur d === undefined) if (hasPainless === undefined)
{ {
let item = await fromUuid("Compendium.wfrp4e-core.items.wMwSRDmgiF2IdCJr"); let item = await fromUuid("Compendium.wfrp4e-core.items.wMwSRDmgiF2IdCJr");
let data = item.toObject() let data = item.toObject()
this.actor.createEmbeddedDocuments("Item", [data], {fromEffect: this.effect.id}) this.actor.createEmbeddedDocuments("Item", [data], {fromEffect: this.effect.id})
this.script.message( this.script.scriptMessage(
`<p><strong>${this.actor.prototypeToken.name}</strong> a acquis le Trait de Créature Insensible à la douleur. Cet `<p><strong>${this.actor.prototypeToken.name}</strong> a acquis le Trait de Créature Insensible à la douleur. Cet
effet dure une heure, après quoi il se dissipe et l'effet complet effet dure une heure, après quoi il se dissipe et l'effet complet
de toutes les blessures du buveur s'abat d'un coup.</p> de toutes les blessures du buveur s'abat d'un coup.</p>

View File

@@ -7,9 +7,9 @@ const test = await args.actor.setupSkill(game.i18n.localize("NAME.Résistance"),
} }
}); });
await Test.roll(); await test.roll();
if (Test.Échoué) { if (test.failed) {
args.actor.addCondition("poisoned"); args.actor.addCondition("poisoned");
const speaker = ChatMessage.getSpeaker({actor: args.actor}); const speaker = ChatMessage.getSpeaker({actor: args.actor});
this.script.message(`<p>${speaker.alias} a reçu 1 état @Condition[Poisoned] de Venin d'Araignée.</p><p>Les victimes réduites à 0 blessures et qui souffrent d'un état @Condition[Poisoned] de ces flèches deviennent @Condition[Unconcious], mais ne risquent pas la mort à cause des états @Condition[Poisoned] restants comme ce serait normalement le cas.</p>`); this.script.message(`<p>${speaker.alias} a reçu 1 état @Condition[Poisoned] de Venin d'Araignée.</p><p>Les victimes réduites à 0 blessures et qui souffrent d'un état @Condition[Poisoned] de ces flèches deviennent @Condition[Unconcious], mais ne risquent pas la mort à cause des états @Condition[Poisoned] restants comme ce serait normalement le cas.</p>`);

View File

@@ -1,7 +1,7 @@
if (args.test.result.SL < 0) if (args.test.result.SL < 0)
{ {
this.script.message(`Gain de ${Math.abs(args.test.result.SL)} Points de Corruption`, {whisper : ChatMessage.getWhisperRecipients("GM")}) this.script.message(`Gain de ${Math.abs(args.test.result.SL)} Points de Corruption`, {whisper : ChatMessage.getWhisperRecipients("GM")})
if (args.Test.Échoué && this.actor.type == "character") if (args.test.failed && this.actor.type == "character")
{ {
this.actor.update({"system.status.corruption.value" : parseInt(this.actor.status.corruption.value) + Math.abs(args.test.result.SL)}) this.actor.update({"system.status.corruption.value" : parseInt(this.actor.status.corruption.value) + Math.abs(args.test.result.SL)})
} }

View File

@@ -13,9 +13,9 @@ let test = await actor.setupCharacteristic("s", {
} }
}); });
await Test.roll(); await test.roll();
if (Test.succeeded) { if (test.succeeded) {
let SL = parseInt(Test.result.SL); let SL = parseInt(test.result.SL);
let name = this.effect.name.replace(/\d+/, rating => parseInt(rating) - SL); let name = this.effect.name.replace(/\d+/, rating => parseInt(rating) - SL);
await this.effect.update({name}); await this.effect.update({name});
} }

View File

@@ -1,11 +1,11 @@
let test = await this.actor.setupCharacteristic("s", {appendTitle : ` - ${this.effect.name}`, fields : {difficulty : "difficult"}}); let test = await this.actor.setupCharacteristic("s", {appendTitle : ` - ${this.effect.name}`, fields : {difficulty : "difficult"}});
await Test.roll(); await test.roll();
if (Test.Échoué) if (test.failed)
{ {
if (Test.isCriticalFumble == "fumble") if (test.isCriticalFumble == "fumble")
{ {
return this.script.message(`<strong>${this.actor.name}</strong> meurt alors qu'il est entraîné dans l'Aethyr (à moins qu'il ne dépense un point de Destinée pour éviter cela).`); return this.script.message(`<strong>${this.actor.name}</strong> meurt alors qu'il est entraîné dans l'Aethyr (à moins qu'il ne dépense un point de Destinée pour éviter cela).`);
} }

View File

@@ -22,7 +22,7 @@ let Test = await actor.setupSkill('Calme', {
fields: {difficulty: 'easy'}, fields: {difficulty: 'easy'},
characteristic: 'wp', characteristic: 'wp',
}); });
await Test.roll(); await test.roll();
if (!Test.succeeded) { if (!Test.succeeded) {
Test.result.other.push(`<b>${actor.name}</b> est devenu fasciné par la vue et incapable d'effectuer une quelconque action autre que de se déplacer vers la lumière.`); Test.result.other.push(`<b>${actor.name}</b> est devenu fasciné par la vue et incapable d'effectuer une quelconque action autre que de se déplacer vers la lumière.`);

View File

@@ -1,4 +1,4 @@
if (args.test.characteristicKey == "wp" && args.Test.Échoué && args.Test.result.SL <= -3) if (args.test.characteristicKey == "wp" && args.test.failed && args.test.result.SL <= -3)
{ {
this.script.notification("Ajout de A Terre"); this.script.notification("Ajout de A Terre");
this.actor.addCondition("prone") this.actor.addCondition("prone")

View File

@@ -1,6 +1,6 @@
let test = await this.actor.setupCharacteristic("wp", {skipTargets: true, appendTitle : ` - ${this.effect.name}`}) let test = await this.actor.setupCharacteristic("wp", {skipTargets: true, appendTitle : ` - ${this.effect.name}`})
await Test.roll(); await test.roll();
if (Test.succeeded) if (test.succeeded)
{ {
this.script.message("Peut réaliser une Action ou un Déplacement (choisissez-en un)") this.script.message("Peut réaliser une Action ou un Déplacement (choisissez-en un)")
} }

View File

@@ -1 +1 @@
this.script.scirptMessage(await this.actor.applyBasicDamage(20, {suppressMsg: true}); this.script.scriptMessage(await this.actor.applyBasicDamage(20, {suppressMsg: true}));

View File

@@ -1,7 +1,7 @@
let test = await this.actor.setupSkill(game.i18n.localize("NAME.Dodge"), {fields : {difficulty : "hard"}, appendTitle : ` - ${this.effect.name}`}) let test = await this.actor.setupSkill(game.i18n.localize("NAME.Dodge"), {fields : {difficulty : "hard"}, appendTitle : ` - ${this.effect.name}`})
await Test.roll(); await test.roll();
if (Test.Échoué) { if (test.failed) {
this.script.scriptMessage(await this.actor.applyBasicDamage(20, {suppressMsg: true})); this.script.scriptMessage(await this.actor.applyBasicDamage(20, {suppressMsg: true}));
this.script.scriptMessage(`${this.actor.name} est victime de @UUID[Compendium.wfrp4e-core.journals.JournalEntry.NS3YGlJQxwTggjRX.JournalEntryPage.WCivInLZrqEtZzF4#drowning-and-suffocation]{Suffocation}`); this.script.scriptMessage(`${this.actor.name} est victime de @UUID[Compendium.wfrp4e-core.journals.JournalEntry.NS3YGlJQxwTggjRX.JournalEntryPage.WCivInLZrqEtZzF4#drowning-and-suffocation]{Suffocation}`);
} }

View File

@@ -1,6 +1,6 @@
if (args.test.characteristicKey == "wp") if (args.test.characteristicKey == "wp")
{ {
if (args.Test.Échoué) if (args.test.failed)
{ {
this.actor.addSystemEffect("convulsions") this.actor.addSystemEffect("convulsions")
this.script.message(`Test de FM échoué, <b>${this.actor.prototypeToken.name}</b> reçoit @Symptom[Convulsions] pour [[1d10]] heures`) this.script.message(`Test de FM échoué, <b>${this.actor.prototypeToken.name}</b> reçoit @Symptom[Convulsions] pour [[1d10]] heures`)

View File

@@ -9,7 +9,7 @@ if (god)
{ {
let prayers = await warhammer.utility.findAllItems("prayer", "Chargement des Prières", true, ["system.type.value", "system.god.value"]) let prayers = await warhammer.utility.findAllItems("prayer", "Chargement des Prières", true, ["system.type.value", "system.god.value"])
let blessings = prayers.filter(p => p.system.god.value.split(",").map(i => i.trim().toLowerCase()).includes(god.toLowerCase()) && p.system.type.value == "blessing") let blessings = prayers.filter(p => p.system.god.value.split(",").map(i => i.trim().toLowerCase()).includes(god.toLowerCase()) && p.system.type.value == "blessing")
let configBlessings = await Promise.tout((game.wfrp4e.config.godBlessings[god.toLowerCase()] || []).map(fromUuid)); let configBlessings = await Promise.all((game.wfrp4e.config.godBlessings[god.toLowerCase()] || []).map(fromUuid));
if (god == "Foi Antique") if (god == "Foi Antique")
{ {
blessings = await ItemDialog.create(prayers.filter(i => i.system.type.value == "blessing"), 6, {text : "Sélectionnez 6 Bénédictions", title : "Béni"}) blessings = await ItemDialog.create(prayers.filter(i => i.system.type.value == "blessing"), 6, {text : "Sélectionnez 6 Bénédictions", title : "Béni"})

View File

@@ -1,6 +1,6 @@
let test = await this.actor.setupCharacteristic("wp", {skipTargets: true, appendTitle : ` - ${this.effect.name}`}) let test = await this.actor.setupCharacteristic("wp", {skipTargets: true, appendTitle : ` - ${this.effect.name}`})
await Test.roll(); await test.roll();
if (Test.Échoué) if (test.failed)
{ {
this.script.message(await game.wfrp4e.tables.formatChatRoll("enrage-beast")) this.script.message(await game.wfrp4e.tables.formatChatRoll("enrage-beast"))
} }

View File

@@ -1,7 +1,7 @@
if (this.actor.Species.toLowerCase() != "skaven") { if (this.actor.Species.toLowerCase() != "skaven") {
this.actor.setupCharacteristic("t", {skipTargets: true, appendTitle : ` - Utilise ${this.effect.name}`, fields: { difficulty: "difficult" } }).then(async Test => { this.actor.setupCharacteristic("t", {skipTargets: true, appendTitle : ` - Utilise ${this.effect.name}`, fields: { difficulty: "difficult" } }).then(async Test => {
await Test.roll() await test.roll()
if (Test.Échoué) if (test.failed)
{ {
let toughnessLost = Math.ceil(CONFIG.Dice.randomUniform() * 10) let toughnessLost = Math.ceil(CONFIG.Dice.randomUniform() * 10)
this.actor.update({ "system.characteristics.t.initial": this.actor.characteristics.t.initial - toughnessLost }) this.actor.update({ "system.characteristics.t.initial": this.actor.characteristics.t.initial - toughnessLost })

View File

@@ -1,7 +1,7 @@
let test = await this.actor.setupCharacteristic("wp", {fields: {difficulty : "average"}, skipTargets: true, appendTitle : ` - ${this.effect.name}`}) let test = await this.actor.setupCharacteristic("wp", {fields: {difficulty : "average"}, skipTargets: true, appendTitle : ` - ${this.effect.name}`})
await Test.roll(); await test.roll();
if (Test.Échoué) if (test.failed)
{ {
let stuns = Math.max(1, Math.abs(Test.result.SL)) let stuns = Math.max(1, Math.abs(test.result.SL))
this.actor.addCondition("stunned", stuns) this.actor.addCondition("stunned", stuns)
} }

View File

@@ -5,8 +5,8 @@ if (this.actor.uuid == this.effect.sourceActor.uuid)
if (this.actor.has("À Sang Froid") && !this.actor.hasSystemEffect("nausea")) { if (this.actor.has("À Sang Froid") && !this.actor.hasSystemEffect("nausea")) {
let test = await this.actor.setupSkill(game.i18n.localize("NAME.Résistance"), {appendTitle : `- ${this.effect.name}`}) let test = await this.actor.setupSkill(game.i18n.localize("NAME.Résistance"), {appendTitle : `- ${this.effect.name}`})
await Test.roll(); await test.roll();
if (Test.Échoué) if (test.failed)
{ {
let myRoll = await new Roll("1d10").roll({allowInteractive : false}); let myRoll = await new Roll("1d10").roll({allowInteractive : false});

View File

@@ -1,6 +1,6 @@
let test = await this.actor.setupSkill("Résistance", {fields : {difficulty : "difficult"}, appendTitle : ` - ${this.effect.name}`}); let test = await this.actor.setupSkill("Résistance", {fields : {difficulty : "difficult"}, appendTitle : ` - ${this.effect.name}`});
await Test.roll(); await test.roll();
if (Test.Échoué) if (test.failed)
{ {
await this.actor.addCondition("blinded"); await this.actor.addCondition("blinded");
} }

View File

@@ -1,7 +1,7 @@
const test = await this.actor.setupCharacteristic("int", {fields: {difficulty: "easy"}, skipTargets: true, appendTitle : ` - ${this.effect.name}`}); const test = await this.actor.setupCharacteristic("int", {fields: {difficulty: "easy"}, skipTargets: true, appendTitle : ` - ${this.effect.name}`});
await Test.roll(); await test.roll();
if (Test.Échoué) { if (test.failed) {
this.actor.addCondition('stunned'); this.actor.addCondition('stunned');
} }

View File

@@ -1,6 +1,6 @@
let test = await this.actor.setupCharacteristic("ag", {skipTargets: true, appendTitle : ` - ${this.effect.name}`, context: { failure: "Goes Prone" }}) let test = await this.actor.setupCharacteristic("ag", {skipTargets: true, appendTitle : ` - ${this.effect.name}`, context: { failure: "Goes Prone" }})
await Test.roll(); await test.roll();
if (Test.Échoué) if (test.failed)
{ {
this.actor.addCondition("prone"); this.actor.addCondition("prone");
} }

View File

@@ -7,9 +7,9 @@ const test = await this.actor.setupSkill(game.i18n.localize("NAME.Résistance"),
} }
}); });
await Test.roll(); await test.roll();
if (Test.Échoué) { if (test.failed) {
const SL = Number(Test.result.SL); const SL = Number(test.result.SL);
this.script.message(`Butcher perd ${SL} dents.`); this.script.message(`Butcher perd ${SL} dents.`);
} }

View File

@@ -1 +1 @@
,args.fields.slBonus++;,args.fields.slBonus++;,args.fields.slBonus++; args.fields.slBonus++;

View File

@@ -7,8 +7,8 @@ let difficulty = ""
difficulty = "veasy" difficulty = "veasy"
let test = await this.actor.setupSkill(game.i18n.localize("NAME.Résistance"), {context : {failure : this.actor.name + " meurt de la Pourriture"}, fields: {difficulty}, appendTitle : " - Pourriture"}) let test = await this.actor.setupSkill(game.i18n.localize("NAME.Résistance"), {context : {failure : this.actor.name + " meurt de la Pourriture"}, fields: {difficulty}, appendTitle : " - Pourriture"})
await Test.roll(); await test.roll();
if (Test.Échoué) if (test.failed)
{ {
this.actor.addCondition("dead"); this.actor.addCondition("dead");
} }

View File

@@ -7,8 +7,8 @@ let difficulty = ""
difficulty = "veasy" difficulty = "veasy"
let test = await this.actor.setupSkill(game.i18n.localize("NAME.Résistance"), {context : {failure : this.actor.name + " meurt de la Pourriture"}, fields: {difficulty}, appendTitle : " - Pourriture"}) let test = await this.actor.setupSkill(game.i18n.localize("NAME.Résistance"), {context : {failure : this.actor.name + " meurt de la Pourriture"}, fields: {difficulty}, appendTitle : " - Pourriture"})
await Test.roll(); await test.roll();
if (Test.Échoué) if (test.failed)
{ {
this.actor.addCondition("dead"); this.actor.addCondition("dead");
} }

View File

@@ -1,7 +1,7 @@
let test = await this.actor.setupCharacteristic("i", {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields : {difficulty : "easy"}}) let test = await this.actor.setupCharacteristic("i", {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields : {difficulty : "easy"}})
await Test.roll(); await test.roll();
if (!Test.succeeded) if (!test.succeeded)
{ {
this.actor.addCondition("stunned"); this.actor.addCondition("stunned");
} }

View File

@@ -1,7 +1,7 @@
let test = await this.actor.setupCharacteristic("ag", {fields : {difficulty : "hard"}}); let test = await this.actor.setupCharacteristic("ag", {fields : {difficulty : "hard"}});
await Test.roll(); await test.roll();
if (Test.Échoué) if (test.failed)
{ {
await this.actor.addCondition("bleeding") await this.actor.addCondition("bleeding")
await this.actor.addCondition("entangled") await this.actor.addCondition("entangled")

View File

@@ -9,8 +9,8 @@ if (SL >= 3)
let test = await args.actor.setupCharacteristic("wp", {fields: {difficulty}, skipTargets: true, appendTitle : " - " + this.effect.name, context : {failure: "Reçoit un état Sonné"}}) let test = await args.actor.setupCharacteristic("wp", {fields: {difficulty}, skipTargets: true, appendTitle : " - " + this.effect.name, context : {failure: "Reçoit un état Sonné"}})
await Test.roll(); await test.roll();
if (Test.Échoué) if (test.failed)
{ {
args.actor.addCondition("stunned"); args.actor.addCondition("stunned");
} }

View File

@@ -12,7 +12,7 @@ const test = await this.actor.setupCharacteristic("t", {
} }
}); });
await Test.roll(); await test.roll();
if (Test.failure) { if (test.failure) {
await this.actor.addCondition("prone"); await this.actor.addCondition("prone");
} }

View File

@@ -1,6 +1,6 @@
let test = await this.actor.setupSkill("Résistance", {fields : {difficulty : "difficult", appendTitle : ` - ${this.effect.name}`}}); let test = await this.actor.setupSkill("Résistance", {fields : {difficulty : "difficult", appendTitle : ` - ${this.effect.name}`}});
await Test.roll(); await test.roll();
if (Test.Échoué) if (test.failed)
{ {
await this.actor.addCondition("blinded"); await this.actor.addCondition("blinded");
} }

View File

@@ -1,8 +1,8 @@
let test = await this.actor.setupCharacteristic("wp", {skipTargets: true, appendTitle : ` - ${this.effect.name}`}) let test = await this.actor.setupCharacteristic("wp", {skipTargets: true, appendTitle : ` - ${this.effect.name}`})
await Test.roll(); await test.roll();
let opposedResult = Test.opposedMessages[0]?.system.opposedHandler?.resultMessage?.system.opposedTest?.result let opposedResult = test.opposedMessages[0]?.system.opposedHandler?.resultMessage?.system.opposedTest?.result
if (opposedResult?.winner == "attacker") if (opposedResult?.winner == "attacker")
{ {

View File

@@ -1,7 +1,7 @@
let test = await this.actor.setupCharacteristic("t", { appendTitle: ` - ${this.effect.name}`, fields: { difficulty: "challenging" } }) let test = await this.actor.setupCharacteristic("t", { appendTitle: ` - ${this.effect.name}`, fields: { difficulty: "challenging" } })
await Test.roll(); await test.roll();
if (Test.Échoué) if (test.failed)
{ {
let ageAdded = Math.ceil(CONFIG.Dice.randomUniform() * 10) + Math.ceil(CONFIG.Dice.randomUniform() * 10) let ageAdded = Math.ceil(CONFIG.Dice.randomUniform() * 10) + Math.ceil(CONFIG.Dice.randomUniform() * 10)
let ws = Math.ceil(CONFIG.Dice.randomUniform() * 10) let ws = Math.ceil(CONFIG.Dice.randomUniform() * 10)

View File

@@ -1,5 +1,5 @@
if (args.opposedTest.result.differenceSL >= 0 && args.opposedTest.result.differenceSL <= 2 && args.opposedTest.result.winner == "attacker") if (args.opposedTest.result.differenceSL >= 0 && args.opposedTest.result.differenceSL <= 2 && args.opposedTest.result.winner == "attacker")
{ {
this.script.message(`Becomes lodged in the armour or flesh of the opponent. See @UUID[${this.item.uuid}]{${this.item.name}}.`, speaker : {alias : this.item.name}, {blind: true, whisper : ChatMessage.getWhisperRecipients("GM")}) this.script.message(`Becomes lodged in the armour or flesh of the opponent. See @UUID[${this.item.uuid}]{${this.item.name}}.`, {speaker : {alias : this.item.name}, blind: true, whisper : ChatMessage.getWhisperRecipients("GM")})
} }

View File

@@ -1,7 +1,7 @@
let test = await this.actor.setupCharacteristic("wp", {skipTargets: true, appendTitle : ` - ${this.effect.name}`}) let test = await this.actor.setupCharacteristic("wp", {skipTargets: true, appendTitle : ` - ${this.effect.name}`})
await Test.roll(); await test.roll();
// Kind of insane but whatever // Kind of insane but whatever
let opposedResult = Test.opposedMessages[0]?.system.opposedHandler?.resultMessage?.system.opposedTest?.result let opposedResult = test.opposedMessages[0]?.system.opposedHandler?.resultMessage?.system.opposedTest?.result
return opposedResult?.winner == "attacker"; return opposedResult?.winner == "attacker";

View File

@@ -1,6 +1,6 @@
if (args.test.characteristicKey == "wp") if (args.test.characteristicKey == "wp")
{ {
if (args.Test.Échoué) if (args.test.failed)
{ {
let item = await fromUuid("Compendium.wfrp4e-core.items.AGcJl5rHjkyIQBPP") let item = await fromUuid("Compendium.wfrp4e-core.items.AGcJl5rHjkyIQBPP")
let data = item.toObject(); let data = item.toObject();

View File

@@ -1,9 +1,9 @@
let location = this.item.system.location.key let location = this.item.system.location.key
let test = await this.actor.setupCharacteristic("dex", {context : {failure : `<strong>${this.effect.name}</strong>: Lâchez l'objet!`}, skipTargets: true, appendTitle : " - " + this.effect.name, fields : {difficulty : "average"}}) let test = await this.actor.setupCharacteristic("dex", {context : {failure : `<strong>${this.effect.name}</strong>: Lâchez l'objet!`}, skipTargets: true, appendTitle : " - " + this.effect.name, fields : {difficulty : "average"}})
await Test.roll(); await test.roll();
if (location && Test.Échoué) if (location && test.failed)
{ {
let dropped = this.item.system.weaponsAtLocation; let dropped = this.item.system.weaponsAtLocation;

View File

@@ -1,6 +1,6 @@
if (args.test.characteristicKey == "wp") if (args.test.characteristicKey == "wp")
{ {
if (args.Test.Échoué) if (args.test.failed)
{ {
this.actor.createEmbeddedDocuments("ActiveEffect", [game.wfrp4e.config.symptomEffects["malaise"]]) this.actor.createEmbeddedDocuments("ActiveEffect", [game.wfrp4e.config.symptomEffects["malaise"]])
this.script.message(`Test de FM échoué, <b>${this.actor.prototypeToken.name}</b> gains @Condition[Malaise] for [[1d10]] hours`, {whisper: ChatMessage.getWhisperRecipients("GM")}) this.script.message(`Test de FM échoué, <b>${this.actor.prototypeToken.name}</b> gains @Condition[Malaise] for [[1d10]] hours`, {whisper: ChatMessage.getWhisperRecipients("GM")})

View File

@@ -1,6 +1,6 @@
let test = await this.actor.setupSkill(game.i18n.localize("NAME.Cool"), {appendTitle : ` - ${this.effect.name}`, fields : {difficulty : "difficult", slBonus : -1 * this.effect.sourceTest.result.SL}}) let test = await this.actor.setupSkill(game.i18n.localize("NAME.Cool"), {appendTitle : ` - ${this.effect.name}`, fields : {difficulty : "difficult", slBonus : -1 * this.effect.sourceTest.result.SL}})
await Test.roll(); await test.roll();
if (Test.succeeded) if (test.succeeded)
{ {
this.script.notification(`Résistance à ${this.effect.name}`); this.script.notification(`Résistance à ${this.effect.name}`);
} }

View File

@@ -1,8 +1,8 @@
if (args.totalWoundLoss > 0) if (args.totalWoundLoss > 0)
{ {
args.actor.setupCharacteristic("t", {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields: { difficulty: "difficult" } }).then(async Test => { args.actor.setupCharacteristic("t", {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields: { difficulty: "difficult" } }).then(async Test => {
await Test.roll(); await test.roll();
if (Test.Échoué) if (test.failed)
{ {
await args.actor.addCondition("poisoned") await args.actor.addCondition("poisoned")
this.script.message(await args.actor.applyBasicDamage(3, {suppressMsg : true, damageType: game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL })) this.script.message(await args.actor.applyBasicDamage(3, {suppressMsg : true, damageType: game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL }))

View File

@@ -1,6 +1,6 @@
let test = await this.actor.setupCharacteristic("t", {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields : {difficulty : "hard"}}) let test = await this.actor.setupCharacteristic("t", {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields : {difficulty : "hard"}})
await Test.roll(); await test.roll();
if (Test.Échoué) if (test.failed)
{ {
let roll = await new Roll("1d10").roll({allowInteractive : false}); let roll = await new Roll("1d10").roll({allowInteractive : false});
roll.toMessage(this.script.getChatData()) roll.toMessage(this.script.getChatData())

View File

@@ -1,2 +1,2 @@
args.totalWoundLoss = Math.max(0, args.totalWoundLoss - 1) args.totalWoundLoss = Math.max(0, args.totalWoundLoss - 1)
args.modifiers.other.push({label : this.effect.name, value : -1) args.modifiers.other.push({label : this.effect.name, value : -1})

View File

@@ -1,8 +1,8 @@
let test = await this.actor.setupCharacteristic("t", {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields : {difficulty : "vhard"}}); let test = await this.actor.setupCharacteristic("t", {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields : {difficulty : "vhard"}});
await Test.roll(); await test.roll();
CorruptionMessageModel.createCorruptionMessage("minor", this.script.getChatData()) CorruptionMessageModel.createCorruptionMessage("minor", this.script.getChatData())
if (Test.Échoué) if (test.failed)
{ {
this.actor.addCondition("unconscious"); this.actor.addCondition("unconscious");
} }