diff --git a/module.json b/module.json
index 144524c..cd39d9d 100644
--- a/module.json
+++ b/module.json
@@ -8,8 +8,9 @@
}
],
"url": "https://www.uberwald.me/gitea/public/foundryvtt-wh4-lang-fr-fr",
- "version": "9.3.3",
+ "version": "9.3.4",
"esmodules": [
+ "wh4_fr.js",
"modules/babele-register.js",
"modules/addon-register.js",
"modules/import-stat-2.js",
@@ -119,7 +120,7 @@
}
],
"manifest": "https://www.uberwald.me/gitea/public/foundryvtt-wh4-lang-fr-fr/raw/v10/module.json",
- "download": "https://www.uberwald.me/gitea/public/foundryvtt-wh4-lang-fr-fr/archive/foundryvtt-wh4-lang-fr-9-3-2.zip",
+ "download": "https://www.uberwald.me/gitea/public/foundryvtt-wh4-lang-fr-fr/archive/foundryvtt-wh4-lang-fr-9-3-4.zip",
"id": "wh4-fr-translation",
"compatibility": {
"minimum": "13",
diff --git a/modules/addon-register.js b/modules/addon-register.js
index ec90205..67a4eb6 100644
--- a/modules/addon-register.js
+++ b/modules/addon-register.js
@@ -82,39 +82,8 @@ const _patch_up_in_arms = () => {
}
/************************************************************************************/
-/* Manages /auberge command */
-const _manage_inn_roll = async (content, msg) => {
- // Split input into arguments
- let command = content.split(" ").map(function (item) {
- return item.trim();
- })
-
- console.log("COMMANDES", command);
- if (command[0] == "/auberge" && command[1]) {
- msg["type"] = 0;
- msg["rollMode"] = "gmroll";
- let compendium = game.packs.get('wh4-fr-translation.plats-dauberges')
- game.packs.get(compendium);
- let rollList = await compendium.getDocuments()
- for (const element of rollList) {
- let rollTab = element;
- console.log("Got compendium...", rollList, rollTab.name);
- if (rollTab.name.toLowerCase().includes(command[1].toLowerCase())) {
- let my_rollTable;
- await compendium.getDocument(rollTab._id).then(mytab => my_rollTable = mytab);
- my_rollTable.draw({ rollMode: "gmroll" });
- return false;
- }
- }
- }
- if (content.includes("/auberge")) {
- msg["type"] = 0;
- msg["rollMode"] = "gmroll";
- msg["content"] = "Syntaxe : /auberge MOT_CLE, avec MOT_CLE parmi:
BoissonsBase, BoissonsFortes, Desserts, PlatsCommuns, PlatsExcellents, PlatsMaritimes, PlatsMédiocres, PlatsQualité, PlatsRivières
Des raccourcis sont possibles avec une partie du nom : /auberge Base (correspond à BoissonBase) ou /auberge Mari (correspond à PlatsMaritimes), etc."
- ChatMessage.create(msg);
- return false;
- }
-}
+/* Module /auberge géré par modules/inn/inn-init.js */
+// L'ancienne implémentation a été migrée vers le module inn pour cohérence avec /voyage
/************************************************************************************/
let __eis_tables = {
@@ -262,17 +231,13 @@ const __check_fix_wrong_modules = (chatFlag, patchFinished) => {
}
} else if (game.user.isGM && patchFinished) {
ChatMessage.create({
- content: "
Usage: /auberge [mot_clé]
Vous pouvez aussi taper /auberge [mot_clé] directement (ex: /auberge base)
Aucun chemin trouvé entre ${originalFrom} et ${originalTo}
`; + message += `Il n'existe pas de route reliant ces deux villes dans les données disponibles.
`; + } else { + message += `Différentes options de voyage disponibles :
Aide pour /voyage
`;
+ message += `Usage: /voyage [ville_départ] [ville_arrivée]
`;
+ 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 += `
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 += ``; + } + } else { + message += `Ville inconnue: ${fromTown}
`; + message += `Cette ville n'existe pas dans la base de données.
`; + } + } else { + console.log("TravelV2: Branche: Liste de toutes les villes de départ"); + // Lister toutes les villes de départ + message += `De ${travel.from} à ${travel.to} (Route directe)`;
+
+ if (travel.road_distance != "") {
+ let road_horse_heavy_days = this.roundDuration(travel.road_days * 0.8);
+ let road_horse_fast_days = this.roundDuration(travel.road_days * 0.65);
+ let road_feet_days = this.roundDuration(travel.road_days * 1.25);
+ let road_danger_string = this.dangerToString(travel.road_danger);
+ let road_danger_feet_string = this.dangerToString(travel.road_danger + "!");
+
+ message += `
Par route:`;
+ message += `
Distance: ${travel.road_distance} km`;
+ message += `
Durée (chariot): ${travel.road_days} jours - Danger: ${road_danger_string}`;
+ message += `
Durée (cheval de charge): ${road_horse_heavy_days} jours - Danger: ${road_danger_string}`;
+ message += `
Durée (cheval rapide): ${road_horse_fast_days} jours - Danger: ${road_danger_string}`;
+ message += `
Durée (à pied): ${road_feet_days} jours - Danger: ${road_danger_feet_string}`;
+ }
+
+ if (travel.river_distance != "") {
+ let river_danger_string = this.dangerToString(travel.river_danger);
+ message += `
Par rivière:`;
+ message += `
Distance: ${travel.river_distance} km`;
+ message += `
Durée: ${travel.river_days} jours - Danger: ${river_danger_string}`;
+ }
+
+ if (travel.sea_distance != "") {
+ let sea_danger_string = this.dangerToString(travel.sea_danger);
+ message += `
Par mer:`;
+ message += `
Distance: ${travel.sea_distance} km`;
+ message += `
Durée: ${travel.sea_days} jours - Danger: ${sea_danger_string}`;
+ }
+
+ message += "
${fromCity} → ${toCity} (${pathResult.steps} étape${pathResult.steps > 1 ? 's' : ''})`;
+
+ // Résumé du voyage
+ const totalDistance = Math.round(pathResult.totalDistance);
+ const totalDays = Math.round(pathResult.totalDays);
+ const danger_string = this.dangerToString(pathResult.maxDanger);
+
+ // Pour les routes terrestres, afficher les variantes de durée
+ const includesRoad = !pathResult.modesUsed || pathResult.modesUsed.includes('road');
+
+ message += `
📊 Résumé du voyage:`;
+ message += `
Distance totale: ${totalDistance} km`;
+
+ if (includesRoad) {
+ const road_horse_heavy_days = this.roundDuration(pathResult.totalDays * 0.8);
+ const road_horse_fast_days = this.roundDuration(pathResult.totalDays * 0.65);
+ const road_feet_days = this.roundDuration(pathResult.totalDays * 1.25);
+ const danger_feet_string = this.dangerToString(pathResult.maxDanger + "!");
+
+ message += `
Durée (chariot): ${totalDays} jours - Danger max: ${danger_string}`;
+ message += `
Durée (cheval de charge): ${road_horse_heavy_days} jours - Danger max: ${danger_string}`;
+ message += `
Durée (cheval rapide): ${road_horse_fast_days} jours - Danger max: ${danger_string}`;
+ message += `
Durée (à pied): ${road_feet_days} jours - Danger max: ${danger_feet_string}`;
+ } else {
+ message += `
Durée totale: ${totalDays} jours - Danger max: ${danger_string}`;
+ }
+
+ // Détails des étapes avec mode de transport
+ message += `
🗺️ Itinéraire détaillé:`;
+ for (let i = 0; i < pathResult.path.length; i++) {
+ const step = pathResult.path[i];
+ const stepNum = i + 1;
+ const stepDanger = this.dangerToString(step.danger);
+
+ // Icône selon le mode de transport
+ let modeIcon = "🛤️";
+ let modeName = "route";
+ if (step.mode === 'river') {
+ modeIcon = "🚣";
+ modeName = "fleuve";
+ } else if (step.mode === 'sea') {
+ modeIcon = "⛵";
+ modeName = "mer";
+ }
+
+ message += `
Étape ${stepNum}: ${step.from} → ${step.to}`;
+ message += `
${modeIcon} Par ${modeName}: ${Math.round(step.distance)} km, ${step.days} jour${step.days > 1 ? 's' : ''} - Danger: ${stepDanger}`;
+ }
+
+ message += "
${this.actor.prototypeToken.name} : +this.script.message(`
${this.actor.prototypeToken.name} a :
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(``) + args.Test.result.other.push(``) } \ 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 += `${item.name} endommagé de 1
` +} +for(let item of armour) +{ + await item.system.damageItem(1); + msg += `${item.name} endommagé de 1
` +} +if (msg) +{ + this.script.message(msg, {speaker : {alias : args.actor.name}}); +} \ No newline at end of file diff --git a/scripts/5JWC0l3JEpOsqbR9.js b/scripts/5JWC0l3JEpOsqbR9.js index f51b369..b75111b 100644 --- a/scripts/5JWC0l3JEpOsqbR9.js +++ b/scripts/5JWC0l3JEpOsqbR9.js @@ -12,7 +12,7 @@ let characteristics = { } let skills = ["Esquive", "Perception"] let skillAdvancements = [10, 10] -let talents = ["Flee!", "Marksman"] +let talents = ["Fuite !", "Tireur de précision"] let trappings = ["Arme simple"] let items = []; @@ -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); diff --git a/scripts/5JvKJZPcd6Hz5zvn.js b/scripts/5JvKJZPcd6Hz5zvn.js index 237e3c9..340a967 100644 --- a/scripts/5JvKJZPcd6Hz5zvn.js +++ b/scripts/5JvKJZPcd6Hz5zvn.js @@ -10,10 +10,10 @@ let characteristics = { "wp" : 15, "fel" : 0 } -let skills = ["Calme", "Esquive", "Intimidate", "Commandement" ] +let skills = ["Calme", "Esquive", "Intimidation", "Commandement"] let skillAdvancements = [15, 15, 10, 5] -let talents = ["Combat Aware", "Combat Reflexes", "Feint", "Resolute"] -let trappings = ["Mail Coat", "Mail Chausses", "Mail Coif", "Arme simple", "Shield"] +let talents = ["Vigilance", "Combat Instinctif", "Feinte", "Déterminé"] +let trappings = ["Cotte de Mailles", "Chausses de Mailles", "Coiffe de Mailles", "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,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/5KIozV7HxyGvskeD.js b/scripts/5KIozV7HxyGvskeD.js new file mode 100644 index 0000000..425fa2a --- /dev/null +++ b/scripts/5KIozV7HxyGvskeD.js @@ -0,0 +1 @@ +args.data.reversal = {allowed : true, if: "worse"}; \ No newline at end of file diff --git a/scripts/5KVslRqhqzuFLyk4.js b/scripts/5KVslRqhqzuFLyk4.js new file mode 100644 index 0000000..73f347f --- /dev/null +++ b/scripts/5KVslRqhqzuFLyk4.js @@ -0,0 +1,3 @@ +if (!this.actor.has("Béni (Taal)", "talent")) return; + +this.actor.system.characteristics.wp.modifier += 15; \ No newline at end of file diff --git a/scripts/5M6IgCUncCwyxHok.js b/scripts/5M6IgCUncCwyxHok.js index 330998b..bbbca4c 100644 --- a/scripts/5M6IgCUncCwyxHok.js +++ b/scripts/5M6IgCUncCwyxHok.js @@ -4,12 +4,12 @@ etiquette.name += ` (Suivants de Tzeentch)`; let animosity = (await fromUuid("Compendium.wfrp4e-core.items.Item.0VpT5yubw4UL7j6f")).toObject(); animosity.system.specification.value = "Suivants de Nurgle"; -let roll = await new Roll("ceil(1d10 / 3)").roll(); +let roll = await new Roll("ceil(1d10 / 3)").roll({allowInteractive : false}); roll.toMessage(this.script.getChatData()); let mutations = []; -let msg = `Mutations acquises
` +let msg = `Mutations Acquises
` for(let i = 0; i < roll.total; i++) { let item; @@ -19,7 +19,7 @@ for(let i = 0; i < roll.total; i++) { result = await game.wfrp4e.tables.rollTable("mutatemental", {hideDSN: true}, "Tzeentch") } - else + else { result = await game.wfrp4e.tables.rollTable("mutatephys", {hideDSN: true}, "Tzeentch") } @@ -32,4 +32,4 @@ for(let i = 0; i < roll.total; i++) } } this.actor.createEmbeddedDocuments("Item", mutations.concat([etiquette, animosity]), {fromEffect : this.effect.id}) -this.script.scriptMessage(msg); \ No newline at end of file +this.script.message(msg); \ No newline at end of file diff --git a/scripts/5MxRDXzUBPfp2KKD.js b/scripts/5MxRDXzUBPfp2KKD.js index 578674f..9a0d3ef 100644 --- a/scripts/5MxRDXzUBPfp2KKD.js +++ b/scripts/5MxRDXzUBPfp2KKD.js @@ -1 +1 @@ -args.options.useOnesSupportive = true; \ No newline at end of file +args.context.useOnesSupportive = true; \ No newline at end of file diff --git a/scripts/5ScjIdRUOxblHdWS.js b/scripts/5ScjIdRUOxblHdWS.js index a0923ec..979fc13 100644 --- a/scripts/5ScjIdRUOxblHdWS.js +++ b/scripts/5ScjIdRUOxblHdWS.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 = 'challenging'; 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/5XAYjiq1i4M7Ky7j.js b/scripts/5XAYjiq1i4M7Ky7j.js new file mode 100644 index 0000000..f48b002 --- /dev/null +++ b/scripts/5XAYjiq1i4M7Ky7j.js @@ -0,0 +1,49 @@ +const trait = this.actor.itemTags.trait.find(t => t.name === "Régénération"); +const name = "Régénération Pourrie"; + +if (!trait) return; + +const effect = trait.effects.find(e => e.name === "Régénération"); +const scriptData = effect.system.scriptData; + +scriptData[0].script = ` + let chatData = {whisper: ChatMessage.getWhisperRecipients("GM")}; + let message = ""; + + let Blessures = foundry.utils.duplicate(this.actor.status.Blessures); + let regenRoll = await new Roll("1d10").roll({allowInteractive : false}); + let regen = regenRoll.total; + + if (Blessures.value >= Blessures.max) + return; + + if (Blessures.value > 0) { + Blessures.value += Math.floor(regen / 2); + if (Blessures.value > Blessures.max) { + Blessures.value = Blessures.max; + } + message += \`\${this.actor.name} regagne \${regen} Blessures.\`; + + if (regen === 10) { + message += "${this.actor.prototypeToken.name} reçoit le Trait de Créatuer A Sang Froid et peut inverser n'importe quel test de Force Mentale échoué.
-Si il reçoit un état Surpris, cet état n'est pas perdu la première fois (typiquement à la fin du Round ou si il est attaqué).
`, - {whisper: ChatMessage.getWhisperRecipients("GM"), blind: true }) + + this.script.message(`${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}.Utiliser Ward fourni par ${this.effect.name}?`, - buttons : { - yes : { - label : "Yes", - callback: () => { - return true; - } - }, - no : { - label: "No", - callback: () => { - return false; - } - } +let useWard = await foundry.applications.api.DialogV2.confirm({ + 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
Add Option?
Appliquer les dommages de ${this.effect.name} à l'attquant?`, - buttons: { - yes: { - label: "Oui", - callback: () => { - return true; - } - }, - no: { - label: "Non", - callback: () => { - return false; - } - } - } - }) + let choice = await foundry.applications.api.DialogV2.confirm({window : {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 += "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 = `Réparation terminée ${this.item.name}.
`; +const Test = 'Métier (Charpentier)'; const difficulty = 'hard'; 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/R8ecKGRzOr4ThvVa.js b/scripts/R8ecKGRzOr4ThvVa.js index 4c9fff3..e9dd98e 100644 --- a/scripts/R8ecKGRzOr4ThvVa.js +++ b/scripts/R8ecKGRzOr4ThvVa.js @@ -1,5 +1,5 @@ -const repaired_message = `Réparation finie ${this.item.name}.
`; -const test = 'Maintenance Crew Test'; +const repaired_message = `Réparation terminée ${this.item.name}.
`; +const Test = 'Maintenance Crew Test'; const difficulty = 'hard'; const target = 80; @@ -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/RDtJXji3hgcKnEBk.js b/scripts/RDtJXji3hgcKnEBk.js deleted file mode 100644 index e557c94..0000000 --- a/scripts/RDtJXji3hgcKnEBk.js +++ /dev/null @@ -1,33 +0,0 @@ -let as = (await fromUuid("Compendium.wfrp4e-core.items.Item.9h82z72XGo9tfgQS")).toObject(); -let hv = (await fromUuid("Compendium.wfrp4e-core.items.Item.Nj3tC8A5fZ3zEdMR")).toObject(); -let ms = (await fromUuid("Compendium.wfrp4e-core.items.Item.6w30u0VPsAicrqb5")).toObject(); -let ss = (await fromUuid("Compendium.wfrp4e-core.items.Item.OEjUvJKi0xmBwbS2")).toObject(); - -as.name += " (Vue)"; - -let roll = (await new Roll("1d10").roll()); -roll.toMessage(this.script.getChatData()) -let items = [] - -if (roll.total <= 2) -{ - items = items.concat([as]); -} -else if (roll.total <= 4) -{ - items = items.concat([hv]); -} -else if (roll.total <= 6) -{ - items = items.concat([ms]); -} -else if (roll.total <= 8) -{ - items = items.concat([ss]); -} -else if (roll.total <= 10) -{ - items = items.concat([as, hv, ms, ss]); -} - -this.actor.createEmbeddedDocuments("Item", items, {fromEffect: this.effect.id}) \ No newline at end of file diff --git a/scripts/RHyBLYT5oHf7EPnG.js b/scripts/RHyBLYT5oHf7EPnG.js deleted file mode 100644 index 99ec6ac..0000000 --- a/scripts/RHyBLYT5oHf7EPnG.js +++ /dev/null @@ -1,21 +0,0 @@ -let skills = this.actor.itemTypes.skill.filter(i => i.name.includes(game.i18n.localize("NAME.Melee"))) - -let skill = await ItemDialog.create(skills, 1, "Sélectionnez la compétence à utiliser avec l'arme") -let group = game.wfrp4e.utility.extractParenthesesText(skill[0]?.name) -let groupKey = game.wfrp4e.utility.findKey(group, game.wfrp4e.config.weaponGroups) - -let weapon = { - name : this.effect.name, - type : "weapon", - img : this.effect.img, - system : { - "damage.value" : this.actor.system.characteristics.wp.bonus, - "weaponGroup.value" : groupKey || "basic", - "twohanded.value" : ["polearm", "twohanded"].includes(groupKey), - "reach.value" : "average", - "qualities.value" : [{name : "magical"}] - }, -} - -Item.implementation.create(foundry.utils.expandObject(weapon), {parent : this.actor, fromEffect : this.effect.id}) -this.script.scriptNotification("Item créé. Les modifications supplémentaires doivent être réalisées manuellement sur la fiche de l'objet."); \ No newline at end of file diff --git a/scripts/RKIFGN583PQnqHGk.js b/scripts/RKIFGN583PQnqHGk.js index 223f490..865cf57 100644 --- a/scripts/RKIFGN583PQnqHGk.js +++ b/scripts/RKIFGN583PQnqHGk.js @@ -1,5 +1,5 @@ if (args.opposedTest.result.hitloc.value == "body" && args.totalWoundLoss > 0) { args.actor.addCondition("bleeding", 2) - this.script.scriptMessage("Ajout de 2 état Hémorragiques") + this.script.message("Gain de 2 états Hémorragique") } \ No newline at end of file diff --git a/scripts/RNr9CwyvLhlnwD2h.js b/scripts/RNr9CwyvLhlnwD2h.js deleted file mode 100644 index 2dbcde4..0000000 --- a/scripts/RNr9CwyvLhlnwD2h.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/ROXCqAFSTLouJniL.js b/scripts/ROXCqAFSTLouJniL.js index 979b433..3ffc34d 100644 --- a/scripts/ROXCqAFSTLouJniL.js +++ b/scripts/ROXCqAFSTLouJniL.js @@ -2,6 +2,6 @@ if (args.test.spell.name == "Warp Lightning") { if (args.test.result.minormis || args.test.result.majormis || args.test.result.catastrophicmis) { - this.script.scriptMessage(`${this.item.name} Surcharge!`) + this.script.message(`${this.item.name} Overloads!`) } } \ No newline at end of file diff --git a/scripts/RPqgRUkiLY5thVbC.js b/scripts/RPqgRUkiLY5thVbC.js index f120b28..41a24f9 100644 --- a/scripts/RPqgRUkiLY5thVbC.js +++ b/scripts/RPqgRUkiLY5thVbC.js @@ -1,5 +1,5 @@ -const repaired_message = `Réparation finie ${this.item.name}.
`; -const test = 'Strength'; +const repaired_message = `Réparation terminée ${this.item.name}.
`; +const Test = 'Strength'; const difficulty = 'average'; 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/RRK91ySi5SzYCRvy.js b/scripts/RRK91ySi5SzYCRvy.js new file mode 100644 index 0000000..bafc503 --- /dev/null +++ b/scripts/RRK91ySi5SzYCRvy.js @@ -0,0 +1 @@ +return args.weapon?.system.isProjectiles \ No newline at end of file diff --git a/scripts/RSsGiDFibuqg3sHr.js b/scripts/RSsGiDFibuqg3sHr.js index af0157e..4a0a1cd 100644 --- a/scripts/RSsGiDFibuqg3sHr.js +++ b/scripts/RSsGiDFibuqg3sHr.js @@ -7,7 +7,7 @@ let diseaseIndex = game.packs return i }) -let choice = await ItemDialog.create(diseaseIndex , 1, "Choisissez une maladie") +let choice = await ItemDialog.create(diseaseIndex , 1, "Choisir une maladie") if (choice[0]) { diff --git a/scripts/RUpVgB0czqg95K1Q.js b/scripts/RUpVgB0czqg95K1Q.js new file mode 100644 index 0000000..cb6a162 --- /dev/null +++ b/scripts/RUpVgB0czqg95K1Q.js @@ -0,0 +1,4 @@ +if (this.item.system.protects[args.opposedTest.result.hitloc.value]) +{ + args.weaponProperties.qualities.penetrating = false; +} \ No newline at end of file diff --git a/scripts/ReJpL0IVesKUbXgj.js b/scripts/ReJpL0IVesKUbXgj.js new file mode 100644 index 0000000..08a7399 --- /dev/null +++ b/scripts/ReJpL0IVesKUbXgj.js @@ -0,0 +1 @@ +args.fields.slBonus -= 8; \ No newline at end of file diff --git a/scripts/RgNdS87nO7RVawuw.js b/scripts/RgNdS87nO7RVawuw.js new file mode 100644 index 0000000..e016b9f --- /dev/null +++ b/scripts/RgNdS87nO7RVawuw.js @@ -0,0 +1 @@ +this.actor.removeCondition("fatigued", 1); \ No newline at end of file diff --git a/scripts/RlVvlmhOfscaJqCd.js b/scripts/RlVvlmhOfscaJqCd.js new file mode 100644 index 0000000..785440d --- /dev/null +++ b/scripts/RlVvlmhOfscaJqCd.js @@ -0,0 +1,9 @@ +const deletes = this.actor.itemTags.armour.map(a => { + return {_id: a._id} +}); +const armourTrait = this.actor.itemTags.trait.find(t => t.name === game.i18n.localize("NAME.TraitArmour")); + +if (armourTrait) + deletes.push({_id: armourTrait._id}); + +this.actor.deleteEmbeddedDocuments("Item", deletes); \ No newline at end of file diff --git a/scripts/RlhOAKfN0ghrrooR.js b/scripts/RlhOAKfN0ghrrooR.js index b0e5aae..2d9374e 100644 --- a/scripts/RlhOAKfN0ghrrooR.js +++ b/scripts/RlhOAKfN0ghrrooR.js @@ -4,4 +4,4 @@ for (let effect of holed) { await effect.update({name: effect.name.replace(/\d+/, rating => parseInt(rating) * 2)}); } -this.script.scriptNotification(`Holed Ratings of ${this.actor.name} have been doubled.`); \ No newline at end of file +this.script.notification(`Holed Ratings of ${this.actor.name} have been doubled.`); \ No newline at end of file diff --git a/scripts/Rnpw6UQdJifLeuna.js b/scripts/Rnpw6UQdJifLeuna.js index b9fc369..df9201b 100644 --- a/scripts/Rnpw6UQdJifLeuna.js +++ b/scripts/Rnpw6UQdJifLeuna.js @@ -1 +1 @@ -this.effect.updateSource({"flags.wfrp4e.applicationData.type" : "crew"}) \ No newline at end of file +this.effect.updateSource({"system.transferData.type" : "crew"}) \ No newline at end of file diff --git a/scripts/RprZWlnopSqZt7KZ.js b/scripts/RprZWlnopSqZt7KZ.js deleted file mode 100644 index 523491c..0000000 --- a/scripts/RprZWlnopSqZt7KZ.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/RrchOMpEdIvceJxl.js b/scripts/RrchOMpEdIvceJxl.js deleted file mode 100644 index b1d1cc8..0000000 --- a/scripts/RrchOMpEdIvceJxl.js +++ /dev/null @@ -1 +0,0 @@ -return args.skill?.name == "Discrétion (Rurale)" \ No newline at end of file diff --git a/scripts/RvipIYj9H7n4UDMe.js b/scripts/RvipIYj9H7n4UDMe.js index 068db78..a3292cc 100644 --- a/scripts/RvipIYj9H7n4UDMe.js +++ b/scripts/RvipIYj9H7n4UDMe.js @@ -25,14 +25,14 @@ for (let ch in characteristics) for (let index = 0; index < skills.length; index++) { - let skill = skills[index] + let Compétence = skills[index] let skillItem; - skillItem = updateObj.items.find(i => i.name == skill && i.type == "skill") + skillItem = updateObj.items.find(i => i.name == Compétence && i.type == "skill") if (skillItem) skillItem.system.advances.value += skillAdvancements[index] - else + else { - skillItem = await game.wfrp4e.utility.findSkill(skill) + skillItem = await game.wfrp4e.utility.findSkill(Compétence) skillItem = skillItem.toObject(); skillItem.system.advances.value = skillAdvancements[index]; items.push(skillItem); @@ -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/RwMw848y13Jq2L4f.js b/scripts/RwMw848y13Jq2L4f.js index 6ca32d3..e6bdeed 100644 --- a/scripts/RwMw848y13Jq2L4f.js +++ b/scripts/RwMw848y13Jq2L4f.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 divisé par deux
` } 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/RyQtuiRykUCQ6Xag.js b/scripts/RyQtuiRykUCQ6Xag.js new file mode 100644 index 0000000..1d6af42 --- /dev/null +++ b/scripts/RyQtuiRykUCQ6Xag.js @@ -0,0 +1,3 @@ +if (!this.item.actor.name.includes("Brunner")) return; + +args.actor.addCondition("ablaze"); \ No newline at end of file diff --git a/scripts/S1QihXuvdEVzeRtB.js b/scripts/S1QihXuvdEVzeRtB.js index 37f949e..42da3f3 100644 --- a/scripts/S1QihXuvdEVzeRtB.js +++ b/scripts/S1QihXuvdEVzeRtB.js @@ -27,7 +27,7 @@ else if (roll = 10) modifier = -5 } -message = `Résultat de ${roll}, gagnez ${item.name}, ${modifier} en Force` +message = `${roll} Rolled, gain ${item.name}, ${modifier} Strength` dice.toMessage(this.script.getChatData()) let changes = foundry.utils.duplicate(this.effect.changes) @@ -37,4 +37,4 @@ this.effect.updateSource({changes}) await this.actor.createEmbeddedDocuments("Item", [item.toObject()], {fromEffect : this.effect.id}) -this.script.scriptNotification(message) \ No newline at end of file +this.script.notification(message) \ No newline at end of file diff --git a/scripts/S1SQe0Do7ZcuNV5j.js b/scripts/S1SQe0Do7ZcuNV5j.js new file mode 100644 index 0000000..e1e780d --- /dev/null +++ b/scripts/S1SQe0Do7ZcuNV5j.js @@ -0,0 +1,4 @@ +if (!["roll", "none"].includes(args.fields.hitLocation)) +{ + args.fields.modifier += 20; +} \ No newline at end of file diff --git a/scripts/S3Dev4hleOYqDNe9.js b/scripts/S3Dev4hleOYqDNe9.js index c014e56..3849dd9 100644 --- a/scripts/S3Dev4hleOYqDNe9.js +++ b/scripts/S3Dev4hleOYqDNe9.js @@ -1,5 +1,5 @@ if (args.test.options.healWounds) { - if (args.test.succeeded) + if (args.test.succeeded) { let wounds = this.actor.characteristics.int.bonus + Number(args.test.result.SL) if (args.test.options.fieldDressing && args.test.result.reversed) @@ -7,10 +7,10 @@ if (args.test.options.healWounds) { wounds = this.actor.characteristics.int.bonus + Math.min(1, Number(args.test.result.SL)) } args.test.result.woundsHealed = wounds - args.test.result.other.push(`${this.actor.name} guérit ${wounds} Points de Blessures du patient.`) + args.test.result.other.push(`${this.actor.name} guéri ${wounds} Blessures du patient.`) } else if (this.actor.characteristics.int.bonus + Number(args.test.result.SL) < 0) { - args.test.result.other.push(`Le patient subit une @UUID[Compendium.wfrp4e-core.items.Item.1hQuVFZt9QnnbWzg]{Infection Mineure}.`) + args.test.result.other.push(`Le patient contracte une @UUID[Compendium.wfrp4e-core.items.Item.1hQuVFZt9QnnbWzg]{Infection Mineure}.`) } } \ No newline at end of file diff --git a/scripts/S4793DLFhjMxpM8x.js b/scripts/S4793DLFhjMxpM8x.js index 4f2f739..e04c764 100644 --- a/scripts/S4793DLFhjMxpM8x.js +++ b/scripts/S4793DLFhjMxpM8x.js @@ -1 +1 @@ -return !["ws", "bs"].includes(args.characteristic) && !args.item?.system.attackType && !args.options.dodge \ No newline at end of file +return !["ws", "bs"].includes(args.characteristic) && !args.item?.system.attackType && !args.context.dodge \ No newline at end of file diff --git a/scripts/SGr50Hq1AHIEzIFN.js b/scripts/SGr50Hq1AHIEzIFN.js index 0b6d374..cbce324 100644 --- a/scripts/SGr50Hq1AHIEzIFN.js +++ b/scripts/SGr50Hq1AHIEzIFN.js @@ -1,6 +1,6 @@ let choice = await ItemDialog.create(ItemDialog.objectToArray({ int : game.wfrp4e.config.characteristics.int, fel : game.wfrp4e.config.characteristics.fel -}, this.effect.img), 1, "Choisissez une caractéristique"); +}, this.effect.img), 1, "Choisir une caractéristique"); this.effect.updateSource({"flags.wfrp4e.characteristic" : choice[0].id}) \ No newline at end of file diff --git a/scripts/SK8paBvnvc5YLFI1.js b/scripts/SK8paBvnvc5YLFI1.js new file mode 100644 index 0000000..d2b232f --- /dev/null +++ b/scripts/SK8paBvnvc5YLFI1.js @@ -0,0 +1,12 @@ +if (args.test.options.doombolt && !args.test.options.doomboltRolled) +{ + args.test.options.doomboltRolled = true; + + let test = await this.actor.setupSkill(`${game.i18n.localize("NAME.Language")} (${game.i18n.localize("SPEC.Magick")})`, {fields : {difficulty : "hard"}, context : {failure : "@Table[majormis]{Major Miscast}"}}); + await test.roll(); + + if (test.succeeded) + { + args.test.preData.additionalDamage = 4; + } +} \ No newline at end of file diff --git a/scripts/SKn61f2ykhzuwMdw.js b/scripts/SKn61f2ykhzuwMdw.js new file mode 100644 index 0000000..00a318d --- /dev/null +++ b/scripts/SKn61f2ykhzuwMdw.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 : "artillery-misfires" + } +} \ No newline at end of file diff --git a/scripts/SLy1Fs3oXcHgFgjK.js b/scripts/SLy1Fs3oXcHgFgjK.js index 4add629..6c9fd84 100644 --- a/scripts/SLy1Fs3oXcHgFgjK.js +++ b/scripts/SLy1Fs3oXcHgFgjK.js @@ -1,5 +1,5 @@ let item = await fromUuid("Compendium.wfrp4e-core.items.Item.pTorrE0l3VybAbtn") let data = item.toObject(); -let value = getProperty(this.effect.sourceTest, "result.overcast.usage.other.current") || 1 +let value = foundry.utils.getProperty(this.effect.sourceTest, "result.overcast.usage.other.current") || 1 data.system.specification.value = value this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/scripts/SNjG7IvgQzvCGczR.js b/scripts/SNjG7IvgQzvCGczR.js deleted file mode 100644 index 4627a9f..0000000 --- a/scripts/SNjG7IvgQzvCGczR.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("Messenger", "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/SThruXFhxUdNKCG4.js b/scripts/SThruXFhxUdNKCG4.js index 0a3895e..2e17c58 100644 --- a/scripts/SThruXFhxUdNKCG4.js +++ b/scripts/SThruXFhxUdNKCG4.js @@ -1,8 +1,8 @@ const test = await this.actor.setupCharacteristic("int", {fields: {difficulty: "easy"}, skipTargets: true, appendTitle : ` - ${this.effect.name}`}); -await test.roll(); +await Test.roll(); -if (test.failed) { +if (Test.Échoué) { this.actor.addCondition('stunned'); } -this.script.scriptNotification(`${this.actor.name} failed the Intelligence Test and gained Stunned Condition!`); \ No newline at end of file +this.script.scriptNotification(`${this.actor.name} échou au test d'INT et reçoit un état Sonné!`); \ No newline at end of file diff --git a/scripts/SWIJjM2RCmzfr64u.js b/scripts/SWIJjM2RCmzfr64u.js index 0db546e..4f762e1 100644 --- a/scripts/SWIJjM2RCmzfr64u.js +++ b/scripts/SWIJjM2RCmzfr64u.js @@ -1,4 +1,6 @@ -if (args.test.result.hitloc.result == "head" && args.test.result.critical){ - args.test.result.critModifier = args.test.result.critModifier ? args.test.result.critModifier + 40 : 40 +if (args.test.result.hitloc.result == "head" && args.test.result.critical) +{ + args.test.result.critModifier = args.test.result.critModifier ? args.test.result.critModifier + 40 : 40 + args.test.result.critical += ` (+${args.test.result.critModifier})` } diff --git a/scripts/SjDNjLBGsd9fYObo.js b/scripts/SjDNjLBGsd9fYObo.js new file mode 100644 index 0000000..81a6df2 --- /dev/null +++ b/scripts/SjDNjLBGsd9fYObo.js @@ -0,0 +1 @@ +args.applyAP = false; \ No newline at end of file diff --git a/scripts/SlrslcNdnYONcSH3.js b/scripts/SlrslcNdnYONcSH3.js new file mode 100644 index 0000000..785a67e --- /dev/null +++ b/scripts/SlrslcNdnYONcSH3.js @@ -0,0 +1,16 @@ +let weapon = this.actor.itemTags["weapon"].find(i => i.system.isEquipped); +if (!weapon) +{ + this.script.notification("Aucune arme équipée!", "error"); + return; +} + +if (await this.actor.spend("system.status.fortune.value", 1)) +{ + let test = await this.actor.setupWeapon(weapon, {appendTitle : ` - ${this.effect.name}`, whirlwind: true}); + test.roll(); +} +else +{ + this.script.notification("Pas assez de Chance!", "error"); +} \ No newline at end of file diff --git a/scripts/SlzPn7ONIKab9URj.js b/scripts/SlzPn7ONIKab9URj.js new file mode 100644 index 0000000..4bc3c31 --- /dev/null +++ b/scripts/SlzPn7ONIKab9URj.js @@ -0,0 +1,5 @@ +if (game.combat.combatant?.actor?.uuid == this.actor.uuid) +{ + +this.script.message(await this.actor.applyBasicDamage(2, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL, suppressMsg : true})) +} \ No newline at end of file diff --git a/scripts/SrCHfOJFZwDickqa.js b/scripts/SrCHfOJFZwDickqa.js deleted file mode 100644 index 28558bc..0000000 --- a/scripts/SrCHfOJFZwDickqa.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") -} \ No newline at end of file diff --git a/scripts/SreM9Jyj2XZjoezH.js b/scripts/SreM9Jyj2XZjoezH.js new file mode 100644 index 0000000..06cf0e5 --- /dev/null +++ b/scripts/SreM9Jyj2XZjoezH.js @@ -0,0 +1 @@ +return args.item?.system?.attackType == "ranged" \ No newline at end of file diff --git a/scripts/StAderQaQQsxb6Rv.js b/scripts/StAderQaQQsxb6Rv.js index d361e9a..e6ffbf7 100644 --- a/scripts/StAderQaQQsxb6Rv.js +++ b/scripts/StAderQaQQsxb6Rv.js @@ -1,7 +1,7 @@ let target = await game.wfrp4e.tables.rollTable("fixations") if (target) { - this.script.scriptNotification(target.result); + this.script.notification(target.result); let hatred = this.actor.items.find(i => i.getFlag("wfrp4e", "fromEffect") == this.effect.id) if (hatred) { diff --git a/scripts/SwliIjjjFtZMnJH3.js b/scripts/SwliIjjjFtZMnJH3.js new file mode 100644 index 0000000..b736977 --- /dev/null +++ b/scripts/SwliIjjjFtZMnJH3.js @@ -0,0 +1 @@ +return !args.weapon?.system.properties.qualities.hack || args.weapon?.system?.isProjectiles \ No newline at end of file diff --git a/scripts/T0KBl8iEkcPq08RI.js b/scripts/T0KBl8iEkcPq08RI.js new file mode 100644 index 0000000..e0fdcb3 --- /dev/null +++ b/scripts/T0KBl8iEkcPq08RI.js @@ -0,0 +1,5 @@ +if (args.applyAP && args.modifiers.ap.magical) +{ + args.modifiers.ap.ignored += args.modifiers.ap.magical + args.modifiers.ap.details.push("" + this.effect.name + ": Ignore les PA magiques (" + args.modifiers.ap.magical + ")"); +} \ No newline at end of file diff --git a/scripts/T3RfSt3VMEat3iDD.js b/scripts/T3RfSt3VMEat3iDD.js deleted file mode 100644 index 747d789..0000000 --- a/scripts/T3RfSt3VMEat3iDD.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/T4JEEDYCEIUbVHv4.js b/scripts/T4JEEDYCEIUbVHv4.js new file mode 100644 index 0000000..630505c --- /dev/null +++ b/scripts/T4JEEDYCEIUbVHv4.js @@ -0,0 +1,6 @@ +let fatigued = this.actor.hasCondition("fatigued") + if (!fatigued) + { + this.actor.addCondition("fatigued") + ui.notifications.notify("Etat Extenué 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/T5fiTzhXEQAv9Drf.js b/scripts/T5fiTzhXEQAv9Drf.js index b4d5c21..4694b6d 100644 --- a/scripts/T5fiTzhXEQAv9Drf.js +++ b/scripts/T5fiTzhXEQAv9Drf.js @@ -11,7 +11,7 @@ if (location) if (dropped.length) { - this.script.scriptNotification(`Laché ${dropped.map(i => i.name).join(", ")}!`) + this.script.notification(`Dropped ${dropped.map(i => i.name).join(", ")}!`) for(let weapon of dropped) { await weapon.system.toggleEquip(); diff --git a/scripts/TAw9vXnfyIAl5DGs.js b/scripts/TAw9vXnfyIAl5DGs.js index 587a05a..696cce4 100644 --- a/scripts/TAw9vXnfyIAl5DGs.js +++ b/scripts/TAw9vXnfyIAl5DGs.js @@ -1,11 +1,11 @@ if (this.item.system.quantity.value) { - game.wfrp4e.utility.postCorruptionTest("minor", this.script.getChatData()); + CorruptionMessageModel.createCorruptionMessage("minor", this.script.getChatData()); this.item.system.reduceQuantity(); let actor = Array.from(game.user.targets)[0]?.actor || this.actor; actor.applyEffect({effectData : [this.item.effects.contents[1].convertToApplied()]}) } else { - this.script.scriptNotification("Quantité insuffisante!", "error") + this.script.notification("Plus rien !", "error") } \ No newline at end of file diff --git a/scripts/TBpNFRL5uehs0fze.js b/scripts/TBpNFRL5uehs0fze.js index 974d619..2097b48 100644 --- a/scripts/TBpNFRL5uehs0fze.js +++ b/scripts/TBpNFRL5uehs0fze.js @@ -6,5 +6,5 @@ if (this.item.system.quantity.value) } else { - this.script.scriptNotification("Quantité insuffisante!", "error") + this.script.notification("Plus rien !", "error") } \ No newline at end of file diff --git a/scripts/TCgEBuMPPd5SLAsc.js b/scripts/TCgEBuMPPd5SLAsc.js new file mode 100644 index 0000000..7417910 --- /dev/null +++ b/scripts/TCgEBuMPPd5SLAsc.js @@ -0,0 +1 @@ +args.fields.modifier -= 15 \ No newline at end of file diff --git a/scripts/TCtXPvDpbfz1yrVZ.js b/scripts/TCtXPvDpbfz1yrVZ.js index f980ba6..d247b77 100644 --- a/scripts/TCtXPvDpbfz1yrVZ.js +++ b/scripts/TCtXPvDpbfz1yrVZ.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 (Two-Handed)", + name : "Corps à corps (A deux mains)", diff : { system : { advances : { @@ -25,40 +25,40 @@ let choice2 = [ } ] -let choice = await new Promise((resolve, reject) => { - new Dialog({ - title : "Choice", - content : + let choice = await foundry.applications.api.DialogV2.wait({ + window : {title : "Choix"}, + content : `- Select your choice + Sélectionnez votre choix
- Select your choice -
-+ Sélectionnez votre choix +
+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 = 'challenging'; 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/UlygtNPSDlWPIFCI.js b/scripts/UlygtNPSDlWPIFCI.js new file mode 100644 index 0000000..778c544 --- /dev/null +++ b/scripts/UlygtNPSDlWPIFCI.js @@ -0,0 +1 @@ +,args.fields.slBonus++;,args.fields.slBonus++;,args.fields.slBonus++; \ No newline at end of file diff --git a/scripts/UnqnWi0dZYLf5fTT.js b/scripts/UnqnWi0dZYLf5fTT.js index 9d03e2a..8c15c72 100644 --- a/scripts/UnqnWi0dZYLf5fTT.js +++ b/scripts/UnqnWi0dZYLf5fTT.js @@ -1,101 +1,104 @@ let choice1 = [ { type : "armour", - name : "Mail Chausses" + name : "Chausses de Mailles" }, { type : "armour", - name : "Mail Coat" + name : "Cotte de Mailles" }, { type : "armour", - name : "Mail Coif" + name : "Coiffe de Mailles" }, ] let choice2 = [ { type : "armour", - name : "Mail Chausses" + name : "Chausses de Mailles" }, { type : "armour", - name : "Mail Coat" + name : "Cotte de Mailles" }, { type : "armour", - name : "Mail Coif" + name : "Coiffe de Mailles" }, { type : "armour", - name : "Leather Leggings" + name : "Jambières de cuir" }, { type : "armour", - name : "Leather Skullcap" + name : "Calotte de cuir" }, { type : "armour", - name : "Leather Jack" + name : "Veste de cuir" }, ] let choice3 = [ { type : "armour", - name : "Plate Breastplate" + name : "Plastron d'acier" }, { type : "armour", - name : "Plate Bracers" + name : "Brassards" }, { type : "armour", - name : "Plate Helm" + name : "Heaume" }, { type : "armour", - name : "Plate Leggings" + name : "Jambières d'acier" }, ] -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
Finished replacing ${this.item.name} with a makeshift one.
`; -const test = 'Maintenance Crew Test'; -const difficulty = 'hard'; +const repaired_message = `Le remplacement de ${this.item.name} par un équipement de fortune est terminé.
`; +const Test = 'Test de l\'équipe de maintenance'; +const difficulty = 'difficile'; const target = 80; const extendedTestData = { @@ -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 : { @@ -45,7 +45,7 @@ const extendedTestData = { ] } } - + ] }; diff --git a/scripts/VLdF2HPnCrNIgp7a.js b/scripts/VLdF2HPnCrNIgp7a.js index 387201b..a04183d 100644 --- a/scripts/VLdF2HPnCrNIgp7a.js +++ b/scripts/VLdF2HPnCrNIgp7a.js @@ -1,12 +1,12 @@ let items = []; let etiquette = (await fromUuid("Compendium.wfrp4e-core.items.Item.sYbgpSnRqSZWgwFP")).toObject(); -etiquette.name += " (Suivants de Khorne)"; +etiquette.name += " (Followers of Khorne)"; items.push(etiquette); let animosity = (await fromUuid("Compendium.wfrp4e-core.items.Item.0VpT5yubw4UL7j6f")).toObject(); - animosity.system.specification.value = "Suivants de Slaanesh"; + animosity.system.specification.value = "Followers of Slaanesh"; items.push(animosity); diff --git a/scripts/VNOKTzCrFbZ6PJUj.js b/scripts/VNOKTzCrFbZ6PJUj.js deleted file mode 100644 index 0674596..0000000 --- a/scripts/VNOKTzCrFbZ6PJUj.js +++ /dev/null @@ -1 +0,0 @@ -return !["Emprise sur les animaux", "Résistance", "Survie en extérieur"].includes(args.skill?.name) \ No newline at end of file diff --git a/scripts/VOc9sKag2Vy4vGGZ.js b/scripts/VOc9sKag2Vy4vGGZ.js new file mode 100644 index 0000000..ef07da2 --- /dev/null +++ b/scripts/VOc9sKag2Vy4vGGZ.js @@ -0,0 +1,59 @@ +let specifier = this.item.specifier; +let rune; +let categories = []; +if (specifier && specifier.toLowerCase() != "toutes formes") +{ + if (specifier.includes("Talisman")) + { + categories.push("talisman"); + } + if (specifier.includes("Protection")) + { + categories.push("protection"); + } + if (specifier.includes("Arme")) + { + categories.push("weapon"); + } + if (specifier.includes("Armure")) + { + categories.push("armour"); + } + if (specifier.includes("Engineering")) + { + categories.push("engineering"); + } + + if (categories.length) + { + let runes = await warhammer.utility.findAllItems("wfrp4e-dwarfs.rune", null, true, ["system.category", "system.master"]); + let choices = runes.filter(i => categories.includes(i.system.category) && i.system.master); + + if (choices.length) + { + rune = (await ItemDialog.create(choices, 1, {title : this.effect.name, text : specifier, indexed: true}))[0] + } + else + { + rune = await DragDialog.create({text : `Provide Master Rune to learn (${specifier})`, title : this.effect.name, filter: (item) => item.type == "wfrp4e-dwarfs.rune" && item.system.master, onError: "Doit fournir une Rune Maîtresse"}); + } + } + else + { + rune = await DragDialog.create({text : `Provide Master Rune to learn (${specifier})`, title : this.effect.name, filter: (item) => item.type == "wfrp4e-dwarfs.rune" && item.system.master, onError: "Doit fournir une Rune Maîtresse"}); + } +} +else +{ + rune = await DragDialog.create({text : `Provide Master Rune to learn`, title : this.effect.name, filter: (item) => item.type == "wfrp4e-dwarfs.rune" && item.system.master, onError: "Doit fournir une Rune Maîtresse"}); +} + +this.actor.addEffectItems(rune.uuid, this.effect) + +let talents = this.actor.itemTags.talent.filter(i => i.baseName == this.item.baseName); +let xpCost = talents.length * 100 + +if (this.actor.type == "character" && (await foundry.applications.api.DialogV2.confirm({window: {title: this.effect.name}, content: `Spend ${xpCost} XP for learning ${this.item.name}?
`}))) +{ + this.actor.update({"system.details.experience.log" : this.actor.system.addToExpLog(xpCost, this.item.name, this.actor.system.details.experience.spent + xpCost)}) +} \ No newline at end of file diff --git a/scripts/VQaC6ynouW5EQCbC.js b/scripts/VQaC6ynouW5EQCbC.js deleted file mode 100644 index 011cb84..0000000 --- a/scripts/VQaC6ynouW5EQCbC.js +++ /dev/null @@ -1,13 +0,0 @@ -let roll = await new Roll("1d10").roll(); - -await roll.toMessage(this.script.getChatData()); - -this.script.scriptMessage(await this.actor.applyBasicDamage(roll.total, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL, suppressMsg : true})); - -let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {skipTargets: true, appendTitle : " - " + this.effect.name}); -await test.roll(); - -if (test.succeeded) -{ - return false; -} \ No newline at end of file diff --git a/scripts/VRDS4lkwSAzbtvm4.js b/scripts/VRDS4lkwSAzbtvm4.js new file mode 100644 index 0000000..610b03e --- /dev/null +++ b/scripts/VRDS4lkwSAzbtvm4.js @@ -0,0 +1,4 @@ +if (args.totalWoundLoss > this.actor.system.status.wounds.value || args.opposedTest?.attackerTest.result.critical) +{ + args.extraMessages.push(`${this.effect.name}: Can reverse Critical Wound roll`) +} \ No newline at end of file diff --git a/scripts/VTzpExK3QSCaFQPf.js b/scripts/VTzpExK3QSCaFQPf.js new file mode 100644 index 0000000..fe646a4 --- /dev/null +++ b/scripts/VTzpExK3QSCaFQPf.js @@ -0,0 +1,13 @@ +if (args.equipped) +{ + let item = await fromUuid("Compendium.wfrp4e-core.items.Item.SfUUdOGjdYpr3KSR") + let regen = item.toObject(); + item = await fromUuid("Compendium.wfrp4e-core.items.Item.kJNAY1YRaCy9IgmT"); + let terror = item.toObject(); + terror.system.specification.value = 2; + this.actor.createEmbeddedDocuments("Item", [regen, terror], {fromEffect : this.effect.id}); +} +else +{ + this.effect.deleteCreatedItems(); +} \ No newline at end of file diff --git a/scripts/VXERNoc5IazQGuGO.js b/scripts/VXERNoc5IazQGuGO.js index 5ac49c4..583740c 100644 --- a/scripts/VXERNoc5IazQGuGO.js +++ b/scripts/VXERNoc5IazQGuGO.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 : "Add Metal AP to Damage" }) - args.modifiers.ap.details.push("" + this.effect.name + ": Ignore Metal (" + 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/VbI0Al6rJfypV3qY.js b/scripts/VbI0Al6rJfypV3qY.js new file mode 100644 index 0000000..8530f8d --- /dev/null +++ b/scripts/VbI0Al6rJfypV3qY.js @@ -0,0 +1,4 @@ +const failure = game.i18n.localize("ROLL.ImpressiveFailure"); +const success = game.i18n.localize("ROLL.AstoundingSuccess"); + +args.test.result.description = args.test.succeeded ? success : failure; \ No newline at end of file diff --git a/scripts/VbL0TgaBAmYjrezZ.js b/scripts/VbL0TgaBAmYjrezZ.js deleted file mode 100644 index 2f61494..0000000 --- a/scripts/VbL0TgaBAmYjrezZ.js +++ /dev/null @@ -1,2 +0,0 @@ -const talents = await Promise.all(["Dur à cuire"].map(game.wfrp4e.utility.findTalent)) -this.actor.createEmbeddedDocuments("Item", talents, {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/scripts/VcE8Hie2jbpuyuM3.js b/scripts/VcE8Hie2jbpuyuM3.js new file mode 100644 index 0000000..f7f86a5 --- /dev/null +++ b/scripts/VcE8Hie2jbpuyuM3.js @@ -0,0 +1,34 @@ +const vomit = this.actor.itemTags.trait.find(t => t.name === "Vomissement"); +const name = "Bileful rollTest"; + +if (!vomit) return; + +const effect = vomit.effects.find(e => e.name === "Vomissement"); +const scriptData = effect.system.scriptData; + +// REMINDER + +scriptData.push({ + label: 'Rappel des règles du sort', + trigger: 'rollTest', + script: ` + args.test.result.other.push("This rollTest attack follows the rules for the Lore of Nurgle spell @UUID[Compendium.wfrp4e-core.items.Item.XhyZ140R1iA1J7wZ]."); + ` +}); + +// /REMINDER + +// update Effect's name +await effet.update({ + name, + "system.scriptData": scriptData +}); + + +// update Trait's name +await vomit.update({name}); + +// copy effect from Stream of Corruption spell +const effectData = (await fromUuid("Compendium.wfrp4e-core.items.Item.XhyZ140R1iA1J7wZ.ActiveEffect.KAXAHr5NdusLTz6k")).toObject(); + +await vomit.createEmbeddedDocuments("ActiveEffect", [effectData]); \ No newline at end of file diff --git a/scripts/VlFUDaKUYoBYKYn0.js b/scripts/VlFUDaKUYoBYKYn0.js deleted file mode 100644 index b75c5c1..0000000 --- a/scripts/VlFUDaKUYoBYKYn0.js +++ /dev/null @@ -1,7 +0,0 @@ -let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, 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'1 Point de Corruption", {whisper : ChatMessage.getWhisperRecipients("GM")}) -} \ No newline at end of file diff --git a/scripts/VlHuDIAvPr8JM1P5.js b/scripts/VlHuDIAvPr8JM1P5.js deleted file mode 100644 index 3f2a904..0000000 --- a/scripts/VlHuDIAvPr8JM1P5.js +++ /dev/null @@ -1 +0,0 @@ -return args.skill?.name !== game.i18n.localize("NAME.Row"); \ No newline at end of file diff --git a/scripts/Vns6WrafVq8NjX7t.js b/scripts/Vns6WrafVq8NjX7t.js deleted file mode 100644 index 3b16346..0000000 --- a/scripts/Vns6WrafVq8NjX7t.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/VqTrKPtxv9hpn0Hr.js b/scripts/VqTrKPtxv9hpn0Hr.js deleted file mode 100644 index c785745..0000000 --- a/scripts/VqTrKPtxv9hpn0Hr.js +++ /dev/null @@ -1 +0,0 @@ -return args.skill?.name != "Langue (Magick)" \ No newline at end of file diff --git a/scripts/VurA2XNqC0d9U49C.js b/scripts/VurA2XNqC0d9U49C.js deleted file mode 100644 index 9853d7f..0000000 --- a/scripts/VurA2XNqC0d9U49C.js +++ /dev/null @@ -1,8 +0,0 @@ -this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`}).then(async test => -{ - await test.roll() - if (test.failed) - { - this.actor.addCondition("fatigued") - } -}) \ No newline at end of file diff --git a/scripts/VzO0ZDcTWvaBn4vm.js b/scripts/VzO0ZDcTWvaBn4vm.js deleted file mode 100644 index 22bb444..0000000 --- a/scripts/VzO0ZDcTWvaBn4vm.js +++ /dev/null @@ -1,13 +0,0 @@ -if (args.test.preData.skillName?.includes(game.i18n.localize("NAME.Language")) || args.test instanceof CastTest) -{ - if (parseInt(args.test.result.SL) > 0 || args.test.succeeded) - { - if (parseInt(args.test.result.SL) > 0) - { - args.test.result.SL = "-0"; - args.test.result.description = game.i18n.localize("ROLL.MarginalFailure"); - } - args.test.result.outcome = "failure" - args.test.result.other.push(`${this.effect.name}: Maximum -0 DR`) - } -} \ No newline at end of file diff --git a/scripts/VzgTGb5QXKoyPNh3.js b/scripts/VzgTGb5QXKoyPNh3.js index 0d934ee..14b45eb 100644 --- a/scripts/VzgTGb5QXKoyPNh3.js +++ b/scripts/VzgTGb5QXKoyPNh3.js @@ -6,8 +6,8 @@ if (args.attackerTest.weapon && args.defenderTest.weapon) if (attackerReach == defenderReach) defenderReach = defenderReach < 7 ? defenderReach + 1 : defenderReach - 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/W2rdTwflbUVxFyfd.js b/scripts/W2rdTwflbUVxFyfd.js new file mode 100644 index 0000000..0114a36 --- /dev/null +++ b/scripts/W2rdTwflbUVxFyfd.js @@ -0,0 +1,14 @@ +let difficulty = "" + if (this.effect.name.includes("Moderate")) + difficulty = "easy" + else if (this.effect.name.includes("Severe")) + difficulty = "average" + else + difficulty = "veasy" + + let test = await this.actor.setupSkill(game.i18n.localize("NAME.Résistance"), {context : {failure : this.actor.name + " meurt de la Pourriture"}, fields: {difficulty}, appendTitle : " - Pourriture"}) + await Test.roll(); + if (Test.Échoué) + { + this.actor.addCondition("dead"); + } \ No newline at end of file diff --git a/scripts/W5qtA7Ul5cOj18Nd.js b/scripts/W5qtA7Ul5cOj18Nd.js new file mode 100644 index 0000000..b5dfbf5 --- /dev/null +++ b/scripts/W5qtA7Ul5cOj18Nd.js @@ -0,0 +1 @@ +this.item.update({"system.AP" : {lArm : 3, rArm : 3, lLeg : 3, rLeg: 3}}); \ No newline at end of file diff --git a/scripts/W9nyUNQStMr1pUHJ.js b/scripts/W9nyUNQStMr1pUHJ.js index 9e2119c..fd0843c 100644 --- a/scripts/W9nyUNQStMr1pUHJ.js +++ b/scripts/W9nyUNQStMr1pUHJ.js @@ -1,5 +1,5 @@ if (args.opposedTest.result.hitloc.value == this.item.system.location.key) { args.actor.addCondition("bleeding", 1); - this.script.scriptNotification("Ajout de Hémorragique"); -} + this.script.notification("Etat Hémorragique ajouté") +} \ No newline at end of file diff --git a/scripts/WB6sIpLEPC8YPX67.js b/scripts/WB6sIpLEPC8YPX67.js index 2c65a63..e7427be 100644 --- a/scripts/WB6sIpLEPC8YPX67.js +++ b/scripts/WB6sIpLEPC8YPX67.js @@ -1,6 +1,6 @@ -if (args.options.dodge) +if (args.context.dodge) { args.abort = true; - this.script.scriptNotification("Ne peut pas esquiver!") + this.script.notification("Impossible d'Esquiver!") } return ["t", "int", "wp", "fel"].includes(args.characteristic) \ No newline at end of file diff --git a/scripts/WO5n7Vbx8AgoVrwC.js b/scripts/WO5n7Vbx8AgoVrwC.js index eb2b2f4..b8362dc 100644 --- a/scripts/WO5n7Vbx8AgoVrwC.js +++ b/scripts/WO5n7Vbx8AgoVrwC.js @@ -10,10 +10,10 @@ let characteristics = { "wp" : 5, "fel" : 5 } -let skills = ["Intuition", "Lore (Local)", "Perception"] +let skills = ["Intuition", "Savoir (Local)", "Perception"] let skillAdvancements = [10, 10, 10] let talents = [] -let trappings = ["Mail Coat", "Mail Chausses", "Mail Coif", "Arme simple"] +let trappings = ["Cotte de Mailles", "Chausses de Mailles", "Coiffe de Mailles", "Arme simple"] 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/WOpRJluHKER1MdgI.js b/scripts/WOpRJluHKER1MdgI.js new file mode 100644 index 0000000..0114a36 --- /dev/null +++ b/scripts/WOpRJluHKER1MdgI.js @@ -0,0 +1,14 @@ +let difficulty = "" + if (this.effect.name.includes("Moderate")) + difficulty = "easy" + else if (this.effect.name.includes("Severe")) + difficulty = "average" + else + difficulty = "veasy" + + let test = await this.actor.setupSkill(game.i18n.localize("NAME.Résistance"), {context : {failure : this.actor.name + " meurt de la Pourriture"}, fields: {difficulty}, appendTitle : " - Pourriture"}) + await Test.roll(); + if (Test.Échoué) + { + this.actor.addCondition("dead"); + } \ No newline at end of file diff --git a/scripts/WR0Kqn8CF5iwToak.js b/scripts/WR0Kqn8CF5iwToak.js index 0a34397..e66d456 100644 --- a/scripts/WR0Kqn8CF5iwToak.js +++ b/scripts/WR0Kqn8CF5iwToak.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 = '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/WTRYAEzwxRuGENyI.js b/scripts/WTRYAEzwxRuGENyI.js deleted file mode 100644 index 6614176..0000000 --- a/scripts/WTRYAEzwxRuGENyI.js +++ /dev/null @@ -1,18 +0,0 @@ - // Every living creature within 10 yards, other than the wielder of the hammer, - // must make a Challenging (+0) Endurance Test - - let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), { - skipTargets: true, appendTitle : " - " + this.effect.name, - fields: {difficulty: "challenging"} - }) - - await test.roll(); - if (test.failed) - { - // or gain a Deafened Condition - this.actor.addCondition("deafened"); - // and suffer 1d10 Wounds which bypass armour but not Toughness Bonus. - let damage = (await new Roll("1d10").roll()); - await damage.toMessage(this.script.getChatData()); - this.script.scriptMessage(await this.actor.applyBasicDamage(damage.total, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_AP, suppressMsg: true})) - } \ No newline at end of file diff --git a/scripts/WaeL2I8VVJmBBKHk.js b/scripts/WaeL2I8VVJmBBKHk.js new file mode 100644 index 0000000..4794f63 --- /dev/null +++ b/scripts/WaeL2I8VVJmBBKHk.js @@ -0,0 +1,19 @@ +const vomit = this.actor.itemTags.trait.find(t => t.name === "Vomissement"); +const name = "Test de Corruption"; + +if (!vomit) return; + +const effect = vomit.effects.find(e => e.name === "Vomissement"); +const scriptData = effect.system.scriptData; + +scriptData[0].script = ` +args.actor.addCondition("stunned"); +args.actor.corruptionDialog("moderate"); +` + +await effect.update({ + name, + "system.scriptData": scriptData +}); + +await vomit.update({name}); \ No newline at end of file diff --git a/scripts/Wh1VV3javfzcV3bP.js b/scripts/Wh1VV3javfzcV3bP.js new file mode 100644 index 0000000..8e3240a --- /dev/null +++ b/scripts/Wh1VV3javfzcV3bP.js @@ -0,0 +1,7 @@ +let spells = await warhammer.utility.findAllItems("spell", "Loading Spells", true, ["system.lore.value"]); + +spells = spells.filter(i => ["dark", "light", "fire", "life", "beasts", "shadows", "death", "heavens", "metal"].includes(i.system.lore.value)).sort((a, b) => a.name > b.name ? 1 : -1); + +let choices = await ItemDialog.create(spells, 7, {text : "Choisissez 7 Sorts parmi toute combinaison de Magie de Couleur, Sorcellerie ou Magie Noire", title : this.effect.name}) + +this.actor.addEffectItems(choices.map(i => i.uuid), this.effect) \ No newline at end of file diff --git a/scripts/WiYtNU2Y5BJfIpeM.js b/scripts/WiYtNU2Y5BJfIpeM.js index 3af96fd..1a16004 100644 --- a/scripts/WiYtNU2Y5BJfIpeM.js +++ b/scripts/WiYtNU2Y5BJfIpeM.js @@ -6,7 +6,7 @@ if (location) if (dropped.length) { - this.script.scriptNotification(`Lache ${dropped.map(i => i.name).join(", ")}!`) + this.script.notification(`Dropped ${dropped.map(i => i.name).join(", ")}!`) for(let weapon of dropped) { await weapon.system.toggleEquip(); diff --git a/scripts/Wo4wQKUxSItAhRzZ.js b/scripts/Wo4wQKUxSItAhRzZ.js index d3828b8..0923471 100644 --- a/scripts/Wo4wQKUxSItAhRzZ.js +++ b/scripts/Wo4wQKUxSItAhRzZ.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 += 3 // 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/Wqff6ICWYzvLDYC8.js b/scripts/Wqff6ICWYzvLDYC8.js deleted file mode 100644 index cbd8baf..0000000 --- a/scripts/Wqff6ICWYzvLDYC8.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("Sensory Sharing", "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/WsN2R1qOzuLa2qyB.js b/scripts/WsN2R1qOzuLa2qyB.js new file mode 100644 index 0000000..22022dd --- /dev/null +++ b/scripts/WsN2R1qOzuLa2qyB.js @@ -0,0 +1,59 @@ +let specifier = this.item.specifier; +let rune; +let categories = []; +if (specifier && specifier.toLowerCase() != "toutes formes") +{ + if (specifier.includes("Talisman")) + { + categories.push("talisman"); + } + if (specifier.includes("Protection")) + { + categories.push("protection"); + } + if (specifier.includes("Arme")) + { + categories.push("weapon"); + } + if (specifier.includes("Armure")) + { + categories.push("armour"); + } + if (specifier.includes("Engineering")) + { + categories.push("engineering"); + } + + if (categories.length) + { + let runes = await warhammer.utility.findAllItems("wfrp4e-dwarfs.rune", null, true, ["system.category", "system.master"]); + let choices = runes.filter(i => categories.includes(i.system.category) && !i.system.master); + + if (choices.length) + { + rune = (await ItemDialog.create(choices, 1, {title : this.effect.name, text : specifier, indexed: true}))[0] + } + else + { + rune = await DragDialog.create({text : `Provide Rune to learn (${specifier})`, title : this.effect.name, filter: (item) => item.type == "wfrp4e-dwarfs.rune" && !item.system.master, onError: "Doit fournir une Rune (non-Maîtresse)"}); + } + } + else + { + rune = await DragDialog.create({text : `Provide Rune to learn (${specifier})`, title : this.effect.name, filter: (item) => item.type == "wfrp4e-dwarfs.rune" && !item.system.master, onError: "Doit fournir une Rune (non-Maîtresse)"}); + } +} +else +{ + rune = await DragDialog.create({text : `Provide Rune to learn`, title : this.effect.name, filter: (item) => item.type == "wfrp4e-dwarfs.rune" && !item.system.master, onError: "Doit fournir une Rune (non-Maîtresse)"}); +} + +this.actor.addEffectItems(rune.uuid, this.effect) + +let talents = this.actor.itemTags.talent.filter(i => i.baseName == this.item.baseName); +let xpCost = talents.length * 100 + +if (this.actor.type == "character" && (await foundry.applications.api.DialogV2.confirm({window: {title: this.effect.name}, content: `Spend ${xpCost} XP for learning ${this.item.name}?
`}))) +{ + this.actor.update({"system.details.experience.log" : this.actor.system.addToExpLog(xpCost, this.item.name, this.actor.system.details.experience.spent + xpCost)}) +} \ No newline at end of file diff --git a/scripts/WtbSIghR0q4euE7J.js b/scripts/WtbSIghR0q4euE7J.js new file mode 100644 index 0000000..dd611b4 --- /dev/null +++ b/scripts/WtbSIghR0q4euE7J.js @@ -0,0 +1,4 @@ +if (args.effect.conditionId == "ablaze") +{ + args.data.formula = `(${args.data.formula}) * 2`; +} \ No newline at end of file diff --git a/scripts/X3vpmNUj9SL2CDnF.js b/scripts/X3vpmNUj9SL2CDnF.js index 2be4884..329c5ee 100644 --- a/scripts/X3vpmNUj9SL2CDnF.js +++ b/scripts/X3vpmNUj9SL2CDnF.js @@ -1,2 +1,2 @@ let item = args.actor.items.find(i => i.name.includes("Flying Jib")); -item.name += ` (Désactivé par ${this.item.name})`; \ No newline at end of file +item.name += ` (Disabled by ${this.item.name})`; \ No newline at end of file diff --git a/scripts/XClTZOjuhcxWLF51.js b/scripts/XClTZOjuhcxWLF51.js deleted file mode 100644 index 9765515..0000000 --- a/scripts/XClTZOjuhcxWLF51.js +++ /dev/null @@ -1,13 +0,0 @@ -let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {fields: {difficulty: "difficult"}, skipTargets: true, appendTitle : ` - ${this.effect.name}`}) -await test.roll(); - -if (test.failed) -{ - this.actor.addCondition("stunned") -} - - -let item = await fromUuid("Compendium.wfrp4e-core.items.4lj1ik958mbgAlaF") -let data = item.toObject(); -data.system.location.key = this.item.system.location.key -this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}) diff --git a/scripts/XO9m2AvFRAAeEuty.js b/scripts/XO9m2AvFRAAeEuty.js index 1f60a0f..67412d0 100644 --- a/scripts/XO9m2AvFRAAeEuty.js +++ b/scripts/XO9m2AvFRAAeEuty.js @@ -1,5 +1,5 @@ if (args.test.options.fieldDressing && 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/XPpHYTTT0hqYuSfa.js b/scripts/XPpHYTTT0hqYuSfa.js new file mode 100644 index 0000000..89a6b30 --- /dev/null +++ b/scripts/XPpHYTTT0hqYuSfa.js @@ -0,0 +1,4 @@ +fromUuid("Compendium.wfrp4e-core.items.IAWyzDfC286a9MPz").then(item => { + item = item.toObject() + this.actor.createEmbeddedDocuments("Item", [item], {fromEffect : this.effect.id}) +}) \ No newline at end of file diff --git a/scripts/XSbQKrrbjsN15Zp9.js b/scripts/XSbQKrrbjsN15Zp9.js new file mode 100644 index 0000000..ba6aead --- /dev/null +++ b/scripts/XSbQKrrbjsN15Zp9.js @@ -0,0 +1,7 @@ +if (!args.messageSent) +{ + args.messageSent = true; + let advantage = this.item.effects.filter(i => i.name == this.effect.name).length; + this.actor.setAdvantage(advantage) + this.script.message(`Allies within 12 yards gain ${advantage} Advantage`) +} \ No newline at end of file diff --git a/scripts/XcvDYNZgJ2rpAdDV.js b/scripts/XcvDYNZgJ2rpAdDV.js index 407b12a..8287614 100644 --- a/scripts/XcvDYNZgJ2rpAdDV.js +++ b/scripts/XcvDYNZgJ2rpAdDV.js @@ -1,6 +1,7 @@ -let fatigued = this.actor.hasCondition("fatigued") -if (!fatigued) { - this.actor.addCondition("fatigued") - ui.notifications.notify("Etat Fatigué ajouté à " + this.actor.name + " qui ne peut être enlevé tant que le symptôme de Malaise est présent.") -} \ No newline at end of file + let fatigued = this.actor.hasCondition("fatigued") + if (!fatigued) + { + this.actor.addCondition("fatigued") + ui.notifications.notify("Etat Extenué 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/Xe8ijqWU3bbtq7ZY.js b/scripts/Xe8ijqWU3bbtq7ZY.js index 86ba86b..f232698 100644 --- a/scripts/Xe8ijqWU3bbtq7ZY.js +++ b/scripts/Xe8ijqWU3bbtq7ZY.js @@ -1,5 +1,5 @@ if (args.opposedTest.defenderTest.actor.Species.toLowerCase().includes("skaven")) { args.addImpact = true; - args.opposedTest.result.other.push("Impact contre les Skavens") + args.opposedTest.result.other.push("Impact against Skaven") } \ No newline at end of file diff --git a/scripts/Xf4FcZ4ZLdWmOXBa.js b/scripts/Xf4FcZ4ZLdWmOXBa.js deleted file mode 100644 index 9aec486..0000000 --- a/scripts/Xf4FcZ4ZLdWmOXBa.js +++ /dev/null @@ -1 +0,0 @@ -return args.skill?.name != game.i18n.localize("NAME.Perception") && !args.skill?.name.includes(game.i18n.localize("NAME.Stealth")); \ No newline at end of file diff --git a/scripts/XfSxXatjEYlPEbaK.js b/scripts/XfSxXatjEYlPEbaK.js new file mode 100644 index 0000000..187999c --- /dev/null +++ b/scripts/XfSxXatjEYlPEbaK.js @@ -0,0 +1,3 @@ +const broken = this.actor.hasCondition("broken"); + +//broken?.delete(); \ No newline at end of file diff --git a/scripts/XjUXxUA0hbwjUatW.js b/scripts/XjUXxUA0hbwjUatW.js new file mode 100644 index 0000000..133121b --- /dev/null +++ b/scripts/XjUXxUA0hbwjUatW.js @@ -0,0 +1,12 @@ +if (this.actor.hasCondition("engaged") && this.effect.disabled) +{ + this.effect.update({"disabled" : false}) + this.item.effects.contents[1].update({"disabled" : false}); + this.script.notification("Enabled") +} +else if (this.effect.active && !this.actor.hasCondition("engaged")) +{ + this.effect.update({"disabled" : true}) + this.item.effects.contents[1].update({"disabled" : true}); + +} \ No newline at end of file diff --git a/scripts/Xk9XPklxxTvFlwpI.js b/scripts/Xk9XPklxxTvFlwpI.js index 2c3a1c6..db63fef 100644 --- a/scripts/Xk9XPklxxTvFlwpI.js +++ b/scripts/Xk9XPklxxTvFlwpI.js @@ -1 +1 @@ -args.options.useOnesArgumentative = true; \ No newline at end of file +args.context.useOnesArgumentative = true; \ No newline at end of file diff --git a/scripts/XuFxKPYheYF4WMmQ.js b/scripts/XuFxKPYheYF4WMmQ.js deleted file mode 100644 index ed63e68..0000000 --- a/scripts/XuFxKPYheYF4WMmQ.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/XzJotwVUIuQu6b0G.js b/scripts/XzJotwVUIuQu6b0G.js new file mode 100644 index 0000000..06b3f7d --- /dev/null +++ b/scripts/XzJotwVUIuQu6b0G.js @@ -0,0 +1 @@ +return !args.context.whirlwind || !args.weapon || !this.actor.has(game.i18n.localize("NAME.DualWielder"), "talent") || this.actor.noOffhand \ No newline at end of file diff --git a/scripts/Y27MmN5KFw45d5vQ.js b/scripts/Y27MmN5KFw45d5vQ.js new file mode 100644 index 0000000..04b8b8c --- /dev/null +++ b/scripts/Y27MmN5KFw45d5vQ.js @@ -0,0 +1,10 @@ +let test = await this.actor.setupSkill(game.i18n.localize("NAME.Résistance"), {difficulty: "challenging"}) +await test.roll(); +if (!test.succeeded) +{ + let rollResult = await (await fromUuid("RollTable.GL7rKOEThauPUK0E")).roll({allowInteractive : false}); + let diseaseId = rollResult.results[0].documentId; + let disease = await fromUuid("Item."+diseaseId); + obj = disease.toObject(); + this.actor.createEmbeddedDocuments("Item", [obj]); +} \ No newline at end of file diff --git a/scripts/Y43z8YCohJMA8Ia7.js b/scripts/Y43z8YCohJMA8Ia7.js new file mode 100644 index 0000000..9d33b8d --- /dev/null +++ b/scripts/Y43z8YCohJMA8Ia7.js @@ -0,0 +1,3 @@ +if (!args.test.preData.options?.giantbane) 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/Y7McxsHFeGhwQx0J.js b/scripts/Y7McxsHFeGhwQx0J.js index f2deebb..0063633 100644 --- a/scripts/Y7McxsHFeGhwQx0J.js +++ b/scripts/Y7McxsHFeGhwQx0J.js @@ -1,4 +1,4 @@ -this.actor.createEmbeddedDocuments("Item", [expandObject({ +this.actor.createEmbeddedDocuments("Item", [foundry.utils.expandObject({ name : "Ghostly Flame", type : "weapon", img : this.effect.img, diff --git a/scripts/Y8J66v8VTKUASGuK.js b/scripts/Y8J66v8VTKUASGuK.js index db00064..6d25f4d 100644 --- a/scripts/Y8J66v8VTKUASGuK.js +++ b/scripts/Y8J66v8VTKUASGuK.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/YDANERWYHyJ2ACeo.js b/scripts/YDANERWYHyJ2ACeo.js new file mode 100644 index 0000000..fce5808 --- /dev/null +++ b/scripts/YDANERWYHyJ2ACeo.js @@ -0,0 +1 @@ +args.fields.modifier -= 25 \ No newline at end of file diff --git a/scripts/YDqpKJVy8ijEKdLX.js b/scripts/YDqpKJVy8ijEKdLX.js deleted file mode 100644 index 8038377..0000000 --- a/scripts/YDqpKJVy8ijEKdLX.js +++ /dev/null @@ -1 +0,0 @@ -return !(this.actor.attacker && (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/YEBw2CzHYxsTpTy5.js b/scripts/YEBw2CzHYxsTpTy5.js deleted file mode 100644 index 8b438ad..0000000 --- a/scripts/YEBw2CzHYxsTpTy5.js +++ /dev/null @@ -1 +0,0 @@ -return args.skill?.name == game.i18n.localize("NAME.Haggle"); \ No newline at end of file diff --git a/scripts/YFSgWRXel0bWE3EE.js b/scripts/YFSgWRXel0bWE3EE.js deleted file mode 100644 index 459f8b2..0000000 --- a/scripts/YFSgWRXel0bWE3EE.js +++ /dev/null @@ -1 +0,0 @@ -return ["ag", "ws", "bs"].includes(args.characteristic) || args.skill?.name == game.i18n.localize("NAME.Climb"); \ No newline at end of file diff --git a/scripts/YHEIkBKWXKNPqglh.js b/scripts/YHEIkBKWXKNPqglh.js index ee2ebfb..952eb9b 100644 --- a/scripts/YHEIkBKWXKNPqglh.js +++ b/scripts/YHEIkBKWXKNPqglh.js @@ -1,4 +1,4 @@ if (args.test.result.castOutcome == "success") { - game.wfrp4e.utility.postCorruptionTest("moderate", this.script.getChatData()) + CorruptionMessageModel.createCorruptionMessage("moderate", this.script.getChatData()) } diff --git a/scripts/YJX7WnxzXXIVdH6P.js b/scripts/YJX7WnxzXXIVdH6P.js index cc0a9a0..4eeef7e 100644 --- a/scripts/YJX7WnxzXXIVdH6P.js +++ b/scripts/YJX7WnxzXXIVdH6P.js @@ -1,4 +1,4 @@ -let lore = await ValueDialog.create({text : "Choisissez un Domaine", title: "Savoir"}, "", {"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, 6, "Choisissez 3 Sorts de Magie Mineure") +let petty = await ItemDialog.createFromFilters(filters, 6, {title : this.effect.name, text : "Choisissez 6 Sorts Mineurs"}) filters = [ @@ -25,7 +25,7 @@ filters = [ } ] -let arcane = await ItemDialog.createFromFilters(filters, 12, "Choisissez 12 Sorts de Magie d'Arcane") +let arcane = await ItemDialog.createFromFilters(filters, 12, {title : this.effet.name, text : "Choisissez 12 Sorts d'Arcane"}) let items = petty.map(i => i.toObject()).concat(arcane.map(i => { let spell = i.toObject(); diff --git a/scripts/YMaxpXnml01bLGpO.js b/scripts/YMaxpXnml01bLGpO.js deleted file mode 100644 index e1e5841..0000000 --- a/scripts/YMaxpXnml01bLGpO.js +++ /dev/null @@ -1 +0,0 @@ -return args.item?.name.includes(game.i18n.localize("NAME.Stealth")) \ No newline at end of file diff --git a/scripts/YN8719gme9AxYtyY.js b/scripts/YN8719gme9AxYtyY.js index 7d33c2c..d082f85 100644 --- a/scripts/YN8719gme9AxYtyY.js +++ b/scripts/YN8719gme9AxYtyY.js @@ -10,13 +10,13 @@ let characteristics = { "wp" : 30, "fel" : 10 } -let skills = ["Focalisation", "Calme", "Esquive", "Divertissement (Narration)", "Intuition", "Langue (Magick)", "Commandement" , "Savoir (Magie)" , "Savoir (Théologie)", "Perception"] +let skills = ["Focalisation", "Calme", "Esquive", "Divertissement (Narration)", "Intuition", "Langue (Magick)", "Commandement", "Savoir (Magie)", "Savoir (Théologie)", "Perception"] let skillAdvancements = [20, 25, 20, 25, 30, 25, 15, 20, 10, 30] -let talents = ["Harmonisation Aethyrique", "Diction Instinctive", "Diction Instinctive", "Chance", "Sens de la Magie", "Menaçant", "Magie des Arcanes", "Magie Mineure", "Seconde Vue", "Sixième Sens"] +let talents = ["Harmonisation Aethyrique", "Diction Instinctive", "Diction Instinctive", "Chanceux", "Perception de la magie", "Menaçant", "Magie des Arcanes (Domaine)", "Magie Mineure", "Seconde Vue", "Sixième Sens"] let trappings = ["Arme simple", "Robes", "(2M) Bâton de combat"] let specialItems = [ - {name: "Objet magique", type: "trapping", trappingType: "misc" }, + {name: "Magic Item", type: "trapping", trappingType: "misc" }, ] let items = []; @@ -30,9 +30,9 @@ 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 }) } @@ -64,7 +64,7 @@ for (let talent of talents) } else { - ui.notifications.warn(`Impossible de trouver ${talent}`, {permanent : true}) + ui.notifications.warn(`Could not find ${talent}`, {permanent : true}) } } @@ -81,22 +81,22 @@ for (let trapping of trappings) } 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/YQ2LnLxp0xgy3meI.js b/scripts/YQ2LnLxp0xgy3meI.js index 64fbd33..0da9eb6 100644 --- a/scripts/YQ2LnLxp0xgy3meI.js +++ b/scripts/YQ2LnLxp0xgy3meI.js @@ -1,3 +1,3 @@ if (args.test.preData.options?.corruption && args.test.failed) { - args.test?.result?.other.push("Reçoit 1 Point de Corruption de " + this.effect.name) + args.test?.result?.other.push("Gain de +1 Corruption supplémentaire de " + this.effect.name) } \ No newline at end of file diff --git a/scripts/YRUTliBzAQvncGNX.js b/scripts/YRUTliBzAQvncGNX.js index 3018f09..25731b3 100644 --- a/scripts/YRUTliBzAQvncGNX.js +++ b/scripts/YRUTliBzAQvncGNX.js @@ -1,2 +1,2 @@ this.actor.addCondition("fatigued"); -this.script.scriptNotification("Ajout de Fatigué") \ No newline at end of file +this.script.notification("Etat Exténué ajouté") \ No newline at end of file diff --git a/scripts/YaKnYEbmmZZtByJc.js b/scripts/YaKnYEbmmZZtByJc.js index fd78e57..65dd7e3 100644 --- a/scripts/YaKnYEbmmZZtByJc.js +++ b/scripts/YaKnYEbmmZZtByJc.js @@ -1,5 +1,5 @@ if (args.opposedTest.attackerTest.options.ballockKnife) { args.weaponProperties.impale = true; - args.extraMessages.push(`${this.item.name}: Ajout de Empalement`) + args.extraMessages.push(`${this.item.name}: Impale Added`) } \ No newline at end of file diff --git a/scripts/YdiQFkm8j48Xs7gI.js b/scripts/YdiQFkm8j48Xs7gI.js new file mode 100644 index 0000000..d94a809 --- /dev/null +++ b/scripts/YdiQFkm8j48Xs7gI.js @@ -0,0 +1,5 @@ +if (args.totalWoundLoss > 0 && args.opposedTest.attackerTest.result.critical && args.opposedTest.result.hitloc.value == "head") { + let brainRot = await fromUuid("Compendium.wfrp4e-lustria.items.Item.IsNQH867Y58pZgq6"); + args.test.targets[0].createEmbeddedDocuments("Item", [brainRot], {fromEffect : this.effect.id}); + this.script.scriptMessage(`${args.test.targets[0].name} has been infected by Brain Rot`); +} \ No newline at end of file diff --git a/scripts/YfRPSgJjvHvl50HW.js b/scripts/YfRPSgJjvHvl50HW.js new file mode 100644 index 0000000..b80321b --- /dev/null +++ b/scripts/YfRPSgJjvHvl50HW.js @@ -0,0 +1 @@ +return args.skill?.name != "Runesmithing" \ No newline at end of file diff --git a/scripts/YhhiWEQbox3WZA3Q.js b/scripts/YhhiWEQbox3WZA3Q.js deleted file mode 100644 index 4b25255..0000000 --- a/scripts/YhhiWEQbox3WZA3Q.js +++ /dev/null @@ -1 +0,0 @@ -return args.skill?.name == game.i18n.localize("NAME.Heal") && game.combat?.active \ No newline at end of file diff --git a/scripts/YjJcRdytVRm88qLn.js b/scripts/YjJcRdytVRm88qLn.js index e34b448..689e108 100644 --- a/scripts/YjJcRdytVRm88qLn.js +++ b/scripts/YjJcRdytVRm88qLn.js @@ -1 +1 @@ -args.options.additionalDamage = 1 \ No newline at end of file +args.context.additionalDamage = 1 \ No newline at end of file diff --git a/scripts/YrXhk2YJaWSChMhp.js b/scripts/YrXhk2YJaWSChMhp.js new file mode 100644 index 0000000..7e6b20c --- /dev/null +++ b/scripts/YrXhk2YJaWSChMhp.js @@ -0,0 +1,24 @@ +// Brawling management +let base = this.actor.characteristics.ws.value; +let melee = this.actor.has("Corps à corps (Bagarre)", "skill"); +if (!melee) { + melee = await fromUuid("Compendium.wfrp4e-core.items.Item.jLyoyqwmBVPjRjhM"); + melee = melee.toObject(); + melee.system.modifier.value = 55 - base; + await this.actor.createEmbeddedDocuments("Item", [melee], {fromEffect : this.effect.id}); +} else { + //this.actor.updateEmbeddedDocuments("Item", { _id: melee.id, 'system.modifier.value': 55-base}); + await this.effect.update({"flags.wfrp4e.fistsOfGork" : 55 - base}) +} + +// Weapon management +base = this.actor.characteristics.s.bonus; +weapon = await fromUuid("Compendium.wfrp4e-core.items.Item.AtpAudHA4ybXVlWM"); +weapon = weapon.toObject(); +weapon.name = "Fists of Gork"; +weapon.img = this.effect.img; +weapon.system.rollable.skill = "Corps à corps (Bagarre)"; +weapon.system.specification.value = 9 - base; +await this.actor.createEmbeddedDocuments("Item", [weapon], {fromEffect : this.effect.id}); + +//this.script.scriptMessage(`${this.actor.name} now has Melee (Brawling) 55 and Weapon (Fists) +9`); \ No newline at end of file diff --git a/scripts/YsUdMhQ2AArcJIqy.js b/scripts/YsUdMhQ2AArcJIqy.js new file mode 100644 index 0000000..2ff83c5 --- /dev/null +++ b/scripts/YsUdMhQ2AArcJIqy.js @@ -0,0 +1,57 @@ +let choice1 = [ + { + type: "trait", + name: "Corruption (Mineure)", + diff : { + system : { + specification : { + value : "Minor" + } + } + } + }, + { + type: "trait", + name: "Infecté", + }, + { + 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(); + foundry.utils.mergeObject(item, c.diff); + items.push(item); + } + else + ui.notifications.warn(`Impossible de trouver ${c}`, { permanent: true }); + } + 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?
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 = 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/ZCkYe5XMVY1RWMXG.js b/scripts/ZCkYe5XMVY1RWMXG.js index 34cd3e9..8cf2ccb 100644 --- a/scripts/ZCkYe5XMVY1RWMXG.js +++ b/scripts/ZCkYe5XMVY1RWMXG.js @@ -1 +1 @@ -args.options.wallcrawler = true; \ No newline at end of file +args.context.wallcrawler = true; \ No newline at end of file diff --git a/scripts/ZCrfdLPOxiNDCDSg.js b/scripts/ZCrfdLPOxiNDCDSg.js index dfcbf82..962ecfb 100644 --- a/scripts/ZCrfdLPOxiNDCDSg.js +++ b/scripts/ZCrfdLPOxiNDCDSg.js @@ -1 +1 @@ -this.actor.effects.get(this.effect.id).delete(); // can't use this.effect because it thinks it's parent is the item, but it actually is the actor \ No newline at end of file +this.actor.effects.get(this.effect.id).delete(); // can't use this.effet because it thinks it's parent is the item, but it actually is the actor \ No newline at end of file diff --git a/scripts/ZCuOjLAeENKN1Q4L.js b/scripts/ZCuOjLAeENKN1Q4L.js index 315c53d..4667394 100644 --- a/scripts/ZCuOjLAeENKN1Q4L.js +++ b/scripts/ZCuOjLAeENKN1Q4L.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 Dégâts? (Divise les dégats de Feu)"}) + halve = await foundry.applications.api.DialogV2.confirm({window : {title : this.effect.name}, content : "Divisé les dégats par deux? (Divise les dégats de tout feu par deux)"}) } else { @@ -11,5 +11,5 @@ else if (halve) { args.totalWoundLoss /= 2; - args.modifiers.other.push({label : this.effect.name, details : "Divisé", 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/ZEXhYJqqxF6QAixX.js b/scripts/ZEXhYJqqxF6QAixX.js index 9070cbc..c02d17a 100644 --- a/scripts/ZEXhYJqqxF6QAixX.js +++ b/scripts/ZEXhYJqqxF6QAixX.js @@ -1 +1 @@ -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/ZLspFT2I3ZdWWr2H.js b/scripts/ZLspFT2I3ZdWWr2H.js deleted file mode 100644 index a3fa949..0000000 --- a/scripts/ZLspFT2I3ZdWWr2H.js +++ /dev/null @@ -1 +0,0 @@ -return args.skill?.name !== game.i18n.localize("NAME.Leadership"); \ No newline at end of file diff --git a/scripts/ZNW3ubbKIYXAyE48.js b/scripts/ZNW3ubbKIYXAyE48.js deleted file mode 100644 index 7ed4b06..0000000 --- a/scripts/ZNW3ubbKIYXAyE48.js +++ /dev/null @@ -1,29 +0,0 @@ -let wounds = this.actor.itemTypes.disease.filter(i => i.name == "Blessure Purulente" && i.system.duration.active); -let selected; -if (wounds.length == 0) -{ - return this.script.scriptNotification("Aucune Blessure Purulente!"); -} -else if (wounds.length == 1) -{ - selected = wounds[0]; -} -else if (wounds.length >= 2) -{ - selected = (await ItemDialog.create(wounds, 1))[0]; -} - -if (selected) -{ - let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {fields: {difficulty : "average"}}) - await test.roll(); - if (test.succeeded) - { - let SL = parseInt(test.result.SL); - if (SL >= 0) - { - selected.update({"system.duration.value" : selected.system.duration.value - SL}) - this.script.scriptMessage(`${selected.name} durée réduite de ${SL}!`) - } - } -} \ No newline at end of file diff --git a/scripts/ZNu4B0OdjkM9lmtu.js b/scripts/ZNu4B0OdjkM9lmtu.js index 45b796e..2177c29 100644 --- a/scripts/ZNu4B0OdjkM9lmtu.js +++ b/scripts/ZNu4B0OdjkM9lmtu.js @@ -1,4 +1,4 @@ let item = await fromUuid("Compendium.wfrp4e-core.items.9h82z72XGo9tfgQS") let data = item.toObject(); -data.name = data.name += " (Vue)" +data.name = data.name += " (Vision)" this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/scripts/ZRoG7GiMDQWso6gN.js b/scripts/ZRoG7GiMDQWso6gN.js index 6059262..7f971fa 100644 --- a/scripts/ZRoG7GiMDQWso6gN.js +++ b/scripts/ZRoG7GiMDQWso6gN.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 = 'difficult'; 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/ZTE8LdRblyG4yYoE.js b/scripts/ZTE8LdRblyG4yYoE.js index 16fcab5..824baa4 100644 --- a/scripts/ZTE8LdRblyG4yYoE.js +++ b/scripts/ZTE8LdRblyG4yYoE.js @@ -1,7 +1,7 @@ if (args.test.result.castOutcome == "success") { // Wait till after chat card is posted - game.wfrp4e.utility.sleep(500).then(() => { + warhammer.utility.sleep(500).then(() => { game.wfrp4e.utility.postTerror(1, this.effect.name) game.wfrp4e.utility.postTerror(2, this.effect.name) }) diff --git a/scripts/ZURBQYTYcP5jci5k.js b/scripts/ZURBQYTYcP5jci5k.js new file mode 100644 index 0000000..d64e7ef --- /dev/null +++ b/scripts/ZURBQYTYcP5jci5k.js @@ -0,0 +1,3 @@ +const broken = this.actor.hasCondition("broken"); + +broken?.delete(); \ No newline at end of file diff --git a/scripts/ZYsMgB4BwXBJcpYf.js b/scripts/ZYsMgB4BwXBJcpYf.js index e935d19..12a4f32 100644 --- a/scripts/ZYsMgB4BwXBJcpYf.js +++ b/scripts/ZYsMgB4BwXBJcpYf.js @@ -1,3 +1,3 @@ -// The wearer of the cloak causes Fear 2 +// The wearer of the cloak causes Peur 2 // in Wolves, Lions, Goats, and Chimeras. -game.wfrp4e.utility.postFear(2, this.effect.name) +game.wfrp4e.utility.postPeur(2, this.effect.name) diff --git a/scripts/ZdHvGvSJBsIuPphF.js b/scripts/ZdHvGvSJBsIuPphF.js index b20bae0..405beda 100644 --- a/scripts/ZdHvGvSJBsIuPphF.js +++ b/scripts/ZdHvGvSJBsIuPphF.js @@ -1 +1 @@ -return !args.fields.dualWielding && !args.options.dualWieldOffhand \ No newline at end of file +return !args.data.dualWieldingOption && !args.context.dualWieldOffhand \ No newline at end of file diff --git a/scripts/Ze9E2zR1GFGWGMVH.js b/scripts/Ze9E2zR1GFGWGMVH.js deleted file mode 100644 index 1550f81..0000000 --- a/scripts/Ze9E2zR1GFGWGMVH.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/ZfgPAtNKA5KrETer.js b/scripts/ZfgPAtNKA5KrETer.js new file mode 100644 index 0000000..57c45c9 --- /dev/null +++ b/scripts/ZfgPAtNKA5KrETer.js @@ -0,0 +1 @@ +return args.type == "cast"; \ No newline at end of file diff --git a/scripts/ZgF1sYdbAKaOuHmK.js b/scripts/ZgF1sYdbAKaOuHmK.js deleted file mode 100644 index 7e12f9d..0000000 --- a/scripts/ZgF1sYdbAKaOuHmK.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/ZingXNvYyZ2BEvfY.js b/scripts/ZingXNvYyZ2BEvfY.js deleted file mode 100644 index d6255b9..0000000 --- a/scripts/ZingXNvYyZ2BEvfY.js +++ /dev/null @@ -1,85 +0,0 @@ -let characteristics = { - "ws" : 10, - "bs" : 0, - "s" : 5, - "t" : 5, - "i" : 10, - "ag" : 0, - "dex" : 0, - "int" : 0, - "wp" : 0, - "fel" : 0 -} -let skills = ["Calme", "Equive", "Langue (Bataile)"] -let skillAdvancements = [10, 10, 10] - -let talents = ["Combat Instinctif", "Déterminé"] -let trappings = ["Plastron d'acier", "Brassards", "Heaume", "Jambières d'acier"] - -let items = []; - -let updateObj = this.actor.toObject(); - -for (let ch in characteristics) -{ - updateObj.system.characteristics[ch].modifier += characteristics[ch]; -} - -for (let index = 0; index < skills.length; index++) -{ - let skill = skills[index] - let skillItem; - skillItem = updateObj.items.find(i => i.name == skill && i.type == "skill") - if (skillItem) - skillItem.system.advances.value += skillAdvancements[index] - else - { - skillItem = await game.wfrp4e.utility.findSkill(skill) - skillItem = skillItem.toObject(); - skillItem.system.advances.value = skillAdvancements[index]; - items.push(skillItem); - } -} - -for (let talent of talents) -{ - let talentItem = await game.wfrp4e.utility.findTalent(talent) - if (talentItem) - { - items.push(talentItem.toObject()); - } - else - { - ui.notifications.warn(`Impossible de trouver ${talent}`, {permanent : true}) - } -} - -for (let trapping of trappings) -{ - let trappingItem = await game.wfrp4e.utility.findItem(trapping) - if (trappingItem) - { - trappingItem = trappingItem.toObject() - - trappingItem.system.equipped.value = true; - - items.push(trappingItem); - } - else - { - ui.notifications.warn(`Impossible de trouver ${trapping}`, {permanent : true}) - } -} - -let weapons = await warhammer.utility.findAllItems("weapon", "Chargement des armes"); - -items = items.concat((await game.wfrp4e.apps.ItemDialog.create([await fromUuid("Compendium.wfrp4e-core.items.Item.1zaqojk0Oq1m8vYv"), await fromUuid("Compendium.wfrp4e-core.items.Item.bBX8MP6QfcyU6Fy3")], 1, "Choisissez a Weapon")) || []) - -let choices = weapons.filter(i => i.system.properties.qualities.shield || i.system.weaponGroup.value == "polearm" || i.system.weaponGroup.value == "twohanded"); - -items = items.concat(await game.wfrp4e.apps.ItemDialog.create(choices, 1, "Choisissez un bouclier ou une Arme d'Hast ou une Arme à deux-mains")); - -updateObj.name = updateObj.name += " " + this.effect.name - -await this.actor.update(updateObj) -this.actor.createEmbeddedDocuments("Item", items); diff --git a/scripts/Znz4g56UH23SSCg7.js b/scripts/Znz4g56UH23SSCg7.js new file mode 100644 index 0000000..6d35ba2 --- /dev/null +++ b/scripts/Znz4g56UH23SSCg7.js @@ -0,0 +1,7 @@ +if (!args.messageSent) +{ + args.messageSent = true; + let advantage = this.item.effects.filter(i => i.name == this.effect.name).length; + this.actor.setAdvantage(advantage) + this.script.message(`Allies within 6 yards gain ${advantage} Advantage`) +} \ No newline at end of file diff --git a/scripts/ZqTW093qENOwGONP.js b/scripts/ZqTW093qENOwGONP.js index 9757bed..3a9575e 100644 --- a/scripts/ZqTW093qENOwGONP.js +++ b/scripts/ZqTW093qENOwGONP.js @@ -7,4 +7,4 @@ for(let i = 0; i < SL; i++) msg += `${await this.actor.applyBasicDamage(3, {suppressMsg : true, damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_AP})}
` } -this.script.scriptMessage(msg); \ No newline at end of file +this.script.message(msg); \ No newline at end of file diff --git a/scripts/ZvbBM4gTJHPdU8jU.js b/scripts/ZvbBM4gTJHPdU8jU.js deleted file mode 100644 index b8ce00a..0000000 --- a/scripts/ZvbBM4gTJHPdU8jU.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 : "hard"}}) -await test.roll(); -return test.failed \ No newline at end of file diff --git a/scripts/a02tlRCXpaoaDjSN.js b/scripts/a02tlRCXpaoaDjSN.js index 07a1b7d..61815b5 100644 --- a/scripts/a02tlRCXpaoaDjSN.js +++ b/scripts/a02tlRCXpaoaDjSN.js @@ -1,16 +1,16 @@ -let careers = await warhammer.utility.findAllItems("career", "", true); +let careers = await warhammer.utility.findAllItems("career", "Loading Careers", true); careers.forEach(c => { if (!c.id) { c.id = c._id; } }); -let choice = await ItemDialog.create(careers, 1, "Choisissez la carrière de votre double identité"); +let choice = await ItemDialog.create(careers, 1, {text : "Choisissez une Carrière de Double Vie", title : this.effect.name, indexed : true}); if (choice[0]) { - let career = await fromUuid(choice[0].uuid); + let career = choice[0]; let data = career.toObject(); - setProperty(data, "flags.wfrp4e.doubleLife", true); + foundry.utils.setProperty(data, "flags.wfrp4e.doubleLife", true); this.actor.createEmbeddedDocuments("Item", [data], {fromEffect: this.effect.id}) - this.effect.updateSource({name : this.effect.name + ` (${data.name})`}) + this.effect.updateSource({name : this.effect.setSpecifier(data.name)}) } diff --git a/scripts/a0YU3whUm16wGBNu.js b/scripts/a0YU3whUm16wGBNu.js deleted file mode 100644 index ed24c51..0000000 --- a/scripts/a0YU3whUm16wGBNu.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) -{ - this.actor.addCondition("fatigued"); -} \ No newline at end of file diff --git a/scripts/a4Aza4a9v8JMU8dC.js b/scripts/a4Aza4a9v8JMU8dC.js deleted file mode 100644 index 845cf2e..0000000 --- a/scripts/a4Aza4a9v8JMU8dC.js +++ /dev/null @@ -1,2 +0,0 @@ -const talents = await Promise.all(["Frénésie", "Résistance à la Magie"].map(game.wfrp4e.utility.findTalent)) -this.actor.createEmbeddedDocuments("Item", talents, {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/scripts/a6gacHsvgwtsIFSQ.js b/scripts/a6gacHsvgwtsIFSQ.js deleted file mode 100644 index 735565f..0000000 --- a/scripts/a6gacHsvgwtsIFSQ.js +++ /dev/null @@ -1,2 +0,0 @@ -if (args.test.item && args.test.item.name == game.i18n.localize("NAME.Research")) - args.test.preData.canReverse = true \ No newline at end of file diff --git a/scripts/a7pEvCycVnFBXGAQ.js b/scripts/a7pEvCycVnFBXGAQ.js index 4249b18..41350b7 100644 --- a/scripts/a7pEvCycVnFBXGAQ.js +++ b/scripts/a7pEvCycVnFBXGAQ.js @@ -1,7 +1,7 @@ -let test = await this.actor.setupCharacteristic("i", {skipTargets: true, appendTitle : " - Assomé", fields : {difficulty : "easy"}}) -await test.roll(); +let test = await this.actor.setupCharacteristic("i", {skipTargets: true, appendTitle : ` - ${this.effet.name}`, fields : {difficulty : "easy"}}) +await Test.roll(); -if (!test.succeeded) +if (!Test.succeeded) { this.actor.addCondition("stunned"); } \ No newline at end of file diff --git a/scripts/a81IMxqmMtHgYnIF.js b/scripts/a81IMxqmMtHgYnIF.js new file mode 100644 index 0000000..ba29b23 --- /dev/null +++ b/scripts/a81IMxqmMtHgYnIF.js @@ -0,0 +1 @@ +return !args.weapon?.system.isMelee; \ No newline at end of file diff --git a/scripts/a8i0sA1RBnD8nHZt.js b/scripts/a8i0sA1RBnD8nHZt.js index d8ce792..cd5e4de 100644 --- a/scripts/a8i0sA1RBnD8nHZt.js +++ b/scripts/a8i0sA1RBnD8nHZt.js @@ -1,35 +1,42 @@ let caster = this.effect.sourceActor -let targetedItem = this.actor.items.get(this.effect.flags.wfrp4e.itemTargets[0]) +let targetedItem = this.effect.system.itemTargets[0]; let qualities = foundry.utils.deepClone(game.wfrp4e.config.itemQualities); let flaws = foundry.utils.deepClone(game.wfrp4e.config.itemFlaws); -if (targetedItem.type == "weapon") { - foundry.utils.mergeObject(qualities, game.wfrp4e.config.weaponQualities) - foundry.utils.mergeObject(flaws, game.wfrp4e.config.weaponFlaws) +if (targetedItem.type == "weapon") +{ + foundry.utils.mergeObject(qualities, game.wfrp4e.config.weaponQualities) + foundry.utils.mergeObject(flaws, game.wfrp4e.config.weaponFlaws) } -else if (targetedItem.type == "armour") { - foundry.utils.mergeObject(qualities, game.wfrp4e.config.armorQualities) - foundry.utils.mergeObject(flaws, game.wfrp4e.config.armorFlaws) +else if (targetedItem.type == "armour") +{ + foundry.utils.mergeObject(qualities, game.wfrp4e.config.armorQualities) + foundry.utils.mergeObject(flaws, game.wfrp4e.config.armorFlaws) } -for (let q in qualities) { - // If the weapon already has a flaw, don't put it in the dialog - if (targetedItem.system.properties.qualities[q]) { - delete qualities[q] - } +for(let q in qualities) +{ + // If the weapon already has a flaw, don't put it in the dialog + if (targetedItem.system.properties.qualities[q]) + { + delete qualities[q] + } } -for (let f in flaws) { - // If a weapon doesn't have a flaw, don't put it in the dialog - if (!targetedItem.system.properties.flaws[f]) { - delete flaws[f] - } +for(let f in flaws) +{ + // If a weapon doesn't have a flaw, don't put it in the dialog + if (!targetedItem.system.properties.flaws[f]) + { + delete flaws[f] + } } -let added = await ItemDialog.create(ItemDialog.objectToArray(qualities), "unlimited", "Choisissez la Qualité à ajouter"); +let added = await ItemDialog.create(ItemDialog.objectToArray(qualities), "unlimited", "Choisir les Qualités à ajouter"); let removed = [] -if (!foundry.utils.isEmpty(flaws)) { - removed = await ItemDialog.create(ItemDialog.objectToArray(flaws), "unlimited", "Choisissez le Défaut à enlever"); +if (!foundry.utils.isEmpty(flaws)) +{ + removed = await ItemDialog.create(ItemDialog.objectToArray(flaws), "unlimited", "Choisir les Défauts à retirer"); } -this.effect.updateSource({ "flags.wfrp4e.propertiesChanged": { added: added.map(i => i.id), removed: removed.map(i => i.id) } }) +this.effect.updateSource({"flags.wfrp4e.propertiesChanged" : {added : added.map(i => i.id), removed : removed.map(i => i.id)}}) diff --git a/scripts/aAvJrAKLzXhS9qN6.js b/scripts/aAvJrAKLzXhS9qN6.js deleted file mode 100644 index 645c806..0000000 --- a/scripts/aAvJrAKLzXhS9qN6.js +++ /dev/null @@ -1 +0,0 @@ -return args.item?.name == game.i18n.localize("NAME.Climb") \ No newline at end of file diff --git a/scripts/aCVtaW8ag1WibcAr.js b/scripts/aCVtaW8ag1WibcAr.js index 909f231..fddad7f 100644 --- a/scripts/aCVtaW8ag1WibcAr.js +++ b/scripts/aCVtaW8ag1WibcAr.js @@ -1,2 +1,2 @@ args.attacker.modifyWounds(1) -this.script.scriptMessage(`${args.attacker.prototypeToken.name} récupère 1 Blessure.`) \ No newline at end of file +this.script.message(`${args.attacker.prototypeToken.name} recovers 1 Wound.`) \ No newline at end of file diff --git a/scripts/aFwNs7TMVF90i9JF.js b/scripts/aFwNs7TMVF90i9JF.js new file mode 100644 index 0000000..7ab3cd6 --- /dev/null +++ b/scripts/aFwNs7TMVF90i9JF.js @@ -0,0 +1,6 @@ +let tireless = this.item.Advances + 1 +let fatigued = this.actor.hasCondition("fatigued").conditionValue +if (args.flags?.tireless == undefined) { + args.fields.modifier += 10 * (Math.min(tireless, fatigued)); + args.flags.tireless = true +} \ No newline at end of file diff --git a/scripts/aIYUsBIDKWJ3CEtj.js b/scripts/aIYUsBIDKWJ3CEtj.js index 9779863..e94669e 100644 --- a/scripts/aIYUsBIDKWJ3CEtj.js +++ b/scripts/aIYUsBIDKWJ3CEtj.js @@ -1 +1 @@ -this.script.scriptMessage(await this.actor.applyBasicDamage(20, {suppressMsg: true})); \ No newline at end of file +this.script.message(await this.actor.applyBasicDamage(20, {suppressMsg: true})); \ No newline at end of file diff --git a/scripts/aPZiVhgwR0Xql6AM.js b/scripts/aPZiVhgwR0Xql6AM.js new file mode 100644 index 0000000..2932749 --- /dev/null +++ b/scripts/aPZiVhgwR0Xql6AM.js @@ -0,0 +1,7 @@ +let effectsToEnable = 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.disabled); + +if (effectsToEnable.length) +{ + this.script.notification(`Re-enabling ${effectsToEnable.map(i => i.name).join(", ")}.`); + effectsToEnable.forEach(i => i.update({disabled : false})) +} \ No newline at end of file diff --git a/scripts/aRvJUcgYqhRmmWYC.js b/scripts/aRvJUcgYqhRmmWYC.js new file mode 100644 index 0000000..261e4ab --- /dev/null +++ b/scripts/aRvJUcgYqhRmmWYC.js @@ -0,0 +1 @@ +this.actor.addEffectItems("Compendium.wfrp4e-core.items.Item.e3McIND4Rrsn5cE6", this.effect, {"system.advances.value" : 1}, {skipExperienceChecks : true}) \ No newline at end of file diff --git a/scripts/abLWYtNTu1UVDQAs.js b/scripts/abLWYtNTu1UVDQAs.js index 68c5009..551994a 100644 --- a/scripts/abLWYtNTu1UVDQAs.js +++ b/scripts/abLWYtNTu1UVDQAs.js @@ -1,5 +1,5 @@ if (args.opposedTest.result.hitloc.value == this.effect.flags.wfrp4e.location) // e.g. 'head', rLeg, 'lArm' { - this.scriptMessage(`Reçoit l'état @Condition[Aveuglé] comme ${this.item.name} a été touché`); + this.message(`Gains a @Condition[Blinded] condition as their ${this.item.name} was hit`); this.actor.addCondition("blinded"); } \ No newline at end of file diff --git a/scripts/aeBetniKqq5SD9Ou.js b/scripts/aeBetniKqq5SD9Ou.js index 5a42f23..cda2bf2 100644 --- a/scripts/aeBetniKqq5SD9Ou.js +++ b/scripts/aeBetniKqq5SD9Ou.js @@ -10,12 +10,12 @@ let characteristics = { "wp" : 40, "fel" : 30 } -let skills = ["Intimidate", "Langue (Classical)", "Commandement" , "Lore (Warfare)", "Lore (History)", "Perception"] +let skills = ["Intimidation", "Langue (Classique)", "Commandement", "Savoir (Guerre)", "Savoir (Histoire)", "Perception"] let skillAdvancements = [20, 30, 20, 30, 20, 20] -let talents = ["Combat Aware", "Combat Reflexes", "Drilled", "Menaçant", "Robust", "Strike Mighty Blow", "Strike Mighty Blow", "War Leader"] -let trappings = ["Arme simple", "Plate Breastplate", "Plate Helm", "Plate Leggings"] -let specialItems = [ -] +let talents = ["Vigilance", "Combat Instinctif", "Coude-à-coude", "Menaçant", "Robuste", "Coup puissant", "Coup puissant", "Seigneur de guerre"] +let trappings = ["Arme simple", "Plastron d'acier", "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}) + 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/aedzdFyjI80Ah3qC.js b/scripts/aedzdFyjI80Ah3qC.js new file mode 100644 index 0000000..f3c731b --- /dev/null +++ b/scripts/aedzdFyjI80Ah3qC.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/afdmOvPGMpEdZvCb.js b/scripts/afdmOvPGMpEdZvCb.js deleted file mode 100644 index 20d9df6..0000000 --- a/scripts/afdmOvPGMpEdZvCb.js +++ /dev/null @@ -1 +0,0 @@ -return (args.skill?.name == game.i18n.localize("NAME.Perception") || args.characteristic == "fel") \ No newline at end of file diff --git a/scripts/b2Kb4IuD22RhKhR0.js b/scripts/b2Kb4IuD22RhKhR0.js index cd7e0ff..45a66d2 100644 --- a/scripts/b2Kb4IuD22RhKhR0.js +++ b/scripts/b2Kb4IuD22RhKhR0.js @@ -6,5 +6,5 @@ if (actor) } else { - this.script.scriptNotification("Aucune cible!", "error") + this.script.notification("Aucune cible!", "error") } \ No newline at end of file diff --git a/scripts/b2WaqRna5CFXmbDG.js b/scripts/b2WaqRna5CFXmbDG.js index 8f874fd..68f399a 100644 --- a/scripts/b2WaqRna5CFXmbDG.js +++ b/scripts/b2WaqRna5CFXmbDG.js @@ -1 +1 @@ -args.options.stag = true; \ No newline at end of file +args.context.stag = true; \ No newline at end of file diff --git a/scripts/b4CIeJF2L4E1qikC.js b/scripts/b4CIeJF2L4E1qikC.js new file mode 100644 index 0000000..5a16aaf --- /dev/null +++ b/scripts/b4CIeJF2L4E1qikC.js @@ -0,0 +1 @@ +return !args.skill \ No newline at end of file diff --git a/scripts/b5DfAWtpV1x2R8If.js b/scripts/b5DfAWtpV1x2R8If.js index c9f120e..2a4f9a5 100644 --- a/scripts/b5DfAWtpV1x2R8If.js +++ b/scripts/b5DfAWtpV1x2R8If.js @@ -1 +1 @@ -this.script.scriptMessage(await this.actor.applyBasicDamage(this.effect.sourceTest.result.damage, {suppressMsg: true})) \ No newline at end of file +this.script.message(await this.actor.applyBasicDamage(this.effect.sourceTest.result.damage, {suppressMsg: true})) \ No newline at end of file diff --git a/scripts/b5prg1FLjCAvBjLy.js b/scripts/b5prg1FLjCAvBjLy.js deleted file mode 100644 index 705112f..0000000 --- a/scripts/b5prg1FLjCAvBjLy.js +++ /dev/null @@ -1,13 +0,0 @@ -let item = await fromUuid("Compendium.wfrp4e-core.items.zyocWSzEZEC826NS") -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) -{ - await this.actor.addCondition("prone") - await this.actor.addCondition("stunned") -} \ No newline at end of file diff --git a/scripts/b787rIfyHF5LnALd.js b/scripts/b787rIfyHF5LnALd.js new file mode 100644 index 0000000..1bd597a --- /dev/null +++ b/scripts/b787rIfyHF5LnALd.js @@ -0,0 +1,7 @@ +let item = await fromUuid("Compendium.wfrp4e-core.items.Item.HbrwGhUl0ZXz4kLA") +let hardy = item.toObject(); + +item = await fromUuid("Compendium.wfrp4e-core.items.Item.VUJUZVN3VYhOaPjj") +let armour = item.toObject(); +armour.system.specification.value = 1; +this.actor.createEmbeddedDocuments("Item", [armour, hardy], {fromEffect : this.effect.id}); \ No newline at end of file diff --git a/scripts/b8XFmEUu1d2YNQ7F.js b/scripts/b8XFmEUu1d2YNQ7F.js new file mode 100644 index 0000000..4240d27 --- /dev/null +++ b/scripts/b8XFmEUu1d2YNQ7F.js @@ -0,0 +1,17 @@ +const {targetUuid, characteristicsToSwap} = this.effect.flags.wfrp4e; + +if (!characteristicsToSwap) return; + +const target = fromUuidSync(targetUuid); + +if (!target) return; + +for (const char of characteristicsToSwap) { + args.actor.system.characteristics[char].advances = target.system.characteristics[char].advances; + args.actor.system.characteristics[char].bonus = target.system.characteristics[char].bonus; + args.actor.system.characteristics[char].bonusMod = target.system.characteristics[char].bonusMod; + args.actor.system.characteristics[char].calculationBonusModifier = target.system.characteristics[char].calculationBonusModifier; + args.actor.system.characteristics[char].initial = target.system.characteristics[char].initial; + args.actor.system.characteristics[char].modifier = target.system.characteristics[char].modifier; + args.actor.system.characteristics[char].value = target.system.characteristics[char].value; +} \ No newline at end of file diff --git a/scripts/bBdXzBmxgFFBwMMS.js b/scripts/bBdXzBmxgFFBwMMS.js index b0eea24..0ff3acd 100644 --- a/scripts/bBdXzBmxgFFBwMMS.js +++ b/scripts/bBdXzBmxgFFBwMMS.js @@ -1,4 +1,4 @@ -if(args.opposedTest.attackerTest.item?.isRanged && args.applyAP && !args.sureShot) +if(args.opposedTest.attackerTest.item?.isProjectiles && args.applyAP && !args.sureShot) { if (args.modifiers.ap.value) { diff --git a/scripts/bDS62ctjfnTU4xIu.js b/scripts/bDS62ctjfnTU4xIu.js new file mode 100644 index 0000000..adf3ff4 --- /dev/null +++ b/scripts/bDS62ctjfnTU4xIu.js @@ -0,0 +1 @@ +return args.skill.name !== game.i18n.localize("NAME.Leadership") \ No newline at end of file diff --git a/scripts/bEVlJOOA1kLlzpWx.js b/scripts/bEVlJOOA1kLlzpWx.js index 3cd6250..b72f0df 100644 --- a/scripts/bEVlJOOA1kLlzpWx.js +++ b/scripts/bEVlJOOA1kLlzpWx.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/bLkt8VpTTPoTxW0W.js b/scripts/bLkt8VpTTPoTxW0W.js index 97a1d9c..b2cfafb 100644 --- a/scripts/bLkt8VpTTPoTxW0W.js +++ b/scripts/bLkt8VpTTPoTxW0W.js @@ -1,5 +1,5 @@ if (args.opposedTest.result.hitloc.value == "body" && args.totalWoundLoss > 0) { args.actor.addCondition("bleeding", 1); - this.script.scriptNotification("Ajout d'Hémorragie") + this.script.notification("Etat Hémorragique ajouté") } diff --git a/scripts/bMEFHPCei2evnZZw.js b/scripts/bMEFHPCei2evnZZw.js index c362d32..66ab618 100644 --- a/scripts/bMEFHPCei2evnZZw.js +++ b/scripts/bMEFHPCei2evnZZw.js @@ -1,14 +1,14 @@ // Victims that take at least 1 Wound from a Fell Dagger // immediately take a Poisoned Condition -// resisted with a Difficult (-10) Endurance Test. +// resisted with a Difficult (-10) Résistance Test. -// TODO: Add Venom strength to message +// TODO: Add Venin strength to message if (args.totalWoundLoss > 0) { args.actor.addCondition("poisoned") - this.script.scriptMessage(` + this.script.message(` ${this.effect.name}:Apply Ward of Grimnir effet?
" + })) + { + return; + } + else + { + return false; + } +} + + +let failed = false; +if (this.actor.itemTags.skill.find(i => i.name == "Savoir (Théologie)")) +{ + let test = await this.actor.setupSkill("Savoir (Théologie)", {appendTitle : ` - ${this.effect.name}`, fields : {difficulty : "vhard"}}) + await test.roll(); + if (test.failed) + { + failed = true; + } +} +else +{ + this.script.notification("Compétence Savoir (Théologie) introuvable, impossible de continuer.") + failed = true; +} + +if (this.actor.itemTags.skill.find(i => i.name == "Lore (Runes)")) + { + let test = await this.actor.setupSkill("Lore (Runes)", {appendTitle : ` - ${this.effect.name}`, fields : {difficulty : "hard"}}) + await test.roll(); + if (test.failed) + { + failed = true; + } + } + else + { + this.script.notification("Compétence Savoir (Runes) introuvable, impossible de continuer.") + failed = true; + } + + + let test = await this.actor.setupSkill("Art (Tattooing)", {appendTitle : ` - ${this.effect.name}`}) + await test.roll(); + if (test.failed) + { + failed = true; + } + + if (failed) + { + this.script.message("Un ou plusieurs Tests pour appliquer les tatouages ont échoué.") + return false; + } + else + { + return true; + } \ No newline at end of file diff --git a/scripts/bQyVajMN1ETwlzvM.js b/scripts/bQyVajMN1ETwlzvM.js index 757c282..f6c9604 100644 --- a/scripts/bQyVajMN1ETwlzvM.js +++ b/scripts/bQyVajMN1ETwlzvM.js @@ -4,6 +4,6 @@ let target = await game.wfrp4e.tables.rollTable("fixations") if (target) { data.system.specification.value = target.result - this.script.scriptNotification(target.result); + this.script.notification(target.result); } this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/scripts/bRiFHPC1StKxqNIC.js b/scripts/bRiFHPC1StKxqNIC.js index fd2797b..172def3 100644 --- a/scripts/bRiFHPC1StKxqNIC.js +++ b/scripts/bRiFHPC1StKxqNIC.js @@ -1,5 +1,5 @@ if (isNaN(parseInt(this.item.system.specification.value))) { - let value = await ValueDialog.create({title : "Sturdy Value", text : "Enter the Sturdy value"}); + let value = await ValueDialog.create({title : "Valeur de Robustesse", text : "Entrez la valeur de Robustesse"}); if (value) { this.item.updateSource({"system.specification.value" : value}); } diff --git a/scripts/bT4gLrE3W36DIP4k.js b/scripts/bT4gLrE3W36DIP4k.js new file mode 100644 index 0000000..f3e714f --- /dev/null +++ b/scripts/bT4gLrE3W36DIP4k.js @@ -0,0 +1,6 @@ +if (args.applyAP && args.modifiers.ap.metal && args.alreadyPenetrating) + { + args.modifiers.ap.ignored += 1 + args.modifiers.ap.details.push("" + this.effect.name + ": Ignore +1 PA d'armure en métal"); + args.modifiers.ap.metal--; + } \ No newline at end of file diff --git a/scripts/bgLeMqihLya2iobP.js b/scripts/bgLeMqihLya2iobP.js new file mode 100644 index 0000000..4616523 --- /dev/null +++ b/scripts/bgLeMqihLya2iobP.js @@ -0,0 +1,6 @@ +const river = this.actor.itemTags.template.find(t => t.name === "River Troll"); + +if (!river) { + args.options.abortItemCreation = true; + this.script.notification("Peut seulement être appliqué à un Troll des Rivières.", 'warning'); +} \ No newline at end of file diff --git a/scripts/bh2qDCKiAIWM0UPi.js b/scripts/bh2qDCKiAIWM0UPi.js deleted file mode 100644 index 593bedb..0000000 --- a/scripts/bh2qDCKiAIWM0UPi.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/bhXUW7IJtEaUGAoV.js b/scripts/bhXUW7IJtEaUGAoV.js deleted file mode 100644 index 5be3c04..0000000 --- a/scripts/bhXUW7IJtEaUGAoV.js +++ /dev/null @@ -1,7 +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/bidoOQSAofp4NPf6.js b/scripts/bidoOQSAofp4NPf6.js new file mode 100644 index 0000000..8213234 --- /dev/null +++ b/scripts/bidoOQSAofp4NPf6.js @@ -0,0 +1 @@ +return args?.skill?.name !== game.i18n.localize("NAME.Cool") \ No newline at end of file diff --git a/scripts/bkbWgG9COvZWZbAX.js b/scripts/bkbWgG9COvZWZbAX.js new file mode 100644 index 0000000..9529ce8 --- /dev/null +++ b/scripts/bkbWgG9COvZWZbAX.js @@ -0,0 +1 @@ +args.context.addChargingDice = true; \ No newline at end of file diff --git a/scripts/bwtQOSWn120NICkf.js b/scripts/bwtQOSWn120NICkf.js index 5b27c29..bf9448e 100644 --- a/scripts/bwtQOSWn120NICkf.js +++ b/scripts/bwtQOSWn120NICkf.js @@ -1,7 +1,7 @@ let test = await this.actor.setupCharacteristic("ag", {fields : {difficulty : "hard"}}); -await test.roll(); +await Test.roll(); -if (test.failed) +if (Test.Échoué) { await this.actor.addCondition("bleeding") await this.actor.addCondition("entangled") diff --git a/scripts/bwx9wuEOJPF7btD1.js b/scripts/bwx9wuEOJPF7btD1.js deleted file mode 100644 index fd35010..0000000 --- a/scripts/bwx9wuEOJPF7btD1.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/c3KA1knL2NYNUEww.js b/scripts/c3KA1knL2NYNUEww.js deleted file mode 100644 index b904c0c..0000000 --- a/scripts/c3KA1knL2NYNUEww.js +++ /dev/null @@ -1 +0,0 @@ -return args.skill?.name != game.i18n.localize("NAME.Evaluate"); \ No newline at end of file diff --git a/scripts/c7HTWfg3CbjN9e1M.js b/scripts/c7HTWfg3CbjN9e1M.js new file mode 100644 index 0000000..80591ae --- /dev/null +++ b/scripts/c7HTWfg3CbjN9e1M.js @@ -0,0 +1 @@ +this.actor.name = this.actor.name.replace("Common Troll", "Troll"); \ No newline at end of file diff --git a/scripts/c9xxdOCaQSwooK8n.js b/scripts/c9xxdOCaQSwooK8n.js new file mode 100644 index 0000000..97adff8 --- /dev/null +++ b/scripts/c9xxdOCaQSwooK8n.js @@ -0,0 +1 @@ +if (!this.actor.has("Bénédiction de Bataille","prayer")) this.actor.addEffectItems("Compendium.wfrp4e-core.items.Item.ElmLfnrXliStS9CP", this.effect) \ No newline at end of file diff --git a/scripts/cAKqUBuJBsU85erO.js b/scripts/cAKqUBuJBsU85erO.js deleted file mode 100644 index ba403bd..0000000 --- a/scripts/cAKqUBuJBsU85erO.js +++ /dev/null @@ -1 +0,0 @@ -return args.skill?.name !== game.i18n.localize("NAME.Stealth"); \ No newline at end of file diff --git a/scripts/cC7jjJDSVPi5BJUq.js b/scripts/cC7jjJDSVPi5BJUq.js new file mode 100644 index 0000000..9bef2b0 --- /dev/null +++ b/scripts/cC7jjJDSVPi5BJUq.js @@ -0,0 +1,3 @@ +if (this.item.equipped.value) { + this.actor.system.status.addArmour(1, {source: this.effect}) +} \ No newline at end of file diff --git a/scripts/cJFDnq1HI4gXWcJo.js b/scripts/cJFDnq1HI4gXWcJo.js index 0accb38..e469ebf 100644 --- a/scripts/cJFDnq1HI4gXWcJo.js +++ b/scripts/cJFDnq1HI4gXWcJo.js @@ -1,6 +1,6 @@ if (isNaN(parseInt(this.item.system.specification.value))) { - let value = await ValueDialog.create({text: "Enter Ward value", title : this.effect.name}); + let value = await ValueDialog.create({text: "Entrez la valeur de Protection", title : this.effect.name}); if (value) { this.item.updateSource({"system.specification.value" : value}); diff --git a/scripts/cK1Jysfu5IMUUH0C.js b/scripts/cK1Jysfu5IMUUH0C.js index dde1591..94752c7 100644 --- a/scripts/cK1Jysfu5IMUUH0C.js +++ b/scripts/cK1Jysfu5IMUUH0C.js @@ -4,7 +4,7 @@ if (!args.ward) if (args.wardRoll >= args.ward && args.ward > 3) { let newWard = Math.max(3, args.ward - 1) - this.script.scriptMessage("Protection améliorée de " + newWard) + this.script.message("Protection améliorée à " + newWard) this.effect.setFlag("wfrp4e", "ward", newWard) } diff --git a/scripts/cTYNaKbepMwqYsZ8.js b/scripts/cTYNaKbepMwqYsZ8.js deleted file mode 100644 index 2ad2d51..0000000 --- a/scripts/cTYNaKbepMwqYsZ8.js +++ /dev/null @@ -1,14 +0,0 @@ - -let difficulty = "" -if (this.effect.name.includes("Moderate")) - difficulty = "easy" -else if (this.effect.name.includes("Severe")) - difficulty = "average" -else - difficulty = "veasy" - -let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), { context: { failure: this.actor.name + " meurt du Fléau" }, fields: { difficulty }, appendTitle: " - Blight" }) -await test.roll(); -if (test.failed) { - this.actor.addCondition("dead"); -} diff --git a/scripts/cUnbADgOQ4fMKgrH.js b/scripts/cUnbADgOQ4fMKgrH.js index 93bb499..6a4b7db 100644 --- a/scripts/cUnbADgOQ4fMKgrH.js +++ b/scripts/cUnbADgOQ4fMKgrH.js @@ -7,14 +7,14 @@ if (this.item.name.includes("(")) group = this.item.parenthesesText } -else +else { - group = await ValueDialog.create({text : "Enter Hatred Group", title : "Hatred Group"}) + group = await ValueDialog.create({text : "Entrez le Groupe de Haine", title : "Groupe de Haine"}) - this.item.updateSource({name : this.item.name + ` (${group})`, "system.tests.value" : this.item.system.tests.value.replace("Group", group)}) - this.effect.updateSource({name : this.effect.name + ` (${group})`}) + this.item.updateSource({name : this.item.name + ` (${group})`, "system.tests.value" : this.item.system.Tests.value.replace("Group", group)}) + this.effet.updateSource({name : this.effet.name + ` (${group})`}) } -data.name = data.name.replace("Target", group); +data.name = data.name.replace("Cible", group); await this.actor.createEmbeddedDocuments("Item", [data], {fromEffect: this.effect.id}); \ No newline at end of file diff --git a/scripts/cV9JiAgUPOeUHKnS.js b/scripts/cV9JiAgUPOeUHKnS.js deleted file mode 100644 index c65bef6..0000000 --- a/scripts/cV9JiAgUPOeUHKnS.js +++ /dev/null @@ -1,5 +0,0 @@ -args.fields.successBonus++; -if (args.skill?.name != game.i18n.localize("NAME.SleightOfHand")) -{ - args.fields.modifier += 10; -} \ No newline at end of file diff --git a/scripts/cW8ZuQ9YIUG5uvhf.js b/scripts/cW8ZuQ9YIUG5uvhf.js new file mode 100644 index 0000000..f78ef15 --- /dev/null +++ b/scripts/cW8ZuQ9YIUG5uvhf.js @@ -0,0 +1 @@ +return args.characteristic != "t"; \ No newline at end of file diff --git a/scripts/cZVrzR4fxV86lxNW.js b/scripts/cZVrzR4fxV86lxNW.js new file mode 100644 index 0000000..5909e04 --- /dev/null +++ b/scripts/cZVrzR4fxV86lxNW.js @@ -0,0 +1,7 @@ +let item = await fromUuid("Compendium.wfrp4e-core.items.Item.yrkI7ATjqLPDTFmZ") +let res = item.toObject(); +res.system.specification.value = 1; + +item = await fromUuid("Compendium.wfrp4e-core.items.Item.mNoCuaVbFBflfO6X") +let ss = item.toObject(); +await this.actor.createEmbeddedDocuments("Item", [res, ss], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/scripts/chUpiI3el8IO8MSs.js b/scripts/chUpiI3el8IO8MSs.js index 94a9fa2..755d158 100644 --- a/scripts/chUpiI3el8IO8MSs.js +++ b/scripts/chUpiI3el8IO8MSs.js @@ -1,6 +1,6 @@ if (args.opposedTest.attackerTest.item?.name.includes("Morsure")) { let woundsGained = args.totalWoundLoss; - this.script.scriptMessage(`Récupère ${woundsGained} Blessures`, { whisper: ChatMessage.getWhisperRecipients("GM") }) + this.script.message(`Gains ${woundsGained} Wounds`, { whisper: ChatMessage.getWhisperRecipients("GM") }) this.actor.modifyWounds(woundsGained) } \ No newline at end of file diff --git a/scripts/cipTp0OS2bfKLjZS.js b/scripts/cipTp0OS2bfKLjZS.js new file mode 100644 index 0000000..f963abb --- /dev/null +++ b/scripts/cipTp0OS2bfKLjZS.js @@ -0,0 +1,4 @@ +if (args.totalWoundLoss > 0) { + await args.actor.addCondition("bleeding") + await args.actor.addCondition("poisoned") +} \ No newline at end of file diff --git a/scripts/clO7l82UYMJ4XVks.js b/scripts/clO7l82UYMJ4XVks.js new file mode 100644 index 0000000..e0465c5 --- /dev/null +++ b/scripts/clO7l82UYMJ4XVks.js @@ -0,0 +1 @@ +args.context.giantbane = true \ No newline at end of file diff --git a/scripts/cqYgZQk1C3kMARy5.js b/scripts/cqYgZQk1C3kMARy5.js deleted file mode 100644 index 9cd6778..0000000 --- a/scripts/cqYgZQk1C3kMARy5.js +++ /dev/null @@ -1 +0,0 @@ -return args.skill?.name !== game.i18n.localize("NAME.Haggle"); \ No newline at end of file diff --git a/scripts/cxgGYbuiXM3NxIOI.js b/scripts/cxgGYbuiXM3NxIOI.js new file mode 100644 index 0000000..a341062 --- /dev/null +++ b/scripts/cxgGYbuiXM3NxIOI.js @@ -0,0 +1,4 @@ +if (args.test.options.flags.skewering) +{ + args.test.preData.roll = 1; +} \ No newline at end of file diff --git a/scripts/czZI8S09By0Mqlsr.js b/scripts/czZI8S09By0Mqlsr.js new file mode 100644 index 0000000..255bbc5 --- /dev/null +++ b/scripts/czZI8S09By0Mqlsr.js @@ -0,0 +1 @@ +return (args.skill?.name == undefined || args.item?.skillToUse?.name != args.skill?.name) \ No newline at end of file diff --git a/scripts/dAMtbn3uQwF8KpKU.js b/scripts/dAMtbn3uQwF8KpKU.js deleted file mode 100644 index 75eba38..0000000 --- a/scripts/dAMtbn3uQwF8KpKU.js +++ /dev/null @@ -1 +0,0 @@ -return args.skill?.name != game.i18n.localize("NAME.Charm") && args.skill?.name != game.i18n.localize("NAME.Gossip"); \ No newline at end of file diff --git a/scripts/dEx8xfG7VLbN69Ha.js b/scripts/dEx8xfG7VLbN69Ha.js new file mode 100644 index 0000000..336d304 --- /dev/null +++ b/scripts/dEx8xfG7VLbN69Ha.js @@ -0,0 +1,14 @@ +if (!this.item.system.properties.flaws.reload) return; + +const minReload = this.item.system.properties.qualities?.salvo ? 1 : 0; +const originalReload = this.item.system.properties.flaws.reload.value; +const runesOfReloading = Number(this.item.effects.contents.filter(e => e.name == this.effect.name).length); +const newReload = Math.max(originalReload - (2 * runesOfReloading), minReload); + +if (newReload) { + this.item.system.properties.flaws.reload.value = newReload; + this.item.system.properties.flaws.reload.display = `${game.i18n.localize("PROPERTY.Reload")} ${newReload}`; +} +else { + delete this.item.system.properties.flaws.reload +} \ No newline at end of file diff --git a/scripts/dIxYt421K010eogY.js b/scripts/dIxYt421K010eogY.js index df350bf..b628745 100644 --- a/scripts/dIxYt421K010eogY.js +++ b/scripts/dIxYt421K010eogY.js @@ -1,6 +1,6 @@ let modifier = 0 - if (this.effect.name.includes("Modéré")) + if (this.effect.name.includes("Moderate")) modifier = -20 else modifier = -10 diff --git a/scripts/dM449AU0FQRnOc3l.js b/scripts/dM449AU0FQRnOc3l.js index 6fd5fd9..992c1e4 100644 --- a/scripts/dM449AU0FQRnOc3l.js +++ b/scripts/dM449AU0FQRnOc3l.js @@ -1,4 +1,4 @@ if (args.opposedTest.result.hitloc.value == "head") { - args.abort = "Raté - Sans tête" + args.abort = "Missed - Headless" } \ No newline at end of file diff --git a/scripts/dMeSZGdvw7zlnUKh.js b/scripts/dMeSZGdvw7zlnUKh.js new file mode 100644 index 0000000..02c9862 --- /dev/null +++ b/scripts/dMeSZGdvw7zlnUKh.js @@ -0,0 +1 @@ +return args.characteristic != "wp" && !args.context.terror && !args.extendedTest?.flags.wfrp4e?.fear \ No newline at end of file diff --git a/scripts/dSmRhZ6o1bUcOSF9.js b/scripts/dSmRhZ6o1bUcOSF9.js deleted file mode 100644 index bc3b6fd..0000000 --- a/scripts/dSmRhZ6o1bUcOSF9.js +++ /dev/null @@ -1 +0,0 @@ -return args.skill?.name != game.i18n.localize("NAME.Leadership"); \ No newline at end of file diff --git a/scripts/dVF5ywnzeiZQx9ke.js b/scripts/dVF5ywnzeiZQx9ke.js new file mode 100644 index 0000000..b31aabb --- /dev/null +++ b/scripts/dVF5ywnzeiZQx9ke.js @@ -0,0 +1,6 @@ +let test = await this.actor.setupSkill(game.i18n.localize("NAME.Résistance"), {fields : {difficulty : "hard"}, appendTitle : ` - ${this.effect.name}`}) +await test.roll(); +if (test.failed) +{ + this.script.scriptMessage(await this.actor.applyBasicDamage(15, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_AP, suppressMsg: true})) +} \ No newline at end of file diff --git a/scripts/dWr3tkFoIzsAgelu.js b/scripts/dWr3tkFoIzsAgelu.js index b153ae5..7f38fd3 100644 --- a/scripts/dWr3tkFoIzsAgelu.js +++ b/scripts/dWr3tkFoIzsAgelu.js @@ -1,13 +1,11 @@ let injury = this.effect.itemTargets[0] if (injury && this.effect.sourceTest.result.outcome == "success") { - let roll1 = new Roll(injury.system.duration.value) - await roll1.roll() - let days = roll1.total - let num = 1 + Number(this.effect.sourceTest.result.SL); - let roll = await new Roll(num + 'd10').roll() - await roll.toMessage(this.script.getChatData()) - let newDays = Math.max(days - roll.total, 1) - this.actor.updateEmbeddedDocuments("Item", [{ _id: injury.id, 'system.duration.value': newDays }]) - let message = "Blessures réduites à " + newDays + " (-" + roll.total + ") au lieu de " + days - this.script.scriptMessage(message) + let days = new Roll(injury.system.duration.value).evaluateSync().total + let num = 1 + Number(this.effect.sourceTest.result.SL); + let roll = await new Roll(num+'d10').roll() + await roll.toMessage(this.script.getChatData()) + let newDays = Math.max(days - roll.total, 1) + this.actor.updateEmbeddedDocuments("Item", [{_id: injury.id, 'system.duration.value': newDays} ]) + let message = "Blessure réduite à "+newDays+" (-" + roll.total + ") au lieu de "+days + this.script.message(message) } diff --git a/scripts/dXGosSxdoYbET2O8.js b/scripts/dXGosSxdoYbET2O8.js deleted file mode 100644 index 2554389..0000000 --- a/scripts/dXGosSxdoYbET2O8.js +++ /dev/null @@ -1,11 +0,0 @@ -await this.actor.addCondition("fatigued"); - -let test = await this.actor.setupSkill(game.i18n.localize("NAME.Cool")) - -await test.roll(); - -if (!test.succeeded) -{ - await this.actor.addCondition("fatigued"); - await this.actor.addCondition("broken"); -} \ No newline at end of file diff --git a/scripts/dZ4c5pKDqQV02aIK.js b/scripts/dZ4c5pKDqQV02aIK.js index 3a5ebde..360a8a3 100644 --- a/scripts/dZ4c5pKDqQV02aIK.js +++ b/scripts/dZ4c5pKDqQV02aIK.js @@ -1,4 +1,4 @@ if (args.effect.conditionId == "ablaze") { - args.data.formula += ` + parseInt(this.effect.sourceTest.result.SL)` + args.data.formula += ` + parseInt(this.effet.sourceTest.result.SL)` } \ No newline at end of file diff --git a/scripts/dbOSvpgcPjsc2uvq.js b/scripts/dbOSvpgcPjsc2uvq.js index b591df7..38e71e9 100644 --- a/scripts/dbOSvpgcPjsc2uvq.js +++ b/scripts/dbOSvpgcPjsc2uvq.js @@ -1,7 +1,7 @@ let menacing = (await fromUuid("Compendium.wfrp4e-core.items.Item.0hn6UaKq8CoZP2zD")).toObject(); let sense = (await fromUuid("Compendium.wfrp4e-core.items.Item.9h82z72XGo9tfgQS")).toObject(); -sense.name += " (Vue)"; -sense.system.tests.value = sense.system.tests.value.replace("Sens", "Vue") +sense.name += " (Sight)"; +sense.system.tests.value = sense.system.tests.value.replace("Sense", "Sight") this.actor.createEmbeddedDocuments("Item", [menacing, sense], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/scripts/dcwY8dCd3PNCEzk6.js b/scripts/dcwY8dCd3PNCEzk6.js index 4b0b023..ff07982 100644 --- a/scripts/dcwY8dCd3PNCEzk6.js +++ b/scripts/dcwY8dCd3PNCEzk6.js @@ -2,4 +2,4 @@ let current = this.actor.status.fate.value this.actor.update({"system.status.fate.value" : current + 1}) -this.script.scriptMessage(`${this.actor.prototypeToken.name} voit ses Points de Destin augmentés de ${current} à ${current + 1}`) \ No newline at end of file +this.script.message(`${this.actor.prototypeToken.name} fate points increased from ${current} to ${current + 1}`) \ No newline at end of file diff --git a/scripts/dfEgat3jz4EtWszH.js b/scripts/dfEgat3jz4EtWszH.js deleted file mode 100644 index 9e6bec5..0000000 --- a/scripts/dfEgat3jz4EtWszH.js +++ /dev/null @@ -1 +0,0 @@ -return args.skill?.name == "Discrétion (Urbaine)" \ No newline at end of file diff --git a/scripts/dfnCK8jCPXNLM7Gh.js b/scripts/dfnCK8jCPXNLM7Gh.js deleted file mode 100644 index 334949b..0000000 --- a/scripts/dfnCK8jCPXNLM7Gh.js +++ /dev/null @@ -1,12 +0,0 @@ -let aoeDamage = this.effect.sourceTest.result.damage - 5 // Easily handle magic missile damage by just subtracting 5 from the item's (which has +10 base) - -this.script.scriptMessage(await this.actor.applyBasicDamage(aoeDamage, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_AP, suppressMsg : true})) - -let test = await this.actor.setupSkill(game.i18n.localize("NAME.Dodge"), {skipTargets: true, appendTitle : ` - En Flammes`}) - -await test.roll(); - -if (!test.succeeded) -{ - this.actor.addCondition("ablaze"); -} \ No newline at end of file diff --git a/scripts/dkiNmwFXztIVbuxg.js b/scripts/dkiNmwFXztIVbuxg.js deleted file mode 100644 index cfeb34b..0000000 --- a/scripts/dkiNmwFXztIVbuxg.js +++ /dev/null @@ -1,8 +0,0 @@ -let currentCareer = this.actor.system.currentCareer; - -if (!currentCareer || currentCareer.system.talents.includes(game.i18n.localize("NAME.Frenzy"))) -{ - return -} - -currentCareer.system.talents.push(game.i18n.localize("NAME.Frenzy")); \ No newline at end of file diff --git a/scripts/dr9VJKGY3TeGuzXj.js b/scripts/dr9VJKGY3TeGuzXj.js new file mode 100644 index 0000000..7998b5a --- /dev/null +++ b/scripts/dr9VJKGY3TeGuzXj.js @@ -0,0 +1 @@ +this.script.message(`Allies of ${this.actor.name} gain +20 Initiative for the first round.`) \ No newline at end of file diff --git a/scripts/dsXGavzXLerXR8Xg.js b/scripts/dsXGavzXLerXR8Xg.js deleted file mode 100644 index fb7fc0e..0000000 --- a/scripts/dsXGavzXLerXR8Xg.js +++ /dev/null @@ -1 +0,0 @@ -return !args.skill?.name.includes(game.i18n.localize("NAME.Sail")) && !args.skill?.name.includes(game.i18n.localize("NAME.Row")) \ No newline at end of file diff --git a/scripts/dtFvpY96RPzNnphq.js b/scripts/dtFvpY96RPzNnphq.js deleted file mode 100644 index 3a5cf96..0000000 --- a/scripts/dtFvpY96RPzNnphq.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/dwSgcFxKN3S0hLJL.js b/scripts/dwSgcFxKN3S0hLJL.js deleted file mode 100644 index b575b9b..0000000 --- a/scripts/dwSgcFxKN3S0hLJL.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/dxt3p07po06J9fO1.js b/scripts/dxt3p07po06J9fO1.js new file mode 100644 index 0000000..0c78cb5 --- /dev/null +++ b/scripts/dxt3p07po06J9fO1.js @@ -0,0 +1,14 @@ +const metal = () => { + for (const [key, loc] of Object.entries(this.actor.armour)) { + if (!loc.layers) continue; + + for (const layer of loc.layers) { + if (layer.metal) + return true; + } + } + + return false; +}; + +args.fields.slBonus -= metal() ? 2 : 1; \ No newline at end of file diff --git a/scripts/e0eKVlOSk3Vw1HiD.js b/scripts/e0eKVlOSk3Vw1HiD.js new file mode 100644 index 0000000..f0816df --- /dev/null +++ b/scripts/e0eKVlOSk3Vw1HiD.js @@ -0,0 +1 @@ +return args.characteristic != "wp" || args.type != "characteristic" \ No newline at end of file diff --git a/scripts/e2JlsKoW8oaFjn6Y.js b/scripts/e2JlsKoW8oaFjn6Y.js new file mode 100644 index 0000000..3505946 --- /dev/null +++ b/scripts/e2JlsKoW8oaFjn6Y.js @@ -0,0 +1,8 @@ +const roll = new Roll("1d10"); + +await roll.evaluate(); +roll.toMessage(); + +const slBonus = Number(this.effect.sourceTest.result.SL) + roll.total; + +this.effect.setFlag("wfrp4e", "slBonus", slBonus); \ No newline at end of file diff --git a/scripts/e34s1XxHckAWfwHt.js b/scripts/e34s1XxHckAWfwHt.js index 76f2e83..bfcbd7c 100644 --- a/scripts/e34s1XxHckAWfwHt.js +++ b/scripts/e34s1XxHckAWfwHt.js @@ -1,4 +1,4 @@ if (args.test.options.beatBlade && (args.test.result.roll <= game.settings.get("wfrp4e", "automaticSuccess") || args.test.result.roll <= args.test.target)) { - args.test.result.other.push(`${this.effect.name}: L'opposant perd ${Number(args.test.result.SL) + 1} Avantage`) + args.test.result.other.push(`${this.effect.name}: Opponent loses ${Number(args.test.result.SL) + 1} Advantage`) } \ No newline at end of file diff --git a/scripts/e3dBud1keWyhw6nw.js b/scripts/e3dBud1keWyhw6nw.js new file mode 100644 index 0000000..bd498d9 --- /dev/null +++ b/scripts/e3dBud1keWyhw6nw.js @@ -0,0 +1,10 @@ +const stupid = this.actor.items.find(i => i.name === "Stupidee"); + +if (!stupid) return; + + +if (this.item.system.disabled) { + await stupid.update({"system.disabled": false}); +} else { + await stupid.update({"system.disabled": true}); +} \ No newline at end of file diff --git a/scripts/e7IxnxePdXSy6L4E.js b/scripts/e7IxnxePdXSy6L4E.js index 5026e54..6b19fc6 100644 --- a/scripts/e7IxnxePdXSy6L4E.js +++ b/scripts/e7IxnxePdXSy6L4E.js @@ -1,4 +1,4 @@ if (args.opposedTest.result.hitloc.value == "head") { - this.script.scriptMessage(`${this.actor.prototypeToken.name} subit une @Table[crithead]{Blessure Critique} si il n'y en avait pas d'autres.`) + this.script.message(`${this.actor.prototypeToken.name} receives a @Table[crithead]{Critical Wound} if one was not caused already.`) } \ No newline at end of file diff --git a/scripts/eC61buStv62b3sN9.js b/scripts/eC61buStv62b3sN9.js new file mode 100644 index 0000000..67e127d --- /dev/null +++ b/scripts/eC61buStv62b3sN9.js @@ -0,0 +1 @@ +args.fields.slBonus += 8; \ No newline at end of file diff --git a/scripts/eGQAyzCFZAEQhyJl.js b/scripts/eGQAyzCFZAEQhyJl.js deleted file mode 100644 index cd7e408..0000000 --- a/scripts/eGQAyzCFZAEQhyJl.js +++ /dev/null @@ -1,5 +0,0 @@ -const roll = new Roll("2d10"); -await roll.evaluate(); -const money = game.wfrp4e.market.addMoneyTo(this.actor, `${roll.total}b`); -await this.actor.updateEmbeddedDocuments("Item", money); -this.script.message(game.i18n.format("SCRIPT.Silvertide", {name: this.actor.name, pennies: roll.total})); \ No newline at end of file diff --git a/scripts/eIiiDhJohYez26qY.js b/scripts/eIiiDhJohYez26qY.js new file mode 100644 index 0000000..08e3862 --- /dev/null +++ b/scripts/eIiiDhJohYez26qY.js @@ -0,0 +1,12 @@ +const {targetUuid} = this.effect.flags.wfrp4e; + +if (args.actor.uuid !== targetUuid) return; + +const recordedWounds = this.effect.getFlag("wfrp4e", "damageToReturn"); + +if (!recordedWounds) return; + +args.modifiers.other.push({label: this.effect.name, value: recordedWounds}); +args.totalWoundLoss += recordedWounds + +this.effect.unsetFlag("wfrp4e", "damageToReturn"); \ No newline at end of file diff --git a/scripts/eLxdRg8LX3AdYSEq.js b/scripts/eLxdRg8LX3AdYSEq.js new file mode 100644 index 0000000..ab8430f --- /dev/null +++ b/scripts/eLxdRg8LX3AdYSEq.js @@ -0,0 +1,9 @@ +let sumArmour = 0; +for (let key in this.actor.system.status.armour) { + let armour = this.actor.system.status.armour[key]; + sumArmour += Number(armour?.value || 0); +} +let damage = Math.floor(Number(sumArmour)/2); +if (damage > 0 ) { + this.script.scriptMessage(await this.actor.applyBasicDamage(damage, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_AP, suppressMsg: true})) +} \ No newline at end of file diff --git a/scripts/ePPgxQOqL1Uhz2k9.js b/scripts/ePPgxQOqL1Uhz2k9.js index 24a92c5..9e735e2 100644 --- a/scripts/ePPgxQOqL1Uhz2k9.js +++ b/scripts/ePPgxQOqL1Uhz2k9.js @@ -1,58 +1,48 @@ -let choice1 = [ - { - type : "skill", - name : "Projectiles (Arc)", - diff : { - system : { - advances : { - value : 10 - } - } - } - }, - { - type : "weapon", - name : "Bow", - }, - { - type : "ammunition", - name : "Arrow", - } -] -let choice2 = [ -] +let addOption = await foundry.applications.api.DialogV2.confirm({ + window : {title : "Option"}, + content : + ` + Ajouter une option? ++ Projectile (Arc) +10 et un Arc long avec 12 flèches +
+ `, +}) -let choice = await Dialog.wait({ - title : "Option", - content : - `- Ajouter une option? -
-${this.actor.prototypeToken.name} reçoit 2 états @Condition[Empoisonné].
-Toute créature avec le Trait Bestial qui le mord et provoque des dégats ne le mordra pas à nouveau durant un combat, la créature pouvant toutefois attaquer avec d'autres méthodes si disponibles..
`, - { - whisper: ChatMessage.getWhisperRecipients("GM"), - blind: true - }) -} - // If they succeed, for a number of rounds equal to 3+ their SL, they have the Corrosive Blood Creature Trait. -else if (test.succeeded) -{ - // Don't attempt to add Corrosive Blood if actor already has it - const hasCorrosiveBlood = this.actor.has("Sang corrosif") - if (hasCorrosiveBlood !== undefined) return - - let item = await fromUuid("Compendium.wfrp4e-core.items.M5QSWOYt2Rbv2yxW") - let data = item.toObject() - this.actor.createEmbeddedDocuments("Item", [data], {fromEffect: this.effect.id}) - - const duration = 3 + parseInt(test.result.SL) - this.script.scriptMessage(`${this.actor.prototypeToken.name} gagne le Trait Sang Corrosif pour ${duration} rounds.
`, - { whisper: ChatMessage.getWhisperRecipients("GM"), blind: true }) -} \ 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 = `Réparation terminée ${this.item.name}.
`; +const Test = 'Strength'; 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/gqZLfIr6svrtdwdC.js b/scripts/gqZLfIr6svrtdwdC.js deleted file mode 100644 index 191bf9e..0000000 --- a/scripts/gqZLfIr6svrtdwdC.js +++ /dev/null @@ -1 +0,0 @@ -return args.skill?.name != game.i18n.localize("NAME.SleightOfHand") && args.skill?.name != game.i18n.localize("NAME.MeleeBrawling") && args.weapon?.system?.weaponGroup?.value != "brawling" \ No newline at end of file diff --git a/scripts/groEX1wJ9l00PkDF.js b/scripts/groEX1wJ9l00PkDF.js index 1efa688..305ae18 100644 --- a/scripts/groEX1wJ9l00PkDF.js +++ b/scripts/groEX1wJ9l00PkDF.js @@ -9,25 +9,24 @@ const target = canvas.scene.tokens.get(targetId); if (turns > 0) { this.effect.setFlag("wfrp4e", "turns", turns); - return this.script.message(`${speaker.alias} continue de s'enrouler autour ${target.name}. Il pourra commencer à écraser dans ${turns} tours.
`); + return this.script.message(`${speaker.alias} continue de s'enrouler autour de ${target.name}. Il pourra commencer à écraser dans ${turns} tours.
`); } -if (this.actor.items.find(i => i.type === "extendedTest" && i.name === this.effect.name)) { - this.script.message(`${speaker.alias} peut reprenre son écrasement ${target.name} avec le Test Etendu.
`); - +if (this.actor.items.find(i => i.type === "extendedTest" && i.name === this.effet.name)) { + this.script.message(`${speaker.alias} peut reprendre l'écrasement de ${target.name} avec le Test Étendu.
`); return; } const extendedTestData = { - name: this.effect.name, + name: this.effet.name, type: "extendedTest", - img: this.effect.img, + img: this.effet.img, system: { SL: { current: 0, - target: target.actor.system.status.wounds.value + target: target.actor.system.status.Blessures.value }, - test: { + Test: { value: 'Strength' }, completion: { @@ -39,12 +38,12 @@ const extendedTestData = { } }; -const extendedTests = await this.actor.createEmbeddedDocuments("Item", [extendedTestData], {fromEffect: this.effect.id}); +const extendedTests = await this.actor.createEmbeddedDocuments("Item", [extendedTestData], {fromEffect: this.effet.id}); const extendedTest = extendedTests[0]; -this.script.message(`${speaker.alias} a fini de s'enrouler autour de ${target.name}. Il peut maintenant écraser via le Test Etendu @UUID[${extendedTest.uuid}].
`); +this.script.message(`${speaker.alias} a fini de s'enrouler autour de ${target.name}. Il peut maintenant commencer à écraser via le Test Étendu @UUID[${extendedTest.uuid}].
`); -let effect = { +let effet = { name: extendedTest.name, img: extendedTest.img, system: { @@ -61,8 +60,8 @@ let effect = { const speaker = ChatMessage.getSpeaker({actor: this.actor}); const targetId = effect.getFlag("wfrp4e", "target"); const target = canvas.scene.tokens.get(targetId); - this.script.message(\`${speaker.alias} écrase ${target.name}. Le bateau et broyé, réduit à une masse de déchets flottants.
\`); - await effect.delete(); + this.script.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.- Select your choice + Sélectionnez votre choix
${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}${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 : `Damage all Items carried?
`}) + let damageItems = await foundry.applications.api.DialogV2.confirm({window: {title : this.item.name}, content : `Endommage tous les objets portés ?
`}) if (damageItems) { let msg = `` let weapons = args.actor.itemTypes.weapon.filter(i => i.isEquipped); - let armour = args.actor.itemTypes.armour.filter(i => i.isEquipped); + let armour = args.actor.itemTags.armour.filter(i => i.isEquipped); let trappings = args.actor.itemTypes.trapping.filter(i => i.isEquipped); for(let item of weapons) { @@ -21,21 +21,21 @@ if (type == "corrosion") { await item.system.damageItem(1, "shield"); } - else + else { await item.system.damageItem(1); } - msg += `${item.name} damage by 1
` + msg += `${item.name} endommagé de 1
` } for(let item of armour) { await item.system.damageItem(1); - msg += `${item.name} damage by 1
` + msg += `${item.name} endommagé de 1
` } for(let item of trappings) { await item.system.damageItem(1); - msg += `${item.name} damage by 1
` + msg += `${item.name} endommagé de 1
` } if (msg) { @@ -62,5 +62,5 @@ if (type == "poison") if (type == "warpfire") { await this.actor.corruptionDialog("moderate") - this.actor.applyEffect({effectUuids : this.item.effects.getName("Warpfire").uuid}) + this.actor.applyEffect({effectUuids : this.item.effects.getName("Warpfire").uuid}) } \ No newline at end of file diff --git a/scripts/jgO1Kf60Ctt6R0qO.js b/scripts/jgO1Kf60Ctt6R0qO.js deleted file mode 100644 index 5fb4283..0000000 --- a/scripts/jgO1Kf60Ctt6R0qO.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/jpcU8FFWSlQ3gD0L.js b/scripts/jpcU8FFWSlQ3gD0L.js deleted file mode 100644 index dfb5b37..0000000 --- a/scripts/jpcU8FFWSlQ3gD0L.js +++ /dev/null @@ -1 +0,0 @@ -return !args.skill?.name?.includes(game.i18n.localize("NAME.Trade")) \ No newline at end of file diff --git a/scripts/jsgLEVYvMieyYT6L.js b/scripts/jsgLEVYvMieyYT6L.js index 061e859..6cda669 100644 --- a/scripts/jsgLEVYvMieyYT6L.js +++ b/scripts/jsgLEVYvMieyYT6L.js @@ -1,18 +1,18 @@ let tokenImg = ""; // Put path to token image here, inbetween the quotation marks if (tokenImg) { - if (this.effect.getFlag("wfrp4e", "transformed")) + if (this.effet.getFlag("wfrp4e", "transformed")) { await this.effect.setFlag("wfrp4e", "transformed", false); - this.actor.getActiveTokens().forEach(t => t.document.update({texture : {src: this.actor.prototypeToken.texture.src}})); + this.actor.getActiveTokens().forEach(t => t.document.update({texture : {src: this.actor.prototypeToken.texture.src}})); } - else + else { await this.effect.setFlag("wfrp4e", "transformed", true); this.actor.getActiveTokens().forEach(t => t.document.update({texture : {src: tokenImg}})); } } -else +else { - this.script.scriptNotification("Aucune image de Token configurée. Le chemin du token doit être configuré dans la première ligne de ce script.", "error"); + this.script.notification("Aucun chemin d'image de token configuré. Le chemin de l'image doit être défini dans la première ligne de ce script.", "error"); } \ No newline at end of file diff --git a/scripts/U9xh2wriSqCosugW.js b/scripts/jvNuIbOtB46p0esq.js similarity index 55% rename from scripts/U9xh2wriSqCosugW.js rename to scripts/jvNuIbOtB46p0esq.js index b76aedc..ce08c05 100644 --- a/scripts/U9xh2wriSqCosugW.js +++ b/scripts/jvNuIbOtB46p0esq.js @@ -1,13 +1,13 @@ -if (args.test.options.stag) +if (args.test.item?.system?.attackType == "melee") { 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.description = "Succès marginal"; } - args.test.result.outcome = "success" - args.test.result.other.push(`${this.effect.name}: Minimum +0 DR`) + args.Test.result.outcome = "success" + args.test.result.other.push(`${this.effect.name}: Minimum +0 SL`) } } \ No newline at end of file diff --git a/scripts/k0AkkBLtE8oZhBwn.js b/scripts/k0AkkBLtE8oZhBwn.js index 3fcc840..e37678e 100644 --- a/scripts/k0AkkBLtE8oZhBwn.js +++ b/scripts/k0AkkBLtE8oZhBwn.js @@ -1,5 +1,5 @@ if (isNaN(parseInt(this.item.system.specification.value))) { - let value = await ValueDialog.create({title : "Armoured Value", text : "Enter the Armoured value"}); + let value = await ValueDialog.create({title : "Valeur d'Armure", text : "Entrez la valeur d'Armure"}); if (value) { this.item.updateSource({"system.specification.value" : value}); } diff --git a/scripts/k1Wdehpgdc0hP63E.js b/scripts/k1Wdehpgdc0hP63E.js new file mode 100644 index 0000000..ca96a42 --- /dev/null +++ b/scripts/k1Wdehpgdc0hP63E.js @@ -0,0 +1,11 @@ +let item = await fromUuid("Compendium.wfrp4e-core.items.Item.aE3pyW20Orvdjzj0") +let hatred = item.toObject(); +hatred.system.specification.value = "Skaven" + +item = await fromUuid("Compendium.wfrp4e-core.items.Item.3wCtgMDNnu8MFmyk") +let immunity = item.toObject(); +immunity.system.specification.value = "Poison" + +item = await fromUuid("Compendium.wfrp4e-core.items.Item.oRx92ByVNEBN6YkK") +let berserk = item.toObject(); +await this.actor.createEmbeddedDocuments("Item", [hatred, immunity, berserk], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/scripts/k3FqFgsF6a3TkxAD.js b/scripts/k3FqFgsF6a3TkxAD.js deleted file mode 100644 index b78e571..0000000 --- a/scripts/k3FqFgsF6a3TkxAD.js +++ /dev/null @@ -1,3 +0,0 @@ -let test = await this.actor.setupSkill(game.i18n.localize("NAME.Cool"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`}) -test.roll(); -return true; \ No newline at end of file diff --git a/scripts/k465TgRelwcSUdS2.js b/scripts/k465TgRelwcSUdS2.js new file mode 100644 index 0000000..b65ee97 --- /dev/null +++ b/scripts/k465TgRelwcSUdS2.js @@ -0,0 +1,19 @@ +if (this.actor.has("Métier (Ingénieur)", "skill")) +{ + let aim = await this.actor.setupSkill("Métier (Ingénieur)", {appendTitle : ` - Aim ${this.item.name}`}); + await aim.roll(); + let SL = Number(aim.result.SL); + let context = {} + if (SL < 0) + { + context.fields = {modifier : 10 * SL}; + context.initialTooltip = "Échoué Métier (Ingénieur)"; + } + + let fire = await this.actor.setupWeapon(this.item, context) + fire.roll(); +} +else +{ + this.script.notification("Cet acteur n'a pas le Métier (Ingénieur)!", "error"); +} \ No newline at end of file diff --git a/scripts/k5792iKWEqKmVZMk.js b/scripts/k5792iKWEqKmVZMk.js new file mode 100644 index 0000000..549c438 --- /dev/null +++ b/scripts/k5792iKWEqKmVZMk.js @@ -0,0 +1 @@ +return args.weapon || args.skill?.name === "Esquive"; \ No newline at end of file diff --git a/scripts/k8TC0yzp4xfOXD2n.js b/scripts/k8TC0yzp4xfOXD2n.js deleted file mode 100644 index 26e00ae..0000000 --- a/scripts/k8TC0yzp4xfOXD2n.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.actor.addCondition("stunned"); - } - args.actor.hasCondition("bleeding")?.delete() -} \ No newline at end of file diff --git a/scripts/kEaBLoIHt1FpQVKq.js b/scripts/kEaBLoIHt1FpQVKq.js deleted file mode 100644 index c1e2422..0000000 --- a/scripts/kEaBLoIHt1FpQVKq.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("Invisibility", "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/kMSdRskYDI2J1gnp.js b/scripts/kMSdRskYDI2J1gnp.js deleted file mode 100644 index c06e3bc..0000000 --- a/scripts/kMSdRskYDI2J1gnp.js +++ /dev/null @@ -1,7 +0,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("prone"); -} - \ No newline at end of file diff --git a/scripts/kWynO1lQzjiSs8RK.js b/scripts/kWynO1lQzjiSs8RK.js deleted file mode 100644 index 0b3b7e8..0000000 --- a/scripts/kWynO1lQzjiSs8RK.js +++ /dev/null @@ -1 +0,0 @@ -return args.skill?.name != game.i18n.localize("NAME.Haggle"); \ No newline at end of file diff --git a/scripts/kY50G53IXdNXX9Sc.js b/scripts/kY50G53IXdNXX9Sc.js new file mode 100644 index 0000000..255a979 --- /dev/null +++ b/scripts/kY50G53IXdNXX9Sc.js @@ -0,0 +1,7 @@ +for(let e of this.item.effects) +{ + if (e.name.toLowerCase().includes("rune") && e.system.transferData.type == "aura" && e.system.transferData.area.radius == "6") + { + e.system.transferData.area.radius = "12" + } +} \ No newline at end of file diff --git a/scripts/kYTEqcs8JpO2OmB9.js b/scripts/kYTEqcs8JpO2OmB9.js new file mode 100644 index 0000000..a89bcd1 --- /dev/null +++ b/scripts/kYTEqcs8JpO2OmB9.js @@ -0,0 +1,4 @@ +if (args.equipped) + await this.actor.addEffectItems("Compendium.wfrp4e-core.items.Item.Bvd2aZ0gQUXHfCTh", this.effect, {"system.specification.value": "10"}); +else + await this.effect.deleteCreatedItems() \ No newline at end of file diff --git a/scripts/kYiDBPRKIokFkr4Z.js b/scripts/kYiDBPRKIokFkr4Z.js deleted file mode 100644 index 58d9e24..0000000 --- a/scripts/kYiDBPRKIokFkr4Z.js +++ /dev/null @@ -1,4 +0,0 @@ -if (args.item.type == "skill" && args.item.name == "Projectiles (Arc)") -{ - args.item.system.modifier.value += 20; -} \ No newline at end of file diff --git a/scripts/kYmscP2HuXjDovBD.js b/scripts/kYmscP2HuXjDovBD.js deleted file mode 100644 index 2e53be1..0000000 --- a/scripts/kYmscP2HuXjDovBD.js +++ /dev/null @@ -1 +0,0 @@ -return args.skill?.name.includes(game.i18n.localize("NAME.Stealth")) diff --git a/scripts/kiJ6AiaYVUjt6aV6.js b/scripts/kiJ6AiaYVUjt6aV6.js index 138718e..3d396a4 100644 --- a/scripts/kiJ6AiaYVUjt6aV6.js +++ b/scripts/kiJ6AiaYVUjt6aV6.js @@ -1,7 +1,7 @@ teeth = await fromUuid("Compendium.wfrp4e-core.items.fBcZhOBn8IpoVqQ1") teeth = teeth.toObject(); -let roll = await new Roll("1d10").roll(); +let roll = await new Roll("1d10").roll({allowInteractive : false}); roll.toMessage(this.script.getChatData({flavor : "Dents perdues"})) teeth.system.location.value = `${roll.total} ${teeth.system.location.value}` this.actor.createEmbeddedDocuments("Item", [teeth]) \ No newline at end of file diff --git a/scripts/kiolpXGbkmxfPiuI.js b/scripts/kiolpXGbkmxfPiuI.js new file mode 100644 index 0000000..15ac235 --- /dev/null +++ b/scripts/kiolpXGbkmxfPiuI.js @@ -0,0 +1,5 @@ +let test = this.actor.attacker?.test +if (test && this.item.system.protects[test.result.hitloc.result] && test.result.critical) +{ + this.script.message(`${this.item.name}: Blocked Critical Hit`) +} \ No newline at end of file diff --git a/scripts/kkC5EhqA05U6U0gU.js b/scripts/kkC5EhqA05U6U0gU.js deleted file mode 100644 index 4116109..0000000 --- a/scripts/kkC5EhqA05U6U0gU.js +++ /dev/null @@ -1,17 +0,0 @@ -let test = await this.actor.setupSkill(game.i18n.localize("NAME.Cool"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`}) -await test.roll(); - -// Kind of insane but whatever -let opposedResult = test.opposedMessages[0]?.getOppose()?.resultMessage?.getOpposedTest()?.result - -if (opposedResult?.winner == "attacker") -{ - if (opposedResult.differenceSL < 6) - { - this.actor.addCondition("fatigued", Math.floor(opposedResult.differenceSL / 2)) - } - else if (opposedResult.differenceSL >= 6) - { - this.actor.addCondition("broken"); - } -} \ No newline at end of file diff --git a/scripts/kmsGLWGxCY8Z8jVG.js b/scripts/kmsGLWGxCY8Z8jVG.js deleted file mode 100644 index 3077f61..0000000 --- a/scripts/kmsGLWGxCY8Z8jVG.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/knq8lNYLw0v757dQ.js b/scripts/knq8lNYLw0v757dQ.js new file mode 100644 index 0000000..2e83623 --- /dev/null +++ b/scripts/knq8lNYLw0v757dQ.js @@ -0,0 +1,3 @@ +let item = await fromUuid("Compendium.wfrp4e-core.items.Item.9fq6p9Q6H02LjaSi") +let data = item.toObject(); +await this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}); \ No newline at end of file diff --git a/scripts/kvaN100w0nBUlLbj.js b/scripts/kvaN100w0nBUlLbj.js index 127678c..ed019fa 100644 --- a/scripts/kvaN100w0nBUlLbj.js +++ b/scripts/kvaN100w0nBUlLbj.js @@ -1,6 +1,6 @@ let poisoned = this.actor.hasCondition("poisoned") if (poisoned) { - this.script.scriptMessage("Immunisé aux Poisons") + this.script.message("Immunisé à l'empoisonnement") poisoned.delete() } \ No newline at end of file diff --git a/scripts/kvqJbHBvFr6iGLcI.js b/scripts/kvqJbHBvFr6iGLcI.js new file mode 100644 index 0000000..c63e9c1 --- /dev/null +++ b/scripts/kvqJbHBvFr6iGLcI.js @@ -0,0 +1 @@ +this.actor.addEffectItems("Compendium.wfrp4e-core.items.Item.3wCtgMDNnu8MFmyk",null,[{"system.specification.value":"Poison"}]) \ No newline at end of file diff --git a/scripts/l1ntrpa8RE3Lg5xE.js b/scripts/l1ntrpa8RE3Lg5xE.js deleted file mode 100644 index 158cc86..0000000 --- a/scripts/l1ntrpa8RE3Lg5xE.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/l8qFKSnMpy4P7XQR.js b/scripts/l8qFKSnMpy4P7XQR.js deleted file mode 100644 index 523491c..0000000 --- a/scripts/l8qFKSnMpy4P7XQR.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/lDIWlQvD6MGyP3QP.js b/scripts/lDIWlQvD6MGyP3QP.js new file mode 100644 index 0000000..a1f3819 --- /dev/null +++ b/scripts/lDIWlQvD6MGyP3QP.js @@ -0,0 +1 @@ +return this.effect.sourceActor.effects.filter(i => i.isCondition).length > 0 \ No newline at end of file diff --git a/scripts/lG5lfAzNuM4t0rpM.js b/scripts/lG5lfAzNuM4t0rpM.js new file mode 100644 index 0000000..0b1e748 --- /dev/null +++ b/scripts/lG5lfAzNuM4t0rpM.js @@ -0,0 +1 @@ +return args.skill?.name === "Esquive"; \ No newline at end of file diff --git a/scripts/lII4KMRblqwFBlsV.js b/scripts/lII4KMRblqwFBlsV.js index cbf4a2e..b45b101 100644 --- a/scripts/lII4KMRblqwFBlsV.js +++ b/scripts/lII4KMRblqwFBlsV.js @@ -10,13 +10,13 @@ let characteristics = { "wp" : 10, "fel" : 15 } -let skills = ["Focalisation", "Charm", "Perform (Dancing)"] +let skills = ["Focalisation", "Charme", "Représentation (Danse)"] let skillAdvancements = [0, 6, 3] -let talents = ["Attractive", "Distract", "Mimic"] -let traits = ["Distracting", "Flight (6)", "Spellcaster (Petty)"] +let talents = ["Attirant", "Distraire", "Imitation"] +let traits = ["Perturbant", "Flight (6)", "Spellcaster (Petty)"] let trappings = [] let items = []; -let spells = ["Marsh Lights", "Sleep"]; +let spells = ["Feux follets", "Sommeil"]; let updateObj = this.actor.toObject(); @@ -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/lMRsQRgjMexY9dxE.js b/scripts/lMRsQRgjMexY9dxE.js new file mode 100644 index 0000000..4e7e560 --- /dev/null +++ b/scripts/lMRsQRgjMexY9dxE.js @@ -0,0 +1 @@ +return ["NAME.Résistance", "NAME.Cool"].map(i => game.i18n.localize(i)).includes(args.skill?.name) \ No newline at end of file diff --git a/scripts/lOIHiAIDtj91kllN.js b/scripts/lOIHiAIDtj91kllN.js index 4442cf2..841c726 100644 --- a/scripts/lOIHiAIDtj91kllN.js +++ b/scripts/lOIHiAIDtj91kllN.js @@ -1,6 +1,6 @@ -const chanties = await WFRP_Utility.findAll('wfrp4e-soc.chanty'); -let choice = await ItemDialog.create(chanties, 1, "Choisissez Chanty"); -if (choice.length) { - console.log(choice); - this.actor.createEmbeddedDocuments("Item", choice, {fromEffect: this.effect.id}); +const chanties = await warhammer.utility.findAllItems('wfrp4e-soc.chanty', "Loading Chanties", true); +let choice = await ItemDialog.create(chanties, 1, {text : "Choisissez un Chant", title : this.effect.name}); +if (choice.length) +{ + this.actor.addEffectItems(choice.map(i => i.uuid), this.effect) } \ No newline at end of file diff --git a/scripts/lOzkngzye4RmvALp.js b/scripts/lOzkngzye4RmvALp.js index 49921a6..236bcf0 100644 --- a/scripts/lOzkngzye4RmvALp.js +++ b/scripts/lOzkngzye4RmvALp.js @@ -1,3 +1,3 @@ let item = await fromUuid("Compendium.wfrp4e-core.items.DrNUTPeodEgpWTnT") this.actor.createEmbeddedDocuments("Item", [item], {fromEffect : this.effect.id}); -this.script.scriptNotification("Ajout de " + item.name) \ No newline at end of file +this.script.notification("Added " + item.name) \ No newline at end of file diff --git a/scripts/lPudo1grrVp05i7a.js b/scripts/lPudo1grrVp05i7a.js deleted file mode 100644 index b96114f..0000000 --- a/scripts/lPudo1grrVp05i7a.js +++ /dev/null @@ -1,11 +0,0 @@ -let loc = Math.floor(CONFIG.Dice.randomUniform() * 2) == 0 ? "head" : "body" -let damage = this.actor.system.characteristics.s.bonus + 6 - - this.actor.setupSkill(game.i18n.localize("NAME.Cool"), {skipTargets: true, appendTitle : " - " + this.effect.name}).then(async test => { - await test.roll(); - if(test.failed) - { - await this.actor.addCondition("stunned") - this.script.scriptMessage(await this.actor.applyBasicDamage(damage, {loc, damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_AP, suppressMsg: true})) - } - }) \ No newline at end of file diff --git a/scripts/lQJ68n3y1xDyNicE.js b/scripts/lQJ68n3y1xDyNicE.js index 0d61d6e..4f4ac9f 100644 --- a/scripts/lQJ68n3y1xDyNicE.js +++ b/scripts/lQJ68n3y1xDyNicE.js @@ -1 +1 @@ -return !args.options.sizeModifier && args.item?.system?.attackType != "ranged" \ No newline at end of file +return !args.context.sizeModifier && args.item?.system?.attackType != "ranged" \ No newline at end of file diff --git a/scripts/lU4s3UTtBkU38djI.js b/scripts/lU4s3UTtBkU38djI.js index a489fb0..778adf3 100644 --- a/scripts/lU4s3UTtBkU38djI.js +++ b/scripts/lU4s3UTtBkU38djI.js @@ -1,4 +1,4 @@ this.actor.addCondition("entangled") -let msg = `${this.actor.prototypeToken.name} perd 1 Blessure et reçoit l'état Empêtré.` -this.script.scriptMessage(msg) +let msg = `${this.actor.prototypeToken.name} loses 1 Wound and gains 1 Entangled Condition.` +this.script.message(msg) this.actor.modifyWounds(-1) \ No newline at end of file diff --git a/scripts/lYYkGzqNshiYc7WI.js b/scripts/lYYkGzqNshiYc7WI.js deleted file mode 100644 index d17b4c6..0000000 --- a/scripts/lYYkGzqNshiYc7WI.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("poisoned") -} \ No newline at end of file diff --git a/scripts/laWHBP2jLrVxcgp9.js b/scripts/laWHBP2jLrVxcgp9.js new file mode 100644 index 0000000..11159cb --- /dev/null +++ b/scripts/laWHBP2jLrVxcgp9.js @@ -0,0 +1 @@ +this.script.message(await this.actor.applyBasicDamage(2, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL, suppressMsg : true})) \ No newline at end of file diff --git a/scripts/laptAldsT0Fm1rDt.js b/scripts/laptAldsT0Fm1rDt.js index 0bce9f6..8cd0a72 100644 --- a/scripts/laptAldsT0Fm1rDt.js +++ b/scripts/laptAldsT0Fm1rDt.js @@ -1,6 +1,6 @@ -let blunt = await Dialog.confirm({label : "test", content :`Appliquer la réduction des Dégats contondants? (-3)
`}) +let blunt = await foundry.applications.api.DialogV2.confirm({window: {title : this.effect.name}, content :`Appliquer la réduction des dégâts contondants ? (-3)
`}) if (blunt) { - args.modifiers.other.push({label : this.effect.name, details : "Réduction des dégats contondants", value : -3}) + args.modifiers.other.push({label : this.effect.name, details : "Réduction des Dégâts Contondants", value : -3}) } \ No newline at end of file diff --git a/scripts/lhemR8EP5tGNKout.js b/scripts/lhemR8EP5tGNKout.js deleted file mode 100644 index cb1f420..0000000 --- a/scripts/lhemR8EP5tGNKout.js +++ /dev/null @@ -1,14 +0,0 @@ -let test = await this.actor.setupSkill(game.i18n.localize("NAME.Cool"), {fields: {difficulty : "average"}, skipTargets: true, appendTitle : ` - ${this.effect.name}`, context : {failure : "Souffre d'Irrationnalité Effrayante"}}) -await test.roll(); -if (test.failed) -{ - msg = `@UUID[${this.effect.sourceItem.uuid}]{Irrationnalité Effrayante} Lancez: ${Math.ceil(CONFIG.Dice.randomUniform() * 10)}
` - if (test.result.roll % 11 == 0 || test.result.roll == 100) - { - msg += `${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}.
` - let newCorruption = Number(this.actor.status.corruption.value) + 1 - this.actor.update({"system.status.corruption.value" : newCorruption}) - } - - this.script.scriptMessage(msg); -} diff --git a/scripts/lmBAZCtofsC8hHHG.js b/scripts/lmBAZCtofsC8hHHG.js new file mode 100644 index 0000000..8309bc0 --- /dev/null +++ b/scripts/lmBAZCtofsC8hHHG.js @@ -0,0 +1,31 @@ +let SL = 1; + +do { + const signedSL = SL >= 0 ? `+${SL}` : "SL"; + const content = ` +Vous avez augmenté ${signedSL} ${SL > 1 ? "DRs" : "SL"}. Voulez-vous lancer un d10 ?
+1–6: ajoutez +1 DR
+7–10: perdez tous les DR accumulés et effectuez le test suivant à –1 DR
+${this.actor.prototypeToken.name} vieilli de ${inline.replace("@ROLL", ageAdded).replace("@TT", "2d10")} et perd
-${inline.replace("@ROLL", ws).replace("@TT", "1d10")} Capacité de Combat
-${inline.replace("@ROLL", bs).replace("@TT", "1d10")} Capacité de Tir
+ `${this.actor.prototypeToken.name} ages by ${inline.replace("@ROLL", ageAdded).replace("@TT", "2d10")} and loses
+${inline.replace("@ROLL", ws).replace("@TT", "1d10")} Compétence de Combat
+${inline.replace("@ROLL", bs).replace("@TT", "1d10")} Compétence de Tir
${inline.replace("@ROLL", s).replace("@TT", "1d10")} Force
${inline.replace("@ROLL", t).replace("@TT", "1d10")} Endurance
${inline.replace("@ROLL", ag).replace("@TT", "1d10")} Agilité
-${inline.replace("@ROLL", dex).replace("@TT", "1d10")} Dexterité
+${inline.replace("@ROLL", dex).replace("@TT", "1d10")} Dextérité
` - this.script.scriptMessage(msg); + this.script.message(msg); let characteristics = foundry.utils.duplicate(this.actor.system.characteristics) diff --git a/scripts/m4eagTrVOXtotonR.js b/scripts/m4eagTrVOXtotonR.js new file mode 100644 index 0000000..906409a --- /dev/null +++ b/scripts/m4eagTrVOXtotonR.js @@ -0,0 +1,11 @@ +// Get the size +let size = this.actor.sizeNum +let diff = "difficult"; +if (size < 5) { // 5 = Monstrous + diff = "hard"; +} +let test = await this.actor.setupSkill(game.i18n.localize("NAME.Cool"), {fields : {difficulty : diff}, appendTitle : ` - ${this.effect.name}`}) +await test.roll(); +if (test.failed) { + this.actor.addSystemEffect("fear") +} \ No newline at end of file diff --git a/scripts/m8qBlbH7ROoqa22o.js b/scripts/m8qBlbH7ROoqa22o.js index 17577b3..0447be5 100644 --- a/scripts/m8qBlbH7ROoqa22o.js +++ b/scripts/m8qBlbH7ROoqa22o.js @@ -1 +1 @@ -return args.options.reload \ No newline at end of file +return args.context.reload \ No newline at end of file diff --git a/scripts/mPxmCsXYirAIT913.js b/scripts/mPxmCsXYirAIT913.js index 4b0ee86..2fc1e00 100644 --- a/scripts/mPxmCsXYirAIT913.js +++ b/scripts/mPxmCsXYirAIT913.js @@ -1,3 +1,3 @@ -let key = await ItemDialog.create(ItemDialog.objectToArray(game.wfrp4e.config.characteristics, this.effect.img), 1, "Choisissez Characteristic"); +let key = await ItemDialog.create(ItemDialog.objectToArray(game.wfrp4e.config.characteristics, this.effect.img), 1, "Choisir la Caractéristique"); this.effect.updateSource({changes : [{key : `system.characteristics.${key[0].id}.modifier`, mode : 2, value : 10}]}) \ No newline at end of file diff --git a/scripts/mRvLsSVxNyt8LVZb.js b/scripts/mRvLsSVxNyt8LVZb.js index 130b10c..1d9805b 100644 --- a/scripts/mRvLsSVxNyt8LVZb.js +++ b/scripts/mRvLsSVxNyt8LVZb.js @@ -1,4 +1,4 @@ let item = await fromUuid("Compendium.wfrp4e-core.items.GRRN3XAKIpEVCY7z") 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/mTnmPcjWmvScIBWY.js b/scripts/mTnmPcjWmvScIBWY.js deleted file mode 100644 index 79cf5c7..0000000 --- a/scripts/mTnmPcjWmvScIBWY.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/mYL4i1vNlMl4vFYy.js b/scripts/mYL4i1vNlMl4vFYy.js deleted file mode 100644 index a5211a8..0000000 --- a/scripts/mYL4i1vNlMl4vFYy.js +++ /dev/null @@ -1 +0,0 @@ -return args.skill?.name != game.i18n.localize("NAME.Perception") && args.skill?.name != game.i18n.localize("NAME.Track"); \ No newline at end of file diff --git a/scripts/mlulnXQo8XU8vKLD.js b/scripts/mlulnXQo8XU8vKLD.js index 80cf7e7..d908215 100644 --- a/scripts/mlulnXQo8XU8vKLD.js +++ b/scripts/mlulnXQo8XU8vKLD.js @@ -1,6 +1,6 @@ if (isNaN(parseInt(this.item.system.specification.value))) { - let value = await ValueDialog.create({tetx : "Enter Grim value", title : this.effect.name}); + let value = await ValueDialog.create({text : "Entrer la valeur", title : this.effect.name}); if (value) { this.item.updateSource({"system.specification.value" : value}); diff --git a/scripts/mnvczEiu7gUSWvuV.js b/scripts/mnvczEiu7gUSWvuV.js new file mode 100644 index 0000000..c6043ff --- /dev/null +++ b/scripts/mnvczEiu7gUSWvuV.js @@ -0,0 +1,10 @@ +if (args.test.options.flags.skewering) +{ + args.test.result.tables.critical = { + label : "Critique (si attaque réussie)", + class : "critical-roll", + modifier : args.test.result.critModifier || 0, + key: `crit${args.test.result.hitloc.result}` + + } +} \ No newline at end of file diff --git a/scripts/mr8qm5Bg6k1idZ6Q.js b/scripts/mr8qm5Bg6k1idZ6Q.js deleted file mode 100644 index aedbb90..0000000 --- a/scripts/mr8qm5Bg6k1idZ6Q.js +++ /dev/null @@ -1 +0,0 @@ -return args.item?.name == "Musicien (Luth)" \ No newline at end of file diff --git a/scripts/mziJBUYcsrhkdcCJ.js b/scripts/mziJBUYcsrhkdcCJ.js deleted file mode 100644 index 0308dbf..0000000 --- a/scripts/mziJBUYcsrhkdcCJ.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/n5RJqJL9fdRIxkuN.js b/scripts/n5RJqJL9fdRIxkuN.js index 8d0d11c..8cfb4e3 100644 --- a/scripts/n5RJqJL9fdRIxkuN.js +++ b/scripts/n5RJqJL9fdRIxkuN.js @@ -1,11 +1,11 @@ if (this.actor.system.status.advantage.value > 0) { await this.actor.modifyAdvantage(-1); - 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/n5wowuDE8Dz1uBZn.js b/scripts/n5wowuDE8Dz1uBZn.js new file mode 100644 index 0000000..aa6e010 --- /dev/null +++ b/scripts/n5wowuDE8Dz1uBZn.js @@ -0,0 +1,11 @@ +let damage = this.effect.sourceActor.characteristics.int.bonus + 6; +if (this.actor.has(game.i18n.localize("NAME.Mort-vivant")) || this.actor.has(game.i18n.localize("NAME.Démoniaque"))) { + damage += 6 +} +this.script.scriptMessage(await this.actor.applyBasicDamage(damage, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_AP, suppressMsg: true})); + +let test = await this.actor.setupCharacteristic("int", {fields : {difficulty : "average"}, appendTitle : ` - ${this.effect.name}`}) +await test.roll(); +if (test.failed) { + this.actor.addCondition("stunned"); +} \ No newline at end of file diff --git a/scripts/n8X4Vgmrs4M5pyHK.js b/scripts/n8X4Vgmrs4M5pyHK.js new file mode 100644 index 0000000..ecd9108 --- /dev/null +++ b/scripts/n8X4Vgmrs4M5pyHK.js @@ -0,0 +1 @@ +return !this.actor.isOpposing || this.actor.attacker.test.item.attackType != "melee" || !this.item.equipped.value \ No newline at end of file diff --git a/scripts/n99CqhPx3uABCU15.js b/scripts/n99CqhPx3uABCU15.js new file mode 100644 index 0000000..761dd37 --- /dev/null +++ b/scripts/n99CqhPx3uABCU15.js @@ -0,0 +1,4 @@ +if (args.test.result.critical && args.test.preData.reversal.allowed) +{ + args.test.result.other.push(`${this.effect.name}: can reverse Critical Hit roll`) +} \ No newline at end of file diff --git a/scripts/nD2QVg3DrPK3foMf.js b/scripts/nD2QVg3DrPK3foMf.js deleted file mode 100644 index 7c32726..0000000 --- a/scripts/nD2QVg3DrPK3foMf.js +++ /dev/null @@ -1,7 +0,0 @@ -args.actor.setupSkill("Esquive", { fields: { difficulty: "average" } }).then(async test => { - await test.roll(); - if (test.failed) { - await args.actor.addCondition("bleeding") - await args.actor.addCondition("entangled") - } - }) \ No newline at end of file diff --git a/scripts/nEaF3jbCiVYD8jia.js b/scripts/nEaF3jbCiVYD8jia.js deleted file mode 100644 index c39fb2f..0000000 --- a/scripts/nEaF3jbCiVYD8jia.js +++ /dev/null @@ -1 +0,0 @@ -return args.skill?.name != game.i18n.localize("NAME.Charm") && !args.skill?.name.includes(game.i18n.localize("NAME.Lore")); \ No newline at end of file diff --git a/scripts/nGTxNWBUBgTr87wU.js b/scripts/nGTxNWBUBgTr87wU.js index 9c8d755..72f4810 100644 --- a/scripts/nGTxNWBUBgTr87wU.js +++ b/scripts/nGTxNWBUBgTr87wU.js @@ -1,5 +1,5 @@ if (args.opposedTest.result.differenceSL >= 0 && args.opposedTest.result.differenceSL <= 2 && args.opposedTest.result.winner == "attacker") { - this.script.scriptMessage(`Becomes lodged in the armour or flesh of the opponent. See @UUID[${this.item.uuid}]{${this.item.name}}.`, {alias : this.item.name}, {blind: true, whisper : ChatMessage.getWhisperRecipients("GM")}) + this.script.message(`Becomes lodged in the armour or flesh of the opponent. See @UUID[${this.item.uuid}]{${this.item.name}}.`, speaker : {alias : this.item.name}, {blind: true, whisper : ChatMessage.getWhisperRecipients("GM")}) } \ No newline at end of file diff --git a/scripts/nIOeK0BrtdZeZW8X.js b/scripts/nIOeK0BrtdZeZW8X.js deleted file mode 100644 index 8e85711..0000000 --- a/scripts/nIOeK0BrtdZeZW8X.js +++ /dev/null @@ -1,17 +0,0 @@ -console.log("SKILL", this) - -let test = await this.actor.setupSkill(game.i18n.localize("NAME.Cool"), {fields : {difficulty : "challenging"}, appendTitle : ` - ${this.effect.name}`}) -await test.roll(); - -let rollD10 = await new Roll("1d10").roll() -rollD10.toMessage(this.script.getChatData()) - - -if (test.succeeded) -{ - //... -} -else if (test.failed) -{ - //... -} diff --git a/scripts/nNwAFEURKlFhPcvA.js b/scripts/nNwAFEURKlFhPcvA.js new file mode 100644 index 0000000..d8d22c2 --- /dev/null +++ b/scripts/nNwAFEURKlFhPcvA.js @@ -0,0 +1 @@ +CorruptionMessageModel.createCorruptionMessage("minor", this.script.getChatData()); \ No newline at end of file diff --git a/scripts/nSXzktHyNjGUXjaw.js b/scripts/nSXzktHyNjGUXjaw.js index 33216f3..0f643a3 100644 --- a/scripts/nSXzktHyNjGUXjaw.js +++ b/scripts/nSXzktHyNjGUXjaw.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/nZtN0zM49xTuG86V.js b/scripts/nZtN0zM49xTuG86V.js new file mode 100644 index 0000000..4961297 --- /dev/null +++ b/scripts/nZtN0zM49xTuG86V.js @@ -0,0 +1,12 @@ +if (this.actor.system.status.advantage.value >= 2) +{ + await this.actor.modifyAdvantage(-2); + this.script.notification("Avantage retiré") +} +else +{ + return this.script.notification("Avantage retiré", "error") +} + +let test = await this.actor.setupTrait(this.item) +await test.roll(); \ No newline at end of file diff --git a/scripts/naF5EWr1CBkYRZTK.js b/scripts/naF5EWr1CBkYRZTK.js index 7ea6e02..066302b 100644 --- a/scripts/naF5EWr1CBkYRZTK.js +++ b/scripts/naF5EWr1CBkYRZTK.js @@ -1,26 +1,9 @@ -if (args.opposedTest?.attackerTest?.item?.system?.isRanged) +if (args.opposedTest?.attackerTest?.item?.system?.isProjectiles) { - let choice = await Dialog.wait({ - title: this.effect.name, - content: `Eviter les dégâts avec ${this.effect.name}?`, - buttons: { - yes: { - label: "Oui", - callback: () => { - return true; - } - }, - no: { - label: "Non", - callback: () => { - return false; - } - } - } - }) + let choice = await foundry.applications.api.DialogV2.confirm({window: {title : this.item.name}, content : `
Annuler les dégâts avec ${this.effect.name}?
`}) if (choice) { - args.abort = `${this.effect.name}: Dégâts annulés` + args.abort = `${this.effect.name}: Dégats annulés.`; } } \ No newline at end of file diff --git a/scripts/ncIjDE6TFx88IQA1.js b/scripts/ncIjDE6TFx88IQA1.js deleted file mode 100644 index 223a1a3..0000000 --- a/scripts/ncIjDE6TFx88IQA1.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/ngMm7SgtVqVovFJG.js b/scripts/ngMm7SgtVqVovFJG.js index 8d5af65..2025f1f 100644 --- a/scripts/ngMm7SgtVqVovFJG.js +++ b/scripts/ngMm7SgtVqVovFJG.js @@ -1,4 +1,4 @@ if (args.test.result.critical && args.test.result.critical != "Total Power") { - args.test.result.other.push(` Bonecrusher Critical (+20) (only if Critical Cast selected)`) + args.test.result.other.push(` Bonecrusher Critical (+20) (only if Critical Cast selected)`) } \ No newline at end of file diff --git a/scripts/njPP9wDAsdh4WHIj.js b/scripts/njPP9wDAsdh4WHIj.js index 6fb1cd6..dc8afe2 100644 --- a/scripts/njPP9wDAsdh4WHIj.js +++ b/scripts/njPP9wDAsdh4WHIj.js @@ -1,4 +1,4 @@ if (args.totalWoundLoss > 0 && ["trait", "weapon"].includes(args.opposedTest.attackerTest.item?.type)) { - this.script.scriptMessage(`Infctée: ${args.actor.name} doit réussir un Test Facile (+40) de Résistance ou subir une @UUID[Compendium.wfrp4e-core.items.kKccDTGzWzSXCBOb]{Blessure Purulente}`, {whisper: ChatMessage.getWhisperRecipients("GM")}) + 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/nkSmu7v9WiAaK4vq.js b/scripts/nkSmu7v9WiAaK4vq.js index 307f862..c084d9a 100644 --- a/scripts/nkSmu7v9WiAaK4vq.js +++ b/scripts/nkSmu7v9WiAaK4vq.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 = 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/nkbTnaeBpthyhw4J.js b/scripts/nkbTnaeBpthyhw4J.js index cf0a3c9..107d645 100644 --- a/scripts/nkbTnaeBpthyhw4J.js +++ b/scripts/nkbTnaeBpthyhw4J.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 Chance augmenter 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/nkdKBJ8ItqWiRAWL.js b/scripts/nkdKBJ8ItqWiRAWL.js index 379d7c2..21e06c2 100644 --- a/scripts/nkdKBJ8ItqWiRAWL.js +++ b/scripts/nkdKBJ8ItqWiRAWL.js @@ -1,19 +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}.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 = 'challenging'; 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/qAEZgtu5CrfUkxhx.js b/scripts/qAEZgtu5CrfUkxhx.js index 2e1e4ea..007d2e9 100644 --- a/scripts/qAEZgtu5CrfUkxhx.js +++ b/scripts/qAEZgtu5CrfUkxhx.js @@ -1,16 +1,16 @@ -if (args.test.options.staunchBleeding) +if (args.test.options.staunchBleeding) { - if (args.test.succeeded) + if (args.test.succeeded) { let staunch = Number(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} guérit ${staunch} états Hémorragiques du patient.`) + args.test.result.other.push(`${this.actor.name} enlève ${staunch} Etats Hémmoragie du patient.`) } - else if (this.actor.characteristics.int.bonus + Number(args.test.result.SL) < 0) + else if (this.actor.characteristics.int.bonus + Number(args.Test.result.SL) < 0) { - args.test.result.other.push(`Le patient est victime d'une @UUID[Compendium.wfrp4e-core.items.Item.1hQuVFZt9QnnbWzg]{Infection Mineure}.`) + args.Test.result.other.push(`Le patient contracte une @UUID[Compendium.wfrp4e-core.items.Item.1hQuVFZt9QnnbWzg]{Infection Mineure}.`) } } \ No newline at end of file diff --git a/scripts/qDYJnO2JosPJrjpz.js b/scripts/qDYJnO2JosPJrjpz.js new file mode 100644 index 0000000..9c756be --- /dev/null +++ b/scripts/qDYJnO2JosPJrjpz.js @@ -0,0 +1,20 @@ +if (args.totalWoundLoss <= 0) return; + +// Poisoned handled by Venin trait + +const test = await args.actor.setupSkill(game.i18n.localize("NAME.Cool"), { + skipTargets: true, + appendTitle: ` — ${this.effect.name}`, + fields: {difficulty: "average"}, + context: { + failure: `Gain de 1 Point de Corruption.` + } +}); + +await test.roll(); + +if (test.failed && args.actor.type === "character") + args.actor.update({"system.status.corruption.value": args.actor.system.status.corruption.value + 1}); + + +await args.actor.applyEffect({effects : this.item.effects.getName("Morsure du Crâne Pourpre")}) \ No newline at end of file diff --git a/scripts/qITSQMvvkgj81fW1.js b/scripts/qITSQMvvkgj81fW1.js new file mode 100644 index 0000000..228105d --- /dev/null +++ b/scripts/qITSQMvvkgj81fW1.js @@ -0,0 +1 @@ +return !["t", "s"].includes(args.characteristic) \ No newline at end of file diff --git a/scripts/qSwCYMMiIHmSV1X5.js b/scripts/qSwCYMMiIHmSV1X5.js index 1379278..8479cd4 100644 --- a/scripts/qSwCYMMiIHmSV1X5.js +++ b/scripts/qSwCYMMiIHmSV1X5.js @@ -3,11 +3,11 @@ 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 effectData.duration.seconds = 10800 actor.applyEffect({effectData : [effectData]}) } else { - this.script.scriptNotification("None left!", "error") + this.script.notification("Plus rien !", "error") } \ No newline at end of file diff --git a/scripts/qTk96NKh14YOIShf.js b/scripts/qTk96NKh14YOIShf.js deleted file mode 100644 index 29dea3c..0000000 --- a/scripts/qTk96NKh14YOIShf.js +++ /dev/null @@ -1 +0,0 @@ -return args.skill?.name === game.i18n.localize("NAME.Haggle"); \ No newline at end of file diff --git a/scripts/qZ8TBagp2d4dJAqI.js b/scripts/qZ8TBagp2d4dJAqI.js new file mode 100644 index 0000000..b2075c9 --- /dev/null +++ b/scripts/qZ8TBagp2d4dJAqI.js @@ -0,0 +1 @@ +return !args.weapon || args.weapon?.system.isMelee \ No newline at end of file diff --git a/scripts/qaVde0sTuMBRi2nl.js b/scripts/qaVde0sTuMBRi2nl.js deleted file mode 100644 index 2bd32fd..0000000 --- a/scripts/qaVde0sTuMBRi2nl.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/qhjU1QdsfqA8h5iI.js b/scripts/qhjU1QdsfqA8h5iI.js new file mode 100644 index 0000000..24fd01a --- /dev/null +++ b/scripts/qhjU1QdsfqA8h5iI.js @@ -0,0 +1 @@ +return args.item?.system?.attackType != "ranged" || !this.item.equipped.value \ No newline at end of file diff --git a/scripts/qijgjcOBCDmhglRX.js b/scripts/qijgjcOBCDmhglRX.js deleted file mode 100644 index 49dfaeb..0000000 --- a/scripts/qijgjcOBCDmhglRX.js +++ /dev/null @@ -1 +0,0 @@ -return args.skill?.name == game.i18n.localize("NAME.SleightOfHand"); \ No newline at end of file diff --git a/scripts/qmGwT929EiZ3lW2x.js b/scripts/qmGwT929EiZ3lW2x.js new file mode 100644 index 0000000..8b23efb --- /dev/null +++ b/scripts/qmGwT929EiZ3lW2x.js @@ -0,0 +1,8 @@ +if (args.weaponProperties.qualities.penetrating) +{ + args.alreadyPenetrating = true; +} +else +{ + args.weaponProperties.qualities.penetrating = true; +} \ No newline at end of file diff --git a/scripts/qmH61HmrEJcmQTiu.js b/scripts/qmH61HmrEJcmQTiu.js new file mode 100644 index 0000000..9cbc1b6 --- /dev/null +++ b/scripts/qmH61HmrEJcmQTiu.js @@ -0,0 +1,3 @@ +let item = await fromUuid("Compendium.wfrp4e-core.items.tNWrJUOArwfWXsPw"); +item = item.toObject(); +this.actor.createEmbeddedDocuments("Item", [item], {fromEffect : this.effect.id}); \ No newline at end of file diff --git a/scripts/qmOt7h17hGAKqQe0.js b/scripts/qmOt7h17hGAKqQe0.js index 9c3eef5..aa58aa4 100644 --- a/scripts/qmOt7h17hGAKqQe0.js +++ b/scripts/qmOt7h17hGAKqQe0.js @@ -1,24 +1,11 @@ -let choice = await Dialog.wait({ - title: this.effect.name, - content: `${this.effect.name}: Est-ce que l'attaque magique ou à distance provient de l'extérieur du Dome?
`, - buttons: { - yes: { - label: "Oui", - callback: () => { - return true; - } - }, - no: { - label: "Non", - callback: () => { - return false; - } - } - } -}) -if (choice) +if (!args.opposedTest.attackerTest.item?.system?.isMelee) { - args.ward = 6; -} \ No newline at end of file + let choice = await foundry.applications.api.DialogV2.confirm({ window: { title: this.effect.name }, content: `${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}
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 +
+ `, +}) + +let choice = [] + +if (addOption) +{ + choice = [ + { + type : "skill", + name : "Projectiles (Arc)", + diff : { + system : { + advances : { + value : 10 + } } } - } - }, - { - type : "weapon", - name : "Longbow", - }, - { - type : "ammunition", - name : "Arrow", - } -] -let choice2 = [ -] - -let choice = await Dialog.wait({ - title : "Option", - content : - `- Ajouter une option? -
-Add Option?
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 = 'challenging'; 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/w4zubIHP0XgMXsFe.js b/scripts/w4zubIHP0XgMXsFe.js index 5a69e19..4018137 100644 --- a/scripts/w4zubIHP0XgMXsFe.js +++ b/scripts/w4zubIHP0XgMXsFe.js @@ -1 +1 @@ -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/w8s2RUzA1jmyu7vy.js b/scripts/w8s2RUzA1jmyu7vy.js new file mode 100644 index 0000000..cd89655 --- /dev/null +++ b/scripts/w8s2RUzA1jmyu7vy.js @@ -0,0 +1,6 @@ +if (args.test.isCritical && args.test.weapon.weaponGroup.value == "crossbow") { + args.test.result.tables.critical.modifier + = (typeof args.test.result.tables.critical.modifier ==='undefined') + ? 10 + : args.test.result.tables.critical.modifier + 10 +} \ No newline at end of file diff --git a/scripts/wAntJhgb8Og5vJXh.js b/scripts/wAntJhgb8Og5vJXh.js index c788e80..ad8268d 100644 --- a/scripts/wAntJhgb8Og5vJXh.js +++ b/scripts/wAntJhgb8Og5vJXh.js @@ -1 +1 @@ -args.options.staunchBleeding = true; \ No newline at end of file +args.context.staunchBleeding = true; \ No newline at end of file diff --git a/scripts/wBc8XvkAnv3j93vR.js b/scripts/wBc8XvkAnv3j93vR.js new file mode 100644 index 0000000..48258e9 --- /dev/null +++ b/scripts/wBc8XvkAnv3j93vR.js @@ -0,0 +1,11 @@ +if (Number(args.actor.system.status.fate.value) > 0) { + args.actor.update({"system.status.fate.value": Math.max(args.actor.system.status.fate.value - 1, 0)}); + args.actor.update({"system.status.fortune.value": Math.max(args.actor.system.status.fortune.value - 1, 0)}); + this.script.message(`Réduction du Destin et de la Chance de 1`); +} +else if (Number(args.actor.system.status.resilience.value) > 0) +{ + args.actor.update({"system.status.resilience.value": Math.max(args.actor.system.status.resilience.value - 1, 0)}); + args.actor.update({"system.status.resolve.value": Math.max(args.actor.system.status.resolve.value - 1, 0)}); + this.script.message(`Réduction de la Résilience et de la Détermination de 1`); +} \ No newline at end of file diff --git a/scripts/wFHjQyCR6Wzn6TeQ.js b/scripts/wFHjQyCR6Wzn6TeQ.js new file mode 100644 index 0000000..eef3c02 --- /dev/null +++ b/scripts/wFHjQyCR6Wzn6TeQ.js @@ -0,0 +1 @@ +this.actor.system.status.addArmour(1, {source: this.effect, magical: true}); \ No newline at end of file diff --git a/scripts/wLg8LbPAPbQgUg0Z.js b/scripts/wLg8LbPAPbQgUg0Z.js new file mode 100644 index 0000000..e83b492 --- /dev/null +++ b/scripts/wLg8LbPAPbQgUg0Z.js @@ -0,0 +1,3 @@ +return (args.item?.system?.attackType != "melee" + || this.actor.attacker != undefined + || args.target?.hasCondition("surprised") == undefined) \ No newline at end of file diff --git a/scripts/wS6OIR3QN4mOUHn0.js b/scripts/wS6OIR3QN4mOUHn0.js deleted file mode 100644 index 4b370e5..0000000 --- a/scripts/wS6OIR3QN4mOUHn0.js +++ /dev/null @@ -1,12 +0,0 @@ -if (args.totalWoundLoss > args.actor.characteristics.t.bonus) -{ - args.actor.setupSkill(game.i18n.localize("NAME.Endurance")).then(async test => { - await test.roll() - if (test.failed) { - let disease = await fromUuid("Compendium.wfrp4e-core.items.M8XyRs9DN12XsFTQ") - disease = disease.toObject() - disease.system.duration.active = true - args.actor.createEmbeddedDocuments("Item", [disease]) - } - }) -} \ No newline at end of file diff --git a/scripts/wb1DpSdIhSqYG5cp.js b/scripts/wb1DpSdIhSqYG5cp.js new file mode 100644 index 0000000..517b6e7 --- /dev/null +++ b/scripts/wb1DpSdIhSqYG5cp.js @@ -0,0 +1 @@ +args.fields.slBonus = -1 * parseInt(this.effect.sourceTest.result.SL) \ No newline at end of file diff --git a/scripts/wbM7tpw4TxvadcWm.js b/scripts/wbM7tpw4TxvadcWm.js index 5358e6e..c828ab8 100644 --- a/scripts/wbM7tpw4TxvadcWm.js +++ b/scripts/wbM7tpw4TxvadcWm.js @@ -5,15 +5,15 @@ for(let item of items) if (item.system.properties.qualities.durable) { await item.update({"system.qualities.value" : []}); - msg += `${item.name} per toutes ses Qualités
` + msg += `${item.name} perd toutes ses Qualités
` } - else + else { - msg += `${item.name} tombe en poussière!
` - await item.update({name : item.name + " (Poussières)"}) + msg += `${item.name} se désintègre en poussière !
` + await item.update({name : item.name + " (Poussière)"}) } } if(msg) { - this.script.scriptMessage(msg); + this.script.message(msg); } \ No newline at end of file diff --git a/scripts/C4LZnaX0MYgwrszj.js b/scripts/we6JUzDvybekAbtn.js similarity index 69% rename from scripts/C4LZnaX0MYgwrszj.js rename to scripts/we6JUzDvybekAbtn.js index ad72da6..c791025 100644 --- a/scripts/C4LZnaX0MYgwrszj.js +++ b/scripts/we6JUzDvybekAbtn.js @@ -1 +1 @@ -return args.type !== "channelling" && !args.skill?.name.includes(game.i18n.localize("NAME.Channelling")) && args.skill?.name !== `${game.i18n.localize("NAME.Language")} (${game.i18n.localize("SPEC.Magick")})` && args.skill?.name !== game.i18n.localize("NAME.OutdoorSurvival"); \ No newline at end of file +return args.type !== "channelling" && !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/weDTna1dLMwHsNlJ.js b/scripts/weDTna1dLMwHsNlJ.js new file mode 100644 index 0000000..75bf915 --- /dev/null +++ b/scripts/weDTna1dLMwHsNlJ.js @@ -0,0 +1 @@ +args.modifiers.other.push({label : this.effect.name, details : "Réduction des Dégâts", value : -4}) \ No newline at end of file diff --git a/scripts/whUSkaR1yem21bXp.js b/scripts/whUSkaR1yem21bXp.js index 284bd24..f27ec9a 100644 --- a/scripts/whUSkaR1yem21bXp.js +++ b/scripts/whUSkaR1yem21bXp.js @@ -10,10 +10,10 @@ let characteristics = { "wp" : 0, "fel" : 10 } -let skills = ["Melee (Basic)", "Track"] +let skills = ["Corps à corps (Base)", "Pistage"] let skillAdvancements = [8, 7] -let talents = ["Berserk Charge", "Careful Strike", "Strike to Injure"] -let traits = ["Flight (8)", "Fury", "Swarm", "Tracker"] +let talents = ["Charge Berserk", "Frappe précise", "Frappe blessante"] +let traits = ["Flight (8)", "Rage", "Nuée", "Pisteur"] let trappings = [] let items = []; let spells = []; @@ -50,7 +50,7 @@ for (let talent of talents) } else { - ui.notifications.warn(`Impossible de trouver ${talent}`, {permanent : true}) + ui.notifications.warn(`Could not find ${talent}`, {permanent : true}) } } @@ -59,32 +59,16 @@ for (let trait of traits) { let traitMatches = trait.matchAll(traitRegex).next().value let traitName = traitMatches[1] - let traitVal = traitMatches[2] || traitMatches[4] // could be match 2 or 4 depending on if there's a specialization - let traitSpec = traitMatches[3] - - let traitItem; - try { - traitItem = await WFRP_Utility.findItem(traitName, "trait") + let traitVal = traitMatches[2] || traitMatches[4] // could be match 2 or 4 depending on if there'}`).trim() } - catch { } - if (!traitItem) { - ui.notifications.warn(`Impossible de trouver ${trait}`, {permanent : true}) - } - traitItem = traitItem.toObject() - - if (Number.isNumeric(traitVal)) - { - traitItem.system.specification.value = traitName.includes('Weapon','Horns','Tail','Tentacles','Bite') ? 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 +79,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 +94,55 @@ 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 +='Arme','Cornes','Tail','Tentacules','Morsure') ? traitVal - parseInt(characteristicValues[3]/10) : traitVal; + traitItem.name = (traitItem.name + ` ${traitSpec ? "("+ traitSpec + ")" : ""}`).trim() + } + else + traitItem.system.specification.value = traitSpec + + items.push(traitItem) + +} + +for (let trapping of trappings) +{ + let trappingItem = await game.wfrp4e.utility.findItem(trapping) + if (trappingItem) + { + trappingItem = trappingItem.toObject() + + trappingItem.system.equipped.value = true; + + items.push(trappingItem); + } + else + { + ui.notifications.warn(`Could not find ${trapping}`, {permanent : true}) + } +} + +for (let spell of spells) +{ + let spellItem = await game.wfrp4e.utility.findItem(spell) + if (spellItem) + { + spellItem = spellItem.toObject() + + items.push(spellItem); + } + else + { + ui.notifications.warn(`Could not find ${spell}`, {permanent : true}) + } +} + +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/wsqNM4NHnwaAAQym.js b/scripts/wsqNM4NHnwaAAQym.js deleted file mode 100644 index a58738b..0000000 --- a/scripts/wsqNM4NHnwaAAQym.js +++ /dev/null @@ -1,11 +0,0 @@ - args.applyAP = false; - - this.script.scriptNotification("Ce test ne s'applique seulement qu'aux criminels. Fermez cette fenêtre si ce n'est pas le cas."); - this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {fields : {difficulty : "average"}, skipTargets: true, appendTitle : ` - ${this.effect.name}`}).then(async test => - { - await test.roll(); - if (test.failed) - { - args.actor.addCondition("unconscious"); - } - }); \ No newline at end of file diff --git a/scripts/wyTCozh9qGTx6yK0.js b/scripts/wyTCozh9qGTx6yK0.js index 2bf2400..0b087b8 100644 --- a/scripts/wyTCozh9qGTx6yK0.js +++ b/scripts/wyTCozh9qGTx6yK0.js @@ -1,5 +1,5 @@ -if (args.options.terror || args.extendedTest?.getFlag("wfrp4e", "fear")) +if (args.context.terror || args.extendedTest?.getFlag("wfrp4e", "fear")) { args.abort = true; - this.script.scriptNotification("N'a pas besoin de faire de test de Peur ou de Terreur"); + this.script.notification("N'a pas besoin de faire de tests de Peur ou de Terreur"); } \ No newline at end of file diff --git a/scripts/wzkxiKjxVEeNS1di.js b/scripts/wzkxiKjxVEeNS1di.js deleted file mode 100644 index 7625d68..0000000 --- a/scripts/wzkxiKjxVEeNS1di.js +++ /dev/null @@ -1,11 +0,0 @@ -let roll = await new Roll("1d10").roll(); -this.script.scriptMessage(await this.actor.applyBasicDamage(roll.total, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL, suppressMsg: true})) - -await this.actor.addCondition("deafened", 3) - -let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {fields : {difficulty: "average" }, skipTargets: true, appendTitle : ` - ${this.effect.name}`, context : {failure: "Gain a Broken Condition", success : "Avoided Broken Condition"}}) -await test.roll(); -if (test.failed) -{ - this.actor.addCondition("broken") -} \ No newline at end of file diff --git a/scripts/x1Ecj6MXY94kpcQq.js b/scripts/x1Ecj6MXY94kpcQq.js new file mode 100644 index 0000000..d1db43a --- /dev/null +++ b/scripts/x1Ecj6MXY94kpcQq.js @@ -0,0 +1,9 @@ +if (!this.item.equipped.value) { + return this.script.notification(`Vous devez équiper le ${this.item.name} pour récupérer des points de blessures.`,"info") +} + +const runesOfRestoration = this.item.effects.contents.filter(e => e.name == this.effet.name) +const restorationWounds = parseInt(runesOfRestoration.length * this.actor.system.characteristics.t.bonus) + +this.actor.modifyWounds(restorationWounds) +this.script.message(`Vous avez récupéré ${restorationWounds} blessures avec ${this.script.label}.`) \ No newline at end of file diff --git a/scripts/x2RLUUNB7BiIDYCP.js b/scripts/x2RLUUNB7BiIDYCP.js deleted file mode 100644 index 1f2d040..0000000 --- a/scripts/x2RLUUNB7BiIDYCP.js +++ /dev/null @@ -1,16 +0,0 @@ - - let difficulty = "" - if (this.effect.name.includes("Modéré")) - difficulty = "easy" - else if (this.effect.name.includes("Sévère")) - difficulty = "average" - else - difficulty = "veasy" - - let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {context : {failure : this.actor.name + " dies from Blight"}, fields: {difficulty}, skipTargets: true, appendTitle : " - Blight"}) - await test.roll(); - if (test.failed) - { - this.actor.addCondition("dead"); - } - \ No newline at end of file diff --git a/scripts/x76tKw4L8dX00ikE.js b/scripts/x76tKw4L8dX00ikE.js index c98eddb..38885c9 100644 --- a/scripts/x76tKw4L8dX00ikE.js +++ b/scripts/x76tKw4L8dX00ikE.js @@ -1,5 +1,5 @@ let item = await fromUuid("Compendium.wfrp4e-core.items.uqGxFOEqeurwkAO3") let data = item.toObject(); -setProperty(data, "flags.wfrp4e.breath", "fire") +foundry.utils.setProperty(data, "flags.wfrp4e.breath", "fire") data.system.specification.value = 5 this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/scripts/x8XK2fzzXCnSwfjt.js b/scripts/x8XK2fzzXCnSwfjt.js deleted file mode 100644 index d42e514..0000000 --- a/scripts/x8XK2fzzXCnSwfjt.js +++ /dev/null @@ -1,7 +0,0 @@ -let test = await this.actor.setupSkill(game.i18n.localize("NAME.Athletics")) -await test.roll(); - -if (test.succeeded) -{ - this.actor.removeCondition("prone"); -} \ No newline at end of file diff --git a/scripts/x9iKFYYc4Ocy8PTS.js b/scripts/x9iKFYYc4Ocy8PTS.js index 88ca8b1..d5daf12 100644 --- a/scripts/x9iKFYYc4Ocy8PTS.js +++ b/scripts/x9iKFYYc4Ocy8PTS.js @@ -1,11 +1,11 @@ let item = this.effect.getCreatedItems()?.[0]; -ChatMessage.create({content : "La grâce est au delà du style", speaker : ChatMessage.getSpeaker({token: this.actor.getActiveTokens()[0]?.document, actor: this.actor})}, {chatBubble : true}) +ChatMessage.create({content : "La grâce dépasse le style", speaker : ChatMessage.getSpeaker({token: this.actor.getActiveTokens()[0]?.document, actor: this.actor})}, {chatBubble : true}) let choice = await ItemDialog.create(ItemDialog.objectToArray({ "nobles" : "Nobles", - "guilders" : "Maitres de Guildes", + "guilders" : "Membres de Guilde", "servants" : "Serviteurs" -}), 1, "Choisissez un groupes") +}), 1, "Choisir Group") let name = choice[0]?.name @@ -17,11 +17,11 @@ if (!name) if (item) { item.update({ - name : item.name.split("(")[0] + ` (${name})`, + name : item.name.split("(")[0] + ` (${name})`, "system.tests.value" : item.system.tests.value.split("(")[0] + ` (${name}` }) } -else +else { item = await fromUuid("Compendium.wfrp4e-core.items.Item.sYbgpSnRqSZWgwFP"); let data = item.toObject(); diff --git a/scripts/xBpLQa7yBPczDMY8.js b/scripts/xBpLQa7yBPczDMY8.js index dd7547f..6977873 100644 --- a/scripts/xBpLQa7yBPczDMY8.js +++ b/scripts/xBpLQa7yBPczDMY8.js @@ -1,7 +1,7 @@ let scythe = (await fromUuid("Compendium.wfrp4e-core.items.CXg7XOFJwu4LZ9LM")).toObject(); - scythe.name = "Scythe of Shyish"; + scythe.name = "La Faux de Shyish"; scythe.system.damage.value = "WPB + 3" scythe.system.equipped = true; - scythe.img = this.effect.icon; + scythe.img = this.effect.img; scythe.system.qualities.value.push({name : "magical"}) this.actor.createEmbeddedDocuments("Item", [scythe], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/scripts/xEE0ymsaH2tn2M99.js b/scripts/xEE0ymsaH2tn2M99.js new file mode 100644 index 0000000..3761cf0 --- /dev/null +++ b/scripts/xEE0ymsaH2tn2M99.js @@ -0,0 +1 @@ +return args.type != "cast"; \ No newline at end of file diff --git a/scripts/xJZKVGE04o84Gibo.js b/scripts/xJZKVGE04o84Gibo.js new file mode 100644 index 0000000..7ebacd7 --- /dev/null +++ b/scripts/xJZKVGE04o84Gibo.js @@ -0,0 +1,3 @@ +if (!this.item.actor.name.includes("Brunner")) return; + +args.item.system.damage.value += "+1"; \ No newline at end of file diff --git a/scripts/xRd6oA1QWLVpfoBm.js b/scripts/xRd6oA1QWLVpfoBm.js deleted file mode 100644 index 9b5f8dd..0000000 --- a/scripts/xRd6oA1QWLVpfoBm.js +++ /dev/null @@ -1,6 +0,0 @@ -if (!this.actor.has("Vision Nocturne")) -{ - let item = await fromUuid("Compendium.wfrp4e-core.items.FmHDbCOy3pH8yKhm"); - let data = item.toObject(); - this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}) -} \ No newline at end of file diff --git a/scripts/xS2su09zcza9du09.js b/scripts/xS2su09zcza9du09.js deleted file mode 100644 index 8986241..0000000 --- a/scripts/xS2su09zcza9du09.js +++ /dev/null @@ -1,8 +0,0 @@ -if ([game.i18n.localize("CORRUPTION.Minor"), game.i18n.localize("CORRUPTION.Moderate"), game.i18n.localize("CORRUPTION.Major")].includes(this.item.system.specification.value)) -{ - return -} - -let choice = await ItemDialog.create(ItemDialog.objectToArray({minor : game.i18n.localize("CORRUPTION.Minor"), moderate : game.i18n.localize("CORRUPTION.Moderate"), major : game.i18n.localize("CORRUPTION.Major")}, this.item.img), 1, "Choisissez Corruption Severity"); - -this.item.updateSource({"system.specification.value" : choice[0]?.name || ""}) \ No newline at end of file diff --git a/scripts/xUpKYT7BZCSmAfUy.js b/scripts/xUpKYT7BZCSmAfUy.js index 02c1ec7..8ee7b5f 100644 --- a/scripts/xUpKYT7BZCSmAfUy.js +++ b/scripts/xUpKYT7BZCSmAfUy.js @@ -6,5 +6,5 @@ if (this.item.system.quantity.value) } else { - this.script.scriptNotification("Quantité insuffisante!", "error") + this.script.notification("Plus rien !", "error") } \ No newline at end of file diff --git a/scripts/xVYVegD692CCv8Yl.js b/scripts/xVYVegD692CCv8Yl.js deleted file mode 100644 index 54e7927..0000000 --- a/scripts/xVYVegD692CCv8Yl.js +++ /dev/null @@ -1,12 +0,0 @@ -let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {fields : {difficulty : "hard"}, appendTitle : ` - ${this.effect.name}`}) -await test.roll(); - -let newFortune = Math.max(0, this.actor.status.fortune.value - 1) -this.actor.update({ "system.status.fortune.value": newFortune }); - -if (test.failed) -{ - let char = this.effect.sourceActor.characteristics; - let duration = Math.floor((char.wp.initial + char.wp.advances)/10) ; - this.script.scriptMessage("Voleur du Destin a été appliqué à " + duration + " days"); -} \ No newline at end of file diff --git a/scripts/xWPgIZOQLba5nZ23.js b/scripts/xWPgIZOQLba5nZ23.js deleted file mode 100644 index 0e0672c..0000000 --- a/scripts/xWPgIZOQLba5nZ23.js +++ /dev/null @@ -1,14 +0,0 @@ -let nbFatigue = 1 + Number(this.effect.sourceTest.result.SL); -this.actor.addCondition("fatigued", nbFatigue); - -let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {fields : {difficulty : "hard"}, appendTitle : ` - ${this.effect.name}`}) -await test.roll(); - -if (test.succeeded) -{ - this.script.scriptNotification(this.actor.name + "a résisté !") -} -else if (test.failed) -{ - this.actor.addCondition("unconscious", 1); -} \ No newline at end of file diff --git a/scripts/xcny1zYAphdfrKv9.js b/scripts/xcny1zYAphdfrKv9.js new file mode 100644 index 0000000..74be082 --- /dev/null +++ b/scripts/xcny1zYAphdfrKv9.js @@ -0,0 +1 @@ +args.fields.modifier -=20; \ No newline at end of file diff --git a/scripts/xgplXZMs459X7XXM.js b/scripts/xgplXZMs459X7XXM.js index 92309e0..7dd311d 100644 --- a/scripts/xgplXZMs459X7XXM.js +++ b/scripts/xgplXZMs459X7XXM.js @@ -1,20 +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}.${await this.actor.applyBasicDamage(8, {loc : "roll", suppressMsg: tr msg += `
${await this.actor.applyBasicDamage(8, {loc : "roll", suppressMsg: true, hideDSN: true})}
` msg += `${await this.actor.applyBasicDamage(8, {loc : "roll", suppressMsg: true, hideDSN: true})}
` -this.script.scriptMessage(msg); \ No newline at end of file +this.script.message(msg); \ No newline at end of file diff --git a/scripts/ynoHNXXCGRS6fTqF.js b/scripts/ynoHNXXCGRS6fTqF.js index 901593f..1a156fe 100644 --- a/scripts/ynoHNXXCGRS6fTqF.js +++ b/scripts/ynoHNXXCGRS6fTqF.js @@ -7,7 +7,7 @@ if (args.actor.characteristics.i.value <= 0) i_gain += (await new Roll("2d10").roll()).total } -msg = `${this.actor.prototypeToken.name} gagne ${i_gain} en Initiative` +msg = `${this.actor.prototypeToken.name} gagne ${i_gain} Initiative` let newValue = i_gain + args.actor.characteristics.i.modifier @@ -19,8 +19,8 @@ let hitloc = await game.wfrp4e.tables.rollTable("hitloc") let value = hitloc.result let desc = hitloc.description -this.effect.updateSource({"flags.wfrp4e.location" : value}) +this.effet.updateSource({"flags.wfrp4e.location" : value}) -msg += ` as eyes push out of their ${desc}` +msg += ` alors que des yeux sortent de leur ${desc}` -this.script.scriptMessage(msg) \ No newline at end of file +this.script.message(msg) \ No newline at end of file diff --git a/scripts/yvtF2t9aibxibAIM.js b/scripts/yvtF2t9aibxibAIM.js new file mode 100644 index 0000000..fb61990 --- /dev/null +++ b/scripts/yvtF2t9aibxibAIM.js @@ -0,0 +1,14 @@ +const test = await this.actor.setupSkill(game.i18n.localize("NAME.Perception"), { + skipTargets: true, + appendTitle: ` — ${this.effect.name}`, + fields: {difficulty: "challenging"}, + context: { + failure: `Gain de l'état @Condition[Prone].`, + success: `Capable de bouger.` + } +}); + +await test.roll(); + +if (test.failed) + this.actor.addCondition("prone"); \ No newline at end of file diff --git a/scripts/yzN7ZNlgCiSVJqsU.js b/scripts/yzN7ZNlgCiSVJqsU.js index 1e442ba..c9e28c0 100644 --- a/scripts/yzN7ZNlgCiSVJqsU.js +++ b/scripts/yzN7ZNlgCiSVJqsU.js @@ -3,5 +3,5 @@ let sourceItem = this.effect.sourceItem; if (sourceItem) { this.actor.applyEffect({effectUuids : [sourceItem.effects.contents[1].uuid]}) - this.script.scriptNotification("Appliqué après les effets"); + this.script.notification("Effets secondaires appliqués"); } \ No newline at end of file diff --git a/scripts/z5HfNUrHy5MS3K7a.js b/scripts/z5HfNUrHy5MS3K7a.js deleted file mode 100644 index 6abff4e..0000000 --- a/scripts/z5HfNUrHy5MS3K7a.js +++ /dev/null @@ -1,7 +0,0 @@ -let test = await this.actor.setupSkill(game.i18n.localize("NAME.Cool"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, 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("Reçoit un Point de Corruption", {whisper : ChatMessage.getWhisperRecipients("GM")}) -} \ No newline at end of file diff --git a/scripts/z8W5PAwBR0PXY6ty.js b/scripts/z8W5PAwBR0PXY6ty.js new file mode 100644 index 0000000..33a910d --- /dev/null +++ b/scripts/z8W5PAwBR0PXY6ty.js @@ -0,0 +1,3 @@ + await args.actor.addCondition("ablaze"); + await args.actor.addCondition("blinded"); + await args.actor.addCondition("poisoned", 2); \ No newline at end of file diff --git a/scripts/z8mwLihZQu0JtUHY.js b/scripts/z8mwLihZQu0JtUHY.js index 3d27465..9118076 100644 --- a/scripts/z8mwLihZQu0JtUHY.js +++ b/scripts/z8mwLihZQu0JtUHY.js @@ -11,15 +11,15 @@ let characteristics = { "wp" : 70, "fel" : 20 } -let skills = ["Focalisation", "Calme", "Intimidation", "Langue (Magick)", "Langue (Nehekharan)", "Commandement", "Savoir (Magie)", "Perception"] +let skills = ["Focalisation", "Calme", "Intimidation", "Langue (Magick)", "Language (Nehekharan)", "Commandement", "Savoir (Magie)", "Perception"] let skillAdvancements = [20, 30, 25, 30, 20, 20, 30, 20] -let talents = ["Harmonisation Aethyrique", "Magie des Arcanes", "Dur à cuire", "Diction Instinctive", "Sens de la Magie", "Menaçant", "Menaçant", "Magie Mineure", "Lire/Ecrire", "Seconde Vue", "Mage de Guerre"] -let trappings = ["Arme Simple"] +let talents = ["Harmonisation Aethyrique", "Magie des Arcanes (Domaine)", "Dur à cuire", "Diction Instinctive", "Perception de la magie", "Menaçant", "Menaçant", "Magie Mineure", "Lire/Écrire", "Seconde Vue", "Mage de guerre"] +let trappings = ["Arme simple"] let specialItems = [ - {name: "Robes", type: "trapping", trappingType: "clothingAccessories" }, - {name: "Bourse contenant des composants de Rituels", type: "trapping", trappingType: "clothingAccessories" }, - {name: "Bâton", type: "weapon", damage: "SB+2"}, - {name: "Magie sombre (Necromancie)", type: "talent"}, + {name: "Mouldering Robes", type: "trapping", trappingType: "clothingAccessories" }, + {name: "Pouches containing ritual components", type: "trapping", trappingType: "clothingAccessories" }, + {name: "Staff", type: "weapon", damage: "SB+2"}, + {name: "Magie Noire (Nécromancie)", type: "talent"}, ] let items = []; @@ -33,11 +33,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()) } @@ -67,7 +67,7 @@ for (let talent of talents) } else { - ui.notifications.warn(`Impossible de trouver ${talent}`, {permanent : true}) + ui.notifications.warn(`Could not find ${talent}`, {permanent : true}) } } @@ -84,11 +84,11 @@ for (let trapping of trappings) } 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) console.log(">>>>>>><", items) diff --git a/scripts/zA6TDttpwMSMl7D8.js b/scripts/zA6TDttpwMSMl7D8.js deleted file mode 100644 index ab9ff3b..0000000 --- a/scripts/zA6TDttpwMSMl7D8.js +++ /dev/null @@ -1,14 +0,0 @@ -// An imbiber must take a Consume Alcohol Test. -this.actor.setupSkill(game.i18n.localize("NAME.ConsumeAlcohol"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`}).then(async test => { - await test.roll() - // If they succeed, - // as a result of whatever potential futures they glimpse, - // they can spend a Fortune Point within the next hour to reverse the dice of any failed Test. - if (test.succeeded) { - this.script.scriptMessage(`En raison des futurs potentiels entrevus, ${this.actor.prototypeToken.name} peut dépenser un Point de Chance durant la prochaine heure pour inverser le résultat d'un test échoué.`, - { - whisper: ChatMessage.getWhisperRecipients("GM"), - blind: true - }) - } -}) \ No newline at end of file diff --git a/scripts/zF1IKmobCB8ea58M.js b/scripts/zF1IKmobCB8ea58M.js new file mode 100644 index 0000000..dc8663b --- /dev/null +++ b/scripts/zF1IKmobCB8ea58M.js @@ -0,0 +1 @@ +return this.sourceActor.uuid === this.actor.uuid || !["ws", "ag"].includes(args.characteristic); \ No newline at end of file diff --git a/scripts/zFYCaGR0wbFWjl4T.js b/scripts/zFYCaGR0wbFWjl4T.js deleted file mode 100644 index fbb0202..0000000 --- a/scripts/zFYCaGR0wbFWjl4T.js +++ /dev/null @@ -1 +0,0 @@ -return args.skill?.name != game.i18n.localize("NAME.OutdoorSurvival"); \ No newline at end of file diff --git a/scripts/zGwtyjTUBeSQ110p.js b/scripts/zGwtyjTUBeSQ110p.js new file mode 100644 index 0000000..31d379b --- /dev/null +++ b/scripts/zGwtyjTUBeSQ110p.js @@ -0,0 +1,17 @@ +if (args.opposedTest.attackerTest.preData.charging) +{ + let mostProtectedLoc; + let mostProtectedValue = 0; + for (let loc in this.actor.status.armour) + { + if (this.actor.status.armour[loc].value != undefined && this.actor.status.armour[loc].value > mostProtectedValue) + { + mostProtectedLoc = loc; + mostProtectedValue = this.actor.status.armour[loc].value; + } + } + if (mostProtectedValue) + { + args.modifiers.other.push({label: this.effect.name, value : mostProtectedValue}); + } +} \ No newline at end of file diff --git a/scripts/zI5hXv2NLGWqnmDD.js b/scripts/zI5hXv2NLGWqnmDD.js new file mode 100644 index 0000000..dace8a6 --- /dev/null +++ b/scripts/zI5hXv2NLGWqnmDD.js @@ -0,0 +1,4 @@ +if (args.totalWoundLoss > 0) +{ + args.actor.applyEffect({effectUuids : this.item.effects.contents[0].uuid}) +} \ No newline at end of file diff --git a/scripts/zIErcRiBmIZRbary.js b/scripts/zIErcRiBmIZRbary.js new file mode 100644 index 0000000..3adc036 --- /dev/null +++ b/scripts/zIErcRiBmIZRbary.js @@ -0,0 +1,8 @@ +if (args.test.failed) + { + let applicableCharacteristics = ["ws", "bs", "s", "fel", "ag", "t", "dex"]; + if (applicableCharacteristics.includes(args.test.characteristicKey)) + { + this.actor.addCondition("stunned"); + } + } \ No newline at end of file diff --git a/scripts/zIpl3SkWv8zzlr2D.js b/scripts/zIpl3SkWv8zzlr2D.js index 1eca94a..0a406db 100644 --- a/scripts/zIpl3SkWv8zzlr2D.js +++ b/scripts/zIpl3SkWv8zzlr2D.js @@ -9,7 +9,7 @@ let filters = [ } ] -let petty = (await ItemDialog.createFromFilters(filters, 4, "Choisissez 4 sorts de Magie Mineure")).map(i => i.toObject()); +let petty = (await ItemDialog.createFromFilters(filters, 4, {text : "Choisissez 4 Sorts Mineurs"})).map(i => i.toObject()); filters = [ @@ -23,7 +23,7 @@ filters = [ } ] -let arcane = (await ItemDialog.createFromFilters(filters, 8, "Choisissez 8 Sorts d'Arcane & du Domaine de la Mort")).map(i => i.toObject()); +let arcane = (await ItemDialog.createFromFilters(filters, 8, {text : "Choisissez 8 Sorts d'Arcane et Savoir de la Mort"})).map(i => i.toObject()); filters = [ { @@ -41,7 +41,7 @@ filters = [ } ] -let necromancy = (await ItemDialog.createFromFilters(filters, 3, "Choisissez 3 sorts du Domaine de la Nécromancie")).map(i => i.toObject()); +let necromancy = (await ItemDialog.createFromFilters(filters, 3, {text : "Choisissez 3 dans le Savoir de Nécromancie"})).map(i => i.toObject()); let items = [...necromancy, ...petty, ...arcane] diff --git a/scripts/zK38Rl5t9zbFi4Se.js b/scripts/zK38Rl5t9zbFi4Se.js index 8638ea5..132048b 100644 --- a/scripts/zK38Rl5t9zbFi4Se.js +++ b/scripts/zK38Rl5t9zbFi4Se.js @@ -1,5 +1,5 @@ if (args.opposedTest.result.hitloc.value == this.item.system.location.key && args.totalWoundLoss > 0) { args.actor.addCondition("bleeding", 1); - this.script.scriptNotification("Ajout d'Hemorragique") + this.script.notification("Hémorragique ajouté") } \ No newline at end of file diff --git a/scripts/zL7ECmBBMAqf5Esn.js b/scripts/zL7ECmBBMAqf5Esn.js index b205bb2..df08d1e 100644 --- a/scripts/zL7ECmBBMAqf5Esn.js +++ b/scripts/zL7ECmBBMAqf5Esn.js @@ -1,4 +1,4 @@ -let hasMagazine = await Dialog.confirm({content: "Does the vessel have a magazine or any other kind of store for blackpowder?
"}); +let hasMagazine = await foundry.applications.api.DialogV2.confirm({window : {title : this.effect.name}, content: "Le navire a-t-il un magasin ou tout autre type de réserve pour la poudre noire ?
"}); if (!hasMagazine) return; @@ -27,4 +27,4 @@ for (let i = 0; i < roll.total; i++) { const items = await this.actor.createEmbeddedDocuments("Item", crits); const speaker = ChatMessage.getSpeaker({actor: this.actor}); const uuids = items.map(i => `@UUID[${i.uuid}]`); -this.script.scriptMessage(`${this.item.name} caused an additional ${anchor.outerHTML} Critical Hits to the Hull!
${this.item.name} provoque un nombre supplémentaire de ${anchor.outerHTML} Coups Critiques à la Coque!
Réparation finie ${this.item.name}.
`; -const test = 'Voile'; +const repaired_message = `Réparation terminée ${this.item.name}.
`; +const Test = 'Voile'; const difficulty = 'challenging'; 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/zY4ZjY7uyKIKMYmX.js b/scripts/zY4ZjY7uyKIKMYmX.js deleted file mode 100644 index 10f3700..0000000 --- a/scripts/zY4ZjY7uyKIKMYmX.js +++ /dev/null @@ -1,8 +0,0 @@ -this.script.scriptMessage(await game.wfrp4e.tables.formatChatRoll("fleshy-curse")) - -let test = await this.actor.setupSkill(game.i18n.localize("NAME.Cool"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields : {difficulty : "hard"}}) -await test.roll(); -if (test.succeeded) -{ - this.effect.delete() -} \ No newline at end of file diff --git a/scripts/zadppy7FEbXvgUON.js b/scripts/zadppy7FEbXvgUON.js index a19fe6f..b16b2e4 100644 --- a/scripts/zadppy7FEbXvgUON.js +++ b/scripts/zadppy7FEbXvgUON.js @@ -12,8 +12,8 @@ } let skills = ["Perception", "Escamotage", "Discrétion (Urbaine)"] let skillAdvancements = [10, 10, 10] -let talents = ["Criminel", "Etiquette (Criminels)"] -let trappings = ["Corde, 10 mètres", "Outils de crochetage", "Masque"] +let talents = ["Criminel", "Etiquette (Criminals)"] +let trappings = ["Corde, 10 mètres", "Lockpick", "Masque"] 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/zasFOZohkrdFIBwr.js b/scripts/zasFOZohkrdFIBwr.js new file mode 100644 index 0000000..1a7830b --- /dev/null +++ b/scripts/zasFOZohkrdFIBwr.js @@ -0,0 +1,6 @@ +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/zdGAvfL7zJ7wpYxG.js b/scripts/zdGAvfL7zJ7wpYxG.js index 26d2e20..4bd596d 100644 --- a/scripts/zdGAvfL7zJ7wpYxG.js +++ b/scripts/zdGAvfL7zJ7wpYxG.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 = 'easy'; 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/zi8Z3NlwVj3IfgAW.js b/scripts/zi8Z3NlwVj3IfgAW.js index cfd8a70..e4803bc 100644 --- a/scripts/zi8Z3NlwVj3IfgAW.js +++ b/scripts/zi8Z3NlwVj3IfgAW.js @@ -6,5 +6,5 @@ if (this.item.system.quantity.value) } else { - this.script.scriptNotification("Quantité insuffisante!", "error") + this.script.notification("Plus rien !", "error") } \ No newline at end of file diff --git a/scripts/ziG9H5Kdb7xC3dFE.js b/scripts/ziG9H5Kdb7xC3dFE.js deleted file mode 100644 index 3d360af..0000000 --- a/scripts/ziG9H5Kdb7xC3dFE.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/zjTEhJuLcFVkzory.js b/scripts/zjTEhJuLcFVkzory.js new file mode 100644 index 0000000..c1056fc --- /dev/null +++ b/scripts/zjTEhJuLcFVkzory.js @@ -0,0 +1,9 @@ +if (!args.test.preData.options?.kingship) return + +if (!this.item.equipped.value || !args.test.item) return; +if ([game.i18n.localize("NAME.Charm"), + game.i18n.localize("NAME.Intimidate"), + game.i18n.localize("NAME.Leadership")].includes(args.test.item.name)) +{ + args.test.preData.canReverse = true +} \ No newline at end of file diff --git a/scripts/zsiV6XEHlCNGLLPl.js b/scripts/zsiV6XEHlCNGLLPl.js deleted file mode 100644 index 8911fdc..0000000 --- a/scripts/zsiV6XEHlCNGLLPl.js +++ /dev/null @@ -1 +0,0 @@ -return args.skill?.name == game.i18n.localize("NAME.SetTrap"); \ No newline at end of file diff --git a/scripts/zsoTVkHe4nHY1M52.js b/scripts/zsoTVkHe4nHY1M52.js index c227411..76736b7 100644 --- a/scripts/zsoTVkHe4nHY1M52.js +++ b/scripts/zsoTVkHe4nHY1M52.js @@ -1 +1 @@ -this.script.scriptMessage(await this.actor.applyBasicDamage(10 + parseInt(this.effect.sourceTest.result.SL), {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_AP})) \ No newline at end of file +this.script.message(await this.actor.applyBasicDamage(10 + parseInt(this.effect.sourceTest.result.SL), {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_AP})) \ No newline at end of file diff --git a/scripts/zxG5KbliWE9xWNQD.js b/scripts/zxG5KbliWE9xWNQD.js index 2fb7824..72b5356 100644 --- a/scripts/zxG5KbliWE9xWNQD.js +++ b/scripts/zxG5KbliWE9xWNQD.js @@ -1,2 +1,2 @@ -this.script.message("Passe automatiquement n'importe quel " + this.script.label); +this.script.message("Réussit automatiquement tout " + this.script.label); args.abort = true; \ No newline at end of file diff --git a/scripts/zzk2uRSFjFHB5kjw.js b/scripts/zzk2uRSFjFHB5kjw.js deleted file mode 100644 index b9b36c2..0000000 --- a/scripts/zzk2uRSFjFHB5kjw.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("Misfire Roll: " + roll) \ No newline at end of file diff --git a/tools/GPUCache/data_0 b/tools/GPUCache/data_0 deleted file mode 100644 index d76fb77..0000000 Binary files a/tools/GPUCache/data_0 and /dev/null differ diff --git a/tools/GPUCache/data_1 b/tools/GPUCache/data_1 deleted file mode 100644 index d124210..0000000 Binary files a/tools/GPUCache/data_1 and /dev/null differ diff --git a/tools/GPUCache/data_2 b/tools/GPUCache/data_2 deleted file mode 100644 index c7e2eb9..0000000 Binary files a/tools/GPUCache/data_2 and /dev/null differ diff --git a/tools/GPUCache/data_3 b/tools/GPUCache/data_3 deleted file mode 100644 index 5eec973..0000000 Binary files a/tools/GPUCache/data_3 and /dev/null differ diff --git a/tools/GPUCache/index b/tools/GPUCache/index deleted file mode 100644 index 8331922..0000000 Binary files a/tools/GPUCache/index and /dev/null differ diff --git a/tools/analyze-english-terms.js b/tools/analyze-english-terms.js new file mode 100644 index 0000000..4278e5f --- /dev/null +++ b/tools/analyze-english-terms.js @@ -0,0 +1,100 @@ +import fs from 'fs'; + +// Lire le fichier JSON +const jsonData = JSON.parse(fs.readFileSync('./compendium/wfrp4e-core.items.json', 'utf8')); +const frJson = JSON.parse(fs.readFileSync('./fr.json', 'utf8')); + +// Chercher les termes en anglais (labels et titres courts) +const englishTerms = new Set(); +const termOccurrences = {}; + +// Parcourir les entrées +jsonData.entries.forEach(entry => { + // Vérifier le champ 'name' pour des patterns entre parenthèses + if (entry.name && entry.name.includes('(') && entry.name.includes(')')) { + const matches = entry.name.matchAll(/\(([^)]+)\)/g); + + for (const match of matches) { + const parenthesisContent = match[1]; + + // Liste de termes français connus à exclure + const frenchTerms = [ + 'Mineure', 'Majeure', 'Accessible', 'Complexe', 'Difficile', + 'Facile', 'Intermédiaire', 'Type', 'Domaine', 'Arme de jet', + 'Arme de mêlée', 'Compétence avancée', 'Compétence de base' + ]; + + // Détecter si c'est potentiellement de l'anglais + // - Contient des mots anglais courants (et, the, or, of) + // - Ne contient pas de caractères français (é, è, à, ô, etc.) + const hasEnglishWords = /\b(and|the|or|of|to|in|a|is)\b/i.test(parenthesisContent); + const hasNoFrenchChars = !/[àâäéèêëïîôùûüÿæœç]/i.test(parenthesisContent); + const notInFrenchList = !frenchTerms.some(term => + parenthesisContent.toLowerCase().includes(term.toLowerCase()) + ); + + if ((hasEnglishWords || (hasNoFrenchChars && notInFrenchList)) && + parenthesisContent.length > 2) { + englishTerms.add(parenthesisContent); + + if (!termOccurrences[parenthesisContent]) { + termOccurrences[parenthesisContent] = []; + } + + termOccurrences[parenthesisContent].push({ + id: entry.id, + name: entry.name + }); + } + } + } +}); + +// Afficher les résultats +console.log('Termes anglais détectés dans les noms (entre parenthèses):'); +console.log('==========================================================\n'); + +const sortedTerms = Array.from(englishTerms).sort(); +sortedTerms.forEach(term => { + console.log(`${term} (${termOccurrences[term].length} occurrence(s)):`); + termOccurrences[term].slice(0, 3).forEach(occ => { + console.log(` - ${occ.id}: ${occ.name}`); + }); + if (termOccurrences[term].length > 3) { + console.log(` ... et ${termOccurrences[term].length - 3} autres`); + } + console.log(''); +}); + +console.log(`\nTotal: ${englishTerms.size} termes anglais différents détectés`); + +// Chercher aussi dans d'autres champs +console.log('\n\nAnalyse des autres champs potentiels...'); +console.log('========================================\n'); + +// Chercher des labels courts en anglais dans tous les champs +const fieldsToCheck = ['type', 'special', 'description']; +const englishInFields = {}; + +jsonData.entries.slice(0, 20).forEach(entry => { + Object.keys(entry).forEach(key => { + if (typeof entry[key] === 'string' && entry[key].length < 50) { + const value = entry[key]; + // Détecter des mots anglais courants + if (/\b(Rating|Target|Group|Feature|Type|Level|Rank)\b/.test(value)) { + if (!englishInFields[key]) { + englishInFields[key] = new Set(); + } + englishInFields[key].add(value); + } + } + }); +}); + +Object.keys(englishInFields).forEach(field => { + console.log(`Champ '${field}':`); + englishInFields[field].forEach(value => { + console.log(` - "${value}"`); + }); + console.log(''); +}); diff --git a/tools/apply-sync.js b/tools/apply-sync.js new file mode 100644 index 0000000..de0432f --- /dev/null +++ b/tools/apply-sync.js @@ -0,0 +1,157 @@ +import fs from 'node:fs'; +import path from 'node:path'; +import { fileURLToPath } from 'node:url'; + +const __dirname = path.dirname(fileURLToPath(import.meta.url)); +const WFRP4E_SCRIPTS = '/home/morr/work/foundryvtt/WFRP4e-FoundryVTT/scripts'; +const FR_SCRIPTS = '/home/morr/work/foundryvtt/foundryvtt-wh4-lang-fr-fr/scripts'; +const DATA_FILE = path.join(__dirname, 'script-comparison-data.json'); +const LOG_FILE = path.join(__dirname, 'sync-scripts-log.txt'); + +// Charger les résultats de l'analyse +const data = JSON.parse(fs.readFileSync(DATA_FILE, 'utf-8')); + +const log = []; + +function writeLog(message) { + console.log(message); + log.push(message); +} + +function deleteObsoleteScripts() { + writeLog('\n=== SUPPRESSION DES SCRIPTS OBSOLÈTES ===\n'); + + let deleted = 0; + data.usesLocalize.forEach(({file}) => { + const filePath = path.join(FR_SCRIPTS, file); + if (fs.existsSync(filePath)) { + fs.unlinkSync(filePath); + deleted++; + writeLog(`✓ Supprimé: ${file}`); + } + }); + + writeLog(`\nTotal supprimés: ${deleted}/${data.usesLocalize.length}`); + return deleted; +} + +function copyNewScripts() { + writeLog('\n=== COPIE DES NOUVEAUX SCRIPTS ===\n'); + + let copied = 0; + data.onlyInWFRP4E.forEach(file => { + const sourcePath = path.join(WFRP4E_SCRIPTS, file); + const destPath = path.join(FR_SCRIPTS, file); + + if (fs.existsSync(sourcePath)) { + fs.copyFileSync(sourcePath, destPath); + copied++; + writeLog(`✓ Copié: ${file}`); + } else { + writeLog(`✗ Source non trouvée: ${file}`); + } + }); + + writeLog(`\nTotal copiés: ${copied}/${data.onlyInWFRP4E.length}`); + return copied; +} + +function deleteRemovedScripts() { + writeLog('\n=== SUPPRESSION DES SCRIPTS RETIRÉS ===\n'); + + let deleted = 0; + data.onlyInFR.forEach(file => { + const filePath = path.join(FR_SCRIPTS, file); + if (fs.existsSync(filePath)) { + fs.unlinkSync(filePath); + deleted++; + writeLog(`✓ Supprimé (n'existe plus dans WFRP4E): ${file}`); + } + }); + + writeLog(`\nTotal supprimés: ${deleted}/${data.onlyInFR.length}`); + return deleted; +} + +function updateScripts() { + writeLog('\n=== MISE À JOUR DES SCRIPTS ===\n'); + writeLog('Ces scripts ont été modifiés dans WFRP4E mais contiennent peut-être des traductions FR.'); + writeLog('Ils nécessitent une révision manuelle.\n'); + + let updated = 0; + let needsReview = []; + + data.needsUpdate.forEach(item => { + const wfrp4ePath = path.join(WFRP4E_SCRIPTS, item.file); + const frPath = path.join(FR_SCRIPTS, item.file); + + const wfrp4eContent = fs.readFileSync(wfrp4ePath, 'utf-8'); + const frContent = fs.readFileSync(frPath, 'utf-8'); + + // Vérifier si le script FR contient des textes en français + const hasFrenchText = /["'`](Chargement|Impossible|Voulez-vous|Êtes-vous|créé|modifié|supprimé)/i.test(frContent); + + if (hasFrenchText) { + // Script avec traductions, nécessite révision manuelle + needsReview.push({ + file: item.file, + reason: 'Contient des textes traduits en français' + }); + writeLog(`⚠ RÉVISION NÉCESSAIRE: ${item.file} (contient des traductions)`); + } else { + // Pas de traductions détectées, on peut mettre à jour automatiquement + fs.copyFileSync(wfrp4ePath, frPath); + updated++; + writeLog(`✓ Mis à jour: ${item.file}`); + } + }); + + writeLog(`\nTotal mis à jour automatiquement: ${updated}`); + writeLog(`Total nécessitant révision: ${needsReview.length}`); + + // Créer un fichier avec la liste des scripts à réviser + if (needsReview.length > 0) { + const reviewFile = path.join(__dirname, 'scripts-to-review.json'); + fs.writeFileSync(reviewFile, JSON.stringify(needsReview, null, 2), 'utf-8'); + writeLog(`\nListe des scripts à réviser sauvegardée dans: ${reviewFile}`); + } + + return {updated, needsReview: needsReview.length}; +} + +// Programme principal +writeLog('='.repeat(60)); +writeLog('SYNCHRONISATION DES SCRIPTS WFRP4E'); +writeLog('='.repeat(60)); +writeLog(`Date: ${new Date().toISOString()}\n`); + +writeLog('Statistiques:'); +writeLog(` - Scripts identiques: ${data.identical.length}`); +writeLog(` - Scripts obsolètes (localize): ${data.usesLocalize.length}`); +writeLog(` - Scripts à mettre à jour: ${data.needsUpdate.length}`); +writeLog(` - Nouveaux scripts (WFRP4E): ${data.onlyInWFRP4E.length}`); +writeLog(` - Scripts à supprimer (FR): ${data.onlyInFR.length}`); + +// Demander confirmation +console.log('\nVoulez-vous continuer ? (appuyez sur Entrée pour continuer, Ctrl+C pour annuler)'); +// Pour l'automatisation, on continue directement +// En production, on utiliserait readline pour une confirmation interactive + +const obsoleteDeleted = deleteObsoleteScripts(); +const removedDeleted = deleteRemovedScripts(); +const newCopied = copyNewScripts(); +const {updated, needsReview} = updateScripts(); + +writeLog('\n' + '='.repeat(60)); +writeLog('RÉSUMÉ DES OPÉRATIONS'); +writeLog('='.repeat(60)); +writeLog(`Scripts obsolètes supprimés: ${obsoleteDeleted}`); +writeLog(`Scripts retirés supprimés: ${removedDeleted}`); +writeLog(`Nouveaux scripts copiés: ${newCopied}`); +writeLog(`Scripts mis à jour automatiquement: ${updated}`); +writeLog(`Scripts nécessitant révision manuelle: ${needsReview}`); +writeLog('='.repeat(60)); + +// Sauvegarder le log +fs.writeFileSync(LOG_FILE, log.join('\n'), 'utf-8'); +writeLog(`\nLog sauvegardé dans: ${LOG_FILE}`); diff --git a/tools/apply-translations.js b/tools/apply-translations.js new file mode 100644 index 0000000..23d5256 --- /dev/null +++ b/tools/apply-translations.js @@ -0,0 +1,78 @@ +import fs from 'fs'; +import path from 'path'; +import { fileURLToPath } from 'url'; + +const __filename = fileURLToPath(import.meta.url); +const __dirname = path.dirname(__filename); + +const FR_DIR = path.join(__dirname, 'scripts'); +const OPPORTUNITIES_FILE = path.join(__dirname, 'translation-opportunities.json'); + +// Charger les opportunités de traduction +const data = JSON.parse(fs.readFileSync(OPPORTUNITIES_FILE, 'utf8')); +const { reliableTranslations, opportunities } = data; + +// Fonction pour échapper les caractères spéciaux pour regex +function escapeRegExp(string) { + return string.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); +} + +// Statistiques +let stats = { + filesProcessed: 0, + filesModified: 0, + replacementsMade: 0, + errors: 0 +}; + +console.log('Application automatique des traductions...\n'); +console.log('='.repeat(60)); + +// Traiter chaque fichier avec des opportunités +opportunities.forEach(({ file, translations }) => { + const filePath = path.join(FR_DIR, file); + stats.filesProcessed++; + + try { + let content = fs.readFileSync(filePath, 'utf8'); + let modified = false; + let replacementsInFile = 0; + + // Appliquer chaque traduction + translations.forEach(({ en, fr }) => { + // Vérifier que la chaîne anglaise existe toujours dans le fichier + if (content.includes(en)) { + // Remplacement simple (pas de regex pour éviter les problèmes avec les caractères spéciaux) + const newContent = content.split(en).join(fr); + + if (newContent !== content) { + const count = (content.split(en).length - 1); + content = newContent; + modified = true; + replacementsInFile += count; + stats.replacementsMade += count; + } + } + }); + + // Sauvegarder si modifié + if (modified) { + fs.writeFileSync(filePath, content, 'utf8'); + stats.filesModified++; + console.log(`✓ ${file} : ${replacementsInFile} remplacement(s)`); + } + + } catch (error) { + stats.errors++; + console.error(`✗ ${file} : ${error.message}`); + } +}); + +console.log('\n' + '='.repeat(60)); +console.log('Application terminée !'); +console.log('='.repeat(60)); +console.log(`Fichiers traités : ${stats.filesProcessed}`); +console.log(`Fichiers modifiés : ${stats.filesModified}`); +console.log(`Remplacements effectués : ${stats.replacementsMade}`); +console.log(`Erreurs : ${stats.errors}`); +console.log('='.repeat(60)); diff --git a/tools/auto-merge-translations.js b/tools/auto-merge-translations.js new file mode 100644 index 0000000..2c29052 --- /dev/null +++ b/tools/auto-merge-translations.js @@ -0,0 +1,116 @@ +import fs from 'node:fs'; +import path from 'node:path'; +import { fileURLToPath } from 'node:url'; + +const __dirname = path.dirname(fileURLToPath(import.meta.url)); +const WFRP4E_SCRIPTS = '/home/morr/work/foundryvtt/WFRP4e-FoundryVTT/scripts'; +const FR_SCRIPTS = '/home/morr/work/foundryvtt/foundryvtt-wh4-lang-fr-fr/scripts'; +const REVIEW_FILE = path.join(__dirname, 'scripts-to-review.json'); + +const scriptsToReview = JSON.parse(fs.readFileSync(REVIEW_FILE, 'utf-8')); + +// Dictionnaire de traductions courantes +const translations = { + 'Loading Spells': 'Chargement des sorts', + 'Loading': 'Chargement', + 'Could not find': 'Impossible de trouver', + 'Try Again': 'Essayez à nouveau', + 'Error': 'Erreur', + 'Success': 'Succès', + 'Warning': 'Avertissement', + 'Created': 'Créé', + 'Modified': 'Modifié', + 'Deleted': 'Supprimé', + 'Are you sure': 'Êtes-vous sûr', + 'Do you want': 'Voulez-vous', + 'Cancel': 'Annuler', + 'Confirm': 'Confirmer', + 'Yes': 'Oui', + 'No': 'Non' +}; + +function translateText(text) { + // Remplacer les traductions connues + let translated = text; + for (const [en, fr] of Object.entries(translations)) { + translated = translated.replace(new RegExp(en, 'g'), fr); + } + return translated; +} + +function mergeScript(wfrp4eContent, frContent) { + // Commence avec la version WFRP4E (à jour) + let merged = wfrp4eContent; + + // Extraire les textes traduits du script FR + const frTexts = new Map(); + const textPattern = /["'`]([^"'`]+)["'`]/g; + + let match; + while ((match = textPattern.exec(frContent)) !== null) { + const text = match[1]; + // Si le texte contient des mots français caractéristiques + if (/Chargement|Impossible|Êtes-vous|Voulez-vous|créé|modifié|supprimé|Erreur/i.test(text)) { + // Chercher le texte anglais correspondant dans WFRP4E + const enMatch = wfrp4eContent.match(new RegExp(`["'\`]([^"'\`]*${text.split(' ')[0]}[^"'\`]*)["'\`]`)); + if (enMatch) { + frTexts.set(enMatch[1], text); + } + } + } + + // Appliquer les traductions connues + for (const [en, fr] of frTexts.entries()) { + merged = merged.replace(new RegExp(`["'\`]${en.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')}["'\`]`, 'g'), `"${fr}"`); + } + + // Appliquer le dictionnaire de traductions + for (const [en, fr] of Object.entries(translations)) { + merged = merged.replace(new RegExp(`["'\`]${en}["'\`]`, 'g'), `"${fr}"`); + } + + // Cas spéciaux pour les template literals + merged = merged.replace(/`Could not find \$\{([^}]+)\} spell\. Try Again`/g, '`Impossible de trouver le sort ${$1}. Essayez à nouveau`'); + + return merged; +} + +console.log('Révision semi-automatique des scripts...\n'); + +let updated = 0; +let skipped = 0; + +scriptsToReview.forEach(({file}) => { + const wfrp4ePath = path.join(WFRP4E_SCRIPTS, file); + const frPath = path.join(FR_SCRIPTS, file); + const backupPath = frPath + '.backup'; + + const wfrp4eContent = fs.readFileSync(wfrp4ePath, 'utf-8'); + const frContent = fs.readFileSync(frPath, 'utf-8'); + + // Sauvegarder l'original + fs.copyFileSync(frPath, backupPath); + + // Tenter la fusion + const merged = mergeScript(wfrp4eContent, frContent); + + // Vérifier si des traductions ont été préservées + const hasTranslations = /Chargement|Impossible|Êtes-vous|Voulez-vous|créé|modifié|supprimé|Erreur/i.test(merged); + + if (hasTranslations) { + fs.writeFileSync(frPath, merged, 'utf-8'); + updated++; + console.log(`✓ Mis à jour avec traductions: ${file}`); + } else { + // Restaurer l'original si aucune traduction n'a été préservée + fs.copyFileSync(backupPath, frPath); + skipped++; + console.log(`⚠ Révision manuelle requise: ${file}`); + } +}); + +console.log(`\n=== Résumé ===`); +console.log(`Scripts mis à jour automatiquement: ${updated}`); +console.log(`Scripts nécessitant révision manuelle: ${skipped}`); +console.log(`\nNOTE: Les fichiers .backup contiennent les versions originales.`); +console.log(`Vérifiez les fichiers mis à jour avant de supprimer les backups.`); diff --git a/tools/auto-translate-english.js b/tools/auto-translate-english.js new file mode 100644 index 0000000..9432c36 --- /dev/null +++ b/tools/auto-translate-english.js @@ -0,0 +1,219 @@ +import fs from 'fs'; +import path from 'path'; +import { fileURLToPath } from 'url'; + +const __filename = fileURLToPath(import.meta.url); +const __dirname = path.dirname(__filename); + +const FR_DIR = path.join(__dirname, 'scripts'); +const ENGLISH_TEXTS_FILE = path.join(__dirname, 'english-texts-found.json'); +const FR_JSON_FILE = path.join(__dirname, 'fr.json'); + +// Charger les données +const englishTexts = JSON.parse(fs.readFileSync(ENGLISH_TEXTS_FILE, 'utf8')); +const frJson = JSON.parse(fs.readFileSync(FR_JSON_FILE, 'utf8')); + +// Créer un mapping de traductions basé sur fr.json et les patterns connus +const translations = { + // Patterns déjà traduits dans le système + "Choose Training": "Choisir un Entraînement", + "Lore (Magic)": "Savoir (Magie)", + "Dark Magic (Necromancy)": "Magie Noire (Nécromancie)", + "Lore (Theology)": "Savoir (Théologie)", + "Lore (Runes)": "Savoir (Runes)", + "Sail (Skycraft)": "Voile (Aéronavale)", + "all forms": "toutes formes", + + // Messages utilisateur + "Skipping Tests to apply the tattoos": "Tests ignorés pour appliquer les tatouages", + "Apply Ward of Grimnir effect?": "Appliquer l'effet Rune de Grimnir ?", + "No Lore (Theology) skill found, cannot pass.": "Compétence Savoir (Théologie) introuvable, impossible de continuer.", + "No Lore (Runes) skill found, cannot pass.": "Compétence Savoir (Runes) introuvable, impossible de continuer.", + "One or more Tests to apply the tattoos failed.": "Un ou plusieurs Tests pour appliquer les tatouages ont échoué.", + "Must provide a Master Rune": "Doit fournir une Rune Maîtresse", + "Must provide a Rune (non-Master)": "Doit fournir une Rune (non-Maîtresse)", + + // Effets et conditions + "Removed Broken": "Condition Brisé supprimée", + "Added Bleeding": "Saignement ajouté", + "Applied after effects": "Effets secondaires appliqués", + "Does not need to make Peur or Terror tests": "N'a pas besoin de faire de tests de Peur ou de Terreur", + "Automatically passes any": "Réussit automatiquement tout", + + // Fragments de code courants (contextuels) + "action-link critical": "action-link critical", // Classe CSS, ne pas traduire + "> Critical": "> Critique", + + // Patterns génériques + "|| this.item.getFlag(": "|| this.item.getFlag(", // Code JS, ne pas traduire + ',"info")': ',"info")', // Code JS, ne pas traduire +}; + +// Fonction pour obtenir la fréquence de chaque texte anglais +function getTextFrequencies() { + const frequencies = new Map(); + + englishTexts.forEach(({ strings }) => { + strings.forEach(str => { + frequencies.set(str, (frequencies.get(str) || 0) + 1); + }); + }); + + return frequencies; +} + +// Fonction pour proposer des traductions automatiques +function proposeTranslations(text) { + // Si déjà dans le mapping, retourner + if (translations[text]) { + return translations[text]; + } + + // Patterns de remplacement simples basés sur fr.json + let translated = text; + + // Mots courants du vocabulaire WFRP + const vocabulary = { + "Choose": "Choisir", + "Select": "Sélectionner", + "Enter": "Entrer", + "Critical": "Critique", + "Wounds": "Blessures", + "Bleeding": "Saignement", + "Broken": "Brisé", + "Removed": "Retiré", + "Added": "Ajouté", + "Applied": "Appliqué", + "Failed": "Échoué", + "Passed": "Réussi", + "Cannot": "Impossible de", + "Must": "Doit", + "Need": "Besoin", + "Automatically": "Automatiquement", + "any": "tout", + "all": "tout", + "Test": "Test", + "Tests": "Tests", + "Skill": "Compétence", + "effect": "effet", + "after effects": "effets secondaires", + }; + + // Appliquer les remplacements de vocabulaire + for (const [en, fr] of Object.entries(vocabulary)) { + const regex = new RegExp(`\\b${en}\\b`, 'gi'); + translated = translated.replace(regex, (match) => { + // Conserver la casse + if (match[0] === match[0].toUpperCase()) { + return fr.charAt(0).toUpperCase() + fr.slice(1); + } + return fr; + }); + } + + // Si rien n'a changé, ne pas proposer de traduction + if (translated === text) { + return null; + } + + return translated; +} + +// Analyser et créer le mapping complet +console.log('Création du mapping de traductions...\n'); + +const frequencies = getTextFrequencies(); +const autoTranslations = new Map(); + +// Trier par fréquence décroissante +const sortedTexts = Array.from(frequencies.entries()) + .sort((a, b) => b[1] - a[1]); + +let proposedCount = 0; +let existingCount = 0; + +sortedTexts.forEach(([text, freq]) => { + if (translations[text]) { + autoTranslations.set(text, translations[text]); + existingCount++; + } else { + const proposed = proposeTranslations(text); + if (proposed && proposed !== text) { + autoTranslations.set(text, proposed); + proposedCount++; + if (proposedCount <= 10) { + console.log(`"${text}" → "${proposed}" (${freq}x)`); + } + } + } +}); + +console.log(`\n${existingCount} traductions existantes`); +console.log(`${proposedCount} traductions proposées automatiquement`); +console.log(`${sortedTexts.length - existingCount - proposedCount} textes ignorés (code/technique)`); + +// Appliquer les traductions +console.log('\n' + '='.repeat(60)); +console.log('Application des traductions...\n'); + +let stats = { + filesProcessed: 0, + filesModified: 0, + replacementsMade: 0, + errors: 0 +}; + +englishTexts.forEach(({ file, strings }) => { + const filePath = path.join(FR_DIR, file); + stats.filesProcessed++; + + try { + let content = fs.readFileSync(filePath, 'utf8'); + let modified = false; + let replacementsInFile = 0; + + strings.forEach(text => { + const translation = autoTranslations.get(text); + if (translation && content.includes(text)) { + // Remplacement simple + const newContent = content.split(text).join(translation); + + if (newContent !== content) { + const count = content.split(text).length - 1; + content = newContent; + modified = true; + replacementsInFile += count; + stats.replacementsMade += count; + } + } + }); + + if (modified) { + fs.writeFileSync(filePath, content, 'utf8'); + stats.filesModified++; + console.log(`✓ ${file} : ${replacementsInFile} remplacement(s)`); + } + + } catch (error) { + stats.errors++; + console.error(`✗ ${file} : ${error.message}`); + } +}); + +console.log('\n' + '='.repeat(60)); +console.log('Traduction automatique terminée !'); +console.log('='.repeat(60)); +console.log(`Fichiers traités : ${stats.filesProcessed}`); +console.log(`Fichiers modifiés : ${stats.filesModified}`); +console.log(`Remplacements effectués : ${stats.replacementsMade}`); +console.log(`Erreurs : ${stats.errors}`); +console.log('='.repeat(60)); + +// Sauvegarder le mapping de traductions +const mappingFile = path.join(__dirname, 'auto-translations-applied.json'); +fs.writeFileSync( + mappingFile, + JSON.stringify(Object.fromEntries(autoTranslations), null, 2), + 'utf8' +); +console.log(`\nMapping de traductions sauvegardé dans : auto-translations-applied.json`); diff --git a/tools/auto-translations-applied.json b/tools/auto-translations-applied.json new file mode 100644 index 0000000..bfe5ddd --- /dev/null +++ b/tools/auto-translations-applied.json @@ -0,0 +1,251 @@ +{ + "+ this.effect.name\n\nawait this.actor.update(updateObj)\nthis.actor.createEmbeddedDocuments(": "+ this.effet.name\n\nawait this.actor.update(updateObj)\nthis.actor.createEmbeddedDocuments(", + "+ this.effect.name\n\nawait this.actor.update(updateObj)\nconsole.log(": "+ this.effet.name\n\nawait this.actor.update(updateObj)\nconsole.log(", + "Added Bleeding": "Saignement ajouté", + ", {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields : {difficulty :": ", {skipTargets: true, appendTitle : ` - ${this.effet.name}`, fields : {difficulty :", + "Fatigued added to": "Fatigued Ajouté to", + "which cannot be removed until the Malaise symptom is gone.": "which Impossible de be Retiré until the Malaise symptom is gone.", + ")}!`}));\n\nthis.effect.updateSource({": ")}!`}));\n\nthis.effet.updateSource({", + "Lore (Magic)": "Savoir (Magie)", + ")}) \n}\n\n// Notify of lingering effects when mask is removed\nelse if (!args.equipped)\n{\n await this.item.effects.contents[0].delete();\n await this.item.update({name : this.item.name +=": ")}) \n}\n\n// Notify of lingering effects when mask is Retiré\nelse if (!args.equipped)\n{\n await this.item.effects.contents[0].delete();\n await this.item.update({name : this.item.name +=", + "})\n this.script.message(`${this.item.name} on ${this.actor.name} has been taken off and loses its properties. However, the effects last for [[1d10+4]] days, after which they should be manually removed.`, \n {whisper: ChatMessage.getWhisperRecipients(": "})\n this.script.message(`${this.item.name} on ${this.actor.name} has been taken off and loses its properties. However, the effects last for [[1d10+4]] days, after which they should be manually Retiré.`, \n {whisper: ChatMessage.getWhisperRecipients(", + ",\n {whisper: ChatMessage.getWhisperRecipients(\"GM\")}) \n}\n\n// Notify of lingering effects when mask is removed\nelse if (!args.equipped)\n{\n await this.item.effects.contents[0].delete();\n await this.item.update({name : this.item.name += \" (Used)\"})\n this.script.message(": ",\n {whisper: ChatMessage.getWhisperRecipients(\"GM\")}) \n}\n\n// Notify of lingering effects when mask is Retiré\nelse if (!args.equipped)\n{\n await this.item.effects.contents[0].delete();\n await this.item.update({name : this.item.name += \" (Used)\"})\n this.script.message(", + "+ this.effect.name, context : {failure:": "+ this.effet.name, context : {failure:", + "Choose Characteristic": "Choisir Characteristic", + ": this.item.system.tests.value.replace(": ": this.item.system.Tests.value.replace(", + ") || this.item.system.tests.value.includes(": ") || this.item.system.Tests.value.includes(", + ") || this.item.system.tests.value.toLowerCase().includes(": ") || this.item.system.Tests.value.toLowerCase().includes(", + "))\n{\n let tests = this.item.system.tests.value\n let name = this.item.name\n\n // If name already specifies, make sure tests value reflects that\n if (name.includes(": "))\n{\n let Tests = this.item.system.Tests.value\n let name = this.item.name\n\n // If name already specifies, make sure Tests value reflects that\n if (name.includes(", + ",\n skipTargets: true,\n fields: {difficulty: 'easy'},\n characteristic: 'wp',\n});\nawait test.roll();\n\nif (!test.succeeded) {\n test.result.other.push(": ",\n skipTargets: true,\n fields: {difficulty: 'easy'},\n characteristic: 'wp',\n});\nawait Test.roll();\n\nif (!Test.succeeded) {\n Test.result.other.push(", + "Dark Magic (Necromancy)": "Magie Noire (Nécromancie)", + "action-link critical": "action-link critical", + "all forms": "toutes formes", + ")})\n}\n\n// Notify of lingering effects when mask is removed\nelse if (!args.equipped)\n{\n await this.item.effects.contents[0].delete();\n await this.item.update({name : this.item.name +=": ")})\n}\n\n// Notify of lingering effects when mask is Retiré\nelse if (!args.equipped)\n{\n await this.item.effects.contents[0].delete();\n await this.item.update({name : this.item.name +=", + ";\nconst test = 'Maintenance Crew Test';\nconst difficulty = 'hard';\nconst target = 80;\n\nconst extendedTestData = {\n name: this.item.name,\n type: \"extendedTest\",\n img: this.item.img,\n system: {\n SL: {\n current: 0,\n target: target\n },\n test: {\n value: test\n },\n completion: {\n value: \"remove\"\n },\n difficulty: {\n value: difficulty\n }\n },\n effects: [\n {\n name:": ";\nconst Test = 'Maintenance Crew Test';\nconst difficulty = 'hard';\nconst target = 80;\n\nconst extendedTestData = {\n name: this.item.name,\n type: \"extendedTest\",\n img: this.item.img,\n system: {\n SL: {\n current: 0,\n target: target\n },\n Test: {\n value: Test\n },\n completion: {\n value: \"remove\"\n },\n difficulty: {\n value: difficulty\n }\n },\n effects: [\n {\n name:", + "}})\nawait test.roll();\nif (test.failed)\n{\n args.actor.addCondition(": "}})\nawait Test.roll();\nif (Test.Échoué)\n{\n args.actor.addCondition(", + "}})\nawait test.roll();\nif (test.failed)\n{\n this.actor.addCondition(": "}})\nawait Test.roll();\nif (Test.Échoué)\n{\n this.actor.addCondition(", + "Choose a Condition": "Choisir a Condition", + "\n Select your choice\n
\n\n Sélectionner your choice\n
\nApply Ward of Grimnir effect?
": "Apply Ward of Grimnir effet?
", + "No Lore (Theology) skill found, cannot pass.": "Compétence Savoir (Théologie) introuvable, impossible de continuer.", + "No Lore (Runes) skill found, cannot pass.": "Compétence Savoir (Runes) introuvable, impossible de continuer.", + "One or more Tests to apply the tattoos failed.": "Un ou plusieurs Tests pour appliquer les tatouages ont échoué.", + ", fields : {difficulty : \"vhard\"}})\n await test.roll();\n if (test.failed)\n {\n failed = true;\n }\n}\nelse \n{\n this.script.notification(\"No Lore (Theology) skill found, cannot pass.\")\n failed = true;\n}\n\nif (this.actor.itemTags.skill.find(i => i.name == \"Lore (Runes)\"))\n {\n let test = await this.actor.setupSkill(\"Lore (Runes)\", {appendTitle :": ", fields : {difficulty : \"vhard\"}})\n await Test.roll();\n if (Test.Échoué)\n {\n Échoué = true;\n }\n}\nelse \n{\n this.script.notification(\"No Lore (Theology) Compétence found, Impossible de pass.\")\n Échoué = true;\n}\n\nif (this.actor.itemTags.Compétence.find(i => i.name == \"Lore (Runes)\"))\n {\n let Test = await this.actor.setupSkill(\"Lore (Runes)\", {appendTitle :", + ", fields : {difficulty : \"hard\"}})\n await test.roll();\n if (test.failed)\n {\n failed = true;\n }\n }\n else \n {\n this.script.notification(\"No Lore (Runes) skill found, cannot pass.\")\n failed = true;\n }\n\n\n let test = await this.actor.setupSkill(\"Art (Tattooing)\", {appendTitle :": ", fields : {difficulty : \"hard\"}})\n await Test.roll();\n if (Test.Échoué)\n {\n Échoué = true;\n }\n }\n else \n {\n this.script.notification(\"No Lore (Runes) Compétence found, Impossible de pass.\")\n Échoué = true;\n }\n\n\n let Test = await this.actor.setupSkill(\"Art (Tattooing)\", {appendTitle :", + ")\n let configBlessings = await Promise.all((game.wfrp4e.config.godBlessings[god.toLowerCase()] || []).map(fromUuid));\n if (god ==": ")\n let configBlessings = await Promise.tout((game.wfrp4e.config.godBlessings[god.toLowerCase()] || []).map(fromUuid));\n if (god ==", + "))\n await this.actor.addEffectItems(blessings.map(i => i.uuid), this.effect)\n }\n else\n {\n this.script.scriptNotification(`Impossible de trouver des Bénédictions associées à ${god}.`)\n }\n if (this.item.name.includes(": "))\n await this.actor.addEffectItems(blessings.map(i => i.uuid), this.effet)\n }\n else\n {\n this.script.scriptNotification(`Impossible de trouver des Bénédictions associées à ${god}.`)\n }\n if (this.item.name.includes(", + ", group)})\n\tthis.effect.updateSource({name : this.effect.name + ` (${group})`})\n}\n\n\ndata.name = data.name.replace(": ", group)})\n\tthis.effet.updateSource({name : this.effet.name + ` (${group})`})\n}\n\n\ndata.name = data.name.replace(", + ", \"system.tests.value\" : this.item.system.tests.value.replace(\"Group\", group)})\n\tthis.effect.updateSource({name : this.effect.name +": ", \"system.Tests.value\" : this.item.system.Tests.value.replace(\"Group\", group)})\n\tthis.effet.updateSource({name : this.effet.name +", + "attrait du Léviathan.`);\n loreTest.renderRollCard();\n return;\n }\n}\n\nlet test = await actor.setupSkill(": "attrait du Léviathan.`);\n loreTest.renderRollCard();\n return;\n }\n}\n\nlet Test = await actor.setupSkill(", + ", {\n appendTitle: ` – ${this.effect.name}`,\n skipTargets: true,\n fields: {difficulty:": ", {\n appendTitle: ` – ${this.effet.name}`,\n skipTargets: true,\n fields: {difficulty:", + ");\n loreTest.renderRollCard();\n return;\n }\n}\n\nlet test = await actor.setupSkill('Calme', {\n appendTitle:": ");\n loreTest.renderRollCard();\n return;\n }\n}\n\nlet Test = await actor.setupSkill('Calme', {\n appendTitle:", + ", this.effect.name)\n\nif (characteristics.has(": ", this.effet.name)\n\nif (characteristics.has(", + ", availableChoices);\n\n if (!result) return;\n\n characteristics.add(result);\n}\n\nthis.effect.setFlag(": ", availableChoices);\n\n if (!result) return;\n\n characteristics.add(result);\n}\n\nthis.effet.setFlag(", + ").roll({allowInteractive : false});\nlet regen = regenRoll.total;\n\nif (wounds.value >= wounds.max)\n return\n\nif (wounds.value > 0) \n{\n wounds.value += regen\n if (wounds.value > wounds.max)\n {\n wounds.value = wounds.max\n }\n message += `${this.actor.name} regains ${regen} Wounds.`\n\n if (regen == 10)\n {\n message += `1–6: add +1 SL
\n7–10: lose all accrued SLs and perform next Test at –1 SL
\n1–6: add +1 SL
\n7–10: lose tout accrued SLs and perform next Test at –1 SL
\n\n Select your choice\n
\n\n Sélectionner your choice\n
\nDamage all Items carried?
": "Damage tout Items carried?
", + "Choose Optional Traits": "Choisir Optional Traits", + "You must target exactly one Boat.": "You Doit target exactly one Boat.", + ": []});\n msg += `${item.name} loses all Qualities
`\n }\n else \n {\n msg += `${item.name} crumbles into dust!
` \n await item.update({name : item.name +": ": []});\n msg += `${item.name} loses tout Qualities
`\n }\n else \n {\n msg += `${item.name} crumbles into dust!
` \n await item.update({name : item.name +", + "}});\nawait test.roll();\nCorruptionMessageModel.createCorruptionMessage(": "}});\nawait Test.roll();\nCorruptionMessageModel.createCorruptionMessage(", + ", this.script.getChatData())\n\nif (test.failed)\n{\n this.actor.addCondition(": ", this.script.getChatData())\n\nif (Test.Échoué)\n{\n this.actor.addCondition(", + ")\n\nlet value = hitloc.result\nlet desc = hitloc.description\n\nthis.effect.updateSource({": ")\n\nlet value = hitloc.result\nlet desc = hitloc.description\n\nthis.effet.updateSource({", + "EFFECT.CreatureBackInWater": "Effet.CreatureBackInWater", + "EFFECT.CreatureOutOfWater": "Effet.CreatureOutOfWater", + ": 5\n }\n let items = []\n\n let updateObj = this.actor.toObject();\n\n let talents = (await Promise.all([game.wfrp4e.tables.rollTable(": ": 5\n }\n let items = []\n\n let updateObj = this.actor.toObject();\n\n let talents = (await Promise.tout([game.wfrp4e.tables.rollTable(", + ";\nconst test = 'Métier (Charpentier)';\nconst difficulty = 'challenging';\nconst target = 40;\n\nconst extendedTestData = {\n name: this.item.name,\n type: \"extendedTest\",\n img: this.item.img,\n system: {\n SL: {\n current: 0,\n target: target\n },\n test: {\n value: test\n },\n completion: {\n value: \"remove\"\n },\n difficulty: {\n value: difficulty\n }\n },\n effects: [\n {\n name:": ";\nconst Test = 'Métier (Charpentier)';\nconst difficulty = 'challenging';\nconst target = 40;\n\nconst extendedTestData = {\n name: this.item.name,\n type: \"extendedTest\",\n img: this.item.img,\n system: {\n SL: {\n current: 0,\n target: target\n },\n Test: {\n value: Test\n },\n completion: {\n value: \"remove\"\n },\n difficulty: {\n value: difficulty\n }\n },\n effects: [\n {\n name:", + "}\n});\n\nawait test.roll();\n\nif (test.failed) {\n args.actor.addCondition(\"poisoned\");\n const speaker = ChatMessage.getSpeaker({actor: args.actor});\n this.script.message(": "}\n});\n\nawait Test.roll();\n\nif (Test.Échoué) {\n args.actor.addCondition(\"poisoned\");\n const speaker = ChatMessage.getSpeaker({actor: args.actor});\n this.script.message(", + ")})\n if (args.test.failed && this.actor.type ==": ")})\n if (args.Test.Échoué && this.actor.type ==", + "Set Liquid Fortification effect duration to 1 hour.": "Set Liquid Fortification effet duration to 1 hour.", + "Reset Liquid Fortification effect duration to 1 hour.": "Reset Liquid Fortification effet duration to 1 hour.", + "Choose Symptoms": "Choisir Symptoms", + "&& args.test.failed && args.test.result.SL <= -3)\n{\n this.script.notification(": "&& args.Test.Échoué && args.Test.result.SL <= -3)\n{\n this.script.notification(", + ", {skipTargets: true, appendTitle : ` - ${this.effect.name}`})\nawait test.roll();\nif (test.succeeded)\n{\n this.script.message(": ", {skipTargets: true, appendTitle : ` - ${this.effet.name}`})\nawait Test.roll();\nif (Test.succeeded)\n{\n this.script.message(", + "This Actor does not know any runes.": "This Actor does not know tout runes.", + ") return;\n\nconst SL = args.opposedTest.data.opposeResult.differenceSL;\n\nconst targetId = this.effect.getFlag(": ") return;\n\nconst SL = args.opposedTest.data.opposeResult.differenceSL;\n\nconst targetId = this.effet.getFlag(", + ");\n return await this.effect.delete();\n}\n\nif (SL > 0) {\n args.opposedTest.data.opposeResult.other.push(": ");\n return await this.effet.delete();\n}\n\nif (SL > 0) {\n args.opposedTest.data.opposeResult.other.push(", + ";\nconst test = 'Métier (Charpentier)';\nconst difficulty = 'difficult';\nconst target = 20;\n\nconst extendedTestData = {\n name: this.item.name,\n type: \"extendedTest\",\n img: this.item.img,\n system: {\n SL: {\n current: 0,\n target: target\n },\n test: {\n value: test\n },\n completion: {\n value: \"remove\"\n },\n difficulty: {\n value: difficulty\n }\n },\n effects: [\n {\n name:": ";\nconst Test = 'Métier (Charpentier)';\nconst difficulty = 'difficult';\nconst target = 20;\n\nconst extendedTestData = {\n name: this.item.name,\n type: \"extendedTest\",\n img: this.item.img,\n system: {\n SL: {\n current: 0,\n target: target\n },\n Test: {\n value: Test\n },\n completion: {\n value: \"remove\"\n },\n difficulty: {\n value: difficulty\n }\n },\n effects: [\n {\n name:", + "All Effects have been used. Reset to select them again": "Tout Effects have been used. Reset to Sélectionner them again", + "Choose Power to Gain": "Choisir Power to Gain", + ";\nconst test = 'Trade (Carpentry)';\nconst difficulty = 'easy';\nconst target = 20;\n\nconst extendedTestData = {\n name: this.item.name,\n type: \"extendedTest\",\n img: this.item.img,\n system: {\n SL: {\n current: 0,\n target: target\n },\n test: {\n value: test\n },\n completion: {\n value: \"remove\"\n },\n difficulty: {\n value: difficulty\n }\n },\n effects: [\n {\n name:": ";\nconst Test = 'Trade (Carpentry)';\nconst difficulty = 'easy';\nconst target = 20;\n\nconst extendedTestData = {\n name: this.item.name,\n type: \"extendedTest\",\n img: this.item.img,\n system: {\n SL: {\n current: 0,\n target: target\n },\n Test: {\n value: Test\n },\n completion: {\n value: \"remove\"\n },\n difficulty: {\n value: difficulty\n }\n },\n effects: [\n {\n name:", + ";\nconst test = 'Voile';\nconst difficulty = 'easy';\nconst target = 10;\n\nconst extendedTestData = {\n name: this.item.name,\n type: \"extendedTest\",\n img: this.item.img,\n system: {\n SL: {\n current: 0,\n target: target\n },\n test: {\n value: test\n },\n completion: {\n value: \"remove\"\n },\n difficulty: {\n value: difficulty\n }\n },\n effects: [\n {\n name:": ";\nconst Test = 'Voile';\nconst difficulty = 'easy';\nconst target = 10;\n\nconst extendedTestData = {\n name: this.item.name,\n type: \"extendedTest\",\n img: this.item.img,\n system: {\n SL: {\n current: 0,\n target: target\n },\n Test: {\n value: Test\n },\n completion: {\n value: \"remove\"\n },\n difficulty: {\n value: difficulty\n }\n },\n effects: [\n {\n name:", + ";\nconst test = 'Trade (Carpentry)';\nconst difficulty = 'hard';\nconst target = 30;\n\nconst extendedTestData = {\n name: this.item.name,\n type: \"extendedTest\",\n img: this.item.img,\n system: {\n SL: {\n current: 0,\n target: target\n },\n test: {\n value: test\n },\n completion: {\n value: \"remove\"\n },\n difficulty: {\n value: difficulty\n }\n },\n effects: [\n {\n name:": ";\nconst Test = 'Trade (Carpentry)';\nconst difficulty = 'hard';\nconst target = 30;\n\nconst extendedTestData = {\n name: this.item.name,\n type: \"extendedTest\",\n img: this.item.img,\n system: {\n SL: {\n current: 0,\n target: target\n },\n Test: {\n value: Test\n },\n completion: {\n value: \"remove\"\n },\n difficulty: {\n value: difficulty\n }\n },\n effects: [\n {\n name:", + ";\nconst test = 'Voile';\nconst difficulty = 'average';\nconst target = 30;\n\nconst extendedTestData = {\n name: this.item.name,\n type: \"extendedTest\",\n img: this.item.img,\n system: {\n SL: {\n current: 0,\n target: target\n },\n test: {\n value: test\n },\n completion: {\n value: \"remove\"\n },\n difficulty: {\n value: difficulty\n }\n },\n effects: [\n {\n name:": ";\nconst Test = 'Voile';\nconst difficulty = 'average';\nconst target = 30;\n\nconst extendedTestData = {\n name: this.item.name,\n type: \"extendedTest\",\n img: this.item.img,\n system: {\n SL: {\n current: 0,\n target: target\n },\n Test: {\n value: Test\n },\n completion: {\n value: \"remove\"\n },\n difficulty: {\n value: difficulty\n }\n },\n effects: [\n {\n name:", + ";\nconst test = 'Métier (Ingénieur)';\nconst difficulty = 'easy';\nconst target = 10;\n\nconst extendedTestData = {\n name: this.item.name,\n type: \"extendedTest\",\n img: this.item.img,\n system: {\n SL: {\n current: 0,\n target: target\n },\n test: {\n value: test\n },\n completion: {\n value: \"remove\"\n },\n difficulty: {\n value: difficulty\n }\n },\n effects: [\n {\n name:": ";\nconst Test = 'Métier (Ingénieur)';\nconst difficulty = 'easy';\nconst target = 10;\n\nconst extendedTestData = {\n name: this.item.name,\n type: \"extendedTest\",\n img: this.item.img,\n system: {\n SL: {\n current: 0,\n target: target\n },\n Test: {\n value: Test\n },\n completion: {\n value: \"remove\"\n },\n difficulty: {\n value: difficulty\n }\n },\n effects: [\n {\n name:", + ";\nconst test = 'Métier (Charpentier)';\nconst difficulty = 'difficult';\nconst target = 40;\n\nconst extendedTestData = {\n name: this.item.name,\n type: \"extendedTest\",\n img: this.item.img,\n system: {\n SL: {\n current: 0,\n target: target\n },\n test: {\n value: test\n },\n completion: {\n value: \"remove\"\n },\n difficulty: {\n value: difficulty\n }\n },\n effects: [\n {\n name:": ";\nconst Test = 'Métier (Charpentier)';\nconst difficulty = 'difficult';\nconst target = 40;\n\nconst extendedTestData = {\n name: this.item.name,\n type: \"extendedTest\",\n img: this.item.img,\n system: {\n SL: {\n current: 0,\n target: target\n },\n Test: {\n value: Test\n },\n completion: {\n value: \"remove\"\n },\n difficulty: {\n value: difficulty\n }\n },\n effects: [\n {\n name:", + ";\nconst test = 'Métier (Charpentier)';\nconst difficulty = 'hard';\nconst target = 40;\n\nconst extendedTestData = {\n name: this.item.name,\n type: \"extendedTest\",\n img: this.item.img,\n system: {\n SL: {\n current: 0,\n target: target\n },\n test: {\n value: test\n },\n completion: {\n value: \"remove\"\n },\n difficulty: {\n value: difficulty\n }\n },\n effects: [\n {\n name:": ";\nconst Test = 'Métier (Charpentier)';\nconst difficulty = 'hard';\nconst target = 40;\n\nconst extendedTestData = {\n name: this.item.name,\n type: \"extendedTest\",\n img: this.item.img,\n system: {\n SL: {\n current: 0,\n target: target\n },\n Test: {\n value: Test\n },\n completion: {\n value: \"remove\"\n },\n difficulty: {\n value: difficulty\n }\n },\n effects: [\n {\n name:", + ";\nconst test = 'Strength';\nconst difficulty = 'average';\nconst target = 10;\n\nconst extendedTestData = {\n name: this.item.name,\n type: \"extendedTest\",\n img: this.item.img,\n system: {\n SL: {\n current: 0,\n target: target\n },\n test: {\n value: test\n },\n completion: {\n value: \"remove\"\n },\n difficulty: {\n value: difficulty\n }\n },\n effects: [\n {\n name:": ";\nconst Test = 'Strength';\nconst difficulty = 'average';\nconst target = 10;\n\nconst extendedTestData = {\n name: this.item.name,\n type: \"extendedTest\",\n img: this.item.img,\n system: {\n SL: {\n current: 0,\n target: target\n },\n Test: {\n value: Test\n },\n completion: {\n value: \"remove\"\n },\n difficulty: {\n value: difficulty\n }\n },\n effects: [\n {\n name:", + ", {skipTargets: true, appendTitle : ` - ${this.effect.name}`, context: { failure:": ", {skipTargets: true, appendTitle : ` - ${this.effet.name}`, context: { failure:", + "}\n});\n\nawait test.roll();\n\nif (test.failed) {\n const SL = Number(test.result.SL);\n this.script.message(": "}\n});\n\nawait Test.roll();\n\nif (Test.Échoué) {\n const SL = Number(Test.result.SL);\n this.script.message(", + ": locations})\nthis.effect.updateSource({": ": locations})\nthis.effet.updateSource({", + ";\nconst test = 'Métier (Charpentier)';\nconst difficulty = 'challenging';\nconst target = 10;\n\nconst extendedTestData = {\n name: this.item.name,\n type: \"extendedTest\",\n img: this.item.img,\n system: {\n SL: {\n current: 0,\n target: target\n },\n test: {\n value: test\n },\n completion: {\n value: \"remove\"\n },\n difficulty: {\n value: difficulty\n }\n },\n effects: [\n {\n name:": ";\nconst Test = 'Métier (Charpentier)';\nconst difficulty = 'challenging';\nconst target = 10;\n\nconst extendedTestData = {\n name: this.item.name,\n type: \"extendedTest\",\n img: this.item.img,\n system: {\n SL: {\n current: 0,\n target: target\n },\n Test: {\n value: Test\n },\n completion: {\n value: \"remove\"\n },\n difficulty: {\n value: difficulty\n }\n },\n effects: [\n {\n name:", + "s name\nawait effect.update({\n name,\n \"system.scriptData\": scriptData\n});\n\n\n// update Trait": "s name\nawait effet.update({\n name,\n \"system.scriptData\": scriptData\n});\n\n\n// update Trait", + ";\nconst test = 'Trade (Tailor)';\nconst difficulty = 'difficult';\nconst target = 40;\n\nconst extendedTestData = {\n name: this.item.name,\n type: \"extendedTest\",\n img: this.item.img,\n system: {\n SL: {\n current: 0,\n target: target\n },\n test: {\n value: test\n },\n completion: {\n value: \"remove\"\n },\n difficulty: {\n value: difficulty\n }\n },\n effects: [\n {\n name:": ";\nconst Test = 'Trade (Tailor)';\nconst difficulty = 'difficult';\nconst target = 40;\n\nconst extendedTestData = {\n name: this.item.name,\n type: \"extendedTest\",\n img: this.item.img,\n system: {\n SL: {\n current: 0,\n target: target\n },\n Test: {\n value: Test\n },\n completion: {\n value: \"remove\"\n },\n difficulty: {\n value: difficulty\n }\n },\n effects: [\n {\n name:", + "]\n }\n]\n\nlet arcane = await ItemDialog.createFromFilters(filters, 12, {title : this.effect.name, text :": "]\n }\n]\n\nlet arcane = await ItemDialog.createFromFilters(filters, 12, {title : this.effet.name, text :", + ";\nconst test = 'Trade (Carpentry)';\nconst difficulty = 'easy';\nconst target = 10;\n\nconst extendedTestData = {\n name: this.item.name,\n type: \"extendedTest\",\n img: this.item.img,\n system: {\n SL: {\n current: 0,\n target: target\n },\n test: {\n value: test\n },\n completion: {\n value: \"remove\"\n },\n difficulty: {\n value: difficulty\n }\n },\n effects: [\n {\n name:": ";\nconst Test = 'Trade (Carpentry)';\nconst difficulty = 'easy';\nconst target = 10;\n\nconst extendedTestData = {\n name: this.item.name,\n type: \"extendedTest\",\n img: this.item.img,\n system: {\n SL: {\n current: 0,\n target: target\n },\n Test: {\n value: Test\n },\n completion: {\n value: \"remove\"\n },\n difficulty: {\n value: difficulty\n }\n },\n effects: [\n {\n name:", + ";\nconst test = 'Trade (Carpentry)';\nconst difficulty = 'difficult';\nconst target = 30;\n\nconst extendedTestData = {\n name: this.item.name,\n type: \"extendedTest\",\n img: this.item.img,\n system: {\n SL: {\n current: 0,\n target: target\n },\n test: {\n value: test\n },\n completion: {\n value: \"remove\"\n },\n difficulty: {\n value: difficulty\n }\n },\n effects: [\n {\n name:": ";\nconst Test = 'Trade (Carpentry)';\nconst difficulty = 'difficult';\nconst target = 30;\n\nconst extendedTestData = {\n name: this.item.name,\n type: \"extendedTest\",\n img: this.item.img,\n system: {\n SL: {\n current: 0,\n target: target\n },\n Test: {\n value: Test\n },\n completion: {\n value: \"remove\"\n },\n difficulty: {\n value: difficulty\n }\n },\n effects: [\n {\n name:", + "}})\nawait test.roll();\n\nif (!test.succeeded)\n{\n\tthis.actor.addCondition(": "}})\nawait Test.roll();\n\nif (!Test.succeeded)\n{\n\tthis.actor.addCondition(", + "}});\nawait test.roll();\n\nif (test.failed)\n{\n await this.actor.addCondition(": "}});\nawait Test.roll();\n\nif (Test.Échoué)\n{\n await this.actor.addCondition(", + ";\nconst test = 'Strength';\nconst difficulty = 'easy';\nconst target = 10;\n\nconst extendedTestData = {\n name: this.item.name,\n type: \"extendedTest\",\n img: this.item.img,\n system: {\n SL: {\n current: 0,\n target: target\n },\n test: {\n value: test\n },\n completion: {\n value: \"remove\"\n },\n difficulty: {\n value: difficulty\n }\n },\n effects: [\n {\n name:": ";\nconst Test = 'Strength';\nconst difficulty = 'easy';\nconst target = 10;\n\nconst extendedTestData = {\n name: this.item.name,\n type: \"extendedTest\",\n img: this.item.img,\n system: {\n SL: {\n current: 0,\n target: target\n },\n Test: {\n value: Test\n },\n completion: {\n value: \"remove\"\n },\n difficulty: {\n value: difficulty\n }\n },\n effects: [\n {\n name:", + "; // Put path to token image here, inbetween the quotation marks\nif (tokenImg)\n{\n if (this.effect.getFlag(": "; // Put path to token image here, inbetween the quotation marks\nif (tokenImg)\n{\n if (this.effet.getFlag(", + ";\n\t\t\targs.test.result.description =": ";\n\t\t\targs.Test.result.description =", + "}\n\t\targs.test.result.outcome =": "}\n\t\targs.Test.result.outcome =", + "Failed Trade (Engineering)": "Échoué Trade (Engineering)", + ";\nconst test = 'Trade (Tailor)';\nconst difficulty = 'easy';\nconst target = 20;\n\nconst extendedTestData = {\n name: this.item.name,\n type: \"extendedTest\",\n img: this.item.img,\n system: {\n SL: {\n current: 0,\n target: target\n },\n test: {\n value: test\n },\n completion: {\n value: \"remove\"\n },\n difficulty: {\n value: difficulty\n }\n },\n effects: [\n {\n name:": ";\nconst Test = 'Trade (Tailor)';\nconst difficulty = 'easy';\nconst target = 20;\n\nconst extendedTestData = {\n name: this.item.name,\n type: \"extendedTest\",\n img: this.item.img,\n system: {\n SL: {\n current: 0,\n target: target\n },\n Test: {\n value: Test\n },\n completion: {\n value: \"remove\"\n },\n difficulty: {\n value: difficulty\n }\n },\n effects: [\n {\n name:", + ") \n{\n if (args.test.failed)\n {\n let item = await fromUuid(": ") \n{\n if (args.Test.Échoué)\n {\n let item = await fromUuid(", + ";\nconst test = 'Trade (Carpentry)';\nconst difficulty = 'challenging';\nconst target = 20;\n\nconst extendedTestData = {\n name: this.item.name,\n type: \"extendedTest\",\n img: this.item.img,\n system: {\n SL: {\n current: 0,\n target: target\n },\n test: {\n value: test\n },\n completion: {\n value: \"remove\"\n },\n difficulty: {\n value: difficulty\n }\n },\n effects: [\n {\n name:": ";\nconst Test = 'Trade (Carpentry)';\nconst difficulty = 'challenging';\nconst target = 20;\n\nconst extendedTestData = {\n name: this.item.name,\n type: \"extendedTest\",\n img: this.item.img,\n system: {\n SL: {\n current: 0,\n target: target\n },\n Test: {\n value: Test\n },\n completion: {\n value: \"remove\"\n },\n difficulty: {\n value: difficulty\n }\n },\n effects: [\n {\n name:", + ";\nconst test = 'Métier (Charpentier)';\nconst difficulty = 'difficult';\nconst target = 50;\n\nconst extendedTestData = {\n name: this.item.name,\n type: \"extendedTest\",\n img: this.item.img,\n system: {\n SL: {\n current: 0,\n target: target\n },\n test: {\n value: test\n },\n completion: {\n value: \"remove\"\n },\n difficulty: {\n value: difficulty\n }\n },\n effects: [\n {\n name:": ";\nconst Test = 'Métier (Charpentier)';\nconst difficulty = 'difficult';\nconst target = 50;\n\nconst extendedTestData = {\n name: this.item.name,\n type: \"extendedTest\",\n img: this.item.img,\n system: {\n SL: {\n current: 0,\n target: target\n },\n Test: {\n value: Test\n },\n completion: {\n value: \"remove\"\n },\n difficulty: {\n value: difficulty\n }\n },\n effects: [\n {\n name:", + ") \n{\n if (args.test.failed)\n {\n this.actor.createEmbeddedDocuments(": ") \n{\n if (args.Test.Échoué)\n {\n this.actor.createEmbeddedDocuments(", + "]])\n this.script.message(`Willpower Test failed, ${this.actor.prototypeToken.name} gains @Condition[Malaise] for [[1d10]] hours`, {whisper: ChatMessage.getWhisperRecipients(": "]])\n this.script.message(`Willpower Test Échoué, ${this.actor.prototypeToken.name} gains @Condition[Malaise] for [[1d10]] hours`, {whisper: ChatMessage.getWhisperRecipients(", + "}\n \n args.test.result.other.push (": "}\n \n args.Test.result.other.push (", + ";\nconst test = 'Trade (Tailor)';\nconst difficulty = 'easy';\nconst target = 30;\n\nconst extendedTestData = {\n name: this.item.name,\n type: \"extendedTest\",\n img: this.item.img,\n system: {\n SL: {\n current: 0,\n target: target\n },\n test: {\n value: test\n },\n completion: {\n value: \"remove\"\n },\n difficulty: {\n value: difficulty\n }\n },\n effects: [\n {\n name:": ";\nconst Test = 'Trade (Tailor)';\nconst difficulty = 'easy';\nconst target = 30;\n\nconst extendedTestData = {\n name: this.item.name,\n type: \"extendedTest\",\n img: this.item.img,\n system: {\n SL: {\n current: 0,\n target: target\n },\n Test: {\n value: Test\n },\n completion: {\n value: \"remove\"\n },\n difficulty: {\n value: difficulty\n }\n },\n effects: [\n {\n name:", + ").map(i => `max(0, 1d10 - ${this.actor.system.characteristics.fel.bonus})`)\n\nlet test = new Roll(`${rolls.join(": ").map(i => `max(0, 1d10 - ${this.actor.system.characteristics.fel.bonus})`)\n\nlet Test = new Roll(`${rolls.join(", + ")\n\nlet test = new Roll(": ")\n\nlet Test = new Roll(", + ", {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields: { difficulty:": ", {skipTargets: true, appendTitle : ` - ${this.effet.name}`, fields: { difficulty:", + "} }).then(async test => {\n await test.roll();\n if (test.failed) \n {\n await args.actor.addCondition(": "} }).then(async Test => {\n await Test.roll();\n if (Test.Échoué) \n {\n await args.actor.addCondition(", + "}})\nawait test.roll();\nif (test.failed)\n{\n let roll = await new Roll(": "}})\nawait Test.roll();\nif (Test.Échoué)\n{\n let roll = await new Roll(", + ";\nconst test = 'Métier (Charpentier)';\nconst difficulty = 'challenging';\nconst target = 20;\n\nconst extendedTestData = {\n name: this.item.name,\n type: \"extendedTest\",\n img: this.item.img,\n system: {\n SL: {\n current: 0,\n target: target\n },\n test: {\n value: test\n },\n completion: {\n value: \"remove\"\n },\n difficulty: {\n value: difficulty\n }\n },\n effects: [\n {\n name:": ";\nconst Test = 'Métier (Charpentier)';\nconst difficulty = 'challenging';\nconst target = 20;\n\nconst extendedTestData = {\n name: this.item.name,\n type: \"extendedTest\",\n img: this.item.img,\n system: {\n SL: {\n current: 0,\n target: target\n },\n Test: {\n value: Test\n },\n completion: {\n value: \"remove\"\n },\n difficulty: {\n value: difficulty\n }\n },\n effects: [\n {\n name:", + "Does the vessel have a magazine or any other kind of store for blackpowder?
": "Does the vessel have a magazine or tout other kind of store for blackpowder?
", + ";\nconst test = 'Voile';\nconst difficulty = 'challenging';\nconst target = 40;\n\nconst extendedTestData = {\n name: this.item.name,\n type: \"extendedTest\",\n img: this.item.img,\n system: {\n SL: {\n current: 0,\n target: target\n },\n test: {\n value: test\n },\n completion: {\n value: \"remove\"\n },\n difficulty: {\n value: difficulty\n }\n },\n effects: [\n {\n name:": ";\nconst Test = 'Voile';\nconst difficulty = 'challenging';\nconst target = 40;\n\nconst extendedTestData = {\n name: this.item.name,\n type: \"extendedTest\",\n img: this.item.img,\n system: {\n SL: {\n current: 0,\n target: target\n },\n Test: {\n value: Test\n },\n completion: {\n value: \"remove\"\n },\n difficulty: {\n value: difficulty\n }\n },\n effects: [\n {\n name:", + ";\nconst test = 'Métier (Charpentier)';\nconst difficulty = 'easy';\nconst target = 40;\n\nconst extendedTestData = {\n name: this.item.name,\n type: \"extendedTest\",\n img: this.item.img,\n system: {\n SL: {\n current: 0,\n target: target\n },\n test: {\n value: test\n },\n completion: {\n value: \"remove\"\n },\n difficulty: {\n value: difficulty\n }\n },\n effects: [\n {\n name:": ";\nconst Test = 'Métier (Charpentier)';\nconst difficulty = 'easy';\nconst target = 40;\n\nconst extendedTestData = {\n name: this.item.name,\n type: \"extendedTest\",\n img: this.item.img,\n system: {\n SL: {\n current: 0,\n target: target\n },\n Test: {\n value: Test\n },\n completion: {\n value: \"remove\"\n },\n difficulty: {\n value: difficulty\n }\n },\n effects: [\n {\n name:", + "this.script.message(msg)\n\nlet test = await this.actor.setupSkill(\"Résistance\", {fields : {difficulty : \"difficult\"}, appendTitle :": "this.script.message(msg)\n\nlet Test = await this.actor.setupSkill(\"Résistance\", {fields : {difficulty : \"difficult\"}, appendTitle :", + "Choose Location": "Choisir Location", + "Hatred (All enemies)": "Hatred (Tout enemies)", + ", {skipTargets: true, appendTitle : ` - ${this.effect.name}`});\nawait test.roll();\nif (test.failed)\n{\n this.actor.addCondition(": ", {skipTargets: true, appendTitle : ` - ${this.effet.name}`});\nawait Test.roll();\nif (Test.Échoué)\n{\n this.actor.addCondition(", + ")\n this.actor.modifyWounds(-1 * value)\n await this.item.system.toggleEquip();\n args.test.addSL(value);\n args.test.preData.other.push(": ")\n this.actor.modifyWounds(-1 * value)\n await this.item.system.toggleEquip();\n args.Test.addSL(value);\n args.Test.preData.other.push(", + "This Talent also extends to any metal object because of Metallic Affinity
": "This Talent also extends to tout metal object because of Metallic Affinity
", + "Halve Damage? (Halves all damage other than fire, cold, and magic)": "Halve Damage? (Halves tout damage other than fire, cold, and magic)", + "Choose Limb": "Choisir Limb", + "Effect Used": "Effet Used", + "must make a Willpower Test or fall @Condition[Prone].": "Doit make a Willpower Test or fall @Condition[Prone].", + "Cannot remove Blinded condition.": "Impossible de remove Blinded condition.", + "Removed Fatigued": "Retiré Fatigued", + "})\nawait test.roll();\n\nif (test.failed) {\n \tthis.script.scriptMessage(await this.actor.applyBasicDamage(20, {suppressMsg: true}));\n this.script.scriptMessage(": "})\nawait Test.roll();\n\nif (Test.Échoué) {\n \tthis.script.scriptMessage(await this.actor.applyBasicDamage(20, {suppressMsg: true}));\n this.script.scriptMessage(", + "Cannot move or act this Turn": "Impossible de move or act this Turn", + "Select Wind": "Sélectionner Wind", + ")\n bleeding.delete(); \n}\nelse \n{\n this.script.notification(": ")\n Saignement.delete(); \n}\nelse \n{\n this.script.notification(", + "Choose a Skill": "Choisir a Compétence", + ") \n{\n if (args.test.failed)\n {\n this.actor.addSystemEffect(": ") \n{\n if (args.Test.Échoué)\n {\n this.actor.addSystemEffect(", + ",\n}\n\nlet test = await args.actor.setupSkill(": ",\n}\n\nlet Test = await args.actor.setupSkill(", + "Cannot be Surprised": "Impossible de be Surprised", + ", {skipTargets: true, appendTitle : ` - ${this.effect.name}`})\nawait test.roll();\nif (test.failed)\n{\n this.script.message(await game.wfrp4e.tables.formatChatRoll(": ", {skipTargets: true, appendTitle : ` - ${this.effet.name}`})\nawait Test.roll();\nif (Test.Échoué)\n{\n this.script.message(await game.wfrp4e.tables.formatChatRoll(", + "}, skipTargets: true, appendTitle : ` - ${this.effect.name}`})\nawait test.roll();\nif (test.failed)\n{\n\tlet stuns = Math.max(1, Math.abs(test.result.SL))\n\tthis.actor.addCondition(": "}, skipTargets: true, appendTitle : ` - ${this.effet.name}`})\nawait Test.roll();\nif (Test.Échoué)\n{\n\tlet stuns = Math.max(1, Math.abs(Test.result.SL))\n\tthis.actor.addCondition(", + ")\n}\nelse \n{\n\tlet points = this.effect.sourceTest.result.overcast.usage.other.current;\n\tthis.actor.update({\"system.status.corruption.value\" : this.actor.system.status.corruption.value - points})\n\tthis.script.message(": ")\n}\nelse \n{\n\tlet points = this.effet.sourceTest.result.overcast.usage.other.current;\n\tthis.actor.update({\"system.status.corruption.value\" : this.actor.system.status.corruption.value - points})\n\tthis.script.message(", + "})\nawait test.roll();\nif (test.failed)\n{\n\n let myRoll = await new Roll(\"1d10\").roll({allowInteractive : false});\n let duration = myRoll.total\n this.actor.addSystemEffect(\"nausea\");\n this.script.scriptMessage(": "})\nawait Test.roll();\nif (Test.Échoué)\n{\n\n let myRoll = await new Roll(\"1d10\").roll({allowInteractive : false});\n let duration = myRoll.total\n this.actor.addSystemEffect(\"nausea\");\n this.script.scriptMessage(", + "Choose the Critical Wounds to heal (cannot reattach body parts)": "Choisir the Critique Blessures to heal (Impossible de reattach body parts)", + "Choose Taille": "Choisir Taille", + "Cannot attack targets that are not Entangled": "Impossible de attack targets that are not Entangled", + ").pop())\n\n if (ones == 0) {\n ones = 10;\n }\n\n if (ones > SL) {\n args.test.data.result.SL =": ").pop())\n\n if (ones == 0) {\n ones = 10;\n }\n\n if (ones > SL) {\n args.Test.data.result.SL =", + "Gained 2 Bleeding Conditions": "Gained 2 Saignement Conditions", + "Choose a Disease": "Choisir a Disease", + "});\nawait test.roll();\nif (test.failed)\n{\n\tawait this.actor.addCondition(\"blinded\");\n}\n\nlet msg =": "});\nawait Test.roll();\nif (Test.Échoué)\n{\n\tawait this.actor.addCondition(\"blinded\");\n}\n\nlet msg =", + ")\n }\n else if (this.actor.characteristics.int.bonus + Number(args.test.result.SL) < 0)\n {\n args.test.result.other.push(": ")\n }\n else if (this.actor.characteristics.int.bonus + Number(args.Test.result.SL) < 0)\n {\n args.Test.result.other.push(", + "});\nawait test.roll();\n\nif (test.failed) {\n this.actor.addCondition('stunned');\n}\n\nthis.script.scriptNotification(": "});\nawait Test.roll();\n\nif (Test.Échoué) {\n this.actor.addCondition('stunned');\n}\n\nthis.script.scriptNotification(", + "Added Fatigued": "Ajouté Fatigued", + "t use this.effect because it thinks it": "t use this.effet because it thinks it", + "Halve Damage? (Halves Damage from all fire)": "Halve Damage? (Halves Damage from tout fire)", + "Can only be applied to River Troll.": "Can only be Appliqué to River Troll.", + "+ parseInt(this.effect.sourceTest.result.SL)": "+ parseInt(this.effet.sourceTest.result.SL)", + ")\nthis.item.setFlag(\"wfrp4e\", \"uses\", uses);\nif (uses >= 3)\n{\n\tthis.effect.update({\"system.transferData.type\" : \"other\"})\n\tthis.script.notification(": ")\nthis.item.setFlag(\"wfrp4e\", \"uses\", uses);\nif (uses >= 3)\n{\n\tthis.effet.update({\"system.transferData.type\" : \"other\"})\n\tthis.script.notification(", + "Wounds Healed": "Blessures Healed", + "Choose a Weapon": "Choisir a Weapon", + "ambre\";\n amberTalons.img = this.effect.img;\n amberTalons.system.damage.value = \"SB + WPB\"\n amberTalons.system.equipped = true;\n amberTalons.system.qualities.value.push({name : \"magical\"})\n amberTalons.effects.push({\n name : \"Serres d": "ambre\";\n amberTalons.img = this.effet.img;\n amberTalons.system.damage.value = \"SB + WPB\"\n amberTalons.system.equipped = true;\n amberTalons.system.qualities.value.push({name : \"magical\"})\n amberTalons.effects.push({\n name : \"Serres d", + ")\n args.test.preData.reversal = {allowed: true, if:": ")\n args.Test.preData.reversal = {allowed: true, if:", + ", {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields : {difficulty :": ", {skipTargets: true, appendTitle : ` - ${this.effet.name}`, fields : {difficulty :", + "}});\nawait test.roll();\nif (test.failed)\n{\n\tawait this.actor.addCondition(\"blinded\");\n}\n\nlet msg =": "}});\nawait Test.roll();\nif (Test.Échoué)\n{\n\tawait this.actor.addCondition(\"blinded\");\n}\n\nlet msg =", + "Can roll on the @Table[crithead]{Head Critical Hits} instead of the normal hit location": "Can roll on the @Table[crithead]{Head Critique Hits} instead of the normal hit location", + "hast)\",\n diff : {\n system : {\n advances : {\n value : 20\n }\n }\n }\n }\n]\n\nlet choice3 = [\n {\n type : \"skill\",\n name : \"Mêlée (Deux mains)\",\n diff : {\n system : {\n advances : {\n value : 20\n }\n }\n }\n }\n]\n\nlet choice = await foundry.applications.api.DialogV2.wait({\n window : {title : \"Choix\"},\n content :\n `\n Sélectionnez votre choix\n
\n\n Sélectionnez votre choix\n
\nApply Ward of Grimnir effect?
", + "No Lore (Theology) skill found, cannot pass.", + "No Lore (Runes) skill found, cannot pass.", + "One or more Tests to apply the tattoos failed.", + ", fields : {difficulty : \"vhard\"}})\n await test.roll();\n if (test.failed)\n {\n failed = true;\n }\n}\nelse \n{\n this.script.notification(\"No Lore (Theology) skill found, cannot pass.\")\n failed = true;\n}\n\nif (this.actor.itemTags.skill.find(i => i.name == \"Lore (Runes)\"))\n {\n let test = await this.actor.setupSkill(\"Lore (Runes)\", {appendTitle :", + ", fields : {difficulty : \"hard\"}})\n await test.roll();\n if (test.failed)\n {\n failed = true;\n }\n }\n else \n {\n this.script.notification(\"No Lore (Runes) skill found, cannot pass.\")\n failed = true;\n }\n\n\n let test = await this.actor.setupSkill(\"Art (Tattooing)\", {appendTitle :" + ] + }, + { + "file": "IupskvzvoGyD2H5o.js", + "count": 6, + "strings": [ + ")\n let configBlessings = await Promise.all((game.wfrp4e.config.godBlessings[god.toLowerCase()] || []).map(fromUuid));\n if (god ==", + "})\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(", + "))\n await this.actor.addEffectItems(blessings.map(i => i.uuid), this.effect)\n }\n else\n {\n this.script.scriptNotification(`Impossible de trouver des Bénédictions associées à ${god}.`)\n }\n if (this.item.name.includes(", + "))\n this.item.updateSource({name: this.item.name.replace(", + ", god)});\n else\n this.item.updateSource({name: this.item.name + ` (${god})`});\n await this.actor.update({", + ")\n }\n if (this.item.name.includes(\"Au choix\"))\n this.item.updateSource({name: this.item.name.replace(\"Au choix\", god)});\n else\n this.item.updateSource({name: this.item.name +" + ] + }, + { + "file": "cUnbADgOQ4fMKgrH.js", + "count": 6, + "strings": [ + "))\n{\n\tgroup = this.item.parenthesesText\n}\n\nelse \n{\n\tgroup = await ValueDialog.create({text :", + "})\n\n\tthis.item.updateSource({name : this.item.name + ` (${group})`,", + ": this.item.system.tests.value.replace(", + ", group)})\n\tthis.effect.updateSource({name : this.effect.name + ` (${group})`})\n}\n\n\ndata.name = data.name.replace(", + ", group);\nawait this.actor.createEmbeddedDocuments(", + ", \"system.tests.value\" : this.item.system.tests.value.replace(\"Group\", group)})\n\tthis.effect.updateSource({name : this.effect.name +" + ] + }, + { + "file": "h766UvswLCsxcMow.js", + "count": 6, + "strings": [ + "}`).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 +=", + "+ this.effect.name\n\nawait this.actor.update(updateObj)\nthis.actor.createEmbeddedDocuments(", + "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(`Impossible de trouver ${trait}`, {permanent : true})\n }\n traitItem = traitItem.toObject()\n\n if (Number.isNumeric(traitVal))\n {\n traitItem.system.specification.value = traitName.includes(", + ", {permanent : true})\n }\n traitItem = traitItem.toObject()\n\n if (Number.isNumeric(traitVal))\n {\n traitItem.system.specification.value = traitName.includes('Arme','Cornes','Tail','Tentacules','Morsure') ? traitVal - parseInt(characteristicValues[3]/10) : traitVal;\n traitItem.name = (traitItem.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(", + ", {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(" + ] + }, + { + "file": "lII4KMRblqwFBlsV.js", + "count": 6, + "strings": [ + "}`).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 +=", + "+ this.effect.name\n\nawait this.actor.update(updateObj)\nthis.actor.createEmbeddedDocuments(", + "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(`Impossible de trouver ${trait}`, {permanent : true})\n }\n traitItem = traitItem.toObject()\n\n if (Number.isNumeric(traitVal))\n {\n traitItem.system.specification.value = traitName.includes(", + ", {permanent : true})\n }\n traitItem = traitItem.toObject()\n\n if (Number.isNumeric(traitVal))\n {\n traitItem.system.specification.value = traitName.includes('Arme','Cornes','Tail','Tentacules','Morsure') ? traitVal - parseInt(characteristicValues[3]/10) : traitVal;\n traitItem.name = (traitItem.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(", + ", {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(" + ] + }, + { + "file": "6qJP0hpShEM43ohx.js", + "count": 5, + "strings": [ + "attrait du Léviathan.`);\n loreTest.renderRollCard();\n return;\n }\n}\n\nlet test = await actor.setupSkill(", + ", {\n appendTitle: ` – ${this.effect.name}`,\n skipTargets: true,\n fields: {difficulty:", + ",\n skipTargets: true,\n fields: {difficulty: 'hard'},\n characteristic: 'int',\n });\n await loreTest.roll();\n\n if (loreTest.succeeded) {\n loreTest.result.other.push(", + ");\n loreTest.renderRollCard();\n return;\n }\n}\n\nlet test = await actor.setupSkill('Calme', {\n appendTitle:", + ",\n skipTargets: true,\n fields: {difficulty: 'easy'},\n characteristic: 'wp',\n});\nawait test.roll();\n\nif (!test.succeeded) {\n test.result.other.push(" + ] + }, + { + "file": "Fu8DTvSgLufcB5mr.js", + "count": 5, + "strings": [ + "; break;\n default: continue;\n }\n\n if (characteristics.has(characteristic)) {\n await rollTable(characteristics,", + ", name);\n } else {\n characteristics.add(characteristic);\n }\n }\n}\n\nconst characteristics = new Set();\nawait rollTable(characteristics,", + ", this.effect.name)\n\nif (characteristics.has(", + ");\n const availableChoices = foundry.utils.duplicate(game.wfrp4e.config.characteristics);\n\n for (const ch of characteristics) delete availableChoices[ch];\n\n const result = warhammer.apps.ValueDialog.create({\n text:", + ", availableChoices);\n\n if (!result) return;\n\n characteristics.add(result);\n}\n\nthis.effect.setFlag(" + ] + }, + { + "file": "OGX4BneaYAnV25TO.js", + "count": 5, + "strings": [ + ").roll({allowInteractive : false});\nlet regen = regenRoll.total;\n\nif (wounds.value >= wounds.max)\n return\n\nif (wounds.value > 0) \n{\n wounds.value += regen\n if (wounds.value > wounds.max)\n {\n wounds.value = wounds.max\n }\n message += `${this.actor.name} regains ${regen} Wounds.`\n\n if (regen == 10)\n {\n message += `1–6: add +1 SL
\n7–10: lose all accrued SLs and perform next Test at –1 SL
\n \n`;\n const choice = await foundry.applications.api.DialogV2.confirm({\n yes: {label:", + "},\n content,\n });\n\n if (!choice) break;\n\n const roll = new Roll(", + ");\n await roll.toMessage({flavor: this.effect.name});\n\n if (roll.total >= 7) {\n SL = -1;\n break;\n }\n\n SL++;\n} while (true);\n\nthis.effect.setFlag(" + ] + }, + { + "file": "lvjcddwRiN9iGruy.js", + "count": 4, + "strings": [ + ", { appendTitle: ` - ${this.effect.name}`, fields: { difficulty:", + "} })\nawait test.roll();\n\nif (test.failed) \n{\n let ageAdded = Math.ceil(CONFIG.Dice.randomUniform() * 10) + Math.ceil(CONFIG.Dice.randomUniform() * 10)\n let ws = Math.ceil(CONFIG.Dice.randomUniform() * 10)\n let bs = Math.ceil(CONFIG.Dice.randomUniform() * 10)\n let s = Math.ceil(CONFIG.Dice.randomUniform() * 10)\n let t = Math.ceil(CONFIG.Dice.randomUniform() * 10)\n let ag = Math.ceil(CONFIG.Dice.randomUniform() * 10)\n let dex = Math.ceil(CONFIG.Dice.randomUniform() * 10)\n\n let currentAge = parseInt(this.actor.system.details.age.value)\n\n let inline = `@ROLL`\n let msg =\n `${this.actor.prototypeToken.name} ages by ${inline.replace(", + ", fields: { difficulty: \"challenging\" } })\nawait test.roll();\n\nif (test.failed) \n{\n let ageAdded = Math.ceil(CONFIG.Dice.randomUniform() * 10) + Math.ceil(CONFIG.Dice.randomUniform() * 10)\n let ws = Math.ceil(CONFIG.Dice.randomUniform() * 10)\n let bs = Math.ceil(CONFIG.Dice.randomUniform() * 10)\n let s = Math.ceil(CONFIG.Dice.randomUniform() * 10)\n let t = Math.ceil(CONFIG.Dice.randomUniform() * 10)\n let ag = Math.ceil(CONFIG.Dice.randomUniform() * 10)\n let dex = Math.ceil(CONFIG.Dice.randomUniform() * 10)\n\n let currentAge = parseInt(this.actor.system.details.age.value)\n\n let inline =" + ] + }, + { + "file": "oTXPA6rbPnYOKNmo.js", + "count": 4, + "strings": [ + "Two Handed Weapon", + "+ this.effect.name\n\nawait this.actor.update(updateObj)\nconsole.log(", + ", items)\nthis.actor.createEmbeddedDocuments(", + ", {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(" + ] + }, + { + "file": "x9iKFYYc4Ocy8PTS.js", + "count": 4, + "strings": [ + "Grace is beyond style", + "Choose Group", + ")[0] + ` (${name}`\n })\n}\nelse \n{\n item = await fromUuid(", + ");\n let data = item.toObject();\n data.name += ` (${name})`\n this.actor.createEmbeddedDocuments(" + ] + }, + { + "file": "0Uly7OmkH0zqYbxQ.js", + "count": 3, + "strings": [ + ")}!`)\n for(let weapon of dropped)\n {\n await weapon.system.toggleEquip();\n }\n }\n}\n\nlet roll = await new Roll(", + ", this.actor).roll()\n\nroll.toMessage(this.script.getChatData({flavor : `${this.effect.name} (Durée)`}));\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(\"max(1, 1d10 - @system.characteristics.t.bonus)\", this.actor).roll()\n\nroll.toMessage(this.script.getChatData({flavor :" + ] + }, + { + "file": "4iu3CmOI19soOYuA.js", + "count": 3, + "strings": [ + "} ];\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,", + ")\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(`Impossible de trouver ${trait.name}`, {permanent : true})\n }\n}\n\n\n\nupdateObj.name = updateObj.name +=", + "+ this.effect.name\n\nawait this.actor.update(updateObj)\nthis.actor.createEmbeddedDocuments(" + ] + }, + { + "file": "6BmvV9c03FkfisnE.js", + "count": 3, + "strings": [ + ")})\n}\n\n// Notify of lingering effects when mask is removed\nelse if (!args.equipped)\n{\n await this.item.effects.contents[0].delete();\n await this.item.update({name : this.item.name +=", + "})\n 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.`,\n {whisper: ChatMessage.getWhisperRecipients(", + ",\n {whisper: ChatMessage.getWhisperRecipients(\"GM\")})\n}\n\n// Notify of lingering effects when mask is removed\nelse if (!args.equipped)\n{\n await this.item.effects.contents[0].delete();\n await this.item.update({name : this.item.name += \" (Utilisé)\"})\n this.script.message(" + ] + }, + { + "file": "7JW9t8AYSDkkzG2V.js", + "count": 3, + "strings": [ + ")})\n}\n\n// Notify of lingering effects when mask is removed\nelse if (!args.equipped)\n{\n await this.item.effects.contents[0].delete();\n await this.item.update({name : this.item.name +=", + "})\n 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.`,\n {whisper: ChatMessage.getWhisperRecipients(", + ",\n {whisper: ChatMessage.getWhisperRecipients(\"GM\")})\n}\n\n// Notify of lingering effects when mask is removed\nelse if (!args.equipped)\n{\n await this.item.effects.contents[0].delete();\n await this.item.update({name : this.item.name += \" (Used)\"})\n this.script.message(" + ] + }, + { + "file": "7T3iXgrL72fea67C.js", + "count": 3, + "strings": [ + ",\n fields: {difficulty: \"easy\"},\n context: {\n success:", + ",\n failure:", + "}\n});\n\nawait test.roll();\n\nif (test.failed) {\n await this.actor.addEffectItems(bloodyFluxUUID, this.effect);\n} else {\n const SL = test.result.SL;\n const heal = 1 + SL;\n await this.actor.modifyWounds(heal);\n this.script.message(" + ] + }, + { + "file": "8yBr6VbdKcrWUuqw.js", + "count": 3, + "strings": [ + "this.actor.characteristics.int.value=", + "this.actor.characteristics.wp.value=", + "this.actor.characteristics.fel.value =" + ] + }, + { + "file": "BVNKF9omCppWPLys.js", + "count": 3, + "strings": [ + "You must control an Actor capable of performing a Strength Test", + "},\n context: {\n success:", + "}\n});\n\nawait test.roll();\nif (test.succeeded) {\n let SL = parseInt(test.result.SL);\n let name = this.effect.name.replace(/\\d+/, rating => parseInt(rating) - SL);\n await this.effect.update({name});\n}\n\nlet rating = parseInt(this.effect.name.match(/\\d+/)?.[0]);\nif (rating <= 1) {\n const scriptData = this.effect.system.scriptData\n scriptData[2].trigger = '';\n await this.effect.update({disabled: true," + ] + }, + { + "file": "Bu0KUpGvfmFF7LJs.js", + "count": 3, + "strings": [ + ", {appendTitle : ` - ${this.effect.name}`, fields : {difficulty :", + "}});\n\nawait test.roll();\n\nif (test.failed)\n{\n\n if (test.isCriticalFumble ==", + ", fields : {difficulty : \"difficult\"}});\n\nawait test.roll();\n\nif (test.failed)\n{\n\n if (test.isCriticalFumble == \"fumble\")\n {\n\t return this.script.message(" + ] + }, + { + "file": "EC8cZmqrE095cDc2.js", + "count": 3, + "strings": [ + ",\n skipTargets: true,\n fields: {difficulty: 'hard'},\n characteristic: 'int',\n });\n await loreTest.roll();\n\n if (loreTest.succeeded) {\n loreTest.result.other.push(", + ");\n loreTest.renderRollCard();\n return;\n } \n}\n\nlet test = await actor.setupSkill('Calme', {\n appendTitle:", + ",\n skipTargets: true,\n fields: {difficulty: 'easy'},\n characteristic: 'wp',\n});\nawait test.roll();\n\nif (!test.succeeded) {\n test.result.other.push(" + ] + }, + { + "file": "ETfmit2Cx0Py77ai.js", + "count": 3, + "strings": [ + "} ];\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,", + ")\n if (traitItem)\n { \n let t = traitItem.toObject();\n t.system.specification.value = trait.value;\n items.push(t);\n }\n else \n {\n ui.notifications.warn(`: -200\n}\nlet traits = [ {name:`, {permanent : true})\n }\n}\n\n\nupdateObj.name = updateObj.name +=", + "+ this.effect.name\n\nawait this.actor.update(updateObj)\nthis.actor.createEmbeddedDocuments(" + ] + }, + { + "file": "KmngDrPD72xn22kZ.js", + "count": 3, + "strings": [ + ", {skipTargets: true, appendTitle : ` - Used ${this.effect.name}`, fields: { difficulty:", + "} }).then(async test => {\n await test.roll()\n if (test.failed) \n {\n let toughnessLost = Math.ceil(CONFIG.Dice.randomUniform() * 10)\n this.actor.update({", + ", fields: { difficulty: \"difficult\" } }).then(async test => {\n await test.roll()\n if (test.failed) \n {\n let toughnessLost = Math.ceil(CONFIG.Dice.randomUniform() * 10)\n this.actor.update({ \"system.characteristics.t.initial\": this.actor.characteristics.t.initial - toughnessLost })\n this.script.message(" + ] + }, + { + "file": "MgMMoC4Umpg7fmNI.js", + "count": 3, + "strings": [ + ")}) \n}\n\n// Notify of lingering effects when mask is removed\nelse if (!args.equipped)\n{\n await this.item.effects.contents[0].delete();\n await this.item.update({name : this.item.name +=", + "})\n this.script.message(`${this.item.name} on ${this.actor.name} has been taken off and loses its properties. However, the effects last for [[1d10+4]] days, after which they should be manually removed.`, \n {whisper: ChatMessage.getWhisperRecipients(", + ",\n {whisper: ChatMessage.getWhisperRecipients(\"GM\")}) \n}\n\n// Notify of lingering effects when mask is removed\nelse if (!args.equipped)\n{\n await this.item.effects.contents[0].delete();\n await this.item.update({name : this.item.name += \" (Used)\"})\n this.script.message(" + ] + }, + { + "file": "N8hA6ysHCTlLd8Kj.js", + "count": 3, + "strings": [ + "Ritual Dress incorporating many ingredients and fetishes", + "+ this.effect.name\n\nawait this.actor.update(updateObj)\nthis.actor.createEmbeddedDocuments(", + ", {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 items.push({name : trapping, type : \"trapping\", \"system.trappingType.value\" : \"clothingAccessories\"})\n //ui.notifications.warn(" + ] + }, + { + "file": "R32U01LBjBrK1pns.js", + "count": 3, + "strings": [ + ", {hideDSN: true})).text;\n\n\n let templateItem = await warhammer.utility.findItemId(templateMap[template._id]);\n\n let bio = \n `\n
Template: ${template.text}
\nPhsyical Quirk: ${physicalQuirk}
\nWork Ethic: ${workEthic}
\nPersonality Quirk: ${personalityQuirk}
\n `\n \n this.script.message(bio, {whisper : ChatMessage.getWhisperRecipients(", + ")})\n\n await this.actor.update({", + ": bio})\n\n if (templateItem)\n {\n this.actor.createEmbeddedDocuments(" + ] + }, + { + "file": "R8ecKGRzOr4ThvVa.js", + "count": 3, + "strings": [ + "Maintenance Crew Test", + ";\nconst test = 'Maintenance Crew Test';\nconst difficulty = 'hard';\nconst target = 80;\n\nconst extendedTestData = {\n name: this.item.name,\n type: \"extendedTest\",\n img: this.item.img,\n system: {\n SL: {\n current: 0,\n target: target\n },\n test: {\n value: test\n },\n completion: {\n value: \"remove\"\n },\n difficulty: {\n value: difficulty\n }\n },\n effects: [\n {\n name:", + ",\n img: this.item.img,\n system: {\n transferData : {\n type: \"document\",\n documentType: \"Item\"\n },\n scriptData: [\n {\n label: this.item.name,\n script:" + ] + }, + { + "file": "RvipIYj9H7n4UDMe.js", + "count": 3, + "strings": [ + ": 0\n}\nlet skills = []\nlet skillAdvancements = []\nlet talents = []\nlet trappings = []\nlet items = []\n\nlet updateObj = this.actor.toObject();\n\nfor (let ch in characteristics)\n{\n updateObj.system.characteristics[ch].modifier += characteristics[ch];\n}\n\nfor (let index = 0; index < skills.length; index++)\n{\n let skill = skills[index]\n let skillItem;\n skillItem = updateObj.items.find(i => i.name == skill && i.type ==", + ")\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(", + ", {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(" + ] + }, + { + "file": "TCtXPvDpbfz1yrVZ.js", + "count": 3, + "strings": [ + "Corps à corps (A deux mains)", + "A deux mains", + "\n Select your choice\n
\nDamage all Items carried?
", + "}\n\t\tfor(let item of armour)\n\t\t{\n\t\t\tawait item.system.damageItem(1);\n\t\t\tmsg +=", + "}\n\t\tfor(let item of trappings)\n\t\t{\n\t\t\tawait item.system.damageItem(1);\n\t\t\tmsg +=" + ] + }, + { + "file": "nkdKBJ8ItqWiRAWL.js", + "count": 3, + "strings": [ + ")}) \n}\n\n// Notify of lingering effects when mask is removed\nelse if (!args.equipped)\n{\n await this.item.effects.contents[0].delete();\n await this.item.update({name : this.item.name +=", + "})\n this.script.message(`${this.item.name} on ${this.actor.name} has been taken off and loses its properties. However, the effects last for [[1d10+4]] days, after which they should be manually removed.`, \n {whisper: ChatMessage.getWhisperRecipients(", + ",\n {whisper: ChatMessage.getWhisperRecipients(\"GM\")}) \n}\n\n// Notify of lingering effects when mask is removed\nelse if (!args.equipped)\n{\n await this.item.effects.contents[0].delete();\n await this.item.update({name : this.item.name += \" (Used)\"})\n this.script.message(" + ] + }, + { + "file": "rF0Z3hTUUnSxL3Mq.js", + "count": 3, + "strings": [ + "Armour (Hide)", + "Choose Optional Traits", + ")}`);\nthis.actor.createEmbeddedDocuments(" + ] + }, + { + "file": "rly9iBUy8EX7NhQT.js", + "count": 3, + "strings": [ + "You must target exactly one Boat.", + "You can only Constrict a Boat", + "You can only Constrict vessels of Taille Large or smaller" + ] + }, + { + "file": "svCqdytEOtqFXCcs.js", + "count": 3, + "strings": [ + "Add Chaos Steed and +20 Ride (Horse)?", + "+ this.effect.name\n\nawait this.actor.update(updateObj)\nthis.actor.createEmbeddedDocuments(", + ", {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(" + ] + }, + { + "file": "sz0PqS1kroMOzUZk.js", + "count": 3, + "strings": [ + "+ this.effect.name\n\nawait this.actor.update(updateObj)\nconsole.log(", + ", items)\nthis.actor.createEmbeddedDocuments(", + ", {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(" + ] + }, + { + "file": "wbM7tpw4TxvadcWm.js", + "count": 3, + "strings": [ + ";\nfor(let item of items)\n{\n if (item.system.properties.qualities.durable)\n {\n await item.update({", + ": []});\n msg += `${item.name} loses all Qualities
`\n }\n else \n {\n msg += `${item.name} crumbles into dust!
` \n await item.update({name : item.name +", + "}\n else \n {\n msg +=" + ] + }, + { + "file": "xgplXZMs459X7XXM.js", + "count": 3, + "strings": [ + ")}) \n}\n\n// Notify of lingering effects when mask is removed\nelse if (!args.equipped)\n{\n await this.item.effects.contents[0].delete();\n await this.item.update({name : this.item.name +=", + "})\n this.script.message(`${this.item.name} on ${this.actor.name} has been taken off and loses its properties. However, the effects last for [[1d10+4]] days, after which they should be manually removed.`, \n {whisper: ChatMessage.getWhisperRecipients(", + ",\n {whisper: ChatMessage.getWhisperRecipients(\"GM\")}) \n}\n\n// Notify of lingering effects when mask is removed\nelse if (!args.equipped)\n{\n await this.item.effects.contents[0].delete();\n await this.item.update({name : this.item.name += \" (Used)\"})\n this.script.message(" + ] + }, + { + "file": "xklncIMwQIespDxS.js", + "count": 3, + "strings": [ + ", {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields : {difficulty :", + "}});\nawait test.roll();\nCorruptionMessageModel.createCorruptionMessage(", + ", this.script.getChatData())\n\nif (test.failed)\n{\n this.actor.addCondition(" + ] + }, + { + "file": "y3F1K1sYBymPZCjz.js", + "count": 3, + "strings": [ + "+ this.effect.name\n\nawait this.actor.update(updateObj)\nconsole.log(", + ", items)\nthis.actor.createEmbeddedDocuments(", + ", {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(" + ] + }, + { + "file": "ynoHNXXCGRS6fTqF.js", + "count": 3, + "strings": [ + ").roll()).total\n\nif (args.actor.characteristics.i.value <= 0)\n{\n i_gain += (await new Roll(", + ").roll()).total\n}\n\nmsg = `${this.actor.prototypeToken.name} gains ${i_gain} Initiative`\n\nlet newValue = i_gain + args.actor.characteristics.i.modifier\n\nthis.actor.update({", + ")\n\nlet value = hitloc.result\nlet desc = hitloc.description\n\nthis.effect.updateSource({" + ] + }, + { + "file": "18MeEQ0As3JvER71.js", + "count": 2, + "strings": [ + "EFFECT.CreatureBackInWater", + "EFFECT.CreatureOutOfWater" + ] + }, + { + "file": "1BT0MWM2cbhlEnrn.js", + "count": 2, + "strings": [ + ": 5\n }\n let items = []\n\n let updateObj = this.actor.toObject();\n\n let talents = (await Promise.all([game.wfrp4e.tables.rollTable(", + ")])).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(" + ] + }, + { + "file": "1CeYp5MlPcH68UIw.js", + "count": 2, + "strings": [ + "+ this.effect.name\n\nawait this.actor.update(updateObj)\nthis.actor.createEmbeddedDocuments(", + ", {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(" + ] + }, + { + "file": "1ZArMNUI8qqH6zkX.js", + "count": 2, + "strings": [ + "+ this.effect.name, context : {failure:", + "}})\nawait test.roll();\nif (test.failed)\n{\n args.actor.addCondition(" + ] + }, + { + "file": "3ixqbsEMfSSTzAXU.js", + "count": 2, + "strings": [ + "Subi la @Condition[Fatigued] à cause de cauchemars.", + "A souffert de cauchemars, mais a assez bien dormi." + ] + }, + { + "file": "4MQ7u4INxp51oyyR.js", + "count": 2, + "strings": [ + "+ this.effect.name\n\nawait this.actor.update(updateObj)\nthis.actor.createEmbeddedDocuments(", + ", {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(" + ] + }, + { + "file": "4ylzjgUdHY5D0yVh.js", + "count": 2, + "strings": [ + "+ this.effect.name\n\nawait this.actor.update(updateObj)\nthis.actor.createEmbeddedDocuments(", + ", {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(" + ] + }, + { + "file": "5JWC0l3JEpOsqbR9.js", + "count": 2, + "strings": [ + "+ this.effect.name\n\nawait this.actor.update(updateObj)\nthis.actor.createEmbeddedDocuments(", + ", {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(" + ] + }, + { + "file": "5JvKJZPcd6Hz5zvn.js", + "count": 2, + "strings": [ + "+ updateObj.name\n\nawait this.actor.update(updateObj)\nthis.actor.createEmbeddedDocuments(", + ", {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(" + ] + }, + { + "file": "5ScjIdRUOxblHdWS.js", + "count": 2, + "strings": [ + ";\nconst test = 'Métier (Charpentier)';\nconst difficulty = 'challenging';\nconst target = 40;\n\nconst extendedTestData = {\n name: this.item.name,\n type: \"extendedTest\",\n img: this.item.img,\n system: {\n SL: {\n current: 0,\n target: target\n },\n test: {\n value: test\n },\n completion: {\n value: \"remove\"\n },\n difficulty: {\n value: difficulty\n }\n },\n effects: [\n {\n name:", + ",\n img: this.item.img,\n system: {\n transferData : {\n type: \"document\",\n documentType: \"Item\"\n },\n scriptData: [\n {\n label: this.item.name,\n script:" + ] + }, + { + "file": "5dR7Erj3nwsxLAV7.js", + "count": 2, + "strings": [ + "+ this.effect.name\n\nawait this.actor.update(updateObj)\nthis.actor.createEmbeddedDocuments(", + ", {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(" + ] + }, + { + "file": "6elUNF58TaiYjxcx.js", + "count": 2, + "strings": [ + "+ this.effect.name, context : {failure:", + "}})\nawait test.roll();\nif (test.failed)\n{\n this.actor.addCondition(" + ] + }, + { + "file": "8GyJgdHVBaLrHCY8.js", + "count": 2, + "strings": [ + ")\n{\n this.item.updateSource({name : this.item.name += ` (${types[type]})`,", + ": this.item.system.specification.value.replace(" + ] + }, + { + "file": "8xqYrBIf1Zhlwizg.js", + "count": 2, + "strings": [ + "Finished raisint the anchor.
", + ",\n img: this.item.img,\n system: {\n transferData : {\n type: \"document\",\n documentType: \"Item\"\n },\n scriptData: [\n {\n label: this.item.name,\n script:" + ] + }, + { + "file": "9AMoFRATTAfdKlKN.js", + "count": 2, + "strings": [ + ",\n fields: {difficulty: \"challenging\"},\n context: {\n failure:", + "}\n});\n\nawait test.roll();\n\nif (test.failed) {\n args.actor.addCondition(\"poisoned\");\n const speaker = ChatMessage.getSpeaker({actor: args.actor});\n this.script.message(" + ] + }, + { + "file": "A0OK0qAMmnf8iNJf.js", + "count": 2, + "strings": [ + ")})\n if (args.test.failed && this.actor.type ==", + ")\n {\n this.actor.update({" + ] + }, + { + "file": "AI7iVbQMPzXMP5on.js", + "count": 2, + "strings": [ + "(bonus)", + "duration.seconds" + ] + }, + { + "file": "AvRbjpBfTX3mn3bz.js", + "count": 2, + "strings": [ + "Set Liquid Fortification effect duration to 1 hour.", + "Reset Liquid Fortification effect duration to 1 hour." + ] + }, + { + "file": "BD7bVTU2pVoRSRBe.js", + "count": 2, + "strings": [ + "Coughs and Sneezes", + "Choose Symptoms" + ] + }, + { + "file": "BEEvU2hE5ymcNOH9.js", + "count": 2, + "strings": [ + "Fatigued added to", + "which cannot be removed until the Malaise symptom is gone." + ] + }, + { + "file": "BHbFqhJPzZI2txLs.js", + "count": 2, + "strings": [ + ")[0].toLowerCase();\n\n// If channelling corresponding lore\nif (args.type ==", + "&& args.spell.system.lore.value == lore)\n args.prefillModifiers.slBonus += 2\n// If channelling or casting different lore\nelse if (args.spell.system.lore.value != lore && args.spell.system.lore.value !=" + ] + }, + { + "file": "EJObiSth3WdcJOXN.js", + "count": 2, + "strings": [ + "&& args.test.failed && args.test.result.SL <= -3)\n{\n this.script.notification(", + ");\n this.actor.addCondition(" + ] + }, + { + "file": "EdTChmSouS0MSmk5.js", + "count": 2, + "strings": [ + ", {skipTargets: true, appendTitle : ` - ${this.effect.name}`})\nawait test.roll();\nif (test.succeeded)\n{\n this.script.message(", + ")\n}\nelse \n{\n this.script.message(" + ] + }, + { + "file": "EsZx8cY34quYG4MQ.js", + "count": 2, + "strings": [ + "This Actor does not know any runes.", + "Anvil of Doom Bonus" + ] + }, + { + "file": "FPYNcxm21678boLT.js", + "count": 2, + "strings": [ + ") return;\n\nconst SL = args.opposedTest.data.opposeResult.differenceSL;\n\nconst targetId = this.effect.getFlag(", + ");\n return await this.effect.delete();\n}\n\nif (SL > 0) {\n args.opposedTest.data.opposeResult.other.push(" + ] + }, + { + "file": "FtZf56VI6Qsspu0D.js", + "count": 2, + "strings": [ + ";\nconst test = 'Métier (Charpentier)';\nconst difficulty = 'difficult';\nconst target = 20;\n\nconst extendedTestData = {\n name: this.item.name,\n type: \"extendedTest\",\n img: this.item.img,\n system: {\n SL: {\n current: 0,\n target: target\n },\n test: {\n value: test\n },\n completion: {\n value: \"remove\"\n },\n difficulty: {\n value: difficulty\n }\n },\n effects: [\n {\n name:", + ",\n img: this.item.img,\n system: {\n transferData : {\n type: \"document\",\n documentType: \"Item\"\n },\n scriptData: [\n {\n label: this.item.name,\n script:" + ] + }, + { + "file": "GjkxWj9wCAclM9WA.js", + "count": 2, + "strings": [ + "All Effects have been used. Reset to select them again", + "Choose Power to Gain" + ] + }, + { + "file": "GsAyB5xnK3ASeoah.js", + "count": 2, + "strings": [ + ";\nconst test = 'Trade (Carpentry)';\nconst difficulty = 'easy';\nconst target = 20;\n\nconst extendedTestData = {\n name: this.item.name,\n type: \"extendedTest\",\n img: this.item.img,\n system: {\n SL: {\n current: 0,\n target: target\n },\n test: {\n value: test\n },\n completion: {\n value: \"remove\"\n },\n difficulty: {\n value: difficulty\n }\n },\n effects: [\n {\n name:", + ",\n img: this.item.img,\n system: {\n transferData : {\n type: \"document\",\n documentType: \"Item\"\n },\n scriptData: [\n {\n label: this.item.name,\n script:" + ] + }, + { + "file": "H85k4L3yICm7cfIk.js", + "count": 2, + "strings": [ + ";\nconst test = 'Voile';\nconst difficulty = 'easy';\nconst target = 10;\n\nconst extendedTestData = {\n name: this.item.name,\n type: \"extendedTest\",\n img: this.item.img,\n system: {\n SL: {\n current: 0,\n target: target\n },\n test: {\n value: test\n },\n completion: {\n value: \"remove\"\n },\n difficulty: {\n value: difficulty\n }\n },\n effects: [\n {\n name:", + ",\n img: this.item.img,\n system: {\n transferData : {\n type: \"document\",\n documentType: \"Item\"\n },\n scriptData: [\n {\n label: this.item.name,\n script:" + ] + }, + { + "file": "JhbZWZhOJ23yOBmG.js", + "count": 2, + "strings": [ + ";\nconst test = 'Trade (Carpentry)';\nconst difficulty = 'hard';\nconst target = 30;\n\nconst extendedTestData = {\n name: this.item.name,\n type: \"extendedTest\",\n img: this.item.img,\n system: {\n SL: {\n current: 0,\n target: target\n },\n test: {\n value: test\n },\n completion: {\n value: \"remove\"\n },\n difficulty: {\n value: difficulty\n }\n },\n effects: [\n {\n name:", + ",\n img: this.item.img,\n system: {\n transferData : {\n type: \"document\",\n documentType: \"Item\"\n },\n scriptData: [\n {\n label: this.item.name,\n script:" + ] + }, + { + "file": "OsLXutfXyQCAkhAf.js", + "count": 2, + "strings": [ + ";\nconst test = 'Voile';\nconst difficulty = 'average';\nconst target = 30;\n\nconst extendedTestData = {\n name: this.item.name,\n type: \"extendedTest\",\n img: this.item.img,\n system: {\n SL: {\n current: 0,\n target: target\n },\n test: {\n value: test\n },\n completion: {\n value: \"remove\"\n },\n difficulty: {\n value: difficulty\n }\n },\n effects: [\n {\n name:", + ",\n img: this.item.img,\n system: {\n transferData : {\n type: \"document\",\n documentType: \"Item\"\n },\n scriptData: [\n {\n label: this.item.name,\n script:" + ] + }, + { + "file": "Pn5fekTbkwlr61XU.js", + "count": 2, + "strings": [ + ";\nconst test = 'Métier (Ingénieur)';\nconst difficulty = 'easy';\nconst target = 10;\n\nconst extendedTestData = {\n name: this.item.name,\n type: \"extendedTest\",\n img: this.item.img,\n system: {\n SL: {\n current: 0,\n target: target\n },\n test: {\n value: test\n },\n completion: {\n value: \"remove\"\n },\n difficulty: {\n value: difficulty\n }\n },\n effects: [\n {\n name:", + ",\n img: this.item.img,\n system: {\n transferData : {\n type: \"document\",\n documentType: \"Item\"\n },\n scriptData: [\n {\n label: this.item.name,\n script:" + ] + }, + { + "file": "Q7eULXQ9AfDRmUGO.js", + "count": 2, + "strings": [ + ";\nconst test = 'Métier (Charpentier)';\nconst difficulty = 'difficult';\nconst target = 40;\n\nconst extendedTestData = {\n name: this.item.name,\n type: \"extendedTest\",\n img: this.item.img,\n system: {\n SL: {\n current: 0,\n target: target\n },\n test: {\n value: test\n },\n completion: {\n value: \"remove\"\n },\n difficulty: {\n value: difficulty\n }\n },\n effects: [\n {\n name:", + ",\n img: this.item.img,\n system: {\n transferData : {\n type: \"document\",\n documentType: \"Item\"\n },\n scriptData: [\n {\n label: this.item.name,\n script:" + ] + }, + { + "file": "QRSACifDrvojIXHB.js", + "count": 2, + "strings": [ + "No Conditions on this Actor", + "Choose a Condition" + ] + }, + { + "file": "R6SnyF3y4Vsq6oga.js", + "count": 2, + "strings": [ + ")[0].toLowerCase();\n\n// If channelling corresponding lore\nif (args.type ==", + "&& args.spell.system.lore.value == lore)\n args.prefillModifiers.slBonus += 1\n// If channelling or casting different lore\nelse if (args.spell.system.lore.value != lore && args.spell.system.lore.value !=" + ] + }, + { + "file": "R8FBHZaaARA3z9pB.js", + "count": 2, + "strings": [ + ";\nconst test = 'Métier (Charpentier)';\nconst difficulty = 'hard';\nconst target = 40;\n\nconst extendedTestData = {\n name: this.item.name,\n type: \"extendedTest\",\n img: this.item.img,\n system: {\n SL: {\n current: 0,\n target: target\n },\n test: {\n value: test\n },\n completion: {\n value: \"remove\"\n },\n difficulty: {\n value: difficulty\n }\n },\n effects: [\n {\n name:", + ",\n img: this.item.img,\n system: {\n transferData : {\n type: \"document\",\n documentType: \"Item\"\n },\n scriptData: [\n {\n label: this.item.name,\n script:" + ] + }, + { + "file": "RPqgRUkiLY5thVbC.js", + "count": 2, + "strings": [ + ";\nconst test = 'Strength';\nconst difficulty = 'average';\nconst target = 10;\n\nconst extendedTestData = {\n name: this.item.name,\n type: \"extendedTest\",\n img: this.item.img,\n system: {\n SL: {\n current: 0,\n target: target\n },\n test: {\n value: test\n },\n completion: {\n value: \"remove\"\n },\n difficulty: {\n value: difficulty\n }\n },\n effects: [\n {\n name:", + ",\n img: this.item.img,\n system: {\n transferData : {\n type: \"document\",\n documentType: \"Item\"\n },\n scriptData: [\n {\n label: this.item.name,\n script:" + ] + }, + { + "file": "SlrslcNdnYONcSH3.js", + "count": 2, + "strings": [ + "No weapons equipped!", + "Not enough Fortune!" + ] + }, + { + "file": "T4JEEDYCEIUbVHv4.js", + "count": 2, + "strings": [ + "Fatigued added to", + "which cannot be removed until the Malaise symptom is gone." + ] + }, + { + "file": "TGN070HeJLl3gSMY.js", + "count": 2, + "strings": [ + ", {skipTargets: true, appendTitle : ` - ${this.effect.name}`, context: { failure:", + "}})\nawait test.roll();\nif (test.failed)\n{\n this.actor.addCondition(" + ] + }, + { + "file": "TIoUbjOtj7PTK2t8.js", + "count": 2, + "strings": [ + ",\n fields: {difficulty: \"challenging\"},\n context: {\n failure:", + "}\n});\n\nawait test.roll();\n\nif (test.failed) {\n const SL = Number(test.result.SL);\n this.script.message(" + ] + }, + { + "file": "TpZItJ5Ugbazaobd.js", + "count": 2, + "strings": [ + ")\n\nthis.item.updateSource({name : this.item.name += ` (${locationText})`,", + ": locations})\nthis.effect.updateSource({" + ] + }, + { + "file": "TwgdEucxcHloc4cX.js", + "count": 2, + "strings": [ + "acier\"\n },\n {\n type : \"armour\",\n name : \"Brassards\"\n },\n {\n type : \"armour\",\n name : \"Heaume\"\n },\n {\n type : \"armour\",\n name : \"Jambières d", + "\n Select your choice\n
\n\n Select your choice\n
\n${await this.actor.applyBasicDamage(8, {loc :", + ", suppressMsg: true, hideDSN: true})}
`\nmsg += `${await this.actor.applyBasicDamage(8, {loc :" + ] + }, + { + "file": "yvtF2t9aibxibAIM.js", + "count": 2, + "strings": [ + ",\n fields: {difficulty: \"challenging\"},\n context: {\n failure:", + ",\n success:" + ] + }, + { + "file": "zL7ECmBBMAqf5Esn.js", + "count": 2, + "strings": [ + "
Does the vessel have a magazine or any other kind of store for blackpowder?
", + ");\nthis.script.message(" + ] + }, + { + "file": "zXh8rgMxWoCLTxVd.js", + "count": 2, + "strings": [ + ";\nconst test = 'Voile';\nconst difficulty = 'challenging';\nconst target = 40;\n\nconst extendedTestData = {\n name: this.item.name,\n type: \"extendedTest\",\n img: this.item.img,\n system: {\n SL: {\n current: 0,\n target: target\n },\n test: {\n value: test\n },\n completion: {\n value: \"remove\"\n },\n difficulty: {\n value: difficulty\n }\n },\n effects: [\n {\n name:", + ",\n img: this.item.img,\n system: {\n transferData : {\n type: \"document\",\n documentType: \"Item\"\n },\n scriptData: [\n {\n label: this.item.name,\n script:" + ] + }, + { + "file": "zdGAvfL7zJ7wpYxG.js", + "count": 2, + "strings": [ + ";\nconst test = 'Métier (Charpentier)';\nconst difficulty = 'easy';\nconst target = 40;\n\nconst extendedTestData = {\n name: this.item.name,\n type: \"extendedTest\",\n img: this.item.img,\n system: {\n SL: {\n current: 0,\n target: target\n },\n test: {\n value: test\n },\n completion: {\n value: \"remove\"\n },\n difficulty: {\n value: difficulty\n }\n },\n effects: [\n {\n name:", + ",\n img: this.item.img,\n system: {\n transferData : {\n type: \"document\",\n documentType: \"Item\"\n },\n scriptData: [\n {\n label: this.item.name,\n script:" + ] + }, + { + "file": "1jQq9v8fXK8zuEBU.js", + "count": 1, + "strings": [ + "this.script.message(msg)\n\nlet test = await this.actor.setupSkill(\"Résistance\", {fields : {difficulty : \"difficult\"}, appendTitle :" + ] + }, + { + "file": "1wrPvP6lJwIAfmsl.js", + "count": 1, + "strings": [ + "Choose Location" + ] + }, + { + "file": "2EAYX5G9Fh3HJwiP.js", + "count": 1, + "strings": [ + "Condition Brisé supprimée." + ] + }, + { + "file": "2yW0kuwLfgRzJR2S.js", + "count": 1, + "strings": [ + "duration.seconds" + ] + }, + { + "file": "3CeKfDcMEVgQlcXm.js", + "count": 1, + "strings": [ + "Hatred (All enemies)" + ] + }, + { + "file": "3D5ImpMgpOTPucvv.js", + "count": 1, + "strings": [ + ").pop())\n\nif (ones > SL)\n args.test.result.other.push(`Wyrmslayer: Ignore le BE contre les Dragons" + ] + }, + { + "file": "4rTmV3TNxctUe0ly.js", + "count": 1, + "strings": [ + ", {skipTargets: true, appendTitle : ` - ${this.effect.name}`});\nawait test.roll();\nif (test.failed)\n{\n this.actor.addCondition(" + ] + }, + { + "file": "58rFc9HiBoX66J6p.js", + "count": 1, + "strings": [ + ";\n\nlet message = await sourceActor.applyBasicDamage(damage - tb, {damageType: game.wfrp4e.config.DAMAGE_TYPE.IGNORE_AP, suppressMsg : true})\n\nthis.script.message(message.replace(" + ] + }, + { + "file": "5GP9UJMvBZv6kWtI.js", + "count": 1, + "strings": [ + "}\nfor(let item of armour)\n{\n\tawait item.system.damageItem(1);\n\tmsg +=" + ] + }, + { + "file": "5M6IgCUncCwyxHok.js", + "count": 1, + "strings": [ + ";\n item = await fromUuid(uuid);\n if (item)\n {\n msg +=" + ] + }, + { + "file": "64aJznxPMUHAuf7F.js", + "count": 1, + "strings": [ + ")\n}\nelse\n{\n this.item.flags.runeOfLuck = true\n await this.actor.update({\"system.status.fortune.value\" : Math.max(0, currentFortune - runeFortune)})\n this.script.message(" + ] + }, + { + "file": "65xE9OV5sA1ZWT7j.js", + "count": 1, + "strings": [ + ").pop())\n\nif (ones > SL)\n args.test.result.other.push(` i.toObject())\n\nthis.actor.createEmbeddedDocuments(" + ] + }, + { + "file": "96Y1yIH1lRjTs5hL.js", + "count": 1, + "strings": [ + ")\n{\n this.actor.addCondition(" + ] + }, + { + "file": "9A7rYY3FKi5XLihG.js", + "count": 1, + "strings": [ + "This Talent also extends to any metal object because of Metallic Affinity
" + ] + }, + { + "file": "9VfeubiCV83LN9iY.js", + "count": 1, + "strings": [ + "(When Charging)" + ] + }, + { + "file": "9WZa63lr0K3SsP4G.js", + "count": 1, + "strings": [ + "Applied after effects" + ] + }, + { + "file": "A6DcKPzAGntzSCil.js", + "count": 1, + "strings": [ + ")}!`}));\n\nthis.effect.updateSource({" + ] + }, + { + "file": "ACtDCTLZXmd5uXjX.js", + "count": 1, + "strings": [ + "Halve Damage? (Halves all damage other than fire, cold, and magic)" + ] + }, + { + "file": "AYEiCx2Es3QtMY28.js", + "count": 1, + "strings": [ + ", { permanent: true });\n }\n console.log(\"WISH LIST2\", choice1, items);\n actor.createEmbeddedDocuments(\"Item\", items);\n}\n\nasync function dialogChoice() {\n for (let c of choice1) \n {\n if (await foundry.applications.api.DialogV2.confirm({window : {title: \"Option\"}, content:" + ] + }, + { + "file": "CHnaBPHk6HdFS512.js", + "count": 1, + "strings": [ + "Choose Limb" + ] + }, + { + "file": "CIxZYkHggBQ6EsHP.js", + "count": 1, + "strings": [ + "Effect Used" + ] + }, + { + "file": "CS6O7UUjQcUJoOUP.js", + "count": 1, + "strings": [ + "must make a Willpower Test or fall @Condition[Prone]." + ] + }, + { + "file": "CbfUDhUr5R4UnPPq.js", + "count": 1, + "strings": [ + "Cannot remove Blinded condition." + ] + }, + { + "file": "ClkT2WG2UjVwQ97T.js", + "count": 1, + "strings": [ + "Received 1 Blinded Condition" + ] + }, + { + "file": "DWBxvzfWGcG7PVNP.js", + "count": 1, + "strings": [ + ";\n\nthis.item.updateSource({" + ] + }, + { + "file": "Dew3Ks9yC4DynSMi.js", + "count": 1, + "strings": [ + "|| args.weapon?.system?.attackType ===" + ] + }, + { + "file": "Dk4VF4UXSMK5SaVP.js", + "count": 1, + "strings": [ + "Activated to negate Fumble / Ratée" + ] + }, + { + "file": "E1vUepgop09FF5wy.js", + "count": 1, + "strings": [ + ")\n this.actor.setAdvantage(0)\n this.actor.createEmbeddedDocuments(\"Item\", [frenzy])\n}\nelse if (this.actor.system.status.advantage.value >= 1)\n{\n let data = hatred.toObject();\n data.system.specification.value = \"Close Combat opponents\"\n this.script.notification(" + ] + }, + { + "file": "E3om295BMQojnM2F.js", + "count": 1, + "strings": [ + "Removed Fatigued" + ] + }, + { + "file": "EJaBfqADqlo92Fx6.js", + "count": 1, + "strings": [ + "(To Be Determined)" + ] + }, + { + "file": "FKEH7DeqU0FH4dkk.js", + "count": 1, + "strings": [ + "})\nawait test.roll();\n\nif (test.failed) {\n \tthis.script.scriptMessage(await this.actor.applyBasicDamage(20, {suppressMsg: true}));\n this.script.scriptMessage(" + ] + }, + { + "file": "FPQp6XfbUH1BMafj.js", + "count": 1, + "strings": [ + "Cannot move or act this Turn" + ] + }, + { + "file": "FZFOC7bip0oiWEzk.js", + "count": 1, + "strings": [ + "Added Bleeding" + ] + }, + { + "file": "FiD3mvWIBHNNIuO9.js", + "count": 1, + "strings": [ + "Hit location changed to Head" + ] + }, + { + "file": "FqevMs0ukQ9WuUHl.js", + "count": 1, + "strings": [ + "})\n this.item.update({name :" + ] + }, + { + "file": "GFaTz8f6PBNWrlad.js", + "count": 1, + "strings": [ + ", context : {failure :" + ] + }, + { + "file": "GzSFlqL1YrIK1dxh.js", + "count": 1, + "strings": [ + "Select Wind" + ] + }, + { + "file": "GzsuEg7gZy1f0ljy.js", + "count": 1, + "strings": [ + ")\n bleeding.delete(); \n}\nelse \n{\n this.script.notification(" + ] + }, + { + "file": "HG2fKOfruT5QV3A4.js", + "count": 1, + "strings": [ + "})\n\nlet items = petty.map(i => i.toObject()).concat(arcane.map(i => {\n let spell = i.toObject();\n spell.img = `modules/wfrp4e-core/icons/spells/${lore}.png`\n spell.system.lore.value = lore;\n return spell;\n}));\n\nthis.actor.createEmbeddedDocuments(" + ] + }, + { + "file": "HJ2X4ZtXei0BXbxf.js", + "count": 1, + "strings": [ + "Choose a Skill" + ] + }, + { + "file": "HmImVzvw6ecBy99l.js", + "count": 1, + "strings": [ + "Added Bleeding" + ] + }, + { + "file": "HoNTnPphrJISSQr1.js", + "count": 1, + "strings": [ + "Speak and be known to me" + ] + }, + { + "file": "IAGla7HJlYN0wa4H.js", + "count": 1, + "strings": [ + ") \n{\n if (args.test.failed)\n {\n this.actor.addSystemEffect(" + ] + }, + { + "file": "IN4ZFOPooqJtNuIQ.js", + "count": 1, + "strings": [ + "&& args.weapon?.system?.attackType !==" + ] + }, + { + "file": "J1FPDdrXGctKDTZz.js", + "count": 1, + "strings": [ + ")\n mrData = mr.toObject()\n mrData.system.specification.value = 2\n \n this.actor.createEmbeddedDocuments(" + ] + }, + { + "file": "JXBUE0XuJOJNG7zE.js", + "count": 1, + "strings": [ + ",\n}\n\nlet test = await args.actor.setupSkill(" + ] + }, + { + "file": "JmZQRvdWjm9ykYfn.js", + "count": 1, + "strings": [ + "Cannot be Surprised" + ] + }, + { + "file": "KVpDUEjHhd3nLa0f.js", + "count": 1, + "strings": [ + ", {skipTargets: true, appendTitle : ` - ${this.effect.name}`})\nawait test.roll();\nif (test.failed)\n{\n this.script.message(await game.wfrp4e.tables.formatChatRoll(" + ] + }, + { + "file": "LOL2TGf8p8KxP14D.js", + "count": 1, + "strings": [ + ")[2]\nreturn args.type !=" + ] + }, + { + "file": "LXEUhHuXe8keEPI9.js", + "count": 1, + "strings": [ + "}, skipTargets: true, appendTitle : ` - ${this.effect.name}`})\nawait test.roll();\nif (test.failed)\n{\n\tlet stuns = Math.max(1, Math.abs(test.result.SL))\n\tthis.actor.addCondition(" + ] + }, + { + "file": "MKxYbHOrv0UuA7JB.js", + "count": 1, + "strings": [ + "- Wounded" + ] + }, + { + "file": "MOZn375tGD2060cC.js", + "count": 1, + "strings": [ + "armet-damage" + ] + }, + { + "file": "MPK7U4HLmIAsjdqs.js", + "count": 1, + "strings": [ + ": Ignore 2 APs" + ] + }, + { + "file": "Me1wS5XdqUEy7OGt.js", + "count": 1, + "strings": [ + ";\nlet crit = (await game.wfrp4e.tables.rollTable(critTable)).result;\n\nthis.script.message(" + ] + }, + { + "file": "MfxWXZwaZUjGSBqw.js", + "count": 1, + "strings": [ + "Immune to Ablaze" + ] + }, + { + "file": "Mir4FMHQRdVqazAF.js", + "count": 1, + "strings": [ + ";\n await args.actor.addCondition(\"entangled\");\n if (actorTaille <= 2)\n {\n msg +=" + ] + }, + { + "file": "MnqQkXVp20Lw84I1.js", + "count": 1, + "strings": [ + ", {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields : {difficulty :" + ] + }, + { + "file": "Msygc7oQQPB5fw0b.js", + "count": 1, + "strings": [ + ")\n}\nelse \n{\n\tlet points = this.effect.sourceTest.result.overcast.usage.other.current;\n\tthis.actor.update({\"system.status.corruption.value\" : this.actor.system.status.corruption.value - points})\n\tthis.script.message(" + ] + }, + { + "file": "N2MeOlf0GjPiRcSb.js", + "count": 1, + "strings": [ + "Drops the item" + ] + }, + { + "file": "NTFpkiGyBpOtrV0s.js", + "count": 1, + "strings": [ + "})\nawait test.roll();\nif (test.failed)\n{\n\n let myRoll = await new Roll(\"1d10\").roll({allowInteractive : false});\n let duration = myRoll.total\n this.actor.addSystemEffect(\"nausea\");\n this.script.scriptMessage(" + ] + }, + { + "file": "O45vpR4jDbQQnmvJ.js", + "count": 1, + "strings": [ + "(Target)" + ] + }, + { + "file": "OEy2lxvic37dRBEt.js", + "count": 1, + "strings": [ + "})\n\nlet items = petty.concat(arcane).map(i => i.toObject())\n\nthis.actor.createEmbeddedDocuments(" + ] + }, + { + "file": "OicQSEVZBbqLtrcf.js", + "count": 1, + "strings": [ + "Choose the Critical Wounds to heal (cannot reattach body parts)" + ] + }, + { + "file": "PGHvFHBIygB5pnWT.js", + "count": 1, + "strings": [ + ": Adds @Condition[Ablaze] Condition" + ] + }, + { + "file": "PeZYj8b0vedyJj00.js", + "count": 1, + "strings": [ + "Choose Lore" + ] + }, + { + "file": "PmELrzD3RmF9qKkO.js", + "count": 1, + "strings": [ + "Choose Taille" + ] + }, + { + "file": "Q68WiUWY7GxiXBbT.js", + "count": 1, + "strings": [ + "When Alone" + ] + }, + { + "file": "QBBrzcSAe8QqE4WP.js", + "count": 1, + "strings": [ + ",\n fields: {difficulty: \"challenging\"},\n context: {\n failure:" + ] + }, + { + "file": "QLUaOkwuSPvBp7jU.js", + "count": 1, + "strings": [ + "Cannot attack targets that are not Entangled" + ] + }, + { + "file": "QNxmImpLTou6WdMQ.js", + "count": 1, + "strings": [ + "Can make a Difficult (-10) Willpower Test to prevent the Miscast" + ] + }, + { + "file": "Qgn92fZyc3Psn8QJ.js", + "count": 1, + "strings": [ + ").pop())\n\n if (ones == 0) {\n ones = 10;\n }\n\n if (ones > SL) {\n args.test.data.result.SL =" + ] + }, + { + "file": "RKIFGN583PQnqHGk.js", + "count": 1, + "strings": [ + "Gained 2 Bleeding Conditions" + ] + }, + { + "file": "RSsGiDFibuqg3sHr.js", + "count": 1, + "strings": [ + "Choose a Disease" + ] + }, + { + "file": "RwMw848y13Jq2L4f.js", + "count": 1, + "strings": [ + "});\nawait test.roll();\nif (test.failed)\n{\n\tawait this.actor.addCondition(\"blinded\");\n}\n\nlet msg =" + ] + }, + { + "file": "S3Dev4hleOYqDNe9.js", + "count": 1, + "strings": [ + ")\n }\n else if (this.actor.characteristics.int.bonus + Number(args.test.result.SL) < 0)\n {\n args.test.result.other.push(" + ] + }, + { + "file": "SGr50Hq1AHIEzIFN.js", + "count": 1, + "strings": [ + "Choose Characteristic" + ] + }, + { + "file": "SKn61f2ykhzuwMdw.js", + "count": 1, + "strings": [ + "fumble-roll" + ] + }, + { + "file": "SLy1Fs3oXcHgFgjK.js", + "count": 1, + "strings": [ + "result.overcast.usage.other.current" + ] + }, + { + "file": "SThruXFhxUdNKCG4.js", + "count": 1, + "strings": [ + "});\nawait test.roll();\n\nif (test.failed) {\n this.actor.addCondition('stunned');\n}\n\nthis.script.scriptNotification(" + ] + }, + { + "file": "T0KBl8iEkcPq08RI.js", + "count": 1, + "strings": [ + ": Ignore Magical AP (" + ] + }, + { + "file": "TpgK2aAe93ui3Rbs.js", + "count": 1, + "strings": [ + "fumble-roll" + ] + }, + { + "file": "U26XMie3Kjoddisj.js", + "count": 1, + "strings": [ + "Cleared 1 Stunned Condition" + ] + }, + { + "file": "UsuwsmU1TUQLQVM2.js", + "count": 1, + "strings": [ + ")[0].toLowerCase();\nreturn !args.spell || (args.type ==" + ] + }, + { + "file": "UxVfVoH7cbC9ESDr.js", + "count": 1, + "strings": [ + ",\n fields: {difficulty: \"challenging\"},\n context: {\n failure:" + ] + }, + { + "file": "V9xm4X1x3lPYTQaI.js", + "count": 1, + "strings": [ + "Immune to Peur" + ] + }, + { + "file": "W9nyUNQStMr1pUHJ.js", + "count": 1, + "strings": [ + "Added Bleeding" + ] + }, + { + "file": "WO5n7Vbx8AgoVrwC.js", + "count": 1, + "strings": [ + ", {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(" + ] + }, + { + "file": "WRe1eGmGVGejPcS8.js", + "count": 1, + "strings": [ + ")[2]\nreturn args.type ==" + ] + }, + { + "file": "WaeL2I8VVJmBBKHk.js", + "count": 1, + "strings": [ + "args.actor.addCondition(\"stunned\");\nargs.actor.corruptionDialog(\"moderate\");" + ] + }, + { + "file": "Y7McxsHFeGhwQx0J.js", + "count": 1, + "strings": [ + "damage.value" + ] + }, + { + "file": "YQ2LnLxp0xgy3meI.js", + "count": 1, + "strings": [ + "Gain additional +1 Corruption from" + ] + }, + { + "file": "YRUTliBzAQvncGNX.js", + "count": 1, + "strings": [ + "Added Fatigued" + ] + }, + { + "file": "YsUdMhQ2AArcJIqy.js", + "count": 1, + "strings": [ + ", { permanent: true });\n }\n actor.createEmbeddedDocuments(\"Item\", items);\n}\n\nasync function dialogChoice() {\n for (let c of choice1) \n {\n if (await foundry.applications.api.DialogV2.confirm({window : {title: \"Option\"}, content:" + ] + }, + { + "file": "YySjPfSAPdMAfjsh.js", + "count": 1, + "strings": [ + "Resistance (Magic)" + ] + }, + { + "file": "Z1zriXibT0mAmdhb.js", + "count": 1, + "strings": [ + "this.actor.createEmbeddedDocuments(" + ] + }, + { + "file": "Z52yZDm6lP6fOP3O.js", + "count": 1, + "strings": [ + "Immune to Ablaze" + ] + }, + { + "file": "ZCrfdLPOxiNDCDSg.js", + "count": 1, + "strings": [ + "t use this.effect because it thinks it" + ] + }, + { + "file": "ZCuOjLAeENKN1Q4L.js", + "count": 1, + "strings": [ + "Halve Damage? (Halves Damage from all fire)" + ] + }, + { + "file": "b2Kb4IuD22RhKhR0.js", + "count": 1, + "strings": [ + "No target!" + ] + }, + { + "file": "bLkt8VpTTPoTxW0W.js", + "count": 1, + "strings": [ + "Added Bleeding" + ] + }, + { + "file": "bRtZH0xRh8dgqMeW.js", + "count": 1, + "strings": [ + ");\nthis.actor.createEmbeddedDocuments(" + ] + }, + { + "file": "bT4gLrE3W36DIP4k.js", + "count": 1, + "strings": [ + ": Ignore +1 Metal Armour" + ] + }, + { + "file": "bgLeMqihLya2iobP.js", + "count": 1, + "strings": [ + "Can only be applied to River Troll." + ] + }, + { + "file": "cK1Jysfu5IMUUH0C.js", + "count": 1, + "strings": [ + "Ward improved to" + ] + }, + { + "file": "dWr3tkFoIzsAgelu.js", + "count": 1, + "strings": [ + "Injury reduces to" + ] + }, + { + "file": "dZ4c5pKDqQV02aIK.js", + "count": 1, + "strings": [ + "+ parseInt(this.effect.sourceTest.result.SL)" + ] + }, + { + "file": "ed7Sud9HM3uB2j6b.js", + "count": 1, + "strings": [ + "Yield or die!" + ] + }, + { + "file": "eh1J3s0s4A2AxoFp.js", + "count": 1, + "strings": [ + "(Enemy)" + ] + }, + { + "file": "ekjJQHyMbZT2vqdc.js", + "count": 1, + "strings": [ + ")\nthis.item.setFlag(\"wfrp4e\", \"uses\", uses);\nif (uses >= 3)\n{\n\tthis.effect.update({\"system.transferData.type\" : \"other\"})\n\tthis.script.notification(" + ] + }, + { + "file": "eqxE7nBO13yJS7hc.js", + "count": 1, + "strings": [ + "Wounds Healed" + ] + }, + { + "file": "ezGqDoC9hNRBnFTB.js", + "count": 1, + "strings": [ + "Choose a Weapon" + ] + }, + { + "file": "f29Pv6TQtgILxt1h.js", + "count": 1, + "strings": [ + ")\n }\n else if (this.actor.characteristics.int.bonus + args.test.result.SL < 0)\n args.test.result.other.push(" + ] + }, + { + "file": "fEFfHFeJxkR0aIJK.js", + "count": 1, + "strings": [ + "Everyone within 20 feet loses 1 Wound and makes a Difficult (-10) Résistance or gains @Condition[Deafened]" + ] + }, + { + "file": "g4t56A09yrpZaJQ2.js", + "count": 1, + "strings": [ + "ambre\";\n amberTalons.img = this.effect.img;\n amberTalons.system.damage.value = \"SB + WPB\"\n amberTalons.system.equipped = true;\n amberTalons.system.qualities.value.push({name : \"magical\"})\n amberTalons.effects.push({\n name : \"Serres d" + ] + }, + { + "file": "gMIenSmLklAkB2Zm.js", + "count": 1, + "strings": [ + ", Object.values(game.wfrp4e.config.difficultyNames));\n if (value)\n {\n this.item.updateSource({" + ] + }, + { + "file": "gPQrszvIgGlW9yM4.js", + "count": 1, + "strings": [ + ")\n args.test.preData.reversal = {allowed: true, if:" + ] + }, + { + "file": "ga6bQzPuoIiQQrKg.js", + "count": 1, + "strings": [ + ", {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields : {difficulty :" + ] + }, + { + "file": "hA8PzeiCsHqqlUZm.js", + "count": 1, + "strings": [ + "Gains @Condition[Nausea] for [[1d10]] hours" + ] + }, + { + "file": "hSImyYjL0CENTvXf.js", + "count": 1, + "strings": [ + "}});\nawait test.roll();\nif (test.failed)\n{\n\tawait this.actor.addCondition(\"blinded\");\n}\n\nlet msg =" + ] + }, + { + "file": "hYNWp75ggWSTht55.js", + "count": 1, + "strings": [ + "Can roll on the @Table[crithead]{Head Critical Hits} instead of the normal hit location" + ] + }, + { + "file": "hhv7PrRdlf9sfC82.js", + "count": 1, + "strings": [ + ", {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(" + ] + }, + { + "file": "hpwJRAhCsXTp9bd9.js", + "count": 1, + "strings": [ + "hast)\",\n diff : {\n system : {\n advances : {\n value : 20\n }\n }\n }\n }\n]\n\nlet choice3 = [\n {\n type : \"skill\",\n name : \"Mêlée (Deux mains)\",\n diff : {\n system : {\n advances : {\n value : 20\n }\n }\n }\n }\n]\n\nlet choice = await foundry.applications.api.DialogV2.wait({\n window : {title : \"Choix\"},\n content :\n `\n Sélectionnez votre choix\n
\nApply blunt damage reduction? (-3)
" + ] + }, + { + "file": "mPxmCsXYirAIT913.js", + "count": 1, + "strings": [ + "Choose Characteristic" + ] + }, + { + "file": "mRvLsSVxNyt8LVZb.js", + "count": 1, + "strings": [ + "(To Be Determined)" + ] + }, + { + "file": "mlulnXQo8XU8vKLD.js", + "count": 1, + "strings": [ + "Enter Grim value" + ] + }, + { + "file": "mnvczEiu7gUSWvuV.js", + "count": 1, + "strings": [ + "critical-roll" + ] + }, + { + "file": "naF5EWr1CBkYRZTK.js", + "count": 1, + "strings": [ + "})\n\n if (choice)\n {\n args.abort =" + ] + }, + { + "file": "ngMm7SgtVqVovFJG.js", + "count": 1, + "strings": [ + "action-link critical" + ] + }, + { + "file": "nqWu0ZplxzRiUEAg.js", + "count": 1, + "strings": [ + ", {skipTargets: true, appendTitle : ` - ${this.effect.name}`})\nawait test.roll();\n\n// Kind of insane but whatever\nlet opposedResult = test.opposedMessages[0]?.system.opposedHandler?.resultMessage?.system.opposedTest?.result\n\nreturn opposedResult?.winner ==" + ] + }, + { + "file": "pR4Q2OnPxXtwRVli.js", + "count": 1, + "strings": [ + "Cannot suffer Critical Wounds" + ] + }, + { + "file": "pkKpxVqRHIzywerL.js", + "count": 1, + "strings": [ + "Resisted Ablaze" + ] + }, + { + "file": "pqQkeUVpuZ0jOKnZ.js", + "count": 1, + "strings": [ + "Rolled and applied mutations" + ] + }, + { + "file": "q0LvphC8RDSyR0oY.js", + "count": 1, + "strings": [ + "Choose Characteristic" + ] + }, + { + "file": "qAEZgtu5CrfUkxhx.js", + "count": 1, + "strings": [ + ")\n }\n else if (this.actor.characteristics.int.bonus + Number(args.test.result.SL) < 0)\n {\n args.test.result.other.push(" + ] + }, + { + "file": "qu194dVXm9Vx1TGk.js", + "count": 1, + "strings": [ + ").pop())\n\n if (ones > SL) {\n args.test.data.result.SL =" + ] + }, + { + "file": "rCh3ltUrUMovd2Kc.js", + "count": 1, + "strings": [ + "Cannot be surprised" + ] + }, + { + "file": "rX8FTinyTMj9WJri.js", + "count": 1, + "strings": [ + ")[0]});\n this.actor.addCondition(" + ] + }, + { + "file": "ramav4ymrDDkPKK4.js", + "count": 1, + "strings": [ + "Removed 1 Bleeding Condition" + ] + }, + { + "file": "rpxQU26BU7nwjtqY.js", + "count": 1, + "strings": [ + "}, skipTargets: true, appendTitle : \" - \" + this.effect.name, fields : {difficulty : \"average\"}})\nawait test.roll();\n\n\nif (location && test.failed)\n{\n let dropped = this.item.system.weaponsAtLocation;\n\n if (dropped.length)\n {\n this.script.notification(" + ] + }, + { + "file": "s6eZXfZkC1My6EXl.js", + "count": 1, + "strings": [ + ")[2].toLowerCase();\nif (args.item.type ==" + ] + }, + { + "file": "s8idWt9YdMTRfnjV.js", + "count": 1, + "strings": [ + ");\nthis.actor.createEmbeddedDocuments(" + ] + }, + { + "file": "sB4KB9bT3nQhAoqG.js", + "count": 1, + "strings": [ + "Choose Lore" + ] + }, + { + "file": "sNSfDBIA2k17hPYI.js", + "count": 1, + "strings": [ + "Ignore Ablaze" + ] + }, + { + "file": "sPvfYQEnyAYNpIhF.js", + "count": 1, + "strings": [ + "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?" + ] + }, + { + "file": "sbK1a7txpSoXFzyB.js", + "count": 1, + "strings": [ + ").pop())\n\n if (ones == 0) {\n ones = 10;\n }\n\n\n if (ones > SL) {\n args.test.data.result.SL =" + ] + }, + { + "file": "sjnoYbWpAugyDilW.js", + "count": 1, + "strings": [ + "Animal becomes docile towards Humans, Elves who honour Isha, and similar allies." + ] + }, + { + "file": "tGVEV6TLl310mFLP.js", + "count": 1, + "strings": [ + ": Ignore Non-Magical AP (" + ] + }, + { + "file": "tUwP7TjrOOOnaCYJ.js", + "count": 1, + "strings": [ + ")\n fatigued.delete(); \n}\nelse \n{\n\tthis.script.notification(" + ] + }, + { + "file": "toSrgcvWq9b5eN0K.js", + "count": 1, + "strings": [ + "})\nthis.script.message(" + ] + }, + { + "file": "u46KnlxCjP42F6QY.js", + "count": 1, + "strings": [ + "Personality table not found" + ] + }, + { + "file": "ugL5IBB6R2yWyMWd.js", + "count": 1, + "strings": [ + "})\n if (apply)\n {\n \n let damage = 5 + this.actor.characteristics.wp.bonus;\n \n let loc = args.opposedTest.attackerTest.weapon?.system.usesHands[0] || \"rArm\";\n \n let APatLoc = args.opposedTest.attacker.system.status.armour[loc];\n \n let metalAP = APatLoc.layers.reduce((metal, layer) => metal += (layer.metal ? layer.value : 0), 0)\n \n let APused = Math.max(0, APatLoc.value - metalAP); // remove metal AP at location;\n \n damage -= (APused + args.opposedTest.attacker.system.characteristics.t.bonus)\n \n let msg = await args.opposedTest.attacker.applyBasicDamage(damage, {suppressMsg : true, damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n msg +=" + ] + }, + { + "file": "ulXfbycWUu36vdmS.js", + "count": 1, + "strings": [ + ", fields : {difficulty : \"difficult\", slBonus : -1 * this.effect.sourceTest.result.SL}})\nawait test.roll();\nif (test.succeeded)\n{\n\tthis.script.notification(" + ] + }, + { + "file": "v5xrDWcrTNFJkyQB.js", + "count": 1, + "strings": [ + "Add Option?\n\n Projectiles (Bow) +10 and a Longbow with 12 Arrows\n
" + ] + }, + { + "file": "vFUVWZ1l8wpTjLcx.js", + "count": 1, + "strings": [ + "Target has higher Willpower, no effect" + ] + }, + { + "file": "vc4bELo0cWYoILfB.js", + "count": 1, + "strings": [ + "Choose a disease to heal (must be naturally occuring)" + ] + }, + { + "file": "ve3RcfTi49rdYZU0.js", + "count": 1, + "strings": [ + "- Wounded" + ] + }, + { + "file": "vejhfB9aI58iF1vr.js", + "count": 1, + "strings": [ + ", { permanent: true });\n }\n console.log(\"WISH LIST2\", choice1, items);\n actor.createEmbeddedDocuments(\"Item\", items);\n}\n\nasync function dialogChoice() {\n for (let c of choice1) \n {\n if (await foundry.applications.api.DialogV2.confirm({window : {title: \"Option\"}, content:" + ] + }, + { + "file": "vgfs0DXvF5iKrz1M.js", + "count": 1, + "strings": [ + "|| this.item.getFlag(" + ] + }, + { + "file": "vuzRRj5d9XdNYx3o.js", + "count": 1, + "strings": [ + "Removed Broken" + ] + }, + { + "file": "wyTCozh9qGTx6yK0.js", + "count": 1, + "strings": [ + "Does not need to make Peur or Terror tests" + ] + }, + { + "file": "x1Ecj6MXY94kpcQq.js", + "count": 1, + "strings": [ + ",\"info\")\n}\n\nconst runesOfRestoration = this.item.effects.contents.filter(e => e.name == this.effect.name)\nconst restorationWounds = parseInt(runesOfRestoration.length * this.actor.system.characteristics.t.bonus)\n\nthis.actor.modifyWounds(restorationWounds)\nthis.script.message(" + ] + }, + { + "file": "yzN7ZNlgCiSVJqsU.js", + "count": 1, + "strings": [ + "Applied after effects" + ] + }, + { + "file": "zK38Rl5t9zbFi4Se.js", + "count": 1, + "strings": [ + "Added Bleeding" + ] + }, + { + "file": "zadppy7FEbXvgUON.js", + "count": 1, + "strings": [ + ", {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(" + ] + }, + { + "file": "zxG5KbliWE9xWNQD.js", + "count": 1, + "strings": [ + "Automatically passes any" + ] + } +] \ No newline at end of file diff --git a/tools/extract-translations.js b/tools/extract-translations.js new file mode 100644 index 0000000..d9aefba --- /dev/null +++ b/tools/extract-translations.js @@ -0,0 +1,216 @@ +import fs from 'fs'; +import path from 'path'; +import { fileURLToPath } from 'url'; + +const __filename = fileURLToPath(import.meta.url); +const __dirname = path.dirname(__filename); + +const WFRP4E_DIR = '/home/morr/work/foundryvtt/WFRP4e-FoundryVTT/scripts'; +const FR_DIR = path.join(__dirname, 'scripts'); + +// Fonction pour extraire les chaînes de caractères d'un fichier +function extractStrings(content) { + const strings = new Set(); + + // Patterns pour capturer les chaînes entre guillemets + const patterns = [ + /"([^"]{3,})"/g, // Double quotes + /'([^']{3,})'/g, // Single quotes + /`([^`]{3,})`/g // Backticks (sans interpolation) + ]; + + patterns.forEach(pattern => { + const matches = content.matchAll(pattern); + for (const match of matches) { + const str = match[1].trim(); + // Ignorer les chaînes trop courtes, les nombres, les IDs techniques + if (str.length > 2 && + !str.match(/^[0-9a-f]{16}$/i) && + !str.match(/^[0-9]+$/) && + !str.match(/^[a-z]+$/)) { + strings.add(str); + } + } + }); + + return Array.from(strings); +} + +// Comparer deux fichiers et extraire les traductions +function compareFiles(enFile, frFile) { + const enContent = fs.readFileSync(enFile, 'utf8'); + const frContent = fs.readFileSync(frFile, 'utf8'); + + const enStrings = extractStrings(enContent); + const frStrings = extractStrings(frContent); + + const translations = []; + + // Chercher les différences qui pourraient être des traductions + enStrings.forEach(enStr => { + // Si la chaîne anglaise n'est pas dans le fichier FR + if (!frStrings.includes(enStr)) { + // Chercher une chaîne FR qui pourrait correspondre + // (même longueur approximative, même structure) + const possibleTranslations = frStrings.filter(frStr => { + // Vérifier si la structure est similaire + const lengthRatio = frStr.length / enStr.length; + return lengthRatio > 0.5 && lengthRatio < 2.0; + }); + + if (possibleTranslations.length > 0) { + // Pour l'instant, on stocke toutes les possibilités + possibleTranslations.forEach(frStr => { + translations.push({ en: enStr, fr: frStr }); + }); + } + } + }); + + return translations; +} + +// Analyser tous les fichiers +function analyzeAllScripts() { + const enFiles = fs.readdirSync(WFRP4E_DIR).filter(f => f.endsWith('.js')); + const frFiles = fs.readdirSync(FR_DIR).filter(f => f.endsWith('.js')); + + const allTranslations = new Map(); // en -> Set(fr) + let filesCompared = 0; + let filesWithTranslations = 0; + + console.log('Analyse des scripts...\n'); + + enFiles.forEach(file => { + if (frFiles.includes(file)) { + filesCompared++; + const enPath = path.join(WFRP4E_DIR, file); + const frPath = path.join(FR_DIR, file); + + const translations = compareFiles(enPath, frPath); + + if (translations.length > 0) { + filesWithTranslations++; + translations.forEach(({ en, fr }) => { + if (!allTranslations.has(en)) { + allTranslations.set(en, new Set()); + } + allTranslations.get(en).add(fr); + }); + } + } + }); + + console.log(`Fichiers comparés : ${filesCompared}`); + console.log(`Fichiers avec traductions détectées : ${filesWithTranslations}`); + console.log(`Paires de traduction uniques : ${allTranslations.size}\n`); + + return allTranslations; +} + +// Filtrer les traductions cohérentes +function filterReliableTranslations(translationsMap) { + const reliable = new Map(); + + for (const [en, frSet] of translationsMap.entries()) { + // Si une chaîne anglaise a toujours la même traduction, c'est fiable + if (frSet.size === 1) { + reliable.set(en, Array.from(frSet)[0]); + } + // Si elle a plusieurs traductions mais une dominante (>50%), on la garde + else if (frSet.size <= 3) { + const frArray = Array.from(frSet); + reliable.set(en, frArray[0]); // Pour l'instant, on prend la première + } + } + + return reliable; +} + +// Chercher les occurrences dans les scripts FR +function findUntranslatedInFR(translations) { + const frFiles = fs.readdirSync(FR_DIR).filter(f => f.endsWith('.js')); + const opportunities = []; + + console.log('Recherche des chaînes non traduites dans les scripts FR...\n'); + + frFiles.forEach(file => { + const filePath = path.join(FR_DIR, file); + const content = fs.readFileSync(filePath, 'utf8'); + + for (const [en, fr] of translations.entries()) { + if (content.includes(en)) { + opportunities.push({ + file, + en, + fr + }); + } + } + }); + + return opportunities; +} + +// Main +console.log('Extraction des traductions déjà effectuées...\n'); +console.log('='.repeat(60) + '\n'); + +const allTranslations = analyzeAllScripts(); +const reliableTranslations = filterReliableTranslations(allTranslations); + +console.log('='.repeat(60)); +console.log(`Traductions fiables identifiées : ${reliableTranslations.size}\n`); + +// Afficher un échantillon +let count = 0; +console.log('Échantillon des traductions détectées :'); +console.log('-'.repeat(60)); +for (const [en, fr] of reliableTranslations.entries()) { + if (count++ < 20) { + console.log(`"${en}" → "${fr}"`); + } +} +if (reliableTranslations.size > 20) { + console.log(`... et ${reliableTranslations.size - 20} autres\n`); +} + +// Chercher les opportunités d'application +console.log('\n' + '='.repeat(60)); +const opportunities = findUntranslatedInFR(reliableTranslations); + +console.log(`Opportunités de traduction trouvées : ${opportunities.length}\n`); + +// Regrouper par fichier +const byFile = new Map(); +opportunities.forEach(({ file, en, fr }) => { + if (!byFile.has(file)) { + byFile.set(file, []); + } + byFile.get(file).push({ en, fr }); +}); + +console.log('Fichiers avec opportunités de traduction :'); +console.log('-'.repeat(60)); +for (const [file, trans] of byFile.entries()) { + console.log(`${file} : ${trans.length} traduction(s) à appliquer`); +} + +// Sauvegarder les résultats +const results = { + reliableTranslations: Object.fromEntries(reliableTranslations), + opportunities: Array.from(byFile.entries()).map(([file, trans]) => ({ + file, + translations: trans + })) +}; + +fs.writeFileSync( + path.join(__dirname, 'translation-opportunities.json'), + JSON.stringify(results, null, 2), + 'utf8' +); + +console.log('\n' + '='.repeat(60)); +console.log('Résultats sauvegardés dans translation-opportunities.json'); +console.log('='.repeat(60)); diff --git a/tools/find-english-texts.js b/tools/find-english-texts.js new file mode 100644 index 0000000..6dcbcef --- /dev/null +++ b/tools/find-english-texts.js @@ -0,0 +1,216 @@ +import fs from 'fs'; +import path from 'path'; +import { fileURLToPath } from 'url'; + +const __filename = fileURLToPath(import.meta.url); +const __dirname = path.dirname(__filename); + +const FR_DIR = path.join(__dirname, 'scripts'); + +// Mots anglais communs pour détecter du texte en anglais +const englishWords = [ + 'the', 'and', 'or', 'to', 'from', 'with', 'without', 'has', 'have', 'had', + 'is', 'are', 'was', 'were', 'been', 'being', 'will', 'would', 'should', + 'can', 'could', 'may', 'might', 'must', 'shall', + 'this', 'that', 'these', 'those', 'what', 'which', 'who', 'when', 'where', + 'not', 'all', 'any', 'each', 'every', 'some', 'other', 'another', + 'gain', 'gained', 'lose', 'lost', 'add', 'added', 'remove', 'removed', + 'take', 'taken', 'give', 'given', 'make', 'made', 'find', 'found', + 'get', 'got', 'set', 'put', 'use', 'used', 'using', + 'apply', 'applied', 'test', 'tested', 'roll', 'rolled', + 'if', 'else', 'while', 'for', 'return', // Mots-clés JS à ignorer dans le code + 'failed', 'passed', 'success', 'failure', 'check', 'checked', + 'attack', 'damage', 'heal', 'healed', 'wound', 'wounded', + 'spell', 'cast', 'casting', 'magic', 'effect', 'affected', + 'target', 'targets', 'hit', 'miss', 'critical', + 'weapon', 'armour', 'armor', 'shield', 'equipped', + 'skill', 'talent', 'trait', 'ability', 'bonus', + 'enter', 'choose', 'select', 'click', 'press', + 'must', 'need', 'require', 'required', 'cannot', 'unable', + 'ignore', 'ignored', 'prevent', 'prevented', 'resist', 'resisted', + 'duration', 'permanent', 'temporary', 'condition', 'status', + 'character', 'actor', 'creature', 'enemy', 'ally', + 'during', 'until', 'after', 'before', 'when', 'while' +]; + +// Patterns de textes techniques à ignorer (clés, IDs, etc.) +const technicalPatterns = [ + /^[a-z]+$/, // Tout en minuscules (probablement une clé) + /^[0-9]+$/, // Que des chiffres + /^[0-9a-f]{16}$/i, // Hash/ID + /^[a-z_]+$/, // snake_case (clé technique) + /^[a-z][a-zA-Z]+$/, // camelCase (clé technique) + /^\$\{.*\}$/, // Template literal variable + /^system\./, // Chemin système + /^wfrp4e/, // Préfixe système + /^@/, // Référence (ex: @Condition) + /^[A-Z]{2,}$/, // Acronymes courts + /^[\w-]{1,10}$/, // Clés courtes +]; + +// Fonction pour extraire les chaînes d'un fichier +function extractStrings(content) { + const strings = new Set(); + + // Patterns pour capturer les chaînes entre guillemets + // On évite les template literals complexes avec interpolation + const patterns = [ + /"([^"]{3,})"/g, // Double quotes + /'([^']{3,})'/g, // Single quotes + ]; + + patterns.forEach(pattern => { + const matches = content.matchAll(pattern); + for (const match of matches) { + const str = match[1].trim(); + if (str.length > 2) { + strings.add(str); + } + } + }); + + // Pour les template literals, on cherche ceux sans interpolation ou simples + const backtickPattern = /`([^`\$]{3,})`/g; + const backtickMatches = content.matchAll(backtickPattern); + for (const match of backtickMatches) { + const str = match[1].trim(); + if (str.length > 2) { + strings.add(str); + } + } + + return Array.from(strings); +} + +// Fonction pour détecter si une chaîne est probablement du texte en anglais +function isEnglishText(str) { + // Ignorer les patterns techniques + for (const pattern of technicalPatterns) { + if (pattern.test(str)) { + return false; + } + } + + // Ignorer les chaînes trop courtes + if (str.length < 3) { + return false; + } + + // Convertir en minuscules pour la comparaison + const lowerStr = str.toLowerCase(); + + // Vérifier la présence de mots anglais + const words = lowerStr.split(/\W+/); + const englishWordCount = words.filter(word => + englishWords.includes(word) && word.length > 1 + ).length; + + // Si au moins 1 mot anglais significatif est trouvé, c'est probablement de l'anglais + if (englishWordCount > 0) { + return true; + } + + // Patterns de phrases anglaises typiques + const englishPhrases = [ + /\b(the|a|an)\s+\w+/i, + /\b(cannot|can't|won't|don't|doesn't)\b/i, + /\b(must|should|will|would)\s+\w+/i, + /\b(has|have|had)\s+(been|gained|lost|acquired)/i, + /\b(enter|choose|select)\s+\w+/i, + /\b(rolled?|passed?|failed?)\b/i, + ]; + + for (const pattern of englishPhrases) { + if (pattern.test(str)) { + return true; + } + } + + return false; +} + +// Fonction pour filtrer les faux positifs évidents +function shouldIgnore(str) { + // Ignorer les chemins et références système + if (str.includes('Compendium.') || str.includes('UUID[')) { + return true; + } + + // Ignorer les noms de propriétés système + if (str.match(/^(system|flags|data|items|effects|actor|token)\./)) { + return true; + } + + // Ignorer les expressions JavaScript + if (str.match(/^(let|const|var|function|return|if|else|for|while)\b/)) { + return true; + } + + return false; +} + +// Analyser tous les fichiers +function analyzeScripts() { + const files = fs.readdirSync(FR_DIR).filter(f => f.endsWith('.js')); + const results = []; + + console.log(`Analyse de ${files.length} fichiers...\n`); + + files.forEach(file => { + const filePath = path.join(FR_DIR, file); + const content = fs.readFileSync(filePath, 'utf8'); + const strings = extractStrings(content); + + const englishStrings = strings.filter(str => { + if (shouldIgnore(str)) return false; + return isEnglishText(str); + }); + + if (englishStrings.length > 0) { + results.push({ + file, + count: englishStrings.length, + strings: englishStrings + }); + } + }); + + return results; +} + +// Main +console.log('Recherche des textes anglais dans les scripts FR...\n'); +console.log('='.repeat(60)); + +const results = analyzeScripts(); + +console.log('\n' + '='.repeat(60)); +console.log(`Fichiers avec du texte anglais : ${results.length}\n`); + +// Trier par nombre de chaînes anglaises (décroissant) +results.sort((a, b) => b.count - a.count); + +// Afficher les résultats +let totalStrings = 0; +results.forEach(({ file, count, strings }) => { + totalStrings += count; + console.log(`\n${file} (${count} texte(s) anglais) :`); + console.log('-'.repeat(60)); + strings.forEach(str => { + // Limiter la longueur affichée + const displayStr = str.length > 80 ? str.substring(0, 77) + '...' : str; + console.log(` • ${displayStr}`); + }); +}); + +console.log('\n' + '='.repeat(60)); +console.log('Résumé :'); +console.log('-'.repeat(60)); +console.log(`Fichiers avec texte anglais : ${results.length}/${fs.readdirSync(FR_DIR).filter(f => f.endsWith('.js')).length}`); +console.log(`Total de textes anglais détectés : ${totalStrings}`); +console.log('='.repeat(60)); + +// Sauvegarder dans un fichier JSON +const outputFile = path.join(__dirname, 'english-texts-found.json'); +fs.writeFileSync(outputFile, JSON.stringify(results, null, 2), 'utf8'); +console.log(`\nRésultats sauvegardés dans : english-texts-found.json`); diff --git a/tools/generate-review-report.js b/tools/generate-review-report.js new file mode 100644 index 0000000..920ccbd --- /dev/null +++ b/tools/generate-review-report.js @@ -0,0 +1,103 @@ +import fs from 'node:fs'; +import path from 'node:path'; +import { fileURLToPath } from 'node:url'; + +const __dirname = path.dirname(fileURLToPath(import.meta.url)); +const WFRP4E_SCRIPTS = '/home/morr/work/foundryvtt/WFRP4e-FoundryVTT/scripts'; +const FR_SCRIPTS = '/home/morr/work/foundryvtt/foundryvtt-wh4-lang-fr-fr/scripts'; +const REVIEW_FILE = path.join(__dirname, 'scripts-to-review.json'); +const REPORT_FILE = path.join(__dirname, 'review-comparison.md'); + +const scriptsToReview = JSON.parse(fs.readFileSync(REVIEW_FILE, 'utf-8')); + +let report = `# Scripts nécessitant révision manuelle\n\n`; +report += `Total de scripts: ${scriptsToReview.length}\n\n`; +report += `Ces scripts contiennent des traductions en français mais ont été modifiés dans WFRP4E.\n`; +report += `Ils nécessitent une révision manuelle pour intégrer les changements tout en préservant les traductions.\n\n`; +report += `---\n\n`; + +scriptsToReview.forEach(({file}, index) => { + const wfrp4ePath = path.join(WFRP4E_SCRIPTS, file); + const frPath = path.join(FR_SCRIPTS, file); + + const wfrp4eContent = fs.readFileSync(wfrp4ePath, 'utf-8'); + const frContent = fs.readFileSync(frPath, 'utf-8'); + + report += `## ${index + 1}. ${file}\n\n`; + + // Extraire les différences notables + const wfrp4eLines = wfrp4eContent.split('\n').length; + const frLines = frContent.split('\n').length; + + report += `- **Lignes WFRP4E**: ${wfrp4eLines}\n`; + report += `- **Lignes FR**: ${frLines}\n`; + report += `- **Différence**: ${wfrp4eLines - frLines} lignes\n\n`; + + // Extraire les textes notables + const wfrp4eTexts = extractNotableTexts(wfrp4eContent); + const frTexts = extractNotableTexts(frContent); + + if (wfrp4eTexts.length > 0 || frTexts.length > 0) { + report += `### Textes identifiés\n\n`; + + if (wfrp4eTexts.length > 0) { + report += `**WFRP4E (anglais)**:\n`; + wfrp4eTexts.forEach(text => { + report += `- \`${text}\`\n`; + }); + report += `\n`; + } + + if (frTexts.length > 0) { + report += `**FR (français)**:\n`; + frTexts.forEach(text => { + report += `- \`${text}\`\n`; + }); + report += `\n`; + } + } + + // Afficher le code côte à côte si court + if (wfrp4eLines < 30 && frLines < 30) { + report += `### Code WFRP4E\n\n\`\`\`javascript\n${wfrp4eContent}\n\`\`\`\n\n`; + report += `### Code FR\n\n\`\`\`javascript\n${frContent}\n\`\`\`\n\n`; + } + + report += `### Actions recommandées\n\n`; + report += `- [ ] Vérifier les changements structurels dans WFRP4E\n`; + report += `- [ ] Intégrer les modifications tout en gardant les traductions FR\n`; + report += `- [ ] Tester le script après modification\n\n`; + report += `---\n\n`; +}); + +function extractNotableTexts(content) { + const texts = new Set(); + + // Patterns pour extraire les textes + const patterns = [ + /ui\.notifications\.(info|warn|error|notify)\s*\(\s*["'`]([^"'`]+)["'`]/g, + /this\.script\.(scriptNotification|scriptMessage|notification)\s*\(\s*["'`]([^"'`]+)["'`]/g, + /["'`](Loading|Could not find|Chargement|Impossible de trouver|créé|modifié|supprimé)[^"'`]*["'`]/gi + ]; + + patterns.forEach(pattern => { + const matches = content.matchAll(pattern); + for (const match of matches) { + const text = match[2] || match[1]; + if (text && text.length > 3 && text.length < 100) { + texts.add(text); + } + } + }); + + return Array.from(texts); +} + +fs.writeFileSync(REPORT_FILE, report, 'utf-8'); + +console.log(`\nRapport de révision généré: ${REPORT_FILE}`); +console.log(`\nNombre de scripts à réviser: ${scriptsToReview.length}`); +console.log(`\nOuvrez le fichier avec votre éditeur préféré pour réviser les scripts.`); +console.log(`Vous pouvez aussi utiliser un outil de diff comme 'meld' ou 'kdiff3' pour comparer:`); +console.log(`\nExemple:`); +console.log(` meld ${FR_SCRIPTS}/${scriptsToReview[0].file} ${WFRP4E_SCRIPTS}/${scriptsToReview[0].file}`); diff --git a/tools/generate-translation-report.js b/tools/generate-translation-report.js new file mode 100644 index 0000000..03bb59f --- /dev/null +++ b/tools/generate-translation-report.js @@ -0,0 +1,193 @@ +import fs from 'fs'; +import path from 'path'; +import { fileURLToPath } from 'url'; + +const __filename = fileURLToPath(import.meta.url); +const __dirname = path.dirname(__filename); + +const WFRP4E_DIR = '/home/morr/work/foundryvtt/WFRP4e-FoundryVTT/scripts'; +const FR_DIR = path.join(__dirname, 'scripts'); +const TRANSLATIONS_FILE = path.join(__dirname, 'auto-translations-applied.json'); + +// Charger le mapping de traductions +const translations = JSON.parse(fs.readFileSync(TRANSLATIONS_FILE, 'utf8')); + +// Fonction pour générer le diff d'un fichier +function generateFileDiff(file) { + const frPath = path.join(FR_DIR, file); + const enPath = path.join(WFRP4E_DIR, file); + + if (!fs.existsSync(frPath) || !fs.existsSync(enPath)) { + return null; + } + + const frContent = fs.readFileSync(frPath, 'utf8'); + const enContent = fs.readFileSync(enPath, 'utf8'); + + const changes = []; + + // Trouver les traductions appliquées dans ce fichier + for (const [en, fr] of Object.entries(translations)) { + if (frContent.includes(fr) && enContent.includes(en)) { + changes.push({ en, fr }); + } + } + + return { + file, + changes, + frLines: frContent.split('\n').length, + enLines: enContent.split('\n').length + }; +} + +// Générer le rapport +console.log('Génération du rapport de traduction...\n'); + +const modifiedFiles = []; + +// Lire tous les fichiers JS du répertoire FR +const files = fs.readdirSync(FR_DIR).filter(f => f.endsWith('.js')); + +files.forEach(file => { + const diff = generateFileDiff(file); + if (diff && diff.changes.length > 0) { + modifiedFiles.push(diff); + } +}); + +// Trier par nombre de changements (décroissant) +modifiedFiles.sort((a, b) => b.changes.length - a.changes.length); + +// Générer le rapport Markdown +let report = `# Rapport de Traduction Automatique\n\n`; +report += `**Date**: ${new Date().toLocaleDateString('fr-FR')}\n\n`; +report += `**Fichiers modifiés**: ${modifiedFiles.length}\n`; +report += `**Traductions uniques appliquées**: ${Object.keys(translations).length}\n\n`; +report += `---\n\n`; + +// Statistiques globales +const totalChanges = modifiedFiles.reduce((sum, file) => sum + file.changes.length, 0); +report += `## Statistiques\n\n`; +report += `- **Total de fichiers analysés**: ${files.length}\n`; +report += `- **Fichiers modifiés**: ${modifiedFiles.length}\n`; +report += `- **Total de changements**: ${totalChanges}\n`; +report += `- **Moyenne de changements par fichier**: ${(totalChanges / modifiedFiles.length).toFixed(2)}\n\n`; + +// Top 20 des fichiers les plus modifiés +report += `## Top 20 des fichiers les plus modifiés\n\n`; +report += `| Fichier | Changements |\n`; +report += `|---------|-------------|\n`; +modifiedFiles.slice(0, 20).forEach(({ file, changes }) => { + report += `| ${file} | ${changes.length} |\n`; +}); +report += `\n`; + +// Traductions les plus fréquentes +const translationFrequency = new Map(); +modifiedFiles.forEach(({ changes }) => { + changes.forEach(({ en, fr }) => { + const key = `${en} → ${fr}`; + translationFrequency.set(key, (translationFrequency.get(key) || 0) + 1); + }); +}); + +const sortedTranslations = Array.from(translationFrequency.entries()) + .sort((a, b) => b[1] - a[1]) + .slice(0, 30); + +report += `## Top 30 des traductions les plus appliquées\n\n`; +report += `| Traduction | Occurrences |\n`; +report += `|------------|-------------|\n`; +sortedTranslations.forEach(([translation, count]) => { + const [en, fr] = translation.split(' → '); + const enShort = en.length > 60 ? en.substring(0, 57) + '...' : en; + const frShort = fr.length > 60 ? fr.substring(0, 57) + '...' : fr; + report += `| \`${enShort}\` → \`${frShort}\` | ${count} |\n`; +}); +report += `\n`; + +// Détails par fichier (exemples significatifs) +report += `## Exemples de modifications détaillées\n\n`; +report += `Voici quelques exemples de fichiers avec leurs traductions appliquées :\n\n`; + +modifiedFiles.slice(0, 10).forEach(({ file, changes }) => { + report += `### ${file}\n\n`; + report += `**Nombre de traductions**: ${changes.length}\n\n`; + + changes.slice(0, 5).forEach(({ en, fr }) => { + const enDisplay = en.length > 80 ? en.substring(0, 77) + '...' : en; + const frDisplay = fr.length > 80 ? fr.substring(0, 77) + '...' : fr; + report += `- ✏️ \`${enDisplay}\`\n`; + report += ` → \`${frDisplay}\`\n\n`; + }); + + if (changes.length > 5) { + report += `... et ${changes.length - 5} autre(s) traduction(s)\n\n`; + } +}); + +// Traductions potentiellement problématiques +report += `## ⚠️ Traductions à vérifier\n\n`; +report += `Certaines traductions automatiques peuvent nécessiter une révision manuelle :\n\n`; + +const problematicPatterns = [ + { pattern: /effet\./, reason: "Vérifier que 'effect' -> 'effet' est approprié dans le contexte" }, + { pattern: /Retiré/, reason: "Vérifier l'accord (retiré/retirée/retirés/retirées)" }, + { pattern: /Ajouté/, reason: "Vérifier l'accord (ajouté/ajoutée/ajoutés/ajoutées)" }, + { pattern: /Appliqué/, reason: "Vérifier l'accord (appliqué/appliquée/appliqués/appliquées)" }, +]; + +const filesToReview = new Map(); + +modifiedFiles.forEach(({ file, changes }) => { + changes.forEach(({ fr }) => { + problematicPatterns.forEach(({ pattern, reason }) => { + if (pattern.test(fr)) { + if (!filesToReview.has(reason)) { + filesToReview.set(reason, []); + } + filesToReview.get(reason).push({ file, translation: fr }); + } + }); + }); +}); + +for (const [reason, items] of filesToReview.entries()) { + report += `### ${reason}\n\n`; + const uniqueItems = [...new Map(items.map(item => [item.file, item])).values()].slice(0, 10); + uniqueItems.forEach(({ file, translation }) => { + const transShort = translation.length > 80 ? translation.substring(0, 77) + '...' : translation; + report += `- **${file}**: \`${transShort}\`\n`; + }); + if (items.length > 10) { + report += `\n... et ${items.length - 10} autre(s) occurrence(s)\n`; + } + report += `\n`; +} + +// Recommandations +report += `## 📋 Recommandations\n\n`; +report += `1. **Vérifier les accords grammaticaux** : Les participes passés (ajouté, retiré, appliqué) doivent s'accorder avec leur sujet.\n`; +report += `2. **Vérifier les contextes** : Certains mots comme "effect" peuvent être du code (à ne pas traduire) ou du texte (à traduire).\n`; +report += `3. **Tester en jeu** : Vérifier que les messages affichés aux joueurs sont grammaticalement corrects.\n`; +report += `4. **Révision manuelle** : Consulter les fichiers avec le plus de changements pour s'assurer de la cohérence.\n\n`; + +// Sauvegarder le rapport +const reportFile = path.join(__dirname, 'rapport-traduction-automatique.md'); +fs.writeFileSync(reportFile, report, 'utf8'); + +console.log('='.repeat(60)); +console.log('Rapport généré avec succès !'); +console.log('='.repeat(60)); +console.log(`Fichier : rapport-traduction-automatique.md`); +console.log(`\nStatistiques :`); +console.log(`- ${modifiedFiles.length} fichiers modifiés`); +console.log(`- ${totalChanges} changements au total`); +console.log(`- ${Object.keys(translations).length} traductions uniques`); +console.log('='.repeat(60)); + +// Afficher un aperçu du rapport +console.log('\n📄 APERÇU DU RAPPORT\n'); +console.log(report.split('\n').slice(0, 50).join('\n')); +console.log('\n... (voir le fichier complet pour plus de détails)'); diff --git a/tools/replace-review-scripts.js b/tools/replace-review-scripts.js new file mode 100644 index 0000000..33a9bd9 --- /dev/null +++ b/tools/replace-review-scripts.js @@ -0,0 +1,154 @@ +import fs from 'node:fs'; +import path from 'node:path'; +import { fileURLToPath } from 'node:url'; + +const __dirname = path.dirname(fileURLToPath(import.meta.url)); +const WFRP4E_SCRIPTS = '/home/morr/work/foundryvtt/WFRP4e-FoundryVTT/scripts'; +const FR_SCRIPTS = '/home/morr/work/foundryvtt/foundryvtt-wh4-lang-fr-fr/scripts'; +const REVIEW_FILE = path.join(__dirname, 'scripts-to-review.json'); +const OUTPUT_FILE = path.join(__dirname, 'scripts-replaced-list.md'); + +const scriptsToReview = JSON.parse(fs.readFileSync(REVIEW_FILE, 'utf-8')); + +console.log(`\n=== REMPLACEMENT DES SCRIPTS PAR LES VERSIONS SYSTÈME ===\n`); +console.log(`Nombre de scripts à remplacer: ${scriptsToReview.length}\n`); + +let replaced = 0; +let errors = []; +const replacedList = []; + +scriptsToReview.forEach(({file, reason}, index) => { + const wfrp4ePath = path.join(WFRP4E_SCRIPTS, file); + const frPath = path.join(FR_SCRIPTS, file); + const backupPath = frPath + '.fr-backup'; + + try { + // Sauvegarder la version FR avec traductions + if (fs.existsSync(frPath)) { + fs.copyFileSync(frPath, backupPath); + } + + // Remplacer par la version WFRP4E + if (fs.existsSync(wfrp4ePath)) { + fs.copyFileSync(wfrp4ePath, frPath); + replaced++; + + // Extraire les textes traduits de la sauvegarde pour référence + const frContent = fs.readFileSync(backupPath, 'utf-8'); + const translations = extractTranslations(frContent); + + replacedList.push({ + index: index + 1, + file, + translations + }); + + console.log(`✓ [${index + 1}/${scriptsToReview.length}] ${file}`); + } else { + errors.push(`Source non trouvée: ${file}`); + console.log(`✗ [${index + 1}/${scriptsToReview.length}] ${file} - Source non trouvée`); + } + } catch (error) { + errors.push(`${file}: ${error.message}`); + console.log(`✗ [${index + 1}/${scriptsToReview.length}] ${file} - Erreur: ${error.message}`); + } +}); + +function extractTranslations(content) { + const translations = []; + + // Patterns pour extraire les textes en français + const patterns = [ + /ui\.notifications\.(info|warn|error|notify)\s*\(\s*["'`]([^"'`]+)["'`]/g, + /this\.script\.(scriptNotification|scriptMessage|notification)\s*\(\s*["'`]([^"'`]+)["'`]/g, + /["'`](Chargement|Impossible|Êtes-vous|Voulez-vous|créé|modifié|supprimé|Erreur)[^"'`]*["'`]/gi, + /warhammer\.utility\.findAllItems\([^,]+,\s*["'`]([^"'`]+)["'`]/g + ]; + + patterns.forEach(pattern => { + const regex = new RegExp(pattern.source, pattern.flags); + let match; + while ((match = regex.exec(content)) !== null) { + const text = match[2] || match[1]; + if (text && text.length > 3 && /[a-zàâäéèêëïîôöùûüÿçœæ]/i.test(text)) { + if (!translations.includes(text)) { + translations.push(text); + } + } + } + }); + + return translations; +} + +// Générer le rapport +let report = `# Scripts remplacés par les versions système\n\n`; +report += `Date: ${new Date().toISOString()}\n\n`; +report += `## Résumé\n\n`; +report += `- **Scripts remplacés**: ${replaced}\n`; +report += `- **Erreurs**: ${errors.length}\n\n`; +report += `Tous les scripts ont été remplacés par leurs versions du système WFRP4E.\n`; +report += `Les versions françaises avec traductions sont sauvegardées avec l'extension \`.fr-backup\`.\n\n`; + +if (errors.length > 0) { + report += `## Erreurs\n\n`; + errors.forEach(error => { + report += `- ${error}\n`; + }); + report += `\n`; +} + +report += `## Scripts à revoir manuellement\n\n`; +report += `Pour chaque script, vous devez :\n`; +report += `1. Comparer la version actuelle (système) avec le backup (.fr-backup)\n`; +report += `2. Identifier les textes à traduire\n`; +report += `3. Appliquer les traductions nécessaires\n\n`; + +report += `| # | Fichier | Traductions trouvées |\n`; +report += `|---|---------|----------------------|\n`; + +replacedList.forEach(({index, file, translations}) => { + const translationsText = translations.length > 0 + ? translations.slice(0, 3).join(', ') + (translations.length > 3 ? '...' : '') + : 'Aucune'; + report += `| ${index} | \`${file}\` | ${translationsText} |\n`; +}); + +report += `\n## Commandes utiles\n\n`; +report += `### Comparer un script avec son backup\n\n`; +report += `\`\`\`bash\n`; +report += `# Avec meld\n`; +report += `meld scripts/${this.actor.prototypeToken.name} :\n
${this.actor.prototypeToken.name} reçoit le Trait de Créatuer A Sang Froid et peut inverser n"
+ ]
+ },
+ {
+ "file": "6BmvV9c03FkfisnE.js",
+ "wfrp4eSize": 1069,
+ "frSize": 1107,
+ "wfrp4eTexts": [],
+ "frTexts": [
+ "${this.actor.name} porte le ${this.item.name}.
\n 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",
+ "${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."
+ ]
+ },
+ {
+ "file": "6H6vNjzvMGl2ZqCR.js",
+ "wfrp4eSize": 285,
+ "frSize": 305,
+ "wfrp4eTexts": [],
+ "frTexts": [
+ "Lame de Nurglitch: ${args.actor.name} doit réussir un Test d"
+ ]
+ },
+ {
+ "file": "6QZUX7ZrFxOzqI0b.js",
+ "wfrp4eSize": 252,
+ "frSize": 268,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "6hAgggYpNR3r4QWC.js",
+ "wfrp4eSize": 279,
+ "frSize": 281,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "6jcTzK1XEuWqAacN.js",
+ "wfrp4eSize": 142,
+ "frSize": 159,
+ "wfrp4eTexts": [
+ "Cannot use ${game.wfrp4e.config.locations[this.effect.getFlag("
+ ],
+ "frTexts": [
+ "Impossible d"
+ ]
+ },
+ {
+ "file": "6jp8slPU33oBQe1V.js",
+ "wfrp4eSize": 55,
+ "frSize": 55,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "6kifXp2jXEaQVJsg.js",
+ "wfrp4eSize": 215,
+ "frSize": 338,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "6mpw9cGseG4W4eyd.js",
+ "wfrp4eSize": 299,
+ "frSize": 311,
+ "wfrp4eTexts": [
+ "Advantage Subtracted",
+ "Not enough Advantage!"
+ ],
+ "frTexts": [
+ "Avvantage soustrait",
+ "Pas assez d"
+ ]
+ },
+ {
+ "file": "6oSs8qKFNFz2lSmh.js",
+ "wfrp4eSize": 100,
+ "frSize": 99,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "6qJP0hpShEM43ohx.js",
+ "wfrp4eSize": 844,
+ "frSize": 853,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "6uldpFvKOCoW92cC.js",
+ "wfrp4eSize": 293,
+ "frSize": 278,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "6xTtJEhRc4OjcDTf.js",
+ "wfrp4eSize": 174,
+ "frSize": 183,
+ "wfrp4eTexts": [
+ "Cannot update Fortune"
+ ],
+ "frTexts": [
+ "Impossible de mettre à jour la Fortune"
+ ]
+ },
+ {
+ "file": "7F6aGxZJjwxm5e5P.js",
+ "wfrp4eSize": 640,
+ "frSize": 642,
+ "wfrp4eTexts": [
+ "Lost ${value} Wounds"
+ ],
+ "frTexts": [
+ "Lost ${value} Wounds"
+ ]
+ },
+ {
+ "file": "7JW9t8AYSDkkzG2V.js",
+ "wfrp4eSize": 967,
+ "frSize": 1002,
+ "wfrp4eTexts": [],
+ "frTexts": [
+ "${this.actor.name} porte le ${this.item.name}.
\n Si le personnage porte le masque pendant plus d",
+ "${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."
+ ]
+ },
+ {
+ "file": "7WR2hJjHPhHhHxAq.js",
+ "wfrp4eSize": 236,
+ "frSize": 251,
+ "wfrp4eTexts": [
+ "Removed ${poisoned.conditionValue} Poisoned Conditions",
+ "No Poisoned Conditions"
+ ],
+ "frTexts": [
+ "Suppression de ${poisoned.conditionValue} états Empoisonné",
+ "Aucun état Empoisonné"
+ ]
+ },
+ {
+ "file": "7ZoFUMDG2WJd8RMg.js",
+ "wfrp4eSize": 74,
+ "frSize": 91,
+ "wfrp4eTexts": [],
+ "frTexts": [
+ "Revendiquer le Bonus de ${this.effect.name} "
+ ]
+ },
+ {
+ "file": "7f6OsttTzE7Hvzfk.js",
+ "wfrp4eSize": 170,
+ "frSize": 168,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "7n3SEAGRA5ESK8gV.js",
+ "wfrp4eSize": 27,
+ "frSize": 27,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "7w7QA7GBhzZ98OS0.js",
+ "wfrp4eSize": 882,
+ "frSize": 874,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "7wBWUw05q0igh508.js",
+ "wfrp4eSize": 852,
+ "frSize": 860,
+ "wfrp4eTexts": [],
+ "frTexts": [
+ "
${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"
+ ]
+ },
+ {
+ "file": "8GyJgdHVBaLrHCY8.js",
+ "wfrp4eSize": 684,
+ "frSize": 689,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "8TRiAJ8thIKE4IoL.js",
+ "wfrp4eSize": 196,
+ "frSize": 182,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "8araLuwmBq8GKEw3.js",
+ "wfrp4eSize": 310,
+ "frSize": 323,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "8rq4GL5d5nCn4kO7.js",
+ "wfrp4eSize": 240,
+ "frSize": 249,
+ "wfrp4eTexts": [],
+ "frTexts": [
+ "${this.actor.prototypeToken.name} regagne ${healed} Blessures"
+ ]
+ },
+ {
+ "file": "8tyMXDfHR8AJBdDu.js",
+ "wfrp4eSize": 288,
+ "frSize": 296,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "8xqYrBIf1Zhlwizg.js",
+ "wfrp4eSize": 1193,
+ "frSize": 1190,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "8zTkDVziBPaNbMQX.js",
+ "wfrp4eSize": 607,
+ "frSize": 617,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "96Y1yIH1lRjTs5hL.js",
+ "wfrp4eSize": 102,
+ "frSize": 116,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "98nKfcimlaPeM9h5.js",
+ "wfrp4eSize": 129,
+ "frSize": 135,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "9A7rYY3FKi5XLihG.js",
+ "wfrp4eSize": 423,
+ "frSize": 437,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "9VfeubiCV83LN9iY.js",
+ "wfrp4eSize": 216,
+ "frSize": 212,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "9WZa63lr0K3SsP4G.js",
+ "wfrp4eSize": 192,
+ "frSize": 202,
+ "wfrp4eTexts": [
+ "Applied after effects"
+ ],
+ "frTexts": [
+ "Applique après les effets"
+ ]
+ },
+ {
+ "file": "9Yn9uViEjcuaESJ2.js",
+ "wfrp4eSize": 232,
+ "frSize": 235,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "A0OK0qAMmnf8iNJf.js",
+ "wfrp4eSize": 382,
+ "frSize": 391,
+ "wfrp4eTexts": [],
+ "frTexts": [
+ "Reçoit ${Math.abs(args.test.result.SL)} Points de Corruption"
+ ]
+ },
+ {
+ "file": "A1odAcuRbq9797ZB.js",
+ "wfrp4eSize": 1946,
+ "frSize": 1908,
+ "wfrp4eTexts": [
+ "Could not find ${talent}"
+ ],
+ "frTexts": [
+ "Impossible de trouver ${talent}"
+ ]
+ },
+ {
+ "file": "A6DcKPzAGntzSCil.js",
+ "wfrp4eSize": 187,
+ "frSize": 184,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "ACtDCTLZXmd5uXjX.js",
+ "wfrp4eSize": 419,
+ "frSize": 430,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "AGD7zCyV4zruvnWu.js",
+ "wfrp4eSize": 122,
+ "frSize": 121,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "AMI2wDJqsIZsoq1e.js",
+ "wfrp4eSize": 372,
+ "frSize": 368,
+ "wfrp4eTexts": [],
+ "frTexts": [
+ "Émet un nuage de poudre noire nauséabonde. Active l"
+ ]
+ },
+ {
+ "file": "Adgs6Zs0FdefO6qx.js",
+ "wfrp4eSize": 217,
+ "frSize": 215,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "Ah2wyywkL8hjJNXM.js",
+ "wfrp4eSize": 31,
+ "frSize": 31,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "ApaLcUhuty3EzJoP.js",
+ "wfrp4eSize": 338,
+ "frSize": 352,
+ "wfrp4eTexts": [],
+ "frTexts": [
+ "${this.actor.prototypeToken.name} voit ses points de Destin augmentés de ${current} à ${fortunePoints + current}"
+ ]
+ },
+ {
+ "file": "AqHLHp4kH6KULk3e.js",
+ "wfrp4eSize": 373,
+ "frSize": 387,
+ "wfrp4eTexts": [
+ "None left!"
+ ],
+ "frTexts": [
+ "Aucun disponible!"
+ ]
+ },
+ {
+ "file": "AyNb5sj6FD2Z3Q5T.js",
+ "wfrp4eSize": 128,
+ "frSize": 134,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "BD7bVTU2pVoRSRBe.js",
+ "wfrp4eSize": 793,
+ "frSize": 802,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "BHbFqhJPzZI2txLs.js",
+ "wfrp4eSize": 394,
+ "frSize": 447,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "Bj6bxItlgtI2sXVN.js",
+ "wfrp4eSize": 294,
+ "frSize": 268,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "CHnaBPHk6HdFS512.js",
+ "wfrp4eSize": 299,
+ "frSize": 305,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "CIxZYkHggBQ6EsHP.js",
+ "wfrp4eSize": 62,
+ "frSize": 70,
+ "wfrp4eTexts": [
+ "Effect Used"
+ ],
+ "frTexts": [
+ "Effet utilisé"
+ ]
+ },
+ {
+ "file": "CS6O7UUjQcUJoOUP.js",
+ "wfrp4eSize": 564,
+ "frSize": 380,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "CW5Vlr57OaMkKJ8Q.js",
+ "wfrp4eSize": 293,
+ "frSize": 304,
+ "wfrp4eTexts": [
+ "Advantage Subtracted",
+ "Not enough Advantage!"
+ ],
+ "frTexts": [
+ "Avantage soustrait",
+ "Pas assez d"
+ ]
+ },
+ {
+ "file": "CWNGrg7se91RC95g.js",
+ "wfrp4eSize": 443,
+ "frSize": 460,
+ "wfrp4eTexts": [],
+ "frTexts": [
+ "${this.effect.name}: \n @Corruption[moderate]{Exposition Modérée à la Corruption}
\n ${args.actor.prototypeToken.name} doit réussir un \n Test de Corruption (Modéré)"
+ ]
+ },
+ {
+ "file": "Cjj4iLkdY1NaZRCi.js",
+ "wfrp4eSize": 599,
+ "frSize": 925,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "ClkT2WG2UjVwQ97T.js",
+ "wfrp4eSize": 413,
+ "frSize": 415,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "DHxUKY9LMyifFgCi.js",
+ "wfrp4eSize": 90,
+ "frSize": 94,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "DVlZGbiuMIHEQOnM.js",
+ "wfrp4eSize": 413,
+ "frSize": 402,
+ "wfrp4eTexts": [],
+ "frTexts": [
+ "${this.actor.name} attaché à ${this.actor.getFlag("
+ ]
+ },
+ {
+ "file": "DWBxvzfWGcG7PVNP.js",
+ "wfrp4eSize": 218,
+ "frSize": 217,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "DhZqJso1JWYtGrKk.js",
+ "wfrp4eSize": 273,
+ "frSize": 279,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "E1vUepgop09FF5wy.js",
+ "wfrp4eSize": 785,
+ "frSize": 813,
+ "wfrp4eTexts": [
+ "Not enough Advantage!",
+ "Adding ${frenzy.name}",
+ "Adding ${hatred.name}"
+ ],
+ "frTexts": [
+ "Pas assez d",
+ "Ajout de ${frenzy.name}",
+ "Ajout de ${hatred.name}"
+ ]
+ },
+ {
+ "file": "E3om295BMQojnM2F.js",
+ "wfrp4eSize": 140,
+ "frSize": 147,
+ "wfrp4eTexts": [
+ "Removed Fatigued"
+ ],
+ "frTexts": [
+ "Fatigue supprimée"
+ ]
+ },
+ {
+ "file": "EBNrA6FNX4d05EUx.js",
+ "wfrp4eSize": 30,
+ "frSize": 30,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "EC8cZmqrE095cDc2.js",
+ "wfrp4eSize": 906,
+ "frSize": 914,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "EJObiSth3WdcJOXN.js",
+ "wfrp4eSize": 176,
+ "frSize": 186,
+ "wfrp4eTexts": [
+ "Adding Prone"
+ ],
+ "frTexts": [
+ "Ajout de A Terre"
+ ]
+ },
+ {
+ "file": "EJaBfqADqlo92Fx6.js",
+ "wfrp4eSize": 219,
+ "frSize": 215,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "ENGmwaItRXO5s0XY.js",
+ "wfrp4eSize": 255,
+ "frSize": 265,
+ "wfrp4eTexts": [],
+ "frTexts": [
+ "Soigne ${this.actor.system.characteristics.t.bonus * 3} Blessures"
+ ]
+ },
+ {
+ "file": "ERxrWzSpw8qwxFVi.js",
+ "wfrp4eSize": 97,
+ "frSize": 105,
+ "wfrp4eTexts": [
+ "Cannot enter ${this.effect.name}!"
+ ],
+ "frTexts": [
+ "Ne peut entrer ${this.effect.name}!"
+ ]
+ },
+ {
+ "file": "EdTChmSouS0MSmk5.js",
+ "wfrp4eSize": 313,
+ "frSize": 352,
+ "wfrp4eTexts": [],
+ "frTexts": [
+ "Peut effectuer une Action ou un Mouvement (en choisir un)",
+ "Ne peut pas effectuer d"
+ ]
+ },
+ {
+ "file": "FMA16PvoObBV8vDl.js",
+ "wfrp4eSize": 263,
+ "frSize": 269,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "FPYNcxm21678boLT.js",
+ "wfrp4eSize": 787,
+ "frSize": 785,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "FSqUqSByMiztYOQM.js",
+ "wfrp4eSize": 270,
+ "frSize": 294,
+ "wfrp4eTexts": [],
+ "frTexts": [
+ "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}"
+ ]
+ },
+ {
+ "file": "FZFOC7bip0oiWEzk.js",
+ "wfrp4eSize": 196,
+ "frSize": 206,
+ "wfrp4eTexts": [
+ "Added Bleeding"
+ ],
+ "frTexts": [
+ "Ajout d"
+ ]
+ },
+ {
+ "file": "FiD3mvWIBHNNIuO9.js",
+ "wfrp4eSize": 227,
+ "frSize": 232,
+ "wfrp4eTexts": [],
+ "frTexts": [
+ "Localisation changée : Tête"
+ ]
+ },
+ {
+ "file": "FqevMs0ukQ9WuUHl.js",
+ "wfrp4eSize": 349,
+ "frSize": 345,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "FtZf56VI6Qsspu0D.js",
+ "wfrp4eSize": 1215,
+ "frSize": 1210,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "Fwk8WA8NfRivLFWJ.js",
+ "wfrp4eSize": 50,
+ "frSize": 53,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "G7sFEnJlXZvfXL3V.js",
+ "wfrp4eSize": 373,
+ "frSize": 384,
+ "wfrp4eTexts": [
+ "None left!"
+ ],
+ "frTexts": [
+ "Aucun restant!"
+ ]
+ },
+ {
+ "file": "GRfCxtYzmEx2LYU7.js",
+ "wfrp4eSize": 449,
+ "frSize": 418,
+ "wfrp4eTexts": [],
+ "frTexts": [
+ "Deux @UUID[Compendium.wfrp4e-eis.actors.iDy8SDTwJSlCzZMl]{Horreurs Bleues de Tzeentch} sortent de la chair hurlante de ${this.actor.name}, le tuant au passage."
+ ]
+ },
+ {
+ "file": "GTZUO73pUJKpM1JB.js",
+ "wfrp4eSize": 257,
+ "frSize": 237,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "GjkxWj9wCAclM9WA.js",
+ "wfrp4eSize": 540,
+ "frSize": 580,
+ "wfrp4eTexts": [
+ "All Effects have been used. Reset to select them again"
+ ],
+ "frTexts": [
+ "Tous les effets ont été utilisés. Les remettre à 0 pour les utiliser à nouveau"
+ ]
+ },
+ {
+ "file": "GsAyB5xnK3ASeoah.js",
+ "wfrp4eSize": 1210,
+ "frSize": 1205,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "GzSFlqL1YrIK1dxh.js",
+ "wfrp4eSize": 802,
+ "frSize": 811,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "GzsuEg7gZy1f0ljy.js",
+ "wfrp4eSize": 242,
+ "frSize": 256,
+ "wfrp4eTexts": [
+ "Cleared ${bleeding.conditionValue} Bleeding Conditions",
+ "No Bleeding Conditions"
+ ],
+ "frTexts": [
+ "Suppression de ${bleeding.conditionValue} états Hémorragiques",
+ "Aucune Hémorragie"
+ ]
+ },
+ {
+ "file": "H06Ysj7oPiemW7S6.js",
+ "wfrp4eSize": 1383,
+ "frSize": 1392,
+ "wfrp4eTexts": [],
+ "frTexts": [
+ "${args.actor.name}"
+ ]
+ },
+ {
+ "file": "H85k4L3yICm7cfIk.js",
+ "wfrp4eSize": 1197,
+ "frSize": 1193,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "HG2fKOfruT5QV3A4.js",
+ "wfrp4eSize": 929,
+ "frSize": 943,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "HJ2X4ZtXei0BXbxf.js",
+ "wfrp4eSize": 441,
+ "frSize": 445,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "HYrl5aNMm8BAdqH7.js",
+ "wfrp4eSize": 333,
+ "frSize": 133,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "HmImVzvw6ecBy99l.js",
+ "wfrp4eSize": 173,
+ "frSize": 183,
+ "wfrp4eTexts": [
+ "Added Bleeding"
+ ],
+ "frTexts": [
+ "Ajout Hémorragique"
+ ]
+ },
+ {
+ "file": "HoNTnPphrJISSQr1.js",
+ "wfrp4eSize": 193,
+ "frSize": 196,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "I1J2m5uud84N50Lk.js",
+ "wfrp4eSize": 162,
+ "frSize": 188,
+ "wfrp4eTexts": [
+ "Cannot cast Spells or use Prayers"
+ ],
+ "frTexts": [
+ "Impossible d"
+ ]
+ },
+ {
+ "file": "IAGla7HJlYN0wa4H.js",
+ "wfrp4eSize": 275,
+ "frSize": 294,
+ "wfrp4eTexts": [],
+ "frTexts": [
+ "Test de Force Mentale échoué, ${this.actor.prototypeToken.name} subit des @Symptom[Convulsions] pour [[1d10]] heures"
+ ]
+ },
+ {
+ "file": "ILqHxk7deotgI3KD.js",
+ "wfrp4eSize": 269,
+ "frSize": 271,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "IfEu1hO8sKEZBpvg.js",
+ "wfrp4eSize": 310,
+ "frSize": 309,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "IrkWq7IiFS65bTvC.js",
+ "wfrp4eSize": 353,
+ "frSize": 370,
+ "wfrp4eTexts": [],
+ "frTexts": [
+ "
${speaker.alias} tombe lourdements dans l"
+ ]
+ },
+ {
+ "file": "IslMfFgpgQq2brpu.js",
+ "wfrp4eSize": 135,
+ "frSize": 159,
+ "wfrp4eTexts": [
+ "Cannot have Broken"
+ ],
+ "frTexts": [
+ "Impossible de supprimer l"
+ ]
+ },
+ {
+ "file": "IupskvzvoGyD2H5o.js",
+ "wfrp4eSize": 1703,
+ "frSize": 1343,
+ "wfrp4eTexts": [
+ "Adding ",
+ "Could not find any Blessings associated with ${god}."
+ ],
+ "frTexts": [
+ "Adding ",
+ "Impossible de trouver any Blessings associated with ${god}."
+ ]
+ },
+ {
+ "file": "IzoOmDywGLqLNljN.js",
+ "wfrp4eSize": 653,
+ "frSize": 648,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "JXBUE0XuJOJNG7zE.js",
+ "wfrp4eSize": 580,
+ "frSize": 587,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "JhbZWZhOJ23yOBmG.js",
+ "wfrp4eSize": 1210,
+ "frSize": 1205,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "Jjq3oPYbI26zjxME.js",
+ "wfrp4eSize": 530,
+ "frSize": 531,
+ "wfrp4eTexts": [
+ "Dropped ${dropped.map(i => i.name).join("
+ ],
+ "frTexts": [
+ "Lache ${dropped.map(i => i.name).join("
+ ]
+ },
+ {
+ "file": "JmZQRvdWjm9ykYfn.js",
+ "wfrp4eSize": 137,
+ "frSize": 144,
+ "wfrp4eTexts": [],
+ "frTexts": [
+ "Ne peut être surpris"
+ ]
+ },
+ {
+ "file": "Jnp5c09sPzDD61EK.js",
+ "wfrp4eSize": 185,
+ "frSize": 208,
+ "wfrp4eTexts": [
+ "${args.actor.prototypeToken.name} must pass an Average (+20) Willpower Test to attack this target!"
+ ],
+ "frTexts": [
+ "${args.actor.prototypeToken.name} doit réussir un Test Accessible (+20) de Force Mentale pour attaquer cette cible!"
+ ]
+ },
+ {
+ "file": "KD4nCSdSXJVJmk0R.js",
+ "wfrp4eSize": 154,
+ "frSize": 160,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "KGK9vL1Yl0qmCeCN.js",
+ "wfrp4eSize": 2503,
+ "frSize": 2502,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "KICZPwLvbUSxbDrE.js",
+ "wfrp4eSize": 488,
+ "frSize": 512,
+ "wfrp4eTexts": [
+ "Cannot find table with key: mutatemental",
+ "Item could not be found: ",
+ "${item.name} added"
+ ],
+ "frTexts": [
+ "Impossible de trouver la table des Mutations Mentales",
+ "Impossible de trouver l",
+ "${item.name} added"
+ ]
+ },
+ {
+ "file": "KQzbrpb0T5a7it4k.js",
+ "wfrp4eSize": 216,
+ "frSize": 216,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "KVpDUEjHhd3nLa0f.js",
+ "wfrp4eSize": 236,
+ "frSize": 242,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "KmngDrPD72xn22kZ.js",
+ "wfrp4eSize": 588,
+ "frSize": 606,
+ "wfrp4eTexts": [],
+ "frTexts": [
+ "${this.actor.prototypeToken.name} perd ${toughnessLost} points d"
+ ]
+ },
+ {
+ "file": "LQEWSN5KnHHATPsf.js",
+ "wfrp4eSize": 262,
+ "frSize": 281,
+ "wfrp4eTexts": [],
+ "frTexts": [
+ "${args.actor.name} doit réussir un Test Facile (+40) d"
+ ]
+ },
+ {
+ "file": "Lp261O9fgEXmgPf3.js",
+ "wfrp4eSize": 241,
+ "frSize": 236,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "LyAK0dVDS5L09yq2.js",
+ "wfrp4eSize": 246,
+ "frSize": 256,
+ "wfrp4eTexts": [],
+ "frTexts": [
+ "${this.actor.prototypeToken.name} récupère ${bonus} Blessures"
+ ]
+ },
+ {
+ "file": "M5bh0heeafA2fQQ8.js",
+ "wfrp4eSize": 347,
+ "frSize": 345,
+ "wfrp4eTexts": [],
+ "frTexts": [
+ "${this.effect.name} s"
+ ]
+ },
+ {
+ "file": "MDLttXplnNthncGr.js",
+ "wfrp4eSize": 121,
+ "frSize": 120,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "MFKhU9vp8bQpHP3I.js",
+ "wfrp4eSize": 313,
+ "frSize": 313,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "Me1wS5XdqUEy7OGt.js",
+ "wfrp4eSize": 312,
+ "frSize": 335,
+ "wfrp4eTexts": [],
+ "frTexts": [
+ "{this.actor.name} subit un ${crit} (localisation : ${loc}). Ne pas appliquer d"
+ ]
+ },
+ {
+ "file": "MfxWXZwaZUjGSBqw.js",
+ "wfrp4eSize": 145,
+ "frSize": 157,
+ "wfrp4eTexts": [
+ "Immune to Ablaze"
+ ],
+ "frTexts": [
+ "Immunisé à En Flammes"
+ ]
+ },
+ {
+ "file": "MfxzwJz2o9ho2hOM.js",
+ "wfrp4eSize": 46,
+ "frSize": 49,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "MgMMoC4Umpg7fmNI.js",
+ "wfrp4eSize": 1040,
+ "frSize": 1069,
+ "wfrp4eTexts": [],
+ "frTexts": [
+ "${this.actor.name} porte ${this.item.name}. ${this.actor.prototypeToken.name} ne souffre des pénalités dues à l"
+ ]
+ },
+ {
+ "file": "inPxRSx0CDj1nwAm.js",
+ "wfrp4eSize": 146,
+ "frSize": 150,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "iuSoKntfJ4eAPafQ.js",
+ "wfrp4eSize": 496,
+ "frSize": 455,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "j98hvy6r9G2Vjmid.js",
+ "wfrp4eSize": 439,
+ "frSize": 468,
+ "wfrp4eTexts": [],
+ "frTexts": [
+ "${this.effect.name}: \n @Corruption[minor]{Exposition Mineure à la Corruption} ${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"
+ ]
+ },
+ {
+ "file": "jdS2u1tQPYeO55WI.js",
+ "wfrp4eSize": 1609,
+ "frSize": 1573,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "jsgLEVYvMieyYT6L.js",
+ "wfrp4eSize": 697,
+ "frSize": 718,
+ "wfrp4eTexts": [
+ "No Token Image path configured. The image path should be set in the first line of this script."
+ ],
+ "frTexts": [
+ "Aucune image de Token configurée. Le chemin du token doit être configuré dans la première ligne de ce script."
+ ]
+ },
+ {
+ "file": "kiJ6AiaYVUjt6aV6.js",
+ "wfrp4eSize": 360,
+ "frSize": 337,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "kvaN100w0nBUlLbj.js",
+ "wfrp4eSize": 136,
+ "frSize": 144,
+ "wfrp4eTexts": [],
+ "frTexts": [
+ "Immunisé aux Poisons"
+ ]
+ },
+ {
+ "file": "lII4KMRblqwFBlsV.js",
+ "wfrp4eSize": 3094,
+ "frSize": 3123,
+ "wfrp4eTexts": [
+ "Could not find ${talent}",
+ "Could not find ${trait}",
+ "Could not find ${trapping}",
+ "Could not find ${spell}"
+ ],
+ "frTexts": [
+ "Impossible de trouver ${talent}",
+ "Impossible de trouver ${trait}",
+ "Impossible de trouver ${trapping}",
+ "Impossible de trouver ${spell}"
+ ]
+ },
+ {
+ "file": "lOIHiAIDtj91kllN.js",
+ "wfrp4eSize": 294,
+ "frSize": 267,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "lOzkngzye4RmvALp.js",
+ "wfrp4eSize": 204,
+ "frSize": 213,
+ "wfrp4eTexts": [
+ "Added "
+ ],
+ "frTexts": [
+ "Ajout de "
+ ]
+ },
+ {
+ "file": "lQJ68n3y1xDyNicE.js",
+ "wfrp4eSize": 78,
+ "frSize": 78,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "lU4s3UTtBkU38djI.js",
+ "wfrp4eSize": 206,
+ "frSize": 207,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "lZuavewrJzOehrJQ.js",
+ "wfrp4eSize": 410,
+ "frSize": 411,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "laptAldsT0Fm1rDt.js",
+ "wfrp4eSize": 273,
+ "frSize": 253,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "lvjcddwRiN9iGruy.js",
+ "wfrp4eSize": 1914,
+ "frSize": 1924,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "m8qBlbH7ROoqa22o.js",
+ "wfrp4eSize": 26,
+ "frSize": 26,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "mPxmCsXYirAIT913.js",
+ "wfrp4eSize": 259,
+ "frSize": 263,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "mRvLsSVxNyt8LVZb.js",
+ "wfrp4eSize": 219,
+ "frSize": 215,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "n5RJqJL9fdRIxkuN.js",
+ "wfrp4eSize": 298,
+ "frSize": 309,
+ "wfrp4eTexts": [
+ "Advantage Subtracted",
+ "Not enough Advantage!"
+ ],
+ "frTexts": [
+ "Avantage soustrait",
+ "Pas assez d"
+ ]
+ },
+ {
+ "file": "nGTxNWBUBgTr87wU.js",
+ "wfrp4eSize": 381,
+ "frSize": 377,
+ "wfrp4eTexts": [],
+ "frTexts": [
+ "Becomes lodged in the armour or flesh of the opponent. See @UUID[${this.item.uuid}]{${this.item.name}}."
+ ]
+ },
+ {
+ "file": "naF5EWr1CBkYRZTK.js",
+ "wfrp4eSize": 348,
+ "frSize": 657,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "ngMm7SgtVqVovFJG.js",
+ "wfrp4eSize": 335,
+ "frSize": 316,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "njPP9wDAsdh4WHIj.js",
+ "wfrp4eSize": 347,
+ "frSize": 367,
+ "wfrp4eTexts": [],
+ "frTexts": [
+ "Infctée: ${args.actor.name} doit réussir un Test Facile (+40) de Résistance ou subir une @UUID[Compendium.wfrp4e-core.items.kKccDTGzWzSXCBOb]{Blessure Purulente}"
+ ]
+ },
+ {
+ "file": "nkSmu7v9WiAaK4vq.js",
+ "wfrp4eSize": 1214,
+ "frSize": 1209,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "nkbTnaeBpthyhw4J.js",
+ "wfrp4eSize": 338,
+ "frSize": 352,
+ "wfrp4eTexts": [],
+ "frTexts": [
+ "${this.actor.prototypeToken.name} voit ses Points de Chance augmenter de ${current} à ${fortunePoints + current}"
+ ]
+ },
+ {
+ "file": "nkdKBJ8ItqWiRAWL.js",
+ "wfrp4eSize": 1039,
+ "frSize": 1063,
+ "wfrp4eTexts": [],
+ "frTexts": [
+ "${this.actor.name} porte ${this.item.name}. ${speaker.alias} sank due to having Holed (${totalHoled}) rating equal to, or exceeding its Toughness (${toughness }) \n Holed due to Critical Damage: ${currentHoled} ${this.item.name} caused an additional ${anchor.outerHTML} Critical Hits to the Hull! ${this.actor.prototypeToken.name} :
+ ${this.actor.prototypeToken.name} reçoit le Trait de Créatuer A Sang Froid et peut inverser n
+
+### 6BmvV9c03FkfisnE.js
+
+- Taille WFRP4E: 1069 octets
+- Taille FR: 1107 octets
+- Textes FR: ${this.actor.name} porte le ${this.item.name}. ${this.actor.prototypeToken.name} has \n When all Poisoned Conditions are lost, so too is Regenerate. ${this.actor.prototypeToken.name} a :\n
\n Il ne peut plus lancer de Sorts ni effectuer de Prières ni Miracles.
\n S",
+ "${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."
+ ]
+ },
+ {
+ "file": "Mhb67xufvA9uWO21.js",
+ "wfrp4eSize": 356,
+ "frSize": 375,
+ "wfrp4eTexts": [],
+ "frTexts": [
+ "Attaque Caudale: ${args.actor.prototypeToken.name} est désormais A Terre"
+ ]
+ },
+ {
+ "file": "Mir4FMHQRdVqazAF.js",
+ "wfrp4eSize": 505,
+ "frSize": 529,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "MnqQkXVp20Lw84I1.js",
+ "wfrp4eSize": 331,
+ "frSize": 337,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "Msygc7oQQPB5fw0b.js",
+ "wfrp4eSize": 633,
+ "frSize": 637,
+ "wfrp4eTexts": [],
+ "frTexts": [
+ "Reçoit ${points.total} Point de Corruption",
+ "Perd ${points} Point de Corruption"
+ ]
+ },
+ {
+ "file": "MwUzyAgd0yPnmZCH.js",
+ "wfrp4eSize": 242,
+ "frSize": 241,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "N2MeOlf0GjPiRcSb.js",
+ "wfrp4eSize": 115,
+ "frSize": 114,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "N7nGncsPrTz2ZbDA.js",
+ "wfrp4eSize": 51,
+ "frSize": 51,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "N8hA6ysHCTlLd8Kj.js",
+ "wfrp4eSize": 2107,
+ "frSize": 2142,
+ "wfrp4eTexts": [
+ "Could not find ${talent}",
+ "Could not find ${trapping}"
+ ],
+ "frTexts": [
+ "Impossible de trouver ${talent}",
+ "Impossible de trouver ${trapping}"
+ ]
+ },
+ {
+ "file": "Na7Nanl9YmxZlTo7.js",
+ "wfrp4eSize": 56,
+ "frSize": 57,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "NdquQqyuOkGCj8Uo.js",
+ "wfrp4eSize": 485,
+ "frSize": 486,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "NrVFrIXM8GnIbojv.js",
+ "wfrp4eSize": 84,
+ "frSize": 86,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "O45vpR4jDbQQnmvJ.js",
+ "wfrp4eSize": 477,
+ "frSize": 474,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "O7lXFZLrLdFaShGR.js",
+ "wfrp4eSize": 28,
+ "frSize": 28,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "OEy2lxvic37dRBEt.js",
+ "wfrp4eSize": 607,
+ "frSize": 617,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "OGX4BneaYAnV25TO.js",
+ "wfrp4eSize": 1076,
+ "frSize": 1041,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "OeKeQAAcJhdI4Qky.js",
+ "wfrp4eSize": 172,
+ "frSize": 179,
+ "wfrp4eTexts": [
+ "Disabled!"
+ ],
+ "frTexts": [
+ "Désactivé!"
+ ]
+ },
+ {
+ "file": "OicQSEVZBbqLtrcf.js",
+ "wfrp4eSize": 354,
+ "frSize": 376,
+ "wfrp4eTexts": [],
+ "frTexts": [
+ "Guéri de ${choice.map(i => i.name).join("
+ ]
+ },
+ {
+ "file": "Op88kMtimSEWlY2h.js",
+ "wfrp4eSize": 288,
+ "frSize": 301,
+ "wfrp4eTexts": [
+ "None left!"
+ ],
+ "frTexts": [
+ "Aucun disponible!"
+ ]
+ },
+ {
+ "file": "OsLXutfXyQCAkhAf.js",
+ "wfrp4eSize": 1207,
+ "frSize": 1203,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "OxsBnnVI3Smpknpb.js",
+ "wfrp4eSize": 199,
+ "frSize": 203,
+ "wfrp4eTexts": [
+ "${this.actor.name} loses 1 Advantage"
+ ],
+ "frTexts": [
+ "${this.actor.name} perd 1 Avantage"
+ ]
+ },
+ {
+ "file": "Oz7pWF9mEc1pQypj.js",
+ "wfrp4eSize": 210,
+ "frSize": 184,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "PBW6IZtwawNHxB6y.js",
+ "wfrp4eSize": 49,
+ "frSize": 49,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "PI1QNaKFeqood6d7.js",
+ "wfrp4eSize": 649,
+ "frSize": 653,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "PeZYj8b0vedyJj00.js",
+ "wfrp4eSize": 574,
+ "frSize": 583,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "Ph3TdQw1lGiFr049.js",
+ "wfrp4eSize": 956,
+ "frSize": 968,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "PmELrzD3RmF9qKkO.js",
+ "wfrp4eSize": 497,
+ "frSize": 387,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "Pn5fekTbkwlr61XU.js",
+ "wfrp4eSize": 1216,
+ "frSize": 1211,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "PsO7aTdELJt35eHP.js",
+ "wfrp4eSize": 452,
+ "frSize": 400,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "PwqTmw7rsG8hzqCS.js",
+ "wfrp4eSize": 428,
+ "frSize": 430,
+ "wfrp4eTexts": [],
+ "frTexts": [
+ "${this.actor.name} subit @UUID[Compendium.${results.documentCollection}.${results.documentId}]{${results.text}}"
+ ]
+ },
+ {
+ "file": "Q1trEhtqjIiDvFPF.js",
+ "wfrp4eSize": 73,
+ "frSize": 85,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "Q68WiUWY7GxiXBbT.js",
+ "wfrp4eSize": 265,
+ "frSize": 267,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "Q7eULXQ9AfDRmUGO.js",
+ "wfrp4eSize": 1222,
+ "frSize": 1217,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "QNxmImpLTou6WdMQ.js",
+ "wfrp4eSize": 208,
+ "frSize": 232,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "QRSACifDrvojIXHB.js",
+ "wfrp4eSize": 299,
+ "frSize": 303,
+ "wfrp4eTexts": [
+ "No Conditions on this Actor"
+ ],
+ "frTexts": [
+ "Aucun état sur cet Acteur"
+ ]
+ },
+ {
+ "file": "Qgn92fZyc3Psn8QJ.js",
+ "wfrp4eSize": 572,
+ "frSize": 521,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "Qk7t2l5ep9RDVpgE.js",
+ "wfrp4eSize": 27,
+ "frSize": 27,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "QoEOxRruQXYrZrv3.js",
+ "wfrp4eSize": 403,
+ "frSize": 399,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "QqybHxNCzPEzG1Qh.js",
+ "wfrp4eSize": 36,
+ "frSize": 64,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "QwHoqu2oO8QO8Mad.js",
+ "wfrp4eSize": 187,
+ "frSize": 213,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "R32U01LBjBrK1pns.js",
+ "wfrp4eSize": 1504,
+ "frSize": 1505,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "R6SnyF3y4Vsq6oga.js",
+ "wfrp4eSize": 394,
+ "frSize": 447,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "R8FBHZaaARA3z9pB.js",
+ "wfrp4eSize": 1217,
+ "frSize": 1212,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "R8ecKGRzOr4ThvVa.js",
+ "wfrp4eSize": 1214,
+ "frSize": 1209,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "RKIFGN583PQnqHGk.js",
+ "wfrp4eSize": 181,
+ "frSize": 188,
+ "wfrp4eTexts": [],
+ "frTexts": [
+ "Ajout de 2 état Hémorragiques"
+ ]
+ },
+ {
+ "file": "ROXCqAFSTLouJniL.js",
+ "wfrp4eSize": 238,
+ "frSize": 244,
+ "wfrp4eTexts": [],
+ "frTexts": [
+ "${this.item.name} Surcharge!"
+ ]
+ },
+ {
+ "file": "RPqgRUkiLY5thVbC.js",
+ "wfrp4eSize": 1211,
+ "frSize": 1206,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "RSsGiDFibuqg3sHr.js",
+ "wfrp4eSize": 377,
+ "frSize": 383,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "RlhOAKfN0ghrrooR.js",
+ "wfrp4eSize": 283,
+ "frSize": 289,
+ "wfrp4eTexts": [
+ "Holed Ratings of ${this.actor.name} have been doubled."
+ ],
+ "frTexts": [
+ "Holed Ratings of ${this.actor.name} have been doubled."
+ ]
+ },
+ {
+ "file": "Rnpw6UQdJifLeuna.js",
+ "wfrp4eSize": 63,
+ "frSize": 72,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "RvipIYj9H7n4UDMe.js",
+ "wfrp4eSize": 1658,
+ "frSize": 1672,
+ "wfrp4eTexts": [
+ "Could not find ${talent}",
+ "Could not find ${trapping}"
+ ],
+ "frTexts": [
+ "Impossible de trouver ${talent}",
+ "Impossible de trouver ${trapping}"
+ ]
+ },
+ {
+ "file": "RwMw848y13Jq2L4f.js",
+ "wfrp4eSize": 646,
+ "frSize": 651,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "S1QihXuvdEVzeRtB.js",
+ "wfrp4eSize": 923,
+ "frSize": 936,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "S3Dev4hleOYqDNe9.js",
+ "wfrp4eSize": 705,
+ "frSize": 713,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "S4793DLFhjMxpM8x.js",
+ "wfrp4eSize": 106,
+ "frSize": 106,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "SGr50Hq1AHIEzIFN.js",
+ "wfrp4eSize": 286,
+ "frSize": 295,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "SLy1Fs3oXcHgFgjK.js",
+ "wfrp4eSize": 335,
+ "frSize": 321,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "SWIJjM2RCmzfr64u.js",
+ "wfrp4eSize": 255,
+ "frSize": 254,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "StAderQaQQsxb6Rv.js",
+ "wfrp4eSize": 316,
+ "frSize": 322,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "T5fiTzhXEQAv9Drf.js",
+ "wfrp4eSize": 590,
+ "frSize": 594,
+ "wfrp4eTexts": [
+ "Dropped ${dropped.map(i => i.name).join("
+ ],
+ "frTexts": [
+ "Laché ${dropped.map(i => i.name).join("
+ ]
+ },
+ {
+ "file": "TAw9vXnfyIAl5DGs.js",
+ "wfrp4eSize": 376,
+ "frSize": 386,
+ "wfrp4eTexts": [
+ "None left!"
+ ],
+ "frTexts": [
+ "Quantité insuffisante!"
+ ]
+ },
+ {
+ "file": "TBpNFRL5uehs0fze.js",
+ "wfrp4eSize": 269,
+ "frSize": 287,
+ "wfrp4eTexts": [
+ "None left!"
+ ],
+ "frTexts": [
+ "Quantité insuffisante!"
+ ]
+ },
+ {
+ "file": "TCtXPvDpbfz1yrVZ.js",
+ "wfrp4eSize": 1952,
+ "frSize": 1912,
+ "wfrp4eTexts": [
+ "Could not find ${talent}"
+ ],
+ "frTexts": [
+ "Impossible de trouver ${talent}"
+ ]
+ },
+ {
+ "file": "TGN070HeJLl3gSMY.js",
+ "wfrp4eSize": 229,
+ "frSize": 226,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "TwgdEucxcHloc4cX.js",
+ "wfrp4eSize": 2626,
+ "frSize": 2724,
+ "wfrp4eTexts": [
+ "Could not find ${c.name}"
+ ],
+ "frTexts": [
+ "Impossible de trouver ${c.name}"
+ ]
+ },
+ {
+ "file": "TxfmxDGBj04AQQpt.js",
+ "wfrp4eSize": 321,
+ "frSize": 316,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "U1RUcgP8LD2qeGTm.js",
+ "wfrp4eSize": 27,
+ "frSize": 27,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "U1UpSRJOSjPpO4HS.js",
+ "wfrp4eSize": 319,
+ "frSize": 290,
+ "wfrp4eTexts": [
+ "Added ${mutations[roll].name}"
+ ],
+ "frTexts": [
+ "Ajout ${mutations[roll].name}"
+ ]
+ },
+ {
+ "file": "U26XMie3Kjoddisj.js",
+ "wfrp4eSize": 227,
+ "frSize": 236,
+ "wfrp4eTexts": [
+ "Cleared 1 Stunned Condition",
+ "No Stunned Conditions"
+ ],
+ "frTexts": [
+ "Suppression de 1 état Assomé",
+ "Aucun état Assomé"
+ ]
+ },
+ {
+ "file": "UDPsaymtZf39UsMk.js",
+ "wfrp4eSize": 410,
+ "frSize": 247,
+ "wfrp4eTexts": [
+ "Fatigued added to "
+ ],
+ "frTexts": [
+ "Fatigue ajouté à "
+ ]
+ },
+ {
+ "file": "UH5MIzqi2MvEqTwj.js",
+ "wfrp4eSize": 268,
+ "frSize": 242,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "ULmZMLezDamerN04.js",
+ "wfrp4eSize": 864,
+ "frSize": 852,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "UQtXuQmUlTyDKqhe.js",
+ "wfrp4eSize": 4069,
+ "frSize": 4096,
+ "wfrp4eTexts": [
+ "Could not find ${talent}",
+ "Could not find ${trapping}"
+ ],
+ "frTexts": [
+ "Impossible de trouver ${talent}",
+ "Impossible de trouver ${trapping}"
+ ]
+ },
+ {
+ "file": "UgQW0UMPOZ0jwfVJ.js",
+ "wfrp4eSize": 235,
+ "frSize": 250,
+ "wfrp4eTexts": [],
+ "frTexts": [
+ "${this.actor.prototypeToken.name} voit ses Points de Chance augmenter de ${current} à ${1 + current}"
+ ]
+ },
+ {
+ "file": "UlRSaZG4ZUU6fMND.js",
+ "wfrp4eSize": 1224,
+ "frSize": 1219,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "UnqnWi0dZYLf5fTT.js",
+ "wfrp4eSize": 2626,
+ "frSize": 2535,
+ "wfrp4eTexts": [
+ "Could not find ${c.name}"
+ ],
+ "frTexts": [
+ "Impossible de trouver ${c.name}"
+ ]
+ },
+ {
+ "file": "UsuwsmU1TUQLQVM2.js",
+ "wfrp4eSize": 173,
+ "frSize": 290,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "V1D2Uo3WDKYQePU3.js",
+ "wfrp4eSize": 614,
+ "frSize": 627,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "V9wD9FWHWxZUOGSI.js",
+ "wfrp4eSize": 489,
+ "frSize": 502,
+ "wfrp4eTexts": [
+ "Fell Unconscious",
+ "Gained ${fatigued} conditions"
+ ],
+ "frTexts": [
+ "Tombe Incoscient",
+ "Subit ${fatigued} état Fatigué"
+ ]
+ },
+ {
+ "file": "V9xm4X1x3lPYTQaI.js",
+ "wfrp4eSize": 147,
+ "frSize": 157,
+ "wfrp4eTexts": [
+ "Immune to Fear"
+ ],
+ "frTexts": [
+ "Immunisé à la Peur"
+ ]
+ },
+ {
+ "file": "V9zm2hKUVLVZtAcN.js",
+ "wfrp4eSize": 3124,
+ "frSize": 3154,
+ "wfrp4eTexts": [
+ "Could not find ${talent}",
+ "Could not find ${trait}",
+ "Could not find ${trapping}",
+ "Could not find ${spell}"
+ ],
+ "frTexts": [
+ "Impossible de trouver ${talent}",
+ "Impossible de trouver ${trait}",
+ "Impossible de trouver ${trapping}",
+ "Impossible de trouver ${spell}"
+ ]
+ },
+ {
+ "file": "VAPsww9x3HAw1sKP.js",
+ "wfrp4eSize": 26,
+ "frSize": 26,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "VINX6TBAJQznhVcN.js",
+ "wfrp4eSize": 1242,
+ "frSize": 1239,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "VLdF2HPnCrNIgp7a.js",
+ "wfrp4eSize": 463,
+ "frSize": 461,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "VzgTGb5QXKoyPNh3.js",
+ "wfrp4eSize": 651,
+ "frSize": 655,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "W9nyUNQStMr1pUHJ.js",
+ "wfrp4eSize": 169,
+ "frSize": 184,
+ "wfrp4eTexts": [
+ "Added Bleeding"
+ ],
+ "frTexts": [
+ "Ajout de Hémorragique"
+ ]
+ },
+ {
+ "file": "WB6sIpLEPC8YPX67.js",
+ "wfrp4eSize": 153,
+ "frSize": 167,
+ "wfrp4eTexts": [
+ "Cannot Dodge!"
+ ],
+ "frTexts": [
+ "Ne peut pas esquiver!"
+ ]
+ },
+ {
+ "file": "WO5n7Vbx8AgoVrwC.js",
+ "wfrp4eSize": 1755,
+ "frSize": 1769,
+ "wfrp4eTexts": [
+ "Could not find ${talent}",
+ "Could not find ${trapping}"
+ ],
+ "frTexts": [
+ "Impossible de trouver ${talent}",
+ "Impossible de trouver ${trapping}"
+ ]
+ },
+ {
+ "file": "WR0Kqn8CF5iwToak.js",
+ "wfrp4eSize": 1219,
+ "frSize": 1214,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "WiYtNU2Y5BJfIpeM.js",
+ "wfrp4eSize": 341,
+ "frSize": 345,
+ "wfrp4eTexts": [
+ "Dropped ${dropped.map(i => i.name).join("
+ ],
+ "frTexts": [
+ "Lache ${dropped.map(i => i.name).join("
+ ]
+ },
+ {
+ "file": "Wo4wQKUxSItAhRzZ.js",
+ "wfrp4eSize": 394,
+ "frSize": 447,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "X3vpmNUj9SL2CDnF.js",
+ "wfrp4eSize": 118,
+ "frSize": 120,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "XO9m2AvFRAAeEuty.js",
+ "wfrp4eSize": 225,
+ "frSize": 223,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "XcvDYNZgJ2rpAdDV.js",
+ "wfrp4eSize": 410,
+ "frSize": 252,
+ "wfrp4eTexts": [
+ "Fatigued added to "
+ ],
+ "frTexts": [
+ "Etat Fatigué ajouté à "
+ ]
+ },
+ {
+ "file": "Xe8ijqWU3bbtq7ZY.js",
+ "wfrp4eSize": 176,
+ "frSize": 180,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "Xk9XPklxxTvFlwpI.js",
+ "wfrp4eSize": 41,
+ "frSize": 41,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "Y7McxsHFeGhwQx0J.js",
+ "wfrp4eSize": 359,
+ "frSize": 345,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "Y8J66v8VTKUASGuK.js",
+ "wfrp4eSize": 477,
+ "frSize": 481,
+ "wfrp4eTexts": [
+ "No Conditions on this Actor"
+ ],
+ "frTexts": [
+ "Aucun état sur cet acteur"
+ ]
+ },
+ {
+ "file": "YHEIkBKWXKNPqglh.js",
+ "wfrp4eSize": 141,
+ "frSize": 133,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "YJX7WnxzXXIVdH6P.js",
+ "wfrp4eSize": 986,
+ "frSize": 954,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "YN8719gme9AxYtyY.js",
+ "wfrp4eSize": 3213,
+ "frSize": 3230,
+ "wfrp4eTexts": [
+ "Could not find ${talent}",
+ "Could not find ${trapping}"
+ ],
+ "frTexts": [
+ "Impossible de trouver ${talent}",
+ "Impossible de trouver ${trapping}"
+ ]
+ },
+ {
+ "file": "YQ2LnLxp0xgy3meI.js",
+ "wfrp4eSize": 156,
+ "frSize": 153,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "YRUTliBzAQvncGNX.js",
+ "wfrp4eSize": 79,
+ "frSize": 87,
+ "wfrp4eTexts": [
+ "Added Fatigued"
+ ],
+ "frTexts": [
+ "Ajout de Fatigué"
+ ]
+ },
+ {
+ "file": "YaKnYEbmmZZtByJc.js",
+ "wfrp4eSize": 180,
+ "frSize": 187,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "YjJcRdytVRm88qLn.js",
+ "wfrp4eSize": 33,
+ "frSize": 33,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "YwLEw4BiKq4EMy57.js",
+ "wfrp4eSize": 580,
+ "frSize": 592,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "YySjPfSAPdMAfjsh.js",
+ "wfrp4eSize": 423,
+ "frSize": 416,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "Z52yZDm6lP6fOP3O.js",
+ "wfrp4eSize": 132,
+ "frSize": 143,
+ "wfrp4eTexts": [
+ "Immune to Ablaze"
+ ],
+ "frTexts": [
+ "Immunisé à En Flammes"
+ ]
+ },
+ {
+ "file": "Z6jNlyZMECkW4Hon.js",
+ "wfrp4eSize": 599,
+ "frSize": 600,
+ "wfrp4eTexts": [],
+ "frTexts": [
+ "Choisir @UUID[${choice[0].uuid}]{${choice[0].name}}"
+ ]
+ },
+ {
+ "file": "ZCBcwbVFHFTFRntb.js",
+ "wfrp4eSize": 1217,
+ "frSize": 1212,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "ZCkYe5XMVY1RWMXG.js",
+ "wfrp4eSize": 32,
+ "frSize": 32,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "ZCuOjLAeENKN1Q4L.js",
+ "wfrp4eSize": 455,
+ "frSize": 420,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "ZEXhYJqqxF6QAixX.js",
+ "wfrp4eSize": 75,
+ "frSize": 75,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "ZNu4B0OdjkM9lmtu.js",
+ "wfrp4eSize": 221,
+ "frSize": 218,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "ZRoG7GiMDQWso6gN.js",
+ "wfrp4eSize": 1222,
+ "frSize": 1217,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "ZTE8LdRblyG4yYoE.js",
+ "wfrp4eSize": 266,
+ "frSize": 268,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "ZdHvGvSJBsIuPphF.js",
+ "wfrp4eSize": 70,
+ "frSize": 66,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "ZqTW093qENOwGONP.js",
+ "wfrp4eSize": 263,
+ "frSize": 269,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "a02tlRCXpaoaDjSN.js",
+ "wfrp4eSize": 604,
+ "frSize": 568,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "a7pEvCycVnFBXGAQ.js",
+ "wfrp4eSize": 228,
+ "frSize": 215,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "a8i0sA1RBnD8nHZt.js",
+ "wfrp4eSize": 1398,
+ "frSize": 1394,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "aCVtaW8ag1WibcAr.js",
+ "wfrp4eSize": 124,
+ "frSize": 133,
+ "wfrp4eTexts": [],
+ "frTexts": [
+ "${args.attacker.prototypeToken.name} récupère 1 Blessure."
+ ]
+ },
+ {
+ "file": "aIYUsBIDKWJ3CEtj.js",
+ "wfrp4eSize": 80,
+ "frSize": 86,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "abLWYtNTu1UVDQAs.js",
+ "wfrp4eSize": 264,
+ "frSize": 268,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "aeBetniKqq5SD9Ou.js",
+ "wfrp4eSize": 2685,
+ "frSize": 2700,
+ "wfrp4eTexts": [
+ "Could not find ${talent}",
+ "Could not find ${trapping}"
+ ],
+ "frTexts": [
+ "Impossible de trouver ${talent}",
+ "Impossible de trouver ${trapping}"
+ ]
+ },
+ {
+ "file": "b2Kb4IuD22RhKhR0.js",
+ "wfrp4eSize": 216,
+ "frSize": 225,
+ "wfrp4eTexts": [
+ "No target!"
+ ],
+ "frTexts": [
+ "Aucune cible!"
+ ]
+ },
+ {
+ "file": "b2WaqRna5CFXmbDG.js",
+ "wfrp4eSize": 25,
+ "frSize": 25,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "b5DfAWtpV1x2R8If.js",
+ "wfrp4eSize": 113,
+ "frSize": 119,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "bEVlJOOA1kLlzpWx.js",
+ "wfrp4eSize": 2274,
+ "frSize": 2326,
+ "wfrp4eTexts": [
+ "Could not find ${talent}",
+ "Could not find ${trapping}"
+ ],
+ "frTexts": [
+ "Impossible de trouver ${talent}",
+ "Impossible de trouver ${trapping}"
+ ]
+ },
+ {
+ "file": "bLkt8VpTTPoTxW0W.js",
+ "wfrp4eSize": 174,
+ "frSize": 184,
+ "wfrp4eTexts": [
+ "Added Bleeding"
+ ],
+ "frTexts": [
+ "Ajout d"
+ ]
+ },
+ {
+ "file": "bMEFHPCei2evnZZw.js",
+ "wfrp4eSize": 565,
+ "frSize": 566,
+ "wfrp4eTexts": [],
+ "frTexts": [
+ "\n ${this.effect.name}:
\n ${args.actor.name} reçoit un état @Condition[Empoisonné], qui peut être résisté avec un Test de Résistance Difficile (-10)."
+ ]
+ },
+ {
+ "file": "bQyVajMN1ETwlzvM.js",
+ "wfrp4eSize": 358,
+ "frSize": 364,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "btPrQkGRKUkhNe3N.js",
+ "wfrp4eSize": 47,
+ "frSize": 49,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "cK1Jysfu5IMUUH0C.js",
+ "wfrp4eSize": 321,
+ "frSize": 334,
+ "wfrp4eTexts": [],
+ "frTexts": [
+ "Protection améliorée de "
+ ]
+ },
+ {
+ "file": "chUpiI3el8IO8MSs.js",
+ "wfrp4eSize": 261,
+ "frSize": 276,
+ "wfrp4eTexts": [],
+ "frTexts": [
+ "Récupère ${woundsGained} Blessures"
+ ]
+ },
+ {
+ "file": "dIxYt421K010eogY.js",
+ "wfrp4eSize": 333,
+ "frSize": 331,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "dM449AU0FQRnOc3l.js",
+ "wfrp4eSize": 90,
+ "frSize": 89,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "dWr3tkFoIzsAgelu.js",
+ "wfrp4eSize": 594,
+ "frSize": 647,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "dbOSvpgcPjsc2uvq.js",
+ "wfrp4eSize": 391,
+ "frSize": 386,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "dcwY8dCd3PNCEzk6.js",
+ "wfrp4eSize": 226,
+ "frSize": 243,
+ "wfrp4eTexts": [],
+ "frTexts": [
+ "${this.actor.prototypeToken.name} voit ses Points de Destin augmentés de ${current} à ${current + 1}"
+ ]
+ },
+ {
+ "file": "e34s1XxHckAWfwHt.js",
+ "wfrp4eSize": 281,
+ "frSize": 281,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "e7IxnxePdXSy6L4E.js",
+ "wfrp4eSize": 199,
+ "frSize": 209,
+ "wfrp4eTexts": [],
+ "frTexts": [
+ "${this.actor.prototypeToken.name} subit une @Table[crithead]{Blessure Critique} si il n"
+ ]
+ },
+ {
+ "file": "ePPgxQOqL1Uhz2k9.js",
+ "wfrp4eSize": 1649,
+ "frSize": 1906,
+ "wfrp4eTexts": [
+ "Could not find ${talent}"
+ ],
+ "frTexts": [
+ "Impossible de trouver ${talent}"
+ ]
+ },
+ {
+ "file": "ebDQH0MdGAG02CHl.js",
+ "wfrp4eSize": 470,
+ "frSize": 473,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "ed7Sud9HM3uB2j6b.js",
+ "wfrp4eSize": 523,
+ "frSize": 534,
+ "wfrp4eTexts": [
+ "Adding "
+ ],
+ "frTexts": [
+ "Ajout de "
+ ]
+ },
+ {
+ "file": "egDtqMxe3iekc6hv.js",
+ "wfrp4eSize": 240,
+ "frSize": 243,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "eh1J3s0s4A2AxoFp.js",
+ "wfrp4eSize": 214,
+ "frSize": 215,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "ekjJQHyMbZT2vqdc.js",
+ "wfrp4eSize": 268,
+ "frSize": 291,
+ "wfrp4eTexts": [
+ "Used ${uses} times",
+ "Used up"
+ ],
+ "frTexts": [
+ "Utilisé ${uses} fois",
+ "Utilisé"
+ ]
+ },
+ {
+ "file": "eqxE7nBO13yJS7hc.js",
+ "wfrp4eSize": 206,
+ "frSize": 212,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "ezGqDoC9hNRBnFTB.js",
+ "wfrp4eSize": 359,
+ "frSize": 363,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "f29Pv6TQtgILxt1h.js",
+ "wfrp4eSize": 767,
+ "frSize": 768,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "fEFfHFeJxkR0aIJK.js",
+ "wfrp4eSize": 366,
+ "frSize": 430,
+ "wfrp4eTexts": [],
+ "frTexts": [
+ "Tous ceux dans un rayon de 7 mètres perde 1 Point de Blessure et doivent faire un Test de Résistance Difficile (-10) ou recevoir l"
+ ]
+ },
+ {
+ "file": "fPKYkBllp7Et62lX.js",
+ "wfrp4eSize": 114,
+ "frSize": 90,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "fcY3pa72dELnOFXV.js",
+ "wfrp4eSize": 28,
+ "frSize": 28,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "feMPZhhFeXRtKdKY.js",
+ "wfrp4eSize": 274,
+ "frSize": 284,
+ "wfrp4eTexts": [
+ "None left!"
+ ],
+ "frTexts": [
+ "Aucun restant!"
+ ]
+ },
+ {
+ "file": "fiF9sM5UpcHMYa33.js",
+ "wfrp4eSize": 295,
+ "frSize": 295,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "ft0LaRWZT5WtnptP.js",
+ "wfrp4eSize": 355,
+ "frSize": 366,
+ "wfrp4eTexts": [
+ "Advantage Subtracted",
+ "Not enough Advantage!"
+ ],
+ "frTexts": [
+ "Avantage soustrait",
+ "Pas assez d"
+ ]
+ },
+ {
+ "file": "fzTB7t3x4bLmAXji.js",
+ "wfrp4eSize": 231,
+ "frSize": 242,
+ "wfrp4eTexts": [
+ "Healed ${roll.total} Wounds"
+ ],
+ "frTexts": [
+ "Soins de ${roll.total} Blessures"
+ ]
+ },
+ {
+ "file": "g1L8OYO9nCOhdKGL.js",
+ "wfrp4eSize": 533,
+ "frSize": 539,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "gKIPujyuFSn0No9v.js",
+ "wfrp4eSize": 117,
+ "frSize": 138,
+ "wfrp4eTexts": [
+ "Reset Powers"
+ ],
+ "frTexts": [
+ "Ré-initialiser les pouvoirs"
+ ]
+ },
+ {
+ "file": "gPQrszvIgGlW9yM4.js",
+ "wfrp4eSize": 103,
+ "frSize": 79,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "goz8yTlMozlsz3uY.js",
+ "wfrp4eSize": 1201,
+ "frSize": 1196,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "groEX1wJ9l00PkDF.js",
+ "wfrp4eSize": 2361,
+ "frSize": 2371,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "h766UvswLCsxcMow.js",
+ "wfrp4eSize": 3017,
+ "frSize": 3045,
+ "wfrp4eTexts": [
+ "Could not find ${talent}",
+ "Could not find ${trait}",
+ "Could not find ${trapping}",
+ "Could not find ${spell}"
+ ],
+ "frTexts": [
+ "Impossible de trouver ${talent}",
+ "Impossible de trouver ${trait}",
+ "Impossible de trouver ${trapping}",
+ "Impossible de trouver ${spell}"
+ ]
+ },
+ {
+ "file": "hA8PzeiCsHqqlUZm.js",
+ "wfrp4eSize": 215,
+ "frSize": 226,
+ "wfrp4eTexts": [],
+ "frTexts": [
+ "Gaine de @Condition[Nausée] pour [[1d10]] heures"
+ ]
+ },
+ {
+ "file": "hCzxUyO6mjLNIpaM.js",
+ "wfrp4eSize": 284,
+ "frSize": 303,
+ "wfrp4eTexts": [],
+ "frTexts": [
+ "Récupération de ${woundsGained} Blessures"
+ ]
+ },
+ {
+ "file": "hSImyYjL0CENTvXf.js",
+ "wfrp4eSize": 646,
+ "frSize": 651,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "hYNWp75ggWSTht55.js",
+ "wfrp4eSize": 238,
+ "frSize": 267,
+ "wfrp4eTexts": [],
+ "frTexts": [
+ "Peut effectuer un jet sur the @Table[crithead]{Coups Critiques à la Tête} au lieu de la localisation normale"
+ ]
+ },
+ {
+ "file": "hhCs5VBKx50S5IsY.js",
+ "wfrp4eSize": 27,
+ "frSize": 27,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "hhv7PrRdlf9sfC82.js",
+ "wfrp4eSize": 1749,
+ "frSize": 1766,
+ "wfrp4eTexts": [
+ "Could not find ${talent}",
+ "Could not find ${trapping}"
+ ],
+ "frTexts": [
+ "Impossible de trouver ${talent}",
+ "Impossible de trouver ${trapping}"
+ ]
+ },
+ {
+ "file": "hlHKeFWrOA8CsLr9.js",
+ "wfrp4eSize": 80,
+ "frSize": 55,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "hmk8zV1LTElHUI8A.js",
+ "wfrp4eSize": 304,
+ "frSize": 313,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "hpwJRAhCsXTp9bd9.js",
+ "wfrp4eSize": 2554,
+ "frSize": 2426,
+ "wfrp4eTexts": [
+ "Could not find ${talent}"
+ ],
+ "frTexts": [
+ "Impossible de trouver ${talent}"
+ ]
+ },
+ {
+ "file": "hwOZxgt7e65iWvYz.js",
+ "wfrp4eSize": 354,
+ "frSize": 360,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "hxmwtw5zAHyS2upG.js",
+ "wfrp4eSize": 78,
+ "frSize": 84,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "i5AN97A7IOeygEFA.js",
+ "wfrp4eSize": 395,
+ "frSize": 413,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "iAo3wxMLA64rsKjj.js",
+ "wfrp4eSize": 74,
+ "frSize": 80,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "iLpq4yCFN6YACrYA.js",
+ "wfrp4eSize": 131,
+ "frSize": 137,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "iMu8BZ7eHMAbPEO1.js",
+ "wfrp4eSize": 152,
+ "frSize": 166,
+ "wfrp4eTexts": [],
+ "frTexts": [
+ "this.actor.prototypeToken.name Guérison de ${healed} Blessures"
+ ]
+ },
+ {
+ "file": "iNAQJa5HyaEckknX.js",
+ "wfrp4eSize": 596,
+ "frSize": 602,
+ "wfrp4eTexts": [],
+ "frTexts": [
+ "Ne se rappelle plus du sort ${chosen.name}"
+ ]
+ },
+ {
+ "file": "iO2hCDwyQ7v4qrOI.js",
+ "wfrp4eSize": 684,
+ "frSize": 682,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "iX0ctHYHg12pjaCU.js",
+ "wfrp4eSize": 672,
+ "frSize": 664,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "id9ZdkERMZnZTWXt.js",
+ "wfrp4eSize": 222,
+ "frSize": 232,
+ "wfrp4eTexts": [
+ "Immune to Fear"
+ ],
+ "frTexts": [
+ "Immunisé à la Peur"
+ ]
+ },
+ {
+ "file": "imKVsCy8rya2gkwO.js",
+ "wfrp4eSize": 935,
+ "frSize": 937,
+ "wfrp4eTexts": [],
+ "frTexts": [
+ "
\n ${args.actor.prototypeToken.name} doit réaliser un Test \n Accessible (+20%) de Corruption (Mineur)"
+ ]
+ },
+ {
+ "file": "jFwema0iwzBphxie.js",
+ "wfrp4eSize": 420,
+ "frSize": 432,
+ "wfrp4eTexts": [],
+ "frTexts": [
+ "${args.attacker.prototypeToken.name} guéri de ${woundsGained} Blessures"
+ ]
+ },
+ {
+ "file": "jGDk7avWFSnyFoql.js",
+ "wfrp4eSize": 463,
+ "frSize": 479,
+ "wfrp4eTexts": [
+ "Removed ${broken.name}, added ${item.name} (${Math.ceil(CONFIG.Dice.randomUniform() * 10)} Rounds)"
+ ],
+ "frTexts": [
+ "Suppression de ${broken.name}, ajout de ${item.name} (${Math.ceil(CONFIG.Dice.randomUniform() * 10)} Rounds)"
+ ]
+ },
+ {
+ "file": "jHgxpe6TJDlP3oTn.js",
+ "wfrp4eSize": 443,
+ "frSize": 406,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "jObJanFoev4N6ZRv.js",
+ "wfrp4eSize": 121,
+ "frSize": 120,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "jOm7RxGFm1y6mCpN.js",
+ "wfrp4eSize": 58,
+ "frSize": 58,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "jW87rmQLtROdVEhW.js",
+ "wfrp4eSize": 266,
+ "frSize": 279,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "jXbrIGxznqf1SNxZ.js",
+ "wfrp4eSize": 633,
+ "frSize": 627,
+ "wfrp4eTexts": [],
+ "frTexts": [
+ "
\n Il bénéficie de +50 aux Tests de Natation et peut respirer sous l",
+ "${this.item.name} porté par ${this.actor.name} a été enlevé et a perdu ses propriétés. Cependant, ses effets perdurent pendant [[1d10+4]] jours, après quoi il faudra les supprimer manuellement."
+ ]
+ },
+ {
+ "file": "o88xuUConwt0vFLw.js",
+ "wfrp4eSize": 231,
+ "frSize": 238,
+ "wfrp4eTexts": [],
+ "frTexts": [
+ "Gagne ${points} Points de Chance"
+ ]
+ },
+ {
+ "file": "oDNfCNyt5KaUYmg2.js",
+ "wfrp4eSize": 326,
+ "frSize": 339,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "oPg4se8iQRD14kmB.js",
+ "wfrp4eSize": 448,
+ "frSize": 443,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "oTXPA6rbPnYOKNmo.js",
+ "wfrp4eSize": 3529,
+ "frSize": 3507,
+ "wfrp4eTexts": [
+ "Could not find ${talent}",
+ "Could not find ${trapping}"
+ ],
+ "frTexts": [
+ "Impossible de trouver ${talent}",
+ "Impossible de trouver ${trapping}"
+ ]
+ },
+ {
+ "file": "oV81zgbZsuTFG6L2.js",
+ "wfrp4eSize": 186,
+ "frSize": 200,
+ "wfrp4eTexts": [],
+ "frTexts": [
+ "Guérison de ${caster.system.characteristics.fel.bonus} Blessures"
+ ]
+ },
+ {
+ "file": "oWa7RkScnl6lR5vd.js",
+ "wfrp4eSize": 443,
+ "frSize": 452,
+ "wfrp4eTexts": [],
+ "frTexts": [
+ "Test de Force Mentale échoué, ${this.actor.prototypeToken.name} @UUID[Compendium.wfrp4e-core.items.AGcJl5rHjkyIQBPP] pour [[1d10]] heures"
+ ]
+ },
+ {
+ "file": "okW06V9UiPC4Vcrn.js",
+ "wfrp4eSize": 1846,
+ "frSize": 1863,
+ "wfrp4eTexts": [
+ "Could not find ${talent}",
+ "Could not find ${trapping}"
+ ],
+ "frTexts": [
+ "Impossible de trouver ${talent}",
+ "Impossible de trouver ${trapping}"
+ ]
+ },
+ {
+ "file": "pR4Q2OnPxXtwRVli.js",
+ "wfrp4eSize": 389,
+ "frSize": 395,
+ "wfrp4eTexts": [
+ "Cannot suffer Critical Wounds",
+ "Dormant for ${Math.ceil(CONFIG.Dice.randomUniform() * 10)} Rounds"
+ ],
+ "frTexts": [
+ "Ne peut subir de Blessures Critiques",
+ "Endormi pour ${Math.ceil(CONFIG.Dice.randomUniform() * 10)} Rounds"
+ ]
+ },
+ {
+ "file": "pkKpxVqRHIzywerL.js",
+ "wfrp4eSize": 136,
+ "frSize": 147,
+ "wfrp4eTexts": [
+ "Resisted Ablaze"
+ ],
+ "frTexts": [
+ "Résiste à En Flammes"
+ ]
+ },
+ {
+ "file": "q0LvphC8RDSyR0oY.js",
+ "wfrp4eSize": 376,
+ "frSize": 382,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "q8lOAWr2970sZeTw.js",
+ "wfrp4eSize": 1224,
+ "frSize": 1219,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "qAEZgtu5CrfUkxhx.js",
+ "wfrp4eSize": 621,
+ "frSize": 621,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "qSwCYMMiIHmSV1X5.js",
+ "wfrp4eSize": 416,
+ "frSize": 422,
+ "wfrp4eTexts": [
+ "None left!"
+ ],
+ "frTexts": [
+ "None left!"
+ ]
+ },
+ {
+ "file": "qT0WBPxLMMO9gvCd.js",
+ "wfrp4eSize": 203,
+ "frSize": 209,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "qmOt7h17hGAKqQe0.js",
+ "wfrp4eSize": 349,
+ "frSize": 505,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "qu194dVXm9Vx1TGk.js",
+ "wfrp4eSize": 529,
+ "frSize": 531,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "qxzhPtysAjPWspKf.js",
+ "wfrp4eSize": 130,
+ "frSize": 145,
+ "wfrp4eTexts": [
+ "Cannot enter ${this.effect.name}!"
+ ],
+ "frTexts": [
+ "Ne peut entrer ${this.effect.name}!"
+ ]
+ },
+ {
+ "file": "rBAoyhzeU3Q8MVSk.js",
+ "wfrp4eSize": 1222,
+ "frSize": 1217,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "rCh3ltUrUMovd2Kc.js",
+ "wfrp4eSize": 143,
+ "frSize": 150,
+ "wfrp4eTexts": [
+ "Cannot be surprised"
+ ],
+ "frTexts": [
+ "Ne peut être surpris"
+ ]
+ },
+ {
+ "file": "rF0Z3hTUUnSxL3Mq.js",
+ "wfrp4eSize": 2408,
+ "frSize": 2424,
+ "wfrp4eTexts": [
+ "Adding ${items.map(i => i.name).join("
+ ],
+ "frTexts": [
+ "Ajout de ${items.map(i => i.name).join("
+ ]
+ },
+ {
+ "file": "rX8FTinyTMj9WJri.js",
+ "wfrp4eSize": 1322,
+ "frSize": 1328,
+ "wfrp4eTexts": [],
+ "frTexts": [
+ "\n
\n Holed due to opened Gun Ports: ${openGunPorts}\n
\n Il subit -20 à tout ses tests pour résister aux maladies.
\n Si il porte le masque pendant plus d",
+ "${this.item.name} porté par ${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 supprimés manuellement."
+ ]
+ },
+ {
+ "file": "xihniGjgqOhuaKWc.js",
+ "wfrp4eSize": 476,
+ "frSize": 221,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "xklncIMwQIespDxS.js",
+ "wfrp4eSize": 316,
+ "frSize": 308,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "xqWxV9w5ezBQdJkZ.js",
+ "wfrp4eSize": 31,
+ "frSize": 31,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "y3F1K1sYBymPZCjz.js",
+ "wfrp4eSize": 2686,
+ "frSize": 2698,
+ "wfrp4eTexts": [
+ "Could not find ${talent}",
+ "Could not find ${trapping}"
+ ],
+ "frTexts": [
+ "Impossible de trouver ${talent}",
+ "Impossible de trouver ${trapping}"
+ ]
+ },
+ {
+ "file": "yAL0YwZWVm8o1nxa.js",
+ "wfrp4eSize": 356,
+ "frSize": 354,
+ "wfrp4eTexts": [],
+ "frTexts": [
+ "[[3d10]] @UUID[Compendium.wfrp4e-core.actors.T79RqnDOAQLn3I1s]{zombies} sortent des décombres."
+ ]
+ },
+ {
+ "file": "yCgH3N9AurIiAv0i.js",
+ "wfrp4eSize": 1118,
+ "frSize": 979,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "yDvxF9llUYwJg0sE.js",
+ "wfrp4eSize": 883,
+ "frSize": 861,
+ "wfrp4eTexts": [
+ "Repeater "
+ ],
+ "frTexts": [
+ "Repeater "
+ ]
+ },
+ {
+ "file": "yFMvxecXAZ6T2O0S.js",
+ "wfrp4eSize": 449,
+ "frSize": 405,
+ "wfrp4eTexts": [],
+ "frTexts": [
+ "Deux @UUID[Compendium.wfrp4e-eis.actors.cLOGeMqUty61nYB9]{Horreurs bleus de Tzeentch} sortent du corps de ${this.actor.name}, le tuant au passage."
+ ]
+ },
+ {
+ "file": "yMMzZ7daCqRlGT3N.js",
+ "wfrp4eSize": 290,
+ "frSize": 306,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "yQziCK8G8I1RYkTj.js",
+ "wfrp4eSize": 503,
+ "frSize": 465,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "yTmRoUstxHMso91c.js",
+ "wfrp4eSize": 195,
+ "frSize": 171,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "ybxDG2ezvRx02LYx.js",
+ "wfrp4eSize": 31,
+ "frSize": 31,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "ynV7tz0OdCwlsQp6.js",
+ "wfrp4eSize": 357,
+ "frSize": 363,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "ynoHNXXCGRS6fTqF.js",
+ "wfrp4eSize": 623,
+ "frSize": 632,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "yzN7ZNlgCiSVJqsU.js",
+ "wfrp4eSize": 192,
+ "frSize": 202,
+ "wfrp4eTexts": [
+ "Applied after effects"
+ ],
+ "frTexts": [
+ "Appliqué après les effets"
+ ]
+ },
+ {
+ "file": "z8mwLihZQu0JtUHY.js",
+ "wfrp4eSize": 3018,
+ "frSize": 3059,
+ "wfrp4eTexts": [
+ "Could not find ${talent}",
+ "Could not find ${trapping}"
+ ],
+ "frTexts": [
+ "Impossible de trouver ${talent}",
+ "Impossible de trouver ${trapping}"
+ ]
+ },
+ {
+ "file": "zIpl3SkWv8zzlr2D.js",
+ "wfrp4eSize": 1133,
+ "frSize": 1144,
+ "wfrp4eTexts": [],
+ "frTexts": []
+ },
+ {
+ "file": "zK38Rl5t9zbFi4Se.js",
+ "wfrp4eSize": 196,
+ "frSize": 208,
+ "wfrp4eTexts": [
+ "Added Bleeding"
+ ],
+ "frTexts": [
+ "Ajout d"
+ ]
+ },
+ {
+ "file": "zL7ECmBBMAqf5Esn.js",
+ "wfrp4eSize": 1058,
+ "frSize": 1000,
+ "wfrp4eTexts": [],
+ "frTexts": [
+ "
+
+ C
+
+### 0BP5l7bIkf744G1k.js
+
+- Taille WFRP4E: 70 octets
+- Taille FR: 70 octets
+
+### 0FWto1oEr3jbWggw.js
+
+- Taille WFRP4E: 789 octets
+- Taille FR: 766 octets
+- Textes WFRP4E: Could not find ${lore} spell. Try Again
+- Textes FR: Impossible de trouver le sort ${lore}. Essayez à nouveau
+
+### 0R0QAr3D024kWPfo.js
+
+- Taille WFRP4E: 552 octets
+- Taille FR: 589 octets
+- Textes WFRP4E: Mutation table not found, please ensure a table with the , Item could not be found: , ${item.name} added
+- Textes FR: La table des Mutations n, L, ${item.name} added
+
+### 0Uly7OmkH0zqYbxQ.js
+
+- Taille WFRP4E: 584 octets
+- Taille FR: 585 octets
+- Textes WFRP4E: Dropped ${dropped.map(i => i.name).join(
+- Textes FR: Lache ${dropped.map(i => i.name).join(
+
+### 0abwNjpzo3SbEOeO.js
+
+- Taille WFRP4E: 267 octets
+- Taille FR: 270 octets
+
+### 0yyofYHeDRQlFliO.js
+
+- Taille WFRP4E: 68 octets
+- Taille FR: 68 octets
+
+### 11uCC0mK2uL783al.js
+
+- Taille WFRP4E: 134 octets
+- Taille FR: 133 octets
+
+### 190PHSHKGaJ74wsR.js
+
+- Taille WFRP4E: 1169 octets
+- Taille FR: 1060 octets
+
+### 1BT0MWM2cbhlEnrn.js
+
+- Taille WFRP4E: 1169 octets
+- Taille FR: 1176 octets
+- Textes WFRP4E: Could not find ${talent}
+- Textes FR: Impossible de trouver ${talent}
+
+### 1CeYp5MlPcH68UIw.js
+
+- Taille WFRP4E: 2481 octets
+- Taille FR: 2498 octets
+- Textes WFRP4E: Could not find ${talent}, Could not find ${trapping}
+- Textes FR: Impossible de trouver ${talent}, Impossible de trouver ${trapping}
+
+### 1JwxZujbDcueLWBL.js
+
+- Taille WFRP4E: 162 octets
+- Taille FR: 168 octets
+
+### 1OpT3CXs07XFWWCT.js
+
+- Taille WFRP4E: 30 octets
+- Taille FR: 30 octets
+
+### 1ZArMNUI8qqH6zkX.js
+
+- Taille WFRP4E: 247 octets
+- Taille FR: 242 octets
+
+### 1exiWlVUHsXDLLAH.js
+
+- Taille WFRP4E: 62 octets
+- Taille FR: 70 octets
+- Textes WFRP4E: Cannot enter ${this.effect.name}!
+- Textes FR: Ne peut saisir ${this.effect.name}!
+
+### 1fQr1Dg7DX0vfz3r.js
+
+- Taille WFRP4E: 134 octets
+- Taille FR: 145 octets
+- Textes FR: Soins de ${healed} Blessures
+
+### 1jQq9v8fXK8zuEBU.js
+
+- Taille WFRP4E: 853 octets
+- Taille FR: 863 octets
+
+### 1l7Jz2ZHbAWko7Vm.js
+
+- Taille WFRP4E: 33 octets
+- Taille FR: 33 octets
+
+### 1wrPvP6lJwIAfmsl.js
+
+- Taille WFRP4E: 362 octets
+- Taille FR: 371 octets
+
+### 1yOvw74jzFfaI87b.js
+
+- Taille WFRP4E: 27 octets
+- Taille FR: 27 octets
+
+### 23vWiHUjxtRQ3Efz.js
+
+- Taille WFRP4E: 219 octets
+- Taille FR: 218 octets
+
+### 2AOo7KUyzMrgIlgM.js
+
+- Taille WFRP4E: 137 octets
+- Taille FR: 129 octets
+
+### 2Qi1hwLYhdE6v6Hs.js
+
+- Taille WFRP4E: 243 octets
+- Taille FR: 258 octets
+- Textes WFRP4E: Cannot Dodge!
+- Textes FR: Impossible d
+
+### 2cKarG9ToyW2ptCd.js
+
+- Taille WFRP4E: 338 octets
+- Taille FR: 340 octets
+- Textes WFRP4E: None left!
+- Textes FR: Vide !
+
+### 2rzxQlL7A9ujZ9uK.js
+
+- Taille WFRP4E: 315 octets
+- Taille FR: 316 octets
+- Textes WFRP4E: ${this.effect.name}: Gained ${this.item.Advances} Advantage
+- Textes FR: ${this.effect.name}: Gain de ${this.item.Advances} Avantages
+
+### 2yctEihGmdCfTTVx.js
+
+- Taille WFRP4E: 88 octets
+- Taille FR: 63 octets
+
+### 2zeP2nMSURjxrqYz.js
+
+- Taille WFRP4E: 282 octets
+- Taille FR: 302 octets
+- Textes WFRP4E: No effect at 0 Wounds, Healed ${this.actor.characteristics.t.bonus} Wounds
+- Textes FR: Aucun effet à 0 Blessures, Soin de ${this.actor.characteristics.t.bonus} Blessures
+
+### 33US8YRgaMqYu2We.js
+
+- Taille WFRP4E: 29 octets
+- Taille FR: 29 octets
+
+### 37UN17gb8suFeZIW.js
+
+- Taille WFRP4E: 133 octets
+- Taille FR: 139 octets
+
+### 3D5ImpMgpOTPucvv.js
+
+- Taille WFRP4E: 379 octets
+- Taille FR: 379 octets
+
+### 3IGO7xEjRjat937X.js
+
+- Taille WFRP4E: 232 octets
+- Taille FR: 241 octets
+- Textes WFRP4E: Removing Fatigued Condition, disabled effect
+- Textes FR: Suppression de l
+
+### 3eSaX0BeaUalNkEP.js
+
+- Taille WFRP4E: 26 octets
+- Taille FR: 26 octets
+
+### 3jm0NoYpgB6ZuUSl.js
+
+- Taille WFRP4E: 38 octets
+- Taille FR: 38 octets
+
+### 3l7MQSa10Kve2K3P.js
+
+- Taille WFRP4E: 215 octets
+- Taille FR: 221 octets
+
+### 4MQ7u4INxp51oyyR.js
+
+- Taille WFRP4E: 1932 octets
+- Taille FR: 1952 octets
+- Textes WFRP4E: Could not find ${talent}, Could not find ${trapping}
+- Textes FR: Impossible de trouver ${talent}, Impossible de trouver ${trapping}
+
+### 4ylzjgUdHY5D0yVh.js
+
+- Taille WFRP4E: 3410 octets
+- Taille FR: 3359 octets
+- Textes WFRP4E: Could not find ${talent}, Could not find ${trapping}
+- Textes FR: Impossible de trouver ${talent}, Impossible de trouver ${trapping}
+
+### 58rFc9HiBoX66J6p.js
+
+- Taille WFRP4E: 444 octets
+- Taille FR: 453 octets
+
+### 5DI6cHAg1LHo54Yv.js
+
+- Taille WFRP4E: 420 octets
+- Taille FR: 426 octets
+- Textes FR: 1 Point de Fortune volé à ${this.actor.name}
+
+### 5JWC0l3JEpOsqbR9.js
+
+- Taille WFRP4E: 1767 octets
+- Taille FR: 1783 octets
+- Textes WFRP4E: Could not find ${talent}, Could not find ${trapping}
+- Textes FR: Impossible de trouver ${talent}, Impossible de trouver ${trapping}
+
+### 5JvKJZPcd6Hz5zvn.js
+
+- Taille WFRP4E: 1886 octets
+- Taille FR: 1906 octets
+- Textes WFRP4E: Could not find ${talent}, Could not find ${trapping}
+- Textes FR: Impossible de trouver ${talent}, Impossible de trouver ${trapping}
+
+### 5M6IgCUncCwyxHok.js
+
+- Taille WFRP4E: 1217 octets
+- Taille FR: 1197 octets
+
+### 5MxRDXzUBPfp2KKD.js
+
+- Taille WFRP4E: 38 octets
+- Taille FR: 38 octets
+
+### 5ScjIdRUOxblHdWS.js
+
+- Taille WFRP4E: 1217 octets
+- Taille FR: 1212 octets
+
+### 5dR7Erj3nwsxLAV7.js
+
+- Taille WFRP4E: 1954 octets
+- Taille FR: 1976 octets
+- Textes WFRP4E: Could not find ${talent}, Could not find ${trapping}
+- Textes FR: Impossible de trouver ${talent}, Impossible de trouver ${trapping}
+
+### 62Ky6bC1EnTllSJA.js
+
+- Taille WFRP4E: 253 octets
+- Taille FR: 259 octets
+
+### 65xE9OV5sA1ZWT7j.js
+
+- Taille WFRP4E: 377 octets
+- Taille FR: 377 octets
+
+### 6Aqq4F4Xui923sc6.js
+
+- Taille WFRP4E: 779 octets
+- Taille FR: 754 octets
+- Textes FR:
+ 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, ${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.
+
+### 6H6vNjzvMGl2ZqCR.js
+
+- Taille WFRP4E: 285 octets
+- Taille FR: 305 octets
+- Textes FR: Lame de Nurglitch: ${args.actor.name} doit réussir un Test d
+
+### 6QZUX7ZrFxOzqI0b.js
+
+- Taille WFRP4E: 252 octets
+- Taille FR: 268 octets
+
+
+... et 423 autres fichiers
+
+## Scripts uniquement dans WFRP4E (394)
+
+Ces scripts existent dans WFRP4E mais pas dans le module FR.
+
+- 07tvKnPT8ICtv2us.js
+- 0H2syk6qc0sCY0pj.js
+- 0IAc5VFR2ogXOaGE.js
+- 0NAD1LNcVyAZ1fC7.js
+- 0PzfGjGhHQbxEwlb.js
+- 0amHqfjTRp5ff6Op.js
+- 0hAbiNR1nFkpFMRz.js
+- 0hgTyeaEhMBLwzUn.js
+- 0kUalAsb4OhtYbaJ.js
+- 0uUxvBLJC76WIIBC.js
+- 0wR0LWpfhLFA240I.js
+- 0wmIC2MssUX6LW3N.js
+- 1Du4e27M8WgP2iui.js
+- 1PPh4vHd5sPKtudZ.js
+- 1UvL0XA1EpQtjDNn.js
+- 20fvE9nJmcfGYVzw.js
+- 22PMOW0G5MWiBQmg.js
+- 2EAYX5G9Fh3HJwiP.js
+- 2Ej6LUqn8frTRURo.js
+- 2IPTF0akWw9y48br.js
+
+... et 374 autres
+
+## Scripts uniquement dans FR (2)
+
+Ces scripts existent dans le module FR mais plus dans WFRP4E (probablement supprimés).
+
+- ZingXNvYyZ2BEvfY.js
+- tfdKU6nmvUtEjXE2.js
+
diff --git a/tools/scripts-replaced-list.md b/tools/scripts-replaced-list.md
new file mode 100644
index 0000000..3aaecd9
--- /dev/null
+++ b/tools/scripts-replaced-list.md
@@ -0,0 +1,93 @@
+# Scripts remplacés par les versions système
+
+Date: 2026-01-06T19:07:20.939Z
+
+## Résumé
+
+- **Scripts remplacés**: 46
+- **Erreurs**: 0
+
+Tous les scripts ont été remplacés par leurs versions du système WFRP4E.
+Les versions françaises avec traductions sont sauvegardées avec l'extension `.fr-backup`.
+
+## Scripts à revoir manuellement
+
+Pour chaque script, vous devez :
+1. Comparer la version actuelle (système) avec le backup (.fr-backup)
+2. Identifier les textes à traduire
+3. Appliquer les traductions nécessaires
+
+| # | Fichier | Traductions trouvées |
+|---|---------|----------------------|
+| 1 | `0FWto1oEr3jbWggw.js` | Impossible de trouver le sort ${lore}. Essayez à nouveau, Chargement, Impossible... |
+| 2 | `1BT0MWM2cbhlEnrn.js` | Impossible de trouver ${talent}, Impossible |
+| 3 | `1CeYp5MlPcH68UIw.js` | Impossible de trouver ${talent}, Impossible de trouver ${trapping}, Impossible |
+| 4 | `2Qi1hwLYhdE6v6Hs.js` | Impossible d, Impossible |
+| 5 | `4MQ7u4INxp51oyyR.js` | Impossible de trouver ${talent}, Impossible de trouver ${trapping}, Impossible |
+| 6 | `4ylzjgUdHY5D0yVh.js` | Impossible de trouver ${talent}, Impossible de trouver ${trapping}, Impossible |
+| 7 | `5JWC0l3JEpOsqbR9.js` | Impossible de trouver ${talent}, Impossible de trouver ${trapping}, Impossible |
+| 8 | `5JvKJZPcd6Hz5zvn.js` | Impossible de trouver ${talent}, Impossible de trouver ${trapping}, Impossible |
+| 9 | `5dR7Erj3nwsxLAV7.js` | Impossible de trouver ${talent}, Impossible de trouver ${trapping}, Impossible |
+| 10 | `6jcTzK1XEuWqAacN.js` | Impossible d, Impossible |
+| 11 | `6xTtJEhRc4OjcDTf.js` | Impossible de mettre à jour la Fortune, Impossible |
+| 12 | `A1odAcuRbq9797ZB.js` | Impossible de trouver ${talent}, Impossible |
+| 13 | `I1J2m5uud84N50Lk.js` | Impossible d, Impossible |
+| 14 | `IslMfFgpgQq2brpu.js` | Impossible de supprimer l, Impossible |
+| 15 | `IupskvzvoGyD2H5o.js` | Adding , Impossible de trouver any Blessings associated with ${god}., Impossible... |
+| 16 | `KICZPwLvbUSxbDrE.js` | Impossible de trouver la table des Mutations Mentales, Impossible de trouver l, ${item.name} added... |
+| 17 | `N8hA6ysHCTlLd8Kj.js` | Impossible de trouver ${talent}, Impossible de trouver ${trapping}, Impossible |
+| 18 | `RvipIYj9H7n4UDMe.js` | Impossible de trouver ${talent}, Impossible de trouver ${trapping}, Impossible |
+| 19 | `TCtXPvDpbfz1yrVZ.js` | Impossible de trouver ${talent}, Impossible |
+| 20 | `TwgdEucxcHloc4cX.js` | Impossible de trouver ${c.name}, Impossible |
+| 21 | `U1UpSRJOSjPpO4HS.js` | Ajout ${mutations[roll].name}, Chargement, Chargement des mutations |
+| 22 | `ULmZMLezDamerN04.js` | Chargement, Chargement des sorts |
+| 23 | `UQtXuQmUlTyDKqhe.js` | Impossible de trouver ${talent}, Impossible de trouver ${trapping}, Impossible |
+| 24 | `UnqnWi0dZYLf5fTT.js` | Impossible de trouver ${c.name}, Impossible |
+| 25 | `V9zm2hKUVLVZtAcN.js` | Impossible de trouver ${talent}, Impossible de trouver ${trait}, Impossible de trouver ${trapping}... |
+| 26 | `WO5n7Vbx8AgoVrwC.js` | Impossible de trouver ${talent}, Impossible de trouver ${trapping}, Impossible |
+| 27 | `YN8719gme9AxYtyY.js` | Impossible de trouver ${talent}, Impossible de trouver ${trapping}, Impossible |
+| 28 | `Z6jNlyZMECkW4Hon.js` | Chargement, Chargement des sorts |
+| 29 | `aeBetniKqq5SD9Ou.js` | Impossible de trouver ${talent}, Impossible de trouver ${trapping}, Impossible |
+| 30 | `bEVlJOOA1kLlzpWx.js` | Impossible de trouver ${talent}, Impossible de trouver ${trapping}, Impossible |
+| 31 | `ePPgxQOqL1Uhz2k9.js` | Impossible de trouver ${talent}, Impossible |
+| 32 | `h766UvswLCsxcMow.js` | Impossible de trouver ${talent}, Impossible de trouver ${trait}, Impossible de trouver ${trapping}... |
+| 33 | `hhv7PrRdlf9sfC82.js` | Impossible de trouver ${talent}, Impossible de trouver ${trapping}, Impossible |
+| 34 | `hpwJRAhCsXTp9bd9.js` | Impossible de trouver ${talent}, Impossible |
+| 35 | `iuSoKntfJ4eAPafQ.js` | Chargement, Chargement des sorts |
+| 36 | `jHgxpe6TJDlP3oTn.js` | Chargement, Chargement des sorts |
+| 37 | `lII4KMRblqwFBlsV.js` | Impossible de trouver ${talent}, Impossible de trouver ${trait}, Impossible de trouver ${trapping}... |
+| 38 | `oTXPA6rbPnYOKNmo.js` | Impossible de trouver ${talent}, Impossible de trouver ${trapping}, Impossible |
+| 39 | `okW06V9UiPC4Vcrn.js` | Impossible de trouver ${talent}, Impossible de trouver ${trapping}, Impossible |
+| 40 | `svCqdytEOtqFXCcs.js` | Impossible de trouver ${talent}, Impossible de trouver ${trapping}, Impossible |
+| 41 | `sz0PqS1kroMOzUZk.js` | Impossible de trouver ${talent}, Impossible de trouver ${trapping}, Impossible |
+| 42 | `v5xrDWcrTNFJkyQB.js` | Impossible de trouver ${talent}, Impossible |
+| 43 | `whUSkaR1yem21bXp.js` | Impossible de trouver ${talent}, Impossible de trouver ${trait}, Impossible de trouver ${trapping}... |
+| 44 | `y3F1K1sYBymPZCjz.js` | Impossible de trouver ${talent}, Impossible de trouver ${trapping}, Impossible |
+| 45 | `z8mwLihZQu0JtUHY.js` | Impossible de trouver ${talent}, Impossible de trouver ${trapping}, Impossible |
+| 46 | `zadppy7FEbXvgUON.js` | Impossible de trouver ${talent}, Impossible de trouver ${trapping}, Impossible |
+
+## Commandes utiles
+
+### Comparer un script avec son backup
+
+```bash
+# Avec meld
+meld scripts/\n
\n It’s up to Ranald if their regenerating can outpace their poisoning.\n
\n 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.
", + "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.
\nIf 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é.
\nSi 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.
\nNote 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.
\nNotez 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 Sélectionnez votre choix\n
\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 +=", + "\n Select your choice\n
\n\n Sélectionnez votre choix\n
\n\n Ranged (Bow) +10 and a Longbow with 12 Arrows\n
", + "fr": "Ajouter une option?\n\n Projectile (Arc) +10 et un Arc long avec 12 flèches\n
" + } + ] + }, + { + "file": "vFUVWZ1l8wpTjLcx.js", + "translations": [ + { + "en": "Daemonic", + "fr": "Démoniaque" + } + ] + }, + { + "file": "ve3RcfTi49rdYZU0.js", + "translations": [ + { + "en": "Endurance", + "fr": "Résistance" + } + ] + }, + { + "file": "whUSkaR1yem21bXp.js", + "translations": [ + { + "en": "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(", + "fr": "}`).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 +=" + }, + { + "en": "}`).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 +=", + "fr": "}`).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 +=" + } + ] + }, + { + "file": "wyTCozh9qGTx6yK0.js", + "translations": [ + { + "en": "Fear", + "fr": "Peur" + } + ] + }, + { + "file": "xUpKYT7BZCSmAfUy.js", + "translations": [ + { + "en": "None left!", + "fr": "Plus rien !" + } + ] + }, + { + "file": "xiyQSXozoLxt0MZs.js", + "translations": [ + { + "en": "Painless", + "fr": "utilisateur d" + }, + { + "en": "Immunity to Psychology", + "fr": "Immunité Psychologique" + } + ] + }, + { + "file": "y7hk7prQ0lLTyv1Y.js", + "translations": [ + { + "en": "Ranged", + "fr": "Projectiles" + } + ] + }, + { + "file": "yQziCK8G8I1RYkTj.js", + "translations": [ + { + "en": "Ranged", + "fr": "Projectiles" + } + ] + }, + { + "file": "zadppy7FEbXvgUON.js", + "translations": [ + { + "en": ")\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(", + "fr": ")\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(" + } + ] + }, + { + "file": "zi8Z3NlwVj3IfgAW.js", + "translations": [ + { + "en": "None left!", + "fr": "Plus rien !" + } + ] + } + ] +} \ No newline at end of file diff --git a/wh4_fr.js b/wh4_fr.js index 52eec7d..527a09e 100644 --- a/wh4_fr.js +++ b/wh4_fr.js @@ -1,4 +1,11 @@ +import { initTravelV2 } from './modules/travelv2/travelv2-init.js'; +import { initInn } from './modules/inn/inn-init.js'; + Hooks.once("init", function() { - CONFIG.wfrp4e.supportedLanguages["fr"] = "fr"; - CONFIG.eis.supportedLanguages["fr"] = "fr"; + + // Initialiser le module TravelV2 + initTravelV2(); + + // Initialiser le module Inn (Auberge) + initInn(); })