`;
+ message += `Exemples: `;
+ message += `/voyage - Liste toutes les villes de départ `;
+ message += `/voyage Altdorf - Liste les destinations depuis Altdorf `;
+ message += `/voyage Altdorf Nuln - Affiche les détails de voyage entre Altdorf et Nuln`;
+ message += `
`;
+ } else if (fromTown) {
+ console.log("TravelV2: Branche: Liste des destinations depuis une ville");
+ // Lister toutes les destinations possibles depuis une ville (avec pathfinding)
+ const normalizedFrom = PathFinder.findCityInGraph(this.roadGraph, fromTown);
+
+ if (normalizedFrom) {
+ message += `
Destinations depuis ${normalizedFrom}
`;
+ message += `
Toutes les villes accessibles (routes directes et itinéraires calculés)
`;
+
+ // Récupérer toutes les villes du graphe sauf la ville de départ
+ const allCities = Object.keys(this.roadGraph)
+ .filter(city => city.toLowerCase() !== normalizedFrom.toLowerCase())
+ .sort((a, b) => a.localeCompare(b));
+
+ // Afficher toutes les destinations
+ for (const city of allCities) {
+ message += `
";
+ return message;
+ }
+}
diff --git a/modules/travelv2/debug-display.js b/modules/travelv2/debug-display.js
new file mode 100644
index 0000000..0969307
--- /dev/null
+++ b/modules/travelv2/debug-display.js
@@ -0,0 +1,30 @@
+/**
+ * Script de débogage pour vérifier l'affichage du message
+ */
+
+// Vérifier que les données sont chargées
+console.log("=== DEBUG DISPLAY ===");
+console.log("travel_data:", game.wfrp4e.travelv2.travel_data);
+console.log("Nombre de routes:", game.wfrp4e.travelv2.travel_data?.length);
+
+// Générer le message manuellement comme le fait la fonction
+let message = "";
+message += `
Acquis 3 états Empoisonné qui ne peuvent pas être résistés au début du round.
+
Récupération de ${this.actor.system.characteristics.t.bonus} Blessures
+
Acquisition du Trait de Créature Régénération.
- C'est à Ranaldde choisir si la régénératin peut guérir de l'empoisonnement.
-
Lorsque tout les états Empoisonnés sont terminés, le Trait Régénération est perdu également.
`,
- { whisper: ChatMessage.getWhisperRecipients("GM"), blind: true })
+ C’est à Ranald de décider si leur régénération peut dépasser leur empoisonnement.
+
Lorsque tous les états Empoisonné sont perdus, la Régénération l’est aussi.
`,
+ { whisper: ChatMessage.getWhisperRecipients("GM"), blind: true })
diff --git a/scripts/07tvKnPT8ICtv2us.js b/scripts/07tvKnPT8ICtv2us.js
new file mode 100644
index 0000000..c172e06
--- /dev/null
+++ b/scripts/07tvKnPT8ICtv2us.js
@@ -0,0 +1,3 @@
+if (args.test.result.misfire && args.test.result.roll !== 100) {
+ delete args.test.result.misfire
+}
\ No newline at end of file
diff --git a/scripts/0BP5l7bIkf744G1k.js b/scripts/0BP5l7bIkf744G1k.js
index 22f117a..ef2b1c2 100644
--- a/scripts/0BP5l7bIkf744G1k.js
+++ b/scripts/0BP5l7bIkf744G1k.js
@@ -1 +1 @@
-return !args.options.terror && !args.extendedTest?.flags.wfrp4e?.fear
\ No newline at end of file
+return !args.context.terror && !args.extendedTest?.flags.wfrp4e?.fear
\ No newline at end of file
diff --git a/scripts/0FNOq4J1AdPd2A0q.js b/scripts/0FNOq4J1AdPd2A0q.js
deleted file mode 100644
index ed69d87..0000000
--- a/scripts/0FNOq4J1AdPd2A0q.js
+++ /dev/null
@@ -1 +0,0 @@
-return !args.skill?.name.includes(game.i18n.localize("NAME.Row")) && !args.skill?.name.includes(game.i18n.localize("NAME.Sail"));
\ No newline at end of file
diff --git a/scripts/0FWto1oEr3jbWggw.js b/scripts/0FWto1oEr3jbWggw.js
index deb265e..9dd91cc 100644
--- a/scripts/0FWto1oEr3jbWggw.js
+++ b/scripts/0FWto1oEr3jbWggw.js
@@ -1,4 +1,4 @@
-let spells = await warhammer.utility.findAllItems("spell", "Chargement des sorts")
+let spells = await warhammer.utility.findAllItems("spell", "Chargement des sorts", true, ["system.lore.value"])
let text = (await game.wfrp4e.tables.rollTable("random-caster", {hideDSN: true})).result
@@ -6,15 +6,15 @@ lore = Array.from(text.matchAll(/{(.+?)}/gm))[0][1]
if (text == "GM's Choice")
{
- return this.script.scriptNotification(text)
+ return this.script.notification(text)
}
if (spellsWithLore.length > 0)
{
let spellsWithLore = spells.filter(i => game.wfrp4e.config.magicLores[i.system.lore.value] == lore)
let selectedSpell = spellsWithLore[Math.floor(CONFIG.Dice.randomUniform() * spellsWithLore.length)]
- this.script.scriptNotification(selectedSpell.name);
- this.actor.createEmbeddedDocuments("Item", [selectedSpell])
+ this.script.notification(selectedSpell.name);
+ this.actor.createEmbeddedDocuments("Item", [(await fromUuid(selectedSpell)).toObject()])
}
else
{
diff --git a/scripts/0H2syk6qc0sCY0pj.js b/scripts/0H2syk6qc0sCY0pj.js
new file mode 100644
index 0000000..713877c
--- /dev/null
+++ b/scripts/0H2syk6qc0sCY0pj.js
@@ -0,0 +1,4 @@
+if ( args.actor.has(game.i18n.localize("NAME.AA"), "talent") ||
+args.actor.has(game.i18n.localize("NAME.SecondSight"), "talent") ) {
+ args.modifiers.other.push({label : this.effect.name, value : 5, details : "La Cible possède Harmonisation Aethyrique ou Seconde Vue"});
+}
\ No newline at end of file
diff --git a/scripts/0IAc5VFR2ogXOaGE.js b/scripts/0IAc5VFR2ogXOaGE.js
new file mode 100644
index 0000000..a2f0ee3
--- /dev/null
+++ b/scripts/0IAc5VFR2ogXOaGE.js
@@ -0,0 +1 @@
+return args.characteristic != "int" || args.type != "characteristic"
\ No newline at end of file
diff --git a/scripts/0NAD1LNcVyAZ1fC7.js b/scripts/0NAD1LNcVyAZ1fC7.js
new file mode 100644
index 0000000..fd83f3a
--- /dev/null
+++ b/scripts/0NAD1LNcVyAZ1fC7.js
@@ -0,0 +1 @@
+return args.skill?.name !== game.i18n.localize("NAME.Cool") && args.skill?.name !== game.i18n.localize("NAME.Résistance");
\ No newline at end of file
diff --git a/scripts/0PzfGjGhHQbxEwlb.js b/scripts/0PzfGjGhHQbxEwlb.js
new file mode 100644
index 0000000..c5b016c
--- /dev/null
+++ b/scripts/0PzfGjGhHQbxEwlb.js
@@ -0,0 +1 @@
+this.item.update({"system.AP" : {lArm : 0, rArm : 0, lLeg : 0, rLeg: 0}});
\ No newline at end of file
diff --git a/scripts/0R0QAr3D024kWPfo.js b/scripts/0R0QAr3D024kWPfo.js
index ee3ed07..3ac6d60 100644
--- a/scripts/0R0QAr3D024kWPfo.js
+++ b/scripts/0R0QAr3D024kWPfo.js
@@ -1,7 +1,7 @@
let table = game.wfrp4e.tables.findTable("mutatephys");
if (!table)
{
- return ui.notifications.error("La table des Mutations n'a pas été trouvée. Assurez vous que la table avec la clé `mutatephys` est bien importée dans le monde.")
+ return ui.notifications.error("Table de Mutation introuvable, veuillez vous assurer qu'une table avec la clé `mutatephys` est importée dans le monde.")
}
let result = (await table.roll()).results[0];
let uuid = `Compendium.${result.documentCollection}.${result.documentId}`
@@ -9,10 +9,10 @@ let item = await fromUuid(uuid);
if (item)
{
- this.script.scriptNotification(`${item.name} added`)
+ this.script.notification(`${item.name} added`)
this.actor.createEmbeddedDocuments("Item", [item])
}
-else
+else
{
- ui.notifications.error("L'item ne peut être trouvé: " + uuid)
+ ui.notifications.error("Impossible de trouver l'objet : " + uuid)
}
\ No newline at end of file
diff --git a/scripts/0Uly7OmkH0zqYbxQ.js b/scripts/0Uly7OmkH0zqYbxQ.js
index 70ed1ac..f522907 100644
--- a/scripts/0Uly7OmkH0zqYbxQ.js
+++ b/scripts/0Uly7OmkH0zqYbxQ.js
@@ -6,7 +6,7 @@ if (location)
if (dropped.length)
{
- this.script.scriptNotification(`Lache ${dropped.map(i => i.name).join(", ")}!`)
+ this.script.notification(`Lache ${dropped.map(i => i.name).join(", ")}!`)
for(let weapon of dropped)
{
await weapon.system.toggleEquip();
@@ -16,6 +16,6 @@ if (location)
let roll = await new Roll("max(1, 1d10 - @system.characteristics.t.bonus)", this.actor).roll()
-roll.toMessage(this.script.getChatData({flavor : `${this.effect.name} (Durée)`}));
+roll.toMessage(this.script.getChatData({flavor : `${this.effet.name} (Durée)`}));
-this.effect.updateSource({"duration.rounds" : roll.total})
\ No newline at end of file
+this.effet.updateSource({"duration.rounds" : roll.total})
\ No newline at end of file
diff --git a/scripts/0YKQGbsKdHSmYGE7.js b/scripts/0YKQGbsKdHSmYGE7.js
deleted file mode 100644
index bb5ad3c..0000000
--- a/scripts/0YKQGbsKdHSmYGE7.js
+++ /dev/null
@@ -1,9 +0,0 @@
-if (args.skill?.name != game.i18n.localize("NAME.Gossip"))
-{
- return true;
-}
-else
-{
- args.data.canReverse = true; // Kind of a kludge here, the talent Tests has a specific condition, but the description simply says "any gossip test can be reversed" so check it here instead of submission
-}
-
\ No newline at end of file
diff --git a/scripts/0abwNjpzo3SbEOeO.js b/scripts/0abwNjpzo3SbEOeO.js
index c4345be..e67d89b 100644
--- a/scripts/0abwNjpzo3SbEOeO.js
+++ b/scripts/0abwNjpzo3SbEOeO.js
@@ -1,6 +1,6 @@
-if (args.applyAP && args.modifiers.ap.metal)
+if (args.applyAP && args.modifiers.ap.metal)
{
args.modifiers.ap.ignored += args.modifiers.ap.metal
- args.modifiers.ap.details.push("" + this.effect.name + ": Ignore le mtal (" + args.modifiers.ap.metal + ")");
+ args.modifiers.ap.details.push("" + this.effect.name + ": Ignorer Métal (" + args.modifiers.ap.metal + ")");
args.modifiers.ap.metal = 0
}
\ No newline at end of file
diff --git a/scripts/0amHqfjTRp5ff6Op.js b/scripts/0amHqfjTRp5ff6Op.js
new file mode 100644
index 0000000..7e6972e
--- /dev/null
+++ b/scripts/0amHqfjTRp5ff6Op.js
@@ -0,0 +1,3 @@
+let wounds = this.effect.sourceActor.system.characteristics.wp.bonus;
+this.actor.modifyWounds(wounds);
+this.script.message(`Soigne ${wounds} Blessures`);
\ No newline at end of file
diff --git a/scripts/0hAbiNR1nFkpFMRz.js b/scripts/0hAbiNR1nFkpFMRz.js
new file mode 100644
index 0000000..56432f6
--- /dev/null
+++ b/scripts/0hAbiNR1nFkpFMRz.js
@@ -0,0 +1 @@
+if (!this.actor.has(game.i18n.localize("NAME.SecondSight"),"talent")) this.actor.addEffectItems("Compendium.wfrp4e-core.items.Item.OEjUvJKi0xmBwbS2", this.effect)
\ No newline at end of file
diff --git a/scripts/0hgTyeaEhMBLwzUn.js b/scripts/0hgTyeaEhMBLwzUn.js
new file mode 100644
index 0000000..3f3ba56
--- /dev/null
+++ b/scripts/0hgTyeaEhMBLwzUn.js
@@ -0,0 +1,5 @@
+let fearCounter = this.item.effects.filter(i => i.name == this.effect.name).length;
+
+fearCounter += Number(this.actor.has("Peur")?.system.specification.value) || 0
+
+game.wfrp4e.utility.postPeur(fearCounter || 1, this.effect.name)
\ No newline at end of file
diff --git a/scripts/0jTqyz0wRlK6XPF7.js b/scripts/0jTqyz0wRlK6XPF7.js
index 6961383..5770541 100644
--- a/scripts/0jTqyz0wRlK6XPF7.js
+++ b/scripts/0jTqyz0wRlK6XPF7.js
@@ -1,4 +1,4 @@
if (args.test.spell)
{
- args.test.result.other.push(`${this.effect.name}: Automatic Failure`)
+ args.test.result.other.push(`${this.effect.name}: Echec Automatique`)
}
\ No newline at end of file
diff --git a/scripts/0kUalAsb4OhtYbaJ.js b/scripts/0kUalAsb4OhtYbaJ.js
new file mode 100644
index 0000000..5e22b47
--- /dev/null
+++ b/scripts/0kUalAsb4OhtYbaJ.js
@@ -0,0 +1 @@
+return args.item?.system?.attackType == "ranged" && !this.actor.system.canFly.effects.filter(e => e.name == "Flying")[0].disabled
\ No newline at end of file
diff --git a/scripts/0mrUnxzufYgsR0Ph.js b/scripts/0mrUnxzufYgsR0Ph.js
deleted file mode 100644
index 2c22c29..0000000
--- a/scripts/0mrUnxzufYgsR0Ph.js
+++ /dev/null
@@ -1,7 +0,0 @@
-this.actor.setupSkill(game.i18n.localize("NAME.Cool"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`}).then(async test => {
- await test.roll()
- if (test.failed)
- {
- this.actor.addCondition("stunned")
- }
-})
diff --git a/scripts/0uUxvBLJC76WIIBC.js b/scripts/0uUxvBLJC76WIIBC.js
new file mode 100644
index 0000000..fc4206b
--- /dev/null
+++ b/scripts/0uUxvBLJC76WIIBC.js
@@ -0,0 +1,3 @@
+let species = await ValueDialog.create({text : "Saisir l'espèce cible (singulier)", title : this.effect.name})
+
+this.effect.updateSource({name : this.effect.setSpecifier(species)});
\ No newline at end of file
diff --git a/scripts/0wR0LWpfhLFA240I.js b/scripts/0wR0LWpfhLFA240I.js
new file mode 100644
index 0000000..6a4b29b
--- /dev/null
+++ b/scripts/0wR0LWpfhLFA240I.js
@@ -0,0 +1,7 @@
+let value = await ValueDialog.create({
+ title : this.script.label,
+ text: "Notes de Victoire pour le Journal d'Expérience"
+});
+value
+ ? this.actor.system.awardExp(50, value)
+ : this.actor.system.awardExp(50, this.script.label)
\ No newline at end of file
diff --git a/scripts/0wmIC2MssUX6LW3N.js b/scripts/0wmIC2MssUX6LW3N.js
new file mode 100644
index 0000000..ca4adae
--- /dev/null
+++ b/scripts/0wmIC2MssUX6LW3N.js
@@ -0,0 +1,4 @@
+if (args.test.options.doomboltRolled)
+{
+ args.test.result.damage += 4;
+}
\ No newline at end of file
diff --git a/scripts/0yyofYHeDRQlFliO.js b/scripts/0yyofYHeDRQlFliO.js
index dda0e0e..6beb512 100644
--- a/scripts/0yyofYHeDRQlFliO.js
+++ b/scripts/0yyofYHeDRQlFliO.js
@@ -1 +1 @@
-return args.options.terror || args.extendedTest?.flags.wfrp4e?.fear
\ No newline at end of file
+return args.context.terror || args.extendedTest?.flags.wfrp4e?.fear
\ No newline at end of file
diff --git a/scripts/11uCC0mK2uL783al.js b/scripts/11uCC0mK2uL783al.js
index 951bdf7..100b843 100644
--- a/scripts/11uCC0mK2uL783al.js
+++ b/scripts/11uCC0mK2uL783al.js
@@ -1,6 +1,6 @@
let type = this.item.getFlag("wfrp4e", "breath");
-if (["feu", "electricité", "poison"].includes(type))
+if (["fire", "electricity", "poison"].includes(type))
{
args.applyAP = false;
}
\ No newline at end of file
diff --git a/scripts/18MeEQ0As3JvER71.js b/scripts/18MeEQ0As3JvER71.js
index 122146a..596e73b 100644
--- a/scripts/18MeEQ0As3JvER71.js
+++ b/scripts/18MeEQ0As3JvER71.js
@@ -2,6 +2,6 @@ let state = !this.effect.disabled;
this.effect.update({"disabled": state});
if (state)
- return ui.notifications.info("EFFECT.CreatureBackInWater", {localize: true})
+ return ui.notifications.info("Effet.CreatureBackInWater", {localize: true})
-return ui.notifications.info("EFFECT.CreatureOutOfWater", {localize: true});
\ No newline at end of file
+return ui.notifications.info("Effet.CreatureOutOfWater", {localize: true});
\ No newline at end of file
diff --git a/scripts/190PHSHKGaJ74wsR.js b/scripts/190PHSHKGaJ74wsR.js
index 803ba72..2ada486 100644
--- a/scripts/190PHSHKGaJ74wsR.js
+++ b/scripts/190PHSHKGaJ74wsR.js
@@ -1,31 +1,31 @@
-if (!this.item.name.includes("(") || this.item.system.tests.value.includes("Terrain"))
+if (!this.item.name.includes("(") || this.item.system.Tests.value.includes("Terrain") || this.item.system.Tests.value.toLowerCase().includes("(any)"))
{
- let tests = this.item.system.tests.value
+ let Tests = this.item.system.Tests.value
let name = this.item.name
- // If name already specifies, make sure tests value reflects that
- if (name.includes("("))
+ // If name already specifies, make sure Tests value reflects that
+ if (name.includes("(") && !name.toLowerCase().includes("(any)"))
{
let terrain = name.split("(")[1].split(")")[0]
- tests = tests.replace("Terrain", terrain)
+ tests = tests.replace("the Terrain", terrain)
}
else // If no sense specified, provide dialog choice
{
let choice = await ItemDialog.create(ItemDialog.objectToArray({
- coastal : "Côtes",
+ coastal : "Littoral",
deserts : "Déserts",
- marshes : "Marches",
- rocky : "Rocailles",
- tundra : "Tundra",
- woodlands : "Forêts"
- }, this.item.img), 1, "Choisir le Terrain");
+ marshes : "Marécages",
+ rocky : "Rocailleux",
+ tundra : "Toundra",
+ woodlands : "Régions boisées"
+ }, this.item.img), 1, "Choisissez un Terrain");
if (choice[0])
{
name = `${name.split("(")[0].trim()} (${choice[0].name})`
- tests = tests.replace("Terrain", "Terrain " + choice[0].name )
+ tests = tests.replace("Terrain", choice[0].name + " Terrain")
}
}
- this.effect.updateSource({name})
+ this.effet.updateSource({name})
this.item.updateSource({name, "system.tests.value" : tests})
}
\ No newline at end of file
diff --git a/scripts/1A87vGLh2PXH0rG0.js b/scripts/1A87vGLh2PXH0rG0.js
deleted file mode 100644
index 8a4090c..0000000
--- a/scripts/1A87vGLh2PXH0rG0.js
+++ /dev/null
@@ -1 +0,0 @@
-return !args.skill?.name.includes(game.i18n.localize("NAME.Language"));
\ No newline at end of file
diff --git a/scripts/1BT0MWM2cbhlEnrn.js b/scripts/1BT0MWM2cbhlEnrn.js
index 9a091ad..7da6342 100644
--- a/scripts/1BT0MWM2cbhlEnrn.js
+++ b/scripts/1BT0MWM2cbhlEnrn.js
@@ -14,13 +14,13 @@
let updateObj = this.actor.toObject();
- let talents = (await Promise.all([game.wfrp4e.tables.rollTable("talents"), game.wfrp4e.tables.rollTable("talents"), game.wfrp4e.tables.rollTable("talents")])).map(i => i.text)
-
+ let talents = (await Promise.tout([game.wfrp4e.tables.rollTable("talents"), game.wfrp4e.tables.rollTable("talents"), game.wfrp4e.tables.rollTable("talents")])).map(i => i.text)
+
for (let ch in characteristics)
{
updateObj.system.characteristics[ch].modifier += characteristics[ch];
}
-
+
for (let talent of talents)
{
let talentItem = await game.wfrp4e.utility.findTalent(talent)
@@ -28,13 +28,12 @@
{
items.push(talentItem.toObject());
}
- else
+ else
{
ui.notifications.warn(`Impossible de trouver ${talent}`, {permanent : true})
}
}
-
-
+
+
await this.actor.update(updateObj)
this.actor.createEmbeddedDocuments("Item", items);
-
diff --git a/scripts/1CeYp5MlPcH68UIw.js b/scripts/1CeYp5MlPcH68UIw.js
index db14547..73f3491 100644
--- a/scripts/1CeYp5MlPcH68UIw.js
+++ b/scripts/1CeYp5MlPcH68UIw.js
@@ -10,12 +10,12 @@ let characteristics = {
"wp" : 10,
"fel" : 10
}
-let skills = ["Intimidate", "Commandement" , "Perception"]
+let skills = ["Intimidation", "Commandement", "Perception"]
let skillAdvancements = [10, 10, 10]
-let talents = ["Combat Aware", "Drilled", "Menaçant", "Robust"]
-let trappings = ["Arme simple", "Mail Coat", "Mail Chausses"]
-let specialItems = [
-]
+let talents = ["Vigilance", "Coude-à-coude", "Menaçant", "Robuste"]
+let trappings = ["Arme simple", "Cotte de Mailles", "Chausses de Mailles"]
+let specialItems = [
+]
let items = [];
let updateObj = this.actor.toObject();
@@ -28,11 +28,11 @@ for (let ch in characteristics)
for (let item of specialItems) {
let newItem
if (item.type == "weapon") {
- newItem = new ItemWfrp4e({ name: item.name, type: item.type, system: { equipped: true, damage: {value: item.damage}} })
+ newItem = new ItemWFRP4e({ name: item.name, type: item.type, system: { equipped: true, damage: {value: item.damage}} })
} else if (item.type == "trapping") {
- newItem = new ItemWfrp4e({ img: "systems/wfrp4e/icons/blank.png", name: item.name, type: item.type, system: { worn: true, trappingType: { value: item.trappingType} } } )
+ newItem = new ItemWFRP4e({ img: "systems/wfrp4e/icons/blank.png", name: item.name, type: item.type, system: { worn: true, trappingType: { value: item.trappingType} } } )
} else {
- newItem = new ItemWfrp4e({ img: "systems/wfrp4e/icons/blank.png", name: item.name, type: item.type })
+ newItem = new ItemWFRP4e({ img: "systems/wfrp4e/icons/blank.png", name: item.name, type: item.type })
}
items.push(newItem.toObject())
}
@@ -44,7 +44,7 @@ for (let index = 0; index < skills.length; index++)
skillItem = updateObj.items.find(i => i.name == skill && i.type == "skill")
if (skillItem)
skillItem.system.advances.value += skillAdvancements[index]
- else
+ else
{
skillItem = await game.wfrp4e.utility.findSkill(skill)
skillItem = skillItem.toObject();
@@ -60,13 +60,13 @@ for (let talent of talents)
{
items.push(talentItem.toObject());
}
- else
+ else
{
ui.notifications.warn(`Impossible de trouver ${talent}`, {permanent : true})
}
}
-for (let trapping of trappings)
+for (let trapping of trappings)
{
let trappingItem = await game.wfrp4e.utility.findItem(trapping)
if (trappingItem)
@@ -77,13 +77,13 @@ for (let trapping of trappings)
items.push(trappingItem);
}
- else
+ else
{
- ui.notifications.warn(`Impossible de trouver ${trapping}`, {permanent : true})
+ ui.notifications.warn(`Could not find ${trapping}`, {permanent : true})
}
}
-updateObj.name = updateObj.name += " " + this.effect.name
+updateObj.name = updateObj.name += " " + this.effet.name
await this.actor.update(updateObj)
this.actor.createEmbeddedDocuments("Item", items);
\ No newline at end of file
diff --git a/scripts/1Du4e27M8WgP2iui.js b/scripts/1Du4e27M8WgP2iui.js
new file mode 100644
index 0000000..2e22950
--- /dev/null
+++ b/scripts/1Du4e27M8WgP2iui.js
@@ -0,0 +1,10 @@
+if (args.equipped === true && this.actor.name !== "Kurgorn Three-eyes")
+{
+ this.actor.addCondition("blinded", 1, {"statuses" : ["blinded", "blind"]})
+ this.script.notification(`Aveuglé en portant ${this.item.name}`);
+}
+
+if (args.equipped === false && this.actor.name !== "Kurgorn Three-eyes")
+{
+ this.actor.removeCondition("blinded")
+}
\ No newline at end of file
diff --git a/scripts/1JwxZujbDcueLWBL.js b/scripts/1JwxZujbDcueLWBL.js
index 133c071..efdc349 100644
--- a/scripts/1JwxZujbDcueLWBL.js
+++ b/scripts/1JwxZujbDcueLWBL.js
@@ -1,2 +1,2 @@
await this.actor.addCondition("ablaze", 2)
-await this.script.scriptMessage(await this.actor.applyBasicDamage(this.effect.sourceTest.result.damage, {suppressMsg: true}))
\ No newline at end of file
+await this.script.message(await this.actor.applyBasicDamage(this.effect.sourceTest.result.damage, {suppressMsg: true}))
\ No newline at end of file
diff --git a/scripts/1LDSzXeO5CzXgTOc.js b/scripts/1LDSzXeO5CzXgTOc.js
deleted file mode 100644
index 031e1ac..0000000
--- a/scripts/1LDSzXeO5CzXgTOc.js
+++ /dev/null
@@ -1 +0,0 @@
-return args.skill?.name.includes(game.i18n.localize("NAME.Channelling")) || args.skill?.name == `${game.i18n.localize("NAME.Language")} (${game.i18n.localize("SPEC.Magick")})`
\ No newline at end of file
diff --git a/scripts/1OpT3CXs07XFWWCT.js b/scripts/1OpT3CXs07XFWWCT.js
index 4e10bbf..04ab65b 100644
--- a/scripts/1OpT3CXs07XFWWCT.js
+++ b/scripts/1OpT3CXs07XFWWCT.js
@@ -1 +1 @@
-args.options.cardsharp = true;
\ No newline at end of file
+args.context.cardsharp = true;
\ No newline at end of file
diff --git a/scripts/1PPh4vHd5sPKtudZ.js b/scripts/1PPh4vHd5sPKtudZ.js
new file mode 100644
index 0000000..e467951
--- /dev/null
+++ b/scripts/1PPh4vHd5sPKtudZ.js
@@ -0,0 +1 @@
+this.actor.addEffectItems("Compendium.wfrp4e-core.items.Item.eowbsW6oHGSNJmxV", this.effect)
\ No newline at end of file
diff --git a/scripts/1UvL0XA1EpQtjDNn.js b/scripts/1UvL0XA1EpQtjDNn.js
new file mode 100644
index 0000000..e52f4bc
--- /dev/null
+++ b/scripts/1UvL0XA1EpQtjDNn.js
@@ -0,0 +1,8 @@
+let effects = this.item.effects.contents.filter(i => i.id != this.effect.id);
+
+let choice = await ItemDialog.create(effects, 1, {title : this.effect.name, text: "Choisissez une Rune"});
+
+if (choice[0])
+{
+ choice[0].performEffectApplication();
+}
\ No newline at end of file
diff --git a/scripts/1ZArMNUI8qqH6zkX.js b/scripts/1ZArMNUI8qqH6zkX.js
index 8bee756..137943c 100644
--- a/scripts/1ZArMNUI8qqH6zkX.js
+++ b/scripts/1ZArMNUI8qqH6zkX.js
@@ -1,7 +1,6 @@
-let test = await args.actor.setupCharacteristic("wp", {skipTargets: true, appendTitle : " - " + this.effect.name, context : {failure: "Gain d'un état Assomé"}})
-await test.roll();
-if (test.failed)
+let test = await args.actor.setupCharacteristic("wp", {skipTargets: true, appendTitle : " - " + this.effet.name, context : {failure: "Gain de 1 état Sonné"}})
+await Test.roll();
+if (Test.Échoué)
{
args.actor.addCondition("stunned")
}
-
diff --git a/scripts/1exiWlVUHsXDLLAH.js b/scripts/1exiWlVUHsXDLLAH.js
index 5a275f6..dcfb22c 100644
--- a/scripts/1exiWlVUHsXDLLAH.js
+++ b/scripts/1exiWlVUHsXDLLAH.js
@@ -1 +1 @@
-this.script.scriptNotification(`Ne peut saisir ${this.effect.name}!`);
\ No newline at end of file
+this.script.notification(`Impossible d'entrer dans ${this.effect.name} !`);
\ No newline at end of file
diff --git a/scripts/1fQr1Dg7DX0vfz3r.js b/scripts/1fQr1Dg7DX0vfz3r.js
index 206a4f6..01c32fa 100644
--- a/scripts/1fQr1Dg7DX0vfz3r.js
+++ b/scripts/1fQr1Dg7DX0vfz3r.js
@@ -1,3 +1,3 @@
let healed = parseInt(this.effect.sourceTest.result.SL)
this.actor.modifyWounds(healed)
-this.script.scriptMessage(`Soins de ${healed} Blessures`)
\ No newline at end of file
+this.script.message(`Soin de ${healed} Blessures`)
\ No newline at end of file
diff --git a/scripts/1jQq9v8fXK8zuEBU.js b/scripts/1jQq9v8fXK8zuEBU.js
index f6758b8..65b2107 100644
--- a/scripts/1jQq9v8fXK8zuEBU.js
+++ b/scripts/1jQq9v8fXK8zuEBU.js
@@ -11,10 +11,10 @@ let APused = Math.max(0, APatLoc.value - metalAP); // remove metal AP at locatio
damage -= (APused + this.actor.system.characteristics.t.bonus)
let msg = await this.actor.applyBasicDamage(damage, {suppressMsg : true, damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});
-msg += ` (ignore ${metalAP} PA de métal sur ${game.wfrp4e.config.locations[loc]})`
-this.script.scriptMessage(msg)
+msg += ` (Ignore ${metalAP} PA de métal sur ${game.wfrp4e.config.locations[loc]})`
+this.script.message(msg)
-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();
if (test.failed)
this.actor.addCondition("stunned");
\ No newline at end of file
diff --git a/scripts/1kB2su7hLRYDhZ2H.js b/scripts/1kB2su7hLRYDhZ2H.js
deleted file mode 100644
index 61a4ede..0000000
--- a/scripts/1kB2su7hLRYDhZ2H.js
+++ /dev/null
@@ -1,19 +0,0 @@
-let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {skipTargets: true, appendTitle : " - " + this.effect.name})
-await test.roll();
-if (!test.succeeded)
-{
- let item = await fromUuid("Compendium.wfrp4e-core.items.ZhMADOqoo0y8Q9bx")
- let data = item.toObject();
- if (this.item.system.location.key == "rLeg")
- {
- data.system.location.value = "Pied droit"
- data.system.location.key = "rToe";
- }
- else if (this.item.system.location.key == "lLeg")
- {
- data.system.location.value = "Pied gauche"
- data.system.location.key = "lToe";
- }
- this.actor.createEmbeddedDocuments("Item", [data])
-}
-this.effect.delete();
\ No newline at end of file
diff --git a/scripts/1l7Jz2ZHbAWko7Vm.js b/scripts/1l7Jz2ZHbAWko7Vm.js
index ac7048c..d1c741a 100644
--- a/scripts/1l7Jz2ZHbAWko7Vm.js
+++ b/scripts/1l7Jz2ZHbAWko7Vm.js
@@ -1 +1 @@
-args.options.ballockKnife = true;
\ No newline at end of file
+args.context.ballockKnife = true;
\ No newline at end of file
diff --git a/scripts/1mNkLj9JYNr3ofC6.js b/scripts/1mNkLj9JYNr3ofC6.js
deleted file mode 100644
index d64facd..0000000
--- a/scripts/1mNkLj9JYNr3ofC6.js
+++ /dev/null
@@ -1,7 +0,0 @@
-this.actor.setupSkill(game.i18n.localize("NAME.Cool"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`}).then(async test => {
- await test.roll();
- if (test.failed)
- {
- this.actor.addCondition("stunned", 3)
- }
-})
\ No newline at end of file
diff --git a/scripts/1wKVvxRTHOyV4Qdv.js b/scripts/1wKVvxRTHOyV4Qdv.js
deleted file mode 100644
index 2ea9f2a..0000000
--- a/scripts/1wKVvxRTHOyV4Qdv.js
+++ /dev/null
@@ -1 +0,0 @@
-return !args.skill?.name?.includes(game.i18n.localize("NAME.Sail"))
\ No newline at end of file
diff --git a/scripts/1wrPvP6lJwIAfmsl.js b/scripts/1wrPvP6lJwIAfmsl.js
index 9e40d5a..8e1bf0e 100644
--- a/scripts/1wrPvP6lJwIAfmsl.js
+++ b/scripts/1wrPvP6lJwIAfmsl.js
@@ -1,4 +1,4 @@
-let choice = await ItemDialog.create(ItemDialog.objectToArray(game.wfrp4e.config.locations), 1, "Choisir une localisation");
+let choice = await ItemDialog.create(ItemDialog.objectToArray(game.wfrp4e.config.locations), 1, "Choisir la localisation");
let location = choice[0].id;
diff --git a/scripts/1yOvw74jzFfaI87b.js b/scripts/1yOvw74jzFfaI87b.js
index 73649e3..29f9688 100644
--- a/scripts/1yOvw74jzFfaI87b.js
+++ b/scripts/1yOvw74jzFfaI87b.js
@@ -1 +1 @@
-return args.options.reload
+return args.context.reload
diff --git a/scripts/20fvE9nJmcfGYVzw.js b/scripts/20fvE9nJmcfGYVzw.js
new file mode 100644
index 0000000..5b3137c
--- /dev/null
+++ b/scripts/20fvE9nJmcfGYVzw.js
@@ -0,0 +1,8 @@
+if ( args.totalWoundLoss > 0 ) {
+ let test = await this.actor.setupSkill(game.i18n.localize("NAME.Résistance"), {difficulty: "average"})
+ await test.roll();
+ if (!test.succeeded)
+ {
+ this.actor.addSystemEffect("gangrene");
+ }
+}
\ No newline at end of file
diff --git a/scripts/22PMOW0G5MWiBQmg.js b/scripts/22PMOW0G5MWiBQmg.js
new file mode 100644
index 0000000..81c1db6
--- /dev/null
+++ b/scripts/22PMOW0G5MWiBQmg.js
@@ -0,0 +1,4 @@
+let fear = await fromUuid("Compendium.wfrp4e-core.items.Item.pTorrE0l3VybAbtn")
+fear = fear.toObject();
+fear.system.specification.value = 1;
+await this.actor.createEmbeddedDocuments("Item", [fear], {fromEffect : this.effect.id})
\ No newline at end of file
diff --git a/scripts/22bW97lkvCqisfHX.js b/scripts/22bW97lkvCqisfHX.js
deleted file mode 100644
index 5ab83db..0000000
--- a/scripts/22bW97lkvCqisfHX.js
+++ /dev/null
@@ -1 +0,0 @@
-return args.type != "channelling" && !args.skill?.name.includes(game.i18n.localize("NAME.Channelling"))
\ No newline at end of file
diff --git a/scripts/23HgjCB1oecxANvA.js b/scripts/23HgjCB1oecxANvA.js
deleted file mode 100644
index 275f379..0000000
--- a/scripts/23HgjCB1oecxANvA.js
+++ /dev/null
@@ -1,5 +0,0 @@
-if (args.item.range && args.item.range.bands)
-{
-args.item.range.bands[game.i18n.localize("Long Range")].modifier = 0
-args.item.range.bands[game.i18n.localize("Extreme")].modifier /= 2
-}
\ No newline at end of file
diff --git a/scripts/23vWiHUjxtRQ3Efz.js b/scripts/23vWiHUjxtRQ3Efz.js
index 27078fa..5fdc693 100644
--- a/scripts/23vWiHUjxtRQ3Efz.js
+++ b/scripts/23vWiHUjxtRQ3Efz.js
@@ -1,4 +1,4 @@
let item = await fromUuid("Compendium.wfrp4e-core.items.eWPN3CV2Eddwz8aM")
let data = item.toObject();
-data.system.location.value = "Dos"
+data.system.location.value = "Back"
this.actor.createEmbeddedDocuments("Item", [data], {fromEffect: this.effect.id})
\ No newline at end of file
diff --git a/scripts/2AOo7KUyzMrgIlgM.js b/scripts/2AOo7KUyzMrgIlgM.js
index 2982f22..efcc387 100644
--- a/scripts/2AOo7KUyzMrgIlgM.js
+++ b/scripts/2AOo7KUyzMrgIlgM.js
@@ -1 +1 @@
-game.wfrp4e.utility.postCorruptionTest(this.item.system.specification.value, {speaker : {alias: this.actor.prototypeToken.name}})
\ No newline at end of file
+CorruptionMessageModel.createCorruptionMessage(this.item.system.specification.value, {speaker : {alias: this.actor.prototypeToken.name}})
\ No newline at end of file
diff --git a/scripts/2AdSBXw7IwCiqawQ.js b/scripts/2AdSBXw7IwCiqawQ.js
deleted file mode 100644
index 00a7def..0000000
--- a/scripts/2AdSBXw7IwCiqawQ.js
+++ /dev/null
@@ -1 +0,0 @@
-return args.skill?.name == game.i18n.localize("NAME.Bribery") || args.skill?.name.includes(game.i18n.localize("NAME.Stealth"));
\ No newline at end of file
diff --git a/scripts/2EAYX5G9Fh3HJwiP.js b/scripts/2EAYX5G9Fh3HJwiP.js
new file mode 100644
index 0000000..c2a5681
--- /dev/null
+++ b/scripts/2EAYX5G9Fh3HJwiP.js
@@ -0,0 +1,6 @@
+let broken = this.actor.hasCondition("broken");
+
+if (broken) {
+ broken.delete();
+ this.script.notification("Etat Brisé supprimé.");
+}
\ No newline at end of file
diff --git a/scripts/KTBVDHUndI3qDOXM.js b/scripts/2Ej6LUqn8frTRURo.js
similarity index 56%
rename from scripts/KTBVDHUndI3qDOXM.js
rename to scripts/2Ej6LUqn8frTRURo.js
index b9aa611..a825d0e 100644
--- a/scripts/KTBVDHUndI3qDOXM.js
+++ b/scripts/2Ej6LUqn8frTRURo.js
@@ -1,6 +1,6 @@
-let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"))
+let test = await this.actor.setupSkill(game.i18n.localize("NAME.Cool"), {difficulty: "hard"})
await test.roll();
if (!test.succeeded)
{
- args.actor.addCondition("stunned")
+ await this.actor.addCondition("unconscious");
}
\ No newline at end of file
diff --git a/scripts/2IPTF0akWw9y48br.js b/scripts/2IPTF0akWw9y48br.js
new file mode 100644
index 0000000..9023ff5
--- /dev/null
+++ b/scripts/2IPTF0akWw9y48br.js
@@ -0,0 +1,3 @@
+return !this.item.equipped.value
+ || !args?.weapon
+ || !(["goblin"].includes(args.target.Species.toLowerCase()))
\ No newline at end of file
diff --git a/scripts/2NLINicPQWbuvp2n.js b/scripts/2NLINicPQWbuvp2n.js
deleted file mode 100644
index f98dd93..0000000
--- a/scripts/2NLINicPQWbuvp2n.js
+++ /dev/null
@@ -1 +0,0 @@
-return args.item?.name != game.i18n.localize("NAME.Navigation")
\ No newline at end of file
diff --git a/scripts/2QB0LjueuJcIaHaC.js b/scripts/2QB0LjueuJcIaHaC.js
index aeaf157..f4f1e6d 100644
--- a/scripts/2QB0LjueuJcIaHaC.js
+++ b/scripts/2QB0LjueuJcIaHaC.js
@@ -3,7 +3,7 @@ if (isNaN(parseInt(this.item.system.specification.value)))
let value = this.item.specifier;
if (!value)
{
- value = await ValueDialog.create({text : "Enter Armour value", title : this.effect.name});
+ value = await ValueDialog.create({text : "Entrez la valeur d'Armure", title : this.effect.name});
}
if (value)
{
diff --git a/scripts/2Qi1hwLYhdE6v6Hs.js b/scripts/2Qi1hwLYhdE6v6Hs.js
index 2782756..cc12394 100644
--- a/scripts/2Qi1hwLYhdE6v6Hs.js
+++ b/scripts/2Qi1hwLYhdE6v6Hs.js
@@ -1,7 +1,7 @@
if (!["rLeg", "lLeg"].includes(this.effect.getFlag("wfrp4e", "location")))
return true;
-if (args.options.dodge)
+if (args.context.dodge)
{
args.abort = true;
this.script.scriptNotification("Impossible d'Esquiver!")
diff --git a/scripts/2S6XlGCdRlXuaaVw.js b/scripts/2S6XlGCdRlXuaaVw.js
new file mode 100644
index 0000000..1cf92ec
--- /dev/null
+++ b/scripts/2S6XlGCdRlXuaaVw.js
@@ -0,0 +1 @@
+this.actor.system.status.corruption.value += 1
\ No newline at end of file
diff --git a/scripts/2VNnVrtktdGUqXEV.js b/scripts/2VNnVrtktdGUqXEV.js
deleted file mode 100644
index 38a1edd..0000000
--- a/scripts/2VNnVrtktdGUqXEV.js
+++ /dev/null
@@ -1,9 +0,0 @@
-if (args.totalWoundLoss > 0)
-{
- let test = await args.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`})
- await test.roll();
- if (test.failed && parseInt(args.opposedTest.attackerTest.result.SL) > 0)
- {
- args.actor.addCondition("stunned", parseInt(args.opposedTest.attackerTest.result.SL))
- }
-}
\ No newline at end of file
diff --git a/scripts/2W9uMTT6iJhfQ044.js b/scripts/2W9uMTT6iJhfQ044.js
deleted file mode 100644
index 2c067f6..0000000
--- a/scripts/2W9uMTT6iJhfQ044.js
+++ /dev/null
@@ -1,19 +0,0 @@
-let skill = `${game.i18n.localize("NAME.Trade")} (${this.item.parenthesesText})`
-let currentCareer = this.actor.system.currentCareer;
-let existingSkill = this.actor.itemTypes.skill.find(i => i.name == skill);
-
-if (!currentCareer) return
-
-
-let inCurrentCareer = currentCareer.system.skills.concat(currentCareer.system.addedSkills).includes(skill);
-let craftsmanAdded = this.actor.getFlag("wfrp4e", "craftsmanAdded") || {};
-if (existingSkill && inCurrentCareer && !craftsmanAdded[existingSkill.name])
-{
- existingSkill.system.advances.costModifier = -5;
-}
-else
-{
- craftsmanAdded[skill] = true;
- currentCareer.system.addedSkills.push(skill);
- foundry.utils.setProperty(this.actor, "flags.wfrp4e.craftsmanAdded", craftsmanAdded)
-}
\ No newline at end of file
diff --git a/scripts/2WSN306tL4apjRtD.js b/scripts/2WSN306tL4apjRtD.js
deleted file mode 100644
index f43717a..0000000
--- a/scripts/2WSN306tL4apjRtD.js
+++ /dev/null
@@ -1,4 +0,0 @@
-let item = await fromUuid("Compendium.wfrp4e-core.items.9h82z72XGo9tfgQS")
-let data = item.toObject();
-data.name = data.name += " (Ouïe)"
-this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id})
\ No newline at end of file
diff --git a/scripts/2XXqxAF5s5Sws6qj.js b/scripts/2XXqxAF5s5Sws6qj.js
new file mode 100644
index 0000000..67a9784
--- /dev/null
+++ b/scripts/2XXqxAF5s5Sws6qj.js
@@ -0,0 +1 @@
+this.actor.system.status.corruption.value += 2
\ No newline at end of file
diff --git a/scripts/2XaJNYUMQAmSOsqi.js b/scripts/2XaJNYUMQAmSOsqi.js
new file mode 100644
index 0000000..705d20d
--- /dev/null
+++ b/scripts/2XaJNYUMQAmSOsqi.js
@@ -0,0 +1,9 @@
+const {targetUuid} = this.effect.flags.wfrp4e;
+
+if (args.attacker.uuid !== targetUuid) return;
+
+let recordedWounds = this.effect.getFlag("wfrp4e", "damageToReturn") ?? 0;
+
+recordedWounds += args.totalWoundLoss;
+
+this.effect.setFlag("wfrp4e", "damageToReturn", recordedWounds);
\ No newline at end of file
diff --git a/scripts/2Yh4vQm0ZJukRH1x.js b/scripts/2Yh4vQm0ZJukRH1x.js
new file mode 100644
index 0000000..7578d05
--- /dev/null
+++ b/scripts/2Yh4vQm0ZJukRH1x.js
@@ -0,0 +1 @@
+return !args.skill?.name.includes("Focalisation");
\ No newline at end of file
diff --git a/scripts/2cKarG9ToyW2ptCd.js b/scripts/2cKarG9ToyW2ptCd.js
index bdeca2b..8a7390d 100644
--- a/scripts/2cKarG9ToyW2ptCd.js
+++ b/scripts/2cKarG9ToyW2ptCd.js
@@ -6,5 +6,5 @@ if (this.item.system.quantity.value)
}
else
{
- this.script.scriptNotification("Vide !", "error")
+ this.script.notification("Plus rien !", "error")
}
\ No newline at end of file
diff --git a/scripts/2hzDv8ROulOe1elK.js b/scripts/2hzDv8ROulOe1elK.js
deleted file mode 100644
index 1a9e5bd..0000000
--- a/scripts/2hzDv8ROulOe1elK.js
+++ /dev/null
@@ -1 +0,0 @@
-return args.skill?.name.includes(game.i18n.localize("NAME.Lore"));
\ No newline at end of file
diff --git a/scripts/2kRwCc31fuZgrsy8.js b/scripts/2kRwCc31fuZgrsy8.js
new file mode 100644
index 0000000..4c08a9e
--- /dev/null
+++ b/scripts/2kRwCc31fuZgrsy8.js
@@ -0,0 +1 @@
+CorruptionMessageModel.createCorruptionMessage("major", this.script.getChatData());
\ No newline at end of file
diff --git a/scripts/2rzxQlL7A9ujZ9uK.js b/scripts/2rzxQlL7A9ujZ9uK.js
index 4c9c7f1..52779f1 100644
--- a/scripts/2rzxQlL7A9ujZ9uK.js
+++ b/scripts/2rzxQlL7A9ujZ9uK.js
@@ -1,6 +1,6 @@
if (args.opposedTest.result.winner == "attacker") {
if (args.opposedTest.defenderTest.weapon && args.opposedTest.defenderTest.item.properties.qualities.shield) {
- ui.notifications.notify(`${this.effect.name}: Gain de ${this.item.Advances} Avantages`)
+ ui.notifications.notify(`${this.effect.name}: Gain de ${this.item.Advances} Avantage(s)`)
this.actor.setAdvantage(this.item.Advances)
}
}
\ No newline at end of file
diff --git a/scripts/2sDH6RvoOAR40oqH.js b/scripts/2sDH6RvoOAR40oqH.js
deleted file mode 100644
index 6efdf20..0000000
--- a/scripts/2sDH6RvoOAR40oqH.js
+++ /dev/null
@@ -1,20 +0,0 @@
-
-
-if (!["Goblin", "Orc"].includes(this.actor.system.details.species.value)) {
- let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), { appendTitle: ` - ${this.effect.name}` })
- await test.roll();
- if (test.failed) {
- let infection = await fromUuid("Compendium.wfrp4e-core.items.Item.1hQuVFZt9QnnbWzg")
- this.actor.createEmbeddedDocuments("Item", [infection])
- }
-}
-
-// Since wounds change when the effect is deleted, need to wait until after
-// the max wounds have been recalculated to apply damage
-game.wfrp4e.utility.sleep(1000).then(async () => {
- let roll = await new Roll("1d10").roll();
-
- roll.toMessage(this.script.getChatData());
- this.script.scriptMessage(await this.actor.applyBasicDamage(roll.total, { damageType: game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL, suppressMsg: true }))
-
-})
\ No newline at end of file
diff --git a/scripts/2uyajbon5QX1CewS.js b/scripts/2uyajbon5QX1CewS.js
new file mode 100644
index 0000000..256bb19
--- /dev/null
+++ b/scripts/2uyajbon5QX1CewS.js
@@ -0,0 +1 @@
+return args.skill?.name == "Voile (Aéronavale)"
\ No newline at end of file
diff --git a/scripts/2vTVR0quRZQtjNfQ.js b/scripts/2vTVR0quRZQtjNfQ.js
deleted file mode 100644
index fa60eaf..0000000
--- a/scripts/2vTVR0quRZQtjNfQ.js
+++ /dev/null
@@ -1,18 +0,0 @@
-let currentCareer = this.actor.system.currentCareer;
-if (!currentCareer)
-{
- return;
-}
-
-let talents = ["Harmonisation Aethyrique",
-"Magie des Arcanes (Domaine)",
-"Magie du Chaos (Tzeentch)",
-"Mains agiles",
-"Diction Instinctive",
-"Sens de la Magie",
-"Magie Mineure",
-"Seconde Vue",
-"Mage de guerre",
-"Sorcier!"].filter(t => !currentCareer.system.talents.includes(t))
-
-currentCareer.system.talents = currentCareer.system.talents.concat(talents)
\ No newline at end of file
diff --git a/scripts/2yW0kuwLfgRzJR2S.js b/scripts/2yW0kuwLfgRzJR2S.js
new file mode 100644
index 0000000..bc0883a
--- /dev/null
+++ b/scripts/2yW0kuwLfgRzJR2S.js
@@ -0,0 +1,2 @@
+const duration = 3600 * (1 + Number(this.effect.sourceTest.result.SL));
+this.effect.update({"duration.seconds": duration});
\ No newline at end of file
diff --git a/scripts/2yctEihGmdCfTTVx.js b/scripts/2yctEihGmdCfTTVx.js
index a6d16a1..3fcba0a 100644
--- a/scripts/2yctEihGmdCfTTVx.js
+++ b/scripts/2yctEihGmdCfTTVx.js
@@ -1,2 +1,2 @@
-args.data.canReverse = true;
-args.options.fieldDressing = true;
\ No newline at end of file
+args.data.reversal = {allowed : true, if: "success"};
+args.context.fieldDressing = true;
\ No newline at end of file
diff --git a/scripts/2zeP2nMSURjxrqYz.js b/scripts/2zeP2nMSURjxrqYz.js
index 674dd05..504a3fb 100644
--- a/scripts/2zeP2nMSURjxrqYz.js
+++ b/scripts/2zeP2nMSURjxrqYz.js
@@ -1,6 +1,6 @@
let wounds = this.actor.system.status.wounds
if (wounds.value == 0)
- return this.script.scriptNotification("Aucun effet à 0 Blessures", "error")
+ return this.script.notification("Aucun effet à 0 Blessures", "error")
-this.script.scriptNotification(`Soin de ${this.actor.characteristics.t.bonus} Blessures`)
+this.script.notification(`Soin de ${this.actor.characteristics.t.bonus} Blessures`)
await this.actor.modifyWounds(this.actor.characteristics.t.bonus)
\ No newline at end of file
diff --git a/scripts/33US8YRgaMqYu2We.js b/scripts/33US8YRgaMqYu2We.js
index 6569e71..74eed59 100644
--- a/scripts/33US8YRgaMqYu2We.js
+++ b/scripts/33US8YRgaMqYu2We.js
@@ -1 +1 @@
-return !args.options.handling
\ No newline at end of file
+return !args.context.handling
\ No newline at end of file
diff --git a/scripts/37UN17gb8suFeZIW.js b/scripts/37UN17gb8suFeZIW.js
index 145ebc8..5b2ea2b 100644
--- a/scripts/37UN17gb8suFeZIW.js
+++ b/scripts/37UN17gb8suFeZIW.js
@@ -1 +1 @@
-this.script.scriptMessage(await this.actor.applyBasicDamage(8, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_AP, suppressMsg: true}))
\ No newline at end of file
+this.script.message(await this.actor.applyBasicDamage(8, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_AP, suppressMsg: true}))
\ No newline at end of file
diff --git a/scripts/3CeKfDcMEVgQlcXm.js b/scripts/3CeKfDcMEVgQlcXm.js
new file mode 100644
index 0000000..368dd39
--- /dev/null
+++ b/scripts/3CeKfDcMEVgQlcXm.js
@@ -0,0 +1 @@
+await this.actor.addEffectItems("Compendium.wfrp4e-core.items.Item.5hH73j2NgPdsLCZN", this.effect, {name: "Haine (Tous les ennemis)"});
\ No newline at end of file
diff --git a/scripts/3D5ImpMgpOTPucvv.js b/scripts/3D5ImpMgpOTPucvv.js
index 72bd340..5d19d12 100644
--- a/scripts/3D5ImpMgpOTPucvv.js
+++ b/scripts/3D5ImpMgpOTPucvv.js
@@ -5,5 +5,5 @@ let SL = Math.floor(args.test.target / 10) - Math.floor(args.test.result.roll /
let ones = Number(args.test.result.roll.toString().split("").pop())
if (ones > SL)
- args.test.result.other.push(`${this.effect.name}: ${ones + args.test.successBonus + args.test.slBonus} DR`)
+ args.Test.result.other.push(`${this.effect.name}: ${ones + args.test.successBonus + args.test.slBonus} DR`)
}
\ No newline at end of file
diff --git a/scripts/3IGO7xEjRjat937X.js b/scripts/3IGO7xEjRjat937X.js
index 7362443..6505c0b 100644
--- a/scripts/3IGO7xEjRjat937X.js
+++ b/scripts/3IGO7xEjRjat937X.js
@@ -1,7 +1,7 @@
let fatigue = this.actor.hasCondition("fatigued")
if (fatigue)
{
- this.script.scriptNotification("Suppression de l'état Fatigué, effet désactivé.")
+ this.script.notification("Etat Extenué - Suppression de la condition Extenué, effet désactivé")
this.effect.update({disabled : true})
await this.actor.removeCondition("fatigued")
}
\ No newline at end of file
diff --git a/scripts/3JEzEzF1SeYA9lsV.js b/scripts/3JEzEzF1SeYA9lsV.js
deleted file mode 100644
index 0c45aea..0000000
--- a/scripts/3JEzEzF1SeYA9lsV.js
+++ /dev/null
@@ -1,44 +0,0 @@
-let choice = await ItemDialog.create(ItemDialog.objectToArray(game.wfrp4e.config.locations, this.effect.img), 1, "Choisissez Location");
-if (choice[0])
-{
- this.effect.updateSource({name : `${this.effect.name} (${choice[0].name})`})
-this.effect.updateSource({"flags.wfrp4e.location" : choice[0].id})
-}
-
-let location = choice[0].id;
-
-if (["lArm", "rArm"].includes(location))
-{
- let dropped = this.actor.itemTypes.weapon.filter(i => i.isEquipped & i.system.usesHands.includes(location));
-
- if (dropped.length)
- {
- this.script.scriptNotification(`Lache ${dropped.map(i => i.name).join(", ")}!`)
- for(let weapon of dropped)
- {
- await weapon.system.toggleEquip();
- }
- }
-}
-
-if (location == "body")
-{
- await this.actor.addCondition("fatigued");
- test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {fields : {difficulty : "hard"}, skipTargets: true, appendTitle : ` - ${this.effect.name}`})
- await test.roll();
- if (test.failed)
- {
- this.actor.addCondition("prone");
- }
-}
-
-if (location == "head")
-{
- await this.actor.addCondition("stunned");
- test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {fields : {difficulty : "average"}, skipTargets: true, appendTitle : ` - ${this.effect.name}`})
- await test.roll();
- if (test.failed)
- {
- this.actor.addCondition("unconscious");
- }
-}
\ No newline at end of file
diff --git a/scripts/3KH6OE7L7uJESI2Z.js b/scripts/3KH6OE7L7uJESI2Z.js
new file mode 100644
index 0000000..f13d15e
--- /dev/null
+++ b/scripts/3KH6OE7L7uJESI2Z.js
@@ -0,0 +1,5 @@
+if (["dragon"].includes(args.opposedTest.defender.details.species.value.toLowerCase()))
+ {
+ args.applyTB = false;
+ args.opposedTest.result.other.push("Wyrmslayer: Ignore le BE contre les Dragons")
+ }
\ No newline at end of file
diff --git a/scripts/3SuLF6SImYWEHMo2.js b/scripts/3SuLF6SImYWEHMo2.js
new file mode 100644
index 0000000..1d5ddc7
--- /dev/null
+++ b/scripts/3SuLF6SImYWEHMo2.js
@@ -0,0 +1 @@
+args.context.doombolt = true;
\ No newline at end of file
diff --git a/scripts/3eSaX0BeaUalNkEP.js b/scripts/3eSaX0BeaUalNkEP.js
index 077517d..c83f067 100644
--- a/scripts/3eSaX0BeaUalNkEP.js
+++ b/scripts/3eSaX0BeaUalNkEP.js
@@ -1 +1 @@
-return args.options.mutate
\ No newline at end of file
+return args.context.mutate
\ No newline at end of file
diff --git a/scripts/3hfMQkUKYI4rCuBy.js b/scripts/3hfMQkUKYI4rCuBy.js
deleted file mode 100644
index 7cf8f33..0000000
--- a/scripts/3hfMQkUKYI4rCuBy.js
+++ /dev/null
@@ -1 +0,0 @@
-return args.skill?.name != game.i18n.localize("NAME.CharmAnimal") && !args.skill?.name.includes(game.i18n.localize("NAME.AnimalTraining"));
\ No newline at end of file
diff --git a/scripts/3ixqbsEMfSSTzAXU.js b/scripts/3ixqbsEMfSSTzAXU.js
new file mode 100644
index 0000000..a545172
--- /dev/null
+++ b/scripts/3ixqbsEMfSSTzAXU.js
@@ -0,0 +1,12 @@
+const test = await this.actor.setupSkill(game.i18n.localize("NAME.Cool"), {
+ difficulty: "challenging",
+ context: {
+ failure: "Subi l'état @Condition[Fatigued] à cause de cauchemars.",
+ success: "A souffert de cauchemars, mais a assez bien dormi."
+ }
+});
+await test.roll();
+
+if (test.failed) {
+ await this.actor.addCondition("fatigued");
+}
\ No newline at end of file
diff --git a/scripts/3j8yybMaAZSwzxIE.js b/scripts/3j8yybMaAZSwzxIE.js
new file mode 100644
index 0000000..655e11f
--- /dev/null
+++ b/scripts/3j8yybMaAZSwzxIE.js
@@ -0,0 +1,21 @@
+let weaponData = await this.effect.setFlag("wfrp4e", "weaponData", this.item.system.toObject());
+
+try {
+
+
+ await this.item.update({
+ system: {
+ "weaponGroup.value": "throwing",
+ "qualities.value": this.item.system.qualities.value.concat([{ name: "accurate" }]),
+ "range.value": "SB * 3",
+ "consumesAmmo.value" : false
+ }
+ })
+
+ let test = await this.actor.setupWeapon(this.item, {}, {resolveClose : true});
+ await test?.roll();
+ this.item.update({ system: this.effect.getFlag("wfrp4e", "weaponData") })
+}
+catch (e) {
+ this.item.update({ system: this.effect.getFlag("wfrp4e", "weaponData") })
+}
\ No newline at end of file
diff --git a/scripts/3jm0NoYpgB6ZuUSl.js b/scripts/3jm0NoYpgB6ZuUSl.js
index a7b132e..7e6ffd3 100644
--- a/scripts/3jm0NoYpgB6ZuUSl.js
+++ b/scripts/3jm0NoYpgB6ZuUSl.js
@@ -1 +1 @@
-args.options.useOnesAttractive = true;
\ No newline at end of file
+args.context.useOnesAttractive = true;
\ No newline at end of file
diff --git a/scripts/3l7MQSa10Kve2K3P.js b/scripts/3l7MQSa10Kve2K3P.js
index 0d12a2b..fabe7f0 100644
--- a/scripts/3l7MQSa10Kve2K3P.js
+++ b/scripts/3l7MQSa10Kve2K3P.js
@@ -1,2 +1,2 @@
-this.script.scriptMessage(await this.actor.applyBasicDamage(Math.ceil(CONFIG.Dice.randomUniform() * 10) + 6, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_AP, suppressMsg : true}))
+this.script.message(await this.actor.applyBasicDamage(Math.ceil(CONFIG.Dice.randomUniform() * 10) + 6, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_AP, suppressMsg : true}))
this.actor.addCondition("ablaze");
\ No newline at end of file
diff --git a/scripts/3na3lnAt3bfysvcD.js b/scripts/3na3lnAt3bfysvcD.js
new file mode 100644
index 0000000..1e27fa4
--- /dev/null
+++ b/scripts/3na3lnAt3bfysvcD.js
@@ -0,0 +1,3 @@
+const blinded = this.actor.hasCondition("blinded");
+if (!blinded)
+ this.actor.addCondition("blinded");
\ No newline at end of file
diff --git a/scripts/3plV9WFqs2prfAdp.js b/scripts/3plV9WFqs2prfAdp.js
deleted file mode 100644
index 9ec91ac..0000000
--- a/scripts/3plV9WFqs2prfAdp.js
+++ /dev/null
@@ -1 +0,0 @@
-return !["NAME.Evaluate", "NAME.Gamble"].map(i => game.i18n.localize(i)).includes(args.skill?.name)
\ No newline at end of file
diff --git a/scripts/3sfD1nedXLzuYoXJ.js b/scripts/3sfD1nedXLzuYoXJ.js
deleted file mode 100644
index 674133f..0000000
--- a/scripts/3sfD1nedXLzuYoXJ.js
+++ /dev/null
@@ -1,4 +0,0 @@
-if (this.actor.hasCondition("surprised"))
-{
- this.actor.setupSkill(game.i18n.localize("NAME.Cool"), {fields : {difficulty : "average"}, skipTargets: true, appendTitle : " - " + this.effect.name}).then(test => test.roll())
-}
diff --git a/scripts/42UATqzohYML6a9t.js b/scripts/42UATqzohYML6a9t.js
new file mode 100644
index 0000000..59fb892
--- /dev/null
+++ b/scripts/42UATqzohYML6a9t.js
@@ -0,0 +1,3 @@
+if ( !this.actor.hasCondition("poisoned") ) {
+ this.effect.delete();
+}
\ No newline at end of file
diff --git a/scripts/454x3Q95pLvZm0Kx.js b/scripts/454x3Q95pLvZm0Kx.js
deleted file mode 100644
index 0072c5f..0000000
--- a/scripts/454x3Q95pLvZm0Kx.js
+++ /dev/null
@@ -1 +0,0 @@
-return args.skill?.name == game.i18n.localize("NAME.ConsumeAlcohol");
\ No newline at end of file
diff --git a/scripts/4AO7Fowek5sSmE4g.js b/scripts/4AO7Fowek5sSmE4g.js
new file mode 100644
index 0000000..ab27f28
--- /dev/null
+++ b/scripts/4AO7Fowek5sSmE4g.js
@@ -0,0 +1,14 @@
+const venomUUID = "Compendium.wfrp4e-core.items.gFkRm9wS65qe18Xv";
+const venom = this.actor.itemTags.trait.find(t => t.name === "Venin");
+
+if (venom) {
+ await this.effect.setFlag("wfrp4e-tribes", "venom", {
+ _id: venom.id,
+ "system.specification.value": venom.system.specification.value
+ });
+ await venom.update({"system.specification.value": "Difficult"});
+} else {
+ await this.actor.addEffectItems(venomUUID, this.effect, {
+ "system.specification.value": "Challenging"
+ });
+}
\ No newline at end of file
diff --git a/scripts/4FGKZk2f0xrmIDnp.js b/scripts/4FGKZk2f0xrmIDnp.js
deleted file mode 100644
index 59535fd..0000000
--- a/scripts/4FGKZk2f0xrmIDnp.js
+++ /dev/null
@@ -1 +0,0 @@
-return args.skill?.name != game.i18n.localize("NAME.Research") && !args.skill?.name?.includes(game.i18n.localize("NAME.Language"));
\ No newline at end of file
diff --git a/scripts/4KYraZSHAEYmL6xx.js b/scripts/4KYraZSHAEYmL6xx.js
new file mode 100644
index 0000000..02b6d74
--- /dev/null
+++ b/scripts/4KYraZSHAEYmL6xx.js
@@ -0,0 +1,4 @@
+if (this.item.equipped.value && args.totalWoundLoss > 10) {
+ args.totalWoundLoss = Math.min(10, args.totalWoundLoss)
+ args.extraMessages.push(`${this.effect.name}: Perte de Blessures limitée à 10`)
+}
\ No newline at end of file
diff --git a/scripts/4MQ7u4INxp51oyyR.js b/scripts/4MQ7u4INxp51oyyR.js
index df7b1a2..feb325f 100644
--- a/scripts/4MQ7u4INxp51oyyR.js
+++ b/scripts/4MQ7u4INxp51oyyR.js
@@ -10,10 +10,10 @@ let characteristics = {
"wp" : 25,
"fel" : 10
}
-let skills = ["Calme", "Esquive", "Intimidate", "Intuition", "Commandement" , "Lore (Warfare)", "Perception"]
+let skills = ["Calme", "Esquive", "Intimidation", "Intuition", "Commandement", "Savoir (Guerre)", "Perception"]
let skillAdvancements = [15, 15, 15, 15, 15, 10, 10]
-let talents = ["Combat Aware", "Combat Reflexes", "Feint", "Inspiring", "Resolute", "War Leader"]
-let trappings = ["Arme simple", "Shield"]
+let talents = ["Vigilance", "Combat Instinctif", "Feinte", "Inspiring", "Déterminé", "Seigneur de guerre"]
+let trappings = ["Arme simple", "Bouclier"]
let items = [];
let updateObj = this.actor.toObject();
@@ -30,7 +30,7 @@ for (let index = 0; index < skills.length; index++)
skillItem = updateObj.items.find(i => i.name == skill && i.type == "skill")
if (skillItem)
skillItem.system.advances.value += skillAdvancements[index]
- else
+ else
{
skillItem = await game.wfrp4e.utility.findSkill(skill)
skillItem = skillItem.toObject();
@@ -46,13 +46,13 @@ for (let talent of talents)
{
items.push(talentItem.toObject());
}
- else
+ else
{
ui.notifications.warn(`Impossible de trouver ${talent}`, {permanent : true})
}
}
-for (let trapping of trappings)
+for (let trapping of trappings)
{
let trappingItem = await game.wfrp4e.utility.findItem(trapping)
if (trappingItem)
@@ -63,13 +63,13 @@ for (let trapping of trappings)
items.push(trappingItem);
}
- else
+ else
{
ui.notifications.warn(`Impossible de trouver ${trapping}`, {permanent : true})
}
}
-updateObj.name = updateObj.name += " " + this.effect.name
+updateObj.name = updateObj.name += " " + this.effet.name
await this.actor.update(updateObj)
this.actor.createEmbeddedDocuments("Item", items);
\ No newline at end of file
diff --git a/scripts/4OlwxU60UqKg81yb.js b/scripts/4OlwxU60UqKg81yb.js
index 5fa28d1..c2c0b4f 100644
--- a/scripts/4OlwxU60UqKg81yb.js
+++ b/scripts/4OlwxU60UqKg81yb.js
@@ -1,6 +1,6 @@
const target = args.actor;
-if (target.has("Ethereal") || target.has("Corruption")) {
+if (target.has("Éthéré") || target.has("Corruption")) {
args.totalWoundLoss += 6;
args.modifiers.other.push({label: this.effect.name, value: 6})
}
\ No newline at end of file
diff --git a/scripts/4Q3Mp04O2sMgKv9x.js b/scripts/4Q3Mp04O2sMgKv9x.js
new file mode 100644
index 0000000..85ada34
--- /dev/null
+++ b/scripts/4Q3Mp04O2sMgKv9x.js
@@ -0,0 +1 @@
+return !args.title.includes("Spellbreaking")
\ No newline at end of file
diff --git a/scripts/4ZR7p8G3OzOBWx0L.js b/scripts/4ZR7p8G3OzOBWx0L.js
deleted file mode 100644
index 6e89db8..0000000
--- a/scripts/4ZR7p8G3OzOBWx0L.js
+++ /dev/null
@@ -1 +0,0 @@
-return args.skill?.name !== game.i18n.localize("NAME.Endurance");
\ No newline at end of file
diff --git a/scripts/4fnTKgl0HW9ZrWyJ.js b/scripts/4fnTKgl0HW9ZrWyJ.js
deleted file mode 100644
index 2b3f659..0000000
--- a/scripts/4fnTKgl0HW9ZrWyJ.js
+++ /dev/null
@@ -1,10 +0,0 @@
-this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields: {difficulty : "average"}}).then(async test =>
-{
- await test.roll()
- if (test.failed)
- {
- let char = Math.ceil(CONFIG.Dice.randomUniform() * 2) == 2 ? "s" : "t";
- this.script.scriptMessage(`${this.actor.name} perd 1 point de ${game.wfrp4e.config.characteristics[char]}`)
- this.actor.update({[`system.characteristics.${char}.initial`] : this.actor.system.characteristics[char].initial - 1})
- }
-})
\ No newline at end of file
diff --git a/scripts/4iu3CmOI19soOYuA.js b/scripts/4iu3CmOI19soOYuA.js
new file mode 100644
index 0000000..0004c62
--- /dev/null
+++ b/scripts/4iu3CmOI19soOYuA.js
@@ -0,0 +1,50 @@
+let characteristics = {
+ "ws" : -10,
+ "bs" : -10,
+ "s" : 0,
+ "t" : 0,
+ "i" : -10,
+ "ag" : -10,
+ "dex" : 0,
+ "int" : -200,
+ "wp" : -200,
+ "fel" : -200
+}
+let traits = [ {name:"Armure", value: 2}, {name:"Fabriqué"}, {name:"Vision dans l'obscurité"}, {name:"Peur", value: 2}, {name:"Insensible à la douleur"},{name:"Mort-vivant"},{name:"Instable"} ];
+let items = [];
+
+let updateObj = this.actor.toObject();
+for (let ch in characteristics)
+{
+ updateObj.system.characteristics[ch].modifier += characteristics[ch];
+}
+
+updateObj.system.characteristics.int.initial = 0;
+updateObj.system.characteristics.wp.initial = 0;
+updateObj.system.characteristics.fel.initial = 0;
+
+for (let trait of traits)
+{
+ let traitItem = await game.wfrp4e.utility.find(trait.name, "trait")
+ if (traitItem)
+ {
+ let t = traitItem.toObject();
+ t.system.specification.value = trait.value;
+ if (trait.disabled)
+ {
+ t.system.disabled = true;
+ }
+ items.push(t);
+ }
+ else
+ {
+ ui.notifications.warn(`Impossible de trouver ${trait.name}`, {permanent : true})
+ }
+}
+
+
+
+updateObj.name = updateObj.name += " " + this.effet.name
+
+await this.actor.update(updateObj)
+this.actor.createEmbeddedDocuments("Item", items);
diff --git a/scripts/4iuTz0uInAfMaoGl.js b/scripts/4iuTz0uInAfMaoGl.js
deleted file mode 100644
index d3f97d5..0000000
--- a/scripts/4iuTz0uInAfMaoGl.js
+++ /dev/null
@@ -1 +0,0 @@
-return args.skill?.name?.includes(game.i18n.localize("NAME.Language")) || args.type == "cast"
\ No newline at end of file
diff --git a/scripts/4jLe2XZQVUB8LztP.js b/scripts/4jLe2XZQVUB8LztP.js
new file mode 100644
index 0000000..c2c4432
--- /dev/null
+++ b/scripts/4jLe2XZQVUB8LztP.js
@@ -0,0 +1 @@
+args.fields.slBonus += this.effect.getFlag("wfrp4e", "slBonus") || 0;
\ No newline at end of file
diff --git a/scripts/4pQW4WLyhjbZR85k.js b/scripts/4pQW4WLyhjbZR85k.js
deleted file mode 100644
index ffdc6ea..0000000
--- a/scripts/4pQW4WLyhjbZR85k.js
+++ /dev/null
@@ -1,7 +0,0 @@
-let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields : {difficulty : "average"}, context : {failure: "1 Corruption Point Gained"}})
-await test.roll();
-if (test.failed && this.actor.type == "character")
-{
- this.actor.update({"system.status.corruption.value" : parseInt(this.actor.status.corruption.value) + 1})
- this.script.scriptMessage("Gain d'un Point de Corruption", {whisper : ChatMessage.getWhisperRecipients("GM")})
-}
\ No newline at end of file
diff --git a/scripts/4rTmV3TNxctUe0ly.js b/scripts/4rTmV3TNxctUe0ly.js
index 30a0737..83e509e 100644
--- a/scripts/4rTmV3TNxctUe0ly.js
+++ b/scripts/4rTmV3TNxctUe0ly.js
@@ -1,6 +1,6 @@
-let test = await this.actor.setupCharacteristic("ag", {skipTargets: true, appendTitle : ` - ${this.effect.name}`});
-await test.roll();
-if (test.failed)
+let test = await this.actor.setupCharacteristic("ag", {skipTargets: true, appendTitle : ` - ${this.effet.name}`});
+await Test.roll();
+if (Test.Échoué)
{
this.actor.addCondition("bleeding");
}
diff --git a/scripts/4rb7LfMq9CTnlrpn.js b/scripts/4rb7LfMq9CTnlrpn.js
deleted file mode 100644
index 214bdc9..0000000
--- a/scripts/4rb7LfMq9CTnlrpn.js
+++ /dev/null
@@ -1,10 +0,0 @@
-if (args.totalWoundLoss > 0)
-{
- let test = await args.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {skipTargets: true, appendTitle : " - " + this.effect.name})
- await test.roll();
- if (test.failed)
- {
- args.totalWoundLoss += 5;
- args.modifiers.other.push({label : this.effect.name, value : 5})
- }
-}
\ No newline at end of file
diff --git a/scripts/4ylzjgUdHY5D0yVh.js b/scripts/4ylzjgUdHY5D0yVh.js
index 561499c..436668d 100644
--- a/scripts/4ylzjgUdHY5D0yVh.js
+++ b/scripts/4ylzjgUdHY5D0yVh.js
@@ -10,12 +10,12 @@ let characteristics = {
"wp" : 25,
"fel" : 10
}
-let skills = ["Calme", "Esquive", "Intimidate", "Intuition", "Langue (Battle)", "Commandement" , "Lore (Warfare)", "Perception"]
+let skills = ["Calme", "Esquive", "Intimidation", "Intuition", "Langue (Bataille)", "Commandement", "Savoir (Guerre)", "Perception"]
let skillAdvancements = [15, 15, 15, 15, 10, 15, 10, 10]
-let talents = ["Combat Aware", "Combat Master", "Combat Reflexes", "Inspiring", "Resolute", "War Leader"]
-let trappings = ["Arme simple", "Shield", "Plate Breastplate", "Plate Bracers", "Plate Helm", "Plate Leggings"]
-let specialItems = []
+let talents = ["Vigilance", "Maîtrise du combat", "Combat Instinctif", "Inspiring", "Déterminé", "Seigneur de guerre"]
+let trappings = ["Arme simple", "Bouclier", "Plastron d'acier", "Brassards", "Heaume", "Jambières d'acier"]
+let specialItems = []
let items = [];
let updateObj = this.actor.toObject();
@@ -28,11 +28,11 @@ for (let ch in characteristics)
for (let item of specialItems) {
let newItem
if (item.type == "weapon") {
- newItem = new ItemWfrp4e({ name: item.name, type: item.type, system: { equipped: true, damage: {value: item.damage}} })
+ newItem = new ItemWFRP4e({ name: item.name, type: item.type, system: { equipped: true, damage: {value: item.damage}} })
} else if (item.type == "trapping") {
- newItem = new ItemWfrp4e({ img: "systems/wfrp4e/icons/blank.png", name: item.name, type: item.type, system: { worn: true, trappingType: { value: item.trappingType} } } )
+ newItem = new ItemWFRP4e({ img: "systems/wfrp4e/icons/blank.png", name: item.name, type: item.type, system: { worn: true, trappingType: { value: item.trappingType} } } )
} else {
- newItem = new ItemWfrp4e({ img: "systems/wfrp4e/icons/blank.png", name: item.name, type: item.type })
+ newItem = new ItemWFRP4e({ img: "systems/wfrp4e/icons/blank.png", name: item.name, type: item.type })
}
items.push(newItem.toObject())
}
@@ -44,7 +44,7 @@ for (let index = 0; index < skills.length; index++)
skillItem = updateObj.items.find(i => i.name == skill && i.type == "skill")
if (skillItem)
skillItem.system.advances.value += skillAdvancements[index]
- else
+ else
{
skillItem = await game.wfrp4e.utility.findSkill(skill)
skillItem = skillItem.toObject();
@@ -60,13 +60,13 @@ for (let talent of talents)
{
items.push(talentItem.toObject());
}
- else
+ else
{
ui.notifications.warn(`Impossible de trouver ${talent}`, {permanent : true})
}
}
-for (let trapping of trappings)
+for (let trapping of trappings)
{
let trappingItem = await game.wfrp4e.utility.findItem(trapping)
if (trappingItem)
@@ -77,7 +77,7 @@ for (let trapping of trappings)
items.push(trappingItem);
}
- else
+ else
{
ui.notifications.warn(`Impossible de trouver ${trapping}`, {permanent : true})
}
@@ -94,19 +94,19 @@ let filters = [
}
]
-items = items.concat(await ItemDialog.createFromFilters(filters, 1, "Choisissez an appropriate Polearm or Two-Handed Weapon"))
+items = items.concat(await ItemDialog.createFromFilters(filters, 1, {text : "Choisissez une arme d'hast ou une arme à deux mains appropriée"}))
-let ride = await Dialog.confirm({title : "Skill", content : "Add Chaos Steed and +20 Ride (Horse)?"})
+let ride = await foundry.applications.api.DialogV2.confirm({title : "Compétence", content : "Ajouter Chaos Steed et +20 en Monte (Cheval) ?", window : {title : this.effect.name}})
if (ride)
{
- let skill = await game.wfrp4e.utility.findSkill("Ride (Horse)")
+ let skill = await game.wfrp4e.utility.findSkill("Monte (Cheval)")
skill = skill.toObject();
skill.system.advances.value = 20;
items = items.concat({name : "Chaos Steed", type: "trapping", "system.trappingType.value" : "misc"}, skill)
}
-updateObj.name = updateObj.name += " " + this.effect.name
+updateObj.name = updateObj.name += " " + this.effet.name
await this.actor.update(updateObj)
this.actor.createEmbeddedDocuments("Item", items);
\ No newline at end of file
diff --git a/scripts/52mwb33mGrQjq89B.js b/scripts/52mwb33mGrQjq89B.js
deleted file mode 100644
index 33c3e75..0000000
--- a/scripts/52mwb33mGrQjq89B.js
+++ /dev/null
@@ -1 +0,0 @@
-return args.skill?.name != game.i18n.localize("NAME.Research");
\ No newline at end of file
diff --git a/scripts/55eYGvSXetDMK80S.js b/scripts/55eYGvSXetDMK80S.js
new file mode 100644
index 0000000..219704b
--- /dev/null
+++ b/scripts/55eYGvSXetDMK80S.js
@@ -0,0 +1,2 @@
+const diseaseIds = this.actor.items.filter(i => i.type == "disease").map(i => i.id)
+this.actor.deleteEmbeddedDocuments("Item", diseaseIds)
\ No newline at end of file
diff --git a/scripts/58rFc9HiBoX66J6p.js b/scripts/58rFc9HiBoX66J6p.js
index 7c3ebd8..69232b8 100644
--- a/scripts/58rFc9HiBoX66J6p.js
+++ b/scripts/58rFc9HiBoX66J6p.js
@@ -1,9 +1,9 @@
let sourceActor = this.effect.sourceActor;
let damage = args.totalWoundLoss;
let tb = sourceActor.system.characteristics.t.bonus
-args.abort = `${this.effect.name}: Dommages appliqués à ${sourceActor.name}`;
+args.abort = `${this.effect.name}: Dégâts appliqués à ${sourceActor.name}`;
let message = await sourceActor.applyBasicDamage(damage - tb, {damageType: game.wfrp4e.config.DAMAGE_TYPE.IGNORE_AP, suppressMsg : true})
-this.script.scriptMessage(message.replace(`${tb} TB`, `${tb} × 2 TB`))
+this.script.message(message.replace(`${tb} TB`, `${tb} × 2 TB`))
args.abort = true;
\ No newline at end of file
diff --git a/scripts/5DI6cHAg1LHo54Yv.js b/scripts/5DI6cHAg1LHo54Yv.js
index ecba952..9ff5752 100644
--- a/scripts/5DI6cHAg1LHo54Yv.js
+++ b/scripts/5DI6cHAg1LHo54Yv.js
@@ -1,5 +1,6 @@
if (args.opposedTest.result.differenceSL >= 0 && args.opposedTest.result.differenceSL <= 2 && args.opposedTest.result.winner == "attacker")
-{
+{
this.actor.update({"system.status.fortune.value" : Math.max(0, (this.actor.system.status.fortune?.value - 1) || 0)})
- this.script.scriptMessage(`1 Point de Fortune volé à ${this.actor.name}`, {blind : true, whisper : ChatMessage.getWhisperRecipients("GM")})
+ this.script.message(`1 Point de Chance volé à ${this.actor.name}`, {blind : true, whisper : ChatMessage.getWhisperRecipients("GM")})
+
}
\ No newline at end of file
diff --git a/scripts/5Fe1ELaS6Gnvy0Cj.js b/scripts/5Fe1ELaS6Gnvy0Cj.js
deleted file mode 100644
index a62afb6..0000000
--- a/scripts/5Fe1ELaS6Gnvy0Cj.js
+++ /dev/null
@@ -1 +0,0 @@
-return args.skill?.name.includes("Focalisation") || args.type == "channelling" || args.skill?.name == game.i18n.localize("NAME.Charm") || args.skill?.name.includes("Langue (Magick)") || args.type == "cast"
\ No newline at end of file
diff --git a/scripts/5GHQxfxlmjyt1fNq.js b/scripts/5GHQxfxlmjyt1fNq.js
new file mode 100644
index 0000000..e62670f
--- /dev/null
+++ b/scripts/5GHQxfxlmjyt1fNq.js
@@ -0,0 +1,4 @@
+let item1 = await fromUuid("Compendium.wfrp4e-core.items.Item.EO05HX7jql0g605A")
+let item2 = await fromUuid("Compendium.wfrp4e-core.items.Item.Bvd2aZ0gQUXHfCTh")
+let ids = await this.actor.createEmbeddedDocuments("Item", [item1, item2], {fromEffect : this.effect.id})
+this.actor.updateEmbeddedDocuments('Item', [ {_id: ids[0].id, 'system.specification.value': 16} ] )
\ No newline at end of file
diff --git a/scripts/5GP9UJMvBZv6kWtI.js b/scripts/5GP9UJMvBZv6kWtI.js
new file mode 100644
index 0000000..d9cf4bf
--- /dev/null
+++ b/scripts/5GP9UJMvBZv6kWtI.js
@@ -0,0 +1,27 @@
+this.script.message(await this.actor.applyBasicDamage(8, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_AP, suppressMsg: true}))
+
+
+let msg = ``
+let weapons = args.actor.itemTypes.weapon.filter(i => !i.system.location.value);
+let armour = args.actor.itemTags.armour.filter(i => !i.system.location.value);
+for(let item of weapons)
+{
+ if (item.system.properties.qualities.shield)
+ {
+ await item.system.damageItem(1, "shield");
+ }
+ else
+ {
+ await item.system.damageItem(1);
+ }
+ msg += `
${this.actor.prototypeToken.name} a acquis le Trait de Créature À Sang Froid et peut annuler tout test de Volonté raté.
+
Si ils gagnent une Condition Surpris, cette Condition n'est pas perdue la première fois qu'elle devrait l'être (ce qui est généralement à la fin du Round ou si la victime est attaquée).
`,
+ {whisper: ChatMessage.getWhisperRecipients("GM"), blind: true })
}
\ No newline at end of file
diff --git a/scripts/6AsCMHZ4IYPq7Uxf.js b/scripts/6AsCMHZ4IYPq7Uxf.js
new file mode 100644
index 0000000..54d3740
--- /dev/null
+++ b/scripts/6AsCMHZ4IYPq7Uxf.js
@@ -0,0 +1 @@
+return args.skill?.name.includes("Focalisation");
\ No newline at end of file
diff --git a/scripts/6BmvV9c03FkfisnE.js b/scripts/6BmvV9c03FkfisnE.js
index 77954b8..9bdf9d6 100644
--- a/scripts/6BmvV9c03FkfisnE.js
+++ b/scripts/6BmvV9c03FkfisnE.js
@@ -1,20 +1,20 @@
// Apply changes when the mask is worn
-if (args.equipped) {
- this.actor.createEmbeddedDocuments("ActiveEffect", [this.item.effects.contents[1]?.convertToApplied()])
- this.script.scriptMessage(`${this.actor.name} porte le ${this.item.name}.
- Il gagne +1 Point de Corruption point si un Test de Corruption est échoué, à appliquer manuellement. Si le personnage porte le masque pendant plus d'une heure ou utilise les effets du masque, il est exposé à une @Corruption[moderate]{Corruption Modérée}
+if (args.equipped) {
+ this.actor.createEmbeddedDocuments("ActiveEffect", [this.item.effects.contents[1]?.convertToApplied()])
+ this.script.message(`${this.actor.name} porte le ${this.item.name}.
+ Ils gagnent +1 point de Corruption si un Test d'exposition échoue, ce qui devra être appliqué manuellement. S'ils portent le masque pendant plus d'une heure ou bénéficient de l'un de ses effets, ils sont exposés à @Corruption[modérée]{Corruption Modérée}
`,
- {whisper: ChatMessage.getWhisperRecipients("GM")})
+ {whisper: ChatMessage.getWhisperRecipients("GM")})
}
-// Notify of lingering effects when mask is removed
+// Notify of lingering effects when mask is Retiré
else if (!args.equipped)
{
await this.item.effects.contents[0].delete();
await this.item.update({name : this.item.name += " (Utilisé)"})
- this.script.scriptMessage(`${this.item.name} de ${this.actor.name} a été enlevé et a perdu ses propriétés. Cependant, les effets perdurent pendant [[1d10+4]] jours, après quoi ils devront être manuellement supprimés.`,
+ this.script.message(`${this.item.name} porté par ${this.actor.name} a été retiré et perd ses propriétés. Cependant, les effets durent [[1d10+4]] jours, après quoi ils doivent être retirés manuellement.`,
{whisper: ChatMessage.getWhisperRecipients("GM")}
)
-
+
}
\ No newline at end of file
diff --git a/scripts/6H6vNjzvMGl2ZqCR.js b/scripts/6H6vNjzvMGl2ZqCR.js
index adcbe71..96a95e6 100644
--- a/scripts/6H6vNjzvMGl2ZqCR.js
+++ b/scripts/6H6vNjzvMGl2ZqCR.js
@@ -1,2 +1,2 @@
if (args.totalWoundLoss > 0)
- this.script.scriptMessage(`Lame de Nurglitch: ${args.actor.name} doit réussir un Test d'Endurance Difficile (-10) ou recevoir une @UUID[Compendium.wfrp4e-core.items.kKccDTGzWzSXCBOb]{Blessure Purulente}`, {whisper: ChatMessage.getWhisperRecipients("GM") })
\ No newline at end of file
+ this.script.message(`Blade of Nurglitch: ${args.actor.name} doit réussir un Test d'Résistance de Difficulté (-10) ou recevoir une @UUID[Compendium.wfrp4e-core.items.kKccDTGzWzSXCBOb]{Blessure Purulente}`, {whisper: ChatMessage.getWhisperRecipients("GM") })
\ No newline at end of file
diff --git a/scripts/6HfCvw24X6oEe2vn.js b/scripts/6HfCvw24X6oEe2vn.js
new file mode 100644
index 0000000..4bc9e12
--- /dev/null
+++ b/scripts/6HfCvw24X6oEe2vn.js
@@ -0,0 +1,4 @@
+if (["t", "s"].includes(args.characteristic))
+{
+ args.fields.modifier += 10;
+}
\ No newline at end of file
diff --git a/scripts/6JrUjs3g5x6bFnj3.js b/scripts/6JrUjs3g5x6bFnj3.js
deleted file mode 100644
index 5655bd3..0000000
--- a/scripts/6JrUjs3g5x6bFnj3.js
+++ /dev/null
@@ -1,8 +0,0 @@
-let bite = await fromUuid("Compendium.wfrp4e-core.items.pLW9SVX0TVTYPiPv")
-let sense = await fromUuid("Compendium.wfrp4e-core.items.9h82z72XGo9tfgQS")
-let biteData = bite.toObject();
-let senseData = sense.toObject();
-
-biteData.system.specification.value = 6 - this.actor.characteristics.s.bonus;
-senseData.name = senseData.name += " (Odorat)"
-this.actor.createEmbeddedDocuments("Item", [biteData, senseData], {fromEffect : this.effect.id})
\ No newline at end of file
diff --git a/scripts/6LMzIdmCSYctgmGx.js b/scripts/6LMzIdmCSYctgmGx.js
new file mode 100644
index 0000000..327e763
--- /dev/null
+++ b/scripts/6LMzIdmCSYctgmGx.js
@@ -0,0 +1,5 @@
+const stupid = this.actor.items.find(i => i.name === "Stupidee");
+
+if (!stupid) return;
+
+await stupid.update({"system.disabled": true});
\ No newline at end of file
diff --git a/scripts/6P2QNPKfwQ1xwxZT.js b/scripts/6P2QNPKfwQ1xwxZT.js
new file mode 100644
index 0000000..cb8a845
--- /dev/null
+++ b/scripts/6P2QNPKfwQ1xwxZT.js
@@ -0,0 +1 @@
+args.fields.slBonus ++
\ No newline at end of file
diff --git a/scripts/6QZUX7ZrFxOzqI0b.js b/scripts/6QZUX7ZrFxOzqI0b.js
index fb1222e..162744e 100644
--- a/scripts/6QZUX7ZrFxOzqI0b.js
+++ b/scripts/6QZUX7ZrFxOzqI0b.js
@@ -3,7 +3,7 @@ let regenerate = this.actor.items.getName('Régénération')
if (regenerate)
{
let effect = regenerate.effects.contents[0]
- let scriptData = effect.getFlag("wfrp4e", "scriptData");
+ let scriptData = effect.system.scriptData;
scriptData[0].script = scriptData[0].script.replace("1d10", "1d10 * 2")
}
\ No newline at end of file
diff --git a/scripts/6V3qHON3mcerlBlB.js b/scripts/6V3qHON3mcerlBlB.js
deleted file mode 100644
index 67380e8..0000000
--- a/scripts/6V3qHON3mcerlBlB.js
+++ /dev/null
@@ -1,6 +0,0 @@
-let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`})
-await test.roll();
-if (test.failed)
-{
- this.actor.addCondition("prone");
-}
\ No newline at end of file
diff --git a/scripts/6Ws3ieQ7pG5poUyT.js b/scripts/6Ws3ieQ7pG5poUyT.js
index bc5e5f3..1c68014 100644
--- a/scripts/6Ws3ieQ7pG5poUyT.js
+++ b/scripts/6Ws3ieQ7pG5poUyT.js
@@ -1,6 +1,6 @@
if (isNaN(parseInt(this.item.system.specification.value)))
{
- let value = await ValueDialog.create({text : "Enter Spellcasting Lore", title : this.effect.name}, "", Object.values(game.wfrp4e.config.magicLores));
+ let value = await ValueDialog.create({text : "Entrez le Savoir d'Incantation", title : this.effect.name}, "", Object.values(game.wfrp4e.config.magicLores));
if (value)
{
this.item.updateSource({"system.specification.value" : value});
diff --git a/scripts/6ZS1rQLkNvMDO0Fp.js b/scripts/6ZS1rQLkNvMDO0Fp.js
deleted file mode 100644
index f1c2324..0000000
--- a/scripts/6ZS1rQLkNvMDO0Fp.js
+++ /dev/null
@@ -1,11 +0,0 @@
-let roll = Math.ceil(CONFIG.Dice.randomUniform() * 10)
-if (args.test.isFumble && roll == 1 && !args.test.result.misfire)
-{
- args.test.result.misfire = game.i18n.localize("Misfire") + " (Résultat 1)"
- args.test.result.misfireDamage = eval(parseInt(args.test.result.roll.toString().split('').pop()) + args.test.item.Damage)
-}
-else if (args.test.isFumble && roll != 1)
-{
- args.test.result.other.push("Résultat du Raté: " + roll)
-}
-
diff --git a/scripts/6elUNF58TaiYjxcx.js b/scripts/6elUNF58TaiYjxcx.js
index d0b4d13..f0fd865 100644
--- a/scripts/6elUNF58TaiYjxcx.js
+++ b/scripts/6elUNF58TaiYjxcx.js
@@ -1,6 +1,6 @@
-let test = await this.actor.setupCharacteristic("wp", {skipTargets: true, appendTitle : " - " + this.effect.name, context : {failure: "Gained a Stunned Condition"}})
-await test.roll();
-if (test.failed)
+let test = await this.actor.setupCharacteristic("wp", {skipTargets: true, appendTitle : " - " + this.effet.name, context : {failure: "GAin d'1 état Sonné"}})
+await Test.roll();
+if (Test.Échoué)
{
this.actor.addCondition("stunned");
}
\ No newline at end of file
diff --git a/scripts/6fElmBxTjdAaubbK.js b/scripts/6fElmBxTjdAaubbK.js
deleted file mode 100644
index f1d5302..0000000
--- a/scripts/6fElmBxTjdAaubbK.js
+++ /dev/null
@@ -1,6 +0,0 @@
-let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields: {difficulty: "average"}});
-await test.roll();
-if (test.failed)
-{
- this.actor.addCondition("prone")
-}
diff --git a/scripts/6frithfMs7Nbv0IZ.js b/scripts/6frithfMs7Nbv0IZ.js
new file mode 100644
index 0000000..8cea0b5
--- /dev/null
+++ b/scripts/6frithfMs7Nbv0IZ.js
@@ -0,0 +1 @@
+args.fields.slBonus += this.effect.sourceActor.system.characteristics.fel.bonus;
\ No newline at end of file
diff --git a/scripts/6jcTzK1XEuWqAacN.js b/scripts/6jcTzK1XEuWqAacN.js
index 6da3cb5..3ba7bf0 100644
--- a/scripts/6jcTzK1XEuWqAacN.js
+++ b/scripts/6jcTzK1XEuWqAacN.js
@@ -1,2 +1,2 @@
args.abort = true;
-this.script.scriptNotification(`Impossible d'utiliser ${game.wfrp4e.config.locations[this.effect.getFlag("wfrp4e", "location")]}!`, "error")
\ No newline at end of file
+this.script.notification(`Impossible d'utiliser ${game.wfrp4e.config.locations[this.effect.getFlag("wfrp4e", "location")]}!`, "error")
\ No newline at end of file
diff --git a/scripts/6jp8slPU33oBQe1V.js b/scripts/6jp8slPU33oBQe1V.js
index e38825c..c38c365 100644
--- a/scripts/6jp8slPU33oBQe1V.js
+++ b/scripts/6jp8slPU33oBQe1V.js
@@ -1 +1 @@
-return args.options.crewTest?.system.handling !== true;
\ No newline at end of file
+return args.context.crewTest?.system.handling !== true;
\ No newline at end of file
diff --git a/scripts/6kifXp2jXEaQVJsg.js b/scripts/6kifXp2jXEaQVJsg.js
index d715b54..c7ca127 100644
--- a/scripts/6kifXp2jXEaQVJsg.js
+++ b/scripts/6kifXp2jXEaQVJsg.js
@@ -1,19 +1,7 @@
-let useWard = await Dialog.wait({
- title : this.effect.name,
- content : `
Utiliser la Protection fournie par ${this.effect.name}?`,
+ window : {
+ title : this.effect.name,
}
})
diff --git a/scripts/6maNAmREdataXmo4.js b/scripts/6maNAmREdataXmo4.js
new file mode 100644
index 0000000..51c4380
--- /dev/null
+++ b/scripts/6maNAmREdataXmo4.js
@@ -0,0 +1,5 @@
+if (this.actor.system.status?.ward?.value) {
+ this.actor.system.status.ward.value = Math.max(7, this.actor.system.status.ward.value-1);
+} else {
+ this.actor.system.status.ward.value = 9;
+}
\ No newline at end of file
diff --git a/scripts/6mpw9cGseG4W4eyd.js b/scripts/6mpw9cGseG4W4eyd.js
index e927ba5..87306c1 100644
--- a/scripts/6mpw9cGseG4W4eyd.js
+++ b/scripts/6mpw9cGseG4W4eyd.js
@@ -1,11 +1,11 @@
if (this.actor.system.status.advantage.value >= 2)
{
await this.actor.modifyAdvantage(-2);
- this.script.scriptNotification("Avvantage soustrait")
+ this.script.notification("Avantage retiré")
}
-else
+else
{
- return this.script.scriptNotification("Pas assez d'Avantages!", "error")
+ return this.script.notification("Pas assez d'Avantage!", "error")
}
let test = await this.actor.setupTrait(this.item)
diff --git a/scripts/6nA5LPXneAahHX2W.js b/scripts/6nA5LPXneAahHX2W.js
new file mode 100644
index 0000000..66db238
--- /dev/null
+++ b/scripts/6nA5LPXneAahHX2W.js
@@ -0,0 +1,7 @@
+let test = await this.actor.setupSkill(game.i18n.localize("NAME.Dodge"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`})
+await test.roll();
+if (test.failed)
+{
+ let sourceActor = this.effect.sourceActor;
+ this.script.message(await this.actor.applyBasicDamage(4 + sourceActor.system.characteristics.s.bonus, {suppressMsg : true}))
+}
\ No newline at end of file
diff --git a/scripts/6oSs8qKFNFz2lSmh.js b/scripts/6oSs8qKFNFz2lSmh.js
index a96cb59..104acde 100644
--- a/scripts/6oSs8qKFNFz2lSmh.js
+++ b/scripts/6oSs8qKFNFz2lSmh.js
@@ -1,2 +1,2 @@
-if (args.actorsystem.details.move.sail.value > 0)
+if (args.actor.system.details.move.sail.value > 0)
args.actor.system.details.move.sail.value = 0;
diff --git a/scripts/6qJP0hpShEM43ohx.js b/scripts/6qJP0hpShEM43ohx.js
index 3b9591f..3959aff 100644
--- a/scripts/6qJP0hpShEM43ohx.js
+++ b/scripts/6qJP0hpShEM43ohx.js
@@ -13,19 +13,19 @@ if (actor.itemTypes.skill.find(s => s.name === "Savoir (Océans)")) {
loreTest.result.other.push(`${actor.name} reconnaît l'attrait du Léviathan.`);
loreTest.renderRollCard();
return;
- }
+ }
}
-let test = await actor.setupSkill('Calme', {
- appendTitle: ` – ${this.effect.name}`,
+let Test = await actor.setupSkill('Calme', {
+ appendTitle: ` – ${this.effet.name}`,
skipTargets: true,
fields: {difficulty: 'easy'},
characteristic: 'wp',
});
-await test.roll();
+await Test.roll();
-if (!test.succeeded) {
- test.result.other.push(`${actor.name} devien @Condition[Assommé] par cette vision.`);
+if (!Test.succeeded) {
+ Test.result.other.push(`${actor.name} est devenu @Condition[Stunned] par la vue.`);
test.renderRollCard();
actor.addCondition("stunned");
}
\ No newline at end of file
diff --git a/scripts/6qUKKep5vhFYmo1J.js b/scripts/6qUKKep5vhFYmo1J.js
deleted file mode 100644
index 0fc2aa5..0000000
--- a/scripts/6qUKKep5vhFYmo1J.js
+++ /dev/null
@@ -1 +0,0 @@
-return args.type == "channelling" || args.skill?.name.includes(game.i18n.localize("NAME.Channelling"))
\ No newline at end of file
diff --git a/scripts/6tjn0RH4VyOPFneS.js b/scripts/6tjn0RH4VyOPFneS.js
deleted file mode 100644
index 0001110..0000000
--- a/scripts/6tjn0RH4VyOPFneS.js
+++ /dev/null
@@ -1 +0,0 @@
-return ["NAME.Row", "NAME.Swim"].map(i => game.i18n.localize(i)).includes(args.skill?.name);
\ No newline at end of file
diff --git a/scripts/6uldpFvKOCoW92cC.js b/scripts/6uldpFvKOCoW92cC.js
index 087f48d..70c5b53 100644
--- a/scripts/6uldpFvKOCoW92cC.js
+++ b/scripts/6uldpFvKOCoW92cC.js
@@ -2,7 +2,7 @@ let item = await fromUuid("Compendium.wfrp4e-core.items.uqGxFOEqeurwkAO3")
item = item.toObject()
item.system.specification.value = 10;
-item.name += " (Feu)"
-setProperty(item, "flags.wfrp4e.breath", "fire")
+item.name += " (Fire)"
+foundry.utils.setProperty(item, "flags.wfrp4e.breath", "fire")
Item.create(item, {parent : this.actor, fromEffect: this.effect.id})
\ No newline at end of file
diff --git a/scripts/6xTtJEhRc4OjcDTf.js b/scripts/6xTtJEhRc4OjcDTf.js
index 1851340..c432305 100644
--- a/scripts/6xTtJEhRc4OjcDTf.js
+++ b/scripts/6xTtJEhRc4OjcDTf.js
@@ -1,5 +1,5 @@
-if (getProperty(args.data, "system.status.fortune.value"))
+if (foundry.utils.getProperty(args.data, "system.status.fortune.value"))
{
- this.script.scriptNotification("Impossible de mettre à jour la Fortune");
+ this.script.scriptNotification("Impossible de mettre à jour la Chance");
delete args.data.system.status.wounds.value;
}
\ No newline at end of file
diff --git a/scripts/713v1T8HNste94pr.js b/scripts/713v1T8HNste94pr.js
new file mode 100644
index 0000000..5bb59f2
--- /dev/null
+++ b/scripts/713v1T8HNste94pr.js
@@ -0,0 +1 @@
+args.context.grudge = true;
\ No newline at end of file
diff --git a/scripts/715G1Bf0haOHvmYQ.js b/scripts/715G1Bf0haOHvmYQ.js
deleted file mode 100644
index 56674c9..0000000
--- a/scripts/715G1Bf0haOHvmYQ.js
+++ /dev/null
@@ -1 +0,0 @@
-return !(args.skill?.name == game.i18n.localize("NAME.Bribery") || args.skill?.name.includes(game.i18n.localize("NAME.Stealth")))
\ No newline at end of file
diff --git a/scripts/7Ck0fkzE4WQ62qVe.js b/scripts/7Ck0fkzE4WQ62qVe.js
deleted file mode 100644
index 5fc2ca7..0000000
--- a/scripts/7Ck0fkzE4WQ62qVe.js
+++ /dev/null
@@ -1,4 +0,0 @@
-if (args.item.type == "skill" && args.item.name == "Corps à corps (Base)")
-{
- args.item.system.modifier.value += 20;
-}
\ No newline at end of file
diff --git a/scripts/7F6aGxZJjwxm5e5P.js b/scripts/7F6aGxZJjwxm5e5P.js
index 78ac070..d32ebb0 100644
--- a/scripts/7F6aGxZJjwxm5e5P.js
+++ b/scripts/7F6aGxZJjwxm5e5P.js
@@ -1,18 +1,18 @@
if (args.test.result.castOutcome == "failure")
{
- ValueDialog.create({text : "Enter Wounds Lost to gain SL", title : this.effect.name}, "0").then(async value => {
- value = Math.clamped(value, 0, 3)
+ ValueDialog.create({text : "Entrez les Blessures Perdues pour gagner des DR", title : this.effect.name}, "0").then(async value => {
+ value = Math.clamp(value, 0, 3)
if (value == 0)
{
- return;
+ return;
}
else if (Number.isNumeric(value))
{
this.script.notification(`Lost ${value} Wounds`)
this.actor.modifyWounds(-1 * value)
await this.item.system.toggleEquip();
- args.test.addSL(value);
- args.test.preData.other.push(`${this.effect.name}: +${value} SL`)
+ args.Test.addSL(value);
+ args.Test.preData.other.push(`${this.effect.name}: +${value} SL`)
}
})
}
\ No newline at end of file
diff --git a/scripts/7H6wYyJ6cpaoc2QQ.js b/scripts/7H6wYyJ6cpaoc2QQ.js
deleted file mode 100644
index 05cbeea..0000000
--- a/scripts/7H6wYyJ6cpaoc2QQ.js
+++ /dev/null
@@ -1 +0,0 @@
-return args.skill?.name == game.i18n.localize("NAME.Cool");
\ No newline at end of file
diff --git a/scripts/7JW9t8AYSDkkzG2V.js b/scripts/7JW9t8AYSDkkzG2V.js
index fe58e6c..506bfa0 100644
--- a/scripts/7JW9t8AYSDkkzG2V.js
+++ b/scripts/7JW9t8AYSDkkzG2V.js
@@ -1,21 +1,21 @@
// Apply changes when the mask is worn
-if (args.equipped)
-{
- this.actor.createEmbeddedDocuments("ActiveEffect", [this.item.effects.contents[1]?.convertToApplied()])
- this.script.scriptMessage(`${this.actor.name} porte le ${this.item.name}.
- Si le personnage porte le masque pendant plus d'une heure ou bénéficie de ses effets, il s'espose à une @Corruption[moderate]{Corruption Modérée}.
+if (args.equipped)
+{
+ this.actor.createEmbeddedDocuments("ActiveEffect", [this.item.effects.contents[1]?.convertToApplied()])
+ this.script.message(`${this.actor.name} porte le ${this.item.name}.
+ S'ils portent le masque pendant plus d'une heure ou bénéficient de l'un de ses effets, ils sont exposés à @Corruption[moderate]{Corruption Modérée}.
`,
- {whisper: ChatMessage.getWhisperRecipients("GM")})
+ {whisper: ChatMessage.getWhisperRecipients("GM")})
}
-// Notify of lingering effects when mask is removed
+// Notify of lingering effects when mask is Retiré
else if (!args.equipped)
{
await this.item.effects.contents[0].delete();
- await this.item.update({name : this.item.name += " (Utilisé)"})
- this.script.scriptMessage(`${this.item.name} porté par ${this.actor.name} a été enlevé et a perdu ses capacités. Cependant, les effets perdurent pendant [[1d10+4]] jours, après quoi ils doivent être retirés manuellement.`,
+ await this.item.update({name : this.item.name += " (Used)"})
+ this.script.message(`${this.item.name} sur ${this.actor.name} a été retiré et perd ses propriétés. Cependant, les effets durent [[1d10+4]] jours, après quoi ils doivent être retirés manuellement.`,
{whisper: ChatMessage.getWhisperRecipients("GM")}
)
-
+
}
\ No newline at end of file
diff --git a/scripts/7T3iXgrL72fea67C.js b/scripts/7T3iXgrL72fea67C.js
new file mode 100644
index 0000000..3e5cd95
--- /dev/null
+++ b/scripts/7T3iXgrL72fea67C.js
@@ -0,0 +1,22 @@
+const bloodyFluxUUID = "Compendium.wfrp4e-core.items.Item.herUmN51D9TiL2Vn";
+
+const test = await this.actor.setupSkill(game.i18n.localize("NAME.Résistance"), {
+ skipTargets: true,
+ appendTitle: ` — ${this.effect.name}`,
+ fields: {difficulty: "easy"},
+ context: {
+ success: `Butcher est soigné.`,
+ failure: `Butcher contracte @UUID[${bloodyFluxUUID}].`
+ }
+});
+
+await Test.roll();
+
+if (Test.Échoué) {
+ await this.actor.addEffectItems(bloodyFluxUUID, this.effet);
+} else {
+ const SL = Test.result.SL;
+ const heal = 1 + SL;
+ await this.actor.modifyWounds(heal);
+ this.script.message(`Butcher a soigné ${heal} Blessures.`);
+}
\ No newline at end of file
diff --git a/scripts/7UUS0gX2Pbi0HHiz.js b/scripts/7UUS0gX2Pbi0HHiz.js
new file mode 100644
index 0000000..b0c77f9
--- /dev/null
+++ b/scripts/7UUS0gX2Pbi0HHiz.js
@@ -0,0 +1 @@
+return args.skill?.name !== game.i18n.localize("NAME.Swim");
\ No newline at end of file
diff --git a/scripts/7VAhXHov6pR1SkgD.js b/scripts/7VAhXHov6pR1SkgD.js
deleted file mode 100644
index 67dfce8..0000000
--- a/scripts/7VAhXHov6pR1SkgD.js
+++ /dev/null
@@ -1 +0,0 @@
-return args.item?.name == game.i18n.localize("NAME.Endurance");
\ No newline at end of file
diff --git a/scripts/7WR2hJjHPhHhHxAq.js b/scripts/7WR2hJjHPhHhHxAq.js
index 1743398..86cf368 100644
--- a/scripts/7WR2hJjHPhHhHxAq.js
+++ b/scripts/7WR2hJjHPhHhHxAq.js
@@ -1,8 +1,8 @@
let poisoned = args.actor.hasCondition("poisoned")
if (poisoned)
{
- this.script.scriptNotification(`Suppression de ${poisoned.conditionValue} états Empoisonné`)
- poisoned.delete();
+ this.script.notification(`SSuppression de ${poisoned.conditionValue} états Empoisonnés`)
+ poisoned.delete();
}
else
- this.script.scriptNotification(`Aucun état Empoisonné`)
\ No newline at end of file
+ this.script.notification(`Aucun état Empoisonné à supprimer.`)
\ No newline at end of file
diff --git a/scripts/7ZoFUMDG2WJd8RMg.js b/scripts/7ZoFUMDG2WJd8RMg.js
index d32f444..dfecb16 100644
--- a/scripts/7ZoFUMDG2WJd8RMg.js
+++ b/scripts/7ZoFUMDG2WJd8RMg.js
@@ -1 +1 @@
-this.script.scriptMessage(`Revendiquer le Bonus de ${this.effect.name} `);
\ No newline at end of file
+this.script.message(`Bonus utilisé : ${this.effect.name}`);
\ No newline at end of file
diff --git a/scripts/7e8FgQUF2oANANmx.js b/scripts/7e8FgQUF2oANANmx.js
deleted file mode 100644
index 8f24b0a..0000000
--- a/scripts/7e8FgQUF2oANANmx.js
+++ /dev/null
@@ -1 +0,0 @@
-return args.skill?.name == "Corps à corps (Bagarre)" || args.item?.weaponGroup?.value == "brawling"
\ No newline at end of file
diff --git a/scripts/7f6OsttTzE7Hvzfk.js b/scripts/7f6OsttTzE7Hvzfk.js
index aff4c37..fc12296 100644
--- a/scripts/7f6OsttTzE7Hvzfk.js
+++ b/scripts/7f6OsttTzE7Hvzfk.js
@@ -1,5 +1,7 @@
-if (this.actor.statuses.has("infighting")) // Only add +10 if already infighting
- args.prefillModifiers.modifier += 10;
+if (this.actor.statuses.has("infighting") && !args.flags.infighter)
+{
+ args.fields.modifier += 10;
+ args.flags.infighter = true;
+}
-
-args.prefillModifiers.successBonus += 1;
+args.fields.successBonus += 1;
\ No newline at end of file
diff --git a/scripts/7n3SEAGRA5ESK8gV.js b/scripts/7n3SEAGRA5ESK8gV.js
index f577178..d71fc40 100644
--- a/scripts/7n3SEAGRA5ESK8gV.js
+++ b/scripts/7n3SEAGRA5ESK8gV.js
@@ -1 +1 @@
-args.options.disarm = true;
\ No newline at end of file
+args.context.disarm = true;
\ No newline at end of file
diff --git a/scripts/7szLG4VALuuy1cPm.js b/scripts/7szLG4VALuuy1cPm.js
deleted file mode 100644
index 1fbcead..0000000
--- a/scripts/7szLG4VALuuy1cPm.js
+++ /dev/null
@@ -1,6 +0,0 @@
-let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields : {difficulty : "easy"}})
-await test.roll();
-if (test.failed)
-{
- await this.actor.addCondition("fatigued")
-}
\ No newline at end of file
diff --git a/scripts/7w7QA7GBhzZ98OS0.js b/scripts/7w7QA7GBhzZ98OS0.js
index 2227fc2..d910777 100644
--- a/scripts/7w7QA7GBhzZ98OS0.js
+++ b/scripts/7w7QA7GBhzZ98OS0.js
@@ -1,26 +1,26 @@
const sin = this.effect.sourceActor.system.status.sin.value;
const result = await WFRP_Tables.rollTable("manann-mood-made-meaningless", sin);
-let match = result.text.match(/b>([^<]+)/i);
+let match = result.description.match(/b>([^<]+)/i);
let key = match[1];
let roll = new Roll("5d10");
let value = undefined;
-await this.script.scriptMessage(result.text, {flavor: result.title});
+await this.script.message(result.description, {flavor: result.title});
switch (key) {
- case 'Stromfels Triumphant!':
+ case 'Triopmhe de Stromfels!':
value = 0;
break;
- case 'Stromfels Ascends!':
+ case 'Stromfels monte!':
await roll.evaluate();
if (this.actor.system.status.mood.value > 0)
value = -roll.total;
else if (this.actor.system.status.mood.value < 0)
value = roll.total;
break;
- case 'No effect.':
+ case 'Aucun effet.':
break;
- case 'Manann Provoked!':
+ case 'Manann est provoqué!':
await roll.evaluate();
value = -roll.total;
break;
diff --git a/scripts/7wBWUw05q0igh508.js b/scripts/7wBWUw05q0igh508.js
index 0c02215..dcfcffa 100644
--- a/scripts/7wBWUw05q0igh508.js
+++ b/scripts/7wBWUw05q0igh508.js
@@ -1,13 +1,17 @@
-// Imbibing this substance grants the user the Painless Creature Trait.
-const hasPainless = this.actor.has("Insensible à la douleur");
-if (hasPainless === undefined)
+// Imbibing this substance grants the user the utilisateur d Creature Trait.
+const hasutilisateur d = this.actor.has("Insensible à la douleur");
+if (hasutilisateur d === undefined)
{
let item = await fromUuid("Compendium.wfrp4e-core.items.wMwSRDmgiF2IdCJr");
let data = item.toObject()
this.actor.createEmbeddedDocuments("Item", [data], {fromEffect: this.effect.id})
-
- this.script.scriptMessage(
- `
${this.actor.prototypeToken.name} gagne le Trait de Creature Insensible à la Douleur. Cet effet dure 1 heure, après quoi il disparait et le total des Blessures encaissés par le buveur sont encaissés d'un coup.
-
Notez que cela n'empêche pas le buveur de recevoir une Blessure Critique ou de mourrir. Cela permet par contre d'éviter la majorité de leur effets.
`,
+
+ this.script.message(
+ `
${this.actor.prototypeToken.name} 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
+ de toutes les blessures du buveur s'abat d'un coup.
+
Notez que cela n'empêche pas l'utilisateur d'acquérir une Blessure Critique
+ ou d'en mourir. Cela leur permet simplement d'ignorer la plupart
+ de leurs effets.
`,
{ whisper: ChatMessage.getWhisperRecipients("GM"), blind: true})
}
\ No newline at end of file
diff --git a/scripts/7y89OcMmGbjRMgTg.js b/scripts/7y89OcMmGbjRMgTg.js
new file mode 100644
index 0000000..c80f57a
--- /dev/null
+++ b/scripts/7y89OcMmGbjRMgTg.js
@@ -0,0 +1,5 @@
+return !this.item.equipped.value
+ || !args?.skill
+ || !([game.i18n.localize("NAME.Charm"),
+ game.i18n.localize("NAME.Intimidate"),
+ game.i18n.localize("NAME.Leadership")].includes(args.skill.name))
\ No newline at end of file
diff --git a/scripts/84IB8CWa55XzoAkv.js b/scripts/84IB8CWa55XzoAkv.js
deleted file mode 100644
index a324f4b..0000000
--- a/scripts/84IB8CWa55XzoAkv.js
+++ /dev/null
@@ -1 +0,0 @@
-return (["Soin aux animaux", "Emprise sur les animaux"].includes(args.item?.name) || args.item?.name.includes("Chevaucher") || args.item?.name.includes("Dressage"))
\ No newline at end of file
diff --git a/scripts/86ivOsBQAuu0UmFg.js b/scripts/86ivOsBQAuu0UmFg.js
deleted file mode 100644
index e440e5a..0000000
--- a/scripts/86ivOsBQAuu0UmFg.js
+++ /dev/null
@@ -1,6 +0,0 @@
-let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {fields : {difficulty : "hard"}, appendTitle : ` - ${this.effect.name}`, skipTargets: true});
-await test.roll();
-if (test.failed)
-{
- this.actor.addCondition("poisoned");
-}
\ No newline at end of file
diff --git a/scripts/873KaarAnJ2qf1r2.js b/scripts/873KaarAnJ2qf1r2.js
new file mode 100644
index 0000000..1d74f13
--- /dev/null
+++ b/scripts/873KaarAnJ2qf1r2.js
@@ -0,0 +1 @@
+args.modifiers.other.push({label : this.effect.name, details : "Augmentation des Dégâts", value : 1})
\ No newline at end of file
diff --git a/scripts/8BCzpjFU0GeA17Wp.js b/scripts/8BCzpjFU0GeA17Wp.js
new file mode 100644
index 0000000..9368c20
--- /dev/null
+++ b/scripts/8BCzpjFU0GeA17Wp.js
@@ -0,0 +1 @@
+args.fields.modifier +=20;
\ No newline at end of file
diff --git a/scripts/8ByuHnUZ4RNTdGVv.js b/scripts/8ByuHnUZ4RNTdGVv.js
deleted file mode 100644
index 8952a02..0000000
--- a/scripts/8ByuHnUZ4RNTdGVv.js
+++ /dev/null
@@ -1,16 +0,0 @@
-let strLoss = Math.ceil(CONFIG.Dice.randomUniform() * 10)
-let tghLoss = Math.ceil(CONFIG.Dice.randomUniform() * 10)
-
-if (!this.actor.has("Mort-vivant") && !this.actor.has("Démoniaque"))
-{
- this.actor.setupSkill(game.i18n.localize("NAME.Cool"), { appendTitle: " - " + this.effect.name, fields: { difficulty: "average" }, context: { failure: `Pert de ${strLoss} en Force et ${tghLoss} en Endurance` } }).then(async test => {
- await test.roll();
- if (test.failed) {
- this.actor.update({ "system.characteristics.s.initial": this.actor.system.characteristics.s.initial - strLoss, "system.characteristics.t.initial": this.actor.system.characteristics.t.initial - tghLoss })
- }
- })
-
-}
-else {
- this.script.scriptNotification(`${this.actor.name} est immunisé à ${this.effect.name}`)
-}
diff --git a/scripts/8GyJgdHVBaLrHCY8.js b/scripts/8GyJgdHVBaLrHCY8.js
index 56adde3..4a88ecb 100644
--- a/scripts/8GyJgdHVBaLrHCY8.js
+++ b/scripts/8GyJgdHVBaLrHCY8.js
@@ -1,17 +1,17 @@
let type = this.item.getFlag("wfrp4e", "breath")
let types = {
- none : "Aucun",
+ none : "None",
cold : "Froid",
corrosion : "Corrosion",
fire : "Feu",
- electricity : "Electricité",
+ electricity : "Électricité",
poison : "Poison",
smoke : "Fumée",
various : "Divers"
}
if (!type)
{
- type = (await ItemDialog.create(ItemDialog.objectToArray(types, this.item.img), 1, "Choisir le Souffle"))[0]?.id;
+ type = (await ItemDialog.create(ItemDialog.objectToArray(types, this.item.img), 1, "Choisir Souffle"))[0]?.id;
this.item.updateSource({"flags.wfrp4e.breath" : type})
}
diff --git a/scripts/8N3Uqjq1ZxPxo4pk.js b/scripts/8N3Uqjq1ZxPxo4pk.js
deleted file mode 100644
index 43dddd4..0000000
--- a/scripts/8N3Uqjq1ZxPxo4pk.js
+++ /dev/null
@@ -1 +0,0 @@
-return !args.skill?.name?.includes(game.i18n.localize("NAME.Lore"))
\ No newline at end of file
diff --git a/scripts/8R7O63iC0yANtkJ9.js b/scripts/8R7O63iC0yANtkJ9.js
new file mode 100644
index 0000000..cf78a0e
--- /dev/null
+++ b/scripts/8R7O63iC0yANtkJ9.js
@@ -0,0 +1,5 @@
+if (this.item.equipped.value && this.actor.hasCondition("ablaze"))
+{
+ await this.actor.removeCondition("ablaze")
+ this.script.notification(`Ne peut recevoir un état En Flammes`,"info");
+}
\ No newline at end of file
diff --git a/scripts/8RNziYGGb4sp3BGQ.js b/scripts/8RNziYGGb4sp3BGQ.js
deleted file mode 100644
index b853c6b..0000000
--- a/scripts/8RNziYGGb4sp3BGQ.js
+++ /dev/null
@@ -1,5 +0,0 @@
-if (!args.test.weapon?.name.includes("Drakefire"))
-{
- args.test.result.misfire = game.i18n.localize("Misfire");
- args.test.result.misfireDamage = (0, eval)(parseInt(args.test.result.roll.toString().split('').pop()) + args.test.weapon.system.Damage);
-}
\ No newline at end of file
diff --git a/scripts/8TRiAJ8thIKE4IoL.js b/scripts/8TRiAJ8thIKE4IoL.js
index 3814c2c..08313b3 100644
--- a/scripts/8TRiAJ8thIKE4IoL.js
+++ b/scripts/8TRiAJ8thIKE4IoL.js
@@ -1,5 +1,5 @@
-let SL = Number(getProperty(this.item, "flags.wfrp4e.sourceTest.result.SL") || 1)
+let SL = Number(foundry.utils.getProperty(this.item, "flags.wfrp4e.sourceTest.result.SL") || 1)
args.actor.characteristics.i.modifier += 10 * SL
args.actor.characteristics.ag.modifier += 10 * SL
\ No newline at end of file
diff --git a/scripts/8ZAUBSH9CM9OTpTL.js b/scripts/8ZAUBSH9CM9OTpTL.js
deleted file mode 100644
index eb0439d..0000000
--- a/scripts/8ZAUBSH9CM9OTpTL.js
+++ /dev/null
@@ -1,11 +0,0 @@
-let test = await this.actor.setupSkill(game.i18n.localize("NAME.Perception"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields : {difficulty : "easy"}});
-await test.roll();
-
-if (test.succeeded)
-{
- this.actor.addCondition("stunned")
-}
-else if (test.failed)
-{
- this.actor.addCondition("poisoned", 2);
-}
\ No newline at end of file
diff --git a/scripts/8araLuwmBq8GKEw3.js b/scripts/8araLuwmBq8GKEw3.js
index ff0d686..0f181e1 100644
--- a/scripts/8araLuwmBq8GKEw3.js
+++ b/scripts/8araLuwmBq8GKEw3.js
@@ -3,5 +3,5 @@ let APIgnored = args.AP.layers.reduce((prev, current) => prev + ((current.weakpo
if (APIgnored)
{
args.modifiers.ap.ignored += APIgnored
- args.modifiers.ap.details.push(`${this.effect.name}: Ignorer les PA avec des Points Faibles (${APIgnored})`)
+ args.modifiers.ap.details.push(`${this.effect.name}: Ignore les PA avec des points faibles (${APIgnored})`)
}
\ No newline at end of file
diff --git a/scripts/8pbVGsVFlDebu2Ac.js b/scripts/8pbVGsVFlDebu2Ac.js
new file mode 100644
index 0000000..e401526
--- /dev/null
+++ b/scripts/8pbVGsVFlDebu2Ac.js
@@ -0,0 +1 @@
+args.wounds += 2;
\ No newline at end of file
diff --git a/scripts/8qOGotfGFA0HYQ6W.js b/scripts/8qOGotfGFA0HYQ6W.js
new file mode 100644
index 0000000..f974ec7
--- /dev/null
+++ b/scripts/8qOGotfGFA0HYQ6W.js
@@ -0,0 +1,7 @@
+let resistances = this.actor.itemTags.talent.filter(i => i.name == game.i18n.localize("NAME.MagicResistanceTalent"));
+
+for(let talent of resistances)
+{
+ talent.system.max.value = "custom";
+ talent.system.max.formula = "@characteristics.t.bonus + 2"
+}
\ No newline at end of file
diff --git a/scripts/8rq4GL5d5nCn4kO7.js b/scripts/8rq4GL5d5nCn4kO7.js
index c94cb1c..5a58ec9 100644
--- a/scripts/8rq4GL5d5nCn4kO7.js
+++ b/scripts/8rq4GL5d5nCn4kO7.js
@@ -3,5 +3,5 @@ if (caster)
{
let healed= caster.characteristics.wp.bonus
this.actor.modifyWounds(healed);
- this.script.scriptMessage(`${this.actor.prototypeToken.name} regagne ${healed} Blessures`)
+ this.script.message(`${this.actor.prototypeToken.name} regagne ${healed} Blessures`)
}
\ No newline at end of file
diff --git a/scripts/8tyMXDfHR8AJBdDu.js b/scripts/8tyMXDfHR8AJBdDu.js
index 8ba19d6..24d0f1d 100644
--- a/scripts/8tyMXDfHR8AJBdDu.js
+++ b/scripts/8tyMXDfHR8AJBdDu.js
@@ -3,5 +3,5 @@ let weakpointsAP = args.AP.layers.filter(i => !i.ignored && i.weakpoints).reduce
if (weakpointsAP > 0)
{
args.modifiers.ap.ignored += weakpointsAP;
- args.modifiers.ap.details.push(`${this.effect.name} - Ignore les Points Faibles (${weakpointsAP})`);
+ args.modifiers.ap.details.push(`${this.effect.name} - Ignore les points faibles (${weakpointsAP})`);
}
\ No newline at end of file
diff --git a/scripts/8xqYrBIf1Zhlwizg.js b/scripts/8xqYrBIf1Zhlwizg.js
index fd50370..4c84f0e 100644
--- a/scripts/8xqYrBIf1Zhlwizg.js
+++ b/scripts/8xqYrBIf1Zhlwizg.js
@@ -1,4 +1,4 @@
-const repaired_message = `
Finished raisint the anchor.
`;
+const repaired_message = `
Ancre terminée.
`;
const test = 'Strength';
const difficulty = 'vhard';
const target = 20;
@@ -24,7 +24,7 @@ const extendedTestData = {
},
effects: [
{
- name: `Réparer ${this.item.name}`,
+ name: `Réparation de ${this.item.name}`,
img: this.item.img,
system: {
transferData : {
diff --git a/scripts/8zTkDVziBPaNbMQX.js b/scripts/8zTkDVziBPaNbMQX.js
index fdd905a..7bd8205 100644
--- a/scripts/8zTkDVziBPaNbMQX.js
+++ b/scripts/8zTkDVziBPaNbMQX.js
@@ -9,7 +9,7 @@ let filters = [
}
]
-let petty = await ItemDialog.createFromFilters(filters, 6, "Choisissez 6 Sorts de Magie Mineure")
+let petty = await ItemDialog.createFromFilters(filters, 6, {text : "Choisissez 6 Sorts Mineurs"})
filters = [
@@ -23,7 +23,7 @@ filters = [
}
]
-let arcane = await ItemDialog.createFromFilters(filters, 9, "Choisissez 9 Sorts de Magie d'Arcane")
+let arcane = await ItemDialog.createFromFilters(filters, 9, {text : "Choisissez 9 Sorts d'Arcane"})
let items = petty.concat(arcane).map(i => i.toObject())
diff --git a/scripts/96Y1yIH1lRjTs5hL.js b/scripts/96Y1yIH1lRjTs5hL.js
index 1fab3ce..55282ad 100644
--- a/scripts/96Y1yIH1lRjTs5hL.js
+++ b/scripts/96Y1yIH1lRjTs5hL.js
@@ -1,5 +1,4 @@
-if (args.test.succeeded)
- return
-
-if (args.test.characteristicKey == "wp")
- this.actor.addCondition("broken")
\ No newline at end of file
+if (args.test.failed && args.test.characteristicKey == "wp")
+{
+ this.actor.addCondition("broken")
+}
\ No newline at end of file
diff --git a/scripts/98nKfcimlaPeM9h5.js b/scripts/98nKfcimlaPeM9h5.js
index dde67fd..230dea9 100644
--- a/scripts/98nKfcimlaPeM9h5.js
+++ b/scripts/98nKfcimlaPeM9h5.js
@@ -1,2 +1,2 @@
await this.actor.addCondition("bleeding")
-await this.script.scriptMessage(await this.actor.applyBasicDamage(10, {suppressMsg : true}));
\ No newline at end of file
+await this.script.message(await this.actor.applyBasicDamage(10, {suppressMsg : true}));
\ No newline at end of file
diff --git a/scripts/9A7rYY3FKi5XLihG.js b/scripts/9A7rYY3FKi5XLihG.js
index 4977a44..cd0c830 100644
--- a/scripts/9A7rYY3FKi5XLihG.js
+++ b/scripts/9A7rYY3FKi5XLihG.js
@@ -1,6 +1,6 @@
fromUuid("Compendium.wfrp4e-core.items.5QcrpLQWWrsbKR79").then(item => {
let data = item.toObject();
data.system.tests.value = data.system.tests.value.replace("coins", "metal objects");
- data.system.description.value += "
Ce Talent s'applique également à tout objet métallique à cause de l'Affinité Metallique
"
+ data.system.description.value += "
Ce talent s'applique à tout objet métallique en raison de Affinité Métallique
"
this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id})
})
\ No newline at end of file
diff --git a/scripts/9AMoFRATTAfdKlKN.js b/scripts/9AMoFRATTAfdKlKN.js
new file mode 100644
index 0000000..2c5ec60
--- /dev/null
+++ b/scripts/9AMoFRATTAfdKlKN.js
@@ -0,0 +1,16 @@
+const test = await args.actor.setupSkill(game.i18n.localize("NAME.Résistance"), {
+ skipTargets: true,
+ appendTitle: ` — ${this.effect.name}`,
+ fields: {difficulty: "challenging"},
+ context: {
+ failure: `Gain de 1 état @Condition[Poisoned].`
+ }
+});
+
+await Test.roll();
+
+if (Test.Échoué) {
+ args.actor.addCondition("poisoned");
+ const speaker = ChatMessage.getSpeaker({actor: args.actor});
+ this.script.message(`
${speaker.alias} a reçu 1 état @Condition[Poisoned] de Venin d'Araignée.
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.
`);
+}
\ No newline at end of file
diff --git a/scripts/9EVj4bmZJex45Mt7.js b/scripts/9EVj4bmZJex45Mt7.js
deleted file mode 100644
index a17d972..0000000
--- a/scripts/9EVj4bmZJex45Mt7.js
+++ /dev/null
@@ -1 +0,0 @@
-return args.skill?.name != game.i18n.localize("NAME.Athletics");
\ No newline at end of file
diff --git a/scripts/9JnPK1jNUEso7Pv8.js b/scripts/9JnPK1jNUEso7Pv8.js
deleted file mode 100644
index db4cfc0..0000000
--- a/scripts/9JnPK1jNUEso7Pv8.js
+++ /dev/null
@@ -1,4 +0,0 @@
-let item = await fromUuid("Compendium.wfrp4e-core.items.9h82z72XGo9tfgQS")
-let data = item.toObject();
-data.name += ` (Odorat)`
-this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id})
\ No newline at end of file
diff --git a/scripts/9RFoasDcFnYZ1txR.js b/scripts/9RFoasDcFnYZ1txR.js
deleted file mode 100644
index 8a60a20..0000000
--- a/scripts/9RFoasDcFnYZ1txR.js
+++ /dev/null
@@ -1 +0,0 @@
-return args.skill?.name == game.i18n.localize("NAME.Perception");
\ No newline at end of file
diff --git a/scripts/9VfeubiCV83LN9iY.js b/scripts/9VfeubiCV83LN9iY.js
index b48a14a..ad175b1 100644
--- a/scripts/9VfeubiCV83LN9iY.js
+++ b/scripts/9VfeubiCV83LN9iY.js
@@ -1,4 +1,4 @@
let item = await fromUuid("Compendium.wfrp4e-core.items.AtpAudHA4ybXVlWM")
let data = item.toObject();
-data.name += ` (Si Charge)`
+data.name += ` (En charge)`
this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id})
\ No newline at end of file
diff --git a/scripts/9WZa63lr0K3SsP4G.js b/scripts/9WZa63lr0K3SsP4G.js
index cf89e60..6c6143e 100644
--- a/scripts/9WZa63lr0K3SsP4G.js
+++ b/scripts/9WZa63lr0K3SsP4G.js
@@ -3,5 +3,5 @@ let sourceItem = this.effect.sourceItem;
if (sourceItem)
{
this.actor.applyEffect({effectUuids : [sourceItem.effects.contents[2].uuid]})
- this.script.scriptNotification("Applique après les effets");
+ this.script.notification("Effets secondaires appliqués");
}
\ No newline at end of file
diff --git a/scripts/9Yn9uViEjcuaESJ2.js b/scripts/9Yn9uViEjcuaESJ2.js
index b09b963..f964391 100644
--- a/scripts/9Yn9uViEjcuaESJ2.js
+++ b/scripts/9Yn9uViEjcuaESJ2.js
@@ -1,6 +1,6 @@
if (this.item.getFlag("wfrp4e", "failedCool"))
{
- this.item.name += " (Aucun PA)"
+ this.item.name += " (No AP)"
this.item.system.AP = {
"head": 0,
"lArm": 0,
diff --git a/scripts/9eL5JbQQmCY030ba.js b/scripts/9eL5JbQQmCY030ba.js
new file mode 100644
index 0000000..1cd6858
--- /dev/null
+++ b/scripts/9eL5JbQQmCY030ba.js
@@ -0,0 +1 @@
+this.actor.addCondition("poisoned");
\ No newline at end of file
diff --git a/scripts/9fK07tqqZyPg7dpx.js b/scripts/9fK07tqqZyPg7dpx.js
deleted file mode 100644
index 1613f20..0000000
--- a/scripts/9fK07tqqZyPg7dpx.js
+++ /dev/null
@@ -1,12 +0,0 @@
-let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields : {difficulty: "veasy"}})
-await test.roll();
-if (test.failed)
-{
- this.script.scriptNotification("Subi une Blessure Purulente")
- let item = await fromUuid("Compendium.wfrp4e-core.items.kKccDTGzWzSXCBOb")
- this.actor.createEmbeddedDocuments("Item", [item.toObject()])
-}
-else
-{
- this.script.scriptNotification("Evite une Blessure Purulente")
-}
diff --git a/scripts/9fNHye2N2DORR0A3.js b/scripts/9fNHye2N2DORR0A3.js
new file mode 100644
index 0000000..821cb0f
--- /dev/null
+++ b/scripts/9fNHye2N2DORR0A3.js
@@ -0,0 +1 @@
+return !args.item.name.includes("Arme")
\ No newline at end of file
diff --git a/scripts/A0OK0qAMmnf8iNJf.js b/scripts/A0OK0qAMmnf8iNJf.js
index 2f137f4..14283ca 100644
--- a/scripts/A0OK0qAMmnf8iNJf.js
+++ b/scripts/A0OK0qAMmnf8iNJf.js
@@ -1,7 +1,7 @@
if (args.test.result.SL < 0)
{
- this.script.scriptMessage(`Reçoit ${Math.abs(args.test.result.SL)} Points de Corruption`, {whisper : ChatMessage.getWhisperRecipients("GM")})
- if (args.test.failed && this.actor.type == "character")
+ 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")
{
this.actor.update({"system.status.corruption.value" : parseInt(this.actor.status.corruption.value) + Math.abs(args.test.result.SL)})
}
diff --git a/scripts/A1odAcuRbq9797ZB.js b/scripts/A1odAcuRbq9797ZB.js
index c26eb0e..9ed7577 100644
--- a/scripts/A1odAcuRbq9797ZB.js
+++ b/scripts/A1odAcuRbq9797ZB.js
@@ -1,7 +1,7 @@
let choice1 = [
{
type : "skill",
- name : "Melee (Basic)",
+ name : "Mêlée (Base)",
diff : {
system : {
advances : {
@@ -14,7 +14,7 @@ let choice1 = [
let choice2 = [
{
type : "skill",
- name : "Melee (Polearm)",
+ name : "Mêlée (arme d'hast)",
diff : {
system : {
advances : {
@@ -25,38 +25,40 @@ let choice2 = [
}
]
-let choice = await Dialog.wait({
- title : "Choice",
- content :
+let choice = await foundry.applications.api.DialogV2.wait({
+ window : {
+ title : "Choix"
+ },
+ content :
`
- Select your choice
+ Sélectionnez votre choix
-
Melee (Basic)
-
Melee (Polearm)
-
+
Mêlée (Base)
+
Mêlée (arme d'hast)
+
`,
- buttons : {
- 1 : {
- label : "Basic",
+ buttons : [
+ {
+ label : "Base",
callback : () => {
return choice1;
}
},
- 2 : {
- label : "Polearm",
+ {
+ label : "Arme d'hast",
callback : () => {
return choice2;
}
}
- }
+ ]
})
let updateObj = this.actor.toObject();
let items = []
for (let c of choice)
{
- let existing
+ let existing
if (c.type == "skill")
{
existing = updateObj.items.find(i => i.name == c.name && i.type == c.type)
diff --git a/scripts/A3XrFB7SvV2vcg1a.js b/scripts/A3XrFB7SvV2vcg1a.js
new file mode 100644
index 0000000..074c22d
--- /dev/null
+++ b/scripts/A3XrFB7SvV2vcg1a.js
@@ -0,0 +1,4 @@
+if (args.applyAP)
+{
+ args.applyAP = false;
+}
\ No newline at end of file
diff --git a/scripts/A3fvV69RS1lYgma0.js b/scripts/A3fvV69RS1lYgma0.js
deleted file mode 100644
index 73c68ae..0000000
--- a/scripts/A3fvV69RS1lYgma0.js
+++ /dev/null
@@ -1,15 +0,0 @@
-if (this.actor.type == "character")
- this.actor.corruptionDialog("minor")
-
-let test = await this.actor.setupSkill(game.i18n.localize("NAME.Cool"), {skipTargets: true, appendTitle : " - " + this.effect.name})
-await test.roll();
-if(test.failed)
-{
- await this.actor.addCondition("unconscious");
- let secondTest = await this.actor.setupSkill(game.i18n.localize("NAME.Cool"), {fields : {difficulty : "easy"}, skipTargets: true, appendTitle : " - Despair"})
- await secondTest.roll();
- if(secondTest.failed)
- {
- await this.actor.addCondition("fatigued");
- }
-}
\ No newline at end of file
diff --git a/scripts/A6DcKPzAGntzSCil.js b/scripts/A6DcKPzAGntzSCil.js
index e061eac..3c057d9 100644
--- a/scripts/A6DcKPzAGntzSCil.js
+++ b/scripts/A6DcKPzAGntzSCil.js
@@ -1,5 +1,5 @@
let roll = await new Roll("1d10").roll()
-roll.toMessage(this.script.getChatData({flavor : `${this.effect.name} (Durée)`}));
+roll.toMessage(this.script.getChatData({flavor : `Lâche ${dropped.map(i => i.name).join(", ")}!`}));
-this.effect.updateSource({"duration.rounds" : roll.total})
\ No newline at end of file
+this.effet.updateSource({"duration.rounds" : roll.total})
\ No newline at end of file
diff --git a/scripts/ACgKpKrEEHoNGG0h.js b/scripts/ACgKpKrEEHoNGG0h.js
deleted file mode 100644
index ba1d9d6..0000000
--- a/scripts/ACgKpKrEEHoNGG0h.js
+++ /dev/null
@@ -1 +0,0 @@
-return !args.skill?.name.includes("Focalisation") && args.type != "channelling"
\ No newline at end of file
diff --git a/scripts/ACtDCTLZXmd5uXjX.js b/scripts/ACtDCTLZXmd5uXjX.js
index 903591c..0cb3fd8 100644
--- a/scripts/ACtDCTLZXmd5uXjX.js
+++ b/scripts/ACtDCTLZXmd5uXjX.js
@@ -1,7 +1,7 @@
let halve;
if (args.opposedTest.attackerTest.item?.type != "spell")
{
- halve = await Dialog.confirm({title : this.effect.name, content : "Diviser les dommages? (Divise par 2 tout les dommages autre que ceux causés par le feu, le froid et magiques)"})
+ halve = await foundry.applications.api.DialogV2.confirm({window : {title : this.effect.name}, content : "Diviser les dégâts par deux ? (Divise tous les dégâts sauf le feu, le froid et la magie)"})
}
else
{
@@ -11,5 +11,5 @@ else
if (halve)
{
args.totalWoundLoss /= 2;
- args.modifiers.other.push({label : this.effect.name, details : "Divisé par 2", value : "× 0.5"})
+ args.modifiers.other.push({label : this.effect.name, details : "Divisé par deux", value : "× 0.5"})
}
\ No newline at end of file
diff --git a/scripts/AGD7zCyV4zruvnWu.js b/scripts/AGD7zCyV4zruvnWu.js
index f55bee5..f7eb0f9 100644
--- a/scripts/AGD7zCyV4zruvnWu.js
+++ b/scripts/AGD7zCyV4zruvnWu.js
@@ -1 +1 @@
-return args.type != "cast" || !["mort", "nécromancie", "vie", "lumière", "cieux"].includes(args.spell?.system.lore.value)
\ No newline at end of file
+return args.type != "cast" || !["death", "necromancy", "life", "light", "heavens"].includes(args.spell?.system.lore.value)
\ No newline at end of file
diff --git a/scripts/AHZ8f7dfN8jNsYk6.js b/scripts/AHZ8f7dfN8jNsYk6.js
deleted file mode 100644
index 80ece08..0000000
--- a/scripts/AHZ8f7dfN8jNsYk6.js
+++ /dev/null
@@ -1,22 +0,0 @@
-let token = this.actor.getActiveTokens()[0];
-let target = args.data.targets[0];
-let weapon = args.weapon;
-
-if(!target || !token)
-{
- return;
-}
-
-let distance = canvas.grid.measureDistances([{ ray: new Ray({ x: token.center.x, y: token.center.y }, { x: target.center.x, y: target.center.y }) }], { gridSpaces: true })[0]
-let currentBand
-
-for (let band in weapon.range.bands)
-{
- if (distance >= weapon.range.bands[band].range[0] && distance <= weapon.range.bands[band].range[1])
- {
- currentBand = band;
- break;
- }
-}
-
-return [game.i18n.localize("Long Range"), game.i18n.localize("Extreme")].includes(currentBand)
\ No newline at end of file
diff --git a/scripts/AI7iVbQMPzXMP5on.js b/scripts/AI7iVbQMPzXMP5on.js
new file mode 100644
index 0000000..d1a3693
--- /dev/null
+++ b/scripts/AI7iVbQMPzXMP5on.js
@@ -0,0 +1,11 @@
+const hours = new Roll("2d10");
+await hours.toMessage({flavor: this.effect.name + " (heures)"});
+
+const bonus = new Roll("2d10");
+await bonus.toMessage({flavor: this.effect.name + " (heures)"});
+
+
+await this.effect.update({
+ "duration.seconds": hours.total * 3600
+});
+await this.effect.setFlag("wfrp4e-tribes", "bonus", bonus.total);
\ No newline at end of file
diff --git a/scripts/ALuPRzf85dmkEfLo.js b/scripts/ALuPRzf85dmkEfLo.js
deleted file mode 100644
index b624bba..0000000
--- a/scripts/ALuPRzf85dmkEfLo.js
+++ /dev/null
@@ -1 +0,0 @@
-return args.skill?.name == game.i18n.localize("NAME.Intuition");
\ No newline at end of file
diff --git a/scripts/AMI2wDJqsIZsoq1e.js b/scripts/AMI2wDJqsIZsoq1e.js
index f826c60..57e2597 100644
--- a/scripts/AMI2wDJqsIZsoq1e.js
+++ b/scripts/AMI2wDJqsIZsoq1e.js
@@ -1,4 +1,4 @@
if (args.opposedTest.result.differenceSL >= 0 && args.opposedTest.result.differenceSL <= 2 && args.opposedTest.result.winner == "attacker")
{
- this.script.scriptMessage(`Émet un nuage de poudre noire nauséabonde. Active l'effet Fellowship Penalty sur @UUID[${this.actor.uuid}].`, {blind : true, whisper : ChatMessage.getWhisperRecipients("GM")})
+ this.script.message(`Emits a cloud of foul-smelling blackpowder. Enable the Fellowship Penalty Active Effect on @UUID[${this.actor.uuid}].`, {blind : true, whisper : ChatMessage.getWhisperRecipients("GM")})
}
\ No newline at end of file
diff --git a/scripts/AMxezwtYnWCF6Oza.js b/scripts/AMxezwtYnWCF6Oza.js
deleted file mode 100644
index 5fad3df..0000000
--- a/scripts/AMxezwtYnWCF6Oza.js
+++ /dev/null
@@ -1 +0,0 @@
-return args.skill?.name == "Projectiles (Poudre noire)"
\ No newline at end of file
diff --git a/scripts/AV2Kj6jgmIc45zKi.js b/scripts/AV2Kj6jgmIc45zKi.js
deleted file mode 100644
index 77024fc..0000000
--- a/scripts/AV2Kj6jgmIc45zKi.js
+++ /dev/null
@@ -1 +0,0 @@
-return args.skill?.name.includes(game.i18n.localize("NAME.Stealth"));
\ No newline at end of file
diff --git a/scripts/AYEiCx2Es3QtMY28.js b/scripts/AYEiCx2Es3QtMY28.js
new file mode 100644
index 0000000..3842a95
--- /dev/null
+++ b/scripts/AYEiCx2Es3QtMY28.js
@@ -0,0 +1,55 @@
+let choice1 = [
+ {
+ type: "trait",
+ name: "Bestial",
+ },
+ {
+ type: "trait",
+ name: "Regeneration",
+ },
+ {
+ type: "trait",
+ name: "Taille (Large)",
+ },
+ {
+ type: "trait",
+ name: "Territorial",
+ }
+]
+
+let updateObj;
+let actor;
+
+async function addTrait(c) {
+ let items = [];
+ let existing;
+ if (c.type == "trait") {
+ existing = updateObj.items.find(i => i.name == c.name && i.type == c.type);
+ }
+ if (!existing) {
+ let item = await game.wfrp4e.utility.find(c.name, c.type);
+ if (item) {
+ item = item.toObject();
+ items.push(item);
+ }
+ else
+ ui.notifications.warn(`Impossible de trouver ${c}`, { permanent: true });
+ }
+ console.log("WISH LIST2", choice1, items);
+ actor.createEmbeddedDocuments("Item", items);
+}
+
+async function dialogChoice() {
+ for (let c of choice1)
+ {
+ if (await foundry.applications.api.DialogV2.confirm({window : {title: "Option"}, content:`
Add Option?
${c.name}
`}))
+ {
+ addTrait(c)
+ c.valid = true;
+ }
+ }
+}
+
+updateObj = this.actor.toObject();
+actor = this.actor
+await dialogChoice();
diff --git a/scripts/Adgs6Zs0FdefO6qx.js b/scripts/Adgs6Zs0FdefO6qx.js
index 210f054..dd41f6a 100644
--- a/scripts/Adgs6Zs0FdefO6qx.js
+++ b/scripts/Adgs6Zs0FdefO6qx.js
@@ -1,5 +1,5 @@
if (args.test.options.pilot && args.test.result.reversed)
{
args.test.data.result.SL = "+" + Math.min(1, Number(args.test.data.result.SL))
- args.test.result.other.push(`${this.effect.name}: DR limité à 1`)
+ args.test.result.other.push(`${this.effect.name}: SL limited to 1`)
}
\ No newline at end of file
diff --git a/scripts/Ah2wyywkL8hjJNXM.js b/scripts/Ah2wyywkL8hjJNXM.js
index 887ba7c..ccff451 100644
--- a/scripts/Ah2wyywkL8hjJNXM.js
+++ b/scripts/Ah2wyywkL8hjJNXM.js
@@ -1 +1 @@
-args.options.healWounds = true;
\ No newline at end of file
+args.context.healWounds = true;
\ No newline at end of file
diff --git a/scripts/ApaLcUhuty3EzJoP.js b/scripts/ApaLcUhuty3EzJoP.js
index ba42e39..107d645 100644
--- a/scripts/ApaLcUhuty3EzJoP.js
+++ b/scripts/ApaLcUhuty3EzJoP.js
@@ -3,4 +3,4 @@ let current = this.actor.status.fortune.value
this.actor.update({"system.status.fortune.value" : fortunePoints + current})
-this.script.scriptMessage(`${this.actor.prototypeToken.name} voit ses points de Destin augmentés de ${current} à ${fortunePoints + current}`)
\ No newline at end of file
+this.script.message(`${this.actor.prototypeToken.name} fortune points increased from ${current} to ${fortunePoints + current}`)
\ No newline at end of file
diff --git a/scripts/AqHLHp4kH6KULk3e.js b/scripts/AqHLHp4kH6KULk3e.js
index 16b9c43..fdac29c 100644
--- a/scripts/AqHLHp4kH6KULk3e.js
+++ b/scripts/AqHLHp4kH6KULk3e.js
@@ -3,10 +3,10 @@ if (this.item.system.quantity.value)
this.item.system.reduceQuantity();
let actor = Array.from(game.user.targets)[0]?.actor || this.actor;
let effectData = this.item.effects.contents[0].convertToApplied();
- effectData.flags.wfrp4e.sourceItem = this.item.uuid
+ effectData.system.sourceData.item = this.item.uuid
actor.applyEffect({effectData : [effectData]})
}
else
{
- this.script.scriptNotification("Aucun disponible!", "error")
+ this.script.notification("Plus rien !", "error")
}
\ No newline at end of file
diff --git a/scripts/AvRbjpBfTX3mn3bz.js b/scripts/AvRbjpBfTX3mn3bz.js
new file mode 100644
index 0000000..8a6e0fe
--- /dev/null
+++ b/scripts/AvRbjpBfTX3mn3bz.js
@@ -0,0 +1,11 @@
+if (this.actor.effects.contents.filter(e => e.name === "Liquid Fortification").length === 0) {
+ let effectData = this.item.effects.contents[0].convertToApplied();
+ effectData.duration.seconds = 3600
+ this.actor.applyEffect({effectData : [effectData]});
+ this.script.notification("Durée de l'effet Liquid Fortification réglée à 1 heure.");
+}
+else {
+ let effect = this.actor.effects.contents.filter(e => e.name === "Liquid Fortification")[0];
+ effect.update({duration: {seconds: 3600}});
+ this.script.notification("Durée de l'effet Liquid Fortification réinitialisée à 1 heure.");
+}
\ No newline at end of file
diff --git a/scripts/AyNb5sj6FD2Z3Q5T.js b/scripts/AyNb5sj6FD2Z3Q5T.js
index 2d4490d..14a16c3 100644
--- a/scripts/AyNb5sj6FD2Z3Q5T.js
+++ b/scripts/AyNb5sj6FD2Z3Q5T.js
@@ -1,3 +1,3 @@
this.actor.addCondition("dead")
this.actor.setWounds(0);
-this.script.scriptMessage(await game.wfrp4e.tables.formatChatRoll("scatter"))
\ No newline at end of file
+this.script.message(await game.wfrp4e.tables.formatChatRoll("scatter"))
\ No newline at end of file
diff --git a/scripts/B6ZbY3bxTPg6nCng.js b/scripts/B6ZbY3bxTPg6nCng.js
deleted file mode 100644
index 82df2d2..0000000
--- a/scripts/B6ZbY3bxTPg6nCng.js
+++ /dev/null
@@ -1 +0,0 @@
-return args.skill?.name == game.i18n.localize("NAME.Bribery");
\ No newline at end of file
diff --git a/scripts/B950b0XnIUYCdVwu.js b/scripts/B950b0XnIUYCdVwu.js
deleted file mode 100644
index 8a61d3b..0000000
--- a/scripts/B950b0XnIUYCdVwu.js
+++ /dev/null
@@ -1,11 +0,0 @@
-let test = await args.actor.setupSkill(game.i18n.localize("NAME.Cool"), {skipTargets: true, appendTitle : " - " + this.effect.name})
-await test.roll();
-
-if (test.succeeded)
-{
- if (args.totalWoundLoss <= parseInt(test.result.SL))
- {
- args.abort = `${this.effect.name}: Attaque détournée et renvoyée`
- }
- args.modifiers.other.push({label : this.effect.name, value : -1 * parseInt(test.result.SL)})
-}
\ No newline at end of file
diff --git a/scripts/BAOv7moTxsKlT3JS.js b/scripts/BAOv7moTxsKlT3JS.js
deleted file mode 100644
index 7adeacf..0000000
--- a/scripts/BAOv7moTxsKlT3JS.js
+++ /dev/null
@@ -1,6 +0,0 @@
-let test = await this.actor.setupSkill(game.i18n.localize("NAME.Cool"), {fields : {difficulty : "easy"}, skipTargets: true, appendTitle : ` - ${this.effect.name}`})
-await test.roll();
-if (test.failed)
-{
- this.actor.addCondition("broken")
-}
\ No newline at end of file
diff --git a/scripts/BD7bVTU2pVoRSRBe.js b/scripts/BD7bVTU2pVoRSRBe.js
index b436fd6..74c79fb 100644
--- a/scripts/BD7bVTU2pVoRSRBe.js
+++ b/scripts/BD7bVTU2pVoRSRBe.js
@@ -1,15 +1,15 @@
let symptoms = {
convulsions : "Convulsions",
- coughsandsneezes : "Coughs and Sneezes",
- fever : "Fever",
- flux : "Flux",
+ coughsandsneezes : "Toux et Éternuements",
+ fever : "Fièvre",
+ flux : "FMalaiselux",
nausea : "Nausée"
}
let roll = await (new Roll(`max(0, 1d10 - ${this.actor.characteristics.wp.bonus})`).roll())
roll.toMessage(this.script.getChatData());
-let choices = await ItemDialog.create(ItemDialog.objectToArray(symptoms), roll.total, "Choisissez les Symptomes");
+let choices = await ItemDialog.create(ItemDialog.objectToArray(symptoms), roll.total, "Choisir Symptômes");
if (choices.length)
{
@@ -23,8 +23,7 @@ if (choices.length)
}
this.actor.createEmbeddedDocuments("ActiveEffect", added)
}
-else
+else
{
this.effect.delete();
}
-
diff --git a/scripts/BEEvU2hE5ymcNOH9.js b/scripts/BEEvU2hE5ymcNOH9.js
new file mode 100644
index 0000000..f8afa88
--- /dev/null
+++ b/scripts/BEEvU2hE5ymcNOH9.js
@@ -0,0 +1,6 @@
+let fatigued = this.actor.hasCondition("fatigued")
+ if (!fatigued)
+ {
+ this.actor.addCondition("fatigued")
+ ui.notifications.notify("Etat Exténué ajouté à " + this.actor.name + " qui est impossible à retirer tant que le symptôme de Malaise est présent.")
+ }
\ No newline at end of file
diff --git a/scripts/BHbFqhJPzZI2txLs.js b/scripts/BHbFqhJPzZI2txLs.js
index 5107a0c..abf139c 100644
--- a/scripts/BHbFqhJPzZI2txLs.js
+++ b/scripts/BHbFqhJPzZI2txLs.js
@@ -1,9 +1,8 @@
let lore = this.effect.name.split("(")[1].split(")")[0].toLowerCase();
-let spellLore = game.wfrp4e.config.magicLores[args.spell.system.lore.value].toLowerCase();
// If channelling corresponding lore
-if (args.type == "channelling" && spellLore == lore)
+if (args.type == "channelling" && args.spell.system.lore.value == lore)
args.prefillModifiers.slBonus += 2
// If channelling or casting different lore
-else if (spellLore != lore && args.spell.system.lore.value != "petty")
+else if (args.spell.system.lore.value != lore && args.spell.system.lore.value != "petty")
args.prefillModifiers.slBonus -= 1
\ No newline at end of file
diff --git a/scripts/BNJRV66jlrp51qZK.js b/scripts/BNJRV66jlrp51qZK.js
deleted file mode 100644
index e0fe8a0..0000000
--- a/scripts/BNJRV66jlrp51qZK.js
+++ /dev/null
@@ -1,2 +0,0 @@
-args.abort = true;
-this.script.notification(game.i18n.localize("SCRIPT.Sightstep"));
\ No newline at end of file
diff --git a/scripts/BVNKF9omCppWPLys.js b/scripts/BVNKF9omCppWPLys.js
index 42c557a..553a241 100644
--- a/scripts/BVNKF9omCppWPLys.js
+++ b/scripts/BVNKF9omCppWPLys.js
@@ -1,28 +1,28 @@
let actor = game.user.character ?? canvas.tokens.controlled[0]?.actor;
if (!actor || !(actor.system instanceof StandardActorModel))
- return ui.notifications.warn("You must control an Actor capable of performing a Strength Test");
+ return ui.notifications.warn("Vous devez contrôler un acteur capable d'effectuer un test de Force");
let test = await actor.setupCharacteristic("s", {
- skipTargets: true,
- appendTitle: " - Bailing Out",
+ skipTargets: true,
+ appendTitle: " - Évacuation",
fields: {
difficulty: "challenging"
},
context: {
- success: "Reduced the Holed rating!"
+ success: "Réduction du niveau de Perforation !"
}
});
-await test.roll();
-if (test.succeeded) {
- let SL = parseInt(test.result.SL);
- let name = this.effect.name.replace(/\d+/, rating => parseInt(rating) - SL);
- await this.effect.update({name});
+await Test.roll();
+if (Test.succeeded) {
+ let SL = parseInt(Test.result.SL);
+ let name = this.effet.name.replace(/\d+/, rating => parseInt(rating) - SL);
+ await this.effet.update({name});
}
-let rating = parseInt(this.effect.name.match(/\d+/)?.[0]);
+let rating = parseInt(this.effet.name.match(/\d+/)?.[0]);
if (rating <= 1) {
- const scriptData = this.effect.system.scriptData
+ const scriptData = this.effet.system.scriptData
scriptData[2].trigger = '';
- await this.effect.update({disabled: true, "system.scriptData": scriptData});
+ await this.effet.update({disabled: true, "system.scriptData": scriptData});
}
\ No newline at end of file
diff --git a/scripts/BY4feKp244bQOWlB.js b/scripts/BY4feKp244bQOWlB.js
new file mode 100644
index 0000000..0fa1dc5
--- /dev/null
+++ b/scripts/BY4feKp244bQOWlB.js
@@ -0,0 +1 @@
+args.test.result.canDualWield = true;
\ No newline at end of file
diff --git a/scripts/Bj6bxItlgtI2sXVN.js b/scripts/Bj6bxItlgtI2sXVN.js
index 65b1b9e..de6bc08 100644
--- a/scripts/Bj6bxItlgtI2sXVN.js
+++ b/scripts/Bj6bxItlgtI2sXVN.js
@@ -1,4 +1,4 @@
-let roll = await new Roll("1d10").roll();
+let roll = await new Roll("1d10").roll({allowInteractive : false});
roll.toMessage(this.script.getChatData());
args.totalWoundLoss = Math.max(0, args.totalWoundLoss - roll.total)
args.modifiers.other.push({label: this.effect.name, value : -1 * roll.total})
diff --git a/scripts/BtyFhdGMKiMamGhM.js b/scripts/BtyFhdGMKiMamGhM.js
deleted file mode 100644
index 9f4b6b1..0000000
--- a/scripts/BtyFhdGMKiMamGhM.js
+++ /dev/null
@@ -1,15 +0,0 @@
-let test = await args.actor.setupSkill("Esquive", {skipTargets: true, appendTitle : ` - ${this.effect.name}`})
-await test.roll();
-let damage = parseInt(this.effect.sourceTest.result.SL)
-
-if (test.succeded)
-{
- damage = damage + 8 - parseInt(test.result.SL)
-}
-
-else
-{
- damage = damage + 10
- this.actor.addCondition("entangled", 3)
-}
-this.script.scriptMessage(await this.actor.applyBasicDamage(damage, {loc : "roll", suppressMsg: true}))
diff --git a/scripts/Bu0KUpGvfmFF7LJs.js b/scripts/Bu0KUpGvfmFF7LJs.js
new file mode 100644
index 0000000..3b86af0
--- /dev/null
+++ b/scripts/Bu0KUpGvfmFF7LJs.js
@@ -0,0 +1,15 @@
+let test = await this.actor.setupCharacteristic("s", {appendTitle : ` - ${this.effet.name}`, fields : {difficulty : "difficult"}});
+
+await Test.roll();
+
+if (Test.Échoué)
+{
+
+ if (Test.isCriticalFumble == "fumble")
+ {
+ return this.script.message(`${this.actor.name} meurt alors qu'il est entraîné dans l'Aethyr (à moins qu'il ne dépense un point de Destinée pour éviter cela).`);
+ }
+
+ await this.script.message(await this.actor.applyBasicDamage(3, { damageType: game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL, suppressMsg: true }))
+
+}
\ No newline at end of file
diff --git a/scripts/Bv3431tnG3VKaTJr.js b/scripts/Bv3431tnG3VKaTJr.js
index 9aa3165..148db69 100644
--- a/scripts/Bv3431tnG3VKaTJr.js
+++ b/scripts/Bv3431tnG3VKaTJr.js
@@ -1,4 +1,4 @@
if (args.test.result.castOutcome == "success")
{
- args.test.result.other.push(`@Fear[2,${this.actor.name}]`);
+ args.test.result.other.push(`@Peur[2,${this.actor.name}]`);
}
\ No newline at end of file
diff --git a/scripts/C5NIkJwXL85Qbpe7.js b/scripts/C5NIkJwXL85Qbpe7.js
new file mode 100644
index 0000000..7ba0cf6
--- /dev/null
+++ b/scripts/C5NIkJwXL85Qbpe7.js
@@ -0,0 +1 @@
+args.weaponProperties.impale = true;
\ No newline at end of file
diff --git a/scripts/CCK1iIfPmB398ziT.js b/scripts/CCK1iIfPmB398ziT.js
deleted file mode 100644
index 4d67bea..0000000
--- a/scripts/CCK1iIfPmB398ziT.js
+++ /dev/null
@@ -1,2 +0,0 @@
-let test = await this.actor.setupSkill(game.i18n.localize("NAME.Athletics"), {fields : {difficulty : "difficult"}, skipTargets: true, appendTitle : " - Walking"})
-test.roll();
\ No newline at end of file
diff --git a/scripts/CHnaBPHk6HdFS512.js b/scripts/CHnaBPHk6HdFS512.js
index 93dbc6d..0bdfb7c 100644
--- a/scripts/CHnaBPHk6HdFS512.js
+++ b/scripts/CHnaBPHk6HdFS512.js
@@ -1,6 +1,6 @@
let arm = await fromUuid("Compendium.wfrp4e-core.items.MnMZv7ZXoRqoH9dS");
let leg = await fromUuid("Compendium.wfrp4e-core.items.k00PimCWkff11IA0");
-let choice = await ItemDialog.create([arm, leg], 1, "Choisir le Membre")
+let choice = await ItemDialog.create([arm, leg], 1, "Choisir le membre")
this.actor.createEmbeddedDocuments("Item", choice, {fromEffect: this.effect.id})
\ No newline at end of file
diff --git a/scripts/CIxZYkHggBQ6EsHP.js b/scripts/CIxZYkHggBQ6EsHP.js
index d5c9c31..03fbf4c 100644
--- a/scripts/CIxZYkHggBQ6EsHP.js
+++ b/scripts/CIxZYkHggBQ6EsHP.js
@@ -1,2 +1,2 @@
-this.script.scriptNotification("Effet utilisé");
+this.script.notification("Effet utilisé");
this.effect.delete();
\ No newline at end of file
diff --git a/scripts/CS6O7UUjQcUJoOUP.js b/scripts/CS6O7UUjQcUJoOUP.js
index 1a8a772..22260d5 100644
--- a/scripts/CS6O7UUjQcUJoOUP.js
+++ b/scripts/CS6O7UUjQcUJoOUP.js
@@ -1,9 +1,10 @@
-if (args.test.failed) {
- let SL = Number(args.test.result.SL)
- if (SL <= -2 && SL > -4)
- this.actor.addCondition("stunned")
- else if (SL <= -4 && SL > -6)
- this.script.scriptMessage(this.actor.prototypeToken.name + " doit réaliser un Test de Force Mentale -4)
+ this.actor.addCondition("stunned")
+ else if (SL <= -4 && SL > -6)
+ this.script.message(this.actor.prototypeToken.name + " Doit réaliser un test a FM être @Condition[Prone].")
+ else if (SL <= -6)
+ this.actor.addCondition("unconscious")
+ }
\ No newline at end of file
diff --git a/scripts/CUBpU1imu2eRS06C.js b/scripts/CUBpU1imu2eRS06C.js
new file mode 100644
index 0000000..1a0a33e
--- /dev/null
+++ b/scripts/CUBpU1imu2eRS06C.js
@@ -0,0 +1,5 @@
+if (args.opposedTest.attackerTest.weapon?.system.properties?.qualities.hack && !args.hackReminder)
+{
+ args.hackReminder = true;
+ args.opposedTest.result.other.push(`${this.effect.name}: Hack causes ${this.item.Advances} extra damage`)
+}
\ No newline at end of file
diff --git a/scripts/CW5Vlr57OaMkKJ8Q.js b/scripts/CW5Vlr57OaMkKJ8Q.js
index 56db697..88cec81 100644
--- a/scripts/CW5Vlr57OaMkKJ8Q.js
+++ b/scripts/CW5Vlr57OaMkKJ8Q.js
@@ -1,11 +1,11 @@
if (this.actor.system.status.advantage.value >= 3)
{
this.actor.modifyAdvantage(-3);
- this.script.scriptNotification("Avantage soustrait")
+ this.script.notification("Avantage retiré")
}
else
{
- return this.script.scriptNotification("Pas assez d'Avantages!", "error")
+ return this.script.notification("Avantage retiré", "error")
}
let test = await this.actor.setupTrait(this.item)
diff --git a/scripts/CWNGrg7se91RC95g.js b/scripts/CWNGrg7se91RC95g.js
index ca54b5c..13d9446 100644
--- a/scripts/CWNGrg7se91RC95g.js
+++ b/scripts/CWNGrg7se91RC95g.js
@@ -1,11 +1,11 @@
if (args.totalWoundLoss > 0) {
args.opposedTest.result.other.push(
- `@Corruption[minor]{Exposition Mineure à la Corruption}`
+ `@Corruption[minor]{Moderate Exposure to Corruption}`
)
- this.script.scriptMessage(`${this.effect.name}:
- @Corruption[moderate]{Exposition Modérée à la Corruption}
- ${args.actor.prototypeToken.name} doit réussir un
- Test de Corruption (Modéré)`,
+ this.script.message(`${this.effect.name}:
+ @Corruption[moderate]{Moderate Exposure to Corruption}
+ ${args.actor.prototypeToken.name} must take an
+ Corruption (Moderate) Test`,
{whisper: ChatMessage.getWhisperRecipients("GM")}
)
}
\ No newline at end of file
diff --git a/scripts/CbfUDhUr5R4UnPPq.js b/scripts/CbfUDhUr5R4UnPPq.js
new file mode 100644
index 0000000..1185304
--- /dev/null
+++ b/scripts/CbfUDhUr5R4UnPPq.js
@@ -0,0 +1,5 @@
+if (this.actor && this.actor?.name !== "Kurgorn Three-eyes" && !this.actor.hasCondition("blinded") && !args.itemUpdated)
+{
+ this.script.notification(`Impossible de supprimer l'état Aveuglé.`);
+ await this.actor.addCondition("blinded", 1, {statuses : ["blinded", "blind"]})
+}
\ No newline at end of file
diff --git a/scripts/CcR9i3UzUXx7ieep.js b/scripts/CcR9i3UzUXx7ieep.js
new file mode 100644
index 0000000..33ccf55
--- /dev/null
+++ b/scripts/CcR9i3UzUXx7ieep.js
@@ -0,0 +1 @@
+args.fields.modifier +=10;
\ No newline at end of file
diff --git a/scripts/CiFeduksZJ6PRulx.js b/scripts/CiFeduksZJ6PRulx.js
deleted file mode 100644
index 57463db..0000000
--- a/scripts/CiFeduksZJ6PRulx.js
+++ /dev/null
@@ -1 +0,0 @@
-return args.skill?.name == "Chevaucher (Cheval)" || (args.options.dodge && this.actor.isMounted);
\ No newline at end of file
diff --git a/scripts/Cjj4iLkdY1NaZRCi.js b/scripts/Cjj4iLkdY1NaZRCi.js
index 1bb4744..8b2de55 100644
--- a/scripts/Cjj4iLkdY1NaZRCi.js
+++ b/scripts/Cjj4iLkdY1NaZRCi.js
@@ -1,26 +1,9 @@
if ((args.opposedTest.attackerTest.item && args.opposedTest.attackerTest.item.isMelee) || (args.opposedTest.attackerTest.item && !args.opposedTest.attackerTest.item.name.includes("Projectiles")))
{
- let choice = await Dialog.wait({
- title: this.effect.name,
- content: `
Apply damage with ${this.effect.name} to attacker?`})
if (choice)
{
- this.script.scriptMessage(await args.attacker.applyBasicDamage(this.actor.system.characteristics.wp.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_AP, suppressMsg : true}));
+ this.script.message(await args.attacker.applyBasicDamage(this.actor.system.characteristics.wp.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_AP, suppressMsg : true}));
}
}
\ No newline at end of file
diff --git a/scripts/CkE8NZOhzPkuRrKJ.js b/scripts/CkE8NZOhzPkuRrKJ.js
deleted file mode 100644
index d4e519f..0000000
--- a/scripts/CkE8NZOhzPkuRrKJ.js
+++ /dev/null
@@ -1,14 +0,0 @@
-let item = await fromUuid("Compendium.wfrp4e-core.items.MnMZv7ZXoRqoH9dS")
-let data = item.toObject();
-data.system.location.key = this.item.system.location.key
-this.actor.createEmbeddedDocuments("Item", [data])
-
-
-
-
-let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {fields: {difficulty: "hard"}, skipTargets: true, appendTitle : ` - ${this.effect.name}`})
-await test.roll();
-if (test.failed)
-{
- this.actor.addCondition("unconscious")
-}
\ No newline at end of file
diff --git a/scripts/ClkT2WG2UjVwQ97T.js b/scripts/ClkT2WG2UjVwQ97T.js
index d53f472..6c3623f 100644
--- a/scripts/ClkT2WG2UjVwQ97T.js
+++ b/scripts/ClkT2WG2UjVwQ97T.js
@@ -3,12 +3,12 @@ if (args.actor.has("Démoniaque")) {
args.modifiers.other.push({label: this.effect.name, value: 3});
}
-let test = await args.actor.setupSkill("Endurance", {
+let test = await args.actor.setupSkill("Résistance", {
appendTitle: ` – ${this.effect.name}`,
skipTargets: true,
characteristic: 't',
context: {
- failure: "Received 1 Blinded Condition"
+ failure: "Reçoit 1 État Aveuglé"
}
});
await test.roll();
diff --git a/scripts/Cri5Q7ux6ni7zNVS.js b/scripts/Cri5Q7ux6ni7zNVS.js
new file mode 100644
index 0000000..4d81c3f
--- /dev/null
+++ b/scripts/Cri5Q7ux6ni7zNVS.js
@@ -0,0 +1,7 @@
+// Cannot be Surprised in combat.
+
+if (this.actor.hasCondition("surprised"))
+{
+ this.actor.removeCondition("surprised")
+ ui.notifications.notify(`${this.effect.name}: Cannot be surprised`);
+}
\ No newline at end of file
diff --git a/scripts/CxsKWGwQqtAaQdzX.js b/scripts/CxsKWGwQqtAaQdzX.js
new file mode 100644
index 0000000..f1c461a
--- /dev/null
+++ b/scripts/CxsKWGwQqtAaQdzX.js
@@ -0,0 +1 @@
+return args.characteristic === "fel";
\ No newline at end of file
diff --git a/scripts/CynUM4ZEiB9QbNQq.js b/scripts/CynUM4ZEiB9QbNQq.js
new file mode 100644
index 0000000..c9419fd
--- /dev/null
+++ b/scripts/CynUM4ZEiB9QbNQq.js
@@ -0,0 +1,3 @@
+const bonus = game.settings.get("wfrp4e", "homebrew").advantageBonus;
+
+args.fields.modifier += 2 * bonus;
\ No newline at end of file
diff --git a/scripts/DHxUKY9LMyifFgCi.js b/scripts/DHxUKY9LMyifFgCi.js
index f05e6f3..28c06b3 100644
--- a/scripts/DHxUKY9LMyifFgCi.js
+++ b/scripts/DHxUKY9LMyifFgCi.js
@@ -1 +1 @@
-return args.skill?.name == "Métier (Apothicaire)" || args.skill?.name == "Métier (Alchimiste)"
\ No newline at end of file
+return args.skill?.name == "Métier (Apothicaire)" || args.skill?.name == "Trade (Alchemist)"
\ No newline at end of file
diff --git a/scripts/DTiHS6RfwhF4THbf.js b/scripts/DTiHS6RfwhF4THbf.js
deleted file mode 100644
index 1a7339b..0000000
--- a/scripts/DTiHS6RfwhF4THbf.js
+++ /dev/null
@@ -1 +0,0 @@
-return args.skill?.name != game.i18n.localize("NAME.Drive") && !args.skill?.name.includes(game.i18n.localize("NAME.Ride"));
\ No newline at end of file
diff --git a/scripts/DUFSlDO38fQWclBE.js b/scripts/DUFSlDO38fQWclBE.js
new file mode 100644
index 0000000..708b63c
--- /dev/null
+++ b/scripts/DUFSlDO38fQWclBE.js
@@ -0,0 +1,6 @@
+// Characters wounded by the ravens gain the ability to read, understand and speak rudimentary Classical.
+// This ability does not last beyond this adventure.
+
+this.actor.addEffectItems("Compendium.wfrp4e-core.items.Item.61L9aX2z164cjm7K", this.effect)
+
+this.script.message(`${args.actor.name} gains the ability to read, understand and speak rudimentary @UUID[Compendium.wfrp4e-core.items.Item.61L9aX2z164cjm7K]{Classical}. This ability does not last beyond this adventure.`)
\ No newline at end of file
diff --git a/scripts/DVlZGbiuMIHEQOnM.js b/scripts/DVlZGbiuMIHEQOnM.js
index 9ecada3..d475efa 100644
--- a/scripts/DVlZGbiuMIHEQOnM.js
+++ b/scripts/DVlZGbiuMIHEQOnM.js
@@ -4,7 +4,7 @@ if (this.actor.getFlag("wfrp4e", "isAttached"))
await roll.toMessage(this.script.getChatData());
if (roll.total == 9 || roll.total == 10)
{
- this.script.scriptMessage(`${this.actor.name} attaché à ${this.actor.getFlag("wfrp4e", "isAttached")} tombe.`)
+ this.script.message(`${this.actor.name} attached to ${this.actor.getFlag("wfrp4e", "isAttached")} gorges and falls off.`)
await this.actor.unsetFlag("wfrp4e", "isAttached")
}
}
\ No newline at end of file
diff --git a/scripts/DhZqJso1JWYtGrKk.js b/scripts/DhZqJso1JWYtGrKk.js
index 5808036..bf582e3 100644
--- a/scripts/DhZqJso1JWYtGrKk.js
+++ b/scripts/DhZqJso1JWYtGrKk.js
@@ -1,3 +1,3 @@
this.actor.addCondition("ablaze")
let damage = this.effect.sourceTest.result.damage + this.effect.sourceTest.result.additionalDamage
-this.script.scriptMessage(await this.actor.applyBasicDamage(damage, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL, suppressMsg : true}))
\ No newline at end of file
+this.script.message(await this.actor.applyBasicDamage(damage, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL, suppressMsg : true}))
\ No newline at end of file
diff --git a/scripts/Dk4VF4UXSMK5SaVP.js b/scripts/Dk4VF4UXSMK5SaVP.js
new file mode 100644
index 0000000..2a2f2c6
--- /dev/null
+++ b/scripts/Dk4VF4UXSMK5SaVP.js
@@ -0,0 +1,2 @@
+this.script.message("Activé pour annulé les Échecs critiques / Echecs")
+this.effect.update({disabled: true})
\ No newline at end of file
diff --git a/scripts/DmbWR9s5I8LHBwxB.js b/scripts/DmbWR9s5I8LHBwxB.js
index 27af841..365de2d 100644
--- a/scripts/DmbWR9s5I8LHBwxB.js
+++ b/scripts/DmbWR9s5I8LHBwxB.js
@@ -1,4 +1,4 @@
-let column = await ValueDialog.create({text : "Select the column to roll on to determine Beast Head", title : "Select Column"}, "", ["Undivided", "Khorne", "Nurgle", "Slaanesh", "Tzeentch"]);
+let column = await ValueDialog.create({text : "Sélectionnez la colonne de lancer pour déterminer la Tête de Bête", title : "Sélectionnez une Colonne"}, "", ["Undivided", "Khorne", "Nurgle", "Slaanesh", "Tzeentch"]);
if (column)
{
diff --git a/scripts/DsE6rTSzxEn6uWMz.js b/scripts/DsE6rTSzxEn6uWMz.js
deleted file mode 100644
index 63b87e9..0000000
--- a/scripts/DsE6rTSzxEn6uWMz.js
+++ /dev/null
@@ -1,7 +0,0 @@
-let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields : {difficulty : "average"}})
-await test.roll();
-if (test.failed)
-{
- await this.actor.addCondition("blinded");
- await this.actor.addCondition("fatigued")
-}
\ No newline at end of file
diff --git a/scripts/DuM5l2Yb4bdvDeaG.js b/scripts/DuM5l2Yb4bdvDeaG.js
deleted file mode 100644
index bf15220..0000000
--- a/scripts/DuM5l2Yb4bdvDeaG.js
+++ /dev/null
@@ -1 +0,0 @@
-return args.skill?.name != "Athlétisme"
\ No newline at end of file
diff --git a/scripts/DvJvHsjgkzIfFaks.js b/scripts/DvJvHsjgkzIfFaks.js
new file mode 100644
index 0000000..a011aeb
--- /dev/null
+++ b/scripts/DvJvHsjgkzIfFaks.js
@@ -0,0 +1,3 @@
+if (!args.test.preData.options?.runeOfParrying) return
+if (!this.item.equipped.value || !args.test.item) return;
+args.test.preData.canReverse = true
\ No newline at end of file
diff --git a/scripts/DxM3NRgQYc7moMPc.js b/scripts/DxM3NRgQYc7moMPc.js
new file mode 100644
index 0000000..3531ec6
--- /dev/null
+++ b/scripts/DxM3NRgQYc7moMPc.js
@@ -0,0 +1 @@
+this.actor.reset()
\ No newline at end of file
diff --git a/scripts/DxQnamsb2AuW0p2e.js b/scripts/DxQnamsb2AuW0p2e.js
deleted file mode 100644
index fbdcd2f..0000000
--- a/scripts/DxQnamsb2AuW0p2e.js
+++ /dev/null
@@ -1 +0,0 @@
-return !args.skill?.name.includes(game.i18n.localize("NAME.Lore"));
\ No newline at end of file
diff --git a/scripts/Dy67jQmeGwHwV9NY.js b/scripts/Dy67jQmeGwHwV9NY.js
new file mode 100644
index 0000000..9698637
--- /dev/null
+++ b/scripts/Dy67jQmeGwHwV9NY.js
@@ -0,0 +1 @@
+args.fields.modifier -=10;
\ No newline at end of file
diff --git a/scripts/E0HHBSdQR3oH8KaL.js b/scripts/E0HHBSdQR3oH8KaL.js
new file mode 100644
index 0000000..2f6f93f
--- /dev/null
+++ b/scripts/E0HHBSdQR3oH8KaL.js
@@ -0,0 +1,7 @@
+if (args.totalWoundLoss > 0) {
+ let frenzy = await fromUuid("Compendium.wfrp4e-core.items.Item.DrNUTPeodEgpWTnT");
+ frenzy = frenzy.toObject();
+ frenzy.effects[0].disabled = false;
+ this.actor.createEmbeddedDocuments("Item", [frenzy], {fromEffect : this.effect.id});
+ this.script.scriptMessage("Carnosaur gains Frenzy");
+}
\ No newline at end of file
diff --git a/scripts/E1vUepgop09FF5wy.js b/scripts/E1vUepgop09FF5wy.js
index 058587a..7d069eb 100644
--- a/scripts/E1vUepgop09FF5wy.js
+++ b/scripts/E1vUepgop09FF5wy.js
@@ -1,6 +1,6 @@
if (this.actor.system.status.advantage.value == 0)
{
- return this.script.scriptNotification("Pas assez d'Avantages!", "error")
+ return this.script.notification("Avantage retiré", "error")
}
let hatred = await fromUuid("Compendium.wfrp4e-core.items.Item.aE3pyW20Orvdjzj0")
@@ -8,15 +8,15 @@ let frenzy = await fromUuid("Compendium.wfrp4e-core.items.Item.yRhhOlt18COq4e1q"
if (this.actor.system.status.advantage.value >= 3)
{
- this.script.scriptNotification(`Ajout de ${frenzy.name}`)
+ this.script.notification(`Ajout de ${frenzy.name}`)
this.actor.setAdvantage(0)
this.actor.createEmbeddedDocuments("Item", [frenzy])
}
else if (this.actor.system.status.advantage.value >= 1)
{
let data = hatred.toObject();
- data.system.specification.value = "Combatants au corps à corps"
- this.script.scriptNotification(`Ajout de ${hatred.name}`)
+ data.system.specification.value = "Opposants au corps à corps"
+ this.script.notification(`Ajout de ${hatred.name}`)
this.actor.setAdvantage(0)
this.actor.createEmbeddedDocuments("Item", [data])
}
\ No newline at end of file
diff --git a/scripts/E33J9JixYVGxaktQ.js b/scripts/E33J9JixYVGxaktQ.js
new file mode 100644
index 0000000..65bf20f
--- /dev/null
+++ b/scripts/E33J9JixYVGxaktQ.js
@@ -0,0 +1,3 @@
+if (this.effect.getFlag("wfrp4e", "fistsOfGork") && args.item.type == "skill" && args.item.name == "Corps à corps (Bagarre)") {
+ args.item.system.modifier.value += this.effect.getFlag("wfrp4e", "fistsOfGork")
+}
\ No newline at end of file
diff --git a/scripts/E3om295BMQojnM2F.js b/scripts/E3om295BMQojnM2F.js
index 8060980..1b34090 100644
--- a/scripts/E3om295BMQojnM2F.js
+++ b/scripts/E3om295BMQojnM2F.js
@@ -2,5 +2,5 @@ let fatigued = this.actor.hasCondition("fatigued")
if (fatigued)
{
fatigued.delete();
- this.script.scriptNotification("Fatigue supprimée")
+ this.script.notification("Retiré Exténué")
}
\ No newline at end of file
diff --git a/scripts/E4CHDe1xfmcV3oGv.js b/scripts/E4CHDe1xfmcV3oGv.js
deleted file mode 100644
index c1e0400..0000000
--- a/scripts/E4CHDe1xfmcV3oGv.js
+++ /dev/null
@@ -1 +0,0 @@
-return args.skill?.name == game.i18n.localize("NAME.Navigation");
\ No newline at end of file
diff --git a/scripts/E6DMqfDeczqmVMFV.js b/scripts/E6DMqfDeczqmVMFV.js
deleted file mode 100644
index 2a0bc28..0000000
--- a/scripts/E6DMqfDeczqmVMFV.js
+++ /dev/null
@@ -1,3 +0,0 @@
-let test = await this.actor.setupSkill(game.i18n.localize("NAME.Cool"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields : {difficulty : "average"}})
-
-await test.roll();
\ No newline at end of file
diff --git a/scripts/E7D4bxz8gy4e1wL7.js b/scripts/E7D4bxz8gy4e1wL7.js
deleted file mode 100644
index ec82dce..0000000
--- a/scripts/E7D4bxz8gy4e1wL7.js
+++ /dev/null
@@ -1 +0,0 @@
-if (["Stealth (Rural)", "Track", "Outdoor Survival", "Swim", "Perception", "Intuition"].includes(args.item?.name))
\ No newline at end of file
diff --git a/scripts/E7ksDLhihkJN4Vpt.js b/scripts/E7ksDLhihkJN4Vpt.js
new file mode 100644
index 0000000..55ad3bd
--- /dev/null
+++ b/scripts/E7ksDLhihkJN4Vpt.js
@@ -0,0 +1 @@
+return args.characteristic != "s" || args.type != "characteristic"
\ No newline at end of file
diff --git a/scripts/EBNrA6FNX4d05EUx.js b/scripts/EBNrA6FNX4d05EUx.js
index 1ad25de..349e285 100644
--- a/scripts/EBNrA6FNX4d05EUx.js
+++ b/scripts/EBNrA6FNX4d05EUx.js
@@ -1 +1 @@
-return !args.options.crewTest;
\ No newline at end of file
+return !args.context.crewTest;
\ No newline at end of file
diff --git a/scripts/EC8cZmqrE095cDc2.js b/scripts/EC8cZmqrE095cDc2.js
index 528f927..869c322 100644
--- a/scripts/EC8cZmqrE095cDc2.js
+++ b/scripts/EC8cZmqrE095cDc2.js
@@ -1,7 +1,7 @@
const actor = args.actor;
-if (actor.itemTypes.skill.find(s => s.name === "Savoir (Savoir)")) {
- const loreTest = await actor.setupSkill('Savoir (Savoir)', {
+if (actor.itemTypes.skill.find(s => s.name === "Savoir (Voies fluviales)")) {
+ const loreTest = await actor.setupSkill('Savoir (Voies fluviales)', {
appendTitle: ` – ${this.effect.name}`,
skipTargets: true,
fields: {difficulty: 'hard'},
@@ -10,22 +10,22 @@ if (actor.itemTypes.skill.find(s => s.name === "Savoir (Savoir)")) {
await loreTest.roll();
if (loreTest.succeeded) {
- loreTest.result.other.push(`${actor.name} reconnaît les leurres de Lurkerfis.`);
+ loreTest.result.other.push(`${actor.name} reconnaît les leurres des Lurkerfish.`);
loreTest.renderRollCard();
return;
- }
+ }
}
-let test = await actor.setupSkill('Calme', {
+let Test = await actor.setupSkill('Calme', {
appendTitle: ` – ${this.effect.name}`,
skipTargets: true,
fields: {difficulty: 'easy'},
characteristic: 'wp',
});
-await test.roll();
+await Test.roll();
-if (!test.succeeded) {
- test.result.other.push(`${actor.name} est devenu séduit par la vue et incapable d'effectuer aucune action sauf se diriger vers la lumière`);
- test.renderRollCard();
+if (!Test.succeeded) {
+ Test.result.other.push(`${actor.name} est devenu fasciné par la vue et incapable d'effectuer une quelconque action autre que de se déplacer vers la lumière.`);
+ Test.renderRollCard();
actor.addCondition("unconscious");
}
\ No newline at end of file
diff --git a/scripts/ECUIJLcKt2TCSFS3.js b/scripts/ECUIJLcKt2TCSFS3.js
new file mode 100644
index 0000000..1e4cb7f
--- /dev/null
+++ b/scripts/ECUIJLcKt2TCSFS3.js
@@ -0,0 +1 @@
+return !args.weapon?.system?.attackType || game.settings.get("wfrp4e", "useGroupAdvantage")
\ No newline at end of file
diff --git a/scripts/EDAMEOzdBfkoKHxP.js b/scripts/EDAMEOzdBfkoKHxP.js
deleted file mode 100644
index 6b1f28e..0000000
--- a/scripts/EDAMEOzdBfkoKHxP.js
+++ /dev/null
@@ -1 +0,0 @@
-return args.skill?.name !== game.i18n.localize("NAME.Navigation");
\ No newline at end of file
diff --git a/scripts/EGWF3LHav3e2zFL4.js b/scripts/EGWF3LHav3e2zFL4.js
deleted file mode 100644
index cb217a7..0000000
--- a/scripts/EGWF3LHav3e2zFL4.js
+++ /dev/null
@@ -1 +0,0 @@
-return args.skill?.name.includes(game.i18n.localize("NAME.Ranged")) || args.item?.isRanged || args.item?.name == game.i18n.localize("NAME.Charm");
\ No newline at end of file
diff --git a/scripts/EHfOyVwYhFGWNjw1.js b/scripts/EHfOyVwYhFGWNjw1.js
new file mode 100644
index 0000000..5de470f
--- /dev/null
+++ b/scripts/EHfOyVwYhFGWNjw1.js
@@ -0,0 +1,6 @@
+let test = await this.actor.setupSkill(game.i18n.localize("NAME.Résistance"), {difficulty: "difficult"})
+ await test.roll();
+ if (!test.succeeded)
+ {
+ await this.actor.addCondition("poisoned");
+ }
\ No newline at end of file
diff --git a/scripts/EJObiSth3WdcJOXN.js b/scripts/EJObiSth3WdcJOXN.js
index 79bf488..753c2bc 100644
--- a/scripts/EJObiSth3WdcJOXN.js
+++ b/scripts/EJObiSth3WdcJOXN.js
@@ -1,5 +1,5 @@
-if (args.test.characteristicKey == "wp" && args.test.failed && args.test.result.SL <= -3)
+if (args.test.characteristicKey == "wp" && args.Test.Échoué && args.Test.result.SL <= -3)
{
- this.script.scriptNotification("Ajout de A Terre");
+ this.script.notification("Ajout de A Terre");
this.actor.addCondition("prone")
}
\ No newline at end of file
diff --git a/scripts/EJaBfqADqlo92Fx6.js b/scripts/EJaBfqADqlo92Fx6.js
index 1902c51..0a5f078 100644
--- a/scripts/EJaBfqADqlo92Fx6.js
+++ b/scripts/EJaBfqADqlo92Fx6.js
@@ -1,4 +1,4 @@
let item = await fromUuid("Compendium.wfrp4e-core.items.oGbDwnLOn3isPJpO")
let data = item.toObject();
-data.name += " (A déterminer)"
+data.name += " (Au choix)"
this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id})
\ No newline at end of file
diff --git a/scripts/ENGmwaItRXO5s0XY.js b/scripts/ENGmwaItRXO5s0XY.js
index 8d8a308..9df13ab 100644
--- a/scripts/ENGmwaItRXO5s0XY.js
+++ b/scripts/ENGmwaItRXO5s0XY.js
@@ -1,5 +1,5 @@
await this.actor.modifyWounds(this.actor.system.characteristics.t.bonus * 3)
-this.script.scriptMessage(`Soigne ${this.actor.system.characteristics.t.bonus * 3} Blessures`)
+this.script.message(`Heals ${this.actor.system.characteristics.t.bonus * 3} Wounds`)
this.actor.hasCondition("bleeding")?.delete()
this.actor.hasCondition("fatigued")?.delete()
diff --git a/scripts/EQ5dtGW5kQhtAb87.js b/scripts/EQ5dtGW5kQhtAb87.js
deleted file mode 100644
index 767e730..0000000
--- a/scripts/EQ5dtGW5kQhtAb87.js
+++ /dev/null
@@ -1,7 +0,0 @@
-await this.actor.addCondition("prone")
-let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {fields: {difficulty : "hard"}, skipTargets: true, appendTitle : " - " + this.effect.name})
-await test.roll();
-if (test.failed)
-{
- await this.actor.addCondition("stunned")
-}
\ No newline at end of file
diff --git a/scripts/ERxrWzSpw8qwxFVi.js b/scripts/ERxrWzSpw8qwxFVi.js
index 6eb7ef4..51d4503 100644
--- a/scripts/ERxrWzSpw8qwxFVi.js
+++ b/scripts/ERxrWzSpw8qwxFVi.js
@@ -1 +1 @@
-this.script.scriptNotification(`Ne peut entrer ${this.effect.name}!`); this.actor.addCondition("broken");
\ No newline at end of file
+this.script.notification(`Impossible d'entrer dans ${this.effect.name} !`); this.actor.addCondition("broken");
\ No newline at end of file
diff --git a/scripts/ETfmit2Cx0Py77ai.js b/scripts/ETfmit2Cx0Py77ai.js
new file mode 100644
index 0000000..cbb98a3
--- /dev/null
+++ b/scripts/ETfmit2Cx0Py77ai.js
@@ -0,0 +1,48 @@
+let characteristics = {
+ "ws" : -10,
+ "bs" : 0,
+ "s" : 0,
+ "t" : 0,
+ "i" : -25,
+ "ag" : -20,
+ "dex" : 0,
+ "int" : -200,
+ "wp" : -200,
+ "fel" : -200
+}
+let traits = [ {name:"Fabriqué"}, {name:"Vision dans l'obscurité"}, {name:"Peur", value: 2}, {name:"Insensible à la douleur"},{name:"Mort-vivant"},{name:"Instable"} ];
+let items = [];
+
+let updateObj = this.actor.toObject();
+for (let ch in characteristics)
+{
+ updateObj.system.characteristics[ch].modifier += characteristics[ch];
+}
+
+updateObj.system.characteristics.int.initial = 0;
+updateObj.system.characteristics.wp.initial = 0;
+updateObj.system.characteristics.fel.initial = 0;
+
+for (let trait of traits)
+{
+ let traitItem = await game.wfrp4e.utility.find(trait.name, "trait")
+ if (traitItem)
+ {
+ let t = traitItem.toObject();
+ t.system.specification.value = trait.value;
+ items.push(t);
+ }
+ else
+ {
+ ui.notifications.warn(`: -200
+}
+let traits = [ {name:`, {permanent : true})
+ }
+}
+
+
+updateObj.name = updateObj.name += " " + this.effet.name
+
+await this.actor.update(updateObj)
+this.actor.createEmbeddedDocuments("Item", items);
+
diff --git a/scripts/ETrfkHI0B9YjJqM2.js b/scripts/ETrfkHI0B9YjJqM2.js
new file mode 100644
index 0000000..5f20584
--- /dev/null
+++ b/scripts/ETrfkHI0B9YjJqM2.js
@@ -0,0 +1 @@
+return this.item.equipped.value && this.actor.isOpposing && this.actor.attacker.test.item.attackType == "melee"
\ No newline at end of file
diff --git a/scripts/EU5j0hnDTG9Z6d1e.js b/scripts/EU5j0hnDTG9Z6d1e.js
deleted file mode 100644
index 82d6a1d..0000000
--- a/scripts/EU5j0hnDTG9Z6d1e.js
+++ /dev/null
@@ -1,6 +0,0 @@
-let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields: {difficulty: "hard"}})
-await test.roll();
-if(test.failed)
-{
- this.actor.addCondition("stunned", 2)
-}
\ No newline at end of file
diff --git a/scripts/EVBSHEC5nmmj2X41.js b/scripts/EVBSHEC5nmmj2X41.js
deleted file mode 100644
index c08a5ea..0000000
--- a/scripts/EVBSHEC5nmmj2X41.js
+++ /dev/null
@@ -1 +0,0 @@
-return args.skill?.name != game.i18n.localize("NAME.Climb") && !args.skill?.name?.includes(game.i18n.localize("NAME.Stealth"));
\ No newline at end of file
diff --git a/scripts/EdTChmSouS0MSmk5.js b/scripts/EdTChmSouS0MSmk5.js
index a6566d8..c9ff27e 100644
--- a/scripts/EdTChmSouS0MSmk5.js
+++ b/scripts/EdTChmSouS0MSmk5.js
@@ -1,10 +1,10 @@
-let test = await this.actor.setupCharacteristic("wp", {skipTargets: true, appendTitle : ` - ${this.effect.name}`})
-await test.roll();
-if (test.succeeded)
+let test = await this.actor.setupCharacteristic("wp", {skipTargets: true, appendTitle : ` - ${this.effet.name}`})
+await Test.roll();
+if (Test.succeeded)
{
- this.script.scriptMessage("Peut effectuer une Action ou un Mouvement (en choisir un)")
+ this.script.message("Peut réaliser une Action ou un Déplacement (choisissez-en un)")
}
-else
+else
{
- this.script.scriptMessage("Ne peut pas effectuer d'Action ou de Mouvement ce round")
+ this.script.message("Ne peut pas réaliser une Action ou un Déplacement ce tour-ci")
}
\ No newline at end of file
diff --git a/scripts/ElHBPMMx37SZMvOC.js b/scripts/ElHBPMMx37SZMvOC.js
new file mode 100644
index 0000000..4fa3858
--- /dev/null
+++ b/scripts/ElHBPMMx37SZMvOC.js
@@ -0,0 +1,2 @@
+this.actor.addCondition("ablaze");
+this.script.scriptMessage(`${this.actor.name} has a received a @Condition[Ablaze]`)
\ No newline at end of file
diff --git a/scripts/EmXwcuycEH8slEn5.js b/scripts/EmXwcuycEH8slEn5.js
deleted file mode 100644
index 4bd0b62..0000000
--- a/scripts/EmXwcuycEH8slEn5.js
+++ /dev/null
@@ -1,6 +0,0 @@
-let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields: {difficulty: "hard"}})
-await test.roll();
-if(test.failed)
-{
- this.actor.addCondition("unconscious")
-}
\ No newline at end of file
diff --git a/scripts/EmmG49pMOPHRwDzR.js b/scripts/EmmG49pMOPHRwDzR.js
deleted file mode 100644
index 2c59128..0000000
--- a/scripts/EmmG49pMOPHRwDzR.js
+++ /dev/null
@@ -1,8 +0,0 @@
- let roll = Math.ceil(CONFIG.Dice.randomUniform() * 10)
- if (args.test.isFumble && roll == 1 && !args.test.result.misfire)
- {
- args.test.result.misfire = game.i18n.localize("Misfire") + " (Résultat 1)"
- args.test.result.misfireDamage = eval(parseInt(args.test.result.roll.toString().split('').pop()) + args.test.item.Damage)
- }
- else if (args.test.isFumble && roll != 1)
- args.test.result.other.push("Raté résultat: " + roll)
diff --git a/scripts/EsZx8cY34quYG4MQ.js b/scripts/EsZx8cY34quYG4MQ.js
new file mode 100644
index 0000000..2c537af
--- /dev/null
+++ b/scripts/EsZx8cY34quYG4MQ.js
@@ -0,0 +1,5 @@
+let runes = this.actor.itemTypes["wfrp4e-dwarfs.rune"]
+if (runes.length === 0) return ui.notifications.error("Cet acteur ne connaît aucune rune.")
+
+let rune = await ItemDialog.create(this.actor.itemTypes["wfrp4e-dwarfs.rune"], 1, {text: "Sélectionnez une Rune", title: this.effect.name})
+rune[0].system.use({initialTooltip: "Bonus Enclume de la Destinée", fields: {modifier: 20}})
\ No newline at end of file
diff --git a/scripts/Ew3C2WmLCtc1KT46.js b/scripts/Ew3C2WmLCtc1KT46.js
deleted file mode 100644
index 9e8991b..0000000
--- a/scripts/Ew3C2WmLCtc1KT46.js
+++ /dev/null
@@ -1 +0,0 @@
-return args.skill?.name.includes(game.i18n.localize("NAME.Stealth")) || args.item?.id == this.item?.id
\ No newline at end of file
diff --git a/scripts/F2u4L4o0r1LTWeWK.js b/scripts/F2u4L4o0r1LTWeWK.js
index eafbde8..d2915d2 100644
--- a/scripts/F2u4L4o0r1LTWeWK.js
+++ b/scripts/F2u4L4o0r1LTWeWK.js
@@ -1,6 +1,6 @@
if (isNaN(parseInt(this.item.system.specification.value)))
{
- let value = await ValueDialog.create({text : "Enter Terror value", title : this.effect.name});
+ let value = await ValueDialog.create({text : "Entrez la valeur de Terreur", title : this.effect.name});
if (value)
{
this.item.updateSource({"system.specification.value" : value});
diff --git a/scripts/F7BHb4a7fqWMnYxH.js b/scripts/F7BHb4a7fqWMnYxH.js
new file mode 100644
index 0000000..dcf04fa
--- /dev/null
+++ b/scripts/F7BHb4a7fqWMnYxH.js
@@ -0,0 +1 @@
+args.test.data.result.other.push(`You may not use Fortune Points because of ${this.effect.name}`);
\ No newline at end of file
diff --git a/scripts/F7E0Dr3sT7kkc2p7.js b/scripts/F7E0Dr3sT7kkc2p7.js
new file mode 100644
index 0000000..5568bbb
--- /dev/null
+++ b/scripts/F7E0Dr3sT7kkc2p7.js
@@ -0,0 +1 @@
+return this.actor.hasCondition("fatigued")
\ No newline at end of file
diff --git a/scripts/F8Bmh6w01YvKsBIO.js b/scripts/F8Bmh6w01YvKsBIO.js
new file mode 100644
index 0000000..3a49636
--- /dev/null
+++ b/scripts/F8Bmh6w01YvKsBIO.js
@@ -0,0 +1,6 @@
+for (const weapon of args.actor.itemTags.weapon) {
+ weapon.system.qualities.value.push(
+ {name: "impale", value: null},
+ {name: "penetrating", value: null},
+ );
+}
\ No newline at end of file
diff --git a/scripts/FGIHAkNdYXbTnewG.js b/scripts/FGIHAkNdYXbTnewG.js
new file mode 100644
index 0000000..60f29d1
--- /dev/null
+++ b/scripts/FGIHAkNdYXbTnewG.js
@@ -0,0 +1,6 @@
+if (!game.settings.get("wfrp4e", "useGroupAdvantage"))
+ return;
+
+
+await this.actor.modifyAdvantage(1);
+this.effect.delete();
\ No newline at end of file
diff --git a/scripts/FKEH7DeqU0FH4dkk.js b/scripts/FKEH7DeqU0FH4dkk.js
new file mode 100644
index 0000000..6bdbcd2
--- /dev/null
+++ b/scripts/FKEH7DeqU0FH4dkk.js
@@ -0,0 +1,7 @@
+let test = await this.actor.setupSkill(game.i18n.localize("NAME.Dodge"), {fields : {difficulty : "hard"}, appendTitle : ` - ${this.effect.name}`})
+await Test.roll();
+
+if (Test.Échoué) {
+ 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}`);
+}
\ No newline at end of file
diff --git a/scripts/FMA16PvoObBV8vDl.js b/scripts/FMA16PvoObBV8vDl.js
index 873a4f2..82214b9 100644
--- a/scripts/FMA16PvoObBV8vDl.js
+++ b/scripts/FMA16PvoObBV8vDl.js
@@ -2,4 +2,4 @@ let item = await fromUuid("Compendium.wfrp4e-core.items.EO05HX7jql0g605A")
item = item.toObject()
item.system.specification.value = 20
this.actor.createEmbeddedDocuments("Item", [item], {fromEffect : this.effect.id})
-this.script.scriptNotification(item.name + " added")
\ No newline at end of file
+this.script.notification(item.name + " added")
\ No newline at end of file
diff --git a/scripts/FPQp6XfbUH1BMafj.js b/scripts/FPQp6XfbUH1BMafj.js
new file mode 100644
index 0000000..1266f98
--- /dev/null
+++ b/scripts/FPQp6XfbUH1BMafj.js
@@ -0,0 +1,7 @@
+let test = await this.actor.setupSkill(game.i18n.localize("NAME.Athletics"), {fields : {difficulty : "vhard"}, appendTitle : ` - ${this.effect.name}`})
+await test.roll();
+if (test.failed)
+{
+ this.actor.addCondition("prone");
+ this.script.scriptMessage("Impossible de se déplacer ou d'agir ce tour");
+}
\ No newline at end of file
diff --git a/scripts/FPYNcxm21678boLT.js b/scripts/FPYNcxm21678boLT.js
index ccdea9e..f52f8b0 100644
--- a/scripts/FPYNcxm21678boLT.js
+++ b/scripts/FPYNcxm21678boLT.js
@@ -3,16 +3,16 @@ if (args.attackerTest.data.preData.characteristic !== "s") return;
const SL = args.opposedTest.data.opposeResult.differenceSL;
-const targetId = this.effect.getFlag("wfrp4e", "target");
+const targetId = this.effet.getFlag("wfrp4e", "target");
const target = canvas.scene.tokens.get(targetId);
if (SL > 4) {
- args.opposedTest.data.opposeResult.other.push(`${args.defenderTest.actor.name} a été obligé de lâcher çà ${target.name}.`);
- return await this.effect.delete();
+ args.opposedTest.data.opposeResult.other.push(`${args.defenderTest.actor.name} a été forcé de laisser partir ${target.name}.`);
+ return await this.effet.delete();
}
if (SL > 0) {
- args.opposedTest.data.opposeResult.other.push(`${args.defenderTest.actor.name} a été empêché de presser ${target.name} pour un tour.`);
+ args.opposedTest.data.opposeResult.other.push(`${args.defenderTest.actor.name} a été empêché de serrer ${target.name} pendant un tour.`);
let turns = this.effect.getFlag("wfrp4e", "turns");
this.effect.setFlag("wfrp4e", "turns", turns + 1);
}
\ No newline at end of file
diff --git a/scripts/FSqUqSByMiztYOQM.js b/scripts/FSqUqSByMiztYOQM.js
index 6d55901..bddfa30 100644
--- a/scripts/FSqUqSByMiztYOQM.js
+++ b/scripts/FSqUqSByMiztYOQM.js
@@ -1,2 +1,2 @@
if (args.totalWoundLoss > 0)
- this.script.scriptMessage(`Infecté: ${args.actor.name} doit réussir un Test de Résistance Facile (+40) ou recevoir une @UUID[Compendium.wfrp4e-core.items.kKccDTGzWzSXCBOb]{Blessure Purulente}`, {whisper: ChatMessage.getWhisperRecipients("GM") })
\ No newline at end of file
+ this.script.message(`Infected: ${args.actor.name} must pass an Easy (+40) Résistance Test or gain a @UUID[Compendium.wfrp4e-core.items.kKccDTGzWzSXCBOb]{Festering Wound}`, {whisper: ChatMessage.getWhisperRecipients("GM") })
\ No newline at end of file
diff --git a/scripts/FXuyiJoXdAh6WhRK.js b/scripts/FXuyiJoXdAh6WhRK.js
deleted file mode 100644
index dc55d15..0000000
--- a/scripts/FXuyiJoXdAh6WhRK.js
+++ /dev/null
@@ -1 +0,0 @@
-return args.skill?.name == "Chevaucher (Cheval)" && game.combat?.active
\ No newline at end of file
diff --git a/scripts/FYUPfYyTYZkxRLFT.js b/scripts/FYUPfYyTYZkxRLFT.js
deleted file mode 100644
index 35e86d3..0000000
--- a/scripts/FYUPfYyTYZkxRLFT.js
+++ /dev/null
@@ -1 +0,0 @@
-return !["NAME.Endurance", "NAME.Cool"].map(i => game.i18n.localize(i)).includes(args.skill?.name)
\ No newline at end of file
diff --git a/scripts/FZFOC7bip0oiWEzk.js b/scripts/FZFOC7bip0oiWEzk.js
index 9886f41..700aee7 100644
--- a/scripts/FZFOC7bip0oiWEzk.js
+++ b/scripts/FZFOC7bip0oiWEzk.js
@@ -1,5 +1,5 @@
if (args.opposedTest.result.hitloc.value == this.item.system.location.key && args.totalWoundLoss > 0)
{
args.actor.addCondition("bleeding", 2);
- this.script.scriptNotification("Ajout d'Hémorragie")
+ this.script.notification("Etat Hémorragique ajouté")
}
\ No newline at end of file
diff --git a/scripts/FbfJjYUyp0ArtZMb.js b/scripts/FbfJjYUyp0ArtZMb.js
new file mode 100644
index 0000000..0bee2c1
--- /dev/null
+++ b/scripts/FbfJjYUyp0ArtZMb.js
@@ -0,0 +1 @@
+args.fields.modifier += 15
\ No newline at end of file
diff --git a/scripts/FiD3mvWIBHNNIuO9.js b/scripts/FiD3mvWIBHNNIuO9.js
index 6c38499..181bb7e 100644
--- a/scripts/FiD3mvWIBHNNIuO9.js
+++ b/scripts/FiD3mvWIBHNNIuO9.js
@@ -3,6 +3,6 @@ if (args.opposedTest.result.hitloc.value == "body")
if ((await new Roll("1d2").roll()).total == 1)
{
args.opposedTest.result.hitloc.value = "head"
- this.script.scriptMessage(`Localisation changée : Tête`)
+ this.script.message(`Localisation du coup changé pour la tête`)
}
}
\ No newline at end of file
diff --git a/scripts/FkTwk8hfHpRLbAp2.js b/scripts/FkTwk8hfHpRLbAp2.js
deleted file mode 100644
index cd051cb..0000000
--- a/scripts/FkTwk8hfHpRLbAp2.js
+++ /dev/null
@@ -1,6 +0,0 @@
-let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`});
-await test.roll();
-if (test.failed)
-{
- this.actor.addCondition("prone")
-}
\ No newline at end of file
diff --git a/scripts/FmLx9pwOkzqqU7Ph.js b/scripts/FmLx9pwOkzqqU7Ph.js
deleted file mode 100644
index c54d1df..0000000
--- a/scripts/FmLx9pwOkzqqU7Ph.js
+++ /dev/null
@@ -1 +0,0 @@
-return args.skill?.name == game.i18n.localize("NAME.Track");
\ No newline at end of file
diff --git a/scripts/FqevMs0ukQ9WuUHl.js b/scripts/FqevMs0ukQ9WuUHl.js
index 3c05bd9..d352c76 100644
--- a/scripts/FqevMs0ukQ9WuUHl.js
+++ b/scripts/FqevMs0ukQ9WuUHl.js
@@ -5,5 +5,5 @@
if (this.item.getFlag("wfrp4e", "brittle"))
{
ChatMessage.create({content: `${this.item.name} shatters!`})
- this.item.update({name : `${this.item.name} (Brisé)`})
+ this.item.update({name : `${this.item.name} (Shattered)`})
}
\ No newline at end of file
diff --git a/scripts/FtZf56VI6Qsspu0D.js b/scripts/FtZf56VI6Qsspu0D.js
index dddf87c..b0c2102 100644
--- a/scripts/FtZf56VI6Qsspu0D.js
+++ b/scripts/FtZf56VI6Qsspu0D.js
@@ -1,5 +1,5 @@
-const repaired_message = `
Réparation finie ${this.item.name}.
`;
-const test = 'Trade (Carpenter)';
+const repaired_message = `
Réparation terminée ${this.item.name}.
`;
+const Test = 'Métier (Charpentier)';
const difficulty = 'difficult';
const target = 20;
@@ -12,8 +12,8 @@ const extendedTestData = {
current: 0,
target: target
},
- test: {
- value: test
+ Test: {
+ value: Test
},
completion: {
value: "remove"
@@ -24,7 +24,7 @@ const extendedTestData = {
},
effects: [
{
- name: `Réparer ${this.item.name}`,
+ name: `Réparation de ${this.item.name}`,
img: this.item.img,
system: {
transferData : {
diff --git a/scripts/FttdVBQiNssDAARh.js b/scripts/FttdVBQiNssDAARh.js
new file mode 100644
index 0000000..33ed33d
--- /dev/null
+++ b/scripts/FttdVBQiNssDAARh.js
@@ -0,0 +1 @@
+return args.data.targets[0]?.actor?.hasCondition("entangled")
\ No newline at end of file
diff --git a/scripts/Fu8DTvSgLufcB5mr.js b/scripts/Fu8DTvSgLufcB5mr.js
new file mode 100644
index 0000000..58af111
--- /dev/null
+++ b/scripts/Fu8DTvSgLufcB5mr.js
@@ -0,0 +1,44 @@
+async function rollTable(characteristics, formula, name) {
+ const roll = new Roll(formula);
+ await roll.toMessage({flavor: name});
+
+ const values = roll.dice[0].values;
+
+ for (const value of values) {
+ let characteristic;
+ switch (value) {
+ case 1: case 2: characteristic = "ws"; break;
+ case 3: case 4: characteristic = "i"; break;
+ case 5: case 6: characteristic = "int"; break;
+ case 7: case 8: characteristic = "fel"; break;
+ case 9: case 10: characteristic = "*"; break;
+ default: continue;
+ }
+
+ if (characteristics.has(characteristic)) {
+ await rollTable(characteristics, "1d10", name);
+ } else {
+ characteristics.add(characteristic);
+ }
+ }
+}
+
+const characteristics = new Set();
+await rollTable(characteristics, "2d10", this.effet.name)
+
+if (characteristics.has("*")) {
+ characteristics.delete("*");
+ const availableChoices = foundry.utils.duplicate(game.wfrp4e.config.characteristics);
+
+ for (const ch of characteristics) delete availableChoices[ch];
+
+ const result = warhammer.apps.ValueDialog.create({
+ text: "Choisissez une caractéristique",
+ }, "", availableChoices);
+
+ if (!result) return;
+
+ characteristics.add(result);
+}
+
+this.effet.setFlag("wfrp4e", "characteristicsToSwap", Array.from(characteristics));
\ No newline at end of file
diff --git a/scripts/Fvlc4RkeF4dHjW3m.js b/scripts/Fvlc4RkeF4dHjW3m.js
deleted file mode 100644
index 7b1ea9e..0000000
--- a/scripts/Fvlc4RkeF4dHjW3m.js
+++ /dev/null
@@ -1,16 +0,0 @@
-let caster = this.effect.sourceActor
-if (caster && (this.actor.has(game.i18n.localize("NAME.Undead")) || this.actor.has(game.i18n.localize("NAME.Daemonic")))) {
- let wp = caster.system.characteristics.wp.value
- if (wp > this.actor.system.characteristics.t.value) {
- if (this.actor.has(game.i18n.localize("NAME.Unstable"))) {
- this.actor.update({ "system.status.wounds.value": 0 })
- this.actor.addCondition("dead")
- }
- else {
- fromUuid("Compendium.wfrp4e-core.items.D0ImWEIMSDgElsnl").then(item => {
- this.actor.createEmbeddedDocuments("Item", [item.toObject()], { fromEffect: this.effect.id })
- ChatMessage.create({ content: `Ajout de Instable à ${this.actor.prototypeToken.name}`, speaker: { alias: caster.name } })
- })
- }
- }
-}
\ No newline at end of file
diff --git a/scripts/G7sFEnJlXZvfXL3V.js b/scripts/G7sFEnJlXZvfXL3V.js
index fe20e58..a7ab1bd 100644
--- a/scripts/G7sFEnJlXZvfXL3V.js
+++ b/scripts/G7sFEnJlXZvfXL3V.js
@@ -3,10 +3,10 @@ if (this.item.system.quantity.value)
this.item.system.reduceQuantity();
let actor = Array.from(game.user.targets)[0]?.actor || this.actor;
let effectData = this.item.effects.contents[1].convertToApplied();
- effectData.flags.wfrp4e.sourceItem = this.item.uuid
+ effectData.system.sourceData.item = this.item.uuid
actor.applyEffect({effectData : [effectData]})
}
else
{
- this.script.scriptNotification("Aucun restant!", "error")
+ this.script.notification("Plus rien !", "error")
}
\ No newline at end of file
diff --git a/scripts/G9ZPojp8qdjiXKZ5.js b/scripts/G9ZPojp8qdjiXKZ5.js
new file mode 100644
index 0000000..76f0287
--- /dev/null
+++ b/scripts/G9ZPojp8qdjiXKZ5.js
@@ -0,0 +1,3 @@
+if (!args.test.preData.options?.masterslayer) return
+if (!this.item.equipped.value || !args.test.item) return;
+args.test.preData.canReverse = true
\ No newline at end of file
diff --git a/scripts/GNgMG95jfabBeIwy.js b/scripts/GNgMG95jfabBeIwy.js
new file mode 100644
index 0000000..f921857
--- /dev/null
+++ b/scripts/GNgMG95jfabBeIwy.js
@@ -0,0 +1,4 @@
+if (!this.item.system.qualities.value.find(i => i.name == "fast"))
+{
+ this.item.system.qualities.value.push({name : "fast"})
+}
\ No newline at end of file
diff --git a/scripts/GOq4TcnWbfyfCo2V.js b/scripts/GOq4TcnWbfyfCo2V.js
deleted file mode 100644
index 72c7243..0000000
--- a/scripts/GOq4TcnWbfyfCo2V.js
+++ /dev/null
@@ -1,26 +0,0 @@
-this.script.scriptNotification(`Healed ${this.actor.characteristics.t.bonus * 2} Wounds`)
-await this.actor.modifyWounds(this.actor.characteristics.t.bonus * 2)
-
-let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {skipTargets: true, appendTitle : ` - Effets secondaires`,fields : {difficulty : "difficult"}})
-await test.roll();
-if (test.failed)
-{
- let roll = await new Roll("1d10").roll();
- await roll.toMessage(this.script.getChatData())
- if (roll.total <= 3)
- {
- this.actor.addCondition("blinded", 3)
- }
- else if (roll.total <= 6)
- {
- this.actor.addCondition("broken");
- }
- else if (roll.total <= 9)
- {
- this.actor.addCondition("stunned");
- }
- else if (roll.total == 10)
- {
- this.actor.addConditon("unconscious")
- }
-}
\ No newline at end of file
diff --git a/scripts/GRfCxtYzmEx2LYU7.js b/scripts/GRfCxtYzmEx2LYU7.js
index 81769f5..8d64bb0 100644
--- a/scripts/GRfCxtYzmEx2LYU7.js
+++ b/scripts/GRfCxtYzmEx2LYU7.js
@@ -1,9 +1,9 @@
if (args.totalWoundLoss >= 1)
{
- let roll = await new Roll("1d10").roll();
+ let roll = await new Roll("1d10").roll({allowInteractive : false});
await roll.toMessage(this.script.getChatData());
if (roll.total == 9)
{
- this.script.scriptMessage(`Deux @UUID[Compendium.wfrp4e-eis.actors.iDy8SDTwJSlCzZMl]{Horreurs Bleues de Tzeentch} sortent de la chair hurlante de ${this.actor.name}, le tuant au passage.`, {whisper : ChatMessage.getWhisperRecipients("GM")})
+ this.script.message(`Two @UUID[Compendium.wfrp4e-eis.actors.iDy8SDTwJSlCzZMl]{Blue Horror of Tzeentch} claw their way out of ${this.actor.name}'s screaming flesh, killing them in the process.`, {whisper : ChatMessage.getWhisperRecipients("GM")})
}
}
\ No newline at end of file
diff --git a/scripts/GTZUO73pUJKpM1JB.js b/scripts/GTZUO73pUJKpM1JB.js
index 3d99c30..744022f 100644
--- a/scripts/GTZUO73pUJKpM1JB.js
+++ b/scripts/GTZUO73pUJKpM1JB.js
@@ -1,3 +1,3 @@
- let roll = await new Roll("1d10").roll();
+ let roll = await new Roll("1d10").roll({allowInteractive : false});
game.dice3d?.showForRoll(roll);
- this.script.scriptMessage(await this.actor.applyBasicDamage(roll.total, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL, suppressMsg : true}))
+ this.script.message(await this.actor.applyBasicDamage(roll.total, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL, suppressMsg : true}))
diff --git a/scripts/GYhPhHIVrhx4pkgF.js b/scripts/GYhPhHIVrhx4pkgF.js
new file mode 100644
index 0000000..31e98e7
--- /dev/null
+++ b/scripts/GYhPhHIVrhx4pkgF.js
@@ -0,0 +1,4 @@
+if (args.combat.combatant.actor.uuid === this.effect.sourceItem.parent.uuid)
+{
+ this.effect.delete();
+}
\ No newline at end of file
diff --git a/scripts/GZFsuynUhgZqwTGo.js b/scripts/GZFsuynUhgZqwTGo.js
deleted file mode 100644
index bf5a7a7..0000000
--- a/scripts/GZFsuynUhgZqwTGo.js
+++ /dev/null
@@ -1,10 +0,0 @@
-if (args.totalWoundLoss >= 1)
-{
- let test = await args.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, context: { failure: "Gained a Poisoned Condition", success: "Resisted the poison" }})
- await test.roll();
- if (test.failed)
- {
- args.actor.addCondition("poisoned");
- }
-}
-
\ No newline at end of file
diff --git a/scripts/GbPEy22VuCNzlNv2.js b/scripts/GbPEy22VuCNzlNv2.js
deleted file mode 100644
index be6b4de..0000000
--- a/scripts/GbPEy22VuCNzlNv2.js
+++ /dev/null
@@ -1 +0,0 @@
-return !this.actor.isMounted || (!args.skill?.name?.includes(game.i18n.localize("NAME.Ride")) && !args.options.dodge)
\ No newline at end of file
diff --git a/scripts/Gc8S5TYlVdV8NnOT.js b/scripts/Gc8S5TYlVdV8NnOT.js
deleted file mode 100644
index 154ee3e..0000000
--- a/scripts/Gc8S5TYlVdV8NnOT.js
+++ /dev/null
@@ -1,8 +0,0 @@
-let test = await args.actor.setupSkill(game.i18n.localize("NAME.Cool"), {skipTargets: true, appendTitle : " - " + this.effect.name, context: { failure: "Gained a Broken Condition", success: "Resisted the Broken Condition" } })
-
- await test.roll();
-
- if (!test.succeeded)
- {
- args.actor.addCondition("broken");
- }
\ No newline at end of file
diff --git a/scripts/GePFbu5kp2ymGYEQ.js b/scripts/GePFbu5kp2ymGYEQ.js
new file mode 100644
index 0000000..a65aebf
--- /dev/null
+++ b/scripts/GePFbu5kp2ymGYEQ.js
@@ -0,0 +1 @@
+await this.actor.addEffectItems("Compendium.wfrp4e-core.items.Item.IAWyzDfC286a9MPz", this.effect);
\ No newline at end of file
diff --git a/scripts/GjUD5L4h8FXGVgGQ.js b/scripts/GjUD5L4h8FXGVgGQ.js
new file mode 100644
index 0000000..bb4d8de
--- /dev/null
+++ b/scripts/GjUD5L4h8FXGVgGQ.js
@@ -0,0 +1 @@
+args.initiative += "+30";
\ No newline at end of file
diff --git a/scripts/GjkxWj9wCAclM9WA.js b/scripts/GjkxWj9wCAclM9WA.js
index d57eb59..08b43ff 100644
--- a/scripts/GjkxWj9wCAclM9WA.js
+++ b/scripts/GjkxWj9wCAclM9WA.js
@@ -4,9 +4,9 @@ effects.splice(effects.length - 1);
if (effects.length == 0)
{
- return this.script.scriptNotification("Tous les effets ont été utilisés. Les remettre à 0 pour les utiliser à nouveau")
+ return this.script.notification("Tous les effets ont été utilisés. Réinitialisez pour les sélectionner à nouveau")
}
-let choice = await ItemDialog.create(effects, 1, "Choisissez le Pouvoir à gagner");
+let choice = await ItemDialog.create(effects, 1, "Choisir un effet à gagner");
if (choice[0])
{
diff --git a/scripts/GsAyB5xnK3ASeoah.js b/scripts/GsAyB5xnK3ASeoah.js
index 4b75fa2..cd22f5f 100644
--- a/scripts/GsAyB5xnK3ASeoah.js
+++ b/scripts/GsAyB5xnK3ASeoah.js
@@ -1,5 +1,5 @@
-const repaired_message = `
Réparation finie ${this.item.name}.
`;
-const test = 'Trade (Carpentry)';
+const repaired_message = `
Réparation terminée ${this.item.name}.
`;
+const Test = 'Trade (Carpentry)';
const difficulty = 'easy';
const target = 20;
@@ -12,8 +12,8 @@ const extendedTestData = {
current: 0,
target: target
},
- test: {
- value: test
+ Test: {
+ value: Test
},
completion: {
value: "remove"
@@ -24,7 +24,7 @@ const extendedTestData = {
},
effects: [
{
- name: `Réparer ${this.item.name}`,
+ name: `Réparation de ${this.item.name}`,
img: this.item.img,
system: {
transferData : {
diff --git a/scripts/Gsilp71BmIyHHce6.js b/scripts/Gsilp71BmIyHHce6.js
new file mode 100644
index 0000000..8499770
--- /dev/null
+++ b/scripts/Gsilp71BmIyHHce6.js
@@ -0,0 +1 @@
+args.context.masterslayer = true
\ No newline at end of file
diff --git a/scripts/GtfHQA9T1ip463le.js b/scripts/GtfHQA9T1ip463le.js
new file mode 100644
index 0000000..5e51672
--- /dev/null
+++ b/scripts/GtfHQA9T1ip463le.js
@@ -0,0 +1 @@
+return !["ws", "bs"].includes(args.characteristic)
\ No newline at end of file
diff --git a/scripts/GuSIY4Zqhc68qVEH.js b/scripts/GuSIY4Zqhc68qVEH.js
new file mode 100644
index 0000000..93de7b4
--- /dev/null
+++ b/scripts/GuSIY4Zqhc68qVEH.js
@@ -0,0 +1,6 @@
+if (!args.messageSent)
+{
+ args.messageSent = true;
+ let runes = this.item.effects.contents.filter(i => i.name == this.effect.name);
+ this.script.message(`${args.attacker.speaker.alias} reduce Run speed by ${runes.length * 4} yds.`)
+}
\ No newline at end of file
diff --git a/scripts/GzSFlqL1YrIK1dxh.js b/scripts/GzSFlqL1YrIK1dxh.js
index 77201c3..a5c3c2c 100644
--- a/scripts/GzSFlqL1YrIK1dxh.js
+++ b/scripts/GzSFlqL1YrIK1dxh.js
@@ -7,10 +7,9 @@ let items = await Promise.all(["Compendium.wfrp4e-wom.items.Item.EjGYZ4CgX2jZW7O
"Compendium.wfrp4e-wom.items.Item.CkMYRYCLrkMnyVm5",
"Compendium.wfrp4e-wom.items.Item.0Xdm4r7l2EwC4fcg"].map(fromUuid));
-let choice = await game.wfrp4e.apps.ItemDialog.create(items, 1, "Sélectionner le Vent")
+let choice = await game.wfrp4e.apps.ItemDialog.create(items, 1, "Sélectionner un Vent")
//this.actor.createEmbeddedDocuments("Item", items);
this.item.update(choice[0]?.toObject(), {diff: false, recursive : false});
//this.actor.items.getName(this.effect.item.name).delete() // For some reason this.effect.item.delete() throws an error
-
diff --git a/scripts/GzsuEg7gZy1f0ljy.js b/scripts/GzsuEg7gZy1f0ljy.js
index 48f3dfe..320c5bd 100644
--- a/scripts/GzsuEg7gZy1f0ljy.js
+++ b/scripts/GzsuEg7gZy1f0ljy.js
@@ -1,10 +1,10 @@
let bleeding = this.actor.hasCondition("bleeding")
if (bleeding)
{
- this.script.scriptNotification(`Suppression de ${bleeding.conditionValue} états Hémorragiques`)
- bleeding.delete();
+ this.script.notification(`Suppression de ${bleeding.conditionValue} états Hémorragique`)
+ Saignement.delete();
}
-else
+else
{
- this.script.scriptNotification(`Aucune Hémorragie`)
+ this.script.notification(`Aucun état Hémorragique`)
}
\ No newline at end of file
diff --git a/scripts/H06Ysj7oPiemW7S6.js b/scripts/H06Ysj7oPiemW7S6.js
index 518fffb..84c6ea5 100644
--- a/scripts/H06Ysj7oPiemW7S6.js
+++ b/scripts/H06Ysj7oPiemW7S6.js
@@ -14,5 +14,5 @@ if (args.test.options.income && !args.test.options.criminal)
let moneyString = `${moneyEarned}${coin}`
let transactionString = `${moneyEarned}${term}`
- this.script.scriptMessage(`Gain d'un supplément de ${game.wfrp4e.market.amountToString(game.wfrp4e.market.parseMoneyTransactionString(transactionString))}`, {whisper : ChatMessage.getWhisperRecipients("GM")})
+ this.script.message(`Gain additionnel de ${game.wfrp4e.market.amountToString(game.wfrp4e.market.parseMoneyTransactionString(transactionString))}`, {whisper : ChatMessage.getWhisperRecipients("GM")})
}
\ No newline at end of file
diff --git a/scripts/H2CJvApKMnfGNNoo.js b/scripts/H2CJvApKMnfGNNoo.js
deleted file mode 100644
index 39d38a9..0000000
--- a/scripts/H2CJvApKMnfGNNoo.js
+++ /dev/null
@@ -1,7 +0,0 @@
- if (args.test.item?.type == "skill" && args.test.item.name.includes(game.i18n.localize("NAME.Stealth")))
-{
- args.test.result.description = "Echech Stupéfiant";
- args.test.result.outcome = "failure";
- ChatMessage.create({content : "SQUEAK", speaker : ChatMessage.getSpeaker({token: this.actor.getActiveTokens()[0]?.document, actor: this.actor})}, {chatBubble : true})
- AudioHelper.play({ src: `${game.settings.get("wfrp4e", "soundPath")}squeek.wav` }, true);
-}
\ No newline at end of file
diff --git a/scripts/H3pZ9UeIzIz3luKh.js b/scripts/H3pZ9UeIzIz3luKh.js
index 70f99c0..e277e69 100644
--- a/scripts/H3pZ9UeIzIz3luKh.js
+++ b/scripts/H3pZ9UeIzIz3luKh.js
@@ -2,4 +2,4 @@ args.actor.addCondition("bleeding")
this.actor.setFlag("wfrp4e", "isAttached", args.actor.name)
-this.script.scriptMessage(`Affecté à ${args.actor.name}`)
\ No newline at end of file
+this.script.message(`Attaches to ${args.actor.name}`)
\ No newline at end of file
diff --git a/scripts/H85k4L3yICm7cfIk.js b/scripts/H85k4L3yICm7cfIk.js
index 5a12712..da69535 100644
--- a/scripts/H85k4L3yICm7cfIk.js
+++ b/scripts/H85k4L3yICm7cfIk.js
@@ -1,5 +1,5 @@
-const repaired_message = `
Réparation finie ${this.item.name}.
`;
-const test = 'Voile';
+const repaired_message = `
Réparation terminée ${this.item.name}.
`;
+const Test = 'Voile';
const difficulty = 'easy';
const target = 10;
@@ -12,8 +12,8 @@ const extendedTestData = {
current: 0,
target: target
},
- test: {
- value: test
+ Test: {
+ value: Test
},
completion: {
value: "remove"
@@ -24,7 +24,7 @@ const extendedTestData = {
},
effects: [
{
- name: `Réparer ${this.item.name}`,
+ name: `Réparation de ${this.item.name}`,
img: this.item.img,
system: {
transferData : {
diff --git a/scripts/H8jDtK1Ewn4hL3A1.js b/scripts/H8jDtK1Ewn4hL3A1.js
new file mode 100644
index 0000000..bae8485
--- /dev/null
+++ b/scripts/H8jDtK1Ewn4hL3A1.js
@@ -0,0 +1 @@
+args.fields.slBonus += 4;
\ No newline at end of file
diff --git a/scripts/HASsi6wYHVALExWq.js b/scripts/HASsi6wYHVALExWq.js
deleted file mode 100644
index 7b94541..0000000
--- a/scripts/HASsi6wYHVALExWq.js
+++ /dev/null
@@ -1,14 +0,0 @@
-let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, context: { failure: "1 Point de Corruption Point gagné" } })
-await test.roll();
-
-if (test.failed && args.actor.type == "character")
-{
- let msg = ""
- msg += `
${this.actor.prototypeToken.name} gagne 1 Point de Corruption
`
- if (test.result.roll % 11 == 0 || test.result.roll == 100)
- {
- msg += `${args.actor.prototypeToken.name} gagne une mutation (@Table[expandedmutatephys]{Physique} ou @Table[expandedmutatemental]{Mentale}) et gagne @UUID[Compendium.wfrp4e-core.items.hiU7vhBOVpVI8c7C]{Magie du Chaos (Tzeentch)}`
- }
- this.script.scriptMessage(msg, {whisper : ChatMessage.getWhisperRecipients("GM")})
- await this.actor.update({ "system.status.corruption.value": parseInt(args.actor.status.corruption.value) + 1 })
-}
\ No newline at end of file
diff --git a/scripts/HG2fKOfruT5QV3A4.js b/scripts/HG2fKOfruT5QV3A4.js
index 55e63df..72b6a34 100644
--- a/scripts/HG2fKOfruT5QV3A4.js
+++ b/scripts/HG2fKOfruT5QV3A4.js
@@ -1,4 +1,4 @@
-let lore = await ValueDialog.create({text : "Choisissez Lore", title : "Lore"}, "", {"fire" : "Feu", "death" : "Mort", "metal" : "Métal", "shadow" : "Ombres"});
+let lore = await ValueDialog.create({text : "Choisissez un Savoir", title : "Savoir"}, "", {"fire" : "Fire", "death" : "Death", "metal" : "Metal", "shadow" : "Discret"});
let filters = [
{
@@ -11,7 +11,7 @@ let filters = [
}
]
-let petty = await ItemDialog.createFromFilters(filters, 3, "Choisissez 3 Sorts de Magie Mineure")
+let petty = await ItemDialog.createFromFilters(filters, 3, {text: "Choisissez 3 Sorts Mineurs"})
filters = [
@@ -25,7 +25,7 @@ filters = [
}
]
-let arcane = await ItemDialog.createFromFilters(filters, 6, "Choisissez 6 Sorts de Magie d'Arcane")
+let arcane = await ItemDialog.createFromFilters(filters, 6, {text: "Choisissez 6 Sorts d'Arcane"})
let items = petty.map(i => i.toObject()).concat(arcane.map(i => {
let spell = i.toObject();
diff --git a/scripts/HJ2X4ZtXei0BXbxf.js b/scripts/HJ2X4ZtXei0BXbxf.js
index 12d88ba..85f0b0b 100644
--- a/scripts/HJ2X4ZtXei0BXbxf.js
+++ b/scripts/HJ2X4ZtXei0BXbxf.js
@@ -1,9 +1,9 @@
let choices = await Promise.all([warhammer.utility.findItemId("PzimjNx9Ojq4g6mV"), warhammer.utility.findItemId("rOPmyLWa37e7s9v6")])
- let items = await game.wfrp4e.apps.ItemDialog.create(choices, 1, "Choisissez a Skill")
+ let items = await game.wfrp4e.apps.ItemDialog.create(choices, 1, "Choisir une Compétence")
items = items.map(i => i.toObject())
items.forEach(i => i.system.advances.value = 20)
-items.forEach(i => i.system.equipped.value = true;)
+items.forEach(i => i.system.equipped.value = true)
this.actor.createEmbeddedDocuments("Item", items);
diff --git a/scripts/HKhyn0kijKfzW6cw.js b/scripts/HKhyn0kijKfzW6cw.js
deleted file mode 100644
index bb191fa..0000000
--- a/scripts/HKhyn0kijKfzW6cw.js
+++ /dev/null
@@ -1,3 +0,0 @@
-let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields: {difficulty: "hard"}})
-await test.roll();
-this.item.updateSource({"flags.wfrp4e.passed" : test.succeeded})
\ No newline at end of file
diff --git a/scripts/HMC6hPND9DWLFfZE.js b/scripts/HMC6hPND9DWLFfZE.js
deleted file mode 100644
index 61a0bb8..0000000
--- a/scripts/HMC6hPND9DWLFfZE.js
+++ /dev/null
@@ -1,43 +0,0 @@
-if (this.item.name.includes("("))
-{
- return;
-}
-
-let index = game.packs
-.filter(i => i.metadata.type == "Item")
-.reduce((acc, pack) => acc.concat(pack.index.contents), [])
-.filter(i => i.type == "skill" && i.name.includes(game.i18n.localize("NAME.Lore")))
-.map(i => {
- i.id = i._id
- return i
-})
-
-let choice = await ItemDialog.create(index, 1, "Choisir un Savoir")
-let text;
-if (!choice[0])
-{
- let custom = await Dialog.wait({
- title : "Saisir le savoir",
- content : "",
- buttons : {
- confirm : {
- label : game.i18n.localize("Confirmer"),
- callback : (dlg) => {
- return dlg.find("input")[0].value
- }
- }
- },
- default : "confirm",
- close : () => {
- return ""
- }
- })
- text = custom || ""
-}
-else
-{
- text = game.wfrp4e.utility.extractParenthesesText(choice[0].name)
-}
-
-await this.item.updateSource({name : this.item.name + ` (${text})`, "system.tests.value" : this.item.system.tests.value.replace("chosen Lore", text)})
-await this.effect.updateSource({name : this.effect.name + ` (${text})`})
\ No newline at end of file
diff --git a/scripts/HUKzssLxeQo1wbx9.js b/scripts/HUKzssLxeQo1wbx9.js
deleted file mode 100644
index e1129c3..0000000
--- a/scripts/HUKzssLxeQo1wbx9.js
+++ /dev/null
@@ -1,9 +0,0 @@
-
-let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), { fields: { difficulty: "average" }, appendTitle: " - - Blessé" })
-await test.roll();
-if (test.failed) {
- fromUuid("Compendium.wfrp4e-core.items.kKccDTGzWzSXCBOb").then(disease => {
- this.actor.createEmbeddedDocuments("Item", [disease.toObject()])
- this.script.scriptNotification("Gain de " + disease.name)
- })
-}
diff --git a/scripts/HYrl5aNMm8BAdqH7.js b/scripts/HYrl5aNMm8BAdqH7.js
index 2a4f990..b628745 100644
--- a/scripts/HYrl5aNMm8BAdqH7.js
+++ b/scripts/HYrl5aNMm8BAdqH7.js
@@ -1,7 +1,8 @@
-let modifier = 0
-if (this.effect.name.includes("Moderate"))
- modifier = -20
-else
- modifier = -10
-args.fields.modifier += modifier
+ let modifier = 0
+ if (this.effect.name.includes("Moderate"))
+ modifier = -20
+ else
+ modifier = -10
+ args.fields.modifier += modifier
+
\ No newline at end of file
diff --git a/scripts/Hcpn1gU58DIKIhty.js b/scripts/Hcpn1gU58DIKIhty.js
deleted file mode 100644
index 2ae5ada..0000000
--- a/scripts/Hcpn1gU58DIKIhty.js
+++ /dev/null
@@ -1,4 +0,0 @@
-if (args.item.type == "skill" && args.item.name == "Corps à corps (Fléau)")
-{
- args.item.system.modifier.value += 10;
-}
\ No newline at end of file
diff --git a/scripts/HdTuY2IGhdlMDOy3.js b/scripts/HdTuY2IGhdlMDOy3.js
deleted file mode 100644
index 8722785..0000000
--- a/scripts/HdTuY2IGhdlMDOy3.js
+++ /dev/null
@@ -1,12 +0,0 @@
-if (this.actor.system.details.experience.current < 100) {
- return this.script.notification(game.i18n.localize("SCRIPT.NotEnoughXP"))
-}
-
-let item = await game.wfrp4e.utility.findItem("Animal Telepathy", "trait")
-this.actor.createEmbeddedDocuments("Item", [item]);
-let expLog = foundry.utils.duplicate(this.actor.details.experience.log || []);
-expLog.push({amount : 100, reason: item.name, spent: this.actor.details.experience.spent + 100, total: this.actor.details.experience.total, type: "spent"});
-this.actor.update({
- "system.details.experience.spent": this.actor.details.experience.spent + 100,
- "system.details.experience.log": expLog
- });
\ No newline at end of file
diff --git a/scripts/HfCxNd7mFGZH4s9Y.js b/scripts/HfCxNd7mFGZH4s9Y.js
deleted file mode 100644
index 07fcf28..0000000
--- a/scripts/HfCxNd7mFGZH4s9Y.js
+++ /dev/null
@@ -1,13 +0,0 @@
-// An opponent that takes more than a single Wound from a Warp Blade strike
-// in melee combat must make an Average (+20) Endurance Test
-// or take a Stunned Condition
-
-
-if (args.totalWoundLoss > 1) {
- let test = await args.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {fields : {difficulty : "average"}, skipTargets: true, appendTitle : ` - ${this.effect.name}`})
- await test.roll();
- if(test.failed)
- {
- await args.actor.addCondition("stunned");
- }
-}
\ No newline at end of file
diff --git a/scripts/HfZAQWoY8n3clLlo.js b/scripts/HfZAQWoY8n3clLlo.js
deleted file mode 100644
index 12e941d..0000000
--- a/scripts/HfZAQWoY8n3clLlo.js
+++ /dev/null
@@ -1,6 +0,0 @@
-if (!args.itemCreated) return;
-if (args.itemCreated.type !== "critical") return;
-if (args.itemCreated.system.location.value.toLowerCase() !== "head") return;
-if (Number(args.itemCreated.system.wounds.value) > 0) {
- this.script.message(game.i18n.format("SCRIPT.Sallet", {name: args.itemCreated.parent.name, wounds: args.itemCreated.system.wounds.value}))
-}
\ No newline at end of file
diff --git a/scripts/HgzIi6m6dkXbVWHp.js b/scripts/HgzIi6m6dkXbVWHp.js
new file mode 100644
index 0000000..41980f1
--- /dev/null
+++ b/scripts/HgzIi6m6dkXbVWHp.js
@@ -0,0 +1,5 @@
+if (args.test.skill?.name == "Calme")
+{
+ args.test.preData.roll = 1;
+ args.test.preData.other.push(this.effect.name)
+}
\ No newline at end of file
diff --git a/scripts/Hi005w1Ul17Q8Uty.js b/scripts/Hi005w1Ul17Q8Uty.js
new file mode 100644
index 0000000..965eb5d
--- /dev/null
+++ b/scripts/Hi005w1Ul17Q8Uty.js
@@ -0,0 +1,6 @@
+let test = this.actor.setupSkill(game.i18n.localize("NAME.Cool"), {fields : {difficulty : "average"}, appendTitle : ` - ${this.effect.name}`})
+await test.roll();
+if (test.succeeded)
+{
+ this.effect.delete()
+}
\ No newline at end of file
diff --git a/scripts/HiMBS6GeOwEydWYN.js b/scripts/HiMBS6GeOwEydWYN.js
deleted file mode 100644
index 9ad95cd..0000000
--- a/scripts/HiMBS6GeOwEydWYN.js
+++ /dev/null
@@ -1 +0,0 @@
-return args.skill?.name != game.i18n.localize("NAME.Climb");
\ No newline at end of file
diff --git a/scripts/HmImVzvw6ecBy99l.js b/scripts/HmImVzvw6ecBy99l.js
index efbb97e..f285e08 100644
--- a/scripts/HmImVzvw6ecBy99l.js
+++ b/scripts/HmImVzvw6ecBy99l.js
@@ -1,5 +1,5 @@
-if (args.opposedTest.result.hitloc.value == "body" && args.totalWoundLoss > 0)
+if (args.opposedTest.result.hitloc.value == "body" && args.totalWoundLoss > 0)
{
args.actor.addCondition("bleeding", 2)
- this.script.scriptNotification("Ajout Hémorragique")
+ this.script.notification("Etat Hémmoragique appliqué : 2 niveaux de saignement")
}
\ No newline at end of file
diff --git a/scripts/HrOBAXsEX073ReKl.js b/scripts/HrOBAXsEX073ReKl.js
deleted file mode 100644
index e799170..0000000
--- a/scripts/HrOBAXsEX073ReKl.js
+++ /dev/null
@@ -1,21 +0,0 @@
-let skill = `${game.i18n.localize("NAME.Entertain")} (${game.i18n.localize("SPEC.Singing")})`;
-let currentCareer = this.actor.system.currentCareer;
-let existingSkill = this.actor.itemTypes.skill.find(i => i.name == skill);
-
-if (!currentCareer) return
-
-
-let inCurrentCareer = currentCareer.system.skills.concat(currentCareer.system.addedSkills).includes(skill);
-let perfectPitchAdded = this.actor.getFlag("wfrp4e", "perfectPitchAdded") || {};
-if (existingSkill && inCurrentCareer && !perfectPitchAdded[existingSkill.name])
-{
- existingSkill.system.advances.costModifier = -5;
-}
-else
-{
- perfectPitchAdded[skill] = true;
- currentCareer.system.addedSkills.push(skill);
- foundry.utils.setProperty(this.actor, "flags.wfrp4e.perfectPitchAdded", perfectPitchAdded)
-}
-
-
diff --git a/scripts/I2I4ZJjN3EUSow0t.js b/scripts/I2I4ZJjN3EUSow0t.js
new file mode 100644
index 0000000..5bb5da2
--- /dev/null
+++ b/scripts/I2I4ZJjN3EUSow0t.js
@@ -0,0 +1,3 @@
+return args.item?.system?.attackType != "ranged"
+ || this.item != args.item
+ || this.actor.isOpposing
\ No newline at end of file
diff --git a/scripts/I67tdJctEqXSQPE0.js b/scripts/I67tdJctEqXSQPE0.js
new file mode 100644
index 0000000..12502ef
--- /dev/null
+++ b/scripts/I67tdJctEqXSQPE0.js
@@ -0,0 +1 @@
+this.effect.update({"disabled": false})
\ No newline at end of file
diff --git a/scripts/I79D8V8OFzMCtL40.js b/scripts/I79D8V8OFzMCtL40.js
new file mode 100644
index 0000000..ef308df
--- /dev/null
+++ b/scripts/I79D8V8OFzMCtL40.js
@@ -0,0 +1,2 @@
+const target = await ValueDialog.create({title: "Sélectionnez une Cible", text: "Sélectionnez une Cible pour la Haine"}, "Target");
+await this.actor.addEffectItems("Compendium.wfrp4e-core.items.Item.5hH73j2NgPdsLCZN", this.effect, {name: `Hatred (${target})`});
\ No newline at end of file
diff --git a/scripts/I7ieW0hNYvvX0KFg.js b/scripts/I7ieW0hNYvvX0KFg.js
deleted file mode 100644
index 5327a98..0000000
--- a/scripts/I7ieW0hNYvvX0KFg.js
+++ /dev/null
@@ -1 +0,0 @@
-return args.skill?.name != game.i18n.localize("NAME.Heal");
\ No newline at end of file
diff --git a/scripts/I8JS4z90PtWIG2nb.js b/scripts/I8JS4z90PtWIG2nb.js
new file mode 100644
index 0000000..4b65bbd
--- /dev/null
+++ b/scripts/I8JS4z90PtWIG2nb.js
@@ -0,0 +1 @@
+return this.actor.hasCondition("prone")
\ No newline at end of file
diff --git a/scripts/I9QAPKbaXwMMMBT4.js b/scripts/I9QAPKbaXwMMMBT4.js
deleted file mode 100644
index 9e6f662..0000000
--- a/scripts/I9QAPKbaXwMMMBT4.js
+++ /dev/null
@@ -1,17 +0,0 @@
-let test = await this.actor.setupSkill(game.i18n.localize("NAME.Cool"), {fields : {difficulty: "average"}, skipTargets: true, appendTitle : " - " + this.effect.name})
-await test.roll();
-if(test.failed)
-{
- await this.actor.addCondition("stunned");
- let secondTest = await this.actor.setupSkill(game.i18n.localize("NAME.Cool"), {fields : {difficulty: "easy"}, skipTargets: true, appendTitle : " - Despair"})
- await secondTest.roll();
- if(secondTest.failed)
- {
- this.effect.updateSource({name : "Taste of Death"})
- await this.actor.addCondition("fatigued");
- }
- else
- {
- return false;
- }
-}
\ No newline at end of file
diff --git a/scripts/IAGla7HJlYN0wa4H.js b/scripts/IAGla7HJlYN0wa4H.js
index 0a26102..dc38be0 100644
--- a/scripts/IAGla7HJlYN0wa4H.js
+++ b/scripts/IAGla7HJlYN0wa4H.js
@@ -1,8 +1,8 @@
-if (args.test.characteristicKey == "wp")
+if (args.test.characteristicKey == "wp")
{
- if (args.test.failed)
+ if (args.Test.Échoué)
{
this.actor.addSystemEffect("convulsions")
- this.script.scriptMessage(`Test de Force Mentale échoué, ${this.actor.prototypeToken.name} subit des @Symptom[Convulsions] pour [[1d10]] heures`)
+ this.script.message(`Test de FM échoué, ${this.actor.prototypeToken.name} reçoit @Symptom[Convulsions] pour [[1d10]] heures`)
}
}
\ No newline at end of file
diff --git a/scripts/ID8mCcjkl7PCQhDq.js b/scripts/ID8mCcjkl7PCQhDq.js
deleted file mode 100644
index 4691ac9..0000000
--- a/scripts/ID8mCcjkl7PCQhDq.js
+++ /dev/null
@@ -1,8 +0,0 @@
-let test = await this.actor.setupSkill(game.i18n.localize("NAME.Dodge"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`})
-await test.roll();
-
-if(test.failed)
-{
- let damage = this.effect.sourceItem.system.computeSpellDamage("3", true);
- this.script.scriptMessage(await this.actor.applyBasicDamage(damage, {suppressMsg: true, damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_AP}))
-}
\ No newline at end of file
diff --git a/scripts/IDvpVMkR2HXoNpPp.js b/scripts/IDvpVMkR2HXoNpPp.js
new file mode 100644
index 0000000..4a52ac8
--- /dev/null
+++ b/scripts/IDvpVMkR2HXoNpPp.js
@@ -0,0 +1 @@
+return args.skill?.name !== "Esquive";
\ No newline at end of file
diff --git a/scripts/IEDJHIYaZLhmrK4X.js b/scripts/IEDJHIYaZLhmrK4X.js
new file mode 100644
index 0000000..4162a66
--- /dev/null
+++ b/scripts/IEDJHIYaZLhmrK4X.js
@@ -0,0 +1 @@
+return !["weapon", "cast"].includes(args.type) || (!this.item.equipped.value)
\ No newline at end of file
diff --git a/scripts/IFXsTRAVDUeVvcRc.js b/scripts/IFXsTRAVDUeVvcRc.js
new file mode 100644
index 0000000..fd0df89
--- /dev/null
+++ b/scripts/IFXsTRAVDUeVvcRc.js
@@ -0,0 +1,7 @@
+let roll = await new Roll("1d100")
+await roll.evaluate()
+await roll.toMessage({"flavor": `Wyssan's Dice Reversal`})
+
+if (roll.result % 11 === 0 || roll.result === 100) {
+ await this.item.setFlag("world", "inert", true)
+}
\ No newline at end of file
diff --git a/scripts/ILqHxk7deotgI3KD.js b/scripts/ILqHxk7deotgI3KD.js
index fdb8958..2fc1245 100644
--- a/scripts/ILqHxk7deotgI3KD.js
+++ b/scripts/ILqHxk7deotgI3KD.js
@@ -5,6 +5,6 @@ let reach = args.item.reach.value
let reachNum = game.wfrp4e.config.reachNum[reach]
reachNum = Math.min(reachNum + 2, 7)
-let key = game.wfrp4e.utility.findKey(reachNum, game.wfrp4e.config.reachNum)
+let key = warhammer.utility.findKey(reachNum, game.wfrp4e.config.reachNum)
args.item.reach.value = key
\ No newline at end of file
diff --git a/scripts/IM8nRo6Jx2I8RJ0L.js b/scripts/IM8nRo6Jx2I8RJ0L.js
new file mode 100644
index 0000000..3588d04
--- /dev/null
+++ b/scripts/IM8nRo6Jx2I8RJ0L.js
@@ -0,0 +1 @@
+return (args.item?.skillToUse?.name == args.skill?.name)
\ No newline at end of file
diff --git a/scripts/IPPDvZdE8kn3H9z7.js b/scripts/IPPDvZdE8kn3H9z7.js
deleted file mode 100644
index 624ce26..0000000
--- a/scripts/IPPDvZdE8kn3H9z7.js
+++ /dev/null
@@ -1,7 +0,0 @@
-let test = await this.actor.setupSkill("Esquive", {skipTargets: true, appendTitle : ` - ${this.effect.name}`});
-await test.roll();
-
-if (test.failed)
-{
- await this.actor.addCondition("grappling")
-}
\ No newline at end of file
diff --git a/scripts/IR5URcjnCuWBFMoN.js b/scripts/IR5URcjnCuWBFMoN.js
deleted file mode 100644
index 27b41b0..0000000
--- a/scripts/IR5URcjnCuWBFMoN.js
+++ /dev/null
@@ -1,15 +0,0 @@
-// If a full dose is imbibed,
-// the victim must pass a Hard (-20) Endurance Test.
-
-let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {fields: {difficulty: "hard"}})
-await test.roll()
-if (test.failed)
-{
- this.script.scriptMessage(`
${this.actor.prototypeToken.name} Jo ne remarque rien d'anormal si ce n'est qu'ils se fatiguent un peu plus tôt que d'habitude. À ce stade, il est encore possible de sauver la victime via un antidote puissant ou des moyens magiques.
-
Cependant, une fois qu’ils s’endorment, c’est presque impossible. À ce stade, la victime doit effectuer un test d'Endurance difficile (-20). S'il échoue, il ne se réveille jamais.
`,
- {
- whisper: ChatMessage.getWhisperRecipients("GM"),
- blind: true
- })
-}
-return test.failed;
\ No newline at end of file
diff --git a/scripts/IXXrxNSLqXEqtuDU.js b/scripts/IXXrxNSLqXEqtuDU.js
new file mode 100644
index 0000000..ae08c25
--- /dev/null
+++ b/scripts/IXXrxNSLqXEqtuDU.js
@@ -0,0 +1,3 @@
+if (args.actor.details.move.value > 1) {
+ args.actor.details.move.value -= 1
+}
\ No newline at end of file
diff --git a/scripts/IfEu1hO8sKEZBpvg.js b/scripts/IfEu1hO8sKEZBpvg.js
index 0b53314..b4078a7 100644
--- a/scripts/IfEu1hO8sKEZBpvg.js
+++ b/scripts/IfEu1hO8sKEZBpvg.js
@@ -4,11 +4,12 @@ let name = this.actor.prototypeToken.name
if (game.user.isGM && game.user.targets.size)
{
game.user.targets.forEach(t => {
- t.actor.applyFear(value, name)
+ t.actor.applyPeur(value, name)
})
- game.user.updateTokenTargets([]);
+ game.canvas.tokens.setTargets([])
+
}
else
{
- game.wfrp4e.utility.postFear(value, name)
+ game.wfrp4e.utility.postPeur(value, name)
}
\ No newline at end of file
diff --git a/scripts/IhoCoul5okDx0jBa.js b/scripts/IhoCoul5okDx0jBa.js
new file mode 100644
index 0000000..229ac2c
--- /dev/null
+++ b/scripts/IhoCoul5okDx0jBa.js
@@ -0,0 +1,7 @@
+if (args.test.weapon.properties.qualities?.blast) {
+ args.test.weapon.properties.qualities.blast.value ++;
+ if (args.test.options.shortfuse) {
+ args.test.result.other.push (`${this.effect.name}: Blast Rating increased`)
+ }
+ args.test.options.shortfuse = true
+}
\ No newline at end of file
diff --git a/scripts/IkVcIRmmgQjsBUUf.js b/scripts/IkVcIRmmgQjsBUUf.js
new file mode 100644
index 0000000..0be1937
--- /dev/null
+++ b/scripts/IkVcIRmmgQjsBUUf.js
@@ -0,0 +1,8 @@
+let roll = await new Roll("1d100")
+await roll.evaluate()
+await roll.toMessage({"flavor": `Wyssan's Dice Reversal`})
+
+if (roll.result % 11 === 0 || roll.result === 100) {
+ await this.item.setFlag("world", "inert", true)
+ this.script.message(`${this.item.name} loses its magical properties`, {blind: true, whisper: ChatMessage.getWhisperRecipients("GM")})
+}
\ No newline at end of file
diff --git a/scripts/IrkWq7IiFS65bTvC.js b/scripts/IrkWq7IiFS65bTvC.js
index 0b5a84a..fabbd2a 100644
--- a/scripts/IrkWq7IiFS65bTvC.js
+++ b/scripts/IrkWq7IiFS65bTvC.js
@@ -2,6 +2,6 @@ if (this.actor.flags.holed.half !== true) return;
if (this.actor.flags.holed.reminded === true) return;
const speaker = ChatMessage.getSpeaker({actor: this.actor});
-this.script.scriptMessage(`
${speaker.alias} tombe lourdements dans l'eau. A moins que la cargaison soit étanche, elle perd [[d10]]% de sa valeur.
`);
+this.script.message(`
${speaker.alias} sits heavily in the water. Unless the cargo is waterproof, it loses [[d10]]% of its value.
`);
this.actor.flags.holed.reminded = true;
\ No newline at end of file
diff --git a/scripts/IsLAvY9ikR1cOJWw.js b/scripts/IsLAvY9ikR1cOJWw.js
deleted file mode 100644
index c5a06ce..0000000
--- a/scripts/IsLAvY9ikR1cOJWw.js
+++ /dev/null
@@ -1 +0,0 @@
-return !["NAME.Row", "NAME.Swim"].map(i => game.i18n.localize(i)).includes(args.skill?.name);
\ No newline at end of file
diff --git a/scripts/IupskvzvoGyD2H5o.js b/scripts/IupskvzvoGyD2H5o.js
index c0fa0e1..d104a14 100644
--- a/scripts/IupskvzvoGyD2H5o.js
+++ b/scripts/IupskvzvoGyD2H5o.js
@@ -3,30 +3,37 @@ if (this.actor.type != "character")
return;
}
-let god = await ValueDialog.create({text : "Enter a Deity", title : "Blessed"})
+let god = await ValueDialog.create({text : "Choisissez un Dieu", title : "Béni"})
if (god)
{
- let prayers = await warhammer.utility.findAllItems("prayer", "Loading Prayers")
+ 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 godBlessings = game.wfrp4e.config.godBlessings[god.toLowerCase()] || [];
- if (god == "Old Faith")
+ let configBlessings = await Promise.tout((game.wfrp4e.config.godBlessings[god.toLowerCase()] || []).map(fromUuid));
+ if (god == "Foi Antique")
{
- blessings = await ItemDialog.create(prayers.filter(i => i.system.type.value == "blessing"), 6, {text : "Select any 6 Blessings", title : "Blessed"})
+ blessings = await ItemDialog.create(prayers.filter(i => i.system.type.value == "blessing"), 6, {text : "Sélectionnez 6 Bénédictions", title : "Béni"})
}
- if (godBlessings.length)
+ if (configBlessings.length)
{
- blessings = blessings.concat(await Promise.all(godBlessings.filter(bls => !(blessings.map(i => i.uuid).includes(bls.uuid))).map(fromUuid)));
+ // Combine blessings defined by config with actual blessing items found that specify this god, avoiding duplicates
+ blessings = blessings.concat(
+ configBlessings.map(i => {return {uuid : i.uuid, name : i.name}})
+ .filter(bls => !(blessings.find(i => i.uuid == bls.uuid)))
+ );
}
if (blessings.length)
{
- this.script.notification("Adding " + blessings.map(i => i.name).join(", "))
- await this.actor.createEmbeddedDocuments("Item", blessings, {fromEffect : this.effect.id})
+ this.script.scriptNotification("Ajout de " + blessings.map(i => i.name).join(", "))
+ await this.actor.addEffectItems(blessings.map(i => i.uuid), this.effet)
}
- else
+ else
{
- this.script.notification(`Impossible de trouver any Blessings associated with ${god}.`)
+ this.script.scriptNotification(`Impossible de trouver des Bénédictions associées à ${god}.`)
}
- this.item.updateSource({name : this.item.name.replace("Any", god)})
+ if (this.item.name.includes("Au choix"))
+ this.item.updateSource({name: this.item.name.replace("Au choix", god)});
+ else
+ this.item.updateSource({name: this.item.name + ` (${god})`});
await this.actor.update({"system.details.god.value": god})
}
\ No newline at end of file
diff --git a/scripts/IurWrdbjsmMtTWuq.js b/scripts/IurWrdbjsmMtTWuq.js
new file mode 100644
index 0000000..e468d7b
--- /dev/null
+++ b/scripts/IurWrdbjsmMtTWuq.js
@@ -0,0 +1 @@
+return !this.actor.hasCondition("prone")
\ No newline at end of file
diff --git a/scripts/IuxMr6SFdJhqFtVD.js b/scripts/IuxMr6SFdJhqFtVD.js
new file mode 100644
index 0000000..edfbbb6
--- /dev/null
+++ b/scripts/IuxMr6SFdJhqFtVD.js
@@ -0,0 +1 @@
+this.actor.system.status.corruption.value += 3
\ No newline at end of file
diff --git a/scripts/IzoOmDywGLqLNljN.js b/scripts/IzoOmDywGLqLNljN.js
index 8a5b8ac..ccfd0e6 100644
--- a/scripts/IzoOmDywGLqLNljN.js
+++ b/scripts/IzoOmDywGLqLNljN.js
@@ -6,7 +6,7 @@ if (!currentCareer) return
let inCurrentCareer = currentCareer.system.skills.concat(currentCareer.system.addedSkills).includes(skill);
-let witchAdded = actor.getFlag("wfrp4e", "witchAdded") || {};
+let witchAdded = this.actor.getFlag("wfrp4e", "witchAdded") || {};
if (existingSkill && inCurrentCareer && !witchAdded[existingSkill.name])
{
existingSkill.system.advances.costModifier = -5;
diff --git a/scripts/J0IWUhxada2ONowP.js b/scripts/J0IWUhxada2ONowP.js
deleted file mode 100644
index 29356a0..0000000
--- a/scripts/J0IWUhxada2ONowP.js
+++ /dev/null
@@ -1 +0,0 @@
- return args.skill?.name == "Divertissement (Chant)" || args.skill?.name == "Divertissement (Chanter)" || (args.skill?.name.includes("Langue") && (args.skill?.name.includes("Magick") || args.skill?.name.includes("Elthárin") || args.skill?.name.includes("Cathayan")))
\ No newline at end of file
diff --git a/scripts/J8k4ahQdZhXDfU1l.js b/scripts/J8k4ahQdZhXDfU1l.js
new file mode 100644
index 0000000..1444b9f
--- /dev/null
+++ b/scripts/J8k4ahQdZhXDfU1l.js
@@ -0,0 +1 @@
+return args.skill?.name == "Runesmithing"
\ No newline at end of file
diff --git a/scripts/JBoKPBr27C3PMoSD.js b/scripts/JBoKPBr27C3PMoSD.js
deleted file mode 100644
index c1ae1c1..0000000
--- a/scripts/JBoKPBr27C3PMoSD.js
+++ /dev/null
@@ -1 +0,0 @@
-return args.skill?.name === game.i18n.localize("NAME.Navigation");
\ No newline at end of file
diff --git a/scripts/JEbs0WlqhKNDOo5A.js b/scripts/JEbs0WlqhKNDOo5A.js
deleted file mode 100644
index 83eb600..0000000
--- a/scripts/JEbs0WlqhKNDOo5A.js
+++ /dev/null
@@ -1,6 +0,0 @@
-let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields: {difficulty: "hard"}})
-await test.roll();
-if (test.failed)
-{
- this.actor.addCondition("unconscious")
-}
diff --git a/scripts/JQruHprM5R5vZ9DA.js b/scripts/JQruHprM5R5vZ9DA.js
deleted file mode 100644
index 7506452..0000000
--- a/scripts/JQruHprM5R5vZ9DA.js
+++ /dev/null
@@ -1,10 +0,0 @@
-let caster = this.effect.sourceActor;
-if (caster)
-{
- let healed= caster.system.characteristics.wp.bonus + caster.system.characteristics.int.bonus
- await this.actor.modifyWounds(healed);
- this.script.scriptMessage(`${this.actor.prototypeToken.name} guéri ${healed} Blessures`)
-}
-
- let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {fields : {difficulty : "vhard"}, context : {success : "1 Point de Corruption gagné durant la dernière heure doit être supprimé.", failure: "Rien ne se passe"}})
- await test.roll();
\ No newline at end of file
diff --git a/scripts/JXBUE0XuJOJNG7zE.js b/scripts/JXBUE0XuJOJNG7zE.js
index ffd727d..9d10f92 100644
--- a/scripts/JXBUE0XuJOJNG7zE.js
+++ b/scripts/JXBUE0XuJOJNG7zE.js
@@ -7,12 +7,12 @@ let options = {
characteristic: 'wp',
}
-let test = await args.actor.setupSkill('Calme', options);
+let Test = await args.actor.setupSkill('Calme', options);
await test.roll();
if (!test.succeeded) {
const targetId = this.effect.getFlag("wfrp4e", "target");
const target = canvas.scene.tokens.get(targetId);
await this.effect.delete();
- args.extraMessages.push(`${args.actor.name} perd ${args.totalWoundLoss} Blessures de l'attaque, ce qui l'a amené à lâcher prise ${target.name}.`);
+ args.extraMessages.push(`${args.actor.name} perd ${args.totalWoundLoss} Points de Blessures lors de l'attaque, ce qui l'a forcé à lâcher ${target.name}.`);
}
\ No newline at end of file
diff --git a/scripts/JeThJbOf6Xmbtgo1.js b/scripts/JeThJbOf6Xmbtgo1.js
deleted file mode 100644
index 8147600..0000000
--- a/scripts/JeThJbOf6Xmbtgo1.js
+++ /dev/null
@@ -1,8 +0,0 @@
-this.script.scriptMessage(await this.actor.applyBasicDamage(8 + parseInt(this.effect.sourceTest.result.SL), {suppressMsg : true}))
-
-let test = await this.actor.setupSkill("Athlétisme", {skipTargets: true, appendTitle : ` - ${this.effect.name}`})
-await test.roll();
-if (test.failed)
-{
- this.actor.addCondition("prone")
-}
\ No newline at end of file
diff --git a/scripts/JgCcgDVZX54slrWx.js b/scripts/JgCcgDVZX54slrWx.js
deleted file mode 100644
index b758160..0000000
--- a/scripts/JgCcgDVZX54slrWx.js
+++ /dev/null
@@ -1 +0,0 @@
-return args.skill?.name.includes(game.i18n.localize("NAME.Melee")) || args.item?.isMelee || args.options.corruption
\ No newline at end of file
diff --git a/scripts/JhCMYHHYA860Kka8.js b/scripts/JhCMYHHYA860Kka8.js
deleted file mode 100644
index 1dcc650..0000000
--- a/scripts/JhCMYHHYA860Kka8.js
+++ /dev/null
@@ -1 +0,0 @@
-return !this.actor.attacker || args.item?.system?.attackType !== "melee" || args.skill?.name !== game.i18n.localize("NAME.Dodge");
\ No newline at end of file
diff --git a/scripts/JhbZWZhOJ23yOBmG.js b/scripts/JhbZWZhOJ23yOBmG.js
index 17dca1d..b61b66f 100644
--- a/scripts/JhbZWZhOJ23yOBmG.js
+++ b/scripts/JhbZWZhOJ23yOBmG.js
@@ -1,5 +1,5 @@
-const repaired_message = `
Réparation finie ${this.item.name}.
`;
-const test = 'Trade (Carpentry)';
+const repaired_message = `
Réparation terminée ${this.item.name}.
`;
+const Test = 'Trade (Carpentry)';
const difficulty = 'hard';
const target = 30;
@@ -12,8 +12,8 @@ const extendedTestData = {
current: 0,
target: target
},
- test: {
- value: test
+ Test: {
+ value: Test
},
completion: {
value: "remove"
@@ -24,7 +24,7 @@ const extendedTestData = {
},
effects: [
{
- name: `Réparer ${this.item.name}`,
+ name: `Réparation de ${this.item.name}`,
img: this.item.img,
system: {
transferData : {
diff --git a/scripts/JibNjuQrJRnY0yf9.js b/scripts/JibNjuQrJRnY0yf9.js
deleted file mode 100644
index 03aff09..0000000
--- a/scripts/JibNjuQrJRnY0yf9.js
+++ /dev/null
@@ -1 +0,0 @@
-return this.actor.flags.useless.rEye && this.actor.flags.useless.lEye && (["ws", "bs"].includes(args.characteristic) || args.skill?.name?.includes(game.i18n.localize("NAME.Ride")) || args.weapon || args.options.dodge)
\ No newline at end of file
diff --git a/scripts/Jjq3oPYbI26zjxME.js b/scripts/Jjq3oPYbI26zjxME.js
index c980ba0..903534a 100644
--- a/scripts/Jjq3oPYbI26zjxME.js
+++ b/scripts/Jjq3oPYbI26zjxME.js
@@ -6,7 +6,7 @@ if (location)
if (dropped.length)
{
- this.script.scriptNotification(`Lache ${dropped.map(i => i.name).join(", ")}!`)
+ this.script.notification(`Lâche ${dropped.map(i => i.name).join(", ")}!`)
for(let weapon of dropped)
{
await weapon.system.toggleEquip();
@@ -16,6 +16,6 @@ if (location)
let roll = await new Roll("1d10").roll()
-roll.toMessage(this.script.getChatData({flavor : `${this.effect.name} (Durée)`}));
+roll.toMessage(this.script.getChatData({flavor : `Lâche ${dropped.map(i => i.name).join(", ")}!`}));
-this.effect.updateSource({"duration.rounds" : roll.total})
\ No newline at end of file
+this.effet.updateSource({"duration.rounds" : roll.total})
\ No newline at end of file
diff --git a/scripts/Jk7OHqx06oCUVAzb.js b/scripts/Jk7OHqx06oCUVAzb.js
deleted file mode 100644
index addba15..0000000
--- a/scripts/Jk7OHqx06oCUVAzb.js
+++ /dev/null
@@ -1 +0,0 @@
-return !["Langue (Magick)", "Focalisation (Hysh)"].includes(args.skill?.name)
\ No newline at end of file
diff --git a/scripts/JmZQRvdWjm9ykYfn.js b/scripts/JmZQRvdWjm9ykYfn.js
index 55372ed..2b77e68 100644
--- a/scripts/JmZQRvdWjm9ykYfn.js
+++ b/scripts/JmZQRvdWjm9ykYfn.js
@@ -1,5 +1,5 @@
if (this.actor.hasCondition("surprised"))
{
this.actor.removeCondition("surprised")
- this.script.scriptMessage(`Ne peut être surpris`);
+ this.script.message(`Impossible d'être surpris`);
}
\ No newline at end of file
diff --git a/scripts/Jnp5c09sPzDD61EK.js b/scripts/Jnp5c09sPzDD61EK.js
index f535a69..7c9caf4 100644
--- a/scripts/Jnp5c09sPzDD61EK.js
+++ b/scripts/Jnp5c09sPzDD61EK.js
@@ -1,3 +1,3 @@
-this.script.scriptNotification(`${args.actor.prototypeToken.name} doit réussir un Test Accessible (+20) de Force Mentale pour attaquer cette cible!`)
+this.script.notification(`${args.actor.prototypeToken.name} must pass an Average (+20) Willpower Test to attack this target!`)
return true; // No need to show this in the dialog
\ No newline at end of file
diff --git a/scripts/JstrA46EYSEuRSy5.js b/scripts/JstrA46EYSEuRSy5.js
deleted file mode 100644
index f5e7f96..0000000
--- a/scripts/JstrA46EYSEuRSy5.js
+++ /dev/null
@@ -1,2 +0,0 @@
-if (this.actor.has(game.i18n.localize("NAME.Undead")) && this.actor.has(game.i18n.localize("NAME.Construct")))
- this.actor.addCondition("dead")
\ No newline at end of file
diff --git a/scripts/JwYZJGkZMSM2M3Si.js b/scripts/JwYZJGkZMSM2M3Si.js
index 23dc567..dc4e703 100644
--- a/scripts/JwYZJGkZMSM2M3Si.js
+++ b/scripts/JwYZJGkZMSM2M3Si.js
@@ -1,6 +1,6 @@
if (args.totalWoundLoss > 0)
{
- let test = await args.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields : {difficulty : "hard"}})
+ let test = await args.actor.setupSkill(game.i18n.localize("NAME.Résistance"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields : {difficulty : "hard"}})
await test.roll()
if (test.failed)
{
diff --git a/scripts/JyTxUG5dNW670Sf7.js b/scripts/JyTxUG5dNW670Sf7.js
deleted file mode 100644
index 9421a21..0000000
--- a/scripts/JyTxUG5dNW670Sf7.js
+++ /dev/null
@@ -1,11 +0,0 @@
-let item = await fromUuid("Compendium.wfrp4e-core.items.7mCcI3q7hgWcmbBU")
-let data = item.toObject();
-data.system.location.key= this.item.system.location.key
-this.actor.createEmbeddedDocuments("Item", [data], {fromEffect: this.effect.id})
-
-let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields: {difficulty: "hard"}});
-await test.roll();
-if (test.failed)
-{
- this.actor.addCondition("stunned")
-}
\ No newline at end of file
diff --git a/scripts/K54XxyNJa5PIWDEH.js b/scripts/K54XxyNJa5PIWDEH.js
new file mode 100644
index 0000000..2c45bf5
--- /dev/null
+++ b/scripts/K54XxyNJa5PIWDEH.js
@@ -0,0 +1,2 @@
+args.modifiers.other.push({label : this.effect.name, details : "Blessures Doublées + 4", value : args.totalWoundLoss + 4 });
+args.totalWoundLoss = args.totalWoundLoss * 2 +4;
\ No newline at end of file
diff --git a/scripts/KD4nCSdSXJVJmk0R.js b/scripts/KD4nCSdSXJVJmk0R.js
index 7499473..f9c3641 100644
--- a/scripts/KD4nCSdSXJVJmk0R.js
+++ b/scripts/KD4nCSdSXJVJmk0R.js
@@ -1,2 +1,2 @@
-this.script.scriptMessage(await this.actor.applyBasicDamage(this.effect.sourceTest.result.damage, {suppressMsg : true}))
+this.script.message(await this.actor.applyBasicDamage(this.effect.sourceTest.result.damage, {suppressMsg : true}))
await this.actor.addCondition("ablaze")
\ No newline at end of file
diff --git a/scripts/KGK9vL1Yl0qmCeCN.js b/scripts/KGK9vL1Yl0qmCeCN.js
index d6ac347..0edca31 100644
--- a/scripts/KGK9vL1Yl0qmCeCN.js
+++ b/scripts/KGK9vL1Yl0qmCeCN.js
@@ -1,21 +1,21 @@
let specification = this.item.system.specification.value;
let choice = [];
-if (!specification || specification == "Compétences entraînées")
+if (!specification || specification == "Compétences Entraînées")
{
choice = await ItemDialog.create(ItemDialog.objectToArray({
- broken: "Dompté",
- drive: "Trait",
- entertain: "Divertir",
- fetch: "Rapporter",
- guard: "Garder",
- home: "Revenir à la maison",
- magic: "Magie",
- mount: "Monture",
- war: "Guerre"
- }, this.effect.img), "unlimited", "Choisissez un Dressage");
+ broken: "Broken",
+ drive: "Conduite d'attelage",
+ entertain: "Divertissement",
+ fetch: "Fetch",
+ guard: "Garde",
+ home: "Home",
+ magic: "Magic",
+ mount: "Mount",
+ war: "War"
+ }, this.effect.img), "unlimited", "Choisir un Entraînement");
}
-else
+else
{
choice = specification.split(", ").map(i => {
return {
@@ -27,14 +27,14 @@ else
if (choice.length)
{
- let changes = foundry.utils.deepClone(this.effect.changes);
+ let changes = foundry.utils.deepClone(this.effet.changes);
for(let training of choice)
{
switch(training.id)
{
- case "broken" :
- let roll = await new Roll("2d10").roll();
+ case "broken" :
+ let roll = await new Roll("2d10").roll({allowInteractive : false});
roll.toMessage(this.script.getChatData());
changes.push({value : roll.total, mode : 2, key : "system.characteristics.fel.modifier"})
@@ -48,41 +48,41 @@ if (choice.length)
}
break;
- case "drive" :
+ case "drive" :
break;
- case "entertain" :
+ case "entertain" :
break;
- case "fetch" :
+ case "fetch" :
break;
- case "guard" :
+ case "guard" :
let territorial = await fromUuid("Compendium.wfrp4e-core.items.Item.JIAe7i7dqTQBu4do");
- await this.actor.createEmbeddedDocuments("Item", [territorial], {fromEffect: this.effect.id})
- setProperty(args, "options.keepId", true);
+ await this.actor.createEmbeddedDocuments("Item", [territorial], {fromEffect: this.effet.id})
+ foundry.utils.setProperty(args, "options.keepId", true);
break;
- case "home" :
+ case "home" :
break;
- case "magic" :
+ case "magic" :
break;
- case "mount" :
+ case "mount" :
break;
- case "war" :
+ case "war" :
changes.push({value : 10, mode : 2, key : "system.characteristics.ws.modifier"})
break;
}
}
- this.effect.updateSource({name : `${this.effect.name} (${choice.map(i => i.name).join(", ")})`, changes, "flags.wfrp4e.trained" : choice.map(i => i.id)})
+ this.effet.updateSource({name : `${this.effet.name} (${choice.map(i => i.name).join(", ")})`, changes, "flags.wfrp4e.trained" : choice.map(i => i.id)})
this.item.updateSource({"system.specification.value" : `${choice.map(i => i.name).join(", ")}`})
}
\ No newline at end of file
diff --git a/scripts/KICZPwLvbUSxbDrE.js b/scripts/KICZPwLvbUSxbDrE.js
index e693a87..e750b00 100644
--- a/scripts/KICZPwLvbUSxbDrE.js
+++ b/scripts/KICZPwLvbUSxbDrE.js
@@ -9,10 +9,10 @@ let item = await fromUuid(uuid);
if (item)
{
- this.script.scriptNotification(`${item.name} added`)
+ this.script.notification(`${item.name} added`)
this.actor.createEmbeddedDocuments("Item", [item])
}
-else
+else
{
- ui.notifications.error("Impossible de trouver l'item: " + uuid)
+ ui.notifications.error("Impossible de trouver l'objet : " + uuid)
}
\ No newline at end of file
diff --git a/scripts/KPQfupKuaf4LCv4R.js b/scripts/KPQfupKuaf4LCv4R.js
deleted file mode 100644
index 611bcef..0000000
--- a/scripts/KPQfupKuaf4LCv4R.js
+++ /dev/null
@@ -1,2 +0,0 @@
-const talents = await Promise.all(["Intrigant", "Seconde Vue"].map(game.wfrp4e.utility.findTalent))
-this.actor.createEmbeddedDocuments("Item", talents, {fromEffect : this.effect.id})
\ No newline at end of file
diff --git a/scripts/KQzbrpb0T5a7it4k.js b/scripts/KQzbrpb0T5a7it4k.js
index d07b192..1620dd8 100644
--- a/scripts/KQzbrpb0T5a7it4k.js
+++ b/scripts/KQzbrpb0T5a7it4k.js
@@ -1,4 +1,4 @@
let item = await fromUuid("Compendium.wfrp4e-core.items.Item.vMYEkrWj0ip6ZOdv");
let data = item.toObject();
-data.name += ` (Maladie)`;
+data.name += ` (Disease)`;
this.actor.createEmbeddedDocuments("Item", [data], {fromEffect: this.effect.id})
\ No newline at end of file
diff --git a/scripts/KSGIwJxR0qn10RLX.js b/scripts/KSGIwJxR0qn10RLX.js
new file mode 100644
index 0000000..df44289
--- /dev/null
+++ b/scripts/KSGIwJxR0qn10RLX.js
@@ -0,0 +1 @@
+this.actor.itemTags.template.find(t => t.name === "Hungry Troll").delete();
\ No newline at end of file
diff --git a/scripts/KSjsDlsx3DD6cT16.js b/scripts/KSjsDlsx3DD6cT16.js
deleted file mode 100644
index f00b8b8..0000000
--- a/scripts/KSjsDlsx3DD6cT16.js
+++ /dev/null
@@ -1 +0,0 @@
-return args.skill?.name != game.i18n.localize("NAME.Bribery");
\ No newline at end of file
diff --git a/scripts/KUx0deSF3xNzMucL.js b/scripts/KUx0deSF3xNzMucL.js
deleted file mode 100644
index 208679d..0000000
--- a/scripts/KUx0deSF3xNzMucL.js
+++ /dev/null
@@ -1 +0,0 @@
-return args.skill?.name.includes(game.i18n.localize("NAME.Art"));
\ No newline at end of file
diff --git a/scripts/KVpDUEjHhd3nLa0f.js b/scripts/KVpDUEjHhd3nLa0f.js
index a301dfb..81d3f97 100644
--- a/scripts/KVpDUEjHhd3nLa0f.js
+++ b/scripts/KVpDUEjHhd3nLa0f.js
@@ -1,6 +1,6 @@
-let test = await this.actor.setupCharacteristic("wp", {skipTargets: true, appendTitle : ` - ${this.effect.name}`})
-await test.roll();
-if (test.failed)
+let test = await this.actor.setupCharacteristic("wp", {skipTargets: true, appendTitle : ` - ${this.effet.name}`})
+await Test.roll();
+if (Test.Échoué)
{
- this.script.scriptMessage(await game.wfrp4e.tables.formatChatRoll("enrage-beast"))
+ this.script.message(await game.wfrp4e.tables.formatChatRoll("enrage-beast"))
}
\ No newline at end of file
diff --git a/scripts/KkE8DtsTDYDyk1gN.js b/scripts/KkE8DtsTDYDyk1gN.js
new file mode 100644
index 0000000..98d3d7a
--- /dev/null
+++ b/scripts/KkE8DtsTDYDyk1gN.js
@@ -0,0 +1 @@
+args.data.reversal = {allowed : true, if: "better"};
\ No newline at end of file
diff --git a/scripts/KkjkYAGI9Em1NgiQ.js b/scripts/KkjkYAGI9Em1NgiQ.js
deleted file mode 100644
index 8ae39d2..0000000
--- a/scripts/KkjkYAGI9Em1NgiQ.js
+++ /dev/null
@@ -1,19 +0,0 @@
-if (this.item.system.quantity.value)
-{
- this.item.system.reduceQuantity();
- let test = await this.actor.setupSkill(game.i18n.localize("NAME.Heal"), { appendTitle: ` - ${this.effect.name}`, skipTargets: true })
- await test.roll();
- if (test.succeeded)
- {
- let actor = Array.from(game.user.targets)[0]?.actor || this.actor;
- actor.applyEffect({ effectData: [this.item.effects.contents[0].convertToApplied()] })
- }
- else
- {
- this.script.scriptNotification("Test de Guérison échoué!", "error")
- }
-}
-else
-{
- this.script.scriptNotification("Quantité insuffisante!", "error")
-}
\ No newline at end of file
diff --git a/scripts/KmngDrPD72xn22kZ.js b/scripts/KmngDrPD72xn22kZ.js
index 2365538..2418a1a 100644
--- a/scripts/KmngDrPD72xn22kZ.js
+++ b/scripts/KmngDrPD72xn22kZ.js
@@ -1,11 +1,11 @@
if (this.actor.Species.toLowerCase() != "skaven") {
- this.actor.setupCharacteristic("t", {skipTargets: true, appendTitle : ` - Utilise ${this.effect.name}`, fields: { difficulty: "difficult" } }).then(async test => {
- await test.roll()
- if (test.failed)
+ this.actor.setupCharacteristic("t", {skipTargets: true, appendTitle : ` - Utilise ${this.effet.name}`, fields: { difficulty: "difficult" } }).then(async Test => {
+ await Test.roll()
+ if (Test.Échoué)
{
let toughnessLost = Math.ceil(CONFIG.Dice.randomUniform() * 10)
this.actor.update({ "system.characteristics.t.initial": this.actor.characteristics.t.initial - toughnessLost })
- this.script.scriptMessage(`${this.actor.prototypeToken.name} perd ${toughnessLost} points d'Endurance`)
+ this.script.message(`${this.actor.prototypeToken.name} Perte de ${toughnessLost} Endurance`)
}
})
}
\ No newline at end of file
diff --git a/scripts/KxIRA51YA0rktcSP.js b/scripts/KxIRA51YA0rktcSP.js
new file mode 100644
index 0000000..dcddc99
--- /dev/null
+++ b/scripts/KxIRA51YA0rktcSP.js
@@ -0,0 +1 @@
+return args.characteristic === "fel"
\ No newline at end of file
diff --git a/scripts/KyUPYV1RXJxPOfyA.js b/scripts/KyUPYV1RXJxPOfyA.js
deleted file mode 100644
index 5e60157..0000000
--- a/scripts/KyUPYV1RXJxPOfyA.js
+++ /dev/null
@@ -1,6 +0,0 @@
-let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields : {difficulty : "veasy"}})
-await test.roll();
-if (test.failed)
-{
- this.actor.addCondition("fatigued");
-}
\ No newline at end of file
diff --git a/scripts/L41ao2Mw1miE0yri.js b/scripts/L41ao2Mw1miE0yri.js
new file mode 100644
index 0000000..49e2ef2
--- /dev/null
+++ b/scripts/L41ao2Mw1miE0yri.js
@@ -0,0 +1,2 @@
+let roll = await new Roll("15").roll();
+roll.toMessage(this.script.getChatData());
\ No newline at end of file
diff --git a/scripts/L9eAtDyaoHvqryk4.js b/scripts/L9eAtDyaoHvqryk4.js
deleted file mode 100644
index c5efbe5..0000000
--- a/scripts/L9eAtDyaoHvqryk4.js
+++ /dev/null
@@ -1 +0,0 @@
-return args.skill?.name != game.i18n.localize("NAME.Intimidate");
\ No newline at end of file
diff --git a/scripts/L9pUSX8Z4y2zIAn7.js b/scripts/L9pUSX8Z4y2zIAn7.js
new file mode 100644
index 0000000..287d6f8
--- /dev/null
+++ b/scripts/L9pUSX8Z4y2zIAn7.js
@@ -0,0 +1 @@
+this.actor.system.characteristics.int.value = 50
\ No newline at end of file
diff --git a/scripts/LLqAT9wEUGMLfDhU.js b/scripts/LLqAT9wEUGMLfDhU.js
index 4102c46..8cbf753 100644
--- a/scripts/LLqAT9wEUGMLfDhU.js
+++ b/scripts/LLqAT9wEUGMLfDhU.js
@@ -1 +1 @@
-return !args.item?.system.isRanged
\ No newline at end of file
+return !args.item?.system.isProjectiles
\ No newline at end of file
diff --git a/scripts/LNxKkPI37im0bSjy.js b/scripts/LNxKkPI37im0bSjy.js
new file mode 100644
index 0000000..c26f839
--- /dev/null
+++ b/scripts/LNxKkPI37im0bSjy.js
@@ -0,0 +1,5 @@
+const ablaze = Number(args.opposedTest.result.differenceSL) + 1
+args.actor.addCondition("ablaze", ablaze)
+args.extraMessages.push(
+ "" + this.effect.name + ": "
+ + ablaze + " @Condition[Ablaze] Conditions")
\ No newline at end of file
diff --git a/scripts/LQEWSN5KnHHATPsf.js b/scripts/LQEWSN5KnHHATPsf.js
index c6e73b1..3b87552 100644
--- a/scripts/LQEWSN5KnHHATPsf.js
+++ b/scripts/LQEWSN5KnHHATPsf.js
@@ -1,4 +1,4 @@
if (args.totalWoundLoss > 0)
{
- this.script.scriptMessage(`${args.actor.name} doit réussir un Test Facile (+40) d'Endurance ou subir une @UUID[Compendium.wfrp4e-core.items.kKccDTGzWzSXCBOb]{Blessure Purulente}`, {whisper: ChatMessage.getWhisperRecipients("GM")})
+ this.script.message(`${args.actor.name} must pass an Easy (+40) Résistance Test or gain a @UUID[Compendium.wfrp4e-core.items.kKccDTGzWzSXCBOb]{Festering Wound}`, {whisper: ChatMessage.getWhisperRecipients("GM")})
}
\ No newline at end of file
diff --git a/scripts/LXEUhHuXe8keEPI9.js b/scripts/LXEUhHuXe8keEPI9.js
index 0683f16..22920c2 100644
--- a/scripts/LXEUhHuXe8keEPI9.js
+++ b/scripts/LXEUhHuXe8keEPI9.js
@@ -1,7 +1,7 @@
-let test = await this.actor.setupCharacteristic("wp", {fields: {difficulty : "average"}, skipTargets: true, appendTitle : ` - ${this.effect.name}`})
-await test.roll();
-if (test.failed)
+let test = await this.actor.setupCharacteristic("wp", {fields: {difficulty : "average"}, skipTargets: true, appendTitle : ` - ${this.effet.name}`})
+await Test.roll();
+if (Test.Échoué)
{
- 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)
}
\ No newline at end of file
diff --git a/scripts/LeKLtvEDrWh4yHsx.js b/scripts/LeKLtvEDrWh4yHsx.js
deleted file mode 100644
index bfe04ec..0000000
--- a/scripts/LeKLtvEDrWh4yHsx.js
+++ /dev/null
@@ -1 +0,0 @@
-return args.skill?.name == game.i18n.localize("NAME.CharmAnimal") || args.skill?.name.includes(game.i18n.localize("NAME.AnimalTraining"));
\ No newline at end of file
diff --git a/scripts/Lg1oRg4oNRvucsvi.js b/scripts/Lg1oRg4oNRvucsvi.js
deleted file mode 100644
index 42395c3..0000000
--- a/scripts/Lg1oRg4oNRvucsvi.js
+++ /dev/null
@@ -1 +0,0 @@
-return !(args.skill?.name == game.i18n.localize("NAME.Climb") || args.skill?.name == game.i18n.localize("NAME.Athletics"))
\ No newline at end of file
diff --git a/scripts/Lh3Ccqx3utIu6w0d.js b/scripts/Lh3Ccqx3utIu6w0d.js
new file mode 100644
index 0000000..652b637
--- /dev/null
+++ b/scripts/Lh3Ccqx3utIu6w0d.js
@@ -0,0 +1,5 @@
+if (!args.ablazeApplied)
+{
+ args.ablazeApplied = true;
+ await args.actor.addCondition("ablaze");
+}
\ No newline at end of file
diff --git a/scripts/LjfScVGBf0Egr70E.js b/scripts/LjfScVGBf0Egr70E.js
deleted file mode 100644
index 07e1a29..0000000
--- a/scripts/LjfScVGBf0Egr70E.js
+++ /dev/null
@@ -1,9 +0,0 @@
-let animalCare = this.actor.itemTypes.skill.find(s => s.name === game.i18n.localize("NAME.AnimalCare"));
-let animalTrainings = this.actor.itemTypes.skill.filter(s => s.name.includes(game.i18n.localize("NAME.AnimalTraining")));
-
-if (animalCare)
- animalCare.system.modifier.value += 20;
-
-for (let training of animalTrainings) {
- training.system.modifier.value += 30;
-}
\ No newline at end of file
diff --git a/scripts/Lp261O9fgEXmgPf3.js b/scripts/Lp261O9fgEXmgPf3.js
index 65d054e..729b047 100644
--- a/scripts/Lp261O9fgEXmgPf3.js
+++ b/scripts/Lp261O9fgEXmgPf3.js
@@ -1,5 +1,5 @@
// If this actor wins a defending test, swap the test
if (!args.opposedTest.result.swapped && args.opposedTest.result.winner == "defender" && args.opposedTest.attackerTest.result.damage)
{
- args.opposedTest.swap(this.effect.label);
+ await args.opposedTest.swap(this.effect.name);
}
\ No newline at end of file
diff --git a/scripts/Lpv2N9LK9loeumiW.js b/scripts/Lpv2N9LK9loeumiW.js
deleted file mode 100644
index ad3c30e..0000000
--- a/scripts/Lpv2N9LK9loeumiW.js
+++ /dev/null
@@ -1,6 +0,0 @@
-if (this.actor.uuid != this.effect.sourceActor.uuid)
-{
- this.actor.setupSkill(game.i18n.localize("NAME.Athletics"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields : {difficulty: "hard"}, context : {failure : `${this.effect.name}: cannot move or take actions`}}).then(test => {
- test.roll();
- })
-}
\ No newline at end of file
diff --git a/scripts/Lrb1S2aK7SFVD0C7.js b/scripts/Lrb1S2aK7SFVD0C7.js
deleted file mode 100644
index 2f40127..0000000
--- a/scripts/Lrb1S2aK7SFVD0C7.js
+++ /dev/null
@@ -1,9 +0,0 @@
-if (args.totalWoundLoss > 0)
-{
- let test = await args.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`})
- await test.roll();
- if (test.failed)
- {
- await args.actor.addCondition("fatigued");
- }
-}
\ No newline at end of file
diff --git a/scripts/Lu27iXtJVkrJ8bOx.js b/scripts/Lu27iXtJVkrJ8bOx.js
deleted file mode 100644
index 73cb61d..0000000
--- a/scripts/Lu27iXtJVkrJ8bOx.js
+++ /dev/null
@@ -1 +0,0 @@
-return !args.skill?.name?.includes(game.i18n.localize("NAME.Stealth"))
\ No newline at end of file
diff --git a/scripts/LyAK0dVDS5L09yq2.js b/scripts/LyAK0dVDS5L09yq2.js
index 7f19beb..911f850 100644
--- a/scripts/LyAK0dVDS5L09yq2.js
+++ b/scripts/LyAK0dVDS5L09yq2.js
@@ -5,5 +5,5 @@ if (caster)
let bonus = caster.system.characteristics.wp.bonus
this.actor.modifyWounds(bonus)
- this.script.scriptMessage(`${this.actor.prototypeToken.name} récupère ${bonus} Blessures`)
+ this.script.message(`${this.actor.prototypeToken.name} regains ${bonus} Wounds`)
}
\ No newline at end of file
diff --git a/scripts/M0XhKnWjG14pk3iH.js b/scripts/M0XhKnWjG14pk3iH.js
deleted file mode 100644
index 202036f..0000000
--- a/scripts/M0XhKnWjG14pk3iH.js
+++ /dev/null
@@ -1 +0,0 @@
-return !args.skill?.name.includes("Focalisation") && args.type != "channelling" && args.skill?.name != game.i18n.localize("NAME.Charm") && !args.skill?.name.includes("Langue (Magick)") && args.type != "cast"
\ No newline at end of file
diff --git a/scripts/M2FshTX4PjKFVU8y.js b/scripts/M2FshTX4PjKFVU8y.js
deleted file mode 100644
index 6aa49fc..0000000
--- a/scripts/M2FshTX4PjKFVU8y.js
+++ /dev/null
@@ -1,9 +0,0 @@
-args.flags.earCount = Number.isNumeric(args.flags.earCount) ? args.flags.earCount+1 : 1;
-if (args.characteristic == "fel")
-{
- args.fields.modifier -= 5;
-}
-if (args.flags.earCount == 2 && args.skill?.name == game.i18n.localize("NAME.Perception"))
-{
- args.fields.modifier -= 20;
-}
diff --git a/scripts/M5bh0heeafA2fQQ8.js b/scripts/M5bh0heeafA2fQQ8.js
index bcd4d8e..ed508cd 100644
--- a/scripts/M5bh0heeafA2fQQ8.js
+++ b/scripts/M5bh0heeafA2fQQ8.js
@@ -2,7 +2,7 @@ if (args.test.spell?.getFlag("wfrp4e", "boonOfTzeentch"))
{
if (args.test.result.minormis || args.test.result.majormis || args.test.result.catastrophicmis)
{
- this.script.scriptMessage(`${this.effect.name} s'efface de votre esprit et s'efface de votre grimoire !`)
+ this.script.message(`${this.effect.name} quits your mind in disgust and erases itself from your grimoire!`)
this.effect.sourceItem.delete();
}
}
\ No newline at end of file
diff --git a/scripts/M6sb1yAdEAMlIvac.js b/scripts/M6sb1yAdEAMlIvac.js
new file mode 100644
index 0000000..735c90c
--- /dev/null
+++ b/scripts/M6sb1yAdEAMlIvac.js
@@ -0,0 +1 @@
+return args.item?.system?.attackType == "ranged" && this.item.equipped.value
\ No newline at end of file
diff --git a/scripts/M9VgeYGiUO97ZUW4.js b/scripts/M9VgeYGiUO97ZUW4.js
deleted file mode 100644
index 4cb39af..0000000
--- a/scripts/M9VgeYGiUO97ZUW4.js
+++ /dev/null
@@ -1,12 +0,0 @@
-let item = await fromUuid("Compendium.wfrp4e-core.items.hCadFsTRvLN9faaY")
-let data = item.toObject();
-data.system.location.value = "Jaw"
-this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id})
-
-let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`})
-await test.roll();
-if (!test.succeeded)
-{
- args.actor.addCondition("unconscious")
-}
-
diff --git a/scripts/MB058H6OslhfBmxR.js b/scripts/MB058H6OslhfBmxR.js
new file mode 100644
index 0000000..6294b55
--- /dev/null
+++ b/scripts/MB058H6OslhfBmxR.js
@@ -0,0 +1,2 @@
+console.log(args)
+return args.item?.system?.attackType == "melee"
\ No newline at end of file
diff --git a/scripts/MDLttXplnNthncGr.js b/scripts/MDLttXplnNthncGr.js
index 950f0b7..b7a08ee 100644
--- a/scripts/MDLttXplnNthncGr.js
+++ b/scripts/MDLttXplnNthncGr.js
@@ -1 +1 @@
-return args.type == "cast" && ["mort", "nécromancie", "vie", "lumière", "cieux"].includes(args.spell?.system.lore.value)
\ No newline at end of file
+return args.type == "cast" && ["death", "necromancy", "life", "light", "heavens"].includes(args.spell?.system.lore.value)
\ No newline at end of file
diff --git a/scripts/MFKhU9vp8bQpHP3I.js b/scripts/MFKhU9vp8bQpHP3I.js
index 126a0b5..255dffc 100644
--- a/scripts/MFKhU9vp8bQpHP3I.js
+++ b/scripts/MFKhU9vp8bQpHP3I.js
@@ -6,7 +6,7 @@ if (game.user.isGM && game.user.targets.size)
game.user.targets.forEach(t => {
t.actor.applyTerror(value, name)
})
- game.user.updateTokenTargets([]);
+ game.canvas.tokens.setTargets([])
}
else
{
diff --git a/scripts/MJB6WbZSF6Briz30.js b/scripts/MJB6WbZSF6Briz30.js
deleted file mode 100644
index 13bb16c..0000000
--- a/scripts/MJB6WbZSF6Briz30.js
+++ /dev/null
@@ -1 +0,0 @@
-return args.item?.name == game.i18n.localize("NAME.Leadership")
\ No newline at end of file
diff --git a/scripts/MKxYbHOrv0UuA7JB.js b/scripts/MKxYbHOrv0UuA7JB.js
new file mode 100644
index 0000000..8371d4f
--- /dev/null
+++ b/scripts/MKxYbHOrv0UuA7JB.js
@@ -0,0 +1,9 @@
+let test = await this.actor.setupSkill(game.i18n.localize("NAME.Résistance"), {fields: {difficulty : "average"}, appendTitle : " - Blessé"})
+ await test.roll();
+ if (test.failed)
+ {
+ fromUuid("Compendium.wfrp4e-core.items.kKccDTGzWzSXCBOb").then(disease => {
+ this.actor.createEmbeddedDocuments("Item", [disease.toObject()])
+ this.script.scriptNotification("Contraction de " + disease.name)
+ })
+ }
\ No newline at end of file
diff --git a/scripts/MMv2B8TH7jxNCtdl.js b/scripts/MMv2B8TH7jxNCtdl.js
deleted file mode 100644
index 1bdc6d1..0000000
--- a/scripts/MMv2B8TH7jxNCtdl.js
+++ /dev/null
@@ -1,44 +0,0 @@
-let actor = this.actor;
-let effect = this.effect;
-let bleedingAmt;
-let bleedingRoll;
-let msg = ""
-
-let damage = effect.conditionValue;
-let scriptArgs = { msg, damage };
-await Promise.all(actor.runScripts("preApplyCondition", { effect, data: scriptArgs }))
-msg = scriptArgs.msg;
-damage = scriptArgs.damage;
-msg += await actor.applyBasicDamage(damage, { damageType: game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL, minimumOne: false, suppressMsg: true })
-
-if (actor.status.wounds.value == 0 && !actor.hasCondition("unconscious")) {
- await actor.addCondition("unconscious")
- msg += " " + game.i18n.format("BleedUnc", { name: actor.prototypeToken.name })
-}
-
-if (actor.hasCondition("unconscious")) {
- bleedingAmt = effect.conditionValue;
- bleedingRoll = (await new Roll("1d100").roll()).total;
- if (bleedingRoll <= bleedingAmt * 10) {
- msg += " " + game.i18n.format("BleedFail", { name: actor.prototypeToken.name }) + " (" + game.i18n.localize("Rolled") + " " + bleedingRoll + ")";
- await actor.addCondition("dead")
- }
- else if (bleedingRoll % 11 == 0) {
- msg += " " + game.i18n.format("BleedCrit", { name: actor.prototypeToken.name }) + " (" + game.i18n.localize("Rolled") + bleedingRoll + ")"
- await actor.removeCondition("bleeding")
- }
- else {
- msg += " " + game.i18n.localize("BleedRoll") + ": " + bleedingRoll;
- }
-}
-
-await Promise.all(actor.runScripts("applyCondition", { effect, data: { bleedingRoll } }))
-if (args.suppressMessage) {
- let messageData = game.wfrp4e.utility.chatDataSetup(msg);
- messageData.speaker = { alias: this.effect.name }
- messageData.flavor = this.effect.name;
- return messageData
-}
-else {
- return this.script.scriptMessage(msg)
-}
diff --git a/scripts/MMx8f5uJ15XOgJGg.js b/scripts/MMx8f5uJ15XOgJGg.js
deleted file mode 100644
index 8146820..0000000
--- a/scripts/MMx8f5uJ15XOgJGg.js
+++ /dev/null
@@ -1 +0,0 @@
-return args.skill?.name !== game.i18n.localize("NAME.Row") && args.skill?.name !== game.i18n.localize("NAME.Swim") && !args.skill?.name.includes(game.i18n.localize("NAME.Sail"));
\ No newline at end of file
diff --git a/scripts/MPK7U4HLmIAsjdqs.js b/scripts/MPK7U4HLmIAsjdqs.js
new file mode 100644
index 0000000..f04f21d
--- /dev/null
+++ b/scripts/MPK7U4HLmIAsjdqs.js
@@ -0,0 +1,5 @@
+if (args.applyAP)
+{
+ args.modifiers.ap.ignored += 2
+ args.modifiers.ap.details.push("" + this.effect.name + ": Ignore 2 PA");
+}
\ No newline at end of file
diff --git a/scripts/MSJWJEUrX7ZmMvAD.js b/scripts/MSJWJEUrX7ZmMvAD.js
deleted file mode 100644
index ad91ce3..0000000
--- a/scripts/MSJWJEUrX7ZmMvAD.js
+++ /dev/null
@@ -1 +0,0 @@
-return !(args.skill?.name.includes(game.i18n.localize("NAME.Ranged")) || args.item?.isRanged || args.item?.name == game.i18n.localize("NAME.Charm"))
\ No newline at end of file
diff --git a/scripts/Me1wS5XdqUEy7OGt.js b/scripts/Me1wS5XdqUEy7OGt.js
index ff366cb..0f251a6 100644
--- a/scripts/Me1wS5XdqUEy7OGt.js
+++ b/scripts/Me1wS5XdqUEy7OGt.js
@@ -1,5 +1,5 @@
let loc = (await game.wfrp4e.tables.rollTable("hitloc")).result;
-let critTable = `crit${this.generalizeTable(loc)`;
+let critTable = `crit${this.generalizeTable(loc)}`;
let crit = (await game.wfrp4e.tables.rollTable(critTable)).result;
-this.script.scriptMessage(`{this.actor.name} subit un ${crit} (localisation : ${loc}). Ne pas appliquer d'Hemmoragie ou de Blessures additionnelles.`);
\ No newline at end of file
+this.script.message(`{this.actor.name} suffers a ${crit} (location : ${loc}). Do not apply bleeding or any additonnal wounds.`);
\ No newline at end of file
diff --git a/scripts/MfxWXZwaZUjGSBqw.js b/scripts/MfxWXZwaZUjGSBqw.js
index c4ce0c6..479ba99 100644
--- a/scripts/MfxWXZwaZUjGSBqw.js
+++ b/scripts/MfxWXZwaZUjGSBqw.js
@@ -1,5 +1,5 @@
if (this.actor.hasCondition("ablaze"))
{
- this.script.scriptNotification("Immunisé à En Flammes")
+ this.script.notification("Immunisé à l'état En Flames")
await this.actor.hasCondition("ablaze")?.delete()
}
\ No newline at end of file
diff --git a/scripts/MfxzwJz2o9ho2hOM.js b/scripts/MfxzwJz2o9ho2hOM.js
index 48b706b..664e6ec 100644
--- a/scripts/MfxzwJz2o9ho2hOM.js
+++ b/scripts/MfxzwJz2o9ho2hOM.js
@@ -1 +1 @@
-return args.skill?.name == "Savoir (Apothicaire)"
\ No newline at end of file
+return args.skill?.name == "Lore (Apothecary)"
\ No newline at end of file
diff --git a/scripts/MgMMoC4Umpg7fmNI.js b/scripts/MgMMoC4Umpg7fmNI.js
index f431174..475ee48 100644
--- a/scripts/MgMMoC4Umpg7fmNI.js
+++ b/scripts/MgMMoC4Umpg7fmNI.js
@@ -1,24 +1,21 @@
// Apply changes when the mask is worn
-if (args.equipped) {
- this.actor.createEmbeddedDocuments("ActiveEffect", [this.item.effects.contents[1]?.convertToApplied()])
- this.script.scriptMessage(`${this.actor.name} porte ${this.item.name}.
- Il ne peut plus lancer de Sorts ni effectuer de Prières ni Miracles.
- S'il porte le masque pendant plus d'1 heure ou bénéficie de l'un de ses effets, il est exposé à un @Corruption[moderate]{Corruption Modérée}.
+if (args.equipped) {
+ this.actor.createEmbeddedDocuments("ActiveEffect", [this.item.effects.contents[1]?.convertToApplied()])
+ this.script.message(`${this.actor.name} porte le ${this.item.name}.
+ Ils ne peuvent pas lancer de sorts ni prier pour des Bénédictions et des Miracles.
+ S'ils portent le masque pendant plus d'une heure ou bénéficient de l'un de ses effets, ils sont exposés à @Corruption[modérée]{Corruption modérée}.
`,
- {whisper: ChatMessage.getWhisperRecipients("GM")})
+ {whisper: ChatMessage.getWhisperRecipients("GM")})
}
-// Notify of lingering effects when mask is removed
+// Notify of lingering effects when mask is Retiré
else if (!args.equipped)
{
await this.item.effects.contents[0].delete();
- await this.item.update({name : this.item.name += " (Used)"})
- this.script.scriptMessage(`${this.item.name} sur ${this.actor.name} a été enlevé et à perdu ses propriétés. Cependant, les effets perdurent pendant [[1d10+4]] jours, après quoi ils devront être supprimés manuellement.`,
+ await this.item.update({name : this.item.name += " (Usagé)"})
+ this.script.message(`${this.item.name} sur ${this.actor.name} a été retiré et perd ses propriétés. Cependant, les effets durent [[1d10+4]] jours, après quoi ils doivent être manuellement retirés.`,
{whisper: ChatMessage.getWhisperRecipients("GM")}
)
-
+
}
-
-
-
diff --git a/scripts/Mhb67xufvA9uWO21.js b/scripts/Mhb67xufvA9uWO21.js
index 9f01412..2e31ab5 100644
--- a/scripts/Mhb67xufvA9uWO21.js
+++ b/scripts/Mhb67xufvA9uWO21.js
@@ -1,8 +1,8 @@
-let actorSize = game.wfrp4e.config.actorSizeNums[args.actor.details.size.value]
-let attackerSize = game.wfrp4e.config.actorSizeNums[args.attacker.details.size.value]
+let actorTaille = game.wfrp4e.config.actorTailleNums[args.actor.details.size.value]
+let attackerTaille = game.wfrp4e.config.actorTailleNums[args.attacker.details.size.value]
-if (attackerSize > actorSize)
+if (attackerTaille > actorTaille)
{
args.actor.addCondition("prone")
- this.script.scriptMessage(`Attaque Caudale: ${args.actor.prototypeToken.name} est désormais A Terre`)
+ this.script.message(`Tail Attack: ${args.actor.prototypeToken.name} is now Prone`)
}
\ No newline at end of file
diff --git a/scripts/Mir4FMHQRdVqazAF.js b/scripts/Mir4FMHQRdVqazAF.js
index 8be83d5..c6dc9c2 100644
--- a/scripts/Mir4FMHQRdVqazAF.js
+++ b/scripts/Mir4FMHQRdVqazAF.js
@@ -1,13 +1,13 @@
-let actorSize = game.wfrp4e.config.actorSizeNums[args.actor.details.size.value]
-let attackerSize = game.wfrp4e.config.actorSizeNums[args.attacker.details.size.value]
+let actorTaille = game.wfrp4e.config.actorTailleNums[args.actor.details.size.value]
+let attackerTaille = game.wfrp4e.config.actorTailleNums[args.attacker.details.size.value]
-if (attackerSize > actorSize)
+if (attackerTaille > actorTaille)
{
- let msg = `Attaque de Langue préhensile: ${args.actor.prototypeToken.name} est désormais @Condition[Empêtré]`;
+ let msg = `Attaque de Langue: ${args.actor.prototypeToken.name} est maintenant @Condition[Entangled]`;
await args.actor.addCondition("entangled");
- if (actorSize <= 2)
+ if (actorTaille <= 2)
{
- msg += `et @Condition[Engagé]`
+ msg += `et @Condition[Engaged]`
}
- this.script.scriptMessage(msg, {speaker : {alias: args.attacker.prototypeToken.name}})
+ this.script.message(msg, {speaker : {alias: args.attacker.prototypeToken.name}})
}
\ No newline at end of file
diff --git a/scripts/MnqQkXVp20Lw84I1.js b/scripts/MnqQkXVp20Lw84I1.js
index 93be773..774f012 100644
--- a/scripts/MnqQkXVp20Lw84I1.js
+++ b/scripts/MnqQkXVp20Lw84I1.js
@@ -1,6 +1,6 @@
-let test = await this.actor.setupCharacteristic("t", {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields : {difficulty : "difficult"}})
+let test = await this.actor.setupCharacteristic("t", {skipTargets: true, appendTitle : ` - ${this.effet.name}`, fields : {difficulty : "difficult"}})
await test.roll();
if (test.failed)
{
- this.script.scriptMessage(await this.actor.applyBasicDamage(3, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL, suppressMsg : true}))
+ this.script.message(await this.actor.applyBasicDamage(3, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL, suppressMsg : true}))
}
\ No newline at end of file
diff --git a/scripts/Mp8UjuCLa9jdzhBS.js b/scripts/Mp8UjuCLa9jdzhBS.js
deleted file mode 100644
index 0e448e2..0000000
--- a/scripts/Mp8UjuCLa9jdzhBS.js
+++ /dev/null
@@ -1,20 +0,0 @@
-let test = await this.actor.setupSkill(game.i18n.localize("NAME.Cool"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`})
-await test.roll();
-
-if (test.failed)
-{
- if (!this.actor.hasCondition("fatigued"))
- {
- await this.actor.addCondition("fatigued");
- }
- else
- {
- await this.actor.addCondition("blinded");
- await this.actor.addCondition("deafened");
- }
-
- if (((this.actor.hasCondition("blinded").conditionValue || 0) + (this.actor.hasCondition("deafened").conditionValue || 0)) > this.actor.system.characteristics.i.bonus)
- {
- await this.actor.addCondition("unconscious");
- }
-}
\ No newline at end of file
diff --git a/scripts/Mqbjr3t7IXwFnfCv.js b/scripts/Mqbjr3t7IXwFnfCv.js
new file mode 100644
index 0000000..ce75ac5
--- /dev/null
+++ b/scripts/Mqbjr3t7IXwFnfCv.js
@@ -0,0 +1,19 @@
+if (this.item.flags.runeOfIron) return
+
+
+const runesOfIron = this.item.effects.contents.filter(e => e.name == this.effect.name)
+const ironWounds = parseInt(runesOfIron.length * 2)
+const currentWounds = this.actor.system.status.wounds.value
+
+if (args.equipped) {
+ this.item.flags.runeOfIron = true
+ this.actor.modifyWounds(ironWounds)
+}
+else
+{
+ this.item.flags.runeOfIron = true
+ this.actor.modifyWounds(-ironWounds)
+ if (ironWounds > currentWounds) {
+ this.script.message(`You have removed ${ironWounds} Wounds by unequipping Runic Armoour, but you only had ${currentWounds} Wounds remaining. This may trigger a critical injury.`)
+ }
+}
\ No newline at end of file
diff --git a/scripts/Msygc7oQQPB5fw0b.js b/scripts/Msygc7oQQPB5fw0b.js
index fe0d31b..159a300 100644
--- a/scripts/Msygc7oQQPB5fw0b.js
+++ b/scripts/Msygc7oQQPB5fw0b.js
@@ -1,14 +1,14 @@
let test = this.effect.sourceTest;
if (test.failed && (test.result.roll % 11 == 0 || test.result.roll == 100))
{
- let points = await new Roll("1d10").roll();
+ let points = await new Roll("1d10").roll({allowInteractive : false});
game.dice3d?.showForRoll(points)
this.actor.update({"system.status.corruption.value" : this.actor.system.status.corruption.value + points.total})
- this.script.scriptMessage(`Reçoit ${points.total} Point de Corruption`)
+ this.script.message(`Gain de ${points.total} Corruption`)
}
-else
+else
{
- let points = this.effect.sourceTest.result.overcast.usage.other.current;
+ let points = this.effet.sourceTest.result.overcast.usage.other.current;
this.actor.update({"system.status.corruption.value" : this.actor.system.status.corruption.value - points})
- this.script.scriptMessage(`Perd ${points} Point de Corruption`)
+ this.script.message(`Perd de ${points} de Corruption`)
}
\ No newline at end of file
diff --git a/scripts/MwUzyAgd0yPnmZCH.js b/scripts/MwUzyAgd0yPnmZCH.js
index 81a644d..aef44fc 100644
--- a/scripts/MwUzyAgd0yPnmZCH.js
+++ b/scripts/MwUzyAgd0yPnmZCH.js
@@ -1,4 +1,4 @@
let item = await fromUuid("Compendium.wfrp4e-core.items.klCJX0mNpXYH5AIx")
let data = item.toObject();
-data.name = data.name.replace("Cible", "Strangers");
+data.name = data.name.replace("Target", "Strangers");
this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id});
\ No newline at end of file
diff --git a/scripts/N6E9Jsd8n2ubCfz8.js b/scripts/N6E9Jsd8n2ubCfz8.js
new file mode 100644
index 0000000..08ad367
--- /dev/null
+++ b/scripts/N6E9Jsd8n2ubCfz8.js
@@ -0,0 +1,4 @@
+for(let key in this.item.system.AP)
+{
+ this.item.system.AP[key]++;
+}
\ No newline at end of file
diff --git a/scripts/N7nGncsPrTz2ZbDA.js b/scripts/N7nGncsPrTz2ZbDA.js
index dc64a26..af896fc 100644
--- a/scripts/N7nGncsPrTz2ZbDA.js
+++ b/scripts/N7nGncsPrTz2ZbDA.js
@@ -1 +1 @@
-return !args.options.dodge || !this.actor.isMounted
\ No newline at end of file
+return !args.context.dodge || !this.actor.isMounted
\ No newline at end of file
diff --git a/scripts/N8hA6ysHCTlLd8Kj.js b/scripts/N8hA6ysHCTlLd8Kj.js
index 00f7284..34b9945 100644
--- a/scripts/N8hA6ysHCTlLd8Kj.js
+++ b/scripts/N8hA6ysHCTlLd8Kj.js
@@ -30,7 +30,7 @@ for (let index = 0; index < skills.length; index++)
skillItem = updateObj.items.find(i => i.name == skill && i.type == "skill")
if (skillItem)
skillItem.system.advances.value += skillAdvancements[index]
- else
+ else
{
skillItem = await game.wfrp4e.utility.findSkill(skill)
skillItem = skillItem.toObject();
@@ -46,13 +46,13 @@ for (let talent of talents)
{
items.push(talentItem.toObject());
}
- else
+ else
{
ui.notifications.warn(`Impossible de trouver ${talent}`, {permanent : true})
}
}
-for (let trapping of trappings)
+for (let trapping of trappings)
{
let trappingItem = await game.wfrp4e.utility.findItem(trapping)
if (trappingItem)
@@ -63,14 +63,14 @@ for (let trapping of trappings)
items.push(trappingItem);
}
- else
+ else
{
items.push({name : trapping, type : "trapping", "system.trappingType.value" : "clothingAccessories"})
- //ui.notifications.warn(`Impossible de trouver ${trapping}`, {permanent : true})
+ //ui.notifications.warn(`Could not find ${trapping}`, {permanent : true})
}
}
-updateObj.name = updateObj.name += " " + this.effect.name
+updateObj.name = updateObj.name += " " + this.effet.name
await this.actor.update(updateObj)
this.actor.createEmbeddedDocuments("Item", items);
diff --git a/scripts/N9kA46ZQ9LiRjy6T.js b/scripts/N9kA46ZQ9LiRjy6T.js
deleted file mode 100644
index a19284c..0000000
--- a/scripts/N9kA46ZQ9LiRjy6T.js
+++ /dev/null
@@ -1 +0,0 @@
-return args.skill?.name == game.i18n.localize("NAME.Haggle") || args.skill?.name == game.i18n.localize("NAME.Gossip");
\ No newline at end of file
diff --git a/scripts/NDvNGATDM2xPFJK0.js b/scripts/NDvNGATDM2xPFJK0.js
deleted file mode 100644
index a24d236..0000000
--- a/scripts/NDvNGATDM2xPFJK0.js
+++ /dev/null
@@ -1,21 +0,0 @@
-brokenbone = await fromUuid("Compendium.wfrp4e-core.items.hCadFsTRvLN9faaY")
-teeth = await fromUuid("Compendium.wfrp4e-core.items.fBcZhOBn8IpoVqQ1")
-tongue = await fromUuid("Compendium.wfrp4e-core.items.rkJA1DlK51QuRlJy")
-brokenbone = brokenbone.toObject();
-teeth = teeth.toObject();
-tongue = tongue.toObject();
-
-
-let roll = await new Roll("1d10").roll();
-roll.toMessage(this.script.getChatData({flavor : "Dents perdues"}))
-
-teeth.system.location.value = `${roll.total} ${teeth.system.location.value}`
-brokenbone.system.location.value = "Jaw"
-this.actor.createEmbeddedDocuments("Item", [brokenbone, teeth, tongue])
-
-let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {fields: {difficulty : "vhard"}, skipTargets: true, appendTitle : ` - ${this.effect.name}`})
-await test.roll();
-if (test.failed)
-{
- this.actor.addCondition("unconscious")
-}
\ No newline at end of file
diff --git a/scripts/NEKLTgJJsayC7tpF.js b/scripts/NEKLTgJJsayC7tpF.js
new file mode 100644
index 0000000..dcd572b
--- /dev/null
+++ b/scripts/NEKLTgJJsayC7tpF.js
@@ -0,0 +1 @@
+return ["ws", "ag"].includes(args.characteristic);
\ No newline at end of file
diff --git a/scripts/NI3ZzIAlpQfVSjvf.js b/scripts/NI3ZzIAlpQfVSjvf.js
index 5348fc0..090554b 100644
--- a/scripts/NI3ZzIAlpQfVSjvf.js
+++ b/scripts/NI3ZzIAlpQfVSjvf.js
@@ -1,6 +1,6 @@
if (isNaN(parseInt(this.item.system.specification.value)))
{
- let value = await ValueDialog.create({text : "Enter Fear value", title : this.effect.name});
+ let value = await ValueDialog.create({text : "Entrez la valeur de Peur", title : this.effect.name});
if (value)
{
this.item.updateSource({"system.specification.value" : value});
diff --git a/scripts/NMZ3Fb164tUfwChF.js b/scripts/NMZ3Fb164tUfwChF.js
new file mode 100644
index 0000000..20bc0b2
--- /dev/null
+++ b/scripts/NMZ3Fb164tUfwChF.js
@@ -0,0 +1 @@
+return !args.data.targets[0]?.actor?.hasCondition("entangled")
\ No newline at end of file
diff --git a/scripts/NQSvFWhmBQAyx5Zz.js b/scripts/NQSvFWhmBQAyx5Zz.js
index 6f94648..679b0b7 100644
--- a/scripts/NQSvFWhmBQAyx5Zz.js
+++ b/scripts/NQSvFWhmBQAyx5Zz.js
@@ -1 +1 @@
-return args.item?.isRanged
\ No newline at end of file
+return args.item?.isProjectiles
\ No newline at end of file
diff --git a/scripts/NTFpkiGyBpOtrV0s.js b/scripts/NTFpkiGyBpOtrV0s.js
new file mode 100644
index 0000000..00d6e40
--- /dev/null
+++ b/scripts/NTFpkiGyBpOtrV0s.js
@@ -0,0 +1,18 @@
+if (this.actor.uuid == this.effect.sourceActor.uuid)
+{
+ return;
+}
+
+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}`})
+await Test.roll();
+if (Test.Échoué)
+{
+
+ let myRoll = await new Roll("1d10").roll({allowInteractive : false});
+ let duration = myRoll.total
+ this.actor.addSystemEffect("nausea");
+ this.script.scriptMessage(`Symptome Nausée ajouté, durée : ${duration} heures`);
+}
+}
+return false;
\ No newline at end of file
diff --git a/scripts/NX9fApO15NQuTipW.js b/scripts/NX9fApO15NQuTipW.js
new file mode 100644
index 0000000..084471d
--- /dev/null
+++ b/scripts/NX9fApO15NQuTipW.js
@@ -0,0 +1 @@
+return ["ws", "bs"].includes(args.characteristic)
\ No newline at end of file
diff --git a/scripts/Na7Nanl9YmxZlTo7.js b/scripts/Na7Nanl9YmxZlTo7.js
index e4f212b..ed60b79 100644
--- a/scripts/Na7Nanl9YmxZlTo7.js
+++ b/scripts/Na7Nanl9YmxZlTo7.js
@@ -1 +1 @@
-return args.type != "cast" && args.type != "channelling")
\ No newline at end of file
+return args.type != "cast" && args.type != "channelling"
\ No newline at end of file
diff --git a/scripts/NdquQqyuOkGCj8Uo.js b/scripts/NdquQqyuOkGCj8Uo.js
index 795693e..3e25112 100644
--- a/scripts/NdquQqyuOkGCj8Uo.js
+++ b/scripts/NdquQqyuOkGCj8Uo.js
@@ -4,5 +4,5 @@ let acutesense = await fromUuid("Compendium.wfrp4e-core.items.Item.9h82z72XGo9tf
fear = fear.toObject();
fear.system.specification.value = 1;
acutesense = acutesense.toObject();
-acutesense.name += " (Odorat)";
+acutesense.name += " (Smell)";
this.actor.createEmbeddedDocuments("Item", [darkvision, fear, acutesense], {fromEffect : this.effect.id})
\ No newline at end of file
diff --git a/scripts/NkqtQaLEGYst0PUO.js b/scripts/NkqtQaLEGYst0PUO.js
deleted file mode 100644
index 3bda5c8..0000000
--- a/scripts/NkqtQaLEGYst0PUO.js
+++ /dev/null
@@ -1,5 +0,0 @@
-if (this.actor.has("Résistance à la Magie", "talent"))
- return
-
-let item = await fromUuid("Compendium.wfrp4e-core.items.Item.eowbsW6oHGSNJmxV")
-this.actor.createEmbeddedDocuments("Item", [item], {fromEffect : this.effect.id})
\ No newline at end of file
diff --git a/scripts/NnA4zpuO6iUXKhH7.js b/scripts/NnA4zpuO6iUXKhH7.js
deleted file mode 100644
index c49dff4..0000000
--- a/scripts/NnA4zpuO6iUXKhH7.js
+++ /dev/null
@@ -1,7 +0,0 @@
-if ((args.opposedTest.attackerTest.item && args.opposedTest.attackerTest.item.isMelee) || (args.opposedTest.attackerTest.item && !args.opposedTest.attackerTest.item.name.includes("Ranged")))
-{
- let AP = parseInt(this.effect.sourceTest.result.SL)
- args.modifiers.ap.value += AP;
- args.modifiers.ap.magical += AP;
- args.modifiers.ap.details.push(`${this.effect.name} (${AP})`)
-}
\ No newline at end of file
diff --git a/scripts/NnDq4miIPNEtZUWb.js b/scripts/NnDq4miIPNEtZUWb.js
deleted file mode 100644
index 14c9bf3..0000000
--- a/scripts/NnDq4miIPNEtZUWb.js
+++ /dev/null
@@ -1,7 +0,0 @@
-args.test.result.critModifier = args.test.result.critModifier || 0;
-args.test.result.critModifier += 20;
-
-if (args.test.result.critical)
-{
- args.test.result.critical = `${game.i18n.localize("Critical")} (+${args.test.result.critModifier})`
-}
\ No newline at end of file
diff --git a/scripts/Np25JqEiaoqerEk8.js b/scripts/Np25JqEiaoqerEk8.js
new file mode 100644
index 0000000..cd1689a
--- /dev/null
+++ b/scripts/Np25JqEiaoqerEk8.js
@@ -0,0 +1,3 @@
+if (test.result.tables.miscast) {
+ test.result.other.push(`${this.effect.name}: You may reroll any result from the @Table[waaagh-miscast]{Waaagh! Miscast Table}.`);
+}
\ No newline at end of file
diff --git a/scripts/Np8P8IPT2GYlrh6G.js b/scripts/Np8P8IPT2GYlrh6G.js
deleted file mode 100644
index 64528cd..0000000
--- a/scripts/Np8P8IPT2GYlrh6G.js
+++ /dev/null
@@ -1 +0,0 @@
-return args.skill?.name !== `${game.i18n.localize("NAME.Language")} (${game.i18n.localize("SPEC.Magick")})` && args.type !== "channelling";
\ No newline at end of file
diff --git a/scripts/NqFvdCKDLqIXaE9m.js b/scripts/NqFvdCKDLqIXaE9m.js
new file mode 100644
index 0000000..20d187e
--- /dev/null
+++ b/scripts/NqFvdCKDLqIXaE9m.js
@@ -0,0 +1 @@
+return args.weapon?.system.isMelee;
\ No newline at end of file
diff --git a/scripts/NrVFrIXM8GnIbojv.js b/scripts/NrVFrIXM8GnIbojv.js
index c13398d..5888e50 100644
--- a/scripts/NrVFrIXM8GnIbojv.js
+++ b/scripts/NrVFrIXM8GnIbojv.js
@@ -1 +1 @@
-args.item.system.damage.value = `SB + ${this.actor.system.characteristics.fel.bonus}`;
\ No newline at end of file
+args.item.system.damage.value += `+ ${this.actor.system.characteristics.fel.bonus}`;
\ No newline at end of file
diff --git a/scripts/Nuth9S5UHIhpEuIC.js b/scripts/Nuth9S5UHIhpEuIC.js
new file mode 100644
index 0000000..9338454
--- /dev/null
+++ b/scripts/Nuth9S5UHIhpEuIC.js
@@ -0,0 +1 @@
+args.fields.modifier -= 20
\ No newline at end of file
diff --git a/scripts/NvaPNfZt5d9RqKSE.js b/scripts/NvaPNfZt5d9RqKSE.js
new file mode 100644
index 0000000..4716615
--- /dev/null
+++ b/scripts/NvaPNfZt5d9RqKSE.js
@@ -0,0 +1,6 @@
+if (args.test.isCritical) {
+ args.test.result.tables.critical.modifier
+ = (typeof args.test.result.tables.critical.modifier ==='undefined')
+ ? 20
+ : args.test.result.tables.critical.modifier + 20
+}
\ No newline at end of file
diff --git a/scripts/O45vpR4jDbQQnmvJ.js b/scripts/O45vpR4jDbQQnmvJ.js
index 9d1a9c1..a81d495 100644
--- a/scripts/O45vpR4jDbQQnmvJ.js
+++ b/scripts/O45vpR4jDbQQnmvJ.js
@@ -6,7 +6,7 @@ etiquette.name += " (Suivants de Khorne)";
items.push(etiquette);
let animosity = (await fromUuid("Compendium.wfrp4e-core.items.Item.Q2MCUrG2HppMcvN0")).toObject();
-animosity.name = animosity.name.replace("(Cible)", "(Suivants de Slaanesh)");
+animosity.name = animosity.name.replace("(Target)", "(Suivants de Slaanesh)");
items.push(animosity);
diff --git a/scripts/O7lXFZLrLdFaShGR.js b/scripts/O7lXFZLrLdFaShGR.js
index e5cf296..1380d6c 100644
--- a/scripts/O7lXFZLrLdFaShGR.js
+++ b/scripts/O7lXFZLrLdFaShGR.js
@@ -1 +1 @@
-args.options.catfall = true;
\ No newline at end of file
+args.context.catfall = true;
\ No newline at end of file
diff --git a/scripts/OBF6r2CsMOEokAsS.js b/scripts/OBF6r2CsMOEokAsS.js
new file mode 100644
index 0000000..b3e56e5
--- /dev/null
+++ b/scripts/OBF6r2CsMOEokAsS.js
@@ -0,0 +1,2 @@
+args.weaponProperties.damaging = true;
+args.weaponProperties.impale = true;
\ No newline at end of file
diff --git a/scripts/OEy2lxvic37dRBEt.js b/scripts/OEy2lxvic37dRBEt.js
index 4a5d5ce..ca1d7cd 100644
--- a/scripts/OEy2lxvic37dRBEt.js
+++ b/scripts/OEy2lxvic37dRBEt.js
@@ -9,7 +9,7 @@ let filters = [
}
]
-let petty = await ItemDialog.createFromFilters(filters, 3, "Choisissez 3 Sorts de Magie Mineure")
+let petty = await ItemDialog.createFromFilters(filters, 3, {text : "Choisissez 3 Sorts Mineurs"})
filters = [
@@ -23,7 +23,7 @@ filters = [
}
]
-let arcane = await ItemDialog.createFromFilters(filters, 3, "Choisissez 3 Sorts de Magie d'Arcane")
+let arcane = await ItemDialog.createFromFilters(filters, 3, {text : "Choisissez 3 Sorts d'Arcane"})
let items = petty.concat(arcane).map(i => i.toObject())
diff --git a/scripts/OF4sSVOvHoKuPk7L.js b/scripts/OF4sSVOvHoKuPk7L.js
new file mode 100644
index 0000000..c1da624
--- /dev/null
+++ b/scripts/OF4sSVOvHoKuPk7L.js
@@ -0,0 +1,8 @@
+if (this.item.flags.burning) return
+const runesOfBurning = this.item.effects.contents.filter(e => e.name == this.effect.name)
+const ablaze = runesOfBurning.length
+args.actor.addCondition("ablaze", ablaze)
+args.extraMessages.push(
+ "" + this.effect.name + ": "
+ + ablaze + " @Condition[Ablaze] Conditions")
+this.item.flags.burning = true
\ No newline at end of file
diff --git a/scripts/OFViRemr1cpnO3af.js b/scripts/OFViRemr1cpnO3af.js
new file mode 100644
index 0000000..557e478
--- /dev/null
+++ b/scripts/OFViRemr1cpnO3af.js
@@ -0,0 +1,6 @@
+let test = await this.actor.setupSkill(game.i18n.localize("NAME.Résistance"), {fields : {difficulty : "difficult"}, appendTitle : ` - ${this.effect.name}`})
+await test.roll();
+if (!test.succeeded)
+{
+ await this.actor.addCondition("bleeding");
+}
\ No newline at end of file
diff --git a/scripts/OGX4BneaYAnV25TO.js b/scripts/OGX4BneaYAnV25TO.js
index a2c6e62..0d03c90 100644
--- a/scripts/OGX4BneaYAnV25TO.js
+++ b/scripts/OGX4BneaYAnV25TO.js
@@ -2,39 +2,39 @@ let chatData = { whisper: ChatMessage.getWhisperRecipients("GM") }
let message = ""
let wounds = foundry.utils.duplicate(this.actor.status.wounds)
-let regenRoll = await new Roll("1d10").roll();
+let regenRoll = await new Roll("1d10").roll({allowInteractive : false});
let regen = regenRoll.total;
-if (wounds.value >= wounds.max)
+if (Blessures.value >= Blessures.max)
return
-if (wounds.value > 0)
+if (Blessures.value > 0)
{
- wounds.value += regen
- if (wounds.value > wounds.max)
+ Blessures.value += regen
+ if (Blessures.value > Blessures.max)
{
- wounds.value = wounds.max
+ Blessures.value = Blessures.max
}
- message += `${this.actor.name} regagne ${regen} Blessures.`
+ message += `${this.actor.name} regagne ${regen} Point de Blessures.`
if (regen == 10)
{
- message += ` Et guéri une Blessure Critique.`
+ message += ` De plus, il guérit d'une Blessure Critique.`
}
}
-else if (regen >= 8)
+else if (regen >= 8)
{
- message += `${this.actor.name} a obtenu ${regen} et récupère 1 Blessure.`
- wounds.value += 1
+ message += `${this.actor.name} a fait un ${regen} et regagne 1 Point de Blessures.`
+ Blessures.value += 1
if (regen == 10)
{
- message += ` Et guéri une Blessure Critique.`
+ message += ` De plus, il guérit d'une Blessure Critique.`
}
}
-else
+else
{
- message += `${this.actor.name} Résultat de régénération de ${regen} - Aucun effet.`
+ message += `${this.actor.name} a fait un ${regen} et ne régénère pas de Point de Blessures.`
}
-await this.actor.update({ "system.status.wounds": wounds })
-this.script.scriptMessage(message, { whisper: ChatMessage.getWhisperRecipients("GM") })
\ No newline at end of file
+await this.actor.update({ "system.status.wounds": Blessures })
+this.script.message(message, { whisper: ChatMessage.getWhisperRecipients("GM") })
\ No newline at end of file
diff --git a/scripts/OYLqLl6vikJD8flg.js b/scripts/OYLqLl6vikJD8flg.js
new file mode 100644
index 0000000..d2dbaf1
--- /dev/null
+++ b/scripts/OYLqLl6vikJD8flg.js
@@ -0,0 +1,4 @@
+const crowd = this.effect.getFlag("wfrp4e", "crowd") ?? 0;
+const bonus = 2 + Math.floor(crowd * 0.1);
+
+args.fields.slBonus += bonus ;
\ No newline at end of file
diff --git a/scripts/OYRUSP7Q0Je0jdCY.js b/scripts/OYRUSP7Q0Je0jdCY.js
new file mode 100644
index 0000000..774eb07
--- /dev/null
+++ b/scripts/OYRUSP7Q0Je0jdCY.js
@@ -0,0 +1,3 @@
+let species = await ValueDialog.create({text : "Entrez l'Espèce Cible", title : this.effect.name})
+
+this.effect.updateSource({name : this.effect.setSpecifier(species)});
\ No newline at end of file
diff --git a/scripts/OeCgX3hIsfLfmGvC.js b/scripts/OeCgX3hIsfLfmGvC.js
deleted file mode 100644
index 6777873..0000000
--- a/scripts/OeCgX3hIsfLfmGvC.js
+++ /dev/null
@@ -1,6 +0,0 @@
-let test = await this.actor.setupSkill(game.i18n.localize("NAME.Perception"))
-await test.roll();
-if (test.succeeded)
-{
- this.actor.removeCondition("surprised");
-}
\ No newline at end of file
diff --git a/scripts/OeKeQAAcJhdI4Qky.js b/scripts/OeKeQAAcJhdI4Qky.js
index 92f01ea..3499978 100644
--- a/scripts/OeKeQAAcJhdI4Qky.js
+++ b/scripts/OeKeQAAcJhdI4Qky.js
@@ -1,5 +1,5 @@
if (this.actor.hasCondition("stunned") || this.actor.hasCondition("unconscious"))
{
- this.script.scriptNotification("Désactivé!");
+ this.script.notification("Disabled!");
await this.effect.update({"disabled" : true})
}
\ No newline at end of file
diff --git a/scripts/OgSI0Z6SHjYuqKIz.js b/scripts/OgSI0Z6SHjYuqKIz.js
deleted file mode 100644
index b1cf84f..0000000
--- a/scripts/OgSI0Z6SHjYuqKIz.js
+++ /dev/null
@@ -1,16 +0,0 @@
-let blows = this.item.getFlag("wfrp4e", "blows") || 0
-let difficulties = Object.keys(game.wfrp4e.config.difficultyLabels)
-
-blows = Math.clamped(blows, 0, difficulties.length - 1)
-if (this.item.system.protects[args.opposedTest.result.hitloc.value])
-{
- let difficulty = difficulties[blows];
- this.actor.setupSkill(game.i18n.localize("NAME.Cool"), {fields: {difficulty}, skipTargets: true, appendTitle : ` - ${this.effect.name}`}).then(async test => {
- await test.roll();
- if (test.failed)
- {
- this.script.scriptMessage(`${this.actor.name} doit cesser le combat et fuir à moins de réussir un jet Intermédiaire (+0) de Force Mentale`);
- this.item.setFlag("wfrp4e", "failedCool", true);
- }
- })
-}
\ No newline at end of file
diff --git a/scripts/OicQSEVZBbqLtrcf.js b/scripts/OicQSEVZBbqLtrcf.js
index 7d35048..9c203c7 100644
--- a/scripts/OicQSEVZBbqLtrcf.js
+++ b/scripts/OicQSEVZBbqLtrcf.js
@@ -1,4 +1,4 @@
-let choice = await ItemDialog.create(this.actor.itemTypes.critical, (this.effect.sourceTest.result.overcast.usage.other.current || 1), "Choisissez la Blessure Critique à soigner (ne peut guérir les membres perdus)")
+let choice = await ItemDialog.create(this.actor.itemTypes.critical, (this.effect.sourceTest.result.overcast.usage.other.current || 1), "Choisir the Critique Blessures to heal (Impossible de reattach body parts)")
-this.script.scriptMessage(`Guéri de ${choice.map(i => i.name).join(`, `)}`);
+this.script.message(`Soin de ${choice.map(i => i.name).join(`, `)}`);
this.actor.deleteEmbeddedDocuments("Item", choice.map(i => i.id))
\ No newline at end of file
diff --git a/scripts/On1itZhp0AOzNyyc.js b/scripts/On1itZhp0AOzNyyc.js
new file mode 100644
index 0000000..90fd9da
--- /dev/null
+++ b/scripts/On1itZhp0AOzNyyc.js
@@ -0,0 +1,3 @@
+let test = await this.actor.setupSkill("Runesmithing", {appendTitle: ` - ${this.effect.name}`});
+await test.roll();
+this.effect.update({"disabled" : true});
\ No newline at end of file
diff --git a/scripts/Op88kMtimSEWlY2h.js b/scripts/Op88kMtimSEWlY2h.js
index 9f485ca..20383f5 100644
--- a/scripts/Op88kMtimSEWlY2h.js
+++ b/scripts/Op88kMtimSEWlY2h.js
@@ -6,5 +6,5 @@ if (this.item.system.quantity.value)
}
else
{
- this.script.scriptNotification("Aucun disponible!", "error")
+ this.script.notification("Plus rien !", "error")
}
\ No newline at end of file
diff --git a/scripts/OqLKL0PiCvYH2QxW.js b/scripts/OqLKL0PiCvYH2QxW.js
deleted file mode 100644
index a7317d8..0000000
--- a/scripts/OqLKL0PiCvYH2QxW.js
+++ /dev/null
@@ -1,13 +0,0 @@
-if (args.test.options.wallcrawler)
-{
- if (parseInt(args.test.result.SL) < 0 || args.test.failed)
- {
- if (parseInt(args.test.result.SL) < 0)
- {
- args.test.result.SL = "+0";
- args.test.result.description = game.i18n.localize("ROLL.MarginalSuccess");
- }
- args.test.result.outcome = "success"
- args.test.result.other.push(`${this.effect.name}: Minimum +0 DR`)
- }
-}
\ No newline at end of file
diff --git a/scripts/OsLXutfXyQCAkhAf.js b/scripts/OsLXutfXyQCAkhAf.js
index 3160e93..413860c 100644
--- a/scripts/OsLXutfXyQCAkhAf.js
+++ b/scripts/OsLXutfXyQCAkhAf.js
@@ -1,5 +1,5 @@
-const repaired_message = `
Réparation finie ${this.item.name}.
`;
-const test = 'Voile';
+const repaired_message = `
Réparation terminée ${this.item.name}.
`;
+const Test = 'Voile';
const difficulty = 'average';
const target = 30;
@@ -12,8 +12,8 @@ const extendedTestData = {
current: 0,
target: target
},
- test: {
- value: test
+ Test: {
+ value: Test
},
completion: {
value: "remove"
@@ -24,7 +24,7 @@ const extendedTestData = {
},
effects: [
{
- name: `Réparer ${this.item.name}`,
+ name: `Réparation de ${this.item.name}`,
img: this.item.img,
system: {
transferData : {
diff --git a/scripts/OxsBnnVI3Smpknpb.js b/scripts/OxsBnnVI3Smpknpb.js
index dabe09c..905c2a9 100644
--- a/scripts/OxsBnnVI3Smpknpb.js
+++ b/scripts/OxsBnnVI3Smpknpb.js
@@ -1,5 +1,5 @@
if (this.actor.status.advantage.value && !this.actor.sameSideAs(this.effect.sourceActor))
{
this.actor.modifyAdvantage(-1);
- this.script.scriptNotification(`${this.actor.name} perd 1 Avantage`);
+ this.script.notification(`${this.actor.name} loses 1 Advantage`);
}
\ No newline at end of file
diff --git a/scripts/Oz7pWF9mEc1pQypj.js b/scripts/Oz7pWF9mEc1pQypj.js
index c206691..a2bef0f 100644
--- a/scripts/Oz7pWF9mEc1pQypj.js
+++ b/scripts/Oz7pWF9mEc1pQypj.js
@@ -1,3 +1,3 @@
-let roll = await new Roll("1d10").roll();
+let roll = await new Roll("1d10").roll({allowInteractive : false});
roll.toMessage({flavor : this.effect.name, speaker : {alias : this.actor.prototypeToken.name}})
this.actor.addCondition("stunned", roll.total)
\ No newline at end of file
diff --git a/scripts/P29tT1eMMdAw3CPF.js b/scripts/P29tT1eMMdAw3CPF.js
deleted file mode 100644
index 28be2ef..0000000
--- a/scripts/P29tT1eMMdAw3CPF.js
+++ /dev/null
@@ -1,12 +0,0 @@
-let item = await fromUuid("Compendium.wfrp4e-core.items.3S4OYOZLauXctmev")
-let data = item.toObject();
-data.system.location.key = this.item.system.location.key
-this.actor.createEmbeddedDocuments("Item", [data], {fromEffect: this.effect.id})
-
-
-let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {fields: {difficulty: "hard"}, skipTargets: true, appendTitle : ` - ${this.effect.name}`})
-await test.roll();
-if (test.failed)
-{
- this.actor.addCondition("unconscious")
-}
\ No newline at end of file
diff --git a/scripts/PBW6IZtwawNHxB6y.js b/scripts/PBW6IZtwawNHxB6y.js
index f0a42aa..ec54017 100644
--- a/scripts/PBW6IZtwawNHxB6y.js
+++ b/scripts/PBW6IZtwawNHxB6y.js
@@ -1 +1 @@
-return args.options.dodge && this.actor.isMounted
\ No newline at end of file
+return args.context.dodge && this.actor.isMounted
\ No newline at end of file
diff --git a/scripts/PGHvFHBIygB5pnWT.js b/scripts/PGHvFHBIygB5pnWT.js
new file mode 100644
index 0000000..c5783cf
--- /dev/null
+++ b/scripts/PGHvFHBIygB5pnWT.js
@@ -0,0 +1,3 @@
+args.actor.addCondition("ablaze", 1)
+args.extraMessages.push(
+ "" + this.effect.name + ": Ajout d'1 état @Condition[Ablaze]")
\ No newline at end of file
diff --git a/scripts/PI1QNaKFeqood6d7.js b/scripts/PI1QNaKFeqood6d7.js
index dcae646..81bbe4b 100644
--- a/scripts/PI1QNaKFeqood6d7.js
+++ b/scripts/PI1QNaKFeqood6d7.js
@@ -7,8 +7,8 @@ if (args.attackerTest.weapon && args.defenderTest.weapon)
if (attackerReach == defenderReach)
attackerReach = attackerReach < 7 ? attackerReach + 1 : attackerReach
- attackerReach = game.wfrp4e.utility.findKey(attackerReach, game.wfrp4e.config.reachNum)
- defenderReach = game.wfrp4e.utility.findKey(defenderReach, game.wfrp4e.config.reachNum)
+ attackerReach = warhammer.utility.findKey(attackerReach, game.wfrp4e.config.reachNum)
+ defenderReach = warhammer.utility.findKey(defenderReach, game.wfrp4e.config.reachNum)
args.attackerTest.weapon.reach.value = attackerReach
args.defenderTest.weapon.reach.value = defenderReach
diff --git a/scripts/PMISUsaEDBA7D3od.js b/scripts/PMISUsaEDBA7D3od.js
deleted file mode 100644
index f8ce04c..0000000
--- a/scripts/PMISUsaEDBA7D3od.js
+++ /dev/null
@@ -1,33 +0,0 @@
-// After consumption, the user gains the Magic Resistance 3 Creature Trait,
-// reducing the SL of any spell affecting it by 3.
-// This effect lasts for one hour.
-const hasMagicResistance = this.actor.has("Résistance à la Magie")
-
-if (hasMagicResistance === undefined) {
- fromUuid("Compendium.wfrp4e-core.items.yrkI7ATjqLPDTFmZ").then(trait => {
- let traitItem = trait.toObject()
- traitItem.system.specification.value = 2
- this.actor.createEmbeddedDocuments("Item", [traitItem], {fromEffect: this.effect.id})
- })
- this.script.scriptMessage(`
${this.actor.prototypeToken.name} bénéficie du Trait Résistance à la Magie. Cet effet dure 1 heure.
`, {whisper: ChatMessage.getWhisperRecipients("GM"), blind: true })
-}
-
-if (hasMagicResistance) {
- // Multiple doses may be consumed at once, with each one adding an additional 1 to the Magic Resistance rating and increasing the duration by one hour.
- let msg = `
${this.actor.prototypeToken.name} a amélioré sa Résistance à la Magie de 1 pour atteindre ${parseInt(hasMagicResistance.system.specification.value)}. Cette effte dure 1 heure.
`
-
- // Resist toxic effect
- this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {
- fields: {difficulty: "challenging"}
- }).then(async test => {
- await test.roll()
-
- // If they fail ...
- if (!test.succeeded) {
- msg += `
Cependant, il commence à suinter la bave épaisse et venimeuse qui recouvre chaque Dreadmaw. Il reçoit 1 état Empoisonné et doit continuer à recevoir 1 état @Condition[Empoisonné] andà la fin de chaque round.
-
Si le personnage est toujours vivant à la fin de 10 rounds, les effets cessent et tout les états Empoisonnés dues à ${this.effect.name} sont supprimés.
`
- this.actor.addCondition("poisoned", 1)
- }
- this.script.scriptMessage(msg, {whisper: ChatMessage.getWhisperRecipients("GM"), blind: true })
- })
-}
diff --git a/scripts/PMNjdEAusVBfam09.js b/scripts/PMNjdEAusVBfam09.js
deleted file mode 100644
index 0132270..0000000
--- a/scripts/PMNjdEAusVBfam09.js
+++ /dev/null
@@ -1 +0,0 @@
-return args.skill?.name === game.i18n.localize("NAME.Charm");
\ No newline at end of file
diff --git a/scripts/PVjaKAHTKDA0rA9J.js b/scripts/PVjaKAHTKDA0rA9J.js
deleted file mode 100644
index 3406d92..0000000
--- a/scripts/PVjaKAHTKDA0rA9J.js
+++ /dev/null
@@ -1,2 +0,0 @@
-let test = await this.actor.setupSkill("Esquive", {skipTargets: true, appendTitle : ` - ${this.effect.name}`});
-await test.roll();
\ No newline at end of file
diff --git a/scripts/PdClojv7yNgQpOUc.js b/scripts/PdClojv7yNgQpOUc.js
deleted file mode 100644
index 071f833..0000000
--- a/scripts/PdClojv7yNgQpOUc.js
+++ /dev/null
@@ -1 +0,0 @@
-return args.skill?.name != game.i18n.localize("NAME.Endurance");
\ No newline at end of file
diff --git a/scripts/PeZYj8b0vedyJj00.js b/scripts/PeZYj8b0vedyJj00.js
index 1cb5a36..10c3a49 100644
--- a/scripts/PeZYj8b0vedyJj00.js
+++ b/scripts/PeZYj8b0vedyJj00.js
@@ -1,12 +1,12 @@
// This script needs to be separate because equipTransfer is off on the other effect, and thus won't execute when added to an actor
let mainEffect = this.item.effects.contents[0];
-if (mainEffect.name.includes("(Lore)"))
+if (mainEffect.name.includes("(Savoir)"))
{
- let choice = await ItemDialog.create(ItemDialog.objectToArray(game.wfrp4e.config.magicLores, this.item.img), 1, "Choisissez le Savoir");
+ let choice = await ItemDialog.create(ItemDialog.objectToArray(game.wfrp4e.config.magicLores, this.item.img), 1, "Choisir Lore");
if (choice.length)
{
- mainEffect.update({name : mainEffect.name.replace("Lore", choice[0].name)})
+ mainEffect.update({name : mainEffect.name.replace("Savoir", choice[0].name)})
this.item.update({name : this.item.name += ` (${choice[0].name})`})
}
}
diff --git a/scripts/Ph3TdQw1lGiFr049.js b/scripts/Ph3TdQw1lGiFr049.js
index a75ea45..c370175 100644
--- a/scripts/Ph3TdQw1lGiFr049.js
+++ b/scripts/Ph3TdQw1lGiFr049.js
@@ -5,9 +5,9 @@
["Langue (Magick)", "Esquive"].includes(args.test.item?.name))
{
args.test.context.phantasmal = true; // Flag so items aren't readded if test is edited
- let text = `${this.effect.name}: Ajout de Instable et Protection`
+ let text = `${this.effect.name}: Adding Unstable and Ward`
args.test.result.other.push(text)
- this.script.scriptNotification(text);
+ this.script.notification(text);
let ward = await fromUuid("Compendium.wfrp4e-core.items.Bvd2aZ0gQUXHfCTh")
let wardData = ward.toObject();
diff --git a/scripts/PjOi61gB2nSYooLs.js b/scripts/PjOi61gB2nSYooLs.js
new file mode 100644
index 0000000..27d6865
--- /dev/null
+++ b/scripts/PjOi61gB2nSYooLs.js
@@ -0,0 +1 @@
+return this.sourceActor.uuid === this.actor.uuid || !args.item?.system?.isProjectiles;
\ No newline at end of file
diff --git a/scripts/PmELrzD3RmF9qKkO.js b/scripts/PmELrzD3RmF9qKkO.js
index d102bed..32d02d0 100644
--- a/scripts/PmELrzD3RmF9qKkO.js
+++ b/scripts/PmELrzD3RmF9qKkO.js
@@ -1,9 +1,14 @@
-if (this.item.system.specification.value == "Size")
+if (this.item.system.specification.value == "Taille")
{
- let choice = await ItemDialog.create(ItemDialog.objectToArray(game.wfrp4e.config.actorSizes, this.item.img), 1, "Choisissez Size");
- if (choice[0])
+ let size = this.item.specifier;
+ if (!size)
{
- this.item.updateSource({"system.specification.value" : choice[0].name})
- this.effect.updateSource({name : this.effect.name + ` (${choice[0].name})`})
+ let choice = await ItemDialog.create(ItemDialog.objectToArray(game.wfrp4e.config.actorTailles, this.item.img), 1, "Choisir Taille");
+ if (choice[0])
+ {
+ size = choice[0]?.name;
+ }
}
+ this.item.updateSource({"system.specification.value" : size, name : this.item.baseName})
+ this.effect.updateSource({name : this.effect.name + ` (${size})`})
}
\ No newline at end of file
diff --git a/scripts/Pn5fekTbkwlr61XU.js b/scripts/Pn5fekTbkwlr61XU.js
index c28f434..eeaf8b9 100644
--- a/scripts/Pn5fekTbkwlr61XU.js
+++ b/scripts/Pn5fekTbkwlr61XU.js
@@ -1,5 +1,5 @@
-const repaired_message = `
Réparation finie ${this.item.name}.
`;
-const test = 'Trade (Engineer)';
+const repaired_message = `
Réparation terminée ${this.item.name}.
`;
+const Test = 'Métier (Ingénieur)';
const difficulty = 'easy';
const target = 10;
@@ -12,8 +12,8 @@ const extendedTestData = {
current: 0,
target: target
},
- test: {
- value: test
+ Test: {
+ value: Test
},
completion: {
value: "remove"
@@ -24,7 +24,7 @@ const extendedTestData = {
},
effects: [
{
- name: `Réparer ${this.item.name}`,
+ name: `Réparation de ${this.item.name}`,
img: this.item.img,
system: {
transferData : {
diff --git a/scripts/PoNnT5EqvLj2r5yf.js b/scripts/PoNnT5EqvLj2r5yf.js
deleted file mode 100644
index af693bc..0000000
--- a/scripts/PoNnT5EqvLj2r5yf.js
+++ /dev/null
@@ -1 +0,0 @@
-return args.skill?.name != game.i18n.localize("NAME.OutdoorSurvival") && args.skill?.name != game.i18n.localize("NAME.Track");
\ No newline at end of file
diff --git a/scripts/PsO7aTdELJt35eHP.js b/scripts/PsO7aTdELJt35eHP.js
index 08dcbea..42aff4d 100644
--- a/scripts/PsO7aTdELJt35eHP.js
+++ b/scripts/PsO7aTdELJt35eHP.js
@@ -1,5 +1,5 @@
-let morale = await new Roll("-1d10").roll();
-let mood = await new Roll("-2d10").roll();
+let morale = await new Roll("-1d10").roll({allowInteractive : false});
+let mood = await new Roll("-2d10").roll({allowInteractive : false});
morale.toMessage(this.script.getChatData({flavor : "Morale"}));
mood.toMessage(this.script.getChatData({flavor : "Manann's Mood"}));
diff --git a/scripts/Puv2wLrSVe6b1jLf.js b/scripts/Puv2wLrSVe6b1jLf.js
new file mode 100644
index 0000000..8c79985
--- /dev/null
+++ b/scripts/Puv2wLrSVe6b1jLf.js
@@ -0,0 +1,4 @@
+if (args.sizeDiff < 0 ) {
+ args.damage += 3
+ args.breakdown.other.push({label : this.effect.name, value : 3});
+}
\ No newline at end of file
diff --git a/scripts/PwqTmw7rsG8hzqCS.js b/scripts/PwqTmw7rsG8hzqCS.js
index a4d2b43..5550255 100644
--- a/scripts/PwqTmw7rsG8hzqCS.js
+++ b/scripts/PwqTmw7rsG8hzqCS.js
@@ -3,7 +3,7 @@ if (args.test.result.critical && args.test.result.roll % 10 == 0)
game.wfrp4e.tables.findTable("knuckleduster-diseases").roll().then(roll => {
let results = roll.results[0]
- this.script.scriptMessage(`${this.actor.name} subit @UUID[Compendium.${results.documentCollection}.${results.documentId}]{${results.text}}`, {blind : true, whisper: ChatMessage.getWhisperRecipients("GM") })
+ this.script.message(`${this.actor.name} contracts @UUID[Compendium.${results.documentCollection}.${results.documentId}]{${results.text}}`, {blind : true, whisper: ChatMessage.getWhisperRecipients("GM") })
})
}
diff --git a/scripts/Q1trEhtqjIiDvFPF.js b/scripts/Q1trEhtqjIiDvFPF.js
index edff223..b774017 100644
--- a/scripts/Q1trEhtqjIiDvFPF.js
+++ b/scripts/Q1trEhtqjIiDvFPF.js
@@ -1 +1 @@
-args.prefillModifiers.modifier -= 10 * getProperty(this.effect, 'flags.wfrp4e.value')
\ No newline at end of file
+args.prefillModifiers.modifier -= 10 * this.effect.system.condition.value
\ No newline at end of file
diff --git a/scripts/Q4EQgP4gZR8TTm7S.js b/scripts/Q4EQgP4gZR8TTm7S.js
deleted file mode 100644
index b38c7fa..0000000
--- a/scripts/Q4EQgP4gZR8TTm7S.js
+++ /dev/null
@@ -1,9 +0,0 @@
-let penalty = 0
-if (args.item?.system.attackType)
-{
- penalty -= 30
-}
-if (args.actor.has("Seconde Vue", "talent"))
- penalty += 10
-
-args.prefillModifiers.modifier += penalty
\ No newline at end of file
diff --git a/scripts/Q5gh5Y9dCdclcwsD.js b/scripts/Q5gh5Y9dCdclcwsD.js
deleted file mode 100644
index 50f5352..0000000
--- a/scripts/Q5gh5Y9dCdclcwsD.js
+++ /dev/null
@@ -1 +0,0 @@
-return !args.skill?.name.includes(game.i18n.localize("NAME.Channelling")) && args.skill?.name != `${game.i18n.localize("NAME.Language")} (${game.i18n.localize("SPEC.Magick")})`
\ No newline at end of file
diff --git a/scripts/Q68WiUWY7GxiXBbT.js b/scripts/Q68WiUWY7GxiXBbT.js
index 9883f8c..7eb5c8a 100644
--- a/scripts/Q68WiUWY7GxiXBbT.js
+++ b/scripts/Q68WiUWY7GxiXBbT.js
@@ -1,5 +1,5 @@
let item = await fromUuid("Compendium.wfrp4e-core.items.9GNpAqgsKzxZKJpp")
let data = item.toObject();
-data.system.specification.value = "Lorsque seul";
+data.system.specification.value = "Lorsque Seul";
data.effects[0].disabled = true;
this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id})
\ No newline at end of file
diff --git a/scripts/Q7eULXQ9AfDRmUGO.js b/scripts/Q7eULXQ9AfDRmUGO.js
index cc6f75f..1c48862 100644
--- a/scripts/Q7eULXQ9AfDRmUGO.js
+++ b/scripts/Q7eULXQ9AfDRmUGO.js
@@ -1,5 +1,5 @@
-const repaired_message = `
Réparation finie ${this.item.name}.
`;
-const test = 'Trade (Carpenter)';
+const repaired_message = `
Réparation terminée ${this.item.name}.
`;
+const Test = 'Métier (Charpentier)';
const difficulty = 'difficult';
const target = 40;
@@ -12,8 +12,8 @@ const extendedTestData = {
current: 0,
target: target
},
- test: {
- value: test
+ Test: {
+ value: Test
},
completion: {
value: "remove"
@@ -24,7 +24,7 @@ const extendedTestData = {
},
effects: [
{
- name: `Réparer ${this.item.name}`,
+ name: `Réparation de ${this.item.name}`,
img: this.item.img,
system: {
transferData : {
diff --git a/scripts/Q9EmlWmuDac83cJw.js b/scripts/Q9EmlWmuDac83cJw.js
deleted file mode 100644
index 65e9e2e..0000000
--- a/scripts/Q9EmlWmuDac83cJw.js
+++ /dev/null
@@ -1 +0,0 @@
-return args.skill?.name == game.i18n.localize("NAME.Climb") || args.skill?.name?.includes(game.i18n.localize("NAME.Stealth"));
\ No newline at end of file
diff --git a/scripts/QBBrzcSAe8QqE4WP.js b/scripts/QBBrzcSAe8QqE4WP.js
new file mode 100644
index 0000000..fccec42
--- /dev/null
+++ b/scripts/QBBrzcSAe8QqE4WP.js
@@ -0,0 +1,18 @@
+const SL = this.effect.sourceTest.result.SL;
+const damage = 8 + SL;
+
+await this.actor.applyBasicDamage(damage, {loc: "roll"});
+
+const test = await this.actor.setupSkill(game.i18n.localize("NAME.Résistance"), {
+ skipTargets: true,
+ appendTitle: ` - ${this.effect.name}`,
+ fields: {difficulty: "challenging"},
+ context: {
+ failure: `Reçoit 1 état @Condition[Ablaze].`
+ }
+})
+
+await test.roll();
+if (test.failed) {
+ await this.actor.addCondition("ablaze");
+}
\ No newline at end of file
diff --git a/scripts/QKt9ZYpVpznncfJ1.js b/scripts/QKt9ZYpVpznncfJ1.js
new file mode 100644
index 0000000..de3700d
--- /dev/null
+++ b/scripts/QKt9ZYpVpznncfJ1.js
@@ -0,0 +1,7 @@
+for(let key in this.item.system.AP)
+{
+ if (this.item.system.AP[key])
+ {
+ this.item.system.AP[key]++;
+ }
+}
\ No newline at end of file
diff --git a/scripts/QLBxcP85duX1Z7LX.js b/scripts/QLBxcP85duX1Z7LX.js
new file mode 100644
index 0000000..a733ac6
--- /dev/null
+++ b/scripts/QLBxcP85duX1Z7LX.js
@@ -0,0 +1,3 @@
+if (!args.item.actor?.has("Béni (Taal)", "talent")) return;
+
+args.item.system.AP.head = 3;
\ No newline at end of file
diff --git a/scripts/QLUaOkwuSPvBp7jU.js b/scripts/QLUaOkwuSPvBp7jU.js
new file mode 100644
index 0000000..56fe989
--- /dev/null
+++ b/scripts/QLUaOkwuSPvBp7jU.js
@@ -0,0 +1,2 @@
+this.script.scriptNotification("Impossible d'attaquer des cibles qui ne sont pas Empêtrée")
+args.abort = true;
\ No newline at end of file
diff --git a/scripts/QNxmImpLTou6WdMQ.js b/scripts/QNxmImpLTou6WdMQ.js
index ee0cb1b..05d0e54 100644
--- a/scripts/QNxmImpLTou6WdMQ.js
+++ b/scripts/QNxmImpLTou6WdMQ.js
@@ -1,3 +1,3 @@
let test = args.test
if (test.result.minormis || test.result.majormis || test.result.catastrophicmis)
- test.result.other.push("Peut faire un Test de Force Mentale Difficile (-10) pour éviter l'Incantation Imparfaite")
\ No newline at end of file
+ test.result.other.push("Possibilité de faire un test de FM Difficile (-10) pour prévenir la Maladresse")
\ No newline at end of file
diff --git a/scripts/QPVVDPcJ4Xi5FmQl.js b/scripts/QPVVDPcJ4Xi5FmQl.js
deleted file mode 100644
index 340975c..0000000
--- a/scripts/QPVVDPcJ4Xi5FmQl.js
+++ /dev/null
@@ -1,9 +0,0 @@
-if(this.actor.hasCondition("fatigued") && args.opposedTest.result.hitloc.value == "head" && (args.opposedTest.attackerTest.result.critical || args.actor.status.wounds.value - args.totalWoundLoss < 0))
-{
- let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), { fields: { difficulty: "average" }, skipTargets: true, appendTitle : ` - ${this.effect.name}`})
- await test.roll();
- if (test.failed)
- {
- this.actor.addCondition("unconscious")
- }
-}
\ No newline at end of file
diff --git a/scripts/QQ2gHThZHdO4yLLX.js b/scripts/QQ2gHThZHdO4yLLX.js
deleted file mode 100644
index abb25c3..0000000
--- a/scripts/QQ2gHThZHdO4yLLX.js
+++ /dev/null
@@ -1 +0,0 @@
-return args.skill?.name == game.i18n.localize("NAME.Swim");
\ No newline at end of file
diff --git a/scripts/QRSACifDrvojIXHB.js b/scripts/QRSACifDrvojIXHB.js
index e475e62..88476df 100644
--- a/scripts/QRSACifDrvojIXHB.js
+++ b/scripts/QRSACifDrvojIXHB.js
@@ -1,9 +1,9 @@
if (!this.actor.effects.find(e => e.isCondition))
{
- return this.script.scriptNotification("Aucun état sur cet Acteur")
+ return this.script.notification("Aucun état sur cet acteur")
}
-let choice = await ItemDialog.create(this.actor.effects.filter(i => i.isCondition), 1, "Choisissez un état")
+let choice = await ItemDialog.create(this.actor.effects.filter(i => i.isCondition), 1, "Choisir un état")
if (choice[0])
{
diff --git a/scripts/QfTBRGXVfwQSghmd.js b/scripts/QfTBRGXVfwQSghmd.js
deleted file mode 100644
index 733f235..0000000
--- a/scripts/QfTBRGXVfwQSghmd.js
+++ /dev/null
@@ -1,18 +0,0 @@
-fromUuid(this.effect.origin).then(caster => {
- if (caster) {
- if (actor.items.find(it => it.name == game.i18n.localize("Bestial"))) {
- let healed = caster.characteristics.wp.bonus
- let wounds = foundry.utils.duplicate(args.actor.status.wounds)
- wounds.value += healed
-
- if (wounds.value > wounds.max)
- wounds.value = wounds.max
-
- args.actor.update({ "system.status.wounds": wounds })
- ChatMessage.create({ content: `${this.actor.prototypeToken.name} regagne ${healed} Blessures`, speaker: { alias: this.effect.name } })
- } else {
- ui.notifications.warn("L'Acteur ciblé n'a pas le Trait Bestial")
- }
- }
-})
-
diff --git a/scripts/Qgn92fZyc3Psn8QJ.js b/scripts/Qgn92fZyc3Psn8QJ.js
index 315a269..83938de 100644
--- a/scripts/Qgn92fZyc3Psn8QJ.js
+++ b/scripts/Qgn92fZyc3Psn8QJ.js
@@ -1,11 +1,14 @@
-if (args.test.options.useOnesAttractive && (args.test.result.roll <= game.settings.get("wfrp4e", "automaticSuccess") || args.test.result.roll <= args.test.target))
-{
+if (args.test.options.useOnesAttractive && (args.test.result.roll <= game.settings.get("wfrp4e", "automaticSuccess") || args.test.result.roll <= args.test.target)) {
-let SL = Math.floor(args.test.target / 10) - Math.floor(args.test.result.roll / 10)
-let ones = Number(args.test.result.roll.toString().split("").pop())
+ let SL = Math.floor(args.test.target / 10) - Math.floor(args.test.result.roll / 10)
+ let ones = Number(args.test.result.roll.toString().split("").pop())
-if (ones > SL) {
- args.test.data.result.SL = "+" + (ones + args.test.successBonus + args.test.slBonus)
- args.test.result.other.push(`${this.effect.name}: Utilise le dé d'unité comme DR`)
- }
+ if (ones == 0) {
+ ones = 10;
+ }
+
+ if (ones > SL) {
+ args.test.result.SL = "+" + (ones + args.test.successBonus + args.test.slBonus)
+ args.test.result.other.push(`${this.effect.name}: Unité du dé utilisée comme DR`)
+ }
}
\ No newline at end of file
diff --git a/scripts/Qk7t2l5ep9RDVpgE.js b/scripts/Qk7t2l5ep9RDVpgE.js
index 80de579..c97c82d 100644
--- a/scripts/Qk7t2l5ep9RDVpgE.js
+++ b/scripts/Qk7t2l5ep9RDVpgE.js
@@ -1 +1 @@
-args.options.diceman= true;
\ No newline at end of file
+args.context.diceman= true;
\ No newline at end of file
diff --git a/scripts/QoEOxRruQXYrZrv3.js b/scripts/QoEOxRruQXYrZrv3.js
index 1d570a2..9dacf2e 100644
--- a/scripts/QoEOxRruQXYrZrv3.js
+++ b/scripts/QoEOxRruQXYrZrv3.js
@@ -10,7 +10,7 @@ let filters = [
}
]
-let items = await ItemDialog.createFromFilters(filters, 2, "Choisissez 2 Skills to add +20")
+let items = await ItemDialog.createFromFilters(filters, 2, {text: "Choisissez 2 Compétences pour ajouter +20"})
items = items.map(i => i.toObject())
items.forEach(i => i.system.advances.value = 20)
diff --git a/scripts/QqybHxNCzPEzG1Qh.js b/scripts/QqybHxNCzPEzG1Qh.js
index 05952e9..e895caa 100644
--- a/scripts/QqybHxNCzPEzG1Qh.js
+++ b/scripts/QqybHxNCzPEzG1Qh.js
@@ -1 +1 @@
-return args.fields.dualWielding || args.options.dualWieldOffhand
\ No newline at end of file
+return args.context.dualWieldOffhand
\ No newline at end of file
diff --git a/scripts/QwHoqu2oO8QO8Mad.js b/scripts/QwHoqu2oO8QO8Mad.js
index 084a8f6..58f453c 100644
--- a/scripts/QwHoqu2oO8QO8Mad.js
+++ b/scripts/QwHoqu2oO8QO8Mad.js
@@ -1,3 +1,3 @@
-let content = `${this.effect.name}: Toute les cibles au contact abec ${this.actor.prototypeToken.name} subissent [[/r 1d10]] dégats, modifiés par le BE et les PA.`
+let content = `${this.effect.name}: All targets engaged with ${this.actor.prototypeToken.name} take [[/r 1d10]] Damage, modified by TB and AP.`
-this.script.scriptMessage(content)
\ No newline at end of file
+this.script.message(content)
\ No newline at end of file
diff --git a/scripts/R32U01LBjBrK1pns.js b/scripts/R32U01LBjBrK1pns.js
index dfbffe7..9877ef5 100644
--- a/scripts/R32U01LBjBrK1pns.js
+++ b/scripts/R32U01LBjBrK1pns.js
@@ -1,11 +1,11 @@
const templateMap = {
'P2e7Yx98bK3u110a' : "",
- 'iuMp3KLaMT2WCmie' : "Xp4r2KUhqfjak8zq",
- 'RBuYcT5tppwcmnC5' : "wYN19h3WVF1yOVq2",
- 'vcGpNwNbhvfzVveQ' : "ac5ClOuaYtzOYyWp",
- 'jmhKZy0w9TzkEK9c' : "IS3LTdTuay6uRHUq",
- '9Byj6k7SmdTYis2V' : "LjMlx99gBGeRJUQu",
- 'laJwc2l9tzJPgaaJ' : "x5wpMprsObuqMCYg",
+ 'iuMp3KLaMT2WCmie' : "4s01nHFKVKTEZd3B",
+ 'RBuYcT5tppwcmnC5' : "h3yuJDWnixliXeBG",
+ 'vcGpNwNbhvfzVveQ' : "7QrsbofccMOE1YsF",
+ 'jmhKZy0w9TzkEK9c' : "scVTPVyDDbli4WZL",
+ '9Byj6k7SmdTYis2V' : "4Cd7Dknee2WjReOo",
+ 'laJwc2l9tzJPgaaJ' : "2hJ2a5YjbwZWWYrd",
}
let template = (await game.wfrp4e.tables.rollTable("hireling-templates", {hideDSN: true})).object;
let physicalQuirk = (await game.wfrp4e.tables.rollTable("physical-quirks", {hideDSN: true})).text;
@@ -15,14 +15,14 @@
let templateItem = await warhammer.utility.findItemId(templateMap[template._id]);
- let bio =
+ let bio =
`
Template: ${template.text}
-
Trait physique: ${physicalQuirk}
-
Ethique: ${workEthic}
-
Trait de personnalité: ${personalityQuirk}
+
Particularité physique: ${physicalQuirk}
+
Éthique de travail: ${workEthic}
+
Particularité de personnalité: ${personalityQuirk}
`
-
+
this.script.message(bio, {whisper : ChatMessage.getWhisperRecipients("GM")})
await this.actor.update({"system.details.gmnotes.value" : bio})
diff --git a/scripts/R3OfRdi6xv0e9mzB.js b/scripts/R3OfRdi6xv0e9mzB.js
new file mode 100644
index 0000000..e1f7a88
--- /dev/null
+++ b/scripts/R3OfRdi6xv0e9mzB.js
@@ -0,0 +1 @@
+return args.item.name.includes("Arme")
\ No newline at end of file
diff --git a/scripts/R6SnyF3y4Vsq6oga.js b/scripts/R6SnyF3y4Vsq6oga.js
index e978a64..9cb3f07 100644
--- a/scripts/R6SnyF3y4Vsq6oga.js
+++ b/scripts/R6SnyF3y4Vsq6oga.js
@@ -1,9 +1,8 @@
let lore = this.effect.name.split("(")[1].split(")")[0].toLowerCase();
-let spellLore = game.wfrp4e.config.magicLores[args.spell.system.lore.value].toLowerCase();
// If channelling corresponding lore
-if (args.type == "channelling" && spellLore == lore)
+if (args.type == "channelling" && args.spell.system.lore.value == lore)
args.prefillModifiers.slBonus += 1
// If channelling or casting different lore
-else if (spellLore != lore && args.spell.system.lore.value != "petty")
+else if (args.spell.system.lore.value != lore && args.spell.system.lore.value != "petty")
args.prefillModifiers.slBonus -= 1
\ No newline at end of file
diff --git a/scripts/R8FBHZaaARA3z9pB.js b/scripts/R8FBHZaaARA3z9pB.js
index 4e91175..ff7ba87 100644
--- a/scripts/R8FBHZaaARA3z9pB.js
+++ b/scripts/R8FBHZaaARA3z9pB.js
@@ -1,5 +1,5 @@
-const repaired_message = `
Réparation finie ${this.item.name}.
`;
-const test = 'Trade (Carpenter)';
+const repaired_message = `
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 })
-}
\ No newline at end of file
diff --git a/scripts/g0SzfsLyW7aD2F19.js b/scripts/g0SzfsLyW7aD2F19.js
index b68d019..2d23b8c 100644
--- a/scripts/g0SzfsLyW7aD2F19.js
+++ b/scripts/g0SzfsLyW7aD2F19.js
@@ -1,4 +1,4 @@
-if (this.item.system.tests.value.includes("(Social Group)"))
+if (this.item.system.tests.value.includes("(Groupe social)"))
{
let tests = this.item.system.tests.value
let name = this.item.name
@@ -11,11 +11,11 @@ if (this.item.system.tests.value.includes("(Social Group)"))
}
else
{
- let value = await ValueDialog.create({text : "Enter Etiquette Group", title : this.effect.name});
+ let value = await ValueDialog.create({text : "Entrez le Groupe d'Étiquette", title : this.effet.name});
if (value)
{
name = `${name.split("(")[0].trim()} (${value})`
- tests = this.item.system.tests.value.replace("Social Group", value);
+ tests = this.item.system.tests.value.replace("Groupe social", value);
}
}
this.item.updateSource({name, "system.tests.value" : tests})
diff --git a/scripts/g1L8OYO9nCOhdKGL.js b/scripts/g1L8OYO9nCOhdKGL.js
index 94085c1..299f9d3 100644
--- a/scripts/g1L8OYO9nCOhdKGL.js
+++ b/scripts/g1L8OYO9nCOhdKGL.js
@@ -6,7 +6,7 @@ let damage = (await new Roll(`1d10 + ${parseInt(this.effect.sourceTest.result.SL
await damage.toMessage(this.script.getChatData())
-this.script.scriptMessage(await args.actor.applyBasicDamage(
+this.script.message(await args.actor.applyBasicDamage(
damage.total,
{damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_AP, suppressMsg: true}
))
diff --git a/scripts/g4t56A09yrpZaJQ2.js b/scripts/g4t56A09yrpZaJQ2.js
index 747721d..3bb9308 100644
--- a/scripts/g4t56A09yrpZaJQ2.js
+++ b/scripts/g4t56A09yrpZaJQ2.js
@@ -1,11 +1,11 @@
let amberTalons = foundry.utils.deepClone(game.wfrp4e.config.systemItems.unarmed);
- amberTalons.name = "Amber Talons";
- amberTalons.img = this.effect.img;
+ amberTalons.name = "Serres d'ambre";
+ amberTalons.img = this.effet.img;
amberTalons.system.damage.value = "SB + WPB"
amberTalons.system.equipped = true;
amberTalons.system.qualities.value.push({name : "magical"})
amberTalons.effects.push({
- name : "Amber Talons",
+ name : "Serres d'ambre",
transfer: false,
img : "modules/wfrp4e-core/icons/spells/amber-talons.png" ,
system: {
diff --git a/scripts/g5y0tdoHCDs7cBy7.js b/scripts/g5y0tdoHCDs7cBy7.js
new file mode 100644
index 0000000..ecf4d34
--- /dev/null
+++ b/scripts/g5y0tdoHCDs7cBy7.js
@@ -0,0 +1,3 @@
+return !["NAME.Résistance", "NAME.Cool"].map(i => game.i18n.localize(i)).includes(args.skill?.name)
+ || !this.actor.sameSideAs(this.effect.sourceActor)
+ || this.actor.system.details.status.tier !== "b"
\ No newline at end of file
diff --git a/scripts/gFUXBbTskQBKjxqm.js b/scripts/gFUXBbTskQBKjxqm.js
deleted file mode 100644
index e8f675a..0000000
--- a/scripts/gFUXBbTskQBKjxqm.js
+++ /dev/null
@@ -1,8 +0,0 @@
-if (this.actor.hasCondition("entangled"))
-{
- this.actor.setupSkill(game.i18n.localize("NAME.Cool"), {fields : {difficulty : "average"}}).then(async test => {
- await test.roll();
- if (test.failed)
- this.actor.addCondition("fatigued")
- })
-}
\ No newline at end of file
diff --git a/scripts/gKIPujyuFSn0No9v.js b/scripts/gKIPujyuFSn0No9v.js
index 977eee5..6c19af8 100644
--- a/scripts/gKIPujyuFSn0No9v.js
+++ b/scripts/gKIPujyuFSn0No9v.js
@@ -2,4 +2,4 @@ for(let e of this.item.effects.contents)
{
e.update({disabled: false})
}
-this.script.scriptNotification("Ré-initialiser les pouvoirs")
\ No newline at end of file
+this.script.notification("Reset Powers")
\ No newline at end of file
diff --git a/scripts/gKPL3t4vlZAsvtGr.js b/scripts/gKPL3t4vlZAsvtGr.js
deleted file mode 100644
index 6e060db..0000000
--- a/scripts/gKPL3t4vlZAsvtGr.js
+++ /dev/null
@@ -1 +0,0 @@
-return args.skill?.name == "Discrétion (Souterrains)"
\ No newline at end of file
diff --git a/scripts/gMIenSmLklAkB2Zm.js b/scripts/gMIenSmLklAkB2Zm.js
index b16a793..03e7403 100644
--- a/scripts/gMIenSmLklAkB2Zm.js
+++ b/scripts/gMIenSmLklAkB2Zm.js
@@ -1,6 +1,6 @@
if (isNaN(parseInt(this.item.system.specification.value)))
{
- let value = await ValueDialog.create({text : "Enter Venom Strength", title : this.effect.name}, "", Object.values(game.wfrp4e.config.difficultyNames));
+ let value = await ValueDialog.create({text : "Entrez la Force du Venin", title : this.effect.name}, "", Object.values(game.wfrp4e.config.difficultyNames));
if (value)
{
this.item.updateSource({"system.specification.value" : value});
diff --git a/scripts/gPQrszvIgGlW9yM4.js b/scripts/gPQrszvIgGlW9yM4.js
index 61a3f69..15fbd6e 100644
--- a/scripts/gPQrszvIgGlW9yM4.js
+++ b/scripts/gPQrszvIgGlW9yM4.js
@@ -1,2 +1,2 @@
if (args.test.characteristicKey == "wp")
- args.test.preData.canReverse = true
\ No newline at end of file
+ args.Test.preData.reversal = {allowed: true, if: "better"};
\ No newline at end of file
diff --git a/scripts/gQJJaxbN83KSgi36.js b/scripts/gQJJaxbN83KSgi36.js
new file mode 100644
index 0000000..c97ab60
--- /dev/null
+++ b/scripts/gQJJaxbN83KSgi36.js
@@ -0,0 +1,6 @@
+if (!args.totalWoundLoss) return
+
+const roll = await new Roll("2d10").roll();
+roll.toMessage(this.script.getChatData());
+
+args.attacker.applyBasicDamage(Number(roll.total), { loc: "roll" })
\ No newline at end of file
diff --git a/scripts/gSDhsSB8573joL64.js b/scripts/gSDhsSB8573joL64.js
new file mode 100644
index 0000000..443500a
--- /dev/null
+++ b/scripts/gSDhsSB8573joL64.js
@@ -0,0 +1,10 @@
+if (args.equipped) {
+ const spell = await game.wfrp4e.utility.findItem("Vindictive Glare", "spell");
+ const skillUUID = "Compendium.wfrp4e-core.items.Item.e3McIND4Rrsn5cE6";
+
+ await this.actor.addEffectItems([skillUUID, spell.uuid], this.effect, [{
+ "system.advances.value": 75 - this.actor.system.characteristics.int.value
+}, {}]);
+} else {
+ this.effect.deleteCreatedItems();
+}
\ No newline at end of file
diff --git a/scripts/ga6bQzPuoIiQQrKg.js b/scripts/ga6bQzPuoIiQQrKg.js
index 2d3c447..c1ee6aa 100644
--- a/scripts/ga6bQzPuoIiQQrKg.js
+++ b/scripts/ga6bQzPuoIiQQrKg.js
@@ -1,7 +1,7 @@
if (args.totalWoundLoss > 0)
{
- let test = await args.actor.setupCharacteristic("t", {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields : {difficulty : "hard"}})
+ let test = await args.actor.setupCharacteristic("t", {skipTargets: true, appendTitle : ` - ${this.effet.name}`, fields : {difficulty : "hard"}})
await test.roll()
if (test.failed)
{
diff --git a/scripts/gnVpxOeBZpNF4HIF.js b/scripts/gnVpxOeBZpNF4HIF.js
deleted file mode 100644
index ea6a793..0000000
--- a/scripts/gnVpxOeBZpNF4HIF.js
+++ /dev/null
@@ -1,4 +0,0 @@
-if (args.test.result.roll.toString().includes("9") || args.test.result.roll.toString().includes("8"))
-{
- args.test.result.fumble = game.i18n.localize("Fumble")
-}
\ No newline at end of file
diff --git a/scripts/goz8yTlMozlsz3uY.js b/scripts/goz8yTlMozlsz3uY.js
index a10b559..fce8acc 100644
--- a/scripts/goz8yTlMozlsz3uY.js
+++ b/scripts/goz8yTlMozlsz3uY.js
@@ -1,5 +1,5 @@
-const repaired_message = `
Réparation finie ${this.item.name}.
`;
-const test = 'Strength';
+const repaired_message = `
${speaker.alias} a écrasé ${target.name}. Le bateau se brise, réduit à un amas d'épaves.
\`);
+ await effet.delete();
`,
trigger: "deleteEffect"
}
diff --git a/scripts/gu72JaTs9GrSiVTd.js b/scripts/gu72JaTs9GrSiVTd.js
deleted file mode 100644
index 8d0ad0f..0000000
--- a/scripts/gu72JaTs9GrSiVTd.js
+++ /dev/null
@@ -1 +0,0 @@
-return !(args.skill?.name == game.i18n.localize("NAME.Haggle") || args.skill?.name == game.i18n.localize("NAME.Gossip"))
\ No newline at end of file
diff --git a/scripts/gull3qgCahzk2xYu.js b/scripts/gull3qgCahzk2xYu.js
new file mode 100644
index 0000000..e3d3869
--- /dev/null
+++ b/scripts/gull3qgCahzk2xYu.js
@@ -0,0 +1,10 @@
+this.actor.addCondition("fatigued", parseInt(this.effect.sourceTest.result.SL))
+
+let test = await this.actor.setupSkill("Calme", {fields : {difficulty: "challenging"}, appendTitle : ` - ${this.effect.name}`});
+
+await test.roll();
+
+if (test.failed)
+{
+ this.actor.addCondition("broken");
+}
\ No newline at end of file
diff --git a/scripts/h0DfPwUUOBjyAHMZ.js b/scripts/h0DfPwUUOBjyAHMZ.js
deleted file mode 100644
index 124ecc4..0000000
--- a/scripts/h0DfPwUUOBjyAHMZ.js
+++ /dev/null
@@ -1 +0,0 @@
-return args.skill?.name != game.i18n.localize("NAME.Perception");
\ No newline at end of file
diff --git a/scripts/h1XKoMuVnS0bagRO.js b/scripts/h1XKoMuVnS0bagRO.js
deleted file mode 100644
index 6b18992..0000000
--- a/scripts/h1XKoMuVnS0bagRO.js
+++ /dev/null
@@ -1 +0,0 @@
-return args.item?.name != game.i18n.localize("NAME.Endurance");
\ No newline at end of file
diff --git a/scripts/h4lnexDYAhyQuiR5.js b/scripts/h4lnexDYAhyQuiR5.js
new file mode 100644
index 0000000..cefee48
--- /dev/null
+++ b/scripts/h4lnexDYAhyQuiR5.js
@@ -0,0 +1,9 @@
+if (args.test.isCritical && args.test.weapon.properties?.qualities?.impale) {
+ let targets = args.test.targets.filter(t => t.system.details.move.value > 1);
+ if (targets.length > 0) {
+ targets.forEach(target => {
+ target.applyEffect({effectData : [this.item.effects.contents[1].convertToApplied()]})
+ });
+ args.test.result.other.push (`${this.effect.name}: Target Move Reduced by 1`)
+ }
+}
\ No newline at end of file
diff --git a/scripts/h766UvswLCsxcMow.js b/scripts/h766UvswLCsxcMow.js
index 76dbbae..be93438 100644
--- a/scripts/h766UvswLCsxcMow.js
+++ b/scripts/h766UvswLCsxcMow.js
@@ -10,10 +10,10 @@ let characteristics = {
"wp" : 10,
"fel" : 10
}
-let skills = ["Charm", "Intimidate", "Melee (Basic)"]
+let skills = ["Charme", "Intimidation", "Mêlée (Base)"]
let skillAdvancements = [7, 60, 7]
-let talents = ["Menaçant", "Ombres"]
-let traits = ["Distracting"]
+let talents = ["Menaçant", "Discret"]
+let traits = ["Perturbant"]
let trappings = []
let items = [];
let spells = [];
@@ -32,7 +32,7 @@ for (let index = 0; index < skills.length; index++)
skillItem = updateObj.items.find(i => i.name == skill && i.type == "skill")
if (skillItem)
skillItem.system.advances.value += skillAdvancements[index]
- else
+ else
{
skillItem = await game.wfrp4e.utility.findSkill(skill)
skillItem = skillItem.toObject();
@@ -48,7 +48,7 @@ for (let talent of talents)
{
items.push(talentItem.toObject());
}
- else
+ else
{
ui.notifications.warn(`Impossible de trouver ${talent}`, {permanent : true})
}
@@ -74,17 +74,17 @@ for (let trait of traits)
if (Number.isNumeric(traitVal))
{
- traitItem.system.specification.value = traitName.includes('Weapon','Horns','Tail','Tentacles','Bite') ? traitVal - parseInt(characteristicValues[3]/10) : traitVal;
+ traitItem.system.specification.value = traitName.includes('Arme','Cornes','Tail','Tentacules','Morsure') ? traitVal - parseInt(characteristicValues[3]/10) : traitVal;
traitItem.name = (traitItem.name + ` ${traitSpec ? "("+ traitSpec + ")" : ""}`).trim()
}
- else
+ else
traitItem.system.specification.value = traitSpec
items.push(traitItem)
}
-for (let trapping of trappings)
+for (let trapping of trappings)
{
let trappingItem = await game.wfrp4e.utility.findItem(trapping)
if (trappingItem)
@@ -95,13 +95,13 @@ for (let trapping of trappings)
items.push(trappingItem);
}
- else
+ else
{
- ui.notifications.warn(`Impossible de trouver ${trapping}`, {permanent : true})
+ ui.notifications.warn(`Could not find ${trapping}`, {permanent : true})
}
}
-for (let spell of spells)
+for (let spell of spells)
{
let spellItem = await game.wfrp4e.utility.findItem(spell)
if (spellItem)
@@ -110,13 +110,13 @@ for (let spell of spells)
items.push(spellItem);
}
- else
+ else
{
- ui.notifications.warn(`Impossible de trouver ${spell}`, {permanent : true})
+ ui.notifications.warn(`Could not find ${spell}`, {permanent : true})
}
}
-updateObj.name = updateObj.name += " " + this.effect.name
+updateObj.name = updateObj.name += " " + this.effet.name
await this.actor.update(updateObj)
this.actor.createEmbeddedDocuments("Item", items);
\ No newline at end of file
diff --git a/scripts/h8JqPMh2mM2uhpxk.js b/scripts/h8JqPMh2mM2uhpxk.js
new file mode 100644
index 0000000..50dd52b
--- /dev/null
+++ b/scripts/h8JqPMh2mM2uhpxk.js
@@ -0,0 +1,11 @@
+if (args.item.system.tags.has("armour"))
+{
+
+for(let key in args.item.system.AP)
+{
+ if (args.item.system.AP[key])
+ {
+ args.item.system.AP[key] += 2;
+ }
+ }
+}
\ No newline at end of file
diff --git a/scripts/hA8PzeiCsHqqlUZm.js b/scripts/hA8PzeiCsHqqlUZm.js
index eadf74b..45e40eb 100644
--- a/scripts/hA8PzeiCsHqqlUZm.js
+++ b/scripts/hA8PzeiCsHqqlUZm.js
@@ -1,2 +1,2 @@
this.actor.createEmbeddedDocuments("ActiveEffect", [game.wfrp4e.config.symptomEffects["nausea"]])
-this.script.scriptMessage(`Gaine de @Condition[Nausée] pour [[1d10]] heures`, {whisper: ChatMessage.getWhisperRecipients("GM")})
\ No newline at end of file
+this.script.message(`Recoit l'état @Condition[Nausea] pour [[1d10]] heures`, {whisper: ChatMessage.getWhisperRecipients("GM")})
\ No newline at end of file
diff --git a/scripts/hCzxUyO6mjLNIpaM.js b/scripts/hCzxUyO6mjLNIpaM.js
index ec27fb5..3de325c 100644
--- a/scripts/hCzxUyO6mjLNIpaM.js
+++ b/scripts/hCzxUyO6mjLNIpaM.js
@@ -4,4 +4,4 @@ woundsGained = Math.floor(woundsGained / 2)
args.attacker.update({ "system.status.wounds.value": args.attacker.status.wounds.value + woundsGained })
-this.script.scriptMessage(`Récupération de ${woundsGained} Blessures`)
\ No newline at end of file
+this.script.message(`Gains ${woundsGained} Wounds`)
\ No newline at end of file
diff --git a/scripts/hDC6lroDEPVBituR.js b/scripts/hDC6lroDEPVBituR.js
deleted file mode 100644
index 712d884..0000000
--- a/scripts/hDC6lroDEPVBituR.js
+++ /dev/null
@@ -1,12 +0,0 @@
-let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`})
-await test.roll();
-
-if (test.failed)
-{
- this.actor.update({"system.status.corruption.value" : parseInt(this.actor.status.corruption.value) + 1})
- this.script.scriptMessage("Gagne un Point de Corruption", {whisper : ChatMessage.getWhisperRecipients("GM")})
- if (test.result.roll % 11 == 0 || test.result.roll == 100)
- {
- this.script.scriptMessage(`Echec total: gain immédiat de 1 @Table[mutatemental]{Mutation Mentale}, et ne peut plus prendre d'Ambition à court-terme pour les [[1d10]] prochaines weeks.`, {whisper : ChatMessage.getWhisperRecipients("GM")})
- }
-}
\ No newline at end of file
diff --git a/scripts/hEDuYAgc1O1zG3Rr.js b/scripts/hEDuYAgc1O1zG3Rr.js
new file mode 100644
index 0000000..05dfc8d
--- /dev/null
+++ b/scripts/hEDuYAgc1O1zG3Rr.js
@@ -0,0 +1 @@
+return args.targets[0].actor.appliedEffects.filter(e => e.name == game.i18n.localize("Flying")).length > 0
\ No newline at end of file
diff --git a/scripts/hL3JUSY3xMA4zj2Q.js b/scripts/hL3JUSY3xMA4zj2Q.js
new file mode 100644
index 0000000..0893281
--- /dev/null
+++ b/scripts/hL3JUSY3xMA4zj2Q.js
@@ -0,0 +1,18 @@
+if (this.sourceActor.uuid === this.actor.uuid) return;
+
+const test = await this.actor.setupCharacteristic("t", {
+ skipTargets: true,
+ appendTitle: ` — ${this.effet.name}`,
+ fields: {
+ difficulty: "difficult"
+ },
+ context: {
+ success: "Est capable de se relever !",
+ failure: "Est tombé à terre !",
+ }
+});
+
+await Test.roll();
+if (Test.failure) {
+ await this.actor.addCondition("prone");
+}
\ No newline at end of file
diff --git a/scripts/hO2CFW9hygGSYuJ2.js b/scripts/hO2CFW9hygGSYuJ2.js
new file mode 100644
index 0000000..4ece03c
--- /dev/null
+++ b/scripts/hO2CFW9hygGSYuJ2.js
@@ -0,0 +1 @@
+return args.target?.Species == this.effect.specifier;
\ No newline at end of file
diff --git a/scripts/hR1qD2kpFHF8JT8h.js b/scripts/hR1qD2kpFHF8JT8h.js
deleted file mode 100644
index 88e6c07..0000000
--- a/scripts/hR1qD2kpFHF8JT8h.js
+++ /dev/null
@@ -1 +0,0 @@
-return args.skill?.name == "Langue (Magick)"
\ No newline at end of file
diff --git a/scripts/hSImyYjL0CENTvXf.js b/scripts/hSImyYjL0CENTvXf.js
index e7f7433..d6813de 100644
--- a/scripts/hSImyYjL0CENTvXf.js
+++ b/scripts/hSImyYjL0CENTvXf.js
@@ -1,12 +1,12 @@
let test = await this.actor.setupSkill("Résistance", {fields : {difficulty : "difficult", appendTitle : ` - ${this.effect.name}`}});
-await test.roll();
-if (test.failed)
+await Test.roll();
+if (Test.Échoué)
{
await this.actor.addCondition("blinded");
}
let msg = ``
-let armour = args.actor.itemTypes.armour.filter(i => i.system.isMetal && i.system.isEquipped);
+let armour = args.actor.itemTags.armour.filter(i => i.system.isMetal && i.system.isEquipped);
for(let item of armour)
{
for(let key in item.system.AP)
@@ -15,9 +15,9 @@ for(let item of armour)
let damage = Math.floor(AP / 2);
await item.system.damageItem(damage, [key]);
}
- msg += `
${item.name} PA divisé par 2
`
+ msg += `
${item.name} PA réduit de moitié
`
}
if (msg)
{
- this.script.scriptMessage(msg, {speaker : {alias : args.actor.name}});
+ this.script.message(msg, {speaker : {alias : args.actor.name}});
}
\ No newline at end of file
diff --git a/scripts/hTsnYKgw0kK10PiC.js b/scripts/hTsnYKgw0kK10PiC.js
new file mode 100644
index 0000000..32b8e48
--- /dev/null
+++ b/scripts/hTsnYKgw0kK10PiC.js
@@ -0,0 +1 @@
+args.fields.modifier += 5
\ No newline at end of file
diff --git a/scripts/hYNWp75ggWSTht55.js b/scripts/hYNWp75ggWSTht55.js
index 0fc323a..ec4bf2b 100644
--- a/scripts/hYNWp75ggWSTht55.js
+++ b/scripts/hYNWp75ggWSTht55.js
@@ -1,7 +1,7 @@
if (args.test.result.hitloc.value != "head" && args.test.result.critical)
{
- game.wfrp4e.utility.sleep(200).then(() => {
- this.script.scriptMessage("Peut effectuer un jet sur the @Table[crithead]{Coups Critiques à la Tête} au lieu de la localisation normale")
+ warhammer.utility.sleep(200).then(() => {
+ this.script.message("Tirage possible sur la table @Table[crithead]{Coups critiques à la tête} au lieu de de la localisation normale.")
})
}
\ No newline at end of file
diff --git a/scripts/hadXFC43VKyrE9jC.js b/scripts/hadXFC43VKyrE9jC.js
new file mode 100644
index 0000000..540f250
--- /dev/null
+++ b/scripts/hadXFC43VKyrE9jC.js
@@ -0,0 +1 @@
+this.actor.addEffectItems(["Compendium.wfrp4e-core.items.Item.eowbsW6oHGSNJmxV", "Compendium.wfrp4e-core.items.Item.eowbsW6oHGSNJmxV"], this.effect);
\ No newline at end of file
diff --git a/scripts/93K85NnVwjVNXlZq.js b/scripts/hg89FU1NAp8tIsgO.js
similarity index 94%
rename from scripts/93K85NnVwjVNXlZq.js
rename to scripts/hg89FU1NAp8tIsgO.js
index 3b0ffe3..f1e37dc 100644
--- a/scripts/93K85NnVwjVNXlZq.js
+++ b/scripts/hg89FU1NAp8tIsgO.js
@@ -1 +1 @@
-return !args.skill?.name.includes(game.i18n.localize("NAME.Trade"));
\ No newline at end of file
+return !args.skill?.name.includes(game.i18n.localize("NAME.Trade"))
\ No newline at end of file
diff --git a/scripts/hhCs5VBKx50S5IsY.js b/scripts/hhCs5VBKx50S5IsY.js
index d3aa69e..11af677 100644
--- a/scripts/hhCs5VBKx50S5IsY.js
+++ b/scripts/hhCs5VBKx50S5IsY.js
@@ -1 +1 @@
-return !args.options.mutate
\ No newline at end of file
+return !args.context.mutate
\ No newline at end of file
diff --git a/scripts/hhv7PrRdlf9sfC82.js b/scripts/hhv7PrRdlf9sfC82.js
index 6b327bb..beea2d3 100644
--- a/scripts/hhv7PrRdlf9sfC82.js
+++ b/scripts/hhv7PrRdlf9sfC82.js
@@ -12,8 +12,8 @@ let characteristics = {
}
let skills = ["Calme", "Esquive"]
let skillAdvancements = [10, 10]
-let talents = ["Combat Reflexes"]
-let trappings = ["Leather Jack", "Leather Skullcap", "Leather Leggings", "Shield"]
+let talents = ["Réflexes de Combat"]
+let trappings = ["Veste en cuir", "Casque en cuir", "Jambières en cuir", "Bouclier"]
let items = []
let updateObj = this.actor.toObject();
@@ -30,7 +30,7 @@ for (let index = 0; index < skills.length; index++)
skillItem = updateObj.items.find(i => i.name == skill && i.type == "skill")
if (skillItem)
skillItem.system.advances.value += skillAdvancements[index]
- else
+ else
{
skillItem = await game.wfrp4e.utility.findSkill(skill)
skillItem = skillItem.toObject();
@@ -46,13 +46,13 @@ for (let talent of talents)
{
items.push(talentItem.toObject());
}
- else
+ else
{
ui.notifications.warn(`Impossible de trouver ${talent}`, {permanent : true})
}
}
-for (let trapping of trappings)
+for (let trapping of trappings)
{
let trappingItem = await game.wfrp4e.utility.findItem(trapping)
if (trappingItem)
@@ -63,7 +63,7 @@ for (let trapping of trappings)
items.push(trappingItem);
}
- else
+ else
{
ui.notifications.warn(`Impossible de trouver ${trapping}`, {permanent : true})
}
diff --git a/scripts/hlHKeFWrOA8CsLr9.js b/scripts/hlHKeFWrOA8CsLr9.js
index 25e12e8..764c272 100644
--- a/scripts/hlHKeFWrOA8CsLr9.js
+++ b/scripts/hlHKeFWrOA8CsLr9.js
@@ -1,2 +1,2 @@
-args.data.canReverse = true;
-args.options.pilot = true;
\ No newline at end of file
+args.data.reversal = {allowed : true, if: "success"};
+args.context.pilot = true;
\ No newline at end of file
diff --git a/scripts/hmk8zV1LTElHUI8A.js b/scripts/hmk8zV1LTElHUI8A.js
index f08d4c7..8aea6a1 100644
--- a/scripts/hmk8zV1LTElHUI8A.js
+++ b/scripts/hmk8zV1LTElHUI8A.js
@@ -1,8 +1,8 @@
-let msg = `${this.actor.prototypeToken.name} perd 1 Blessure. `
+let msg = `${this.actor.prototypeToken.name} loses 1 Wound. `
if (this.actor.status.wounds.value <= 1)
{
- msg += `${this.actor.prototypeToken.name} tombe Inconscient. `
+ msg += `${this.actor.prototypeToken.name} goes unconscious. `
await this.actor.addCondition("unconscious")
}
- this.script.scriptMessage(msg)
+ this.script.message(msg)
this.actor.modifyWounds(-1)
\ No newline at end of file
diff --git a/scripts/hnsmzvcuiUYB065I.js b/scripts/hnsmzvcuiUYB065I.js
deleted file mode 100644
index 2ee0284..0000000
--- a/scripts/hnsmzvcuiUYB065I.js
+++ /dev/null
@@ -1 +0,0 @@
-this.actor.setupSkill(game.i18n.localize("NAME.Cool"), {appendTitle: ` - ${this.effect.name}`, context: { failure : "Ne peut fuir les combats"}}).then(test => test.roll())
\ No newline at end of file
diff --git a/scripts/hpbraeEbjkXnmD75.js b/scripts/hpbraeEbjkXnmD75.js
new file mode 100644
index 0000000..244c578
--- /dev/null
+++ b/scripts/hpbraeEbjkXnmD75.js
@@ -0,0 +1,2 @@
+args.fields.hitLocation = "lLeg"
+args.fields.modifier += 20;
\ No newline at end of file
diff --git a/scripts/hpwJRAhCsXTp9bd9.js b/scripts/hpwJRAhCsXTp9bd9.js
index c9abff6..4be351c 100644
--- a/scripts/hpwJRAhCsXTp9bd9.js
+++ b/scripts/hpwJRAhCsXTp9bd9.js
@@ -1,7 +1,7 @@
let choice1 = [
{
type : "skill",
- name : "Melee (Basic)",
+ name : "Corps à corps (Base)",
diff : {
system : {
advances : {
@@ -14,7 +14,7 @@ let choice1 = [
let choice2 = [
{
type : "skill",
- name : "Melee (Polearm)",
+ name : "Corps à corps (Armes d'hast)",
diff : {
system : {
advances : {
@@ -28,7 +28,7 @@ let choice2 = [
let choice3 = [
{
type : "skill",
- name : "Melee (Two-Handed)",
+ name : "Corps à corps (A deux mains)",
diff : {
system : {
advances : {
@@ -39,45 +39,48 @@ let choice3 = [
}
]
-let choice = await Dialog.wait({
- title : "Choice",
- content :
+let choice = await foundry.applications.api.DialogV2.wait({
+ window : {title : "Choix"},
+ content :
`
- Select your choice
+ Sélectionnez votre choix
-
Melee (Basic)
-
Melee (Polearm)
-
Melee (Two-Handed)
-
+
Corps à corps (Base)
+
Corps à corps (Armes d'hast)
+
Corps à corps (A deux mains)
+
`,
- buttons : {
- 1 : {
- label : "Basic",
+ buttons : [
+ {
+ label : "Base",
+ action : "basic",
callback : () => {
return choice1
}
},
- 2 : {
- label : "Polearm",
+ {
+ label : "Armesd'hast",
+ action : "polearm",
callback : () => {
return choice2
}
},
- 3 : {
- label : "Two-Handed",
+ {
+ label : "A deux mains",
+ action : "two-handed",
callback : () => {
return choice3
}
}
- }
+ ]
})
let updateObj = this.actor.toObject();
let items = []
for (let c of choice)
{
- let existing
+ let existing
if (c.type == "skill")
{
existing = updateObj.items.find(i => i.name == c.name && i.type == c.type)
diff --git a/scripts/hqMwzPozAVTzoCxa.js b/scripts/hqMwzPozAVTzoCxa.js
new file mode 100644
index 0000000..791497d
--- /dev/null
+++ b/scripts/hqMwzPozAVTzoCxa.js
@@ -0,0 +1,10 @@
+if ((args.test.result.roll % 11 == 0 || args.test.result.roll == 100) && args.test.failed)
+{
+ delete args.test.result.misfire;
+ args.test.result.tables.misfire = {
+ label : "Raté",
+ class : "fumble-roll",
+ modifier : 0,
+ key : "torpedo"
+ }
+}
\ No newline at end of file
diff --git a/scripts/hwOZxgt7e65iWvYz.js b/scripts/hwOZxgt7e65iWvYz.js
index b127c0e..24a892f 100644
--- a/scripts/hwOZxgt7e65iWvYz.js
+++ b/scripts/hwOZxgt7e65iWvYz.js
@@ -4,5 +4,5 @@ if (test.failed)
{
let damage = this.effect.sourceTest.result.damage
- this.script.scriptMessage(await this.actor.applyBasicDamage(damage, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL, suppressMsg : true}))
+ this.script.message(await this.actor.applyBasicDamage(damage, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL, suppressMsg : true}))
}
\ No newline at end of file
diff --git a/scripts/hxmwtw5zAHyS2upG.js b/scripts/hxmwtw5zAHyS2upG.js
index 49a56fd..b4ac6f9 100644
--- a/scripts/hxmwtw5zAHyS2upG.js
+++ b/scripts/hxmwtw5zAHyS2upG.js
@@ -1 +1 @@
-this.script.scriptMessage(await game.wfrp4e.tables.formatChatRoll("giftofthebeast"))
\ No newline at end of file
+this.script.message(await game.wfrp4e.tables.formatChatRoll("giftofthebeast"))
\ No newline at end of file
diff --git a/scripts/i5AN97A7IOeygEFA.js b/scripts/i5AN97A7IOeygEFA.js
index e94c9dc..2cf2340 100644
--- a/scripts/i5AN97A7IOeygEFA.js
+++ b/scripts/i5AN97A7IOeygEFA.js
@@ -1,7 +1,7 @@
if (args.applyAP && args.modifiers.ap.metal)
{
args.modifiers.ap.ignored += args.modifiers.ap.metal
- args.modifiers.other.push({value : args.modifiers.ap.metal, label : this.effect.name, details : "Ajout les PA Métalliques aux Dommages" })
- args.modifiers.ap.details.push("" + this.effect.name + ": Ignore le métal (" + args.modifiers.ap.metal + ")");
+ args.modifiers.other.push({value : args.modifiers.ap.metal, label : this.effect.name, details : "Ajouter PA de métal aux Dégâts" })
+ args.modifiers.ap.details.push("" + this.effect.name + ": Ignorer Métal (" + args.modifiers.ap.metal + ")");
args.modifiers.ap.metal = 0
}
\ No newline at end of file
diff --git a/scripts/i93PGV1lDSdi3BJu.js b/scripts/i93PGV1lDSdi3BJu.js
new file mode 100644
index 0000000..00e202b
--- /dev/null
+++ b/scripts/i93PGV1lDSdi3BJu.js
@@ -0,0 +1,7 @@
+let effectsToDisable = this.actor.items.filter(i => i.type == "disease").reduce((effects, item) => effects.concat(item.effects.contents), []).concat(this.actor.effects.contents.filter(i => i.isCondition)).filter(i => i.active);
+
+if (effectsToDisable.length)
+{
+ this.script.notification(`Disabling ${effectsToDisable.map(i => i.name).join(", ")}.`);
+ effectsToDisable.forEach(i => i.update({disabled : true}))
+}
\ No newline at end of file
diff --git a/scripts/iAo3wxMLA64rsKjj.js b/scripts/iAo3wxMLA64rsKjj.js
index 1388122..2ad4cc1 100644
--- a/scripts/iAo3wxMLA64rsKjj.js
+++ b/scripts/iAo3wxMLA64rsKjj.js
@@ -1 +1 @@
-this.script.scriptMessage(await game.wfrp4e.tables.formatChatRoll("skavenbrew"))
\ No newline at end of file
+this.script.message(await game.wfrp4e.tables.formatChatRoll("skavenbrew"))
\ No newline at end of file
diff --git a/scripts/iH9o7t8vGDn6pm1d.js b/scripts/iH9o7t8vGDn6pm1d.js
new file mode 100644
index 0000000..4cb3518
--- /dev/null
+++ b/scripts/iH9o7t8vGDn6pm1d.js
@@ -0,0 +1,13 @@
+if (args.test.result.misfire && args.test.result.roll % 2 == 1 && args.test.result.roll % 11 == 0) {
+ delete args.test.result.misfire
+}
+else if (args.test.result.misfire)
+{
+ delete args.test.result.misfire;
+ args.test.result.tables.misfire = {
+ label : "Raté",
+ class : "fumble-roll",
+ modifier : 0,
+ key : "artillery-misfires"
+ }
+}
\ No newline at end of file
diff --git a/scripts/iLpq4yCFN6YACrYA.js b/scripts/iLpq4yCFN6YACrYA.js
index 2410b6e..0b552f9 100644
--- a/scripts/iLpq4yCFN6YACrYA.js
+++ b/scripts/iLpq4yCFN6YACrYA.js
@@ -1,4 +1,4 @@
if (args.test.result.castOutcome == "success")
{
- this.script.scriptMessage(await game.wfrp4e.tables.formatChatRoll("demonic-mien"))
+ this.script.message(await game.wfrp4e.tables.formatChatRoll("demonic-mien"))
}
\ No newline at end of file
diff --git a/scripts/iM6JLF8jDXMViReZ.js b/scripts/iM6JLF8jDXMViReZ.js
deleted file mode 100644
index 5bd9ae9..0000000
--- a/scripts/iM6JLF8jDXMViReZ.js
+++ /dev/null
@@ -1 +0,0 @@
-return !["Crochetage", "Escamotage", "Focalisation (Ulgu)"].includes(args.skill?.name)
\ No newline at end of file
diff --git a/scripts/iMu8BZ7eHMAbPEO1.js b/scripts/iMu8BZ7eHMAbPEO1.js
index 73904f4..64e8086 100644
--- a/scripts/iMu8BZ7eHMAbPEO1.js
+++ b/scripts/iMu8BZ7eHMAbPEO1.js
@@ -1,5 +1,5 @@
let healed = args.totalWoundLoss
-this.script.scriptMessage(`this.actor.prototypeToken.name Guérison de ${healed} Blessures`);
+this.script.message(`this.actor.prototypeToken.name healed ${healed} Wounds`);
this.actor.modifyWounds(healed)
\ No newline at end of file
diff --git a/scripts/iNAQJa5HyaEckknX.js b/scripts/iNAQJa5HyaEckknX.js
index 34aa1cd..e1c3e06 100644
--- a/scripts/iNAQJa5HyaEckknX.js
+++ b/scripts/iNAQJa5HyaEckknX.js
@@ -1,8 +1,8 @@
-let test = await this.actor.setupCharacteristic("wp", {skipTargets: true, appendTitle : ` - ${this.effect.name}`})
-await test.roll();
+let test = await this.actor.setupCharacteristic("wp", {skipTargets: true, appendTitle : ` - ${this.effet.name}`})
+await Test.roll();
-let opposedResult = test.opposedMessages[0]?.getOppose()?.resultMessage?.getOpposedTest()?.result
+let opposedResult = Test.opposedMessages[0]?.system.opposedHandler?.resultMessage?.system.opposedTest?.result
if (opposedResult?.winner == "attacker")
{
@@ -10,9 +10,7 @@ if (opposedResult?.winner == "attacker")
if (spells.length)
{
let chosen = spells[Math.floor(CONFIG.Dice.randomUniform() * spells.length)]
- this.script.scriptMessage(`Ne se rappelle plus du sort ${chosen.name}`)
- chosen.update({name : chosen.name += " (LOST)"})
+ this.script.message(`Perd l'accès à ${chosen.name}`)
+ chosen.update({name : chosen.name += " (PERDU)"})
}
}
-
-
diff --git a/scripts/iO2hCDwyQ7v4qrOI.js b/scripts/iO2hCDwyQ7v4qrOI.js
index 9de633f..2adc849 100644
--- a/scripts/iO2hCDwyQ7v4qrOI.js
+++ b/scripts/iO2hCDwyQ7v4qrOI.js
@@ -3,7 +3,7 @@ if (args.test.options.staunchBleeding) {
let staunch = ~~args.test.result.SL + 1
if (args.test.options.fieldDressing && args.test.result.reversed)
staunch = Math.min(1, Number(args.test.result.SL)) + 1
- args.test.result.other.push(`${this.actor.name} supprime ${staunch} Etats Hémorragiques du patient.`)
+ args.test.result.other.push(`${this.actor.name} guérit ${staunch} états Hémmoragie du patient.`)
}
else if (this.actor.characteristics.int.bonus + args.test.result.SL < 0)
args.test.result.other.push(`Le patient contracte une @UUID[Compendium.wfrp4e-core.items.Item.1hQuVFZt9QnnbWzg]{Infection Mineure}.`)
diff --git a/scripts/iT0h3VZLEBQnn5Bx.js b/scripts/iT0h3VZLEBQnn5Bx.js
deleted file mode 100644
index eda68c1..0000000
--- a/scripts/iT0h3VZLEBQnn5Bx.js
+++ /dev/null
@@ -1 +0,0 @@
-return args.skill?.name != game.i18n.localize("NAME.Charm") && args.skill?.name != game.i18n.localize("NAME.Gossip") && args.skill?.name != game.i18n.localize("NAME.ConsumeAlcohol");
\ No newline at end of file
diff --git a/scripts/iT3C15fMyQrj1RmG.js b/scripts/iT3C15fMyQrj1RmG.js
deleted file mode 100644
index a818f06..0000000
--- a/scripts/iT3C15fMyQrj1RmG.js
+++ /dev/null
@@ -1,8 +0,0 @@
-if (this.actor.has("Mort-vivant") && this.actor.has("Ethereal"))
-{
- this.actor.setupSkill(game.i18n.localize("NAME.Cool"), {skipTargets: true, appendTitle : " - " + this.effect.name}).then(async test => {
- await test.roll();
- if(test.failed)
- this.actor.addCondition("stunned")
- })
-}
\ No newline at end of file
diff --git a/scripts/iX0ctHYHg12pjaCU.js b/scripts/iX0ctHYHg12pjaCU.js
index 6e71555..26da253 100644
--- a/scripts/iX0ctHYHg12pjaCU.js
+++ b/scripts/iX0ctHYHg12pjaCU.js
@@ -7,9 +7,9 @@ if (result.object.documentId && result.object.documentCollection)
{
let data = item.toObject();
// Some items need sourceTest for their effects
- setProperty(data, "flags.wfrp4e.sourceTest", this.effect.sourceTest);
+ foundry.utils.setProperty(data, "flags.wfrp4e.sourceTest", this.effect.sourceTest);
await this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id});
}
}
-this.script.scriptMessage(game.wfrp4e.tables.formatChatRoll("gift-of-slaanesh", {lookup : result.roll, hideDSN: true}));
\ No newline at end of file
+this.script.message(game.wfrp4e.tables.formatChatRoll("gift-of-slaanesh", {lookup : result.roll, hideDSN: true}));
\ No newline at end of file
diff --git a/scripts/id9ZdkERMZnZTWXt.js b/scripts/id9ZdkERMZnZTWXt.js
index 9e2f8af..226b37d 100644
--- a/scripts/id9ZdkERMZnZTWXt.js
+++ b/scripts/id9ZdkERMZnZTWXt.js
@@ -1,7 +1,7 @@
if (args.extendedTest?.getFlag("wfrp4e", "fear"))
{
- this.script.scriptNotification("Immunisé à la Peur");
+ this.script.notification("Immunisté à la Peur");
args.extendedTest.delete();
args.abort = true;
}
-return args.options.terror || args.extendedTest?.getFlag("wfrp4e", "fear")
\ No newline at end of file
+return args.context.terror || args.extendedTest?.getFlag("wfrp4e", "fear")
\ No newline at end of file
diff --git a/scripts/ij3BLXzNk7eZ3V95.js b/scripts/ij3BLXzNk7eZ3V95.js
new file mode 100644
index 0000000..d1156d4
--- /dev/null
+++ b/scripts/ij3BLXzNk7eZ3V95.js
@@ -0,0 +1 @@
+return !["s","t","wp","fel"].includes(args.fields.characteristic)
\ No newline at end of file
diff --git a/scripts/imKVsCy8rya2gkwO.js b/scripts/imKVsCy8rya2gkwO.js
index 5e2f22d..519bcd5 100644
--- a/scripts/imKVsCy8rya2gkwO.js
+++ b/scripts/imKVsCy8rya2gkwO.js
@@ -1,18 +1,18 @@
// Any Characteristic penalties due to failed Consume Alcohol Tests
-// or the state of being Stinking Drunk are eliminated.
+// or the state of being Stinking Drunk are eliminated.
await this.actor.removeSystemEffect("consumealcohol1")
await this.actor.removeSystemEffect("consumealcohol2")
await this.actor.removeSystemEffect("consumealcohol3")
await this.actor.removeSystemEffect("stinkingdrunk1")
-// The drinker is thereafter Fatigued
-// for a number of hours equal to 10 minus their Toughness Bonus —
+// The drinker is thereafter Fatigued
+// for a number of hours equal to 10 minus their Toughness Bonus —
// nothing but time and rest can eliminate this penalty.
await this.actor.addCondition("fatigued")
const duration = 10 - parseInt(this.actor.system.characteristics.t.bonus)
this.effect.updateSource({"duration.rounds" : duration});
-this.script.scriptMessage(`
${this.actor.prototypeToken.name} ne souffre des pénalités dues à l'alcool et reçoit 1 état Fatigué pour ${duration} heures.
`,
+this.script.message(`
${this.actor.prototypeToken.name} n'a plus de pénalités liées à l'alcool et gagne l'état Extenué pendant ${duration} heures.
`,
{
- whisper: ChatMessage.getWhisperRecipients("GM"),
- blind: true
-})
\ No newline at end of file
+ whisper: ChatMessage.getWhisperRecipients("GM"),
+ blind: true
+})
\ No newline at end of file
diff --git a/scripts/iuSoKntfJ4eAPafQ.js b/scripts/iuSoKntfJ4eAPafQ.js
index 02bb0d1..e01402f 100644
--- a/scripts/iuSoKntfJ4eAPafQ.js
+++ b/scripts/iuSoKntfJ4eAPafQ.js
@@ -1,8 +1,8 @@
-let spells = await warhammer.utility.findAllItems("spell", "Chargement des sorts");
-spells = spells.filter(s => ["feu", "cieux", "bêtes", "ombres", "lumière", "vie", "mort", "métal"].includes(s.system.lore.value)).sort((a, b) => a.system.lore.value > b.system.lore.value ? 1 : -1)
+let spells = await warhammer.utility.findAllItems("spell", "Chargement des Sorts", true, ["system.lore.value"])
+spells = spells.filter(s => ["fire", "heavens", "beasts", "shadow", "light", "life", "death", "metal"].includes(s.system.lore.value)).sort((a, b) => a.system.lore.value > b.system.lore.value ? 1 : -1)
-let choice = await ItemDialog.create(spells, 1, "Choisir un sort");
+let choice = await ItemDialog.create(spells, 1, {text : "Choisissez un Sort", title : this.effect.name});
if (choice[0])
{
- this.actor.createEmbeddedDocuments("Item", choice, {fromEffect: this.effect.id})
+ this.actor.addEffectItems(choice.map(i => i.uuid), this.effect)
}
diff --git a/scripts/iuoVkjFdL1rHdbqR.js b/scripts/iuoVkjFdL1rHdbqR.js
new file mode 100644
index 0000000..8e5094c
--- /dev/null
+++ b/scripts/iuoVkjFdL1rHdbqR.js
@@ -0,0 +1 @@
+return this.item.equipped.value && ["weapon", "cast"].includes(args.type)
\ No newline at end of file
diff --git a/scripts/ivxpmCKu3pEMG05c.js b/scripts/ivxpmCKu3pEMG05c.js
new file mode 100644
index 0000000..2ec7205
--- /dev/null
+++ b/scripts/ivxpmCKu3pEMG05c.js
@@ -0,0 +1,5 @@
+if (this.actor.inCombat)
+{
+ this.actor.characteristics.s.bonus += 2
+ this.actor.characteristics.s.calculationBonusModifier -= 2
+}
\ No newline at end of file
diff --git a/scripts/j98hvy6r9G2Vjmid.js b/scripts/j98hvy6r9G2Vjmid.js
index 458e65b..e493f06 100644
--- a/scripts/j98hvy6r9G2Vjmid.js
+++ b/scripts/j98hvy6r9G2Vjmid.js
@@ -1,12 +1,12 @@
if (args.totalWoundLoss > 0)
{
args.opposedTest.result.other.push(
- `@Corruption[minor]{Exposition Mineure à la Corruption}`
+ `@Corruption[minor]{Minor Exposure to Corruption}`
)
- this.script.scriptMessage(
+ this.script.message(
`${this.effect.name}:
- @Corruption[minor]{Exposition Mineure à la Corruption}
- ${args.actor.prototypeToken.name} doit réaliser un Test
- Accessible (+20%) de Corruption (Mineur)`,
+ @Corruption[minor]{Minor Exposure to Corruption}
+ ${args.actor.prototypeToken.name} must take an
+ Average (+20%) Corruption (Minor) Test`,
{whisper: ChatMessage.getWhisperRecipients("GM")})
}
\ No newline at end of file
diff --git a/scripts/jFKnf2UdoxAQx76R.js b/scripts/jFKnf2UdoxAQx76R.js
new file mode 100644
index 0000000..9f880cb
--- /dev/null
+++ b/scripts/jFKnf2UdoxAQx76R.js
@@ -0,0 +1,8 @@
+if (args.equipped)
+{
+ this.actor.addEffectItems("Compendium.wfrp4e-core.items.Item.URwIDtInCsxOoGqM", this.effect);
+}
+else
+{
+ this.effect.deleteCreatedItems();
+}
\ No newline at end of file
diff --git a/scripts/jFwema0iwzBphxie.js b/scripts/jFwema0iwzBphxie.js
index b145f1b..e1f0f87 100644
--- a/scripts/jFwema0iwzBphxie.js
+++ b/scripts/jFwema0iwzBphxie.js
@@ -6,4 +6,4 @@ args.attacker.update({"system.status.wounds.value" : args.attacker.system.status
args.actor.addCondition("fatigued")
args.attacker.hasCondition("fatigued")?.delete();
-this.script.scriptMessage(`${args.attacker.prototypeToken.name} guéri de ${woundsGained} Blessures`);
\ No newline at end of file
+this.script.message(`${args.attacker.prototypeToken.name} gains ${woundsGained} Wounds`);
\ No newline at end of file
diff --git a/scripts/jGDk7avWFSnyFoql.js b/scripts/jGDk7avWFSnyFoql.js
index 1509a3a..32ddc0c 100644
--- a/scripts/jGDk7avWFSnyFoql.js
+++ b/scripts/jGDk7avWFSnyFoql.js
@@ -5,5 +5,5 @@ if (broken && !broken.getFlag("wfrp4e", "blasted-mind") && !this.actor.has(item.
{
await broken.delete();
this.actor.createEmbeddedDocuments("Item", [item], {fromEffect: this.effect.id})
- this.script.scriptNotification(`Suppression de ${broken.name}, ajout de ${item.name} (${Math.ceil(CONFIG.Dice.randomUniform() * 10)} Rounds)`)
+ this.script.notification(`Removed ${broken.name}, added ${item.name} (${Math.ceil(CONFIG.Dice.randomUniform() * 10)} Rounds)`)
}
\ No newline at end of file
diff --git a/scripts/jHgxpe6TJDlP3oTn.js b/scripts/jHgxpe6TJDlP3oTn.js
index fb88ec0..383fa93 100644
--- a/scripts/jHgxpe6TJDlP3oTn.js
+++ b/scripts/jHgxpe6TJDlP3oTn.js
@@ -1,9 +1,9 @@
-let spells = await warhammer.utility.findAllItems("spell", "Chargement des sorts");
+let spells = await warhammer.utility.findAllItems("spell", "Chargement des sorts", true, ["system.lore.value"])
spells = spells.filter(s => ["slaanesh"].includes(s.system.lore.value))
-let choice = await ItemDialog.create(spells, 1, "Choisir un sort");
+let choice = await ItemDialog.create(spells, 1, {text : "Choisissez un Sort", title : this.effect.name});
if (choice[0])
{
this.item.updateSource({name : this.item.name + ` (${choice[0].name})`})
- this.actor.createEmbeddedDocuments("Item", choice, {fromEffect: this.effect.id})
+ this.actor.addEffectItems(choice.map(i => i.uuid), this.effect)
}
diff --git a/scripts/jOCLEsjNzERyVLsP.js b/scripts/jOCLEsjNzERyVLsP.js
new file mode 100644
index 0000000..3138bf2
--- /dev/null
+++ b/scripts/jOCLEsjNzERyVLsP.js
@@ -0,0 +1,5 @@
+if(args.test.result.majormis)
+{
+ args.test.result.nullmajormis = game.i18n.localize("ROLL.MajorMis")
+ args.test.minormis = game.i18n.localize("ROLL.MinorMis")
+}
\ No newline at end of file
diff --git a/scripts/jOSCsBRUO117spv8.js b/scripts/jOSCsBRUO117spv8.js
new file mode 100644
index 0000000..4ecdc9e
--- /dev/null
+++ b/scripts/jOSCsBRUO117spv8.js
@@ -0,0 +1 @@
+args.abort = `Only gunpowder or artillery weapons can attack targets within the ${this.effect.name}`;
\ No newline at end of file
diff --git a/scripts/jObJanFoev4N6ZRv.js b/scripts/jObJanFoev4N6ZRv.js
index 5697901..4580414 100644
--- a/scripts/jObJanFoev4N6ZRv.js
+++ b/scripts/jObJanFoev4N6ZRv.js
@@ -1,2 +1,2 @@
if (!args.opposedTest.attackerTest.item?.system?.isMagical)
- args.abort = `${this.effect.name}: Ignoré`
\ No newline at end of file
+ args.abort = `${this.effect.name}: Ignored`
\ No newline at end of file
diff --git a/scripts/jOm7RxGFm1y6mCpN.js b/scripts/jOm7RxGFm1y6mCpN.js
index 4d3b7dd..522668e 100644
--- a/scripts/jOm7RxGFm1y6mCpN.js
+++ b/scripts/jOm7RxGFm1y6mCpN.js
@@ -1 +1 @@
-return args.options.crewTest.name.includes("Batten Down");
\ No newline at end of file
+return args.context.crewTest.name.includes("Batten Down");
\ No newline at end of file
diff --git a/scripts/jRSgPhpfN7MH7TTp.js b/scripts/jRSgPhpfN7MH7TTp.js
deleted file mode 100644
index 8614c9c..0000000
--- a/scripts/jRSgPhpfN7MH7TTp.js
+++ /dev/null
@@ -1,16 +0,0 @@
-if (args.totalWoundLoss > 0)
-{
- let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, context: { failure: "1 Poisoned Condition Gained", success: "Resisted Poisoned Condition" } })
- await test.roll();
- if (test.failed)
- {
- args.actor.addCondition("poisoned");
- if (args.actor.system.status.wounds.value - args.totalWoundLoss <= 0)
- {
- args.actor.addCondition("unconscious")
- }
- }
-}
-
- // else
- // this.actor.setupCharacteristic("t", { context: { failure: "1 @Condition[Poisoned] Condition Gained", success: "Resisted @Condition[Poisoned] Condition" } }).then(testCallback)
diff --git a/scripts/jW87rmQLtROdVEhW.js b/scripts/jW87rmQLtROdVEhW.js
index 18331f3..125f551 100644
--- a/scripts/jW87rmQLtROdVEhW.js
+++ b/scripts/jW87rmQLtROdVEhW.js
@@ -1,5 +1,5 @@
if (["orc", "ork", "goblin", "hobgoblin", "snotling", "greenskin"].includes(args.opposedTest.defender.details.species.value.toLowerCase()))
{
args.addImpact = true
- args.opposedTest.result.other.push("Rune de Banissement de Gobelin: Ajout d'Impact")
+ args.opposedTest.result.other.push("Rune of Goblin Bane: Impact Ajouté")
}
\ No newline at end of file
diff --git a/scripts/jXbrIGxznqf1SNxZ.js b/scripts/jXbrIGxznqf1SNxZ.js
index 131e6cd..8083aa3 100644
--- a/scripts/jXbrIGxznqf1SNxZ.js
+++ b/scripts/jXbrIGxznqf1SNxZ.js
@@ -1,3 +1,3 @@
const speaker = ChatMessage.getSpeaker({actor: this.actor});
-this.script.scriptMessage(`
${speaker.alias} est immergé dans la Elémentair de Mer et subit la @UUID[Compendium.wfrp4e-core.journals.JournalEntry.NS3YGlJQxwTggjRX.JournalEntryPage.WCivInLZrqEtZzF4#drowning-and-suffocation]{Suffocation}
Il peut essayer de s'échapperen s"évadant de l'Etat @Condition[Entravé} comme si il était @UUID[Compendium.wfrp4e-core.journals.JournalEntry.NS3YGlJQxwTggjRX.JournalEntryPage.wmA76Q2zJJ9HrkvA#grappling]{Grappled} par l'Elémentaire de Mer, en réalisant un Test Opposé de Force contre une Force de 59.
`);
\ No newline at end of file
+this.script.message(`
${speaker.alias} is Immersed within a Sea Elemental and suffers from @UUID[Compendium.wfrp4e-core.journals.JournalEntry.NS3YGlJQxwTggjRX.JournalEntryPage.WCivInLZrqEtZzF4#drowning-and-suffocation]{Suffocation}
They may attempt to escape by freeing themselves from the @Condition[Entangled} Condition as if they were @UUID[Compendium.wfrp4e-core.journals.JournalEntry.NS3YGlJQxwTggjRX.JournalEntryPage.wmA76Q2zJJ9HrkvA#grappling]{Grappled} by the Sea Elemental, making an Opposed Strength Test against its Strength of 59.
`);
\ No newline at end of file
diff --git a/scripts/jb1ouw0eIBVy3Wwg.js b/scripts/jb1ouw0eIBVy3Wwg.js
new file mode 100644
index 0000000..6d2e833
--- /dev/null
+++ b/scripts/jb1ouw0eIBVy3Wwg.js
@@ -0,0 +1,9 @@
+if (
+ this.item == args.attackerTest.item
+ && args.attackerTest.succeeded
+ && args.defenderTest.item?.system?.attackType == 'melee'
+ && (args.defenderTest.item.properties.qualities?.magical || args.defenderTest.item.properties.unusedQualities?.magical)
+)
+{
+ args.opposedTest.result.other.push(`${this.effect.name}: destroys magical ${args.defenderTest.item.name}.`)
+}
\ No newline at end of file
diff --git a/scripts/jdS2u1tQPYeO55WI.js b/scripts/jdS2u1tQPYeO55WI.js
index 16864c3..e2bd213 100644
--- a/scripts/jdS2u1tQPYeO55WI.js
+++ b/scripts/jdS2u1tQPYeO55WI.js
@@ -8,12 +8,12 @@ if (type == "cold")
if (type == "corrosion")
{
- let damageItems = await Dialog.confirm({title : this.item.name, content : `
${this.actor.prototypeToken.name} reçoit également 1 Point de Corruption. Si il subit une mutation, il doit la déterminer sur la table des @Table[mutatemental]{Mutations Mentales}.
${this.effect.name}: Is this a ranged or magical attack that orignates outside the Dome?
` })
+
+ if (choice)
+ {
+ args.ward = 6;
+ }
+}
diff --git a/scripts/qu194dVXm9Vx1TGk.js b/scripts/qu194dVXm9Vx1TGk.js
index 756fd99..2f4e988 100644
--- a/scripts/qu194dVXm9Vx1TGk.js
+++ b/scripts/qu194dVXm9Vx1TGk.js
@@ -1,10 +1,10 @@
if (args.test.options.useOnesSupportive && (args.test.result.roll <= game.settings.get("wfrp4e", "automaticSuccess") || args.test.result.roll <= args.test.target)) {
- let SL = Math.floor(args.test.target / 10) - Math.floor(args.test.result.roll / 10)
- let ones = Number(args.test.result.roll.toString().split("").pop())
+ let SL = Math.floor(args.test.target / 10) - Math.floor(args.test.result.roll / 10)
+ let ones = Number(args.test.result.roll.toString().split("").pop())
- if (ones > SL) {
- args.test.data.result.SL = "+" + (ones + args.test.successBonus + args.test.slBonus)
- args.test.result.other.push(`${this.effect.name}: Utilise le dé d'unité comme DR`)
- }
+ if (ones > SL) {
+ args.Test.data.result.SL = "+" + (ones + args.test.successBonus + args.test.slBonus)
+ args.test.result.other.push(`${this.effect.name}: Valeur d'unité utilisée comme DR`)
+ }
}
\ No newline at end of file
diff --git a/scripts/quPcuKsq2fcild4a.js b/scripts/quPcuKsq2fcild4a.js
deleted file mode 100644
index 3ebda0b..0000000
--- a/scripts/quPcuKsq2fcild4a.js
+++ /dev/null
@@ -1,6 +0,0 @@
-let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields: {difficulty: "easy"}, context: {failure : `${this.effect.name}: Vomit!`} })
-await test.roll();
-if (test.failed)
-{
- this.actor.addCondition("prone")
-}
\ No newline at end of file
diff --git a/scripts/qxzhPtysAjPWspKf.js b/scripts/qxzhPtysAjPWspKf.js
index 90bcbd0..0d3caea 100644
--- a/scripts/qxzhPtysAjPWspKf.js
+++ b/scripts/qxzhPtysAjPWspKf.js
@@ -1,4 +1,4 @@
if (this.actor.has("Mort-vivant") || this.actor.has("Démoniaque"))
{
- this.script.scriptNotification(`Ne peut entrer ${this.effect.name}!`);
+ this.script.notification(`Impossible d'entrer dans ${this.effect.name} !`);
}
\ No newline at end of file
diff --git a/scripts/qyBmkCJo5606o4J9.js b/scripts/qyBmkCJo5606o4J9.js
new file mode 100644
index 0000000..0780ef6
--- /dev/null
+++ b/scripts/qyBmkCJo5606o4J9.js
@@ -0,0 +1 @@
+this.item.system.flaws.value = this.item.system.flaws.value.filter(i => i.name != "weakpoints")
\ No newline at end of file
diff --git a/scripts/qzGPJflVW7c2Ciim.js b/scripts/qzGPJflVW7c2Ciim.js
deleted file mode 100644
index cb29090..0000000
--- a/scripts/qzGPJflVW7c2Ciim.js
+++ /dev/null
@@ -1 +0,0 @@
-return args.skill?.name !== game.i18n.localize("NAME.Cool");
\ No newline at end of file
diff --git a/scripts/rBAoyhzeU3Q8MVSk.js b/scripts/rBAoyhzeU3Q8MVSk.js
index fe9ccf9..89361d0 100644
--- a/scripts/rBAoyhzeU3Q8MVSk.js
+++ b/scripts/rBAoyhzeU3Q8MVSk.js
@@ -1,5 +1,5 @@
-const repaired_message = `
Réparation finie ${this.item.name}.
`;
-const test = 'Trade (Carpenter)';
+const repaired_message = `
Réparation terminée ${this.item.name}.
`;
+const Test = 'Métier (Charpentier)';
const difficulty = 'difficult';
const target = 50;
@@ -12,8 +12,8 @@ const extendedTestData = {
current: 0,
target: target
},
- test: {
- value: test
+ Test: {
+ value: Test
},
completion: {
value: "remove"
@@ -24,7 +24,7 @@ const extendedTestData = {
},
effects: [
{
- name: `Réparer ${this.item.name}`,
+ name: `Réparation de ${this.item.name}`,
img: this.item.img,
system: {
transferData : {
diff --git a/scripts/rCh3ltUrUMovd2Kc.js b/scripts/rCh3ltUrUMovd2Kc.js
index 5145c61..44ada18 100644
--- a/scripts/rCh3ltUrUMovd2Kc.js
+++ b/scripts/rCh3ltUrUMovd2Kc.js
@@ -1,5 +1,5 @@
if (this.actor.hasCondition("surprised"))
{
- this.script.scriptNotification("Ne peut être surpris");
+ this.script.notification("Impossible d'être surpris");
this.actor.removeCondition("surprised");
}
\ No newline at end of file
diff --git a/scripts/rF0Z3hTUUnSxL3Mq.js b/scripts/rF0Z3hTUUnSxL3Mq.js
index 38216c0..c8e59ac 100644
--- a/scripts/rF0Z3hTUUnSxL3Mq.js
+++ b/scripts/rF0Z3hTUUnSxL3Mq.js
@@ -5,7 +5,7 @@ let nightVision = (await fromUuid("Compendium.wfrp4e-core.items.FmHDbCOy3pH8yKhm
let tracker = (await fromUuid("Compendium.wfrp4e-core.items.ClOlztW6hH8rslbp")).toObject()
let weapon = (await fromUuid("Compendium.wfrp4e-core.items.AtpAudHA4ybXVlWM")).toObject()
-armour.name = "Armure (Caché)"
+armour.name = "Armour (Hide)"
armour.system.specification.value = 2
bite.system.specification.value = 3
fear.system.specification.value = 2
@@ -21,17 +21,17 @@ let champion = (await fromUuid("Compendium.wfrp4e-core.items.4mF5Sp3t09kZhBYc"))
let die = (await fromUuid("Compendium.wfrp4e-core.items.UsJ2uIOOtHA7JqD5")).toObject()//{Die Hard}
let fast = (await fromUuid("Compendium.wfrp4e-core.items.9MjH4xyVrd3Inzak")).toObject()//{Fast}
let frenzy = (await fromUuid("Compendium.wfrp4e-core.items.yRhhOlt18COq4e1q")).toObject()//{Frenzy}
-let immunity = (await fromUuid("Compendium.wfrp4e-core.items.IAWyzDfC286a9MPz")).toObject()//{Immunity to Psychology}
-let regenerate = (await fromUuid("Compendium.wfrp4e-core.items.SfUUdOGjdYpr3KSR")).toObject()//{Regenerate}
-let size = (await fromUuid("Compendium.wfrp4e-core.items.8slW8CJ2oVTxeQ6q")).toObject()//{Size (Large)}
+let immunity = (await fromUuid("Compendium.wfrp4e-core.items.IAWyzDfC286a9MPz")).toObject()//{Immunité Psychologique}
+let regenerate = (await fromUuid("Compendium.wfrp4e-core.items.SfUUdOGjdYpr3KSR")).toObject()//{Régénération}
+let size = (await fromUuid("Compendium.wfrp4e-core.items.8slW8CJ2oVTxeQ6q")).toObject()//{Taille (Large)}
blessed.system.specification.value = "Ulric"
-size.system.specification.value = "Grande"
+size.system.specification.value = "Large"
let optional = [belligerent, bestial, big, blessed, champion, die, fast, frenzy, immunity, regenerate, size];
-let chosen = await ItemDialog.create(optional, "unlimited", "Choisissez un Trai optionnel");
+let chosen = await ItemDialog.create(optional, "unlimited", "Choisir des Traits Optionnels");
items = items.concat(chosen || [])
-this.script.scriptNotification(`Ajout de ${items.map(i => i.name).join(", ")}`);
+this.script.notification(`Adding ${items.map(i => i.name).join(", ")}`);
this.actor.createEmbeddedDocuments("Item", items, {fromEffect : this.effect.id})
diff --git a/scripts/rJ8pspSekyDLkiqG.js b/scripts/rJ8pspSekyDLkiqG.js
new file mode 100644
index 0000000..574e5cb
--- /dev/null
+++ b/scripts/rJ8pspSekyDLkiqG.js
@@ -0,0 +1 @@
+return args.skill.name === game.i18n.localize("NAME.Cool")
\ No newline at end of file
diff --git a/scripts/rX8FTinyTMj9WJri.js b/scripts/rX8FTinyTMj9WJri.js
index d0c393f..e655346 100644
--- a/scripts/rX8FTinyTMj9WJri.js
+++ b/scripts/rX8FTinyTMj9WJri.js
@@ -5,12 +5,12 @@ if (this.actor.hasCondition("dead")) return;
const currentHoled = this.actor.flags.holed.holed || 0;
const openGunPorts = this.actor.itemTypes.vehicleMod.reduce((acc, m) => {
- if (!m.name.toLowerCase().includes("gun port"))
+ if (!m.name.toLowerCase().includes("gun port"))
return acc;
-
+
let closed = m.getFlag("wfrp4e-soc", "gunport");
if (!closed) acc++;
-
+
return acc;
}, 0);
@@ -20,11 +20,11 @@ this.actor.flags.holed.total = totalHoled;
if (totalHoled >= toughness) {
const speaker = ChatMessage.getSpeaker({actor: this.actor});
- this.script.scriptMessage(`
-
${speaker.alias} sank due to having Holed (${totalHoled}) rating equal to, or exceeding its Toughness (${toughness })
+ this.script.message(`
+
${speaker.alias} coule en raison d'un score Percé (${totalHoled}) égal ou supérieur à sa Robustesse (${toughness })
- Holed due to Critical Damage: ${currentHoled}
- Holed due to opened Gun Ports: ${openGunPorts}
+ Percé en raison de dégâts critiques : ${currentHoled}
+ Percé en raison de sabords ouverts : ${openGunPorts}
`, { flavor: this.effect.name.split("(")[0]});
this.actor.addCondition("dead");
diff --git a/scripts/rXMylpnEtZpwou6x.js b/scripts/rXMylpnEtZpwou6x.js
deleted file mode 100644
index d0c2d7f..0000000
--- a/scripts/rXMylpnEtZpwou6x.js
+++ /dev/null
@@ -1,8 +0,0 @@
-this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields: {difficulty : "average"}}).then(async test =>
-{
- await test.roll()
- if (test.failed)
- {
- this.actor.addCondition("fatigued")
- }
-})
\ No newline at end of file
diff --git a/scripts/ramav4ymrDDkPKK4.js b/scripts/ramav4ymrDDkPKK4.js
index f15a01f..b809b07 100644
--- a/scripts/ramav4ymrDDkPKK4.js
+++ b/scripts/ramav4ymrDDkPKK4.js
@@ -1,9 +1,9 @@
if (this.actor.hasCondition("bleeding"))
{
this.actor.removeCondition("bleeding");
- this.script.scriptNotification("Suppression d'1 état Hémmoragique")
+ this.script.notification("Retiré 1 Etat Hémmoragie")
}
-else
+else
{
- this.script.scriptNotification("Aucun état Hémorragique");
+ this.script.notification("Aucun Etat Hémmoragie");
}
\ No newline at end of file
diff --git a/scripts/ratP9ByLjQPiLlFK.js b/scripts/ratP9ByLjQPiLlFK.js
index 5e33cd1..2f2917a 100644
--- a/scripts/ratP9ByLjQPiLlFK.js
+++ b/scripts/ratP9ByLjQPiLlFK.js
@@ -1 +1 @@
-args.data.canReverse = true
\ No newline at end of file
+args.data.reversal = {allowed : true, if: "success"};
\ No newline at end of file
diff --git a/scripts/rdaMhMyHrJjQ6vVC.js b/scripts/rdaMhMyHrJjQ6vVC.js
index f5d1678..ee4cdaf 100644
--- a/scripts/rdaMhMyHrJjQ6vVC.js
+++ b/scripts/rdaMhMyHrJjQ6vVC.js
@@ -1 +1 @@
-game.wfrp4e.utility.postFear(this.item.Advances, this.actor.name)
\ No newline at end of file
+game.wfrp4e.utility.postPeur(this.item.Advances, this.actor.name)
\ No newline at end of file
diff --git a/scripts/re1UFtxvRRjpPB7Z.js b/scripts/re1UFtxvRRjpPB7Z.js
index 332391e..8cefa2e 100644
--- a/scripts/re1UFtxvRRjpPB7Z.js
+++ b/scripts/re1UFtxvRRjpPB7Z.js
@@ -3,11 +3,11 @@ let data = item.toObject();
data.system.location.key = this.item.system.location.key
if (data.system.location.key[0] == "r")
{
- data.system.location.value = "Right Ankle"
+ data.system.location.value = "Cheville droite"
}
else if (data.system.location.key[0] == "l")
{
- data.system.location.value = "Left Ankle"
+ data.system.location.value = "Cheville gauche"
}
this.actor.createEmbeddedDocuments("Item", [data], {skipLocationValue : true, fromEffect: this.effect.id})
diff --git a/scripts/red2bt4PGgIWAdTR.js b/scripts/red2bt4PGgIWAdTR.js
deleted file mode 100644
index 3abf986..0000000
--- a/scripts/red2bt4PGgIWAdTR.js
+++ /dev/null
@@ -1,14 +0,0 @@
-if (this.item.system.quantity.value)
-{
- this.item.system.reduceQuantity();
- let actor = Array.from(game.user.targets)[0]?.actor || this.actor;
- let effectData = this.item.effects.contents[0].convertToApplied();
- let minutes = Math.ceil(CONFIG.Dice.randomUniform() * 10) * 10;
- effectData.duration.seconds = 60 * minutes
- this.script.scriptMessage(`Durée: ${minutes} minutes`, {whisper : ChatMessage.getWhisperRecipients("GM")})
- actor.applyEffect({effectData : [effectData]})
-}
-else
-{
- this.script.scriptNotification("Aucun disponible!", "error")
-}
\ No newline at end of file
diff --git a/scripts/rgnGu3IQrS8Vj9Op.js b/scripts/rgnGu3IQrS8Vj9Op.js
new file mode 100644
index 0000000..c9365dc
--- /dev/null
+++ b/scripts/rgnGu3IQrS8Vj9Op.js
@@ -0,0 +1,3 @@
+const bonus = game.settings.get("wfrp4e", "homebrew").advantageBonus;
+
+args.fields.modifier += bonus;
\ No newline at end of file
diff --git a/scripts/rlTvhnDpj4lzfusf.js b/scripts/rlTvhnDpj4lzfusf.js
deleted file mode 100644
index 2a8b74f..0000000
--- a/scripts/rlTvhnDpj4lzfusf.js
+++ /dev/null
@@ -1 +0,0 @@
-return !args.skill?.name.includes(game.i18n.localize("NAME.Sail")) && args.skill?.name !== game.i18n.localize("NAME.Climb");
\ No newline at end of file
diff --git a/scripts/rly9iBUy8EX7NhQT.js b/scripts/rly9iBUy8EX7NhQT.js
index c6e64e8..4197399 100644
--- a/scripts/rly9iBUy8EX7NhQT.js
+++ b/scripts/rly9iBUy8EX7NhQT.js
@@ -1,14 +1,14 @@
if (game.user.targets.size !== 1)
- return ui.notifications.warn("You must target exactly one Boat.");
+ return ui.notifications.warn("Vous devez cibler exactement un seul Bateau.");
const target = game.user.targets.first();
const vehicle = target.actor;
-if (!(vehicle.system instanceof VehicleModel))
- return ui.notifications.warn("You can only Constrict a Boat");
+if (!(vehicle.system instanceof VehicleModel))
+ return ui.notifications.warn("Vous ne pouvez Constrict qu'un Bateau");
if (vehicle.size > 3)
- return ui.notifications.warn("You can only Constrict vessels of Size Large or smaller");
+ return ui.notifications.warn("Vous ne pouvez Constrict que des navires de Taille Large ou plus petits");
const turns = Math.ceil(vehicle.system.details.length.value / 10);
@@ -24,4 +24,4 @@ await this.actor.applyEffect({effectData: [effectData]});
const speaker = ChatMessage.getSpeaker({actor: this.actor});
-this.script.scriptMessage(`${speaker.alias} started wrapping itself around the ${target.name} and will be able to start crushing it after ${turns} turns.`);
\ No newline at end of file
+this.script.message(`${speaker.alias} a commencé à s'enrouler autour du ${target.name} et pourra commencer à l'écraser après ${turns} tours.`);
\ No newline at end of file
diff --git a/scripts/rnioLwiJP7ps5Jwy.js b/scripts/rnioLwiJP7ps5Jwy.js
deleted file mode 100644
index 2a24ede..0000000
--- a/scripts/rnioLwiJP7ps5Jwy.js
+++ /dev/null
@@ -1,4 +0,0 @@
-if (args.item.type == "skill" && args.item.name == "Corps à corps (Base)")
-{
- args.item.system.modifier.value += 30;
-}
\ No newline at end of file
diff --git a/scripts/roKvPHDSpX4IV11C.js b/scripts/roKvPHDSpX4IV11C.js
deleted file mode 100644
index 2210782..0000000
--- a/scripts/roKvPHDSpX4IV11C.js
+++ /dev/null
@@ -1 +0,0 @@
-return !args.skill?.name.includes(game.i18n.localize("NAME.Perform")) && args.characteristic != "ag"
\ No newline at end of file
diff --git a/scripts/roYVcP5Zqcsa8jVw.js b/scripts/roYVcP5Zqcsa8jVw.js
new file mode 100644
index 0000000..523e0eb
--- /dev/null
+++ b/scripts/roYVcP5Zqcsa8jVw.js
@@ -0,0 +1 @@
+args.actor.system.details.move.value -= 1;
\ No newline at end of file
diff --git a/scripts/rpxQU26BU7nwjtqY.js b/scripts/rpxQU26BU7nwjtqY.js
index 3ed305a..84cd61a 100644
--- a/scripts/rpxQU26BU7nwjtqY.js
+++ b/scripts/rpxQU26BU7nwjtqY.js
@@ -1,15 +1,15 @@
let location = this.item.system.location.key
-let test = await this.actor.setupCharacteristic("dex", {context : {failure : `${this.effect.name}: Lâche l'objet!`}, skipTargets: true, appendTitle : " - " + this.effect.name, fields : {difficulty : "average"}})
-await test.roll();
+let test = await this.actor.setupCharacteristic("dex", {context : {failure : `${this.effect.name}: Lâchez l'objet!`}, skipTargets: true, appendTitle : " - " + this.effet.name, fields : {difficulty : "average"}})
+await Test.roll();
-if (location && test.failed)
+if (location && Test.Échoué)
{
let dropped = this.item.system.weaponsAtLocation;
if (dropped.length)
{
- this.script.scriptNotification(`Laché ${dropped.map(i => i.name).join(", ")}!`)
+ this.script.notification(`Vous lâchez ${dropped.map(i => i.name).join(", ")}!`)
for(let weapon of dropped)
{
await weapon.system.toggleEquip();
diff --git a/scripts/rr4htuVq45onXdRG.js b/scripts/rr4htuVq45onXdRG.js
deleted file mode 100644
index e494852..0000000
--- a/scripts/rr4htuVq45onXdRG.js
+++ /dev/null
@@ -1,2 +0,0 @@
-let test = await this.actor.setupSkill(game.i18n.localize("NAME.Cool"), {appendTitle: ` - ${this.effect.name}`, fields : {difficulty : "average"}})
-test.roll();
\ No newline at end of file
diff --git a/scripts/rxB1AqfVMDqTRieE.js b/scripts/rxB1AqfVMDqTRieE.js
deleted file mode 100644
index 132e672..0000000
--- a/scripts/rxB1AqfVMDqTRieE.js
+++ /dev/null
@@ -1 +0,0 @@
-return !["ws", "bs", "ag"].includes(args.characteristic) && args.skill?.name != game.i18n.localize("NAME.Perception")
\ No newline at end of file
diff --git a/scripts/s6eZXfZkC1My6EXl.js b/scripts/s6eZXfZkC1My6EXl.js
index 529b249..4b46aa6 100644
--- a/scripts/s6eZXfZkC1My6EXl.js
+++ b/scripts/s6eZXfZkC1My6EXl.js
@@ -1,5 +1,5 @@
let lore = this.effect.name.split(" ")[2].toLowerCase();
-if (args.item.type == "spell" && game.wfrp4e.config.magicLores[args.item.system.lore.value].toLowerCase() == lore)
+if (args.item.type == "spell" && args.item.system.lore.value == lore)
{
- args.item.system.cn.value -= 1
-}
\ No newline at end of file
+ args.item.system.cn.value = Math.max(0, args.item.system.cn.value - 1);
+}
diff --git a/scripts/s7gJQdzuM3fz2zQK.js b/scripts/s7gJQdzuM3fz2zQK.js
deleted file mode 100644
index 86e431a..0000000
--- a/scripts/s7gJQdzuM3fz2zQK.js
+++ /dev/null
@@ -1,11 +0,0 @@
-let item = await fromUuid("Compendium.wfrp4e-core.items.QluSTTTq3viHJJUh")
-let data = item.toObject();
-data.system.location.value = "Hip"
-this.actor.createEmbeddedDocuments("Item", [data], {fromEffect: this.effect.id})
-
-let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`})
-await test.roll();
-if (test.failed)
-{
- this.actor.addCondition("prone")
-}
\ No newline at end of file
diff --git a/scripts/s7kW3lm2eU5IPrLP.js b/scripts/s7kW3lm2eU5IPrLP.js
new file mode 100644
index 0000000..1e8ca58
--- /dev/null
+++ b/scripts/s7kW3lm2eU5IPrLP.js
@@ -0,0 +1,9 @@
+let item = await fromUuid("Compendium.wfrp4e-core.items.Item.JQa5DLnTs2SEzRrc")
+let dv = item.toObject();
+
+item = await fromUuid("Compendium.wfrp4e-core.items.Item.OzwDT6kzoLYeeR2d")
+let stealthy = item.toObject();
+
+item = await fromUuid("Compendium.wfrp4e-core.items.Item.XSb3QVB9ipPBFt56")
+let shadow = item.toObject();
+this.actor.createEmbeddedDocuments("Item", [dv, stealthy, shadow], {fromEffect : this.effect.id});
\ No newline at end of file
diff --git a/scripts/s9J1TUkpGdvSWvPO.js b/scripts/s9J1TUkpGdvSWvPO.js
new file mode 100644
index 0000000..de9a331
--- /dev/null
+++ b/scripts/s9J1TUkpGdvSWvPO.js
@@ -0,0 +1 @@
+this.actor.addCondition("blinded");
\ No newline at end of file
diff --git a/scripts/s9KcytRE7i0cU06n.js b/scripts/s9KcytRE7i0cU06n.js
new file mode 100644
index 0000000..60edf56
--- /dev/null
+++ b/scripts/s9KcytRE7i0cU06n.js
@@ -0,0 +1,5 @@
+if (["dragon"].includes(args.opposedTest.defender.details.species.value.toLowerCase()))
+ {
+ args.modifiers.other.push({label : this.effect.name, details : "Blessures Doublées vs Dragons", value : args.totalWoundLoss});
+ args.totalWoundLoss *=2;
+ }
\ No newline at end of file
diff --git a/scripts/sB4KB9bT3nQhAoqG.js b/scripts/sB4KB9bT3nQhAoqG.js
index 9e83a15..317229b 100644
--- a/scripts/sB4KB9bT3nQhAoqG.js
+++ b/scripts/sB4KB9bT3nQhAoqG.js
@@ -1,12 +1,12 @@
// This script needs to be separate because equipTransfer is off on the other effect, and thus won't execute when added to an actor
let mainEffect = this.item.effects.contents[0];
-if (mainEffect.name.includes(""))
+if (mainEffect.name.includes(""))
{
- let choice = await ItemDialog.create(ItemDialog.objectToArray(game.wfrp4e.config.magicLores, this.item.img), 1, "Choisissez le Savoir");
+ let choice = await ItemDialog.create(ItemDialog.objectToArray(game.wfrp4e.config.magicLores, this.item.img), 1, "Choisir le Savoir");
if (choice.length)
{
- mainEffect.update({name : mainEffect.name.replace("", choice[0].name)})
+ mainEffect.update({name : mainEffect.name.replace("", choice[0].name)})
this.item.update({name : this.item.name += ` (${choice[0].name})`})
}
}
diff --git a/scripts/sKO8TcLIkCTnFvXu.js b/scripts/sKO8TcLIkCTnFvXu.js
index 3040b9c..421ffc8 100644
--- a/scripts/sKO8TcLIkCTnFvXu.js
+++ b/scripts/sKO8TcLIkCTnFvXu.js
@@ -1,2 +1,2 @@
args.abort = true;
-this.script.scriptNotification(`Ne peut utiliser ${this.item.system.location.value}!`, "error")
\ No newline at end of file
+this.script.notification(`Cannot use ${this.item.system.location.value}!`, "error")
\ No newline at end of file
diff --git a/scripts/sNSfDBIA2k17hPYI.js b/scripts/sNSfDBIA2k17hPYI.js
index 61f51c7..1620d60 100644
--- a/scripts/sNSfDBIA2k17hPYI.js
+++ b/scripts/sNSfDBIA2k17hPYI.js
@@ -2,5 +2,5 @@ let ablaze = this.actor.hasCondition("ablaze");
if (ablaze)
{
ablaze?.delete();
- this.script.scriptNotification("Ignore En Flammes");
+ this.script.notification("État En Flammes ignoré");
}
diff --git a/scripts/sPvfYQEnyAYNpIhF.js b/scripts/sPvfYQEnyAYNpIhF.js
index f1369d8..0e39680 100644
--- a/scripts/sPvfYQEnyAYNpIhF.js
+++ b/scripts/sPvfYQEnyAYNpIhF.js
@@ -1,6 +1,6 @@
-let shouldDamage = await Dialog.confirm({
- title: this.effect.name + " - " + args.actor.name
- content: "Are you humanoid creature who have not made a sacrifice to Rhya (or another diety of nature or powerful nature spirit to whom the cult of Rhya are well disposed, such as Isha or Taal) since the last spring equinox?"
+let shouldDamage = await foundry.applications.api.DialogV2.confirm({
+ window : {title: this.effect.name + " - " + args.actor.name},
+ content: "Êtes-vous une créature humanoïde qui n'a pas fait de sacrifice à Rhya (ou à une autre divinité de la nature ou esprit puissant de la nature auquel le culte de Rhya est bien disposé, comme Isha ou Taal) depuis le dernier équinoxe de printemps ?"
});
if (shouldDamage) {
diff --git a/scripts/sSMg43ZjnNmpytfj.js b/scripts/sSMg43ZjnNmpytfj.js
deleted file mode 100644
index a18fd9b..0000000
--- a/scripts/sSMg43ZjnNmpytfj.js
+++ /dev/null
@@ -1,2 +0,0 @@
-let test = await this.actor.setupSkill(game.i18n.localize("NAME.Cool"), {skipTargets: true, appendTitle : " - " + this.effect.name});
-await test.roll();
diff --git a/scripts/sUHuj00IpoZ7Gd03.js b/scripts/sUHuj00IpoZ7Gd03.js
deleted file mode 100644
index f8f4072..0000000
--- a/scripts/sUHuj00IpoZ7Gd03.js
+++ /dev/null
@@ -1 +0,0 @@
-return args.skill?.name != game.i18n.localize("NAME.Swim");
\ No newline at end of file
diff --git a/scripts/sWyO1DNaqb2EdHoW.js b/scripts/sWyO1DNaqb2EdHoW.js
deleted file mode 100644
index 61e1c1b..0000000
--- a/scripts/sWyO1DNaqb2EdHoW.js
+++ /dev/null
@@ -1,11 +0,0 @@
-if (!this.actor.items.getName(game.i18n.localize("NAME.Frenzy"))) // Either frenzy trait or psychology
-{
- // Add Frenzy psychology
- let item = await fromUuid("Compendium.wfrp4e-core.items.DrNUTPeodEgpWTnT")
- let data = item.toObject();
- data.effects[0].disabled = false;
- this.actor.createEmbeddedDocuments("Item", [data], {fromEffect: this.effect.id})
-}
-
-this.script.scriptMessage(`
En buvant cette potion, ${this.actor.prototypeToken.name} est devenu sujet à la Frénesie. Cette Frénésie dure [[1d10]] Rounds, et ne peut pas se terminer avant.
`,
- {whisper: ChatMessage.getWhisperRecipients("GM"), blind: true })
\ No newline at end of file
diff --git a/scripts/sZwLitzwKBTaFca3.js b/scripts/sZwLitzwKBTaFca3.js
index 34341d3..ff9ec80 100644
--- a/scripts/sZwLitzwKBTaFca3.js
+++ b/scripts/sZwLitzwKBTaFca3.js
@@ -1,4 +1,4 @@
let item = await fromUuid("Compendium.wfrp4e-core.items.Item.5hH73j2NgPdsLCZN")
let data = item.toObject();
-data.name = data.name.replace("Cible", "Peaux vertes, Mort-vivant, Chaos")
+data.name = data.name.replace("Target", "Greenskins, Mort-vivant, Chaos")
this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id})
\ No newline at end of file
diff --git a/scripts/sagKJM6oDFlw4ED2.js b/scripts/sagKJM6oDFlw4ED2.js
deleted file mode 100644
index 4392e3b..0000000
--- a/scripts/sagKJM6oDFlw4ED2.js
+++ /dev/null
@@ -1,3 +0,0 @@
-let test = await this.actor.setupSkill(game.i18n.localize("NAME.Cool"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`});
-await test.roll();
-return test.failed;
\ No newline at end of file
diff --git a/scripts/sbK1a7txpSoXFzyB.js b/scripts/sbK1a7txpSoXFzyB.js
index 2396c93..1bacd08 100644
--- a/scripts/sbK1a7txpSoXFzyB.js
+++ b/scripts/sbK1a7txpSoXFzyB.js
@@ -1,10 +1,15 @@
if (args.test.options.useOnesArgumentative && (args.test.result.roll <= game.settings.get("wfrp4e", "automaticSuccess") || args.test.result.roll <= args.test.target)) {
- let SL = Math.floor(args.test.target / 10) - Math.floor(args.test.result.roll / 10)
- let ones = Number(args.test.result.roll.toString().split("").pop())
+ let SL = Math.floor(args.test.target / 10) - Math.floor(args.test.result.roll / 10)
+ let ones = Number(args.test.result.roll.toString().split("").pop())
- if (ones > SL) {
- args.test.data.result.SL = "+" + (ones + args.test.successBonus + args.test.slBonus)
- args.test.result.other.push(`${this.effect.name}: Utilise le dé d'unité comme DR`)
- }
+ if (ones == 0) {
+ ones = 10;
+ }
+
+
+ if (ones > SL) {
+ args.Test.data.result.SL = "+" + (ones + args.test.successBonus + args.test.slBonus)
+ args.test.result.other.push(`${this.effect.name}: Utilisation de l'unité des dés comme DR`)
+ }
}
\ No newline at end of file
diff --git a/scripts/sgS9rblPkQB36C8S.js b/scripts/sgS9rblPkQB36C8S.js
deleted file mode 100644
index 249616f..0000000
--- a/scripts/sgS9rblPkQB36C8S.js
+++ /dev/null
@@ -1,29 +0,0 @@
-if (this.item.name.includes("("))
-{
- let trade = this.item.parenthesesText;
- if (trade?.toLowerCase() != "any")
- return this.item.updateSource({"system.tests.value" : this.item.system.tests.value.replace("any one", trade)})
-}
-
-let index = game.packs
-.filter(i => i.metadata.type == "Item")
-.reduce((acc, pack) => acc.concat(pack.index.contents), [])
-.filter(i => i.type == "skill" && i.name.includes(game.i18n.localize("NAME.Trade")))
-.map(i => {
- i.id = i._id
- return i
-})
-
-let choice = await ItemDialog.create(index, 1, "Choisissez a Trade Skill")
-let text;
-if (!choice[0])
-{
- let custom = await ValueDialog.create({text : "Enter Custom Trade Skill", title : "Custom Trade"});
- text = custom || ""
-}
-else
-{
- text = game.wfrp4e.utility.extractParenthesesText(choice[0].name)
-}
-
-await this.item.updateSource({name : this.item.name.replace("(Any)", "").replace("(any)", "").trim() + ` (${text})`, "system.tests.value" : this.item.system.tests.value.replace("any one", text)});
\ No newline at end of file
diff --git a/scripts/shkBUtUuMPDKvFm7.js b/scripts/shkBUtUuMPDKvFm7.js
index 601e774..0bfeafb 100644
--- a/scripts/shkBUtUuMPDKvFm7.js
+++ b/scripts/shkBUtUuMPDKvFm7.js
@@ -6,5 +6,5 @@ await test.roll();
if (test.failed)
{
this.actor.addCondition("prone")
- this.script.scriptMessage(`${this.actor.prototypeToken.name} tombe de ${fallen} mètres`)
+ this.script.message(`${this.actor.prototypeToken.name} falls ${fallen} yards`)
}
\ No newline at end of file
diff --git a/scripts/sjnoYbWpAugyDilW.js b/scripts/sjnoYbWpAugyDilW.js
index 298d039..8db279b 100644
--- a/scripts/sjnoYbWpAugyDilW.js
+++ b/scripts/sjnoYbWpAugyDilW.js
@@ -1,10 +1,10 @@
-let test = await args.actor.setupSkill("Charm", {
+let test = await args.actor.setupSkill("Charme", {
appendTitle: ` – ${this.effect.name}`,
skipTargets: true,
fields: {difficulty: 'average'},
characteristic: 'fel',
context: {
- success: "Animal becomes docile towards Humans, Elves who honour Isha, and similar allies."
+ success: "L'animal devient docile envers les Humains, les Elfes qui honorent Isha, et des alliés similaires."
}
});
await test.roll();
\ No newline at end of file
diff --git a/scripts/sm9d5lk6cM0OuUkf.js b/scripts/sm9d5lk6cM0OuUkf.js
index 97c8f33..ac25ac3 100644
--- a/scripts/sm9d5lk6cM0OuUkf.js
+++ b/scripts/sm9d5lk6cM0OuUkf.js
@@ -1 +1 @@
-this.actor.applyFear(Math.min(4, this.effect.sourceTest.result.overcast.usage.other.current))
\ No newline at end of file
+this.actor.applyPeur(Math.min(4, this.effect.sourceTest.result.overcast.usage.other.current))
\ No newline at end of file
diff --git a/scripts/svCqdytEOtqFXCcs.js b/scripts/svCqdytEOtqFXCcs.js
index 44b595a..e9f9a88 100644
--- a/scripts/svCqdytEOtqFXCcs.js
+++ b/scripts/svCqdytEOtqFXCcs.js
@@ -15,9 +15,9 @@ let skillAdvancements = [5, 15, 10, 10, 15, 10, 10, 20]
let talents = ["Magie des Arcanes", "Magie Mineure", "Seconde Vue"]
let trappings = ["Arme simple", "Robes", "(2M) Bâton de combat"]
-let specialItems = [
- {name: "Objet magique", type: "trapping", trappingType: "misc" },
-]
+let specialItems = [
+ {name: "Objet magique", type: "trapping", trappingType: "misc" },
+]
let items = [];
let updateObj = this.actor.toObject();
@@ -46,7 +46,7 @@ for (let index = 0; index < skills.length; index++)
skillItem = updateObj.items.find(i => i.name == skill && i.type == "skill")
if (skillItem)
skillItem.system.advances.value += skillAdvancements[index]
- else
+ else
{
skillItem = await game.wfrp4e.utility.findSkill(skill)
skillItem = skillItem.toObject();
@@ -62,13 +62,13 @@ for (let talent of talents)
{
items.push(talentItem.toObject());
}
- else
+ else
{
- ui.notifications.warn(`Impossible de trouver ${talent}`, {permanent : true})
+ ui.notifications.warn(`Could not find ${talent}`, {permanent : true})
}
}
-for (let trapping of trappings)
+for (let trapping of trappings)
{
let trappingItem = await game.wfrp4e.utility.findItem(trapping)
if (trappingItem)
@@ -79,24 +79,24 @@ for (let trapping of trappings)
items.push(trappingItem);
}
- else
+ else
{
- ui.notifications.warn(`Impossible de trouver ${trapping}`, {permanent : true})
+ ui.notifications.warn(`Could not find ${trapping}`, {permanent : true})
}
}
-let ride = await Dialog.confirm({title : "Skill", content : "Add Chaos Steed and +20 Ride (Horse)?"})
+let ride = await foundry.applications.api.DialogV2.confirm({window : {title : "Compétence"}, content : "Add Chaos Steed and +20 Ride (Horse)?"})
if (ride)
{
- let skill = await game.wfrp4e.utility.findSkill("Ride (Horse)")
+ let skill = await game.wfrp4e.utility.findSkill("Chevaucher (Cheval)")
skill = skill.toObject();
skill.system.advances.value = 20;
items = items.concat({name : "Chaos Steed", type: "trapping", "system.trappingType.value" : "misc"}, skill)
}
-updateObj.name = updateObj.name += " " + this.effect.name
+updateObj.name = updateObj.name += " " + this.effet.name
await this.actor.update(updateObj)
this.actor.createEmbeddedDocuments("Item", items);
diff --git a/scripts/sx7Ikn8WW00gBFb4.js b/scripts/sx7Ikn8WW00gBFb4.js
index 72ec0cd..8b867e0 100644
--- a/scripts/sx7Ikn8WW00gBFb4.js
+++ b/scripts/sx7Ikn8WW00gBFb4.js
@@ -2,14 +2,14 @@ let location = (Math.ceil(CONFIG.Dice.randomUniform() * 2) == 2 ? "r" : "l") + "
if (location == "lArm")
{
- this.script.scriptNotification("Résultat : gauche")
+ this.script.notification("Bras Gauche")
}
else if (location == "rArm")
{
- this.script.scriptNotification("Résultat : Droite")
+ this.script.notification("Bras Droit")
}
-this.effect.updateSource({"flags.wfrp4e.location" : location});
+this.effet.updateSource({"flags.wfrp4e.location" : location});
if (location)
{
@@ -17,7 +17,7 @@ if (location)
if (dropped.length)
{
- this.script.scriptNotification(`Laché ${dropped.map(i => i.name).join(", ")}!`)
+ this.script.notification(`Lâche ${dropped.map(i => i.name).join(", ")}!`)
for(let weapon of dropped)
{
await weapon.system.toggleEquip();
@@ -27,6 +27,6 @@ if (location)
let roll = await new Roll("1d10").roll()
-roll.toMessage(this.script.getChatData({flavor : `${this.effect.name} (Durée)`}));
+roll.toMessage(this.script.getChatData({flavor : `Lâche ${dropped.map(i => i.name).join(", ")}!`}));
-this.effect.updateSource({"duration.rounds" : roll.total})
\ No newline at end of file
+this.effet.updateSource({"duration.rounds" : roll.total})
\ No newline at end of file
diff --git a/scripts/syBgPp7rOymCZejX.js b/scripts/syBgPp7rOymCZejX.js
deleted file mode 100644
index 3007947..0000000
--- a/scripts/syBgPp7rOymCZejX.js
+++ /dev/null
@@ -1,6 +0,0 @@
-let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`})
-await test.roll();
-if (test.failed)
-{
- this.actor.addCondition("stunned")
-}
\ No newline at end of file
diff --git a/scripts/syRJs8P4aBFB5USD.js b/scripts/syRJs8P4aBFB5USD.js
new file mode 100644
index 0000000..63594a2
--- /dev/null
+++ b/scripts/syRJs8P4aBFB5USD.js
@@ -0,0 +1,7 @@
+if (this.actor?.system?.details?.god?.value !== "Sigmar") return
+if (this.actor?.currentCareer?.careergroup?.value !== "Prêtre"
+ && this.actor?.currentCareer?.careergroup?.value !== "Prêtre Guerrier" ) return
+
+let currentSin = this.actor.system.status.sin.value
+let updatedSin = currentSin + 2
+await this.actor.update({"system.status.sin.value": updatedSin})
\ No newline at end of file
diff --git a/scripts/syqqBkyP5tGqZ78t.js b/scripts/syqqBkyP5tGqZ78t.js
index 1aa106f..cbfbf50 100644
--- a/scripts/syqqBkyP5tGqZ78t.js
+++ b/scripts/syqqBkyP5tGqZ78t.js
@@ -1,8 +1,8 @@
this.actor.has("Immunité Psychologique")?.delete();
-let roll = await new Roll("1d10").roll();
+let roll = await new Roll("1d10").roll({allowInteractive : false});
roll.toMessage(this.script.getChatData());
-this.script.scriptNotification(`Immunité Psychologique a été supprimé de l'acteur, ajout de ${roll.total} états Brisé`)
+this.script.notification(`Removed Immunité Psychologique, Adding ${roll.total} Broken Conditions`)
this.actor.addCondition("broken", roll.total, {"flags.wfrp4e.blasted-mind" : true})
\ No newline at end of file
diff --git a/scripts/sz0PqS1kroMOzUZk.js b/scripts/sz0PqS1kroMOzUZk.js
index b01c63a..ce6b9fe 100644
--- a/scripts/sz0PqS1kroMOzUZk.js
+++ b/scripts/sz0PqS1kroMOzUZk.js
@@ -10,12 +10,12 @@ let characteristics = {
"wp" : 15,
"fel" : -20
}
-let skills = ["Melee (Brawling)"]
+let skills = ["Corps à corps (Bagarre)"]
let skillAdvancements = [10]
-let talents = ["Fearless (Everything)", "Frenzy", "Implacable"]
-let trappings = ["Plate Breastplate", "Plate Bracers", "Plate Helm", "Plate Leggings"]
-let specialItems = []
+let talents = ["Peurless (Everything)", "Frénésie", "Endurci"]
+let trappings = ["Plastron d'acier", "Brassards", "Heaume", "Jambières d'acier"]
+let specialItems = []
let items = [];
let updateObj = this.actor.toObject();
@@ -44,7 +44,7 @@ for (let index = 0; index < skills.length; index++)
skillItem = updateObj.items.find(i => i.name == skill && i.type == "skill")
if (skillItem)
skillItem.system.advances.value += skillAdvancements[index]
- else
+ else
{
skillItem = await game.wfrp4e.utility.findSkill(skill)
skillItem = skillItem.toObject();
@@ -60,13 +60,13 @@ for (let talent of talents)
{
items.push(talentItem.toObject());
}
- else
+ else
{
ui.notifications.warn(`Impossible de trouver ${talent}`, {permanent : true})
}
}
-for (let trapping of trappings)
+for (let trapping of trappings)
{
let trappingItem = await game.wfrp4e.utility.findItem(trapping)
if (trappingItem)
@@ -77,13 +77,13 @@ for (let trapping of trappings)
items.push(trappingItem);
}
- else
+ else
{
ui.notifications.warn(`Impossible de trouver ${trapping}`, {permanent : true})
}
}
-updateObj.name = updateObj.name += " " + this.effect.name
+updateObj.name = updateObj.name += " " + this.effet.name
await this.actor.update(updateObj)
console.log(">>>>>>><", items)
diff --git a/scripts/t48hkacYdOpzWvK9.js b/scripts/t48hkacYdOpzWvK9.js
index 6e8c53a..21b79df 100644
--- a/scripts/t48hkacYdOpzWvK9.js
+++ b/scripts/t48hkacYdOpzWvK9.js
@@ -1 +1 @@
-args.options.beatBlade = true;
\ No newline at end of file
+args.context.beatBlade = true;
\ No newline at end of file
diff --git a/scripts/t56mnblo1kv3gM1M.js b/scripts/t56mnblo1kv3gM1M.js
deleted file mode 100644
index 906ab3a..0000000
--- a/scripts/t56mnblo1kv3gM1M.js
+++ /dev/null
@@ -1 +0,0 @@
-return args.skill?.name.includes("Corps à corps (Base)") || (args.type == "weapon" && args.item?.system.weaponGroup.value == "basic");
\ No newline at end of file
diff --git a/scripts/tCIT1a12Gt6k2ohA.js b/scripts/tCIT1a12Gt6k2ohA.js
index 3948c43..8b2d5ed 100644
--- a/scripts/tCIT1a12Gt6k2ohA.js
+++ b/scripts/tCIT1a12Gt6k2ohA.js
@@ -5,17 +5,17 @@ if (this.item.name.includes("(") && !this.item.name.toLowerCase().includes("(any
}
else
{
- resistance = await ValueDialog.create({text : "Enter Resistance", title : "Resistance"})
+ 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.effect.updateSource({name : this.effect.name + ` (${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)})
+this.item.updateSource({"system.tests.value" : this.item.system.Tests.value.replace("the associated Threat", resistance)})
-if (resistance && !this.effect.name.includes("("))
+if (resistance && !this.effet.name.includes("("))
{
this.effect.updateSource({name : this.effect.name += ` (${resistance})`})
}
\ No newline at end of file
diff --git a/scripts/tDrs0aNIYmZPsOoS.js b/scripts/tDrs0aNIYmZPsOoS.js
deleted file mode 100644
index 51bdf06..0000000
--- a/scripts/tDrs0aNIYmZPsOoS.js
+++ /dev/null
@@ -1,6 +0,0 @@
-let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`});
-await test.roll();
-if (test.failed)
-{
- this.actor.addCondition("prone")
-}
diff --git a/scripts/tG1qGqzBLmAR3WHm.js b/scripts/tG1qGqzBLmAR3WHm.js
deleted file mode 100644
index 64fa199..0000000
--- a/scripts/tG1qGqzBLmAR3WHm.js
+++ /dev/null
@@ -1,15 +0,0 @@
-let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`})
-await test.roll();
-if (test.failed)
-{
- let add = 0
-
- if (test.result.roll % 11 == 0 || test.result.roll == 100)
- {
- add = 1 // can't use isFumble if no hit location
- }
-
- await this.actor.addCondition("stunned", Math.max(1, Math.abs(test.result.SL)) + add)
- await this.actor.addCondition("blinded", Math.max(1, Math.abs(test.result.SL)))
-
-}
\ No newline at end of file
diff --git a/scripts/tGVEV6TLl310mFLP.js b/scripts/tGVEV6TLl310mFLP.js
index 8ca630f..7e023f5 100644
--- a/scripts/tGVEV6TLl310mFLP.js
+++ b/scripts/tGVEV6TLl310mFLP.js
@@ -1,5 +1,5 @@
let nonmagical = args.modifiers.ap.value - args.modifiers.ap.magical
-if (args.applyAP && nonmagical)
+if (args.applyAP && nonmagical)
{
let nonmagical = args.modifiers.ap.value - args.modifiers.ap.magical
args.modifiers.ap.ignored += nonmagical
diff --git a/scripts/tHBlC7SpYiQ7SUGo.js b/scripts/tHBlC7SpYiQ7SUGo.js
new file mode 100644
index 0000000..8684f63
--- /dev/null
+++ b/scripts/tHBlC7SpYiQ7SUGo.js
@@ -0,0 +1 @@
+return args.characteristic !== "t";
\ No newline at end of file
diff --git a/scripts/tNTO1LVN7JqHf4YN.js b/scripts/tNTO1LVN7JqHf4YN.js
index b3c20cc..6ef02e0 100644
--- a/scripts/tNTO1LVN7JqHf4YN.js
+++ b/scripts/tNTO1LVN7JqHf4YN.js
@@ -1,8 +1,8 @@
-if (args.test.characteristicKey == "wp")
+if (args.test.characteristicKey == "wp")
{
- if (args.test.failed)
+ if (args.Test.Échoué)
{
this.actor.createEmbeddedDocuments("ActiveEffect", [game.wfrp4e.config.symptomEffects["malaise"]])
- this.script.scriptMessage(`Test de Force Mentale échoué, ${this.actor.prototypeToken.name} subit @Condition[Malaise] pour [[1d10]] heures`, {whisper: ChatMessage.getWhisperRecipients("GM")})
+ this.script.message(`Test de FM échoué, ${this.actor.prototypeToken.name} gains @Condition[Malaise] for [[1d10]] hours`, {whisper: ChatMessage.getWhisperRecipients("GM")})
}
}
\ No newline at end of file
diff --git a/scripts/tUwP7TjrOOOnaCYJ.js b/scripts/tUwP7TjrOOOnaCYJ.js
index 847aba0..3653502 100644
--- a/scripts/tUwP7TjrOOOnaCYJ.js
+++ b/scripts/tUwP7TjrOOOnaCYJ.js
@@ -1,10 +1,10 @@
let fatigued = this.actor.hasCondition("fatigued")
if (fatigued)
{
- this.script.scriptNotification(`Suppression de ${fatigued.conditionValue} états Fatigué`)
- fatigued.delete();
+ this.script.notification(`Suppression de ${fatigued.conditionValue} états Extenué`)
+ fatigued.delete();
}
-else
+else
{
- this.script.scriptNotification(`Aucun état Fatigué`)
+ this.script.notification(`Aucun état Extenué`)
}
\ No newline at end of file
diff --git a/scripts/tcZug8ehU6lyYBd9.js b/scripts/tcZug8ehU6lyYBd9.js
deleted file mode 100644
index 1b51877..0000000
--- a/scripts/tcZug8ehU6lyYBd9.js
+++ /dev/null
@@ -1 +0,0 @@
-return args.skill?.name != "Projectiles (Poudre noire)"
\ No newline at end of file
diff --git a/scripts/tfdKU6nmvUtEjXE2.js b/scripts/tfdKU6nmvUtEjXE2.js
deleted file mode 100644
index ba0a3cb..0000000
--- a/scripts/tfdKU6nmvUtEjXE2.js
+++ /dev/null
@@ -1,38 +0,0 @@
-let choice = await Dialog.wait({
- title : "Choice",
- content :
- `
- Select your choice
-
- `,
- buttons : {
- 1 : {
- label : "Shield",
- callback : () => {
- return "shield"
- }
- },
- 2 : {
- label : "Two-Handed Weapon",
- callback : () => {
- return "twohanded"
- }
- },
- }
-})
-
-let weapons = await warhammer.utility.findAllItems("weapon", "Loading Weapons");
-let items
-if (choice == "shield")
-{
- items = await game.wfrp4e.apps.ItemDialog.create(weapons.filter(i => i.system.properties.qualities.shield), 1, "Choisissez a Shield");
-}
-else if (choice == "twohanded")
-{
- items = await game.wfrp4e.apps.ItemDialog.create(weapons.filter(i => i.system.weaponGroup.value == "twohanded"), 1, "Choisissez a Two-Handed Weapon");
-}
-items = items.map(i => i.toObject())
-
-items.forEach(i => i.system.equipped.value)
-
-this.actor.createEmbeddedDocuments("Item", items);
diff --git a/scripts/tg9N6aUo8WRPKj3H.js b/scripts/tg9N6aUo8WRPKj3H.js
new file mode 100644
index 0000000..5d74f84
--- /dev/null
+++ b/scripts/tg9N6aUo8WRPKj3H.js
@@ -0,0 +1,11 @@
+// If the creature currently has a Surprised, Unconscious, or Entangled Condition, it does not gain this Advantage.
+const surprised = this.actor.hasCondition("surprised")
+const unconscious = this.actor.hasCondition("unconscious")
+const entangled = this.actor.hasCondition("entangled")
+if (entangled || unconscious || surprised) return
+
+// If, at the beginning of its turn, this creature does not have at least Rating Advantage points, its Advantage pool immediately increases to Rating.
+const grimRating = parseInt(this.item.specification.value) || 1
+if (grimRating > this.actor.status.advantage.value) {
+ this.actor.setAdvantage(grimRating)
+}
\ No newline at end of file
diff --git a/scripts/tkZ8Ybqu518LQYEn.js b/scripts/tkZ8Ybqu518LQYEn.js
new file mode 100644
index 0000000..b6f16a4
--- /dev/null
+++ b/scripts/tkZ8Ybqu518LQYEn.js
@@ -0,0 +1,2 @@
+await args.actor.addCondition("ablaze");
+ args.actor.addEffectItems("Compendium.wfrp4e-core.items.Item.4CMKeDTDrRQZbPIJ", this.effect, [{"system.specification.value": "Krezok Soulflayer"}])
\ No newline at end of file
diff --git a/scripts/tn6SwmjAuNzqE6dx.js b/scripts/tn6SwmjAuNzqE6dx.js
deleted file mode 100644
index e3cc68b..0000000
--- a/scripts/tn6SwmjAuNzqE6dx.js
+++ /dev/null
@@ -1,14 +0,0 @@
-let damage = 0
-let test = await this.actor.setupSkill("Esquive", {skipTargets: true, appendTitle : ` - ${this.effect.name}`});
-await test.roll();
-
-if (test.succeeded)
-{
- damage = 10;
-}
-else if (test.failed)
-{
- damage = 20;
-}
-
-this.script.scriptMessage(await this.actor.applyBasicDamage(damage, {loc : "roll", hideDSN: true, suppressMsg : true}))
\ No newline at end of file
diff --git a/scripts/tnE8LF6E3svIlLca.js b/scripts/tnE8LF6E3svIlLca.js
deleted file mode 100644
index 4058efe..0000000
--- a/scripts/tnE8LF6E3svIlLca.js
+++ /dev/null
@@ -1 +0,0 @@
-return args.skill?.name == game.i18n.localize("NAME.Research");
\ No newline at end of file
diff --git a/scripts/tnilBagajWM8UGQt.js b/scripts/tnilBagajWM8UGQt.js
deleted file mode 100644
index 1b8e882..0000000
--- a/scripts/tnilBagajWM8UGQt.js
+++ /dev/null
@@ -1 +0,0 @@
-return args.item?.name != game.i18n.localize("NAME.ConsumeAlcohol")
\ No newline at end of file
diff --git a/scripts/toSrgcvWq9b5eN0K.js b/scripts/toSrgcvWq9b5eN0K.js
index 01c486e..249ea79 100644
--- a/scripts/toSrgcvWq9b5eN0K.js
+++ b/scripts/toSrgcvWq9b5eN0K.js
@@ -1,4 +1,4 @@
let location = await game.wfrp4e.tables.rollTable("hitloc", {hideDSN: true})
this.item.updateSource({name : `${this.item.name} (${location.description})`})
-this.script.scriptMessage(`Localisation: ${location.description}`, { whisper: ChatMessage.getWhisperRecipients("GM") })
\ No newline at end of file
+this.script.message(`Localisation: ${location.description}`, { whisper: ChatMessage.getWhisperRecipients("GM") })
\ No newline at end of file
diff --git a/scripts/tolkNN5P7oOC8GKZ.js b/scripts/tolkNN5P7oOC8GKZ.js
deleted file mode 100644
index e030d9d..0000000
--- a/scripts/tolkNN5P7oOC8GKZ.js
+++ /dev/null
@@ -1,11 +0,0 @@
-let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields : {difficulty : "difficult"}})
-await test.roll();
-
-if (test.failed)
-{
- let sourceActor = this.effect.sourceActor;
- if (sourceActor)
- {
- this.script.scriptMessage(await this.actor.applyBasicDamage(sourceActor.system.characteristics.wp.bonus, {suppressMsg : true, damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL}))
- }
-}
\ No newline at end of file
diff --git a/scripts/tpz88eQFTjWHdFL5.js b/scripts/tpz88eQFTjWHdFL5.js
new file mode 100644
index 0000000..b66be3e
--- /dev/null
+++ b/scripts/tpz88eQFTjWHdFL5.js
@@ -0,0 +1 @@
+return args.item?.system?.attackType != "ranged" || this.item != args.item || this.actor.isOpposing
\ No newline at end of file
diff --git a/scripts/tuIsytv3jl2yAIb2.js b/scripts/tuIsytv3jl2yAIb2.js
deleted file mode 100644
index cf810e0..0000000
--- a/scripts/tuIsytv3jl2yAIb2.js
+++ /dev/null
@@ -1 +0,0 @@
-return args.skill?.name !== game.i18n.localize("NAME.Charm") && args.skill?.name !== game.i18n.localize("NAME.Intimidate") && args.skill?.name !== game.i18n.localize("NAME.Leadership")
\ No newline at end of file
diff --git a/scripts/tyQLkRLk1AXB4g2u.js b/scripts/tyQLkRLk1AXB4g2u.js
new file mode 100644
index 0000000..4cdc5c6
--- /dev/null
+++ b/scripts/tyQLkRLk1AXB4g2u.js
@@ -0,0 +1,13 @@
+if (args.test.succeeded) {
+ args.test.result.critical = "Critical"
+
+ args.test.result.tables.critical = {
+ label : args.test.result.critical,
+ class : "Critique-roll",
+ modifier : args.test.result.critModifier,
+ key: `crit${args.test.result.hitloc.result}`
+ }
+
+ args.Test.result.other.push (`${this.effect.name}: Tout les succès sont des Critiques.`)
+
+}
\ No newline at end of file
diff --git a/scripts/u3olS2p7Ls1JXfAH.js b/scripts/u3olS2p7Ls1JXfAH.js
index 5ee90b2..65de5e0 100644
--- a/scripts/u3olS2p7Ls1JXfAH.js
+++ b/scripts/u3olS2p7Ls1JXfAH.js
@@ -1 +1 @@
-this.script.scriptMessage(await game.wfrp4e.tables.formatChatRoll("mutatephys", {}, "Tzeentch"));
\ No newline at end of file
+this.script.message(await game.wfrp4e.tables.formatChatRoll("mutatephys", {}, "Tzeentch"));
\ No newline at end of file
diff --git a/scripts/u46KnlxCjP42F6QY.js b/scripts/u46KnlxCjP42F6QY.js
new file mode 100644
index 0000000..3af88f1
--- /dev/null
+++ b/scripts/u46KnlxCjP42F6QY.js
@@ -0,0 +1,10 @@
+let table = await fromUuid("RollTable.uATmVS40DQLC1woJ");
+
+if (table)
+{
+ table.roll();
+}
+else
+{
+ this.script.notification("Table des Traits de personnalité introuvable", "error");
+}
\ No newline at end of file
diff --git a/scripts/u4fKgGFEnOCnvvsv.js b/scripts/u4fKgGFEnOCnvvsv.js
new file mode 100644
index 0000000..19822ee
--- /dev/null
+++ b/scripts/u4fKgGFEnOCnvvsv.js
@@ -0,0 +1 @@
+return args.item?.system?.isProjectiles;
\ No newline at end of file
diff --git a/scripts/uA5qaat5EXzkzltq.js b/scripts/uA5qaat5EXzkzltq.js
new file mode 100644
index 0000000..1b5f535
--- /dev/null
+++ b/scripts/uA5qaat5EXzkzltq.js
@@ -0,0 +1,10 @@
+let test = await this.actor.setupSkill(game.i18n.localize("NAME.Résistance"), {fields : {difficulty : "difficult"}, appendTitle : ` - ${this.effect.name}`})
+await test.roll();
+if (!test.succeeded)
+{
+ let plague = await fromUuid("Compendium.wfrp4e-core.items.Item.aKiuGzlVO51JvsjV")
+ let obj = plague.toObject();
+ await this.actor.createEmbeddedDocuments("Item", [obj]);
+}
+
+this.effect.delete();
\ No newline at end of file
diff --git a/scripts/uACa6u4JLNMRgFlr.js b/scripts/uACa6u4JLNMRgFlr.js
deleted file mode 100644
index 187f0c5..0000000
--- a/scripts/uACa6u4JLNMRgFlr.js
+++ /dev/null
@@ -1,2 +0,0 @@
-const talents = await Promise.all(["Assaut féroce", "Pied marin"].map(game.wfrp4e.utility.findTalent))
-this.actor.createEmbeddedDocuments("Item", talents, {fromEffect : this.effect.id})
\ No newline at end of file
diff --git a/scripts/uCJk19rijMPRU8jg.js b/scripts/uCJk19rijMPRU8jg.js
new file mode 100644
index 0000000..3d0afbd
--- /dev/null
+++ b/scripts/uCJk19rijMPRU8jg.js
@@ -0,0 +1,3 @@
+return this.item.equipped.value
+ && args?.weapon
+ && (["giant"].includes(args.target.Species.toLowerCase()))
\ No newline at end of file
diff --git a/scripts/uEVSUTTam4Z96JJ2.js b/scripts/uEVSUTTam4Z96JJ2.js
new file mode 100644
index 0000000..b91829b
--- /dev/null
+++ b/scripts/uEVSUTTam4Z96JJ2.js
@@ -0,0 +1,7 @@
+if (this.item.equipped.value
+ && args.opposedTest.attackerTest.item
+ && (args.opposedTest.attackerTest.item.isProjectiles || args.opposedTest.attackerTest?.spell)
+ )
+{
+ args.modifiers.other.push({label : this.effect.name, details : "Réduction des Dégâts", value : -2})
+}
\ No newline at end of file
diff --git a/scripts/uLBDnWC3S0lRitbj.js b/scripts/uLBDnWC3S0lRitbj.js
index 7bf367c..4186cc2 100644
--- a/scripts/uLBDnWC3S0lRitbj.js
+++ b/scripts/uLBDnWC3S0lRitbj.js
@@ -1,7 +1,7 @@
let test = await this.actor.setupCharacteristic("int", {skipTargets: true, appendTitle : ` - ${this.effect.name}`})
await test.roll();
-let opposedResult = test.opposedMessages[0]?.getOppose()?.resultMessage?.getOpposedTest()?.result
+let opposedResult = test.opposedMessages[0]?.system.opposedHandler?.resultMessage?.system.opposedTest?.result
if (opposedResult?.winner == "attacker")
{
@@ -9,14 +9,14 @@ if (opposedResult?.winner == "attacker")
{
this.actor.addCondition("unconscious")
await this.actor.update({"system.status.corruption.value" : parseInt(this.actor.status.corruption.value) + 1})
- this.script.scriptMessage("Reçoit un Point de Corruption", {whisper : ChatMessage.getWhisperRecipients("GM")})
+ this.script.message("Gain de 1 Point de Corruption", {whisper : ChatMessage.getWhisperRecipients("GM")})
}
- else
+ else
{
await this.actor.addCondition("stunned", 1 + opposedResult.differenceSL);
}
}
-else
+else
{
return false;
}
\ No newline at end of file
diff --git a/scripts/uMvD2HWFNGqCmrBM.js b/scripts/uMvD2HWFNGqCmrBM.js
new file mode 100644
index 0000000..fd5055b
--- /dev/null
+++ b/scripts/uMvD2HWFNGqCmrBM.js
@@ -0,0 +1,5 @@
+if (args.test.options.addChargingDice)
+{
+ args.test.result.diceDamage = {formula: "1d10", value : Math.ceil(CONFIG.Dice.randomUniform() * 10) }
+ args.test.result.additionalDamage += args.test.result.diceDamage.value;
+}
\ No newline at end of file
diff --git a/scripts/uRiAvo9fb3U7FIIy.js b/scripts/uRiAvo9fb3U7FIIy.js
new file mode 100644
index 0000000..dd2b981
--- /dev/null
+++ b/scripts/uRiAvo9fb3U7FIIy.js
@@ -0,0 +1 @@
+if (!this.actor.has("Bénédiction de Puissance","prayer")) this.actor.addEffectItems("Compendium.wfrp4e-core.items.Item.KSDrXcieyRc37YI7", this.effect)
\ No newline at end of file
diff --git a/scripts/uSwkYENTOcnfRrqA.js b/scripts/uSwkYENTOcnfRrqA.js
deleted file mode 100644
index 05d9ada..0000000
--- a/scripts/uSwkYENTOcnfRrqA.js
+++ /dev/null
@@ -1 +0,0 @@
-return !args.skill?.name.includes(game.i18n.localize("NAME.Melee")) && args.weapon?.system?.attackType != "melee"
\ No newline at end of file
diff --git a/scripts/uZeNKQ24fToJ7qtY.js b/scripts/uZeNKQ24fToJ7qtY.js
new file mode 100644
index 0000000..6f0706a
--- /dev/null
+++ b/scripts/uZeNKQ24fToJ7qtY.js
@@ -0,0 +1,15 @@
+let addWounds = 0
+switch (args.actor.system.details.size.value) {
+ case "lrg":
+ addWounds = 5
+ break
+ case "enor":
+ addWounds = 10
+ break
+ case "mnst":
+ addWounds = 15
+ break
+}
+if (addWounds > 0) {
+ args.modifiers.other.push({label : this.effect.name, details : "Augmentation des Dégâts", value : addWounds})
+}
\ No newline at end of file
diff --git a/scripts/ucF4aiJ1gpDB333G.js b/scripts/ucF4aiJ1gpDB333G.js
index 6c8bb05..7d00add 100644
--- a/scripts/ucF4aiJ1gpDB333G.js
+++ b/scripts/ucF4aiJ1gpDB333G.js
@@ -1,5 +1,5 @@
if (args.test.options.catfall && (args.test.result.roll <= game.settings.get("wfrp4e", "automaticSuccess") || args.test.result.roll <= args.test.target) && !args.test.result.catfall)
{
- args.test.result.other.push(`${this.effect.name}: Dommages de chutes réduit de ${Number(args.test.result.SL) + 1} mètres`)
+ args.test.result.other.push(`${this.effect.name}: Fall distance damage reduced by ${Number(args.test.result.SL) + 1} yards`)
args.test.result.catfall = true; // Prevent duplicate messages
}
\ No newline at end of file
diff --git a/scripts/ugL5IBB6R2yWyMWd.js b/scripts/ugL5IBB6R2yWyMWd.js
index 97340d8..7c49ab4 100644
--- a/scripts/ugL5IBB6R2yWyMWd.js
+++ b/scripts/ugL5IBB6R2yWyMWd.js
@@ -1,23 +1,23 @@
if (args.totalWoundLoss > 0)
{
- let apply = await Dialog.confirm({title : this.effect.name, content : `
Appliquer les dégats de ${this.effect.name}? L'attaquant doit avoir utilisé ses mains nues ou une arme de mêlée faite de métal.`})
+ let apply = await foundry.applications.api.DialogV2.confirm({window : {title : this.effect.name}, content : `
Appliquer les dégats de ${this.effect.name} ? L'attaquant doit avoir utilisé ses mains nues ou une arme de mêlée en métal.`})
if (apply)
{
-
+
let damage = 5 + this.actor.characteristics.wp.bonus;
-
+
let loc = args.opposedTest.attackerTest.weapon?.system.usesHands[0] || "rArm";
-
+
let APatLoc = args.opposedTest.attacker.system.status.armour[loc];
-
+
let metalAP = APatLoc.layers.reduce((metal, layer) => metal += (layer.metal ? layer.value : 0), 0)
-
+
let APused = Math.max(0, APatLoc.value - metalAP); // remove metal AP at location;
-
+
damage -= (APused + args.opposedTest.attacker.system.characteristics.t.bonus)
-
+
let msg = await args.opposedTest.attacker.applyBasicDamage(damage, {suppressMsg : true, damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});
- msg += ` (${metalAP} PA métalliques ignorés sur ${game.wfrp4e.config.locations[loc]})`
- this.script.scriptMessage(msg)
+ msg += ` (Ignore ${metalAP} PA de métal sur ${game.wfrp4e.config.locations[loc]})`
+ this.script.message(msg)
}
}
\ No newline at end of file
diff --git a/scripts/uhCq5NwjQ2a2idPn.js b/scripts/uhCq5NwjQ2a2idPn.js
index 632deef..03db384 100644
--- a/scripts/uhCq5NwjQ2a2idPn.js
+++ b/scripts/uhCq5NwjQ2a2idPn.js
@@ -1,5 +1,5 @@
-const repaired_message = `
Réparation finie ${this.item.name}.
`;
-const test = 'Trade (Tailor)';
+const repaired_message = `
Réparation terminée ${this.item.name}.
`;
+const Test = 'Trade (Tailor)';
const difficulty = 'easy';
const target = 30;
@@ -12,8 +12,8 @@ const extendedTestData = {
current: 0,
target: target
},
- test: {
- value: test
+ Test: {
+ value: Test
},
completion: {
value: "remove"
@@ -24,7 +24,7 @@ const extendedTestData = {
},
effects: [
{
- name: `Réparer ${this.item.name}`,
+ name: `Réparation de ${this.item.name}`,
img: this.item.img,
system: {
transferData : {
diff --git a/scripts/ulXfbycWUu36vdmS.js b/scripts/ulXfbycWUu36vdmS.js
new file mode 100644
index 0000000..48dac2d
--- /dev/null
+++ b/scripts/ulXfbycWUu36vdmS.js
@@ -0,0 +1,7 @@
+let test = await this.actor.setupSkill(game.i18n.localize("NAME.Cool"), {appendTitle : ` - ${this.effect.name}`, fields : {difficulty : "difficult", slBonus : -1 * this.effet.sourceTest.result.SL}})
+await Test.roll();
+if (Test.succeeded)
+{
+ this.script.notification(`Résistance à ${this.effect.name}`);
+}
+return test.failed;
\ No newline at end of file
diff --git a/scripts/upfK6GM33qZCZjll.js b/scripts/upfK6GM33qZCZjll.js
deleted file mode 100644
index f2e0c11..0000000
--- a/scripts/upfK6GM33qZCZjll.js
+++ /dev/null
@@ -1 +0,0 @@
-return args.item?.name != "Musicien (Luth)"
\ No newline at end of file
diff --git a/scripts/uwdQvZtzy2HVeEzx.js b/scripts/uwdQvZtzy2HVeEzx.js
deleted file mode 100644
index f181413..0000000
--- a/scripts/uwdQvZtzy2HVeEzx.js
+++ /dev/null
@@ -1,14 +0,0 @@
-if (args.totalWoundLoss > 0)
-{
- let roll = await new Roll("1d10").roll();
- roll.toMessage(this.script.getChatData());
- args.modifiers.other.push({label : this.effect.name, value : roll.total})
-
- args.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {fields : {difficulty : "hard"}, skipTargets: true, appendTitle : " - " + this.effect.name}).then(async test => {
- await test.roll();
- if (test.failed)
- {
- this.script.scriptMessage("" + args.actor.name + " subit un @Table[critbody]{Blessure Critique} au torse", {whisper: ChatMessage.getWhisperRecipients("GM")})
- }
- })
-}
diff --git a/scripts/ux3jaLpAUhZ5YqA6.js b/scripts/ux3jaLpAUhZ5YqA6.js
deleted file mode 100644
index 66cae1b..0000000
--- a/scripts/ux3jaLpAUhZ5YqA6.js
+++ /dev/null
@@ -1 +0,0 @@
-return args.item?.name != game.i18n.localize("NAME.Leadership") && args.item?.name != game.i18n.localize("NAME.Cool")
\ No newline at end of file
diff --git a/scripts/v00nVCRKqqRvY28t.js b/scripts/v00nVCRKqqRvY28t.js
index 7d632a2..b2f1300 100644
--- a/scripts/v00nVCRKqqRvY28t.js
+++ b/scripts/v00nVCRKqqRvY28t.js
@@ -1,4 +1,4 @@
-let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields: {difficulty: "hard"}});
+let test = await this.actor.setupSkill(game.i18n.localize("NAME.Résistance"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields: {difficulty: "hard"}});
await test.roll();
if (test.failed)
{
diff --git a/scripts/v18mmwUmuKiVfwzQ.js b/scripts/v18mmwUmuKiVfwzQ.js
index 518055f..7109477 100644
--- a/scripts/v18mmwUmuKiVfwzQ.js
+++ b/scripts/v18mmwUmuKiVfwzQ.js
@@ -1,4 +1,4 @@
-let test = await this.actor.setupTest(game.i18n.localize("NAME.Endurance"), {appendTitle : ` - ${this.effect.name}`, skipTargets: true});
+let test = await this.actor.setupTest(game.i18n.localize("NAME.Résistance"), {appendTitle : ` - ${this.effect.name}`, skipTargets: true});
await test.roll();
if (test.failed)
{
diff --git a/scripts/v4CCxVaVGf9i8U7X.js b/scripts/v4CCxVaVGf9i8U7X.js
index cd216b9..12c380e 100644
--- a/scripts/v4CCxVaVGf9i8U7X.js
+++ b/scripts/v4CCxVaVGf9i8U7X.js
@@ -1,24 +1,10 @@
-let cured = await Dialog.wait({
- title : this.effect.name,
- content : "
Entrez le nombre de Poisons/Maladies soignés
",
- buttons : {
- confirm : {
- label : "Confirmer",
- callback : (dlg) => {
- let input = dlg.find("input");
- value = parseInt(input[0].value);
- return value;
- }
- }
- }
-})
-
+let cured = await ValueDialog.create({text : "Entrez le nombre de maladies/poisons soignés", title : this.effect.name})
let damage = 0;
let rolls = new Array(cured).fill("").map(i => `max(0, 1d10 - ${this.actor.system.characteristics.fel.bonus})`)
-let test = new Roll(`${rolls.join(" + ")}`);
+let Test = new Roll(`${rolls.join(" + ")}`);
await test.roll();
test.toMessage({speaker : {alias : this.actor.name}, flavor : this.effect.name});
-this.script.scriptMessage(await this.actor.applyBasicDamage(test.total, { damageType: game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL, suppressMsg : true }))
\ No newline at end of file
+this.script.message(await this.actor.applyBasicDamage(test.total, { damageType: game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL, suppressMsg : true }))
\ No newline at end of file
diff --git a/scripts/v5xrDWcrTNFJkyQB.js b/scripts/v5xrDWcrTNFJkyQB.js
index aaf860a..a3cefda 100644
--- a/scripts/v5xrDWcrTNFJkyQB.js
+++ b/scripts/v5xrDWcrTNFJkyQB.js
@@ -1,58 +1,50 @@
-let choice1 = [
- {
- type : "skill",
- name : "Projectiles (Arc)",
- diff : {
- system : {
- advances : {
- value : 10
+let addOption = await foundry.applications.api.DialogV2.confirm({
+ window : {title : "Option"},
+ content :
+ `
+ Ajouter une option?
+
+ Projectiles (Arc) +10 et un Arc long avec 12 flèches
+
${speaker.alias} est immergé dans la Elémentair de Mer et subit la @UUID[Compendium.wfrp4e-core.journals.JournalEntry.NS3YGlJQxwTggjRX.JournalEntryPage.WCivInLZrqEtZzF4#drowning-and-suffocation]{Suffocation}
\n It’s up to Ranald if their regenerating can outpace their poisoning.
\n
When all Poisoned Conditions are lost, so too is Regenerate.
": "
${this.actor.prototypeToken.name} a :\n
\n
Acquis 3 états Empoisonné qui ne peuvent pas être résistés au début du round.
\n
Récupération de ${this.actor.system.characteristics.t.bonus} Blessures
\n
Acquisition du Trait de Créature Régénération.
\n
\n C’est à Ranald de décider si leur régénération peut dépasser leur empoisonnement.
\n
Lorsque tous les états Empoisonné sont perdus, la Régénération l’est aussi.
",
+ "Could not find ${lore} spell. Try Again": "Chargement des sorts",
+ "Target has Aethyric Attunement or Second Sight": "La Cible possède Harmonisation Aethyrique ou Seconde Vue",
+ "Mutation table not found, please ensure a table with the `mutatephys` key is imported in the world.": "Table de Mutation introuvable, veuillez vous assurer qu'une table avec la clé `mutatephys` est importée dans le monde.",
+ ", this.actor).roll()\n\nroll.toMessage(this.script.getChatData({flavor : `${this.effect.name} (Duration)`}));\n\nthis.effect.updateSource({": ")}!`)\n for(let weapon of dropped)\n {\n await weapon.system.toggleEquip();\n }\n }\n}\n\nlet roll = await new Roll(",
+ "${this.effect.name} (Duration)": "Dropped ${dropped.map(i => i.name).join(\", \")}!",
+ ": Ignore Metal (": ": Ignorer Métal (",
+ "Healed ${wounds} Wounds": "Soigne ${wounds} Blessures",
+ "Fear": "Peur",
+ "${this.effect.name}: Automatic Failure": "${this.effect.name}: Echec Automatique",
+ "Enter Target Species (singular)": "Saisir l'espèce cible (singulier)",
+ "Victory Notes for Experience Log": "Notes de Victoire pour le Journal d'Expérience",
+ ")])).map(i => i.text)\n \n for (let ch in characteristics)\n {\n updateObj.system.characteristics[ch].modifier += characteristics[ch];\n }\n \n for (let talent of talents)\n {\n let talentItem = await game.wfrp4e.utility.findTalent(talent)\n if (talentItem)\n {\n items.push(talentItem.toObject());\n }\n else \n {\n ui.notifications.warn(`Could not find ${talent}`, {permanent : true})\n }\n }\n \n \n await this.actor.update(updateObj)\n this.actor.createEmbeddedDocuments(": ")])).map(i => i.text)\n\n for (let ch in characteristics)\n {\n updateObj.system.characteristics[ch].modifier += characteristics[ch];\n }\n\n for (let talent of talents)\n {\n let talentItem = await game.wfrp4e.utility.findTalent(talent)\n if (talentItem)\n {\n items.push(talentItem.toObject());\n }\n else\n {\n ui.notifications.warn(`Impossible de trouver ${talent}`, {permanent : true})\n }\n }\n\n\n await this.actor.update(updateObj)\n this.actor.createEmbeddedDocuments(",
+ "Blinded while wearing the ${this.item.name}": "Aveuglé en portant ${this.item.name}",
+ "Choose Rune": "Choisissez une Rune",
+ "Cannot enter ${this.effect.name}!": "Impossible d'entrer dans ${this.effect.name} !",
+ "Healed ${healed} Wounds": "Soin de ${healed} Blessures",
+ "Endurance": "Résistance",
+ "(ignored ${metalAP} metal AP on ${game.wfrp4e.config.locations[loc]})": "(Ignore ${metalAP} PA de métal sur ${game.wfrp4e.config.locations[loc]})",
+ "Removed Broken.": "Condition Brisé supprimée.",
+ "Enter Armour value": "Entrez la valeur d'Armure",
+ "Cannot Dodge!": "Impossible d'Esquiver!",
+ "None left!": "Plus rien !",
+ "${this.effect.name}: Gained ${this.item.Advances} Advantage": "${this.effect.name}: Gain de ${this.item.Advances} Avantage(s)",
+ "Sail (Skycraft)": "Voile (Aéronavale)",
+ "No effect at 0 Wounds": "Aucun effet à 0 Blessures",
+ "Healed ${this.actor.characteristics.t.bonus} Wounds": "Soin de ${this.actor.characteristics.t.bonus} Blessures",
+ "Removing Fatigued Condition, disabled effect": "Etat Fatigué - Suppression de la condition Fatigué, effet désactivé",
+ "Wyrmslayer: Ignore TB vs Dragons": "Wyrmslayer: Ignore le BE contre les Dragons",
+ "Suffered @Condition[Fatigued] because of nightmares.": "Subi la @Condition[Fatigued] à cause de cauchemars.",
+ "Suffered nightmares, but slept well enough.": "Subi la @Condition[Fatigued] à cause de cauchemars.",
+ "Venom": "Venin",
+ "${this.effect.name}: Wound loss capped to 10": "${this.effect.name}: Perte de Blessures limitée à 10",
+ "Ethereal": "Éthéré",
+ ")\n if (traitItem)\n { \n let t = traitItem.toObject();\n t.system.specification.value = trait.value;\n if (trait.disabled)\n {\n t.system.disabled = true;\n }\n items.push(t);\n }\n else \n {\n ui.notifications.warn(`Could not find ${trait.name}`, {permanent : true})\n }\n}\n \n\n\nupdateObj.name = updateObj.name +=": "} ];\nlet items = [];\n\nlet updateObj = this.actor.toObject();\nfor (let ch in characteristics)\n{\n updateObj.system.characteristics[ch].modifier += characteristics[ch];\n}\n\nupdateObj.system.characteristics.int.initial = 0;\nupdateObj.system.characteristics.wp.initial = 0;\nupdateObj.system.characteristics.fel.initial = 0;\n\nfor (let trait of traits)\n{\n let traitItem = await game.wfrp4e.utility.find(trait.name,",
+ "Could not find ${trait.name}": ": -200\n}\nlet traits = [ {name:",
+ "Fortune point stolen from ${this.actor.name}": "1 Point de Chance volé à ${this.actor.name}",
+ "let weapons = args.actor.itemTypes.weapon.filter(i => !i.system.location.value);\nlet armour = args.actor.itemTags.armour.filter(i => !i.system.location.value);\nfor(let item of weapons)\n{\n\tif (item.system.properties.qualities.shield)\n\t{\n\t\tawait item.system.damageItem(1, \"shield\");\n\t}\n\telse \n\t{\n\t\tawait item.system.damageItem(1);\n\t}\n\tmsg +=": "let weapons = args.actor.itemTypes.weapon.filter(i => !i.system.location.value);\nlet armour = args.actor.itemTags.armour.filter(i => !i.system.location.value);\nfor(let item of weapons)\n{\n\tif (item.system.properties.qualities.shield)\n\t{\n\t\tawait item.system.damageItem(1, \"shield\");\n\t}\n\telse\n\t{\n\t\tawait item.system.damageItem(1);\n\t}\n\tmsg +=",
+ "Bless (Taal)": "Béni (Taal)",
+ "
Finished repairing ${this.item.name}.
": "
Réparation terminée ${this.item.name}.
",
+ ").roll({allowInteractive : false});\n let regen = regenRoll.total;\n \n if (wounds.value >= wounds.max)\n return;\n \n if (wounds.value > 0) {\n wounds.value += Math.floor(regen / 2);\n if (wounds.value > wounds.max) {\n wounds.value = wounds.max;\n }\n message += \\`\\${this.actor.name} regains \\${regen} Wounds.\\`;\n \n if (regen === 10) {\n message +=": ").roll({allowInteractive : false});\n let regen = regenRoll.total;\n\n if (wounds.value >= wounds.max)\n return;\n\n if (wounds.value > 0) {\n wounds.value += Math.floor(regen / 2);\n if (wounds.value > wounds.max) {\n wounds.value = wounds.max;\n }\n message += \\`\\${this.actor.name} regagne \\${regen} Blessures.\\`;\n\n if (regen === 10) {\n message +=",
+ "let chatData = {whisper: ChatMessage.getWhisperRecipients(\"GM\")};\n let message = \"\";\n \n let wounds = foundry.utils.duplicate(this.actor.status.wounds);\n let regenRoll = await new Roll(\"1d10\").roll({allowInteractive : false});\n let regen = regenRoll.total;\n \n if (wounds.value >= wounds.max)\n return;\n \n if (wounds.value > 0) {\n wounds.value += Math.floor(regen / 2);\n if (wounds.value > wounds.max) {\n wounds.value = wounds.max;\n }\n message += \\": ").roll({allowInteractive : false});\n let regen = regenRoll.total;\n\n if (wounds.value >= wounds.max)\n return;\n\n if (wounds.value > 0) {\n wounds.value += Math.floor(regen / 2);\n if (wounds.value > wounds.max) {\n wounds.value = wounds.max;\n }\n message += \\`\\${this.actor.name} regagne \\${regen} Blessures.\\`;\n\n if (regen === 10) {\n message +=",
+ "Arboreal": "Arboricole",
+ "${this.effect.name}: destroys magical ${args.attackerTest.item.name}.": "${this.effect.name}: détruit magique ${args.attackerTest.item.name}.",
+ "Cold Blooded": "À Sang Froid",
+ "
${this.actor.prototypeToken.name} has gained the Cold Blooded Creature Trait and may reverse any failed Willpower based Tests.
\n
If they gain a Surprised Condition, this Condition is not lost the first time it should be (which is typically at the end of the Round or if they victim is attacked).
": "
${this.actor.prototypeToken.name} a acquis le Trait de Créature À Sang Froid et peut annuler tout test de Volonté raté.
\n
Si ils gagnent une Condition Surpris, cette Condition n'est pas perdue la première fois qu'elle devrait l'être (ce qui est généralement à la fin du Round ou si la victime est attaquée).
",
+ "Blade of Nurglitch: ${args.actor.name} must pass an Difficult (-10) Endurance Test or gain a @UUID[Compendium.wfrp4e-core.items.kKccDTGzWzSXCBOb]{Festering Wound}": "Blade of Nurglitch: ${args.actor.name} doit réussir un Test d'Endurance de Difficulté (-10) ou recevoir une @UUID[Compendium.wfrp4e-core.items.kKccDTGzWzSXCBOb]{Blessure Purulente}",
+ "Stupid": "Stupide",
+ "Enter Spellcasting Lore": "Entrez le Savoir d'Incantation",
+ "of your species": "de votre espèce",
+ "Animosity (all not ${species})": "Compendium.wfrp4e-core.items.Q2MCUrG2HppMcvN0",
+ "Cannot use ${game.wfrp4e.config.locations[this.effect.getFlag(\"wfrp4e\", \"location\")]}!": "Impossible d'utiliser ${game.wfrp4e.config.locations[this.effect.getFlag(\"wfrp4e\", \"location\")]}!",
+ "
Use Ward provided by ${this.effect.name}?": "
Utiliser la Protection fournie par ${this.effect.name}?",
+ "Advantage Subtracted": "Avantage retiré",
+ "Not enough Advantage!": "Avantage retiré",
+ "Lore (Oceans)": "Savoir (Océans)",
+ "${actor.name} recognizes lure of the Leviathan.": ", {\n appendTitle: ` – ${this.effect.name}`,\n skipTargets: true,\n fields: {difficulty:",
+ "Cannot update Fortune": "system.status.fortune.value",
+ "Enter Wounds Lost to gain SL": "Entrez les Blessures Perdues pour gagner DR",
+ "Butcher contracts @UUID[${bloodyFluxUUID}].": "Compendium.wfrp4e-core.items.Item.herUmN51D9TiL2Vn",
+ "Removed ${poisoned.conditionValue} Poisoned Conditions": "SSuppression de ${poisoned.conditionValue} états Empoisonnés",
+ "No Poisoned Conditions": "Aucun état Empoisonné à supprimer.",
+ "Claimed ${this.effect.name} Bonus": "Bonus utilisé : ${this.effect.name}",
+ "Painless": "utilisateur d",
+ "
${this.actor.prototypeToken.name} has gained the Painless Creature Trait. This\n effect lasts for one hour, after which it dissipates and the full effect\n of all the imbiber's wounds come crashing down at once.
\n
Note that this does not prevent the user from acquiring a Critical\n Wound or dying from one. It merely allows them to ignore most\n of their effects.
": "
${this.actor.prototypeToken.name} a acquis le Trait de Créature Insensible à la douleur. Cet\n effet dure une heure, après quoi il se dissipe et l'effet complet\n de toutes les blessures du buveur s'abat d'un coup.
\n
Notez que cela n'empêche pas l'utilisateur d'acquérir une Blessure Critique\n ou d'en mourir. Cela leur permet simplement d'ignorer la plupart\n de leurs effets.
",
+ "Damage Increase": "Augmentation des Dégâts",
+ "Cannot acquire Ablaze Condition": "Ne peut recevoir un état En Flammes",
+ "${this.effect.name}: Ignore AP with Weakpoints (${APIgnored})": "${this.effect.name}: Ignore les PA avec des points faibles (${APIgnored})",
+ "${this.actor.prototypeToken.name} regains ${healed} Wounds": "${this.actor.prototypeToken.name} regagne ${healed} Blessures",
+ "${this.effect.name} - Ignore Weakpoints (${weakpointsAP})": "${this.effect.name} - Ignore les points faibles (${weakpointsAP})",
+ "Choose 6 Petty Spells": "system.lore.value",
+ "
\n Select your choice\n
\n \n
Melee (Basic)
\n
Melee (Polearm)
\n ": "
\n Sélectionnez votre choix\n
\n \n
Mêlée (Base)
\n
Mêlée (arme d'hast)
\n ",
+ "Halved": "× 0.5",
+ "Ranged": "Projectiles",
+ "Daemonic": "Démoniaque",
+ "Trade (Apothecary)": "Métier (Apothicaire)",
+ "Select the column to roll on to determine Beast Head": "Sélectionnez la colonne de lancer pour déterminer la Tête de Bête",
+ "Select Column": "Sélectionnez une Colonne",
+ "Select Rune": "wfrp4e-dwarfs.rune",
+ "Enter Terror value": "Entrez la valeur de Terreur",
+ "Entertain (Singing)": "Divertissement (Chant)",
+ "Sail": "Item",
+ "Cannot cast Spells or use Prayers": "Impossible d'incanter un Sort ou d'utiliser un Prière",
+ "Select Target": "Sélectionnez une Cible",
+ "Select Target for Hatred": "Sélectionnez une Cible",
+ "})\n }\n if (configBlessings.length)\n {\n // Combine blessings defined by config with actual blessing items found that specify this god, avoiding duplicates\n blessings = blessings.concat(\n configBlessings.map(i => {return {uuid : i.uuid, name : i.name}})\n .filter(bls => !(blessings.find(i => i.uuid == bls.uuid)))\n );\n }\n if (blessings.length)\n {\n this.script.notification(": "})\n }\n if (configBlessings.length)\n {\n // Combine blessings defined by config with actual blessing items found that specify this god, avoiding duplicates\n blessings = blessings.concat(\n configBlessings.map(i => {return {uuid : i.uuid, name : i.name}})\n .filter(bls => !(blessings.find(i => i.uuid == bls.uuid)))\n );\n }\n if (blessings.length)\n {\n this.script.scriptNotification(",
+ "Double Wounds + 4": "Blessures Doublées + 4",
+ "Cannot find table with key: mutatemental": "Impossible de trouver la table des Mutations Mentales",
+ "Item could not be found:": "Impossible de trouver l'objet :",
+ "Enter Fear value": "Entrez la valeur de Peur",
+ "Enter Target Species": "Entrez l'Espèce Cible",
+ "Size": "Taille",
+ "Choose 2 Skills to add +20": "Choisissez 2 Compétences pour ajouter +20",
+ ")\n if (skillItem)\n skillItem.system.advances.value += skillAdvancements[index]\n else \n {\n skillItem = await game.wfrp4e.utility.findSkill(skill)\n skillItem = skillItem.toObject();\n skillItem.system.advances.value = skillAdvancements[index];\n items.push(skillItem);\n }\n}\n\nfor (let talent of talents)\n{\n let talentItem = await game.wfrp4e.utility.findTalent(talent)\n if (talentItem)\n {\n items.push(talentItem.toObject());\n }\n else \n {\n ui.notifications.warn(`Could not find ${talent}`, {permanent : true})\n }\n}\n\nfor (let trapping of trappings) \n{\n let trappingItem = await game.wfrp4e.utility.findItem(trapping)\n if (trappingItem)\n {\n trappingItem = trappingItem.toObject()\n\n trappingItem.system.equipped.value = true;\n\n items.push(trappingItem);\n }\n else \n {\n ui.notifications.warn(`Could not find ${trapping}`, {permanent : true})\n }\n}\n\n\nawait this.actor.update(updateObj)\nthis.actor.createEmbeddedDocuments(": ")\n if (skillItem)\n skillItem.system.advances.value += skillAdvancements[index]\n else\n {\n skillItem = await game.wfrp4e.utility.findSkill(skill)\n skillItem = skillItem.toObject();\n skillItem.system.advances.value = skillAdvancements[index];\n items.push(skillItem);\n }\n}\n\nfor (let talent of talents)\n{\n let talentItem = await game.wfrp4e.utility.findTalent(talent)\n if (talentItem)\n {\n items.push(talentItem.toObject());\n }\n else\n {\n ui.notifications.warn(`Impossible de trouver ${talent}`, {permanent : true})\n }\n}\n\nfor (let trapping of trappings)\n{\n let trappingItem = await game.wfrp4e.utility.findItem(trapping)\n if (trappingItem)\n {\n trappingItem = trappingItem.toObject()\n\n trappingItem.system.equipped.value = true;\n\n items.push(trappingItem);\n }\n else\n {\n ui.notifications.warn(`Impossible de trouver ${trapping}`, {permanent : true})\n }\n}\n\n\nawait this.actor.update(updateObj)\nthis.actor.createEmbeddedDocuments(",
+ "Misfire": "Raté",
+ "Misfire (Supercharged)": "Raté (Surchargé)",
+ "s a specialization\n let traitSpec = traitMatches[3]\n\n let traitItem;\n try {\n traitItem = await WFRP_Utility.findItem(traitName, \"trait\")\n }\n catch { }\n if (!traitItem) {\n ui.notifications.warn(`Could not find ${trait}`, {permanent : true})\n }\n traitItem = traitItem.toObject()\n\n if (Number.isNumeric(traitVal))\n {\n traitItem.system.specification.value = traitName.includes(": "}`).trim()\n }\n else \n traitItem.system.specification.value = traitSpec\n\n items.push(traitItem)\n\n}\n\nfor (let trapping of trappings) \n{\n let trappingItem = await game.wfrp4e.utility.findItem(trapping)\n if (trappingItem)\n {\n trappingItem = trappingItem.toObject()\n\n trappingItem.system.equipped.value = true;\n\n items.push(trappingItem);\n }\n else \n {\n ui.notifications.warn(`Could not find ${trapping}`, {permanent : true})\n }\n}\n\nfor (let spell of spells) \n{\n let spellItem = await game.wfrp4e.utility.findItem(spell)\n if (spellItem)\n {\n spellItem = spellItem.toObject()\n\n items.push(spellItem);\n }\n else \n {\n ui.notifications.warn(`Could not find ${spell}`, {permanent : true})\n }\n}\n\nupdateObj.name = updateObj.name +=",
+ "Add Metal AP to Damage": "Ajouter PA de métal aux Dégâts",
+ "Vomit": "rollTest",
+ "Choose 7 taken from any combination of spells from Colour Magic Lore, the Lore of Witchcraft, or Lore of Dark Magic": "Choisissez 7 Sorts parmi toute combinaison de Magie de Couleur, Sorcellerie ou Magie Noire",
+ "Channelling (Dhar)": "Loading Spells",
+ "Choose Double Life Career": "Loading Careers",
+ "Sturdy Value": "Valeur de Robustesse",
+ "Enter the Sturdy value": "Valeur de Robustesse",
+ "Blessing of Battle": "Bénédiction de Bataille",
+ "Enter Ward value": "Entrez la valeur de Protection",
+ "Add Option?\n
\n Ranged (Bow) +10 and a Longbow with 12 Arrows\n
": "Ajouter une option?\n
\n Projectile (Arc) +10 et un Arc long avec 12 flèches\n
",
+ "Amber Talons": "Serres d'ambre",
+ "Enter Venom Strength": "Entrez la Force du Venin",
+ "}`).trim()\n }\n else \n traitItem.system.specification.value = traitSpec\n\n items.push(traitItem)\n\n}\n\nfor (let trapping of trappings) \n{\n let trappingItem = await game.wfrp4e.utility.findItem(trapping)\n if (trappingItem)\n {\n trappingItem = trappingItem.toObject()\n\n trappingItem.system.equipped.value = true;\n\n items.push(trappingItem);\n }\n else \n {\n ui.notifications.warn(`Could not find ${trapping}`, {permanent : true})\n }\n}\n\nfor (let spell of spells) \n{\n let spellItem = await game.wfrp4e.utility.findItem(spell)\n if (spellItem)\n {\n spellItem = spellItem.toObject()\n\n items.push(spellItem);\n }\n else \n {\n ui.notifications.warn(`Could not find ${spell}`, {permanent : true})\n }\n}\n\nupdateObj.name = updateObj.name +=": "}`).trim()\n }\n else\n traitItem.system.specification.value = traitSpec\n\n items.push(traitItem)\n\n}\n\nfor (let trapping of trappings)\n{\n let trappingItem = await game.wfrp4e.utility.findItem(trapping)\n if (trappingItem)\n {\n trappingItem = trappingItem.toObject()\n\n trappingItem.system.equipped.value = true;\n\n items.push(trappingItem);\n }\n else\n {\n ui.notifications.warn(`Could not find ${trapping}`, {permanent : true})\n }\n}\n\nfor (let spell of spells)\n{\n let spellItem = await game.wfrp4e.utility.findItem(spell)\n if (spellItem)\n {\n spellItem = spellItem.toObject()\n\n items.push(spellItem);\n }\n else\n {\n ui.notifications.warn(`Could not find ${spell}`, {permanent : true})\n }\n}\n\nupdateObj.name = updateObj.name +=",
+ "