Scripts englisch statt französisch

This commit is contained in:
alzer
2025-05-15 23:03:43 +02:00
parent 0bcbc29f0f
commit d80779f206
503 changed files with 10469 additions and 1616 deletions
+2 -1
View File
@@ -1,4 +1,5 @@
.history/ .history/
.idea/ .idea/
compendium/To Do/Alte Übersetzung/Ganz alt/tmp.html compendium/To Do/Alte Übersetzung/Ganz alt/tmp.html
compendium/To Do/GPT/actors_split/ compendium/To Do/GPT/actors_split/
python/working_dir/
@@ -7495,10 +7495,10 @@
{ {
"description": "<p>La créature est capable de guérir à une vitesse extraordinaire, et même de faire repousser ses membres amputés.<p></p>Au début de chaque round, s'il reste plus de 0 Point de Blessure à la créature, elle régénère 1d10 Points de Blessure. Si elle est à 0 Point de Blessure, lancez 1d10. Sur un résultat de 8+, elle régénère 1 seul Point de Blessure. Sur un résultat de 10, elle régénère également une Blessure Critique, et ne souffre plus des pénalités et États associés.<p></p>Les Blessures et Blessures Critiques infligées par le Feu ne peuvent pas être régénérées, et doivent être notées séparément.</p>", "description": "<p>La créature est capable de guérir à une vitesse extraordinaire, et même de faire repousser ses membres amputés.<p></p>Au début de chaque round, s'il reste plus de 0 Point de Blessure à la créature, elle régénère 1d10 Points de Blessure. Si elle est à 0 Point de Blessure, lancez 1d10. Sur un résultat de 8+, elle régénère 1 seul Point de Blessure. Sur un résultat de 10, elle régénère également une Blessure Critique, et ne souffre plus des pénalités et États associés.<p></p>Les Blessures et Blessures Critiques infligées par le Feu ne peuvent pas être régénérées, et doivent être notées séparément.</p>",
"id": "SfUUdOGjdYpr3KSR", "id": "SfUUdOGjdYpr3KSR",
"name": "Régénération", "name": "Regenerieren",
"effects": [ "effects": [
{ {
"label": "Régénération", "label": "Regenerieren",
"flags": { "flags": {
"wfrp4e": { "wfrp4e": {
"effectTrigger": "endRound", "effectTrigger": "endRound",
@@ -18937,7 +18937,7 @@
} }
}, },
"icon": "modules/wfrp4e-core/icons/spells/regenerate.png", "icon": "modules/wfrp4e-core/icons/spells/regenerate.png",
"label": "Régénération", "label": "Regenerieren",
"tint": "", "tint": "",
"transfer": false "transfer": false
}, },
@@ -18959,7 +18959,7 @@
} }
], ],
"id": "Regenerate", "id": "Regenerate",
"name": "Régénération" "name": "Regenerieren"
}, },
{ {
"description": "<p>Vous faites pourrir un volume de matières organiques de la taille approximative d'un poing. Les denrées alimentaires périssent, les vêtements se désagrègent, le cuir se racornit (perdant 1 PA à 1 Localisation), etc. Comme le MJ le décide.</p>", "description": "<p>Vous faites pourrir un volume de matières organiques de la taille approximative d'un poing. Les denrées alimentaires périssent, les vêtements se désagrègent, le cuir se racornit (perdant 1 PA à 1 Localisation), etc. Comme le MJ le décide.</p>",
+1 -1
View File
@@ -7800,7 +7800,7 @@
{ {
"description": "<p>La créature est capable de guérir à une vitesse extraordinaire, et même de faire repousser ses membres amputés.<p></p>Au début de chaque round, s'il reste plus de 0 Point de Blessure à la créature, elle régénère 1d10 Points de Blessure. Si elle est à 0 Point de Blessure, lancez 1d10. Sur un résultat de 8+, elle régénère 1 seul Point de Blessure. Sur un résultat de 10, elle régénère également une Blessure Critique, et ne souffre plus des pénalités et États associés.<p></p>Les Blessures et Blessures Critiques infligées par le Feu ne peuvent pas être régénérées, et doivent être notées séparément.</p>", "description": "<p>La créature est capable de guérir à une vitesse extraordinaire, et même de faire repousser ses membres amputés.<p></p>Au début de chaque round, s'il reste plus de 0 Point de Blessure à la créature, elle régénère 1d10 Points de Blessure. Si elle est à 0 Point de Blessure, lancez 1d10. Sur un résultat de 8+, elle régénère 1 seul Point de Blessure. Sur un résultat de 10, elle régénère également une Blessure Critique, et ne souffre plus des pénalités et États associés.<p></p>Les Blessures et Blessures Critiques infligées par le Feu ne peuvent pas être régénérées, et doivent être notées séparément.</p>",
"id": "SfUUdOGjdYpr3KSR", "id": "SfUUdOGjdYpr3KSR",
"name": "Régénération" "name": "Regenerieren"
}, },
{ {
"description": "<p>Dieses Merkmal repräsentiert Kreaturen, deren Körpergröße und -masse sich vom Spielstandard (also von ungefähr menschlicher Größe) unterscheidet. Es gibt sieben Größenstufen, die von Winzig bis Monströs reichen.</p><table><tr><th>Größe</th><th>Beispiele</th></tr><tr><td>Winzig</td><td>Maus, Schmetterling, Taube</td></tr><tr><td>Klein</td><td>Falke, Katze, menschliches Kleinkind</td></tr><tr><td>Zierlich</td><td>Halbling, menschliches Kind, Riesenratte</td></tr><tr><td>Normal</td><td>Elf, Mensch, Zwerg</td></tr><tr><td>Groß</td><td>Oger, Pferd, Troll</td></tr><tr><td>Enorm</td><td>Greif, Lindwurm, Mantikor</td></tr><tr><td>Monströs</td><td>Dämonenprinz, Drache, Riese</td></tr></table>", "description": "<p>Dieses Merkmal repräsentiert Kreaturen, deren Körpergröße und -masse sich vom Spielstandard (also von ungefähr menschlicher Größe) unterscheidet. Es gibt sieben Größenstufen, die von Winzig bis Monströs reichen.</p><table><tr><th>Größe</th><th>Beispiele</th></tr><tr><td>Winzig</td><td>Maus, Schmetterling, Taube</td></tr><tr><td>Klein</td><td>Falke, Katze, menschliches Kleinkind</td></tr><tr><td>Zierlich</td><td>Halbling, menschliches Kind, Riesenratte</td></tr><tr><td>Normal</td><td>Elf, Mensch, Zwerg</td></tr><tr><td>Groß</td><td>Oger, Pferd, Troll</td></tr><tr><td>Enorm</td><td>Greif, Lindwurm, Mantikor</td></tr><tr><td>Monströs</td><td>Dämonenprinz, Drache, Riese</td></tr></table>",
+1 -1
View File
@@ -95,6 +95,6 @@ def find_translated_files(original_folder, modified_folder, output_file):
# Beispielpfade (kannst du anpassen) # Beispielpfade (kannst du anpassen)
original_folder = "original_scripts" original_folder = "original_scripts"
modified_folder = "modified_scripts" modified_folder = "modified_scripts"
output_file = "translated_files_with_direct_vscode_diff_links.md" output_file = "scripts_with_translation.md"
find_translated_files(original_folder, modified_folder, output_file) find_translated_files(original_folder, modified_folder, output_file)
+8 -7
View File
@@ -6,7 +6,7 @@ await this.actor.addCondition("poisoned", 3)
await this.actor.modifyWounds(this.actor.system.characteristics.t.bonus) await this.actor.modifyWounds(this.actor.system.characteristics.t.bonus)
// and acquires the Regenerate Creature Trait. // and acquires the Regenerate Creature Trait.
const hasRegenerate = this.actor.has("Régénération") const hasRegenerate = this.actor.has("Regenerieren")
if (hasRegenerate === undefined) { if (hasRegenerate === undefined) {
fromUuid("Compendium.wfrp4e-core.items.SfUUdOGjdYpr3KSR").then(trait => { fromUuid("Compendium.wfrp4e-core.items.SfUUdOGjdYpr3KSR").then(trait => {
let traitItem = trait.toObject() let traitItem = trait.toObject()
@@ -14,12 +14,13 @@ if (hasRegenerate === undefined) {
}) })
} }
this.script.scriptMessage(`<p><strong>${this.actor.prototypeToken.name}</strong> : this.script.scriptMessage(`<p><strong>${this.actor.prototypeToken.name}</strong> hat:
<ul> <ul>
<li>Reçoit 3 états Empoisonnés, sans Test de Résistance possible</li> <li>3 Vergiftet Zustände, denen nicht widerstanden werden kann</li>
<li>Récupère ${this.actor.system.characteristics.t.bonus} Blessures</li> <li>Bekommt ${this.actor.system.characteristics.t.bonus} Wunden wieder</li>
<li>Acuiert le Trait de Creature Régénération.</li> <li>Erhält die Kreatur-Eigenschaft Regenerieren.</li>
</ul> </ul>
C'est à Ranaldde choisir si la régénératin peut guérir de l'empoisonnement.</p> Es ist Ranalds Wahl, ob die Regenerieren die Vergiftung heilen kann.</p>
<p>Lorsque tout les états Empoisonnés sont terminés, le Trait Régénération est perdu également.</p>`, <p>Wenn alle Vergifteten Zustände beendet sind, geht auch die Eigenschaft Regenerieren verloren.</p>`,
{ whisper: ChatMessage.getWhisperRecipients("GM"), blind: true }) { whisper: ChatMessage.getWhisperRecipients("GM"), blind: true })
+2 -2
View File
@@ -1,4 +1,4 @@
let spells = await warhammer.utility.findAllItems("spell", "Chargement des sorts") let spells = await warhammer.utility.findAllItems("spell", "Loading Spells")
let text = (await game.wfrp4e.tables.rollTable("random-caster", {hideDSN: true})).result let text = (await game.wfrp4e.tables.rollTable("random-caster", {hideDSN: true})).result
@@ -18,5 +18,5 @@ if (spellsWithLore.length > 0)
} }
else else
{ {
ui.notifications.notify(`Impossible de trouver le sort ${lore}. Essayez à nouveau`) ui.notifications.notify(`Could not find ${lore} spell. Try Again`)
} }
+2 -2
View File
@@ -1,7 +1,7 @@
let table = game.wfrp4e.tables.findTable("mutatephys"); let table = game.wfrp4e.tables.findTable("mutatephys");
if (!table) 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("Mutation table not found, please ensure a table with the `mutatephys` key is imported in the world.")
} }
let result = (await table.roll()).results[0]; let result = (await table.roll()).results[0];
let uuid = `Compendium.${result.documentCollection}.${result.documentId}` let uuid = `Compendium.${result.documentCollection}.${result.documentId}`
@@ -14,5 +14,5 @@ if (item)
} }
else else
{ {
ui.notifications.error("L'item ne peut être trouvé: " + uuid) ui.notifications.error("Item could not be found: " + uuid)
} }
+2 -2
View File
@@ -6,7 +6,7 @@ if (location)
if (dropped.length) if (dropped.length)
{ {
this.script.scriptNotification(`Lache ${dropped.map(i => i.name).join(", ")}!`) this.script.scriptNotification(`Dropped ${dropped.map(i => i.name).join(", ")}!`)
for(let weapon of dropped) for(let weapon of dropped)
{ {
await weapon.system.toggleEquip(); 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() 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.effect.name} (Duration)`}));
this.effect.updateSource({"duration.rounds" : roll.total}) this.effect.updateSource({"duration.rounds" : roll.total})
+1 -1
View File
@@ -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.ignored += args.modifiers.ap.metal
args.modifiers.ap.details.push("<strong>" + this.effect.name + "</strong>: Ignore le métal (" + args.modifiers.ap.metal + ")"); args.modifiers.ap.details.push("<strong>" + this.effect.name + "</strong>: Ignore Metal (" + args.modifiers.ap.metal + ")");
args.modifiers.ap.metal = 0 args.modifiers.ap.metal = 0
} }
+1 -1
View File
@@ -1,6 +1,6 @@
let type = this.item.getFlag("wfrp4e", "breath"); let type = this.item.getFlag("wfrp4e", "breath");
if (["feu", "electricité", "poison"].includes(type)) if (["fire", "electricity", "poison"].includes(type))
{ {
args.applyAP = false; args.applyAP = false;
} }
+8 -8
View File
@@ -7,22 +7,22 @@ if (!this.item.name.includes("(") || this.item.system.tests.value.includes("Terr
if (name.includes("(")) if (name.includes("("))
{ {
let terrain = name.split("(")[1].split(")")[0] 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 else // If no sense specified, provide dialog choice
{ {
let choice = await ItemDialog.create(ItemDialog.objectToArray({ let choice = await ItemDialog.create(ItemDialog.objectToArray({
coastal : "Côtes", coastal : "Coastal",
deserts : "Déserts", deserts : "Deserts",
marshes : "Marches", marshes : "Marshes",
rocky : "Rocailles", rocky : "Rocky",
tundra : "Tundra", tundra : "Tundra",
woodlands : "Forêts" woodlands : "Woodlands"
}, this.item.img), 1, "Choisir le Terrain"); }, this.item.img), 1, "Choose Terrain");
if (choice[0]) if (choice[0])
{ {
name = `${name.split("(")[0].trim()} (${choice[0].name})` name = `${name.split("(")[0].trim()} (${choice[0].name})`
tests = tests.replace("Terrain", "Terrain " + choice[0].name ) tests = tests.replace("the Terrain", choice[0].name + " Terrain")
} }
} }
+1 -1
View File
@@ -30,7 +30,7 @@
} }
else else
{ {
ui.notifications.warn(`Impossible de trouver ${talent}`, {permanent : true}) ui.notifications.warn(`Could not find ${talent}`, {permanent : true})
} }
} }
+1 -1
View File
@@ -1,4 +1,4 @@
let test = await args.actor.setupCharacteristic("wp", {skipTargets: true, appendTitle : " - " + this.effect.name, context : {failure: "Gain d'un état Assomé"}}) let test = await args.actor.setupCharacteristic("wp", {skipTargets: true, appendTitle : " - " + this.effect.name, context : {failure: "Gained a Stunned Condition"}})
await test.roll(); await test.roll();
if (test.failed) if (test.failed)
{ {
+1 -1
View File
@@ -1 +1 @@
this.script.scriptNotification(`Ne peut saisir ${this.effect.name}!`); this.script.scriptNotification(`Cannot enter ${this.effect.name}!`);
+1 -1
View File
@@ -1,3 +1,3 @@
let healed = parseInt(this.effect.sourceTest.result.SL) let healed = parseInt(this.effect.sourceTest.result.SL)
this.actor.modifyWounds(healed) this.actor.modifyWounds(healed)
this.script.scriptMessage(`Soins de ${healed} Blessures`) this.script.scriptMessage(`Healed ${healed} Wounds`)
+2 -2
View File
@@ -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) 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}); 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]})` msg += ` (ignored ${metalAP} metal AP on ${game.wfrp4e.config.locations[loc]})`
this.script.scriptMessage(msg) this.script.scriptMessage(msg)
let test = await this.actor.setupSkill("Résistance", {fields : {difficulty : "difficult"}, appendTitle : ` - ${this.effect.name}`}); let test = await this.actor.setupSkill("Endurance", {fields : {difficulty : "difficult"}, appendTitle : ` - ${this.effect.name}`});
await test.roll(); await test.roll();
if (test.failed) if (test.failed)
this.actor.addCondition("stunned"); this.actor.addCondition("stunned");
+3 -3
View File
@@ -6,12 +6,12 @@ if (!test.succeeded)
let data = item.toObject(); let data = item.toObject();
if (this.item.system.location.key == "rLeg") if (this.item.system.location.key == "rLeg")
{ {
data.system.location.value = "Pied droit" data.system.location.value = "Right Toe"
data.system.location.key = "rToe"; data.system.location.key = "rToe";
} }
else if (this.item.system.location.key == "lLeg") else if (this.item.system.location.key == "lLeg")
{ {
data.system.location.value = "Pied gauche" data.system.location.value = "Left Toe"
data.system.location.key = "lToe"; data.system.location.key = "lToe";
} }
this.actor.createEmbeddedDocuments("Item", [data]) this.actor.createEmbeddedDocuments("Item", [data])
+1 -1
View File
@@ -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, "Choose Location");
let location = choice[0].id; let location = choice[0].id;
+1 -1
View File
@@ -1,4 +1,4 @@
let item = await fromUuid("Compendium.wfrp4e-core.items.eWPN3CV2Eddwz8aM") let item = await fromUuid("Compendium.wfrp4e-core.items.eWPN3CV2Eddwz8aM")
let data = item.toObject(); let data = item.toObject();
data.system.location.value = "Dos" data.system.location.value = "Back"
this.actor.createEmbeddedDocuments("Item", [data], {fromEffect: this.effect.id}) this.actor.createEmbeddedDocuments("Item", [data], {fromEffect: this.effect.id})
+2 -6
View File
@@ -1,12 +1,8 @@
if (isNaN(parseInt(this.item.system.specification.value))) if (isNaN(parseInt(this.item.system.specification.value)))
{ {
let value = this.item.specifier; let value = await ValueDialog.create("Enter Armour value", this.effect.name);
if (!value)
{
value = await ValueDialog.create({text : "Enter Armour value", title : this.effect.name});
}
if (value) if (value)
{ {
this.item.updateSource({"system.specification.value" : value, name : this.item.baseName}); this.item.updateSource({"system.specification.value" : value});
} }
} }
+1 -1
View File
@@ -4,6 +4,6 @@ if (!["rLeg", "lLeg"].includes(this.effect.getFlag("wfrp4e", "location")))
if (args.options.dodge) if (args.options.dodge)
{ {
args.abort = true; args.abort = true;
this.script.scriptNotification("Impossible d'Esquiver!") this.script.scriptNotification("Cannot Dodge!")
} }
return ["t", "int", "wp", "fel"].includes(args.characteristic) return ["t", "int", "wp", "fel"].includes(args.characteristic)
+4 -4
View File
@@ -1,11 +1,11 @@
let skill = `${game.i18n.localize("NAME.Trade")} (${this.item.parenthesesText})` let skill = `Trade (${this.item.parenthesesText})`
let currentCareer = this.actor.system.currentCareer; let currentCareer = this.actor.system.currentCareer;
let existingSkill = this.actor.itemTypes.skill.find(i => i.name == skill); let existingSkill = this.actor.itemTypes.skill.find(i => i.name == skill);
if (!currentCareer) return if (!currentCareer) return
let inCurrentCareer = currentCareer.system.skills.concat(currentCareer.system.addedSkills).includes(skill); let inCurrentCareer = currentCareer.system.skills.includes(skill);
let craftsmanAdded = this.actor.getFlag("wfrp4e", "craftsmanAdded") || {}; let craftsmanAdded = this.actor.getFlag("wfrp4e", "craftsmanAdded") || {};
if (existingSkill && inCurrentCareer && !craftsmanAdded[existingSkill.name]) if (existingSkill && inCurrentCareer && !craftsmanAdded[existingSkill.name])
{ {
@@ -14,6 +14,6 @@ if (existingSkill && inCurrentCareer && !craftsmanAdded[existingSkill.name])
else else
{ {
craftsmanAdded[skill] = true; craftsmanAdded[skill] = true;
currentCareer.system.addedSkills.push(skill); currentCareer.system.skills.push(skill);
foundry.utils.setProperty(this.actor, "flags.wfrp4e.craftsmanAdded", craftsmanAdded) setProperty(this.actor, "flags.wfrp4e.craftsmanAdded", craftsmanAdded)
} }
+1 -1
View File
@@ -1,4 +1,4 @@
let item = await fromUuid("Compendium.wfrp4e-core.items.9h82z72XGo9tfgQS") let item = await fromUuid("Compendium.wfrp4e-core.items.9h82z72XGo9tfgQS")
let data = item.toObject(); let data = item.toObject();
data.name = data.name += " (Ouïe)" data.name = data.name += " (Hearing)"
this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}) this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id})
+1 -1
View File
@@ -6,5 +6,5 @@ if (this.item.system.quantity.value)
} }
else else
{ {
this.script.scriptNotification("Vide !", "error") this.script.scriptNotification("None left!", "error")
} }
+1 -1
View File
@@ -1,6 +1,6 @@
if (args.opposedTest.result.winner == "attacker") { if (args.opposedTest.result.winner == "attacker") {
if (args.opposedTest.defenderTest.weapon && args.opposedTest.defenderTest.item.properties.qualities.shield) { if (args.opposedTest.defenderTest.weapon && args.opposedTest.defenderTest.item.properties.qualities.shield) {
ui.notifications.notify(`<b>${this.effect.name}</b>: Gain de ${this.item.Advances} Avantages`) ui.notifications.notify(`<b>${this.effect.name}</b>: Gained ${this.item.Advances} Advantage`)
this.actor.setAdvantage(this.item.Advances) this.actor.setAdvantage(this.item.Advances)
} }
} }
+10 -10
View File
@@ -4,15 +4,15 @@ if (!currentCareer)
return; return;
} }
let talents = ["Harmonisation Aethyrique", let talents = ["Aethyric Attunement",
"Magie des Arcanes (Domaine)", "Arcane Magic (Any)",
"Magie du Chaos (Tzeentch)", "Chaos Magic (Tzeentch)",
"Mains agiles", "Fast Hands",
"Diction Instinctive", "Instinctive Diction",
"Sens de la Magie", "Magical Sense",
"Magie Mineure", "Petty Magic",
"Seconde Vue", "Second Sight",
"Mage de guerre", "War Wizard",
"Sorcier!"].filter(t => !currentCareer.system.talents.includes(t)) "Witch!"].filter(t => !currentCareer.system.talents.includes(t))
currentCareer.system.talents = currentCareer.system.talents.concat(talents) currentCareer.system.talents = currentCareer.system.talents.concat(talents)
+2 -2
View File
@@ -1,6 +1,6 @@
let wounds = this.actor.system.status.wounds let wounds = this.actor.system.status.wounds
if (wounds.value == 0) if (wounds.value == 0)
return this.script.scriptNotification("Aucun effet à 0 Blessures", "error") return this.script.scriptNotification("No effect at 0 Wounds", "error")
this.script.scriptNotification(`Soin de ${this.actor.characteristics.t.bonus} Blessures`) this.script.scriptNotification(`Healed ${this.actor.characteristics.t.bonus} Wounds`)
await this.actor.modifyWounds(this.actor.characteristics.t.bonus) await this.actor.modifyWounds(this.actor.characteristics.t.bonus)
+1 -1
View File
@@ -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()) let ones = Number(args.test.result.roll.toString().split("").pop())
if (ones > SL) if (ones > SL)
args.test.result.other.push(`<span class="hide-option"><b>${this.effect.name}</b>: ${ones + args.test.successBonus + args.test.slBonus} DR</span>`) args.test.result.other.push(`<span class="hide-option"><b>${this.effect.name}</b>: ${ones + args.test.successBonus + args.test.slBonus} SL</span>`)
} }
+1 -1
View File
@@ -1,7 +1,7 @@
let fatigue = this.actor.hasCondition("fatigued") let fatigue = this.actor.hasCondition("fatigued")
if (fatigue) if (fatigue)
{ {
this.script.scriptNotification("Suppression de l'état Fatigué, effet désactivé.") this.script.scriptNotification("Removing Fatigued Condition, disabled effect")
this.effect.update({disabled : true}) this.effect.update({disabled : true})
await this.actor.removeCondition("fatigued") await this.actor.removeCondition("fatigued")
} }
+2 -2
View File
@@ -1,4 +1,4 @@
let choice = await ItemDialog.create(ItemDialog.objectToArray(game.wfrp4e.config.locations, this.effect.img), 1, "Choisissez Location"); let choice = await ItemDialog.create(ItemDialog.objectToArray(game.wfrp4e.config.locations, this.effect.img), 1, "Choose Location");
if (choice[0]) if (choice[0])
{ {
this.effect.updateSource({name : `${this.effect.name} (${choice[0].name})`}) this.effect.updateSource({name : `${this.effect.name} (${choice[0].name})`})
@@ -13,7 +13,7 @@ if (["lArm", "rArm"].includes(location))
if (dropped.length) if (dropped.length)
{ {
this.script.scriptNotification(`Lache ${dropped.map(i => i.name).join(", ")}!`) this.script.scriptNotification(`Dropped ${dropped.map(i => i.name).join(", ")}!`)
for(let weapon of dropped) for(let weapon of dropped)
{ {
await weapon.system.toggleEquip(); await weapon.system.toggleEquip();
+16 -6
View File
@@ -10,10 +10,10 @@ let characteristics = {
"wp" : 25, "wp" : 25,
"fel" : 10 "fel" : 10
} }
let skills = ["Calme", "Esquive", "Intimidate", "Intuition", "Commandement" , "Lore (Warfare)", "Perception"] let skills = ["Cool", "Dodge", "Intimidate", "Intuition", "Leadership", "Lore (Warfare)", "Perception"]
let skillAdvancements = [15, 15, 15, 15, 15, 10, 10] let skillAdvancements = [15, 15, 15, 15, 15, 10, 10]
let talents = ["Combat Aware", "Combat Reflexes", "Feint", "Inspiring", "Resolute", "War Leader"] let talents = ["Combat Aware", "Combat Reflexes", "Feint", "Inspiring", "Resolute", "War Leader"]
let trappings = ["Arme simple", "Shield"] let trappings = ["Hand Weapon", "Shield"]
let items = []; let items = [];
let updateObj = this.actor.toObject(); let updateObj = this.actor.toObject();
@@ -48,7 +48,7 @@ for (let talent of talents)
} }
else else
{ {
ui.notifications.warn(`Impossible de trouver ${talent}`, {permanent : true}) ui.notifications.warn(`Could not find ${talent}`, {permanent : true})
} }
} }
@@ -59,17 +59,27 @@ for (let trapping of trappings)
{ {
trappingItem = trappingItem.toObject() trappingItem = trappingItem.toObject()
trappingItem.system.equipped.value = true; equip(trappingItem)
items.push(trappingItem); 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.effect.name
await this.actor.update(updateObj) await this.actor.update(updateObj)
this.actor.createEmbeddedDocuments("Item", items); this.actor.createEmbeddedDocuments("Item", items);
function equip(item)
{
if (item.type == "armour")
item.system.worn.value = true
else if (item.type == "weapon")
item.system.equipped = true
else if (item.type == "trapping" && item.system.trappingType.value == "clothingAccessories")
item.system.worn = true
}
+1 -1
View File
@@ -4,7 +4,7 @@ this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {skipTargets: true,
if (test.failed) if (test.failed)
{ {
let char = Math.ceil(CONFIG.Dice.randomUniform() * 2) == 2 ? "s" : "t"; let char = Math.ceil(CONFIG.Dice.randomUniform() * 2) == 2 ? "s" : "t";
this.script.scriptMessage(`<strong>${this.actor.name}</strong> perd 1 point de ${game.wfrp4e.config.characteristics[char]}`) this.script.scriptMessage(`<strong>${this.actor.name}</strong> lost 1 point of ${game.wfrp4e.config.characteristics[char]}`)
this.actor.update({[`system.characteristics.${char}.initial`] : this.actor.system.characteristics[char].initial - 1}) this.actor.update({[`system.characteristics.${char}.initial`] : this.actor.system.characteristics[char].initial - 1})
} }
}) })
+1 -1
View File
@@ -3,5 +3,5 @@ await test.roll();
if (test.failed && this.actor.type == "character") if (test.failed && this.actor.type == "character")
{ {
this.actor.update({"system.status.corruption.value" : parseInt(this.actor.status.corruption.value) + 1}) 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")}) this.script.scriptMessage("Gained a Corruption point", {whisper : ChatMessage.getWhisperRecipients("GM")})
} }
+1 -1
View File
@@ -1,7 +1,7 @@
let sourceActor = this.effect.sourceActor; let sourceActor = this.effect.sourceActor;
let damage = args.totalWoundLoss; let damage = args.totalWoundLoss;
let tb = sourceActor.system.characteristics.t.bonus let tb = sourceActor.system.characteristics.t.bonus
args.abort = `<strong>${this.effect.name}</strong>: Dommages appliqués à ${sourceActor.name}`; args.abort = `<strong>${this.effect.name}</strong>: Damage applied to ${sourceActor.name}`;
let message = await sourceActor.applyBasicDamage(damage - tb, {damageType: game.wfrp4e.config.DAMAGE_TYPE.IGNORE_AP, suppressMsg : true}) let message = await sourceActor.applyBasicDamage(damage - tb, {damageType: game.wfrp4e.config.DAMAGE_TYPE.IGNORE_AP, suppressMsg : true})
+2 -1
View File
@@ -1,5 +1,6 @@
if (args.opposedTest.result.differenceSL >= 0 && args.opposedTest.result.differenceSL <= 2 && args.opposedTest.result.winner == "attacker") if (args.opposedTest.result.differenceSL >= 0 && args.opposedTest.result.differenceSL <= 2 && args.opposedTest.result.winner == "attacker")
{ {
this.actor.update({"system.status.fortune.value" : Math.max(0, (this.actor.system.status.fortune?.value - 1) || 0)}) 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é à <strong>${this.actor.name}</strong>`, {blind : true, whisper : ChatMessage.getWhisperRecipients("GM")}) this.script.scriptMessage(`Fortune point stolen from <strong>${this.actor.name}</strong>`, {blind : true, whisper : ChatMessage.getWhisperRecipients("GM")})
} }
+1 -1
View File
@@ -1 +1 @@
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" return args.skill?.name.includes("Channelling") || args.type == "channelling" || args.skill?.name == game.i18n.localize("NAME.Charm") || args.skill?.name.includes("Language (Magick)") || args.type == "cast"
+15 -5
View File
@@ -10,10 +10,10 @@ let characteristics = {
"wp" : 5, "wp" : 5,
"fel" : 0 "fel" : 0
} }
let skills = ["Esquive", "Perception"] let skills = ["Dodge", "Perception"]
let skillAdvancements = [10, 10] let skillAdvancements = [10, 10]
let talents = ["Flee!", "Marksman"] let talents = ["Flee!", "Marksman"]
let trappings = ["Arme simple"] let trappings = ["Hand Weapon"]
let items = []; let items = [];
let updateObj = this.actor.toObject(); let updateObj = this.actor.toObject();
@@ -48,7 +48,7 @@ for (let talent of talents)
} }
else else
{ {
ui.notifications.warn(`Impossible de trouver ${talent}`, {permanent : true}) ui.notifications.warn(`Could not find ${talent}`, {permanent : true})
} }
} }
@@ -59,13 +59,13 @@ for (let trapping of trappings)
{ {
trappingItem = trappingItem.toObject() trappingItem = trappingItem.toObject()
trappingItem.system.equipped.value = true; equip(trappingItem)
items.push(trappingItem); items.push(trappingItem);
} }
else else
{ {
ui.notifications.warn(`Impossible de trouver ${trapping}`, {permanent : true}) ui.notifications.warn(`Could not find ${trapping}`, {permanent : true})
} }
} }
@@ -73,3 +73,13 @@ updateObj.name = updateObj.name += " " + this.effect.name
await this.actor.update(updateObj) await this.actor.update(updateObj)
this.actor.createEmbeddedDocuments("Item", items); this.actor.createEmbeddedDocuments("Item", items);
function equip(item)
{
if (item.type == "armour")
item.system.worn.value = true
else if (item.type == "weapon")
item.system.equipped = true
else if (item.type == "trapping" && item.system.trappingType.value == "clothingAccessories")
item.system.worn = true
}
+16 -6
View File
@@ -10,10 +10,10 @@ let characteristics = {
"wp" : 15, "wp" : 15,
"fel" : 0 "fel" : 0
} }
let skills = ["Calme", "Esquive", "Intimidate", "Commandement" ] let skills = ["Cool", "Dodge", "Intimidate", "Leadership"]
let skillAdvancements = [15, 15, 10, 5] let skillAdvancements = [15, 15, 10, 5]
let talents = ["Combat Aware", "Combat Reflexes", "Feint", "Resolute"] let talents = ["Combat Aware", "Combat Reflexes", "Feint", "Resolute"]
let trappings = ["Mail Coat", "Mail Chausses", "Mail Coif", "Arme simple", "Shield"] let trappings = ["Mail Coat", "Mail Chausses", "Mail Coif", "Hand Weapon", "Shield"]
let items = []; let items = [];
let updateObj = this.actor.toObject(); let updateObj = this.actor.toObject();
@@ -48,7 +48,7 @@ for (let talent of talents)
} }
else else
{ {
ui.notifications.warn(`Impossible de trouver ${talent}`, {permanent : true}) ui.notifications.warn(`Could not find ${talent}`, {permanent : true})
} }
} }
@@ -59,17 +59,27 @@ for (let trapping of trappings)
{ {
trappingItem = trappingItem.toObject() trappingItem = trappingItem.toObject()
trappingItem.system.equipped.value = true; equip(trappingItem)
items.push(trappingItem); 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 = this.effect.name + " " + updateObj.name updateObj.name = this.effect.name + " " + updateObj.name
await this.actor.update(updateObj) await this.actor.update(updateObj)
this.actor.createEmbeddedDocuments("Item", items); this.actor.createEmbeddedDocuments("Item", items);
function equip(item)
{
if (item.type == "armour")
item.system.worn.value = true
else if (item.type == "weapon")
item.system.equipped = true
else if (item.type == "trapping" && item.system.trappingType.value == "clothingAccessories")
item.system.worn = true
}
+3 -3
View File
@@ -1,15 +1,15 @@
let etiquette = (await fromUuid("Compendium.wfrp4e-core.items.Item.sYbgpSnRqSZWgwFP")).toObject(); let etiquette = (await fromUuid("Compendium.wfrp4e-core.items.Item.sYbgpSnRqSZWgwFP")).toObject();
etiquette.name += ` (Suivants de Tzeentch)`; etiquette.name += ` (Followers of Tzeentch)`;
let animosity = (await fromUuid("Compendium.wfrp4e-core.items.Item.0VpT5yubw4UL7j6f")).toObject(); let animosity = (await fromUuid("Compendium.wfrp4e-core.items.Item.0VpT5yubw4UL7j6f")).toObject();
animosity.system.specification.value = "Suivants de Nurgle"; animosity.system.specification.value = "Followers of Nurgle";
let roll = await new Roll("ceil(1d10 / 3)").roll(); let roll = await new Roll("ceil(1d10 / 3)").roll();
roll.toMessage(this.script.getChatData()); roll.toMessage(this.script.getChatData());
let mutations = []; let mutations = [];
let msg = `<p><strong>Mutations acquises</strong></p>` let msg = `<p><strong>Mutations Gained</strong></p>`
for(let i = 0; i < roll.total; i++) for(let i = 0; i < roll.total; i++)
{ {
let item; let item;
+8 -6
View File
@@ -1,4 +1,4 @@
const repaired_message = `<p>Réparation finie <em>${this.item.name}</em>.</p>`; const repaired_message = `<p>Finished repairing <em>${this.item.name}</em>.</p>`;
const test = 'Trade (Carpenter)'; const test = 'Trade (Carpenter)';
const difficulty = 'challenging'; const difficulty = 'challenging';
const target = 40; const target = 40;
@@ -24,10 +24,11 @@ const extendedTestData = {
}, },
effects: [ effects: [
{ {
name: `Réparer ${this.item.name}`, name: `Repair the ${this.item.name}`,
img: this.item.img, icon: this.item.img,
system: { flags: {
transferData : { wfrp4e: {
applicationData: {
type: "document", type: "document",
documentType: "Item" documentType: "Item"
}, },
@@ -37,7 +38,7 @@ const extendedTestData = {
script: ` script: `
let id = this.item.flags.wfrp4e.fromEffect; let id = this.item.flags.wfrp4e.fromEffect;
let effect = this.actor.appliedEffects.find(e => e.id === id); let effect = this.actor.appliedEffects.find(e => e.id === id);
this.script.message("${repaired_message}"); this.script.scriptMessage("${repaired_message}");
await effect.item.delete(); await effect.item.delete();
`, `,
trigger: "deleteEffect" trigger: "deleteEffect"
@@ -45,6 +46,7 @@ const extendedTestData = {
] ]
} }
} }
}
] ]
}; };
+17 -7
View File
@@ -10,10 +10,10 @@ let characteristics = {
"wp" : 35, "wp" : 35,
"fel" : 15 "fel" : 15
} }
let skills = ["Calme", "Esquive", "Intimidate", "Intuition", "Commandement" , "Lore (Warfare)", "Perception"] let skills = ["Cool", "Dodge", "Intimidate", "Intuition", "Leadership", "Lore (Warfare)", "Perception"]
let skillAdvancements = [25, 15, 25, 25, 30, 20, 20] let skillAdvancements = [25, 15, 25, 25, 30, 20, 20]
let talents = ["Combat Aware", "Combat Reflexes", "Feint", "Inspiring", "Chance", "Resolute", "Unshakable", "War Leader"] let talents = ["Combat Aware", "Combat Reflexes", "Feint", "Inspiring", "Luck", "Resolute", "Unshakable", "War Leader"]
let trappings = ["Arme simple", "Shield"] let trappings = ["Hand Weapon", "Shield"]
let items = []; let items = [];
let updateObj = this.actor.toObject(); let updateObj = this.actor.toObject();
@@ -48,7 +48,7 @@ for (let talent of talents)
} }
else else
{ {
ui.notifications.warn(`Impossible de trouver ${talent}`, {permanent : true}) ui.notifications.warn(`Could not find ${talent}`, {permanent : true})
} }
} }
@@ -59,17 +59,27 @@ for (let trapping of trappings)
{ {
trappingItem = trappingItem.toObject() trappingItem = trappingItem.toObject()
trappingItem.system.equipped.value = true; equip(trappingItem)
items.push(trappingItem); 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.effect.name
await this.actor.update(updateObj) await this.actor.update(updateObj)
this.actor.createEmbeddedDocuments("Item", items); this.actor.createEmbeddedDocuments("Item", items);
function equip(item)
{
if (item.type == "armour")
item.system.worn.value = true
else if (item.type == "weapon")
item.system.equipped = true
else if (item.type == "trapping" && item.system.trappingType.value == "clothingAccessories")
item.system.worn = true
}
+1 -1
View File
@@ -1 +1 @@
return !(["Soin aux animaux", "Emprise sur les animaux"].includes(args.item?.name) || args.item?.name.includes("Chevaucher") || args.item?.name.includes("Dressage")) return !(["Animal Care", "Charm Animal"].includes(args.item?.name) || args.item?.name.includes("Ride") || args.item?.name.includes("Animal Training"))
+1 -1
View File
@@ -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()) let ones = Number(args.test.result.roll.toString().split("").pop())
if (ones > SL) if (ones > SL)
args.test.result.other.push(`<span class="hide-option"><b>${this.effect.name}</b>: ${ones + args.test.successBonus + args.test.slBonus} DR</span>`) args.test.result.other.push(`<span class="hide-option"><b>${this.effect.name}</b>: ${ones + args.test.successBonus + args.test.slBonus} SL</span>`)
} }
+3 -3
View File
@@ -1,12 +1,12 @@
// Imbibing this substance grants the user the Painless Creature Trait. // Imbibing this substance grants the user the Painless Creature Trait.
const hasColdBlooded = this.actor.has("A Sang Froid") const hasColdBlooded = this.actor.has("Cold Blooded")
if (hasColdBlooded === undefined) if (hasColdBlooded === undefined)
{ {
let item = await fromUuid("Compendium.wfrp4e-core.items.mCh1KK9jomwFZcLB") let item = await fromUuid("Compendium.wfrp4e-core.items.mCh1KK9jomwFZcLB")
let data = item.toObject() let data = item.toObject()
this.actor.createEmbeddedDocuments("Item", [data], {fromEffect: this.effect.id}) this.actor.createEmbeddedDocuments("Item", [data], {fromEffect: this.effect.id})
this.script.scriptMessage(`<p><strong>${this.actor.prototypeToken.name}</strong> reçoit le Trait de Créatuer A Sang Froid et peut inverser n'importe quel test de Force Mentale échoué.</p> this.script.scriptMessage(`<p><strong>${this.actor.prototypeToken.name}</strong> has gained the Cold Blooded Creature Trait and may reverse any failed Willpower based Tests.</p>
<p>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é).</p>`, <p>If they gain a Surprised Condition, this Condition is not lost the first time it should be (which is typically at the end of the Round or if they victim is attacked).</p>`,
{whisper: ChatMessage.getWhisperRecipients("GM"), blind: true }) {whisper: ChatMessage.getWhisperRecipients("GM"), blind: true })
} }
+4 -4
View File
@@ -2,8 +2,8 @@
if (args.equipped) { if (args.equipped) {
this.actor.createEmbeddedDocuments("ActiveEffect", [this.item.effects.contents[1]?.convertToApplied()]) this.actor.createEmbeddedDocuments("ActiveEffect", [this.item.effects.contents[1]?.convertToApplied()])
this.script.scriptMessage(`${this.actor.name} porte le <strong>${this.item.name}</strong>. <br> this.script.scriptMessage(`${this.actor.name} dons the <strong>${this.item.name}</strong>. <br>
Il gagne +1 Point de Corruption point si un Test de Corruption est échoué, à appliquer manuellement.<br>Si le personnage porte le masque pendant plus d'une heure ou utilise les effets du masque, il est exposé à une @Corruption[moderate]{Corruption moderate} They gain +1 Corruption point if an exposure Test is failed, which will need to be manually applied.<br>If they wear the mask for more than an hour or benefit from any of its effects, they are exposed to @Corruption[moderate]{Moderate Corruption}
`, `,
{whisper: ChatMessage.getWhisperRecipients("GM")}) {whisper: ChatMessage.getWhisperRecipients("GM")})
} }
@@ -12,8 +12,8 @@ if (args.equipped) {
else if (!args.equipped) else if (!args.equipped)
{ {
await this.item.effects.contents[0].delete(); await this.item.effects.contents[0].delete();
await this.item.update({name : this.item.name += " (Utilisé)"}) await this.item.update({name : this.item.name += " (Used)"})
this.script.scriptMessage(`<strong>${this.item.name}</strong> de ${this.actor.name} a été enlevé et a perdu ses propriétés. Cependant, les effets perdurent pendant [[1d10+4]] jours, après quoi ils devront être manuellement supprimés.`, this.script.scriptMessage(`<strong>${this.item.name}</strong> 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.`,
{whisper: ChatMessage.getWhisperRecipients("GM")} {whisper: ChatMessage.getWhisperRecipients("GM")}
) )
+1 -1
View File
@@ -1,2 +1,2 @@
if (args.totalWoundLoss > 0) if (args.totalWoundLoss > 0)
this.script.scriptMessage(`<b>Lame de Nurglitch: ${args.actor.name}</b> doit réussir un <b>Test d'Endurance Difficile (-10) </b> ou recevoir une @UUID[Compendium.wfrp4e-core.items.kKccDTGzWzSXCBOb]{Blessure Purulente}`, {whisper: ChatMessage.getWhisperRecipients("GM") }) this.script.scriptMessage(`<b>Blade of Nurglitch: ${args.actor.name}</b> must pass an <b>Difficult (-10) Endurance</b> Test or gain a @UUID[Compendium.wfrp4e-core.items.kKccDTGzWzSXCBOb]{Festering Wound}`, {whisper: ChatMessage.getWhisperRecipients("GM") })
+1 -1
View File
@@ -4,5 +4,5 @@ let biteData = bite.toObject();
let senseData = sense.toObject(); let senseData = sense.toObject();
biteData.system.specification.value = 6 - this.actor.characteristics.s.bonus; biteData.system.specification.value = 6 - this.actor.characteristics.s.bonus;
senseData.name = senseData.name += " (Odorat)" senseData.name = senseData.name += " (Smell)"
this.actor.createEmbeddedDocuments("Item", [biteData, senseData], {fromEffect : this.effect.id}) this.actor.createEmbeddedDocuments("Item", [biteData, senseData], {fromEffect : this.effect.id})
+1 -1
View File
@@ -1,4 +1,4 @@
let regenerate = this.actor.items.getName('Régénération') let regenerate = this.actor.items.getName('Regenerate')
if (regenerate) if (regenerate)
{ {
+1 -1
View File
@@ -1,6 +1,6 @@
if (isNaN(parseInt(this.item.system.specification.value))) if (isNaN(parseInt(this.item.system.specification.value)))
{ {
let value = await ValueDialog.create({text : "Enter Spellcasting Lore", title : this.effect.name}, "", Object.values(game.wfrp4e.config.magicLores)); let value = await ValueDialog.create("Enter Spellcasting Lore", this.effect.name, "", Object.values(game.wfrp4e.config.magicLores));
if (value) if (value)
{ {
this.item.updateSource({"system.specification.value" : value}); this.item.updateSource({"system.specification.value" : value});
+2 -2
View File
@@ -1,11 +1,11 @@
let roll = Math.ceil(CONFIG.Dice.randomUniform() * 10) let roll = Math.ceil(CONFIG.Dice.randomUniform() * 10)
if (args.test.isFumble && roll == 1 && !args.test.result.misfire) if (args.test.isFumble && roll == 1 && !args.test.result.misfire)
{ {
args.test.result.misfire = game.i18n.localize("Misfire") + " (Résultat 1)" args.test.result.misfire = game.i18n.localize("Misfire") + " (Rolled 1)"
args.test.result.misfireDamage = eval(parseInt(args.test.result.roll.toString().split('').pop()) + args.test.item.Damage) args.test.result.misfireDamage = eval(parseInt(args.test.result.roll.toString().split('').pop()) + args.test.item.Damage)
} }
else if (args.test.isFumble && roll != 1) else if (args.test.isFumble && roll != 1)
{ {
args.test.result.other.push("Résultat du Raté: " + roll) args.test.result.other.push("Misfire Roll: " + roll)
} }
+2 -2
View File
@@ -1,5 +1,5 @@
let item = await fromUuid("Compendium.wfrp4e-core.items.Q2MCUrG2HppMcvN0") let item = await fromUuid("Compendium.wfrp4e-core.items.Q2MCUrG2HppMcvN0")
item = item.toObject() item = item.toObject()
let species = args.actor.Species || " de votre espèce" let species = args.actor.Species || " of your species"
item.name = `Animosité (tous sauf ${species})` item.name = `Animosity (all not ${species})`
this.actor.createEmbeddedDocuments("Item", [item], {fromEffect : this.effect.id}) this.actor.createEmbeddedDocuments("Item", [item], {fromEffect : this.effect.id})
+1 -1
View File
@@ -1,2 +1,2 @@
args.abort = true; args.abort = true;
this.script.scriptNotification(`Impossible d'utiliser ${game.wfrp4e.config.locations[this.effect.getFlag("wfrp4e", "location")]}!`, "error") this.script.scriptNotification(`Cannot use ${game.wfrp4e.config.locations[this.effect.getFlag("wfrp4e", "location")]}!`, "error")
+1 -1
View File
@@ -1,6 +1,6 @@
let useWard = await Dialog.wait({ let useWard = await Dialog.wait({
title : this.effect.name, title : this.effect.name,
content : `<p>Utiliser Ward fourni par <strong>${this.effect.name}</strong>?`, content : `<p>Use Ward provided by <strong>${this.effect.name}</strong>?`,
buttons : { buttons : {
yes : { yes : {
label : "Yes", label : "Yes",
+2 -2
View File
@@ -1,11 +1,11 @@
if (this.actor.system.status.advantage.value >= 2) if (this.actor.system.status.advantage.value >= 2)
{ {
await this.actor.modifyAdvantage(-2); await this.actor.modifyAdvantage(-2);
this.script.scriptNotification("Avvantage soustrait") this.script.scriptNotification("Advantage Subtracted")
} }
else else
{ {
return this.script.scriptNotification("Pas assez d'Avantages!", "error") return this.script.scriptNotification("Not enough Advantage!", "error")
} }
let test = await this.actor.setupTrait(this.item) let test = await this.actor.setupTrait(this.item)
+5 -5
View File
@@ -1,7 +1,7 @@
const actor = args.actor; const actor = args.actor;
if (actor.itemTypes.skill.find(s => s.name === "Savoir (Océans)")) { if (actor.itemTypes.skill.find(s => s.name === "Lore (Oceans)")) {
const loreTest = await actor.setupSkill('Savoir (Océans)', { const loreTest = await actor.setupSkill('Lore (Oceans)', {
appendTitle: ` ${this.effect.name}`, appendTitle: ` ${this.effect.name}`,
skipTargets: true, skipTargets: true,
fields: {difficulty: 'hard'}, fields: {difficulty: 'hard'},
@@ -10,13 +10,13 @@ if (actor.itemTypes.skill.find(s => s.name === "Savoir (Océans)")) {
await loreTest.roll(); await loreTest.roll();
if (loreTest.succeeded) { if (loreTest.succeeded) {
loreTest.result.other.push(`<b>${actor.name}</b> reconnaît l'attrait du Léviathan.`); loreTest.result.other.push(`<b>${actor.name}</b> recognizes lure of the Leviathan.`);
loreTest.renderRollCard(); loreTest.renderRollCard();
return; return;
} }
} }
let test = await actor.setupSkill('Calme', { let test = await actor.setupSkill('Cool', {
appendTitle: ` ${this.effect.name}`, appendTitle: ` ${this.effect.name}`,
skipTargets: true, skipTargets: true,
fields: {difficulty: 'easy'}, fields: {difficulty: 'easy'},
@@ -25,7 +25,7 @@ let test = await actor.setupSkill('Calme', {
await test.roll(); await test.roll();
if (!test.succeeded) { if (!test.succeeded) {
test.result.other.push(`<b>${actor.name}</b> devien @Condition[Assommé] par cette vision.`); test.result.other.push(`<b>${actor.name}</b> became @Condition[Stunned] by the sight.`);
test.renderRollCard(); test.renderRollCard();
actor.addCondition("stunned"); actor.addCondition("stunned");
} }
+1 -1
View File
@@ -2,7 +2,7 @@ let item = await fromUuid("Compendium.wfrp4e-core.items.uqGxFOEqeurwkAO3")
item = item.toObject() item = item.toObject()
item.system.specification.value = 10; item.system.specification.value = 10;
item.name += " (Feu)" item.name += " (Fire)"
setProperty(item, "flags.wfrp4e.breath", "fire") setProperty(item, "flags.wfrp4e.breath", "fire")
Item.create(item, {parent : this.actor, fromEffect: this.effect.id}) Item.create(item, {parent : this.actor, fromEffect: this.effect.id})
+1 -1
View File
@@ -1,5 +1,5 @@
if (getProperty(args.data, "system.status.fortune.value")) if (getProperty(args.data, "system.status.fortune.value"))
{ {
this.script.scriptNotification("Impossible de mettre à jour la Fortune"); this.script.scriptNotification("Cannot update Fortune");
delete args.data.system.status.wounds.value; delete args.data.system.status.wounds.value;
} }
+1 -1
View File
@@ -1,4 +1,4 @@
if (args.item.type == "skill" && args.item.name == "Corps à corps (Base)") if (args.item.type == "skill" && args.item.name == "Melee (Basic)")
{ {
args.item.system.modifier.value += 20; args.item.system.modifier.value += 20;
} }
+2 -2
View File
@@ -1,6 +1,6 @@
if (args.test.result.castOutcome == "failure") if (args.test.result.castOutcome == "failure")
{ {
ValueDialog.create({text : "Enter Wounds Lost to gain SL", title : this.effect.name}, "0").then(async value => { ValueDialog.create("Enter Wounds Lost to gain SL", this.effect.name, "0").then(async value => {
value = Math.clamped(value, 0, 3) value = Math.clamped(value, 0, 3)
if (value == 0) if (value == 0)
{ {
@@ -8,7 +8,7 @@ if (args.test.result.castOutcome == "failure")
} }
else if (Number.isNumeric(value)) else if (Number.isNumeric(value))
{ {
this.script.notification(`Lost ${value} Wounds`) this.script.scriptNotification(`Lost ${value} Wounds`)
this.actor.modifyWounds(-1 * value) this.actor.modifyWounds(-1 * value)
await this.item.system.toggleEquip(); await this.item.system.toggleEquip();
args.test.addSL(value); args.test.addSL(value);
+4 -4
View File
@@ -3,8 +3,8 @@
if (args.equipped) if (args.equipped)
{ {
this.actor.createEmbeddedDocuments("ActiveEffect", [this.item.effects.contents[1]?.convertToApplied()]) this.actor.createEmbeddedDocuments("ActiveEffect", [this.item.effects.contents[1]?.convertToApplied()])
this.script.scriptMessage(`${this.actor.name} porte le <strong>${this.item.name}</strong>. <br> this.script.scriptMessage(`${this.actor.name} dons the <strong>${this.item.name}</strong>. <br>
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 moderate}. If they wear the mask for more than an hour or benefit from any of its effects, they are exposed to @Corruption[moderate]{Moderate Corruption}.
`, `,
{whisper: ChatMessage.getWhisperRecipients("GM")}) {whisper: ChatMessage.getWhisperRecipients("GM")})
} }
@@ -13,8 +13,8 @@ if (args.equipped)
else if (!args.equipped) else if (!args.equipped)
{ {
await this.item.effects.contents[0].delete(); await this.item.effects.contents[0].delete();
await this.item.update({name : this.item.name += " (Utilisé)"}) await this.item.update({name : this.item.name += " (Used)"})
this.script.scriptMessage(`<strong>${this.item.name}</strong> 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.`, this.script.scriptMessage(`<strong>${this.item.name}</strong> 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.`,
{whisper: ChatMessage.getWhisperRecipients("GM")} {whisper: ChatMessage.getWhisperRecipients("GM")}
) )
+2 -2
View File
@@ -1,8 +1,8 @@
let poisoned = args.actor.hasCondition("poisoned") let poisoned = args.actor.hasCondition("poisoned")
if (poisoned) if (poisoned)
{ {
this.script.scriptNotification(`Suppression de ${poisoned.conditionValue} états Empoisonné`) this.script.scriptNotification(`Removed ${poisoned.conditionValue} Poisoned Conditions`)
poisoned.delete(); poisoned.delete();
} }
else else
this.script.scriptNotification(`Aucun état Empoisonné`) this.script.scriptNotification(`No Poisoned Conditions`)
+1 -1
View File
@@ -1 +1 @@
this.script.scriptMessage(`Revendiquer le Bonus de <strong>${this.effect.name}</strong> `); this.script.scriptMessage(`Claimed <strong>${this.effect.name}</strong> Bonus`);
+1 -1
View File
@@ -1 +1 @@
return args.skill?.name == "Corps à corps (Bagarre)" || args.item?.weaponGroup?.value == "brawling" return args.skill?.name == "Melee (Brawling)" || args.item?.weaponGroup?.value == "brawling"
+7 -3
View File
@@ -1,5 +1,5 @@
// Imbibing this substance grants the user the Painless Creature Trait. // Imbibing this substance grants the user the Painless Creature Trait.
const hasPainless = this.actor.has("Insensible à la douleur"); const hasPainless = this.actor.has("Painless");
if (hasPainless === undefined) if (hasPainless === undefined)
{ {
let item = await fromUuid("Compendium.wfrp4e-core.items.wMwSRDmgiF2IdCJr"); let item = await fromUuid("Compendium.wfrp4e-core.items.wMwSRDmgiF2IdCJr");
@@ -7,7 +7,11 @@ if (hasPainless === undefined)
this.actor.createEmbeddedDocuments("Item", [data], {fromEffect: this.effect.id}) this.actor.createEmbeddedDocuments("Item", [data], {fromEffect: this.effect.id})
this.script.scriptMessage( this.script.scriptMessage(
`<p><strong>${this.actor.prototypeToken.name}</strong> 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.</p> `<p><strong>${this.actor.prototypeToken.name}</strong> has gained the Painless Creature Trait. This
<p>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.</p>`, effect lasts for one hour, after which it dissipates and the full effect
of all the imbiber's wounds come crashing down at once.</p>
<p>Note that this does not prevent the user from acquiring a Critical
Wound or dying from one. It merely allows them to ignore most
of their effects.</p>`,
{ whisper: ChatMessage.getWhisperRecipients("GM"), blind: true}) { whisper: ChatMessage.getWhisperRecipients("GM"), blind: true})
} }
+1 -1
View File
@@ -1 +1 @@
return (["Soin aux animaux", "Emprise sur les animaux"].includes(args.item?.name) || args.item?.name.includes("Chevaucher") || args.item?.name.includes("Dressage")) return (["Animal Care", "Charm Animal"].includes(args.item?.name) || args.item?.name.includes("Ride") || args.item?.name.includes("Animal Training"))
+3 -3
View File
@@ -1,9 +1,9 @@
let strLoss = Math.ceil(CONFIG.Dice.randomUniform() * 10) let strLoss = Math.ceil(CONFIG.Dice.randomUniform() * 10)
let tghLoss = 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")) if (!this.actor.has("Undead") && !this.actor.has("Daemonic"))
{ {
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 => { this.actor.setupSkill(game.i18n.localize("NAME.Cool"), { appendTitle: " - " + this.effect.name, fields: { difficulty: "average" }, context: { failure: `Lost ${strLoss} Strength and ${tghLoss} Toughness` } }).then(async test => {
await test.roll(); await test.roll();
if (test.failed) { 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 }) 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 })
@@ -12,5 +12,5 @@ if (!this.actor.has("Mort-vivant") && !this.actor.has("Démoniaque"))
} }
else { else {
this.script.scriptNotification(`<strong>${this.actor.name}</strong> est immunisé à ${this.effect.name}`) this.script.scriptNotification(`<strong>${this.actor.name}</strong> is immune to ${this.effect.name}`)
} }
+7 -7
View File
@@ -1,17 +1,17 @@
let type = this.item.getFlag("wfrp4e", "breath") let type = this.item.getFlag("wfrp4e", "breath")
let types = { let types = {
none : "Aucun", none : "None",
cold : "Froid", cold : "Cold",
corrosion : "Corrosion", corrosion : "Corrosion",
fire : "Feu", fire : "Fire",
electricity : "Electricité", electricity : "Electricity",
poison : "Poison", poison : "Poison",
smoke : "Fumée", smoke : "Smoke",
various : "Divers" various : "Various"
} }
if (!type) 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, "Choose Breath"))[0]?.id;
this.item.updateSource({"flags.wfrp4e.breath" : type}) this.item.updateSource({"flags.wfrp4e.breath" : type})
} }
+1 -1
View File
@@ -3,5 +3,5 @@ let APIgnored = args.AP.layers.reduce((prev, current) => prev + ((current.weakpo
if (APIgnored) if (APIgnored)
{ {
args.modifiers.ap.ignored += APIgnored args.modifiers.ap.ignored += APIgnored
args.modifiers.ap.details.push(`<strong>${this.effect.name}</strong>: Ignorer les PA avec des Points Faibles (${APIgnored})`) args.modifiers.ap.details.push(`<strong>${this.effect.name}</strong>: Ignore AP with Weakpoints (${APIgnored})`)
} }
+1 -1
View File
@@ -3,5 +3,5 @@ if (caster)
{ {
let healed= caster.characteristics.wp.bonus let healed= caster.characteristics.wp.bonus
this.actor.modifyWounds(healed); this.actor.modifyWounds(healed);
this.script.scriptMessage(`<strong>${this.actor.prototypeToken.name}</strong> regagne ${healed} Blessures`) this.script.scriptMessage(`<strong>${this.actor.prototypeToken.name}</strong> regains ${healed} Wounds`)
} }
+1 -1
View File
@@ -3,5 +3,5 @@ let weakpointsAP = args.AP.layers.filter(i => !i.ignored && i.weakpoints).reduce
if (weakpointsAP > 0) if (weakpointsAP > 0)
{ {
args.modifiers.ap.ignored += weakpointsAP; 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 Weakpoints (${weakpointsAP})`);
} }
+7 -5
View File
@@ -24,10 +24,11 @@ const extendedTestData = {
}, },
effects: [ effects: [
{ {
name: `Réparer ${this.item.name}`, name: `Repair the ${this.item.name}`,
img: this.item.img, icon: this.item.img,
system: { flags: {
transferData : { wfrp4e: {
applicationData: {
type: "document", type: "document",
documentType: "Item" documentType: "Item"
}, },
@@ -37,7 +38,7 @@ const extendedTestData = {
script: ` script: `
let id = this.item.flags.wfrp4e.fromEffect; let id = this.item.flags.wfrp4e.fromEffect;
let effect = this.actor.appliedEffects.find(e => e.id === id); let effect = this.actor.appliedEffects.find(e => e.id === id);
this.script.message("${repaired_message}"); this.script.scriptMessage("${repaired_message}");
await effect.item.delete(); await effect.item.delete();
`, `,
trigger: "deleteEffect" trigger: "deleteEffect"
@@ -45,6 +46,7 @@ const extendedTestData = {
] ]
} }
} }
}
] ]
}; };
+2 -2
View File
@@ -9,7 +9,7 @@ let filters = [
} }
] ]
let petty = await ItemDialog.createFromFilters(filters, 6, "Choisissez 6 Sorts de Magie Mineure") let petty = await game.wfrp4e.apps.ItemDialog.createFromFilters(filters, 6, "Choose 6 Petty Spells")
filters = [ filters = [
@@ -23,7 +23,7 @@ filters = [
} }
] ]
let arcane = await ItemDialog.createFromFilters(filters, 9, "Choisissez 9 Sorts de Magie d'Arcane") let arcane = await game.wfrp4e.apps.ItemDialog.createFromFilters(filters, 9, "Choose 9 Arcane Spells")
let items = petty.concat(arcane).map(i => i.toObject()) let items = petty.concat(arcane).map(i => i.toObject())
+1 -1
View File
@@ -1,6 +1,6 @@
fromUuid("Compendium.wfrp4e-core.items.5QcrpLQWWrsbKR79").then(item => { fromUuid("Compendium.wfrp4e-core.items.5QcrpLQWWrsbKR79").then(item => {
let data = item.toObject(); let data = item.toObject();
data.system.tests.value = data.system.tests.value.replace("coins", "metal objects"); data.system.tests.value = data.system.tests.value.replace("coins", "metal objects");
data.system.description.value += "<p>Ce Talent s'applique également à tout objet métallique à cause de <strong>l'Affinité Metallique</strong></p>" data.system.description.value += "<p>This Talent also extends to any metal object because of <strong>Metallic Affinity</strong></p>"
this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}) this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id})
}) })
+1 -1
View File
@@ -1,4 +1,4 @@
let item = await fromUuid("Compendium.wfrp4e-core.items.9h82z72XGo9tfgQS") let item = await fromUuid("Compendium.wfrp4e-core.items.9h82z72XGo9tfgQS")
let data = item.toObject(); let data = item.toObject();
data.name += ` (Odorat)` data.name += ` (Smell)`
this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}) this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id})
+1 -1
View File
@@ -1,4 +1,4 @@
let item = await fromUuid("Compendium.wfrp4e-core.items.AtpAudHA4ybXVlWM") let item = await fromUuid("Compendium.wfrp4e-core.items.AtpAudHA4ybXVlWM")
let data = item.toObject(); let data = item.toObject();
data.name += ` (Si Charge)` data.name += ` (When Charging)`
this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}) this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id})
+1 -1
View File
@@ -3,5 +3,5 @@ let sourceItem = this.effect.sourceItem;
if (sourceItem) if (sourceItem)
{ {
this.actor.applyEffect({effectUuids : [sourceItem.effects.contents[2].uuid]}) this.actor.applyEffect({effectUuids : [sourceItem.effects.contents[2].uuid]})
this.script.scriptNotification("Applique après les effets"); this.script.scriptNotification("Applied after effects");
} }
+1 -1
View File
@@ -1,6 +1,6 @@
if (this.item.getFlag("wfrp4e", "failedCool")) if (this.item.getFlag("wfrp4e", "failedCool"))
{ {
this.item.name += " (Aucun PA)" this.item.name += " (No AP)"
this.item.system.AP = { this.item.system.AP = {
"head": 0, "head": 0,
"lArm": 0, "lArm": 0,
+2 -2
View File
@@ -2,11 +2,11 @@ let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {sk
await test.roll(); await test.roll();
if (test.failed) if (test.failed)
{ {
this.script.scriptNotification("Subi une <strong>Blessure Purulente</strong>") this.script.scriptNotification("Gained a <strong>Festering Wound</strong>")
let item = await fromUuid("Compendium.wfrp4e-core.items.kKccDTGzWzSXCBOb") let item = await fromUuid("Compendium.wfrp4e-core.items.kKccDTGzWzSXCBOb")
this.actor.createEmbeddedDocuments("Item", [item.toObject()]) this.actor.createEmbeddedDocuments("Item", [item.toObject()])
} }
else else
{ {
this.script.scriptNotification("Evite une <strong>Blessure Purulente</strong>") this.script.scriptNotification("Avoided a <strong>Festering Wound</strong>")
} }
+1 -1
View File
@@ -1,6 +1,6 @@
if (args.test.result.SL < 0) if (args.test.result.SL < 0)
{ {
this.script.scriptMessage(`Reçoit ${Math.abs(args.test.result.SL)} Points de Corruption`, {whisper : ChatMessage.getWhisperRecipients("GM")}) this.script.scriptMessage(`Gained ${Math.abs(args.test.result.SL)} Corruption points`, {whisper : ChatMessage.getWhisperRecipients("GM")})
if (args.test.failed && this.actor.type == "character") if (args.test.failed && this.actor.type == "character")
{ {
this.actor.update({"system.status.corruption.value" : parseInt(this.actor.status.corruption.value) + Math.abs(args.test.result.SL)}) this.actor.update({"system.status.corruption.value" : parseInt(this.actor.status.corruption.value) + Math.abs(args.test.result.SL)})
+13 -7
View File
@@ -71,18 +71,24 @@ for (let c of choice)
let item = await game.wfrp4e.utility.find(c.name, c.type) let item = await game.wfrp4e.utility.find(c.name, c.type)
if (item) if (item)
{ {
let equip = item.system.tags.has("equippable");
item = item.toObject() item = item.toObject()
if (equip) equip(item);
{ items.push(mergeObject(item, (c.diff || {})))
item.system.equipped.value = true;
}
items.push(foundry.utils.mergeObject(item, (c.diff || {})))
} }
else else
ui.notifications.warn(`Impossible de trouver ${talent}`, {permanent : true}) ui.notifications.warn(`Could not find ${talent}`, {permanent : true})
} }
} }
await this.actor.update(updateObj) await this.actor.update(updateObj)
this.actor.createEmbeddedDocuments("Item", items); this.actor.createEmbeddedDocuments("Item", items);
function equip(item)
{
if (item.type == "armour")
item.system.worn.value = true
else if (item.type == "weapon")
item.system.equipped = true
else if (item.type == "trapping" && item.system.trappingType.value == "clothingAccessories")
item.system.worn = true
}
+1 -1
View File
@@ -1,5 +1,5 @@
let roll = await new Roll("1d10").roll() let roll = await new Roll("1d10").roll()
roll.toMessage(this.script.getChatData({flavor : `${this.effect.name} (Durée)`})); roll.toMessage(this.script.getChatData({flavor : `${this.effect.name} (Duration)`}));
this.effect.updateSource({"duration.rounds" : roll.total}) this.effect.updateSource({"duration.rounds" : roll.total})
+1 -1
View File
@@ -1 +1 @@
return !args.skill?.name.includes("Focalisation") && args.type != "channelling" return !args.skill?.name.includes("Channelling") && args.type != "channelling"
+2 -2
View File
@@ -1,7 +1,7 @@
let halve; let halve;
if (args.opposedTest.attackerTest.item?.type != "spell") if (args.opposedTest.attackerTest.item?.type != "spell")
{ {
halve = await Dialog.confirm({title : this.effect.name, content : "Diviser les dommages? (Divise par 2 tout les dommages autre que ceux causés par le feu, le froid et magiques)"}) halve = await Dialog.confirm({title : this.effect.name, content : "Halve Damage? (Halves all damage other than fire, cold, and magic)"})
} }
else else
{ {
@@ -11,5 +11,5 @@ else
if (halve) if (halve)
{ {
args.totalWoundLoss /= 2; args.totalWoundLoss /= 2;
args.modifiers.other.push({label : this.effect.name, details : "Divisé par 2", value : "× 0.5"}) args.modifiers.other.push({label : this.effect.name, details : "Halved", value : "× 0.5"})
} }
+1 -1
View File
@@ -1 +1 @@
return args.type != "cast" || !["mort", "nécromancie", "vie", "lumière", "cieux"].includes(args.spell?.system.lore.value) return args.type != "cast" || !["death", "necromancy", "life", "light", "heavens"].includes(args.spell?.system.lore.value)
+1 -1
View File
@@ -1,4 +1,4 @@
if (args.opposedTest.result.differenceSL >= 0 && args.opposedTest.result.differenceSL <= 2 && args.opposedTest.result.winner == "attacker") if (args.opposedTest.result.differenceSL >= 0 && args.opposedTest.result.differenceSL <= 2 && args.opposedTest.result.winner == "attacker")
{ {
this.script.scriptMessage(`Émet un nuage de poudre noire nauséabonde. Active l'effet <strong>Fellowship Penalty</strong> sur @UUID[${this.actor.uuid}].`, {blind : true, whisper : ChatMessage.getWhisperRecipients("GM")}) this.script.scriptMessage(`Emits a cloud of foul-smelling blackpowder. Enable the <strong>Fellowship Penalty</strong> Active Effect on @UUID[${this.actor.uuid}].`, {blind : true, whisper : ChatMessage.getWhisperRecipients("GM")})
} }
+1 -1
View File
@@ -1 +1 @@
return args.skill?.name == "Projectiles (Poudre noire)" return args.skill?.name == "Ranged (Blackpowder)"
+1 -1
View File
@@ -1,5 +1,5 @@
if (args.test.options.pilot && args.test.result.reversed) if (args.test.options.pilot && args.test.result.reversed)
{ {
args.test.data.result.SL = "+" + Math.min(1, Number(args.test.data.result.SL)) args.test.data.result.SL = "+" + Math.min(1, Number(args.test.data.result.SL))
args.test.result.other.push(`<b>${this.effect.name}</b>: DR limité à 1`) args.test.result.other.push(`<b>${this.effect.name}</b>: SL limited to 1`)
} }
+1 -1
View File
@@ -3,4 +3,4 @@ let current = this.actor.status.fortune.value
this.actor.update({"system.status.fortune.value" : fortunePoints + current}) this.actor.update({"system.status.fortune.value" : fortunePoints + current})
this.script.scriptMessage(`<b>${this.actor.prototypeToken.name}</b> voit ses points de Destin augmentés de ${current} à ${fortunePoints + current}`) this.script.scriptMessage(`<b>${this.actor.prototypeToken.name}</b> fortune points increased from ${current} to ${fortunePoints + current}`)
+1 -1
View File
@@ -8,5 +8,5 @@ if (this.item.system.quantity.value)
} }
else else
{ {
this.script.scriptNotification("Aucun disponible!", "error") this.script.scriptNotification("None left!", "error")
} }
+1 -1
View File
@@ -5,7 +5,7 @@ if (test.succeeded)
{ {
if (args.totalWoundLoss <= parseInt(test.result.SL)) if (args.totalWoundLoss <= parseInt(test.result.SL))
{ {
args.abort = `<strong>${this.effect.name}</strong>: Attaque détournée et renvoyée` args.abort = `<strong>${this.effect.name}</strong>: Attack deflected and reflected`
} }
args.modifiers.other.push({label : this.effect.name, value : -1 * parseInt(test.result.SL)}) args.modifiers.other.push({label : this.effect.name, value : -1 * parseInt(test.result.SL)})
} }
+3 -3
View File
@@ -3,17 +3,17 @@ let symptoms = {
coughsandsneezes : "Coughs and Sneezes", coughsandsneezes : "Coughs and Sneezes",
fever : "Fever", fever : "Fever",
flux : "Flux", flux : "Flux",
nausea : "Nausée" nausea : "Nausea"
} }
let roll = await (new Roll(`max(0, 1d10 - ${this.actor.characteristics.wp.bonus})`).roll()) let roll = await (new Roll(`max(0, 1d10 - ${this.actor.characteristics.wp.bonus})`).roll())
roll.toMessage(this.script.getChatData()); roll.toMessage(this.script.getChatData());
let choices = await ItemDialog.create(ItemDialog.objectToArray(symptoms), roll.total, "Choisissez les Symptomes"); let choices = await ItemDialog.create(ItemDialog.objectToArray(symptoms), roll.total, "Choose Symptoms");
if (choices.length) if (choices.length)
{ {
let symptomEffects = foundry.utils.duplicate(game.wfrp4e.config.symptomEffects) let symptomEffects = duplicate(game.wfrp4e.config.symptomEffects)
let added = [] let added = []
for(let choice of choices) for(let choice of choices)
{ {
+2 -3
View File
@@ -1,9 +1,8 @@
let lore = this.effect.name.split("(")[1].split(")")[0].toLowerCase(); 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 channelling corresponding lore
if (args.type == "channelling" && spellLore == lore) if (args.type == "channelling" && args.spell.system.lore.value == lore)
args.prefillModifiers.slBonus += 2 args.prefillModifiers.slBonus += 2
// If channelling or casting different lore // 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 args.prefillModifiers.slBonus -= 1
+2 -2
View File
@@ -22,7 +22,7 @@ if (test.succeeded) {
let rating = parseInt(this.effect.name.match(/\d+/)?.[0]); let rating = parseInt(this.effect.name.match(/\d+/)?.[0]);
if (rating <= 1) { if (rating <= 1) {
const scriptData = this.effect.system.scriptData const scriptData = this.effect.flags.wfrp4e.scriptData;
scriptData[2].trigger = ''; scriptData[2].trigger = '';
await this.effect.update({disabled: true, "system.scriptData": scriptData}); await this.effect.update({disabled: true, "flags.wfrp4e.scriptData": scriptData});
} }
+1 -1
View File
@@ -1,4 +1,4 @@
let test = await args.actor.setupSkill("Esquive", {skipTargets: true, appendTitle : ` - ${this.effect.name}`}) let test = await args.actor.setupSkill("Dodge", {skipTargets: true, appendTitle : ` - ${this.effect.name}`})
await test.roll(); await test.roll();
let damage = parseInt(this.effect.sourceTest.result.SL) let damage = parseInt(this.effect.sourceTest.result.SL)
+1 -1
View File
@@ -1,6 +1,6 @@
let arm = await fromUuid("Compendium.wfrp4e-core.items.MnMZv7ZXoRqoH9dS"); let arm = await fromUuid("Compendium.wfrp4e-core.items.MnMZv7ZXoRqoH9dS");
let leg = await fromUuid("Compendium.wfrp4e-core.items.k00PimCWkff11IA0"); let leg = await fromUuid("Compendium.wfrp4e-core.items.k00PimCWkff11IA0");
let choice = await ItemDialog.create([arm, leg], 1, "Choisir le Membre") let choice = await ItemDialog.create([arm, leg], 1, "Choose Limb")
this.actor.createEmbeddedDocuments("Item", choice, {fromEffect: this.effect.id}) this.actor.createEmbeddedDocuments("Item", choice, {fromEffect: this.effect.id})
+1 -1
View File
@@ -1,2 +1,2 @@
this.script.scriptNotification("Effet utilisé"); this.script.scriptNotification("Effect Used");
this.effect.delete(); this.effect.delete();
+10 -9
View File
@@ -1,9 +1,10 @@
if (args.test.failed) { if (args.test.failed)
let SL = Number(args.test.result.SL) {
if (SL <= -2 && SL > -4) let SL = Number(args.test.result.SL)
this.actor.addCondition("stunned") if (SL <= -2 && SL > -4)
else if (SL <= -4 && SL > -6) this.actor.addCondition("stunned")
this.script.scriptMessage(this.actor.prototypeToken.name + " doit réaliser un Test de <b>Force Mentale</ou subir la condition @Condition[A Terre].") else if (SL <= -4 && SL > -6)
else if (SL <= -6) this.script.scriptMessage(this.actor.prototypeToken.name + " must make a <b>Willpower</b> Test or fall @Condition[Prone].")
this.actor.addCondition("unconscious") else if (SL <= -6)
} this.actor.addCondition("unconscious")
}
+2 -2
View File
@@ -1,11 +1,11 @@
if (this.actor.system.status.advantage.value >= 3) if (this.actor.system.status.advantage.value >= 3)
{ {
this.actor.modifyAdvantage(-3); this.actor.modifyAdvantage(-3);
this.script.scriptNotification("Avantage soustrait") this.script.scriptNotification("Advantage Subtracted")
} }
else else
{ {
return this.script.scriptNotification("Pas assez d'Avantages!", "error") return this.script.scriptNotification("Not enough Advantage!", "error")
} }
let test = await this.actor.setupTrait(this.item) let test = await this.actor.setupTrait(this.item)
+4 -4
View File
@@ -1,11 +1,11 @@
if (args.totalWoundLoss > 0) { if (args.totalWoundLoss > 0) {
args.opposedTest.result.other.push( args.opposedTest.result.other.push(
`@Corruption[minor]{Exposition Mineure à la Corruption}` `@Corruption[minor]{Moderate Exposure to Corruption}`
) )
this.script.scriptMessage(`<strong>${this.effect.name}</strong>: this.script.scriptMessage(`<strong>${this.effect.name}</strong>:
@Corruption[moderate]{Exposition moderate à la Corruption} <br/> @Corruption[moderate]{Moderate Exposure to Corruption} <br/>
<strong>${args.actor.prototypeToken.name}</strong> doit réussir un <strong>${args.actor.prototypeToken.name}</strong> must take an
<strong>Test de Corruption (moderat)</strong>`, <strong>Corruption (Moderate) Test</strong>`,
{whisper: ChatMessage.getWhisperRecipients("GM")} {whisper: ChatMessage.getWhisperRecipients("GM")}
) )
} }
+1 -1
View File
@@ -1 +1 @@
return args.skill?.name == "Chevaucher (Cheval)" || (args.options.dodge && this.actor.isMounted); return args.skill?.name == "Ride (Horse)" || (args.options.dodge && this.actor.isMounted);

Some files were not shown because too many files have changed in this diff Show More